draw.io is a JavaScript, client-side editor for general diagramming.
26.0.9 release
David Bensond6bd3c325fe5
diff --git a/ChangeLog b/ChangeLogindex 4d22fb9c6..e974e670d 100644--- a/ChangeLog+++ b/ChangeLog@@ -1,3 +1,13 @@+27-JAN-2025: 26.0.9++- Fixes possible split is not a function in StyleFormatPanel+- Uses light custom background with simple adaptive colors [jgraph/drawio-desktop#1978]++24-JAN-2025: 26.0.8++- Improves VSDX Import [DID-14176]+- [conf cloud]] Fixes Gliffy diagrams with core ui icons [DID-14260]+22-JAN-2025: 26.0.7- Fixes for Atlas theme dark modediff --git a/VERSION b/VERSIONindex 3f7e68d3c..8f1448ebe 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-26.0.7\ No newline at end of file+26.0.9\ No newline at end of filediff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.jsindex 26e1b9916..c2158f900 100644--- a/src/main/webapp/js/app.min.js+++ b/src/main/webapp/js/app.min.js@@ -64,7 +64,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);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"26.0.7",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.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.9",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&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.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||@@ -2061,21 +2061,21 @@ var WrapperWindow=function(a,b,e,f,h,d,g){var m=a.createSidebarContainer();g(m);(function(){mxGraphView.prototype.validateBackgroundPage=function(){var g=this.graph;if(null!=g.container&&!g.transparentBackground){if(g.pageVisible){var m=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var p=g.container.firstChild;null!=p&&p.nodeType!=mxConstants.NODETYPE_ELEMENT;)p=p.nextSibling;null!=p&&(this.backgroundPageShape=this.createBackgroundPageShape(m),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(g.container),p.style.position="absolute",g.container.insertBefore(this.backgroundPageShape.node,p),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(k){g.dblClick(k)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(k){g.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){null!=g.tooltipHandler&&g.tooltipHandler.isHideOnHover()&&g.tooltipHandler.hide();g.isMouseDown&&!mxEvent.isConsumed(k)&&g.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){g.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(k))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=m,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};-mxGraphView.prototype.validateBackgroundStyles=function(g,m,p){var k=this.graph;g=null!=g?g:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,x=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,z=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",C="none",E="";if(k.isGridEnabled()||k.gridVisible){E=10;mxClient.IS_SVG?(C=unescape(encodeURIComponent(this.createSvgGrid(z,g))),C=window.btoa?-btoa(C):Base64.encode(C,!0),C="url(data:image/svg+xml;base64,"+C+")",E=k.gridSize*this.scale*this.gridSteps*g):C="url("+this.gridImage+")";var D=z=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var G=k.gridSize*this.scale*this.gridSteps,I=m%G;G=p%G;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),z=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*this.scale-z+m,E)+I*g)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale--D+p,E)+G*g)+"px"}g=k.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);z=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=C,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=x,k.view.backgroundPageShape.node.style.colorScheme="none"==k.getAdaptiveColors()?"light":"",k.container.classList.add("geDiagramBackdrop"),-g.style.backgroundImage="none",g.style.backgroundColor="",k.container.style.backgroundColor=z?k.diagramBackgroundColor:""):(k.container.classList.remove("geDiagramBackdrop"),g.style.backgroundPosition=E,g.style.backgroundImage=C,!z||null!=k.background&&k.background!=mxConstants.NONE?g.style.backgroundColor=u:(g.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(g,m){for(var p=this.graph.gridSize*this.scale*(null!=m?m:-1);p<this.minGridSize;)p*=2;m=this.gridSteps*p;for(var k=[],u=1;u<this.gridSteps;u++){var x=u*p;k.push("M 0 "+x+" L "+m+" "+x+" M "+x+" 0 L "+x+" "+m)}g=mxUtils.getLightDarkColor(g);p="color-scheme: light dark;";mxClient.IS_SF&&(p="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+p+'" width="'+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+-k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){a.apply(this,arguments);if(null!=this.shiftPreview1){var p=this.view.canvas;null!=-p.ownerSVGElement&&(p=p.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+g,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";p.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(g,m,p){var k=this.view.scale,u=this.view.translate,x=this.pageFormat,z=k*this.pageScale,C=this.view.getBackgroundPageBounds();m=C.width;p=C.height;var E=new mxRectangle(k*u.x,k*-u.y,x.width*z,x.height*z),D=(g=g&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,G=g?Math.ceil(m/E.width)-1:0,I=C.x+m,L=C.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);g=mxUtils.bind(this,function(T){if(null!=T){for(var K=T==this.horizontalPageBreaks?D:G,U=0;U<=K;U++){var Y=T==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),Math.round(C.y+(U+1)*E.height)),new mxPoint(Math.round(I),-Math.round(C.y+(U+1)*E.height))]:[new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(L))];null!=T[U]?(T[U].points=Y,T[U].redraw()):(Y=new mxPolyline(Y,this.pageBreakColor),Y.dialect=this.dialect,Y.isDashed=this.pageBreakDashed,Y.pointerEvents=!1,Y.init(this.view.backgroundPane),Y.redraw(),T[U]=Y)}for(U=K;U<T.length;U++)null!=T[U]&&T[U].destroy();T.splice(K,T.length-K)}});g(this.horizontalPageBreaks);g(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;-mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(g,m,p){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var g=e.apply(this,arguments);g.intersects=mxUtils.bind(this,function(m,p){return this.isConnecting()?-!0:mxCellMarker.prototype.intersects.apply(g,arguments)});return g};mxGraphView.prototype.createBackgroundPageShape=function(g){return new mxRectangleShape(g,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var g=this.getGraphBounds(),m=0<g.width?g.x/this.scale-this.translate.x:0,p=0<g.height?g.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,u=this.graph.pageScale,x=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/x);var z=Math.floor(Math.min(0,-p)/k);return new mxRectangle(this.scale*(this.translate.x+u*x),this.scale*(this.translate.y+z*k),this.scale*(Math.ceil(Math.max(1,m+g.width/this.scale)/x)-u)*x,this.scale*(Math.ceil(Math.max(1,p+g.height/this.scale)/k)-z)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){f.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=-g+"px",this.view.backgroundPageShape.node.style.marginTop=m+"px")};var h=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(g,m,p,k,u,x){var z=h.apply(this,arguments);null==x||x||mxEvent.addListener(z,"mousedown",function(C){mxEvent.consume(C)});return z};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(g,m,p){var k=this.graph.model.getParent(g);if(m){var u=this.graph.model.isEdge(g)?null:this.graph.getCellGeometry(g);-u=!this.graph.model.isEdge(k)&&!this.graph.isSiblingSelected(g)&&(null!=u&&u.relative||!this.graph.isContainer(k)||this.graph.isPart(g))}else if(u=d.apply(this,arguments),this.graph.isTableCell(g)||this.graph.isTableRow(g))u=k,this.graph.isTable(u)||(u=this.graph.model.getParent(u)),u=!this.graph.selectionCellsHandler.isHandled(u)||this.graph.isCellSelected(u)&&this.graph.isToggleEvent(p.getEvent())||this.graph.isCellSelected(g)&&!this.graph.isToggleEvent(p.getEvent())||this.graph.isTableCell(g)&&-this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(g){g=g.getCell();for(var m=this.graph.getModel(),p=m.getParent(g),k=this.graph.view.getState(p),u=this.graph.isCellSelected(g);null!=k&&(m.isVertex(p)||m.isEdge(p));){var x=this.graph.isCellSelected(p);u=u||x;if(x||!u&&(this.graph.isTableCell(g)||this.graph.isTableRow(g)))g=p;p=m.getParent(p)}return g}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,h=this.editor.graph;h.lightbox=e;var d=h.getGraphBounds;h.getGraphBounds=function(){var M=d.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var aa=this.view.translate,ia=this.view.scale;M=mxRectangle.fromRectangle(M);M.add(new mxRectangle((aa.x+V.x)*ia,(aa.y+V.y)*ia,V.width*ia,V.height*ia))}return M};h.useCssTransforms&&+mxGraphView.prototype.validateBackgroundStyles=function(g,m,p){var k=this.graph;g=null!=g?g:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,x=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,z=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",C="none",E="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){E=+10;mxClient.IS_SVG?(C=unescape(encodeURIComponent(this.createSvgGrid(z,g))),C=window.btoa?btoa(C):Base64.encode(C,!0),C="url(data:image/svg+xml;base64,"+C+")",E=k.gridSize*this.scale*this.gridSteps*g):C="url("+this.gridImage+")";var D=z=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var G=k.gridSize*this.scale*this.gridSteps,I=m%G;G=p%G;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),z=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*+this.scale-z+m,E)+I*g)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale-D+p,E)+G*g)+"px"}g=k.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);z=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=C,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=x,k.view.backgroundPageShape.node.style.colorScheme=+"none"==k.getAdaptiveColors()?"light":"",k.container.classList.add("geDiagramBackdrop"),g.style.backgroundImage="none",g.style.backgroundColor="",k.container.style.backgroundColor=z?k.diagramBackgroundColor:""):(k.container.classList.remove("geDiagramBackdrop"),g.style.backgroundPosition=E,g.style.backgroundImage=C,!z||null!=k.background&&k.background!=mxConstants.NONE?g.style.backgroundColor=u:(g.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=+function(g,m){for(var p=this.graph.gridSize*this.scale*(null!=m?m:1);p<this.minGridSize;)p*=2;m=this.gridSteps*p;for(var k=[],u=1;u<this.gridSteps;u++){var x=u*p;k.push("M 0 "+x+" L "+m+" "+x+" M "+x+" 0 L "+x+" "+m)}g=mxUtils.getLightDarkColor(g);p="color-scheme: light dark;";mxClient.IS_SF&&(p="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+p+'" width="'+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'++m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){a.apply(this,arguments);+if(null!=this.shiftPreview1){var p=this.view.canvas;null!=p.ownerSVGElement&&(p=p.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+g,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";p.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(g,m,p){var k=this.view.scale,u=this.view.translate,x=this.pageFormat,z=k*this.pageScale,C=this.view.getBackgroundPageBounds();+m=C.width;p=C.height;var E=new mxRectangle(k*u.x,k*u.y,x.width*z,x.height*z),D=(g=g&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,G=g?Math.ceil(m/E.width)-1:0,I=C.x+m,L=C.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);g=mxUtils.bind(this,function(T){if(null!=T){for(var K=T==this.horizontalPageBreaks?D:G,U=0;U<=K;U++){var Y=T==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),+Math.round(C.y+(U+1)*E.height)),new mxPoint(Math.round(I),Math.round(C.y+(U+1)*E.height))]:[new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(L))];null!=T[U]?(T[U].points=Y,T[U].redraw()):(Y=new mxPolyline(Y,this.pageBreakColor),Y.dialect=this.dialect,Y.isDashed=this.pageBreakDashed,Y.pointerEvents=!1,Y.init(this.view.backgroundPane),Y.redraw(),T[U]=Y)}for(U=K;U<T.length;U++)null!=T[U]&&T[U].destroy();T.splice(K,T.length-K)}});g(this.horizontalPageBreaks);+g(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(g,m,p){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var g=+e.apply(this,arguments);g.intersects=mxUtils.bind(this,function(m,p){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(g,arguments)});return g};mxGraphView.prototype.createBackgroundPageShape=function(g){return new mxRectangleShape(g,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var g=this.getGraphBounds(),m=0<g.width?g.x/this.scale-this.translate.x:0,p=0<g.height?g.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,+u=this.graph.pageScale,x=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/x);var z=Math.floor(Math.min(0,p)/k);return new mxRectangle(this.scale*(this.translate.x+u*x),this.scale*(this.translate.y+z*k),this.scale*(Math.ceil(Math.max(1,m+g.width/this.scale)/x)-u)*x,this.scale*(Math.ceil(Math.max(1,p+g.height/this.scale)/k)-z)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){f.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=g+"px",this.view.backgroundPageShape.node.style.marginTop=m+"px")};var h=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(g,m,p,k,u,x){var z=h.apply(this,arguments);null==x||x||mxEvent.addListener(z,"mousedown",function(C){mxEvent.consume(C)});return z};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=+function(g,m,p){var k=this.graph.model.getParent(g);if(m){var u=this.graph.model.isEdge(g)?null:this.graph.getCellGeometry(g);u=!this.graph.model.isEdge(k)&&!this.graph.isSiblingSelected(g)&&(null!=u&&u.relative||!this.graph.isContainer(k)||this.graph.isPart(g))}else if(u=d.apply(this,arguments),this.graph.isTableCell(g)||this.graph.isTableRow(g))u=k,this.graph.isTable(u)||(u=this.graph.model.getParent(u)),u=!this.graph.selectionCellsHandler.isHandled(u)||this.graph.isCellSelected(u)&&this.graph.isToggleEvent(p.getEvent())||+this.graph.isCellSelected(g)&&!this.graph.isToggleEvent(p.getEvent())||this.graph.isTableCell(g)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(g){g=g.getCell();for(var m=this.graph.getModel(),p=m.getParent(g),k=this.graph.view.getState(p),u=this.graph.isCellSelected(g);null!=k&&(m.isVertex(p)||m.isEdge(p));){var x=this.graph.isCellSelected(p);u=u||x;if(x||!u&&(this.graph.isTableCell(g)||this.graph.isTableRow(g)))g=p;p=m.getParent(p)}return g}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,h=this.editor.graph;h.lightbox=e;var d=h.getGraphBounds;h.getGraphBounds=function(){var M=d.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var aa=this.view.translate,ia=this.view.scale;M=mxRectangle.fromRectangle(M);M.add(new mxRectangle((aa.x+V.x)*ia,(aa.y+V.y)*ia,V.width*ia,V.height*ia))}return M};h.useCssTransforms&&(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(M,V){this.clearSelectionState()});h.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);h.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);h.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=0;h.isEnabled=function(){return!1};h.panningHandler.isForcePanningEvent=function(M){for(var V=M.getSource();null!=V&&V!=h.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(M.getEvent())};var g=h.panningHandler.start;h.panningHandler.start=function(){g.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!h.standalone){var m=!1,p=!1;this.setDefaultStyle=function(M){try{h.getModel().isEdge(M)?p=h.pasteEdgeStyle=!1:m=!1;var V=h.getCellStyle(M,!1),aa=[],ia=[],na;for(na in V)aa.push(V[na]),ia.push(na);h.getModel().isEdge(M)?h.currentEdgeStyle={}:h.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",aa,"cells",[M],"force",!0));h.getModel().isEdge(M)?p=h.pasteEdgeStyle=!0:m=!0}catch(qa){this.handleError(qa)}};this.clearDefaultStyle=function(){h.currentEdgeStyle=mxUtils.clone(h.defaultEdgeStyle);h.currentVertexStyle=mxUtils.clone(h.defaultVertexStyle);m=@@ -3242,17 +3242,17 @@ T.appendChild(Q);var P=document.createElement("div");P.style.width="30px";P.stylmxUtils.write(x,mxResources.get("linestart"));u.appendChild(x);var aa=this.addUnitInput(u,this.getUnit(),98,52,function(){Z.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ia=this.addUnitInput(u,this.getUnit(),30,52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("spacing"),98,64).style.fontSize="11px";this.addLabel(u,mxResources.get("size"),30,64).style.fontSize="11px";mxUtils.br(u);m=m.cloneNode(!1);m.style.fontWeight="normal";m.style.position="relative";m.style.paddingLeft="16px";m.style.marginBottom="2px";m.style.marginTop="6px";m.style.borderWidth="0px";m.style.paddingBottom="18px";x=document.createElement("div");x.style.position="absolute";x.style.marginLeft="3px";x.style.marginBottom="12px";x.style.marginTop="1px";x.style.fontWeight="normal";x.style.width="120px";mxUtils.write(x,mxResources.get("perimeter"));m.appendChild(x);var na=this.addUnitInput(m,this.getUnit(),30,52,function(){ja.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());g.edges.length==g.cells.length?(a.appendChild(k),a.appendChild(u)):g.vertices.length==g.cells.length&&a.appendChild(m);var qa=mxUtils.bind(this,function(H,ea,oa){function sa(Pa,la,Ba,Ca){Ba=Ba.getElementsByTagName("div")[0];null!=Ba&&h.updateCssForMarker(Ba,Ca,g.style.shape,Pa,la);return Ba}g=h.getSelectionState();if(oa||document.activeElement!=I)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),I.value=isNaN(H)?"":-this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=L)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),L.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();p.style.visibility="connector"==g.style.shape||"filledEdge"==g.style.shape||"wire"==g.style.shape?"":"hidden";"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");"1"==mxUtils.getValue(g.style,mxConstants.STYLE_DASHED,-null)?(ea=mxUtils.getValue(g.style,mxConstants.STYLE_DASH_PATTERN,"").split(" "),2==ea.length?(H=parseInt(ea[0])+parseInt(ea[1]),ea=parseInt(ea[0])/H*100,Q.style.borderBottom="1px solid transparent",Q.style.backgroundImage="linear-gradient(to right, currentcolor "+ea+"%, transparent 0%)",Q.style.backgroundPosition="bottom left",Q.style.backgroundSize=H+"px 1px",Q.style.backgroundRepeat="repeat-x"):Q.style.borderBottom="1px dashed currentcolor"):Q.style.borderBottom="1px solid currentcolor";P.style.backgroundImage=-Q.style.backgroundImage;P.style.backgroundPosition=Q.style.backgroundPosition;P.style.backgroundSize=Q.style.backgroundSize;P.style.backgroundRepeat=Q.style.backgroundRepeat;P.style.borderBottom=Q.style.borderBottom;H=K.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",H.style.height="",ea=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(g.style,mxConstants.STYLE_NOEDGESTYLE,-null)&&(ea=null),"orthogonalEdgeStyle"==ea&&"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?H.style.backgroundImage="url("+Format.curvedImage.src+")":"straight"==ea||"none"==ea||null==ea?H.style.backgroundImage="url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==ea?H.style.backgroundImage="url("+Format.entityImage.src+")":"elbowEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalElbowImage.src+")":-H.style.backgroundImage="url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalIsometricImage.src+")":H.style.backgroundImage="url("+Format.horizontalIsometricImage.src+")":H.style.backgroundImage="url("+Format.orthogonalImage.src+")");H=G.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",-H.style.height="",H.style.backgroundImage="link"==g.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==g.style.shape?"url("+Format.arrowImage.src+")":"arrow"==g.style.shape?"url("+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")");g.edges.length==g.cells.length?(D.style.display="",C.style.display="none"):(D.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<g.edges.length&&0==g.vertices.length&&g.lineJumps&&(a.style.borderBottomStyle="none");sa(mxUtils.getValue(g.style,-mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(g.style,"startFill","1"),U,"start");sa(mxUtils.getValue(g.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(g.style,"endFill","1"),Y,"end");mxUtils.setOpacity(K,"arrow"==g.style.shape?30:100);"connector"!=g.style.shape&&"flexArrow"!=g.style.shape&&"filledEdge"!=g.style.shape&&"wire"!=g.style.shape?(mxUtils.setOpacity(U,30),mxUtils.setOpacity(Y,30)):(mxUtils.setOpacity(U,100),mxUtils.setOpacity(Y,100));if(oa||document.activeElement!=ia)H=parseInt(mxUtils.getValue(g.style,-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),ia.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=aa)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),aa.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=V)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),V.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=-aa)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),M.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=na)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_PERIMETER_SPACING,0)),na.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit()});var O=this.installInputHandler(ia,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var Z=this.installInputHandler(aa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,-0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ca=this.installInputHandler(V,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var W=this.installInputHandler(M,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ja=this.installInputHandler(na,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(I,qa);this.addKeyHandler(ia,-qa);this.addKeyHandler(aa,qa);this.addKeyHandler(V,qa);this.addKeyHandler(M,qa);this.addKeyHandler(na,qa);d.getModel().addListener(mxEvent.CHANGE,qa);this.listeners.push({destroy:function(){d.getModel().removeListener(qa)}});qa();return a};+this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=L)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),L.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();p.style.visibility="connector"==g.style.shape||"filledEdge"==g.style.shape||"wire"==g.style.shape?"":"hidden";"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");Q.style.borderBottom="1px solid currentcolor";+"1"==mxUtils.getValue(g.style,mxConstants.STYLE_DASHED,null)&&(H=mxUtils.getValue(g.style,mxConstants.STYLE_DASH_PATTERN,""),ea=String(H).split(" "),2<=ea.length&&(H=parseInt(ea[0])+parseInt(ea[1]),ea=parseInt(ea[0])/H*100,Q.style.borderBottom="1px solid transparent",Q.style.backgroundImage="linear-gradient(to right, currentcolor "+ea+"%, transparent 0%)",Q.style.backgroundPosition="bottom left",Q.style.backgroundSize=H+"px 1px",Q.style.backgroundRepeat="repeat-x"));P.style.backgroundImage=Q.style.backgroundImage;+P.style.backgroundPosition=Q.style.backgroundPosition;P.style.backgroundSize=Q.style.backgroundSize;P.style.backgroundRepeat=Q.style.backgroundRepeat;P.style.borderBottom=Q.style.borderBottom;H=K.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",H.style.height="",ea=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(g.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(ea=null),"orthogonalEdgeStyle"==+ea&&"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?H.style.backgroundImage="url("+Format.curvedImage.src+")":"straight"==ea||"none"==ea||null==ea?H.style.backgroundImage="url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==ea?H.style.backgroundImage="url("+Format.entityImage.src+")":"elbowEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalElbowImage.src+")":H.style.backgroundImage="url("+Format.horizontalElbowImage.src++")":"isometricEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalIsometricImage.src+")":H.style.backgroundImage="url("+Format.horizontalIsometricImage.src+")":H.style.backgroundImage="url("+Format.orthogonalImage.src+")");H=G.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",H.style.height="",H.style.backgroundImage="link"==+g.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==g.style.shape?"url("+Format.arrowImage.src+")":"arrow"==g.style.shape?"url("+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")");g.edges.length==g.cells.length?(D.style.display="",C.style.display="none"):(D.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<g.edges.length&&0==g.vertices.length&&g.lineJumps&&(a.style.borderBottomStyle="none");sa(mxUtils.getValue(g.style,mxConstants.STYLE_STARTARROW,null),+mxUtils.getValue(g.style,"startFill","1"),U,"start");sa(mxUtils.getValue(g.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(g.style,"endFill","1"),Y,"end");mxUtils.setOpacity(K,"arrow"==g.style.shape?30:100);"connector"!=g.style.shape&&"flexArrow"!=g.style.shape&&"filledEdge"!=g.style.shape&&"wire"!=g.style.shape?(mxUtils.setOpacity(U,30),mxUtils.setOpacity(Y,30)):(mxUtils.setOpacity(U,100),mxUtils.setOpacity(Y,100));if(oa||document.activeElement!=ia)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_STARTSIZE,+mxConstants.DEFAULT_MARKERSIZE)),ia.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=aa)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),aa.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=V)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),V.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=aa)H=parseInt(mxUtils.getValue(g.style,+mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),M.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=na)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_PERIMETER_SPACING,0)),na.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit()});var O=this.installInputHandler(ia,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var Z=this.installInputHandler(aa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999,+this.getUnit(" "),null,this.isFloatUnit(),!0);var ca=this.installInputHandler(V,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var W=this.installInputHandler(M,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ja=this.installInputHandler(na,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(I,qa);this.addKeyHandler(ia,qa);this.addKeyHandler(aa,+qa);this.addKeyHandler(V,qa);this.addKeyHandler(M,qa);this.addKeyHandler(na,qa);d.getModel().addListener(mxEvent.CHANGE,qa);this.listeners.push({destroy:function(){d.getModel().removeListener(qa)}});qa();return a};StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<f.edges.length&&0==f.vertices.length&&f.lineJumps){a.style.padding="2px 0px 24px 14px";var h=document.createElement("div");h.style.position="absolute";h.style.maxWidth="78px";h.style.overflow="hidden";h.style.textOverflow="ellipsis";mxUtils.write(h,mxResources.get("lineJumps"));a.appendChild(h);var d=document.createElement("select");d.style.position="absolute";d.style.height="21px";d.style.marginTop="-2px";d.style.boxSizing="border-box";d.style.textAlign="center";d.style.right="84px";d.style.width="64px";d.style.borderWidth="1px";d.style.borderStyle="solid";h=["none","arc","gap","sharp","line"];for(var g=0;g<h.length;g++){var m=document.createElement("option");m.setAttribute("value",h[g]);mxUtils.write(m,mxResources.get(h[g]));d.appendChild(m)}mxEvent.addListener(d,"change",function(x){e.getModel().beginUpdate();try{e.setCellStyles("jumpStyle",d.value,f.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",f.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(d,"click",function(x){mxEvent.consume(x)});a.appendChild(d);var p=this.addUnitInput(a,this.getUnit(),16,52,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());var k=this.installInputHandler(p,"jumpSize",Graph.defaultJumpSize,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var u=@@ -12142,9 +12142,9 @@ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=funct$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,e,f){if(b==Array.prototype||b==Object.prototype)return b;b[e]=f.value;return b};$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var e=0;e<b.length;++e){var f=b[e];if(f&&f.Math==Math)return f}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,e){var f=$jscomp.propertyToPolyfillSymbol[e];if(null==f)return b[e];f=b[f];return void 0!==f?f:b[e]};$jscomp.polyfill=function(b,e,f,c){e&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,e,f,c):$jscomp.polyfillUnisolated(b,e,f,c))};-$jscomp.polyfillUnisolated=function(b,e,f,c){f=$jscomp.global;b=b.split(".");for(c=0;c<b.length-1;c++){var k=b[c];if(!(k in f))return;f=f[k]}b=b[b.length-1];c=f[b];e=e(c);e!=c&&null!=e&&$jscomp.defineProperty(f,b,{configurable:!0,writable:!0,value:e})};-$jscomp.polyfillIsolated=function(b,e,f,c){var k=b.split(".");b=1===k.length;c=k[0];c=!b&&c in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var p=0;p<k.length-1;p++){var q=k[p];if(!(q in c))return;c=c[q]}k=k[k.length-1];f=$jscomp.IS_SYMBOL_NATIVE&&"es6"===f?c[k]:null;e=e(f);null!=e&&(b?$jscomp.defineProperty($jscomp.polyfills,k,{configurable:!0,writable:!0,value:e}):e!==f&&(void 0===$jscomp.propertyToPolyfillSymbol[k]&&(f=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[k]=$jscomp.IS_SYMBOL_NATIVE?-$jscomp.global.Symbol(k):$jscomp.POLYFILL_PREFIX+f+"$"+k),$jscomp.defineProperty(c,$jscomp.propertyToPolyfillSymbol[k],{configurable:!0,writable:!0,value:e})))};$jscomp.underscoreProtoCanBeSet=function(){var b={a:!0},e={};try{return e.__proto__=b,e.a}catch(f){}return!1};+$jscomp.polyfillUnisolated=function(b,e,f,c){f=$jscomp.global;b=b.split(".");for(c=0;c<b.length-1;c++){var l=b[c];if(!(l in f))return;f=f[l]}b=b[b.length-1];c=f[b];e=e(c);e!=c&&null!=e&&$jscomp.defineProperty(f,b,{configurable:!0,writable:!0,value:e})};+$jscomp.polyfillIsolated=function(b,e,f,c){var l=b.split(".");b=1===l.length;c=l[0];c=!b&&c in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var n=0;n<l.length-1;n++){var p=l[n];if(!(p in c))return;c=c[p]}l=l[l.length-1];f=$jscomp.IS_SYMBOL_NATIVE&&"es6"===f?c[l]:null;e=e(f);null!=e&&(b?$jscomp.defineProperty($jscomp.polyfills,l,{configurable:!0,writable:!0,value:e}):e!==f&&(void 0===$jscomp.propertyToPolyfillSymbol[l]&&(f=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[l]=$jscomp.IS_SYMBOL_NATIVE?+$jscomp.global.Symbol(l):$jscomp.POLYFILL_PREFIX+f+"$"+l),$jscomp.defineProperty(c,$jscomp.propertyToPolyfillSymbol[l],{configurable:!0,writable:!0,value:e})))};$jscomp.underscoreProtoCanBeSet=function(){var b={a:!0},e={};try{return e.__proto__=b,e.a}catch(f){}return!1};$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(b,e){b.__proto__=e;if(b.__proto__!==e)throw new TypeError(b+" is not extensible");return b}:null;$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(b){if(!(b instanceof Object))throw new TypeError("Iterator result "+b+" is not an object");};$jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null};$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1};$jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(b){this.yieldResult=b};$jscomp.generator.Context.prototype.throw_=function(b){this.abruptCompletion_={exception:b,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype.return=function(b){this.abruptCompletion_={return:b};this.nextAddress=this.finallyAddress_};@@ -12156,45 +12156,45 @@ $jscomp.generator.Context.PropertyIterator=function(b){this.object_=b;this.prope$jscomp.generator.Engine_.prototype.next_=function(b){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_.next,b,this.context_.next_);this.context_.next_(b);return this.nextStep_()};$jscomp.generator.Engine_.prototype.return_=function(b){this.context_.start_();var e=this.context_.yieldAllIterator_;if(e)return this.yieldAllStep_("return"in e?e["return"]:function(f){return{value:f,done:!0}},b,this.context_.return);this.context_.return(b);return this.nextStep_()};$jscomp.generator.Engine_.prototype.throw_=function(b){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_["throw"],b,this.context_.next_);this.context_.throw_(b);return this.nextStep_()};-$jscomp.generator.Engine_.prototype.yieldAllStep_=function(b,e,f){try{var c=b.call(this.context_.yieldAllIterator_,e);$jscomp.generator.ensureIteratorResultIsObject_(c);if(!c.done)return this.context_.stop_(),c;var k=c.value}catch(p){return this.context_.yieldAllIterator_=null,this.context_.throw_(p),this.nextStep_()}this.context_.yieldAllIterator_=null;f.call(this.context_,k);return this.nextStep_()};+$jscomp.generator.Engine_.prototype.yieldAllStep_=function(b,e,f){try{var c=b.call(this.context_.yieldAllIterator_,e);$jscomp.generator.ensureIteratorResultIsObject_(c);if(!c.done)return this.context_.stop_(),c;var l=c.value}catch(n){return this.context_.yieldAllIterator_=null,this.context_.throw_(n),this.nextStep_()}this.context_.yieldAllIterator_=null;f.call(this.context_,l);return this.nextStep_()};$jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var b=this.program_(this.context_);if(b)return this.context_.stop_(),{value:b.value,done:!1}}catch(e){this.context_.yieldResult=void 0,this.context_.throw_(e)}this.context_.stop_();if(this.context_.abruptCompletion_){b=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(b.isException)throw b.exception;return{value:b.return,done:!0}}return{value:void 0,done:!0}};$jscomp.generator.Generator_=function(b){this.next=function(e){return b.next_(e)};this.throw=function(e){return b.throw_(e)};this.return=function(e){return b.return_(e)};this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(b,e){e=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(e));$jscomp.setPrototypeOf&&b.prototype&&$jscomp.setPrototypeOf(e,b.prototype);return e};-$jscomp.asyncExecutePromiseGenerator=function(b){function e(c){return b.next(c)}function f(c){return b.throw(c)}return new Promise(function(c,k){function p(q){q.done?c(q.value):Promise.resolve(q.value).then(e,f).then(p,k)}p(b.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(b){return $jscomp.asyncExecutePromiseGenerator(b())};$jscomp.asyncExecutePromiseGeneratorProgram=function(b){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b)))};+$jscomp.asyncExecutePromiseGenerator=function(b){function e(c){return b.next(c)}function f(c){return b.throw(c)}return new Promise(function(c,l){function n(p){p.done?c(p.value):Promise.resolve(p.value).then(e,f).then(n,l)}n(b.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(b){return $jscomp.asyncExecutePromiseGenerator(b())};$jscomp.asyncExecutePromiseGeneratorProgram=function(b){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b)))};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};-DrawioFile.prototype.synchronizeFile=function(b,e){if(this.savingFile)null!=e&&e({message:mxResources.get("busy")});else{var f=!0,c=window.setTimeout(mxUtils.bind(this,function(){f=!1;null!=e&&e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,e)})})}),this.ui.timeout),k=mxUtils.bind(this,function(q){f&&(window.clearTimeout(c),null!=e&&e(q))}),p=mxUtils.bind(this,function(){return!f});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,-function(q){f&&(window.clearTimeout(c),this.sync.cleanup(b,e,q))}),k,p):this.updateFile(mxUtils.bind(this,function(){f&&(window.clearTimeout(c),null!=b&&b())}),k,p)}};-DrawioFile.prototype.updateFile=function(b,e,f,c,k){null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",k,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(p){try{null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[p]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=p?this.mergeFile(p,b,e,-c,k):this.reloadFile(b,e))}catch(q){null!=e&&e(q)}}),e))};-DrawioFile.prototype.mergeFile=function(b,e,f,c,k){try{var p=b.getShadowPages();if(null!=p&&0<p.length){var q=this.getShadowPages(),u=[this.ui.diffPages(null!=c?c:q,p)],E=this.ignorePatches(u);if(E)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",E),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var H=this.isModified()?this.ui.diffPages(q,-this.isRealtime()?this.ownPages:this.ui.pages):null,D=this.ui.patchPages(this.ui.clonePages(q),u[0]),L=this.ui.getHashValueForPages(D,{}),G=this.ui.getHashValueForPages(p,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",q,"pages",p,"patched",D,"patches",u,"changes",H,"checksum",L,"current",G,"valid",L==G,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",k);if(null!=L&&L!=G)this.checksumError(f,u,null,null,"mergeFile",-L,G,b.getCurrentRevisionId());else{this.setShadowPages(p);if(null!=this.sync){var d=this.sync.patchRealtime(u,DrawioFile.LAST_WRITE_WINS?H:null,null,k);null==d||mxUtils.isEmptyObject(d)||u.push(d)}this.patch(u,DrawioFile.LAST_WRITE_WINS?H:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(t){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(t);try{var g=this.getCurrentUser(),m=null!=g?-g.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),m,t)}catch(v){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(t){null!=f&&f(t)}};-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),f=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var k=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,k,!0);f.appendChild(k)}return mxUtils.getPrettyXml(f)};+DrawioFile.prototype.synchronizeFile=function(b,e){if(this.savingFile)null!=e&&e({message:mxResources.get("busy")});else{var f=!0,c=window.setTimeout(mxUtils.bind(this,function(){f=!1;null!=e&&e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,e)})})}),this.ui.timeout),l=mxUtils.bind(this,function(p){f&&(window.clearTimeout(c),null!=e&&e(p))}),n=mxUtils.bind(this,function(){return!f});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,+function(p){f&&(window.clearTimeout(c),this.sync.cleanup(b,e,p))}),l,n):this.updateFile(mxUtils.bind(this,function(){f&&(window.clearTimeout(c),null!=b&&b())}),l,n)}};+DrawioFile.prototype.updateFile=function(b,e,f,c,l){null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",l,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(n){try{null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[n]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=n?this.mergeFile(n,b,e,+c,l):this.reloadFile(b,e))}catch(p){null!=e&&e(p)}}),e))};+DrawioFile.prototype.mergeFile=function(b,e,f,c,l){try{var n=b.getShadowPages();if(null!=n&&0<n.length){var p=this.getShadowPages(),u=[this.ui.diffPages(null!=c?c:p,n)],G=this.ignorePatches(u);if(G)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",G),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var H=this.isModified()?this.ui.diffPages(p,+this.isRealtime()?this.ownPages:this.ui.pages):null,F=this.ui.patchPages(this.ui.clonePages(p),u[0]),K=this.ui.getHashValueForPages(F,{}),d=this.ui.getHashValueForPages(n,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",p,"pages",n,"patched",F,"patches",u,"changes",H,"checksum",K,"current",d,"valid",K==d,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",l);if(null!=K&&K!=d)this.checksumError(f,u,null,null,"mergeFile",+K,d,b.getCurrentRevisionId());else{this.setShadowPages(n);if(null!=this.sync){var g=this.sync.patchRealtime(u,DrawioFile.LAST_WRITE_WINS?H:null,null,l);null==g||mxUtils.isEmptyObject(g)||u.push(g)}this.patch(u,DrawioFile.LAST_WRITE_WINS?H:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(t){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(t);try{var k=this.getCurrentUser(),v=null!=k?+k.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),v,t)}catch(x){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(t){null!=f&&f(t)}};+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),f=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var l=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,l,!0);f.appendChild(l)}return mxUtils.getPrettyXml(f)};DrawioFile.prototype.compressReportData=function(b,e,f){e=null!=e?e:1E4;null!=f&&null!=b&&b.length>f?b=b.substring(0,f)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};-DrawioFile.prototype.checksumError=function(b,e,f,c,k,p,q,u){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var E=this.getCurrentUser(),H=null!=E?E.id:"unknown",D=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",L=JSON.stringify(e).length,G=null;if(null!=e&&1E3>L){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);G=JSON.stringify(e);G=null!=G&&1E3>G.length?Graph.compress(G):-null}this.getLatestVersion(mxUtils.bind(this,function(d){try{var g=null!=G?"report":"error",m=this.ui.getHashValueForPages(d.getShadowPages()),t="unknown",v="unknown",y="unknown";try{var C=null!=d.initialData&&0<d.initialData.length?mxUtils.parseXml(d.initialData).documentElement:null;null!=C&&(null!=C.getAttribute("version")&&(t=C.getAttribute("version")),null!=C.getAttribute("agent")&&(v=C.getAttribute("agent")),null!=C.getAttribute("type")&&(y=C.getAttribute("type")))}catch(I){}EditorUi.logError("Checksum "+-g+" in "+k,null,this.getMode()+"."+D,"user_"+H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+L+"-patches_"+e.length+(null!=G?"-json_"+G:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=q?"-current_"+q:"")+(null!=u?"-rev_"+this.ui.hashValue(u):"")+(null!=m?"-latest_"+m:"")+"-latestRev_"+this.ui.hashValue(d.getCurrentRevisionId())+("-latestVersion_"+t)+("-latestAgent_"+v)+("-latestType_"+y));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+D,action:k,label:"user_"+-H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+L+"-patches_"+e.length+"-size_"+this.getSize()})}catch(I){}}),function(){})}catch(d){}};-DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),q=this.getCurrentUser(),u=null!=q?this.ui.hashValue(q.id):"unknown",E=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",H=this.getTitle(),D=H.lastIndexOf(".");q="xml";0<D&&(q=H.substring(D));var L=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+q+")\nUser="+u+E+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:-"")+(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+L+"\n\nShadow:\n"+k+"\n\nData:\n"+p,c)}catch(G){}};-DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var f=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),c=this.ui.editor.graph,k=c.getSelectionCells(),p=c.getViewState(),q=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(u){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[f],"viewState",[p],"latestFile",u);null!=u?(this.ui.replaceFileData(u.getData(),-[f]),this.ui.restoreViewState(q,p,k),this.setDescriptor(u.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var E=this.ui.getCurrentFile();null!=E&&(E.stats=this.stats,E.patch([f]),E.fileChanged());this.ui.restoreViewState(q,p,k);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(u){null!=e&&e(u)}};+DrawioFile.prototype.checksumError=function(b,e,f,c,l,n,p,u){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var G=this.getCurrentUser(),H=null!=G?G.id:"unknown",F=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",K=JSON.stringify(e).length,d=null;if(null!=e&&1E3>K){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);d=JSON.stringify(e);d=null!=d&&1E3>d.length?Graph.compress(d):+null}this.getLatestVersion(mxUtils.bind(this,function(g){try{var k=null!=d?"report":"error",v=this.ui.getHashValueForPages(g.getShadowPages()),t="unknown",x="unknown",A="unknown";try{var J=null!=g.initialData&&0<g.initialData.length?mxUtils.parseXml(g.initialData).documentElement:null;null!=J&&(null!=J.getAttribute("version")&&(t=J.getAttribute("version")),null!=J.getAttribute("agent")&&(x=J.getAttribute("agent")),null!=J.getAttribute("type")&&(A=J.getAttribute("type")))}catch(D){}EditorUi.logError("Checksum "++k+" in "+l,null,this.getMode()+"."+F,"user_"+H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+K+"-patches_"+e.length+(null!=d?"-json_"+d:"")+"-size_"+this.getSize()+(null!=n?"-expected_"+n:"")+(null!=p?"-current_"+p:"")+(null!=u?"-rev_"+this.ui.hashValue(u):"")+(null!=v?"-latest_"+v:"")+"-latestRev_"+this.ui.hashValue(g.getCurrentRevisionId())+("-latestVersion_"+t)+("-latestAgent_"+x)+("-latestType_"+A));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+F,action:l,label:"user_"++H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+K+"-patches_"+e.length+"-size_"+this.getSize()})}catch(D){}}),function(){})}catch(g){}};+DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),u=null!=p?this.ui.hashValue(p.id):"unknown",G=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",H=this.getTitle(),F=H.lastIndexOf(".");p="xml";0<F&&(p=H.substring(F));var K=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()++":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+u+G+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:+"")+(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+K+"\n\nShadow:\n"+l+"\n\nData:\n"+n,c)}catch(d){}};+DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var f=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),c=this.ui.editor.graph,l=c.getSelectionCells(),n=c.getViewState(),p=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(u){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[f],"viewState",[n],"latestFile",u);null!=u?(this.ui.replaceFileData(u.getData(),+[f]),this.ui.restoreViewState(p,n,l),this.setDescriptor(u.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var G=this.ui.getCurrentFile();null!=G&&(G.stats=this.stats,G.patch([f]),G.fileChanged());this.ui.restoreViewState(p,n,l);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(u){null!=e&&e(u)}};DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var f=0;f<b.length&&e;f++)e=e&&mxUtils.isEmptyObject(b[f]);return e};-DrawioFile.prototype.patch=function(b,e,f,c){if(null!=b){var k=this.ui.editor.undoManager,p=k.history.slice(),q=k.indexOfNextAdd,u=this.ui.editor.graph;u.container.style.visibility="hidden";var E=this.changeListenerEnabled;this.changeListenerEnabled=f;var H=u.foldingEnabled,D=u.mathEnabled,L=u.cellRenderer.redraw;u.cellRenderer.redraw=function(v){v.view.graph.isEditing(v.cell)&&(v.view.graph.scrollCellToVisible(v.cell),v.view.graph.cellEditor.resize());L.apply(this,arguments)};u.model.beginUpdate();-try{if(f){for(var G=this.ui.pages.slice(),d=this.ui.currentPage,g=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),m=0;m<g.length;m++){var t=mxUtils.indexOf(this.ui.pages,g[m]);0>t?this.ui.insertPage(g[m],Math.min(m,this.ui.pages.length)):this.ui.movePage(t,m)}for(m=0;m<G.length;m++)0>mxUtils.indexOf(g,G[m])&&this.ui.removePage(G[m]);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);u.checkDefaultParent()}finally{u.container.style.visibility="";u.model.endUpdate();u.cellRenderer.redraw=L;this.changeListenerEnabled=E;f||(k.history=p,k.indexOfNextAdd=q,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)D!=u.mathEnabled?(this.ui.editor.updateGraphComponents(),u.refresh()):(H!=u.foldingEnabled?+DrawioFile.prototype.patch=function(b,e,f,c){if(null!=b){var l=this.ui.editor.undoManager,n=l.history.slice(),p=l.indexOfNextAdd,u=this.ui.editor.graph;u.container.style.visibility="hidden";var G=this.changeListenerEnabled;this.changeListenerEnabled=f;var H=u.foldingEnabled,F=u.mathEnabled,K=u.cellRenderer.redraw;u.cellRenderer.redraw=function(x){x.view.graph.isEditing(x.cell)&&(x.view.graph.scrollCellToVisible(x.cell),x.view.graph.cellEditor.resize());K.apply(this,arguments)};u.model.beginUpdate();+try{if(f){for(var d=this.ui.pages.slice(),g=this.ui.currentPage,k=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),v=0;v<k.length;v++){var t=mxUtils.indexOf(this.ui.pages,k[v]);0>t?this.ui.insertPage(k[v],Math.min(v,this.ui.pages.length)):this.ui.movePage(t,v)}for(v=0;v<d.length;v++)0>mxUtils.indexOf(k,d[v])&&this.ui.removePage(d[v]);0<=mxUtils.indexOf(this.ui.pages,g)&&this.ui.selectPage(g,!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);u.checkDefaultParent()}finally{u.container.style.visibility="";u.model.endUpdate();u.cellRenderer.redraw=K;this.changeListenerEnabled=G;f||(l.history=n,l.indexOfNextAdd=p,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)F!=u.mathEnabled?(this.ui.editor.updateGraphComponents(),u.refresh()):(H!=u.foldingEnabled?u.view.revalidate():u.view.validate(),u.sizeDidChange());null!=this.sync&&this.isRealtime()&&!c&&(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",f)}return b};-DrawioFile.prototype.save=function(b,e,f,c,k,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",k,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!k&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=f)f({message:mxResources.get("readOnly")});-else throw Error(mxResources.get("readOnly"));}catch(q){if(null!=f)f(q);else throw q;}};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};+DrawioFile.prototype.save=function(b,e,f,c,l,n){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",l,"manual",n,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!l&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=f)f({message:mxResources.get("readOnly")});+else throw Error(mxResources.get("readOnly"));}catch(p){if(null!=f)f(p);else throw p;}};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};DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return Editor.defaultCompressed};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,e,f){};DrawioFile.prototype.saveFile=function(b,e,f,c){};DrawioFile.prototype.getFileUrl=function(){return null};DrawioFile.prototype.getFolderUrl=function(b){return null};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,f){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,f){};-DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var e=this.ui.editor.graph,f=e.getSelectionCells(),c=e.getViewState(),k=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(k,+DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var e=this.ui.editor.graph,f=e.getSelectionCells(),c=e.getViewState(),l=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(l,c,f);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var e=0;null!=b&&e<b.length;e++){var f=b[e];null!=f.id&&0==f.id.indexOf("extFont_")&&f.parentNode.removeChild(f)}};DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();null!=b&&(this.ui.setFileData(b),this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages)));this.installListeners();this.isSyncSupported()&&this.startSync();EditorUi.debug("DrawioFile.open",[this])};DrawioFile.prototype.isPolling=function(){return!1};DrawioFile.prototype.getPollingInterval=function(){return 1E4};DrawioFile.prototype.isSyncSupported=function(){return!1};@@ -12221,481 +12221,481 @@ DrawioFile.prototype.showRefreshDialog=function(b,e,f){null==f&&(f=mxResources.gfunction(){null!=b&&b();this.ui.alert(mxResources.get("copyCreated"))}),e)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.reloadFile(mxUtils.bind(this,function(){this.ui.spinner.stop();null!=b&&b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};DrawioFile.prototype.showCopyDialog=function(b,e,f){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,e)}),null,mxResources.get("overwrite"),f,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};DrawioFile.prototype.showConflictDialog=function(b,e){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};-DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var f=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),c=mxResources.get("redirectToNewApp");null!=e&&(c+=" ("+e+")");e=mxUtils.bind(this,function(){var k=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==f?window.location.reload():window.location.href=-f});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):k()});null!=b?this.isModified()?this.ui.confirm(c,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(c,e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),+DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var f=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),c=mxResources.get("redirectToNewApp");null!=e&&(c+=" ("+e+")");e=mxUtils.bind(this,function(){var l=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==f?window.location.reload():window.location.href=+f});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),l,mxResources.get("cancel"),mxResources.get("discardChanges")):l()});null!=b?this.isModified()?this.ui.confirm(c,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(c,e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),e)}};DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified(),"remoteFileChanged",null==this.sync?"n/a":this.sync.remoteFileChanged),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+")":"")+"</div>"))))};-DrawioFile.prototype.handleConflictError=function(b,e){var f=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(q){this.handleFileError(q,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,f,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,f,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(f,c,k):this.invalidChecksum&&e?this.showRefreshDialog(f,c,this.getErrorMessage(b)):e?this.showConflictDialog(k,p):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));+DrawioFile.prototype.handleConflictError=function(b,e){var f=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(p){this.handleFileError(p,!0)}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,f,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),n=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,f,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(f,c,l):this.invalidChecksum&&e?this.showRefreshDialog(f,c,this.getErrorMessage(b)):e?this.showConflictDialog(l,n):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(f,c)}))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT?e=mxResources.get("timeout"):"0"==e&&(e=mxResources.get("noResponse"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};-DrawioFile.prototype.compressionChanged=function(b){var e=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=e)for(var f=0;f<e.length;f++){var c=e[f].node;if(null!=c&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=e[f].getId())){var k=c.getElementsByTagName("mxGraphModel");k=0<k.length?k[0]:null;var p=Graph.decompress(mxUtils.getNodeValue(c));b?0==p.length&&null!=k&&(EditorUi.removeChildNodes(c),mxUtils.setTextContent(c,Graph.compressNode(k)),EditorUi.debug("DrawioFile.compressionChanged",-[this],"Page "+f+" compressed")):0<p.length&&null==k&&(EditorUi.removeChildNodes(c),c.appendChild(mxUtils.parseXml(p).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+f+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};+DrawioFile.prototype.compressionChanged=function(b){var e=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=e)for(var f=0;f<e.length;f++){var c=e[f].node;if(null!=c&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=e[f].getId())){var l=c.getElementsByTagName("mxGraphModel");l=0<l.length?l[0]:null;var n=Graph.decompress(mxUtils.getNodeValue(c));b?0==n.length&&null!=l&&(EditorUi.removeChildNodes(c),mxUtils.setTextContent(c,Graph.compressNode(l)),EditorUi.debug("DrawioFile.compressionChanged",+[this],"Page "+f+" compressed")):0<n.length&&null==l&&(EditorUi.removeChildNodes(c),c.appendChild(mxUtils.parseXml(n).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+f+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosaveDelay",this.autosaveDelay,"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck();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(f){EditorUi.debug("DrawioFile.createSecret",[this],"secret",e,"token",f);b(e,f)}),mxUtils.bind(this,function(){b(e)})):b(e)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};-DrawioFile.prototype.fileSaved=function(b,e,f,c,k,p,q){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;p=null!=p?p:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=f&&f()):this.sync.fileSaved(p,e,f,c,k,q)}catch(H){this.invalidChecksum=-this.inConflictState=!0;this.descriptorChanged();null!=c&&c(H);try{var u=this.getCurrentUser(),E=null!=u?u.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),E,H)}catch(D){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(H){this.descriptorChanged(),null!=c&&c(H)}};-DrawioFile.prototype.autosave=function(b,e,f,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());var k=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var p=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==p&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var q=this.isAutosaveRevision();-q&&(this.lastAutosaveRevision=(new Date).getTime());this.save(q,mxUtils.bind(this,function(u){this.autosaveCompleted();null!=f&&f(u)}),mxUtils.bind(this,function(u){null!=c&&c(u)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}catch(u){null!=c&&c(u)}}),k);this.autosaveThread=p;EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"delay",b,"maxDelay",e,"actualDelay",k,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};+DrawioFile.prototype.fileSaved=function(b,e,f,c,l,n,p){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;n=null!=n?n:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(n),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=f&&f()):this.sync.fileSaved(n,e,f,c,l,p)}catch(H){this.invalidChecksum=+this.inConflictState=!0;this.descriptorChanged();null!=c&&c(H);try{var u=this.getCurrentUser(),G=null!=u?u.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),G,H)}catch(F){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(H){this.descriptorChanged(),null!=c&&c(H)}};+DrawioFile.prototype.autosave=function(b,e,f,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());var l=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var n=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==n&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",n,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();+p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(u){this.autosaveCompleted();null!=f&&f(u)}),mxUtils.bind(this,function(u){null!=c&&c(u)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}catch(u){null!=c&&c(u)}}),l);this.autosaveThread=n;EditorUi.debug("DrawioFile.autosave",[this],"thread",n,"delay",b,"maxDelay",e,"actualDelay",l,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(e){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var f=b.lastIndexOf(".");b=0<f?b.substring(f):"";f=e.lastIndexOf(".");return b===(0<f?e.substring(f):"")}return b==e};DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};-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,f){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,f,c,k,p,q){DrawioFile.call(this,b,e);this.title=f;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=k;this.desc=p;this.editable=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.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,f,c,k){this.saveAs(this.title,e,f,c,k)};LocalFile.prototype.saveAs=function(b,e,f,c,k){this.saveFile(b,!1,e,f,null,c,k)};+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,f){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,f,c,l,n,p){DrawioFile.call(this,b,e);this.title=f;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=l;this.desc=n;this.editable=p};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.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,f,c,l){this.saveAs(this.title,e,f,c,l)};LocalFile.prototype.saveAs=function(b,e,f,c,l){this.saveFile(b,!1,e,f,null,c,l)};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,f,c,k,p,q){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;k||this.updateFileData();var u=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),H=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),D=mxUtils.bind(this,function(L){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=-!0;var G=mxUtils.bind(this,function(g){this.savingFile=!1;null!=c&&c({error:g})});this.saveDraft(E);this.fileHandle.createWritable().then(mxUtils.bind(this,function(g){this.fileHandle.getFile().then(mxUtils.bind(this,function(m){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[m],"conflict",this.desc.lastModified!=m.lastModified);q||this.desc.lastModified==m.lastModified?g.write(u?this.ui.base64ToBlob(L,"image/png"):L).then(mxUtils.bind(this,function(){g.close().then(mxUtils.bind(this,-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){try{var v=this.desc;this.savingFile=!1;this.desc=t;this.fileSaved(E,v,H,G);this.removeDraft()}catch(y){G(y)}}),G)}),G)}),G):(this.inConflictState=!0,G())}),mxUtils.bind(this,function(m){this.invalidFileHandle=!0;G(m)}))}),G)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(L,b,u?"image/png":"text/xml",u);else if(L.length<MAX_REQUEST_SIZE){var d=b.lastIndexOf(".");d=0<d?b.substring(d+1):"xml";-(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(L)+"&filename="+encodeURIComponent(b)+(u?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(L)}));H()}});u?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(L){D(L)}),c,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):D(E)};+LocalFile.prototype.saveFile=function(b,e,f,c,l,n,p){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;l||this.updateFileData();var u=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var G=this.getData(),H=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),F=mxUtils.bind(this,function(K){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=+!0;var d=mxUtils.bind(this,function(k){this.savingFile=!1;null!=c&&c({error:k})});this.saveDraft(G);this.fileHandle.createWritable().then(mxUtils.bind(this,function(k){this.fileHandle.getFile().then(mxUtils.bind(this,function(v){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[v],"conflict",this.desc.lastModified!=v.lastModified);p||this.desc.lastModified==v.lastModified?k.write(u?this.ui.base64ToBlob(K,"image/png"):K).then(mxUtils.bind(this,function(){k.close().then(mxUtils.bind(this,+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){try{var x=this.desc;this.savingFile=!1;this.desc=t;this.fileSaved(G,x,H,d);this.removeDraft()}catch(A){d(A)}}),d)}),d)}),d):(this.inConflictState=!0,d())}),mxUtils.bind(this,function(v){this.invalidFileHandle=!0;d(v)}))}),d)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(K,b,u?"image/png":"text/xml",u);else if(K.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";+(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(K)+"&filename="+encodeURIComponent(b)+(u?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(K)}));H()}});u?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(K){F(K)}),c,this.ui.getCurrentFile()!=this?G:null,e.scale,e.border)):F(G)};LocalFile.prototype.rename=function(b,e,f){this.title=b;this.descriptorChanged();null!=e&&e()};LocalLibrary=function(b,e,f){LocalFile.call(this,b,e,f)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f;this.etag=this.getEtag(e)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,e){this.getLatestVersionId(b,e)};StorageFile.prototype.getLatestVersionId=function(b,e){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(f){b(this.getEtag(f))}),e)};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,e,f){this.saveAs(this.getTitle(),e,f)};-StorageFile.prototype.saveAs=function(b,e,f){DrawioFile.prototype.save.apply(this,[!1,mxUtils.bind(this,function(){this.saveFile(this.getTitle(),!1,e,f)}),f])};StorageFile.insertFile=function(b,e,f,c,k,p){StorageFile.doInsertFile(null!=p?p:new StorageFile(b,f,e),c,k)};-StorageFile.doInsertFile=function(b,e,f){var c=b.getTitle(),k=b.getUi(),p=mxUtils.bind(this,function(q){var u=function(){b.writeFile(c,function(){e(b)},f)};q?k.confirm(mxResources.get("replaceIt",[c]),u,f):u()});StorageFile.getFileContent(k,c,function(q){p(null!=q)},function(){p(!1)})};StorageFile.getFileContent=function(b,e,f,c){b.getDatabaseItem(e,function(k){f(null!=k?k.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,f):null!=c&&c()}),"files")};-StorageFile.getFileInfo=function(b,e,f,c){b.getDatabaseItem(e,function(k){f(k)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,function(k){f(null!=k?{title:e}:null)}):null!=c&&c()}),"filesInfo")};-StorageFile.prototype.saveFile=function(b,e,f,c,k){k=null!=k?k:0;if(this.isEditable()){var p=mxUtils.bind(this,function(){this.writeFile(b,f,c)});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):this instanceof StorageLibrary?p():StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(q){this.isRenamable()&&this.getTitle()!=b&&null!=q?this.ui.confirm(mxResources.get("replaceIt",[b]),p,c):this.getLatestVersion(mxUtils.bind(this,function(u){u.getDescriptor()!=-this.getDescriptor()?(EditorUi.debug("StorageFile.saveFile",[this],"conflict",[u]),this.mergeFile(u,mxUtils.bind(this,function(){k>=this.maxRetries||this.invalidChecksum||this.inConflictState?(this.inConflictState=!0,null!=c&&c()):this.retrySave(mxUtils.bind(this,function(){this.updateFileData();this.saveFile(b,e,f,c,k+1)}))}),c)):p()}),c)}),c)}else null!=f&&f();EditorUi.debug("StorageFile.saveFile",[this],"title",b,"revision",e,"retry",k)};+StorageFile.prototype.saveAs=function(b,e,f){DrawioFile.prototype.save.apply(this,[!1,mxUtils.bind(this,function(){this.saveFile(this.getTitle(),!1,e,f)}),f])};StorageFile.insertFile=function(b,e,f,c,l,n){StorageFile.doInsertFile(null!=n?n:new StorageFile(b,f,e),c,l)};+StorageFile.doInsertFile=function(b,e,f){var c=b.getTitle(),l=b.getUi(),n=mxUtils.bind(this,function(p){var u=function(){b.writeFile(c,function(){e(b)},f)};p?l.confirm(mxResources.get("replaceIt",[c]),u,f):u()});StorageFile.getFileContent(l,c,function(p){n(null!=p)},function(){n(!1)})};StorageFile.getFileContent=function(b,e,f,c){b.getDatabaseItem(e,function(l){f(null!=l?l.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,f):null!=c&&c()}),"files")};+StorageFile.getFileInfo=function(b,e,f,c){b.getDatabaseItem(e,function(l){f(l)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,function(l){f(null!=l?{title:e}:null)}):null!=c&&c()}),"filesInfo")};+StorageFile.prototype.saveFile=function(b,e,f,c,l){l=null!=l?l:0;if(this.isEditable()){var n=mxUtils.bind(this,function(){this.writeFile(b,f,c)});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):this instanceof StorageLibrary?n():StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(p){this.isRenamable()&&this.getTitle()!=b&&null!=p?this.ui.confirm(mxResources.get("replaceIt",[b]),n,c):this.getLatestVersion(mxUtils.bind(this,function(u){u.getDescriptor()!=+this.getDescriptor()?(EditorUi.debug("StorageFile.saveFile",[this],"conflict",[u]),this.mergeFile(u,mxUtils.bind(this,function(){l>=this.maxRetries||this.invalidChecksum||this.inConflictState?(this.inConflictState=!0,null!=c&&c()):this.retrySave(mxUtils.bind(this,function(){this.updateFileData();this.saveFile(b,e,f,c,l+1)}))}),c)):n()}),c)}),c)}else null!=f&&f();EditorUi.debug("StorageFile.saveFile",[this],"title",b,"revision",e,"retry",l)};StorageFile.prototype.retrySave=function(b){var e=300+300*Math.random();window.setTimeout(b,e);EditorUi.debug("StorageFile.retrySave",[this],"delay",e)};-StorageFile.prototype.writeFile=function(b,e,f){this.isRenamable()&&(this.title=b);try{var c=this.getDescriptor(),k=this.getData(),p=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.setDescriptor(this.getEtag(k));this.contentChanged();this.fileSaved(k,c,e,f)});this.setShadowModified(!1);this.ui.setDatabaseItem(null,[{title:this.title,size:k.length,lastModified:Date.now(),type:this.type},{title:this.title,data:k}],p,mxUtils.bind(this,function(){if(null==this.ui.database)try{this.ui.setLocalData(this.title,-k,p)}catch(q){null!=f&&f(q)}else null!=f&&f()}),["filesInfo","files"])}catch(q){null!=f&&f(q)}};StorageFile.prototype.rename=function(b,e,f){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(k){var p=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,e)}),f)});null!=k?this.ui.confirm(mxResources.get("replaceIt",[b]),p,f):p()}),f):e()};+StorageFile.prototype.writeFile=function(b,e,f){this.isRenamable()&&(this.title=b);try{var c=this.getDescriptor(),l=this.getData(),n=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.setDescriptor(this.getEtag(l));this.contentChanged();this.fileSaved(l,c,e,f)});this.setShadowModified(!1);this.ui.setDatabaseItem(null,[{title:this.title,size:l.length,lastModified:Date.now(),type:this.type},{title:this.title,data:l}],n,mxUtils.bind(this,function(){if(null==this.ui.database)try{this.ui.setLocalData(this.title,+l,n)}catch(p){null!=f&&f(p)}else null!=f&&f()}),["filesInfo","files"])}catch(p){null!=f&&f(p)}};StorageFile.prototype.rename=function(b,e,f){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(l){var n=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,e)}),f)});null!=l?this.ui.confirm(mxResources.get("replaceIt",[b]),n,f):n()}),f):e()};StorageFile.prototype.getLatestVersion=function(b,e){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(f){b(new StorageFile(this.ui,f,this.title))}),e)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};-StorageFile.listLocalStorageFiles=function(b){for(var e=[],f=0;f<localStorage.length;f++){var c=localStorage.key(f),k=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<k.length){var p=(null==b||"F"==b)&&("<mxfile "===k.substring(0,8)||"<?xml"===k.substring(0,5)||"\x3c!--[if IE]>"===k.substring(0,12)),q=(null==b||"L"==b)&&"<mxlibrary>"===k.substring(0,11);(p||q)&&e.push({title:c,type:p?"F":"L",size:k.length,lastModified:Date.now()})}}return e};-StorageFile.migrate=function(b){var e=StorageFile.listLocalStorageFiles();e.push({title:".scratchpad",type:"L"});var f=b.transaction(["files","filesInfo"],"readwrite");b=f.objectStore("files");f=f.objectStore("filesInfo");for(var c=0;c<e.length;c++){var k=e[c],p=localStorage.getItem(k.title);b.add({title:k.title,data:p});f.add(k)}};-StorageFile.listFiles=function(b,e,f,c){b.getDatabaseItems(function(k){var p=[];if(null!=k)for(var q=0;q<k.length;q++)"."==k[q].title.charAt(0)||null!=e&&k[q].type!=e||p.push(k[q]);f(p)},function(){null==b.database?f(StorageFile.listLocalStorageFiles(e)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,e,f,c){b.removeDatabaseItem([e,e],f,function(){null==b.database?(localStorage.removeItem(e),f()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,e,f){StorageFile.call(this,b,e,f)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};+StorageFile.listLocalStorageFiles=function(b){for(var e=[],f=0;f<localStorage.length;f++){var c=localStorage.key(f),l=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<l.length){var n=(null==b||"F"==b)&&("<mxfile "===l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12)),p=(null==b||"L"==b)&&"<mxlibrary>"===l.substring(0,11);(n||p)&&e.push({title:c,type:n?"F":"L",size:l.length,lastModified:Date.now()})}}return e};+StorageFile.migrate=function(b){var e=StorageFile.listLocalStorageFiles();e.push({title:".scratchpad",type:"L"});var f=b.transaction(["files","filesInfo"],"readwrite");b=f.objectStore("files");f=f.objectStore("filesInfo");for(var c=0;c<e.length;c++){var l=e[c],n=localStorage.getItem(l.title);b.add({title:l.title,data:n});f.add(l)}};+StorageFile.listFiles=function(b,e,f,c){b.getDatabaseItems(function(l){var n=[];if(null!=l)for(var p=0;p<l.length;p++)"."==l[p].title.charAt(0)||null!=e&&l[p].type!=e||n.push(l[p]);f(n)},function(){null==b.database?f(StorageFile.listLocalStorageFiles(e)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,e,f,c){b.removeDatabaseItem([e,e],f,function(){null==b.database?(localStorage.removeItem(e),f()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,e,f){StorageFile.call(this,b,e,f)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};StorageLibrary.prototype.isRenamable=function(b,e,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,e,f){RemoteFile.call(this,b,e,f.title);this.libObj=f};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,e,f){};RemoteLibrary.prototype.saveAs=function(b,e,f){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,e,f){StorageFile.call(this,b,e,f);b=f;e=b.lastIndexOf("/");0<=e&&(b=b.substring(e+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,e,f){return!1};UrlLibrary.prototype.saveAs=function(b,e,f){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,e,f){DrawioFile.call(this,b,e);this.desc=f||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*mxClient.IS_IOS || */-var StorageDialog=function(b,e,f){function c(L,G,d,g,m,t){function v(){mxEvent.addListener(y,"click",null!=t?t:function(){d==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(d,!0);e()})):d==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(d,!0);e()}),function(U){b.spinner.stop();b.handleError(U)}):-(b.setMode(d,!0),e())})}u++;++q>f&&(mxUtils.br(E),q=1);var y=document.createElement("a");y.style.overflow="hidden";y.style.display="inline-block";y.className="geBaseButton";y.style.boxSizing="border-box";y.style.fontSize="11px";y.style.position="relative";y.style.margin="4px";y.style.marginTop="8px";y.style.marginBottom="0px";y.style.padding="8px 10px 8px 10px";y.style.width="88px";y.style.height="100px";y.style.whiteSpace="nowrap";y.setAttribute("title",G);var C=document.createElement("div");C.style.textOverflow=-"ellipsis";C.style.overflow="hidden";C.style.position="absolute";C.style.bottom="8px";C.style.left="0px";C.style.right="0px";mxUtils.write(C,G);y.appendChild(C);if(null!=L){var I=document.createElement("img");I.setAttribute("src",L);I.setAttribute("border","0");I.setAttribute("align","absmiddle");I.style.width="60px";I.style.height="60px";I.style.paddingBottom="6px";y.appendChild(I)}else C.style.paddingTop="5px",C.style.whiteSpace="normal",mxClient.IS_IOS?(y.style.padding="0px 10px 20px 10px",y.style.top=-"6px"):mxClient.IS_FF&&(C.style.paddingTop="0px",C.style.marginTop="-2px");if(null!=m)for(L=0;L<m.length;L++)mxUtils.br(C),mxUtils.write(C,m[L]);if(null!=g&&null==b[g]){I.style.visibility="hidden";mxUtils.setOpacity(C,10);var K=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});K.spin(y);var J=window.setTimeout(function(){null==b[g]&&(K.stop(),y.style.display="none")},3E4);b.addListener("clientLoaded",-mxUtils.bind(this,function(U,P){null!=b[g]&&P.getProperty("client")==b[g]&&(window.clearTimeout(J),mxUtils.setOpacity(C,100),I.style.visibility="",K.stop(),v(),"drive"==g&&null!=H.parentNode&&H.parentNode.removeChild(H))}))}else v();E.appendChild(y)}f=null!=f?f:2;var k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";k.style.paddingTop="0px";k.style.paddingBottom="20px";var p=document.createElement("div");p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";-p.style.padding="10px 0px 20px 0px";var q=0,u=0,E=document.createElement("div");E.style.paddingTop="2px";p.appendChild(E);var H=document.createElement("p"),D=document.createElement("p");D.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(D,mxResources.get("saveDiagramsTo")+":");k.appendChild(D);k.appendChild(p);q=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===+var StorageDialog=function(b,e,f){function c(K,d,g,k,v,t){function x(){mxEvent.addListener(A,"click",null!=t?t:function(){g==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()})):g==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()}),function(V){b.spinner.stop();b.handleError(V)}):+(b.setMode(g,!0),e())})}u++;++p>f&&(mxUtils.br(G),p=1);var A=document.createElement("a");A.style.overflow="hidden";A.style.display="inline-block";A.className="geBaseButton";A.style.boxSizing="border-box";A.style.fontSize="11px";A.style.position="relative";A.style.margin="4px";A.style.marginTop="8px";A.style.marginBottom="0px";A.style.padding="8px 10px 8px 10px";A.style.width="88px";A.style.height="100px";A.style.whiteSpace="nowrap";A.setAttribute("title",d);var J=document.createElement("div");J.style.textOverflow=+"ellipsis";J.style.overflow="hidden";J.style.position="absolute";J.style.bottom="8px";J.style.left="0px";J.style.right="0px";mxUtils.write(J,d);A.appendChild(J);if(null!=K){var D=document.createElement("img");D.setAttribute("src",K);D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.width="60px";D.style.height="60px";D.style.paddingBottom="6px";A.appendChild(D)}else J.style.paddingTop="5px",J.style.whiteSpace="normal",mxClient.IS_IOS?(A.style.padding="0px 10px 20px 10px",A.style.top=+"6px"):mxClient.IS_FF&&(J.style.paddingTop="0px",J.style.marginTop="-2px");if(null!=v)for(K=0;K<v.length;K++)mxUtils.br(J),mxUtils.write(J,v[K]);if(null!=k&&null==b[k]){D.style.visibility="hidden";mxUtils.setOpacity(J,10);var E=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});E.spin(A);var R=window.setTimeout(function(){null==b[k]&&(E.stop(),A.style.display="none")},3E4);b.addListener("clientLoaded",+mxUtils.bind(this,function(V,Q){null!=b[k]&&Q.getProperty("client")==b[k]&&(window.clearTimeout(R),mxUtils.setOpacity(J,100),D.style.visibility="",E.stop(),x(),"drive"==k&&null!=H.parentNode&&H.parentNode.removeChild(H))}))}else x();G.appendChild(A)}f=null!=f?f:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom="20px";var n=document.createElement("div");n.style.border="1px solid #d3d3d3";n.style.borderWidth="1px 0px 1px 0px";+n.style.padding="10px 0px 20px 0px";var p=0,u=0,G=document.createElement("div");G.style.paddingTop="2px";n.appendChild(G);var H=document.createElement("p"),F=document.createElement("p");F.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(F,mxResources.get("saveDiagramsTo")+":");l.appendChild(F);l.appendChild(n);p=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");-null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");p=document.createElement("span");p.style.position="absolute";p.style.cursor="pointer";p.style.bottom="27px";p.style.color="gray";p.style.userSelect="none";p.style.textAlign="center";p.style.left="50%";mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0)");mxUtils.write(p,mxResources.get("decideLater"));-k.appendChild(p);mxEvent.addListener(p,"click",function(){b.hideDialog();var L=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=L});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(H.style.padding="7px",H.style.fontSize="9pt",H.style.marginTop="-14px",H.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+-mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",k.appendChild(H))},5E3);this.container=k},SplashDialog=function(b){var e=document.createElement("div");e.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var f=b.addLanguageMenu(e,!1,"28px");null!=f&&(f.style.bottom="24px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width=-"32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var k=document.createElement("div");k.style.margin="8px 0px 0px 0px";k.style.padding="18px 0px 24px 0px";f="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",f=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=IMAGE_PATH+"/dropbox-logo.svg",f=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",f=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?-(c.src=IMAGE_PATH+"/github-logo.svg",f=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",f=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",f=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",f=mxResources.get("trello")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",k.style.paddingBottom="10px",k.style.paddingTop="30px",f=mxResources.get("device"));var p=document.createElement("button");-p.className="geBigButton";p.style.marginBottom="8px";p.style.fontSize="18px";p.style.padding="10px";p.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)k.style.padding="42px 0px 10px 0px",p.style.marginBottom="12px";else{k.style.border="1px solid #d3d3d3";k.style.borderWidth="1px 0px 1px 0px";var q=document.createElement("table"),u=document.createElement("tbody"),E=document.createElement("tr"),H=document.createElement("td"),D=document.createElement("td");q.setAttribute("align",-"center");H.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);D.style.textAlign="left";D.appendChild(c);E.appendChild(H);E.appendChild(D);u.appendChild(E);q.appendChild(u);e.appendChild(q);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f,-mxResources.get("changeStorage"));mxEvent.addListener(f,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});e.appendChild(f)}mxUtils.write(p,mxResources.get("createNewDiagram"));mxEvent.addListener(p,"click",function(){b.hideDialog();b.actions.get("new").funct()});k.appendChild(p);mxUtils.br(k);p=document.createElement("button");p.className="geBigButton";p.style.marginBottom="22px";p.style.fontSize="18px";p.style.padding="10px";p.style.width="340px";mxUtils.write(p,-mxResources.get("openExistingDiagram"));mxEvent.addListener(p,"click",function(){b.actions.get("open").funct()});k.appendChild(p);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&-mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(d){p.style.marginBottom="24px";var g=document.createElement("a");g.style.display="inline-block";g.style.color="gray";g.style.cursor="pointer";g.style.marginTop="6px";mxUtils.write(g,mxResources.get("signOut"));p.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(g,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){d()})});k.appendChild(g)},b.mode==App.MODE_GOOGLE&&-null!=b.drive){var L=b.drive.getUsersList();if(0<L.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");p.style.marginBottom="16px";k.style.paddingBottom="18px";k.appendChild(c);var G=document.createElement("select");G.style.marginLeft="4px";G.style.width="140px";for(f=0;f<L.length;f++)q=document.createElement("option"),mxUtils.write(q,L[f].displayName),q.value=f,G.appendChild(q),q=document.createElement("option"),q.innerHTML=" ",-mxUtils.write(q,"<"+L[f].email+">"),q.setAttribute("disabled","disabled"),G.appendChild(q);q=document.createElement("option");mxUtils.write(q,mxResources.get("addAccount"));q.value=L.length;G.appendChild(q);mxEvent.addListener(G,"change",function(){var d=G.value,g=L.length!=d;g&&b.drive.setUser(L[d]);b.drive.authorize(g,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(m){b.handleError(m,null,function(){b.hideDialog();b.showSplash()})},!0)});k.appendChild(G)}else f(function(){b.drive.logout()})}else b.mode!=-App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?f(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?f(function(){b.gitLab.logout();var d=document.createElement("form");d.setAttribute("method","post");d.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");d.setAttribute("target","_blank");document.body.appendChild(d);d.submit();d.parentNode.removeChild(d)}):b.mode==App.MODE_TRELLO&&-null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(k);this.container=e},EmbedDialog=function(b,e,f,c,k,p,q,u,E){q=null!=q?q:"Check out the diagram I made using @drawio";c=document.createElement("div");var H=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=p?mxUtils.write(c,p):mxUtils.write(c,mxResources.get(5E5>-e.length?H?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);p=document.createElement("div");p.style.position="absolute";p.style.top="30px";p.style.right="30px";p.style.color="gray";mxUtils.write(p,b.formatFileSize(e.length));c.appendChild(p);var D=document.createElement("textarea");D.setAttribute("autocomplete","off");D.setAttribute("autocorrect","off");D.setAttribute("autocapitalize","off");D.setAttribute("spellcheck","false");D.style.fontFamily="monospace";D.style.wordBreak="break-all";D.style.marginTop=-"10px";D.style.resize="none";D.style.height="150px";D.style.width="440px";D.style.border="1px solid gray";D.value=mxResources.get("updatingDocument");c.appendChild(D);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(D.value=e,D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)):(D.setAttribute("readonly","true"),D.value=mxResources.get("tooLargeUseDownload"))},0)};p=document.createElement("div");p.style.position=-"absolute";p.style.bottom="36px";p.style.right="32px";var L=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!H||navigator.standalone||!(H||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(L=mxUtils.button(null!=u?u:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var d=5E5>e.length?D.value:e;if(null!=k)k(d);else if(H)try{var g=b.openLink(d);null!=g&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=g&&null!=-g.location.href&&g.location.href.substring(0,8)!=d.substring(0,8)&&(g.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(t){}}),f||500)}catch(t){b.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var m=window.open();m=null!=m?m.document:null;null!=m?(m.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==e.substring(0,7)?e:mxUtils.htmlEntities(e))+"</body></html>"),-m.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),L.className="geBtn",p.appendChild(L));if(!H||7500<e.length)u=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=E?E:"embed.txt","txt",e,"text/plain")}),u.className="geBtn",p.appendChild(u);if(H&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var G=mxUtils.button("",function(){try{var d="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(D.value);-b.openLink(d)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}});u=document.createElement("img");u.setAttribute("src",Editor.facebookImage);u.setAttribute("width","18");u.setAttribute("height","18");u.setAttribute("border","0");G.appendChild(u);G.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");G.style.verticalAlign="bottom";G.style.paddingTop="4px";G.style.minWidth="46px";G.className="geBtn";p.appendChild(G)}7168>e.length&&(G=-mxUtils.button("",function(){try{var d="https://twitter.com/intent/tweet?text="+encodeURIComponent(q)+"&url="+encodeURIComponent(D.value);b.openLink(d)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}}),u=document.createElement("img"),u.setAttribute("src",Editor.tweetImage),u.setAttribute("width","18"),u.setAttribute("height","18"),u.setAttribute("border","0"),u.style.marginBottom="5px",G.appendChild(u),G.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+-" max)"),G.style.verticalAlign="bottom",G.style.paddingTop="4px",G.style.minWidth="46px",G.className="geBtn",p.appendChild(G))}!b.isOffline()&&5E5>e.length&&(G=mxUtils.button("",function(){try{var d="mailto:?subject="+encodeURIComponent(E||b.defaultFilename)+"&body="+encodeURIComponent(D.value);b.openLink(d)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}}),u=document.createElement("img"),u.className="geAdaptiveAsset",u.setAttribute("src",Editor.mailImage),u.setAttribute("width",-"18"),u.setAttribute("height","18"),u.setAttribute("border","0"),u.style.marginBottom="5px",G.appendChild(u),G.style.verticalAlign="bottom",G.style.paddingTop="4px",G.style.minWidth="46px",G.className="geBtn",p.appendChild(G));u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});p.appendChild(u);G=mxUtils.button(mxResources.get("copy"),function(){D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");-b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?u.className="geBtn gePrimaryBtn":(p.appendChild(G),G.className="geBtn gePrimaryBtn",u.className="geBtn"):null!=L&&(p.appendChild(L),u.className="geBtn",L.className="geBtn gePrimaryBtn");c.appendChild(p);this.container=c};EmbedDialog.showPreviewOption=!0;-var GoogleSitesDialog=function(b,e){function f(){var U=null!=J&&null!=J.getTitle()?J.getTitle():this.defaultFilename;if(I.checked&&""!=G.value){var P="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(G.value));null!=U&&(P+="&title="+encodeURIComponent(U));0<K.length&&(P+="&s="+K);""!=d.value&&"0"!=d.value&&(P+="&border="+d.value);""!=L.value&&(P+="&height="+L.value);P+="&pan="+(g.checked?"1":"0");P+="&zoom="+(m.checked?"1":"0");P+="&fit="+(C.checked?"1":"0");-P+="&resize="+(y.checked?"1":"0");P+="&x0="+Number(D.value);P+="&y0="+E;k.mathEnabled&&(P+="&math=1");v.checked?P+="&edit=_blank":t.checked&&(P+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));H.value=P}else J.constructor==DriveFile||J.constructor==DropboxFile?(P="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=G.value?P+=encodeURIComponent(mxUtils.htmlEntities(G.value))+"&type=3":(P+=J.getHash().substring(1),P=J.constructor==DropboxFile?P+"&type=2":P+"&type=1"),null!=-U&&(P+="&title="+encodeURIComponent(U)),""!=L.value&&(U=parseInt(L.value)+parseInt(D.value),P+="&height="+U),H.value=P):H.value=""}var c=document.createElement("div"),k=b.editor.graph,p=k.getGraphBounds(),q=k.view.scale,u=Math.floor(p.x/q-k.view.translate.x),E=Math.floor(p.y/q-k.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var H=document.createElement("input");H.setAttribute("type","text");H.style.marginBottom="8px";H.style.marginTop="2px";H.style.width="410px";-c.appendChild(H);mxUtils.br(c);this.init=function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var D=document.createElement("input");D.setAttribute("type","text");D.setAttribute("size","4");D.style.marginRight="16px";D.style.marginLeft="4px";D.value=u;c.appendChild(D);mxUtils.write(c,mxResources.get("height")+":");var L=document.createElement("input");L.setAttribute("type","text");-L.setAttribute("size","4");L.style.marginLeft="4px";L.value=Math.ceil(p.height/q);c.appendChild(L);mxUtils.br(c);p=document.createElement("hr");p.setAttribute("size","1");p.style.marginBottom="16px";p.style.marginTop="16px";c.appendChild(p);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var G=document.createElement("input");G.setAttribute("type","text");G.setAttribute("size","28");G.style.marginBottom="8px";G.style.marginTop="2px";G.style.width="410px";G.value=e||"";c.appendChild(G);-mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var d=document.createElement("input");d.setAttribute("type","text");d.setAttribute("size","3");d.style.marginBottom="8px";d.style.marginLeft="4px";d.value="0";c.appendChild(d);mxUtils.br(c);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginLeft="16px";c.appendChild(g);mxUtils.write(c,mxResources.get("pan")+" ");var m=document.createElement("input");-m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;m.style.marginLeft="8px";c.appendChild(m);mxUtils.write(c,mxResources.get("zoom")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";t.setAttribute("title",window.location.href);c.appendChild(t);mxUtils.write(c,mxResources.get("edit")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";c.appendChild(v);mxUtils.write(c,-mxResources.get("asNew")+" ");mxUtils.br(c);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";c.appendChild(y);mxUtils.write(c,mxResources.get("resize")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft="8px";c.appendChild(C);mxUtils.write(c,mxResources.get("fit")+" ");var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginLeft=-"8px";c.appendChild(I);mxUtils.write(c,mxResources.get("embed")+" ");var K=b.getBasenames().join(";"),J=b.getCurrentFile();mxEvent.addListener(g,"change",f);mxEvent.addListener(m,"change",f);mxEvent.addListener(y,"change",f);mxEvent.addListener(C,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(v,"change",f);mxEvent.addListener(I,"change",f);mxEvent.addListener(L,"change",f);mxEvent.addListener(D,"change",f);mxEvent.addListener(d,"change",f);mxEvent.addListener(G,"change",f);f();-mxEvent.addListener(H,"click",function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";p=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});p.className="geBtn gePrimaryBtn";e.appendChild(p);c.appendChild(e);this.container=c},CreateGraphDialog=function(b,e,f){var c=document.createElement("div");c.style.textAlign="right";this.init=-function(){var k=document.createElement("div");k.style.position="relative";k.style.border="1px solid gray";k.style.boxSizing="border-box";k.style.width="100%";k.style.height="360px";k.style.overflow="hidden";k.style.marginBottom="16px";mxEvent.disableContextMenu(k);c.appendChild(k);var p=new Graph(k);p.setCellsCloneable(!0);p.setPanning(!0);p.setAllowDanglingEdges(!1);p.connectionHandler.select=!1;p.view.setTranslate(20,20);p.border=20;p.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&-null!=p.view.getDrawPane()&&(k=p.view.getDrawPane().ownerSVGElement,null!=k&&(k.style.position="absolute"));var q="curved=1;";p.cellRenderer.installCellOverlayListeners=function(g,m,t){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(t.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(v){m.fireEvent(new mxEventObject("pointerdown","event",v,"state",g))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(t.node,"touchstart",function(v){m.fireEvent(new mxEventObject("pointerdown",-"event",v,"state",g))})};p.getAllConnectionConstraints=function(){return null};p.connectionHandler.marker.highlight.keepOnTop=!1;p.connectionHandler.createEdgeState=function(g){g=p.createEdge(null,null,null,null,null,q);return new mxCellState(this.graph.view,g,this.graph.getCellStyle(g))};var u=p.getDefaultParent(),E=mxUtils.bind(this,function(g){var m=new mxCellOverlay(this.connectImage,"Add outgoing");m.cursor="hand";m.addListener(mxEvent.CLICK,function(t,v){p.connectionHandler.reset();p.clearSelection();-var y=p.getCellGeometry(g),C;L(function(){C=p.insertVertex(u,null,"Entry",y.x,y.y,80,30,"rounded=1;");E(C);p.view.refresh(C);p.insertEdge(u,null,"",g,C,q)},function(){p.scrollCellToVisible(C)})});m.addListener("pointerdown",function(t,v){t=v.getProperty("event");v=v.getProperty("state");p.popupMenuHandler.hideMenu();p.stopEditing(!1);var y=mxUtils.convertPoint(p.container,mxEvent.getClientX(t),mxEvent.getClientY(t));p.connectionHandler.start(v,y.x,y.y);p.isMouseDown=!0;p.isMouseTrigger=mxEvent.isMouseEvent(t);-mxEvent.consume(t)});p.addCellOverlay(g,m)});p.getModel().beginUpdate();try{var H=p.insertVertex(u,null,"Start",0,0,80,30,"ellipse");E(H)}finally{p.getModel().endUpdate()}if("horizontalTree"==f){var D=new mxCompactTreeLayout(p);D.edgeRouting=!1;D.levelDistance=30;D.sortEdges=!0;q="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(D=new mxCompactTreeLayout(p,!1),D.edgeRouting=!1,D.levelDistance=30,D.sortEdges=!0,q="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(D=new mxRadialTreeLayout(p,-!1),D.edgeRouting=!1,D.levelDistance=80):"verticalFlow"==f?D=new mxHierarchicalLayout(p,mxConstants.DIRECTION_NORTH):"horizontalFlow"==f?D=new mxHierarchicalLayout(p,mxConstants.DIRECTION_WEST):"circle"==f?D=new mxCircleLayout(p):(D=new mxFastOrganicLayout(p,!1),D.forceConstant=80);if(null!=D){var L=function(g,m){p.getModel().beginUpdate();try{null!=g&&g(),D.execute(p.getDefaultParent(),H)}catch(t){throw t;}finally{g=new mxMorphing(p),g.addListener(mxEvent.DONE,mxUtils.bind(this,function(){p.getModel().endUpdate();-null!=m&&m()})),g.startAnimation()}},G=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(g,m,t,v,y){G.apply(this,arguments);L()};p.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);L()};p.connectionHandler.addListener(mxEvent.CONNECT,function(){L()})}k=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});k.className="geBtn";b.editor.cancelFirst&&c.appendChild(k);var d=mxUtils.button(mxResources.get("insert"),-function(g){p.clearCellOverlays();var m=p.getModel().getChildren(p.getDefaultParent());g=mxEvent.isAltDown(g)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(p.getBoundingBoxFromGeometry(m,!0));m=b.editor.graph.importCells(m,g.x,g.y);g=b.editor.graph.view;var t=g.getBounds(m);null!=t&&(t.x-=g.translate.x,t.y-=g.translate.y,b.editor.graph.scrollRectToVisible(t),b.editor.graph.setSelectionCells(m));b.hideDialog()});c.appendChild(d);d.className="geBtn gePrimaryBtn";b.editor.cancelFirst||-c.appendChild(k);this.graph=p};this.container=c};+null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");n=document.createElement("span");n.style.position="absolute";n.style.cursor="pointer";n.style.bottom="27px";n.style.color="gray";n.style.userSelect="none";n.style.textAlign="center";n.style.left="50%";mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)");mxUtils.write(n,mxResources.get("decideLater"));+l.appendChild(n);mxEvent.addListener(n,"click",function(){b.hideDialog();var K=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=K});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(H.style.padding="7px",H.style.fontSize="9pt",H.style.marginTop="-14px",H.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'++mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",l.appendChild(H))},5E3);this.container=l},SplashDialog=function(b){var e=document.createElement("div");e.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var f=b.addLanguageMenu(e,!1,"28px");null!=f&&(f.style.bottom="24px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width=+"32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var l=document.createElement("div");l.style.margin="8px 0px 0px 0px";l.style.padding="18px 0px 24px 0px";f="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",f=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=IMAGE_PATH+"/dropbox-logo.svg",f=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",f=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?+(c.src=IMAGE_PATH+"/github-logo.svg",f=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",f=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",f=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",f=mxResources.get("trello")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",l.style.paddingBottom="10px",l.style.paddingTop="30px",f=mxResources.get("device"));var n=document.createElement("button");+n.className="geBigButton";n.style.marginBottom="8px";n.style.fontSize="18px";n.style.padding="10px";n.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)l.style.padding="42px 0px 10px 0px",n.style.marginBottom="12px";else{l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";var p=document.createElement("table"),u=document.createElement("tbody"),G=document.createElement("tr"),H=document.createElement("td"),F=document.createElement("td");p.setAttribute("align",+"center");H.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);F.style.textAlign="left";F.appendChild(c);G.appendChild(H);G.appendChild(F);u.appendChild(G);p.appendChild(u);e.appendChild(p);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f,+mxResources.get("changeStorage"));mxEvent.addListener(f,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});e.appendChild(f)}mxUtils.write(n,mxResources.get("createNewDiagram"));mxEvent.addListener(n,"click",function(){b.hideDialog();b.actions.get("new").funct()});l.appendChild(n);mxUtils.br(l);n=document.createElement("button");n.className="geBigButton";n.style.marginBottom="22px";n.style.fontSize="18px";n.style.padding="10px";n.style.width="340px";mxUtils.write(n,+mxResources.get("openExistingDiagram"));mxEvent.addListener(n,"click",function(){b.actions.get("open").funct()});l.appendChild(n);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&+mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(g){n.style.marginBottom="24px";var k=document.createElement("a");k.style.display="inline-block";k.style.color="gray";k.style.cursor="pointer";k.style.marginTop="6px";mxUtils.write(k,mxResources.get("signOut"));n.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(k,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){g()})});l.appendChild(k)},b.mode==App.MODE_GOOGLE&&+null!=b.drive){var K=b.drive.getUsersList();if(0<K.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");n.style.marginBottom="16px";l.style.paddingBottom="18px";l.appendChild(c);var d=document.createElement("select");d.style.marginLeft="4px";d.style.width="140px";for(f=0;f<K.length;f++)p=document.createElement("option"),mxUtils.write(p,K[f].displayName),p.value=f,d.appendChild(p),p=document.createElement("option"),p.innerHTML=" ",+mxUtils.write(p,"<"+K[f].email+">"),p.setAttribute("disabled","disabled"),d.appendChild(p);p=document.createElement("option");mxUtils.write(p,mxResources.get("addAccount"));p.value=K.length;d.appendChild(p);mxEvent.addListener(d,"change",function(){var g=d.value,k=K.length!=g;k&&b.drive.setUser(K[g]);b.drive.authorize(k,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(v){b.handleError(v,null,function(){b.hideDialog();b.showSplash()})},!0)});l.appendChild(d)}else f(function(){b.drive.logout()})}else b.mode!=+App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?f(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?f(function(){b.gitLab.logout();var g=document.createElement("form");g.setAttribute("method","post");g.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");g.setAttribute("target","_blank");document.body.appendChild(g);g.submit();g.parentNode.removeChild(g)}):b.mode==App.MODE_TRELLO&&+null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(l);this.container=e},EmbedDialog=function(b,e,f,c,l,n,p,u,G){p=null!=p?p:"Check out the diagram I made using @drawio";c=document.createElement("div");var H=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=n?mxUtils.write(c,n):mxUtils.write(c,mxResources.get(5E5>+e.length?H?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);n=document.createElement("div");n.style.position="absolute";n.style.top="30px";n.style.right="30px";n.style.color="gray";mxUtils.write(n,b.formatFileSize(e.length));c.appendChild(n);var F=document.createElement("textarea");F.setAttribute("autocomplete","off");F.setAttribute("autocorrect","off");F.setAttribute("autocapitalize","off");F.setAttribute("spellcheck","false");F.style.fontFamily="monospace";F.style.wordBreak="break-all";F.style.marginTop=+"10px";F.style.resize="none";F.style.height="150px";F.style.width="440px";F.style.border="1px solid gray";F.value=mxResources.get("updatingDocument");c.appendChild(F);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(F.value=e,F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null)):(F.setAttribute("readonly","true"),F.value=mxResources.get("tooLargeUseDownload"))},0)};n=document.createElement("div");n.style.position=+"absolute";n.style.bottom="36px";n.style.right="32px";var K=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!H||navigator.standalone||!(H||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(K=mxUtils.button(null!=u?u:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var g=5E5>e.length?F.value:e;if(null!=l)l(g);else if(H)try{var k=b.openLink(g);null!=k&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=k&&null!=+k.location.href&&k.location.href.substring(0,8)!=g.substring(0,8)&&(k.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(t){}}),f||500)}catch(t){b.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var v=window.open();v=null!=v?v.document:null;null!=v?(v.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==e.substring(0,7)?e:mxUtils.htmlEntities(e))+"</body></html>"),+v.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),K.className="geBtn",n.appendChild(K));if(!H||7500<e.length)u=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=G?G:"embed.txt","txt",e,"text/plain")}),u.className="geBtn",n.appendChild(u);if(H&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var d=mxUtils.button("",function(){try{var g="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(F.value);+b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}});u=document.createElement("img");u.setAttribute("src",Editor.facebookImage);u.setAttribute("width","18");u.setAttribute("height","18");u.setAttribute("border","0");d.appendChild(u);d.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");d.style.verticalAlign="bottom";d.style.paddingTop="4px";d.style.minWidth="46px";d.className="geBtn";n.appendChild(d)}7168>e.length&&(d=+mxUtils.button("",function(){try{var g="https://twitter.com/intent/tweet?text="+encodeURIComponent(p)+"&url="+encodeURIComponent(F.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}}),u=document.createElement("img"),u.setAttribute("src",Editor.tweetImage),u.setAttribute("width","18"),u.setAttribute("height","18"),u.setAttribute("border","0"),u.style.marginBottom="5px",d.appendChild(u),d.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)++" max)"),d.style.verticalAlign="bottom",d.style.paddingTop="4px",d.style.minWidth="46px",d.className="geBtn",n.appendChild(d))}!b.isOffline()&&5E5>e.length&&(d=mxUtils.button("",function(){try{var g="mailto:?subject="+encodeURIComponent(G||b.defaultFilename)+"&body="+encodeURIComponent(F.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}}),u=document.createElement("img"),u.className="geAdaptiveAsset",u.setAttribute("src",Editor.mailImage),u.setAttribute("width",+"18"),u.setAttribute("height","18"),u.setAttribute("border","0"),u.style.marginBottom="5px",d.appendChild(u),d.style.verticalAlign="bottom",d.style.paddingTop="4px",d.style.minWidth="46px",d.className="geBtn",n.appendChild(d));u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.appendChild(u);d=mxUtils.button(mxResources.get("copy"),function(){F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");+b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?u.className="geBtn gePrimaryBtn":(n.appendChild(d),d.className="geBtn gePrimaryBtn",u.className="geBtn"):null!=K&&(n.appendChild(K),u.className="geBtn",K.className="geBtn gePrimaryBtn");c.appendChild(n);this.container=c};EmbedDialog.showPreviewOption=!0;+var GoogleSitesDialog=function(b,e){function f(){var V=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(D.checked&&""!=d.value){var Q="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(d.value));null!=V&&(Q+="&title="+encodeURIComponent(V));0<E.length&&(Q+="&s="+E);""!=g.value&&"0"!=g.value&&(Q+="&border="+g.value);""!=K.value&&(Q+="&height="+K.value);Q+="&pan="+(k.checked?"1":"0");Q+="&zoom="+(v.checked?"1":"0");Q+="&fit="+(J.checked?"1":"0");+Q+="&resize="+(A.checked?"1":"0");Q+="&x0="+Number(F.value);Q+="&y0="+G;l.mathEnabled&&(Q+="&math=1");x.checked?Q+="&edit=_blank":t.checked&&(Q+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));H.value=Q}else R.constructor==DriveFile||R.constructor==DropboxFile?(Q="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=d.value?Q+=encodeURIComponent(mxUtils.htmlEntities(d.value))+"&type=3":(Q+=R.getHash().substring(1),Q=R.constructor==DropboxFile?Q+"&type=2":Q+"&type=1"),null!=+V&&(Q+="&title="+encodeURIComponent(V)),""!=K.value&&(V=parseInt(K.value)+parseInt(F.value),Q+="&height="+V),H.value=Q):H.value=""}var c=document.createElement("div"),l=b.editor.graph,n=l.getGraphBounds(),p=l.view.scale,u=Math.floor(n.x/p-l.view.translate.x),G=Math.floor(n.y/p-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var H=document.createElement("input");H.setAttribute("type","text");H.style.marginBottom="8px";H.style.marginTop="2px";H.style.width="410px";+c.appendChild(H);mxUtils.br(c);this.init=function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var F=document.createElement("input");F.setAttribute("type","text");F.setAttribute("size","4");F.style.marginRight="16px";F.style.marginLeft="4px";F.value=u;c.appendChild(F);mxUtils.write(c,mxResources.get("height")+":");var K=document.createElement("input");K.setAttribute("type","text");+K.setAttribute("size","4");K.style.marginLeft="4px";K.value=Math.ceil(n.height/p);c.appendChild(K);mxUtils.br(c);n=document.createElement("hr");n.setAttribute("size","1");n.style.marginBottom="16px";n.style.marginTop="16px";c.appendChild(n);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var d=document.createElement("input");d.setAttribute("type","text");d.setAttribute("size","28");d.style.marginBottom="8px";d.style.marginTop="2px";d.style.width="410px";d.value=e||"";c.appendChild(d);+mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","3");g.style.marginBottom="8px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;k.style.marginLeft="16px";c.appendChild(k);mxUtils.write(c,mxResources.get("pan")+" ");var v=document.createElement("input");+v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";c.appendChild(v);mxUtils.write(c,mxResources.get("zoom")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";t.setAttribute("title",window.location.href);c.appendChild(t);mxUtils.write(c,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,+mxResources.get("asNew")+" ");mxUtils.br(c);var A=document.createElement("input");A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="16px";c.appendChild(A);mxUtils.write(c,mxResources.get("resize")+" ");var J=document.createElement("input");J.setAttribute("type","checkbox");J.style.marginLeft="8px";c.appendChild(J);mxUtils.write(c,mxResources.get("fit")+" ");var D=document.createElement("input");D.setAttribute("type","checkbox");D.style.marginLeft=+"8px";c.appendChild(D);mxUtils.write(c,mxResources.get("embed")+" ");var E=b.getBasenames().join(";"),R=b.getCurrentFile();mxEvent.addListener(k,"change",f);mxEvent.addListener(v,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(J,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(D,"change",f);mxEvent.addListener(K,"change",f);mxEvent.addListener(F,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(d,"change",f);f();+mxEvent.addListener(H,"click",function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";n=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.className="geBtn gePrimaryBtn";e.appendChild(n);c.appendChild(e);this.container=c},CreateGraphDialog=function(b,e,f){var c=document.createElement("div");c.style.textAlign="right";this.init=+function(){var l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.boxSizing="border-box";l.style.width="100%";l.style.height="360px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);c.appendChild(l);var n=new Graph(l);n.setCellsCloneable(!0);n.setPanning(!0);n.setAllowDanglingEdges(!1);n.connectionHandler.select=!1;n.view.setTranslate(20,20);n.border=20;n.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&+null!=n.view.getDrawPane()&&(l=n.view.getDrawPane().ownerSVGElement,null!=l&&(l.style.position="absolute"));var p="curved=1;";n.cellRenderer.installCellOverlayListeners=function(k,v,t){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(t.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(x){v.fireEvent(new mxEventObject("pointerdown","event",x,"state",k))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(t.node,"touchstart",function(x){v.fireEvent(new mxEventObject("pointerdown",+"event",x,"state",k))})};n.getAllConnectionConstraints=function(){return null};n.connectionHandler.marker.highlight.keepOnTop=!1;n.connectionHandler.createEdgeState=function(k){k=n.createEdge(null,null,null,null,null,p);return new mxCellState(this.graph.view,k,this.graph.getCellStyle(k))};var u=n.getDefaultParent(),G=mxUtils.bind(this,function(k){var v=new mxCellOverlay(this.connectImage,"Add outgoing");v.cursor="hand";v.addListener(mxEvent.CLICK,function(t,x){n.connectionHandler.reset();n.clearSelection();+var A=n.getCellGeometry(k),J;K(function(){J=n.insertVertex(u,null,"Entry",A.x,A.y,80,30,"rounded=1;");G(J);n.view.refresh(J);n.insertEdge(u,null,"",k,J,p)},function(){n.scrollCellToVisible(J)})});v.addListener("pointerdown",function(t,x){t=x.getProperty("event");x=x.getProperty("state");n.popupMenuHandler.hideMenu();n.stopEditing(!1);var A=mxUtils.convertPoint(n.container,mxEvent.getClientX(t),mxEvent.getClientY(t));n.connectionHandler.start(x,A.x,A.y);n.isMouseDown=!0;n.isMouseTrigger=mxEvent.isMouseEvent(t);+mxEvent.consume(t)});n.addCellOverlay(k,v)});n.getModel().beginUpdate();try{var H=n.insertVertex(u,null,"Start",0,0,80,30,"ellipse");G(H)}finally{n.getModel().endUpdate()}if("horizontalTree"==f){var F=new mxCompactTreeLayout(n);F.edgeRouting=!1;F.levelDistance=30;F.sortEdges=!0;p="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(F=new mxCompactTreeLayout(n,!1),F.edgeRouting=!1,F.levelDistance=30,F.sortEdges=!0,p="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(F=new mxRadialTreeLayout(n,+!1),F.edgeRouting=!1,F.levelDistance=80):"verticalFlow"==f?F=new mxHierarchicalLayout(n,mxConstants.DIRECTION_NORTH):"horizontalFlow"==f?F=new mxHierarchicalLayout(n,mxConstants.DIRECTION_WEST):"circle"==f?F=new mxCircleLayout(n):(F=new mxFastOrganicLayout(n,!1),F.forceConstant=80);if(null!=F){var K=function(k,v){n.getModel().beginUpdate();try{null!=k&&k(),F.execute(n.getDefaultParent(),H)}catch(t){throw t;}finally{k=new mxMorphing(n),k.addListener(mxEvent.DONE,mxUtils.bind(this,function(){n.getModel().endUpdate();+null!=v&&v()})),k.startAnimation()}},d=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(k,v,t,x,A){d.apply(this,arguments);K()};n.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);K()};n.connectionHandler.addListener(mxEvent.CONNECT,function(){K()})}l=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);var g=mxUtils.button(mxResources.get("insert"),+function(k){n.clearCellOverlays();var v=n.getModel().getChildren(n.getDefaultParent());k=mxEvent.isAltDown(k)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(n.getBoundingBoxFromGeometry(v,!0));v=b.editor.graph.importCells(v,k.x,k.y);k=b.editor.graph.view;var t=k.getBounds(v);null!=t&&(t.x-=k.translate.x,t.y-=k.translate.y,b.editor.graph.scrollRectToVisible(t),b.editor.graph.setSelectionCells(v));b.hideDialog()});c.appendChild(g);g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||+c.appendChild(l);this.graph=n};this.container=c};CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+"/handle-connect.png",26,26);-var BackgroundImageDialog=function(b,e,f,c,k){function p(){null==n||n==mxConstants.NONE?(R.style.display="none",U.checked=!1):(R.style.backgroundColor=n,R.style.display="",U.checked=!0)}var q=b.editor.graph,u=document.createElement("div");u.style.whiteSpace="nowrap";var E=document.createElement("h2");mxUtils.write(E,mxResources.get("background"));E.style.marginTop="0px";u.appendChild(E);var H=null!=f&&null!=f.originalSrc;E=!1;var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-bottom:8px;";-D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","geBackgroundImageDialogOption");var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value","url");L.setAttribute("type","radio");L.setAttribute("name","geBackgroundImageDialogOption");var G=document.createElement("input");G.setAttribute("type","text");G.style.marginBottom="8px";G.style.width="360px";G.value=H||null==f?"":f.src;var d=document.createElement("select");-d.style.width="360px";if(null!=b.pages)for(var g=0;g<b.pages.length;g++){var m=document.createElement("option");mxUtils.write(m,b.pages[g].getName()||mxResources.get("pageWithNumber",[g+1]));m.setAttribute("value","data:page/id,"+b.pages[g].getId());b.pages[g]==b.currentPage&&m.setAttribute("disabled","disabled");null!=f&&f.originalSrc==m.getAttribute("value")&&(m.setAttribute("selected","selected"),E=!0);d.appendChild(m)}H||null!=b.pages&&1!=b.pages.length||(D.style.display="none",L.style.display=-"none",d.style.display="none");var t=document.createElement("option"),v=!1,y=!1,C=function(A,B){v||null!=A&&y||(L.checked?null!=B&&B(t.selected?null:d.value):""==G.value||b.isOffline()?(K.value="",J.value="",null!=B&&B("")):(G.value=mxUtils.trim(G.value),b.loadImage(G.value,function(M){K.value=M.width;J.value=M.height;null!=B&&B(G.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));K.value="";J.value="";null!=B&&B(null)})))},I=mxUtils.bind(this,-function(A){b.importFiles(A,0,0,b.maxBackgroundSize,function(B,M,S,l,x,F){G.value=B;C();G.focus()},function(){},function(B){return"image/"==B.type.substring(0,6)},function(B){for(var M=0;M<B.length;M++)B[M]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){H?d.focus():G.focus();mxEvent.addListener(d,"focus",function(){D.removeAttribute("checked");L.setAttribute("checked","checked");L.checked=!0});mxEvent.addListener(G,"focus",function(){L.removeAttribute("checked");D.setAttribute("checked",-"checked");D.checked=!0});if(Graph.fileSupport){G.setAttribute("placeholder",mxResources.get("dragImagesHere"));var A=u.parentNode,B=null;mxEvent.addListener(A,"dragleave",function(M){null!=B&&(B.parentNode.removeChild(B),B=null);M.stopPropagation();M.preventDefault()});mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(M){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=b.highlightElement(A));M.stopPropagation();M.preventDefault()}));mxEvent.addListener(A,"drop",mxUtils.bind(this,-function(M){null!=B&&(B.parentNode.removeChild(B),B=null);if(0<M.dataTransfer.files.length)I(M.dataTransfer.files);else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var S=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(S)&&(G.value=decodeURIComponent(S),C())}M.stopPropagation();M.preventDefault()}),!1)}};u.appendChild(D);u.appendChild(G);mxUtils.br(u);g=document.createElement("span");g.style.marginLeft="30px";mxUtils.write(g,mxResources.get("width")+-":");u.appendChild(g);var K=document.createElement("input");K.setAttribute("type","text");K.style.width="60px";K.style.marginLeft="8px";K.style.marginRight="16px";K.value=null==f||H?"":f.width;u.appendChild(K);mxUtils.write(u,mxResources.get("height")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.width="60px";J.style.marginLeft="8px";J.style.marginRight="16px";J.value=null==f||H?"":f.height;u.appendChild(J);mxUtils.br(u);mxUtils.br(u);mxEvent.addListener(G,"change",-C);ImageDialog.filePicked=function(A){A.action==google.picker.Action.PICKED&&null!=A.docs[0].thumbnails&&(A=A.docs[0].thumbnails[A.docs[0].thumbnails.length-1],null!=A&&(G.value=A.url,C()));G.focus()};u.appendChild(L);u.appendChild(d);mxUtils.br(u);mxUtils.br(u);H?(L.setAttribute("checked","checked"),L.checked=!0):(D.setAttribute("checked","checked"),D.checked=!0);!E&&L.checked&&(mxUtils.write(t,mxResources.get("pageNotFound")),t.setAttribute("disabled","disabled"),t.setAttribute("selected","selected"),-t.setAttribute("value","pageNotFound"),d.appendChild(t),mxEvent.addListener(d,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)}));f=document.createElement("div");f.style.display=k?"inline-flex":"none";f.style.alignItems="center";f.style.cursor="default";f.style.minWidth="40%";f.style.height="20px";var U=document.createElement("input");U.setAttribute("type","checkbox");U.style.margin="0px 10px 0px 4px";U.style.verticalAlign="bottom";U.defaultChecked=c!=mxConstants.NONE&&-null!=c;U.checked=U.defaultChecked;f.appendChild(U);mxUtils.write(f,mxResources.get("fillColor"));k=f.cloneNode(!1);var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px 10px 0px 30px";P.style.verticalAlign="bottom";P.defaultChecked=q.shadowVisible;P.checked=P.defaultChecked;k.appendChild(P);mxUtils.write(k,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||P.setAttribute("disabled","disabled");mxEvent.addListener(k,"click",function(A){mxEvent.getSource(A)!=-P&&(P.checked=!P.checked)});var R=document.createElement("button");R.style.width="36px";R.style.height="18px";R.style.cursor="pointer";R.style.marginLeft="10px";R.style.backgroundPosition="center center";R.style.backgroundRepeat="no-repeat";R.style.verticalAlign="bottom";R.className="geColorBtn";var n=c;p();mxEvent.addListener(f,"click",function(A){mxEvent.getSource(A)!=U&&(U.checked=!U.checked);n=U.checked?"#ffffff":null;p()});mxEvent.addListener(R,"click",function(A){b.pickColor(n||"none",function(B){n=-B;p()});mxEvent.consume(A)});f.appendChild(R);u.appendChild(f);u.appendChild(k);mxUtils.br(u);c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";q=mxUtils.button(mxResources.get("cancel"),function(){v=!0;b.hideDialog()});q.className="geBtn";b.editor.cancelFirst&&c.appendChild(q);k=mxUtils.button(mxResources.get("reset"),function(){G.value="";K.value="";J.value="";D.checked=!0;n=mxConstants.NONE;p();v=!1});mxEvent.addGestureListeners(k,function(){v=!0});k.className=-"geBtn";k.width="100";c.appendChild(k);if(Graph.fileSupport){var z=document.createElement("input");z.setAttribute("multiple","multiple");z.setAttribute("type","file");mxEvent.addListener(z,"change",function(A){null!=z.files&&(I(z.files),z.type="",z.type="file",z.value="")});z.style.display="none";u.appendChild(z);k=mxUtils.button(mxResources.get("open"),function(){z.click()});k.className="geBtn";c.appendChild(k)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();C(null,function(A){e(""!=-A&&null!=A?new mxImage(A,K.value,J.value):null,null==A,n,!mxClient.IS_SVG||mxClient.IS_SF?null:P.checked)})});mxEvent.addGestureListeners(applyBtn,function(){y=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(q);u.appendChild(c);this.container=u},ParseDialog=function(b,e,f){function c(d,g,m){var t=d.split("\n");if("plantUmlPng"==g||"plantUmlSvg"==g||"plantUmlTxt"==g){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var v=function(S,-l,x,F,N){p=mxEvent.isAltDown(m)?p:y.getCenterInsertPoint(new mxRectangle(0,0,F,N));var O=null;y.getModel().beginUpdate();try{O="txt"==l?b.insertAsPreText(x,p.x,p.y):y.insertVertex(null,null,null,p.x,p.y,F,N,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(x)+";"),y.setAttributeForCell(O,"plantUmlData",JSON.stringify({data:S,format:l},null,2))}finally{y.getModel().endUpdate()}null!=O&&(y.setSelectionCell(O),y.scrollCellToVisible(O))},y=b.editor.graph,C="plantUmlTxt"==-g?"txt":"plantUmlPng"==g?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==d&&"svg"==C?window.setTimeout(function(){b.spinner.stop();v(d,C,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",-295,212)},200):b.generatePlantUmlImage(d,C,function(S,l,x){b.spinner.stop();v(d,C,S,l,x)},function(S){b.handleError(S)})}}else if("mermaid"==g||"mermaid2drawio"==g){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var I=0;I<t.length&&(0==t[I].trim().length||"%%"==t[I].substring(0,2));)I++;if("---"==t[I].trim()){do I++;while(I<t.length&&"---"!=t[I].trim());I++}I=t[I].trim().toLowerCase();t=I.indexOf(" ");I=I.substring(0,0<t?t:I.length);var K="undefined"!==typeof mxMermaidToDrawio&&-"mermaid2drawio"==g&&("graph"==I||"flowchart"==I||"sequencediagram"==I||"classdiagram"==I||"statediagram-v2"==I||"statediagram"==I||"erdiagram"==I||"requirementdiagram"==I||"gitgraph"==I||"mindmap"==I||"journey"==I);y=b.editor.graph;K&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(S){b.spinner.stop();y.setSelectionCells(b.importXml(S,Math.max(p.x,20),Math.max(p.y,20),!0,null,null,!0));y.scrollCellToVisible(y.getSelectionCell())}));b.generateMermaidImage(d,null,function(S,l,x){if(!K){p=-mxEvent.isAltDown(m)?p:y.getCenterInsertPoint(new mxRectangle(0,0,l,x));b.spinner.stop();var F=null;y.getModel().beginUpdate();try{F=y.insertVertex(null,null,null,p.x,p.y,l,x,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+S+";"),y.setAttributeForCell(F,"mermaidData",JSON.stringify({data:d},null,2))}finally{y.getModel().endUpdate()}null!=F&&(y.setSelectionCell(F),y.scrollCellToVisible(F))}},function(S){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(S)})}}else if("table"==-g){g=null;var J=[],U=0,P={};for(I=0;I<t.length;I++){var R=mxUtils.trim(t[I]);if("primary key"==R.substring(0,11).toLowerCase()){var n=R.match(/\((.+)\)/);n&&n[1]&&(P[n[1]]=!0);t.splice(I,1)}else 0<R.toLowerCase().indexOf("primary key")&&(P[R.split(" ")[0]]=!0,t[I]=mxUtils.trim(R.replace(/primary key/i,"")))}for(I=0;I<t.length;I++)if(R=mxUtils.trim(t[I]),"create table"==R.substring(0,12).toLowerCase())R=mxUtils.trim(R.substring(12)),"("==R.charAt(R.length-1)&&(R=mxUtils.trim(R.substring(0,R.length--1))),g=new mxCell(R,new mxGeometry(U,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),g.vertex=!0,J.push(g),R=b.editor.graph.getPreferredSizeForCell(z),null!=R&&(g.geometry.width=R.width+10);else if(null!=g&&")"==R.charAt(0))U+=g.geometry.width+40,g=null;else if("("!=R&&null!=g){R=R.substring(0,","==R.charAt(R.length-1)?R.length-1:R.length);n=P[R.split(" ")[0]];var z=new mxCell("",new mxGeometry(0,-0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(n?"1":"0")+";");z.vertex=!0;var A=new mxCell(n?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(n?"fontStyle=1;":""));A.vertex=!0;z.insert(A);R=new mxCell(R,new mxGeometry(30,-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(n?"fontStyle=5;":""));R.vertex=!0;z.insert(R);R=b.editor.graph.getPreferredSizeForCell(R);null!=R&&g.geometry.width<R.width+30&&(g.geometry.width=Math.min(320,Math.max(g.geometry.width,R.width+30)));g.insert(z,n?0:null);g.geometry.height+=30}0<J.length&&(y=b.editor.graph,p=mxEvent.isAltDown(m)?p:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(J,-!0)),y.setSelectionCells(y.importCells(J,p.x,p.y)),y.scrollCellToVisible(y.getSelectionCell()))}else if("list"==g){if(0<t.length){y=b.editor.graph;g=null;J=[];for(I=z=0;I<t.length;I++)";"!=t[I].charAt(0)&&(0==t[I].length?g=null:null==g?(g=new mxCell(t[I],new mxGeometry(z,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),g.vertex=!0,J.push(g),R=y.getPreferredSizeForCell(g),-null!=R&&g.geometry.width<R.width+10&&(g.geometry.width=R.width+10),z+=g.geometry.width+40):"--"==t[I]?(R=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),R.vertex=!0,g.geometry.height+=R.geometry.height,g.insert(R)):0<t[I].length&&(U=new mxCell(t[I],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),-U.vertex=!0,R=y.getPreferredSizeForCell(U),null!=R&&U.geometry.width<R.width&&(U.geometry.width=R.width),g.geometry.width=Math.max(g.geometry.width,U.geometry.width),g.geometry.height+=U.geometry.height,g.insert(U)));if(0<J.length){p=mxEvent.isAltDown(m)?p:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(J,!0));y.getModel().beginUpdate();try{J=y.importCells(J,p.x,p.y);R=[];for(I=0;I<J.length;I++)R.push(J[I]),R=R.concat(J[I].children);y.fireEvent(new mxEventObject("cellsInserted","cells",R))}finally{y.getModel().endUpdate()}y.setSelectionCells(J);-y.scrollCellToVisible(y.getSelectionCell())}}}else{z=function(S){var l=B[S];null==l&&(l=new mxCell(S,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),l.vertex=!0,B[S]=l,J.push(l));return l};var B={};J=[];for(I=0;I<t.length;I++)if(";"!=t[I].charAt(0)){var M=t[I].split("->");2<=M.length&&(n=z(M[0]),A=z(M[M.length-1]),M=new mxCell(2<M.length?M[1]:"",new mxGeometry),M.edge=!0,M.geometry.relative=!0,n.insertEdge(M,!0),A.insertEdge(M,!1),J.push(M))}if(0<J.length){t=document.createElement("div");t.style.visibility=-"hidden";document.body.appendChild(t);y=new Graph(t);y.getModel().beginUpdate();try{J=y.importCells(J);for(I=0;I<J.length;I++)y.getModel().isVertex(J[I])&&(R=y.getPreferredSizeForCell(J[I]),J[I].geometry.width=Math.max(J[I].geometry.width,R.width),J[I].geometry.height=Math.max(J[I].geometry.height,R.height));I=!0;"horizontalFlow"==g||"verticalFlow"==g?((new mxHierarchicalLayout(y,"horizontalFlow"==g?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(y.getDefaultParent(),J),I=!1):"circle"==-g?(new mxCircleLayout(y)).execute(y.getDefaultParent()):(U=new mxFastOrganicLayout(y),U.disableEdgeStyle=!1,U.forceConstant=180,U.execute(y.getDefaultParent()));I&&(P=new mxParallelEdgeLayout(y),P.spacing=30,P.execute(y.getDefaultParent()))}finally{y.getModel().endUpdate()}y.clearCellOverlays();R=[];b.editor.graph.getModel().beginUpdate();try{J=y.getModel().getChildren(y.getDefaultParent()),p=mxEvent.isAltDown(m)?p:b.editor.graph.getCenterInsertPoint(y.getBoundingBoxFromGeometry(J,!0)),R=b.editor.graph.importCells(J,-p.x,p.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",R))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(R);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());y.destroy();t.parentNode.removeChild(t)}}}function k(){return"list"==u.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==u.value||+var BackgroundImageDialog=function(b,e,f,c,l){function n(){null==q||q==mxConstants.NONE?(P.style.display="none",V.checked=!1):(P.style.backgroundColor=q,P.style.display="",V.checked=!0)}var p=b.editor.graph,u=document.createElement("div");u.style.whiteSpace="nowrap";var G=document.createElement("h2");mxUtils.write(G,mxResources.get("background"));G.style.marginTop="0px";u.appendChild(G);var H=null!=f&&null!=f.originalSrc;G=!1;var F=document.createElement("input");F.style.cssText="margin-right:8px;margin-bottom:8px;";+F.setAttribute("value","url");F.setAttribute("type","radio");F.setAttribute("name","geBackgroundImageDialogOption");var K=document.createElement("input");K.style.cssText="margin-right:8px;margin-bottom:8px;";K.setAttribute("value","url");K.setAttribute("type","radio");K.setAttribute("name","geBackgroundImageDialogOption");var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.width="360px";d.value=H||null==f?"":f.src;var g=document.createElement("select");+g.style.width="360px";if(null!=b.pages)for(var k=0;k<b.pages.length;k++){var v=document.createElement("option");mxUtils.write(v,b.pages[k].getName()||mxResources.get("pageWithNumber",[k+1]));v.setAttribute("value","data:page/id,"+b.pages[k].getId());b.pages[k]==b.currentPage&&v.setAttribute("disabled","disabled");null!=f&&f.originalSrc==v.getAttribute("value")&&(v.setAttribute("selected","selected"),G=!0);g.appendChild(v)}H||null!=b.pages&&1!=b.pages.length||(F.style.display="none",K.style.display=+"none",g.style.display="none");var t=document.createElement("option"),x=!1,A=!1,J=function(B,C){x||null!=B&&A||(K.checked?null!=C&&C(t.selected?null:g.value):""==d.value||b.isOffline()?(E.value="",R.value="",null!=C&&C("")):(d.value=mxUtils.trim(d.value),b.loadImage(d.value,function(M){E.value=M.width;R.value=M.height;null!=C&&C(d.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));E.value="";R.value="";null!=C&&C(null)})))},D=mxUtils.bind(this,+function(B){b.importFiles(B,0,0,b.maxBackgroundSize,function(C,M,T,m,z,I){d.value=C;J();d.focus()},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var M=0;M<C.length;M++)C[M]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){H?g.focus():d.focus();mxEvent.addListener(g,"focus",function(){F.removeAttribute("checked");K.setAttribute("checked","checked");K.checked=!0});mxEvent.addListener(d,"focus",function(){K.removeAttribute("checked");F.setAttribute("checked",+"checked");F.checked=!0});if(Graph.fileSupport){d.setAttribute("placeholder",mxResources.get("dragImagesHere"));var B=u.parentNode,C=null;mxEvent.addListener(B,"dragleave",function(M){null!=C&&(C.parentNode.removeChild(C),C=null);M.stopPropagation();M.preventDefault()});mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(M){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=b.highlightElement(B));M.stopPropagation();M.preventDefault()}));mxEvent.addListener(B,"drop",mxUtils.bind(this,+function(M){null!=C&&(C.parentNode.removeChild(C),C=null);if(0<M.dataTransfer.files.length)D(M.dataTransfer.files);else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var T=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)&&(d.value=decodeURIComponent(T),J())}M.stopPropagation();M.preventDefault()}),!1)}};u.appendChild(F);u.appendChild(d);mxUtils.br(u);k=document.createElement("span");k.style.marginLeft="30px";mxUtils.write(k,mxResources.get("width")++":");u.appendChild(k);var E=document.createElement("input");E.setAttribute("type","text");E.style.width="60px";E.style.marginLeft="8px";E.style.marginRight="16px";E.value=null==f||H?"":f.width;u.appendChild(E);mxUtils.write(u,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==f||H?"":f.height;u.appendChild(R);mxUtils.br(u);mxUtils.br(u);mxEvent.addListener(d,"change",+J);ImageDialog.filePicked=function(B){B.action==google.picker.Action.PICKED&&null!=B.docs[0].thumbnails&&(B=B.docs[0].thumbnails[B.docs[0].thumbnails.length-1],null!=B&&(d.value=B.url,J()));d.focus()};u.appendChild(K);u.appendChild(g);mxUtils.br(u);mxUtils.br(u);H?(K.setAttribute("checked","checked"),K.checked=!0):(F.setAttribute("checked","checked"),F.checked=!0);!G&&K.checked&&(mxUtils.write(t,mxResources.get("pageNotFound")),t.setAttribute("disabled","disabled"),t.setAttribute("selected","selected"),+t.setAttribute("value","pageNotFound"),g.appendChild(t),mxEvent.addListener(g,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)}));f=document.createElement("div");f.style.display=l?"inline-flex":"none";f.style.alignItems="center";f.style.cursor="default";f.style.minWidth="40%";f.style.height="20px";var V=document.createElement("input");V.setAttribute("type","checkbox");V.style.margin="0px 10px 0px 4px";V.style.verticalAlign="bottom";V.defaultChecked=c!=mxConstants.NONE&&+null!=c;V.checked=V.defaultChecked;f.appendChild(V);mxUtils.write(f,mxResources.get("fillColor"));l=f.cloneNode(!1);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.style.margin="0px 10px 0px 30px";Q.style.verticalAlign="bottom";Q.defaultChecked=p.shadowVisible;Q.checked=Q.defaultChecked;l.appendChild(Q);mxUtils.write(l,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||Q.setAttribute("disabled","disabled");mxEvent.addListener(l,"click",function(B){mxEvent.getSource(B)!=+Q&&(Q.checked=!Q.checked)});var P=document.createElement("button");P.style.width="36px";P.style.height="18px";P.style.cursor="pointer";P.style.marginLeft="10px";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.verticalAlign="bottom";P.className="geColorBtn";var q=c;n();mxEvent.addListener(f,"click",function(B){mxEvent.getSource(B)!=V&&(V.checked=!V.checked);q=V.checked?"#ffffff":null;n()});mxEvent.addListener(P,"click",function(B){b.pickColor(q||"none",function(C){q=+C;n()});mxEvent.consume(B)});f.appendChild(P);u.appendChild(f);u.appendChild(l);mxUtils.br(u);c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";p=mxUtils.button(mxResources.get("cancel"),function(){x=!0;b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&c.appendChild(p);l=mxUtils.button(mxResources.get("reset"),function(){d.value="";E.value="";R.value="";F.checked=!0;q=mxConstants.NONE;n();x=!1});mxEvent.addGestureListeners(l,function(){x=!0});l.className=+"geBtn";l.width="100";c.appendChild(l);if(Graph.fileSupport){var y=document.createElement("input");y.setAttribute("multiple","multiple");y.setAttribute("type","file");mxEvent.addListener(y,"change",function(B){null!=y.files&&(D(y.files),y.type="",y.type="file",y.value="")});y.style.display="none";u.appendChild(y);l=mxUtils.button(mxResources.get("open"),function(){y.click()});l.className="geBtn";c.appendChild(l)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();J(null,function(B){e(""!=+B&&null!=B?new mxImage(B,E.value,R.value):null,null==B,q,!mxClient.IS_SVG||mxClient.IS_SF?null:Q.checked)})});mxEvent.addGestureListeners(applyBtn,function(){A=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(p);u.appendChild(c);this.container=u},ParseDialog=function(b,e,f){function c(g,k,v){var t=g.split("\n");if("plantUmlPng"==k||"plantUmlSvg"==k||"plantUmlTxt"==k){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var x=function(T,+m,z,I,L){n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(new mxRectangle(0,0,I,L));var N=null;A.getModel().beginUpdate();try{N="txt"==m?b.insertAsPreText(z,n.x,n.y):A.insertVertex(null,null,null,n.x,n.y,I,L,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(z)+";"),A.setAttributeForCell(N,"plantUmlData",JSON.stringify({data:T,format:m},null,2))}finally{A.getModel().endUpdate()}null!=N&&(A.setSelectionCell(N),A.scrollCellToVisible(N))},A=b.editor.graph,J="plantUmlTxt"==+k?"txt":"plantUmlPng"==k?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==g&&"svg"==J?window.setTimeout(function(){b.spinner.stop();x(g,J,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",+295,212)},200):b.generatePlantUmlImage(g,J,function(T,m,z){b.spinner.stop();x(g,J,T,m,z)},function(T){b.handleError(T)})}}else if("mermaid"==k||"mermaid2drawio"==k){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var D=0;D<t.length&&(0==t[D].trim().length||"%%"==t[D].substring(0,2));)D++;if("---"==t[D].trim()){do D++;while(D<t.length&&"---"!=t[D].trim());D++}D=t[D].trim().toLowerCase();t=D.indexOf(" ");D=D.substring(0,0<t?t:D.length);var E="undefined"!==typeof mxMermaidToDrawio&&+"mermaid2drawio"==k&&("graph"==D||"flowchart"==D||"sequencediagram"==D||"classdiagram"==D||"statediagram-v2"==D||"statediagram"==D||"erdiagram"==D||"requirementdiagram"==D||"gitgraph"==D||"mindmap"==D||"journey"==D);A=b.editor.graph;E&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(T){b.spinner.stop();A.setSelectionCells(b.importXml(T,Math.max(n.x,20),Math.max(n.y,20),!0,null,null,!0));A.scrollCellToVisible(A.getSelectionCell())}));b.generateMermaidImage(g,null,function(T,m,z){if(!E){n=+mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(new mxRectangle(0,0,m,z));b.spinner.stop();var I=null;A.getModel().beginUpdate();try{I=A.insertVertex(null,null,null,n.x,n.y,m,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+T+";"),A.setAttributeForCell(I,"mermaidData",JSON.stringify({data:g},null,2))}finally{A.getModel().endUpdate()}null!=I&&(A.setSelectionCell(I),A.scrollCellToVisible(I))}},function(T){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(T)})}}else if("table"==+k){k=null;var R=[],V=0,Q={};for(D=0;D<t.length;D++){var P=mxUtils.trim(t[D]);if("primary key"==P.substring(0,11).toLowerCase()){var q=P.match(/\((.+)\)/);q&&q[1]&&(Q[q[1]]=!0);t.splice(D,1)}else 0<P.toLowerCase().indexOf("primary key")&&(Q[P.split(" ")[0]]=!0,t[D]=mxUtils.trim(P.replace(/primary key/i,"")))}for(D=0;D<t.length;D++)if(P=mxUtils.trim(t[D]),"create table"==P.substring(0,12).toLowerCase())P=mxUtils.trim(P.substring(12)),"("==P.charAt(P.length-1)&&(P=mxUtils.trim(P.substring(0,P.length-+1))),k=new mxCell(P,new mxGeometry(V,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),k.vertex=!0,R.push(k),P=b.editor.graph.getPreferredSizeForCell(y),null!=P&&(k.geometry.width=P.width+10);else if(null!=k&&")"==P.charAt(0))V+=k.geometry.width+40,k=null;else if("("!=P&&null!=k){P=P.substring(0,","==P.charAt(P.length-1)?P.length-1:P.length);q=Q[P.split(" ")[0]];var y=new mxCell("",new mxGeometry(0,+0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(q?"1":"0")+";");y.vertex=!0;var B=new mxCell(q?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(q?"fontStyle=1;":""));B.vertex=!0;y.insert(B);P=new mxCell(P,new mxGeometry(30,+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(q?"fontStyle=5;":""));P.vertex=!0;y.insert(P);P=b.editor.graph.getPreferredSizeForCell(P);null!=P&&k.geometry.width<P.width+30&&(k.geometry.width=Math.min(320,Math.max(k.geometry.width,P.width+30)));k.insert(y,q?0:null);k.geometry.height+=30}0<R.length&&(A=b.editor.graph,n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,+!0)),A.setSelectionCells(A.importCells(R,n.x,n.y)),A.scrollCellToVisible(A.getSelectionCell()))}else if("list"==k){if(0<t.length){A=b.editor.graph;k=null;R=[];for(D=y=0;D<t.length;D++)";"!=t[D].charAt(0)&&(0==t[D].length?k=null:null==k?(k=new mxCell(t[D],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),k.vertex=!0,R.push(k),P=A.getPreferredSizeForCell(k),+null!=P&&k.geometry.width<P.width+10&&(k.geometry.width=P.width+10),y+=k.geometry.width+40):"--"==t[D]?(P=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),P.vertex=!0,k.geometry.height+=P.geometry.height,k.insert(P)):0<t[D].length&&(V=new mxCell(t[D],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),+V.vertex=!0,P=A.getPreferredSizeForCell(V),null!=P&&V.geometry.width<P.width&&(V.geometry.width=P.width),k.geometry.width=Math.max(k.geometry.width,V.geometry.width),k.geometry.height+=V.geometry.height,k.insert(V)));if(0<R.length){n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,!0));A.getModel().beginUpdate();try{R=A.importCells(R,n.x,n.y);P=[];for(D=0;D<R.length;D++)P.push(R[D]),P=P.concat(R[D].children);A.fireEvent(new mxEventObject("cellsInserted","cells",P))}finally{A.getModel().endUpdate()}A.setSelectionCells(R);+A.scrollCellToVisible(A.getSelectionCell())}}}else{y=function(T){var m=C[T];null==m&&(m=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),m.vertex=!0,C[T]=m,R.push(m));return m};var C={};R=[];for(D=0;D<t.length;D++)if(";"!=t[D].charAt(0)){var M=t[D].split("->");2<=M.length&&(q=y(M[0]),B=y(M[M.length-1]),M=new mxCell(2<M.length?M[1]:"",new mxGeometry),M.edge=!0,M.geometry.relative=!0,q.insertEdge(M,!0),B.insertEdge(M,!1),R.push(M))}if(0<R.length){t=document.createElement("div");t.style.visibility=+"hidden";document.body.appendChild(t);A=new Graph(t);A.getModel().beginUpdate();try{R=A.importCells(R);for(D=0;D<R.length;D++)A.getModel().isVertex(R[D])&&(P=A.getPreferredSizeForCell(R[D]),R[D].geometry.width=Math.max(R[D].geometry.width,P.width),R[D].geometry.height=Math.max(R[D].geometry.height,P.height));D=!0;"horizontalFlow"==k||"verticalFlow"==k?((new mxHierarchicalLayout(A,"horizontalFlow"==k?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(A.getDefaultParent(),R),D=!1):"circle"==+k?(new mxCircleLayout(A)).execute(A.getDefaultParent()):(V=new mxFastOrganicLayout(A),V.disableEdgeStyle=!1,V.forceConstant=180,V.execute(A.getDefaultParent()));D&&(Q=new mxParallelEdgeLayout(A),Q.spacing=30,Q.execute(A.getDefaultParent()))}finally{A.getModel().endUpdate()}A.clearCellOverlays();P=[];b.editor.graph.getModel().beginUpdate();try{R=A.getModel().getChildren(A.getDefaultParent()),n=mxEvent.isAltDown(v)?n:b.editor.graph.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,!0)),P=b.editor.graph.importCells(R,+n.x,n.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",P))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(P);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());A.destroy();t.parentNode.removeChild(t)}}}function l(){return"list"==u.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==u.value||"mermaid2drawio"==u.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==u.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==u.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":-"plantUmlSvg"==u.value||"plantUmlTxt"==u.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var p=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var q=document.createElement("textarea");q.style.boxSizing="border-box";q.style.resize=-"none";q.style.width="100%";q.style.height="354px";q.style.marginBottom="16px";var u=document.createElement("select");u.className="geBtn";if("formatSql"==f||"mermaid"==f&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())u.style.display="none";var E=document.createElement("option");E.setAttribute("value","list");mxUtils.write(E,mxResources.get("list"));"plantUml"!=f&&"mermaid"!=f&&u.appendChild(E);null!=f&&"fromText"!=f||E.setAttribute("selected","selected");E=document.createElement("option");-E.setAttribute("value","table");mxUtils.write(E,mxResources.get("formatSql"));"formatSql"==f&&(u.appendChild(E),E.setAttribute("selected","selected"));E=document.createElement("option");E.setAttribute("value","mermaid");mxUtils.write(E,mxResources.get("image"));if("mermaid"==f)if("undefined"!==typeof mxMermaidToDrawio){var H=document.createElement("option");H.setAttribute("value","mermaid2drawio");H.setAttribute("selected","selected");mxUtils.write(H,mxResources.get("diagram"));u.appendChild(H)}else u.style.display=-"none";u.appendChild(E);E=document.createElement("option");E.setAttribute("value","diagram");mxUtils.write(E,mxResources.get("diagram"));H=document.createElement("option");H.setAttribute("value","circle");mxUtils.write(H,mxResources.get("circle"));var D=document.createElement("option");D.setAttribute("value","horizontalFlow");mxUtils.write(D,mxResources.get("horizontalFlow"));var L=document.createElement("option");L.setAttribute("value","verticalFlow");mxUtils.write(L,mxResources.get("verticalFlow"));-"plantUml"!=f&&"mermaid"!=f&&(u.appendChild(E),u.appendChild(H),u.appendChild(D),u.appendChild(L));E=document.createElement("option");E.setAttribute("value","plantUmlSvg");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&E.setAttribute("selected","selected");H=document.createElement("option");H.setAttribute("value","plantUmlPng");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");D=document.createElement("option");D.setAttribute("value",-"plantUmlTxt");mxUtils.write(D,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(u.appendChild(E),u.appendChild(H),u.appendChild(D));var G=k();q.value=G;e.appendChild(q);this.init=function(){q.focus()};Graph.fileSupport&&(q.addEventListener("dragover",function(d){d.stopPropagation();d.preventDefault()},!1),q.addEventListener("drop",function(d){d.stopPropagation();d.preventDefault();if(0<d.dataTransfer.files.length){d=-d.dataTransfer.files[0];var g=new FileReader;g.onload=function(m){q.value=m.target.result};g.readAsText(d)}},!1));e.appendChild(u);mxEvent.addListener(u,"change",function(){var d=k();if(0==q.value.length||q.value==G)G=d,q.value=G});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(E=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),E.className="geBtn",e.appendChild(E));E=mxUtils.button(mxResources.get("close"),-function(){q.value==G?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});E.className="geBtn";b.editor.cancelFirst&&e.appendChild(E);H=mxUtils.button(mxResources.get("insert"),function(d){try{b.hideDialog(),c(q.value,u.value,d)}catch(g){b.handleError(g)}});H.className="geBtn gePrimaryBtn";e.appendChild(H);b.editor.cancelFirst||e.appendChild(E);this.container=e},NewDialog=function(b,e,f,c,k,p,q,u,E,H,D,L,G,d,g,m,t,v){function y(la){null!=la&&(na=Aa=la?135:140);la=!0;-if(null!=Wa)for(;l<Wa.length&&(la||0!=mxUtils.mod(l,30));){var ya=Wa[l++];ya=n(ya.url,ya.libs,ya.title,ya.tooltip?ya.tooltip:ya.title,ya.select,ya.imgUrl,ya.info,ya.onClick,ya.preview,ya.noImg,ya.clibs,ya.type);la&&ya.click();la=!1}}function C(la,ya,ta,qa,ma,za){if(null!=la&&mxUtils.isAncestorNode(document.body,qa)){la=mxUtils.parseXml(la);la=Editor.parseDiagramNode(la.documentElement,null,!0);var Ja=new mxCodec(la.ownerDocument),Ga=new mxGraphModel;Ja.decode(la,Ga);b.sidebar.createTooltip(qa,Ga.root.children,-Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=ma?mxResources.get(ma):null,!0,new mxPoint(ya,ta),!0,function(){V=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=za&&J(qa,null,null,za,infoObj,clibs)},!0,!1)}}function I(){var la=document.createElement("div");la.style.position="absolute";la.style.overflow="visible";-la.style.left="8px";la.style.right="8px";la.style.bottom="8px";la.style.top="8px";mxUtils.write(la,mxResources.get("describeYourDiagram")+":");mxUtils.br(la);var ya=document.createElement("input");ya.setAttribute("type","text");ya.setAttribute("placeholder",mxResources.get("processForHiringNewEmployee"));ya.style.width="100%";ya.style.marginTop="6px";ya.style.marginBottom="4px";ya.style.boxSizing="border-box";la.appendChild(ya);la.init=function(){ya.focus()};mxUtils.br(la);var ta=document.createElement("div");-ta.style.top="86px";ta.style.left="2px";ta.style.right="2px";ta.style.bottom="2px";ta.style.position="absolute";ta.style.border="1px solid #424242";var qa=document.createElement("div");qa.style.boxSizing="border-box";qa.style.position="relative";qa.style.textAlign="center";qa.style.top="50%";mxUtils.write(qa,mxResources.get("blankDiagram"));ta.appendChild(qa);var ma=document.createElement("select");ma.className="geBtn";ma.style.maxWidth="160px";ma.style.marginLeft="0px";qa=document.createElement("option");-mxUtils.write(qa,mxResources.get("diagramType"));qa.setAttribute("value","");ma.appendChild(qa);for(var za=0;za<EditorUi.mermaidDiagramTypes.length;za++){qa=document.createElement("option");var Ja=EditorUi.mermaidDiagramTypes[za],Ga=Ja;Ja==urlParams["smart-template-type"]&&qa.setAttribute("selected","selected");"erDiagram"==Ga&&(Ga="entityRelationshipDiagram");Ga=mxResources.get(Ga,null,Ga.charAt(0).toUpperCase()+Ga.substring(1).replace(/[A-Z]/g," $&"));qa.setAttribute("value",Ja);mxUtils.write(qa,-Ga);ma.appendChild(qa)}var La=mxUtils.button(mxResources.get("generate"),function(){var Pa=ya.value,Ka=ma.value.replace(/([A-Z])/g," $1").toLowerCase();Pa="Write the declaration code for a detailed and complex "+(""!=Ka?Ka:"graph")+' that shows "'+(""!=Pa?Pa:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Ka=""!=ma.value?" ("+mxUtils.trim(mxUtils.getTextContent(ma.options[ma.selectedIndex]))+")":"";var Ra="gantt"==ma.value||"pie"==ma.value||-"timeline"==ma.value||"quadrantchart"==ma.value||"c4context"==ma.value,Na=ya.value+Ka;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Qa){Ra||(sa=ja=Qa,ha="Smart Template: "+Na)}));b.spinner.spin(document.body,mxResources.get("loading"))&&b.generateOpenAiMermaidDiagram(Pa,function(Qa,Ya,Ha,eb){b.spinner.stop();ta.innerHTML="";var Ua=document.createElement("img");Ua.setAttribute("title",Na);Ua.src="data:image/svg+xml;base64,"+Ya.substring(Ya.indexOf(",")+-1);Ua.style.cursor="pointer";Ua.style.width="100%";Ua.style.height="100%";ta.appendChild(Ua);Qa=b.createMermaidXml(Qa,EditorUi.defaultMermaidConfig,Ya,Ha,eb,Na);var ib="<mxfile><diagram>"+Graph.compress(Qa)+"</diagram></mxfile>";if(Ra||"undefined"===typeof mxMermaidToDrawio)sa=ja=Qa;Qa=N.cloneNode(!0);ta.appendChild(Qa);Ya=function(fb){V=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ha=function(fb){V||C(ib,mxEvent.getClientX(fb),mxEvent.getClientY(fb),Ua,Na)};mxEvent.addGestureListeners(Ua,-Ya,null,Ha);mxEvent.addGestureListeners(Qa,Ya,null,Ha)},function(Qa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Qa)})});La.setAttribute("disabled","disabled");La.className="geBtn gePrimaryBtn";qa=function(){window.setTimeout(function(){""!=ya.value?La.removeAttribute("disabled"):La.setAttribute("disabled","disabled")},0)};za=urlParams["smart-template"];null!=za&&"1"!=za&&(ya.value=decodeURIComponent(za),qa(),"1"==urlParams["smart-template-generate"]&&-window.setTimeout(function(){La.click()},0));mxEvent.addListener(ya,"change",qa);mxEvent.addListener(ya,"keydown",qa);mxEvent.addListener(ya,"cut",qa);mxEvent.addListener(ya,"paste",qa);mxEvent.addListener(ya,"keydown",function(Pa){13==Pa.keyCode&&La.click()});qa=document.createElement("div");qa.style.height="40px";qa.style.marginTop="4px";qa.style.marginBottom="4px";qa.style.whiteSpace="nowrap";qa.style.overflowX="auto";qa.style.overflowY="hidden";qa.appendChild(ma);qa.appendChild(La);la.appendChild(qa);-la.appendChild(ta);return la}function K(){null!=ja&&ja==sa&&EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"templateGenerated",label:ha});if(ia&&null!=d)f||b.hideDialog(),d(ia,ua,S.value);else if(c)f||b.hideDialog(),c(ja,S.value,ka,ca);else{var la=S.value;if(null!=la&&0<la.length){var ya=function(qa,ma,za){b.createFile(za,ja,null!=ca&&0<ca.length?ca:null,qa,function(){b.hideDialog()},null,ma,null,null!=da&&0<da.length?da:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ta=new SaveDialog(b,-la,mxUtils.bind(this,function(qa,ma,za){ya(ma,za,qa.value)}),null,null,null,null,b.mode);b.showDialog(ta.container,420,150,!0,!1);ta.init()}else b.pickFolder(b.mode,function(qa){ya(b.mode,qa,la)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function J(la,ya,ta,qa,ma,za,Ja){return ba!=la?(null!=ba&&(ba.style.backgroundColor="transparent",ba.style.border="2px solid transparent",0<ba.getElementsByTagName("table").length&&(ba.getElementsByTagName("table")[0].style.visibility=-"visible"),ba==oa&&(oa.style.backgroundImage=Ea,oa.style.backgroundPosition="center center",oa.style.backgroundRepeat="no-repeat",oa.style.backgroundSize="contain",va.style.visibility="hidden",Ca.style.visibility="hidden",Da.style.visibility="hidden",Ba.style.visibility="hidden",Fa.style.visibility=null!=sa?"visible":"hidden",oa.getElementsByTagName("table")[0].style.visibility="visible")),""!=la.style.backgroundImage&&0<la.getElementsByTagName("table").length&&(la.getElementsByTagName("table")[0].style.visibility=-"hidden"),la==oa&&(ya=sa,null!=ya?(Fa.style.visibility="visible",Fa.style.visibility=null!=sa?"visible":"hidden",Ba.style.visibility="visible"):(va.style.visibility="visible",Ca.style.visibility="visible",Da.style.visibility="visible",Ba.style.visibility="hidden",Fa.style.visibility="hidden")),F.removeAttribute("disabled"),ja=ya,ca=ta,da=za,ba=la,ia=qa,ka=Ja,ua=ma,ba.style.border=E,!0):!1}function U(){oa.style.backgroundImage="";oa.getElementsByTagName("table")[0].style.visibility="hidden";va.style.visibility=-"visible";Ca.style.visibility="visible";Da.style.visibility="visible";Ba.style.visibility="hidden";Fa.style.visibility="hidden";va.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?va.select():document.execCommand("selectAll",!1,null)}function P(){va.style.visibility="hidden";Ca.style.visibility="hidden";Da.style.visibility="hidden";oa.style.backgroundImage=Ea;oa.style.backgroundSize="contain";Ba.style.visibility="visible";Fa.style.visibility="visible"}function R(la){var ya=mxUtils.trim(va.value);-if(la||""==ya)null!=ha&&(va.value=ha,P());else{va.style.visibility="hidden";Ca.style.visibility="hidden";Da.style.visibility="hidden";var ta=!1;la='Write a detailed and complex MermaidJS declaration for "'+(""!=ya?ya:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(qa){qa!=b.emptyDiagramXml&&(ta=!0,ja=qa)}));oa.style.backgroundImage="url("+Editor.spinImage+-")";oa.style.backgroundSize="12px 12px";b.generateOpenAiMermaidDiagram(la,function(qa,ma,za,Ja){ba==oa&&"hidden"==va.style.visibility&&(Ea="url(data:image/svg+xml;base64,"+ma.substring(ma.indexOf(",")+1)+")",oa.setAttribute("title",ya),sa=ja=qa=ta?ja:b.createMermaidXml(qa,EditorUi.defaultMermaidConfig,ma,za,Ja,ya),ha=ya,P())},function(qa){ba==oa&&(va.style.visibility="visible",Ca.style.visibility="visible",Da.style.visibility="visible",Ba.style.visibility="visible",Fa.style.visibility="visible",b.handleError(qa))})}}-function n(la,ya,ta,qa,ma,za,Ja,Ga,La,Pa,Ka,Ra){function Na(Oa,$a){null==eb?(Ua=Oa,Ua=/^https?:\/\//.test(Ua)?b.editor.isCorsEnabledForUrl(Ua)?Ua:PROXY_URL+"?url="+encodeURIComponent(Ua):TEMPLATE_PATH+"/"+Ua,mxUtils.get(Ua,mxUtils.bind(this,function(ab){200<=ab.getStatus()&&299>=ab.getStatus()&&(eb=ab.getText());$a(eb,Ua)}))):$a(eb,Ua)}function Qa(Oa,$a){if(null==la||O||b.sidebar.currentElt==Ha)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=Q){var ab="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+-Q.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Q.naturalWidth+'" height="'+Q.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";C(ab,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ta,la)}else b.sidebar.currentElt=Ha,O=!0,Na(la,function(gb){if(O&&b.sidebar.currentElt==Ha)try{C(gb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ha,$a)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}O=!1})}function Ya(){var Oa=document.createElement("table");-Oa.setAttribute("width","100%");Oa.setAttribute("height","100%");Oa.style.background="light-dark(rgba(255,255,255,0.85), transparent)";Oa.style.lineHeight="1.3em";Oa.style.border="none";var $a=document.createElement("tbody"),ab=document.createElement("tr"),gb=document.createElement("td");gb.setAttribute("align","center");gb.setAttribute("valign","middle");var Za=document.createElement("span");Za.style.display="inline-block";Za.style.padding="2px 8px";Za.style.userSelect="none";Za.style.borderRadius=-"8px";Za.style.background="rgba(255,255,255,0.7)";Za.style.overflow="hidden";Za.style.textOverflow="ellipsis";Za.style.maxWidth=na-34+"px";mxUtils.write(Za,mxResources.get(ta,null,ta));gb.appendChild(Za);ab.appendChild(gb);$a.appendChild(ab);Oa.appendChild($a);return Oa}var Ha=null;if("generative"!=Ra||null==oa){Ha=document.createElement("div");Ha.className="geTemplate geAdaptiveAsset";Ha.style.backgroundOrigin="content-box";Ha.style.backgroundPosition="center center";Ha.style.backgroundRepeat="no-repeat";-Ha.style.backgroundSize="contain";Ha.style.boxSizing="border-box";Ha.style.borderRadius="12px";Ha.style.position="relative";Ha.style.height=na+"px";Ha.style.width=Aa+"px";Ha.style.padding="4px";Ha.style.border="2px solid transparent";var eb=null,Ua=la;null!=ta?Ha.setAttribute("title",mxResources.get(ta,null,ta)):null!=qa&&0<qa.length&&Ha.setAttribute("title",qa)}else Ha=oa;if(null!=za){Ha.style.display="inline-flex";Ha.style.justifyContent="center";Ha.style.alignItems="center";ma=document.createElement("img");-ma.setAttribute("src",za);ma.setAttribute("alt",qa);ma.style.maxWidth=na+"px";ma.style.maxHeight=Aa+"px";Q=ma;var ib=za.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ha.appendChild(ma);ma.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){J(Ha,null,null,la,Ja,Ka)}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){K();mxEvent.consume(Oa)})}else if(!Pa&&null!=la&&0<la.length){var fb=-function(Oa){x.spin(pa)&&Na(la,function($a,ab){x.stop();null!=$a&&(J(Ha,$a,ya,null,null,Ka,ab),Oa&&K())})};za=La||TEMPLATE_PATH+"/"+la.substring(0,la.length-4)+".png";Ha.style.backgroundImage="url("+za+")";null!=ta&&Ha.appendChild(Ya());mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){fb()}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){fb(!0);mxEvent.consume(Oa)})}else Ha.appendChild(Ya()),"generative"==Ra&&null==oa&&(Ha.style.backgroundImage=Ea,Ha.style.overflow="visible",-Ha.appendChild(Fa),Ha.appendChild(Ba),Ha.appendChild(va),Ha.appendChild(Ca),Ha.appendChild(Da),oa=Ha),ma&&J(Ha),null!=Ga?(mxEvent.addGestureListeners(Ha,null,null,mxUtils.bind(this,function(Oa){J(Ha,null,null,la,Ja)})),mxEvent.addListener(Ha,"click",Ga)):(mxEvent.addListener(Ha,"click",function(Oa){J(Ha,null,null,la,Ja)&&"generative"==Ra&&null==sa&&U()}),mxEvent.addListener(Ha,"dblclick",function(Oa){"generative"!=Ra?K():"hidden"==va.style.visibility&&U();mxEvent.consume(Oa)}));null!=la&&(za=N.cloneNode(!0),-Ha.appendChild(za),mxEvent.addGestureListeners(za,mxUtils.bind(this,function(Oa){V=b.sidebar.currentElt==Ha}),null,null),mxEvent.addListener(za,"click",mxUtils.bind(this,function(Oa){V||Qa(Oa,null!=ta?ta:qa);mxEvent.consume(Oa)})));pa.appendChild(Ha);return Ha}function z(){function la(Na,Qa){Na=mxResources.get(Na,null,Na.substring(0,1).toUpperCase()+Na.substring(1));18<Na.length&&(Na=Na.substring(0,18)+"…");return Na+(null!=Qa?" ("+Qa.length+")":"")}function ya(Na,Qa,Ya){mxEvent.addListener(Qa,-"click",function(){Sa!=Qa&&(null!=Sa&&(Sa.style.backgroundColor=""),Sa=Qa,Sa.style.backgroundColor=q,pa.scrollTop=0,pa.innerText="",l=0,null!=Ia[Na].content?(pa.appendChild(Ia[Na].content),ja=sa,Wa=null,null!=Ia[Na].content.init&&Ia[Na].content.init()):(Wa=Ya?Va[Na][Ya]:Ia[Na],W=null,y(!1)))});null!=urlParams["smart-template"]&&"smartTemplate"==Na&&Qa.click()}jb&&(jb=!1,mxEvent.addListener(pa,"scroll",function(Na){pa.scrollTop+pa.clientHeight>=pa.scrollHeight&&(y(),mxEvent.consume(Na))}));if(0<Xa){var ta=-document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,mxResources.get("custom"));fa.appendChild(ta);for(var qa in Ta){var ma=document.createElement("div");ta=qa;var za=Ta[qa];18<ta.length&&(ta=ta.substring(0,18)+"…");ma.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ma.setAttribute("title",ta+" ("+-za.length+")");mxUtils.write(ma,ma.getAttribute("title"));null!=H&&(ma.style.padding=H);fa.appendChild(ma);(function(Na,Qa){mxEvent.addListener(ma,"click",function(){Sa!=Qa&&(Sa.style.backgroundColor="",Sa=Qa,Sa.style.backgroundColor=q,pa.scrollTop=0,pa.innerText="",l=0,Wa=Ta[Na],W=null,y(!1))})})(qa,ma)}ta=document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,"draw.io");fa.appendChild(ta)}for(qa in Ia){ta=-za=null;if(null!=Ia[qa].content)ma=document.createElement(Ja?"ul":"div"),ta=la(qa),ma.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",ma.setAttribute("title",ta),mxUtils.write(ma,ta),fa.appendChild(ma),ta=ma;else{var Ja=Va[qa];ta=ma=document.createElement(Ja?"ul":"div");za=Ia[qa];var Ga=la(qa,za);if(null!=Ja){za=document.createElement("li");var La=document.createElement("div");-La.className="geTempTreeCaret";La.setAttribute("title",Ga);mxUtils.write(La,Ga);ta=La;za.appendChild(La);Ga=document.createElement("ul");Ga.className="geTempTreeNested";Ga.style.visibility="hidden";for(var Pa in Ja){var Ka=document.createElement("li"),Ra=la(Pa,Ja[Pa]);Ka.setAttribute("title",Ra);mxUtils.write(Ka,Ra);ya(qa,Ka,Pa);Ga.appendChild(Ka)}za.appendChild(Ga);ma.className="geTempTree";ma.appendChild(za);(function(Na,Qa){mxEvent.addListener(Qa,"click",function(){Na.style.visibility="visible";-Na.classList.toggle("geTempTreeActive");Na.classList.toggle("geTempTreeNested")&&setTimeout(function(){Na.style.visibility="hidden"},550);Qa.classList.toggle("geTempTreeCaret-down")})})(Ga,La)}else ma.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",ma.setAttribute("title",Ga),mxUtils.write(ma,Ga);null!=H&&(ma.style.padding=H);fa.appendChild(ma)}ya(qa,ta);null==Sa&&ta.click()}y(!1)}-u=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;k=null!=k?k:!1;q=null!=q?q:"light-dark(#ebf2f9, "+Editor.darkColor+")";E=null!=E?E:"2px dashed light-dark(#29b6f2, #00a8ff)";D=null!=D?D:EditorUi.templateFile;var A=document.createElement("div");A.style.userSelect="none";A.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";f&&A.appendChild(B);var M=document.createElement("img");M.setAttribute("border",+"plantUmlSvg"==u.value||"plantUmlTxt"==u.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var n=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var p=document.createElement("textarea");p.style.boxSizing="border-box";p.style.resize=+"none";p.style.width="100%";p.style.height="354px";p.style.marginBottom="16px";var u=document.createElement("select");u.className="geBtn";if("formatSql"==f||"mermaid"==f&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())u.style.display="none";var G=document.createElement("option");G.setAttribute("value","list");mxUtils.write(G,mxResources.get("list"));"plantUml"!=f&&"mermaid"!=f&&u.appendChild(G);null!=f&&"fromText"!=f||G.setAttribute("selected","selected");G=document.createElement("option");+G.setAttribute("value","table");mxUtils.write(G,mxResources.get("formatSql"));"formatSql"==f&&(u.appendChild(G),G.setAttribute("selected","selected"));G=document.createElement("option");G.setAttribute("value","mermaid");mxUtils.write(G,mxResources.get("image"));if("mermaid"==f)if("undefined"!==typeof mxMermaidToDrawio){var H=document.createElement("option");H.setAttribute("value","mermaid2drawio");H.setAttribute("selected","selected");mxUtils.write(H,mxResources.get("diagram"));u.appendChild(H)}else u.style.display=+"none";u.appendChild(G);G=document.createElement("option");G.setAttribute("value","diagram");mxUtils.write(G,mxResources.get("diagram"));H=document.createElement("option");H.setAttribute("value","circle");mxUtils.write(H,mxResources.get("circle"));var F=document.createElement("option");F.setAttribute("value","horizontalFlow");mxUtils.write(F,mxResources.get("horizontalFlow"));var K=document.createElement("option");K.setAttribute("value","verticalFlow");mxUtils.write(K,mxResources.get("verticalFlow"));+"plantUml"!=f&&"mermaid"!=f&&(u.appendChild(G),u.appendChild(H),u.appendChild(F),u.appendChild(K));G=document.createElement("option");G.setAttribute("value","plantUmlSvg");mxUtils.write(G,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&G.setAttribute("selected","selected");H=document.createElement("option");H.setAttribute("value","plantUmlPng");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");F=document.createElement("option");F.setAttribute("value",+"plantUmlTxt");mxUtils.write(F,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(u.appendChild(G),u.appendChild(H),u.appendChild(F));var d=l();p.value=d;e.appendChild(p);this.init=function(){p.focus()};Graph.fileSupport&&(p.addEventListener("dragover",function(g){g.stopPropagation();g.preventDefault()},!1),p.addEventListener("drop",function(g){g.stopPropagation();g.preventDefault();if(0<g.dataTransfer.files.length){g=+g.dataTransfer.files[0];var k=new FileReader;k.onload=function(v){p.value=v.target.result};k.readAsText(g)}},!1));e.appendChild(u);mxEvent.addListener(u,"change",function(){var g=l();if(0==p.value.length||p.value==d)d=g,p.value=d});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(G=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),G.className="geBtn",e.appendChild(G));G=mxUtils.button(mxResources.get("close"),+function(){p.value==d?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});G.className="geBtn";b.editor.cancelFirst&&e.appendChild(G);H=mxUtils.button(mxResources.get("insert"),function(g){try{b.hideDialog(),c(p.value,u.value,g)}catch(k){b.handleError(k)}});H.className="geBtn gePrimaryBtn";e.appendChild(H);b.editor.cancelFirst||e.appendChild(G);this.container=e},NewDialog=function(b,e,f,c,l,n,p,u,G,H,F,K,d,g,k,v,t,x){function A(la){null!=la&&(ka=Ba=la?135:140);la=!0;+if(null!=Ua)for(;m<Ua.length&&(la||0!=mxUtils.mod(m,30));){var va=Ua[m++];va=q(va.url,va.libs,va.title,va.tooltip?va.tooltip:va.title,va.select,va.imgUrl,va.info,va.onClick,va.preview,va.noImg,va.clibs,va.type);la&&va.click();la=!1}}function J(la,va,ta,na,ra,za){if(null!=la&&mxUtils.isAncestorNode(document.body,na)){la=mxUtils.parseXml(la);la=Editor.parseDiagramNode(la.documentElement,null,!0);var Ga=new mxCodec(la.ownerDocument),Ia=new mxGraphModel;Ga.decode(la,Ia);b.sidebar.createTooltip(na,Ia.root.children,+Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=ra?mxResources.get(ra):null,!0,new mxPoint(va,ta),!0,function(){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=za&&R(na,null,null,za,infoObj,clibs)},!0,!1)}}function D(){var la=document.createElement("div");la.style.position="absolute";la.style.overflow="visible";+la.style.left="8px";la.style.right="8px";la.style.bottom="8px";la.style.top="8px";mxUtils.write(la,mxResources.get("describeYourDiagram")+":");mxUtils.br(la);var va=document.createElement("input");va.setAttribute("type","text");va.setAttribute("placeholder",mxResources.get("processForHiringNewEmployee"));va.style.width="100%";va.style.marginTop="6px";va.style.marginBottom="4px";va.style.boxSizing="border-box";la.appendChild(va);la.init=function(){va.focus()};mxUtils.br(la);var ta=document.createElement("div");+ta.style.top="86px";ta.style.left="2px";ta.style.right="2px";ta.style.bottom="2px";ta.style.position="absolute";ta.style.border="1px solid #424242";var na=document.createElement("div");na.style.boxSizing="border-box";na.style.position="relative";na.style.textAlign="center";na.style.top="50%";mxUtils.write(na,mxResources.get("blankDiagram"));ta.appendChild(na);var ra=document.createElement("select");ra.className="geBtn";ra.style.maxWidth="160px";ra.style.marginLeft="0px";na=document.createElement("option");+mxUtils.write(na,mxResources.get("diagramType"));na.setAttribute("value","");ra.appendChild(na);for(var za=0;za<EditorUi.mermaidDiagramTypes.length;za++){na=document.createElement("option");var Ga=EditorUi.mermaidDiagramTypes[za],Ia=Ga;Ga==urlParams["smart-template-type"]&&na.setAttribute("selected","selected");"erDiagram"==Ia&&(Ia="entityRelationshipDiagram");Ia=mxResources.get(Ia,null,Ia.charAt(0).toUpperCase()+Ia.substring(1).replace(/[A-Z]/g," $&"));na.setAttribute("value",Ga);mxUtils.write(na,+Ia);ra.appendChild(na)}var Pa=mxUtils.button(mxResources.get("generate"),function(){var La=va.value,Na=ra.value.replace(/([A-Z])/g," $1").toLowerCase();La="Write the declaration code for a detailed and complex "+(""!=Na?Na:"graph")+' that shows "'+(""!=La?La:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Na=""!=ra.value?" ("+mxUtils.trim(mxUtils.getTextContent(ra.options[ra.selectedIndex]))+")":"";var Va="gantt"==ra.value||"pie"==ra.value||+"timeline"==ra.value||"quadrantchart"==ra.value||"c4context"==ra.value,Ma=va.value+Na;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Qa){Va||(ha=aa=Qa,xa="Smart Template: "+Ma)}));b.spinner.spin(document.body,mxResources.get("loading"))&&b.generateOpenAiMermaidDiagram(La,function(Qa,Ya,Ha,fb){b.spinner.stop();ta.innerHTML="";var Ta=document.createElement("img");Ta.setAttribute("title",Ma);Ta.src="data:image/svg+xml;base64,"+Ya.substring(Ya.indexOf(",")++1);Ta.style.cursor="pointer";Ta.style.width="100%";Ta.style.height="100%";ta.appendChild(Ta);Qa=b.createMermaidXml(Qa,EditorUi.defaultMermaidConfig,Ya,Ha,fb,Ma);var ib="<mxfile><diagram>"+Graph.compress(Qa)+"</diagram></mxfile>";if(Va||"undefined"===typeof mxMermaidToDrawio)ha=aa=Qa;Qa=L.cloneNode(!0);ta.appendChild(Qa);Ya=function(gb){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ha=function(gb){S||J(ib,mxEvent.getClientX(gb),mxEvent.getClientY(gb),Ta,Ma)};mxEvent.addGestureListeners(Ta,+Ya,null,Ha);mxEvent.addGestureListeners(Qa,Ya,null,Ha)},function(Qa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Qa)})});Pa.setAttribute("disabled","disabled");Pa.className="geBtn gePrimaryBtn";na=function(){window.setTimeout(function(){""!=va.value?Pa.removeAttribute("disabled"):Pa.setAttribute("disabled","disabled")},0)};za=urlParams["smart-template"];null!=za&&"1"!=za&&(va.value=decodeURIComponent(za),na(),"1"==urlParams["smart-template-generate"]&&+window.setTimeout(function(){Pa.click()},0));mxEvent.addListener(va,"change",na);mxEvent.addListener(va,"keydown",na);mxEvent.addListener(va,"cut",na);mxEvent.addListener(va,"paste",na);mxEvent.addListener(va,"keydown",function(La){13==La.keyCode&&Pa.click()});na=document.createElement("div");na.style.height="40px";na.style.marginTop="4px";na.style.marginBottom="4px";na.style.whiteSpace="nowrap";na.style.overflowX="auto";na.style.overflowY="hidden";na.appendChild(ra);na.appendChild(Pa);la.appendChild(na);+la.appendChild(ta);return la}function E(){null!=aa&&aa==ha&&EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"templateGenerated",label:xa});if(ia&&null!=g)f||b.hideDialog(),g(ia,oa,T.value);else if(c)f||b.hideDialog(),c(aa,T.value,pa,ca);else{var la=T.value;if(null!=la&&0<la.length){var va=function(na,ra,za){b.createFile(za,aa,null!=ca&&0<ca.length?ca:null,na,function(){b.hideDialog()},null,ra,null,null!=fa&&0<fa.length?fa:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ta=new SaveDialog(b,+la,mxUtils.bind(this,function(na,ra,za){va(ra,za,na.value)}),null,null,null,null,b.mode);b.showDialog(ta.container,420,150,!0,!1);ta.init()}else b.pickFolder(b.mode,function(na){va(b.mode,na,la)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function R(la,va,ta,na,ra,za,Ga){return da!=la?(null!=da&&(da.style.backgroundColor="transparent",da.style.border="2px solid transparent",0<da.getElementsByTagName("table").length&&(da.getElementsByTagName("table")[0].style.visibility=+"visible"),da==sa&&(sa.style.backgroundImage=Ea,sa.style.backgroundPosition="center center",sa.style.backgroundRepeat="no-repeat",sa.style.backgroundSize="contain",wa.style.visibility="hidden",Ca.style.visibility="hidden",Fa.style.visibility="hidden",Aa.style.visibility="hidden",Da.style.visibility=null!=ha?"visible":"hidden",sa.getElementsByTagName("table")[0].style.visibility="visible")),""!=la.style.backgroundImage&&0<la.getElementsByTagName("table").length&&(la.getElementsByTagName("table")[0].style.visibility=+"hidden"),la==sa&&(va=ha,null!=va?(Da.style.visibility="visible",Da.style.visibility=null!=ha?"visible":"hidden",Aa.style.visibility="visible"):(wa.style.visibility="visible",Ca.style.visibility="visible",Fa.style.visibility="visible",Aa.style.visibility="hidden",Da.style.visibility="hidden")),I.removeAttribute("disabled"),aa=va,ca=ta,fa=za,da=la,ia=na,pa=Ga,oa=ra,da.style.border=G,!0):!1}function V(){sa.style.backgroundImage="";sa.getElementsByTagName("table")[0].style.visibility="hidden";wa.style.visibility=+"visible";Ca.style.visibility="visible";Fa.style.visibility="visible";Aa.style.visibility="hidden";Da.style.visibility="hidden";wa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?wa.select():document.execCommand("selectAll",!1,null)}function Q(){wa.style.visibility="hidden";Ca.style.visibility="hidden";Fa.style.visibility="hidden";sa.style.backgroundImage=Ea;sa.style.backgroundSize="contain";Aa.style.visibility="visible";Da.style.visibility="visible"}function P(la){var va=mxUtils.trim(wa.value);+if(la||""==va)null!=xa&&(wa.value=xa,Q());else{wa.style.visibility="hidden";Ca.style.visibility="hidden";Fa.style.visibility="hidden";var ta=!1;la='Write a detailed and complex MermaidJS declaration for "'+(""!=va?va:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(na){na!=b.emptyDiagramXml&&(ta=!0,aa=na)}));sa.style.backgroundImage="url("+Editor.spinImage++")";sa.style.backgroundSize="12px 12px";b.generateOpenAiMermaidDiagram(la,function(na,ra,za,Ga){da==sa&&"hidden"==wa.style.visibility&&(Ea="url(data:image/svg+xml;base64,"+ra.substring(ra.indexOf(",")+1)+")",sa.setAttribute("title",va),ha=aa=na=ta?aa:b.createMermaidXml(na,EditorUi.defaultMermaidConfig,ra,za,Ga,va),xa=va,Q())},function(na){da==sa&&(wa.style.visibility="visible",Ca.style.visibility="visible",Fa.style.visibility="visible",Aa.style.visibility="visible",Da.style.visibility="visible",b.handleError(na))})}}+function q(la,va,ta,na,ra,za,Ga,Ia,Pa,La,Na,Va){function Ma(Oa,bb){null==fb?(Ta=Oa,Ta=/^https?:\/\//.test(Ta)?b.editor.isCorsEnabledForUrl(Ta)?Ta:PROXY_URL+"?url="+encodeURIComponent(Ta):TEMPLATE_PATH+"/"+Ta,mxUtils.get(Ta,mxUtils.bind(this,function(cb){200<=cb.getStatus()&&299>=cb.getStatus()&&(fb=cb.getText());bb(fb,Ta)}))):bb(fb,Ta)}function Qa(Oa,bb){if(null==la||N||b.sidebar.currentElt==Ha)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=O){var cb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='++O.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+O.naturalWidth+'" height="'+O.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";J(cb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ta,la)}else b.sidebar.currentElt=Ha,N=!0,Ma(la,function(hb){if(N&&b.sidebar.currentElt==Ha)try{J(hb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ha,bb)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}N=!1})}function Ya(){var Oa=document.createElement("table");+Oa.setAttribute("width","100%");Oa.setAttribute("height","100%");Oa.style.background="light-dark(rgba(255,255,255,0.85), transparent)";Oa.style.lineHeight="1.3em";Oa.style.border="none";var bb=document.createElement("tbody"),cb=document.createElement("tr"),hb=document.createElement("td");hb.setAttribute("align","center");hb.setAttribute("valign","middle");var Za=document.createElement("span");Za.style.display="inline-block";Za.style.padding="2px 8px";Za.style.userSelect="none";Za.style.borderRadius=+"8px";Za.style.background="rgba(255,255,255,0.7)";Za.style.overflow="hidden";Za.style.textOverflow="ellipsis";Za.style.maxWidth=ka-34+"px";mxUtils.write(Za,mxResources.get(ta,null,ta));hb.appendChild(Za);cb.appendChild(hb);bb.appendChild(cb);Oa.appendChild(bb);return Oa}var Ha=null;if("generative"!=Va||null==sa){Ha=document.createElement("div");Ha.className="geTemplate geAdaptiveAsset";Ha.style.backgroundOrigin="content-box";Ha.style.backgroundPosition="center center";Ha.style.backgroundRepeat="no-repeat";+Ha.style.backgroundSize="contain";Ha.style.boxSizing="border-box";Ha.style.borderRadius="12px";Ha.style.position="relative";Ha.style.height=ka+"px";Ha.style.width=Ba+"px";Ha.style.padding="4px";Ha.style.border="2px solid transparent";var fb=null,Ta=la;null!=ta?Ha.setAttribute("title",mxResources.get(ta,null,ta)):null!=na&&0<na.length&&Ha.setAttribute("title",na)}else Ha=sa;if(null!=za){Ha.style.display="inline-flex";Ha.style.justifyContent="center";Ha.style.alignItems="center";ra=document.createElement("img");+ra.setAttribute("src",za);ra.setAttribute("alt",na);ra.style.maxWidth=ka+"px";ra.style.maxHeight=Ba+"px";O=ra;var ib=za.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ha.appendChild(ra);ra.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){R(Ha,null,null,la,Ga,Na)}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){E();mxEvent.consume(Oa)})}else if(!La&&null!=la&&0<la.length){var gb=+function(Oa){z.spin(qa)&&Ma(la,function(bb,cb){z.stop();null!=bb&&(R(Ha,bb,va,null,null,Na,cb),Oa&&E())})};za=Pa||TEMPLATE_PATH+"/"+la.substring(0,la.length-4)+".png";Ha.style.backgroundImage="url("+za+")";null!=ta&&Ha.appendChild(Ya());mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){gb()}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){gb(!0);mxEvent.consume(Oa)})}else Ha.appendChild(Ya()),"generative"==Va&&null==sa&&(Ha.style.backgroundImage=Ea,Ha.style.overflow="visible",+Ha.appendChild(Da),Ha.appendChild(Aa),Ha.appendChild(wa),Ha.appendChild(Ca),Ha.appendChild(Fa),sa=Ha),ra&&R(Ha),null!=Ia?(mxEvent.addGestureListeners(Ha,null,null,mxUtils.bind(this,function(Oa){R(Ha,null,null,la,Ga)})),mxEvent.addListener(Ha,"click",Ia)):(mxEvent.addListener(Ha,"click",function(Oa){R(Ha,null,null,la,Ga)&&"generative"==Va&&null==ha&&V()}),mxEvent.addListener(Ha,"dblclick",function(Oa){"generative"!=Va?E():"hidden"==wa.style.visibility&&V();mxEvent.consume(Oa)}));null!=la&&(za=L.cloneNode(!0),+Ha.appendChild(za),mxEvent.addGestureListeners(za,mxUtils.bind(this,function(Oa){S=b.sidebar.currentElt==Ha}),null,null),mxEvent.addListener(za,"click",mxUtils.bind(this,function(Oa){S||Qa(Oa,null!=ta?ta:na);mxEvent.consume(Oa)})));qa.appendChild(Ha);return Ha}function y(){function la(Ma,Qa){Ma=mxResources.get(Ma,null,Ma.substring(0,1).toUpperCase()+Ma.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"…");return Ma+(null!=Qa?" ("+Qa.length+")":"")}function va(Ma,Qa,Ya){mxEvent.addListener(Qa,+"click",function(){Wa!=Qa&&(null!=Wa&&(Wa.style.backgroundColor=""),Wa=Qa,Wa.style.backgroundColor=p,qa.scrollTop=0,qa.innerText="",m=0,null!=Ja[Ma].content?(qa.appendChild(Ja[Ma].content),aa=ha,Ua=null,null!=Ja[Ma].content.init&&Ja[Ma].content.init()):(Ua=Ya?Ra[Ma][Ya]:Ja[Ma],W=null,A(!1)))});null!=urlParams["smart-template"]&&"smartTemplate"==Ma&&Qa.click()}db&&(db=!1,mxEvent.addListener(qa,"scroll",function(Ma){qa.scrollTop+qa.clientHeight>=qa.scrollHeight&&(A(),mxEvent.consume(Ma))}));if(0<ab){var ta=+document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,mxResources.get("custom"));ma.appendChild(ta);for(var na in Sa){var ra=document.createElement("div");ta=na;var za=Sa[na];18<ta.length&&(ta=ta.substring(0,18)+"…");ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ra.setAttribute("title",ta+" ("++za.length+")");mxUtils.write(ra,ra.getAttribute("title"));null!=H&&(ra.style.padding=H);ma.appendChild(ra);(function(Ma,Qa){mxEvent.addListener(ra,"click",function(){Wa!=Qa&&(Wa.style.backgroundColor="",Wa=Qa,Wa.style.backgroundColor=p,qa.scrollTop=0,qa.innerText="",m=0,Ua=Sa[Ma],W=null,A(!1))})})(na,ra)}ta=document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,"draw.io");ma.appendChild(ta)}for(na in Ja){ta=+za=null;if(null!=Ja[na].content)ra=document.createElement(Ga?"ul":"div"),ta=la(na),ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",ra.setAttribute("title",ta),mxUtils.write(ra,ta),ma.appendChild(ra),ta=ra;else{var Ga=Ra[na];ta=ra=document.createElement(Ga?"ul":"div");za=Ja[na];var Ia=la(na,za);if(null!=Ga){za=document.createElement("li");var Pa=document.createElement("div");+Pa.className="geTempTreeCaret";Pa.setAttribute("title",Ia);mxUtils.write(Pa,Ia);ta=Pa;za.appendChild(Pa);Ia=document.createElement("ul");Ia.className="geTempTreeNested";Ia.style.visibility="hidden";for(var La in Ga){var Na=document.createElement("li"),Va=la(La,Ga[La]);Na.setAttribute("title",Va);mxUtils.write(Na,Va);va(na,Na,La);Ia.appendChild(Na)}za.appendChild(Ia);ra.className="geTempTree";ra.appendChild(za);(function(Ma,Qa){mxEvent.addListener(Qa,"click",function(){Ma.style.visibility="visible";+Ma.classList.toggle("geTempTreeActive");Ma.classList.toggle("geTempTreeNested")&&setTimeout(function(){Ma.style.visibility="hidden"},550);Qa.classList.toggle("geTempTreeCaret-down")})})(Ia,Pa)}else ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",ra.setAttribute("title",Ia),mxUtils.write(ra,Ia);null!=H&&(ra.style.padding=H);ma.appendChild(ra)}va(na,ta);null==Wa&&ta.click()}A(!1)}+u=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;p=null!=p?p:"light-dark(#ebf2f9, "+Editor.darkColor+")";G=null!=G?G:"2px dashed light-dark(#29b6f2, #00a8ff)";F=null!=F?F:EditorUi.templateFile;var B=document.createElement("div");B.style.userSelect="none";B.style.height="100%";var C=document.createElement("div");C.style.whiteSpace="nowrap";C.style.height="46px";f&&B.appendChild(C);var M=document.createElement("img");M.setAttribute("border","0");M.setAttribute("align","absmiddle");M.style.width="40px";M.style.height="40px";M.style.marginRight="10px";M.style.paddingBottom="4px";M.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?-IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||u||!f||B.appendChild(M);f&&mxUtils.write(B,(u?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");M=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?M=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?M=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?M=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=-b.gitHub?M=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?M=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(M=b.trello.extension);var S=document.createElement("input");S.setAttribute("value",b.defaultFilename+M);S.style.marginLeft="10px";S.style.width=e||u?"144px":"244px";this.init=function(){f&&Editor.selectFilename(S);null!=pa.parentNode&&null!=pa.parentNode.parentNode&&mxEvent.addGestureListeners(pa.parentNode.parentNode,mxUtils.bind(this,function(la){null!=b.sidebar&&-b.sidebar.hideTooltip()}),null,null)};f&&(B.appendChild(S),v?S.style.width=e||u?"350px":"450px":null!=b.editor.diagramFileTypes&&(v=FilenameDialog.createFileTypes(b,S,b.editor.diagramFileTypes),v.style.marginLeft="6px",v.style.width=e||u?"80px":"180px",B.appendChild(v)));v=!1;var l=0,x=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),F=mxUtils.button(m||mxResources.get("create"),function(){F.setAttribute("disabled",-"disabled");K();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";var N=document.createElement("img");N.setAttribute("src",Editor.magnifyImage);N.setAttribute("title",mxResources.get("preview"));N.className="geAdaptiveAsset geActiveButton";N.style.position="absolute";N.style.borderRadius="16px";N.style.background="white";N.style.cursor="default";N.style.padding="2px";N.style.opacity="0.8";N.style.height="16px";N.style.right="2px";N.style.top="2px";var O=!1,Q=null,V=!1;if(L||G){var T=-[],W=null,X=null,Y=null,Z=function(la){F.setAttribute("disabled","disabled");for(var ya=0;ya<T.length;ya++)T[ya].className=ya==la?"geBtn gePrimaryBtn":"geBtn"};v=!0;m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="30px";A.appendChild(m);u=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){fa.style.display="";ra.style.display="";pa.style.left="160px";Z(0);pa.scrollTop=0;pa.innerText="";l=0;W!=Wa&&(Wa=W,Ia=X,Xa=Y,fa.innerText="",z(),W=null)});T.push(u);-m.appendChild(u);var aa=function(la){fa.style.display="none";ra.style.display="none";pa.style.left="30px";Z(la?-1:1);null==W&&(W=Wa);pa.scrollTop=0;pa.innerText="";x.spin(pa);var ya=function(ta,qa,ma){l=0;x.stop();Wa=ta;ma=ma||{};var za=0,Ja;for(Ja in ma)za+=ma[Ja].length;if(qa)pa.innerText=qa;else if(0==ta.length&&0==za)pa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(pa.innerText="",0<za){fa.style.display="";pa.style.left="160px";fa.innerText="";Xa=0;Ia={"draw.io":ta};-for(Ja in ma)Ia[Ja]=ma[Ja];z()}else y(!0)};la?G(ea.value,ya):L(ya)};L&&(u=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){aa()}),m.appendChild(u),T.push(u));if(G){u=document.createElement("span");u.style.marginLeft="10px";u.innerText=mxResources.get("search")+":";m.appendChild(u);var ea=document.createElement("input");ea.style.marginRight="10px";ea.style.marginLeft="10px";ea.style.width="220px";mxEvent.addListener(ea,"keypress",function(la){13==la.keyCode&&aa(!0)});m.appendChild(ea);-u=mxUtils.button(mxResources.get("search"),function(){aa(!0)});u.className="geBtn";m.appendChild(u)}Z(0)}var ca=null,da=null,ja=null,ba=null,ia=null,ka=null,ua=null,sa=null,ha=null,pa=document.createElement("div");pa.style.border="1px solid #d3d3d3";pa.style.position="absolute";pa.style.left="160px";pa.style.right="34px";m=(f?72:40)+(v?30:0);pa.style.top=m+"px";pa.style.bottom="68px";pa.style.margin="6px 0 0 -1px";pa.style.padding="6px";pa.style.overflow="auto";var ra=document.createElement("div");-ra.style.cssText="position:absolute;left:30px;width:128px;top:"+m+"px;height:22px;margin-top: 6px;white-space: nowrap;";var xa=document.createElement("input");xa.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";xa.setAttribute("placeholder",mxResources.get("search"));xa.setAttribute("type","text");ra.appendChild(xa);var wa=document.createElement("img");wa.setAttribute("src",Editor.magnifyImage);wa.setAttribute("title",mxResources.get("search"));-wa.className="geAdaptiveAsset";wa.style.position="relative";wa.style.cursor="pointer";wa.style.opacity="0.5";wa.style.height="16px";wa.style.left="-20px";wa.style.top="4px";wa.style.background="url('"+b.editor.transparentImage+"')";ra.appendChild(wa);mxEvent.addListener(wa,"click",function(){wa.getAttribute("src")!=Editor.magnifyImage&&(wa.setAttribute("src",Editor.magnifyImage),wa.setAttribute("title",mxResources.get("search")),xa.value="",null!=bb&&(bb.click(),bb=null));xa.focus()});mxEvent.addListener(xa,-"keydown",mxUtils.bind(this,function(la){if(13==la.keyCode){var ya=xa.value;if(""==ya)null!=bb&&(bb.click(),bb=null);else{if(null==NewDialog.tagsList[D]){var ta={};for(Ka in Ia)if(null==Ia[Ka].content)for(var qa=Ia[Ka],ma=0;ma<qa.length;ma++){var za=qa[ma];if(null!=za.tags)for(var Ja=za.tags.toLowerCase().split(";"),Ga=0;Ga<Ja.length;Ga++)null==ta[Ja[Ga]]&&(ta[Ja[Ga]]=[]),ta[Ja[Ga]].push(za)}NewDialog.tagsList[D]=ta}var La=ya.toLowerCase().split(" ");ta=NewDialog.tagsList[D];if(0<Xa&&null==ta.__tagsList__){for(Ka in Ta)for(qa=-Ta[Ka],ma=0;ma<qa.length;ma++)for(za=qa[ma],Ja=za.title.split(" "),Ja.push(Ka),Ga=0;Ga<Ja.length;Ga++){var Pa=Ja[Ga].toLowerCase();null==ta[Pa]&&(ta[Pa]=[]);ta[Pa].push(za)}ta.__tagsList__=!0}var Ka=[];qa={};for(ma=Ja=0;ma<La.length;ma++)if(0<La[ma].length){Pa=ta[La[ma]];var Ra={};Ka=[];if(null!=Pa)for(Ga=0;Ga<Pa.length;Ga++)za=Pa[Ga],0==Ja==(null==qa[za.url])&&(Ra[za.url]=!0,Ka.push(za));qa=Ra;Ja++}pa.scrollTop=0;pa.innerText="";l=0;ta=document.createElement("div");ta.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";-mxUtils.write(ta,mxResources.get(0==Ka.length?"noResultsFor":"resultsFor",[ya]));pa.appendChild(ta);null!=Sa&&null==bb&&(Sa.style.backgroundColor="",bb=Sa,Sa=ta);Wa=Ka;W=null;y(!1)}mxEvent.consume(la)}}));mxEvent.addListener(xa,"keyup",mxUtils.bind(this,function(la){""==xa.value?(wa.setAttribute("src",Editor.magnifyImage),wa.setAttribute("title",mxResources.get("search"))):(wa.setAttribute("src",Editor.crossImage),wa.setAttribute("title",mxResources.get("reset")))}));m+=23;var fa=document.createElement("div");-fa.style.cssText="position:absolute;left:30px;width:128px;top:"+m+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(pa,"scroll",function(){b.sidebar.hideTooltip()});var na=140,Aa=na,oa=null,Ea="url("+Editor.sparklesImage+")",va=document.createElement("textarea");va.setAttribute("placeholder",mxResources.get("describeYourDiagram"));va.style.position="absolute";va.style.fontFamily="sans-serif";va.style.outline="none";va.style.left="0px";va.style.right="0px";-va.style.top="0px";va.style.bottom="38px";va.style.resize="none";va.style.boxSizing="border-box";va.style.fontSize="12px";va.style.border="none";va.style.margin="8px";var Ca=document.createElement("button");Ca.className="geBtn gePrimaryBtn";Ca.style.position="absolute";Ca.style.bottom="0px";Ca.style.height="30px";Ca.style.right="0px";Ca.style.left="0px";Ca.style.margin="8px";Ca.style.fontSize="14px";Ca.style.borderRadius="4px";Ca.setAttribute("disabled","disabled");Ca.setAttribute("title",mxResources.get("ok"));-mxUtils.write(Ca,mxResources.get("ok"));var Fa=N.cloneNode(!0),Ma=!1;mxEvent.addGestureListeners(Fa,function(la){Ma=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(la){if(!Ma&&null!=sa){var ya="<mxfile><diagram>"+Graph.compress(sa)+"</diagram></mxfile>";C(ya,mxEvent.getClientX(la),mxEvent.getClientY(la),oa,ha)}});var Ba=N.cloneNode(!0);Ba.setAttribute("src",Editor.editImage);Ba.setAttribute("title",mxResources.get("edit"));Ba.style.right="";Ba.style.left="2px";var Da=-N.cloneNode(!0);Da.setAttribute("src",Editor.helpImage);Da.setAttribute("title",mxResources.get("help"));Da.style.opacity="1";Da.style.right="-8px";Da.style.top="-8px";mxEvent.addListener(Da,"click",function(la){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(la)});va.style.visibility="hidden";Ca.style.visibility="hidden";Ba.style.visibility="hidden";Da.style.visibility="hidden";Fa.style.visibility="hidden";mxEvent.addListener(Ba,"click",U);mxEvent.addListener(va,-"input",function(){""!=va.value?Ca.removeAttribute("disabled"):Ca.setAttribute("disabled","disabled")});mxEvent.addListener(Ca,"click",function(){R()});mxEvent.addListener(va,"keydown",function(la){13!=la.keyCode||mxEvent.isShiftDown(la)?27==la.keyCode&&(R(!0),mxEvent.consume(la)):(R(),mxEvent.consume(la))});var Ia={},Va={},Ta={},Xa=0,jb=!0,Sa=null,bb=null;Ia.basic=[{title:"blankDiagram"}];var Wa=Ia.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==-typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ia.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ia.smartTemplate={content:I()});if(!e){var cb=function(){mxUtils.get(db,function(la){if(!hb){hb=!0;la=la.getXml().documentElement.firstChild;for(var ya={};null!=la;){if("undefined"!==typeof la.getAttribute)if("parsererror"==la.nodeName)null!=window.console&&-console.log("Parser error in "+D+": "+la.textContent);else if("clibs"==la.nodeName){for(var ta=la.getAttribute("name"),qa=la.getElementsByTagName("add"),ma=[],za=0;za<qa.length;za++)ma.push(encodeURIComponent(mxUtils.getTextContent(qa[za])));null!=ta&&0<ma.length&&(ya[ta]=ma.join(";"))}else if(ma=la.getAttribute("url"),null!=ma){qa=la.getAttribute("section");ta=la.getAttribute("subsection");if(null==qa&&(za=ma.indexOf("/"),qa=ma.substring(0,za),null==ta)){var Ja=ma.indexOf("/",za+1);-1<Ja&&(ta=ma.substring(za+-1,Ja))}za=Ia[qa];null==za&&(za=[],Ia[qa]=za);ma=la.getAttribute("clibs");null!=ya[ma]&&(ma=ya[ma]);ma={url:la.getAttribute("url"),libs:la.getAttribute("libs"),title:la.getAttribute("title"),tooltip:la.getAttribute("name")||la.getAttribute("url"),preview:la.getAttribute("preview"),clibs:ma,tags:la.getAttribute("tags")};za.push(ma);null!=ta&&(za=Va[qa],null==za&&(za={},Va[qa]=za),qa=za[ta],null==qa&&(qa=[],za[ta]=qa),qa.push(ma))}la=la.nextSibling}x.stop();z()}})};A.appendChild(ra);A.appendChild(fa);-A.appendChild(pa);var hb=!1,db=D;/^https?:\/\//.test(db)&&!b.editor.isCorsEnabledForUrl(db)&&(db=PROXY_URL+"?url="+encodeURIComponent(db));x.spin(pa);null!=t?t(function(la,ya){Ta=la;Y=Xa=ya;cb()},cb):cb();X=Ia}mxEvent.addListener(S,"keypress",function(la){b.dialog.container.firstChild==A&&13==la.keyCode&&K()});t=document.createElement("div");t.style.marginTop=e?"4px":"16px";t.style.textAlign="right";t.style.position="absolute";t.style.left="40px";t.style.bottom="24px";t.style.right="40px";m=mxUtils.button(mxResources.get("cancel"),-function(){null!=p&&p();b.hideDialog(!0)});m.className="geBtn";!b.editor.cancelFirst||k&&null==p||t.appendChild(m);e||"1"==urlParams.embed||k||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var la=new FilenameDialog(b,"",mxResources.get("create"),function(ya){null!=ya&&0<ya.length&&b.editor.loadUrl(b.editor.getProxiedUrl(ya),function(ta){ja=ta;ca=null;templateRealURl=ya;b.hideDialog();K()},function(ta){b.handleError(ta)})},-mxResources.get("url"),null,null,null,!1);b.showDialog(la.container,300,80,!0,!0);la.init()}),e.className="geBtn",t.appendChild(e));Graph.fileSupport&&g&&(g=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var la=document.createElement("input");la.setAttribute("multiple","multiple");la.setAttribute("type","file");mxEvent.addListener(la,"change",function(ya){b.openFiles(la.files,!0);la.value=""});la.style.display="none";document.body.appendChild(la);b.newDlgFileInputElt=-la}b.newDlgFileInputElt.click()}),g.className="geBtn",t.appendChild(g));t.appendChild(F);b.editor.cancelFirst||null!=c||k&&null==p||t.appendChild(m);A.appendChild(t);this.container=A};NewDialog.tagsList={};-var SaveDialog=function(b,e,f,c,k,p,q,u){function E(A,B,M,S,l,x){var F=null;if(null==c||0>mxUtils.indexOf(c,A))if(l=null!=l?l:b.getTitleForService(A),0<=mxUtils.indexOf(U,A)||null!=b.getServiceForName(A)){F=document.createElement("option");if("pick"==x)F.innerHTML=mxUtils.htmlEntities(l)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",F.setAttribute("value","pickFolder-"+A),F.setAttribute("title",l+" - "+mxResources.get("pickFolder")+"...");else{var N=A+-(null!=M?"-"+M:""),O=n[N];null!=O&&null!=O.option&&O.option.parentNode.removeChild(O.option);O=null;if(null!=B){"/"==B.charAt(B.length-1)&&(B=B.substring(0,B.length-1));"/"==B.charAt(0)&&(B=B.substring(1));O=B;if(A!=App.MODE_GITHUB&&A==App.MODE_GITLAB){var Q=O.lastIndexOf("/");0<=Q&&(O=O.substring(Q+1))}40<O.length&&(O=O.substring(0,20)+"..."+O.substring(O.length-20))}F.innerHTML=mxUtils.htmlEntities(l)+(null!=O?" – "+mxUtils.htmlEntities(O):"");F.setAttribute("title",l+-(null!=B?" ("+B+")":"")+(null!=M&&decodeURIComponent(M)!=B?" ["+M+"]":""));F.setAttribute("value",N);n[N]={option:F,mode:A,path:B,id:M};SaveDialog.lastValue==N&&null==u?S=!0:null==S&&("root"==x?S=null==u&&b.mode==A||null!=A&&A==u:"pickFolder-"==K.value.substring(0,11)&&(S=!0));S&&F.setAttribute("selected","selected")}K.appendChild(F)}return F}function H(A){b.pickFolder(A,function(B){var M=null;A==App.MODE_GOOGLE&&null!=B.docs&&0<B.docs.length?M={mode:A,path:B.docs[0].name,id:B.docs[0].id}:A==App.MODE_ONEDRIVE&&-null!=B.value&&0<B.value.length?M={mode:A,path:B.value[0].name,id:OneDriveFile.prototype.getIdOf(B.value[0])}:(A==App.MODE_GITHUB||A==App.MODE_GITLAB)&&null!=B&&0<B.length&&(M={mode:A,path:decodeURIComponent(B),id:B});null!=M&&(J.style.display="",b.addRecent(M,"Folders",5),B=E(M.mode,M.path,M.id,!0),K.innerHTML="",n={},D(),M=K.selectedIndex,K.value=B.value,0>K.selectedIndex&&(K.selectedIndex=M))},!0,!0,!0,!0)}function D(){var A=b.getRecent("Folders"),B=0;if(null!=A&&0<A.length){for(var M=0;M<A.length;M++)null!=-E(A[M].mode,A[M].path,A[M].id)&&B++;0<B&&K.appendChild(P.cloneNode(!0))}E(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");E(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(E(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),E(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&E(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);E(App.MODE_GITHUB,null,null,null,null,"pick");E(App.MODE_GITLAB,null,-null,null,null,"pick");E(App.MODE_TRELLO);A=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&A&&E(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=c&&0<=mxUtils.indexOf(c,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&E(App.MODE_BROWSER);A&&E("download");Editor.popupsAllowed&&E("_blank",null,null,null,mxResources.get("openInNewWindow"));0<B&&(K.appendChild(P.cloneNode(!0)),B=K.value,K.appendChild(J),-K.value=B);if("pickFolder-"==K.value.substring(0,11)||"reset"==K.value)B=document.createElement("option"),B.setAttribute("value",""),B.setAttribute("selected","selected"),mxUtils.write(B,mxResources.get("pickFolder")+"..."),K.insertBefore(B,K.firstChild);R=K.value}function L(){if("reset"==K.value)b.resetRecent("Folders"),K.innerHTML="",K.value="",pickFolderOption=null,n={},D();else if("pickFolder-"==K.value.substring(0,11)){var A=K.value.substring(11);K.value=R;H(A)}else if(null!=I&&null!=n[K.value]&&-null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[I.value].extension){A=b.getExtensionForService(n[K.value].mode);var B=C.value;null!=A&&0>e.indexOf(".")&&0>B.indexOf(".")&&(C.value=B+A)}z.innerHTML="";mxUtils.write(z,mxResources.get("download"==K.value||"_blank"==K.value?"ok":"save"));""==K.value?z.setAttribute("disabled","disabled"):z.removeAttribute("disabled")}var G=document.createElement("div");G.style.display="flex";G.style.flexWrap="wrap";G.style.whiteSpace="nowrap";var d=-document.createElement("div");d.style.display="grid";d.style.gap="5px 8px";d.style.gridAutoRows="auto auto 44px";d.style.gridAutoColumns="0fr minmax(0,1fr)";d.style.width="100%";var g=null,m=null;if(null!=k&&null!=p&&"image/"==p.substring(0,6)&&("image/svg"!=p.substring(0,9)||mxClient.IS_SVG)){d.style.display="inline-grid";d.style.flexBasis="75%";g=document.createElement("div");g.style.display="inline-block";g.style.height="auto";g.style.maxWidth="25%";g.style.margin="auto";var t=document.createElement("img"),-v=q?k:btoa(unescape(encodeURIComponent(k)));t.setAttribute("src","data:"+p+";base64,"+v);t.style.boxSizing="border-box";t.style.maxHeight="50px";t.style.maxWidth="100%";t.style.paddingLeft="10px";g.appendChild(t);mxClient.IS_FF||"image/png"!=p||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(m=mxUtils.button(mxResources.get("copy"),function(){var A=b.base64ToBlob(v,"image/png");A=new ClipboardItem({"image/png":A,"text/html":new Blob(['<img src="data:'+p+";base64,"+v+'">'],{type:"text/html"})});-navigator.clipboard.write([A]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(B){b.handleError(B)}))},null,"geBtn"));Editor.popupsAllowed&&(null==c||0>mxUtils.indexOf(c,"_blank"))?(g.setAttribute("title",mxResources.get("openInNewWindow")),g.style.cursor="pointer",mxEvent.addGestureListeners(g,null,null,function(A){mxEvent.isPopupTrigger(A)||b.openInNewWindow(k,p,q)})):g.setAttribute("title",mxResources.get("preview"))}t=document.createElement("div");-t.style.display="flex";t.style.padding="1px";t.style.alignItems="center";t.style.justifyContent="flex-end";t.style.gridColumn="1";t.style.whiteSpace="nowrap";var y=document.createElement("div");y.style.display="grid";y.style.padding="1px";y.style.alignItems="center";y.style.gridColumn="2";y.style.gridAutoColumns="minmax(0,1fr) auto";y.style.gap="6px";mxUtils.write(t,mxResources.get("saveAs")+":");var C=document.createElement("input");C.setAttribute("type","text");C.setAttribute("value",e);C.style.boxSizing=-"border-box";C.style.width="100%";y.appendChild(C);d.appendChild(t);d.appendChild(y);var I=null;null!=b.editor.diagramFileTypes&&null==p&&(t=t.cloneNode(!1),y=y.cloneNode(!1),mxUtils.write(t,mxResources.get("type")+":"),I=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),I.style.boxSizing="border-box",I.style.width="100%",y.appendChild(I),d.appendChild(t),d.appendChild(y));t=t.cloneNode(!1);y=y.cloneNode(!1);mxUtils.write(t,mxResources.get("where")+":");var K=document.createElement("select");-K.style.textOverflow="ellipsis";K.style.gridColumn="1";var J=document.createElement("option");mxUtils.write(J,mxResources.get("reset"));J.setAttribute("value","reset");var U=["browser","device","download","_blank"],P=document.createElement("option");P.setAttribute("disabled","disabled");P.innerHTML="-----------------";var R=null,n={},z=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=K.value;var A=n[SaveDialog.lastValue];null!=A&&f(C,A.mode,A.id)},null,"geBtn gePrimaryBtn");-mxEvent.addListener(C,"keypress",function(A){13==A.keyCode&&z.click()});mxEvent.addListener(K,"change",L);D();L();y.appendChild(K);null!=SaveDialog.lastValue&&null!=n[SaveDialog.lastValue]&&(K.value=SaveDialog.lastValue);d.appendChild(t);d.appendChild(y);G.appendChild(d);null!=g&&G.appendChild(g);d=document.createElement("div");d.style.flexBasis="100%";d.style.textAlign="right";d.style.marginTop=null!=p?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||d.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));-g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&d.appendChild(g);null!=m&&d.appendChild(m);d.appendChild(z);b.editor.cancelFirst||d.appendChild(g);G.appendChild(d);this.init=function(){Editor.selectFilename(C)};this.container=G},CreateDialog=function(b,e,f,c,k,p,q,u,E,H,D,L,G,d,g,m,t){function v(R,n,z,A){function B(){mxEvent.addListener(M,"click",function(){var N=z;if(q){var O=I.value,Q=O.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>Q){N=null!=-N?N:P.value;var V="";N==App.MODE_GOOGLE?V=b.drive.extension:N==App.MODE_GITHUB?V=b.gitHub.extension:N==App.MODE_GITLAB?V=b.gitLab.extension:N==App.MODE_TRELLO?V=b.trello.extension:N==App.MODE_DROPBOX?V=b.dropbox.extension:N==App.MODE_ONEDRIVE?V=b.oneDrive.extension:N==App.MODE_DEVICE&&(V=".drawio");0<=Q&&(O=O.substring(0,Q));I.value=O+V}}y(z)})}var M=document.createElement("a");M.style.overflow="hidden";var S=document.createElement("img");S.src=R;S.setAttribute("border","0");S.setAttribute("align",-"absmiddle");S.style.width="60px";S.style.height="60px";S.style.paddingBottom="6px";M.style.display="inline-block";M.className="geBaseButton";M.style.position="relative";M.style.margin="4px";M.style.padding="8px 8px 10px 8px";M.style.whiteSpace="nowrap";M.appendChild(S);M.style.color="gray";M.style.fontSize="11px";var l=document.createElement("div");M.appendChild(l);mxUtils.write(l,n);if(null!=A&&null==b[A]){S.style.visibility="hidden";mxUtils.setOpacity(l,10);var x=new Spinner({lines:12,length:12,-width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});x.spin(M);var F=window.setTimeout(function(){null==b[A]&&(x.stop(),M.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[A]&&(window.clearTimeout(F),mxUtils.setOpacity(l,100),S.style.visibility="",x.stop(),B())}))}else B();J.appendChild(M);++U==L&&(mxUtils.br(J),U=0)}function y(R){var n=I.value;if(null==R||null!=n&&0<n.length)t&&b.hideDialog(),-f(n,R,I)}D="1"==urlParams.noDevice?!1:D;q=null!=q?q:!0;u=null!=u?u:!0;L=null!=L?L:4;t=null!=t?t:!0;p=document.createElement("div");p.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(p);var C=document.createElement("h2");mxUtils.write(C,k||mxResources.get("create"));C.style.marginTop="0px";C.style.marginBottom="24px";p.appendChild(C);k=document.createElement("span");mxUtils.write(k,mxResources.get("filename")+":");k.style.maxWidth="106px";k.style.overflow="hidden";k.style.textOverflow="ellipsis";-k.style.display="inline-block";p.appendChild(k);var I=document.createElement("input");I.setAttribute("value",e);I.style.width="180px";I.style.marginLeft="10px";I.style.marginBottom="20px";I.style.maxWidth="70%";this.init=function(){Editor.selectFilename(I)};p.appendChild(I);null!=m&&null!=b.editor.diagramFileTypes&&(m=FilenameDialog.createFileTypes(b,I,b.editor.diagramFileTypes),m.style.marginLeft="6px",m.style.width="90px",p.appendChild(m));m=null;if("1"!=urlParams.noDevice&&null!=G&&null!=d&&"image/"==-d.substring(0,6)&&("image/svg"!=d.substring(0,9)||mxClient.IS_SVG)){I.style.width="160px";k=document.createElement("img");var K=g?G:btoa(unescape(encodeURIComponent(G)));k.setAttribute("src","data:"+d+";base64,"+K);k.style.position="absolute";k.style.top="70px";k.style.right="100px";k.style.maxWidth="120px";k.style.maxHeight="80px";mxUtils.setPrefixedStyle(k.style,"transform","translate(50%,-50%)");p.appendChild(k);mxClient.IS_FF||"image/png"!=d||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||-(m=mxUtils.button(mxResources.get("copy"),function(R){R=b.base64ToBlob(K,"image/png");R=new ClipboardItem({"image/png":R,"text/html":new Blob(['<img src="data:'+d+";base64,"+K+'">'],{type:"text/html"})});navigator.clipboard.write([R]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(n){b.handleError(n)}))}),m.style.marginTop="6px",m.className="geBtn");E&&Editor.popupsAllowed&&(k.style.cursor="pointer",mxEvent.addGestureListeners(k,-null,null,function(R){mxEvent.isPopupTrigger(R)||y("_blank")}))}mxUtils.br(p);var J=document.createElement("div");J.style.textAlign="center";var U=0;J.style.marginTop="6px";p.appendChild(J);var P=document.createElement("select");P.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(G=document.createElement("option"),G.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(G,mxResources.get("googleDrive")),P.appendChild(G),v(IMAGE_PATH+"/google-drive-logo.svg",-mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(G=document.createElement("option"),G.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(G,mxResources.get("oneDrive")),P.appendChild(G),b.mode==App.MODE_ONEDRIVE&&G.setAttribute("selected","selected"),v(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(G=document.createElement("option"),G.setAttribute("value",App.MODE_DROPBOX),-mxUtils.write(G,mxResources.get("dropbox")),P.appendChild(G),b.mode==App.MODE_DROPBOX&&G.setAttribute("selected","selected"),v(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(G=document.createElement("option"),G.setAttribute("value",App.MODE_GITHUB),mxUtils.write(G,mxResources.get("github")),P.appendChild(G),v(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(G=document.createElement("option"),-G.setAttribute("value",App.MODE_GITLAB),mxUtils.write(G,mxResources.get("gitlab")),P.appendChild(G),v(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(G=document.createElement("option"),G.setAttribute("value",App.MODE_TRELLO),mxUtils.write(G,mxResources.get("trello")),P.appendChild(G),v(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||-null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)G=document.createElement("option"),G.setAttribute("value",App.MODE_DEVICE),mxUtils.write(G,mxResources.get("device")),P.appendChild(G),b.mode!=App.MODE_DEVICE&&u||G.setAttribute("selected","selected"),D&&v(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);u&&isLocalStorage&&"0"!=urlParams.browser&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_BROWSER),mxUtils.write(u,mxResources.get("browser")),P.appendChild(u),-b.mode==App.MODE_BROWSER&&u.setAttribute("selected","selected"),v(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));u=document.createElement("div");u.style.marginTop="26px";u.style.textAlign="center";null!=H&&(D=mxUtils.button(mxResources.get("help"),function(){b.openLink(H)}),D.className="geBtn",u.appendChild(D));D=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});-D.className="geBtn";b.editor.cancelFirst&&null==c&&u.appendChild(D);null==c&&(G=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),G.className="geBtn",u.appendChild(G));E&&Editor.popupsAllowed&&(E=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),E.className="geBtn",u.appendChild(E));CreateDialog.showDownloadButton&&(E=mxUtils.button(mxResources.get("download"),function(){y("download")}),E.className="geBtn",u.appendChild(E),null!=m&&(E.style.marginTop="6px",-u.style.marginTop="6px"));null!=m&&(mxUtils.br(u),u.appendChild(m));b.editor.cancelFirst&&null==c||u.appendChild(D);mxEvent.addListener(I,"keypress",function(R){13==R.keyCode?y(App.MODE_DEVICE):27==R.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});p.appendChild(u);this.container=p};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;-var PopupDialog=function(b,e,f,c,k){k=null!=k?k:!0;var p=document.createElement("div");p.style.textAlign="left";p.style.height="100%";mxUtils.write(p,mxResources.get("fileOpenLocation"));mxUtils.br(p);mxUtils.br(p);var q=mxUtils.button(mxResources.get("openInThisWindow"),function(){k&&b.hideDialog();null!=c&&c()});q.className="geBtn";q.style.marginBottom="8px";q.style.width="280px";p.appendChild(q);mxUtils.br(p);var u=mxUtils.button(mxResources.get("openInNewWindow"),function(){k&&b.hideDialog();-null!=f&&f();b.openLink(e,null,!0)});u.className="geBtn gePrimaryBtn";u.style.width=q.style.width;p.appendChild(u);mxUtils.br(p);mxUtils.br(p);mxUtils.write(p,mxResources.get("allowPopups"));this.container=p},ImageDialog=function(b,e,f,c,k,p,q,u){function E(){0<L.value.length?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled");"data:"!=L.value.substring(0,5)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}p=null!=p?p:!0;var H=b.editor.graph,D=document.createElement("div");-mxUtils.write(D,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";e.style.paddingRight="20px";var L=document.createElement("input");L.setAttribute("value",f);L.setAttribute("type","text");L.setAttribute("spellcheck","false");L.setAttribute("autocorrect","off");L.setAttribute("autocomplete","off");L.setAttribute("autocapitalize","off");L.style.marginTop=-"6px";L.style.width=(Graph.fileSupport?460:340)-20+"px";L.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";L.style.backgroundRepeat="no-repeat";L.style.backgroundPosition="100% 50%";L.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display="inline-block";f.style.top="3px";f.style.background="url('"+b.editor.transparentImage+-"')";mxEvent.addListener(f,"click",function(){L.value="";L.focus()});e.appendChild(L);e.appendChild(f);D.appendChild(e);var G=u,d,g,m=function(I,K,J,U){var P="data:"==I.substring(0,5);!b.isOffline()||P&&"undefined"===typeof chrome?0<I.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(I,function(R){b.spinner.stop();b.hideDialog();var n=!1===U?1:null!=K&&null!=J?Math.max(K/R.width,J/R.height):Math.min(1,Math.min(520/R.width,520/R.height));p&&(I=b.convertDataUri(I));c(I,-Math.round(Number(R.width)*n),Math.round(Number(R.height)*n),G,d,g)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(I,null,null,G,d,g)):(I=b.convertDataUri(I),K=null==K?120:K,J=null==J?100:J,b.hideDialog(),c(I,K,J,G,d,g))},t=function(I,K){if(null!=I){var J=k?null:H.getModel().getGeometry(H.getSelectionCell());null!=J?m(I,J.width,J.height,K):m(I,null,null,K)}else b.hideDialog(),c(null)};this.init=function(){L.focus();-if(Graph.fileSupport){L.setAttribute("placeholder",mxResources.get("dragImagesHere"));var I=D.parentNode,K=null;mxEvent.addListener(I,"dragleave",function(J){null!=K&&(K.parentNode.removeChild(K),K=null);J.stopPropagation();J.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(J){null==K&&(!mxClient.IS_IE||10<document.documentMode)&&(K=b.highlightElement(I));J.stopPropagation();J.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(J){null!=K&&(K.parentNode.removeChild(K),-K=null);if(0<J.dataTransfer.files.length)b.importFiles(J.dataTransfer.files,0,0,b.maxImageSize,function(P,R,n,z,A,B,M,S){t(P,S)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var R=0;R<P.length;R++)P[R]()},!mxEvent.isControlDown(J),null,null,!0);else if(0<=mxUtils.indexOf(J.dataTransfer.types,"text/uri-list")){var U=J.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&t(decodeURIComponent(U))}J.stopPropagation();J.preventDefault()}),-!1)}};u=document.createElement("div");u.style.marginTop="14px";u.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&u.appendChild(f);ImageDialog.filePicked=function(I){I.action==google.picker.Action.PICKED&&null!=I.docs[0].thumbnails&&(I=I.docs[0].thumbnails[I.docs[0].thumbnails.length-1],null!=I&&(L.value=I.url));L.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var v=document.createElement("input");-v.setAttribute("multiple","multiple");v.setAttribute("type","file");mxEvent.addListener(v,"change",function(I){null!=v.files&&(b.importFiles(v.files,0,0,b.maxImageSize,function(K,J,U,P,R,n){t(K)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var J=0;J<K.length;J++)K[J]()},!0),v.type="",v.type="file",v.value="")});v.style.display="none";document.body.appendChild(v);b.imgDlgFileInputElt=v}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});-e.className="geBtn";u.appendChild(e)}mxEvent.addListener(L,"keypress",function(I){13==I.keyCode&&t(L.value)});var y=mxUtils.button(mxResources.get("crop"),function(){var I=new CropImageDialog(b,L.value,G,function(K,J,U){G=K;d=J;g=U});b.showDialog(I.container,300,390,!0,!0)});q&&(y.className="geBtn",u.appendChild(y));var C=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=L.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var I=b.editor.createImageUrlConverter().convert(L.value),-K=new Image;K.onload=function(){b.editor.convertImageToDataUri(I,function(J){b.confirmImageResize(function(U){b.resizeImage(K,J,mxUtils.bind(this,function(P,R,n){b.spinner.stop();null!=P&&P.length<b.maxImageBytes?(L.value=P,E()):b.handleError({message:mxResources.get("imageTooBig")})}),U,b.maxImageSize)},K.width>b.maxImageSize||K.height>b.maxImageSize||J.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};K.onerror=function(){b.spinner.stop();-b.handleError({message:mxResources.get("fileNotFound")})};K.src=I}});C.className="geBtn";mxEvent.addListener(L,"change",function(I){G=null;E()});E();u.appendChild(C);q=mxUtils.button(mxResources.get("apply"),function(){t(L.value)});q.className="geBtn gePrimaryBtn";u.appendChild(q);b.editor.cancelFirst||u.appendChild(f);Graph.fileSupport&&(u.style.marginTop="120px",D.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",D.style.backgroundPosition="center 65%",D.style.backgroundRepeat="no-repeat",-q=document.createElement("div"),q.style.position="absolute",q.style.width="420px",q.style.top="58%",q.style.textAlign="center",q.style.fontSize="18px",q.style.color="#a0c3ff",mxUtils.write(q,mxResources.get("dragImagesHere")),D.appendChild(q));D.appendChild(u);this.container=D},LinkDialog=function(b,e,f,c,k,p,q){function u(I,K){var J=document.createElement("option");mxUtils.write(J,mxResources.get(I));J.value=I;y.appendChild(J);C[I]=K}var E=document.createElement("div");E.style.height="100%";mxUtils.write(E,-mxResources.get("editLink")+":");var H=document.createElement("div");H.className="geTitle";H.style.backgroundColor="transparent";H.style.borderColor="transparent";H.style.whiteSpace="nowrap";H.style.textOverflow="clip";H.style.cursor="default";var D=document.createElement("input");D.setAttribute("placeholder",mxResources.get("dragUrlsHere"));D.setAttribute("type","text");D.style.marginTop="6px";D.style.width="414px";D.style.boxSizing="border-box";D.style.backgroundImage="url('"+Dialog.prototype.clearImage+-"')";D.style.backgroundRepeat="no-repeat";D.style.backgroundPosition="100% 50%";D.style.paddingRight="14px";D.style.marginBottom="4px";var L=document.createElement("div");L.setAttribute("title",mxResources.get("reset"));L.style.position="relative";L.style.left="-16px";L.style.width="12px";L.style.height="14px";L.style.cursor="pointer";L.style.display="inline-block";L.style.top="3px";L.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(L,"click",function(){D.value="";D.focus()});-var G=document.createElement("input");G.style.cssText="margin-right:8px;margin-bottom:8px;";G.setAttribute("value","url");G.setAttribute("type","radio");G.setAttribute("name","geLinkDialogOption");var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","url");d.setAttribute("type","radio");d.setAttribute("name","geLinkDialogOption");var g=document.createElement("select");g.style.width="414px";var m=document.createElement("input");m.setAttribute("type",-"checkbox");m.style.margin="0 6p 0 6px";null!=q&&(m.setAttribute("checked","checked"),m.defaultChecked=!0);q=null!=q?q:"_blank";m.setAttribute("title",q);p&&(D.style.width="200px");if(k&&null!=b.pages){null!=e&&Graph.isPageLink(e)?(d.setAttribute("checked","checked"),d.defaultChecked=!0):(D.setAttribute("value",e),G.setAttribute("checked","checked"),G.defaultChecked=!0);H.appendChild(G);H.appendChild(D);H.appendChild(L);p&&(H.appendChild(m),mxUtils.write(H,mxResources.get("openInNewWindow")));mxUtils.br(H);-H.appendChild(d);k=!1;for(p=0;p<b.pages.length;p++)L=document.createElement("option"),mxUtils.write(L,b.pages[p].getName()||mxResources.get("pageWithNumber",[p+1])),L.setAttribute("value","data:page/id,"+b.pages[p].getId()),e==L.getAttribute("value")&&(L.setAttribute("selected","selected"),k=!0),g.appendChild(L);if(!k&&d.checked){var t=document.createElement("option");mxUtils.write(t,mxResources.get("pageNotFound"));t.setAttribute("disabled","disabled");t.setAttribute("selected","selected");t.setAttribute("value",-"pageNotFound");g.appendChild(t);mxEvent.addListener(g,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}H.appendChild(g)}else D.setAttribute("value",e),H.appendChild(D),H.appendChild(L);E.appendChild(H);var v=mxUtils.button(f,function(){b.hideDialog();c(d.checked?"pageNotFound"!==g.value?g.value:e:D.value,LinkDialog.selectedDocs,m.checked?q:null)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=function(){d.checked?g.focus():(D.focus(),mxClient.IS_GC||-mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(g,"focus",function(){G.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(D,"focus",function(){d.removeAttribute("checked");G.setAttribute("checked","checked");G.checked=!0});if(Graph.fileSupport){var I=E.parentNode,K=null;mxEvent.addListener(I,"dragleave",function(J){null!=K&&(K.parentNode.removeChild(K),K=null);J.stopPropagation();J.preventDefault()});-mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(J){null==K&&(!mxClient.IS_IE||10<document.documentMode)&&(K=b.highlightElement(I));J.stopPropagation();J.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(J){try{null!=K&&(K.parentNode.removeChild(K),K=null),0<=mxUtils.indexOf(J.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(J.dataTransfer.getData("text/uri-list")),G.setAttribute("checked","checked"),G.checked=!0,v.click())}catch(U){b.handleError(U)}J.stopPropagation();-J.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="right";b.isOffline()||f.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));H=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});H.style.verticalAlign="middle";H.className="geBtn";b.editor.cancelFirst&&f.appendChild(H);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(I){if(I.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=I.docs;-var K=I.docs[0].url;"application/mxe"==I.docs[0].mimeType||null!=I.docs[0].mimeType&&"application/vnd.jgraph."==I.docs[0].mimeType.substring(0,23)?K="https://www.draw.io/#G"+I.docs[0].id:"application/vnd.google-apps.folder"==I.docs[0].mimeType&&(K="https://drive.google.com/#folders/"+I.docs[0].id);D.value=K;D.focus()}else LinkDialog.selectedDocs=null;D.focus()};var y=document.createElement("select");y.className="geBtn";y.style.position="relative";y.style.top="1px";y.style.maxWidth="120px";var C={};-k=document.createElement("option");mxUtils.write(k,mxResources.get("select")+"...");k.value="";y.appendChild(k);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&u("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var I=b.drive.createLinkPicker();b.linkPicker=I.setCallback(function(K){LinkDialog.filePicked(K)}).build()}b.linkPicker.setVisible(!0)}))});-"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&u("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(I){D.value=I[0].link;D.focus()}})});null!=b.oneDrive&&u("oneDrive",function(){b.oneDrive.pickFile(function(I,K){null!=K&&null!=K.value&&0<K.value.length&&(D.value=K.value[0].webUrl,D.focus())},!0)});null!=b.gitHub&&u("github",function(){b.gitHub.pickFile(function(I){if(null!=I){I=I.split("/");var K=I[0],J=I[1],U=I[2];I=I.slice(3,I.length).join("/");-D.value="https://github.com/"+K+"/"+J+"/blob/"+U+"/"+I;D.focus()}})});null!=b.gitLab&&u("gitlab",function(){b.gitLab.pickFile(function(I){if(null!=I){I=I.split("/");var K=I[0],J=I[1],U=I[2];I=I.slice(3,I.length).join("/");D.value=DRAWIO_GITLAB_URL+"/"+K+"/"+J+"/blob/"+U+"/"+I;D.focus()}})});1<y.children.length&&(f.appendChild(y),mxEvent.addListener(y,"change",function(I){null!=C[y.value]&&(C[y.value](),y.value="")}));mxEvent.addListener(D,"keypress",function(I){13==I.keyCode&&v.click()});f.appendChild(v);-b.editor.cancelFirst||f.appendChild(H);E.appendChild(f);this.container=E},FeedbackDialog=function(b,e,f,c){var k=document.createElement("div"),p=document.createElement("div");mxUtils.write(p,mxResources.get("sendYourFeedback"));p.style.fontSize="18px";p.style.marginBottom="18px";k.appendChild(p);p=document.createElement("div");mxUtils.write(p,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));k.appendChild(p);var q=document.createElement("input");q.setAttribute("type",-"text");q.style.marginTop="6px";q.style.width="600px";var u=mxUtils.button(mxResources.get("sendMessage"),function(){var L=D.value+(H.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;L.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=-FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(q.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+":\n"+L),function(G){b.spinner.stop();200<=G.getStatus()&&299>=G.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});u.className=-"geBtn gePrimaryBtn";if(!f){u.setAttribute("disabled","disabled");var E=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(q,"change",function(){0<q.value.length&&0<E.test(q.value)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")});mxEvent.addListener(q,"keyup",function(){0<q.value.length&&E.test(q.value)?u.removeAttribute("disabled"):u.setAttribute("disabled",-"disabled")})}k.appendChild(q);this.init=function(){q.focus()};var H=document.createElement("input");H.setAttribute("type","checkbox");H.setAttribute("checked","checked");H.defaultChecked=!0;f=document.createElement("p");f.style.marginTop="14px";f.appendChild(H);p=document.createElement("span");mxUtils.write(p," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(p);mxEvent.addListener(p,"click",function(L){H.checked=!H.checked;mxEvent.consume(L)});k.appendChild(f);p=document.createElement("div");-mxUtils.write(p,mxResources.get("feedback"));k.appendChild(p);var D=document.createElement("textarea");D.style.resize="none";D.style.width="600px";D.style.height="140px";D.style.marginTop="6px";D.setAttribute("placeholder",mxResources.get("comments"));k.appendChild(D);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst?(f.appendChild(p),f.appendChild(u)):(f.appendChild(u),-f.appendChild(p));k.appendChild(f);this.container=k};FeedbackDialog.maxAttachmentSize=1E6;-var RevisionDialog=function(b,e,f){var c=document.createElement("div"),k=document.createElement("h3");k.style.marginTop="3px";mxUtils.write(k,mxResources.get("revisionHistory"));c.appendChild(k);k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";c.appendChild(k);var p=document.createElement("div");p.style.position="absolute";p.style.left="200px";p.style.width="470px";p.style.height="376px";p.style.overflow="hidden";p.style.borderWidth=-"1px";p.style.borderStyle="solid";var q=document.createElement("div");q.style.position="absolute";q.style.display="none";q.style.textAlign="center";q.style.padding="8px";q.style.borderRadius="8px";q.style.left="50%";q.style.top="50%";q.style.whiteSpace="nowrap";q.style.transform="translate(-50%, -50%)";q.style.background="inherit";q.style.border="1px solid";p.appendChild(q);mxEvent.disableContextMenu(p);c.appendChild(p);var u=new Graph(p);u.setTooltips(!1);u.setEnabled(!1);u.setPanning(!0);u.panningHandler.ignoreCell=-!0;u.panningHandler.useLeftButtonForPanning=!0;u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;var E=0,H=null,D=0,L=u.getGlobalVariable;u.getGlobalVariable=function(X){return"page"==X&&null!=H&&null!=H[D]?H[D].getAttribute("name"):"pagenumber"==X?D+1:"pagecount"==X?null!=H?H.length:1:L.apply(this,arguments)};u.getLinkForCell=function(){return null};for(var G=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),d=b.getCurrentFile(),g=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),m={},t=0;t<g.length;t++)m[g[t].getAttribute("id")]=g[t];var v=null,y=null,C=null,I=null,K=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=C&&u.zoomIn()},20);K.setAttribute("disabled","disabled");var J=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=C&&u.zoomOut()},20);J.setAttribute("disabled",-"disabled");var U=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=C&&(1==u.view.scale?(u.maxFitScale=8,u.fit(8)):u.zoomActual(),u.center())},20);U.setAttribute("disabled","disabled");var P=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);P.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);R.setAttribute("disabled","disabled");var n=p.cloneNode(!1);n.style.pointerEvent=-"none";p.parentNode.appendChild(n);var z=new Graph(n);z.setTooltips(!1);z.setEnabled(!1);z.setPanning(!0);z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var A=document.createElement("div");A.style.textAlign="left";A.style.color="gray";A.style.backgroundColor="transparent";A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.style.whiteSpace="nowrap";A.style.cursor="default";A.style.height="100%";A.style.display=-"inline-flex";A.style.alignItems="center";A.style.flexGrow="1";mxEvent.addListener(A,"click",function(){var X=mxUtils.getTextContent(A);""!=X&&b.alert(X)});var B=null;mxEvent.addGestureListeners(P,function(X){try{var Y=null!=H[E]?m[H[E].getAttribute("id")]:null;mxUtils.setOpacity(P,20);q.innerText="";if(null==Y)q.style.display="inline-block",mxUtils.write(q,mxResources.get("pageNotFound"));else{B=A.innerHTML;A.innerHTML=mxResources.get("current");p.style.display="none";n.style.display="";n.style.backgroundColor=-p.style.backgroundColor;var Z=Editor.parseDiagramNode(Y);(new mxCodec(Z.ownerDocument)).decode(Z,z.getModel());z.view.scaleAndTranslate(u.view.scale,u.view.translate.x,u.view.translate.y);z.mathEnabled="1"==Z.getAttribute("math");z.setAdaptiveColors(Z.getAttribute("adaptiveColors"));Editor.MathJaxRender&&z.mathEnabled&&Editor.MathJaxRender(z.container)}}catch(aa){q.style.display="inline-block",q.innerText="",mxUtils.write(q,mxResources.get("pageNotFound")+": "+aa.message)}},null,function(){mxUtils.setOpacity(P,-60);q.style.display="none";q.innerText="";"none"==p.style.display&&(p.style.display="",A.innerHTML=B,n.style.display="none")});mxEvent.addListener(R,"click",mxUtils.bind(this,function(X){null!=C&&(X=b.getPagesForNode(C.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Y){try{if(0<Y.length&&b.editor.graph.isEnabled()){var Z=[JSON.parse(Y)];b.confirm(mxResources.get("areYouSure"),function(){try{d.patch(Z,null,!0,!0),b.hideDialog(),-b.hideDialog()}catch(aa){b.handleError(aa)}})}else b.hideDialog()}catch(aa){b.handleError(aa)}},null,null,null,null,null,!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close")),b.showDialog(X.container,620,460,!0,!0),X.init())}));var M=mxUtils.button(mxResources.get("restore"),function(X){null!=C&&null!=I&&b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(I):b.spinner.spin(document.body,mxResources.get("restoring"))&&(M.setAttribute("disabled","disabled"),d.save(!0,function(Y){b.spinner.stop();-M.removeAttribute("disabled");b.replaceFileData(I);b.hideDialog()},function(Y){b.spinner.stop();M.removeAttribute("disabled");b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)}))})});M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");var S=document.createElement("select");S.setAttribute("disabled","disabled");S.style.userSelect="none";S.style.maxWidth="100px";S.style.marginLeft="10px";S.style.display="none";var l=null;mxEvent.addListener(S,-"change",function(X){null!=l&&(l(X),mxEvent.consume(X))});var x=mxUtils.button(mxResources.get("open"),function(){null!=C&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(C.documentElement)),b.openLink(b.getUrl(),null,!0))});x.className="geBtn";x.setAttribute("disabled","disabled");var F=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});F.className="geBtn";F.setAttribute("disabled","disabled");null!=-f&&(x.style.display="none");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.right="28px";g.style.left="32px";g.style.justifyContent="end";g.style.display="flex";var N=document.createElement("div");N.className="geToolbarContainer";N.style.backgroundColor="transparent";N.style.display="flex";N.style.alignItems="center";N.style.justifyContent="stretch";N.style.left="32px";N.style.right="32px";N.style.border="none";N.style.top="440px";N.style.height="28px";var O=-null;if(null!=e&&0<e.length){p.style.cursor="move";var Q=document.createElement("table");Q.style.borderWidth="1px";Q.style.borderStyle="solid";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var V=document.createElement("tbody"),T=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(E=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var W=function(X){var Y=new Date(X.modifiedDate),Z=null;if(0<=Y.getTime()){var aa=function(ca){G.stop();-q.innerText="";var da=mxUtils.parseXml(ca),ja=b.editor.extractGraphModel(da.documentElement,!0);if(null!=ja){var ba=function(ha){null!=ha&&(ha=ia(Editor.parseDiagramNode(ha)));return ha},ia=function(ha){var pa=ha.getAttribute("background");if(null==pa||""==pa||pa==mxConstants.NONE)pa=u.defaultPageBackgroundColor;p.style.backgroundColor=mxUtils.getLightDarkColor(pa);(new mxCodec(ha.ownerDocument)).decode(ha,u.getModel());u.maxFitScale=1;u.fit(8);u.center();u.mathEnabled="1"==ha.getAttribute("math");-u.setAdaptiveColors(ha.getAttribute("adaptiveColors"));Editor.MathJaxRender&&u.mathEnabled&&Editor.MathJaxRender(u.container);return ha};S.style.display="none";S.innerText="";C=da;I=ca;H=parseSelectFunction=null;D=0;if("mxfile"==ja.nodeName){da=ja.getElementsByTagName("diagram");H=[];for(ca=0;ca<da.length;ca++)H.push(da[ca]);D=Math.min(E,H.length-1);0<H.length&&ba(H[D]);if(1<H.length)for(S.removeAttribute("disabled"),S.style.display="",ca=0;ca<H.length;ca++){da=document.createElement("option");da.setAttribute("title",-ka+" ("+H[ca].getAttribute("id")+")");da.setAttribute("value",ca);var ka=H[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);ja=b.getPageById(H[ca].getAttribute("id"));var ua="";if(null!=ja){var sa=new DiagramPage(H[ca]);b.getHashValueForPages([ja])!=b.getHashValueForPages([sa])&&(ua=" (M)")}else ua=" (X)";mxUtils.write(da,ka+ua);ca==D&&da.setAttribute("selected","selected");S.appendChild(da)}l=function(){try{var ha=parseInt(S.value);D=E=ha;ba(H[ha])}catch(pa){S.value=E,b.handleError(pa)}}}else ia(ja);-ka=X.lastModifyingUserName;null!=ka&&20<ka.length&&(ka=ka.substring(0,20)+"...");A.innerText="";mxUtils.write(A,(null!=ka?ka+" ":"")+Y.toLocaleDateString()+" "+Y.toLocaleTimeString());A.setAttribute("title",Z.getAttribute("title"));K.removeAttribute("disabled");J.removeAttribute("disabled");U.removeAttribute("disabled");P.removeAttribute("disabled");R.removeAttribute("disabled");null!=d&&d.isRestricted()||(b.editor.graph.isEnabled()&&M.removeAttribute("disabled"),x.removeAttribute("disabled"),F.removeAttribute("disabled"));-mxUtils.setOpacity(K,60);mxUtils.setOpacity(J,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(P,60);mxUtils.setOpacity(R,60)}else S.style.display="none",S.innerText="",A.innerText="",q.innerText="",mxUtils.write(A,mxResources.get("errorLoadingFile")),mxUtils.write(q,mxResources.get("errorLoadingFile"))};Z=document.createElement("tr");Z.style.borderBottomWidth="1px";Z.style.borderBottomStyle="solid";Z.style.fontSize="12px";Z.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding=-"6px";ea.style.whiteSpace="nowrap";X==e[e.length-1]?mxUtils.write(ea,mxResources.get("current")):Y.toDateString()===T?mxUtils.write(ea,Y.toLocaleTimeString()):mxUtils.write(ea,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());Z.appendChild(ea);Z.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Z,"click",function(ca){y!=X&&(G.stop(),-null!=v&&(v.style.backgroundColor=""),y=X,v=Z,v.style.backgroundColor="light-dark(#ebf2f9, #000000)",I=C=null,A.removeAttribute("title"),A.innerText=mxResources.get("loading")+"...",p.style.backgroundColor=u.defaultPageBackgroundColor,q.innerText="",u.getModel().clear(),M.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),x.setAttribute("disabled",-"disabled"),S.setAttribute("disabled","disabled"),mxUtils.setOpacity(K,20),mxUtils.setOpacity(J,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(P,20),mxUtils.setOpacity(R,20),G.spin(p),X.getXml(function(da){if(y==X)try{aa(da)}catch(ja){A.innerText=mxResources.get("error")+": "+ja.message}},function(da){G.stop();S.style.display="none";S.innerText="";A.innerText="";mxUtils.write(A,mxResources.get("errorLoadingFile"));mxUtils.write(q,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Z,-"dblclick",function(ca){x.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);V.appendChild(Z)}return Z}(e[t]);null!=W&&t==e.length-1&&(O=W)}Q.appendChild(V);k.appendChild(Q)}else null==d||null==b.drive&&d.constructor==window.DriveFile||null==b.dropbox&&d.constructor==window.DropboxFile?(p.style.display="none",N.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(p.style.display="none",N.style.display=-"none",mxUtils.write(k,mxResources.get("noRevisions")));this.init=function(){null!=O&&O.click()};k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";N.appendChild(A);N.appendChild(P);N.appendChild(J);N.appendChild(U);N.appendChild(K);N.appendChild(S);N.appendChild(R);b.editor.cancelFirst&&g.appendChild(k);g.appendChild(x);null!=d&&d.constructor==DriveFile&&g.appendChild(F);g.appendChild(M);b.editor.cancelFirst||g.appendChild(k);c.appendChild(g);c.appendChild(N);-this.container=c},DraftDialog=function(b,e,f,c,k,p,q,u,E){var H=document.createElement("div"),D=document.createElement("div");D.style.marginTop="0px";D.style.whiteSpace="nowrap";D.style.overflow="auto";D.style.lineHeight="normal";mxUtils.write(D,e);H.appendChild(D);var L=document.createElement("select"),G=mxUtils.bind(this,function(){"-1"==L.value?(L.value=L.options[0].value,G(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this,R;return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){for(R=-0;R<E.length;R++)k.apply(P,[R,mxUtils.bind(P,function(){})]);b.hideDialog(!0);n.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(y=mxUtils.parseXml(E[L.value].data),C=b.editor.extractGraphModel(y.documentElement,!0),I=0,this.init())});if(null!=E){L.style.marginLeft="4px";for(e=0;e<E.length;e++){var d=document.createElement("option");d.setAttribute("value",e);var g=new Date(E[e].created),m=new Date(E[e].modified);mxUtils.write(d,g.toLocaleDateString()+" "+g.toLocaleTimeString()+" - "+-(g.toDateString(),m.toDateString(),m.toLocaleDateString())+" "+m.toLocaleTimeString());L.appendChild(d)}d=document.createElement("option");d.setAttribute("value","-1");mxUtils.write(d,mxResources.get("deleteAll"));L.appendChild(d);D.appendChild(L);mxEvent.addListener(L,"change",G)}null==f&&(f=E[0].data);var t=document.createElement("div");t.style.position="absolute";t.style.border="1px solid lightGray";t.style.marginTop="10px";t.style.left="40px";t.style.right="40px";t.style.top="46px";t.style.bottom=-"74px";t.style.overflow="hidden";mxEvent.disableContextMenu(t);H.appendChild(t);var v=new Graph(t);v.setEnabled(!1);v.setPanning(!0);v.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";v.panningHandler.ignoreCell=!0;v.panningHandler.useLeftButtonForPanning=!0;v.minFitScale=null;v.maxFitScale=null;v.centerZoom=!0;var y=mxUtils.parseXml(f),C=b.editor.extractGraphModel(y.documentElement,!0),I=0,K=null,J=v.getGlobalVariable;v.getGlobalVariable=function(P){return"page"==P&&null!=K&&null!=K[I]?K[I].getAttribute("name"):-"pagenumber"==P?I+1:"pagecount"==P?null!=K?K.length:1:J.apply(this,arguments)};v.getLinkForCell=function(){return null};f=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){v.zoomIn()},20);D=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){v.zoomOut()},20);e=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==v.view.scale?(v.maxFitScale=8,v.fit(8)):v.zoomActual();v.center()},20);q=mxUtils.button(q||mxResources.get("discard"),-function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(R){k.apply(P,[L.value,mxUtils.bind(P,function(){null!=L.parentNode&&(L.options[L.selectedIndex].parentNode.removeChild(L.options[L.selectedIndex]),1<L.options.length?(L.value=L.options[0].value,G()):b.hideDialog(!0))})]);R.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});q.className="geBtn";var U=document.createElement("select");-U.style.maxWidth="80px";U.style.position="relative";U.style.top="-2px";U.style.verticalAlign="bottom";U.style.marginRight="6px";U.style.display="none";p=mxUtils.button(p||mxResources.get("edit"),function(){c.apply(this,[L.value])});p.className="geBtn gePrimaryBtn";d=document.createElement("div");d.style.position="absolute";d.style.bottom="30px";d.style.right="40px";d.style.textAlign="right";g=document.createElement("div");g.className="geToolbarContainer";g.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";-this.init=function(){function P(A){if(null!=A){var B=A.getAttribute("background");if(null==B||""==B||B==mxConstants.NONE)B="light-dark(#ffffff, transparent)";t.style.backgroundColor=B;(new mxCodec(A.ownerDocument)).decode(A,v.getModel());v.maxFitScale=1;v.fit(8);v.center()}return A}function R(A){null!=A&&(A=P(Editor.parseDiagramNode(A)));return A}mxEvent.addListener(U,"change",function(A){I=parseInt(U.value);R(K[I]);mxEvent.consume(A)});if("mxfile"==C.nodeName){var n=C.getElementsByTagName("diagram");-K=[];for(var z=0;z<n.length;z++)K.push(n[z]);0<K.length&&R(K[I]);U.innerText="";if(1<K.length)for(U.style.display="",z=0;z<K.length;z++)n=document.createElement("option"),mxUtils.write(n,K[z].getAttribute("name")||mxResources.get("pageWithNumber",[z+1])),n.setAttribute("value",z),z==I&&n.setAttribute("selected","selected"),U.appendChild(n);else U.style.display="none"}else P(C)};g.appendChild(U);g.appendChild(f);g.appendChild(D);g.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});-f.className="geBtn";u=null!=u?mxUtils.button(mxResources.get("ignore"),u):null;null!=u&&(u.className="geBtn");b.editor.cancelFirst?(d.appendChild(f),null!=u&&d.appendChild(u),d.appendChild(q),d.appendChild(p)):(d.appendChild(p),d.appendChild(q),null!=u&&d.appendChild(u),d.appendChild(f));H.appendChild(d);H.appendChild(g);this.container=H},FindWindow=function(b,e,f,c,k,p){function q(l,x,F){if("object"===typeof x.value&&null!=x.value.attributes){x=x.value.attributes;for(var N=0;N<x.length;N++)if("label"!=-x[N].nodeName){var O=mxUtils.trim(x[N].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==l&&0<=O.indexOf(F)||null!=l&&l.test(O))return!0}}return!1}function u(){d?(B.removeAttribute("disabled"),M.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));I.value?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled")}function E(l,x,F){z.innerText="";var N=D.model.getDescendants(D.model.getRoot()),O=I.value.toLowerCase(),-Q=J.checked?new RegExp(O):null,V=null;m=null;L!=O&&(L=O,G=null,g=!1);var T=null==G;if(0<O.length){if(g){g=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}l=(W+1)%b.pages.length;G=null;do g=!1,N=b.pages[l],D=b.createTemporaryGraph(D.getStylesheet()),b.updatePageRoot(N),D.model.setRoot(N.root),l=(l+1)%b.pages.length;while(!E(!0,x,F)&&l!=W);G&&(G=null,F?b.editor.graph.model.execute(new SelectPage(b,N)):b.selectPage(N));g=!1;D=b.editor.graph;return E(!0,x,F)}for(X=0;X<N.length;X++){W=-D.view.getState(N[X]);x&&(T=T||W==G);if(null!=W&&null!=W.cell.value&&(T||null==V)&&(D.model.isVertex(W.cell)||D.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(P.innerHTML=D.sanitizeHtml(D.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([P])):label=D.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Y=0;x&&p&&W==G&&(label=label.substr(t),Y=t);var Z=""==K.value;if(null==Q&&(0<=label.indexOf(O)||Z&&q(Q,W.cell,O))||null!=Q&&(Q.test(label)||-Z&&q(Q,W.cell,O)))if(p&&(null!=Q?(Z=label.match(Q),null!=Z&&0<Z.length&&(m=Z[0].toLowerCase(),t=Y+Z.index+m.length)):(m=O,t=Y+label.indexOf(O)+m.length)),T){V=W;break}else null==V&&(V=W)}T=T||W==G}}if(null!=V){if(X==N.length&&U.checked)return G=null,g=!0,E(!0,x,F);G=V;D.scrollCellToVisible(G.cell);D.isEnabled()&&!D.isCellLocked(G.cell)?F||D.getSelectionCell()==G.cell&&1==D.getSelectionCount()||D.setSelectionCell(G.cell):D.highlightCell(G.cell)}else{if(!l&&U.checked)return g=!0,E(!0,x,F);D.isEnabled()&&-!F&&D.clearSelection()}d=null!=V;p&&!l&&u();return 0==O.length||null!=V}var H=b.actions.get("findReplace"),D=b.editor.graph,L=null,G=null,d=!1,g=!1,m=null,t=0,v=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var C=p?"260px":"200px",I=document.createElement("input");I.setAttribute("placeholder",mxResources.get("find"));I.setAttribute("type","text");I.style.marginTop="4px";I.style.marginBottom="6px";I.style.width=C;-I.style.fontSize="12px";I.style.borderRadius="4px";I.style.padding="6px";y.appendChild(I);mxUtils.br(y);if(p){var K=document.createElement("input");K.setAttribute("placeholder",mxResources.get("replaceWith"));K.setAttribute("type","text");K.style.marginTop="4px";K.style.marginBottom="6px";K.style.width=C;K.style.fontSize="12px";K.style.borderRadius="4px";K.style.padding="6px";y.appendChild(K);mxUtils.br(y);mxEvent.addListener(K,"input",u)}var J=document.createElement("input");J.setAttribute("id",-"geFindWinRegExChck");J.setAttribute("type","checkbox");J.style.marginRight="4px";y.appendChild(J);C=document.createElement("label");C.setAttribute("for","geFindWinRegExChck");y.appendChild(C);mxUtils.write(C,mxResources.get("regularExpression"));y.appendChild(C);C=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");C.style.position="relative";C.style.marginLeft="6px";C.style.top="3px";y.appendChild(C);mxUtils.br(y);var U=document.createElement("input");U.setAttribute("id","geFindWinAllPagesChck");-U.setAttribute("type","checkbox");U.style.marginRight="4px";y.appendChild(U);C=document.createElement("label");C.setAttribute("for","geFindWinAllPagesChck");y.appendChild(C);mxUtils.write(C,mxResources.get("allPages"));y.appendChild(C);var P=document.createElement("div");mxUtils.br(y);C=document.createElement("div");C.style.left="0px";C.style.right="0px";C.style.marginTop="6px";C.style.padding="0 6px 0 6px";C.style.textAlign="center";y.appendChild(C);var R=mxUtils.button(mxResources.get("reset"),-function(){z.innerText="";I.value="";I.style.backgroundColor="";p&&(K.value="",u());L=G=null;g=!1;I.focus()});R.setAttribute("title",mxResources.get("reset"));R.style.float="none";R.style.width="120px";R.style.marginTop="6px";R.style.marginLeft="8px";R.style.overflow="hidden";R.style.textOverflow="ellipsis";R.className="geBtn";p||C.appendChild(R);var n=mxUtils.button(mxResources.get("find"),function(){try{I.style.backgroundColor=E()?"":"light-dark(#ffcfcf, #ff0000)"}catch(l){b.handleError(l)}});n.setAttribute("title",-mxResources.get("find")+" (Enter)");n.style.float="none";n.style.width="120px";n.style.marginTop="6px";n.style.marginLeft="8px";n.style.overflow="hidden";n.style.textOverflow="ellipsis";n.className="geBtn gePrimaryBtn";C.appendChild(n);var z=document.createElement("div");z.style.marginTop="10px";if(p){var A=function(l,x,F,N,O){if(null==O||"1"!=O.html)return N=l.toLowerCase().indexOf(x,N),0>N?l:l.substr(0,N)+F+l.substr(N+x.length);var Q=l;x=mxUtils.htmlEntities(x,!1,!1,!1);O=[];var V=-1;for(l=l.replace(/<br>/ig,-"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(V=l.indexOf("<",V+1));)O.push(V);V=l.match(/<[^>]*>/g);l=l.replace(/<[^>]*>/g,"");N=l.toLowerCase().indexOf(x,N);if(0>N)return Q;Q=N+x.length;F=mxUtils.htmlEntities(F);l=l.substr(0,N)+F+l.substr(Q);for(var T=0,W=0;W<O.length;W++){if(O[W]-T<N)l=l.substr(0,O[W])+V[W]+l.substr(O[W]);else{var X=O[W]-T<Q?N+T:O[W]+(F.length-x.length);l=l.substr(0,X)+V[W]+l.substr(X)}T+=V[W].length}return l.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,-"$1").replace(/\n/g,"<br>")},B=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=m&&null!=G){var l=G.cell,x=D.getLabel(l);D.isCellEditable(l)&&D.model.setValue(l,A(x,m,K.value,t-m.length,D.getCurrentCellStyle(l)));I.style.backgroundColor=E(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(F){b.handleError(F)}});B.setAttribute("title",mxResources.get("replFind"));B.style.float="none";B.style.width="120px";B.style.marginTop="6px";B.style.marginLeft="8px";B.style.overflow="hidden";B.style.textOverflow=-"ellipsis";B.className="geBtn gePrimaryBtn";B.setAttribute("disabled","disabled");C.appendChild(B);mxUtils.br(C);var M=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=m&&null!=G){var l=G.cell,x=D.getLabel(l);D.model.setValue(l,A(x,m,K.value,t-m.length,D.getCurrentCellStyle(l)));B.setAttribute("disabled","disabled");M.setAttribute("disabled","disabled")}}catch(F){b.handleError(F)}});M.setAttribute("title",mxResources.get("replace"));M.style.float="none";M.style.width="120px";M.style.marginTop=-"6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");C.appendChild(M);var S=mxUtils.button(mxResources.get("replaceAll"),function(){z.innerText="";L=null;var l=b.currentPage,x=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;D.getModel().beginUpdate();try{for(var F=0,N={};E(!1,!0,!0)&&100>F;){var O=G.cell,Q=D.getLabel(O),V=N[O.id];if(V&&V.replAllMrk==v&&V.replAllPos>=t)break;N[O.id]=-{replAllMrk:v,replAllPos:t};D.isCellEditable(O)&&(D.model.setValue(O,A(Q,m,K.value,t-m.length,D.getCurrentCellStyle(O))),F++)}l!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,l));mxUtils.write(z,mxResources.get("matchesRepl",[F]))}catch(T){b.handleError(T)}finally{D.getModel().endUpdate(),b.editor.graph.setSelectionCells(x),b.editor.graph.rendering=!0}v++});S.setAttribute("title",mxResources.get("replaceAll"));S.style.float="none";S.style.width="120px";S.style.marginTop="6px";S.style.marginLeft=-"8px";S.style.overflow="hidden";S.style.textOverflow="ellipsis";S.className="geBtn gePrimaryBtn";S.setAttribute("disabled","disabled");C.appendChild(S);mxUtils.br(C);C.appendChild(R);R=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));R.setAttribute("title",mxResources.get("close"));R.style.float="none";R.style.width="120px";R.style.marginTop="6px";R.style.marginLeft="8px";R.style.overflow="hidden";R.style.textOverflow="ellipsis";R.className="geBtn";-C.appendChild(R);mxUtils.br(C);C.appendChild(z)}else R.style.width="90px",n.style.width="90px";mxEvent.addListener(I,"keyup",function(l){if(91==l.keyCode||93==l.keyCode||17==l.keyCode)mxEvent.consume(l);else if(27==l.keyCode)H.funct();else if(L!=I.value.toLowerCase()||13==l.keyCode)try{I.style.backgroundColor=E()?"":"light-dark(#ffcfcf, #ff0000)"}catch(x){I.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(y,"keydown",function(l){70==l.keyCode&&b.keyHandler.isControlDown(l)&&-!mxEvent.isShiftDown(l)&&(H.funct(),mxEvent.consume(l))});this.window=new mxWindow(mxResources.get("find")+(p?"/"+mxResources.get("replace"):""),y,e,f,c,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(I.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null),-null!=b.pages&&1<b.pages.length?U.removeAttribute("disabled"):(U.checked=!1,U.setAttribute("disabled","disabled"))):D.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,e,f,c,k,p){var q=b.editor.graph,u=document.createElement("div");u.style.textAlign="center";u.style.userSelect="none";u.style.overflow="hidden";u.style.height="100%";if(p){var E=function(){var g=q.freehand.getStrokeColor(!0);null!=g&&g!=mxConstants.NONE&&1<g.length&&"string"===typeof g&&("default"==g?g=-mxResources.get("useBlackAndWhite"):(g="#"==g.charAt(0)?g.substring(1).toUpperCase():g,g=ColorDialog.prototype.colorNames[g]),null!=g&&L.setAttribute("title",g))},H=document.createElement("input");H.setAttribute("id","geFreehandBrush");H.setAttribute("type","checkbox");H.checked=q.freehand.isPerfectFreehandMode();H.style.margin="10px 5px 0px 10px";H.style.float="left";u.appendChild(H);q.freehand.setPerfectFreehandMode(H.checked);var D=document.createElement("label");D.setAttribute("for","geFreehandBrush");-D.style.float="left";D.style.marginTop="10px";u.appendChild(D);mxUtils.write(D,mxResources.get("brush"));u.appendChild(D);var L=document.createElement("tempDiv");L.style.display="block";L.style.width="100%";L.style.height="100%";L.style.borderRadius="2px";L.style.boxSizing="border-box";L.style.border="1px solid black";L.style.backgroundColor=q.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){L.style.backgroundColor=q.freehand.getStrokeColor()});E();D=mxUtils.button("",mxUtils.bind(this,-function(g){b.pickColor(q.freehand.getStrokeColor(!0),function(m){q.freehand.setStrokeColor(m);L.style.backgroundColor=q.freehand.getStrokeColor();E()},"default");mxEvent.consume(g)}));D.style.position="absolute";D.style.boxSizing="border-box";D.style.padding="2px";D.style.top="8px";D.style.right="8px";D.style.width="28px";D.style.height="18px";D.className="geColorBtn";D.innerText="";D.appendChild(L);u.appendChild(D);D=document.createElement("img");D.setAttribute("title",mxResources.get("settings"));-D.setAttribute("src",Editor.gearImage);D.className="geToolbarButton geAdaptiveAsset";D.style.position="absolute";D.style.boxSizing="border-box";D.style.padding="2px";D.style.top="8px";D.style.right="38px";D.style.width="18px";D.style.height="18px";D.style.opacity="0.6";u.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(g){g=q.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",g,function(m){!isNaN(m)&&0<m&&20>=m&&q.freehand.setSmoothing(parseInt(m))})}));-mxUtils.br(u);var G=document.createElement("input");G.setAttribute("type","range");G.setAttribute("min","2");G.setAttribute("max","30");G.setAttribute("value",q.freehand.getBrushSize());G.style.width="90%";G.style.visibility="hidden";u.appendChild(G);mxUtils.br(u);D=function(){q.freehand.setPerfectFreehandMode(H.checked);G.style.visibility=H.checked?"visible":"hidden"};mxEvent.addListener(H,"change",D);D();mxEvent.addListener(G,"change",function(){q.freehand.setBrushSize(parseInt(this.value))})}var d=-mxUtils.button(mxResources.get("startDrawing"),function(){q.freehand.isDrawing()?q.freehand.stopDrawing():q.freehand.startDrawing()});d.setAttribute("title",mxResources.get("startDrawing")+" (X)");d.style.margin=p?"5px 0 0 0":"10px 0 0 0";d.style.width="90%";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.textAlign="center";d.className="geBtn gePrimaryBtn";u.appendChild(d);this.window=new mxWindow(mxResources.get("freehand"),u,e,f,c,k,!0,!0);this.window.destroyOnClose=-!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);q.addListener("freehandStateChanged",mxUtils.bind(this,function(){d.innerText="";mxUtils.write(d,mxResources.get(q.freehand.isDrawing()?"stopDrawing":"startDrawing"));var g=document.createElement("span");g.style.opacity="0.7";g.style["float"]="right";mxUtils.write(g,"X");d.appendChild(g);d.setAttribute("title",mxResources.get(q.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");d.className="geBtn"+(q.freehand.isDrawing()?-" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){q.freehand.isDrawing()&&q.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,e,f,c,k){var p=b.editor.graph,q=document.createElement("div");q.style.userSelect="none";q.style.overflow="hidden";q.style.height="100%";var u=document.createElement("div");u.style.display="flex";u.style.alignItems="center";-u.style.justifyContent="center";u.style.paddingTop="20px";var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginRight="4px";E.checked=!0;var H=document.createElement("input");H.setAttribute("type","checkbox");H.style.marginRight="4px";H.checked=!0;var D=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(p.isSelectionEmpty()?p.getVerticesAndEdges():p.getSelectionCells(),E.checked,H.checked)}));-D.setAttribute("title","Convert Colors");D.className="geBtn gePrimaryBtn";u.appendChild(D);q.appendChild(u);u=u.cloneNode(!1);u.appendChild(H);u.style.paddingTop="8px";mxUtils.write(u,mxResources.get("background"));q.appendChild(u);u=u.cloneNode(!1);u.appendChild(E);u.style.paddingTop="8px";mxUtils.write(u,mxResources.get("labels"));q.appendChild(u);this.window=new mxWindow(mxResources.get("adaptiveColors"),q,e,f,c,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);-this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,e,f,c,k){function p(){R=!0;t.value=n;L.isSelectionEmpty()?(y.setAttribute("disabled","disabled"),"selectionOnly"==t.value&&(t.value="includeCopyOfMyDiagram")):y.removeAttribute("disabled");b.isDiagramEmpty()?(v.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==t.value&&(t.value="help")):v.removeAttribute("disabled");-R=!1}function q(A,B,M){var S=document.createElement("button");S.className="geBtn gePrimaryBtn";S.style.padding="4px";S.style.height="auto";S.style.position="relative";"flex"==M?(S.style.overflow="hidden",S.style.textOverflow="ellipsis",S.style.whiteSpace="nowrap",S.style.margin="0px",S.style.flexGrow="1"):(S.style.display="block",S.style.margin="8px",S.style.left="50%",S.style.transform="translateX(-50%)");mxUtils.write(S,A);S.setAttribute("title",A);mxEvent.addListener(S,"click",B);return S}function u(A){var B=-document.createElement("div");B.style.display="block";B.style.position="relative";B.style.backgroundColor="#e0e0e0";B.style.borderRadius="4px";B.style.wordWrap="break-word";B.style.textAlign="left";B.style.padding="6px";B.style.margin="12px";B.style.left="0px";B.style.right="0px";mxUtils.write(B,A);d.appendChild(B);return B}function E(A){var B=A.indexOf("<mxGraphModel "),M=A.indexOf("</mxGraphModel>");0>B&&(B=A.indexOf("<mxGraphModel>"));if(0<=B&&M>B){var S=mxUtils,l=S.trim,x=A.substring(0,B),F=x.indexOf("```");-0<=F&&(x=x.substring(x,0,F+6));S=l.call(S,x);B=A.substring(B,M+15);l=mxUtils;x=l.trim;A=A.substring(M+15);M=A.lastIndexOf("```");0<=M&&(A=A.substring(M+3));return[S,B,x.call(l,A)]}return null}function H(A){var B=u(A);B.style.cursor="pointer";B.style.marginBottom="2px";B.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(B,"click",function(T){P.value=A;P.focus()});var M=u("");M.style.marginTop="2px";var S=b.currentPage,l=A,x=[],F=null;if("includeCopyOfMyDiagram"==t.value||"selectionOnly"==-t.value){var N=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==t.value&&(N.isObjectIgnored=function(T){return T.constructor==mxCell&&!L.model.isRoot(T)&&!L.model.isLayer(T)&&!L.isCellSelected(T)&&!L.isAncestorSelected(T)});F=N.encode(L.getModel());N.document.appendChild(F);x.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(F)})}else"create"==-t.value?(l=I.value.replace(/([A-Z])/g," $1").toLowerCase(),l="Write the declaration code for a "+(""!=l?l:"graph")+' that shows "'+(""!=A?A:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):x.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});x.push({role:"user",content:l});var O={model:Editor.gptModel,-messages:x},Q=0;for(x=0;x<O.messages.length;x++)Q+=O.messages[x].content.match(/\b\w+\b|[^\w\s]|=/g).length;var V=mxUtils.bind(this,function(){M.innerHTML="";mxUtils.write(M,mxResources.get("loading")+"...");var T=document.createElement("img");T.setAttribute("title","Processing "+Q+" tokens");T.setAttribute("src",IMAGE_PATH+"/spin.gif");T.style.marginLeft="6px";M.appendChild(T);M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=-new mxXmlRequest(Editor.gptUrl,JSON.stringify(O),"POST");X.setRequestHeaders=mxUtils.bind(this,function(aa,ea){aa.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);aa.setRequestHeader("Content-Type","application/json")});var Y=mxUtils.bind(this,function(aa){W.clear();M.innerHTML="";mxUtils.write(M,aa.message);M.appendChild(q(mxResources.get("tryAgain"),V));M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(aa)}),Z=mxUtils.bind(this,function(aa){var ea=-E(aa),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){aa=document.createElement("div");aa.style.display="inline-block";aa.style.position="relative";aa.style.transform="translateX(-50%)";aa.style.padding="6px";aa.style.left="50%";var da=mxUtils.parseXml(ea[1]),ja=new mxCodec(da),ba=new mxGraphModel;ja.decode(da.documentElement,ba);var ia=null;null!=F&&(da=new mxCodec(F.ownerDocument),ia=new mxGraphModel,da.decode(F,ia));da=mxUtils.bind(this,function(ka){L.model.beginUpdate();try{if(null!=-ia&&null!=b.getPageIndex(S)){b.selectPage(S);var ua=b.diffCells(ia.root,ba.root);b.patchPage(S,ua,null,!0)}else{var sa=ba.getChildren(ba.getChildAt(ba.getRoot(),0));L.setSelectionCells(L.importCells(sa))}}finally{L.model.endUpdate()}mxEvent.consume(ka)});ja=L.getBoundingBoxFromGeometry(ca);null!=ja?(aa.style.cursor="move",aa.appendChild(b.sidebar.createVertexTemplateFromCells(ca,ja.width,ja.height,"",!0,null,!0,!0,da,160,120))):(aa.style.padding="14px",mxUtils.write(aa,mxResources.get("noPreview")));-M.innerHTML="";B=M;0<ea[0].length&&(mxUtils.write(B,ea[0]),mxUtils.br(B));B.appendChild(aa);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(q(mxResources.get("tryAgain"),V,"flex"));ca.appendChild(q(mxResources.get(null!=F?"apply":"insert"),da,"flex"));M.appendChild(ca);0<ea[2].length&&(mxUtils.br(B),mxUtils.write(B,ea[2]));B.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else M.innerHTML="",B=M,mxUtils.write(B,aa),-M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(aa){if(W.clear())try{if(200<=aa.getStatus()&&299>=aa.getStatus()){var ea=JSON.parse(aa.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",O,"response:",ea);var ca=mxUtils.trim(ea.choices[0].message.content);if("create"==t.value){var da=b.extractMermaidDeclaration(ca);null!=da?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ia){Z(ia)})),b.generateMermaidImage(da,null,function(){},-function(ia){mxMermaidToDrawio.resetListeners();Y(ia)})):(Z(ca),M.appendChild(q(mxResources.get("tryAgain"),V)))}else Z(ca)}else{var ja="Error: "+aa.getStatus();try{var ba=JSON.parse(aa.getText());null!=ba&&null!=ba.error&&null!=ba.error.message&&(ja=ba.error.message)}catch(ia){}M.innerHTML="";mxUtils.write(M,ja);M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ia){Y(ia)}}),Y)}),function(W){M.innerHTML="";mxUtils.write(M,W.message);M.appendChild(q(mxResources.get("tryAgain"),-V));M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});V()}function D(){""!=mxUtils.trim(P.value)&&(H(P.value),P.value="")}var L=b.editor.graph,G=document.createElement("div");G.style.textAlign="center";G.style.overflow="hidden";G.style.height="100%";var d=document.createElement("div");d.style.position="absolute";d.style.overflow="auto";d.style.top="0px";d.style.left="0px";d.style.right="0px";d.style.bottom="104px";G.appendChild(d);var g=document.createElement("div");g.style.position=-"absolute";g.style.boxSizing="border-box";g.style.borderRadius="4px";g.style.border="1px solid lightgray";g.style.margin="8px 8px 16px 8px";g.style.padding="8px";g.style.left="0px";g.style.right="0px";g.style.bottom="0px";g.style.padding="6px";g.style.height="80px";var m=document.createElement("div");m.style.display="flex";m.style.gap="6px";m.style.marginBottom="6px";var t=document.createElement("select");t.style.textOverflow="ellipsis";t.style.flexGrow="1";t.style.padding="4px";t.style.minWidth=-"0";g.appendChild(m);var v=document.createElement("option");v.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram"));t.appendChild(v);var y=document.createElement("option");y.setAttribute("value","selectionOnly");mxUtils.write(y,mxResources.get("selectionOnly"));t.appendChild(y);m.appendChild(t);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var C=document.createElement("option");C.setAttribute("value","create");mxUtils.write(C,-mxResources.get("create"));t.appendChild(C)}C=document.createElement("option");C.setAttribute("value","help");mxUtils.write(C,mxResources.get("help"));t.appendChild(C);C=document.createElement("option");C.setAttribute("value","reset");mxUtils.write(C,mxResources.get("reset"));t.appendChild(C);var I=document.createElement("select");I.style.textOverflow="ellipsis";I.style.flexGrow="1";I.style.padding="4px";I.style.minWidth="0";for(C=0;C<EditorUi.mermaidDiagramTypes.length;C++){var K=document.createElement("option"),-J=EditorUi.mermaidDiagramTypes[C],U=J;"erDiagram"==U&&(U="entityRelationshipDiagram");U=mxResources.get(U,null,U.charAt(0).toUpperCase()+U.substring(1).replace(/[A-Z]/g," $&"));K.setAttribute("value",J);mxUtils.write(K,U);I.appendChild(K)}m.appendChild(I);m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";var P=document.createElement("input");P.setAttribute("type","text");P.style.width="100%";P.style.outline="none";P.style.border="none";-P.style.background="transparent";P.style.padding="8px 26px 8px 8px";P.style.boxSizing="border-box";m.appendChild(P);C=document.createElement("img");C.setAttribute("src",Editor.sendImage);C.setAttribute("title",mxResources.get("sendMessage"));C.className="geAdaptiveAsset";C.style.position="relative";C.style.cursor="pointer";C.style.opacity="0.5";C.style.height="19px";C.style.left="-24px";C.style.top="5px";C.style.background="url('"+b.editor.transparentImage+"')";m.appendChild(C);g.appendChild(m);L.isSelectionEmpty()?-b.isDiagramEmpty()?t.value="help":t.value="includeCopyOfMyDiagram":t.value="selectionOnly";var R=!1,n=t.value,z=function(){P.setAttribute("placeholder",mxResources.get("create"==t.value?"describeYourDiagram":"askMeAnything"));"create"==t.value?(t.style.width="",I.style.display=""):(t.style.width="100%",I.style.display="none")};z();mxEvent.addListener(t,"change",function(){R||("reset"==t.value?(t.value=n,d.innerHTML=""):n=t.value,z())});L.selectionModel.addListener(mxEvent.CHANGE,p);L.getModel().addListener(mxEvent.CHANGE,-p);p();mxEvent.addListener(C,"click",D);mxEvent.addListener(P,"keydown",function(A){13!=A.keyCode||mxEvent.isShiftDown(A)||D()});G.appendChild(g);this.window=new mxWindow(mxResources.get("chatWindowTitle"),G,e,f,c,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){L.getModel().removeListener(p)}));this.window.addListener("show",-mxUtils.bind(this,function(){this.window.fit();P.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,e,f,c,k){var p=b.editor.graph,q=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)q=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var u=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(E,H){if(p.isEnabled()){var D=new FilenameDialog(b,"",mxResources.get("add"),function(L){b.hideDialog();if(null!=L&&0<L.length){L=-L.split(" ");for(var G=[],d=[],g=0;g<L.length;g++){var m=mxUtils.trim(L[g]);""!=m&&(d.push(m),0>mxUtils.indexOf(E,m)&&G.push(m))}p.isSelectionEmpty()?H(E.concat(G)):p.addTagsForCells(p.getSelectionCells(),d)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(D.container,320,80,!0,!0);D.init()}},q);q=u.div;this.window=new mxWindow(mxResources.get("tags"),q,e,f,c,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;-this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){u.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,e,f,c){var k=document.createElement("div");k.style.textAlign="center";var p=document.createElement("p");p.style.fontSize="16pt";p.style.padding="0px";p.style.margin="0px";p.style.color="gray";mxUtils.write(p,mxResources.get("authorizationRequired"));var q="Unknown",-u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.marginRight="10px";e==b.drive?(q=mxResources.get("googleDrive"),u.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(q=mxResources.get("dropbox"),u.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(q=mxResources.get("oneDrive"),u.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(q=mxResources.get("github"),u.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(q=mxResources.get("gitlab"),-u.src=IMAGE_PATH+"/gitlab-logo.svg",u.style.width="32px"):e==b.trello&&(q=mxResources.get("trello"),u.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[q]));var E=document.createElement("input");E.setAttribute("type","checkbox");q=mxUtils.button(mxResources.get("authorize"),function(){c(E.checked)});q.insertBefore(u,q.firstChild);q.style.marginTop="6px";q.className="geBigButton";q.style.fontSize="18px";q.style.padding="14px";-k.appendChild(p);k.appendChild(b);k.appendChild(q);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(E),p=document.createElement("span"),mxUtils.write(p," "+mxResources.get("rememberMe")),f.appendChild(p),k.appendChild(f),E.checked=!0,E.defaultChecked=!0,mxEvent.addListener(p,"click",function(H){E.checked=!E.checked;mxEvent.consume(H)}));this.container=k},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),k=[];if(null!=b.sidebar.customEntries)for(var p=-0;p<b.sidebar.customEntries.length;p++){for(var q=b.sidebar.customEntries[p]||{},u={title:b.getResource(q.title),entries:[]},E=0;null!=q.entries&&E<q.entries.length;E++){var H=q.entries[E];u.entries.push({id:H.id,title:b.getResource(H.title),desc:b.getResource(H.desc),image:H.preview})}0<u.entries.length&&k.push(u)}for(p=0;p<f.length;p++)if(null==b.sidebar.enabledLibraries)k.push(f[p]);else{u={title:f[p].title,entries:[]};for(E=0;E<f[p].entries.length;E++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,-f[p].entries[E].id)&&u.entries.push(f[p].entries[E]);0<u.entries.length&&k.push(u)}f=k;if(e){p=mxUtils.bind(this,function(J){for(var U=0;U<J.length;U++)(function(P){var R=g.cloneNode(!1);R.style.fontWeight="bold";R.style.backgroundColor="light-dark(#e5e5e5, #505759)";R.style.padding="6px 0px 6px 20px";mxUtils.write(R,P.title);D.appendChild(R);for(var n=0;n<P.entries.length;n++)(function(z){var A=g.cloneNode(!1);A.style.cursor="pointer";A.style.padding="4px 0px 4px 20px";A.style.whiteSpace="nowrap";-A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.setAttribute("title",z.title+" ("+z.id+")");var B=document.createElement("input");B.setAttribute("type","checkbox");B.checked=b.sidebar.isEntryVisible(z.id);B.defaultChecked=B.checked;A.appendChild(B);mxUtils.write(A," "+z.title);D.appendChild(A);var M=function(S){if(null==S||"INPUT"!=mxEvent.getSource(S).nodeName){L.style.textAlign="center";L.style.padding="0px";L.style.color="";L.innerText="";if(null!=z.desc){var l=document.createElement("pre");-l.style.boxSizing="border-box";l.style.fontFamily="inherit";l.style.margin="20px";l.style.right="0px";l.style.textAlign="left";mxUtils.write(l,z.desc);L.appendChild(l)}null!=z.imageCallback?z.imageCallback(L):null!=z.image?(l=document.createElement("img"),l.setAttribute("border","0"),l.style.maxWidth="100%",l.setAttribute("src",z.image),L.appendChild(l)):null==z.desc&&(L.style.padding="20px",L.style.color="rgb(179, 179, 179)",mxUtils.write(L,mxResources.get("noPreview")));null!=G&&(G.style.backgroundColor=-"");G=A;G.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=S&&mxEvent.consume(S)}};mxEvent.addListener(A,"click",M);mxEvent.addListener(A,"dblclick",function(S){B.checked=!B.checked;mxEvent.consume(S)});d.push(function(){return B.checked?z.id:null});0==U&&0==n&&M()})(P.entries[n])})(J[U])});E=document.createElement("div");E.className="geDialogTitle";mxUtils.write(E,mxResources.get("shapes"));E.style.position="absolute";E.style.top="0px";E.style.left="0px";E.style.lineHeight="40px";E.style.height=-"40px";E.style.right="0px";var D=document.createElement("div"),L=document.createElement("div");D.style.position="absolute";D.style.top="40px";D.style.left="0px";D.style.width="202px";D.style.bottom="60px";D.style.overflow="auto";L.style.position="absolute";L.style.left="202px";L.style.right="0px";L.style.top="40px";L.style.bottom="60px";L.style.overflow="auto";L.style.borderLeftStyle="solid";L.style.borderLeftWidth="1px";L.style.textAlign="center";var G=null,d=[],g=document.createElement("div");g.style.position=-"relative";g.style.left="0px";g.style.right="0px";p(f);c.style.padding="30px";c.appendChild(E);c.appendChild(D);c.appendChild(L);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.position="relative";m.style.top="1px";m.checked=b.sidebar.sidebarTitles;-m.defaultChecked=m.checked;f.appendChild(m);p=document.createElement("span");mxUtils.write(p," "+mxResources.get("labels"));p.style.paddingRight="20px";f.appendChild(p);mxEvent.addListener(p,"click",function(J){m.checked=!m.checked;mxEvent.consume(J)});var t=document.createElement("input");t.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)p=document.createElement("span"),p.style.paddingRight="20px",p.appendChild(t),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),-t.style.position="relative",t.style.top="1px",t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(p,"click",function(J){mxEvent.getSource(J)!=t&&(t.checked=!t.checked,mxEvent.consume(J))}),f.appendChild(p);p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";E=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var J=[],U=0;U<d.length;U++){var P=d[U].apply(this,arguments);null!=P&&J.push(P)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&-"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(U=mxUtils.indexOf(J,".scratchpad"),null!=b.scratchpad!=(0<=U&&0<J.splice(U,1).length)&&b.toggleScratchpad(),U=mxUtils.indexOf(J,"search"),mxSettings.settings.search=0<=U&&0<J.splice(U,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),t.checked&&mxSettings.save());b.sidebar.showEntries(J.join(";"),t.checked,!0);b.setSidebarTitles(m.checked,t.checked)});E.className="geBtn gePrimaryBtn"}else{var v=document.createElement("table");-p=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";E=document.createElement("tr");v.style.width="100%";e=document.createElement("td");k=document.createElement("td");q=document.createElement("td");var y=mxUtils.bind(this,function(J,U,P){var R=document.createElement("input");R.type="checkbox";v.appendChild(R);R.checked=b.sidebar.isEntryVisible(P);var n=document.createElement("span");mxUtils.write(n,U);U=document.createElement("div");U.style.display="block";U.appendChild(R);-U.appendChild(n);mxEvent.addListener(n,"click",function(z){R.checked=!R.checked;mxEvent.consume(z)});J.appendChild(U);return function(){return R.checked?P:null}});E.appendChild(e);E.appendChild(k);E.appendChild(q);p.appendChild(E);v.appendChild(p);d=[];var C=0;for(p=0;p<f.length;p++)for(E=0;E<f[p].entries.length;E++)C++;var I=[e,k,q],K=0;for(p=0;p<f.length;p++)(function(J){for(var U=0;U<J.entries.length;U++){var P=J.entries[U];d.push(y(I[Math.floor(K/(C/3))],P.title,P.id));K++}})(f[p]);c.appendChild(v);-f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";t=document.createElement("input");isLocalStorage&&(t.setAttribute("type","checkbox"),t.checked=!0,t.defaultChecked=!0,f.appendChild(t),p=document.createElement("span"),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),f.appendChild(p),mxEvent.addListener(p,"click",function(J){t.checked=!t.checked;mxEvent.consume(J)}));c.appendChild(f);p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});-p.className="geBtn";E=mxUtils.button(mxResources.get("apply"),function(){for(var J=["search"],U=0;U<d.length;U++){var P=d[U].apply(this,arguments);null!=P&&J.push(P)}b.sidebar.showEntries(0<J.length?J.join(";"):"",t.checked);b.hideDialog()});E.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(p),f.appendChild(E)):(f.appendChild(E),f.appendChild(p));c.appendChild(f);this.container=c},PluginsDialog=function(b,-e,f,c){function k(){E=!0;if(0==u.length)q.innerText=mxResources.get("noPlugins");else{q.innerText="";for(var d=0;d<u.length;d++){var g=document.createElement("span");g.style.display="flex";g.style.alignItems="center";g.style.whiteSpace="nowrap";var m=document.createElement("img");m.src=Editor.trashImage;m.style.position="relative";m.style.cursor="pointer";m.style.marginRight="4px";m.style.display="inline-block";m.style.width="18px";m.setAttribute("title",mxResources.get("delete"));g.appendChild(m);-mxUtils.write(g,u[d]);q.appendChild(g);mxUtils.br(q);mxEvent.addListener(m,"click",function(t){return function(){b.confirm(mxResources.get("delete")+' "'+u[t]+'"?',function(){null!=f&&f(u[t]);u.splice(t,1);k()})}}(d))}}}var p=document.createElement("div"),q=document.createElement("div");q.style.height="180px";q.style.overflow="auto";var u=mxSettings.getPlugins().slice(),E=!1;p.appendChild(q);k();E=!1;var H=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(d){d&&0>mxUtils.indexOf(u,-d)&&u.push(d);k()})}:function(){var d=document.createElement("div"),g=document.createElement("span");g.style.marginTop="6px";mxUtils.write(g,mxResources.get("builtinPlugins")+": ");d.appendChild(g);var m=document.createElement("select");m.style.width="150px";for(g=0;g<App.publicPlugin.length;g++){var t=document.createElement("option");mxUtils.write(t,App.publicPlugin[g]);t.value=App.publicPlugin[g];m.appendChild(t)}d.appendChild(m);mxUtils.br(d);mxUtils.br(d);g=mxUtils.button(mxResources.get("custom")+-"...",function(){var v=new FilenameDialog(b,"",mxResources.get("add"),function(y){b.hideDialog();if(null!=y&&0<y.length){y=y.split(";");for(var C=0;C<y.length;C++){var I=y[C],K=App.pluginRegistry[I];null!=K&&(I=K);0<I.length&&0>mxUtils.indexOf(u,I)&&u.push(I)}k()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(v.container,300,80,!0,!0);v.init()});g.className="geBtn";ALLOW_CUSTOM_PLUGINS||(g.style.display="none");d=new CustomDialog(b,d,mxUtils.bind(this,function(){var v=-App.pluginRegistry[m.value];0>mxUtils.indexOf(u,v)&&(u.push(v),k())}),null,null,null,g);b.showDialog(d.container,360,100,!0,!0)});H.className="geBtn";var D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";var L=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){E?(mxSettings.setPlugins(u),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});L.className="geBtn gePrimaryBtn";var G=document.createElement("div");-G.style.marginTop="14px";G.style.textAlign="right";b.isOffline()||G.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||G.appendChild(D),G.appendChild(H),G.appendChild(L)):(G.appendChild(H),G.appendChild(L),c||G.appendChild(D));p.appendChild(G);this.container=p},CropImageDialog=function(b,e,f,c){function k(){var J=t.checked,U=v.checked,P=d.geometry,R=E.width,n=E.height,z=(300-R)/2,A=(300-n)/2;P.x<z?(P.width-=z-P.x,P.x=z):P.x+P.width>z+R&&(P.width=z+R-P.x,-P.x=Math.min(P.x,z+R));P.y<A?(P.height-=A-P.y,P.y=A):P.y+P.height>A+n&&(P.height=A+n-P.y,P.y=Math.min(P.y,A+n));var B=(P.x-z)/R*100;R=100-(P.x+P.width-z)/R*100;z=(P.y-A)/n*100;P=100-(P.y+P.height-A)/n*100;return"inset("+mxUtils.format(z)+"% "+mxUtils.format(R)+"% "+mxUtils.format(P)+"% "+mxUtils.format(B)+"%"+(J?" round "+G+"%":U?" round 50%":"")+")"}function p(J){null!=D&&(!0!==J&&(D.model.setGeometry(d,L.clone()),G=5,C.value=G),D.model.setStyle(d,g+k()),D.selectAll(),y.style.visibility=t.checked?-"visible":"hidden")}var q=document.createElement("div"),u=document.createElement("div");u.style.height="300px";u.style.width="300px";u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";u.style.position="absolute";var E=document.createElement("img");E.onload=function(){function J(){D.model.setStyle(d,g+k())}D=new Graph(H);D.autoExtend=!1;D.autoScroll=!1;D.setGridEnabled(!1);D.setEnabled(!0);D.setPanning(!1);D.setConnectable(!1);D.getRubberband().setEnabled(!1);-D.graphHandler.allowLivePreview=!1;var U=D.createVertexHandler;D.createVertexHandler=function(){var Q=U.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=f)try{if("inset"==f.substring(0,5)){var P=d.geometry,R=E.width,n=E.height,z=(300-R)/2,A=(300-n)/2,B=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),M=parseFloat(B[0]),S=parseFloat(B[1]),l=parseFloat(B[2]),x=parseFloat(B[3]);isFinite(M)&&isFinite(S)&&isFinite(l)&&isFinite(x)?(P.x=x/100*R+z,P.y=M/100*n+A,P.width=(100-S)/100*R+z-P.x,P.height=(100--l)/100*n+A-P.y,"round"==B[4]?"50%"==B[5]?v.setAttribute("checked","checked"):(G=parseInt(B[5]),C.value=G,t.setAttribute("checked","checked"),y.style.visibility="visible"):m.setAttribute("checked","checked")):f=null}else f=null}catch(Q){}d.style=g+(f?f:k());d.vertex=!0;D.addCell(d,null,null,null,null);D.selectAll();D.addListener(mxEvent.CELLS_MOVED,J);D.addListener(mxEvent.CELLS_RESIZED,J);var F=D.graphHandler.mouseUp,N=D.graphHandler.mouseDown;D.graphHandler.mouseUp=function(){F.apply(this,arguments);-H.style.backgroundColor="#fff9"};D.graphHandler.mouseDown=function(){N.apply(this,arguments);H.style.backgroundColor=""};D.dblClick=function(){};var O=D.getSelectionModel().changeSelection;D.getSelectionModel().changeSelection=function(){O.call(this,[d],[d])}};E.onerror=function(){E.onload=null;E.src=Editor.errorImage};E.setAttribute("src",e);E.style.maxWidth="300px";E.style.maxHeight="300px";u.appendChild(E);q.appendChild(u);var H=document.createElement("div");H.style.width="300px";H.style.height=-"300px";H.style.overflow="hidden";H.style.backgroundColor="#fff9";q.appendChild(H);var D=null,L=new mxGeometry(100,100,100,100),G=5,d=new mxCell("",L.clone(),""),g="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",m=document.createElement("input");m.setAttribute("type","radio");m.setAttribute("id","croppingRect");m.setAttribute("name","croppingShape");m.setAttribute("checked","checked");m.style.margin="5px";q.appendChild(m);e=document.createElement("label");-e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));q.appendChild(e);var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingRounded");t.setAttribute("name","croppingShape");t.style.margin="5px";q.appendChild(t);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));q.appendChild(e);var v=document.createElement("input");v.setAttribute("type","radio");v.setAttribute("id",-"croppingEllipse");v.setAttribute("name","croppingShape");v.style.margin="5px";q.appendChild(v);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));q.appendChild(e);mxEvent.addListener(m,"change",p);mxEvent.addListener(t,"change",p);mxEvent.addListener(v,"change",p);var y=document.createElement("div");y.style.textAlign="center";y.style.visibility="hidden";var C=document.createElement("input");C.setAttribute("type","range");C.setAttribute("min",-"1");C.setAttribute("max","49");C.setAttribute("value",G);C.setAttribute("title",mxResources.get("arcSize"));y.appendChild(C);q.appendChild(y);mxEvent.addListener(C,"change",function(){G=this.value;p(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";u=mxUtils.button(mxResources.get("apply"),function(){c(k(),d.geometry.width,d.geometry.height);b.hideDialog()});u.className="geBtn gePrimaryBtn";var I=mxUtils.button(mxResources.get("reset"),function(){c(null,-E.width,E.height);b.hideDialog()});I.className="geBtn";var K=document.createElement("div");K.style.marginTop="10px";K.style.textAlign="right";b.editor.cancelFirst?(K.appendChild(e),K.appendChild(I),K.appendChild(u)):(K.appendChild(I),K.appendChild(u),K.appendChild(e));q.appendChild(K);this.container=q},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,k=document.createElement("div"),p=document.createElement("table"),q=document.createElement("tbody"),-u=document.createElement("tr"),E=document.createElement("td"),H=document.createElement("td");p.style.paddingLeft="6px";mxUtils.write(E,mxResources.get("relative")+":");var D=document.createElement("input");D.setAttribute("type","checkbox");null!=c&&c.relative&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);this.init=function(){D.focus()};H.appendChild(D);u.appendChild(E);u.appendChild(H);q.appendChild(u);u=document.createElement("tr");E=document.createElement("td");H=document.createElement("td");-mxUtils.write(E,mxResources.get("left")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.width="100px";L.value=null!=c?c.x:"";H.appendChild(L);u.appendChild(E);u.appendChild(H);q.appendChild(u);u=document.createElement("tr");E=document.createElement("td");H=document.createElement("td");mxUtils.write(E,mxResources.get("top")+":");var G=document.createElement("input");G.setAttribute("type","text");G.style.width="100px";G.value=null!=c?c.y:"";H.appendChild(G);u.appendChild(E);-u.appendChild(H);q.appendChild(u);u=document.createElement("tr");E=document.createElement("td");H=document.createElement("td");mxUtils.write(E,mxResources.get("dx")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c&&null!=c.offset?c.offset.x:"";H.appendChild(d);u.appendChild(E);u.appendChild(H);q.appendChild(u);u=document.createElement("tr");E=document.createElement("td");H=document.createElement("td");mxUtils.write(E,mxResources.get("dy")+-":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=c&&null!=c.offset?c.offset.y:"";H.appendChild(g);u.appendChild(E);u.appendChild(H);q.appendChild(u);u=document.createElement("tr");E=document.createElement("td");H=document.createElement("td");mxUtils.write(E,mxResources.get("width")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=c?c.width:"";H.appendChild(m);u.appendChild(E);u.appendChild(H);-q.appendChild(u);u=document.createElement("tr");E=document.createElement("td");H=document.createElement("td");mxUtils.write(E,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.height:"";H.appendChild(t);u.appendChild(E);u.appendChild(H);q.appendChild(u);u=document.createElement("tr");E=document.createElement("td");H=document.createElement("td");mxUtils.write(E,mxResources.get("rotation")+":");var v=document.createElement("input");-v.setAttribute("type","text");v.style.width="100px";v.value=1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";H.appendChild(v);u.appendChild(E);u.appendChild(H);q.appendChild(u);p.appendChild(q);k.appendChild(p);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var C=0;C<e.length;C++){var I=f.getCellGeometry(e[C]);null!=-I&&(I=I.clone(),f.isCellMovable(e[C])&&(I.relative=D.checked,0<mxUtils.trim(L.value).length&&(I.x=Number(L.value)),0<mxUtils.trim(G.value).length&&(I.y=Number(G.value)),0<mxUtils.trim(d.value).length&&(null==I.offset&&(I.offset=new mxPoint),I.offset.x=Number(d.value)),0<mxUtils.trim(g.value).length&&(null==I.offset&&(I.offset=new mxPoint),I.offset.y=Number(g.value))),f.isCellResizable(e[C])&&(0<mxUtils.trim(m.value).length&&(I.width=Number(m.value)),0<mxUtils.trim(t.value).length&&(I.height=Number(t.value))),-f.getModel().setGeometry(e[C],I));0<mxUtils.trim(v.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(v.value),[e[C]])}}finally{f.getModel().endUpdate()}});y.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(C){13==C.keyCode&&y.click()});p=document.createElement("div");p.style.marginTop="20px";p.style.textAlign="right";b.editor.cancelFirst?(p.appendChild(c),p.appendChild(y)):(p.appendChild(y),p.appendChild(c));k.appendChild(p);this.container=k},LibraryDialog=function(b,-e,f,c,k,p,q){function u(P){for(P=document.elementFromPoint(P.clientX,P.clientY);null!=P&&P.parentNode!=g;)P=P.parentNode;var R=null;if(null!=P){var n=g.firstChild;for(R=0;null!=n&&n!=P;)n=n.nextSibling,R++}return R}function E(P,R,n,z,A,B,M,S,l){try{if(b.spinner.stop(),null==R||"image/"==R.substring(0,6))if(null==P&&null!=M||null==t[P]){var x=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Y.title&&0<Y.title.length?-Y.title:mxResources.get("untitled"));X.style.color=null==Y.title||0==Y.title.length?"#d0d0d0":""};g.style.backgroundImage="";m.style.display="none";var F=A,N=B;if(A>b.maxImageSize||B>b.maxImageSize){var O=Math.min(1,Math.min(b.maxImageSize/Math.max(1,A)),b.maxImageSize/Math.max(1,B));A*=O;B*=O}F>N?(N=Math.round(100*N/F),F=100):(F=Math.round(100*F/N),N=100);var Q=document.createElement("div");Q.setAttribute("draggable","true");Q.style.display="inline-block";Q.style.position="relative";Q.style.padding=-"0 12px";Q.style.cursor="move";mxUtils.setPrefixedStyle(Q.style,"transition","transform .1s ease-in-out");if(null!=P){var V=document.createElement("img");V.setAttribute("src",I.convert(P));V.style.width=F+"px";V.style.height=N+"px";V.style.margin="10px";V.style.paddingBottom=Math.floor((100-N)/2)+"px";V.style.paddingLeft=Math.floor((100-F)/2)+"px";Q.appendChild(V)}else if(null!=M){var T=b.stringToCells("<"==M.xml.charAt(0)?M.xml:Graph.decompress(M.xml));0<T.length&&(b.sidebar.createThumb(T,100,100,-Q,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),Q.firstChild.style.display="inline-block",Q.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(da){mxEvent.consume(da)});-(function(da,ja,ba){mxEvent.addListener(W,"click",function(ia){t[ja]=null;for(var ka=0;ka<L.length;ka++)if(null!=L[ka].data&&L[ka].data==ja||null!=L[ka].xml&&null!=ba&&L[ka].xml==ba.xml){L.splice(ka,1);break}Q.parentNode.removeChild(da);0==L.length&&(g.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",m.style.display="");mxEvent.consume(ia)});mxEvent.addListener(W,"dblclick",function(ia){mxEvent.consume(ia)})})(Q,P,M);Q.appendChild(W);Q.style.marginBottom="30px";var X=document.createElement("div");-X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign="center";X.setAttribute("title",mxResources.get("rename"));var Y=null;null!=P?(Y={data:P,w:A,h:B,title:l},null!=S&&(Y.aspect=S),t[P]=V,L.push(Y)):null!=M&&(M.aspect="fixed",L.push(M),Y=M);mxEvent.addListener(X,"keydown",function(da){13==da.keyCode&&null!=C&&(C(),C=null,mxEvent.consume(da))});-x();Q.appendChild(X);mxEvent.addListener(X,"mousedown",function(da){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(da)});T=function(da){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ja=new FilenameDialog(b,Y.title||"",mxResources.get("ok"),function(ba){null!=ba&&(Y.title=ba,x())},mxResources.get("enterValue"));b.showDialog(ja.container,300,80,!0,!0);ja.init();mxEvent.consume(da)}else if("true"!=X.getAttribute("contentEditable")){null!=-C&&(C(),C=null);if(null==Y.title||0==Y.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);C=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Y.title=X.innerHTML;x()};mxEvent.consume(da)}};mxEvent.addListener(X,"click",T);mxEvent.addListener(Q,"dblclick",T);g.appendChild(Q);-mxEvent.addListener(Q,"dragstart",function(da){null==C&&(null==P&&null!=M&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=M.xml&&da.dataTransfer.setData("Text",M.xml),v=u(da),mxClient.IS_GC&&(Q.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(Q,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(Q,"dragend",function(da){"hidden"==W.style.visibility&&(W.style.visibility=-"",X.style.visibility="");v=null;mxUtils.setOpacity(Q,100);mxUtils.setPrefixedStyle(Q.style,"transform",null)})}else K||(K=!0,b.handleError({message:mxResources.get("fileExists")}));else{A=!1;try{if(F=mxUtils.parseXml(P),"mxlibrary"==F.documentElement.nodeName){N=JSON.parse(mxUtils.getTextContent(F.documentElement));if(null!=N&&0<N.length)for(var Z=0;Z<N.length;Z++)null!=N[Z].xml?E(null,null,0,0,0,0,N[Z]):E(N[Z].data,null,0,0,N[Z].w,N[Z].h,null,"fixed",N[Z].title);A=!0}else if("mxfile"==F.documentElement.nodeName){var aa=-F.documentElement.getElementsByTagName("diagram");for(Z=0;Z<aa.length;Z++){var ea=Editor.getDiagramNodeXml(aa[Z]);T=b.stringToCells(ea);if(0<T.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(T);null!=ca&&E(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}A=!0}}catch(da){null!=window.console&&console.error("Error in library dialog: "+da)}A||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){null!=window.console&&console.log("Error in library dialog: "+-da)}return null}function H(P){P.dataTransfer.dropEffect=null!=v?"move":"copy";P.stopPropagation();P.preventDefault()}function D(P){P.stopPropagation();P.preventDefault();K=!1;y=u(P);if(null!=v)null!=y&&y<g.children.length?(L.splice(y>v?y-1:y,0,L.splice(v,1)[0]),g.insertBefore(g.children[v],g.children[y])):(L.push(L.splice(v,1)[0]),g.appendChild(g.children[v]));else if(0<P.dataTransfer.files.length)b.importFiles(P.dataTransfer.files,0,0,b.maxImageSize,J(P));else if(0<=mxUtils.indexOf(P.dataTransfer.types,-"text/uri-list")){var R=decodeURIComponent(P.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(R)||/(\.png)($|\?)/i.test(R)||/(\.gif)($|\?)/i.test(R)||/(\.svg)($|\?)/i.test(R))&&b.loadImage(R,function(n){E(R,null,0,0,n.width,n.height);g.scrollTop=g.scrollHeight})}P.stopPropagation();P.preventDefault()}var L=[];f=document.createElement("div");f.style.height="100%";var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.height="40px";f.appendChild(G);mxUtils.write(G,mxResources.get("filename")+-":");null==e&&(e=b.defaultLibraryName+".xml");var d=document.createElement("input");d.setAttribute("value",e);d.style.marginRight="20px";d.style.marginLeft="10px";d.style.width="500px";null==k||k.isRenamable()||d.setAttribute("disabled","true");this.init=function(){if(null==k||k.isRenamable())d.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null)};G.appendChild(d);Editor.enableUncompressedLibraries&&(d.style.width="420px",e=document.createElement("input"),-e.setAttribute("type","checkbox"),e.style.marginRight="10px",G.appendChild(e),mxUtils.write(G,mxResources.get("compressed")));var g=document.createElement("div");g.style.borderWidth="1px 0px 1px 0px";g.style.borderColor="#d3d3d3";g.style.borderStyle="solid";g.style.marginTop="6px";g.style.overflow="auto";g.style.height="340px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";0==L.length&&Graph.fileSupport&&(g.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");-var m=document.createElement("div");m.style.position="absolute";m.style.width="640px";m.style.top="260px";m.style.textAlign="center";m.style.fontSize="22px";m.style.color="#a0c3ff";mxUtils.write(m,mxResources.get("dragImagesHere"));f.appendChild(m);var t={},v=null,y=null,C=null;G=function(P){"true"!=mxEvent.getSource(P).getAttribute("contentEditable")&&null!=C&&(C(),C=null,mxEvent.consume(P))};mxEvent.addListener(g,"mousedown",G);mxEvent.addListener(g,"pointerdown",G);mxEvent.addListener(g,"touchstart",-G);var I=new mxUrlConverter,K=!1;if(null!=c)for(G=0;G<c.length;G++)e=c[G],E(e.data,null,0,0,e.w,e.h,e,e.aspect,e.title);mxEvent.addListener(g,"dragleave",function(P){m.style.cursor="";for(var R=mxEvent.getSource(P);null!=R;){if(R==g||R==m){P.stopPropagation();P.preventDefault();break}R=R.parentNode}});var J=function(P){return function(R,n,z,A,B,M,S,l,x){null!=x&&EditorUi.isVisioFilename(x.name)?b.importVisio(x,mxUtils.bind(this,function(F){E(F,n,z,A,B,M,S,"fixed",mxEvent.isAltDown(P)?null:S.substring(0,-S.lastIndexOf(".")).replace(/_/g," "))})):null!=x&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(R,x.name)?b.isExternalDataComms()?b.parseFile(x,mxUtils.bind(this,function(F){4==F.readyState&&(b.spinner.stop(),200<=F.status&&299>=F.status&&(E(F.responseText,n,z,A,B,M,S,"fixed",mxEvent.isAltDown(P)?null:S.substring(0,S.lastIndexOf(".")).replace(/_/g," ")),g.scrollTop=g.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(E(R,n,z,A,B,M,S,"fixed",-mxEvent.isAltDown(P)?null:S.substring(0,S.lastIndexOf(".")).replace(/_/g," ")),g.scrollTop=g.scrollHeight)}};mxEvent.addListener(g,"dragover",H);mxEvent.addListener(g,"drop",D);mxEvent.addListener(m,"dragover",H);mxEvent.addListener(m,"drop",D);f.appendChild(g);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";G=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});G.setAttribute("id","btnCancel");G.className="geBtn";b.editor.cancelFirst&&c.appendChild(G);-"draw.io"!=b.getServiceName()||null==k||k.constructor!=DriveLibrary&&k.constructor!=GitHubLibrary||(e=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(k,function(P){if(null!=P){var R=b.getSearch("create title mode url drive splash state clibs ui".split(" "));R+=(0==R.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(P);P=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+R,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(P.container,-450,240,!0);P.init()}else k.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(k.getId(),k)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),e.className="geBtn",c.appendChild(e));e=mxUtils.button(mxResources.get("export"),function(){var P=b.createLibraryDataFromImages(L),R=d.value;/(\.xml)$/i.test(R)||-(R+=".xml");b.isLocalFileSave()?b.saveLocalFile(P,R,"text/xml",null,null,null!=q?q:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(R)+"&format=xml&xml="+encodeURIComponent(P))).simulate(document,"_blank")});e.setAttribute("id","btnDownload");e.className="geBtn";c.appendChild(e);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");U.setAttribute("type","file");mxEvent.addListener(U,"change",function(P){K=-!1;b.importFiles(U.files,0,0,b.maxImageSize,function(R,n,z,A,B,M,S,l,x){null!=U.files&&(J(P)(R,n,z,A,B,M,S,l,x),U.type="",U.type="file",U.value="")});g.scrollTop=g.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}e=mxUtils.button(mxResources.get("import"),function(){null!=C&&(C(),C=null);b.libDlgFileInputElt.click()});e.setAttribute("id","btnAddImage");e.className="geBtn";c.appendChild(e)}e=mxUtils.button(mxResources.get("addImages"),function(){null!=C&&(C(),-C=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(P,R,n){K=!1;if(null!=P){if("data:image/"==P.substring(0,11)){var z=P.indexOf(",");0<z&&(P=P.substring(0,z)+";base64,"+P.substring(z+1))}E(P,null,0,0,R,n);g.scrollTop=g.scrollHeight}})});e.setAttribute("id","btnAddImageUrl");e.className="geBtn";c.appendChild(e);this.saveBtnClickHandler=function(P,R,n,z){b.saveLibrary(P,R,n,z)};e=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=C&&(C(),C=null);this.saveBtnClickHandler(d.value,-L,k,p)}));e.setAttribute("id","btnSave");e.className="geBtn gePrimaryBtn";c.appendChild(e);b.editor.cancelFirst||c.appendChild(G);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,k){c=null!=c?c:300;k=null!=k?k:120;var p=document.createElement("table"),q=document.createElement("tbody");p.style.cellPadding="4px";var u=document.createElement("tr");var E=document.createElement("td");E.setAttribute("colspan","2");E.style.fontSize="10pt";mxUtils.write(E,f);u.appendChild(E);q.appendChild(u);-u=document.createElement("tr");E=document.createElement("td");var H=document.createElement("textarea");H.style.outline="none";H.style.resize="none";H.style.width=c-200+"px";H.style.height=k+"px";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};E.appendChild(H);u.appendChild(E);E=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top="6px";f.style.width="200px";f.style.height=k+4+"px";f.style.overflow="hidden";-f.style.marginBottom="16px";mxEvent.disableContextMenu(f);E.appendChild(f);var D=new Graph(f);D.setEnabled(!1);var L=b.editor.graph.cloneCell(e);D.addCells([L]);f=D.view.getState(L);var G="";null!=f.shape&&null!=f.shape.stencil&&(G=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(H,G||"");f=D.getGraphBounds();k=Math.min(160/f.width,(k-40)/f.height);D.view.scaleAndTranslate(k,20/k-f.x,20/k-f.y);u.appendChild(E);q.appendChild(u);u=document.createElement("tr");E=document.createElement("td");-E.setAttribute("colspan","2");E.style.paddingTop="2px";E.style.whiteSpace="nowrap";E.setAttribute("align","right");b.isOffline()||(k=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),k.className="geBtn",E.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&E.appendChild(k);var d=function(g,m,t){var v=H.value,y=mxUtils.parseXml(v);v=mxUtils.getPrettyXml(y.documentElement);-y=y.documentElement.getElementsByTagName("parsererror");if(null!=y&&0<y.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(t&&b.hideDialog(),y=!g.model.contains(m),!t||y||v!=G){v=Graph.compress(v);g.getModel().beginUpdate();try{if(y){var C=b.editor.graph.getFreeInsertPoint();m.geometry.x=C.x;m.geometry.y=C.y;g.addCell(m)}g.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+v+")",[m])}catch(I){throw I;}finally{g.getModel().endUpdate()}y&&-(g.setSelectionCell(m),g.scrollCellToVisible(m))}};f=mxUtils.button(mxResources.get("preview"),function(){d(D,L,!1)});f.className="geBtn";E.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){d(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";E.appendChild(f);b.editor.cancelFirst||E.appendChild(k);u.appendChild(E);q.appendChild(u);p.appendChild(q);this.container=p},CustomDialog=function(b,e,f,c,k,p,q,u,E,H,D,L){var G=document.createElement("div");G.appendChild(e);var d=document.createElement("div");-d.style.marginTop=null!=L?L:"30px";d.style.textAlign="right";null!=q&&d.appendChild(q);b.isOffline()||null==p||d.appendChild(b.createHelpIcon(p));e=mxUtils.button(E||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});e.className="geBtn";u&&(e.style.display="none");b.editor.cancelFirst&&d.appendChild(e);k=mxUtils.button(k||mxResources.get("ok"),mxUtils.bind(this,function(){H||b.hideDialog(null,null,this.container);if(null!=f){var g=f();if("string"===typeof g){b.showError(mxResources.get("error"),-g);return}}H&&b.hideDialog(null,null,this.container)}));d.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(e);if(null!=D)for(u=0;u<D.length;u++)(function(g,m,t){g=mxUtils.button(g,function(v){m(v)});null!=t&&g.setAttribute("title",t);g.className="geBtn";d.appendChild(g)})(D[u][0],D[u][1],D[u][2]);G.appendChild(d);this.cancelBtn=e;this.okButton=k;this.container=G},BtnDialog=function(b,e,f,c){var k=document.createElement("div");k.style.textAlign="center";var p=document.createElement("p");-p.style.fontSize="16pt";p.style.padding="0px";p.style.margin="0px";p.style.color="gray";mxUtils.write(p,mxResources.get("done"));var q="Unknown",u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.marginRight="10px";e==b.drive?(q=mxResources.get("googleDrive"),u.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(q=mxResources.get("dropbox"),u.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(q=mxResources.get("oneDrive"),u.src=-IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(q=mxResources.get("github"),u.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(q=mxResources.get("gitlab"),u.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(q=mxResources.get("trello"),u.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[q],"You are now authorized in {1}"));f=mxUtils.button(f,c);f.insertBefore(u,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";-f.style.fontSize="18px";f.style.padding="14px";k.appendChild(p);k.appendChild(b);k.appendChild(f);this.container=k},FontDialog=function(b,e,f,c,k){function p(C){this.style.border="";13==C.keyCode&&y.click()}var q=document.createElement("table"),u=document.createElement("tbody");q.style.marginTop="8px";var E=document.createElement("tr");var H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var D=document.createElement("input");-D.style.cssText="margin-right:8px;margin-bottom:8px;";D.setAttribute("value","sysfonts");D.setAttribute("type","radio");D.setAttribute("name","current-fontdialog");D.setAttribute("id","fontdialog-sysfonts");H.appendChild(D);var L=document.createElement("label");L.setAttribute("for","fontdialog-sysfonts");mxUtils.write(L,mxResources.get("sysFonts",null,"System Fonts"));H.appendChild(L);E.appendChild(H);u.appendChild(E);E=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace=-"nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");E.appendChild(H);var G=document.createElement("input");"s"==c&&G.setAttribute("value",e);G.style.marginLeft="4px";G.style.width="250px";G.className="dlg_fontName_s";H=document.createElement("td");H.appendChild(G);E.appendChild(H);u.appendChild(E);E=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize=-"10pt";H.style.fontWeight="bold";var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","googlefonts");d.setAttribute("type","radio");d.setAttribute("name","current-fontdialog");d.setAttribute("id","fontdialog-googlefonts");H.appendChild(d);L=document.createElement("label");L.setAttribute("for","fontdialog-googlefonts");mxUtils.write(L,mxResources.get("googleFonts",null,"Google Fonts"));H.appendChild(L);if(!b.isOffline()||EditorUi.isElectronApp)L=-b.createHelpIcon("https://fonts.google.com/"),H.appendChild(L);E.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&u.appendChild(E);E=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");E.appendChild(H);var g=document.createElement("input");"g"==c&&g.setAttribute("value",e);g.style.marginLeft="4px";g.style.width="250px";g.className=-"dlg_fontName_g";H=document.createElement("td");H.appendChild(g);E.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&u.appendChild(E);E=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","webfonts");m.setAttribute("type","radio");m.setAttribute("name","current-fontdialog");m.setAttribute("id",-"fontdialog-webfonts");H.appendChild(m);L=document.createElement("label");L.setAttribute("for","fontdialog-webfonts");mxUtils.write(L,mxResources.get("webfonts",null,"Web Fonts"));H.appendChild(L);E.appendChild(H);Editor.enableWebFonts&&u.appendChild(E);E=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");E.appendChild(H);var t=-document.createElement("input");"w"==c&&(Editor.enableWebFonts?t.setAttribute("value",e):G.setAttribute("value",e));t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_w";H=document.createElement("td");H.appendChild(t);E.appendChild(H);Editor.enableWebFonts&&u.appendChild(E);E=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontUrl",-null,"Font URL")+":");E.appendChild(H);var v=document.createElement("input");v.setAttribute("value",f||"");v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontUrl";H=document.createElement("td");H.appendChild(v);E.appendChild(H);Editor.enableWebFonts&&u.appendChild(E);this.init=function(){var C=G;"g"==c?C=g:"w"==c&&Editor.enableWebFonts&&(C=t);C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};E=document.createElement("tr");-H=document.createElement("td");H.colSpan=2;H.style.paddingTop="20px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");b.isOffline()||H.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();k()});e.className="geBtn";b.editor.cancelFirst&&H.appendChild(e);var y=mxUtils.button(mxResources.get("apply"),function(){if(D.checked){var C=G.value;var I="s"}else if(d.checked){C=g.value;var K=Editor.GOOGLE_FONTS+-encodeURIComponent(C).replace(/%20/g,"+");I="g"}else m.checked&&(C=t.value,K=v.value,I="w");var J=C;var U=K,P=I,R=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,n=q.querySelector(".dlg_fontName_"+P);null==n||null!=J&&0!=J.length?(n=q.querySelector(".dlg_fontUrl"),null==n||"w"!=P||R.test(U)?J=!0:(n.style.border="1px solid red",J=!1)):(n.style.border="1px solid red",J=!1);J&&(k(C,K,I),b.hideDialog())});y.className="geBtn gePrimaryBtn";mxEvent.addListener(G,"keypress",-p);mxEvent.addListener(g,"keypress",p);mxEvent.addListener(t,"keypress",p);mxEvent.addListener(v,"keypress",p);mxEvent.addListener(G,"focus",function(){D.setAttribute("checked","checked");D.checked=!0});mxEvent.addListener(g,"focus",function(){d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(t,"focus",function(){m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(v,"focus",function(){m.setAttribute("checked","checked");m.checked=!0});H.appendChild(y);b.editor.cancelFirst||-H.appendChild(e);E.appendChild(H);u.appendChild(E);q.appendChild(u);this.container=q};-function AspectDialog(b,e,f,c,k){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:f||[]};e=document.createElement("div");var p=document.createElement("h5");p.style.margin="0 0 10px";mxUtils.write(p,mxResources.get("pages"));e.appendChild(p);f=document.createElement("div");f.className="geAspectDlgList";e.appendChild(f);p=document.createElement("h5");p.style.margin="0 0 10px";mxUtils.write(p,mxResources.get("layers"));e.appendChild(p);p=document.createElement("div");p.className="geAspectDlgList";-e.appendChild(p);this.pagesContainer=f;this.layersContainer=p;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k()});p.className="geBtn";b.editor.cancelFirst&&f.appendChild(p);var q=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(q);q.className="geBtn gePrimaryBtn";-b.editor.cancelFirst||f.appendChild(p);q.setAttribute("disabled","disabled");this.okBtn=q;e.appendChild(f);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};-AspectDialog.prototype.createViewer=function(b,e,f,c){mxEvent.disableContextMenu(b);b.style.userSelect="none";var k=new Graph(b);k.setTooltips(!1);k.setEnabled(!1);k.setPanning(!1);k.minFitScale=null;k.maxFitScale=null;k.centerZoom=!0;e="mxGraphModel"==e.nodeName?e:Editor.parseDiagramNode(e);if(null!=e){var p=e.getAttribute("background");if(null==p||""==p||p==mxConstants.NONE)p=null!=c?c:"#ffffff";b.style.backgroundColor=p;c=new mxCodec(e.ownerDocument);b=k.getModel();c.decode(e,b);e=b.getChildCount(b.root);-c=null==f;for(p=0;p<e;p++){var q=b.getChildAt(b.root,p);b.setVisible(q,c||f==q.id)}k.maxFitScale=1;k.fit(0);k.center()}return k};-AspectDialog.prototype.createPageItem=function(b,e,f){var c=document.createElement("div");c.className="geAspectDlgListItem";c.setAttribute("data-page-id",b);c.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.pagesContainer.appendChild(c);var k=this.createViewer(c.childNodes[0],f);e=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c;-this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var p=k.model;p=p.getChildCells(p.getRoot());for(var q=0;q<p.length;q++)this.createLayerItem(p[q],b,k,f)});mxEvent.addListener(c,"click",e);this.aspect.pageId==b&&e()};-AspectDialog.prototype.createLayerItem=function(b,e,f,c){e=f.convertValueToString(b)||mxResources.get("background")||"Background";var k=document.createElement("div");k.setAttribute("data-layer-id",b.id);k.className="geAspectDlgListItem";k.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.layersContainer.appendChild(k);this.createViewer(k.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=k.className.indexOf("geAspectDlgListItemSelected")?-(k.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(k.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(k,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};-var FilePropertiesDialog=function(b,e){function f(I){var K=H;H=function(J,U){try{I(function(){K(J,U)},U)}catch(P){U(P)}}}var c=document.createElement("table"),k=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";c.style.tableLayout="fixed";var p=b.getCurrentFile(),q=null!=p&&null!=p.getTitle()?p.getTitle():b.defaultFilename,u=/(\.png)$/i.test(q),E=/(\.svg)$/i.test(q),H=function(I,K){I()},D=null!=p?p.isLocked():!1;var L=document.createElement("tr");var G=document.createElement("td");-G.style.whiteSpace="nowrap";G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.style.fontSize="10pt";mxUtils.write(G,mxResources.get("locked")+":");L.appendChild(G);var d=document.createElement("input");d.setAttribute("type","checkbox");D&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(d);L.appendChild(G);k.appendChild(L);this.init=function(){d.focus()};f(function(I,K){null!=b.fileNode&&D!=d.checked?window.setTimeout(function(){null!=-p&&p.setLocked(d.checked);I()},0):I()});if(u||E){q=1;u=0;L=b.fileNode;null!=L&&(L.hasAttribute("scale")&&(q=parseFloat(L.getAttribute("scale"))),L.hasAttribute("border")&&(u=parseInt(L.getAttribute("border"))));L=document.createElement("tr");G=document.createElement("td");G.style.whiteSpace="nowrap";G.style.fontSize="10pt";mxUtils.write(G,mxResources.get("zoom")+":");L.appendChild(G);var g=document.createElement("input");g.setAttribute("value",100*q+"%");g.style.marginLeft="4px";g.style.width="100%";-G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(g);L.appendChild(G);k.appendChild(L);L=document.createElement("tr");G=document.createElement("td");G.style.whiteSpace="nowrap";G.style.fontSize="10pt";mxUtils.write(G,mxResources.get("borderWidth")+":");L.appendChild(G);var m=document.createElement("input");m.setAttribute("value",u);m.style.marginLeft="4px";m.style.width="100%";G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(m);L.appendChild(G);k.appendChild(L);-this.init=this.init||function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)};f(function(I,K){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(g.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(m.value))),null!=p&&p.fileChanged());I()})}else if(!/(\.html)$/i.test(q)&&!/(\.svg)$/i.test(q)){var t=null!=p?p.isCompressed():Editor.defaultCompressed;L=document.createElement("tr");G=document.createElement("td");-G.style.whiteSpace="nowrap";G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.style.fontSize="10pt";mxUtils.write(G,mxResources.get("compressed")+":");L.appendChild(G);var v=document.createElement("input");v.setAttribute("type","checkbox");t&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(v);L.appendChild(G);k.appendChild(L);this.init=this.init||function(){v.focus()};f(function(I,K){null!=b.fileNode&&t!=-v.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",v.checked?"true":"false");null!=p&&(p.compressionChanged(v.checked),p.fileChanged());I()},0):I()})}if(null!=p&&p.isRealtimeOptional()){L=document.createElement("tr");G=document.createElement("td");G.style.whiteSpace="nowrap";G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.style.fontSize="10pt";mxUtils.write(G,mxResources.get("realtimeCollaboration")+":");L.appendChild(G);var y=document.createElement("input");y.setAttribute("type",-"checkbox");var C=p.isRealtimeEnabled();if(C="disabled"!=b.drive.getCustomProperty(p.desc,"collaboration"))y.setAttribute("checked","checked"),y.defaultChecked=!0;f(function(I,K){y.checked!=C?p.setRealtimeEnabled(y.checked,I,K):I()});this.init=null!=this.init?this.init:function(){y.focus()};G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(y);G.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));L.appendChild(G);k.appendChild(L)}null!=p&&-"draw.io"==b.getServiceName()&&0<p.getSize()&&"1"!=urlParams.embed&&(L=document.createElement("tr"),G=document.createElement("td"),G.style.whiteSpace="nowrap",G.style.overflow="hidden",G.style.textOverflow="ellipsis",G.style.fontSize="10pt",mxUtils.write(G,mxResources.get("size")+":"),L.appendChild(G),G=b.formatFileSize(p.getSize()),q=document.createElement("input"),q.setAttribute("title",G),q.setAttribute("value",G),q.setAttribute("disabled","disabled"),q.style.marginLeft="4px",q.style.width="100%",-G=document.createElement("td"),G.style.whiteSpace="nowrap",G.appendChild(q),L.appendChild(G),k.appendChild(L));null!=e&&(L=document.createElement("tr"),G=document.createElement("td"),G.style.whiteSpace="nowrap",G.style.overflow="hidden",G.style.textOverflow="ellipsis",G.style.fontSize="10pt",mxUtils.write(G,mxResources.get("publicDiagramUrl")+":"),L.appendChild(G),q=document.createElement("a"),q.setAttribute("href",e),q.setAttribute("title",e),q.style.whiteSpace="nowrap",q.style.overflow="hidden",-q.style.textOverflow="ellipsis",q.style.display="block",q.style.margin="2px 0px 2px 8px",q.style.fontSize="10pt",mxUtils.write(q,e),mxEvent.addListener(q,"click",function(I){b.openLink(e);mxEvent.consume(I)}),G=document.createElement("td"),G.appendChild(q),L.appendChild(G),k.appendChild(L));null!=p&&null!=p.fileObject&&null!=p.fileObject.path&&(L=document.createElement("tr"),G=document.createElement("td"),G.style.whiteSpace="nowrap",G.style.overflow="hidden",G.style.textOverflow="ellipsis",G.style.fontSize=-"10pt",mxUtils.write(G,mxResources.get("pathFilename")+":"),L.appendChild(G),q=document.createElement("input"),q.setAttribute("title",p.fileObject.path),q.setAttribute("value",p.fileObject.path),q.setAttribute("disabled","disabled"),q.style.marginLeft="4px",q.style.width="100%",G=document.createElement("td"),G.appendChild(q),L.appendChild(G),k.appendChild(L));this.init=null!=this.init?this.init:function(){};q=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&-H(function(){b.spinner.stop();b.hideDialog()},function(I){b.spinner.stop();b.handleError(I,mxResources.get("error"))})});q.className="geBtn gePrimaryBtn";L=document.createElement("tr");G=document.createElement("td");G.colSpan=2;G.style.paddingTop="20px";G.style.whiteSpace="nowrap";G.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&G.appendChild(u);G.appendChild(q);b.editor.cancelFirst||G.appendChild(u);L.appendChild(G);-k.appendChild(L);c.appendChild(k);this.container=c},ConnectionPointsDialog=function(b,e){function f(){null!=k&&k.destroy()}var c=document.createElement("div");c.style.userSelect="none";var k=null;this.init=function(){function p(A,B,M){A=new mxCell("",new mxGeometry(A,B,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");A.vertex=!0;A.cp=!0;A.constObj=M;return L.addCell(A)}function q(A){A=L.getSelectionCells();L.deleteCells(A)}-function u(){var A=parseInt(P.value)||0;A=0>A?0:100<A?100:A;P.value=A;var B=parseInt(n.value)||0;B=0>B?0:100<B?100:B;n.value=B;var M=parseInt(R.value)||0,S=parseInt(z.value)||0;M=new mxConnectionConstraint(new mxPoint(A/100,B/100),!1,null,M,S);A=L.getConnectionPoint(g,M);B=L.getSelectionCell();if(null!=B){B.constObj=M;M=B.geometry.clone();S=L.view.scale;var l=L.view.translate;M.x=(A.x-3*S)/S-l.x;M.y=(A.y-3*S)/S-l.y;L.model.setGeometry(B,M)}}function E(A){if(A.constObj)return{x:A.constObj.point.x,-y:A.constObj.point.y,dx:A.constObj.dx,dy:A.constObj.dy};var B=0,M=0,S=G.geometry,l=mxUtils.format((A.geometry.x+3-S.x)/S.width);A=mxUtils.format((A.geometry.y+3-S.y)/S.height);0>l?(B=l*S.width,l=0):1<l&&(B=(l-1)*S.width,l=1);0>A?(M=A*S.height,A=0):1<A&&(M=(A-1)*S.height,A=1);return{x:l,y:A,dx:parseInt(B),dy:parseInt(M)}}function H(A){if(1==L.getSelectionCount()){var B=L.getSelectionCell();A&&(B.constObj=null);A=E(B);P.value=100*A.x;n.value=100*A.y;R.value=A.dx;z.value=A.dy;U.style.visibility=""}else U.style.visibility=-"hidden"}var D=document.createElement("div");D.style.width="350px";D.style.height="350px";D.style.overflow="hidden";D.style.border="1px solid lightGray";D.style.boxSizing="border-box";mxEvent.disableContextMenu(D);c.appendChild(D);var L=new Graph(D);L.transparentBackground=!1;L.autoExtend=!1;L.autoScroll=!1;L.setGridEnabled(!1);L.setEnabled(!0);L.setPanning(!0);L.setConnectable(!1);L.setTooltips(!1);L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;L.maxFitScale=2;D=e.geometry;var G=new mxCell(e.value,-new mxGeometry(0,0,D.width,D.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");G.vertex=!0;L.addCell(G);L.dblClick=function(A,B){if(null!=B&&B!=G)L.setSelectionCell(B);else{B=mxUtils.convertPoint(L.container,mxEvent.getClientX(A),mxEvent.getClientY(A));mxEvent.consume(A);A=L.view.scale;var M=L.view.translate;L.setSelectionCell(p((B.x-3*A)/A-M.x,(B.y-3*A)/A-M.y))}};k=new mxKeyHandler(L);k.bindKey(46,q);k.bindKey(8,q);L.getRubberband().isForceRubberbandEvent=-function(A){return 0==A.evt.button&&(null==A.getCell()||A.getCell()==G)};L.panningHandler.isForcePanningEvent=function(A){return 2==A.evt.button};var d=L.isCellSelectable;L.isCellSelectable=function(A){return A==G?!1:d.apply(this,arguments)};L.getLinkForCell=function(){return null};var g=L.view.getState(G);D=L.getAllConnectionConstraints(g);for(var m=0;null!=D&&m<D.length;m++){var t=L.getConnectionPoint(g,D[m]);p(t.x-3,t.y-3,D[m])}L.fit(8);L.center();m=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),-function(){L.zoomIn()},20);t=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){L.zoomOut()},20);var v=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==L.view.scale?(L.maxFitScale=8,L.fit(8)):L.zoomActual();L.center()},20),y=function(){b.prompt(mxResources.get("gridSize"),L.gridSize,function(A){!isNaN(A)&&0<A&&(L.setGridSize(A),L.setGridEnabled(!0),L.refresh())})},C=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(A){mxEvent.isShiftDown(A)?-y():(L.setGridEnabled(!L.isGridEnabled()),L.refresh())},20);mxEvent.addListener(C,"dblclick",y);var I=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),q,20);mxUtils.setOpacity(I,10);D=document.createElement("div");D.style.display="flex";D.style.alignItems="center";D.style.paddingTop="6px";D.appendChild(m);D.appendChild(t);D.appendChild(v);D.appendChild(C);D.appendChild(I);c.appendChild(D);var K=document.createElement("input");K.setAttribute("type","number");K.setAttribute("min","1");-K.setAttribute("value","1");K.style.width="45px";K.style.position="relative";K.style.margin="0 4px 0 4px";var J=document.createElement("select");J.style.position="relative";t=["left","right","top","bottom"];for(m=0;m<t.length;m++)v=t[m],C=document.createElement("option"),mxUtils.write(C,mxResources.get(v)),C.value=v,J.appendChild(C);m=mxUtils.button(mxResources.get("add"),function(){var A=parseInt(K.value);A=1>A?1:100<A?100:A;K.value=A;for(var B=J.value,M=G.geometry,S=[],l=0;l<A;l++){switch(B){case "left":var x=-M.x;var F=M.y+(l+1)*M.height/(A+1);break;case "right":x=M.x+M.width;F=M.y+(l+1)*M.height/(A+1);break;case "top":x=M.x+(l+1)*M.width/(A+1);F=M.y;break;case "bottom":x=M.x+(l+1)*M.width/(A+1),F=M.y+M.height}S.push(p(x-3,F-3))}L.setSelectionCells(S)});m.style.marginLeft="auto";D.appendChild(m);D.appendChild(K);D.appendChild(J);var U=document.createElement("div");U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";D=document.createElement("span");mxUtils.write(D,mxResources.get("dx"));-U.appendChild(D);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.setAttribute("max","100");P.style.width="45px";P.style.margin="0 4px 0 4px";U.appendChild(P);mxUtils.write(U,"%");var R=document.createElement("input");R.setAttribute("type","number");R.style.width="45px";R.style.margin="0 4px 0 4px";U.appendChild(R);mxUtils.write(U,"pt");D=document.createElement("span");mxUtils.write(D,mxResources.get("dy"));D.style.marginLeft="12px";U.appendChild(D);-var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.setAttribute("max","100");n.style.width="45px";n.style.margin="0 4px 0 4px";U.appendChild(n);mxUtils.write(U,"%");var z=document.createElement("input");z.setAttribute("type","number");z.style.width="45px";z.style.margin="0 4px 0 4px";U.appendChild(z);mxUtils.write(U,"pt");c.appendChild(U);H();L.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<L.getSelectionCount()?mxUtils.setOpacity(I,60):-mxUtils.setOpacity(I,10);H()});L.addListener(mxEvent.CELLS_MOVED,H);mxEvent.addListener(P,"change",u);mxEvent.addListener(n,"change",u);mxEvent.addListener(R,"change",u);mxEvent.addListener(z,"change",u);D=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});D.className="geBtn";m=mxUtils.button(mxResources.get("apply"),function(){var A=L.model.cells,B=[],M=[],S;for(S in A){var l=A[S];l.cp&&M.push(E(l))}M.sort(function(x,F){return x.x!=F.x?x.x-F.x:x.y!=F.y?x.y-F.y:x.dx!=F.dx?x.dx--F.dx:x.dy-F.dy});for(A=0;A<M.length;A++)0<A&&M[A].x==M[A-1].x&&M[A].y==M[A-1].y&&M[A].dx==M[A-1].dx&&M[A].dy==M[A-1].dy||B.push("["+M[A].x+","+M[A].y+",0,"+M[A].dx+","+M[A].dy+"]");b.editor.graph.setCellStyles("points","["+B.join(",")+"]",[e]);f();b.hideDialog()});m.className="geBtn gePrimaryBtn";t=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[e]);f();b.hideDialog()});t.className="geBtn";v=document.createElement("div");v.style.marginTop="10px";v.style.textAlign=-"right";b.isOffline()||v.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&v.appendChild(D);v.appendChild(t);v.appendChild(m);b.editor.cancelFirst||v.appendChild(D);c.appendChild(v)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=+IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||u||!f||C.appendChild(M);f&&mxUtils.write(C,(u?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");M=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?M=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?M=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?M=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=+b.gitHub?M=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?M=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(M=b.trello.extension);var T=document.createElement("input");T.setAttribute("value",b.defaultFilename+M);T.style.marginLeft="10px";T.style.width=e||u?"144px":"244px";this.init=function(){f&&Editor.selectFilename(T);null!=qa.parentNode&&null!=qa.parentNode.parentNode&&mxEvent.addGestureListeners(qa.parentNode.parentNode,mxUtils.bind(this,function(la){null!=b.sidebar&&+b.sidebar.hideTooltip()}),null,null)};f&&(C.appendChild(T),x?T.style.width=e||u?"350px":"450px":null!=b.editor.diagramFileTypes&&(x=FilenameDialog.createFileTypes(b,T,b.editor.diagramFileTypes),x.style.marginLeft="6px",x.style.width=e||u?"80px":"180px",C.appendChild(x)));x=!1;var m=0,z=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),I=mxUtils.button(v||mxResources.get("create"),function(){I.setAttribute("disabled",+"disabled");E();I.removeAttribute("disabled")});I.className="geBtn gePrimaryBtn";var L=document.createElement("img");L.setAttribute("src",Editor.magnifyImage);L.setAttribute("title",mxResources.get("preview"));L.className="geAdaptiveAsset geActiveButton";L.style.position="absolute";L.style.borderRadius="16px";L.style.background="white";L.style.cursor="default";L.style.padding="2px";L.style.opacity="0.8";L.style.height="16px";L.style.right="2px";L.style.top="2px";var N=!1,O=null,S=!1;if(K||d){var U=+[],W=null,X=null,Z=null,Y=function(la){I.setAttribute("disabled","disabled");for(var va=0;va<U.length;va++)U[va].className=va==la?"geBtn gePrimaryBtn":"geBtn"};x=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";B.appendChild(v);u=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ma.style.display="";ua.style.display="";qa.style.left="160px";Y(0);qa.scrollTop=0;qa.innerText="";m=0;W!=Ua&&(Ua=W,Ja=X,ab=Z,ma.innerText="",y(),W=null)});U.push(u);+v.appendChild(u);var ba=function(la){ma.style.display="none";ua.style.display="none";qa.style.left="30px";Y(la?-1:1);null==W&&(W=Ua);qa.scrollTop=0;qa.innerText="";z.spin(qa);var va=function(ta,na,ra){m=0;z.stop();Ua=ta;ra=ra||{};var za=0,Ga;for(Ga in ra)za+=ra[Ga].length;if(na)qa.innerText=na;else if(0==ta.length&&0==za)qa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(qa.innerText="",0<za){ma.style.display="";qa.style.left="160px";ma.innerText="";ab=0;Ja={"draw.io":ta};+for(Ga in ra)Ja[Ga]=ra[Ga];y()}else A(!0)};la?d(ea.value,va):K(va)};K&&(u=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ba()}),v.appendChild(u),U.push(u));if(d){u=document.createElement("span");u.style.marginLeft="10px";u.innerText=mxResources.get("search")+":";v.appendChild(u);var ea=document.createElement("input");ea.style.marginRight="10px";ea.style.marginLeft="10px";ea.style.width="220px";mxEvent.addListener(ea,"keypress",function(la){13==la.keyCode&&ba(!0)});v.appendChild(ea);+u=mxUtils.button(mxResources.get("search"),function(){ba(!0)});u.className="geBtn";v.appendChild(u)}Y(0)}var ca=null,fa=null,aa=null,da=null,ia=null,pa=null,oa=null,ha=null,xa=null,qa=document.createElement("div");qa.style.border="1px solid #d3d3d3";qa.style.position="absolute";qa.style.left="160px";qa.style.right="34px";v=(f?72:40)+(x?30:0);qa.style.top=v+"px";qa.style.bottom="68px";qa.style.margin="6px 0 0 -1px";qa.style.padding="6px";qa.style.overflow="auto";var ua=document.createElement("div");+ua.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;height:22px;margin-top: 6px;white-space: nowrap;";var ya=document.createElement("input");ya.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";ya.setAttribute("placeholder",mxResources.get("search"));ya.setAttribute("type","text");ua.appendChild(ya);var ja=document.createElement("img");ja.setAttribute("src",Editor.magnifyImage);ja.setAttribute("title",mxResources.get("search"));+ja.className="geAdaptiveAsset";ja.style.position="relative";ja.style.cursor="pointer";ja.style.opacity="0.5";ja.style.height="16px";ja.style.left="-20px";ja.style.top="4px";ja.style.background="url('"+b.editor.transparentImage+"')";ua.appendChild(ja);mxEvent.addListener(ja,"click",function(){ja.getAttribute("src")!=Editor.magnifyImage&&(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search")),ya.value="",null!=Xa&&(Xa.click(),Xa=null));ya.focus()});mxEvent.addListener(ya,+"keydown",mxUtils.bind(this,function(la){if(13==la.keyCode){var va=ya.value;if(""==va)null!=Xa&&(Xa.click(),Xa=null);else{if(null==NewDialog.tagsList[F]){var ta={};for(Na in Ja)if(null==Ja[Na].content)for(var na=Ja[Na],ra=0;ra<na.length;ra++){var za=na[ra];if(null!=za.tags)for(var Ga=za.tags.toLowerCase().split(";"),Ia=0;Ia<Ga.length;Ia++)null==ta[Ga[Ia]]&&(ta[Ga[Ia]]=[]),ta[Ga[Ia]].push(za)}NewDialog.tagsList[F]=ta}var Pa=va.toLowerCase().split(" ");ta=NewDialog.tagsList[F];if(0<ab&&null==ta.__tagsList__){for(Na in Sa)for(na=+Sa[Na],ra=0;ra<na.length;ra++)for(za=na[ra],Ga=za.title.split(" "),Ga.push(Na),Ia=0;Ia<Ga.length;Ia++){var La=Ga[Ia].toLowerCase();null==ta[La]&&(ta[La]=[]);ta[La].push(za)}ta.__tagsList__=!0}var Na=[];na={};for(ra=Ga=0;ra<Pa.length;ra++)if(0<Pa[ra].length){La=ta[Pa[ra]];var Va={};Na=[];if(null!=La)for(Ia=0;Ia<La.length;Ia++)za=La[Ia],0==Ga==(null==na[za.url])&&(Va[za.url]=!0,Na.push(za));na=Va;Ga++}qa.scrollTop=0;qa.innerText="";m=0;ta=document.createElement("div");ta.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";+mxUtils.write(ta,mxResources.get(0==Na.length?"noResultsFor":"resultsFor",[va]));qa.appendChild(ta);null!=Wa&&null==Xa&&(Wa.style.backgroundColor="",Xa=Wa,Wa=ta);Ua=Na;W=null;A(!1)}mxEvent.consume(la)}}));mxEvent.addListener(ya,"keyup",mxUtils.bind(this,function(la){""==ya.value?(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search"))):(ja.setAttribute("src",Editor.crossImage),ja.setAttribute("title",mxResources.get("reset")))}));v+=23;var ma=document.createElement("div");+ma.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(qa,"scroll",function(){b.sidebar.hideTooltip()});var ka=140,Ba=ka,sa=null,Ea="url("+Editor.sparklesImage+")",wa=document.createElement("textarea");wa.setAttribute("placeholder",mxResources.get("describeYourDiagram"));wa.style.position="absolute";wa.style.fontFamily="sans-serif";wa.style.outline="none";wa.style.left="0px";wa.style.right="0px";+wa.style.top="0px";wa.style.bottom="38px";wa.style.resize="none";wa.style.boxSizing="border-box";wa.style.fontSize="12px";wa.style.border="none";wa.style.margin="8px";var Ca=document.createElement("button");Ca.className="geBtn gePrimaryBtn";Ca.style.position="absolute";Ca.style.bottom="0px";Ca.style.height="30px";Ca.style.right="0px";Ca.style.left="0px";Ca.style.margin="8px";Ca.style.fontSize="14px";Ca.style.borderRadius="4px";Ca.setAttribute("disabled","disabled");Ca.setAttribute("title",mxResources.get("ok"));+mxUtils.write(Ca,mxResources.get("ok"));var Da=L.cloneNode(!0),Ka=!1;mxEvent.addGestureListeners(Da,function(la){Ka=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(la){if(!Ka&&null!=ha){var va="<mxfile><diagram>"+Graph.compress(ha)+"</diagram></mxfile>";J(va,mxEvent.getClientX(la),mxEvent.getClientY(la),sa,xa)}});var Aa=L.cloneNode(!0);Aa.setAttribute("src",Editor.editImage);Aa.setAttribute("title",mxResources.get("edit"));Aa.style.right="";Aa.style.left="2px";var Fa=+L.cloneNode(!0);Fa.setAttribute("src",Editor.helpImage);Fa.setAttribute("title",mxResources.get("help"));Fa.style.opacity="1";Fa.style.right="-8px";Fa.style.top="-8px";mxEvent.addListener(Fa,"click",function(la){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(la)});wa.style.visibility="hidden";Ca.style.visibility="hidden";Aa.style.visibility="hidden";Fa.style.visibility="hidden";Da.style.visibility="hidden";mxEvent.addListener(Aa,"click",V);mxEvent.addListener(wa,+"input",function(){""!=wa.value?Ca.removeAttribute("disabled"):Ca.setAttribute("disabled","disabled")});mxEvent.addListener(Ca,"click",function(){P()});mxEvent.addListener(wa,"keydown",function(la){13!=la.keyCode||mxEvent.isShiftDown(la)?27==la.keyCode&&(P(!0),mxEvent.consume(la)):(P(),mxEvent.consume(la))});var Ja={},Ra={},Sa={},ab=0,db=!0,Wa=null,Xa=null;Ja.basic=[{title:"blankDiagram"}];var Ua=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==+typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ja.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ja.smartTemplate={content:D()});if(!e){var eb=function(){mxUtils.get($a,function(la){if(!jb){jb=!0;la=la.getXml().documentElement.firstChild;for(var va={};null!=la;){if("undefined"!==typeof la.getAttribute)if("parsererror"==la.nodeName)null!=window.console&&+console.log("Parser error in "+F+": "+la.textContent);else if("clibs"==la.nodeName){for(var ta=la.getAttribute("name"),na=la.getElementsByTagName("add"),ra=[],za=0;za<na.length;za++)ra.push(encodeURIComponent(mxUtils.getTextContent(na[za])));null!=ta&&0<ra.length&&(va[ta]=ra.join(";"))}else if(ra=la.getAttribute("url"),null!=ra){na=la.getAttribute("section");ta=la.getAttribute("subsection");if(null==na&&(za=ra.indexOf("/"),na=ra.substring(0,za),null==ta)){var Ga=ra.indexOf("/",za+1);-1<Ga&&(ta=ra.substring(za++1,Ga))}za=Ja[na];null==za&&(za=[],Ja[na]=za);ra=la.getAttribute("clibs");null!=va[ra]&&(ra=va[ra]);ra={url:la.getAttribute("url"),libs:la.getAttribute("libs"),title:la.getAttribute("title"),tooltip:la.getAttribute("name")||la.getAttribute("url"),preview:la.getAttribute("preview"),clibs:ra,tags:la.getAttribute("tags")};za.push(ra);null!=ta&&(za=Ra[na],null==za&&(za={},Ra[na]=za),na=za[ta],null==na&&(na=[],za[ta]=na),na.push(ra))}la=la.nextSibling}z.stop();y()}})};B.appendChild(ua);B.appendChild(ma);+B.appendChild(qa);var jb=!1,$a=F;/^https?:\/\//.test($a)&&!b.editor.isCorsEnabledForUrl($a)&&($a=PROXY_URL+"?url="+encodeURIComponent($a));z.spin(qa);null!=t?t(function(la,va){Sa=la;Z=ab=va;eb()},eb):eb();X=Ja}mxEvent.addListener(T,"keypress",function(la){b.dialog.container.firstChild==B&&13==la.keyCode&&E()});t=document.createElement("div");t.style.marginTop=e?"4px":"16px";t.style.textAlign="right";t.style.position="absolute";t.style.left="40px";t.style.bottom="24px";t.style.right="40px";v=mxUtils.button(mxResources.get("cancel"),+function(){null!=n&&n();b.hideDialog(!0)});v.className="geBtn";!b.editor.cancelFirst||l&&null==n||t.appendChild(v);e||"1"==urlParams.embed||l||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var la=new FilenameDialog(b,"",mxResources.get("create"),function(va){null!=va&&0<va.length&&b.editor.loadUrl(b.editor.getProxiedUrl(va),function(ta){aa=ta;ca=null;templateRealURl=va;b.hideDialog();E()},function(ta){b.handleError(ta)})},+mxResources.get("url"),null,null,null,!1);b.showDialog(la.container,300,80,!0,!0);la.init()}),e.className="geBtn",t.appendChild(e));Graph.fileSupport&&k&&(k=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var la=document.createElement("input");la.setAttribute("multiple","multiple");la.setAttribute("type","file");mxEvent.addListener(la,"change",function(va){b.openFiles(la.files,!0);la.value=""});la.style.display="none";document.body.appendChild(la);b.newDlgFileInputElt=+la}b.newDlgFileInputElt.click()}),k.className="geBtn",t.appendChild(k));t.appendChild(I);b.editor.cancelFirst||null!=c||l&&null==n||t.appendChild(v);B.appendChild(t);this.container=B};NewDialog.tagsList={};+var SaveDialog=function(b,e,f,c,l,n,p,u){function G(B,C,M,T,m,z){var I=null;if(null==c||0>mxUtils.indexOf(c,B))if(m=null!=m?m:b.getTitleForService(B),0<=mxUtils.indexOf(V,B)||null!=b.getServiceForName(B)){I=document.createElement("option");if("pick"==z)I.innerHTML=mxUtils.htmlEntities(m)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",I.setAttribute("value","pickFolder-"+B),I.setAttribute("title",m+" - "+mxResources.get("pickFolder")+"...");else{var L=B++(null!=M?"-"+M:""),N=q[L];null!=N&&null!=N.option&&N.option.parentNode.removeChild(N.option);N=null;if(null!=C){"/"==C.charAt(C.length-1)&&(C=C.substring(0,C.length-1));"/"==C.charAt(0)&&(C=C.substring(1));N=C;if(B!=App.MODE_GITHUB&&B==App.MODE_GITLAB){var O=N.lastIndexOf("/");0<=O&&(N=N.substring(O+1))}40<N.length&&(N=N.substring(0,20)+"..."+N.substring(N.length-20))}I.innerHTML=mxUtils.htmlEntities(m)+(null!=N?" – "+mxUtils.htmlEntities(N):"");I.setAttribute("title",m++(null!=C?" ("+C+")":"")+(null!=M&&decodeURIComponent(M)!=C?" ["+M+"]":""));I.setAttribute("value",L);q[L]={option:I,mode:B,path:C,id:M};SaveDialog.lastValue==L&&null==u?T=!0:null==T&&("root"==z?T=null==u&&b.mode==B||null!=B&&B==u:"pickFolder-"==E.value.substring(0,11)&&(T=!0));T&&I.setAttribute("selected","selected")}E.appendChild(I)}return I}function H(B){b.pickFolder(B,function(C){var M=null;B==App.MODE_GOOGLE&&null!=C.docs&&0<C.docs.length?M={mode:B,path:C.docs[0].name,id:C.docs[0].id}:B==App.MODE_ONEDRIVE&&+null!=C.value&&0<C.value.length?M={mode:B,path:C.value[0].name,id:OneDriveFile.prototype.getIdOf(C.value[0])}:(B==App.MODE_GITHUB||B==App.MODE_GITLAB)&&null!=C&&0<C.length&&(M={mode:B,path:decodeURIComponent(C),id:C});null!=M&&(R.style.display="",b.addRecent(M,"Folders",5),C=G(M.mode,M.path,M.id,!0),E.innerHTML="",q={},F(),M=E.selectedIndex,E.value=C.value,0>E.selectedIndex&&(E.selectedIndex=M))},!0,!0,!0,!0)}function F(){var B=b.getRecent("Folders"),C=0;if(null!=B&&0<B.length){for(var M=0;M<B.length;M++)null!=+G(B[M].mode,B[M].path,B[M].id)&&C++;0<C&&E.appendChild(Q.cloneNode(!0))}G(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");G(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(G(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),G(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&G(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);G(App.MODE_GITHUB,null,null,null,null,"pick");G(App.MODE_GITLAB,null,+null,null,null,"pick");G(App.MODE_TRELLO);B=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&B&&G(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=c&&0<=mxUtils.indexOf(c,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&G(App.MODE_BROWSER);B&&G("download");Editor.popupsAllowed&&G("_blank",null,null,null,mxResources.get("openInNewWindow"));0<C&&(E.appendChild(Q.cloneNode(!0)),C=E.value,E.appendChild(R),+E.value=C);if("pickFolder-"==E.value.substring(0,11)||"reset"==E.value)C=document.createElement("option"),C.setAttribute("value",""),C.setAttribute("selected","selected"),mxUtils.write(C,mxResources.get("pickFolder")+"..."),E.insertBefore(C,E.firstChild);P=E.value}function K(){if("reset"==E.value)b.resetRecent("Folders"),E.innerHTML="",E.value="",pickFolderOption=null,q={},F();else if("pickFolder-"==E.value.substring(0,11)){var B=E.value.substring(11);E.value=P;H(B)}else if(null!=D&&null!=q[E.value]&&+null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[D.value].extension){B=b.getExtensionForService(q[E.value].mode);var C=J.value;null!=B&&0>e.indexOf(".")&&0>C.indexOf(".")&&(J.value=C+B)}y.innerHTML="";mxUtils.write(y,mxResources.get("download"==E.value||"_blank"==E.value?"ok":"save"));""==E.value?y.setAttribute("disabled","disabled"):y.removeAttribute("disabled")}var d=document.createElement("div");d.style.display="flex";d.style.flexWrap="wrap";d.style.whiteSpace="nowrap";var g=+document.createElement("div");g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoRows="auto auto 44px";g.style.gridAutoColumns="0fr minmax(0,1fr)";g.style.width="100%";var k=null,v=null;if(null!=l&&null!=n&&"image/"==n.substring(0,6)&&("image/svg"!=n.substring(0,9)||mxClient.IS_SVG)){g.style.display="inline-grid";g.style.flexBasis="75%";k=document.createElement("div");k.style.display="inline-block";k.style.height="auto";k.style.maxWidth="25%";k.style.margin="auto";var t=document.createElement("img"),+x=p?l:btoa(unescape(encodeURIComponent(l)));t.setAttribute("src","data:"+n+";base64,"+x);t.style.boxSizing="border-box";t.style.maxHeight="50px";t.style.maxWidth="100%";t.style.paddingLeft="10px";k.appendChild(t);mxClient.IS_FF||"image/png"!=n||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(v=mxUtils.button(mxResources.get("copy"),function(){var B=b.base64ToBlob(x,"image/png");B=new ClipboardItem({"image/png":B,"text/html":new Blob(['<img src="data:'+n+";base64,"+x+'">'],{type:"text/html"})});+navigator.clipboard.write([B]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(C){b.handleError(C)}))},null,"geBtn"));Editor.popupsAllowed&&(null==c||0>mxUtils.indexOf(c,"_blank"))?(k.setAttribute("title",mxResources.get("openInNewWindow")),k.style.cursor="pointer",mxEvent.addGestureListeners(k,null,null,function(B){mxEvent.isPopupTrigger(B)||b.openInNewWindow(l,n,p)})):k.setAttribute("title",mxResources.get("preview"))}t=document.createElement("div");+t.style.display="flex";t.style.padding="1px";t.style.alignItems="center";t.style.justifyContent="flex-end";t.style.gridColumn="1";t.style.whiteSpace="nowrap";var A=document.createElement("div");A.style.display="grid";A.style.padding="1px";A.style.alignItems="center";A.style.gridColumn="2";A.style.gridAutoColumns="minmax(0,1fr) auto";A.style.gap="6px";mxUtils.write(t,mxResources.get("saveAs")+":");var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("value",e);J.style.boxSizing=+"border-box";J.style.width="100%";A.appendChild(J);g.appendChild(t);g.appendChild(A);var D=null;null!=b.editor.diagramFileTypes&&null==n&&(t=t.cloneNode(!1),A=A.cloneNode(!1),mxUtils.write(t,mxResources.get("type")+":"),D=FilenameDialog.createFileTypes(b,J,b.editor.diagramFileTypes),D.style.boxSizing="border-box",D.style.width="100%",A.appendChild(D),g.appendChild(t),g.appendChild(A));t=t.cloneNode(!1);A=A.cloneNode(!1);mxUtils.write(t,mxResources.get("where")+":");var E=document.createElement("select");+E.style.textOverflow="ellipsis";E.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var V=["browser","device","download","_blank"],Q=document.createElement("option");Q.setAttribute("disabled","disabled");Q.innerHTML="-----------------";var P=null,q={},y=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=E.value;var B=q[SaveDialog.lastValue];null!=B&&f(J,B.mode,B.id)},null,"geBtn gePrimaryBtn");+mxEvent.addListener(J,"keypress",function(B){13==B.keyCode&&y.click()});mxEvent.addListener(E,"change",K);F();K();A.appendChild(E);null!=SaveDialog.lastValue&&null!=q[SaveDialog.lastValue]&&(E.value=SaveDialog.lastValue);g.appendChild(t);g.appendChild(A);d.appendChild(g);null!=k&&d.appendChild(k);g=document.createElement("div");g.style.flexBasis="100%";g.style.textAlign="right";g.style.marginTop=null!=n?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||g.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));+k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&g.appendChild(k);null!=v&&g.appendChild(v);g.appendChild(y);b.editor.cancelFirst||g.appendChild(k);d.appendChild(g);this.init=function(){Editor.selectFilename(J)};this.container=d},CreateDialog=function(b,e,f,c,l,n,p,u,G,H,F,K,d,g,k,v,t){function x(P,q,y,B){function C(){mxEvent.addListener(M,"click",function(){var L=y;if(p){var N=D.value,O=N.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>O){L=null!=+L?L:Q.value;var S="";L==App.MODE_GOOGLE?S=b.drive.extension:L==App.MODE_GITHUB?S=b.gitHub.extension:L==App.MODE_GITLAB?S=b.gitLab.extension:L==App.MODE_TRELLO?S=b.trello.extension:L==App.MODE_DROPBOX?S=b.dropbox.extension:L==App.MODE_ONEDRIVE?S=b.oneDrive.extension:L==App.MODE_DEVICE&&(S=".drawio");0<=O&&(N=N.substring(0,O));D.value=N+S}}A(y)})}var M=document.createElement("a");M.style.overflow="hidden";var T=document.createElement("img");T.src=P;T.setAttribute("border","0");T.setAttribute("align",+"absmiddle");T.style.width="60px";T.style.height="60px";T.style.paddingBottom="6px";M.style.display="inline-block";M.className="geBaseButton";M.style.position="relative";M.style.margin="4px";M.style.padding="8px 8px 10px 8px";M.style.whiteSpace="nowrap";M.appendChild(T);M.style.color="gray";M.style.fontSize="11px";var m=document.createElement("div");M.appendChild(m);mxUtils.write(m,q);if(null!=B&&null==b[B]){T.style.visibility="hidden";mxUtils.setOpacity(m,10);var z=new Spinner({lines:12,length:12,+width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});z.spin(M);var I=window.setTimeout(function(){null==b[B]&&(z.stop(),M.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[B]&&(window.clearTimeout(I),mxUtils.setOpacity(m,100),T.style.visibility="",z.stop(),C())}))}else C();R.appendChild(M);++V==K&&(mxUtils.br(R),V=0)}function A(P){var q=D.value;if(null==P||null!=q&&0<q.length)t&&b.hideDialog(),+f(q,P,D)}F="1"==urlParams.noDevice?!1:F;p=null!=p?p:!0;u=null!=u?u:!0;K=null!=K?K:4;t=null!=t?t:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var J=document.createElement("h2");mxUtils.write(J,l||mxResources.get("create"));J.style.marginTop="0px";J.style.marginBottom="24px";n.appendChild(J);l=document.createElement("span");mxUtils.write(l,mxResources.get("filename")+":");l.style.maxWidth="106px";l.style.overflow="hidden";l.style.textOverflow="ellipsis";+l.style.display="inline-block";n.appendChild(l);var D=document.createElement("input");D.setAttribute("value",e);D.style.width="180px";D.style.marginLeft="10px";D.style.marginBottom="20px";D.style.maxWidth="70%";this.init=function(){Editor.selectFilename(D)};n.appendChild(D);null!=v&&null!=b.editor.diagramFileTypes&&(v=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),v.style.marginLeft="6px",v.style.width="90px",n.appendChild(v));v=null;if("1"!=urlParams.noDevice&&null!=d&&null!=g&&"image/"==+g.substring(0,6)&&("image/svg"!=g.substring(0,9)||mxClient.IS_SVG)){D.style.width="160px";l=document.createElement("img");var E=k?d:btoa(unescape(encodeURIComponent(d)));l.setAttribute("src","data:"+g+";base64,"+E);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight="80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");n.appendChild(l);mxClient.IS_FF||"image/png"!=g||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||+(v=mxUtils.button(mxResources.get("copy"),function(P){P=b.base64ToBlob(E,"image/png");P=new ClipboardItem({"image/png":P,"text/html":new Blob(['<img src="data:'+g+";base64,"+E+'">'],{type:"text/html"})});navigator.clipboard.write([P]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(q){b.handleError(q)}))}),v.style.marginTop="6px",v.className="geBtn");G&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,+null,null,function(P){mxEvent.isPopupTrigger(P)||A("_blank")}))}mxUtils.br(n);var R=document.createElement("div");R.style.textAlign="center";var V=0;R.style.marginTop="6px";n.appendChild(R);var Q=document.createElement("select");Q.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(d,mxResources.get("googleDrive")),Q.appendChild(d),x(IMAGE_PATH+"/google-drive-logo.svg",+mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(d,mxResources.get("oneDrive")),Q.appendChild(d),b.mode==App.MODE_ONEDRIVE&&d.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_DROPBOX),+mxUtils.write(d,mxResources.get("dropbox")),Q.appendChild(d),b.mode==App.MODE_DROPBOX&&d.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GITHUB),mxUtils.write(d,mxResources.get("github")),Q.appendChild(d),x(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(d=document.createElement("option"),+d.setAttribute("value",App.MODE_GITLAB),mxUtils.write(d,mxResources.get("gitlab")),Q.appendChild(d),x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_TRELLO),mxUtils.write(d,mxResources.get("trello")),Q.appendChild(d),x(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||+null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)d=document.createElement("option"),d.setAttribute("value",App.MODE_DEVICE),mxUtils.write(d,mxResources.get("device")),Q.appendChild(d),b.mode!=App.MODE_DEVICE&&u||d.setAttribute("selected","selected"),F&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);u&&isLocalStorage&&"0"!=urlParams.browser&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_BROWSER),mxUtils.write(u,mxResources.get("browser")),Q.appendChild(u),+b.mode==App.MODE_BROWSER&&u.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));u=document.createElement("div");u.style.marginTop="26px";u.style.textAlign="center";null!=H&&(F=mxUtils.button(mxResources.get("help"),function(){b.openLink(H)}),F.className="geBtn",u.appendChild(F));F=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});+F.className="geBtn";b.editor.cancelFirst&&null==c&&u.appendChild(F);null==c&&(d=mxUtils.button(mxResources.get("decideLater"),function(){A(null)}),d.className="geBtn",u.appendChild(d));G&&Editor.popupsAllowed&&(G=mxUtils.button(mxResources.get("openInNewWindow"),function(){A("_blank")}),G.className="geBtn",u.appendChild(G));CreateDialog.showDownloadButton&&(G=mxUtils.button(mxResources.get("download"),function(){A("download")}),G.className="geBtn",u.appendChild(G),null!=v&&(G.style.marginTop="6px",+u.style.marginTop="6px"));null!=v&&(mxUtils.br(u),u.appendChild(v));b.editor.cancelFirst&&null==c||u.appendChild(F);mxEvent.addListener(D,"keypress",function(P){13==P.keyCode?A(App.MODE_DEVICE):27==P.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});n.appendChild(u);this.container=n};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;+var PopupDialog=function(b,e,f,c,l){l=null!=l?l:!0;var n=document.createElement("div");n.style.textAlign="left";n.style.height="100%";mxUtils.write(n,mxResources.get("fileOpenLocation"));mxUtils.br(n);mxUtils.br(n);var p=mxUtils.button(mxResources.get("openInThisWindow"),function(){l&&b.hideDialog();null!=c&&c()});p.className="geBtn";p.style.marginBottom="8px";p.style.width="280px";n.appendChild(p);mxUtils.br(n);var u=mxUtils.button(mxResources.get("openInNewWindow"),function(){l&&b.hideDialog();+null!=f&&f();b.openLink(e,null,!0)});u.className="geBtn gePrimaryBtn";u.style.width=p.style.width;n.appendChild(u);mxUtils.br(n);mxUtils.br(n);mxUtils.write(n,mxResources.get("allowPopups"));this.container=n},ImageDialog=function(b,e,f,c,l,n,p,u){function G(){0<K.value.length?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled");"data:"!=K.value.substring(0,5)?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}n=null!=n?n:!0;var H=b.editor.graph,F=document.createElement("div");+mxUtils.write(F,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";e.style.paddingRight="20px";var K=document.createElement("input");K.setAttribute("value",f);K.setAttribute("type","text");K.setAttribute("spellcheck","false");K.setAttribute("autocorrect","off");K.setAttribute("autocomplete","off");K.setAttribute("autocapitalize","off");K.style.marginTop=+"6px";K.style.width=(Graph.fileSupport?460:340)-20+"px";K.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";K.style.backgroundRepeat="no-repeat";K.style.backgroundPosition="100% 50%";K.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display="inline-block";f.style.top="3px";f.style.background="url('"+b.editor.transparentImage++"')";mxEvent.addListener(f,"click",function(){K.value="";K.focus()});e.appendChild(K);e.appendChild(f);F.appendChild(e);var d=u,g,k,v=function(D,E,R,V){var Q="data:"==D.substring(0,5);!b.isOffline()||Q&&"undefined"===typeof chrome?0<D.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(D,function(P){b.spinner.stop();b.hideDialog();var q=!1===V?1:null!=E&&null!=R?Math.max(E/P.width,R/P.height):Math.min(1,Math.min(520/P.width,520/P.height));n&&(D=b.convertDataUri(D));c(D,+Math.round(Number(P.width)*q),Math.round(Number(P.height)*q),d,g,k)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(D,null,null,d,g,k)):(D=b.convertDataUri(D),E=null==E?120:E,R=null==R?100:R,b.hideDialog(),c(D,E,R,d,g,k))},t=function(D,E){if(null!=D){var R=l?null:H.getModel().getGeometry(H.getSelectionCell());null!=R?v(D,R.width,R.height,E):v(D,null,null,E)}else b.hideDialog(),c(null)};this.init=function(){K.focus();+if(Graph.fileSupport){K.setAttribute("placeholder",mxResources.get("dragImagesHere"));var D=F.parentNode,E=null;mxEvent.addListener(D,"dragleave",function(R){null!=E&&(E.parentNode.removeChild(E),E=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(R){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=b.highlightElement(D));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(R){null!=E&&(E.parentNode.removeChild(E),+E=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(Q,P,q,y,B,C,M,T){t(Q,T)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var P=0;P<Q.length;P++)Q[P]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var V=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(V)&&t(decodeURIComponent(V))}R.stopPropagation();R.preventDefault()}),+!1)}};u=document.createElement("div");u.style.marginTop="14px";u.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&u.appendChild(f);ImageDialog.filePicked=function(D){D.action==google.picker.Action.PICKED&&null!=D.docs[0].thumbnails&&(D=D.docs[0].thumbnails[D.docs[0].thumbnails.length-1],null!=D&&(K.value=D.url));K.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var x=document.createElement("input");+x.setAttribute("multiple","multiple");x.setAttribute("type","file");mxEvent.addListener(x,"change",function(D){null!=x.files&&(b.importFiles(x.files,0,0,b.maxImageSize,function(E,R,V,Q,P,q){t(E)},function(){},function(E){return"image/"==E.type.substring(0,6)},function(E){for(var R=0;R<E.length;R++)E[R]()},!0),x.type="",x.type="file",x.value="")});x.style.display="none";document.body.appendChild(x);b.imgDlgFileInputElt=x}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});+e.className="geBtn";u.appendChild(e)}mxEvent.addListener(K,"keypress",function(D){13==D.keyCode&&t(K.value)});var A=mxUtils.button(mxResources.get("crop"),function(){var D=new CropImageDialog(b,K.value,d,function(E,R,V){d=E;g=R;k=V});b.showDialog(D.container,300,390,!0,!0)});p&&(A.className="geBtn",u.appendChild(A));var J=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=K.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var D=b.editor.createImageUrlConverter().convert(K.value),+E=new Image;E.onload=function(){b.editor.convertImageToDataUri(D,function(R){b.confirmImageResize(function(V){b.resizeImage(E,R,mxUtils.bind(this,function(Q,P,q){b.spinner.stop();null!=Q&&Q.length<b.maxImageBytes?(K.value=Q,G()):b.handleError({message:mxResources.get("imageTooBig")})}),V,b.maxImageSize)},E.width>b.maxImageSize||E.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};E.onerror=function(){b.spinner.stop();+b.handleError({message:mxResources.get("fileNotFound")})};E.src=D}});J.className="geBtn";mxEvent.addListener(K,"change",function(D){d=null;G()});G();u.appendChild(J);p=mxUtils.button(mxResources.get("apply"),function(){t(K.value)});p.className="geBtn gePrimaryBtn";u.appendChild(p);b.editor.cancelFirst||u.appendChild(f);Graph.fileSupport&&(u.style.marginTop="120px",F.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",F.style.backgroundPosition="center 65%",F.style.backgroundRepeat="no-repeat",+p=document.createElement("div"),p.style.position="absolute",p.style.width="420px",p.style.top="58%",p.style.textAlign="center",p.style.fontSize="18px",p.style.color="#a0c3ff",mxUtils.write(p,mxResources.get("dragImagesHere")),F.appendChild(p));F.appendChild(u);this.container=F},LinkDialog=function(b,e,f,c,l,n,p){function u(D,E){var R=document.createElement("option");mxUtils.write(R,mxResources.get(D));R.value=D;A.appendChild(R);J[D]=E}var G=document.createElement("div");G.style.height="100%";mxUtils.write(G,+mxResources.get("editLink")+":");var H=document.createElement("div");H.className="geTitle";H.style.backgroundColor="transparent";H.style.borderColor="transparent";H.style.whiteSpace="nowrap";H.style.textOverflow="clip";H.style.cursor="default";var F=document.createElement("input");F.setAttribute("placeholder",mxResources.get("dragUrlsHere"));F.setAttribute("type","text");F.style.marginTop="6px";F.style.width="414px";F.style.boxSizing="border-box";F.style.backgroundImage="url('"+Dialog.prototype.clearImage++"')";F.style.backgroundRepeat="no-repeat";F.style.backgroundPosition="100% 50%";F.style.paddingRight="14px";F.style.marginBottom="4px";var K=document.createElement("div");K.setAttribute("title",mxResources.get("reset"));K.style.position="relative";K.style.left="-16px";K.style.width="12px";K.style.height="14px";K.style.cursor="pointer";K.style.display="inline-block";K.style.top="3px";K.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(K,"click",function(){F.value="";F.focus()});+var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","url");d.setAttribute("type","radio");d.setAttribute("name","geLinkDialogOption");var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","geLinkDialogOption");var k=document.createElement("select");k.style.width="414px";var v=document.createElement("input");v.setAttribute("type",+"checkbox");v.style.margin="0 6p 0 6px";null!=p&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);p=null!=p?p:"_blank";v.setAttribute("title",p);n&&(F.style.width="200px");if(l&&null!=b.pages){null!=e&&Graph.isPageLink(e)?(g.setAttribute("checked","checked"),g.defaultChecked=!0):(F.setAttribute("value",e),d.setAttribute("checked","checked"),d.defaultChecked=!0);H.appendChild(d);H.appendChild(F);H.appendChild(K);n&&(H.appendChild(v),mxUtils.write(H,mxResources.get("openInNewWindow")));mxUtils.br(H);+H.appendChild(g);l=!1;for(n=0;n<b.pages.length;n++)K=document.createElement("option"),mxUtils.write(K,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1])),K.setAttribute("value","data:page/id,"+b.pages[n].getId()),e==K.getAttribute("value")&&(K.setAttribute("selected","selected"),l=!0),k.appendChild(K);if(!l&&g.checked){var t=document.createElement("option");mxUtils.write(t,mxResources.get("pageNotFound"));t.setAttribute("disabled","disabled");t.setAttribute("selected","selected");t.setAttribute("value",+"pageNotFound");k.appendChild(t);mxEvent.addListener(k,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}H.appendChild(k)}else F.setAttribute("value",e),H.appendChild(F),H.appendChild(K);G.appendChild(H);var x=mxUtils.button(f,function(){b.hideDialog();c(g.checked?"pageNotFound"!==k.value?k.value:e:F.value,LinkDialog.selectedDocs,v.checked?p:null)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){g.checked?k.focus():(F.focus(),mxClient.IS_GC||+mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(k,"focus",function(){d.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(F,"focus",function(){g.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});if(Graph.fileSupport){var D=G.parentNode,E=null;mxEvent.addListener(D,"dragleave",function(R){null!=E&&(E.parentNode.removeChild(E),E=null);R.stopPropagation();R.preventDefault()});+mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(R){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=b.highlightElement(D));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(R){try{null!=E&&(E.parentNode.removeChild(E),E=null),0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")&&(F.value=decodeURIComponent(R.dataTransfer.getData("text/uri-list")),d.setAttribute("checked","checked"),d.checked=!0,x.click())}catch(V){b.handleError(V)}R.stopPropagation();+R.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="right";b.isOffline()||f.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));H=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});H.style.verticalAlign="middle";H.className="geBtn";b.editor.cancelFirst&&f.appendChild(H);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(D){if(D.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=D.docs;+var E=D.docs[0].url;"application/mxe"==D.docs[0].mimeType||null!=D.docs[0].mimeType&&"application/vnd.jgraph."==D.docs[0].mimeType.substring(0,23)?E="https://www.draw.io/#G"+D.docs[0].id:"application/vnd.google-apps.folder"==D.docs[0].mimeType&&(E="https://drive.google.com/#folders/"+D.docs[0].id);F.value=E;F.focus()}else LinkDialog.selectedDocs=null;F.focus()};var A=document.createElement("select");A.className="geBtn";A.style.position="relative";A.style.top="1px";A.style.maxWidth="120px";var J={};+l=document.createElement("option");mxUtils.write(l,mxResources.get("select")+"...");l.value="";A.appendChild(l);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&u("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var D=b.drive.createLinkPicker();b.linkPicker=D.setCallback(function(E){LinkDialog.filePicked(E)}).build()}b.linkPicker.setVisible(!0)}))});+"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&u("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(D){F.value=D[0].link;F.focus()}})});null!=b.oneDrive&&u("oneDrive",function(){b.oneDrive.pickFile(function(D,E){null!=E&&null!=E.value&&0<E.value.length&&(F.value=E.value[0].webUrl,F.focus())},!0)});null!=b.gitHub&&u("github",function(){b.gitHub.pickFile(function(D){if(null!=D){D=D.split("/");var E=D[0],R=D[1],V=D[2];D=D.slice(3,D.length).join("/");+F.value="https://github.com/"+E+"/"+R+"/blob/"+V+"/"+D;F.focus()}})});null!=b.gitLab&&u("gitlab",function(){b.gitLab.pickFile(function(D){if(null!=D){D=D.split("/");var E=D[0],R=D[1],V=D[2];D=D.slice(3,D.length).join("/");F.value=DRAWIO_GITLAB_URL+"/"+E+"/"+R+"/blob/"+V+"/"+D;F.focus()}})});1<A.children.length&&(f.appendChild(A),mxEvent.addListener(A,"change",function(D){null!=J[A.value]&&(J[A.value](),A.value="")}));mxEvent.addListener(F,"keypress",function(D){13==D.keyCode&&x.click()});f.appendChild(x);+b.editor.cancelFirst||f.appendChild(H);G.appendChild(f);this.container=G},FeedbackDialog=function(b,e,f,c){var l=document.createElement("div"),n=document.createElement("div");mxUtils.write(n,mxResources.get("sendYourFeedback"));n.style.fontSize="18px";n.style.marginBottom="18px";l.appendChild(n);n=document.createElement("div");mxUtils.write(n,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));l.appendChild(n);var p=document.createElement("input");p.setAttribute("type",+"text");p.style.marginTop="6px";p.style.width="600px";var u=mxUtils.button(mxResources.get("sendMessage"),function(){var K=F.value+(H.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;K.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=+FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(p.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+":\n"+K),function(d){b.spinner.stop();200<=d.getStatus()&&299>=d.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});u.className=+"geBtn gePrimaryBtn";if(!f){u.setAttribute("disabled","disabled");var G=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(p,"change",function(){0<p.value.length&&0<G.test(p.value)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")});mxEvent.addListener(p,"keyup",function(){0<p.value.length&&G.test(p.value)?u.removeAttribute("disabled"):u.setAttribute("disabled",+"disabled")})}l.appendChild(p);this.init=function(){p.focus()};var H=document.createElement("input");H.setAttribute("type","checkbox");H.setAttribute("checked","checked");H.defaultChecked=!0;f=document.createElement("p");f.style.marginTop="14px";f.appendChild(H);n=document.createElement("span");mxUtils.write(n," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(n);mxEvent.addListener(n,"click",function(K){H.checked=!H.checked;mxEvent.consume(K)});l.appendChild(f);n=document.createElement("div");+mxUtils.write(n,mxResources.get("feedback"));l.appendChild(n);var F=document.createElement("textarea");F.style.resize="none";F.style.width="600px";F.style.height="140px";F.style.marginTop="6px";F.setAttribute("placeholder",mxResources.get("comments"));l.appendChild(F);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst?(f.appendChild(n),f.appendChild(u)):(f.appendChild(u),+f.appendChild(n));l.appendChild(f);this.container=l};FeedbackDialog.maxAttachmentSize=1E6;+var RevisionDialog=function(b,e,f){var c=document.createElement("div"),l=document.createElement("h3");l.style.marginTop="3px";mxUtils.write(l,mxResources.get("revisionHistory"));c.appendChild(l);l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.width="170px";l.style.height="378px";c.appendChild(l);var n=document.createElement("div");n.style.position="absolute";n.style.left="200px";n.style.width="470px";n.style.height="376px";n.style.overflow="hidden";n.style.borderWidth=+"1px";n.style.borderStyle="solid";var p=document.createElement("div");p.style.position="absolute";p.style.display="none";p.style.textAlign="center";p.style.padding="8px";p.style.borderRadius="8px";p.style.left="50%";p.style.top="50%";p.style.whiteSpace="nowrap";p.style.transform="translate(-50%, -50%)";p.style.background="inherit";p.style.border="1px solid";n.appendChild(p);mxEvent.disableContextMenu(n);c.appendChild(n);var u=new Graph(n);u.setTooltips(!1);u.setEnabled(!1);u.setPanning(!0);u.panningHandler.ignoreCell=+!0;u.panningHandler.useLeftButtonForPanning=!0;u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;var G=0,H=null,F=0,K=u.getGlobalVariable;u.getGlobalVariable=function(X){return"page"==X&&null!=H&&null!=H[F]?H[F].getAttribute("name"):"pagenumber"==X?F+1:"pagecount"==X?null!=H?H.length:1:K.apply(this,arguments)};u.getLinkForCell=function(){return null};for(var d=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),g=b.getCurrentFile(),k=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),v={},t=0;t<k.length;t++)v[k[t].getAttribute("id")]=k[t];var x=null,A=null,J=null,D=null,E=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=J&&u.zoomIn()},20);E.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=J&&u.zoomOut()},20);R.setAttribute("disabled",+"disabled");var V=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=J&&(1==u.view.scale?(u.maxFitScale=8,u.fit(8)):u.zoomActual(),u.center())},20);V.setAttribute("disabled","disabled");var Q=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);Q.setAttribute("disabled","disabled");var P=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);P.setAttribute("disabled","disabled");var q=n.cloneNode(!1);q.style.pointerEvent=+"none";n.parentNode.appendChild(q);var y=new Graph(q);y.setTooltips(!1);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var B=document.createElement("div");B.style.textAlign="left";B.style.color="gray";B.style.backgroundColor="transparent";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.style.whiteSpace="nowrap";B.style.cursor="default";B.style.height="100%";B.style.display=+"inline-flex";B.style.alignItems="center";B.style.flexGrow="1";mxEvent.addListener(B,"click",function(){var X=mxUtils.getTextContent(B);""!=X&&b.alert(X)});var C=null;mxEvent.addGestureListeners(Q,function(X){try{var Z=null!=H[G]?v[H[G].getAttribute("id")]:null;mxUtils.setOpacity(Q,20);p.innerText="";if(null==Z)p.style.display="inline-block",mxUtils.write(p,mxResources.get("pageNotFound"));else{C=B.innerHTML;B.innerHTML=mxResources.get("current");n.style.display="none";q.style.display="";q.style.backgroundColor=+n.style.backgroundColor;var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,y.getModel());y.view.scaleAndTranslate(u.view.scale,u.view.translate.x,u.view.translate.y);y.mathEnabled="1"==Y.getAttribute("math");y.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&y.mathEnabled&&Editor.MathJaxRender(y.container)}}catch(ba){p.style.display="inline-block",p.innerText="",mxUtils.write(p,mxResources.get("pageNotFound")+": "+ba.message)}},null,function(){mxUtils.setOpacity(Q,+60);p.style.display="none";p.innerText="";"none"==n.style.display&&(n.style.display="",B.innerHTML=C,q.style.display="none")});mxEvent.addListener(P,"click",mxUtils.bind(this,function(X){null!=J&&(X=b.getPagesForNode(J.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{g.patch(Y,null,!0,!0),b.hideDialog(),+b.hideDialog()}catch(ba){b.handleError(ba)}})}else b.hideDialog()}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close")),b.showDialog(X.container,620,460,!0,!0),X.init())}));var M=mxUtils.button(mxResources.get("restore"),function(X){null!=J&&null!=D&&b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(D):b.spinner.spin(document.body,mxResources.get("restoring"))&&(M.setAttribute("disabled","disabled"),g.save(!0,function(Z){b.spinner.stop();+M.removeAttribute("disabled");b.replaceFileData(D);b.hideDialog()},function(Z){b.spinner.stop();M.removeAttribute("disabled");b.editor.setStatus("");b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");var T=document.createElement("select");T.setAttribute("disabled","disabled");T.style.userSelect="none";T.style.maxWidth="100px";T.style.marginLeft="10px";T.style.display="none";var m=null;mxEvent.addListener(T,+"change",function(X){null!=m&&(m(X),mxEvent.consume(X))});var z=mxUtils.button(mxResources.get("open"),function(){null!=J&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(J.documentElement)),b.openLink(b.getUrl(),null,!0))});z.className="geBtn";z.setAttribute("disabled","disabled");var I=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});I.className="geBtn";I.setAttribute("disabled","disabled");null!=+f&&(z.style.display="none");k=document.createElement("div");k.style.position="absolute";k.style.top="482px";k.style.right="28px";k.style.left="32px";k.style.justifyContent="end";k.style.display="flex";var L=document.createElement("div");L.className="geToolbarContainer";L.style.backgroundColor="transparent";L.style.display="flex";L.style.alignItems="center";L.style.justifyContent="stretch";L.style.left="32px";L.style.right="32px";L.style.border="none";L.style.top="440px";L.style.height="28px";var N=+null;if(null!=e&&0<e.length){n.style.cursor="move";var O=document.createElement("table");O.style.borderWidth="1px";O.style.borderStyle="solid";O.style.borderCollapse="collapse";O.style.borderSpacing="0px";O.style.width="100%";var S=document.createElement("tbody"),U=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(G=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){d.stop();+p.innerText="";var fa=mxUtils.parseXml(ca),aa=b.editor.extractGraphModel(fa.documentElement,!0);if(null!=aa){var da=function(xa){null!=xa&&(xa=ia(Editor.parseDiagramNode(xa)));return xa},ia=function(xa){var qa=xa.getAttribute("background");if(null==qa||""==qa||qa==mxConstants.NONE)qa=u.defaultPageBackgroundColor;n.style.backgroundColor=mxUtils.getLightDarkColor(qa);(new mxCodec(xa.ownerDocument)).decode(xa,u.getModel());u.maxFitScale=1;u.fit(8);u.center();u.mathEnabled="1"==xa.getAttribute("math");+u.setAdaptiveColors(xa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&u.mathEnabled&&Editor.MathJaxRender(u.container);return xa};T.style.display="none";T.innerText="";J=fa;D=ca;H=parseSelectFunction=null;F=0;if("mxfile"==aa.nodeName){fa=aa.getElementsByTagName("diagram");H=[];for(ca=0;ca<fa.length;ca++)H.push(fa[ca]);F=Math.min(G,H.length-1);0<H.length&&da(H[F]);if(1<H.length)for(T.removeAttribute("disabled"),T.style.display="",ca=0;ca<H.length;ca++){fa=document.createElement("option");fa.setAttribute("title",+pa+" ("+H[ca].getAttribute("id")+")");fa.setAttribute("value",ca);var pa=H[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);aa=b.getPageById(H[ca].getAttribute("id"));var oa="";if(null!=aa){var ha=new DiagramPage(H[ca]);b.getHashValueForPages([aa])!=b.getHashValueForPages([ha])&&(oa=" (M)")}else oa=" (X)";mxUtils.write(fa,pa+oa);ca==F&&fa.setAttribute("selected","selected");T.appendChild(fa)}m=function(){try{var xa=parseInt(T.value);F=G=xa;da(H[xa])}catch(qa){T.value=G,b.handleError(qa)}}}else ia(aa);+pa=X.lastModifyingUserName;null!=pa&&20<pa.length&&(pa=pa.substring(0,20)+"...");B.innerText="";mxUtils.write(B,(null!=pa?pa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());B.setAttribute("title",Y.getAttribute("title"));E.removeAttribute("disabled");R.removeAttribute("disabled");V.removeAttribute("disabled");Q.removeAttribute("disabled");P.removeAttribute("disabled");null!=g&&g.isRestricted()||(b.editor.graph.isEnabled()&&M.removeAttribute("disabled"),z.removeAttribute("disabled"),I.removeAttribute("disabled"));+mxUtils.setOpacity(E,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(V,60);mxUtils.setOpacity(Q,60);mxUtils.setOpacity(P,60)}else T.style.display="none",T.innerText="",B.innerText="",p.innerText="",mxUtils.write(B,mxResources.get("errorLoadingFile")),mxUtils.write(p,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding=+"6px";ea.style.whiteSpace="nowrap";X==e[e.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===U?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());Y.appendChild(ea);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ca){A!=X&&(d.stop(),+null!=x&&(x.style.backgroundColor=""),A=X,x=Y,x.style.backgroundColor="light-dark(#ebf2f9, #000000)",D=J=null,B.removeAttribute("title"),B.innerText=mxResources.get("loading")+"...",n.style.backgroundColor=u.defaultPageBackgroundColor,p.innerText="",u.getModel().clear(),M.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),z.setAttribute("disabled",+"disabled"),T.setAttribute("disabled","disabled"),mxUtils.setOpacity(E,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(V,20),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(P,20),d.spin(n),X.getXml(function(fa){if(A==X)try{ba(fa)}catch(aa){B.innerText=mxResources.get("error")+": "+aa.message}},function(fa){d.stop();T.style.display="none";T.innerText="";B.innerText="";mxUtils.write(B,mxResources.get("errorLoadingFile"));mxUtils.write(p,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,+"dblclick",function(ca){z.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);S.appendChild(Y)}return Y}(e[t]);null!=W&&t==e.length-1&&(N=W)}O.appendChild(S);l.appendChild(O)}else null==g||null==b.drive&&g.constructor==window.DriveFile||null==b.dropbox&&g.constructor==window.DropboxFile?(n.style.display="none",L.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(n.style.display="none",L.style.display=+"none",mxUtils.write(l,mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";L.appendChild(B);L.appendChild(Q);L.appendChild(R);L.appendChild(V);L.appendChild(E);L.appendChild(T);L.appendChild(P);b.editor.cancelFirst&&k.appendChild(l);k.appendChild(z);null!=g&&g.constructor==DriveFile&&k.appendChild(I);k.appendChild(M);b.editor.cancelFirst||k.appendChild(l);c.appendChild(k);c.appendChild(L);+this.container=c},DraftDialog=function(b,e,f,c,l,n,p,u,G){var H=document.createElement("div"),F=document.createElement("div");F.style.marginTop="0px";F.style.whiteSpace="nowrap";F.style.overflow="auto";F.style.lineHeight="normal";mxUtils.write(F,e);H.appendChild(F);var K=document.createElement("select"),d=mxUtils.bind(this,function(){"-1"==K.value?(K.value=K.options[0].value,d(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var Q=this,P;return $jscomp.asyncExecutePromiseGeneratorProgram(function(q){for(P=+0;P<G.length;P++)l.apply(Q,[P,mxUtils.bind(Q,function(){})]);b.hideDialog(!0);q.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(A=mxUtils.parseXml(G[K.value].data),J=b.editor.extractGraphModel(A.documentElement,!0),D=0,this.init())});if(null!=G){K.style.marginLeft="4px";for(e=0;e<G.length;e++){var g=document.createElement("option");g.setAttribute("value",e);var k=new Date(G[e].created),v=new Date(G[e].modified);mxUtils.write(g,k.toLocaleDateString()+" "+k.toLocaleTimeString()+" - "++(k.toDateString(),v.toDateString(),v.toLocaleDateString())+" "+v.toLocaleTimeString());K.appendChild(g)}g=document.createElement("option");g.setAttribute("value","-1");mxUtils.write(g,mxResources.get("deleteAll"));K.appendChild(g);F.appendChild(K);mxEvent.addListener(K,"change",d)}null==f&&(f=G[0].data);var t=document.createElement("div");t.style.position="absolute";t.style.border="1px solid lightGray";t.style.marginTop="10px";t.style.left="40px";t.style.right="40px";t.style.top="46px";t.style.bottom=+"74px";t.style.overflow="hidden";mxEvent.disableContextMenu(t);H.appendChild(t);var x=new Graph(t);x.setEnabled(!1);x.setPanning(!0);x.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var A=mxUtils.parseXml(f),J=b.editor.extractGraphModel(A.documentElement,!0),D=0,E=null,R=x.getGlobalVariable;x.getGlobalVariable=function(Q){return"page"==Q&&null!=E&&null!=E[D]?E[D].getAttribute("name"):+"pagenumber"==Q?D+1:"pagecount"==Q?null!=E?E.length:1:R.apply(this,arguments)};x.getLinkForCell=function(){return null};f=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){x.zoomIn()},20);F=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){x.zoomOut()},20);e=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==x.view.scale?(x.maxFitScale=8,x.fit(8)):x.zoomActual();x.center()},20);p=mxUtils.button(p||mxResources.get("discard"),+function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var Q=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(P){l.apply(Q,[K.value,mxUtils.bind(Q,function(){null!=K.parentNode&&(K.options[K.selectedIndex].parentNode.removeChild(K.options[K.selectedIndex]),1<K.options.length?(K.value=K.options[0].value,d()):b.hideDialog(!0))})]);P.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});p.className="geBtn";var V=document.createElement("select");+V.style.maxWidth="80px";V.style.position="relative";V.style.top="-2px";V.style.verticalAlign="bottom";V.style.marginRight="6px";V.style.display="none";n=mxUtils.button(n||mxResources.get("edit"),function(){c.apply(this,[K.value])});n.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.right="40px";g.style.textAlign="right";k=document.createElement("div");k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";+this.init=function(){function Q(B){if(null!=B){var C=B.getAttribute("background");if(null==C||""==C||C==mxConstants.NONE)C="light-dark(#ffffff, transparent)";t.style.backgroundColor=C;(new mxCodec(B.ownerDocument)).decode(B,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return B}function P(B){null!=B&&(B=Q(Editor.parseDiagramNode(B)));return B}mxEvent.addListener(V,"change",function(B){D=parseInt(V.value);P(E[D]);mxEvent.consume(B)});if("mxfile"==J.nodeName){var q=J.getElementsByTagName("diagram");+E=[];for(var y=0;y<q.length;y++)E.push(q[y]);0<E.length&&P(E[D]);V.innerText="";if(1<E.length)for(V.style.display="",y=0;y<E.length;y++)q=document.createElement("option"),mxUtils.write(q,E[y].getAttribute("name")||mxResources.get("pageWithNumber",[y+1])),q.setAttribute("value",y),y==D&&q.setAttribute("selected","selected"),V.appendChild(q);else V.style.display="none"}else Q(J)};k.appendChild(V);k.appendChild(f);k.appendChild(F);k.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});+f.className="geBtn";u=null!=u?mxUtils.button(mxResources.get("ignore"),u):null;null!=u&&(u.className="geBtn");b.editor.cancelFirst?(g.appendChild(f),null!=u&&g.appendChild(u),g.appendChild(p),g.appendChild(n)):(g.appendChild(n),g.appendChild(p),null!=u&&g.appendChild(u),g.appendChild(f));H.appendChild(g);H.appendChild(k);this.container=H},FindWindow=function(b,e,f,c,l,n){function p(m,z,I){if("object"===typeof z.value&&null!=z.value.attributes){z=z.value.attributes;for(var L=0;L<z.length;L++)if("label"!=+z[L].nodeName){var N=mxUtils.trim(z[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==m&&0<=N.indexOf(I)||null!=m&&m.test(N))return!0}}return!1}function u(){g?(C.removeAttribute("disabled"),M.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));D.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function G(m,z,I){y.innerText="";var L=F.model.getDescendants(F.model.getRoot()),N=D.value.toLowerCase(),+O=R.checked?new RegExp(N):null,S=null;v=null;K!=N&&(K=N,d=null,k=!1);var U=null==d;if(0<N.length){if(k){k=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}m=(W+1)%b.pages.length;d=null;do k=!1,L=b.pages[m],F=b.createTemporaryGraph(F.getStylesheet()),b.updatePageRoot(L),F.model.setRoot(L.root),m=(m+1)%b.pages.length;while(!G(!0,z,I)&&m!=W);d&&(d=null,I?b.editor.graph.model.execute(new SelectPage(b,L)):b.selectPage(L));k=!1;F=b.editor.graph;return G(!0,z,I)}for(X=0;X<L.length;X++){W=+F.view.getState(L[X]);z&&(U=U||W==d);if(null!=W&&null!=W.cell.value&&(U||null==S)&&(F.model.isVertex(W.cell)||F.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(Q.innerHTML=F.sanitizeHtml(F.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([Q])):label=F.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;z&&n&&W==d&&(label=label.substr(t),Z=t);var Y=""==E.value;if(null==O&&(0<=label.indexOf(N)||Y&&p(O,W.cell,N))||null!=O&&(O.test(label)||+Y&&p(O,W.cell,N)))if(n&&(null!=O?(Y=label.match(O),null!=Y&&0<Y.length&&(v=Y[0].toLowerCase(),t=Z+Y.index+v.length)):(v=N,t=Z+label.indexOf(N)+v.length)),U){S=W;break}else null==S&&(S=W)}U=U||W==d}}if(null!=S){if(X==L.length&&V.checked)return d=null,k=!0,G(!0,z,I);d=S;F.scrollCellToVisible(d.cell);F.isEnabled()&&!F.isCellLocked(d.cell)?I||F.getSelectionCell()==d.cell&&1==F.getSelectionCount()||F.setSelectionCell(d.cell):F.highlightCell(d.cell)}else{if(!m&&V.checked)return k=!0,G(!0,z,I);F.isEnabled()&&+!I&&F.clearSelection()}g=null!=S;n&&!m&&u();return 0==N.length||null!=S}var H=b.actions.get("findReplace"),F=b.editor.graph,K=null,d=null,g=!1,k=!1,v=null,t=0,x=1,A=document.createElement("div");A.style.userSelect="none";A.style.overflow="hidden";A.style.padding="10px";A.style.height="100%";var J=n?"260px":"200px",D=document.createElement("input");D.setAttribute("placeholder",mxResources.get("find"));D.setAttribute("type","text");D.style.marginTop="4px";D.style.marginBottom="6px";D.style.width=J;+D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";A.appendChild(D);mxUtils.br(A);if(n){var E=document.createElement("input");E.setAttribute("placeholder",mxResources.get("replaceWith"));E.setAttribute("type","text");E.style.marginTop="4px";E.style.marginBottom="6px";E.style.width=J;E.style.fontSize="12px";E.style.borderRadius="4px";E.style.padding="6px";A.appendChild(E);mxUtils.br(A);mxEvent.addListener(E,"input",u)}var R=document.createElement("input");R.setAttribute("id",+"geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";A.appendChild(R);J=document.createElement("label");J.setAttribute("for","geFindWinRegExChck");A.appendChild(J);mxUtils.write(J,mxResources.get("regularExpression"));A.appendChild(J);J=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");J.style.position="relative";J.style.marginLeft="6px";J.style.top="3px";A.appendChild(J);mxUtils.br(A);var V=document.createElement("input");V.setAttribute("id","geFindWinAllPagesChck");+V.setAttribute("type","checkbox");V.style.marginRight="4px";A.appendChild(V);J=document.createElement("label");J.setAttribute("for","geFindWinAllPagesChck");A.appendChild(J);mxUtils.write(J,mxResources.get("allPages"));A.appendChild(J);var Q=document.createElement("div");mxUtils.br(A);J=document.createElement("div");J.style.left="0px";J.style.right="0px";J.style.marginTop="6px";J.style.padding="0 6px 0 6px";J.style.textAlign="center";A.appendChild(J);var P=mxUtils.button(mxResources.get("reset"),+function(){y.innerText="";D.value="";D.style.backgroundColor="";n&&(E.value="",u());K=d=null;k=!1;D.focus()});P.setAttribute("title",mxResources.get("reset"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn";n||J.appendChild(P);var q=mxUtils.button(mxResources.get("find"),function(){try{D.style.backgroundColor=G()?"":"light-dark(#ffcfcf, #ff0000)"}catch(m){b.handleError(m)}});q.setAttribute("title",+mxResources.get("find")+" (Enter)");q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft="8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn gePrimaryBtn";J.appendChild(q);var y=document.createElement("div");y.style.marginTop="10px";if(n){var B=function(m,z,I,L,N){if(null==N||"1"!=N.html)return L=m.toLowerCase().indexOf(z,L),0>L?m:m.substr(0,L)+I+m.substr(L+z.length);var O=m;z=mxUtils.htmlEntities(z,!1,!1,!1);N=[];var S=-1;for(m=m.replace(/<br>/ig,+"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=m.indexOf("<",S+1));)N.push(S);S=m.match(/<[^>]*>/g);m=m.replace(/<[^>]*>/g,"");L=m.toLowerCase().indexOf(z,L);if(0>L)return O;O=L+z.length;I=mxUtils.htmlEntities(I);m=m.substr(0,L)+I+m.substr(O);for(var U=0,W=0;W<N.length;W++){if(N[W]-U<L)m=m.substr(0,N[W])+S[W]+m.substr(N[W]);else{var X=N[W]-U<O?L+U:N[W]+(I.length-z.length);m=m.substr(0,X)+S[W]+m.substr(X)}U+=S[W].length}return m.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,+"$1").replace(/\n/g,"<br>")},C=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=v&&null!=d){var m=d.cell,z=F.getLabel(m);F.isCellEditable(m)&&F.model.setValue(m,B(z,v,E.value,t-v.length,F.getCurrentCellStyle(m)));D.style.backgroundColor=G(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(I){b.handleError(I)}});C.setAttribute("title",mxResources.get("replFind"));C.style.float="none";C.style.width="120px";C.style.marginTop="6px";C.style.marginLeft="8px";C.style.overflow="hidden";C.style.textOverflow=+"ellipsis";C.className="geBtn gePrimaryBtn";C.setAttribute("disabled","disabled");J.appendChild(C);mxUtils.br(J);var M=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=v&&null!=d){var m=d.cell,z=F.getLabel(m);F.model.setValue(m,B(z,v,E.value,t-v.length,F.getCurrentCellStyle(m)));C.setAttribute("disabled","disabled");M.setAttribute("disabled","disabled")}}catch(I){b.handleError(I)}});M.setAttribute("title",mxResources.get("replace"));M.style.float="none";M.style.width="120px";M.style.marginTop=+"6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");J.appendChild(M);var T=mxUtils.button(mxResources.get("replaceAll"),function(){y.innerText="";K=null;var m=b.currentPage,z=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;F.getModel().beginUpdate();try{for(var I=0,L={};G(!1,!0,!0)&&100>I;){var N=d.cell,O=F.getLabel(N),S=L[N.id];if(S&&S.replAllMrk==x&&S.replAllPos>=t)break;L[N.id]=+{replAllMrk:x,replAllPos:t};F.isCellEditable(N)&&(F.model.setValue(N,B(O,v,E.value,t-v.length,F.getCurrentCellStyle(N))),I++)}m!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,m));mxUtils.write(y,mxResources.get("matchesRepl",[I]))}catch(U){b.handleError(U)}finally{F.getModel().endUpdate(),b.editor.graph.setSelectionCells(z),b.editor.graph.rendering=!0}x++});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px";T.style.marginTop="6px";T.style.marginLeft=+"8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");J.appendChild(T);mxUtils.br(J);J.appendChild(P);P=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));P.setAttribute("title",mxResources.get("close"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn";+J.appendChild(P);mxUtils.br(J);J.appendChild(y)}else P.style.width="90px",q.style.width="90px";mxEvent.addListener(D,"keyup",function(m){if(91==m.keyCode||93==m.keyCode||17==m.keyCode)mxEvent.consume(m);else if(27==m.keyCode)H.funct();else if(K!=D.value.toLowerCase()||13==m.keyCode)try{D.style.backgroundColor=G()?"":"light-dark(#ffcfcf, #ff0000)"}catch(z){D.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(A,"keydown",function(m){70==m.keyCode&&b.keyHandler.isControlDown(m)&&+!mxEvent.isShiftDown(m)&&(H.funct(),mxEvent.consume(m))});this.window=new mxWindow(mxResources.get("find")+(n?"/"+mxResources.get("replace"):""),A,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null),+null!=b.pages&&1<b.pages.length?V.removeAttribute("disabled"):(V.checked=!1,V.setAttribute("disabled","disabled"))):F.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,e,f,c,l,n){var p=b.editor.graph,u=document.createElement("div");u.style.textAlign="center";u.style.userSelect="none";u.style.overflow="hidden";u.style.height="100%";if(n){var G=function(){var k=p.freehand.getStrokeColor(!0);null!=k&&k!=mxConstants.NONE&&1<k.length&&"string"===typeof k&&("default"==k?k=+mxResources.get("useBlackAndWhite"):(k="#"==k.charAt(0)?k.substring(1).toUpperCase():k,k=ColorDialog.prototype.colorNames[k]),null!=k&&K.setAttribute("title",k))},H=document.createElement("input");H.setAttribute("id","geFreehandBrush");H.setAttribute("type","checkbox");H.checked=p.freehand.isPerfectFreehandMode();H.style.margin="10px 5px 0px 10px";H.style.float="left";u.appendChild(H);p.freehand.setPerfectFreehandMode(H.checked);var F=document.createElement("label");F.setAttribute("for","geFreehandBrush");+F.style.float="left";F.style.marginTop="10px";u.appendChild(F);mxUtils.write(F,mxResources.get("brush"));u.appendChild(F);var K=document.createElement("tempDiv");K.style.display="block";K.style.width="100%";K.style.height="100%";K.style.borderRadius="2px";K.style.boxSizing="border-box";K.style.border="1px solid black";K.style.backgroundColor=p.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){K.style.backgroundColor=p.freehand.getStrokeColor()});G();F=mxUtils.button("",mxUtils.bind(this,+function(k){b.pickColor(p.freehand.getStrokeColor(!0),function(v){p.freehand.setStrokeColor(v);K.style.backgroundColor=p.freehand.getStrokeColor();G()},"default");mxEvent.consume(k)}));F.style.position="absolute";F.style.boxSizing="border-box";F.style.padding="2px";F.style.top="8px";F.style.right="8px";F.style.width="28px";F.style.height="18px";F.className="geColorBtn";F.innerText="";F.appendChild(K);u.appendChild(F);F=document.createElement("img");F.setAttribute("title",mxResources.get("settings"));+F.setAttribute("src",Editor.gearImage);F.className="geToolbarButton geAdaptiveAsset";F.style.position="absolute";F.style.boxSizing="border-box";F.style.padding="2px";F.style.top="8px";F.style.right="38px";F.style.width="18px";F.style.height="18px";F.style.opacity="0.6";u.appendChild(F);mxEvent.addListener(F,"click",mxUtils.bind(this,function(k){k=p.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",k,function(v){!isNaN(v)&&0<v&&20>=v&&p.freehand.setSmoothing(parseInt(v))})}));+mxUtils.br(u);var d=document.createElement("input");d.setAttribute("type","range");d.setAttribute("min","2");d.setAttribute("max","30");d.setAttribute("value",p.freehand.getBrushSize());d.style.width="90%";d.style.visibility="hidden";u.appendChild(d);mxUtils.br(u);F=function(){p.freehand.setPerfectFreehandMode(H.checked);d.style.visibility=H.checked?"visible":"hidden"};mxEvent.addListener(H,"change",F);F();mxEvent.addListener(d,"change",function(){p.freehand.setBrushSize(parseInt(this.value))})}var g=+mxUtils.button(mxResources.get("startDrawing"),function(){p.freehand.isDrawing()?p.freehand.stopDrawing():p.freehand.startDrawing()});g.setAttribute("title",mxResources.get("startDrawing")+" (X)");g.style.margin=n?"5px 0 0 0":"10px 0 0 0";g.style.width="90%";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.textAlign="center";g.className="geBtn gePrimaryBtn";u.appendChild(g);this.window=new mxWindow(mxResources.get("freehand"),u,e,f,c,l,!0,!0);this.window.destroyOnClose=+!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);p.addListener("freehandStateChanged",mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,mxResources.get(p.freehand.isDrawing()?"stopDrawing":"startDrawing"));var k=document.createElement("span");k.style.opacity="0.7";k.style["float"]="right";mxUtils.write(k,"X");g.appendChild(k);g.setAttribute("title",mxResources.get(p.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");g.className="geBtn"+(p.freehand.isDrawing()?+" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){p.freehand.isDrawing()&&p.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,e,f,c,l){var n=b.editor.graph,p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.height="100%";var u=document.createElement("div");u.style.display="flex";u.style.alignItems="center";+u.style.justifyContent="center";u.style.paddingTop="20px";var G=document.createElement("input");G.setAttribute("type","checkbox");G.style.marginRight="4px";G.checked=!0;var H=document.createElement("input");H.setAttribute("type","checkbox");H.style.marginRight="4px";H.checked=!0;var F=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(n.isSelectionEmpty()?n.getVerticesAndEdges():n.getSelectionCells(),G.checked,H.checked)}));+F.setAttribute("title","Convert Colors");F.className="geBtn gePrimaryBtn";u.appendChild(F);p.appendChild(u);u=u.cloneNode(!1);u.appendChild(H);u.style.paddingTop="8px";mxUtils.write(u,mxResources.get("background"));p.appendChild(u);u=u.cloneNode(!1);u.appendChild(G);u.style.paddingTop="8px";mxUtils.write(u,mxResources.get("labels"));p.appendChild(u);this.window=new mxWindow(mxResources.get("adaptiveColors"),p,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);+this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,e,f,c,l){function n(){P=!0;t.value=q;K.isSelectionEmpty()?(A.setAttribute("disabled","disabled"),"selectionOnly"==t.value&&(t.value="includeCopyOfMyDiagram")):A.removeAttribute("disabled");b.isDiagramEmpty()?(x.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==t.value&&(t.value="help")):x.removeAttribute("disabled");+P=!1}function p(B,C,M){var T=document.createElement("button");T.className="geBtn gePrimaryBtn";T.style.padding="4px";T.style.height="auto";T.style.position="relative";"flex"==M?(T.style.overflow="hidden",T.style.textOverflow="ellipsis",T.style.whiteSpace="nowrap",T.style.margin="0px",T.style.flexGrow="1"):(T.style.display="block",T.style.margin="8px",T.style.left="50%",T.style.transform="translateX(-50%)");mxUtils.write(T,B);T.setAttribute("title",B);mxEvent.addListener(T,"click",C);return T}function u(B){var C=+document.createElement("div");C.style.display="block";C.style.position="relative";C.style.backgroundColor="#e0e0e0";C.style.borderRadius="4px";C.style.wordWrap="break-word";C.style.textAlign="left";C.style.padding="6px";C.style.margin="12px";C.style.left="0px";C.style.right="0px";mxUtils.write(C,B);g.appendChild(C);return C}function G(B){var C=B.indexOf("<mxGraphModel "),M=B.indexOf("</mxGraphModel>");0>C&&(C=B.indexOf("<mxGraphModel>"));if(0<=C&&M>C){var T=mxUtils,m=T.trim,z=B.substring(0,C),I=z.indexOf("```");+0<=I&&(z=z.substring(z,0,I+6));T=m.call(T,z);C=B.substring(C,M+15);m=mxUtils;z=m.trim;B=B.substring(M+15);M=B.lastIndexOf("```");0<=M&&(B=B.substring(M+3));return[T,C,z.call(m,B)]}return null}function H(B){var C=u(B);C.style.cursor="pointer";C.style.marginBottom="2px";C.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(C,"click",function(U){Q.value=B;Q.focus()});var M=u("");M.style.marginTop="2px";var T=b.currentPage,m=B,z=[],I=null;if("includeCopyOfMyDiagram"==t.value||"selectionOnly"==+t.value){var L=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==t.value&&(L.isObjectIgnored=function(U){return U.constructor==mxCell&&!K.model.isRoot(U)&&!K.model.isLayer(U)&&!K.isCellSelected(U)&&!K.isAncestorSelected(U)});I=L.encode(K.getModel());L.document.appendChild(I);z.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(I)})}else"create"==+t.value?(m=D.value.replace(/([A-Z])/g," $1").toLowerCase(),m="Write the declaration code for a "+(""!=m?m:"graph")+' that shows "'+(""!=B?B:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):z.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});z.push({role:"user",content:m});var N={model:Editor.gptModel,+messages:z},O=0;for(z=0;z<N.messages.length;z++)O+=N.messages[z].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){M.innerHTML="";mxUtils.write(M,mxResources.get("loading")+"...");var U=document.createElement("img");U.setAttribute("title","Processing "+O+" tokens");U.setAttribute("src",IMAGE_PATH+"/spin.gif");U.style.marginLeft="6px";M.appendChild(U);M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=+new mxXmlRequest(Editor.gptUrl,JSON.stringify(N),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ba,ea){ba.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ba.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ba){W.clear();M.innerHTML="";mxUtils.write(M,ba.message);M.appendChild(p(mxResources.get("tryAgain"),S));M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ba)}),Y=mxUtils.bind(this,function(ba){var ea=+G(ba),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){ba=document.createElement("div");ba.style.display="inline-block";ba.style.position="relative";ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var fa=mxUtils.parseXml(ea[1]),aa=new mxCodec(fa),da=new mxGraphModel;aa.decode(fa.documentElement,da);var ia=null;null!=I&&(fa=new mxCodec(I.ownerDocument),ia=new mxGraphModel,fa.decode(I,ia));fa=mxUtils.bind(this,function(pa){K.model.beginUpdate();try{if(null!=+ia&&null!=b.getPageIndex(T)){b.selectPage(T);var oa=b.diffCells(ia.root,da.root);b.patchPage(T,oa,null,!0)}else{var ha=da.getChildren(da.getChildAt(da.getRoot(),0));K.setSelectionCells(K.importCells(ha))}}finally{K.model.endUpdate()}mxEvent.consume(pa)});aa=K.getBoundingBoxFromGeometry(ca);null!=aa?(ba.style.cursor="move",ba.appendChild(b.sidebar.createVertexTemplateFromCells(ca,aa.width,aa.height,"",!0,null,!0,!0,fa,160,120))):(ba.style.padding="14px",mxUtils.write(ba,mxResources.get("noPreview")));+M.innerHTML="";C=M;0<ea[0].length&&(mxUtils.write(C,ea[0]),mxUtils.br(C));C.appendChild(ba);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(p(mxResources.get("tryAgain"),S,"flex"));ca.appendChild(p(mxResources.get(null!=I?"apply":"insert"),fa,"flex"));M.appendChild(ca);0<ea[2].length&&(mxUtils.br(C),mxUtils.write(C,ea[2]));C.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else M.innerHTML="",C=M,mxUtils.write(C,ba),+M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(ba){if(W.clear())try{if(200<=ba.getStatus()&&299>=ba.getStatus()){var ea=JSON.parse(ba.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",N,"response:",ea);var ca=mxUtils.trim(ea.choices[0].message.content);if("create"==t.value){var fa=b.extractMermaidDeclaration(ca);null!=fa?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ia){Y(ia)})),b.generateMermaidImage(fa,null,function(){},+function(ia){mxMermaidToDrawio.resetListeners();Z(ia)})):(Y(ca),M.appendChild(p(mxResources.get("tryAgain"),S)))}else Y(ca)}else{var aa="Error: "+ba.getStatus();try{var da=JSON.parse(ba.getText());null!=da&&null!=da.error&&null!=da.error.message&&(aa=da.error.message)}catch(ia){}M.innerHTML="";mxUtils.write(M,aa);M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ia){Z(ia)}}),Z)}),function(W){M.innerHTML="";mxUtils.write(M,W.message);M.appendChild(p(mxResources.get("tryAgain"),+S));M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function F(){""!=mxUtils.trim(Q.value)&&(H(Q.value),Q.value="")}var K=b.editor.graph,d=document.createElement("div");d.style.textAlign="center";d.style.overflow="hidden";d.style.height="100%";var g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.top="0px";g.style.left="0px";g.style.right="0px";g.style.bottom="104px";d.appendChild(g);var k=document.createElement("div");k.style.position=+"absolute";k.style.boxSizing="border-box";k.style.borderRadius="4px";k.style.border="1px solid lightgray";k.style.margin="8px 8px 16px 8px";k.style.padding="8px";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.padding="6px";k.style.height="80px";var v=document.createElement("div");v.style.display="flex";v.style.gap="6px";v.style.marginBottom="6px";var t=document.createElement("select");t.style.textOverflow="ellipsis";t.style.flexGrow="1";t.style.padding="4px";t.style.minWidth=+"0";k.appendChild(v);var x=document.createElement("option");x.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(x,mxResources.get("includeCopyOfMyDiagram"));t.appendChild(x);var A=document.createElement("option");A.setAttribute("value","selectionOnly");mxUtils.write(A,mxResources.get("selectionOnly"));t.appendChild(A);v.appendChild(t);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var J=document.createElement("option");J.setAttribute("value","create");mxUtils.write(J,+mxResources.get("create"));t.appendChild(J)}J=document.createElement("option");J.setAttribute("value","help");mxUtils.write(J,mxResources.get("help"));t.appendChild(J);J=document.createElement("option");J.setAttribute("value","reset");mxUtils.write(J,mxResources.get("reset"));t.appendChild(J);var D=document.createElement("select");D.style.textOverflow="ellipsis";D.style.flexGrow="1";D.style.padding="4px";D.style.minWidth="0";for(J=0;J<EditorUi.mermaidDiagramTypes.length;J++){var E=document.createElement("option"),+R=EditorUi.mermaidDiagramTypes[J],V=R;"erDiagram"==V&&(V="entityRelationshipDiagram");V=mxResources.get(V,null,V.charAt(0).toUpperCase()+V.substring(1).replace(/[A-Z]/g," $&"));E.setAttribute("value",R);mxUtils.write(E,V);D.appendChild(E)}v.appendChild(D);v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.textOverflow="clip";v.style.cursor="default";var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.width="100%";Q.style.outline="none";Q.style.border="none";+Q.style.background="transparent";Q.style.padding="8px 26px 8px 8px";Q.style.boxSizing="border-box";v.appendChild(Q);J=document.createElement("img");J.setAttribute("src",Editor.sendImage);J.setAttribute("title",mxResources.get("sendMessage"));J.className="geAdaptiveAsset";J.style.position="relative";J.style.cursor="pointer";J.style.opacity="0.5";J.style.height="19px";J.style.left="-24px";J.style.top="5px";J.style.background="url('"+b.editor.transparentImage+"')";v.appendChild(J);k.appendChild(v);K.isSelectionEmpty()?+b.isDiagramEmpty()?t.value="help":t.value="includeCopyOfMyDiagram":t.value="selectionOnly";var P=!1,q=t.value,y=function(){Q.setAttribute("placeholder",mxResources.get("create"==t.value?"describeYourDiagram":"askMeAnything"));"create"==t.value?(t.style.width="",D.style.display=""):(t.style.width="100%",D.style.display="none")};y();mxEvent.addListener(t,"change",function(){P||("reset"==t.value?(t.value=q,g.innerHTML=""):q=t.value,y())});K.selectionModel.addListener(mxEvent.CHANGE,n);K.getModel().addListener(mxEvent.CHANGE,+n);n();mxEvent.addListener(J,"click",F);mxEvent.addListener(Q,"keydown",function(B){13!=B.keyCode||mxEvent.isShiftDown(B)||F()});d.appendChild(k);this.window=new mxWindow(mxResources.get("chatWindowTitle"),d,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){K.getModel().removeListener(n)}));this.window.addListener("show",+mxUtils.bind(this,function(){this.window.fit();Q.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,e,f,c,l){var n=b.editor.graph,p=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)p=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var u=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(G,H){if(n.isEnabled()){var F=new FilenameDialog(b,"",mxResources.get("add"),function(K){b.hideDialog();if(null!=K&&0<K.length){K=+K.split(" ");for(var d=[],g=[],k=0;k<K.length;k++){var v=mxUtils.trim(K[k]);""!=v&&(g.push(v),0>mxUtils.indexOf(G,v)&&d.push(v))}n.isSelectionEmpty()?H(G.concat(d)):n.addTagsForCells(n.getSelectionCells(),g)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(F.container,320,80,!0,!0);F.init()}},p);p=u.div;this.window=new mxWindow(mxResources.get("tags"),p,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;+this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){u.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var n=document.createElement("p");n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("authorizationRequired"));var p="Unknown",+u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.marginRight="10px";e==b.drive?(p=mxResources.get("googleDrive"),u.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(p=mxResources.get("dropbox"),u.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(p=mxResources.get("oneDrive"),u.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(p=mxResources.get("github"),u.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(p=mxResources.get("gitlab"),+u.src=IMAGE_PATH+"/gitlab-logo.svg",u.style.width="32px"):e==b.trello&&(p=mxResources.get("trello"),u.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[p]));var G=document.createElement("input");G.setAttribute("type","checkbox");p=mxUtils.button(mxResources.get("authorize"),function(){c(G.checked)});p.insertBefore(u,p.firstChild);p.style.marginTop="6px";p.className="geBigButton";p.style.fontSize="18px";p.style.padding="14px";+l.appendChild(n);l.appendChild(b);l.appendChild(p);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(G),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberMe")),f.appendChild(n),l.appendChild(f),G.checked=!0,G.defaultChecked=!0,mxEvent.addListener(n,"click",function(H){G.checked=!G.checked;mxEvent.consume(H)}));this.container=l},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),l=[];if(null!=b.sidebar.customEntries)for(var n=+0;n<b.sidebar.customEntries.length;n++){for(var p=b.sidebar.customEntries[n]||{},u={title:b.getResource(p.title),entries:[]},G=0;null!=p.entries&&G<p.entries.length;G++){var H=p.entries[G];u.entries.push({id:H.id,title:b.getResource(H.title),desc:b.getResource(H.desc),image:H.preview})}0<u.entries.length&&l.push(u)}for(n=0;n<f.length;n++)if(null==b.sidebar.enabledLibraries)l.push(f[n]);else{u={title:f[n].title,entries:[]};for(G=0;G<f[n].entries.length;G++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,+f[n].entries[G].id)&&u.entries.push(f[n].entries[G]);0<u.entries.length&&l.push(u)}f=l;if(e){n=mxUtils.bind(this,function(R){for(var V=0;V<R.length;V++)(function(Q){var P=k.cloneNode(!1);P.style.fontWeight="bold";P.style.backgroundColor="light-dark(#e5e5e5, #505759)";P.style.padding="6px 0px 6px 20px";mxUtils.write(P,Q.title);F.appendChild(P);for(var q=0;q<Q.entries.length;q++)(function(y){var B=k.cloneNode(!1);B.style.cursor="pointer";B.style.padding="4px 0px 4px 20px";B.style.whiteSpace="nowrap";+B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.setAttribute("title",y.title+" ("+y.id+")");var C=document.createElement("input");C.setAttribute("type","checkbox");C.checked=b.sidebar.isEntryVisible(y.id);C.defaultChecked=C.checked;B.appendChild(C);mxUtils.write(B," "+y.title);F.appendChild(B);var M=function(T){if(null==T||"INPUT"!=mxEvent.getSource(T).nodeName){K.style.textAlign="center";K.style.padding="0px";K.style.color="";K.innerText="";if(null!=y.desc){var m=document.createElement("pre");+m.style.boxSizing="border-box";m.style.fontFamily="inherit";m.style.margin="20px";m.style.right="0px";m.style.textAlign="left";mxUtils.write(m,y.desc);K.appendChild(m)}null!=y.imageCallback?y.imageCallback(K):null!=y.image?(m=document.createElement("img"),m.setAttribute("border","0"),m.style.maxWidth="100%",m.setAttribute("src",y.image),K.appendChild(m)):null==y.desc&&(K.style.padding="20px",K.style.color="rgb(179, 179, 179)",mxUtils.write(K,mxResources.get("noPreview")));null!=d&&(d.style.backgroundColor=+"");d=B;d.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(B,"click",M);mxEvent.addListener(B,"dblclick",function(T){C.checked=!C.checked;mxEvent.consume(T)});g.push(function(){return C.checked?y.id:null});0==V&&0==q&&M()})(Q.entries[q])})(R[V])});G=document.createElement("div");G.className="geDialogTitle";mxUtils.write(G,mxResources.get("shapes"));G.style.position="absolute";G.style.top="0px";G.style.left="0px";G.style.lineHeight="40px";G.style.height=+"40px";G.style.right="0px";var F=document.createElement("div"),K=document.createElement("div");F.style.position="absolute";F.style.top="40px";F.style.left="0px";F.style.width="202px";F.style.bottom="60px";F.style.overflow="auto";K.style.position="absolute";K.style.left="202px";K.style.right="0px";K.style.top="40px";K.style.bottom="60px";K.style.overflow="auto";K.style.borderLeftStyle="solid";K.style.borderLeftWidth="1px";K.style.textAlign="center";var d=null,g=[],k=document.createElement("div");k.style.position=+"relative";k.style.left="0px";k.style.right="0px";n(f);c.style.padding="30px";c.appendChild(G);c.appendChild(F);c.appendChild(K);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.position="relative";v.style.top="1px";v.checked=b.sidebar.sidebarTitles;+v.defaultChecked=v.checked;f.appendChild(v);n=document.createElement("span");mxUtils.write(n," "+mxResources.get("labels"));n.style.paddingRight="20px";f.appendChild(n);mxEvent.addListener(n,"click",function(R){v.checked=!v.checked;mxEvent.consume(R)});var t=document.createElement("input");t.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(t),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),+t.style.position="relative",t.style.top="1px",t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(n,"click",function(R){mxEvent.getSource(R)!=t&&(t.checked=!t.checked,mxEvent.consume(R))}),f.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";G=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],V=0;V<g.length;V++){var Q=g[V].apply(this,arguments);null!=Q&&R.push(Q)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&+"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(V=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=V&&0<R.splice(V,1).length)&&b.toggleScratchpad(),V=mxUtils.indexOf(R,"search"),mxSettings.settings.search=0<=V&&0<R.splice(V,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),t.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),t.checked,!0);b.setSidebarTitles(v.checked,t.checked)});G.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table");+n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";G=document.createElement("tr");x.style.width="100%";e=document.createElement("td");l=document.createElement("td");p=document.createElement("td");var A=mxUtils.bind(this,function(R,V,Q){var P=document.createElement("input");P.type="checkbox";x.appendChild(P);P.checked=b.sidebar.isEntryVisible(Q);var q=document.createElement("span");mxUtils.write(q,V);V=document.createElement("div");V.style.display="block";V.appendChild(P);+V.appendChild(q);mxEvent.addListener(q,"click",function(y){P.checked=!P.checked;mxEvent.consume(y)});R.appendChild(V);return function(){return P.checked?Q:null}});G.appendChild(e);G.appendChild(l);G.appendChild(p);n.appendChild(G);x.appendChild(n);g=[];var J=0;for(n=0;n<f.length;n++)for(G=0;G<f[n].entries.length;G++)J++;var D=[e,l,p],E=0;for(n=0;n<f.length;n++)(function(R){for(var V=0;V<R.entries.length;V++){var Q=R.entries[V];g.push(A(D[Math.floor(E/(J/3))],Q.title,Q.id));E++}})(f[n]);c.appendChild(x);+f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";t=document.createElement("input");isLocalStorage&&(t.setAttribute("type","checkbox"),t.checked=!0,t.defaultChecked=!0,f.appendChild(t),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),mxEvent.addListener(n,"click",function(R){t.checked=!t.checked;mxEvent.consume(R)}));c.appendChild(f);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});+n.className="geBtn";G=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],V=0;V<g.length;V++){var Q=g[V].apply(this,arguments);null!=Q&&R.push(Q)}b.sidebar.showEntries(0<R.length?R.join(";"):"",t.checked);b.hideDialog()});G.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(n),f.appendChild(G)):(f.appendChild(G),f.appendChild(n));c.appendChild(f);this.container=c},PluginsDialog=function(b,+e,f,c){function l(){G=!0;if(0==u.length)p.innerText=mxResources.get("noPlugins");else{p.innerText="";for(var g=0;g<u.length;g++){var k=document.createElement("span");k.style.display="flex";k.style.alignItems="center";k.style.whiteSpace="nowrap";var v=document.createElement("img");v.src=Editor.trashImage;v.style.position="relative";v.style.cursor="pointer";v.style.marginRight="4px";v.style.display="inline-block";v.style.width="18px";v.setAttribute("title",mxResources.get("delete"));k.appendChild(v);+mxUtils.write(k,u[g]);p.appendChild(k);mxUtils.br(p);mxEvent.addListener(v,"click",function(t){return function(){b.confirm(mxResources.get("delete")+' "'+u[t]+'"?',function(){null!=f&&f(u[t]);u.splice(t,1);l()})}}(g))}}}var n=document.createElement("div"),p=document.createElement("div");p.style.height="180px";p.style.overflow="auto";var u=mxSettings.getPlugins().slice(),G=!1;n.appendChild(p);l();G=!1;var H=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(g){g&&0>mxUtils.indexOf(u,+g)&&u.push(g);l()})}:function(){var g=document.createElement("div"),k=document.createElement("span");k.style.marginTop="6px";mxUtils.write(k,mxResources.get("builtinPlugins")+": ");g.appendChild(k);var v=document.createElement("select");v.style.width="150px";for(k=0;k<App.publicPlugin.length;k++){var t=document.createElement("option");mxUtils.write(t,App.publicPlugin[k]);t.value=App.publicPlugin[k];v.appendChild(t)}g.appendChild(v);mxUtils.br(g);mxUtils.br(g);k=mxUtils.button(mxResources.get("custom")++"...",function(){var x=new FilenameDialog(b,"",mxResources.get("add"),function(A){b.hideDialog();if(null!=A&&0<A.length){A=A.split(";");for(var J=0;J<A.length;J++){var D=A[J],E=App.pluginRegistry[D];null!=E&&(D=E);0<D.length&&0>mxUtils.indexOf(u,D)&&u.push(D)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(x.container,300,80,!0,!0);x.init()});k.className="geBtn";ALLOW_CUSTOM_PLUGINS||(k.style.display="none");g=new CustomDialog(b,g,mxUtils.bind(this,function(){var x=+App.pluginRegistry[v.value];0>mxUtils.indexOf(u,x)&&(u.push(x),l())}),null,null,null,k);b.showDialog(g.container,360,100,!0,!0)});H.className="geBtn";var F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";var K=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){G?(mxSettings.setPlugins(u),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});K.className="geBtn gePrimaryBtn";var d=document.createElement("div");+d.style.marginTop="14px";d.style.textAlign="right";b.isOffline()||d.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||d.appendChild(F),d.appendChild(H),d.appendChild(K)):(d.appendChild(H),d.appendChild(K),c||d.appendChild(F));n.appendChild(d);this.container=n},CropImageDialog=function(b,e,f,c){function l(){var R=t.checked,V=x.checked,Q=g.geometry,P=G.width,q=G.height,y=(300-P)/2,B=(300-q)/2;Q.x<y?(Q.width-=y-Q.x,Q.x=y):Q.x+Q.width>y+P&&(Q.width=y+P-Q.x,+Q.x=Math.min(Q.x,y+P));Q.y<B?(Q.height-=B-Q.y,Q.y=B):Q.y+Q.height>B+q&&(Q.height=B+q-Q.y,Q.y=Math.min(Q.y,B+q));var C=(Q.x-y)/P*100;P=100-(Q.x+Q.width-y)/P*100;y=(Q.y-B)/q*100;Q=100-(Q.y+Q.height-B)/q*100;return"inset("+mxUtils.format(y)+"% "+mxUtils.format(P)+"% "+mxUtils.format(Q)+"% "+mxUtils.format(C)+"%"+(R?" round "+d+"%":V?" round 50%":"")+")"}function n(R){null!=F&&(!0!==R&&(F.model.setGeometry(g,K.clone()),d=5,J.value=d),F.model.setStyle(g,k+l()),F.selectAll(),A.style.visibility=t.checked?+"visible":"hidden")}var p=document.createElement("div"),u=document.createElement("div");u.style.height="300px";u.style.width="300px";u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";u.style.position="absolute";var G=document.createElement("img");G.onload=function(){function R(){F.model.setStyle(g,k+l())}F=new Graph(H);F.autoExtend=!1;F.autoScroll=!1;F.setGridEnabled(!1);F.setEnabled(!0);F.setPanning(!1);F.setConnectable(!1);F.getRubberband().setEnabled(!1);+F.graphHandler.allowLivePreview=!1;var V=F.createVertexHandler;F.createVertexHandler=function(){var O=V.apply(this,arguments);O.livePreview=!1;return O};if(null!=f)try{if("inset"==f.substring(0,5)){var Q=g.geometry,P=G.width,q=G.height,y=(300-P)/2,B=(300-q)/2,C=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),M=parseFloat(C[0]),T=parseFloat(C[1]),m=parseFloat(C[2]),z=parseFloat(C[3]);isFinite(M)&&isFinite(T)&&isFinite(m)&&isFinite(z)?(Q.x=z/100*P+y,Q.y=M/100*q+B,Q.width=(100-T)/100*P+y-Q.x,Q.height=(100-+m)/100*q+B-Q.y,"round"==C[4]?"50%"==C[5]?x.setAttribute("checked","checked"):(d=parseInt(C[5]),J.value=d,t.setAttribute("checked","checked"),A.style.visibility="visible"):v.setAttribute("checked","checked")):f=null}else f=null}catch(O){}g.style=k+(f?f:l());g.vertex=!0;F.addCell(g,null,null,null,null);F.selectAll();F.addListener(mxEvent.CELLS_MOVED,R);F.addListener(mxEvent.CELLS_RESIZED,R);var I=F.graphHandler.mouseUp,L=F.graphHandler.mouseDown;F.graphHandler.mouseUp=function(){I.apply(this,arguments);+H.style.backgroundColor="#fff9"};F.graphHandler.mouseDown=function(){L.apply(this,arguments);H.style.backgroundColor=""};F.dblClick=function(){};var N=F.getSelectionModel().changeSelection;F.getSelectionModel().changeSelection=function(){N.call(this,[g],[g])}};G.onerror=function(){G.onload=null;G.src=Editor.errorImage};G.setAttribute("src",e);G.style.maxWidth="300px";G.style.maxHeight="300px";u.appendChild(G);p.appendChild(u);var H=document.createElement("div");H.style.width="300px";H.style.height=+"300px";H.style.overflow="hidden";H.style.backgroundColor="#fff9";p.appendChild(H);var F=null,K=new mxGeometry(100,100,100,100),d=5,g=new mxCell("",K.clone(),""),k="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",v=document.createElement("input");v.setAttribute("type","radio");v.setAttribute("id","croppingRect");v.setAttribute("name","croppingShape");v.setAttribute("checked","checked");v.style.margin="5px";p.appendChild(v);e=document.createElement("label");+e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));p.appendChild(e);var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingRounded");t.setAttribute("name","croppingShape");t.style.margin="5px";p.appendChild(t);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));p.appendChild(e);var x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id",+"croppingEllipse");x.setAttribute("name","croppingShape");x.style.margin="5px";p.appendChild(x);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));p.appendChild(e);mxEvent.addListener(v,"change",n);mxEvent.addListener(t,"change",n);mxEvent.addListener(x,"change",n);var A=document.createElement("div");A.style.textAlign="center";A.style.visibility="hidden";var J=document.createElement("input");J.setAttribute("type","range");J.setAttribute("min",+"1");J.setAttribute("max","49");J.setAttribute("value",d);J.setAttribute("title",mxResources.get("arcSize"));A.appendChild(J);p.appendChild(A);mxEvent.addListener(J,"change",function(){d=this.value;n(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";u=mxUtils.button(mxResources.get("apply"),function(){c(l(),g.geometry.width,g.geometry.height);b.hideDialog()});u.className="geBtn gePrimaryBtn";var D=mxUtils.button(mxResources.get("reset"),function(){c(null,+G.width,G.height);b.hideDialog()});D.className="geBtn";var E=document.createElement("div");E.style.marginTop="10px";E.style.textAlign="right";b.editor.cancelFirst?(E.appendChild(e),E.appendChild(D),E.appendChild(u)):(E.appendChild(D),E.appendChild(u),E.appendChild(e));p.appendChild(E);this.container=p},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,l=document.createElement("div"),n=document.createElement("table"),p=document.createElement("tbody"),+u=document.createElement("tr"),G=document.createElement("td"),H=document.createElement("td");n.style.paddingLeft="6px";mxUtils.write(G,mxResources.get("relative")+":");var F=document.createElement("input");F.setAttribute("type","checkbox");null!=c&&c.relative&&(F.setAttribute("checked","checked"),F.defaultChecked=!0);this.init=function(){F.focus()};H.appendChild(F);u.appendChild(G);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");H=document.createElement("td");+mxUtils.write(G,mxResources.get("left")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.width="100px";K.value=null!=c?c.x:"";H.appendChild(K);u.appendChild(G);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");H=document.createElement("td");mxUtils.write(G,mxResources.get("top")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c?c.y:"";H.appendChild(d);u.appendChild(G);+u.appendChild(H);p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");H=document.createElement("td");mxUtils.write(G,mxResources.get("dx")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=c&&null!=c.offset?c.offset.x:"";H.appendChild(g);u.appendChild(G);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");H=document.createElement("td");mxUtils.write(G,mxResources.get("dy")++":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c&&null!=c.offset?c.offset.y:"";H.appendChild(k);u.appendChild(G);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");H=document.createElement("td");mxUtils.write(G,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=c?c.width:"";H.appendChild(v);u.appendChild(G);u.appendChild(H);+p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");H=document.createElement("td");mxUtils.write(G,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.height:"";H.appendChild(t);u.appendChild(G);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");H=document.createElement("td");mxUtils.write(G,mxResources.get("rotation")+":");var x=document.createElement("input");+x.setAttribute("type","text");x.style.width="100px";x.value=1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";H.appendChild(x);u.appendChild(G);u.appendChild(H);p.appendChild(u);n.appendChild(p);l.appendChild(n);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var A=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var J=0;J<e.length;J++){var D=f.getCellGeometry(e[J]);null!=+D&&(D=D.clone(),f.isCellMovable(e[J])&&(D.relative=F.checked,0<mxUtils.trim(K.value).length&&(D.x=Number(K.value)),0<mxUtils.trim(d.value).length&&(D.y=Number(d.value)),0<mxUtils.trim(g.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.x=Number(g.value)),0<mxUtils.trim(k.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.y=Number(k.value))),f.isCellResizable(e[J])&&(0<mxUtils.trim(v.value).length&&(D.width=Number(v.value)),0<mxUtils.trim(t.value).length&&(D.height=Number(t.value))),+f.getModel().setGeometry(e[J],D));0<mxUtils.trim(x.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(x.value),[e[J]])}}finally{f.getModel().endUpdate()}});A.className="geBtn gePrimaryBtn";mxEvent.addListener(l,"keypress",function(J){13==J.keyCode&&A.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(A)):(n.appendChild(A),n.appendChild(c));l.appendChild(n);this.container=l},LibraryDialog=function(b,+e,f,c,l,n,p){function u(Q){for(Q=document.elementFromPoint(Q.clientX,Q.clientY);null!=Q&&Q.parentNode!=k;)Q=Q.parentNode;var P=null;if(null!=Q){var q=k.firstChild;for(P=0;null!=q&&q!=Q;)q=q.nextSibling,P++}return P}function G(Q,P,q,y,B,C,M,T,m){try{if(b.spinner.stop(),null==P||"image/"==P.substring(0,6))if(null==Q&&null!=M||null==t[Q]){var z=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?+Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};k.style.backgroundImage="";v.style.display="none";var I=B,L=C;if(B>b.maxImageSize||C>b.maxImageSize){var N=Math.min(1,Math.min(b.maxImageSize/Math.max(1,B)),b.maxImageSize/Math.max(1,C));B*=N;C*=N}I>L?(L=Math.round(100*L/I),I=100):(I=Math.round(100*I/L),L=100);var O=document.createElement("div");O.setAttribute("draggable","true");O.style.display="inline-block";O.style.position="relative";O.style.padding=+"0 12px";O.style.cursor="move";mxUtils.setPrefixedStyle(O.style,"transition","transform .1s ease-in-out");if(null!=Q){var S=document.createElement("img");S.setAttribute("src",D.convert(Q));S.style.width=I+"px";S.style.height=L+"px";S.style.margin="10px";S.style.paddingBottom=Math.floor((100-L)/2)+"px";S.style.paddingLeft=Math.floor((100-I)/2)+"px";O.appendChild(S)}else if(null!=M){var U=b.stringToCells("<"==M.xml.charAt(0)?M.xml:Graph.decompress(M.xml));0<U.length&&(b.sidebar.createThumb(U,100,100,+O,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),O.firstChild.style.display="inline-block",O.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(fa){mxEvent.consume(fa)});+(function(fa,aa,da){mxEvent.addListener(W,"click",function(ia){t[aa]=null;for(var pa=0;pa<K.length;pa++)if(null!=K[pa].data&&K[pa].data==aa||null!=K[pa].xml&&null!=da&&K[pa].xml==da.xml){K.splice(pa,1);break}O.parentNode.removeChild(fa);0==K.length&&(k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(ia)});mxEvent.addListener(W,"dblclick",function(ia){mxEvent.consume(ia)})})(O,Q,M);O.appendChild(W);O.style.marginBottom="30px";var X=document.createElement("div");+X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign="center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=Q?(Z={data:Q,w:B,h:C,title:m},null!=T&&(Z.aspect=T),t[Q]=S,K.push(Z)):null!=M&&(M.aspect="fixed",K.push(M),Z=M);mxEvent.addListener(X,"keydown",function(fa){13==fa.keyCode&&null!=J&&(J(),J=null,mxEvent.consume(fa))});+z();O.appendChild(X);mxEvent.addListener(X,"mousedown",function(fa){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(fa)});U=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var aa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(da){null!=da&&(Z.title=da,z())},mxResources.get("enterValue"));b.showDialog(aa.container,300,80,!0,!0);aa.init();mxEvent.consume(fa)}else if("true"!=X.getAttribute("contentEditable")){null!=+J&&(J(),J=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);J=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=X.innerHTML;z()};mxEvent.consume(fa)}};mxEvent.addListener(X,"click",U);mxEvent.addListener(O,"dblclick",U);k.appendChild(O);+mxEvent.addListener(O,"dragstart",function(fa){null==J&&(null==Q&&null!=M&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=M.xml&&fa.dataTransfer.setData("Text",M.xml),x=u(fa),mxClient.IS_GC&&(O.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(O,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(O,"dragend",function(fa){"hidden"==W.style.visibility&&(W.style.visibility=+"",X.style.visibility="");x=null;mxUtils.setOpacity(O,100);mxUtils.setPrefixedStyle(O.style,"transform",null)})}else E||(E=!0,b.handleError({message:mxResources.get("fileExists")}));else{B=!1;try{if(I=mxUtils.parseXml(Q),"mxlibrary"==I.documentElement.nodeName){L=JSON.parse(mxUtils.getTextContent(I.documentElement));if(null!=L&&0<L.length)for(var Y=0;Y<L.length;Y++)null!=L[Y].xml?G(null,null,0,0,0,0,L[Y]):G(L[Y].data,null,0,0,L[Y].w,L[Y].h,null,"fixed",L[Y].title);B=!0}else if("mxfile"==I.documentElement.nodeName){var ba=+I.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=Editor.getDiagramNodeXml(ba[Y]);U=b.stringToCells(ea);if(0<U.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(U);null!=ca&&G(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}B=!0}}catch(fa){null!=window.console&&console.error("Error in library dialog: "+fa)}B||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){null!=window.console&&console.log("Error in library dialog: "++fa)}return null}function H(Q){Q.dataTransfer.dropEffect=null!=x?"move":"copy";Q.stopPropagation();Q.preventDefault()}function F(Q){Q.stopPropagation();Q.preventDefault();E=!1;A=u(Q);if(null!=x)null!=A&&A<k.children.length?(K.splice(A>x?A-1:A,0,K.splice(x,1)[0]),k.insertBefore(k.children[x],k.children[A])):(K.push(K.splice(x,1)[0]),k.appendChild(k.children[x]));else if(0<Q.dataTransfer.files.length)b.importFiles(Q.dataTransfer.files,0,0,b.maxImageSize,R(Q));else if(0<=mxUtils.indexOf(Q.dataTransfer.types,+"text/uri-list")){var P=decodeURIComponent(Q.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(P)||/(\.png)($|\?)/i.test(P)||/(\.gif)($|\?)/i.test(P)||/(\.svg)($|\?)/i.test(P))&&b.loadImage(P,function(q){G(P,null,0,0,q.width,q.height);k.scrollTop=k.scrollHeight})}Q.stopPropagation();Q.preventDefault()}var K=[];f=document.createElement("div");f.style.height="100%";var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.height="40px";f.appendChild(d);mxUtils.write(d,mxResources.get("filename")++":");null==e&&(e=b.defaultLibraryName+".xml");var g=document.createElement("input");g.setAttribute("value",e);g.style.marginRight="20px";g.style.marginLeft="10px";g.style.width="500px";null==l||l.isRenamable()||g.setAttribute("disabled","true");this.init=function(){if(null==l||l.isRenamable())g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)};d.appendChild(g);Editor.enableUncompressedLibraries&&(g.style.width="420px",e=document.createElement("input"),+e.setAttribute("type","checkbox"),e.style.marginRight="10px",d.appendChild(e),mxUtils.write(d,mxResources.get("compressed")));var k=document.createElement("div");k.style.borderWidth="1px 0px 1px 0px";k.style.borderColor="#d3d3d3";k.style.borderStyle="solid";k.style.marginTop="6px";k.style.overflow="auto";k.style.height="340px";k.style.backgroundPosition="center center";k.style.backgroundRepeat="no-repeat";0==K.length&&Graph.fileSupport&&(k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");+var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));f.appendChild(v);var t={},x=null,A=null,J=null;d=function(Q){"true"!=mxEvent.getSource(Q).getAttribute("contentEditable")&&null!=J&&(J(),J=null,mxEvent.consume(Q))};mxEvent.addListener(k,"mousedown",d);mxEvent.addListener(k,"pointerdown",d);mxEvent.addListener(k,"touchstart",+d);var D=new mxUrlConverter,E=!1;if(null!=c)for(d=0;d<c.length;d++)e=c[d],G(e.data,null,0,0,e.w,e.h,e,e.aspect,e.title);mxEvent.addListener(k,"dragleave",function(Q){v.style.cursor="";for(var P=mxEvent.getSource(Q);null!=P;){if(P==k||P==v){Q.stopPropagation();Q.preventDefault();break}P=P.parentNode}});var R=function(Q){return function(P,q,y,B,C,M,T,m,z){null!=z&&EditorUi.isVisioFilename(z.name)?b.importVisio(z,mxUtils.bind(this,function(I){G(I,q,y,B,C,M,T,"fixed",mxEvent.isAltDown(Q)?null:T.substring(0,+T.lastIndexOf(".")).replace(/_/g," "))})):null!=z&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(P,z.name)?b.isExternalDataComms()?b.parseFile(z,mxUtils.bind(this,function(I){4==I.readyState&&(b.spinner.stop(),200<=I.status&&299>=I.status&&(G(I.responseText,q,y,B,C,M,T,"fixed",mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),k.scrollTop=k.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(G(P,q,y,B,C,M,T,"fixed",+mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),k.scrollTop=k.scrollHeight)}};mxEvent.addListener(k,"dragover",H);mxEvent.addListener(k,"drop",F);mxEvent.addListener(v,"dragover",H);mxEvent.addListener(v,"drop",F);f.appendChild(k);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";b.editor.cancelFirst&&c.appendChild(d);+"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(e=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(l,function(Q){if(null!=Q){var P=b.getSearch("create title mode url drive splash state clibs ui".split(" "));P+=(0==P.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(Q);Q=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+P,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(Q.container,+450,240,!0);Q.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId(),l)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),e.className="geBtn",c.appendChild(e));e=mxUtils.button(mxResources.get("export"),function(){var Q=b.createLibraryDataFromImages(K),P=g.value;/(\.xml)$/i.test(P)||+(P+=".xml");b.isLocalFileSave()?b.saveLocalFile(Q,P,"text/xml",null,null,null!=p?p:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(P)+"&format=xml&xml="+encodeURIComponent(Q))).simulate(document,"_blank")});e.setAttribute("id","btnDownload");e.className="geBtn";c.appendChild(e);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var V=document.createElement("input");V.setAttribute("multiple","multiple");V.setAttribute("type","file");mxEvent.addListener(V,"change",function(Q){E=+!1;b.importFiles(V.files,0,0,b.maxImageSize,function(P,q,y,B,C,M,T,m,z){null!=V.files&&(R(Q)(P,q,y,B,C,M,T,m,z),V.type="",V.type="file",V.value="")});k.scrollTop=k.scrollHeight});V.style.display="none";document.body.appendChild(V);b.libDlgFileInputElt=V}e=mxUtils.button(mxResources.get("import"),function(){null!=J&&(J(),J=null);b.libDlgFileInputElt.click()});e.setAttribute("id","btnAddImage");e.className="geBtn";c.appendChild(e)}e=mxUtils.button(mxResources.get("addImages"),function(){null!=J&&(J(),+J=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(Q,P,q){E=!1;if(null!=Q){if("data:image/"==Q.substring(0,11)){var y=Q.indexOf(",");0<y&&(Q=Q.substring(0,y)+";base64,"+Q.substring(y+1))}G(Q,null,0,0,P,q);k.scrollTop=k.scrollHeight}})});e.setAttribute("id","btnAddImageUrl");e.className="geBtn";c.appendChild(e);this.saveBtnClickHandler=function(Q,P,q,y){b.saveLibrary(Q,P,q,y)};e=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=J&&(J(),J=null);this.saveBtnClickHandler(g.value,+K,l,n)}));e.setAttribute("id","btnSave");e.className="geBtn gePrimaryBtn";c.appendChild(e);b.editor.cancelFirst||c.appendChild(d);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,l){c=null!=c?c:300;l=null!=l?l:120;var n=document.createElement("table"),p=document.createElement("tbody");n.style.cellPadding="4px";var u=document.createElement("tr");var G=document.createElement("td");G.setAttribute("colspan","2");G.style.fontSize="10pt";mxUtils.write(G,f);u.appendChild(G);p.appendChild(u);+u=document.createElement("tr");G=document.createElement("td");var H=document.createElement("textarea");H.style.outline="none";H.style.resize="none";H.style.width=c-200+"px";H.style.height=l+"px";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};G.appendChild(H);u.appendChild(G);G=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top="6px";f.style.width="200px";f.style.height=l+4+"px";f.style.overflow="hidden";+f.style.marginBottom="16px";mxEvent.disableContextMenu(f);G.appendChild(f);var F=new Graph(f);F.setEnabled(!1);var K=b.editor.graph.cloneCell(e);F.addCells([K]);f=F.view.getState(K);var d="";null!=f.shape&&null!=f.shape.stencil&&(d=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(H,d||"");f=F.getGraphBounds();l=Math.min(160/f.width,(l-40)/f.height);F.view.scaleAndTranslate(l,20/l-f.x,20/l-f.y);u.appendChild(G);p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");+G.setAttribute("colspan","2");G.style.paddingTop="2px";G.style.whiteSpace="nowrap";G.setAttribute("align","right");b.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),l.className="geBtn",G.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&G.appendChild(l);var g=function(k,v,t){var x=H.value,A=mxUtils.parseXml(x);x=mxUtils.getPrettyXml(A.documentElement);+A=A.documentElement.getElementsByTagName("parsererror");if(null!=A&&0<A.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(t&&b.hideDialog(),A=!k.model.contains(v),!t||A||x!=d){x=Graph.compress(x);k.getModel().beginUpdate();try{if(A){var J=b.editor.graph.getFreeInsertPoint();v.geometry.x=J.x;v.geometry.y=J.y;k.addCell(v)}k.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+x+")",[v])}catch(D){throw D;}finally{k.getModel().endUpdate()}A&&+(k.setSelectionCell(v),k.scrollCellToVisible(v))}};f=mxUtils.button(mxResources.get("preview"),function(){g(F,K,!1)});f.className="geBtn";G.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){g(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";G.appendChild(f);b.editor.cancelFirst||G.appendChild(l);u.appendChild(G);p.appendChild(u);n.appendChild(p);this.container=n},CustomDialog=function(b,e,f,c,l,n,p,u,G,H,F,K){var d=document.createElement("div");d.appendChild(e);var g=document.createElement("div");+g.style.marginTop=null!=K?K:"30px";g.style.textAlign="right";null!=p&&g.appendChild(p);b.isOffline()||null==n||g.appendChild(b.createHelpIcon(n));e=mxUtils.button(G||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});e.className="geBtn";u&&(e.style.display="none");b.editor.cancelFirst&&g.appendChild(e);l=mxUtils.button(l||mxResources.get("ok"),mxUtils.bind(this,function(){H||b.hideDialog(null,null,this.container);if(null!=f){var k=f();if("string"===typeof k){b.showError(mxResources.get("error"),+k);return}}H&&b.hideDialog(null,null,this.container)}));g.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(e);if(null!=F)for(u=0;u<F.length;u++)(function(k,v,t){k=mxUtils.button(k,function(x){v(x)});null!=t&&k.setAttribute("title",t);k.className="geBtn";g.appendChild(k)})(F[u][0],F[u][1],F[u][2]);d.appendChild(g);this.cancelBtn=e;this.okButton=l;this.container=d},BtnDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var n=document.createElement("p");+n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("done"));var p="Unknown",u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.marginRight="10px";e==b.drive?(p=mxResources.get("googleDrive"),u.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(p=mxResources.get("dropbox"),u.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(p=mxResources.get("oneDrive"),u.src=+IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(p=mxResources.get("github"),u.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(p=mxResources.get("gitlab"),u.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(p=mxResources.get("trello"),u.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[p],"You are now authorized in {1}"));f=mxUtils.button(f,c);f.insertBefore(u,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";+f.style.fontSize="18px";f.style.padding="14px";l.appendChild(n);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,e,f,c,l){function n(J){this.style.border="";13==J.keyCode&&A.click()}var p=document.createElement("table"),u=document.createElement("tbody");p.style.marginTop="8px";var G=document.createElement("tr");var H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var F=document.createElement("input");+F.style.cssText="margin-right:8px;margin-bottom:8px;";F.setAttribute("value","sysfonts");F.setAttribute("type","radio");F.setAttribute("name","current-fontdialog");F.setAttribute("id","fontdialog-sysfonts");H.appendChild(F);var K=document.createElement("label");K.setAttribute("for","fontdialog-sysfonts");mxUtils.write(K,mxResources.get("sysFonts",null,"System Fonts"));H.appendChild(K);G.appendChild(H);u.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace=+"nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");G.appendChild(H);var d=document.createElement("input");"s"==c&&d.setAttribute("value",e);d.style.marginLeft="4px";d.style.width="250px";d.className="dlg_fontName_s";H=document.createElement("td");H.appendChild(d);G.appendChild(H);u.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize=+"10pt";H.style.fontWeight="bold";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","googlefonts");g.setAttribute("type","radio");g.setAttribute("name","current-fontdialog");g.setAttribute("id","fontdialog-googlefonts");H.appendChild(g);K=document.createElement("label");K.setAttribute("for","fontdialog-googlefonts");mxUtils.write(K,mxResources.get("googleFonts",null,"Google Fonts"));H.appendChild(K);if(!b.isOffline()||EditorUi.isElectronApp)K=+b.createHelpIcon("https://fonts.google.com/"),H.appendChild(K);G.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&u.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");G.appendChild(H);var k=document.createElement("input");"g"==c&&k.setAttribute("value",e);k.style.marginLeft="4px";k.style.width="250px";k.className=+"dlg_fontName_g";H=document.createElement("td");H.appendChild(k);G.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&u.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","webfonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id",+"fontdialog-webfonts");H.appendChild(v);K=document.createElement("label");K.setAttribute("for","fontdialog-webfonts");mxUtils.write(K,mxResources.get("webfonts",null,"Web Fonts"));H.appendChild(K);G.appendChild(H);Editor.enableWebFonts&&u.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");G.appendChild(H);var t=+document.createElement("input");"w"==c&&(Editor.enableWebFonts?t.setAttribute("value",e):d.setAttribute("value",e));t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_w";H=document.createElement("td");H.appendChild(t);G.appendChild(H);Editor.enableWebFonts&&u.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontUrl",+null,"Font URL")+":");G.appendChild(H);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";H=document.createElement("td");H.appendChild(x);G.appendChild(H);Editor.enableWebFonts&&u.appendChild(G);this.init=function(){var J=d;"g"==c?J=k:"w"==c&&Editor.enableWebFonts&&(J=t);J.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?J.select():document.execCommand("selectAll",!1,null)};G=document.createElement("tr");+H=document.createElement("td");H.colSpan=2;H.style.paddingTop="20px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");b.isOffline()||H.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});e.className="geBtn";b.editor.cancelFirst&&H.appendChild(e);var A=mxUtils.button(mxResources.get("apply"),function(){if(F.checked){var J=d.value;var D="s"}else if(g.checked){J=k.value;var E=Editor.GOOGLE_FONTS++encodeURIComponent(J).replace(/%20/g,"+");D="g"}else v.checked&&(J=t.value,E=x.value,D="w");var R=J;var V=E,Q=D,P=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,q=p.querySelector(".dlg_fontName_"+Q);null==q||null!=R&&0!=R.length?(q=p.querySelector(".dlg_fontUrl"),null==q||"w"!=Q||P.test(V)?R=!0:(q.style.border="1px solid red",R=!1)):(q.style.border="1px solid red",R=!1);R&&(l(J,E,D),b.hideDialog())});A.className="geBtn gePrimaryBtn";mxEvent.addListener(d,"keypress",+n);mxEvent.addListener(k,"keypress",n);mxEvent.addListener(t,"keypress",n);mxEvent.addListener(x,"keypress",n);mxEvent.addListener(d,"focus",function(){F.setAttribute("checked","checked");F.checked=!0});mxEvent.addListener(k,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(t,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});H.appendChild(A);b.editor.cancelFirst||+H.appendChild(e);G.appendChild(H);u.appendChild(G);p.appendChild(u);this.container=p};+function AspectDialog(b,e,f,c,l){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:f||[]};e=document.createElement("div");var n=document.createElement("h5");n.style.margin="0 0 10px";mxUtils.write(n,mxResources.get("pages"));e.appendChild(n);f=document.createElement("div");f.className="geAspectDlgList";e.appendChild(f);n=document.createElement("h5");n.style.margin="0 0 10px";mxUtils.write(n,mxResources.get("layers"));e.appendChild(n);n=document.createElement("div");n.className="geAspectDlgList";+e.appendChild(n);this.pagesContainer=f;this.layersContainer=n;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});n.className="geBtn";b.editor.cancelFirst&&f.appendChild(n);var p=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(p);p.className="geBtn gePrimaryBtn";+b.editor.cancelFirst||f.appendChild(n);p.setAttribute("disabled","disabled");this.okBtn=p;e.appendChild(f);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};+AspectDialog.prototype.createViewer=function(b,e,f,c){mxEvent.disableContextMenu(b);b.style.userSelect="none";var l=new Graph(b);l.setTooltips(!1);l.setEnabled(!1);l.setPanning(!1);l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;e="mxGraphModel"==e.nodeName?e:Editor.parseDiagramNode(e);if(null!=e){var n=e.getAttribute("background");if(null==n||""==n||n==mxConstants.NONE)n=null!=c?c:"#ffffff";b.style.backgroundColor=n;c=new mxCodec(e.ownerDocument);b=l.getModel();c.decode(e,b);e=b.getChildCount(b.root);+c=null==f;for(n=0;n<e;n++){var p=b.getChildAt(b.root,n);b.setVisible(p,c||f==p.id)}l.maxFitScale=1;l.fit(0);l.center()}return l};+AspectDialog.prototype.createPageItem=function(b,e,f){var c=document.createElement("div");c.className="geAspectDlgListItem";c.setAttribute("data-page-id",b);c.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.pagesContainer.appendChild(c);var l=this.createViewer(c.childNodes[0],f);e=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c;+this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var n=l.model;n=n.getChildCells(n.getRoot());for(var p=0;p<n.length;p++)this.createLayerItem(n[p],b,l,f)});mxEvent.addListener(c,"click",e);this.aspect.pageId==b&&e()};+AspectDialog.prototype.createLayerItem=function(b,e,f,c){e=f.convertValueToString(b)||mxResources.get("background")||"Background";var l=document.createElement("div");l.setAttribute("data-layer-id",b.id);l.className="geAspectDlgListItem";l.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.layersContainer.appendChild(l);this.createViewer(l.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=l.className.indexOf("geAspectDlgListItemSelected")?+(l.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(l.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(l,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};+var FilePropertiesDialog=function(b,e){function f(D){var E=H;H=function(R,V){try{D(function(){E(R,V)},V)}catch(Q){V(Q)}}}var c=document.createElement("table"),l=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";c.style.tableLayout="fixed";var n=b.getCurrentFile(),p=null!=n&&null!=n.getTitle()?n.getTitle():b.defaultFilename,u=/(\.png)$/i.test(p),G=/(\.svg)$/i.test(p),H=function(D,E){D()},F=null!=n?n.isLocked():!1;var K=document.createElement("tr");var d=document.createElement("td");+d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("locked")+":");K.appendChild(d);var g=document.createElement("input");g.setAttribute("type","checkbox");F&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(g);K.appendChild(d);l.appendChild(K);this.init=function(){g.focus()};f(function(D,E){null!=b.fileNode&&F!=g.checked?window.setTimeout(function(){null!=+n&&n.setLocked(g.checked);D()},0):D()});if(u||G){p=1;u=0;K=b.fileNode;null!=K&&(K.hasAttribute("scale")&&(p=parseFloat(K.getAttribute("scale"))),K.hasAttribute("border")&&(u=parseInt(K.getAttribute("border"))));K=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("zoom")+":");K.appendChild(d);var k=document.createElement("input");k.setAttribute("value",100*p+"%");k.style.marginLeft="4px";k.style.width="100%";+d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(k);K.appendChild(d);l.appendChild(K);K=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("borderWidth")+":");K.appendChild(d);var v=document.createElement("input");v.setAttribute("value",u);v.style.marginLeft="4px";v.style.width="100%";d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(v);K.appendChild(d);l.appendChild(K);+this.init=this.init||function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};f(function(D,E){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(k.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(v.value))),null!=n&&n.fileChanged());D()})}else if(!/(\.html)$/i.test(p)&&!/(\.svg)$/i.test(p)){var t=null!=n?n.isCompressed():Editor.defaultCompressed;K=document.createElement("tr");d=document.createElement("td");+d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("compressed")+":");K.appendChild(d);var x=document.createElement("input");x.setAttribute("type","checkbox");t&&(x.setAttribute("checked","checked"),x.defaultChecked=!0);d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(x);K.appendChild(d);l.appendChild(K);this.init=this.init||function(){x.focus()};f(function(D,E){null!=b.fileNode&&t!=+x.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",x.checked?"true":"false");null!=n&&(n.compressionChanged(x.checked),n.fileChanged());D()},0):D()})}if(null!=n&&n.isRealtimeOptional()){K=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("realtimeCollaboration")+":");K.appendChild(d);var A=document.createElement("input");A.setAttribute("type",+"checkbox");var J=n.isRealtimeEnabled();if(J="disabled"!=b.drive.getCustomProperty(n.desc,"collaboration"))A.setAttribute("checked","checked"),A.defaultChecked=!0;f(function(D,E){A.checked!=J?n.setRealtimeEnabled(A.checked,D,E):D()});this.init=null!=this.init?this.init:function(){A.focus()};d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(A);d.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));K.appendChild(d);l.appendChild(K)}null!=n&&+"draw.io"==b.getServiceName()&&0<n.getSize()&&"1"!=urlParams.embed&&(K=document.createElement("tr"),d=document.createElement("td"),d.style.whiteSpace="nowrap",d.style.overflow="hidden",d.style.textOverflow="ellipsis",d.style.fontSize="10pt",mxUtils.write(d,mxResources.get("size")+":"),K.appendChild(d),d=b.formatFileSize(n.getSize()),p=document.createElement("input"),p.setAttribute("title",d),p.setAttribute("value",d),p.setAttribute("disabled","disabled"),p.style.marginLeft="4px",p.style.width="100%",+d=document.createElement("td"),d.style.whiteSpace="nowrap",d.appendChild(p),K.appendChild(d),l.appendChild(K));null!=e&&(K=document.createElement("tr"),d=document.createElement("td"),d.style.whiteSpace="nowrap",d.style.overflow="hidden",d.style.textOverflow="ellipsis",d.style.fontSize="10pt",mxUtils.write(d,mxResources.get("publicDiagramUrl")+":"),K.appendChild(d),p=document.createElement("a"),p.setAttribute("href",e),p.setAttribute("title",e),p.style.whiteSpace="nowrap",p.style.overflow="hidden",+p.style.textOverflow="ellipsis",p.style.display="block",p.style.margin="2px 0px 2px 8px",p.style.fontSize="10pt",mxUtils.write(p,e),mxEvent.addListener(p,"click",function(D){b.openLink(e);mxEvent.consume(D)}),d=document.createElement("td"),d.appendChild(p),K.appendChild(d),l.appendChild(K));null!=n&&null!=n.fileObject&&null!=n.fileObject.path&&(K=document.createElement("tr"),d=document.createElement("td"),d.style.whiteSpace="nowrap",d.style.overflow="hidden",d.style.textOverflow="ellipsis",d.style.fontSize=+"10pt",mxUtils.write(d,mxResources.get("pathFilename")+":"),K.appendChild(d),p=document.createElement("input"),p.setAttribute("title",n.fileObject.path),p.setAttribute("value",n.fileObject.path),p.setAttribute("disabled","disabled"),p.style.marginLeft="4px",p.style.width="100%",d=document.createElement("td"),d.appendChild(p),K.appendChild(d),l.appendChild(K));this.init=null!=this.init?this.init:function(){};p=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&+H(function(){b.spinner.stop();b.hideDialog()},function(D){b.spinner.stop();b.handleError(D,mxResources.get("error"))})});p.className="geBtn gePrimaryBtn";K=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&d.appendChild(u);d.appendChild(p);b.editor.cancelFirst||d.appendChild(u);K.appendChild(d);+l.appendChild(K);c.appendChild(l);this.container=c},ConnectionPointsDialog=function(b,e){function f(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function n(B,C,M){B=new mxCell("",new mxGeometry(B,C,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");B.vertex=!0;B.cp=!0;B.constObj=M;return K.addCell(B)}function p(B){B=K.getSelectionCells();K.deleteCells(B)}+function u(){var B=parseInt(Q.value)||0;B=0>B?0:100<B?100:B;Q.value=B;var C=parseInt(q.value)||0;C=0>C?0:100<C?100:C;q.value=C;var M=parseInt(P.value)||0,T=parseInt(y.value)||0;M=new mxConnectionConstraint(new mxPoint(B/100,C/100),!1,null,M,T);B=K.getConnectionPoint(k,M);C=K.getSelectionCell();if(null!=C){C.constObj=M;M=C.geometry.clone();T=K.view.scale;var m=K.view.translate;M.x=(B.x-3*T)/T-m.x;M.y=(B.y-3*T)/T-m.y;K.model.setGeometry(C,M)}}function G(B){if(B.constObj)return{x:B.constObj.point.x,+y:B.constObj.point.y,dx:B.constObj.dx,dy:B.constObj.dy};var C=0,M=0,T=d.geometry,m=mxUtils.format((B.geometry.x+3-T.x)/T.width);B=mxUtils.format((B.geometry.y+3-T.y)/T.height);0>m?(C=m*T.width,m=0):1<m&&(C=(m-1)*T.width,m=1);0>B?(M=B*T.height,B=0):1<B&&(M=(B-1)*T.height,B=1);return{x:m,y:B,dx:parseInt(C),dy:parseInt(M)}}function H(B){if(1==K.getSelectionCount()){var C=K.getSelectionCell();B&&(C.constObj=null);B=G(C);Q.value=100*B.x;q.value=100*B.y;P.value=B.dx;y.value=B.dy;V.style.visibility=""}else V.style.visibility=+"hidden"}var F=document.createElement("div");F.style.width="350px";F.style.height="350px";F.style.overflow="hidden";F.style.border="1px solid lightGray";F.style.boxSizing="border-box";mxEvent.disableContextMenu(F);c.appendChild(F);var K=new Graph(F);K.transparentBackground=!1;K.autoExtend=!1;K.autoScroll=!1;K.setGridEnabled(!1);K.setEnabled(!0);K.setPanning(!0);K.setConnectable(!1);K.setTooltips(!1);K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;K.maxFitScale=2;F=e.geometry;var d=new mxCell(e.value,+new mxGeometry(0,0,F.width,F.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");d.vertex=!0;K.addCell(d);K.dblClick=function(B,C){if(null!=C&&C!=d)K.setSelectionCell(C);else{C=mxUtils.convertPoint(K.container,mxEvent.getClientX(B),mxEvent.getClientY(B));mxEvent.consume(B);B=K.view.scale;var M=K.view.translate;K.setSelectionCell(n((C.x-3*B)/B-M.x,(C.y-3*B)/B-M.y))}};l=new mxKeyHandler(K);l.bindKey(46,p);l.bindKey(8,p);K.getRubberband().isForceRubberbandEvent=+function(B){return 0==B.evt.button&&(null==B.getCell()||B.getCell()==d)};K.panningHandler.isForcePanningEvent=function(B){return 2==B.evt.button};var g=K.isCellSelectable;K.isCellSelectable=function(B){return B==d?!1:g.apply(this,arguments)};K.getLinkForCell=function(){return null};var k=K.view.getState(d);F=K.getAllConnectionConstraints(k);for(var v=0;null!=F&&v<F.length;v++){var t=K.getConnectionPoint(k,F[v]);n(t.x-3,t.y-3,F[v])}K.fit(8);K.center();v=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),+function(){K.zoomIn()},20);t=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){K.zoomOut()},20);var x=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==K.view.scale?(K.maxFitScale=8,K.fit(8)):K.zoomActual();K.center()},20),A=function(){b.prompt(mxResources.get("gridSize"),K.gridSize,function(B){!isNaN(B)&&0<B&&(K.setGridSize(B),K.setGridEnabled(!0),K.refresh())})},J=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(B){mxEvent.isShiftDown(B)?+A():(K.setGridEnabled(!K.isGridEnabled()),K.refresh())},20);mxEvent.addListener(J,"dblclick",A);var D=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),p,20);mxUtils.setOpacity(D,10);F=document.createElement("div");F.style.display="flex";F.style.alignItems="center";F.style.paddingTop="6px";F.appendChild(v);F.appendChild(t);F.appendChild(x);F.appendChild(J);F.appendChild(D);c.appendChild(F);var E=document.createElement("input");E.setAttribute("type","number");E.setAttribute("min","1");+E.setAttribute("value","1");E.style.width="45px";E.style.position="relative";E.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";t=["left","right","top","bottom"];for(v=0;v<t.length;v++)x=t[v],J=document.createElement("option"),mxUtils.write(J,mxResources.get(x)),J.value=x,R.appendChild(J);v=mxUtils.button(mxResources.get("add"),function(){var B=parseInt(E.value);B=1>B?1:100<B?100:B;E.value=B;for(var C=R.value,M=d.geometry,T=[],m=0;m<B;m++){switch(C){case "left":var z=+M.x;var I=M.y+(m+1)*M.height/(B+1);break;case "right":z=M.x+M.width;I=M.y+(m+1)*M.height/(B+1);break;case "top":z=M.x+(m+1)*M.width/(B+1);I=M.y;break;case "bottom":z=M.x+(m+1)*M.width/(B+1),I=M.y+M.height}T.push(n(z-3,I-3))}K.setSelectionCells(T)});v.style.marginLeft="auto";F.appendChild(v);F.appendChild(E);F.appendChild(R);var V=document.createElement("div");V.style.margin="4px 0px 8px 0px";V.style.whiteSpace="nowrap";V.style.height="24px";F=document.createElement("span");mxUtils.write(F,mxResources.get("dx"));+V.appendChild(F);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.setAttribute("max","100");Q.style.width="45px";Q.style.margin="0 4px 0 4px";V.appendChild(Q);mxUtils.write(V,"%");var P=document.createElement("input");P.setAttribute("type","number");P.style.width="45px";P.style.margin="0 4px 0 4px";V.appendChild(P);mxUtils.write(V,"pt");F=document.createElement("span");mxUtils.write(F,mxResources.get("dy"));F.style.marginLeft="12px";V.appendChild(F);+var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.setAttribute("max","100");q.style.width="45px";q.style.margin="0 4px 0 4px";V.appendChild(q);mxUtils.write(V,"%");var y=document.createElement("input");y.setAttribute("type","number");y.style.width="45px";y.style.margin="0 4px 0 4px";V.appendChild(y);mxUtils.write(V,"pt");c.appendChild(V);H();K.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<K.getSelectionCount()?mxUtils.setOpacity(D,60):+mxUtils.setOpacity(D,10);H()});K.addListener(mxEvent.CELLS_MOVED,H);mxEvent.addListener(Q,"change",u);mxEvent.addListener(q,"change",u);mxEvent.addListener(P,"change",u);mxEvent.addListener(y,"change",u);F=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});F.className="geBtn";v=mxUtils.button(mxResources.get("apply"),function(){var B=K.model.cells,C=[],M=[],T;for(T in B){var m=B[T];m.cp&&M.push(G(m))}M.sort(function(z,I){return z.x!=I.x?z.x-I.x:z.y!=I.y?z.y-I.y:z.dx!=I.dx?z.dx-+I.dx:z.dy-I.dy});for(B=0;B<M.length;B++)0<B&&M[B].x==M[B-1].x&&M[B].y==M[B-1].y&&M[B].dx==M[B-1].dx&&M[B].dy==M[B-1].dy||C.push("["+M[B].x+","+M[B].y+",0,"+M[B].dx+","+M[B].dy+"]");b.editor.graph.setCellStyles("points","["+C.join(",")+"]",[e]);f();b.hideDialog()});v.className="geBtn gePrimaryBtn";t=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[e]);f();b.hideDialog()});t.className="geBtn";x=document.createElement("div");x.style.marginTop="10px";x.style.textAlign=+"right";b.isOffline()||x.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&x.appendChild(F);x.appendChild(t);x.appendChild(v);b.editor.cancelFirst||x.appendChild(F);c.appendChild(x)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";Editor.thinShapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI5Ljc1IDI5Ljc1Wm0tMTMgNS40NXEuNC4wNS43NS4wNUgxOS4wNXY0LjY1cTAgLjI1LjE3NS40MjV0LjQyNS4xNzVIMzkuOXEuMjUgMCAuNDI1LS4xNzV0LjE3NS0uNDI1VjE5LjY1cTAtLjI1LS4xNzUtLjQyNXQtLjQyNS0uMTc1aC00LjY1VjE3LjVxMC0uMzUtLjA1LS43NWg0LjdxMS4xNSAwIDIgLjg3NS44NS44NzUuODUgMi4wMjVWMzkuOXEwIDEuMTUtLjg1IDItLjg1Ljg1LTIgLjg1SDE5LjY1cS0xLjE1IDAtMi4wMjUtLjg1dC0uODc1LTJabTEuNS0zLjk1cS01LjQ1IDAtOS4yMjUtMy44LTMuNzc1LTMuOC0zLjc3NS05LjIgMC01LjQ1IDMuNzc1LTkuMjI1UTEyLjggNS4yNSAxOC4yNSA1LjI1cTUuNCAwIDkuMiAzLjc3NSAzLjggMy43NzUgMy44IDkuMjI1IDAgNS40LTMuOCA5LjItMy44IDMuOC05LjIgMy44Wm0tLjA1LTIuM3E0LjQ1IDAgNy42LTMuMTI1IDMuMTUtMy4xMjUgMy4xNS03LjU3NXQtMy4xMjUtNy42UTIyLjcgNy41IDE4LjI1IDcuNXQtNy42IDMuMTI1UTcuNSAxMy43NSA3LjUgMTguMnQzLjEyNSA3LjZxMy4xMjUgMy4xNSA3LjU3NSAzLjE1Wm0uMDUtMTAuN1oiLz48L3N2Zz4=";@@ -12742,131 +12742,131 @@ Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYEditor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableUncompressedLibraries=!1;Editor.enableCustomProperties=!0;-Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(l){Editor.enableServiceWorker=!1}Editor.enableWebFonts="1"!=+Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(m){Editor.enableServiceWorker=!1}Editor.enableWebFonts="1"!=urlParams["safe-style-src"]&&!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.gptModel=null!=urlParams["gpt-model"]?decodeURIComponent(urlParams["gpt-model"]):"gpt-3.5-turbo";Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme=-"auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(l){l.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(l,x){return"1"!=mxUtils.getValue(l.style,"sketch","0")}},-{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,"comic","0")||"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,-"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,-isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"dashOffset",-dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?-"1":"0")&&0<l.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==-mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},-isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",-type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(l,x){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",+"auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(m){m.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(m,z){return"1"!=mxUtils.getValue(m.style,"sketch","0")}},+{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"comic","0")||"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,+"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,+isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"dashOffset",+dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?+"1":"0")&&0<m.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==+mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},+isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",+type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source 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:"targetPortConstraint",dispName:"Target 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:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(l){return"orthogonalEdgeStyle"==mxUtils.getValue(l.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,-isVisible:function(l){return"entityRelationEdgeStyle"==mxUtils.getValue(l.style,mxConstants.STYLE_EDGE,null)}},{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:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",-type:"color",defVal:null},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(l){return"1"==mxUtils.getValue(l.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(l){return"1"==mxUtils.getValue(l.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(l){return"1"==mxUtils.getValue(l.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",+{name:"targetPortConstraint",dispName:"Target 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:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(m){return"orthogonalEdgeStyle"==mxUtils.getValue(m.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,+isVisible:function(m){return"entityRelationEdgeStyle"==mxUtils.getValue(m.style,mxConstants.STYLE_EDGE,null)}},{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:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",+type:"color",defVal:null},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(m){return"1"==mxUtils.getValue(m.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(m){return"1"==mxUtils.getValue(m.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(m){return"1"==mxUtils.getValue(m.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(l,x){x=x.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&x.isTableCell(l.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(l,x){x=x.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&x.isTableCell(l.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(l,x){l=x.editorUi.editor.graph.getCellStyle(1==l.vertices.length&&-0==l.edges.length?l.vertices[0]:null);return"1"==mxUtils.getValue(l,"resizeLastRow","0")},isVisible:function(l,x){x=x.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&x.isTable(l.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(l,x){l=x.editorUi.editor.graph.getCellStyle(1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null);return"1"==mxUtils.getValue(l,"resizeLast","0")},isVisible:function(l,x){x=x.editorUi.editor.graph;-return 1==l.vertices.length&&0==l.edges.length&&x.isTable(l.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:"int",min:1,defVal:1,isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTableCell(m.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTableCell(m.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(m,z){m=z.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&+0==m.edges.length?m.vertices[0]:null);return"1"==mxUtils.getValue(m,"resizeLastRow","0")},isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTable(m.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(m,z){m=z.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null);return"1"==mxUtils.getValue(m,"resizeLast","0")},isVisible:function(m,z){z=z.editorUi.editor.graph;+return 1==m.vertices.length&&0==m.edges.length&&z.isTable(m.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(l,x){return x.editorUi.editor.graph.isCellConnectable(0<l.vertices.length&&0==l.edges.length?l.vertices[0]:null)},isVisible:function(l,x){return 0<l.vertices.length&&0==l.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},+dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(m,z){return z.editorUi.editor.graph.isCellConnectable(0<m.vertices.length&&0==m.edges.length?m.vertices[0]:null)},isVisible:function(m,z){return 0<m.vertices.length&&0==m.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},-{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",getDefaultValue:function(l,x){l=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;x=x.editorUi.editor.graph;return null!=l&&x.isSwimlane(l)},isVisible:function(l,x){return 1==l.vertices.length&&-0==l.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(l,x){l=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;x=x.editorUi.editor.graph;return null!=l&&(x.isSwimlane(l)||0<x.model.getChildCount(l))},isVisible:function(l,x){return 1==l.vertices.length&&0==l.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(l,x){var F=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;x=x.editorUi.editor.graph;-return null!=F&&(x.isContainer(F)&&"0"!=l.style.collapsible||!x.isContainer(F)&&"1"==l.style.collapsible)},isVisible:function(l,x){return 1==l.vertices.length&&0==l.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(l,x){return 1==l.vertices.length&&0==l.edges.length&&!x.editorUi.editor.graph.isSwimlane(l.vertices[0])&&null==mxUtils.getValue(l.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",-type:"bool",defVal:!1,isVisible:function(l,x){x=x.editorUi.editor.graph.model;return 0<l.vertices.length?x.isVertex(x.getParent(l.vertices[0])):!1}},{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:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(l,x){l=-0<l.vertices.length?x.editorUi.editor.graph.getCellGeometry(l.vertices[0]):null;return null!=l&&!l.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(l,x){return 0<l.vertices.length&&x.editorUi.editor.graph.isAutoSizeCell(l.vertices[0])}},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",+{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",getDefaultValue:function(m,z){m=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;z=z.editorUi.editor.graph;return null!=m&&z.isSwimlane(m)},isVisible:function(m,z){return 1==m.vertices.length&&+0==m.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(m,z){m=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;z=z.editorUi.editor.graph;return null!=m&&(z.isSwimlane(m)||0<z.model.getChildCount(m))},isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(m,z){var I=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;z=z.editorUi.editor.graph;+return null!=I&&(z.isContainer(I)&&"0"!=m.style.collapsible||!z.isContainer(I)&&"1"==m.style.collapsible)},isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length&&!z.editorUi.editor.graph.isSwimlane(m.vertices[0])&&null==mxUtils.getValue(m.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",+type:"bool",defVal:!1,isVisible:function(m,z){z=z.editorUi.editor.graph.model;return 0<m.vertices.length?z.isVertex(z.getParent(m.vertices[0])):!1}},{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:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(m,z){m=+0<m.vertices.length?z.editorUi.editor.graph.getCellGeometry(m.vertices[0]):null;return null!=m&&!m.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(m,z){return 0<m.vertices.length&&z.editorUi.editor.graph.isAutoSizeCell(m.vertices[0])}},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",-type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(l,x){var F=mxUtils.getValue(l.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||x.editorUi.editor.graph.isSwimlane(l.vertices[0])||null==F||F==mxConstants.NONE||0==mxUtils.getValue(l.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(l.style,mxConstants.STYLE_OPACITY,100)||null!=l.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",-type:"bool",defVal:!1,isVisible:function(l,x){return 0<l.vertices.length&&x.editorUi.editor.graph.isContainer(l.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\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,,[email protected],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,[email protected],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,[email protected],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,[email protected],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(l){var x=rough.canvas({getContext:function(){return l}});x.draw=function(F){var N=F.sets||[];F=F.options||this.getDefaultOptions();for(var O=0;O<N.length;O++){var Q=N[O];switch(Q.type){case "path":null!=F.stroke&&this._drawToContext(l,Q,F);break;case "fillPath":this._drawToContext(l,Q,F);break;case "fillSketch":this.fillSketch(l,Q,F)}}};x.fillSketch=function(F,N,O){var Q=l.state.strokeColor,V=l.state.strokeWidth,T=l.state.strokeAlpha,W=l.state.dashed,X=O.fillWeight;-0>X&&(X=O.strokeWidth/2);l.setStrokeAlpha(l.state.fillAlpha);l.setStrokeColor(O.fill||"");l.setStrokeWidth(X);l.setDashed(!1);this._drawToContext(F,N,O);l.setDashed(W);l.setStrokeWidth(V);l.setStrokeColor(Q);l.setStrokeAlpha(T)};x._drawToContext=function(F,N,O){F.begin();for(var Q=0;Q<N.ops.length;Q++){var V=N.ops[Q],T=V.data;switch(V.op){case "move":F.moveTo(T[0],T[1]);break;case "bcurveTo":F.curveTo(T[0],T[1],T[2],T[3],T[4],T[5]);break;case "lineTo":F.lineTo(T[0],T[1])}}F.end();"fillPath"===N.type&&-O.filled?F.fill():F.stroke()};return x};(function(){function l(Q,V,T){this.canvas=Q;this.rc=V;this.shape=T;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,l.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,l.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,l.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=-mxUtils.bind(this,l.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,l.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,l.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,l.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,l.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,-l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,l.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,l.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,l.prototype.fillAndStroke);-this.path=[];this.passThrough=!1}l.prototype.moveOp="M";l.prototype.lineOp="L";l.prototype.quadOp="Q";l.prototype.curveOp="C";l.prototype.closeOp="Z";l.prototype.getStyle=function(Q,V){var T=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)T=(T<<5)-T+W.charCodeAt(X)<<0}T={strokeWidth:this.canvas.state.strokeWidth,seed:T,preserveVertices:!0};W=this.rc.getDefaultOptions();T.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:-mxConstants.NONE;Q=null;(T.filled=V)?(T.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):T.fill="";T.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);T.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);T.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);T.roughness=mxUtils.getValue(this.shape.style,"jiggle",-W.roughness);T.simplification=mxUtils.getValue(this.shape.style,"simplification",W.simplification);T.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",W.disableMultiStroke);T.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",W.disableMultiStrokeFill);V=mxUtils.getValue(this.shape.style,"hachureGap",-1);T.hachureGap="auto"==V?-1:V;T.dashGap=mxUtils.getValue(this.shape.style,"dashGap",V);T.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",-V);T.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",V);V=mxUtils.getValue(this.shape.style,"fillWeight",-1);T.fillWeight="auto"==V?-1:V;V=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==V&&(V="auto");"auto"==V&&(V=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&V.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&V.push(mxUtils.hex2rgb(Editor.darkColor)),V=null!=T.fill&&(null!=Q||0<=mxUtils.indexOf(V,mxUtils.hex2rgb(T.fill)))?-"solid":W.fillStyle);T.fillStyle=V;return T};l.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};l.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};l.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};-l.prototype.lineTo=function(Q,V){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Q,V),this.lastX=Q,this.lastY=V)};l.prototype.moveTo=function(Q,V){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,V),this.lastX=Q,this.lastY=V,this.firstX=Q,this.firstY=V)};l.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};l.prototype.quadTo=function(Q,V,T,W){this.passThrough?-this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,V,T,W),this.lastX=T,this.lastY=W)};l.prototype.curveTo=function(Q,V,T,W,X,Y){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,V,T,W,X,Y),this.lastX=X,this.lastY=Y)};l.prototype.arcTo=function(Q,V,T,W,X,Y,Z){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var aa=mxUtils.arcToCurves(this.lastX,this.lastY,Q,V,T,W,X,Y,Z);if(null!=aa)for(var ea=0;ea<aa.length;ea+=-6)this.curveTo(aa[ea],aa[ea+1],aa[ea+2],aa[ea+3],aa[ea+4],aa[ea+5]);this.lastX=Y;this.lastY=Z}};l.prototype.rect=function(Q,V,T,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,V,T,W,this.getStyle(!0,!0)))};l.prototype.ellipse=function(Q,V,T,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+T/2,V+W/2,T,W,this.getStyle(!0,!0)))};l.prototype.roundrect=-function(Q,V,T,W,X,Y){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Q+X,V),this.lineTo(Q+T-X,V),this.quadTo(Q+T,V,Q+T,V+Y),this.lineTo(Q+T,V+W-Y),this.quadTo(Q+T,V+W,Q+T-X,V+W),this.lineTo(Q+X,V+W),this.quadTo(Q,V+W,Q,V+W-Y),this.lineTo(Q,V+Y),this.quadTo(Q,V,Q+X,V))};l.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(T){}this.passThrough=!1}else if(null!=this.nextShape){for(var V in Q)this.nextShape.options[V]=-Q[V];Q.stroke!=mxConstants.NONE&&null!=Q.stroke||delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};l.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};l.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};l.prototype.fillAndStroke=function(){this.passThrough?-this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};l.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;-this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new l(Q,Editor.createRoughCanvas(Q),this)};var x=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?x.apply(this,arguments):"comic"==mxUtils.getValue(this.style,-"sketchStyle","rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var F=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,V,T,W,X){null!=Q.handJiggle&&Q.handJiggle.passThrough||F.apply(this,arguments)};var N=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var V=Q.addTolerance,T=!0;null!=this.style&&(T="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==l&&!this.outline){Q.save();-var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Y=this.configurePointerEvents,Z=Q.setStrokeColor;Q.setStrokeColor=function(){};var aa=Q.setFillColor;Q.setFillColor=function(){};T||null==W||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;N.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=aa;Q.setStrokeColor=Z;this.configurePointerEvents=Y;this.stroke=X;this.fill=W;Q.restore();T&&null!=W&&(Q.addTolerance=function(){})}N.apply(this,arguments);Q.addTolerance=-V};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,V,T,W,X,Y){null!=Q.handJiggle&&Q.handJiggle.constructor==l?(Q.handJiggle.passThrough=!0,O.apply(this,arguments),Q.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(l){return null==l||0==l.length||"undefined"===typeof pako?l:Graph.arrayBufferToString(pako.deflateRaw(l))};Editor.fastDecompress=function(l){return null==l||0==l.length||"undefined"===typeof pako?l:pako.inflateRaw(Graph.stringToArrayBuffer(atob(l)),-{to:"string"})};Editor.extractGraphModel=function(l,x,F){if(null!=l&&"undefined"!==typeof pako){var N=l.ownerDocument.getElementsByTagName("div"),O=[];if(null!=N&&0<N.length)for(var Q=0;Q<N.length;Q++)if("mxgraph"==N[Q].getAttribute("class")){O.push(N[Q]);break}0<O.length&&(N=O[0].getAttribute("data-mxgraph"),null!=N?(O=JSON.parse(N),null!=O&&null!=O.xml&&(l=mxUtils.parseXml(O.xml),l=l.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(N=mxUtils.getTextContent(O[0]),N=Graph.decompress(N,-null,F),0<N.length&&(l=mxUtils.parseXml(N),l=l.documentElement))))}if(null!=l&&"svg"==l.nodeName)if(N=l.getAttribute("content"),null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(cont,N))),null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N)),null!=N&&0<N.length)l=mxUtils.parseXml(N).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==l||x||(O=null,"diagram"==l.nodeName?O=l:"mxfile"==l.nodeName&&(N=l.getElementsByTagName("diagram"),0<-N.length&&(O=N[Math.max(0,Math.min(N.length-1,urlParams.page||0))])),null!=O&&(l=Editor.parseDiagramNode(O,F)));null==l||"mxGraphModel"==l.nodeName||x&&"mxfile"==l.nodeName||(l=null);return l};Editor.parseDiagramNode=function(l,x,F){Editor.validateDiagramNode(l);var N=mxUtils.trim(mxUtils.getTextContent(l)),O=null;0<N.length?(x=Graph.decompress(N,null,x),null!=x&&0<x.length&&(O=mxUtils.parseXml(x).documentElement)):(l=mxUtils.getChildNodes(l),0<l.length&&(O=l[0],F&&(O=Editor.parseDiagramNode(O,x,-!1)),x=mxUtils.createXmlDocument(),x.appendChild(x.importNode(O,!0)),O=x.documentElement));return O};Editor.getDiagramNodeXml=function(l){Editor.validateDiagramNode(l);var x=mxUtils.getNodeValue(l),F=null;0<x.length?F=Graph.decompress(x):(l=l.getElementsByTagName("mxGraphModel"),null!=l&&0<l.length&&(F=mxUtils.getXml(l[0])));return F};Editor.validateDiagramNode=function(l){if(0==mxUtils.trim(mxUtils.getTextContent(l)).length&&0==mxUtils.getChildNodes(l).length){var x=new mxCodec,F=new mxGraphModel;-l.appendChild(x.encode(F))}return l};Editor.extractGraphModelFromPdf=function(l){var x=null;l=l.substring(l.indexOf(",")+1);l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);if("%PDF-1.7"==l.substring(0,8)){var F=l.indexOf("EmbeddedFile");if(-1<F){var N=l.indexOf("stream",F)+9;if(0<l.substring(F,N).indexOf("application#2Fvnd.jgraph.mxfile")){var O=l.indexOf("endstream",N-1);return pako.inflateRaw(Graph.stringToArrayBuffer(l.substring(N,O)),{to:"string"})}}for(F=l.indexOf("/ObjStm");0<F;){N=-l.indexOf("stream",F)+9;O=l.indexOf("endstream",N-1);N=pako.inflateRaw(Graph.stringToArrayBuffer(l.substring(N,O)),{to:"string"});O=N.indexOf("/Subject <");if(0<O){F=N.substring(O+14,N.indexOf(">",O));if(null!=F){x=F;F=[];for(N=0;N<x.length;N+=2)O=x.substr(N,2),"00"!=O&&F.push(String.fromCharCode(parseInt(O,16)));x=F.join("")}break}F=l.indexOf("/ObjStm",F+1)}}if(null==x&&"%PDF-1.4"==l.substring(0,8)){F="";O=N=0;for(var Q=[],V=null;O<l.length;){var T=l.charCodeAt(O);O+=1;10!=T&&(F+=String.fromCharCode(T));-T=="/Subject (%3Cmxfile".charCodeAt(N)?N++:N=0;if(19==N){var W=l.indexOf("%3C%2Fmxfile%3E",O)+15;O-=9;if(W>O){x=l.substring(O,W);break}}10==T&&("endobj"==F?V=null:"obj"==F.substring(F.length-3,F.length)||"xref"==F||"trailer"==F?(V=[],Q[F.split(" ")[0]]=V):null!=V&&V.push(F),F="")}}null==x&&null!=Q&&(x=Editor.extractGraphModelFromXref(Q));null!=x&&(x=decodeURIComponent(x.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return x};Editor.extractGraphModelFromXref=function(l){var x=l.trailer,F=null;null!=-x&&(x=/.* \/Info (\d+) (\d+) R/g.exec(x.join("\n")),null!=x&&0<x.length&&(x=l[x[1]],null!=x&&(x=/.* \/Subject (\d+) (\d+) R/g.exec(x.join("\n")),null!=x&&0<x.length&&(l=l[x[1]],null!=l&&(l=l.join("\n"),F=l.substring(1,l.length-1))))));return F};Editor.extractParserError=function(l,x){var F=null;l=null!=l?l.getElementsByTagName("parsererror"):null;null!=l&&0<l.length&&(F=x||mxResources.get("invalidChars"),x=l[0].getElementsByTagName("div"),0<x.length&&(F=mxUtils.getTextContent(x[0])));return null!=-F?mxUtils.trim(F):F};Editor.addRetryToError=function(l,x){null!=l&&(l=null!=l.error?l.error:l,null==l.retry&&(l.retry=x))};Editor.mermaidToDrawio=function(l,x,F){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(l,x,F)};Editor.configure=function(l){if(null!=l){Editor.config=l;Editor.configVersion=l.version;l.debug&&(urlParams.test="1");null!=l.defaultFonts&&(Menus.prototype.defaultFonts=l.defaultFonts);null!=l.presetColors&&(ColorDialog.prototype.presetColors=l.presetColors);null!=-l.defaultColors&&(ColorDialog.prototype.defaultColors=l.defaultColors);null!=l.colorNames&&(ColorDialog.prototype.colorNames=l.colorNames);null!=l.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=l.defaultColorSchemes);null!=l.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=l.defaultEdgeLength);null!=l.selectParentLayer&&(Graph.selectParentLayer=l.selectParentLayer);null!=l.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=l.autosaveDelay);null!=l.templateFile&&(EditorUi.templateFile=-l.templateFile);null!=l.styles&&(Array.isArray(l.styles)?Editor.styles=l.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=l.globalVars&&(Editor.globalVars=l.globalVars);null!=l.compressXml&&(Editor.defaultCompressed=l.compressXml,Editor.compressXml=l.compressXml);null!=l.includeDiagram&&(Editor.defaultIncludeDiagram=l.includeDiagram);null!=l.simpleLabels&&(Editor.simpleLabels=l.simpleLabels);null!=l.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=l.oneDriveInlinePicker);-null!=l.defaultAdaptiveColors?Graph.defaultAdaptiveColors=l.defaultAdaptiveColors:0==l.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=l.darkColor&&(Editor.darkColor=l.darkColor);null!=l.darkColorVar&&(Editor.darkColorVar=l.darkColorVar);Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor=-"light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=l.settingsName&&(Editor.configurationKey="."+l.settingsName+"-configuration",Editor.settingsKey="."+l.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=l.customFonts&&(Menus.prototype.defaultFonts=l.customFonts.concat(Menus.prototype.defaultFonts));null!=l.customPresetColors&&(ColorDialog.prototype.presetColors=l.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=l.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=-l.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=l.css){var x=document.createElement("style");x.setAttribute("type","text/css");x.appendChild(document.createTextNode(l.css));var F=document.getElementsByTagName("script")[0];F.parentNode.insertBefore(x,F)}null!=l.expandLibraries&&(Sidebar.prototype.expandLibraries=l.expandLibraries);null!=l.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=l.appendCustomLibraries);null!=l.libraries&&(Sidebar.prototype.customEntries=-l.libraries);null!=l.enabledLibraries&&(Array.isArray(l.enabledLibraries)?Sidebar.prototype.enabledLibraries=l.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=l.defaultLibraries&&(Sidebar.prototype.defaultEntries=l.defaultLibraries);null!=l.defaultCustomLibraries&&(Editor.defaultCustomLibraries=l.defaultCustomLibraries);null!=l.enableCustomLibraries&&(Editor.enableCustomLibraries=l.enableCustomLibraries);null!=l.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=-l.defaultVertexStyle);null!=l.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=l.defaultEdgeStyle);null!=l.defaultPageVisible&&(Graph.prototype.defaultPageVisible=l.defaultPageVisible);null!=l.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=l.defaultGridEnabled);null!=l.zoomWheel&&(Graph.zoomWheel=l.zoomWheel);null!=l.zoomFactor&&(x=parseFloat(l.zoomFactor),!isNaN(x)&&1<x?Graph.prototype.zoomFactor=x:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=l.defaultGridSize&&-(x=parseInt(l.defaultGridSize),!isNaN(x)&&0<x?mxGraph.prototype.gridSize=x:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=l.gridSteps&&(x=parseInt(l.gridSteps),!isNaN(x)&&0<x?mxGraphView.prototype.gridSteps=x:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=l.pageFormat&&(x=parseInt(l.pageFormat.width),F=parseInt(l.pageFormat.height),!isNaN(x)&&0<x&&!isNaN(F)&&0<F?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,x,F),mxGraph.prototype.pageFormat=-mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=l.thumbWidth&&(Sidebar.prototype.thumbWidth=l.thumbWidth);null!=l.thumbHeight&&(Sidebar.prototype.thumbHeight=l.thumbHeight);null!=l.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=l.emptyLibraryXml);null!=l.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=l.emptyDiagramXml);null!=l.sidebarWidth&&(EditorUi.prototype.hsplitPosition=l.sidebarWidth);null!=l.updateDefaultStyle&&-(EditorUi.prototype.updateDefaultStyle=l.updateDefaultStyle);null!=l.sidebarTitles&&(Sidebar.prototype.sidebarTitles=l.sidebarTitles);null!=l.sidebarTitleSize&&(x=parseInt(l.sidebarTitleSize),!isNaN(x)&&0<x?Sidebar.prototype.sidebarTitleSize=x:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=l.fontCss&&("string"===typeof l.fontCss?Editor.configureFontCss(l.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=l.autosaveDelay&&(x=parseInt(l.autosaveDelay),-!isNaN(x)&&0<x?DrawioFile.prototype.autosaveDelay=x:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=l.maxImageBytes&&(EditorUi.prototype.maxImageBytes=l.maxImageBytes);null!=l.maxImageSize&&(EditorUi.prototype.maxImageSize=l.maxImageSize);null!=l.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=l.shareCursorPosition);null!=l.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=l.showRemoteCursors);null!=l.restrictExport&&(DrawioFile.RESTRICT_EXPORT=-l.restrictExport);null!=l.replaceSvgDataUris&&(Editor.replaceSvgDataUris=l.replaceSvgDataUris);null!=l.foreignObjectImages&&(Editor.foreignObjectImages=l.foreignObjectImages);null!=l.shadowColor&&(mxConstants.SHADOW_COLOR=l.shadowColor);null!=l.shadowOpacity&&(mxConstants.SHADOW_OPACITY=l.shadowOpacity);null!=l.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=l.shadowOffsetX);null!=l.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=l.shadowOffsetY);null!=l.shadowBlur&&(mxConstants.SHADOW_BLUR=l.shadowBlur);-null!=l.enableAnimations&&(Editor.enableAnimations=l.enableAnimations);null!=l.enableChatGpt&&(Editor.enableChatGpt=l.enableChatGpt);null!=l.gptApiKey&&(Editor.gptApiKey=l.gptApiKey);null!=l.gptModel&&(Editor.gptModel=l.gptModel);null!=l.gptUrl&&(Editor.gptUrl=l.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(l){if(null!=l){Editor.prototype.fontCss=l;var x=document.getElementsByTagName("script")[0];-if(null!=x&&null!=x.parentNode){var F=document.createElement("style");F.setAttribute("type","text/css");F.appendChild(document.createTextNode(l));x.parentNode.insertBefore(F,x);l=l.split("url(");for(F=1;F<l.length;F++){var N=l[F].indexOf(")");N=Editor.trimCssUrl(l[F].substring(0,N));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",N);O.setAttribute("as","font");O.setAttribute("crossorigin","");x.parentNode.insertBefore(O,x)}}}};Editor.trimCssUrl=function(l){return l.replace(RegExp("^[\\s\"']+",-"g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(l){l=null!=l?l:Editor.GUID_LENGTH;for(var x=[],F=0;F<l;F++)x.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return x.join("")};Editor.updateStatusInterval=+type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(m,z){var I=mxUtils.getValue(m.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||z.editorUi.editor.graph.isSwimlane(m.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(m.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(m.style,mxConstants.STYLE_OPACITY,100)||null!=m.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",+type:"bool",defVal:!1,isVisible:function(m,z){return 0<m.vertices.length&&z.editorUi.editor.graph.isContainer(m.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\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,,[email protected],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,[email protected],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,[email protected],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,[email protected],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(m){var z=rough.canvas({getContext:function(){return m}});z.draw=function(I){var L=I.sets||[];I=I.options||this.getDefaultOptions();for(var N=0;N<L.length;N++){var O=L[N];switch(O.type){case "path":null!=I.stroke&&this._drawToContext(m,O,I);break;case "fillPath":this._drawToContext(m,O,I);break;case "fillSketch":this.fillSketch(m,O,I)}}};z.fillSketch=function(I,L,N){var O=m.state.strokeColor,S=m.state.strokeWidth,U=m.state.strokeAlpha,W=m.state.dashed,X=N.fillWeight;+0>X&&(X=N.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(N.fill||"");m.setStrokeWidth(X);m.setDashed(!1);this._drawToContext(I,L,N);m.setDashed(W);m.setStrokeWidth(S);m.setStrokeColor(O);m.setStrokeAlpha(U)};z._drawToContext=function(I,L,N){I.begin();for(var O=0;O<L.ops.length;O++){var S=L.ops[O],U=S.data;switch(S.op){case "move":I.moveTo(U[0],U[1]);break;case "bcurveTo":I.curveTo(U[0],U[1],U[2],U[3],U[4],U[5]);break;case "lineTo":I.lineTo(U[0],U[1])}}I.end();"fillPath"===L.type&&+N.filled?I.fill():I.stroke()};return z};(function(){function m(O,S,U){this.canvas=O;this.rc=S;this.shape=U;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=+mxUtils.bind(this,m.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,m.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,m.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,m.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,m.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,+m.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,m.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,m.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,m.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,m.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,m.prototype.fillAndStroke);+this.path=[];this.passThrough=!1}m.prototype.moveOp="M";m.prototype.lineOp="L";m.prototype.quadOp="Q";m.prototype.curveOp="C";m.prototype.closeOp="Z";m.prototype.getStyle=function(O,S){var U=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)U=(U<<5)-U+W.charCodeAt(X)<<0}U={strokeWidth:this.canvas.state.strokeWidth,seed:U,preserveVertices:!0};W=this.rc.getDefaultOptions();U.stroke=O?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:+mxConstants.NONE;O=null;(U.filled=S)?(U.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,O=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):U.fill="";U.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);U.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);U.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);U.roughness=mxUtils.getValue(this.shape.style,"jiggle",+W.roughness);U.simplification=mxUtils.getValue(this.shape.style,"simplification",W.simplification);U.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",W.disableMultiStroke);U.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",W.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);U.hachureGap="auto"==S?-1:S;U.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);U.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",+S);U.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);U.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==S&&(S="auto");"auto"==S&&(S=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&S.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&S.push(mxUtils.hex2rgb(Editor.darkColor)),S=null!=U.fill&&(null!=O||0<=mxUtils.indexOf(S,mxUtils.hex2rgb(U.fill)))?+"solid":W.fillStyle);U.fillStyle=S;return U};m.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};m.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};m.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var O=2;O<arguments.length;O+=2)this.lastX=arguments[O-1],this.lastY=arguments[O],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};+m.prototype.lineTo=function(O,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,O,S),this.lastX=O,this.lastY=S)};m.prototype.moveTo=function(O,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,O,S),this.lastX=O,this.lastY=S,this.firstX=O,this.firstY=S)};m.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};m.prototype.quadTo=function(O,S,U,W){this.passThrough?+this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,O,S,U,W),this.lastX=U,this.lastY=W)};m.prototype.curveTo=function(O,S,U,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,O,S,U,W,X,Z),this.lastX=X,this.lastY=Z)};m.prototype.arcTo=function(O,S,U,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,O,S,U,W,X,Z,Y);if(null!=ba)for(var ea=0;ea<ba.length;ea+=+6)this.curveTo(ba[ea],ba[ea+1],ba[ea+2],ba[ea+3],ba[ea+4],ba[ea+5]);this.lastX=Z;this.lastY=Y}};m.prototype.rect=function(O,S,U,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(O,S,U,W,this.getStyle(!0,!0)))};m.prototype.ellipse=function(O,S,U,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(O+U/2,S+W/2,U,W,this.getStyle(!0,!0)))};m.prototype.roundrect=+function(O,S,U,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(O+X,S),this.lineTo(O+U-X,S),this.quadTo(O+U,S,O+U,S+Z),this.lineTo(O+U,S+W-Z),this.quadTo(O+U,S+W,O+U-X,S+W),this.lineTo(O+X,S+W),this.quadTo(O,S+W,O,S+W-Z),this.lineTo(O,S+Z),this.quadTo(O,S,O+X,S))};m.prototype.drawPath=function(O){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),O)}catch(U){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in O)this.nextShape.options[S]=+O[S];O.stroke!=mxConstants.NONE&&null!=O.stroke||delete this.nextShape.options.stroke;O.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};m.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};m.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};m.prototype.fillAndStroke=function(){this.passThrough?+this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};m.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;+this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(O){return new m(O,Editor.createRoughCanvas(O),this)};var z=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(O){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?z.apply(this,arguments):"comic"==mxUtils.getValue(this.style,+"sketchStyle","rough")?this.createComicCanvas(O):this.createRoughCanvas(O)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(O,S,U,W,X){null!=O.handJiggle&&O.handJiggle.passThrough||I.apply(this,arguments)};var L=mxShape.prototype.paint;mxShape.prototype.paint=function(O){var S=O.addTolerance,U=!0;null!=this.style&&(U="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=O.handJiggle&&O.handJiggle.constructor==m&&!this.outline){O.save();+var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=O.setStrokeColor;O.setStrokeColor=function(){};var ba=O.setFillColor;O.setFillColor=function(){};U||null==W||(this.configurePointerEvents=function(){});O.handJiggle.passThrough=!0;L.apply(this,arguments);O.handJiggle.passThrough=!1;O.setFillColor=ba;O.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;O.restore();U&&null!=W&&(O.addTolerance=function(){})}L.apply(this,arguments);O.addTolerance=+S};var N=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(O,S,U,W,X,Z){null!=O.handJiggle&&O.handJiggle.constructor==m?(O.handJiggle.passThrough=!0,N.apply(this,arguments),O.handJiggle.passThrough=!1):N.apply(this,arguments)}})();Editor.fastCompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:Graph.arrayBufferToString(pako.deflateRaw(m))};Editor.fastDecompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:pako.inflateRaw(Graph.stringToArrayBuffer(atob(m)),+{to:"string"})};Editor.extractGraphModel=function(m,z,I){if(null!=m&&"undefined"!==typeof pako){var L=m.ownerDocument.getElementsByTagName("div"),N=[];if(null!=L&&0<L.length)for(var O=0;O<L.length;O++)if("mxgraph"==L[O].getAttribute("class")){N.push(L[O]);break}0<N.length&&(L=N[0].getAttribute("data-mxgraph"),null!=L?(N=JSON.parse(L),null!=N&&null!=N.xml&&(m=mxUtils.parseXml(N.xml),m=m.documentElement)):(N=N[0].getElementsByTagName("div"),0<N.length&&(L=mxUtils.getTextContent(N[0]),L=Graph.decompress(L,+null,I),0<L.length&&(m=mxUtils.parseXml(L),m=m.documentElement))))}if(null!=m&&"svg"==m.nodeName)if(L=m.getAttribute("content"),null!=L&&"<"!=L.charAt(0)&&"%"!=L.charAt(0)&&(L=unescape(window.atob?atob(L):Base64.decode(cont,L))),null!=L&&"%"==L.charAt(0)&&(L=decodeURIComponent(L)),null!=L&&0<L.length)m=mxUtils.parseXml(L).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==m||z||(N=null,"diagram"==m.nodeName?N=m:"mxfile"==m.nodeName&&(L=m.getElementsByTagName("diagram"),0<+L.length&&(N=L[Math.max(0,Math.min(L.length-1,urlParams.page||0))])),null!=N&&(m=Editor.parseDiagramNode(N,I)));null==m||"mxGraphModel"==m.nodeName||z&&"mxfile"==m.nodeName||(m=null);return m};Editor.parseDiagramNode=function(m,z,I){Editor.validateDiagramNode(m);var L=mxUtils.trim(mxUtils.getTextContent(m)),N=null;0<L.length?(z=Graph.decompress(L,null,z),null!=z&&0<z.length&&(N=mxUtils.parseXml(z).documentElement)):(m=mxUtils.getChildNodes(m),0<m.length&&(N=m[0],I&&(N=Editor.parseDiagramNode(N,z,+!1)),z=mxUtils.createXmlDocument(),z.appendChild(z.importNode(N,!0)),N=z.documentElement));return N};Editor.getDiagramNodeXml=function(m){Editor.validateDiagramNode(m);var z=mxUtils.getNodeValue(m),I=null;0<z.length?I=Graph.decompress(z):(m=m.getElementsByTagName("mxGraphModel"),null!=m&&0<m.length&&(I=mxUtils.getXml(m[0])));return I};Editor.validateDiagramNode=function(m){if(0==mxUtils.trim(mxUtils.getTextContent(m)).length&&0==mxUtils.getChildNodes(m).length){var z=new mxCodec,I=new mxGraphModel;+m.appendChild(z.encode(I))}return m};Editor.extractGraphModelFromPdf=function(m){var z=null;m=m.substring(m.indexOf(",")+1);m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0);if("%PDF-1.7"==m.substring(0,8)){var I=m.indexOf("EmbeddedFile");if(-1<I){var L=m.indexOf("stream",I)+9;if(0<m.substring(I,L).indexOf("application#2Fvnd.jgraph.mxfile")){var N=m.indexOf("endstream",L-1);return pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(L,N)),{to:"string"})}}for(I=m.indexOf("/ObjStm");0<I;){L=+m.indexOf("stream",I)+9;N=m.indexOf("endstream",L-1);L=pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(L,N)),{to:"string"});N=L.indexOf("/Subject <");if(0<N){I=L.substring(N+14,L.indexOf(">",N));if(null!=I){z=I;I=[];for(L=0;L<z.length;L+=2)N=z.substr(L,2),"00"!=N&&I.push(String.fromCharCode(parseInt(N,16)));z=I.join("")}break}I=m.indexOf("/ObjStm",I+1)}}if(null==z&&"%PDF-1.4"==m.substring(0,8)){I="";N=L=0;for(var O=[],S=null;N<m.length;){var U=m.charCodeAt(N);N+=1;10!=U&&(I+=String.fromCharCode(U));+U=="/Subject (%3Cmxfile".charCodeAt(L)?L++:L=0;if(19==L){var W=m.indexOf("%3C%2Fmxfile%3E",N)+15;N-=9;if(W>N){z=m.substring(N,W);break}}10==U&&("endobj"==I?S=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(S=[],O[I.split(" ")[0]]=S):null!=S&&S.push(I),I="")}}null==z&&null!=O&&(z=Editor.extractGraphModelFromXref(O));null!=z&&(z=decodeURIComponent(z.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return z};Editor.extractGraphModelFromXref=function(m){var z=m.trailer,I=null;null!=+z&&(z=/.* \/Info (\d+) (\d+) R/g.exec(z.join("\n")),null!=z&&0<z.length&&(z=m[z[1]],null!=z&&(z=/.* \/Subject (\d+) (\d+) R/g.exec(z.join("\n")),null!=z&&0<z.length&&(m=m[z[1]],null!=m&&(m=m.join("\n"),I=m.substring(1,m.length-1))))));return I};Editor.extractParserError=function(m,z){var I=null;m=null!=m?m.getElementsByTagName("parsererror"):null;null!=m&&0<m.length&&(I=z||mxResources.get("invalidChars"),z=m[0].getElementsByTagName("div"),0<z.length&&(I=mxUtils.getTextContent(z[0])));return null!=+I?mxUtils.trim(I):I};Editor.addRetryToError=function(m,z){null!=m&&(m=null!=m.error?m.error:m,null==m.retry&&(m.retry=z))};Editor.mermaidToDrawio=function(m,z,I){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(m,z,I)};Editor.configure=function(m){if(null!=m){Editor.config=m;Editor.configVersion=m.version;m.debug&&(urlParams.test="1");null!=m.defaultFonts&&(Menus.prototype.defaultFonts=m.defaultFonts);null!=m.presetColors&&(ColorDialog.prototype.presetColors=m.presetColors);null!=+m.defaultColors&&(ColorDialog.prototype.defaultColors=m.defaultColors);null!=m.colorNames&&(ColorDialog.prototype.colorNames=m.colorNames);null!=m.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=m.defaultColorSchemes);null!=m.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=m.defaultEdgeLength);null!=m.selectParentLayer&&(Graph.selectParentLayer=m.selectParentLayer);null!=m.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=m.autosaveDelay);null!=m.templateFile&&(EditorUi.templateFile=+m.templateFile);null!=m.styles&&(Array.isArray(m.styles)?Editor.styles=m.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=m.globalVars&&(Editor.globalVars=m.globalVars);null!=m.compressXml&&(Editor.defaultCompressed=m.compressXml,Editor.compressXml=m.compressXml);null!=m.includeDiagram&&(Editor.defaultIncludeDiagram=m.includeDiagram);null!=m.simpleLabels&&(Editor.simpleLabels=m.simpleLabels);null!=m.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=m.oneDriveInlinePicker);+null!=m.defaultAdaptiveColors?Graph.defaultAdaptiveColors=m.defaultAdaptiveColors:0==m.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=m.darkColor&&(Editor.darkColor=m.darkColor);null!=m.darkColorVar&&(Editor.darkColorVar=m.darkColorVar);Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor=+"light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=m.settingsName&&(Editor.configurationKey="."+m.settingsName+"-configuration",Editor.settingsKey="."+m.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=m.customFonts&&(Menus.prototype.defaultFonts=m.customFonts.concat(Menus.prototype.defaultFonts));null!=m.customPresetColors&&(ColorDialog.prototype.presetColors=m.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=m.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=+m.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=m.css){var z=document.createElement("style");z.setAttribute("type","text/css");z.appendChild(document.createTextNode(m.css));var I=document.getElementsByTagName("script")[0];I.parentNode.insertBefore(z,I)}null!=m.expandLibraries&&(Sidebar.prototype.expandLibraries=m.expandLibraries);null!=m.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=m.appendCustomLibraries);null!=m.libraries&&(Sidebar.prototype.customEntries=+m.libraries);null!=m.enabledLibraries&&(Array.isArray(m.enabledLibraries)?Sidebar.prototype.enabledLibraries=m.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=m.defaultLibraries&&(Sidebar.prototype.defaultEntries=m.defaultLibraries);null!=m.defaultCustomLibraries&&(Editor.defaultCustomLibraries=m.defaultCustomLibraries);null!=m.enableCustomLibraries&&(Editor.enableCustomLibraries=m.enableCustomLibraries);null!=m.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=+m.defaultVertexStyle);null!=m.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=m.defaultEdgeStyle);null!=m.defaultPageVisible&&(Graph.prototype.defaultPageVisible=m.defaultPageVisible);null!=m.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=m.defaultGridEnabled);null!=m.zoomWheel&&(Graph.zoomWheel=m.zoomWheel);null!=m.zoomFactor&&(z=parseFloat(m.zoomFactor),!isNaN(z)&&1<z?Graph.prototype.zoomFactor=z:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=m.defaultGridSize&&+(z=parseInt(m.defaultGridSize),!isNaN(z)&&0<z?mxGraph.prototype.gridSize=z:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=m.gridSteps&&(z=parseInt(m.gridSteps),!isNaN(z)&&0<z?mxGraphView.prototype.gridSteps=z:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=m.pageFormat&&(z=parseInt(m.pageFormat.width),I=parseInt(m.pageFormat.height),!isNaN(z)&&0<z&&!isNaN(I)&&0<I?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,z,I),mxGraph.prototype.pageFormat=+mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=m.thumbWidth&&(Sidebar.prototype.thumbWidth=m.thumbWidth);null!=m.thumbHeight&&(Sidebar.prototype.thumbHeight=m.thumbHeight);null!=m.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=m.emptyLibraryXml);null!=m.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=m.emptyDiagramXml);null!=m.sidebarWidth&&(EditorUi.prototype.hsplitPosition=m.sidebarWidth);null!=m.updateDefaultStyle&&+(EditorUi.prototype.updateDefaultStyle=m.updateDefaultStyle);null!=m.sidebarTitles&&(Sidebar.prototype.sidebarTitles=m.sidebarTitles);null!=m.sidebarTitleSize&&(z=parseInt(m.sidebarTitleSize),!isNaN(z)&&0<z?Sidebar.prototype.sidebarTitleSize=z:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=m.fontCss&&("string"===typeof m.fontCss?Editor.configureFontCss(m.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=m.autosaveDelay&&(z=parseInt(m.autosaveDelay),+!isNaN(z)&&0<z?DrawioFile.prototype.autosaveDelay=z:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=m.maxImageBytes&&(EditorUi.prototype.maxImageBytes=m.maxImageBytes);null!=m.maxImageSize&&(EditorUi.prototype.maxImageSize=m.maxImageSize);null!=m.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=m.shareCursorPosition);null!=m.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=m.showRemoteCursors);null!=m.restrictExport&&(DrawioFile.RESTRICT_EXPORT=+m.restrictExport);null!=m.replaceSvgDataUris&&(Editor.replaceSvgDataUris=m.replaceSvgDataUris);null!=m.foreignObjectImages&&(Editor.foreignObjectImages=m.foreignObjectImages);null!=m.shadowColor&&(mxConstants.SHADOW_COLOR=m.shadowColor);null!=m.shadowOpacity&&(mxConstants.SHADOW_OPACITY=m.shadowOpacity);null!=m.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=m.shadowOffsetX);null!=m.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=m.shadowOffsetY);null!=m.shadowBlur&&(mxConstants.SHADOW_BLUR=m.shadowBlur);+null!=m.enableAnimations&&(Editor.enableAnimations=m.enableAnimations);null!=m.enableChatGpt&&(Editor.enableChatGpt=m.enableChatGpt);null!=m.gptApiKey&&(Editor.gptApiKey=m.gptApiKey);null!=m.gptModel&&(Editor.gptModel=m.gptModel);null!=m.gptUrl&&(Editor.gptUrl=m.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(m){if(null!=m){Editor.prototype.fontCss=m;var z=document.getElementsByTagName("script")[0];+if(null!=z&&null!=z.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(m));z.parentNode.insertBefore(I,z);m=m.split("url(");for(I=1;I<m.length;I++){var L=m[I].indexOf(")");L=Editor.trimCssUrl(m[I].substring(0,L));var N=document.createElement("link");N.setAttribute("rel","preload");N.setAttribute("href",L);N.setAttribute("as","font");N.setAttribute("crossorigin","");z.parentNode.insertBefore(N,z)}}}};Editor.trimCssUrl=function(m){return m.replace(RegExp("^[\\s\"']+",+"g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(m){m=null!=m?m:Editor.GUID_LENGTH;for(var z=[],I=0;I<m;I++)z.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return z.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",-title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(l){l=null!=l&&"mxlibrary"!=l.nodeName?this.extractGraphModel(l):null;if(null!=l){var x=Editor.extractParserError(l,mxResources.get("invalidOrMissingFile"));if(x)throw EditorUi.debug("Editor.setGraphXml ParserError",-[this],"node",[l],"cause",[x]),Error(mxResources.get("notADiagramFile")+" ("+x+")");if("mxGraphModel"==l.nodeName){x=l.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=x&&""!=x)x!=this.graph.currentStyle&&(F=null!=this.graph.themes?this.graph.themes[x]:mxUtils.load(STYLE_PATH+"/"+x+".xml").getDocumentElement(),null!=F&&(N=new mxCodec(F.ownerDocument),N.decode(F,this.graph.getStylesheet())));else{var F=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+-"/default-old.xml").getDocumentElement();if(null!=F){var N=new mxCodec(F.ownerDocument);N.decode(F,this.graph.getStylesheet())}}this.graph.currentStyle=x;this.graph.mathEnabled="1"==urlParams.math||"1"==l.getAttribute("math");this.graph.setAdaptiveColors(l.getAttribute("adaptiveColors"));x=l.getAttribute("backgroundImage");null!=x?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(x)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&-this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==l.getAttribute("shadow"),!1);if(x=l.getAttribute("extFonts"))try{for(x=x.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),F=0;F<x.length;F++)this.graph.addExtFont(x[F].name,x[F].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||-"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(l,x){l=null!=l?l:!0;var F=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&F.setAttribute("style",this.graph.currentStyle);var N=this.graph.getBackgroundImageObject(this.graph.backgroundImage,x);null!=N&&F.setAttribute("backgroundImage",JSON.stringify(N));F.setAttribute("math",this.graph.mathEnabled?"1":"0");F.setAttribute("shadow",-this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?F.setAttribute("adaptiveColors",this.graph.adaptiveColors):F.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(N=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),F.setAttribute("extFonts",N.join("|")));return F};Editor.prototype.isDataSvg=function(l){try{var x=mxUtils.parseXml(l).documentElement.getAttribute("content");if(null!=x&&(null!=x&&"<"!=x.charAt(0)&&"%"!=x.charAt(0)&&(x=-unescape(window.atob?atob(x):Base64.decode(cont,x))),null!=x&&"%"==x.charAt(0)&&(x=decodeURIComponent(x)),null!=x&&0<x.length)){var F=mxUtils.parseXml(x).documentElement;return"mxfile"==F.nodeName||"mxGraphModel"==F.nodeName}}catch(N){}return!1};Editor.prototype.extractGraphModel=function(l,x,F){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);-this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(l,x){if("undefined"===-typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var F=function(){N=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};l=null!=l?l:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var N=null;Editor.doMathJaxRender=function(V){try{null==N?(MathJax.typesetClear([V]),MathJax.typeset([V]),F()):N!=V&&Editor.mathJaxQueue.push(V)}catch(T){MathJax.typesetClear([V]),null!=T.retry?(N=V,T.retry.then(function(){MathJax.typesetPromise([V]).then(F)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "+-W.toString());F()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());F()})):null!=window.console&&console.log("Error in MathJax.typeset: "+T.toString())}};window.MathJax=null!=x?x:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var V=0;V<Editor.mathJaxQueue.length;V++)Editor.doMathJaxRender(Editor.mathJaxQueue[V])}}};-Editor.MathJaxRender=function(V){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(V):Editor.mathJaxQueue.push(V)};Editor.onMathJaxDone=function(){};var O=Editor.prototype.init;Editor.prototype.init=function(){O.apply(this,arguments);var V=mxUtils.bind(this,function(T,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,V);this.graph.addListener(mxEvent.REFRESH,V)};x=document.getElementsByTagName("script");-if(null!=x&&0<x.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",l);x[0].parentNode.appendChild(Q)}}};Editor.prototype.csvToArray=function(l){if(0<l.length){var x="",F=[""],N=0,O=!0,Q;l=$jscomp.makeIterator(l);for(Q=l.next();!Q.done;Q=l.next())Q=Q.value,'"'===Q?(O&&Q===x&&(F[N]+=Q),O=!O):","===Q&&O?Q=F[++N]="":F[N]+=Q,x=Q;return F}return[]};Editor.prototype.getProxiedUrl=function(l){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&-!this.isCorsEnabledForUrl(l)){var x=EditorUi.isVisioFilename(l);x=/\.png$/i.test(l)||/\.pdf$/i.test(l)||x;var F="t="+(new Date).getTime();l=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+F+(x?"&base64=1":"")}return l};Editor.prototype.isCorsEnabledForUrl=function(l){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||l.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));-return null!=this.corsRegExp&&this.corsRegExp.test(l)||"https://raw.githubusercontent.com/"===l.substring(0,34)||"https://fonts.googleapis.com/"===l.substring(0,29)||"https://fonts.gstatic.com/"===l.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var l=new mxUrlConverter;l.updateBaseUrl();var x=l.convert,F=this;l.convert=function(N){null!=N&&navigator.onLine&&("http://"!=N.substring(0,7)&&"https://"!=N.substring(0,8)||N.substring(0,l.baseUrl.length)==l.baseUrl||F.crossOriginImages&&-F.isCorsEnabledForUrl(N)?"chrome-extension://"!=N.substring(0,19)&&(N=x.apply(this,arguments)):N=PROXY_URL+"?url="+encodeURIComponent(N));return N};return l};Editor.createSvgDataUri=function(l){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(l)))};Editor.prototype.convertImageToDataUri=function(l,x,F,N,O){try{var Q=!0,V=window.setTimeout(mxUtils.bind(this,function(){Q=!1;x(l)}),this.timeout),T=mxUtils.bind(this,function(){null!=N?this.convertImageToDataUri(l,x,F,N,!0):x(l)});if(/(\.svg)$/i.test(l)&&-!O)mxUtils.get(l,mxUtils.bind(this,function(X){window.clearTimeout(V);Q&&(200>X.getStatus()||299<X.getStatus()?T():x(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(V);Q&&T()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(V);if(Q)try{N=null!=N&&O?N:1;var X=document.createElement("canvas"),Y=X.getContext("2d");Y.scale(N,N);X.height=W.height*N;X.width=W.width*N;Y.drawImage(W,0,0);x(X.toDataURL())}catch(Z){x(l)}};-W.onerror=function(){window.clearTimeout(V);Q&&(null!=F?F():x(l))};W.src=l}}catch(X){null!=F?F():x(l)}};Editor.prototype.convertImages=function(l,x,F,N){function O(){0<Q.length?Q.shift()():x(l)}null==N&&(N=this.createImageUrlConverter());var Q=[],V=F||{};F=mxUtils.bind(this,function(T,W){T=l.getElementsByTagName(T);for(var X=0;X<T.length;X++)mxUtils.bind(this,function(Y){Q.push(mxUtils.bind(this,function(){try{if(null!=Y){var Z=N.convert(Y.getAttribute(W));if(null!=Z&&"data:"!=Z.substring(0,5)){var aa=-V[Z];null==aa?this.convertImageToDataUri(Z,function(ea){null!=ea&&(V[Z]=ea,Y.setAttribute(W,ea));O()},null,Editor.svgRasterScale):(Y.setAttribute(W,aa),O())}else null!=Z&&Y.setAttribute(W,Z),O()}}catch(ea){O()}}))})(T[X])});F("image","xlink:href");F("img","src");O()};Editor.base64Encode=function(l){for(var x="",F=0,N=l.length,O,Q,V;F<N;){O=l.charCodeAt(F++)&255;if(F==N){x+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);x+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&-3)<<4);x+="==";break}Q=l.charCodeAt(F++);if(F==N){x+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);x+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(Q&240)>>4);x+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);x+="=";break}V=l.charCodeAt(F++);x+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);x+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&-3)<<4|(Q&240)>>4);x+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(V&192)>>6);x+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(V&63)}return x};Editor.prototype.loadUrl=function(l,x,F,N,O,Q,V,T){try{var W=!V&&(N||/(\.png)($|\?)/i.test(l)||/(\.jpe?g)($|\?)/i.test(l)||/(\.gif)($|\?)/i.test(l)||/(\.pdf)($|\?)/i.test(l));O=null!=O?O:!0;var X=mxUtils.bind(this,function(){mxUtils.get(l,mxUtils.bind(this,function(Y){if(200<=Y.getStatus()&&-299>=Y.getStatus()){if(null!=x){var Z=Y.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Y=mxUtilsBinaryToArray(Y.request.responseBody).toArray();Z=Array(Y.length);for(var aa=0;aa<Y.length;aa++)Z[aa]=String.fromCharCode(Y[aa]);Z=Z.join("")}Q=null!=Q?Q:"data:image/png;base64,";Z=Q+Editor.base64Encode(Z)}x(Z)}}else null!=F&&(0==Y.getStatus()?F({message:mxResources.get("accessDenied")},Y):404==Y.getStatus()?F({message:mxResources.get("fileNotFound"),-code:Y.getStatus()},Y):F({message:this.getErrorMessage(Y)},Y))}),function(Y){null!=F&&F({message:mxResources.get("error")+" "+Y.getStatus()})},W,this.timeout,function(){O&&null!=F&&F({code:App.ERROR_TIMEOUT,retry:X})},T)});X()}catch(Y){null!=F&&F(Y)}};Editor.prototype.getErrorMessage=function(l){var x=mxResources.get("error")+" "+l.getStatus();try{var F=l.getText(),N=JSON.parse(F);null!=N&&null!=N.error&&null!=N.error.message&&(x=N.error.message+" ("+x+")")}catch(O){}return x};Editor.prototype.absoluteCssFonts=-function(l){var x=null;if(null!=l){var F=l.split("url(");if(0<F.length){x=[F[0]];l=window.location.pathname;var N=null!=l?l.lastIndexOf("/"):-1;0<=N&&(l=l.substring(0,N+1));N=document.getElementsByTagName("base");var O=null;null!=N&&0<N.length&&(O=N[0].getAttribute("href"));for(var Q=1;Q<F.length;Q++)if(N=F[Q].indexOf(")"),0<N){var V=Editor.trimCssUrl(F[Q].substring(0,N));this.graph.isRelativeUrl(V)&&(V=null!=O?O+V:window.location.protocol+"//"+window.location.hostname+("/"==V.charAt(0)?"":l)+V);-x.push('url("'+V+'"'+F[Q].substring(N))}else x.push(F[Q])}else x=[l]}return null!=x?x.join(""):null};Editor.prototype.mapFontUrl=function(l,x,F){/^https?:\/\//.test(x)&&!this.isCorsEnabledForUrl(x)&&(x=PROXY_URL+"?url="+encodeURIComponent(x));F(l,x)};Editor.prototype.embedCssFonts=function(l,x){var F=l.split("url("),N=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==N){for(var W=[F[0]],X=1;X<F.length;X++){var Y=F[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(F[X].substring(0,-Y))]);W.push('"'+F[X].substring(Y))}x(W.join(""))}});if(0<F.length){for(l=1;l<F.length;l++){var Q=F[l].indexOf(")"),V=null,T=F[l].indexOf("format(",Q);0<T&&(V=Editor.trimCssUrl(F[l].substring(T+7,F[l].indexOf(")",T))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;N++;var X="application/x-font-ttf";if("svg"==V||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==V||"embedded-opentype"==V||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==-V||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==V||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==V||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";else if("sfnt"==V||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Y,Z){this.loadUrl(Z,mxUtils.bind(this,function(aa){this.cachedFonts[W]=aa;N--;O()}),mxUtils.bind(this,function(aa){N--;O()}),!0,null,"data:"+Y+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(F[l].substring(0,-Q)),V)}O()}else x(l)};Editor.prototype.loadFonts=function(l){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(x){this.resolvedFontCss=x;null!=l&&l()})):null!=l&&l()};Editor.prototype.createGoogleFontCache=function(){var l={},x;for(x in Graph.fontMapping)Graph.isCssFontUrl(x)&&(l[x]=Graph.fontMapping[x]);return l};Editor.prototype.embedExtFonts=function(l){var x=this.graph.getCustomFonts();if(0<x.length){var F=[],N=0;null==this.cachedGoogleFonts&&-(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==N&&this.embedCssFonts(F.join(""),l)}),Q=0;Q<x.length;Q++)mxUtils.bind(this,function(V,T){Graph.isCssFontUrl(T)?null==this.cachedGoogleFonts[T]?(N++,this.loadUrl(Graph.rewriteGoogleFontUrl(T),mxUtils.bind(this,function(W){this.cachedGoogleFonts[T]=W;F.push(W+"\n");N--;O()}),mxUtils.bind(this,function(W){N--;F.push("@import url("+T+");\n");O()}))):F.push(this.cachedGoogleFonts[T]+"\n"):F.push('@font-face {font-family: "'+-V+'";src: url("'+T+'")}\n')})(x[Q].name,x[Q].url);O()}else l()};Editor.prototype.addMathCss=function(l){l=l.getElementsByTagName("defs");if(null!=l&&0<l.length)for(var x=document.getElementsByTagName("style"),F=0;F<x.length;F++){var N=mxUtils.getTextContent(x[F]);0>N.indexOf("mxPageSelector")&&0<N.indexOf("MathJax")&&l[0].appendChild(x[F].cloneNode(!0))}};Editor.prototype.addFontCss=function(l,x){x=null!=x?x:this.absoluteCssFonts(this.fontCss);if(null!=x){var F=mxUtils.getSvgDefs(l),N=x.split("\n");-x=[];for(var O=[],Q=0;Q<N.length;Q++)"@import"==N[Q].substring(0,7)?x.push(N[Q]):O.push(N[Q]);l=l.ownerDocument;l=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"style"):l.createElement("style");l.setAttribute("type","text/css");0<x.length&&(mxUtils.setTextContent(l,x.join("\n")),F.appendChild(l));0<O.length&&(l=l.cloneNode(!1),mxUtils.setTextContent(l,O.join("\n")),F.appendChild(l))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};-Editor.prototype.getMaxCanvasScale=function(l,x,F){var N=mxClient.IS_FF?8192:16384;return Math.min(F,Math.min(N/l,N/x))};Editor.prototype.exportToCanvas=function(l,x,F,N,O,Q,V,T,W,X,Y,Z,aa,ea,ca,da,ja,ba){try{Q=null!=Q?Q:!0;V=null!=V?V:!0;Z=null!=Z?Z:this.graph;aa=null!=aa?aa:0;var ia=W?null:Z.background;ia==mxConstants.NONE&&(ia=null);null==ia&&(ia=N);null==ia&&0==W&&(ia="dark"==da?Editor.darkColor:"#ffffff");this.convertImages(Z.getSvg(null,null,aa,ea,null,V,null,null,null,X,null,da,ja,ba),mxUtils.bind(this,-function(ka){try{var ua=new Image;ua.onload=mxUtils.bind(this,function(){try{var ha=function(){mxClient.IS_SF?window.setTimeout(function(){wa.drawImage(ua,0,0);l(pa,ka)},0):(wa.drawImage(ua,0,0),l(pa,ka))},pa=document.createElement("canvas"),ra=parseInt(ka.getAttribute("width")),xa=parseInt(ka.getAttribute("height"));T=null!=T?T:1;null!=x&&(T=Q?Math.min(1,Math.min(3*x/(4*xa),x/ra)):x/ra);T=this.getMaxCanvasScale(ra,xa,T);ra=Math.ceil(T*ra);xa=Math.ceil(T*xa);pa.setAttribute("width",ra);pa.setAttribute("height",-xa);var wa=pa.getContext("2d");null!=ia&&(wa.beginPath(),wa.rect(0,0,ra,xa),wa.fillStyle=ia,wa.fill());1!=T&&wa.scale(T,T);if(ca){var fa=Z.view,na=fa.scale;fa.scale=1;var Aa=btoa(unescape(encodeURIComponent(fa.createSvgGrid(fa.gridColor))));fa.scale=na;Aa="data:image/svg+xml;base64,"+Aa;var oa=Z.gridSize*fa.gridSteps*T,Ea=Z.getGraphBounds(),va=fa.translate.x*na,Ca=fa.translate.y*na,Fa=va+(Ea.x-va)/na-aa,Ma=Ca+(Ea.y-Ca)/na-aa,Ba=new Image;Ba.onload=function(){try{for(var Da=-Math.round(oa-mxUtils.mod((va--Fa)*T,oa)),Ia=-Math.round(oa-mxUtils.mod((Ca-Ma)*T,oa));Da<ra;Da+=oa)for(var Va=Ia;Va<xa;Va+=oa)wa.drawImage(Ba,Da/T,Va/T);ha()}catch(Ta){null!=O&&O(Ta)}};Ba.onerror=function(Da){null!=O&&O(Da)};Ba.src=Aa}else ha()}catch(Da){null!=O&&O(Da)}});ua.onerror=function(ha){null!=O&&O(ha)};X&&this.graph.addSvgShadow(ka);this.graph.mathEnabled&&this.addMathCss(ka);var sa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ka,this.resolvedFontCss),ua.src=Editor.createSvgDataUri(mxUtils.getXml(ka))}catch(ha){null!=-O&&O(ha)}});this.embedExtFonts(mxUtils.bind(this,function(ha){try{null!=ha&&this.addFontCss(ka,ha),this.loadFonts(sa)}catch(pa){null!=O&&O(pa)}}))}catch(ha){null!=O&&O(ha)}}),F,Y)}catch(ka){null!=O&&O(ka)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var p=k,q=0;8>q;q++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[k]=p;Editor.updateCRC=function(l,x,F,N){for(var O=0;O<N;O++)l=Editor.crcTable[(l^x.charCodeAt(F+O))&255]^l>>>8;return l};Editor.crc32=function(l){for(var x=-1,F=0;F<l.length;F++)x=-x>>>8^Editor.crcTable[(x^l.charCodeAt(F))&255];return(x^-1)>>>0};Editor.writeGraphModelToPng=function(l,x,F,N,O){function Q(Y,Z){var aa=W;W+=Z;return Y.substring(aa,W)}function V(Y){Y=Q(Y,4);return Y.charCodeAt(3)+(Y.charCodeAt(2)<<8)+(Y.charCodeAt(1)<<16)+(Y.charCodeAt(0)<<24)}function T(Y){return String.fromCharCode(Y>>24&255,Y>>16&255,Y>>8&255,Y&255)}l=l.substring(l.indexOf(",")+1);l=window.atob?atob(l):Base64.decode(l,!0);var W=0;if(Q(l,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,-10,26,10))null!=O&&O();else if(Q(l,4),"IHDR"!=Q(l,4))null!=O&&O();else{Q(l,17);O=l.substring(0,W);do{var X=V(l);if("IDAT"==Q(l,4)){O=l.substring(0,W-8);"pHYs"==x&&"dpi"==F?(F=Math.round(N/.0254),F=T(F)+T(F)+String.fromCharCode(1)):F=F+String.fromCharCode(0)+("zTXt"==x?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,x,0,4);N=Editor.updateCRC(N,F,0,F.length);O+=T(F.length)+x+F+T(N^4294967295);O+=l.substring(W-8,l.length);break}O+=l.substring(W-8,W-4+X);Q(l,X);Q(l,4)}while(X);return"data:image/png;base64,"+-(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var u=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(l,x){u.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var E=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){E.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==-typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(l,x){var F=null;null!=l.editor.graph.getModel().getParent(x)?F=x.getId():null!=l.currentPage&&(F=l.currentPage.getId());return F});if(null!=window.StyleFormatPanel){var H=Format.prototype.init;Format.prototype.init=function(){H.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var D=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||-this.editorUi.editor.chromeless?D.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(l){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var L=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(l){l=L.apply(this,arguments);var x=this.editorUi,F=x.editor.graph;if(F.isEnabled()){var N=x.getCurrentFile();null!=N&&N.isAutosaveOptional()&&l.appendChild(this.createOption(mxResources.get("autosave"),-function(){return x.editor.autosave},function(V){x.editor.setAutosave(V);x.editor.autosave&&N.isModified()&&N.fileChanged()},{install:function(V){this.listener=function(){V(x.editor.autosave)};x.editor.addListener("autosaveChanged",this.listener)},destroy:function(){x.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&F.isEnabled()&&"undefined"!==typeof MathJax){var O=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return F.mathEnabled},function(V){x.actions.get("mathematicalTypesetting").funct()},-{install:function(V){this.listener=function(){V(F.mathEnabled)};x.addListener("mathEnabledChanged",this.listener)},destroy:function(){x.removeListener(this.listener)}});l.appendChild(O);if(!x.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var Q=x.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");Q.style.position="absolute";Q.style.left="85%";O.appendChild(Q)}}return l};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",+title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(m){m=null!=m&&"mxlibrary"!=m.nodeName?this.extractGraphModel(m):null;if(null!=m){var z=Editor.extractParserError(m,mxResources.get("invalidOrMissingFile"));if(z)throw EditorUi.debug("Editor.setGraphXml ParserError",+[this],"node",[m],"cause",[z]),Error(mxResources.get("notADiagramFile")+" ("+z+")");if("mxGraphModel"==m.nodeName){z=m.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=z&&""!=z)z!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[z]:mxUtils.load(STYLE_PATH+"/"+z+".xml").getDocumentElement(),null!=I&&(L=new mxCodec(I.ownerDocument),L.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH++"/default-old.xml").getDocumentElement();if(null!=I){var L=new mxCodec(I.ownerDocument);L.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=z;this.graph.mathEnabled="1"==urlParams.math||"1"==m.getAttribute("math");this.graph.setAdaptiveColors(m.getAttribute("adaptiveColors"));z=m.getAttribute("backgroundImage");null!=z?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(z)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&+this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==m.getAttribute("shadow"),!1);if(z=m.getAttribute("extFonts"))try{for(z=z.split("|").map(function(N){N=N.split("^");return{name:N[0],url:N[1]}}),I=0;I<z.length;I++)this.graph.addExtFont(z[I].name,z[I].url)}catch(N){console.log("ExtFonts format error: "+N.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||+"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(m,z){m=null!=m?m:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var L=this.graph.getBackgroundImageObject(this.graph.backgroundImage,z);null!=L&&I.setAttribute("backgroundImage",JSON.stringify(L));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",+this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(L=this.graph.extFonts.map(function(N){return N.name+"^"+N.url}),I.setAttribute("extFonts",L.join("|")));return I};Editor.prototype.isDataSvg=function(m){try{var z=mxUtils.parseXml(m).documentElement.getAttribute("content");if(null!=z&&(null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=+unescape(window.atob?atob(z):Base64.decode(cont,z))),null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z)),null!=z&&0<z.length)){var I=mxUtils.parseXml(z).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(L){}return!1};Editor.prototype.extractGraphModel=function(m,z,I){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);+this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(m,z){if("undefined"===+typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){L=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var L=null;Editor.doMathJaxRender=function(S){try{null==L?(MathJax.typesetClear([S]),MathJax.typeset([S]),I()):L!=S&&Editor.mathJaxQueue.push(S)}catch(U){MathJax.typesetClear([S]),null!=U.retry?(L=S,U.retry.then(function(){MathJax.typesetPromise([S]).then(I)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "++W.toString());I()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+U.toString())}};window.MathJax=null!=z?z:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])}}};+Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.onMathJaxDone=function(){};var N=Editor.prototype.init;Editor.prototype.init=function(){N.apply(this,arguments);var S=mxUtils.bind(this,function(U,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};z=document.getElementsByTagName("script");+if(null!=z&&0<z.length){var O=document.createElement("script");O.setAttribute("type","text/javascript");O.setAttribute("src",m);z[0].parentNode.appendChild(O)}}};Editor.prototype.csvToArray=function(m){if(0<m.length){var z="",I=[""],L=0,N=!0,O;m=$jscomp.makeIterator(m);for(O=m.next();!O.done;O=m.next())O=O.value,'"'===O?(N&&O===z&&(I[L]+=O),N=!N):","===O&&N?O=I[++L]="":I[L]+=O,z=O;return I}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&+!this.isCorsEnabledForUrl(m)){var z=EditorUi.isVisioFilename(m);z=/\.png$/i.test(m)||/\.pdf$/i.test(m)||z;var I="t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+I+(z?"&base64=1":"")}return m};Editor.prototype.isCorsEnabledForUrl=function(m){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||m.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));+return null!=this.corsRegExp&&this.corsRegExp.test(m)||"https://raw.githubusercontent.com/"===m.substring(0,34)||"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===m.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var m=new mxUrlConverter;m.updateBaseUrl();var z=m.convert,I=this;m.convert=function(L){null!=L&&navigator.onLine&&("http://"!=L.substring(0,7)&&"https://"!=L.substring(0,8)||L.substring(0,m.baseUrl.length)==m.baseUrl||I.crossOriginImages&&+I.isCorsEnabledForUrl(L)?"chrome-extension://"!=L.substring(0,19)&&(L=z.apply(this,arguments)):L=PROXY_URL+"?url="+encodeURIComponent(L));return L};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,z,I,L,N){try{var O=!0,S=window.setTimeout(mxUtils.bind(this,function(){O=!1;z(m)}),this.timeout),U=mxUtils.bind(this,function(){null!=L?this.convertImageToDataUri(m,z,I,L,!0):z(m)});if(/(\.svg)$/i.test(m)&&+!N)mxUtils.get(m,mxUtils.bind(this,function(X){window.clearTimeout(S);O&&(200>X.getStatus()||299<X.getStatus()?U():z(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);O&&U()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(O)try{L=null!=L&&N?L:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(L,L);X.height=W.height*L;X.width=W.width*L;Z.drawImage(W,0,0);z(X.toDataURL())}catch(Y){z(m)}};+W.onerror=function(){window.clearTimeout(S);O&&(null!=I?I():z(m))};W.src=m}}catch(X){null!=I?I():z(m)}};Editor.prototype.convertImages=function(m,z,I,L){function N(){0<O.length?O.shift()():z(m)}null==L&&(L=this.createImageUrlConverter());var O=[],S=I||{};I=mxUtils.bind(this,function(U,W){U=m.getElementsByTagName(U);for(var X=0;X<U.length;X++)mxUtils.bind(this,function(Z){O.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=L.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=+S[Y];null==ba?this.convertImageToDataUri(Y,function(ea){null!=ea&&(S[Y]=ea,Z.setAttribute(W,ea));N()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),N())}else null!=Y&&Z.setAttribute(W,Y),N()}}catch(ea){N()}}))})(U[X])});I("image","xlink:href");I("img","src");N()};Editor.base64Encode=function(m){for(var z="",I=0,L=m.length,N,O,S;I<L;){N=m.charCodeAt(I++)&255;if(I==L){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&+3)<<4);z+="==";break}O=m.charCodeAt(I++);if(I==L){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(O&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2);z+="=";break}S=m.charCodeAt(I++);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&+3)<<4|(O&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2|(S&192)>>6);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return z};Editor.prototype.loadUrl=function(m,z,I,L,N,O,S,U){try{var W=!S&&(L||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));N=null!=N?N:!0;var X=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&+299>=Z.getStatus()){if(null!=z){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}O=null!=O?O:"data:image/png;base64,";Y=O+Editor.base64Encode(Y)}z(Y)}}else null!=I&&(0==Z.getStatus()?I({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?I({message:mxResources.get("fileNotFound"),+code:Z.getStatus()},Z):I({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=I&&I({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){N&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:X})},U)});X()}catch(Z){null!=I&&I(Z)}};Editor.prototype.getErrorMessage=function(m){var z=mxResources.get("error")+" "+m.getStatus();try{var I=m.getText(),L=JSON.parse(I);null!=L&&null!=L.error&&null!=L.error.message&&(z=L.error.message+" ("+z+")")}catch(N){}return z};Editor.prototype.absoluteCssFonts=+function(m){var z=null;if(null!=m){var I=m.split("url(");if(0<I.length){z=[I[0]];m=window.location.pathname;var L=null!=m?m.lastIndexOf("/"):-1;0<=L&&(m=m.substring(0,L+1));L=document.getElementsByTagName("base");var N=null;null!=L&&0<L.length&&(N=L[0].getAttribute("href"));for(var O=1;O<I.length;O++)if(L=I[O].indexOf(")"),0<L){var S=Editor.trimCssUrl(I[O].substring(0,L));this.graph.isRelativeUrl(S)&&(S=null!=N?N+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":m)+S);+z.push('url("'+S+'"'+I[O].substring(L))}else z.push(I[O])}else z=[m]}return null!=z?z.join(""):null};Editor.prototype.mapFontUrl=function(m,z,I){/^https?:\/\//.test(z)&&!this.isCorsEnabledForUrl(z)&&(z=PROXY_URL+"?url="+encodeURIComponent(z));I(m,z)};Editor.prototype.embedCssFonts=function(m,z){var I=m.split("url("),L=0;null==this.cachedFonts&&(this.cachedFonts={});var N=mxUtils.bind(this,function(){if(0==L){for(var W=[I[0]],X=1;X<I.length;X++){var Z=I[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(I[X].substring(0,+Z))]);W.push('"'+I[X].substring(Z))}z(W.join(""))}});if(0<I.length){for(m=1;m<I.length;m++){var O=I[m].indexOf(")"),S=null,U=I[m].indexOf("format(",O);0<U&&(S=Editor.trimCssUrl(I[m].substring(U+7,I[m].indexOf(")",U))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;L++;var X="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==+S||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;L--;N()}),mxUtils.bind(this,function(ba){L--;N()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[m].substring(0,+O)),S)}N()}else z(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(z){this.resolvedFontCss=z;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},z;for(z in Graph.fontMapping)Graph.isCssFontUrl(z)&&(m[z]=Graph.fontMapping[z]);return m};Editor.prototype.embedExtFonts=function(m){var z=this.graph.getCustomFonts();if(0<z.length){var I=[],L=0;null==this.cachedGoogleFonts&&+(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==L&&this.embedCssFonts(I.join(""),m)}),O=0;O<z.length;O++)mxUtils.bind(this,function(S,U){Graph.isCssFontUrl(U)?null==this.cachedGoogleFonts[U]?(L++,this.loadUrl(Graph.rewriteGoogleFontUrl(U),mxUtils.bind(this,function(W){this.cachedGoogleFonts[U]=W;I.push(W+"\n");L--;N()}),mxUtils.bind(this,function(W){L--;I.push("@import url("+U+");\n");N()}))):I.push(this.cachedGoogleFonts[U]+"\n"):I.push('@font-face {font-family: "'++S+'";src: url("'+U+'")}\n')})(z[O].name,z[O].url);N()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var z=document.getElementsByTagName("style"),I=0;I<z.length;I++){var L=mxUtils.getTextContent(z[I]);0>L.indexOf("mxPageSelector")&&0<L.indexOf("MathJax")&&m[0].appendChild(z[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(m,z){z=null!=z?z:this.absoluteCssFonts(this.fontCss);if(null!=z){var I=mxUtils.getSvgDefs(m),L=z.split("\n");+z=[];for(var N=[],O=0;O<L.length;O++)"@import"==L[O].substring(0,7)?z.push(L[O]):N.push(L[O]);m=m.ownerDocument;m=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");m.setAttribute("type","text/css");0<z.length&&(mxUtils.setTextContent(m,z.join("\n")),I.appendChild(m));0<N.length&&(m=m.cloneNode(!1),mxUtils.setTextContent(m,N.join("\n")),I.appendChild(m))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};+Editor.prototype.getMaxCanvasScale=function(m,z,I){var L=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(L/m,L/z))};Editor.prototype.exportToCanvas=function(m,z,I,L,N,O,S,U,W,X,Z,Y,ba,ea,ca,fa,aa,da){try{O=null!=O?O:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ia=W?null:Y.background;ia==mxConstants.NONE&&(ia=null);null==ia&&(ia=L);null==ia&&0==W&&(ia="dark"==fa?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,ea,null,S,null,null,null,X,null,fa,aa,da),mxUtils.bind(this,+function(pa){try{var oa=new Image;oa.onload=mxUtils.bind(this,function(){try{var xa=function(){mxClient.IS_SF?window.setTimeout(function(){ja.drawImage(oa,0,0);m(qa,pa)},0):(ja.drawImage(oa,0,0),m(qa,pa))},qa=document.createElement("canvas"),ua=parseInt(pa.getAttribute("width")),ya=parseInt(pa.getAttribute("height"));U=null!=U?U:1;null!=z&&(U=O?Math.min(1,Math.min(3*z/(4*ya),z/ua)):z/ua);U=this.getMaxCanvasScale(ua,ya,U);ua=Math.ceil(U*ua);ya=Math.ceil(U*ya);qa.setAttribute("width",ua);qa.setAttribute("height",+ya);var ja=qa.getContext("2d");null!=ia&&(ja.beginPath(),ja.rect(0,0,ua,ya),ja.fillStyle=ia,ja.fill());1!=U&&ja.scale(U,U);if(ca){var ma=Y.view,ka=ma.scale;ma.scale=1;var Ba=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=ka;Ba="data:image/svg+xml;base64,"+Ba;var sa=Y.gridSize*ma.gridSteps*U,Ea=Y.getGraphBounds(),wa=ma.translate.x*ka,Ca=ma.translate.y*ka,Da=wa+(Ea.x-wa)/ka-ba,Ka=Ca+(Ea.y-Ca)/ka-ba,Aa=new Image;Aa.onload=function(){try{for(var Fa=-Math.round(sa-mxUtils.mod((wa-+Da)*U,sa)),Ja=-Math.round(sa-mxUtils.mod((Ca-Ka)*U,sa));Fa<ua;Fa+=sa)for(var Ra=Ja;Ra<ya;Ra+=sa)ja.drawImage(Aa,Fa/U,Ra/U);xa()}catch(Sa){null!=N&&N(Sa)}};Aa.onerror=function(Fa){null!=N&&N(Fa)};Aa.src=Ba}else xa()}catch(Fa){null!=N&&N(Fa)}});oa.onerror=function(xa){null!=N&&N(xa)};X&&this.graph.addSvgShadow(pa);this.graph.mathEnabled&&this.addMathCss(pa);var ha=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(pa,this.resolvedFontCss),oa.src=Editor.createSvgDataUri(mxUtils.getXml(pa))}catch(xa){null!=+N&&N(xa)}});this.embedExtFonts(mxUtils.bind(this,function(xa){try{null!=xa&&this.addFontCss(pa,xa),this.loadFonts(ha)}catch(qa){null!=N&&N(qa)}}))}catch(xa){null!=N&&N(xa)}}),I,Z)}catch(pa){null!=N&&N(pa)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var n=l,p=0;8>p;p++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[l]=n;Editor.updateCRC=function(m,z,I,L){for(var N=0;N<L;N++)m=Editor.crcTable[(m^z.charCodeAt(I+N))&255]^m>>>8;return m};Editor.crc32=function(m){for(var z=-1,I=0;I<m.length;I++)z=+z>>>8^Editor.crcTable[(z^m.charCodeAt(I))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(m,z,I,L,N){function O(Z,Y){var ba=W;W+=Y;return Z.substring(ba,W)}function S(Z){Z=O(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function U(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var W=0;if(O(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,+10,26,10))null!=N&&N();else if(O(m,4),"IHDR"!=O(m,4))null!=N&&N();else{O(m,17);N=m.substring(0,W);do{var X=S(m);if("IDAT"==O(m,4)){N=m.substring(0,W-8);"pHYs"==z&&"dpi"==I?(I=Math.round(L/.0254),I=U(I)+U(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==z?String.fromCharCode(0):"")+L;L=4294967295;L=Editor.updateCRC(L,z,0,4);L=Editor.updateCRC(L,I,0,I.length);N+=U(I.length)+z+I+U(L^4294967295);N+=m.substring(W-8,m.length);break}N+=m.substring(W-8,W-4+X);O(m,X);O(m,4)}while(X);return"data:image/png;base64,"++(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var u=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,z){u.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var G=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){G.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==+typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,z){var I=null;null!=m.editor.graph.getModel().getParent(z)?I=z.getId():null!=m.currentPage&&(I=m.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var H=Format.prototype.init;Format.prototype.init=function(){H.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var F=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||+this.editorUi.editor.chromeless?F.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(m){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var K=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=K.apply(this,arguments);var z=this.editorUi,I=z.editor.graph;if(I.isEnabled()){var L=z.getCurrentFile();null!=L&&L.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),+function(){return z.editor.autosave},function(S){z.editor.setAutosave(S);z.editor.autosave&&L.isModified()&&L.fileChanged()},{install:function(S){this.listener=function(){S(z.editor.autosave)};z.editor.addListener("autosaveChanged",this.listener)},destroy:function(){z.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var N=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(S){z.actions.get("mathematicalTypesetting").funct()},+{install:function(S){this.listener=function(){S(I.mathEnabled)};z.addListener("mathEnabledChanged",this.listener)},destroy:function(){z.removeListener(this.listener)}});m.appendChild(N);if(!z.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var O=z.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");O.style.position="absolute";O.style.left="85%";N.appendChild(O)}}return m};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",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",-dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(l){return"0"==mxUtils.getValue(l.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",-type:"float",min:0,defVal:20,isVisible:function(l){return"1"==mxUtils.getValue(l.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(l){return"0"==mxUtils.getValue(l.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(l){return"1"==-mxUtils.getValue(l.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",+dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(m){return"0"==mxUtils.getValue(m.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",+type:"float",min:0,defVal:20,isVisible:function(m){return"1"==mxUtils.getValue(m.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(m){return"0"==mxUtils.getValue(m.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(m){return"1"==+mxUtils.getValue(m.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=@@ -12885,96 +12885,96 @@ min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{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(l,x,F,N){if(null!=x){var O=mxUtils.bind(this,function(V){if(null!=V)if(F)for(var T=0;T<V.length;T++){if("function"!==typeof V[T].isVisible||V[T].isVisible(N,this))x[V[T].name]=V[T]}else for(var W in x){var X=!1;for(T=0;T<-V.length;T++)if(V[T].name==W&&V[T].type==x[W].type){X=!0;break}X||delete x[W]}}),Q=this.editorUi.editor.graph.view.getState(l);null!=Q&&null!=Q.shape&&(Q.shape.commonCustomPropAdded||(Q.shape.commonCustomPropAdded=!0,Q.shape.customProperties=Q.shape.customProperties||[],Q.cell.vertex?Array.prototype.push.apply(Q.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(Q.shape.customProperties,Editor.commonEdgeProperties)),O(Q.shape.customProperties));l=l.getAttribute("customProperties");-if(null!=l)try{O(JSON.parse(l))}catch(V){}}};var G=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var l=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=l.style.shape&&!l.containsLabel&&0<l.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));G.apply(this,arguments);if(Editor.enableCustomProperties){for(var x={},F=l.vertices,N=l.edges,O=0;O<F.length;O++)this.findCommonProperties(F[O],x,-0==O,l);for(O=0;O<N.length;O++)this.findCommonProperties(N[O],x,0==F.length&&0==O,l);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(x).length&&this.container.appendChild(this.addProperties(this.createPanel(),x,l))}};var d=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(l){var x=this.editorUi.getSelectionState();1==x.cells.length?this.addActions(l,["copyStyle","pasteStyle"]):1<=x.cells.length&&this.addActions(l,["pasteStyle","pasteData"]);d.apply(this,-arguments);return l};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(l,x,F,N){function O(wa,fa,na,Aa,oa){if(null!=na.valueChanged)na.valueChanged(fa,oa);else{aa.getModel().beginUpdate();try{oa=[];var Ea=[];if(null!=na.index){for(var va=[],Ca=na.parentRow.nextSibling;Ca&&Ca.getAttribute("data-pName")==wa;)va.push(Ca.getAttribute("data-pValue")),Ca=Ca.nextSibling;na.index<va.length?null!=Aa?va.splice(Aa,1):va[na.index]=fa:va.push(fa);null!=na.size&&va.length>-na.size&&(va=va.slice(0,na.size));fa=va.join(",");null!=na.countProperty&&(aa.setCellStyles(na.countProperty,va.length,aa.getSelectionCells()),oa.push(na.countProperty),Ea.push(va.length))}aa.setCellStyles(wa,fa,aa.getSelectionCells());oa.push(wa);Ea.push(fa);if(null!=na.dependentProps)for(wa=0;wa<na.dependentProps.length;wa++){var Fa=na.dependentPropsDefVal[wa],Ma=na.dependentPropsVals[wa];if(Ma.length>fa)Ma=Ma.slice(0,fa);else for(var Ba=Ma.length;Ba<fa;Ba++)Ma.push(Fa);Ma=Ma.join(",");aa.setCellStyles(na.dependentProps[wa],-Ma,aa.getSelectionCells());oa.push(na.dependentProps[wa]);Ea.push(Ma)}if("function"==typeof na.onChange)na.onChange(aa,fa);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",oa,"values",Ea,"cells",aa.getSelectionCells()))}finally{aa.getModel().endUpdate()}}}function Q(wa,fa,na){var Aa=mxUtils.getOffset(l,!0),oa=mxUtils.getOffset(wa,!0);fa.style.position="absolute";fa.style.left=oa.x-Aa.x+"px";fa.style.top=oa.y-Aa.y+"px";fa.style.width=wa.offsetWidth+"px";fa.style.height=wa.offsetHeight--(na?4:0)+"px";fa.style.zIndex=5}function V(wa,fa,na){function Aa(Ea){if(null==Ea||Ea==mxConstants.NONE)oa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ea)oa.style.background="";else{var va=mxUtils.getLightDarkColor(Ea);mxUtils.isLightDarkColor(Ea)&&va.light!=va.dark?oa.style.background="linear-gradient(to right bottom, "+va.cssText+" 50%, "+mxUtils.invertLightDarkColor(va).cssText+" 50.3%)":oa.style.background=Ea}}var oa=document.createElement("div");oa.style.width=-"32px";oa.style.height="8px";oa.style.margin="2px";oa.style.borderStyle="solid";oa.style.borderWidth="1px";Aa(fa);btn=mxUtils.button("",mxUtils.bind(Z,function(Ea){this.editorUi.pickColor(fa,function(va){O(wa,va,na);Aa(va)});mxEvent.consume(Ea)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(oa);return btn}function T(wa,fa,na,Aa,oa,Ea,va){null!=fa&&(fa=fa.split(","),ea.push({name:wa,values:fa,type:na,-defVal:Aa,countProperty:oa,parentRow:Ea,isDeletable:!0,flipBkg:va}));btn=mxUtils.button("+",mxUtils.bind(Z,function(Ca){for(var Fa=Ea,Ma=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==wa)Fa=Fa.nextSibling,Ma++;else break;var Ba={type:na,parentRow:Ea,index:Ma,isDeletable:!0,defVal:Aa,countProperty:oa};Ma=Y(wa,"",Ba,0==Ma%2,va);O(wa,Aa,Ba);Fa.parentNode.insertBefore(Ma,Fa.nextSibling);mxEvent.consume(Ca)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";-return btn}function W(wa,fa,na,Aa,oa,Ea,va){if(0<oa){var Ca=Array(oa);fa=null!=fa?fa.split(","):[];for(var Fa=0;Fa<oa;Fa++)Ca[Fa]=null!=fa[Fa]?fa[Fa]:null!=Aa?Aa:"";ea.push({name:wa,values:Ca,type:na,defVal:Aa,parentRow:Ea,flipBkg:va,size:oa})}return document.createElement("div")}function X(wa,fa,na){var Aa=document.createElement("input");Aa.type="checkbox";Aa.checked="1"==fa;mxEvent.addListener(Aa,"change",function(){O(wa,Aa.checked?"1":"0",na)});return Aa}function Y(wa,fa,na,Aa,oa){var Ea=na.dispName,-va=na.type,Ca=document.createElement("tr");Ca.className="gePropRow"+(oa?"Dark":"")+(Aa?"Alt":"")+" gePropNonHeaderRow";Ca.setAttribute("data-pName",wa);Ca.setAttribute("data-pValue",fa);Aa=!1;null!=na.index&&(Ca.setAttribute("data-index",na.index),Ea=(null!=Ea?Ea:"")+"["+na.index+"]",Aa=!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";Ea=mxResources.get(Ea,null,Ea);mxUtils.write(Fa,Ea);Fa.setAttribute("title",Ea);Aa&&(Fa.style.textAlign="right");Ca.appendChild(Fa);Fa=document.createElement("td");-Fa.className="gePropRowCell";Fa.setAttribute("title",null!=fa?fa:mxResources.get("none"));if("color"==va)Fa.appendChild(V(wa,fa,na));else if("bool"==va||"boolean"==va)Fa.appendChild(X(wa,fa,na));else if("enum"==va){var Ma=na.enumList;for(oa=0;oa<Ma.length;oa++)if(Ea=Ma[oa],Ea.val==fa){mxUtils.write(Fa,mxResources.get(Ea.dispName,null,Ea.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(Z,function(){var Ba=document.createElement("select"),Da=null;Q(Fa,Ba);for(var Ia=0;Ia<Ma.length;Ia++){var Va=-Ma[Ia],Ta=document.createElement("option");Ta.value=mxUtils.htmlEntities(Va.val);mxUtils.write(Ta,mxResources.get(Va.dispName,null,Va.dispName));Ba.appendChild(Ta);null==Va.val&&(Ta.value="null",Da=Ta)}Ba.value=null==fa&&null!=Da?"null":fa;l.appendChild(Ba);mxEvent.addListener(Ba,"change",function(){var Xa=mxUtils.htmlEntities(Ba.value);if(Ba[Ba.selectedIndex]==Da||"null"==Xa.value)Xa=null;O(wa,Xa,na)});Ba.focus();mxEvent.addListener(Ba,"blur",function(){l.removeChild(Ba)})}))}else"dynamicArr"==va?-Fa.appendChild(T(wa,fa,na.subType,na.subDefVal,na.countProperty,Ca,oa)):"staticArr"==va?Fa.appendChild(W(wa,fa,na.subType,na.subDefVal,na.size,Ca,oa)):"readOnly"==va?(oa=document.createElement("input"),oa.setAttribute("readonly",""),oa.value=fa,oa.style.borderWidth="0px","id"==wa?(oa.style.width="190px",oa.style.position="relative",oa.style.right="6px",oa.style.float="right",oa.style.background="none",oa.style.textAlign="right",Ca.firstChild.setAttribute("colspan","2"),oa.setAttribute("title",fa),-Ca.firstChild.appendChild(oa)):(oa.style.width="96px",Fa.appendChild(oa))):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(fa)),mxEvent.addListener(Fa,"click",mxUtils.bind(Z,function(){function Ba(){var Ia=Da.value;Ia=0==Ia.length&&"string"!=va&&"numbers"!=va?0:Ia;na.allowAuto&&(null!=Ia.trim&&"auto"==Ia.trim().toLowerCase()?(Ia="auto",va="string"):(Ia=parseFloat(Ia),Ia=isNaN(Ia)?0:Ia));null!=na.min&&Ia<na.min?Ia=na.min:null!=na.max&&Ia>na.max&&(Ia=na.max);var Va=null;try{Va="numbers"==va?Ia.match(/\d+/g).map(Number).join(" "):-encodeURIComponent(("int"==va?parseInt(Ia):Ia)+"")}catch(Ta){}O(wa,Va,na,null,Da)}var Da=document.createElement("input");Q(Fa,Da,!0);Da.value=decodeURIComponent(fa);Da.className="gePropEditor";"int"!=va&&"float"!=va||na.allowAuto||(Da.type="number",Da.step="int"==va?"1":"any",null!=na.min&&(Da.min=parseFloat(na.min)),null!=na.max&&(Da.max=parseFloat(na.max)));l.appendChild(Da);mxEvent.addListener(Da,"keypress",function(Ia){13==Ia.keyCode&&Ba()});Da.focus();mxEvent.addListener(Da,"blur",function(){Ba()})})));-na.isDeletable&&(oa=mxUtils.button("-",mxUtils.bind(Z,function(Ba){O(wa,"",na,na.index);mxEvent.consume(Ba)})),oa.style.height="16px",oa.style.width="25px",oa.style.float="right",oa.className="geColorBtn",Fa.appendChild(oa));Ca.appendChild(Fa);return Ca}var Z=this,aa=this.editorUi.editor.graph,ea=[];l.style.position="relative";l.style.padding="0";var ca=document.createElement("table");ca.className="geProperties";ca.style.whiteSpace="nowrap";ca.style.width="100%";var da=document.createElement("tr");-da.className="gePropHeader";var ja=document.createElement("th");ja.className="gePropHeaderCell";ja.style.paddingLeft="16px";ja.style.backgroundRepeat="no-repeat";ja.style.backgroundPosition="-2px 50%";ja.style.backgroundSize="20px";mxUtils.write(ja,mxResources.get("property"));da.style.cursor="pointer";var ba=function(){var wa=ca.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){ja.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var fa="none";for(var na=l.childNodes.length--1;0<=na;na--)try{var Aa=l.childNodes[na],oa=Aa.nodeName.toUpperCase();"INPUT"!=oa&&"SELECT"!=oa||l.removeChild(Aa)}catch(Ea){}}else ja.style.backgroundImage="url('"+Editor.arrowDownImage+"')",fa="";for(na=0;na<wa.length;na++)wa[na].style.display=fa};mxEvent.addListener(da,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;ba()});da.appendChild(ja);var ia=document.createElement("th");ia.className="gePropHeaderCell";ia.style.paddingLeft="4px";mxUtils.write(ia,mxResources.get("value"));-da.appendChild(ia);ca.appendChild(da);var ka=ia=!1;da=null;1==F.vertices.length&&0==F.edges.length?da=F.vertices[0].id:0==F.vertices.length&&1==F.edges.length&&(da=F.edges[0].id);null==da||N||ca.appendChild(Y("id",mxUtils.htmlEntities(da),{dispName:"id",type:"readOnly"},!0,!1));for(var ua in x)if(N=x[ua],"function"!=typeof N.isVisible||N.isVisible(F,this)){var sa=null!=N.getValue?N.getValue():null!=F.style[ua]?mxUtils.htmlEntities(F.style[ua]+""):null!=N.getDefaultValue?N.getDefaultValue(F,this):-N.defVal;if("separator"==N.type)ka=!ka;else{if("staticArr"==N.type)N.size=parseInt(F.style[N.sizeProperty]||x[N.sizeProperty].defVal)||0;else if(null!=N.dependentProps){var ha=N.dependentProps,pa=[],ra=[];for(da=0;da<ha.length;da++){var xa=F.style[ha[da]];ra.push(x[ha[da]].subDefVal);pa.push(null!=xa?xa.split(","):[])}N.dependentPropsDefVal=ra;N.dependentPropsVals=pa}ca.appendChild(Y(ua,sa,N,ia,ka));ia=!ia}}for(da=0;da<ea.length;da++)for(N=ea[da],x=N.parentRow,F=0;F<N.values.length;F++)ua=Y(N.name,-N.values[F],{type:N.type,parentRow:N.parentRow,isDeletable:N.isDeletable,index:F,defVal:N.defVal,countProperty:N.countProperty,size:N.size},0==F%2,N.flipBkg),x.parentNode.insertBefore(ua,x.nextSibling),x=ua;l.appendChild(ca);ba();return l};StyleFormatPanel.prototype.addStyles=function(l){if(null!=this.defaultColorSchemes){var x=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},F=this.editorUi,-N=F.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";O.style.paddingRight="20px";l.style.paddingLeft="16px";l.style.paddingBottom="6px";l.style.position="relative";l.appendChild(O);var Q=document.createElement("div");Q.style.whiteSpace="nowrap";Q.style.position="relative";Q.style.textAlign="center";Q.style.width="210px";for(var V=[],T=0;T<this.defaultColorSchemes.length;T++){var W=document.createElement("div");W.style.display="inline-block";W.style.width=-"6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(W,"click",mxUtils.bind(this,function(){X(ea)}))})(T);V.push(W);Q.appendChild(W)}var X=mxUtils.bind(this,function(ea){null!=V[ea]&&(null!=this.format.currentScheme&&null!=V[this.format.currentScheme]&&(V[this.format.currentScheme].style.background="transparent"),-this.format.currentScheme=ea,Y(this.defaultColorSchemes[this.format.currentScheme]),V[this.format.currentScheme].style.background="#84d7ff")}),Y=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(N.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?-ca[mxConstants.STYLE_FONTCOLOR]:"default";N.replaceDefaultColors(new mxCell,ca);var da=mxUtils.bind(this,function(ba){var ia=mxUtils.button("",mxUtils.bind(this,function(sa){N.getModel().beginUpdate();try{for(var ha=F.getSelectionState().cells,pa=0;pa<ha.length;pa++){var ra=N.getModel().getStyle(ha[pa]);null!=ba?(mxEvent.isShiftDown(sa)||(ra=""==ba.fill||null==ba.fill?mxUtils.setStyle(ra,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_FILLCOLOR,ba.fill),ra=""==ba.gradient||-null==ba.gradient?mxUtils.setStyle(ra,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_GRADIENTCOLOR,ba.gradient),mxEvent.isControlDown(sa)||mxClient.IS_MAC&&mxEvent.isMetaDown(sa)||!N.getModel().isVertex(ha[pa])||(ra=""==ba.font||null==ba.font?mxUtils.setStyle(ra,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(ra,mxConstants.STYLE_FONTCOLOR,ba.font))),mxEvent.isAltDown(sa)||(ra=""==ba.stroke||null==ba.fill?mxUtils.setStyle(ra,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(ra,-mxConstants.STYLE_STROKECOLOR,ba.stroke))):(ra=mxUtils.setStyle(ra,mxConstants.STYLE_FILLCOLOR,null),ra=mxUtils.setStyle(ra,mxConstants.STYLE_STROKECOLOR,null),ra=mxUtils.setStyle(ra,mxConstants.STYLE_GRADIENTCOLOR,null),N.getModel().isVertex(ha[pa])&&(ra=mxUtils.setStyle(ra,mxConstants.STYLE_FONTCOLOR,null)));N.getModel().setStyle(ha[pa],ra)}}finally{N.getModel().endUpdate()}}));ia.className="geStyleButton";ia.style.width="36px";ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ia.style.margin=-"0px 6px 6px 0px";if(null!=ba){var ka="1px solid";null!=ba.border&&(ka=ba.border);if(null!=ba.gradient)ia.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ba.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ba.gradient).cssText+" 100%)";else if(ba.fill==mxConstants.NONE)ia.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ba.fill||""==ba.fill)ia.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;-else{var ua=mxUtils.getLightDarkColor(ba.fill);ia.style.backgroundImage="linear-gradient(to right bottom, "+ua.cssText+" 50%, "+ua.light+" 50.3%)"}null==ba.stroke||ba.stroke==mxConstants.NONE?ia.style.border=ka+" transparent":""==ba.stroke?ia.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(ua=mxUtils.getLightDarkColor(ba.stroke),ia.style.border=ka+" "+ua.cssText,ia.style.borderRightColor=ua.light,ia.style.borderBottomColor=-ia.style.borderRightColor);null!=ba.title&&ia.setAttribute("title",ba.title)}else ka=mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff"),ua=mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000"),ia.style.backgroundColor=ka,ia.style.border="1px solid "+ua;ia.style.borderRadius="0";O.appendChild(ia);null!=ba&&null!=ba.gradient&&(ka=ia.cloneNode(!1),ka.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(ba.fill).light+") 0px, light-dark(transparent, "+-mxUtils.getLightDarkColor(ba.gradient).light+") 100%)",ka.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",ka.style.backgroundColor="transparent",O.appendChild(ka),ka.style.marginLeft="-42px",mxEvent.addListener(ka,"click",function(){ia.click()}))});O.innerText="";if(null!=ea)for(var ja=0;ja<ea.length;ja++)0<ja&&0==mxUtils.mod(ja,4)&&mxUtils.br(O),da(ea[ja])});null==this.format.currentScheme?X(Math.min(V.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):X(this.format.currentScheme);T=-10>=this.defaultColorSchemes.length?28:8;var Z=document.createElement("div");Z.style.cssText="position:absolute;left:10px;top:8px;bottom:"+T+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";-mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var aa=document.createElement("div");aa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+T+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";-1<this.defaultColorSchemes.length&&(l.appendChild(Z),l.appendChild(aa));mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));x(Z);x(aa);Y(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&l.appendChild(Q)}return l}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};-Graph.customFontElements={};Graph.isGoogleFontUrl=function(l){return l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||l.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(l){return Graph.isGoogleFontUrl(l)};Graph.rewriteGoogleFontUrl=function(l){null!=l&&l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(l=Editor.GOOGLE_FONTS_CSS2+l.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return l};Graph.createFontElement=-function(l,x){var F=Graph.fontMapping[x];null==F&&Graph.isCssFontUrl(x)?(l=document.createElement("link"),l.setAttribute("rel","stylesheet"),l.setAttribute("type","text/css"),l.setAttribute("charset","UTF-8"),l.setAttribute("href",Graph.rewriteGoogleFontUrl(x))):(null==F&&(F='@font-face {\nfont-family: "'+l+'";\nsrc: url("'+x+'");\n}'),l=document.createElement("style"),mxUtils.write(l,F));return l};Graph.addRecentCustomFont=function(l,x){};Graph.addFont=function(l,x,F){if(null!=l&&0<l.length&&null!=-x&&0<x.length){var N=l.toLowerCase();if("helvetica"!=N&&"arial"!=l&&"sans-serif"!=N){var O=Graph.customFontElements[N];null!=O&&O.url!=x&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=x,"http:"==x.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(x)),O={name:l,url:x,elt:Graph.createFontElement(l,O)},Graph.customFontElements[N]=O,x=document.getElementsByTagName("head")[0],null!=F&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=F,O.elt.onerror=F):F()),null!=x&&x.appendChild(O.elt)):-null!=F&&F()}else null!=F&&F()}else null!=F&&F();return l};Graph.getFontUrl=function(l,x){l=Graph.customFontElements[l.toLowerCase()];null!=l&&(x=l.url);return x};Graph.processFontAttributes=function(l){l=l.getElementsByTagName("*");for(var x=0;x<l.length;x++){var F=l[x].getAttribute("data-font-src");if(null!=F){var N="FONT"==l[x].nodeName?l[x].getAttribute("face"):l[x].style.fontFamily;null!=N&&Graph.addFont(N,F)}}};Graph.processFontStyle=function(l){if(null!=l){var x=mxUtils.getValue(l,"fontSource",-null);if(null!=x){var F=mxUtils.getValue(l,mxConstants.STYLE_FONTFAMILY,null);if(null!=F)try{Graph.addFont(F,decodeURIComponent(x))}catch(N){}}}return l};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=-"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var g=Graph.prototype.init;Graph.prototype.init=function(){function l(O){x=O}g.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var x=null;mxEvent.addListener(this.container,"mouseenter",l);mxEvent.addListener(this.container,"mousemove",l);mxEvent.addListener(this.container,"mouseleave",function(O){x=null});this.isMouseInsertPoint=function(){return null!=-x};var F=this.getInsertPoint;this.getInsertPoint=function(){return null!=x?this.getPointForEvent(x):F.apply(this,arguments)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var Q=this.graph.getCellStyle(O);if(null!=Q&&"rack"==Q.childLayout){var V=new mxStackLayout(this.graph,!1);V.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;V.marginLeft=Q.marginLeft||0;V.marginRight=Q.marginRight||0;V.marginTop=-Q.marginTop||0;V.marginBottom=Q.marginBottom||0;V.allowGaps=Q.allowGaps||0;V.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");V.resizeParent=!1;V.fill=!0;return V}return N.apply(this,arguments)};this.updateGlobalUrlVariables()};var m=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(l,x){return Graph.processFontStyle(m.apply(this,arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(l,x,F,N,O,Q,V,T,W,X,-Y,Z){t.apply(this,arguments);Graph.processFontAttributes(Z)};var v=mxText.prototype.redraw;mxText.prototype.redraw=function(){v.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(l,x,F,N){function O(){for(var da=T.getSelectionCells(),ja=[],ba=0;ba<da.length;ba++)T.isCellVisible(da[ba])&&ja.push(da[ba]);T.setSelectionCells(ja)}function Q(da){T.setHiddenTags(da?[]:W.slice());O();T.refresh()}function V(da,-ja){Y.innerText="";if(0<da.length){var ba=document.createElement("table");ba.setAttribute("cellpadding","2");ba.style.boxSizing="border-box";ba.style.tableLayout="fixed";ba.style.width="100%";var ia=document.createElement("tbody");if(null!=da&&0<da.length)for(var ka=0;ka<da.length;ka++)(function(ua){function sa(){var fa=T.getCellsForTags([ua],null,null,!0);T.isEnabled()?T.setSelectionCells(fa):T.highlightCells(fa,null,null,70)}var ha=0>mxUtils.indexOf(T.hiddenTags,ua),pa=document.createElement("tr"),-ra=document.createElement("td");ra.style.align="center";ra.style.width="16px";var xa=document.createElement("img");xa.setAttribute("src",ha?Editor.visibleImage:Editor.hiddenImage);xa.setAttribute("title",mxResources.get(ha?"hideIt":"show",[ua]));mxUtils.setOpacity(xa,ha?75:25);xa.className="geAdaptiveAsset";xa.style.verticalAlign="middle";xa.style.cursor="pointer";xa.style.width="16px";if(x||Editor.isDarkMode())xa.style.filter="invert(100%)";ra.appendChild(xa);mxEvent.addListener(xa,"click",function(fa){mxEvent.isShiftDown(fa)?-Q(0<=mxUtils.indexOf(T.hiddenTags,ua)):(T.toggleHiddenTag(ua),O(),T.refresh());mxEvent.consume(fa)});pa.appendChild(ra);ra=document.createElement("td");ra.style.align="center";ra.style.width="16px";xa=document.createElement("img");xa.setAttribute("src",Editor.selectImage);xa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(xa,ha?75:25);xa.className="geAdaptiveAsset";xa.style.verticalAlign="middle";xa.style.cursor="pointer";xa.style.width="16px";if(x||Editor.isDarkMode())xa.style.filter=-"invert(100%)";mxEvent.addListener(xa,"click",function(fa){Q(!0);sa();mxEvent.consume(fa)});ra.appendChild(xa);pa.appendChild(ra);ra=document.createElement("td");ra.style.overflow="hidden";ra.style.whiteSpace="nowrap";ra.style.textOverflow="ellipsis";ra.style.verticalAlign="middle";ra.style.cursor="pointer";ra.setAttribute("title",ua);a=document.createElement("a");mxUtils.write(a,ua);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ha?100:40);ra.appendChild(a);mxEvent.addListener(ra,-"click",function(fa){if(mxEvent.isShiftDown(fa))Q(!0),sa();else if(ha&&0<T.hiddenTags.length)Q(!0);else{var na=W.slice(),Aa=mxUtils.indexOf(na,ua);na.splice(Aa,1);T.setHiddenTags(na);O();T.refresh()}mxEvent.consume(fa)});pa.appendChild(ra);if(T.isEnabled()){ra=document.createElement("td");ra.style.verticalAlign="middle";ra.style.textAlign="center";ra.style.width="18px";if(null==ja){ra.style.align="center";ra.style.width="16px";xa=document.createElement("img");xa.setAttribute("src",Editor.trashImage);-xa.setAttribute("title",mxResources.get("removeIt",[ua]));mxUtils.setOpacity(xa,ha?75:25);xa.className="geAdaptiveAsset";xa.style.verticalAlign="middle";xa.style.cursor="pointer";xa.style.width="16px";if(x||Editor.isDarkMode())xa.style.filter="invert(100%)";mxEvent.addListener(xa,"click",function(fa){var na=mxUtils.indexOf(W,ua);0<=na&&W.splice(na,1);T.removeTagsForCells(T.model.getDescendants(T.model.getRoot()),[ua]);T.refresh();mxEvent.consume(fa)});ra.appendChild(xa)}else{var wa=document.createElement("input");-wa.setAttribute("type","checkbox");wa.style.margin="0px";wa.defaultChecked=null!=ja&&0<=mxUtils.indexOf(ja,ua);wa.checked=wa.defaultChecked;wa.style.background="transparent";wa.setAttribute("title",mxResources.get(wa.defaultChecked?"removeIt":"add",[ua]));mxEvent.addListener(wa,"change",function(fa){wa.checked?T.addTagsForCells(T.getSelectionCells(),[ua]):T.removeTagsForCells(T.getSelectionCells(),[ua]);mxEvent.consume(fa)});ra.appendChild(wa)}pa.appendChild(ra)}ia.appendChild(pa)})(da[ka]);ba.appendChild(ia);-Y.appendChild(ba)}}var T=this,W=T.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var Y=document.createElement("div");Y.style.position="absolute";Y.style.boxSizing="border-box";Y.style.userSelect="none";Y.style.overflow="auto";Y.style.padding="3px";Y.style.left="0px";Y.style.right="0px";Y.style.top="0px";Y.style.bottom="0px";X.appendChild(Y);T.addListener(mxEvent.ROOT,function(){W=T.hiddenTags.slice()});-var Z=mxUtils.bind(this,function(da,ja){if(l()){da=T.getAllTags();for(ja=0;ja<da.length;ja++)0>mxUtils.indexOf(W,da[ja])&&W.push(da[ja]);W.sort();T.isSelectionEmpty()?V(W):V(W,T.getCommonTagsForCells(T.getSelectionCells()))}});T.selectionModel.addListener(mxEvent.CHANGE,Z);T.model.addListener(mxEvent.CHANGE,Z);T.addListener(mxEvent.REFRESH,Z);var aa=document.createElement("div");aa.className="geToolbarContainer";aa.style.position="absolute";aa.style.display="flex";aa.style.bottom="0px";aa.style.left=-"0px";aa.style.right="0px";aa.style.height="26px";aa.style.overflow="hidden";aa.style.padding="3px 4px 4px 4px";aa.style.borderWidth="1px 0px 0px 0px";aa.style.borderStyle="solid";aa.style.whiteSpace="nowrap";if(T.isEnabled()){Y.style.bottom="34px";var ea=document.createElement("a");ea.className="geToolbarButton geAdaptiveAsset geToggleItem";ea.style.width="16px";ea.style.height="18px";ea.style.backgroundPosition="center center";ea.style.backgroundRepeat="no-repeat";ea.style.backgroundSize="20px";-ea.style.margin="0 2px";ea.style.display="inline-block";ea.style.cursor="pointer";var ca=ea.cloneNode(!1);ca.style.backgroundImage="url("+Editor.visibleImage+")";ca.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ca,"click",function(da){T.setHiddenTags([]);mxEvent.isShiftDown(da)||(W=T.hiddenTags.slice());O();T.refresh();mxEvent.consume(da)});aa.appendChild(ca);null!=F&&(ea=ea.cloneNode(!1),ea.style.backgroundImage="url("+Editor.plusImage+")",ea.setAttribute("title",mxResources.get("add")),-mxEvent.addListener(ea,"click",function(da){F(W,function(ja){W=ja;Z()});mxEvent.consume(da)}),aa.appendChild(ea));X.appendChild(aa)}null!=N&&aa.appendChild(N);return{div:X,refresh:Z}};Graph.prototype.getCustomFonts=function(){var l=this.extFonts;l=null!=l?l.slice():[];for(var x in Graph.customFontElements){var F=Graph.customFontElements[x];l.push({name:F.name,url:F.url})}return l};Graph.prototype.setFont=function(l,x){Graph.addFont(l,x);var F=Editor.guid();document.execCommand("fontname",!1,F);for(var N=-this.cellEditor.textarea.getElementsByTagName("font"),O=!1,Q=0;Q<N.length;Q++)N[Q].getAttribute("face")==F&&(O=!0,N[Q].setAttribute("face",l),null!=x?N[Q].setAttribute("data-font-src",x):N[Q].removeAttribute("data-font-src"));O||document.execCommand("fontname",!1,l)};var y=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return y.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;-if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var l=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=l)for(var x in l)this.globalVars[x]=l[x]}catch(F){null!=window.console&&console.log("Error in vars URL parameter: "+F)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var C=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(l){var x=C.apply(this,arguments);-null==x&&null!=this.globalVars&&(x=this.globalVars[l]);return x};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var l=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(l.ownerDocument)).decode(l)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var I=Graph.prototype.getSvg;Graph.prototype.getSvg=function(l,x,F,N,O,Q,V,T,W,X,Y,Z,aa,ea,ca,da){var ja=I.apply(this,arguments);if(null!=Z){var ba=ja.getAttribute("style");-null==ba&&(ba="");Z="auto"==Z?"none"==this.getAdaptiveColors()?"light":"light dark":Z;ja.setAttribute("style",ba+(" color-scheme: "+Z+";"))}var ia=this.getCustomFonts();if(Y&&0<ia.length){var ka=ja.ownerDocument;ba=null!=ka.createElementNS?ka.createElementNS(mxConstants.NS_SVG,"style"):ka.createElement("style");null!=ka.setAttributeNS?ba.setAttributeNS("type","text/css"):ba.setAttribute("type","text/css");for(var ua="",sa="",ha=0;ha<ia.length;ha++){var pa=ia[ha].name,ra=ia[ha].url;Graph.isCssFontUrl(ra)?-ua+="@import url("+Graph.rewriteGoogleFontUrl(ra)+");\n":sa+='@font-face {\nfont-family: "'+pa+'";\nsrc: url("'+ra+'");\n}\n'}ba.appendChild(ka.createTextNode(ua+sa));ja.getElementsByTagName("defs")[0].appendChild(ba)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ja);this.mathEnabled&&(document.body.appendChild(ja),Editor.MathJaxRender(ja),ja.parentNode.removeChild(ja),ba=ja.ownerDocument.getElementById("MJX-SVG-styles"),null!=-ba&&ja.getElementsByTagName("defs")[0].appendChild(ba.cloneNode(!0)));return ja};var K=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(l){K.apply(this,arguments);null!=l.secondLabel&&(l.secondLabel.destroy(),l.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(l){return[l.shape,l.text,l.secondLabel,l.control]};var J=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){J.apply(this,arguments);this.enumerationState=-0};var U=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(l){null!=l.shape&&this.redrawEnumerationState(l);return U.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(l){l=decodeURIComponent(mxUtils.getValue(l.style,"enumerateValue",""));""==l&&(l=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(l)+"</div>"};mxGraphView.prototype.redrawEnumerationState=-function(l){var x="1"==mxUtils.getValue(l.style,"enumerate",0);x&&null==l.secondLabel?(l.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),l.secondLabel.size=12,l.secondLabel.state=l,l.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(l,l.secondLabel)):x||null==l.secondLabel||(l.secondLabel.destroy(),l.secondLabel=null);x=l.secondLabel;if(null!=x){var F=l.view.scale,N=this.createEnumerationValue(l);l=this.graph.model.isVertex(l.cell)?-new mxRectangle(l.x+l.width-4*F,l.y+4*F,0,0):mxRectangle.fromPoint(l.view.getPoint(l));x.bounds.equals(l)&&x.value==N&&x.scale==F||(x.bounds=l,x.value=N,x.scale=F,x.redraw())}};var P=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();P.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var R=-Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){R.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(l,x){"data:action/json,"==l.substring(0,17)&&(l=JSON.parse(l.substring(17)),null!=l.actions&&this.executeCustomActions(l.actions,null,x))};Graph.prototype.executeCustomActions=function(l,x,F){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),-null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var N=!1,O=0,Q=0,V=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),T=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<O&&O--;0==O&&X()}),X=mxUtils.bind(this,function(){if(Q<l.length){var Y=this.stoppingCustomActions,Z=l[Q++],aa=[];if(null!=Z.open)if(T(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open,-F))return}else this.openLink(Z.open);null==Z.wait||Y||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;W()}),O++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Z.wait?parseInt(Z.wait):1E3),T());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,-!0)),0,1,W,Y?0:Z.fadeIn.delay));null!=Z.fadeOut&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,W,Y?0:Z.fadeOut.delay));null!=Z.wipeIn&&(aa=aa.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,!0),!0)));null!=Z.wipeOut&&(aa=aa.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(V(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){V();var ea=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),-1);this.setCellsVisible(ea,!0)}null!=Z.hide&&(V(),ea=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&(V(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(V(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));ea=[];null!=-Z.select&&this.isEnabled()&&(ea=this.getCellsForAction(Z.select),this.setSelectionCells(ea));null!=Z.highlight&&(ea=this.getCellsForAction(Z.highlight),this.highlightCells(ea,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));null!=Z.scroll&&(ea=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);null!=F&&null!=Z.explore&&Graph.exploreFromCell(this,F,Z.explore);if(null!=Z.tags){if(null!=Z.tags.toggle){var ca=-Z.tags.toggle;0==ca.length&&(ca=this.getAllTags());for(ea=0;ea<ca.length;ea++)this.toggleHiddenTag(ca[ea])}ca=null;null!=Z.tags.hidden&&(null==ca&&(ca=[]),ca=ca.concat(Z.tags.hidden));if(null!=Z.tags.visible){null==ca&&(ca=[]);var da=this.getAllTags();for(ea=0;ea<da.length;ea++)0>mxUtils.indexOf(Z.tags.visible,da[ea])&&0>mxUtils.indexOf(ca,da[ea])&&ca.push(da[ea])}null!=ca&&this.setHiddenTags(ca);this.refresh()}0<aa.length&&(O++,this.executeAnimations(aa,W,Y?1:Z.steps,Y?0:Z.delay));0==O?X():T()}else this.stoppingCustomActions=-this.executingCustomActions=!1,T(),null!=x&&x()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(l,x){var F=this.getLinkForCell(x);null!=F&&"data:action/json,"==F.substring(0,17)&&this.setLinkForCell(x,this.updateCustomLink(l,F));if(this.isHtmlLabel(x)){var N=document.createElement("div");N.innerHTML=Graph.sanitizeHtml(this.getLabel(x));for(var O=N.getElementsByTagName("a"),Q=!1,V=0;V<O.length;V++)F=O[V].getAttribute("href"),null!=F&&"data:action/json,"==F.substring(0,17)&&(O[V].setAttribute("href",-this.updateCustomLink(l,F)),Q=!0);Q&&this.labelChanged(x,N.innerHTML)}};Graph.prototype.updateCustomLink=function(l,x){if("data:action/json,"==x.substring(0,17))try{var F=JSON.parse(x.substring(17));null!=F.actions&&(this.updateCustomLinkActions(l,F.actions),x="data:action/json,"+JSON.stringify(F))}catch(N){}return x};Graph.prototype.updateCustomLinkActions=function(l,x){for(var F=0;F<x.length;F++){var N=x[F],O;for(O in N)this.updateCustomLinkAction(l,N[O],"cells"),this.updateCustomLinkAction(l,N[O],-"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(l,x,F){if(null!=x&&null!=x[F]){for(var N=[],O=0;O<x[F].length;O++)if("*"==x[F][O])N.push(x[F][O]);else{var Q=l[x[F][O]];null!=Q?""!=Q&&N.push(Q):N.push(x[F][O])}x[F]=N}};Graph.prototype.getCellsForAction=function(l,x){x=this.getCellsById(l.cells).concat(this.getCellsForTags(l.tags,null,x));if(null!=l.excludeCells){for(var F=[],N=0;N<x.length;N++)0>l.excludeCells.indexOf(x[N].id)&&F.push(x[N]);x=F}return x};Graph.prototype.getCellsById=-function(l){var x=[];if(null!=l)for(var F=0;F<l.length;F++)if("*"==l[F]){var N=this.model.getRoot();x=x.concat(this.model.filterDescendants(function(Q){return Q!=N},N))}else{var O=this.model.getCell(l[F]);null!=O&&x.push(O)}return x};var n=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(l){return n.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(l))};Graph.prototype.setHiddenTags=function(l){this.hiddenTags=l;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};-Graph.prototype.toggleHiddenTag=function(l){var x=mxUtils.indexOf(this.hiddenTags,l);0>x?this.hiddenTags.push(l):0<=x&&this.hiddenTags.splice(x,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(l){if(null==l||0==l.length||0==this.hiddenTags.length)return!1;l=l.split(" ");if(l.length>this.hiddenTags.length)return!1;for(var x=0;x<l.length;x++)if(0>mxUtils.indexOf(this.hiddenTags,l[x]))return!1;return!0};Graph.prototype.getCellsForTags=function(l,x,F,-N){var O=[];if(null!=l){x=null!=x?x:this.model.getDescendants(this.model.getRoot());for(var Q=0,V={},T=0;T<l.length;T++)0<l[T].length&&(V[l[T]]=!0,Q++);for(T=0;T<x.length;T++)if(F&&this.model.getParent(x[T])==this.model.root||this.model.isVertex(x[T])||this.model.isEdge(x[T])){var W=this.getTagsForCell(x[T]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=l.length)){for(var Y=X=0;Y<W.length&&X<Q;Y++)null!=V[W[Y]]&&X++;X=X==Q}X&&(1!=N||this.isCellVisible(x[T]))&&O.push(x[T])}}return O};Graph.prototype.getAllTags=-function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(l){for(var x=null,F=[],N=0;N<l.length;N++){var O=this.getTagsForCell(l[N]);F=[];if(0<O.length){O=O.split(" ");for(var Q={},V=0;V<O.length;V++)if(null==x||null!=x[O[V]])Q[O[V]]=!0,F.push(O[V]);x=Q}else return[]}return F};Graph.prototype.getTagsForCells=function(l){for(var x=[],F={},N=0;N<l.length;N++){var O=this.getTagsForCell(l[N]);if(0<O.length){O=O.split(" ");for(var Q=-0;Q<O.length;Q++)null==F[O[Q]]&&(F[O[Q]]=!0,x.push(O[Q]))}}return x};Graph.prototype.getTagsForCell=function(l){return this.getAttributeForCell(l,"tags","")};Graph.prototype.addTagsForCells=function(l,x){if(0<l.length&&0<x.length){this.model.beginUpdate();try{for(var F=0;F<l.length;F++){for(var N=this.getTagsForCell(l[F]),O=N.split(" "),Q=!1,V=0;V<x.length;V++){var T=mxUtils.trim(x[V]);""!=T&&0>mxUtils.indexOf(O,T)&&(N=0<N.length?N+" "+T:T,Q=!0)}Q&&this.setAttributeForCell(l[F],"tags",N)}}finally{this.model.endUpdate()}}};-Graph.prototype.removeTagsForCells=function(l,x){if(0<l.length&&0<x.length){this.model.beginUpdate();try{for(var F=0;F<l.length;F++){var N=this.getTagsForCell(l[F]);if(0<N.length){for(var O=N.split(" "),Q=!1,V=0;V<x.length;V++){var T=mxUtils.indexOf(O,x[V]);0<=T&&(O.splice(T,1),Q=!0)}Q&&this.setAttributeForCell(l[F],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(l){this.model.beginUpdate();try{for(var x=0;x<l.length;x++)this.model.setVisible(l[x],!this.model.isVisible(l[x]))}finally{this.model.endUpdate()}};-Graph.prototype.setCellsVisible=function(l,x){this.model.beginUpdate();try{for(var F=0;F<l.length;F++)this.model.setVisible(l[F],x)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(l,x,F,N){for(var O=0;O<l.length;O++)this.highlightCell(l[O],x,F,N)};Graph.prototype.highlightCell=function(l,x,F,N,O){x=null!=x?x:mxConstants.DEFAULT_VALID_COLOR;F=null!=F?F:1E3;l=this.view.getState(l);var Q=null;null!=l&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(l.style,mxConstants.STYLE_STROKEWIDTH,-1)+O),Q=new mxCellHighlight(this,x,O,!1),null!=N&&(Q.opacity=N),Q.highlight(l),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},F));return Q};Graph.prototype.addSvgShadow=function(l,x,F,N){F=null!=F?F:!1;N=null!=N?N:!0;var O=l.ownerDocument,Q=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");Q.setAttribute("id",-this.shadowId);var V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");V.setAttribute("in","SourceAlpha");V.setAttribute("stdDeviation",this.svgShadowBlur);V.setAttribute("result","blur");Q.appendChild(V);V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");V.setAttribute("in","blur");V.setAttribute("dx",this.svgShadowSize);V.setAttribute("dy",this.svgShadowSize);V.setAttribute("result",-"offsetBlur");Q.appendChild(V);V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");V.setAttribute("flood-color",this.svgShadowColor);V.setAttribute("flood-opacity",this.svgShadowOpacity);V.setAttribute("result","offsetColor");Q.appendChild(V);V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");V.setAttribute("in","offsetColor");V.setAttribute("in2","offsetBlur");V.setAttribute("operator","in");-V.setAttribute("result","offsetBlur");Q.appendChild(V);V=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");V.setAttribute("in","SourceGraphic");V.setAttribute("in2","offsetBlur");Q.appendChild(V);V=l.getElementsByTagName("defs");0==V.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=l.firstChild?l.insertBefore(O,l.firstChild):l.appendChild(O)):O=V[0];O.appendChild(Q);F||(x=null!=x?x:l.getElementsByTagName("g")[0],-null!=x&&(x.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(l.getAttribute("width")))&&N&&(l.setAttribute("width",parseInt(l.getAttribute("width"))+6),l.setAttribute("height",parseInt(l.getAttribute("height"))+6),x=l.getAttribute("viewBox"),null!=x&&0<x.length&&(x=x.split(" "),3<x.length&&(w=parseFloat(x[2])+6,h=parseFloat(x[3])+6,l.setAttribute("viewBox",x[0]+" "+x[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(l,x){mxClient.IS_SVG&&!mxClient.IS_SF&&(x=-null!=x?x:!0,(this.shadowVisible=l)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),x&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var l=this.model.getChildCount(this.model.root),-x=0;do var F=this.model.getChildAt(this.model.root,x);while(x++<l&&"1"==mxUtils.getValue(this.getCellStyle(F),"locked","0"));null!=F&&this.setDefaultParent(F)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH++{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(m,z,I,L){if(null!=z){var N=mxUtils.bind(this,function(S){if(null!=S)if(I)for(var U=0;U<S.length;U++){if("function"!==typeof S[U].isVisible||S[U].isVisible(L,this))z[S[U].name]=S[U]}else for(var W in z){var X=!1;for(U=0;U<+S.length;U++)if(S[U].name==W&&S[U].type==z[W].type){X=!0;break}X||delete z[W]}}),O=this.editorUi.editor.graph.view.getState(m);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),N(O.shape.customProperties));m=m.getAttribute("customProperties");+if(null!=m)try{N(JSON.parse(m))}catch(S){}}};var d=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var m=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=m.style.shape&&!m.containsLabel&&0<m.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));d.apply(this,arguments);if(Editor.enableCustomProperties){for(var z={},I=m.vertices,L=m.edges,N=0;N<I.length;N++)this.findCommonProperties(I[N],z,+0==N,m);for(N=0;N<L.length;N++)this.findCommonProperties(L[N],z,0==I.length&&0==N,m);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(z).length&&this.container.appendChild(this.addProperties(this.createPanel(),z,m))}};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(m){var z=this.editorUi.getSelectionState();1==z.cells.length?this.addActions(m,["copyStyle","pasteStyle"]):1<=z.cells.length&&this.addActions(m,["pasteStyle","pasteData"]);g.apply(this,+arguments);return m};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(m,z,I,L){function N(ja,ma,ka,Ba,sa){if(null!=ka.valueChanged)ka.valueChanged(ma,sa);else{ba.getModel().beginUpdate();try{sa=[];var Ea=[];if(null!=ka.index){for(var wa=[],Ca=ka.parentRow.nextSibling;Ca&&Ca.getAttribute("data-pName")==ja;)wa.push(Ca.getAttribute("data-pValue")),Ca=Ca.nextSibling;ka.index<wa.length?null!=Ba?wa.splice(Ba,1):wa[ka.index]=ma:wa.push(ma);null!=ka.size&&wa.length>+ka.size&&(wa=wa.slice(0,ka.size));ma=wa.join(",");null!=ka.countProperty&&(ba.setCellStyles(ka.countProperty,wa.length,ba.getSelectionCells()),sa.push(ka.countProperty),Ea.push(wa.length))}ba.setCellStyles(ja,ma,ba.getSelectionCells());sa.push(ja);Ea.push(ma);if(null!=ka.dependentProps)for(ja=0;ja<ka.dependentProps.length;ja++){var Da=ka.dependentPropsDefVal[ja],Ka=ka.dependentPropsVals[ja];if(Ka.length>ma)Ka=Ka.slice(0,ma);else for(var Aa=Ka.length;Aa<ma;Aa++)Ka.push(Da);Ka=Ka.join(",");ba.setCellStyles(ka.dependentProps[ja],+Ka,ba.getSelectionCells());sa.push(ka.dependentProps[ja]);Ea.push(Ka)}if("function"==typeof ka.onChange)ka.onChange(ba,ma);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",Ea,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}function O(ja,ma,ka){var Ba=mxUtils.getOffset(m,!0),sa=mxUtils.getOffset(ja,!0);ma.style.position="absolute";ma.style.left=sa.x-Ba.x+"px";ma.style.top=sa.y-Ba.y+"px";ma.style.width=ja.offsetWidth+"px";ma.style.height=ja.offsetHeight-+(ka?4:0)+"px";ma.style.zIndex=5}function S(ja,ma,ka){function Ba(Ea){if(null==Ea||Ea==mxConstants.NONE)sa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ea)sa.style.background="";else{var wa=mxUtils.getLightDarkColor(Ea);mxUtils.isLightDarkColor(Ea)&&wa.light!=wa.dark?sa.style.background="linear-gradient(to right bottom, "+wa.cssText+" 50%, "+mxUtils.invertLightDarkColor(wa).cssText+" 50.3%)":sa.style.background=Ea}}var sa=document.createElement("div");sa.style.width=+"32px";sa.style.height="8px";sa.style.margin="2px";sa.style.borderStyle="solid";sa.style.borderWidth="1px";Ba(ma);btn=mxUtils.button("",mxUtils.bind(Y,function(Ea){this.editorUi.pickColor(ma,function(wa){N(ja,wa,ka);Ba(wa)});mxEvent.consume(Ea)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(sa);return btn}function U(ja,ma,ka,Ba,sa,Ea,wa){null!=ma&&(ma=ma.split(","),ea.push({name:ja,values:ma,type:ka,+defVal:Ba,countProperty:sa,parentRow:Ea,isDeletable:!0,flipBkg:wa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ca){for(var Da=Ea,Ka=0;null!=Da.nextSibling;)if(Da.nextSibling.getAttribute("data-pName")==ja)Da=Da.nextSibling,Ka++;else break;var Aa={type:ka,parentRow:Ea,index:Ka,isDeletable:!0,defVal:Ba,countProperty:sa};Ka=Z(ja,"",Aa,0==Ka%2,wa);N(ja,Ba,Aa);Da.parentNode.insertBefore(Ka,Da.nextSibling);mxEvent.consume(Ca)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";+return btn}function W(ja,ma,ka,Ba,sa,Ea,wa){if(0<sa){var Ca=Array(sa);ma=null!=ma?ma.split(","):[];for(var Da=0;Da<sa;Da++)Ca[Da]=null!=ma[Da]?ma[Da]:null!=Ba?Ba:"";ea.push({name:ja,values:Ca,type:ka,defVal:Ba,parentRow:Ea,flipBkg:wa,size:sa})}return document.createElement("div")}function X(ja,ma,ka){var Ba=document.createElement("input");Ba.type="checkbox";Ba.checked="1"==ma;mxEvent.addListener(Ba,"change",function(){N(ja,Ba.checked?"1":"0",ka)});return Ba}function Z(ja,ma,ka,Ba,sa){var Ea=ka.dispName,+wa=ka.type,Ca=document.createElement("tr");Ca.className="gePropRow"+(sa?"Dark":"")+(Ba?"Alt":"")+" gePropNonHeaderRow";Ca.setAttribute("data-pName",ja);Ca.setAttribute("data-pValue",ma);Ba=!1;null!=ka.index&&(Ca.setAttribute("data-index",ka.index),Ea=(null!=Ea?Ea:"")+"["+ka.index+"]",Ba=!0);var Da=document.createElement("td");Da.className="gePropRowCell";Ea=mxResources.get(Ea,null,Ea);mxUtils.write(Da,Ea);Da.setAttribute("title",Ea);Ba&&(Da.style.textAlign="right");Ca.appendChild(Da);Da=document.createElement("td");+Da.className="gePropRowCell";Da.setAttribute("title",null!=ma?ma:mxResources.get("none"));if("color"==wa)Da.appendChild(S(ja,ma,ka));else if("bool"==wa||"boolean"==wa)Da.appendChild(X(ja,ma,ka));else if("enum"==wa){var Ka=ka.enumList;for(sa=0;sa<Ka.length;sa++)if(Ea=Ka[sa],Ea.val==ma){mxUtils.write(Da,mxResources.get(Ea.dispName,null,Ea.dispName));break}mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){var Aa=document.createElement("select"),Fa=null;O(Da,Aa);for(var Ja=0;Ja<Ka.length;Ja++){var Ra=+Ka[Ja],Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ra.val);mxUtils.write(Sa,mxResources.get(Ra.dispName,null,Ra.dispName));Aa.appendChild(Sa);null==Ra.val&&(Sa.value="null",Fa=Sa)}Aa.value=null==ma&&null!=Fa?"null":ma;m.appendChild(Aa);mxEvent.addListener(Aa,"change",function(){var ab=mxUtils.htmlEntities(Aa.value);if(Aa[Aa.selectedIndex]==Fa||"null"==ab.value)ab=null;N(ja,ab,ka)});Aa.focus();mxEvent.addListener(Aa,"blur",function(){m.removeChild(Aa)})}))}else"dynamicArr"==wa?+Da.appendChild(U(ja,ma,ka.subType,ka.subDefVal,ka.countProperty,Ca,sa)):"staticArr"==wa?Da.appendChild(W(ja,ma,ka.subType,ka.subDefVal,ka.size,Ca,sa)):"readOnly"==wa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ma,sa.style.borderWidth="0px","id"==ja?(sa.style.width="190px",sa.style.position="relative",sa.style.right="6px",sa.style.float="right",sa.style.background="none",sa.style.textAlign="right",Ca.firstChild.setAttribute("colspan","2"),sa.setAttribute("title",ma),+Ca.firstChild.appendChild(sa)):(sa.style.width="96px",Da.appendChild(sa))):(Da.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ma)),mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){function Aa(){var Ja=Fa.value;Ja=0==Ja.length&&"string"!=wa&&"numbers"!=wa?0:Ja;ka.allowAuto&&(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",wa="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=ka.min&&Ja<ka.min?Ja=ka.min:null!=ka.max&&Ja>ka.max&&(Ja=ka.max);var Ra=null;try{Ra="numbers"==wa?Ja.match(/\d+/g).map(Number).join(" "):+encodeURIComponent(("int"==wa?parseInt(Ja):Ja)+"")}catch(Sa){}N(ja,Ra,ka,null,Fa)}var Fa=document.createElement("input");O(Da,Fa,!0);Fa.value=decodeURIComponent(ma);Fa.className="gePropEditor";"int"!=wa&&"float"!=wa||ka.allowAuto||(Fa.type="number",Fa.step="int"==wa?"1":"any",null!=ka.min&&(Fa.min=parseFloat(ka.min)),null!=ka.max&&(Fa.max=parseFloat(ka.max)));m.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Ja){13==Ja.keyCode&&Aa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){Aa()})})));+ka.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Y,function(Aa){N(ja,"",ka,ka.index);mxEvent.consume(Aa)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",Da.appendChild(sa));Ca.appendChild(Da);return Ca}var Y=this,ba=this.editorUi.editor.graph,ea=[];m.style.position="relative";m.style.padding="0";var ca=document.createElement("table");ca.className="geProperties";ca.style.whiteSpace="nowrap";ca.style.width="100%";var fa=document.createElement("tr");+fa.className="gePropHeader";var aa=document.createElement("th");aa.className="gePropHeaderCell";aa.style.paddingLeft="16px";aa.style.backgroundRepeat="no-repeat";aa.style.backgroundPosition="-2px 50%";aa.style.backgroundSize="20px";mxUtils.write(aa,mxResources.get("property"));fa.style.cursor="pointer";var da=function(){var ja=ca.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){aa.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ma="none";for(var ka=m.childNodes.length-+1;0<=ka;ka--)try{var Ba=m.childNodes[ka],sa=Ba.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||m.removeChild(Ba)}catch(Ea){}}else aa.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ma="";for(ka=0;ka<ja.length;ka++)ja[ka].style.display=ma};mxEvent.addListener(fa,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;da()});fa.appendChild(aa);var ia=document.createElement("th");ia.className="gePropHeaderCell";ia.style.paddingLeft="4px";mxUtils.write(ia,mxResources.get("value"));+fa.appendChild(ia);ca.appendChild(fa);var pa=ia=!1;fa=null;1==I.vertices.length&&0==I.edges.length?fa=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(fa=I.edges[0].id);null==fa||L||ca.appendChild(Z("id",mxUtils.htmlEntities(fa),{dispName:"id",type:"readOnly"},!0,!1));for(var oa in z)if(L=z[oa],"function"!=typeof L.isVisible||L.isVisible(I,this)){var ha=null!=L.getValue?L.getValue():null!=I.style[oa]?mxUtils.htmlEntities(I.style[oa]+""):null!=L.getDefaultValue?L.getDefaultValue(I,this):+L.defVal;if("separator"==L.type)pa=!pa;else{if("staticArr"==L.type)L.size=parseInt(I.style[L.sizeProperty]||z[L.sizeProperty].defVal)||0;else if(null!=L.dependentProps){var xa=L.dependentProps,qa=[],ua=[];for(fa=0;fa<xa.length;fa++){var ya=I.style[xa[fa]];ua.push(z[xa[fa]].subDefVal);qa.push(null!=ya?ya.split(","):[])}L.dependentPropsDefVal=ua;L.dependentPropsVals=qa}ca.appendChild(Z(oa,ha,L,ia,pa));ia=!ia}}for(fa=0;fa<ea.length;fa++)for(L=ea[fa],z=L.parentRow,I=0;I<L.values.length;I++)oa=Z(L.name,+L.values[I],{type:L.type,parentRow:L.parentRow,isDeletable:L.isDeletable,index:I,defVal:L.defVal,countProperty:L.countProperty,size:L.size},0==I%2,L.flipBkg),z.parentNode.insertBefore(oa,z.nextSibling),z=oa;m.appendChild(ca);da();return m};StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var z=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},I=this.editorUi,+L=I.editor.graph,N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.paddingLeft="24px";N.style.paddingRight="20px";m.style.paddingLeft="16px";m.style.paddingBottom="6px";m.style.position="relative";m.appendChild(N);var O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.position="relative";O.style.textAlign="center";O.style.width="210px";for(var S=[],U=0;U<this.defaultColorSchemes.length;U++){var W=document.createElement("div");W.style.display="inline-block";W.style.width=+"6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(W,"click",mxUtils.bind(this,function(){X(ea)}))})(U);S.push(W);O.appendChild(W)}var X=mxUtils.bind(this,function(ea){null!=S[ea]&&(null!=this.format.currentScheme&&null!=S[this.format.currentScheme]&&(S[this.format.currentScheme].style.background="transparent"),+this.format.currentScheme=ea,Z(this.defaultColorSchemes[this.format.currentScheme]),S[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(L.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?+ca[mxConstants.STYLE_FONTCOLOR]:"default";L.replaceDefaultColors(new mxCell,ca);var fa=mxUtils.bind(this,function(da){var ia=mxUtils.button("",mxUtils.bind(this,function(ha){L.getModel().beginUpdate();try{for(var xa=I.getSelectionState().cells,qa=0;qa<xa.length;qa++){var ua=L.getModel().getStyle(xa[qa]);null!=da?(mxEvent.isShiftDown(ha)||(ua=""==da.fill||null==da.fill?mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,da.fill),ua=""==da.gradient||+null==da.gradient?mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,da.gradient),mxEvent.isControlDown(ha)||mxClient.IS_MAC&&mxEvent.isMetaDown(ha)||!L.getModel().isVertex(xa[qa])||(ua=""==da.font||null==da.font?mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,da.font))),mxEvent.isAltDown(ha)||(ua=""==da.stroke||null==da.fill?mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(ua,+mxConstants.STYLE_STROKECOLOR,da.stroke))):(ua=mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,null),ua=mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,null),ua=mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,null),L.getModel().isVertex(xa[qa])&&(ua=mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,null)));L.getModel().setStyle(xa[qa],ua)}}finally{L.getModel().endUpdate()}}));ia.className="geStyleButton";ia.style.width="36px";ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ia.style.margin=+"0px 6px 6px 0px";if(null!=da){var pa="1px solid";null!=da.border&&(pa=da.border);if(null!=da.gradient)ia.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(da.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(da.gradient).cssText+" 100%)";else if(da.fill==mxConstants.NONE)ia.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==da.fill||""==da.fill)ia.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;+else{var oa=mxUtils.getLightDarkColor(da.fill);ia.style.backgroundImage="linear-gradient(to right bottom, "+oa.cssText+" 50%, "+oa.light+" 50.3%)"}null==da.stroke||da.stroke==mxConstants.NONE?ia.style.border=pa+" transparent":""==da.stroke?ia.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(oa=mxUtils.getLightDarkColor(da.stroke),ia.style.border=pa+" "+oa.cssText,ia.style.borderRightColor=oa.light,ia.style.borderBottomColor=+ia.style.borderRightColor);null!=da.title&&ia.setAttribute("title",da.title)}else pa=mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff"),oa=mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000"),ia.style.backgroundColor=pa,ia.style.border="1px solid "+oa;ia.style.borderRadius="0";N.appendChild(ia);null!=da&&null!=da.gradient&&(pa=ia.cloneNode(!1),pa.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(da.fill).light+") 0px, light-dark(transparent, "++mxUtils.getLightDarkColor(da.gradient).light+") 100%)",pa.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",pa.style.backgroundColor="transparent",N.appendChild(pa),pa.style.marginLeft="-42px",mxEvent.addListener(pa,"click",function(){ia.click()}))});N.innerText="";if(null!=ea)for(var aa=0;aa<ea.length;aa++)0<aa&&0==mxUtils.mod(aa,4)&&mxUtils.br(N),fa(ea[aa])});null==this.format.currentScheme?X(Math.min(S.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):X(this.format.currentScheme);U=+10>=this.defaultColorSchemes.length?28:8;var Y=document.createElement("div");Y.style.cssText="position:absolute;left:10px;top:8px;bottom:"+U+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";+mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ba=document.createElement("div");ba.style.cssText="position:absolute;left:202px;top:8px;bottom:"+U+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";+1<this.defaultColorSchemes.length&&(m.appendChild(Y),m.appendChild(ba));mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));z(Y);z(ba);Z(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&m.appendChild(O)}return m}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};+Graph.customFontElements={};Graph.isGoogleFontUrl=function(m){return m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||m.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(m){return Graph.isGoogleFontUrl(m)};Graph.rewriteGoogleFontUrl=function(m){null!=m&&m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(m=Editor.GOOGLE_FONTS_CSS2+m.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return m};Graph.createFontElement=+function(m,z){var I=Graph.fontMapping[z];null==I&&Graph.isCssFontUrl(z)?(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("type","text/css"),m.setAttribute("charset","UTF-8"),m.setAttribute("href",Graph.rewriteGoogleFontUrl(z))):(null==I&&(I='@font-face {\nfont-family: "'+m+'";\nsrc: url("'+z+'");\n}'),m=document.createElement("style"),mxUtils.write(m,I));return m};Graph.addRecentCustomFont=function(m,z){};Graph.addFont=function(m,z,I){if(null!=m&&0<m.length&&null!=+z&&0<z.length){var L=m.toLowerCase();if("helvetica"!=L&&"arial"!=m&&"sans-serif"!=L){var N=Graph.customFontElements[L];null!=N&&N.url!=z&&(N.elt.parentNode.removeChild(N.elt),N=null);null==N?(N=z,"http:"==z.substring(0,5)&&(N=PROXY_URL+"?url="+encodeURIComponent(z)),N={name:m,url:z,elt:Graph.createFontElement(m,N)},Graph.customFontElements[L]=N,z=document.getElementsByTagName("head")[0],null!=I&&("link"==N.elt.nodeName.toLowerCase()?(N.elt.onload=I,N.elt.onerror=I):I()),null!=z&&z.appendChild(N.elt)):+null!=I&&I()}else null!=I&&I()}else null!=I&&I();return m};Graph.getFontUrl=function(m,z){m=Graph.customFontElements[m.toLowerCase()];null!=m&&(z=m.url);return z};Graph.processFontAttributes=function(m){m=m.getElementsByTagName("*");for(var z=0;z<m.length;z++){var I=m[z].getAttribute("data-font-src");if(null!=I){var L="FONT"==m[z].nodeName?m[z].getAttribute("face"):m[z].style.fontFamily;null!=L&&Graph.addFont(L,I)}}};Graph.processFontStyle=function(m){if(null!=m){var z=mxUtils.getValue(m,"fontSource",+null);if(null!=z){var I=mxUtils.getValue(m,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(z))}catch(L){}}}return m};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=+"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var k=Graph.prototype.init;Graph.prototype.init=function(){function m(N){z=N}k.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var z=null;mxEvent.addListener(this.container,"mouseenter",m);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",function(N){z=null});this.isMouseInsertPoint=function(){return null!=+z};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=z?this.getPointForEvent(z):I.apply(this,arguments)};var L=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var O=this.graph.getCellStyle(N);if(null!=O&&"rack"==O.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=O.marginLeft||0;S.marginRight=O.marginRight||0;S.marginTop=+O.marginTop||0;S.marginBottom=O.marginBottom||0;S.allowGaps=O.allowGaps||0;S.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return L.apply(this,arguments)};this.updateGlobalUrlVariables()};var v=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,z){return Graph.processFontStyle(v.apply(this,arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,z,I,L,N,O,S,U,W,X,+Z,Y){t.apply(this,arguments);Graph.processFontAttributes(Y)};var x=mxText.prototype.redraw;mxText.prototype.redraw=function(){x.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,z,I,L){function N(){for(var fa=U.getSelectionCells(),aa=[],da=0;da<fa.length;da++)U.isCellVisible(fa[da])&&aa.push(fa[da]);U.setSelectionCells(aa)}function O(fa){U.setHiddenTags(fa?[]:W.slice());N();U.refresh()}function S(fa,+aa){Z.innerText="";if(0<fa.length){var da=document.createElement("table");da.setAttribute("cellpadding","2");da.style.boxSizing="border-box";da.style.tableLayout="fixed";da.style.width="100%";var ia=document.createElement("tbody");if(null!=fa&&0<fa.length)for(var pa=0;pa<fa.length;pa++)(function(oa){function ha(){var ma=U.getCellsForTags([oa],null,null,!0);U.isEnabled()?U.setSelectionCells(ma):U.highlightCells(ma,null,null,70)}var xa=0>mxUtils.indexOf(U.hiddenTags,oa),qa=document.createElement("tr"),+ua=document.createElement("td");ua.style.align="center";ua.style.width="16px";var ya=document.createElement("img");ya.setAttribute("src",xa?Editor.visibleImage:Editor.hiddenImage);ya.setAttribute("title",mxResources.get(xa?"hideIt":"show",[oa]));mxUtils.setOpacity(ya,xa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter="invert(100%)";ua.appendChild(ya);mxEvent.addListener(ya,"click",function(ma){mxEvent.isShiftDown(ma)?+O(0<=mxUtils.indexOf(U.hiddenTags,oa)):(U.toggleHiddenTag(oa),N(),U.refresh());mxEvent.consume(ma)});qa.appendChild(ua);ua=document.createElement("td");ua.style.align="center";ua.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.selectImage);ya.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ya,xa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter=+"invert(100%)";mxEvent.addListener(ya,"click",function(ma){O(!0);ha();mxEvent.consume(ma)});ua.appendChild(ya);qa.appendChild(ua);ua=document.createElement("td");ua.style.overflow="hidden";ua.style.whiteSpace="nowrap";ua.style.textOverflow="ellipsis";ua.style.verticalAlign="middle";ua.style.cursor="pointer";ua.setAttribute("title",oa);a=document.createElement("a");mxUtils.write(a,oa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,xa?100:40);ua.appendChild(a);mxEvent.addListener(ua,+"click",function(ma){if(mxEvent.isShiftDown(ma))O(!0),ha();else if(xa&&0<U.hiddenTags.length)O(!0);else{var ka=W.slice(),Ba=mxUtils.indexOf(ka,oa);ka.splice(Ba,1);U.setHiddenTags(ka);N();U.refresh()}mxEvent.consume(ma)});qa.appendChild(ua);if(U.isEnabled()){ua=document.createElement("td");ua.style.verticalAlign="middle";ua.style.textAlign="center";ua.style.width="18px";if(null==aa){ua.style.align="center";ua.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.trashImage);+ya.setAttribute("title",mxResources.get("removeIt",[oa]));mxUtils.setOpacity(ya,xa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter="invert(100%)";mxEvent.addListener(ya,"click",function(ma){var ka=mxUtils.indexOf(W,oa);0<=ka&&W.splice(ka,1);U.removeTagsForCells(U.model.getDescendants(U.model.getRoot()),[oa]);U.refresh();mxEvent.consume(ma)});ua.appendChild(ya)}else{var ja=document.createElement("input");+ja.setAttribute("type","checkbox");ja.style.margin="0px";ja.defaultChecked=null!=aa&&0<=mxUtils.indexOf(aa,oa);ja.checked=ja.defaultChecked;ja.style.background="transparent";ja.setAttribute("title",mxResources.get(ja.defaultChecked?"removeIt":"add",[oa]));mxEvent.addListener(ja,"change",function(ma){ja.checked?U.addTagsForCells(U.getSelectionCells(),[oa]):U.removeTagsForCells(U.getSelectionCells(),[oa]);mxEvent.consume(ma)});ua.appendChild(ja)}qa.appendChild(ua)}ia.appendChild(qa)})(fa[pa]);da.appendChild(ia);+Z.appendChild(da)}}var U=this,W=U.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var Z=document.createElement("div");Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.userSelect="none";Z.style.overflow="auto";Z.style.padding="3px";Z.style.left="0px";Z.style.right="0px";Z.style.top="0px";Z.style.bottom="0px";X.appendChild(Z);U.addListener(mxEvent.ROOT,function(){W=U.hiddenTags.slice()});+var Y=mxUtils.bind(this,function(fa,aa){if(m()){fa=U.getAllTags();for(aa=0;aa<fa.length;aa++)0>mxUtils.indexOf(W,fa[aa])&&W.push(fa[aa]);W.sort();U.isSelectionEmpty()?S(W):S(W,U.getCommonTagsForCells(U.getSelectionCells()))}});U.selectionModel.addListener(mxEvent.CHANGE,Y);U.model.addListener(mxEvent.CHANGE,Y);U.addListener(mxEvent.REFRESH,Y);var ba=document.createElement("div");ba.className="geToolbarContainer";ba.style.position="absolute";ba.style.display="flex";ba.style.bottom="0px";ba.style.left=+"0px";ba.style.right="0px";ba.style.height="26px";ba.style.overflow="hidden";ba.style.padding="3px 4px 4px 4px";ba.style.borderWidth="1px 0px 0px 0px";ba.style.borderStyle="solid";ba.style.whiteSpace="nowrap";if(U.isEnabled()){Z.style.bottom="34px";var ea=document.createElement("a");ea.className="geToolbarButton geAdaptiveAsset geToggleItem";ea.style.width="16px";ea.style.height="18px";ea.style.backgroundPosition="center center";ea.style.backgroundRepeat="no-repeat";ea.style.backgroundSize="20px";+ea.style.margin="0 2px";ea.style.display="inline-block";ea.style.cursor="pointer";var ca=ea.cloneNode(!1);ca.style.backgroundImage="url("+Editor.visibleImage+")";ca.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ca,"click",function(fa){U.setHiddenTags([]);mxEvent.isShiftDown(fa)||(W=U.hiddenTags.slice());N();U.refresh();mxEvent.consume(fa)});ba.appendChild(ca);null!=I&&(ea=ea.cloneNode(!1),ea.style.backgroundImage="url("+Editor.plusImage+")",ea.setAttribute("title",mxResources.get("add")),+mxEvent.addListener(ea,"click",function(fa){I(W,function(aa){W=aa;Y()});mxEvent.consume(fa)}),ba.appendChild(ea));X.appendChild(ba)}null!=L&&ba.appendChild(L);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];for(var z in Graph.customFontElements){var I=Graph.customFontElements[z];m.push({name:I.name,url:I.url})}return m};Graph.prototype.setFont=function(m,z){Graph.addFont(m,z);var I=Editor.guid();document.execCommand("fontname",!1,I);for(var L=+this.cellEditor.textarea.getElementsByTagName("font"),N=!1,O=0;O<L.length;O++)L[O].getAttribute("face")==I&&(N=!0,L[O].setAttribute("face",m),null!=z?L[O].setAttribute("data-font-src",z):L[O].removeAttribute("data-font-src"));N||document.execCommand("fontname",!1,m)};var A=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return A.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;+if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var z in m)this.globalVars[z]=m[z]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var J=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(m){var z=J.apply(this,arguments);+null==z&&null!=this.globalVars&&(z=this.globalVars[m]);return z};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,z,I,L,N,O,S,U,W,X,Z,Y,ba,ea,ca,fa){var aa=D.apply(this,arguments);if(null!=Y){var da=aa.getAttribute("style");+null==da&&(da="");Y="auto"==Y?"none"==this.getAdaptiveColors()?"light":"light dark":Y;aa.setAttribute("style",da+(" color-scheme: "+Y+";"))}var ia=this.getCustomFonts();if(Z&&0<ia.length){var pa=aa.ownerDocument;da=null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"style"):pa.createElement("style");null!=pa.setAttributeNS?da.setAttributeNS("type","text/css"):da.setAttribute("type","text/css");for(var oa="",ha="",xa=0;xa<ia.length;xa++){var qa=ia[xa].name,ua=ia[xa].url;Graph.isCssFontUrl(ua)?+oa+="@import url("+Graph.rewriteGoogleFontUrl(ua)+");\n":ha+='@font-face {\nfont-family: "'+qa+'";\nsrc: url("'+ua+'");\n}\n'}da.appendChild(pa.createTextNode(oa+ha));aa.getElementsByTagName("defs")[0].appendChild(da)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(aa);this.mathEnabled&&(document.body.appendChild(aa),Editor.MathJaxRender(aa),aa.parentNode.removeChild(aa),da=aa.ownerDocument.getElementById("MJX-SVG-styles"),null!=+da&&aa.getElementsByTagName("defs")[0].appendChild(da.cloneNode(!0)));return aa};var E=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){E.apply(this,arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){R.apply(this,arguments);this.enumerationState=+0};var V=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return V.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,"enumerateValue",""));""==m&&(m=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(m)+"</div>"};mxGraphView.prototype.redrawEnumerationState=+function(m){var z="1"==mxUtils.getValue(m.style,"enumerate",0);z&&null==m.secondLabel?(m.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),m.secondLabel.size=12,m.secondLabel.state=m,m.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):z||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);z=m.secondLabel;if(null!=z){var I=m.view.scale,L=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?+new mxRectangle(m.x+m.width-4*I,m.y+4*I,0,0):mxRectangle.fromPoint(m.view.getPoint(m));z.bounds.equals(m)&&z.value==L&&z.scale==I||(z.bounds=m,z.value=L,z.scale=I,z.redraw())}};var Q=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();Q.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var P=+Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){P.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(m,z){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=m.actions&&this.executeCustomActions(m.actions,null,z))};Graph.prototype.executeCustomActions=function(m,z,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),+null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var L=!1,N=0,O=0,S=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),U=mxUtils.bind(this,function(){L&&(L=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<N&&N--;0==N&&X()}),X=mxUtils.bind(this,function(){if(O<m.length){var Z=this.stoppingCustomActions,Y=m[O++],ba=[];if(null!=Y.open)if(U(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,+I))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;W()}),N++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),U());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(N++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,+!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(N++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,W,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(S(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){S();var ea=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),+1);this.setCellsVisible(ea,!0)}null!=Y.hide&&(S(),ea=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(S(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(S(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));ea=[];null!=+Y.select&&this.isEnabled()&&(ea=this.getCellsForAction(Y.select),this.setSelectionCells(ea));null!=Y.highlight&&(ea=this.getCellsForAction(Y.highlight),this.highlightCells(ea,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));null!=Y.scroll&&(ea=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);null!=I&&null!=Y.explore&&Graph.exploreFromCell(this,I,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ca=+Y.tags.toggle;0==ca.length&&(ca=this.getAllTags());for(ea=0;ea<ca.length;ea++)this.toggleHiddenTag(ca[ea])}ca=null;null!=Y.tags.hidden&&(null==ca&&(ca=[]),ca=ca.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ca&&(ca=[]);var fa=this.getAllTags();for(ea=0;ea<fa.length;ea++)0>mxUtils.indexOf(Y.tags.visible,fa[ea])&&0>mxUtils.indexOf(ca,fa[ea])&&ca.push(fa[ea])}null!=ca&&this.setHiddenTags(ca);this.refresh()}0<ba.length&&(N++,this.executeAnimations(ba,W,Z?1:Y.steps,Z?0:Y.delay));0==N?X():U()}else this.stoppingCustomActions=+this.executingCustomActions=!1,U(),null!=z&&z()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,z){var I=this.getLinkForCell(z);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(z,this.updateCustomLink(m,I));if(this.isHtmlLabel(z)){var L=document.createElement("div");L.innerHTML=Graph.sanitizeHtml(this.getLabel(z));for(var N=L.getElementsByTagName("a"),O=!1,S=0;S<N.length;S++)I=N[S].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(N[S].setAttribute("href",+this.updateCustomLink(m,I)),O=!0);O&&this.labelChanged(z,L.innerHTML)}};Graph.prototype.updateCustomLink=function(m,z){if("data:action/json,"==z.substring(0,17))try{var I=JSON.parse(z.substring(17));null!=I.actions&&(this.updateCustomLinkActions(m,I.actions),z="data:action/json,"+JSON.stringify(I))}catch(L){}return z};Graph.prototype.updateCustomLinkActions=function(m,z){for(var I=0;I<z.length;I++){var L=z[I],N;for(N in L)this.updateCustomLinkAction(m,L[N],"cells"),this.updateCustomLinkAction(m,L[N],+"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,z,I){if(null!=z&&null!=z[I]){for(var L=[],N=0;N<z[I].length;N++)if("*"==z[I][N])L.push(z[I][N]);else{var O=m[z[I][N]];null!=O?""!=O&&L.push(O):L.push(z[I][N])}z[I]=L}};Graph.prototype.getCellsForAction=function(m,z){z=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,z));if(null!=m.excludeCells){for(var I=[],L=0;L<z.length;L++)0>m.excludeCells.indexOf(z[L].id)&&I.push(z[L]);z=I}return z};Graph.prototype.getCellsById=+function(m){var z=[];if(null!=m)for(var I=0;I<m.length;I++)if("*"==m[I]){var L=this.model.getRoot();z=z.concat(this.model.filterDescendants(function(O){return O!=L},L))}else{var N=this.model.getCell(m[I]);null!=N&&z.push(N)}return z};var q=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return q.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};+Graph.prototype.toggleHiddenTag=function(m){var z=mxUtils.indexOf(this.hiddenTags,m);0>z?this.hiddenTags.push(m):0<=z&&this.hiddenTags.splice(z,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var z=0;z<m.length;z++)if(0>mxUtils.indexOf(this.hiddenTags,m[z]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,z,I,+L){var N=[];if(null!=m){z=null!=z?z:this.model.getDescendants(this.model.getRoot());for(var O=0,S={},U=0;U<m.length;U++)0<m[U].length&&(S[m[U]]=!0,O++);for(U=0;U<z.length;U++)if(I&&this.model.getParent(z[U])==this.model.root||this.model.isVertex(z[U])||this.model.isEdge(z[U])){var W=this.getTagsForCell(z[U]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=m.length)){for(var Z=X=0;Z<W.length&&X<O;Z++)null!=S[W[Z]]&&X++;X=X==O}X&&(1!=L||this.isCellVisible(z[U]))&&N.push(z[U])}}return N};Graph.prototype.getAllTags=+function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var z=null,I=[],L=0;L<m.length;L++){var N=this.getTagsForCell(m[L]);I=[];if(0<N.length){N=N.split(" ");for(var O={},S=0;S<N.length;S++)if(null==z||null!=z[N[S]])O[N[S]]=!0,I.push(N[S]);z=O}else return[]}return I};Graph.prototype.getTagsForCells=function(m){for(var z=[],I={},L=0;L<m.length;L++){var N=this.getTagsForCell(m[L]);if(0<N.length){N=N.split(" ");for(var O=+0;O<N.length;O++)null==I[N[O]]&&(I[N[O]]=!0,z.push(N[O]))}}return z};Graph.prototype.getTagsForCell=function(m){return this.getAttributeForCell(m,"tags","")};Graph.prototype.addTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var I=0;I<m.length;I++){for(var L=this.getTagsForCell(m[I]),N=L.split(" "),O=!1,S=0;S<z.length;S++){var U=mxUtils.trim(z[S]);""!=U&&0>mxUtils.indexOf(N,U)&&(L=0<L.length?L+" "+U:U,O=!0)}O&&this.setAttributeForCell(m[I],"tags",L)}}finally{this.model.endUpdate()}}};+Graph.prototype.removeTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var I=0;I<m.length;I++){var L=this.getTagsForCell(m[I]);if(0<L.length){for(var N=L.split(" "),O=!1,S=0;S<z.length;S++){var U=mxUtils.indexOf(N,z[S]);0<=U&&(N.splice(U,1),O=!0)}O&&this.setAttributeForCell(m[I],"tags",N.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(m){this.model.beginUpdate();try{for(var z=0;z<m.length;z++)this.model.setVisible(m[z],!this.model.isVisible(m[z]))}finally{this.model.endUpdate()}};+Graph.prototype.setCellsVisible=function(m,z){this.model.beginUpdate();try{for(var I=0;I<m.length;I++)this.model.setVisible(m[I],z)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(m,z,I,L){for(var N=0;N<m.length;N++)this.highlightCell(m[N],z,I,L)};Graph.prototype.highlightCell=function(m,z,I,L,N){z=null!=z?z:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;m=this.view.getState(m);var O=null;null!=m&&(N=null!=N?N:4,N=Math.max(N+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,+1)+N),O=new mxCellHighlight(this,z,N,!1),null!=L&&(O.opacity=L),O.highlight(m),window.setTimeout(function(){null!=O.shape&&(mxUtils.setPrefixedStyle(O.shape.node.style,"transition","all 1200ms ease-in-out"),O.shape.node.style.opacity=0);window.setTimeout(function(){O.destroy()},1200)},I));return O};Graph.prototype.addSvgShadow=function(m,z,I,L){I=null!=I?I:!1;L=null!=L?L:!0;var N=m.ownerDocument,O=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"filter"):N.createElement("filter");O.setAttribute("id",+this.shadowId);var S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):N.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feOffset"):N.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",+"offsetBlur");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feFlood"):N.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feComposite"):N.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");+S.setAttribute("result","offsetBlur");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feBlend"):N.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");O.appendChild(S);S=m.getElementsByTagName("defs");0==S.length?(N=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"defs"):N.createElement("defs"),null!=m.firstChild?m.insertBefore(N,m.firstChild):m.appendChild(N)):N=S[0];N.appendChild(O);I||(z=null!=z?z:m.getElementsByTagName("g")[0],+null!=z&&(z.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(m.getAttribute("width")))&&L&&(m.setAttribute("width",parseInt(m.getAttribute("width"))+6),m.setAttribute("height",parseInt(m.getAttribute("height"))+6),z=m.getAttribute("viewBox"),null!=z&&0<z.length&&(z=z.split(" "),3<z.length&&(w=parseFloat(z[2])+6,h=parseFloat(z[3])+6,m.setAttribute("viewBox",z[0]+" "+z[1]+" "+w+" "+h))))));return O};Graph.prototype.setShadowVisible=function(m,z){mxClient.IS_SVG&&!mxClient.IS_SF&&(z=+null!=z?z:!0,(this.shadowVisible=m)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),z&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var m=this.model.getChildCount(this.model.root),+z=0;do var I=this.model.getChildAt(this.model.root,z);while(z++<m&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml",STENCIL_PATH+"/kubernetes2.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",@@ -12986,364 +12986,364 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[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.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=-[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(l){var x=null;null!=l&&0<l.length&&("ER"==l.substring(0,2)?x="mxgraph.er":"sysML"==l.substring(0,5)&&(x="mxgraph.sysml"));return x};var z=mxMarker.createMarker;mxMarker.createMarker=function(l,x,F,N,O,Q,V,T,W,X){if(null!=F&&null==mxMarker.markers[F]){var Y=this.getPackageForType(F);null!=Y&&mxStencilRegistry.getStencil(Y)}return z.apply(this,arguments)};var A=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(l,-x,F,N,O,Q){"1"==mxUtils.getValue(x.style,"lineShape",null)&&l.setFillColor(mxUtils.getValue(x.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return A.apply(this,arguments)};PrintDialog.prototype.create=function(l,x,F){function N(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(aa.value))));aa.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),parseInt(aa.value))))}function O(Ba){l.lastPrintPagesRadioChecked=Z.checked;l.lastPrintSelectionOnlyChecked=da.checked;l.lastPrintCropRadioChecked=-ba.checked;l.lastPrintFitRadioChecked=ia.checked;Z.checked&&aa.value<ea.value?(l.lastPrintPagesFromInput=aa.value,l.lastPrintPagesToInput=ea.value):(l.lastPrintPagesFromInput=null,l.lastPrintPagesToInput=null);oa.value=Math.max(1,Math.min(1600,parseInt(oa.value)))+"%";l.lastPrintZoom=oa.value;l.lastPrintBorder=Aa.value;l.lastPrintGrid=Ea.checked;l.lastPrintTransparent=va.checked;l.lastPrintInclude=Ca.checked;l.lastPrintSheetsAcross=fa.value;l.lastPrintSheetsDown=na.value;var Da={};Da.border=parseInt(Aa.value);-Da.scale=parseInt(oa.value)/100;Da.grid=Ea.checked;Da.transparent=va.checked;Da.includeCopy=Ca.checked;Da.sheetsAcross=parseInt(fa.value);Da.sheetsDown=parseInt(na.value);Da.pagesFrom=parseInt(aa.value);Da.pagesTo=parseInt(ea.value);Da.allPages=Y.checked;Da.selection=da.checked;Da.pageView=ja.checked;Da.crop=ba.checked;Da.fit=ia.checked;return null!=F?F(!Ba,Da):l.print(!Ba,Da)}var Q=l.editor.graph,V=document.createElement("div"),T=document.createElement("h3");T.style.width="100%";T.style.textAlign=-"center";T.style.marginTop="0px";mxUtils.write(T,x||mxResources.get("print"));V.appendChild(T);var W=1,X=1;T=document.createElement("div");T.style.whiteSpace="nowrap";var Y=document.createElement("input");Y.style.marginRight="8px";Y.style.marginBottom="8px";Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");T.appendChild(Y);x=document.createElement("span");mxUtils.write(x,mxResources.get("allPages"));mxEvent.addListener(x,"click",function(){Y.checked=!0});T.appendChild(x);mxUtils.br(T);-var Z=Y.cloneNode(!0);T.appendChild(Z);x=document.createElement("span");mxUtils.write(x,mxResources.get("pages")+":");T.appendChild(x);mxEvent.addListener(x,"click",function(){Z.checked=!0});var aa=document.createElement("input");aa.style.margin="0 4px";aa.setAttribute("value","1");aa.setAttribute("type","number");aa.setAttribute("min","1");aa.style.width="40px";T.appendChild(aa);x=document.createElement("span");mxUtils.write(x,mxResources.get("to"));T.appendChild(x);var ea=aa.cloneNode(!0);T.appendChild(ea);-mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(ea,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"change",N);mxEvent.addListener(ea,"change",N);if(null!=l.pages&&(X=l.pages.length,null!=l.currentPage))for(var ca=0;ca<X;ca++)if(l.currentPage==l.pages[ca]){W=ca+1;break}null!=l.lastPrintPagesFromInput&&null!=l.lastPrintPagesToInput?(aa.value=Math.min(X,Math.max(1,l.lastPrintPagesFromInput)),ea.value=Math.min(X,Math.max(1,l.lastPrintPagesToInput))):(aa.value=W,-ea.value=W);aa.setAttribute("max",X);ea.setAttribute("max",X);ca=mxUtils.button(mxResources.get("currentPage"),function(Ba){aa.value=W;ea.value=W;Z.checked=!0});ca.setAttribute("title",mxResources.get("currentPage"));ca.style.marginLeft="4px";ca.style.maxWidth="100px";ca.style.overflow="hidden";ca.style.textOverflow="ellipsis";ca.style.whiteSpace="nowrap";T.appendChild(ca);1<X&&V.appendChild(T);T=document.createElement("div");T.style.borderBottom="1px solid lightGray";T.style.paddingBottom="12px";-T.style.marginBottom="12px";T.style.whiteSpace="nowrap";var da=document.createElement("input");da.setAttribute("name","pages-printdialog");da.setAttribute("type",1==X?"checkbox":"radio");da.style.marginRight="8px";Q.isSelectionEmpty()&&da.setAttribute("disabled","disabled");Q.isEnabled()&&(T.appendChild(da),x=document.createElement("span"),mxUtils.write(x,mxResources.get("selectionOnly")),T.appendChild(x));(Q.isEnabled()||1<X)&&V.appendChild(T);!l.isPagesEnabled()||l.lastPrintPagesRadioChecked?Z.checked=-!0:!Q.isSelectionEmpty()&&l.lastPrintSelectionOnlyChecked?da.checked=!0:Y.checked=!0;Q.isSelectionEmpty()||mxEvent.addListener(x,"click",function(){da.checked=!da.checked});Q=document.createElement("div");Q.style.whiteSpace="nowrap";var ja=document.createElement("input");ja.style.marginBottom="8px";ja.style.marginRight="8px";ja.setAttribute("type","radio");ja.setAttribute("name","printSize");Q.appendChild(ja);x=document.createElement("span");mxUtils.write(x,mxResources.get("pageView"));Q.appendChild(x);-mxEvent.addListener(Q,"click",function(){ja.checked=!0});V.appendChild(Q);Q=document.createElement("div");Q.style.whiteSpace="nowrap";var ba=document.createElement("input");ba.style.marginBottom="8px";ba.style.marginRight="8px";ba.setAttribute("type","radio");ba.setAttribute("name","printSize");Q.appendChild(ba);x=document.createElement("span");mxUtils.write(x,mxResources.get("crop"));Q.appendChild(x);mxEvent.addListener(Q,"click",function(){ba.checked=!0});V.appendChild(Q);Q=document.createElement("div");-Q.style.whiteSpace="nowrap";var ia=document.createElement("input");ia.style.marginBottom="8px";ia.style.marginRight="8px";ia.setAttribute("type","radio");ia.setAttribute("name","printSize");x=document.createElement("div");x.style.display="inline-block";x.style.verticalAlign="top";x.style.paddingTop="2px";x.appendChild(ia);Q.appendChild(x);T=document.createElement("table");T.style.display="inline-block";T.style.borderSpacing="0";ca=document.createElement("tbody");var ka=document.createElement("tr"),-ua=ka.cloneNode(!0),sa=document.createElement("td"),ha=sa.cloneNode(!0),pa=sa.cloneNode(!0),ra=sa.cloneNode(!0),xa=sa.cloneNode(!0),wa=sa.cloneNode(!0);sa.style.textAlign="right";ra.style.textAlign="right";mxUtils.write(sa,mxResources.get("fitTo"));mxEvent.addListener(Q,"click",function(Ba){mxEvent.getSource(Ba)!=ia&&(ia.checked=!ia.checked)});var fa=document.createElement("input");fa.style.margin="0 2px";fa.style.boxSizing="border-box";fa.setAttribute("value",l.lastPrintSheetsAcross||"1");fa.setAttribute("min",-"1");fa.setAttribute("type","number");fa.style.width="40px";ha.appendChild(fa);x=document.createElement("span");mxUtils.write(x,mxResources.get("fitToSheetsAcross"));pa.appendChild(x);mxUtils.write(ra,mxResources.get("fitToBy"));var na=fa.cloneNode(!0);na.setAttribute("value",l.lastPrintSheetsDown||"1");xa.appendChild(na);mxEvent.addListener(fa,"click",function(Ba){ia.checked=!0;mxEvent.consume(Ba)});mxEvent.addListener(na,"click",function(Ba){ia.checked=!0;mxEvent.consume(Ba)});l.lastPrintCropRadioChecked?-ba.checked=!0:l.lastPrintFitRadioChecked?ia.checked=!0:ja.checked=!0;x=document.createElement("span");mxUtils.write(x,mxResources.get("fitToSheetsDown"));wa.appendChild(x);ka.appendChild(sa);ka.appendChild(ha);ka.appendChild(pa);ua.appendChild(ra);ua.appendChild(xa);ua.appendChild(wa);ca.appendChild(ka);ca.appendChild(ua);T.appendChild(ca);Q.appendChild(T);V.appendChild(Q);Q=document.createElement("div");Q.style.borderTop="1px solid lightGray";Q.style.whiteSpace="nowrap";Q.style.paddingTop="12px";-Q.style.marginTop="12px";Q.style.paddingLeft="8px";mxUtils.write(Q,mxResources.get("borderWidth")+":");var Aa=document.createElement("input");Aa.setAttribute("type","number");Aa.setAttribute("min","0");Aa.style.width="40px";Aa.style.marginLeft="4px";Aa.value=null!=l.lastPrintBorder?l.lastPrintBorder:mxPrintPreview.prototype.pageMargin;Q.appendChild(Aa);x=document.createElement("span");x.style.marginLeft="8px";mxUtils.write(x,mxResources.get("zoom")+":");Q.appendChild(x);var oa=document.createElement("input");-oa.style.width="60px";oa.style.marginLeft="4px";oa.value=null!=l.lastPrintZoom?l.lastPrintZoom:"100%";Q.appendChild(oa);mxUtils.br(Q);var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.marginTop="12px";Ea.checked=null!=l.lastPrintGrid?l.lastPrintGrid:!1;Q.appendChild(Ea);x=document.createElement("span");x.style.marginLeft="4px";x.style.marginRight="8px";mxUtils.write(x,mxResources.get("grid"));Q.appendChild(x);mxEvent.addListener(x,"click",function(Ba){Ea.checked=!0;-mxEvent.consume(Ba)});var va=document.createElement("input");va.setAttribute("type","checkbox");va.style.marginTop="10px";va.checked=null!=l.lastPrintTransparent?l.lastPrintTransparent:!1;null!=F&&(Q.appendChild(va),x=document.createElement("span"),x.style.marginLeft="4px",mxUtils.write(x,mxResources.get("transparentBackground")),Q.appendChild(x),mxEvent.addListener(x,"click",function(Ba){va.checked=!0;mxEvent.consume(Ba)}));var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");-Ca.style.marginTop="10px";Ca.checked=null!=l.lastPrintInclude?l.lastPrintInclude:Editor.defaultIncludeDiagram;null==F||mxClient.IS_CHROMEAPP||"draw.io"!=l.getServiceName()||(mxUtils.br(Q),Q.appendChild(Ca),x=document.createElement("span"),x.style.marginLeft="4px",mxUtils.write(x,mxResources.get("includeCopyOfMyDiagram")),Q.appendChild(x),mxEvent.addListener(x,"click",function(Ba){Ca.checked=!0;mxEvent.consume(Ba)}));V.appendChild(Q);x=document.createElement("div");x.style.marginTop="40px";x.style.textAlign=-"right";x.style.whiteSpace="nowrap";l.isOffline()||null!=F||x.appendChild(l.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));Q=mxUtils.button(mxResources.get("cancel"),function(){l.hideDialog()});Q.className="geBtn";l.editor.cancelFirst&&x.appendChild(Q);PrintDialog.previewEnabled&&null==F&&(T=mxUtils.button(mxResources.get("preview"),function(){try{l.hideDialog(),O(!1)}catch(Ba){l.handleError(Ba)}}),T.className="geBtn",x.appendChild(T));T=mxUtils.button(mxResources.get(null!=F?"export":-PrintDialog.previewEnabled?"print":"ok"),function(){try{l.hideDialog(),O(!0)}catch(Ba){l.handleError(Ba)}});T.className="geBtn gePrimaryBtn";x.appendChild(T);l.editor.cancelFirst||x.appendChild(Q);V.appendChild(x);if(l.editor.isChromelessView()){var Fa=function(){Editor.isDarkMode()?(V.classList.add("geDarkMode"),V.style.colorScheme="dark"):(V.classList.remove("geDarkMode"),V.style.colorScheme="light")};l.addListener("darkModeChanged",Fa);Fa();var Ma=function(Ba,Da){Ba=Da.getProperty("dialog");V.parentNode==-Ba.container&&(l.editor.removeListener(Ma),l.removeListener(Fa))};l.editor.addListener("hideDialog",Ma)}this.container=V};var B=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var l=this.image;null!=l&&null!=l.src&&Graph.isPageLink(l.src)&&(l={originalSrc:l.src});this.page.viewState.backgroundImage=-l}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else B.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&-this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(l=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=l?l:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var M=document.createElement("canvas"),S=new Image;S.onload=function(){try{M.getContext("2d").drawImage(S,-0,0);var l=M.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=l&&6<l.length}catch(x){}};S.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(l){}Editor.prototype.useCanvasForExport=!1})();+[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(m){var z=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?z="mxgraph.er":"sysML"==m.substring(0,5)&&(z="mxgraph.sysml"));return z};var y=mxMarker.createMarker;mxMarker.createMarker=function(m,z,I,L,N,O,S,U,W,X){if(null!=I&&null==mxMarker.markers[I]){var Z=this.getPackageForType(I);null!=Z&&mxStencilRegistry.getStencil(Z)}return y.apply(this,arguments)};var B=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,+z,I,L,N,O){"1"==mxUtils.getValue(z.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return B.apply(this,arguments)};PrintDialog.prototype.create=function(m,z,I){function L(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),parseInt(ba.value))))}function N(Aa){m.lastPrintPagesRadioChecked=Y.checked;m.lastPrintSelectionOnlyChecked=fa.checked;m.lastPrintCropRadioChecked=+da.checked;m.lastPrintFitRadioChecked=ia.checked;Y.checked&&ba.value<ea.value?(m.lastPrintPagesFromInput=ba.value,m.lastPrintPagesToInput=ea.value):(m.lastPrintPagesFromInput=null,m.lastPrintPagesToInput=null);sa.value=Math.max(1,Math.min(1600,parseInt(sa.value)))+"%";m.lastPrintZoom=sa.value;m.lastPrintBorder=Ba.value;m.lastPrintGrid=Ea.checked;m.lastPrintTransparent=wa.checked;m.lastPrintInclude=Ca.checked;m.lastPrintSheetsAcross=ma.value;m.lastPrintSheetsDown=ka.value;var Fa={};Fa.border=parseInt(Ba.value);+Fa.scale=parseInt(sa.value)/100;Fa.grid=Ea.checked;Fa.transparent=wa.checked;Fa.includeCopy=Ca.checked;Fa.sheetsAcross=parseInt(ma.value);Fa.sheetsDown=parseInt(ka.value);Fa.pagesFrom=parseInt(ba.value);Fa.pagesTo=parseInt(ea.value);Fa.allPages=Z.checked;Fa.selection=fa.checked;Fa.pageView=aa.checked;Fa.crop=da.checked;Fa.fit=ia.checked;return null!=I?I(!Aa,Fa):m.print(!Aa,Fa)}var O=m.editor.graph,S=document.createElement("div"),U=document.createElement("h3");U.style.width="100%";U.style.textAlign=+"center";U.style.marginTop="0px";mxUtils.write(U,z||mxResources.get("print"));S.appendChild(U);var W=1,X=1;U=document.createElement("div");U.style.whiteSpace="nowrap";var Z=document.createElement("input");Z.style.marginRight="8px";Z.style.marginBottom="8px";Z.setAttribute("type","radio");Z.setAttribute("name","pages-printdialog");U.appendChild(Z);z=document.createElement("span");mxUtils.write(z,mxResources.get("allPages"));mxEvent.addListener(z,"click",function(){Z.checked=!0});U.appendChild(z);mxUtils.br(U);+var Y=Z.cloneNode(!0);U.appendChild(Y);z=document.createElement("span");mxUtils.write(z,mxResources.get("pages")+":");U.appendChild(z);mxEvent.addListener(z,"click",function(){Y.checked=!0});var ba=document.createElement("input");ba.style.margin="0 4px";ba.setAttribute("value","1");ba.setAttribute("type","number");ba.setAttribute("min","1");ba.style.width="40px";U.appendChild(ba);z=document.createElement("span");mxUtils.write(z,mxResources.get("to"));U.appendChild(z);var ea=ba.cloneNode(!0);U.appendChild(ea);+mxEvent.addListener(ba,"focus",function(){Y.checked=!0});mxEvent.addListener(ea,"focus",function(){Y.checked=!0});mxEvent.addListener(ba,"change",L);mxEvent.addListener(ea,"change",L);if(null!=m.pages&&(X=m.pages.length,null!=m.currentPage))for(var ca=0;ca<X;ca++)if(m.currentPage==m.pages[ca]){W=ca+1;break}null!=m.lastPrintPagesFromInput&&null!=m.lastPrintPagesToInput?(ba.value=Math.min(X,Math.max(1,m.lastPrintPagesFromInput)),ea.value=Math.min(X,Math.max(1,m.lastPrintPagesToInput))):(ba.value=W,+ea.value=W);ba.setAttribute("max",X);ea.setAttribute("max",X);ca=mxUtils.button(mxResources.get("currentPage"),function(Aa){ba.value=W;ea.value=W;Y.checked=!0});ca.setAttribute("title",mxResources.get("currentPage"));ca.style.marginLeft="4px";ca.style.maxWidth="100px";ca.style.overflow="hidden";ca.style.textOverflow="ellipsis";ca.style.whiteSpace="nowrap";U.appendChild(ca);1<X&&S.appendChild(U);U=document.createElement("div");U.style.borderBottom="1px solid lightGray";U.style.paddingBottom="12px";+U.style.marginBottom="12px";U.style.whiteSpace="nowrap";var fa=document.createElement("input");fa.setAttribute("name","pages-printdialog");fa.setAttribute("type",1==X?"checkbox":"radio");fa.style.marginRight="8px";O.isSelectionEmpty()&&fa.setAttribute("disabled","disabled");O.isEnabled()&&(U.appendChild(fa),z=document.createElement("span"),mxUtils.write(z,mxResources.get("selectionOnly")),U.appendChild(z));(O.isEnabled()||1<X)&&S.appendChild(U);!m.isPagesEnabled()||m.lastPrintPagesRadioChecked?Y.checked=+!0:!O.isSelectionEmpty()&&m.lastPrintSelectionOnlyChecked?fa.checked=!0:Z.checked=!0;O.isSelectionEmpty()||mxEvent.addListener(z,"click",function(){fa.checked=!fa.checked});O=document.createElement("div");O.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.style.marginBottom="8px";aa.style.marginRight="8px";aa.setAttribute("type","radio");aa.setAttribute("name","printSize");O.appendChild(aa);z=document.createElement("span");mxUtils.write(z,mxResources.get("pageView"));O.appendChild(z);+mxEvent.addListener(O,"click",function(){aa.checked=!0});S.appendChild(O);O=document.createElement("div");O.style.whiteSpace="nowrap";var da=document.createElement("input");da.style.marginBottom="8px";da.style.marginRight="8px";da.setAttribute("type","radio");da.setAttribute("name","printSize");O.appendChild(da);z=document.createElement("span");mxUtils.write(z,mxResources.get("crop"));O.appendChild(z);mxEvent.addListener(O,"click",function(){da.checked=!0});S.appendChild(O);O=document.createElement("div");+O.style.whiteSpace="nowrap";var ia=document.createElement("input");ia.style.marginBottom="8px";ia.style.marginRight="8px";ia.setAttribute("type","radio");ia.setAttribute("name","printSize");z=document.createElement("div");z.style.display="inline-block";z.style.verticalAlign="top";z.style.paddingTop="2px";z.appendChild(ia);O.appendChild(z);U=document.createElement("table");U.style.display="inline-block";U.style.borderSpacing="0";ca=document.createElement("tbody");var pa=document.createElement("tr"),+oa=pa.cloneNode(!0),ha=document.createElement("td"),xa=ha.cloneNode(!0),qa=ha.cloneNode(!0),ua=ha.cloneNode(!0),ya=ha.cloneNode(!0),ja=ha.cloneNode(!0);ha.style.textAlign="right";ua.style.textAlign="right";mxUtils.write(ha,mxResources.get("fitTo"));mxEvent.addListener(O,"click",function(Aa){mxEvent.getSource(Aa)!=ia&&(ia.checked=!ia.checked)});var ma=document.createElement("input");ma.style.margin="0 2px";ma.style.boxSizing="border-box";ma.setAttribute("value",m.lastPrintSheetsAcross||"1");ma.setAttribute("min",+"1");ma.setAttribute("type","number");ma.style.width="40px";xa.appendChild(ma);z=document.createElement("span");mxUtils.write(z,mxResources.get("fitToSheetsAcross"));qa.appendChild(z);mxUtils.write(ua,mxResources.get("fitToBy"));var ka=ma.cloneNode(!0);ka.setAttribute("value",m.lastPrintSheetsDown||"1");ya.appendChild(ka);mxEvent.addListener(ma,"click",function(Aa){ia.checked=!0;mxEvent.consume(Aa)});mxEvent.addListener(ka,"click",function(Aa){ia.checked=!0;mxEvent.consume(Aa)});m.lastPrintCropRadioChecked?+da.checked=!0:m.lastPrintFitRadioChecked?ia.checked=!0:aa.checked=!0;z=document.createElement("span");mxUtils.write(z,mxResources.get("fitToSheetsDown"));ja.appendChild(z);pa.appendChild(ha);pa.appendChild(xa);pa.appendChild(qa);oa.appendChild(ua);oa.appendChild(ya);oa.appendChild(ja);ca.appendChild(pa);ca.appendChild(oa);U.appendChild(ca);O.appendChild(U);S.appendChild(O);O=document.createElement("div");O.style.borderTop="1px solid lightGray";O.style.whiteSpace="nowrap";O.style.paddingTop="12px";+O.style.marginTop="12px";O.style.paddingLeft="8px";mxUtils.write(O,mxResources.get("borderWidth")+":");var Ba=document.createElement("input");Ba.setAttribute("type","number");Ba.setAttribute("min","0");Ba.style.width="40px";Ba.style.marginLeft="4px";Ba.value=null!=m.lastPrintBorder?m.lastPrintBorder:mxPrintPreview.prototype.pageMargin;O.appendChild(Ba);z=document.createElement("span");z.style.marginLeft="8px";mxUtils.write(z,mxResources.get("zoom")+":");O.appendChild(z);var sa=document.createElement("input");+sa.style.width="60px";sa.style.marginLeft="4px";sa.value=null!=m.lastPrintZoom?m.lastPrintZoom:"100%";O.appendChild(sa);mxUtils.br(O);var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.marginTop="12px";Ea.checked=null!=m.lastPrintGrid?m.lastPrintGrid:!1;O.appendChild(Ea);z=document.createElement("span");z.style.marginLeft="4px";z.style.marginRight="8px";mxUtils.write(z,mxResources.get("grid"));O.appendChild(z);mxEvent.addListener(z,"click",function(Aa){Ea.checked=!0;+mxEvent.consume(Aa)});var wa=document.createElement("input");wa.setAttribute("type","checkbox");wa.style.marginTop="10px";wa.checked=null!=m.lastPrintTransparent?m.lastPrintTransparent:!1;null!=I&&(O.appendChild(wa),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("transparentBackground")),O.appendChild(z),mxEvent.addListener(z,"click",function(Aa){wa.checked=!0;mxEvent.consume(Aa)}));var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");+Ca.style.marginTop="10px";Ca.checked=null!=m.lastPrintInclude?m.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=m.getServiceName()||(mxUtils.br(O),O.appendChild(Ca),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram")),O.appendChild(z),mxEvent.addListener(z,"click",function(Aa){Ca.checked=!0;mxEvent.consume(Aa)}));S.appendChild(O);z=document.createElement("div");z.style.marginTop="40px";z.style.textAlign=+"right";z.style.whiteSpace="nowrap";m.isOffline()||null!=I||z.appendChild(m.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));O=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});O.className="geBtn";m.editor.cancelFirst&&z.appendChild(O);PrintDialog.previewEnabled&&null==I&&(U=mxUtils.button(mxResources.get("preview"),function(){try{m.hideDialog(),N(!1)}catch(Aa){m.handleError(Aa)}}),U.className="geBtn",z.appendChild(U));U=mxUtils.button(mxResources.get(null!=I?"export":+PrintDialog.previewEnabled?"print":"ok"),function(){try{m.hideDialog(),N(!0)}catch(Aa){m.handleError(Aa)}});U.className="geBtn gePrimaryBtn";z.appendChild(U);m.editor.cancelFirst||z.appendChild(O);S.appendChild(z);if(m.editor.isChromelessView()){var Da=function(){Editor.isDarkMode()?(S.classList.add("geDarkMode"),S.style.colorScheme="dark"):(S.classList.remove("geDarkMode"),S.style.colorScheme="light")};m.addListener("darkModeChanged",Da);Da();var Ka=function(Aa,Fa){Aa=Fa.getProperty("dialog");S.parentNode==+Aa.container&&(m.editor.removeListener(Ka),m.removeListener(Da))};m.editor.addListener("hideDialog",Ka)}this.container=S};var C=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var m=this.image;null!=m&&null!=m.src&&Graph.isPageLink(m.src)&&(m={originalSrc:m.src});this.page.viewState.backgroundImage=+m}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else C.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&+this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(m=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=m?m:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var M=document.createElement("canvas"),T=new Image;T.onload=function(){try{M.getContext("2d").drawImage(T,+0,0);var m=M.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=m&&6<m.length}catch(z){}};T.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(m){}Editor.prototype.useCanvasForExport=!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;c.previousAdaptiveColors=c.adaptiveColors;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.7";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.9";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};-EditorUi.logError=function(d,g,m,t,v,y,C){if(null!=d){v=null!=v?v:Error(d);v.stack=null!=v.stack?v.stack:"";y=null!=y?y:0>d.indexOf("NetworkError")&&0>d.indexOf("SecurityError")&&0>d.indexOf("NS_ERROR_FAILURE")&&0>d.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&d!=EditorUi.lastErrorMessage&&0>d.indexOf("extension:")&&0>d.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>v.stack.indexOf("extension:")&&0>v.stack.indexOf("<anonymous>:")&&-0>v.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=d,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+y+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(m)+(null!=t?":colno:"+encodeURIComponent(t):"")+(""!=v.stack?"&stack="+encodeURIComponent(v.stack):""))}catch(I){}try{C||null==window.console||console.error(y,d,g,m,t,v)}catch(I){}}};EditorUi.logEvent=-function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(m){}};EditorUi.sendReport=function(d,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,d.length>g&&(d=d.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email",-"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(m){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],g=0;g<arguments.length;g++)d.push(arguments[g]);console.log.apply(console,d)}}catch(m){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.embedSvgImages=function(d){d=d.getElementsByTagName("image");-for(var g=[],m=0;m<d.length;m++)g.push(d[m]);for(m=0;m<g.length;m++)EditorUi.replaceSvgImage(g[m])};EditorUi.replaceSvgImage=function(d){try{var g=null;g=null==d.getAttributeNS?d.getAttribute("xlink:href"):d.getAttributeNS(mxConstants.NS_XLINK,"href");var m=EditorUi.getSvgSubtree(g);if(null!=m&&"svg"==m.nodeName){m.setAttribute("x",d.getAttribute("x"));m.setAttribute("y",d.getAttribute("y"));m.setAttribute("width",d.getAttribute("width"));m.setAttribute("height",d.getAttribute("height"));m.style.fontFamily=-"initial";var t=mxUtils.createElementNs(m.ownerDocument,mxConstants.NS_SVG,"g");t.appendChild(m);d.hasAttribute("transform")&&t.setAttribute("transform",d.getAttribute("transform"));d.parentNode.replaceChild(t,d)}}catch(v){}};EditorUi.getSvgSubtree=function(d){var g=Graph.getSvgFromDataUri(d);d=null;if(null!=g){d=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=d.getElementsByTagName("style");if(0<g.length){var m="svg-image-"+Editor.guid();d.setAttribute("id",m);for(var t=document.implementation.createHTMLDocument(""),-v=document.createElement("style"),y=0;y<g.length;y++){v.textContent=g[y].textContent;t.body.appendChild(v);for(var C="",I=0;I<v.sheet.cssRules.length;I++){var K=v.sheet.cssRules[I];if(null!=K.selectorText){for(var J=K.selectorText.split(","),U=0;U<J.length;U++)J[U]="#"+m+" "+J[U];K.selectorText=J.join(",")}C+=K.cssText+"\n"}g[y].textContent=C}}g=d.getElementsByTagName("*");for(m=0;m<g.length;m++)g[m].removeAttribute("data-cell-id")}return d};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';+EditorUi.logError=function(d,g,k,v,t,x,A){if(null!=d){t=null!=t?t:Error(d);t.stack=null!=t.stack?t.stack:"";x=null!=x?x:0>d.indexOf("NetworkError")&&0>d.indexOf("SecurityError")&&0>d.indexOf("NS_ERROR_FAILURE")&&0>d.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&d!=EditorUi.lastErrorMessage&&0>d.indexOf("extension:")&&0>d.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>t.stack.indexOf("extension:")&&0>t.stack.indexOf("<anonymous>:")&&+0>t.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=d,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+x+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=v?":colno:"+encodeURIComponent(v):"")+(""!=t.stack?"&stack="+encodeURIComponent(t.stack):""))}catch(J){}try{A||null==window.console||console.error(x,d,g,k,v,t)}catch(J){}}};EditorUi.logEvent=+function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(k){}};EditorUi.sendReport=function(d,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,d.length>g&&(d=d.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email",+"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],g=0;g<arguments.length;g++)d.push(arguments[g]);console.log.apply(console,d)}}catch(k){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.embedSvgImages=function(d){d=d.getElementsByTagName("image");+for(var g=[],k=0;k<d.length;k++)g.push(d[k]);for(k=0;k<g.length;k++)EditorUi.replaceSvgImage(g[k])};EditorUi.replaceSvgImage=function(d){try{var g=null;g=null==d.getAttributeNS?d.getAttribute("xlink:href"):d.getAttributeNS(mxConstants.NS_XLINK,"href");var k=EditorUi.getSvgSubtree(g);if(null!=k&&"svg"==k.nodeName){k.setAttribute("x",d.getAttribute("x"));k.setAttribute("y",d.getAttribute("y"));k.setAttribute("width",d.getAttribute("width"));k.setAttribute("height",d.getAttribute("height"));k.style.fontFamily=+"initial";var v=mxUtils.createElementNs(k.ownerDocument,mxConstants.NS_SVG,"g");v.appendChild(k);d.hasAttribute("transform")&&v.setAttribute("transform",d.getAttribute("transform"));d.parentNode.replaceChild(v,d)}}catch(t){}};EditorUi.getSvgSubtree=function(d){var g=Graph.getSvgFromDataUri(d);d=null;if(null!=g){d=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=d.getElementsByTagName("style");if(0<g.length){var k="svg-image-"+Editor.guid();d.setAttribute("id",k);for(var v=document.implementation.createHTMLDocument(""),+t=document.createElement("style"),x=0;x<g.length;x++){t.textContent=g[x].textContent;v.body.appendChild(t);for(var A="",J=0;J<t.sheet.cssRules.length;J++){var D=t.sheet.cssRules[J];if(null!=D.selectorText){for(var E=D.selectorText.split(","),R=0;R<E.length;R++)E[R]="#"+k+" "+E[R];D.selectorText=E.join(",")}A+=D.cssText+"\n"}g[x].textContent=A}}g=d.getElementsByTagName("*");for(k=0;k<g.length;k++)g[k].removeAttribute("data-cell-id")}return d};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=-!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(v){}try{var g=document.createElement("canvas"),-m=new Image;m.onload=function(){try{g.getContext("2d").drawImage(m,0,0);var v=g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=v&&6<v.length}catch(y){}};m.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}try{g=-document.createElement("canvas");g.width=g.height=1;var t=g.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==t.match("image/jpeg");t=g.toDataURL("image/webp");EditorUi.prototype.webpSupported=null!==t.match("image/webp")}catch(v){}})();EditorUi.prototype.createButtonContainer=function(){var d=document.createElement("div");d.className="geButtonContainer";d.style.overflow="1"==urlParams.embed?"hidden":"";return d};EditorUi.prototype.openLink=function(d,g,m){return this.editor.graph.openLink(d,-g,m)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,g){g(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,g,m){localStorage.setItem(d,g);null!=m&&m()};EditorUi.prototype.isLocked=function(){var d=this.getCurrentFile();return null!=d&&d.isLocked()};EditorUi.prototype.removeLocalData=function(d,g){localStorage.removeItem(d);g()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(t){}try{var g=document.createElement("canvas"),+k=new Image;k.onload=function(){try{g.getContext("2d").drawImage(k,0,0);var t=g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=t&&6<t.length}catch(x){}};k.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}try{g=+document.createElement("canvas");g.width=g.height=1;var v=g.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==v.match("image/jpeg");v=g.toDataURL("image/webp");EditorUi.prototype.webpSupported=null!==v.match("image/webp")}catch(t){}})();EditorUi.prototype.createButtonContainer=function(){var d=document.createElement("div");d.className="geButtonContainer";d.style.overflow="1"==urlParams.embed?"hidden":"";return d};EditorUi.prototype.openLink=function(d,g,k){return this.editor.graph.openLink(d,+g,k)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,g){g(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,g,k){localStorage.setItem(d,g);null!=k&&k()};EditorUi.prototype.isLocked=function(){var d=this.getCurrentFile();return null!=d&&d.isLocked()};EditorUi.prototype.removeLocalData=function(d,g){localStorage.removeItem(d);g()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){var g=this.editor.graph;g.mathEnabled=d;null!=g.view.backgroundImage&&(g.view.backgroundImage.destroy(),g.view.backgroundImage=null);this.editor.updateGraphComponents();g.refresh();g.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(d){this.editor.graph.setAdaptiveColors(d);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=-function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,g,m){var t=null==d||null==g;m=null!=m?m:24;var v=new Spinner({lines:12,length:m,width:Math.round(m/3),radius:Math.round(m/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),y=this.timeout,C=v.spin,I=null,K=null,J=mxUtils.bind(this,function(P){null!=P&&P()});v.spin=function(P,R,n,z){z=null!=z?z:y;var A=!1;if(!this.active){var B=Date.now();null!=n&&(I=window.setTimeout(function(){v.stop();I=null;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},z));C.call(this,P);this.active=!0;null!=R&&(t&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/-2-2),A=document.createElement("div"),A.className="geSpinnerStatus",A.style.position="absolute",A.style.whiteSpace="nowrap",A.style.background="#4B4243",A.style.color="white",A.style.fontFamily=Editor.defaultHtmlFont,A.style.fontSize="9pt",A.style.padding="6px",A.style.paddingLeft="10px",A.style.paddingRight="10px",A.style.zIndex=2E9,A.style.left=Math.max(0,d)+"px",A.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(A.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(A.style,"transform",-"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(A.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=R.substring(R.length-3,R.length)&&"!"!=R.charAt(R.length-1)&&(R+="..."),A.innerHTML=mxUtils.htmlEntities(R),P.appendChild(A),v.status=A);this.pause=mxUtils.bind(this,function(){var M=J;this.active&&(z=Math.max(0,z-(Date.now()-B)),M=mxUtils.bind(this,function(S){this.spin(P,R,n,z);if(null!=S)try{S(),K=mxUtils.bind(this,function(){this.spin(P,R,n,z);try{S()}catch(l){null!=n&&n(l)}})}catch(l){null!=-n&&n(l)}}));this.stop();return M});A=!0}return A};var U=v.stop;v.stop=function(){U.call(this);this.active&&(this.active=!1,null!=I&&(window.clearTimeout(I),I=null),null!=v.status&&null!=v.status.parentNode&&v.status.parentNode.removeChild(v.status),v.status=null)};v.pause=function(){return J};return v};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),m=this.editor.extractGraphModel(g.documentElement,!0);return null!=m&&0==m.getElementsByTagName("parsererror").length}catch(t){}return!1};+function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,g,k){var v=null==d||null==g;k=null!=k?k:24;var t=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),x=this.timeout,A=t.spin,J=null,D=null,E=mxUtils.bind(this,function(V){null!=V&&V()});t.spin=function(V,Q,P,q){q=null!=q?q:x;var y=!1;if(!this.active){var B=Date.now();null!=P&&(J=window.setTimeout(function(){t.stop();J=null;P({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})},q));A.call(this,V);this.active=!0;null!=Q&&(v&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/+2-2),y=document.createElement("div"),y.className="geSpinnerStatus",y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft="10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,d)+"px",y.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform",+"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=Q.substring(Q.length-3,Q.length)&&"!"!=Q.charAt(Q.length-1)&&(Q+="..."),y.innerHTML=mxUtils.htmlEntities(Q),V.appendChild(y),t.status=y);this.pause=mxUtils.bind(this,function(){var C=E;this.active&&(q=Math.max(0,q-(Date.now()-B)),C=mxUtils.bind(this,function(M){this.spin(V,Q,P,q);if(null!=M)try{M(),D=mxUtils.bind(this,function(){this.spin(V,Q,P,q);try{M()}catch(T){null!=P&&P(T)}})}catch(T){null!=+P&&P(T)}}));this.stop();return C});y=!0}return y};var R=t.stop;t.stop=function(){R.call(this);this.active&&(this.active=!1,null!=J&&(window.clearTimeout(J),J=null),null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status),t.status=null)};t.pause=function(){return E};return t};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(v){}return!1};EditorUi.isVisioFilename=function(d){return/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d)};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};-EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var m=-g.getFunction,t=this.editor.graph,v=this;g.getFunction=function(y){if(t.isSelectionEmpty()&&null!=v.pages&&0<v.pages.length){var C=v.getSelectedPageIndex();if(mxEvent.isShiftDown(y)){if(37==y.keyCode)return function(){0<C&&v.movePage(C,C-1)};if(38==y.keyCode)return function(){0<C&&v.movePage(C,0)};if(39==y.keyCode)return function(){C<v.pages.length-1&&v.movePage(C,C+1)};if(40==y.keyCode)return function(){C<v.pages.length-1&&v.movePage(C,v.pages.length-1)}}else if(mxEvent.isControlDown(y)||mxClient.IS_MAC&&-mxEvent.isMetaDown(y)){if(37==y.keyCode)return function(){0<C&&v.selectNextPage(!1)};if(38==y.keyCode)return function(){0<C&&v.selectPage(v.pages[0])};if(39==y.keyCode)return function(){C<v.pages.length-1&&v.selectNextPage(!0)};if(40==y.keyCode)return function(){C<v.pages.length-1&&v.selectPage(v.pages[v.pages.length-1])}}}return!(65<=y.keyCode&&90>=y.keyCode)||t.isSelectionEmpty()||mxEvent.isAltDown(y)||mxEvent.isShiftDown(y)||mxEvent.isControlDown(y)||mxClient.IS_MAC&&mxEvent.isMetaDown(y)?m.apply(this,-arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var g=e.apply(this,arguments);if(null==g)try{var m=d.indexOf("<mxfile ");if(0<=m){var t=d.lastIndexOf("</mxfile>");t>m&&(g=d.substring(m,t+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var v=mxUtils.parseXml(d),y=this.editor.extractGraphModel(v.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);-g=null!=y?mxUtils.getXml(y):""}}catch(C){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d,g){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[d],"patches",g);d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var m=null!=d?this.editor.extractGraphModel(d,-!0):null;null!=m&&(d=m);if(null!=d){m=this.editor.graph;m.model.beginUpdate();try{var t=null!=this.pages?this.pages.slice():null,v=d.getElementsByTagName("diagram");if(1<v.length||1==v.length&&v[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var y=v.length-1;0<=y;y--){var C=this.updatePageRoot(new DiagramPage(v[y]));null==C.getName()&&C.setName(mxResources.get("pageWithNumber",[y+1]));m.model.execute(new ChangePage(this,C,0==y?C:null,0))}}else null==this.fileNode&&-(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),m.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,m.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(y=0;y<t.length;y++)m.model.execute(new ChangePage(this,-t[y],null));var I=this.getCurrentFile();null!=I&&I.fileReplaced(g)}finally{m.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,m,t,v,y,C,I,K,J,U,P,R){g=null!=g?g:this.editor.graph;v=null!=v?v:!1;K=null!=K?K:!0;U=null!=U?U:!Editor.defaultCompressed;var n=null;if(null==m||m.getMode()==App.MODE_DEVICE||m.getMode()==App.MODE_BROWSER)var z="_blank";else n=z=t;if(null==d)return"";var A=d;if("mxfile"!=A.nodeName.toLowerCase()){if(U){var B=d.ownerDocument.createElement("diagram");B.setAttribute("name",-mxResources.get("pageWithNumber",[1]));B.setAttribute("id",Editor.guid());B.appendChild(d)}else{B=Graph.zapGremlins(mxUtils.getXml(d));A=Graph.compress(B);if(Graph.decompress(A)!=B)return B;B=d.ownerDocument.createElement("diagram");B.setAttribute("name",mxResources.get("pageWithNumber",[1]));B.setAttribute("id",Editor.guid());mxUtils.setTextContent(B,A)}A=d.ownerDocument.createElement("mxfile");A.appendChild(B)}J?(A=A.cloneNode(!0),A.removeAttribute("modified"),A.removeAttribute("host"),A.removeAttribute("agent"),-A.removeAttribute("etag"),A.removeAttribute("userAgent"),A.removeAttribute("version"),A.removeAttribute("editor"),A.removeAttribute("type")):(A.removeAttribute("userAgent"),A.removeAttribute("modified"),A.removeAttribute("version"),A.removeAttribute("editor"),A.removeAttribute("pages"),A.removeAttribute("type"),A.removeAttribute("etag"),mxClient.IS_CHROMEAPP?A.setAttribute("host","Chrome"):EditorUi.isElectronApp?A.setAttribute("host","Electron"):A.setAttribute("host",window.location.hostname),A.setAttribute("agent",-null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),A.setAttribute("version",EditorUi.VERSION),1<A.getElementsByTagName("diagram").length&&null!=this.pages&&A.setAttribute("pages",this.pages.length));null!=P&&(A=A.cloneNode(!0),A.setAttribute("scale",P));null!=R&&(A=A.cloneNode(!0),A.setAttribute("border",R));d=U?mxUtils.getPrettyXml(A):mxUtils.getXml(A);if(!y&&!v&&(C||null!=m&&/(\.html)$/i.test(m.getTitle())))d=this.getHtml2(mxUtils.getXml(A),g,null!=m?m.getTitle():null,z,n);else if(y||-!v&&null!=m&&/(\.svg)$/i.test(m.getTitle()))null==m||m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER||(t=null),m=this.getSvgFileProperties(A),d=this.getEmbeddedSvg(d,g,t,null,I,K,n,null,null,m.scale,m.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,g,m,t){d=null!=d?d:!0;g=null!=g?g:!1;m=null!=m?m:!Editor.defaultCompressed;var v=this.editor.getGraphXml(d,t);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(K){var J=K.getElementsByTagName("mxGraphModel"),-U=0<J.length?J[0]:null;J=K;null==U&&m?(U=mxUtils.getNodeValue(K),0<U.length&&(U=Graph.decompress(U),null!=U&&0<U.length&&(J=K.cloneNode(!1),J.appendChild(mxUtils.parseXml(U).documentElement)))):null==U||m?J=K.cloneNode(!0):(J=K.cloneNode(!1),mxUtils.setTextContent(J,Graph.compressNode(U)));v.appendChild(J)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(v),v=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var y=this.pages[g],-C=y.node;if(y!=this.currentPage)if(y.needsUpdate){var I=new mxCodec(mxUtils.createXmlDocument());I=I.encode(new mxGraphModel(y.root));this.editor.graph.saveViewState(y.viewState,I,null,t);EditorUi.removeChildNodes(C);C.appendChild(I);delete y.needsUpdate}else t&&(this.updatePageRoot(y),null!=y.viewState.backgroundImage&&(null!=y.viewState.backgroundImage.originalSrc?y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.originalSrc,y):Graph.isPageLink(y.viewState.backgroundImage.src)&&-(y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.src,y))),null!=y.viewState.backgroundImage&&null!=y.viewState.backgroundImage.originalSrc&&(I=new mxCodec(mxUtils.createXmlDocument()),I=I.encode(new mxGraphModel(y.root)),this.editor.graph.saveViewState(y.viewState,I,null,t),C=C.cloneNode(!1),C.appendChild(I)));d(C)}return v};EditorUi.prototype.anonymizeString=function(d,g){for(var m=[],t=0;t<d.length;t++){var v=d.charAt(t);0<=EditorUi.ignoredAnonymizedChars.indexOf(v)?-m.push(v):isNaN(parseInt(v))?v.toLowerCase()!=v?m.push(String.fromCharCode(65+Math.round(25*Math.random()))):v.toUpperCase()!=v?m.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(v)?m.push(" "):m.push("?"):m.push(g?"0":Math.round(9*Math.random()))}return m.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++)try{var m=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);-null!=m.getAttribute("name")&&m.setAttribute("name",this.anonymizeString(m.getAttribute("name")));d[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(m)}catch(y){d[EditorUi.DIFF_INSERT][g].data=y.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var t in d[EditorUi.DIFF_UPDATE]){var v=d[EditorUi.DIFF_UPDATE][t];null!=v.name&&(v.name=this.anonymizeString(v.name));null!=v.cells&&(g=mxUtils.bind(this,function(y){var C=v.cells[y];if(null!=C){for(var I in C)null!=C[I].value&&(C[I].value="["+C[I].value.length+"]"),-null!=C[I].xmlValue&&(C[I].xmlValue="["+C[I].xmlValue.length+"]"),null!=C[I].style&&(C[I].style="["+C[I].style.length+"]"),mxUtils.isEmptyObject(C[I])&&delete C[I];mxUtils.isEmptyObject(C)&&delete v.cells[y]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(v.cells)&&delete v.cells);mxUtils.isEmptyObject(v)&&delete d[EditorUi.DIFF_UPDATE][t]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,-g){if(null!=d.attributes)for(var m=0;m<d.attributes.length;m++)"as"!=d.attributes[m].name&&d.setAttribute(d.attributes[m].name,this.anonymizeString(d.attributes[m].value,g));if(null!=d.childNodes)for(m=0;m<d.childNodes.length;m++)this.anonymizeAttributes(d.childNodes[m],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");for(var m=0;m<g.length;m++)null!=g[m].getAttribute("value")&&g[m].setAttribute("value","["+g[m].getAttribute("value").length+"]"),null!=g[m].getAttribute("xmlValue")&&-g[m].setAttribute("xmlValue","["+g[m].getAttribute("xmlValue").length+"]"),null!=g[m].getAttribute("style")&&g[m].setAttribute("style","["+g[m].getAttribute("style").length+"]"),null!=g[m].parentNode&&"root"!=g[m].parentNode.nodeName&&null!=g[m].parentNode.parentNode&&(g[m].setAttribute("id",g[m].parentNode.getAttribute("id")),g[m].parentNode.parentNode.replaceChild(g[m],g[m].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var g=this.getCurrentFile();null!=g&&(g.savingFile?-this.handleError({message:mxResources.get("busy")}):!d&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.editor.setStatus(""),d?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(m){this.spinner.stop();g.handleFileError(m,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),-mxUtils.bind(this,function(m){g.handleFileError(m,!0)}))))};EditorUi.prototype.getFileData=function(d,g,m,t,v,y,C,I,K,J,U,P,R){v=null!=v?v:!0;y=null!=y?y:!1;J=null!=J?J:!Editor.defaultCompressed;var n=this.editor.graph;if((g||!d&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var z=n.getGlobalVariable;n=this.createTemporaryGraph(n.getStylesheet());n.setBackgroundImage=this.editor.graph.setBackgroundImage;n.background=this.editor.graph.background;var A=-null!=this.pages?this.pages[0]:null;null==A||this.currentPage==A?n.setBackgroundImage(this.editor.graph.backgroundImage):null!=A.viewState&&null!=A.viewState&&n.setBackgroundImage(A.viewState.backgroundImage);n.getGlobalVariable=function(B){return"page"==B&&null!=A?A.getName():"pagenumber"==B?1:z.apply(this,arguments)};document.body.appendChild(n.container);null!=A&&n.model.setRoot(A.root)}C=null!=C?C:this.getXmlFileData(v,y,J,U);K=null!=K?K:this.getCurrentFile();d=this.createFileData(C,n,K,window.location.href,-d,g,m,t,v,I,J,P,R);n!=this.editor.graph&&n.container.parentNode.removeChild(n.container);return d};EditorUi.prototype.getHtml=function(d,g,m,t,v,y){y=null!=y?y:!0;var C=null,I=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){C=y?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var K=g.view.scale;y=Math.floor(C.x/K-g.view.translate.x);K=Math.floor(C.y/K-g.view.translate.y);C=g.background;null==v&&(g=this.getBasenames().join(";"),0<g.length&&(I=EditorUi.drawHost+"/embed.js?s="+g));-d.setAttribute("x0",y);d.setAttribute("y0",K)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=t&&d.setAttribute("edit",t));null!=v&&(v=v.replace(/&/g,"&"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";t=Graph.compress(d);Graph.decompress(t)!=d&&(t=encodeURIComponent(d));return(null==v?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':-"")+"<!DOCTYPE html>\n<html"+(null!=v?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==v?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=v?'<meta http-equiv="refresh" content="0;URL=\''+v+"'\"/>\n":"")+"</head>\n<body"+(null==v&&null!=C&&C!=mxConstants.NONE?' style="background-color:'+C+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+t+"</div>\n</div>\n"+-(null==v?'<script type="text/javascript" src="'+I+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+v+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,m,t,v){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=v&&(v=v.replace(/&/g,"&"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,-xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==v?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=v?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==v?null!=m?"<title>"+mxUtils.htmlEntities(m)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=v?'<meta http-equiv="refresh" content="0;URL=\''+-v+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==v?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+v+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=-function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var g=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,m=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(m)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[g],"cause",[m]),Error(mxResources.get("notADiagramFile")+" ("+m+")");d=null!=g?this.editor.extractGraphModel(g,!0):null;null!=d&&(g=d);if(null!=g&&"mxfile"==g.nodeName&&(d=g.getElementsByTagName("diagram"),-m={},0<d.length)){var t=this.getHashObject(),v=null;this.fileNode=g;this.pages=[];for(var y=0;y<d.length;y++){null==d[y].getAttribute("id")&&d[y].setAttribute("id",y);g=new DiagramPage(d[y]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[y+1]));this.pages.push(g);if(null==t.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=t.pageId&&g.getId()==t.pageId)v=g;if(null==m[g.getId()])m[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=-null!=v?v:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),-this.scrollToPage());if(null!=urlParams["layer-ids"])try{var C=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(y=0;y<C.length;y++)g[C[y]]=!0;var I=this.editor.graph.getModel(),K=I.getChildren(I.root);for(y=0;y<K.length;y++){var J=K[y];I.setVisible(J,g[J.id]||!1)}}catch(U){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=-g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,m,t,v,y,C,I,K,J,U,P,R,n,z,A){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var B=this.getBaseFilename(!v),M=B+("xml"==d||"pdf"==d&&U?".drawio":"")+"."+d;-if("xml"==d){var S=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,v,null,null,null,g);this.saveData(M,d,S,"text/xml")}else if("html"==d)S=this.getHtml2(this.getFileData(!0),this.editor.graph,B),this.saveData(M,d,S,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==d?M=B+".png":"jpeg"==d&&(M=B+".jpg"),this.saveRequest(M,d,mxUtils.bind(this,function(O,Q){try{return this.createDownloadRequest(O,d,t,Q,C,v,I,K,J,U,P,void 0,-void 0,!y,R,n,z,A)}catch(V){this.handleError(V)}}));else{var l=null,x=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(M,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(l)}))});if("svg"==d){var F=this.editor.graph.background;if(C||F==mxConstants.NONE)F=null;var N=this.editor.graph.getSvg(F,null,null,null,null,t);m&&this.editor.graph.addSvgShadow(N);this.editor.convertImages(N,-mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();x(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else M=B+".svg",l=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();x(O)}),t)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(d,g,m,t,v,y,C,I,K,J,U,P,R,n,z,A,B,M){d=this.downloadRequestBuilder(d,g,m,t,v,y,C,I,K,J,U,P,R,n,z,A,B,M);g="";for(var S in d)m=d[S],null!=m&&(g+=S+"="+encodeURIComponent(m)+-"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,m,t,v,y,C,I,K,J,U,P,R,n,z,A,B,M){var S=this.editor.graph,l=S.getGraphBounds();m=this.getFileData(!0,null,null,null,m,0==y?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var x=null,F=null,N=null;if(!EditorUi.isElectronApp&&(l.width*l.height>MAX_AREA||m.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};J=J?"1":"0";"pdf"==g&&(null!=U?(x=U.from,F=U.to):0==y&&(N=-"1"));"xmlpng"==g&&(J="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(y=0;y<this.pages.length;y++)if(this.pages[y]==this.currentPage){x=y;break}y=S.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!v?v||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;v={globalVars:S.getExportVariables()};K&&(v.grid={size:S.gridSize,steps:S.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:S.view.gridColor});Graph.translateDiagram&&-(v.diagramLanguage=Graph.diagramLanguage);return{format:g,from:x,to:F,allPages:N,bg:null!=y?y:mxConstants.NONE,base64:t,embedXml:J,xml:m,filename:null!=d?d:"",extras:JSON.stringify(v),scale:C,border:I,pageMargin:z,w:P&&isFinite(P)?P:null,h:R&&isFinite(R)?R:null,crop:null!=n&&n?"1":"0",fit:null!=A&&A?"1":"0",sheetsAcross:B,sheetsDown:M}};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));-if(null!=d&&1<d.length){var g=d.indexOf("#");0<=g&&(d=d.substring(0,g))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,g={};if(null!=d&&0<d.length){var m=d.lastIndexOf("#");if(0<m){d=decodeURIComponent(d.substring(m+1));try{g=JSON.parse(d)}catch(t){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var d=this.getHashObject();d.pageId=this.currentPage.getId();this.setHashObject(d)}else this.setHashObject(null)};-EditorUi.prototype.setHashObject=function(d){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var m=g.lastIndexOf("#");0<m&&(g=g.substring(0,m));try{null==d||mxUtils.isEmptyObject(d)||(g=g+"#"+encodeURIComponent(JSON.stringify(d)))}catch(t){}0<m&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(d,g,m){var t=window.location.hash,v=mxUtils.bind(this,function(C){var I=null!=d.data?d.data:"";null!=C&&0<C.length&&-(0<I.length&&(I+="\n"),I+=C);C=new LocalFile(this,"csv"!=d.format&&0<I.length?I:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);C.getHash=function(){return t};this.fileLoaded(C);"csv"==d.format&&this.importCsv(I,mxUtils.bind(this,function(R){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var K=null!=d.interval?parseInt(d.interval):6E4,J=null,U=mxUtils.bind(this,function(){var R=this.currentPage;-mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(n){R===this.currentPage&&(200<=n.getStatus()&&300>=n.getStatus()?(this.updateDiagram(n.getText()),P()):this.handleError({message:mxResources.get("error")+" "+n.getStatus()}))}),mxUtils.bind(this,function(n){this.handleError(n)}))}),P=mxUtils.bind(this,function(){window.clearTimeout(J);J=window.setTimeout(U,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){P();-U()}));P();U()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var y=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(y,mxUtils.bind(this,function(C){v(C)}),mxUtils.bind(this,function(C){null!=m&&m(C)}))}else v("")};EditorUi.prototype.updateDiagram=function(d){function g(l){var x=new mxCellOverlay(l.image||v.warningImage,l.tooltip,l.align,l.valign,l.offset);x.addListener(mxEvent.CLICK,function(F,N){t.alert(l.tooltip)});return x}var m=null,t=this;if(null!=d&&0<d.length&&(m=mxUtils.parseXml(d),d=-null!=m?m.documentElement:null,null!=d&&"updates"==d.nodeName)){var v=this.editor.graph,y=v.getModel();y.beginUpdate();var C=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var I=y.getCell(d.getAttribute("id"));if(null!=I){try{var K=d.getAttribute("value");if(null!=K){var J=mxUtils.parseXml(K).documentElement;if(null!=J)if("1"==J.getAttribute("replace-value"))y.setValue(I,J);else for(var U=J.attributes,P=0;P<U.length;P++)v.setAttributeForCell(I,U[P].nodeName,0<U[P].nodeValue.length?-U[P].nodeValue:null)}}catch(l){null!=window.console&&console.log("Error in value for "+I.id+": "+l)}try{var R=d.getAttribute("style");null!=R&&v.model.setStyle(I,R)}catch(l){null!=window.console&&console.log("Error in style for "+I.id+": "+l)}try{var n=d.getAttribute("icon");if(null!=n){var z=0<n.length?JSON.parse(n):null;null!=z&&z.append||v.removeCellOverlays(I);null!=z&&v.addCellOverlay(I,g(z))}}catch(l){null!=window.console&&console.log("Error in icon for "+I.id+": "+l)}try{var A=d.getAttribute("geometry");-if(null!=A){A=JSON.parse(A);var B=v.getCellGeometry(I);if(null!=B){B=B.clone();for(key in A){var M=parseFloat(A[key]);"dx"==key?B.x+=M:"dy"==key?B.y+=M:"dw"==key?B.width+=M:"dh"==key?B.height+=M:B[key]=parseFloat(A[key])}v.model.setGeometry(I,B)}}}catch(l){null!=window.console&&console.log("Error in icon for "+I.id+": "+l)}}}else if("model"==d.nodeName){for(var S=d.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(new mxCodec(d.firstChild)).decode(S,y)}else if("view"==-d.nodeName){if(d.hasAttribute("scale")&&(v.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))v.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(C=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{y.endUpdate()}null!=C&&this.chromelessResize&&this.chromelessResize(!0,C)}return m};EditorUi.prototype.getCopyFilename=function(d,g){var m=null!=-d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var t=m.lastIndexOf(".");0<=t&&(d=m.substring(t),m=m.substring(0,t));if(g){g=m;var v=new Date;m=v.getFullYear();t=v.getMonth()+1;var y=v.getDate(),C=v.getHours(),I=v.getMinutes();v=v.getSeconds();m=g+(" "+(m+"-"+t+"-"+y+"-"+C+"-"+I+"-"+v))}return m=mxResources.get("copyOf",[m])+d};EditorUi.prototype.logIfModified=function(d,g){try{null!=d&&g&&EditorUi.debug("File.closed",[d])}catch(m){}};EditorUi.prototype.fileLoaded=function(d,g,m){var t=-this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var v=!1;this.hideDialog();null!=t&&(t.removeListener(this.descriptorChangedListener),this.logIfModified(t,!0),t.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var y=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=t&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=+EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=+g.getFunction,v=this.editor.graph,t=this;g.getFunction=function(x){if(v.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var A=t.getSelectedPageIndex();if(mxEvent.isShiftDown(x)){if(37==x.keyCode)return function(){0<A&&t.movePage(A,A-1)};if(38==x.keyCode)return function(){0<A&&t.movePage(A,0)};if(39==x.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,A+1)};if(40==x.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,t.pages.length-1)}}else if(mxEvent.isControlDown(x)||mxClient.IS_MAC&&+mxEvent.isMetaDown(x)){if(37==x.keyCode)return function(){0<A&&t.selectNextPage(!1)};if(38==x.keyCode)return function(){0<A&&t.selectPage(t.pages[0])};if(39==x.keyCode)return function(){A<t.pages.length-1&&t.selectNextPage(!0)};if(40==x.keyCode)return function(){A<t.pages.length-1&&t.selectPage(t.pages[t.pages.length-1])}}}return!(65<=x.keyCode&&90>=x.keyCode)||v.isSelectionEmpty()||mxEvent.isAltDown(x)||mxEvent.isShiftDown(x)||mxEvent.isControlDown(x)||mxClient.IS_MAC&&mxEvent.isMetaDown(x)?k.apply(this,+arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var g=e.apply(this,arguments);if(null==g)try{var k=d.indexOf("<mxfile ");if(0<=k){var v=d.lastIndexOf("</mxfile>");v>k&&(g=d.substring(k,v+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var t=mxUtils.parseXml(d),x=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);+g=null!=x?mxUtils.getXml(x):""}}catch(A){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d,g){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[d],"patches",g);d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var k=null!=d?this.editor.extractGraphModel(d,+!0):null;null!=k&&(d=k);if(null!=d){k=this.editor.graph;k.model.beginUpdate();try{var v=null!=this.pages?this.pages.slice():null,t=d.getElementsByTagName("diagram");if(1<t.length||1==t.length&&t[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var x=t.length-1;0<=x;x--){var A=this.updatePageRoot(new DiagramPage(t[x]));null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[x+1]));k.model.execute(new ChangePage(this,A,0==x?A:null,0))}}else null==this.fileNode&&+(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=v)for(x=0;x<v.length;x++)k.model.execute(new ChangePage(this,+v[x],null));var J=this.getCurrentFile();null!=J&&J.fileReplaced(g)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,k,v,t,x,A,J,D,E,R,V,Q){g=null!=g?g:this.editor.graph;t=null!=t?t:!1;D=null!=D?D:!0;R=null!=R?R:!Editor.defaultCompressed;var P=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var q="_blank";else P=q=v;if(null==d)return"";var y=d;if("mxfile"!=y.nodeName.toLowerCase()){if(R){var B=d.ownerDocument.createElement("diagram");B.setAttribute("name",+mxResources.get("pageWithNumber",[1]));B.setAttribute("id",Editor.guid());B.appendChild(d)}else{B=Graph.zapGremlins(mxUtils.getXml(d));y=Graph.compress(B);if(Graph.decompress(y)!=B)return B;B=d.ownerDocument.createElement("diagram");B.setAttribute("name",mxResources.get("pageWithNumber",[1]));B.setAttribute("id",Editor.guid());mxUtils.setTextContent(B,y)}y=d.ownerDocument.createElement("mxfile");y.appendChild(B)}E?(y=y.cloneNode(!0),y.removeAttribute("modified"),y.removeAttribute("host"),y.removeAttribute("agent"),+y.removeAttribute("etag"),y.removeAttribute("userAgent"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("type")):(y.removeAttribute("userAgent"),y.removeAttribute("modified"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("pages"),y.removeAttribute("type"),y.removeAttribute("etag"),mxClient.IS_CHROMEAPP?y.setAttribute("host","Chrome"):EditorUi.isElectronApp?y.setAttribute("host","Electron"):y.setAttribute("host",window.location.hostname),y.setAttribute("agent",+null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),y.setAttribute("version",EditorUi.VERSION),1<y.getElementsByTagName("diagram").length&&null!=this.pages&&y.setAttribute("pages",this.pages.length));null!=V&&(y=y.cloneNode(!0),y.setAttribute("scale",V));null!=Q&&(y=y.cloneNode(!0),y.setAttribute("border",Q));d=R?mxUtils.getPrettyXml(y):mxUtils.getXml(y);if(!x&&!t&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))d=this.getHtml2(mxUtils.getXml(y),g,null!=k?k.getTitle():null,q,P);else if(x||+!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(v=null),k=this.getSvgFileProperties(y),d=this.getEmbeddedSvg(d,g,v,null,J,D,P,null,null,k.scale,k.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,g,k,v){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.defaultCompressed;var t=this.editor.getGraphXml(d,v);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(D){var E=D.getElementsByTagName("mxGraphModel"),+R=0<E.length?E[0]:null;E=D;null==R&&k?(R=mxUtils.getNodeValue(D),0<R.length&&(R=Graph.decompress(R),null!=R&&0<R.length&&(E=D.cloneNode(!1),E.appendChild(mxUtils.parseXml(R).documentElement)))):null==R||k?E=D.cloneNode(!0):(E=D.cloneNode(!1),mxUtils.setTextContent(E,Graph.compressNode(R)));t.appendChild(E)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(t),t=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var x=this.pages[g],+A=x.node;if(x!=this.currentPage)if(x.needsUpdate){var J=new mxCodec(mxUtils.createXmlDocument());J=J.encode(new mxGraphModel(x.root));this.editor.graph.saveViewState(x.viewState,J,null,v);EditorUi.removeChildNodes(A);A.appendChild(J);delete x.needsUpdate}else v&&(this.updatePageRoot(x),null!=x.viewState.backgroundImage&&(null!=x.viewState.backgroundImage.originalSrc?x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.originalSrc,x):Graph.isPageLink(x.viewState.backgroundImage.src)&&+(x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.src,x))),null!=x.viewState.backgroundImage&&null!=x.viewState.backgroundImage.originalSrc&&(J=new mxCodec(mxUtils.createXmlDocument()),J=J.encode(new mxGraphModel(x.root)),this.editor.graph.saveViewState(x.viewState,J,null,v),A=A.cloneNode(!1),A.appendChild(J)));d(A)}return t};EditorUi.prototype.anonymizeString=function(d,g){for(var k=[],v=0;v<d.length;v++){var t=d.charAt(v);0<=EditorUi.ignoredAnonymizedChars.indexOf(t)?+k.push(t):isNaN(parseInt(t))?t.toLowerCase()!=t?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):t.toUpperCase()!=t?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(t)?k.push(" "):k.push("?"):k.push(g?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++)try{var k=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);+null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));d[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(k)}catch(x){d[EditorUi.DIFF_INSERT][g].data=x.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var v in d[EditorUi.DIFF_UPDATE]){var t=d[EditorUi.DIFF_UPDATE][v];null!=t.name&&(t.name=this.anonymizeString(t.name));null!=t.cells&&(g=mxUtils.bind(this,function(x){var A=t.cells[x];if(null!=A){for(var J in A)null!=A[J].value&&(A[J].value="["+A[J].value.length+"]"),+null!=A[J].xmlValue&&(A[J].xmlValue="["+A[J].xmlValue.length+"]"),null!=A[J].style&&(A[J].style="["+A[J].style.length+"]"),mxUtils.isEmptyObject(A[J])&&delete A[J];mxUtils.isEmptyObject(A)&&delete t.cells[x]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(t.cells)&&delete t.cells);mxUtils.isEmptyObject(t)&&delete d[EditorUi.DIFF_UPDATE][v]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,+g){if(null!=d.attributes)for(var k=0;k<d.attributes.length;k++)"as"!=d.attributes[k].name&&d.setAttribute(d.attributes[k].name,this.anonymizeString(d.attributes[k].value,g));if(null!=d.childNodes)for(k=0;k<d.childNodes.length;k++)this.anonymizeAttributes(d.childNodes[k],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");for(var k=0;k<g.length;k++)null!=g[k].getAttribute("value")&&g[k].setAttribute("value","["+g[k].getAttribute("value").length+"]"),null!=g[k].getAttribute("xmlValue")&&+g[k].setAttribute("xmlValue","["+g[k].getAttribute("xmlValue").length+"]"),null!=g[k].getAttribute("style")&&g[k].setAttribute("style","["+g[k].getAttribute("style").length+"]"),null!=g[k].parentNode&&"root"!=g[k].parentNode.nodeName&&null!=g[k].parentNode.parentNode&&(g[k].setAttribute("id",g[k].parentNode.getAttribute("id")),g[k].parentNode.parentNode.replaceChild(g[k],g[k].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var g=this.getCurrentFile();null!=g&&(g.savingFile?+this.handleError({message:mxResources.get("busy")}):!d&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.editor.setStatus(""),d?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){this.spinner.stop();g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),+mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,v,t,x,A,J,D,E,R,V,Q){t=null!=t?t:!0;x=null!=x?x:!1;E=null!=E?E:!Editor.defaultCompressed;var P=this.editor.graph;if((g||!d&&null!=D&&/(\.svg)$/i.test(D.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var q=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());P.setBackgroundImage=this.editor.graph.setBackgroundImage;P.background=this.editor.graph.background;var y=+null!=this.pages?this.pages[0]:null;null==y||this.currentPage==y?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&P.setBackgroundImage(y.viewState.backgroundImage);P.getGlobalVariable=function(B){return"page"==B&&null!=y?y.getName():"pagenumber"==B?1:q.apply(this,arguments)};document.body.appendChild(P.container);null!=y&&P.model.setRoot(y.root)}A=null!=A?A:this.getXmlFileData(t,x,E,R);D=null!=D?D:this.getCurrentFile();d=this.createFileData(A,P,D,window.location.href,+d,g,k,v,t,J,E,V,Q);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return d};EditorUi.prototype.getHtml=function(d,g,k,v,t,x){x=null!=x?x:!0;var A=null,J=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){A=x?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var D=g.view.scale;x=Math.floor(A.x/D-g.view.translate.x);D=Math.floor(A.y/D-g.view.translate.y);A=g.background;null==t&&(g=this.getBasenames().join(";"),0<g.length&&(J=EditorUi.drawHost+"/embed.js?s="+g));+d.setAttribute("x0",x);d.setAttribute("y0",D)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=v&&d.setAttribute("edit",v));null!=t&&(t=t.replace(/&/g,"&"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";v=Graph.compress(d);Graph.decompress(v)!=d&&(v=encodeURIComponent(d));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':+"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=A&&A!=mxConstants.NONE?' style="background-color:'+A+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+v+"</div>\n</div>\n"++(null==t?'<script type="text/javascript" src="'+J+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,k,v,t){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,+xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''++t+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==t?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=+function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var g=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,k=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[g],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");d=null!=g?this.editor.extractGraphModel(g,!0):null;null!=d&&(g=d);if(null!=g&&"mxfile"==g.nodeName&&(d=g.getElementsByTagName("diagram"),+k={},0<d.length)){var v=this.getHashObject(),t=null;this.fileNode=g;this.pages=[];for(var x=0;x<d.length;x++){null==d[x].getAttribute("id")&&d[x].setAttribute("id",x);g=new DiagramPage(d[x]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[x+1]));this.pages.push(g);if(null==v.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=v.pageId&&g.getId()==v.pageId)t=g;if(null==k[g.getId()])k[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=+null!=t?t:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),+this.scrollToPage());if(null!=urlParams["layer-ids"])try{var A=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(x=0;x<A.length;x++)g[A[x]]=!0;var J=this.editor.graph.getModel(),D=J.getChildren(J.root);for(x=0;x<D.length;x++){var E=D[x];J.setVisible(E,g[E.id]||!1)}}catch(R){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=+g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,v,t,x,A,J,D,E,R,V,Q,P,q,y){try{v=null!=v?v:this.editor.graph.isSelectionEmpty();var B=this.getBaseFilename(!t),C=B+("xml"==d||"pdf"==d&&R?".drawio":"")+"."+d;+if("xml"==d){var M=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,v,t,null,null,null,g);this.saveData(C,d,M,"text/xml")}else if("html"==d)M=this.getHtml2(this.getFileData(!0),this.editor.graph,B),this.saveData(C,d,M,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==d?C=B+".png":"jpeg"==d&&(C=B+".jpg"),this.saveRequest(C,d,mxUtils.bind(this,function(L,N){try{return this.createDownloadRequest(L,d,v,N,A,t,J,D,E,R,V,void 0,+void 0,!x,Q,P,q,y)}catch(O){this.handleError(O)}}));else{var T=null,m=mxUtils.bind(this,function(L){L.length<=MAX_REQUEST_SIZE?this.saveData(C,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==d){var z=this.editor.graph.background;if(A||z==mxConstants.NONE)z=null;var I=this.editor.graph.getSvg(z,null,null,null,null,v);k&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,+mxUtils.bind(this,mxUtils.bind(this,function(L){this.spinner.stop();m(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(L))})))}else C=B+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(L){this.spinner.stop();m(L)}),v)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,v,t,x,A,J,D,E,R,V,Q,P,q,y,B,C){d=this.downloadRequestBuilder(d,g,k,v,t,x,A,J,D,E,R,V,Q,P,q,y,B,C);g="";for(var M in d)k=d[M],null!=k&&(g+=M+"="+encodeURIComponent(k)++"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,k,v,t,x,A,J,D,E,R,V,Q,P,q,y,B,C){var M=this.editor.graph,T=M.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==x?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var m=null,z=null,I=null;if(!EditorUi.isElectronApp&&(T.width*T.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};E=E?"1":"0";"pdf"==g&&(null!=R?(m=R.from,z=R.to):0==x&&(I=+"1"));"xmlpng"==g&&(E="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(x=0;x<this.pages.length;x++)if(this.pages[x]==this.currentPage){m=x;break}x=M.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!t?t||null!=x&&x!=mxConstants.NONE||(x="#ffffff"):x=mxConstants.NONE;t={globalVars:M.getExportVariables()};D&&(t.grid={size:M.gridSize,steps:M.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:M.view.gridColor});Graph.translateDiagram&&+(t.diagramLanguage=Graph.diagramLanguage);return{format:g,from:m,to:z,allPages:I,bg:null!=x?x:mxConstants.NONE,base64:v,embedXml:E,xml:k,filename:null!=d?d:"",extras:JSON.stringify(t),scale:A,border:J,pageMargin:q,w:V&&isFinite(V)?V:null,h:Q&&isFinite(Q)?Q:null,crop:null!=P&&P?"1":"0",fit:null!=y&&y?"1":"0",sheetsAcross:B,sheetsDown:C}};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));+if(null!=d&&1<d.length){var g=d.indexOf("#");0<=g&&(d=d.substring(0,g))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,g={};if(null!=d&&0<d.length){var k=d.lastIndexOf("#");if(0<k){d=decodeURIComponent(d.substring(k+1));try{g=JSON.parse(d)}catch(v){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var d=this.getHashObject();d.pageId=this.currentPage.getId();this.setHashObject(d)}else this.setHashObject(null)};+EditorUi.prototype.setHashObject=function(d){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var k=g.lastIndexOf("#");0<k&&(g=g.substring(0,k));try{null==d||mxUtils.isEmptyObject(d)||(g=g+"#"+encodeURIComponent(JSON.stringify(d)))}catch(v){}0<k&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(d,g,k){var v=window.location.hash,t=mxUtils.bind(this,function(A){var J=null!=d.data?d.data:"";null!=A&&0<A.length&&+(0<J.length&&(J+="\n"),J+=A);A=new LocalFile(this,"csv"!=d.format&&0<J.length?J:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return v};this.fileLoaded(A);"csv"==d.format&&this.importCsv(J,mxUtils.bind(this,function(Q){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var D=null!=d.interval?parseInt(d.interval):6E4,E=null,R=mxUtils.bind(this,function(){var Q=this.currentPage;+mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){Q===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),V()):this.handleError({message:mxResources.get("error")+" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),V=mxUtils.bind(this,function(){window.clearTimeout(E);E=window.setTimeout(R,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){V();+R()}));V();R()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var x=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(x,mxUtils.bind(this,function(A){t(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else t("")};EditorUi.prototype.updateDiagram=function(d){function g(T){var m=new mxCellOverlay(T.image||t.warningImage,T.tooltip,T.align,T.valign,T.offset);m.addListener(mxEvent.CLICK,function(z,I){v.alert(T.tooltip)});return m}var k=null,v=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=+null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var t=this.editor.graph,x=t.getModel();x.beginUpdate();var A=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var J=x.getCell(d.getAttribute("id"));if(null!=J){try{var D=d.getAttribute("value");if(null!=D){var E=mxUtils.parseXml(D).documentElement;if(null!=E)if("1"==E.getAttribute("replace-value"))x.setValue(J,E);else for(var R=E.attributes,V=0;V<R.length;V++)t.setAttributeForCell(J,R[V].nodeName,0<R[V].nodeValue.length?+R[V].nodeValue:null)}}catch(T){null!=window.console&&console.log("Error in value for "+J.id+": "+T)}try{var Q=d.getAttribute("style");null!=Q&&t.model.setStyle(J,Q)}catch(T){null!=window.console&&console.log("Error in style for "+J.id+": "+T)}try{var P=d.getAttribute("icon");if(null!=P){var q=0<P.length?JSON.parse(P):null;null!=q&&q.append||t.removeCellOverlays(J);null!=q&&t.addCellOverlay(J,g(q))}}catch(T){null!=window.console&&console.log("Error in icon for "+J.id+": "+T)}try{var y=d.getAttribute("geometry");+if(null!=y){y=JSON.parse(y);var B=t.getCellGeometry(J);if(null!=B){B=B.clone();for(key in y){var C=parseFloat(y[key]);"dx"==key?B.x+=C:"dy"==key?B.y+=C:"dw"==key?B.width+=C:"dh"==key?B.height+=C:B[key]=parseFloat(y[key])}t.model.setGeometry(J,B)}}}catch(T){null!=window.console&&console.log("Error in icon for "+J.id+": "+T)}}}else if("model"==d.nodeName){for(var M=d.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(d.firstChild)).decode(M,x)}else if("view"==+d.nodeName){if(d.hasAttribute("scale")&&(t.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))t.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(A=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{x.endUpdate()}null!=A&&this.chromelessResize&&this.chromelessResize(!0,A)}return k};EditorUi.prototype.getCopyFilename=function(d,g){var k=null!=+d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var v=k.lastIndexOf(".");0<=v&&(d=k.substring(v),k=k.substring(0,v));if(g){g=k;var t=new Date;k=t.getFullYear();v=t.getMonth()+1;var x=t.getDate(),A=t.getHours(),J=t.getMinutes();t=t.getSeconds();k=g+(" "+(k+"-"+v+"-"+x+"-"+A+"-"+J+"-"+t))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.logIfModified=function(d,g){try{null!=d&&g&&EditorUi.debug("File.closed",[d])}catch(k){}};EditorUi.prototype.fileLoaded=function(d,g,k){var v=+this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var t=!1;this.hideDialog();null!=v&&(v.removeListener(this.descriptorChangedListener),this.logIfModified(v,!0),v.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var x=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=v&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();g||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?d.addUnsavedStatus():this.editor.setStatus(""):this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>");!this.editor.isChromelessView()||-this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=m&&m();this.editor.fireEvent(new mxEventObject("fileLoaded"));v=!0;if(!this.isOffline()&&null!=d.getMode()){var C="1"==urlParams.sketch?"sketch":uiTheme;if(null==C)C="default";else if("sketch"==C||"min"==C)C+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",-[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=d)try{d.close()}catch(K){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,-mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||y():y()});g?d():(null!=I.fallbackFileData&&(I.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var K=new LocalFile(this,I.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(K)})}),this.handleError(I,mxResources.get("errorLoadingFile"),d,!0,null,null,!0))}else y();return v};EditorUi.prototype.getHashValueForPages=function(d,g){var m=-0,t=new mxGraphModel,v=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var y=0;y<d.length;y++){this.updatePageRoot(d[y]);var C=d[y].node.cloneNode(!1);C.removeAttribute("name");t.root=d[y].root;var I=v.encode(t);this.editor.graph.saveViewState(d[y].viewState,I,!0);I.removeAttribute("pageWidth");I.removeAttribute("pageHeight");C.appendChild(I);null!=g&&(g.eltCount+=C.getElementsByTagName("*").length,g.nodeCount+=C.getElementsByTagName("mxCell").length);m=(m<<5)-m+-this.hashValue(C,function(K,J,U,P){return!P||"mxGeometry"!=K.nodeName&&"mxPoint"!=K.nodeName||"x"!=J&&"y"!=J&&"width"!=J&&"height"!=J?P&&"mxCell"==K.nodeName&&"previous"==J?null:U:Math.round(U)},g)<<0}return m};EditorUi.prototype.hashValue=function(d,g,m){var t=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(t^=this.hashValue(d.nodeName,g,m));if(null!=d.attributes){null!=m&&(m.attrCount+=d.attributes.length);-for(var v=0;v<d.attributes.length;v++){var y=d.attributes[v].name,C=null!=g?g(d,y,d.attributes[v].value,!0):d.attributes[v].value;null!=C&&(t^=this.hashValue(y,g,m)+this.hashValue(C,g,m))}}if(null!=d.childNodes)for(v=0;v<d.childNodes.length;v++)t=(t<<5)-t+this.hashValue(d.childNodes[v],g,m)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=m&&(m.byteCount+=d.length);for(v=0;v<d.length;v++)g=(g<<5)-g+d.charCodeAt(v)<<0;t^=g}return t};EditorUi.prototype.descriptorChanged=function(){};-EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,m,t,v,y,C){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};-EditorUi.prototype.createLibraryDataFromImages=function(d){if(!Editor.defaultCompressed)for(var g=0;g<d.length;g++)null!=d[g].xml&&"<"!=d[g].xml.charAt(0)&&(d[g].xml=mxUtils.trim(Graph.decompress(d[g].xml)));g=mxUtils.createXmlDocument();var m=g.createElement("mxlibrary");mxUtils.setTextContent(m,JSON.stringify(d,null,2));g.appendChild(m);return mxUtils.getXml(g,"\n")};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),-".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var g=this.sidebar.palettes[d];if(null!=g){for(var m=0;m<g.length;m++)g[m].parentNode.removeChild(g[m]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d,g){var m=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=d||!g){null==d&&(g=this.sidebar.palettes["L.scratchpad"],null==g&&(g=this.sidebar.palettes.search),null!=g&&(d=g[g.length-1].nextSibling));-d=null!=d?d:m.firstChild.nextSibling.nextSibling;g=m.lastChild;var t=g.previousSibling;m.insertBefore(g,d);m.insertBefore(t,g)}};EditorUi.prototype.loadLibrary=function(d,g){var m=mxUtils.parseXml(d.getData());if("mxlibrary"==m.documentElement.nodeName){var t=JSON.parse(mxUtils.getTextContent(m.documentElement));this.libraryLoaded(d,t,m.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.showSidebar=-function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(d,g,m,t){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());var v=null;if(d.constructor!=StorageLibrary||".scratchpad"!=d.title){null==this.openLibraries&&(this.openLibraries=[]);for(var y=0;y<this.openLibraries.length;y++)if(this.openLibraries[y].file.getHash()==d.getHash()){mxUtils.remove(this.openLibraries[y],-this.openLibraries);break}v={file:d,images:g,title:m,expand:t};this.openLibraries.push(v)}else this.scratchpad=d;y=this.sidebar.palettes[d.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var C=null,I=mxUtils.bind(this,function(M,S){0==M.length&&d.isEditable()?(null==C&&(C=document.createElement("div"),C.className="geDropTarget",mxUtils.write(C,mxResources.get("dragElementsHere"))),S.appendChild(C)):this.addLibraryEntries(M,S)});null!=this.sidebar&&null!=-g&&this.sidebar.addEntries(g);null==m&&(m=d.getTitle(),null!=m&&/(\.xml)$/i.test(m)&&(m=m.substring(0,m.lastIndexOf("."))));var K=this.sidebar.addPalette(d.getHash(),m,null!=t?t:!0,mxUtils.bind(this,function(M){I(g,M)}));null!=v&&(v.div=K);this.repositionLibrary(y,"L.scratchpad"!=d.getHash());t=K.parentNode.previousSibling;m=t.getAttribute("title");null!=m&&0<m.length&&".scratchpad"!=d.title&&t.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+m);var J=document.createElement("div");J.style.backgroundColor=-"inherit";t.style.position="relative";var U=document.createElement("img");U.className="geAdaptiveAsset";U.setAttribute("src",Editor.crossImage);U.setAttribute("title",mxResources.get("close"));U.setAttribute("valign","absmiddle");U.setAttribute("border","0");U.style.position="relative";U.style.top="2px";U.style.width="14px";U.style.cursor="pointer";U.style.margin="0 3px";var P=null;if(".scratchpad"!=d.title||this.closableScratchpad)J.appendChild(U),mxEvent.addListener(U,"click",mxUtils.bind(this,-function(M){if(!mxEvent.isConsumed(M)){var S=mxUtils.bind(this,function(){null!=v&&mxUtils.remove(v,this.openLibraries);this.closeLibrary(d)});null!=P?this.confirm(mxResources.get("allChangesLost"),null,S,mxResources.get("cancel"),mxResources.get("discardChanges")):S();mxEvent.consume(M)}}));if(d.isEditable()){var R=this.editor.graph,n=null;m=mxUtils.bind(this,function(M){this.showLibraryDialog(d.getTitle(),K,g,d,d.getMode());mxEvent.consume(M)});var z=mxUtils.bind(this,function(M){d.setModified(!0);-d.isAutosave()?(null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n),n=U.cloneNode(!1),n.setAttribute("src",Editor.spinImage),n.setAttribute("title",mxResources.get("saving")),n.style.cursor="default",n.style.marginRight="2px",n.style.marginTop="-2px",J.insertBefore(n,J.firstChild),this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n)})):null==P&&(P=U.cloneNode(!1),P.setAttribute("src",Editor.saveImage),P.setAttribute("title",mxResources.get("save")),-J.insertBefore(P,J.firstChild),mxEvent.addListener(P,"click",mxUtils.bind(this,function(S){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==P||d.isModified()||(P.parentNode.removeChild(P),P=null)});mxEvent.consume(S)})))}),A=mxUtils.bind(this,function(M,S,l,x){M=R.cloneCells(mxUtils.sortCells(R.model.getTopmostCells(M)));for(var F=0;F<M.length;F++){var N=R.getCellGeometry(M[F]);null!=N&&N.translate(-S.x,-S.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(M,-S.width,S.height,x||"",!0,null,!1));M=mxUtils.getXml(this.editor.graph.encodeCells(M));Editor.defaultCompressed&&(M=Graph.compress(M));S={xml:M,w:S.width,h:S.height};null!=x&&(S.title=x);g.push(S);z(l);null!=C&&null!=C.parentNode&&0<g.length&&(C.parentNode.removeChild(C),C=null)}),B=mxUtils.bind(this,function(M){if(R.isSelectionEmpty())R.getRubberband().isActive()?(R.getRubberband().execute(M),R.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),-mxResources.get("ok"));else{var S=R.getSelectionCells(),l=R.view.getBounds(S);if(null!=l&&0<l.width&&0<l.height){var x=R.view.scale;l.x/=x;l.y/=x;l.width/=x;l.height/=x;l.x-=R.view.translate.x;l.y-=R.view.translate.y;A(S,l)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(M)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(M){R.isMouseDown&&null!=R.panningManager&&null!=R.graphHandler.first&&(R.graphHandler.suspend(),-null!=R.graphHandler.hint&&(R.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="light-dark(#fefefe, #000000)",K.style.cursor="copy",R.panningManager.stop(),R.autoScroll=!1,mxEvent.consume(M))}),mxUtils.bind(this,function(M){R.isMouseDown&&null!=R.panningManager&&null!=R.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,R.panningManager.stop(),R.graphHandler.reset(),R.isMouseDown=!1,R.autoScroll=!0,B(M),mxEvent.consume(M))}));mxEvent.addListener(K,-"mouseleave",mxUtils.bind(this,function(M){R.isMouseDown&&null!=R.graphHandler.first&&(R.graphHandler.resume(),null!=R.graphHandler.hint&&(R.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",R.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(M){K.style.backgroundColor="light-dark(#fefefe, #000000)";M.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();M.stopPropagation();M.preventDefault()})),-mxEvent.addListener(K,"drop",mxUtils.bind(this,function(M){K.style.cursor="";K.style.backgroundColor="";0<M.dataTransfer.files.length&&this.importFiles(M.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(S,l,x,F,N,O,Q,V,T){if(null!=S&&"image/"==l.substring(0,6))S="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(S),S=[new mxCell("",new mxGeometry(0,0,N,O),S)],S[0].vertex=!0,A(S,new mxRectangle(0,0,N,O),M,mxEvent.isAltDown(M)?-null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," ")),null!=C&&null!=C.parentNode&&0<g.length&&(C.parentNode.removeChild(C),C=null);else{var W=!1,X=mxUtils.bind(this,function(Y,Z){null!=Y&&"application/pdf"==Z&&(Z=Editor.extractGraphModelFromPdf(Y),null!=Z&&0<Z.length&&(Y=Z));if(null!=Y)if(Y=mxUtils.parseXml(Y),"mxlibrary"==Y.documentElement.nodeName)try{var aa=JSON.parse(mxUtils.getTextContent(Y.documentElement));I(aa,K);g=g.concat(aa);z(M);this.spinner.stop();W=!0}catch(ja){}else if("mxfile"==-Y.documentElement.nodeName)try{var ea=Y.documentElement.getElementsByTagName("diagram");for(aa=0;aa<ea.length;aa++){var ca=this.stringToCells(Editor.getDiagramNodeXml(ea[aa])),da=this.editor.graph.getBoundingBoxFromGeometry(ca);null!=da&&A(ca,new mxRectangle(0,0,da.width,da.height),M)}W=!0}catch(ja){null!=window.console&&console.log("error in drop handler:",ja)}W||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=C&&null!=C.parentNode&&0<g.length&&(C.parentNode.removeChild(C),-C=null)});null!=T&&null!=Q&&EditorUi.isVisioFilename(Q)?this.importVisio(T,function(Y){X(Y,"text/xml")},null,Q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(S,Q)&&null!=T?this.isExternalDataComms()?this.parseFile(T,mxUtils.bind(this,function(Y){4==Y.readyState&&(this.spinner.stop(),200<=Y.status&&299>=Y.status?X(Y.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Y.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),-this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):X(S,l)}}));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(K,"dragleave",function(M){K.style.cursor="";K.style.backgroundColor="";M.stopPropagation();M.preventDefault()}));U=U.cloneNode(!1);U.setAttribute("src",Editor.editImage);U.setAttribute("title",mxResources.get("edit"));J.insertBefore(U,J.firstChild);mxEvent.addListener(U,"click",m);m=U.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",-mxResources.get("add"));J.insertBefore(m,J.firstChild);mxEvent.addListener(m,"click",B);".scratchpad"==d.title&&(this.addSelectionToScratchpad=B);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(m=this.createHelpIcon(EditorUi.scratchpadHelpLink),y=m.getElementsByTagName("img")[0],m.style.marginRight="1px",y.style.marginTop="-2px",y.style.opacity="",J.insertBefore(m,J.firstChild))}t.appendChild(J);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=-function(d,g){for(var m=0;m<d.length;m++)try{var t=d[m],v=t.data;if(null!=v){v="data:"==v.substring(0,5)?this.convertDataUri(v):v;var y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==t.aspect&&(y+="aspect=fixed;");y=y+"image="+v+";";null!=t.style&&(y+=t.style);g.appendChild(this.sidebar.createVertexTemplate(y,t.w,t.h,"",t.title||"",!1,null,!0))}else if(null!=t.xml){var C=this.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml)),I=0==C.length?mxResources.get("drawingEmpty"):-null!=t.title?t.title:"";g.appendChild(this.sidebar.createVertexTemplateFromCells(C,t.w,t.h,I,!0,null,!0))}}catch(K){I=null!=K.message?mxResources.get("error")+": "+K.message:String(K),y=this.sidebar.createVertexTemplateFromCells(null,t.w,t.h,I,!0,null,!0),g.appendChild(y)}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=+this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=k&&k();this.editor.fireEvent(new mxEventObject("fileLoaded"));t=!0;if(!this.isOffline()&&null!=d.getMode()){var A="1"==urlParams.sketch?"sketch":uiTheme;if(null==A)A="default";else if("sketch"==A||"min"==A)A+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",+[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(J){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(J){}}catch(J){this.fileLoadedError=J;if(null!=d)try{d.close()}catch(D){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,+mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=v?this.fileLoaded(v)||x():x()});g?d():(null!=J.fallbackFileData&&(J.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var D=new LocalFile(this,J.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(D)})}),this.handleError(J,mxResources.get("errorLoadingFile"),d,!0,null,null,!0))}else x();return t};EditorUi.prototype.getHashValueForPages=function(d,g){var k=+0,v=new mxGraphModel,t=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var x=0;x<d.length;x++){this.updatePageRoot(d[x]);var A=d[x].node.cloneNode(!1);A.removeAttribute("name");v.root=d[x].root;var J=t.encode(v);this.editor.graph.saveViewState(d[x].viewState,J,!0);J.removeAttribute("pageWidth");J.removeAttribute("pageHeight");A.appendChild(J);null!=g&&(g.eltCount+=A.getElementsByTagName("*").length,g.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k++this.hashValue(A,function(D,E,R,V){return!V||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=E&&"y"!=E&&"width"!=E&&"height"!=E?V&&"mxCell"==D.nodeName&&"previous"==E?null:R:Math.round(R)},g)<<0}return k};EditorUi.prototype.hashValue=function(d,g,k){var v=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(v^=this.hashValue(d.nodeName,g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);+for(var t=0;t<d.attributes.length;t++){var x=d.attributes[t].name,A=null!=g?g(d,x,d.attributes[t].value,!0):d.attributes[t].value;null!=A&&(v^=this.hashValue(x,g,k)+this.hashValue(A,g,k))}}if(null!=d.childNodes)for(t=0;t<d.childNodes.length;t++)v=(v<<5)-v+this.hashValue(d.childNodes[t],g,k)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=k&&(k.byteCount+=d.length);for(t=0;t<d.length;t++)g=(g<<5)-g+d.charCodeAt(t)<<0;v^=g}return v};EditorUi.prototype.descriptorChanged=function(){};+EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,k,v,t,x,A){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};+EditorUi.prototype.createLibraryDataFromImages=function(d){if(!Editor.defaultCompressed)for(var g=0;g<d.length;g++)null!=d[g].xml&&"<"!=d[g].xml.charAt(0)&&(d[g].xml=mxUtils.trim(Graph.decompress(d[g].xml)));g=mxUtils.createXmlDocument();var k=g.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(d,null,2));g.appendChild(k);return mxUtils.getXml(g,"\n")};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),+".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var g=this.sidebar.palettes[d];if(null!=g){for(var k=0;k<g.length;k++)g[k].parentNode.removeChild(g[k]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d,g){var k=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=d||!g){null==d&&(g=this.sidebar.palettes["L.scratchpad"],null==g&&(g=this.sidebar.palettes.search),null!=g&&(d=g[g.length-1].nextSibling));+d=null!=d?d:k.firstChild.nextSibling.nextSibling;g=k.lastChild;var v=g.previousSibling;k.insertBefore(g,d);k.insertBefore(v,g)}};EditorUi.prototype.loadLibrary=function(d,g){var k=mxUtils.parseXml(d.getData());if("mxlibrary"==k.documentElement.nodeName){var v=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(d,v,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.showSidebar=+function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(d,g,k,v){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());var t=null;if(d.constructor!=StorageLibrary||".scratchpad"!=d.title){null==this.openLibraries&&(this.openLibraries=[]);for(var x=0;x<this.openLibraries.length;x++)if(this.openLibraries[x].file.getHash()==d.getHash()){mxUtils.remove(this.openLibraries[x],+this.openLibraries);break}t={file:d,images:g,title:k,expand:v};this.openLibraries.push(t)}else this.scratchpad=d;x=this.sidebar.palettes[d.getHash()];x=null!=x?x[x.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var A=null,J=mxUtils.bind(this,function(C,M){0==C.length&&d.isEditable()?(null==A&&(A=document.createElement("div"),A.className="geDropTarget",mxUtils.write(A,mxResources.get("dragElementsHere"))),M.appendChild(A)):this.addLibraryEntries(C,M)});null!=this.sidebar&&null!=+g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),k,null!=v?v:!0,mxUtils.bind(this,function(C){J(g,C)}));null!=t&&(t.div=D);this.repositionLibrary(x,"L.scratchpad"!=d.getHash());v=D.parentNode.previousSibling;k=v.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=d.title&&v.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+k);var E=document.createElement("div");E.style.backgroundColor=+"inherit";v.style.position="relative";var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.crossImage);R.setAttribute("title",mxResources.get("close"));R.setAttribute("valign","absmiddle");R.setAttribute("border","0");R.style.position="relative";R.style.top="2px";R.style.width="14px";R.style.cursor="pointer";R.style.margin="0 3px";var V=null;if(".scratchpad"!=d.title||this.closableScratchpad)E.appendChild(R),mxEvent.addListener(R,"click",mxUtils.bind(this,+function(C){if(!mxEvent.isConsumed(C)){var M=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(d)});null!=V?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M();mxEvent.consume(C)}}));if(d.isEditable()){var Q=this.editor.graph,P=null;k=mxUtils.bind(this,function(C){this.showLibraryDialog(d.getTitle(),D,g,d,d.getMode());mxEvent.consume(C)});var q=mxUtils.bind(this,function(C){d.setModified(!0);+d.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=R.cloneNode(!1),P.setAttribute("src",Editor.spinImage),P.setAttribute("title",mxResources.get("saving")),P.style.cursor="default",P.style.marginRight="2px",P.style.marginTop="-2px",E.insertBefore(P,E.firstChild),this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==V&&(V=R.cloneNode(!1),V.setAttribute("src",Editor.saveImage),V.setAttribute("title",mxResources.get("save")),+E.insertBefore(V,E.firstChild),mxEvent.addListener(V,"click",mxUtils.bind(this,function(M){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==V||d.isModified()||(V.parentNode.removeChild(V),V=null)});mxEvent.consume(M)})))}),y=mxUtils.bind(this,function(C,M,T,m){C=Q.cloneCells(mxUtils.sortCells(Q.model.getTopmostCells(C)));for(var z=0;z<C.length;z++){var I=Q.getCellGeometry(C[z]);null!=I&&I.translate(-M.x,-M.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(C,+M.width,M.height,m||"",!0,null,!1));C=mxUtils.getXml(this.editor.graph.encodeCells(C));Editor.defaultCompressed&&(C=Graph.compress(C));M={xml:C,w:M.width,h:M.height};null!=m&&(M.title=m);g.push(M);q(T);null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null)}),B=mxUtils.bind(this,function(C){if(Q.isSelectionEmpty())Q.getRubberband().isActive()?(Q.getRubberband().execute(C),Q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),+mxResources.get("ok"));else{var M=Q.getSelectionCells(),T=Q.view.getBounds(M);if(null!=T&&0<T.width&&0<T.height){var m=Q.view.scale;T.x/=m;T.y/=m;T.width/=m;T.height/=m;T.x-=Q.view.translate.x;T.y-=Q.view.translate.y;y(M,T)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(C)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(C){Q.isMouseDown&&null!=Q.panningManager&&null!=Q.graphHandler.first&&(Q.graphHandler.suspend(),+null!=Q.graphHandler.hint&&(Q.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="light-dark(#fefefe, #000000)",D.style.cursor="copy",Q.panningManager.stop(),Q.autoScroll=!1,mxEvent.consume(C))}),mxUtils.bind(this,function(C){Q.isMouseDown&&null!=Q.panningManager&&null!=Q.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,Q.panningManager.stop(),Q.graphHandler.reset(),Q.isMouseDown=!1,Q.autoScroll=!0,B(C),mxEvent.consume(C))}));mxEvent.addListener(D,+"mouseleave",mxUtils.bind(this,function(C){Q.isMouseDown&&null!=Q.graphHandler.first&&(Q.graphHandler.resume(),null!=Q.graphHandler.hint&&(Q.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor="",D.style.cursor="",Q.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(C){D.style.backgroundColor="light-dark(#fefefe, #000000)";C.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();C.stopPropagation();C.preventDefault()})),+mxEvent.addListener(D,"drop",mxUtils.bind(this,function(C){D.style.cursor="";D.style.backgroundColor="";0<C.dataTransfer.files.length&&this.importFiles(C.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(M,T,m,z,I,L,N,O,S){if(null!=M&&"image/"==T.substring(0,6))M="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(M),M=[new mxCell("",new mxGeometry(0,0,I,L),M)],M[0].vertex=!0,y(M,new mxRectangle(0,0,I,L),C,mxEvent.isAltDown(C)?+null:N.substring(0,N.lastIndexOf(".")).replace(/_/g," ")),null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null);else{var U=!1,W=mxUtils.bind(this,function(X,Z){null!=X&&"application/pdf"==Z&&(Z=Editor.extractGraphModelFromPdf(X),null!=Z&&0<Z.length&&(X=Z));if(null!=X)if(X=mxUtils.parseXml(X),"mxlibrary"==X.documentElement.nodeName)try{var Y=JSON.parse(mxUtils.getTextContent(X.documentElement));J(Y,D);g=g.concat(Y);q(C);this.spinner.stop();U=!0}catch(fa){}else if("mxfile"==+X.documentElement.nodeName)try{var ba=X.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=this.stringToCells(Editor.getDiagramNodeXml(ba[Y])),ca=this.editor.graph.getBoundingBoxFromGeometry(ea);null!=ca&&y(ea,new mxRectangle(0,0,ca.width,ca.height),C)}U=!0}catch(fa){null!=window.console&&console.log("error in drop handler:",fa)}U||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),+A=null)});null!=S&&null!=N&&EditorUi.isVisioFilename(N)?this.importVisio(S,function(X){W(X,"text/xml")},null,N):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(M,N)&&null!=S?this.isExternalDataComms()?this.parseFile(S,mxUtils.bind(this,function(X){4==X.readyState&&(this.spinner.stop(),200<=X.status&&299>=X.status?W(X.responseText,"text/xml"):this.handleError({message:mxResources.get(413==X.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),+this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):W(M,T)}}));C.stopPropagation();C.preventDefault()})),mxEvent.addListener(D,"dragleave",function(C){D.style.cursor="";D.style.backgroundColor="";C.stopPropagation();C.preventDefault()}));R=R.cloneNode(!1);R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("edit"));E.insertBefore(R,E.firstChild);mxEvent.addListener(R,"click",k);k=R.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",+mxResources.get("add"));E.insertBefore(k,E.firstChild);mxEvent.addListener(k,"click",B);".scratchpad"==d.title&&(this.addSelectionToScratchpad=B);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(k=this.createHelpIcon(EditorUi.scratchpadHelpLink),x=k.getElementsByTagName("img")[0],k.style.marginRight="1px",x.style.marginTop="-2px",x.style.opacity="",E.insertBefore(k,E.firstChild))}v.appendChild(E);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=+function(d,g){for(var k=0;k<d.length;k++)try{var v=d[k],t=v.data;if(null!=t){t="data:"==t.substring(0,5)?this.convertDataUri(t):t;var x="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==v.aspect&&(x+="aspect=fixed;");x=x+"image="+t+";";null!=v.style&&(x+=v.style);g.appendChild(this.sidebar.createVertexTemplate(x,v.w,v.h,"",v.title||"",!1,null,!0))}else if(null!=v.xml){var A=this.stringToCells("<"==v.xml.charAt(0)?v.xml:Graph.decompress(v.xml)),J=0==A.length?mxResources.get("drawingEmpty"):+null!=v.title?v.title:"";g.appendChild(this.sidebar.createVertexTemplateFromCells(A,v.w,v.h,J,!0,null,!0))}}catch(D){J=null!=D.message?mxResources.get("error")+": "+D.message:String(D),x=this.sidebar.createVertexTemplateFromCells(null,v.w,v.h,J,!0,null,!0),g.appendChild(x)}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38);"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=-".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,m,t,v,y,C){d=new ImageDialog(this,d,g,m,t,v,y,C);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,g,m,t,v,y){var C=localStorage.getItem(g);d=new TextareaDialog(this,d,null!=C?JSON.stringify(JSON.parse(C),null,2):"",mxUtils.bind(this,function(I){if(null!=I)try{if(null!=y&&-y(I),I==C)this.hideDialog();else{if(0<I.length){var K=JSON.parse(I);localStorage.setItem(g,JSON.stringify(K))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(J){this.handleError(J)}}),null,mxResources.get("close"),null,null,null,!0,null,null,v,m,t);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g,m,t){d=null!=d?d:mxUtils.bind(this,function(v,y,C,I){y||(v=new ChangePageSetup(this,-t?C:null,v),v.ignoreColor=!t,null!=I&&t&&(v.shadowVisible=I),this.editor.graph.model.execute(v))});d=new BackgroundImageDialog(this,d,g,m,t);this.showDialog(d.container,400,t?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,m,t,v){d=new LibraryDialog(this,d,g,m,t,v);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(y){y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=-function(d){var g=f.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(m){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(d,g,m,t,v,y,C){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{C||EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,-d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!C||null==window.console||console.error("EditorUi.handleError:",d)}catch(R){}if(null!=K||null!=g){C=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var J=mxResources.get("ok"),U=null;g=null!=g?g:mxResources.get("error");if(null!=K){null!=K.retry&&(J=mxResources.get("cancel"),U=function(){I();K.retry()});if(404==K.code||404==K.status||403==K.code){C=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),-!1):null!=v?v:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var P=null!=v?null:null!=y?y:window.location.hash;if(null!=P&&("#G"==P.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==P.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||-404==K.code||404==K.status)){P="#U"==P.substring(0,2)?P.substring(45,P.lastIndexOf("%26ex")):P.substring(2);this.showError(g,C,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+P);null!=t&&t()}),U,mxResources.get("changeUser"),mxUtils.bind(this,function(){function R(){B.innerText="";for(var M=0;M<n.length;M++){var S=document.createElement("option");mxUtils.write(S,n[M].displayName);S.value=M;B.appendChild(S);S=document.createElement("option");-S.innerHTML=" ";mxUtils.write(S,"<"+n[M].email+">");S.setAttribute("disabled","disabled");B.appendChild(S)}S=document.createElement("option");mxUtils.write(S,mxResources.get("addAccount"));S.value=n.length;B.appendChild(S)}var n=this.drive.getUsersList(),z=document.createElement("div"),A=document.createElement("div");A.style.marginBottom="6px";mxUtils.write(A,mxResources.get("changeUser")+": ");z.appendChild(A);var B=document.createElement("select");B.style.width="100%";R();mxEvent.addListener(B,-"change",mxUtils.bind(this,function(){var M=B.value,S=n.length!=M;S&&this.drive.setUser(n[M]);this.drive.authorize(S,mxUtils.bind(this,function(){S||(n=this.drive.getUsersList(),R())}),mxUtils.bind(this,function(l){this.handleError(l)}),!0)}));z.appendChild(B);z=new CustomDialog(this,z,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(z.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=m&&m()}),-520,150);return}}null!=K.message?C=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,!1):mxUtils.htmlEntities(K.message,!1):null!=K.response&&null!=K.response.error?C=mxUtils.htmlEntities(K.response.error,!1):"undefined"!==typeof window.App&&(K.code==App.ERROR_TIMEOUT?C=mxUtils.htmlEntities(mxResources.get("timeout"),!1):K.code==App.ERROR_BUSY?C=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof K&&0<K.length&&(C=mxUtils.htmlEntities(K,!1)))}v=d=null;null!=K&&null!=K.helpLink?-(d=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(K.helpLink)})):null!=K&&null!=K.ownerEmail?(d=mxResources.get("contactOwner"),C+=mxUtils.htmlEntities(" ("+d+": "+K.ownerEmail+")",!1),v=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(d=K.alternateAction.label,v=K.alternateAction.funct);this.showError(g,C,J,m,U,null,null,d,v,null,null,null,t?m:null)}else null!=m&&m()};EditorUi.prototype.alert=-function(d,g,m){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,m||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,m,t,v,y){d=null!=d?d:"";var C=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){C();null!=g&&g()},function(){C();null!=m&&m()},t,v,null,null,null,null,I);this.showDialog(d.container,340,46+I,!0,y);d.init()};EditorUi.prototype.showBanner=-function(d,g,m,t,v,y,C,I,K){var J=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){y=null!=y?y:"bottom:10px;left:50%;";C=null!=C?C:"translate(-50%,120%)";I=null!=I?I:"translate(-50%,0%)";var U=v?500:1E3;J=v?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var P=document.createElement("div");P.style.cssText="position:absolute;"+-y+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+J;mxUtils.setPrefixedStyle(P.style,"transform",C);mxUtils.setPrefixedStyle(P.style,"transition","all "+U+"ms ease");P.className="geBtn gePrimaryBtn"+(v?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(P.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(P.style,"transform-origin",K);if(!v){var R=document.createElement("img");R.setAttribute("src",IMAGE_PATH+"/logo.png");-R.setAttribute("border","0");R.setAttribute("align","absmiddle");R.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";P.appendChild(R);R=document.createElement("img");R.setAttribute("src",Dialog.prototype.closeImage);R.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));R.setAttribute("border","0");R.style.cssText=(v?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";P.appendChild(R)}mxUtils.write(P,-g);document.body.appendChild(P);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("id","geDoNotShowAgainCheckbox");n.style.marginRight="6px";if(!t){g.appendChild(n);var z=document.createElement("label");z.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(z,-mxResources.get("doNotShowAgain"));g.appendChild(z);P.style.paddingBottom=v?"16px":"30px";P.appendChild(g)}var A=mxUtils.bind(this,function(){null!=P.parentNode&&(P.parentNode.removeChild(P),this.bannerShowing=!1,n.checked||t)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=R&&mxEvent.addListener(R,"click",mxUtils.bind(this,function(M){mxEvent.consume(M);A()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(P.style,-"transform",C);window.setTimeout(mxUtils.bind(this,function(){A()}),U)});mxEvent.addListener(P,"click",mxUtils.bind(this,function(M){var S=mxEvent.getSource(M);S!=n&&S!=z?(null!=m&&m(),A(),mxEvent.consume(M)):B()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(P.style,"transform",I)}),U/2);window.setTimeout(B,v?4E3:3E4);J=!0}return J};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};-EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,m,t){d=d.toDataURL("image/"+m);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<t&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",t));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,m,t,v){var y="jpeg"==m?"jpg":m;t=this.getBaseFilename(t)+(null!=g?".drawio":-"")+"."+y;d=this.createImageDataUri(d,g,m,v);this.saveData(t,y,d.substring(d.lastIndexOf(",")+1),"image/"+m,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));-this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,m,t,v,y){"text/xml"!=m||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=y?y:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=t?this.base64ToBlob(d,m):new Blob([d],{type:m}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)m=window.open("about:blank","_blank"),null==-m?mxUtils.popup(d,!0):(m.document.write(d),m.document.close(),m.document.execCommand("SaveAs",!0,g),m.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==m||"image/"!=m.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,m,t);else{var C=document.createElement("a");y=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof C.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var I=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);-y=65==(I?parseInt(I[2],10):!1)?!1:y}if(y||this.isOffline()){C.href=URL.createObjectURL(t?this.base64ToBlob(d,m):new Blob([d],{type:m}));y?C.download=g:C.setAttribute("target","_blank");document.body.appendChild(C);try{window.setTimeout(function(){URL.revokeObjectURL(C.href)},2E4),C.click(),C.parentNode.removeChild(C)}catch(K){}}else this.createEchoRequest(d,g,m,t,v).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,m,t,v,y){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,-d+(null!=m?"&mime="+m:"")+(null!=v?"&format="+v:"")+(null!=y?"&base64="+y:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,g,m,t,v,y,C,I){y=null!=y?y:!1;C=null!=C?C:"vsdx"!=v&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(U,P,R,n){try{if("_blank"==P)if(null!=m&&"image/"==m.substring(0,6))this.openInNewWindow(d,m,t);else if(null!=m&&"text/html"==m.substring(0,9)){var z=new EmbedDialog(this,d);this.showDialog(z.container,-450,240,!0,!0);z.init()}else{var A=window.open("about:blank");null==A?mxUtils.popup(d,!0):(A.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),A.document.close())}else if(P==App.MODE_DEVICE||"download"==P)this.doSaveLocalFile(d,U,m,t,null,I);else if(null!=U&&0<U.length){var B=mxUtils.bind(this,function(M){try{this.exportFile(d,U,m,t,P,M)}catch(S){this.handleError(S)}});null!=n?B(n):this.pickFolder(P,B)}}catch(M){this.handleError(M)}});v=[];y||v.push(App.MODE_BROWSER);C||v.push("_blank");-var J=new SaveDialog(this,g,mxUtils.bind(this,function(U,P,R){K(U.value,P,U,R);this.hideDialog(null,null,J.container)}),v,d,m,t);this.showDialog(J.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));J.init()};EditorUi.prototype.openInNewWindow=function(d,g,m){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(d,!0);else{var v="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var y=mxUtils.parseXml(d).documentElement.style.backgroundColor;-""!=y&&(v="background: "+y+";")}v='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+v+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||m?(y=m?d:btoa(unescape(encodeURIComponent(d))),t.document.write(v+'<img style="max-width:100%;" src="data:'+g+";base64,"+y+'"/></body></html>')):t.document.write(v+d+"</body></html>"):t.document.write(v+"<pre>"+mxUtils.htmlEntities(d,!1)+"</pre></body></html>");t.document.close()}};var c=EditorUi.prototype.addChromelessToolbarItems;-EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=d(mxUtils.bind(this,function(t){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),+".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,k,v,t,x,A){d=new ImageDialog(this,d,g,k,v,t,x,A);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,g,k,v,t,x){var A=localStorage.getItem(g);d=new TextareaDialog(this,d,null!=A?JSON.stringify(JSON.parse(A),null,2):"",mxUtils.bind(this,function(J){if(null!=J)try{if(null!=x&&+x(J),J==A)this.hideDialog();else{if(0<J.length){var D=JSON.parse(J);localStorage.setItem(g,JSON.stringify(D))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(E){this.handleError(E)}}),null,mxResources.get("close"),null,null,null,!0,null,null,t,k,v);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g,k,v){d=null!=d?d:mxUtils.bind(this,function(t,x,A,J){x||(t=new ChangePageSetup(this,+v?A:null,t),t.ignoreColor=!v,null!=J&&v&&(t.shadowVisible=J),this.editor.graph.model.execute(t))});d=new BackgroundImageDialog(this,d,g,k,v);this.showDialog(d.container,400,v?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,k,v,t){d=new LibraryDialog(this,d,g,k,v,t);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(x){x&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=+function(d){var g=f.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(d,g,k,v,t,x,A){var J=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{A||EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,+d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!A||null==window.console||console.error("EditorUi.handleError:",d)}catch(Q){}if(null!=D||null!=g){A=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var E=mxResources.get("ok"),R=null;g=null!=g?g:mxResources.get("error");if(null!=D){null!=D.retry&&(E=mxResources.get("cancel"),R=function(){J();D.retry()});if(404==D.code||404==D.status||403==D.code){A=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),+!1):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var V=null!=t?null:null!=x?x:window.location.hash;if(null!=V&&("#G"==V.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==V.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||+404==D.code||404==D.status)){V="#U"==V.substring(0,2)?V.substring(45,V.lastIndexOf("%26ex")):V.substring(2);this.showError(g,A,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+V);null!=v&&v()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Q(){B.innerText="";for(var C=0;C<P.length;C++){var M=document.createElement("option");mxUtils.write(M,P[C].displayName);M.value=C;B.appendChild(M);M=document.createElement("option");+M.innerHTML=" ";mxUtils.write(M,"<"+P[C].email+">");M.setAttribute("disabled","disabled");B.appendChild(M)}M=document.createElement("option");mxUtils.write(M,mxResources.get("addAccount"));M.value=P.length;B.appendChild(M)}var P=this.drive.getUsersList(),q=document.createElement("div"),y=document.createElement("div");y.style.marginBottom="6px";mxUtils.write(y,mxResources.get("changeUser")+": ");q.appendChild(y);var B=document.createElement("select");B.style.width="100%";Q();mxEvent.addListener(B,+"change",mxUtils.bind(this,function(){var C=B.value,M=P.length!=C;M&&this.drive.setUser(P[C]);this.drive.authorize(M,mxUtils.bind(this,function(){M||(P=this.drive.getUsersList(),Q())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));q.appendChild(B);q=new CustomDialog(this,q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),+520,150);return}}null!=D.message?A=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name,!1):mxUtils.htmlEntities(D.message,!1):null!=D.response&&null!=D.response.error?A=mxUtils.htmlEntities(D.response.error,!1):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?A=mxUtils.htmlEntities(mxResources.get("timeout"),!1):D.code==App.ERROR_BUSY?A=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof D&&0<D.length&&(A=mxUtils.htmlEntities(D,!1)))}t=d=null;null!=D&&null!=D.helpLink?+(d=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail?(d=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+d+": "+D.ownerEmail+")",!1),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))})):null!=D&&null!=D.alternateAction&&(d=D.alternateAction.label,t=D.alternateAction.funct);this.showError(g,A,E,k,R,null,null,d,t,null,null,null,v?k:null)}else null!=k&&k()};EditorUi.prototype.alert=+function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,k,v,t,x){d=null!=d?d:"";var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){A();null!=g&&g()},function(){A();null!=k&&k()},v,t,null,null,null,null,J);this.showDialog(d.container,340,46+J,!0,x);d.init()};EditorUi.prototype.showBanner=+function(d,g,k,v,t,x,A,J,D){var E=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){x=null!=x?x:"bottom:10px;left:50%;";A=null!=A?A:"translate(-50%,120%)";J=null!=J?J:"translate(-50%,0%)";var R=t?500:1E3;E=t?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var V=document.createElement("div");V.style.cssText="position:absolute;"++x+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+E;mxUtils.setPrefixedStyle(V.style,"transform",A);mxUtils.setPrefixedStyle(V.style,"transition","all "+R+"ms ease");V.className="geBtn gePrimaryBtn"+(t?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(V.style,"box-shadow","1px 1px 2px 0px #ddd");null!=D&&mxUtils.setPrefixedStyle(V.style,"transform-origin",D);if(!t){var Q=document.createElement("img");Q.setAttribute("src",IMAGE_PATH+"/logo.png");+Q.setAttribute("border","0");Q.setAttribute("align","absmiddle");Q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";V.appendChild(Q);Q=document.createElement("img");Q.setAttribute("src",Dialog.prototype.closeImage);Q.setAttribute("title",mxResources.get(v?"doNotShowAgain":"close"));Q.setAttribute("border","0");Q.style.cssText=(t?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";V.appendChild(Q)}mxUtils.write(V,+g);document.body.appendChild(V);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var P=document.createElement("input");P.setAttribute("type","checkbox");P.setAttribute("id","geDoNotShowAgainCheckbox");P.style.marginRight="6px";if(!v){g.appendChild(P);var q=document.createElement("label");q.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(q,+mxResources.get("doNotShowAgain"));g.appendChild(q);V.style.paddingBottom=t?"16px":"30px";V.appendChild(g)}var y=mxUtils.bind(this,function(){null!=V.parentNode&&(V.parentNode.removeChild(V),this.bannerShowing=!1,P.checked||v)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=Q&&mxEvent.addListener(Q,"click",mxUtils.bind(this,function(C){mxEvent.consume(C);y()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(V.style,+"transform",A);window.setTimeout(mxUtils.bind(this,function(){y()}),R)});mxEvent.addListener(V,"click",mxUtils.bind(this,function(C){var M=mxEvent.getSource(C);M!=P&&M!=q?(null!=k&&k(),y(),mxEvent.consume(C)):B()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(V.style,"transform",J)}),R/2);window.setTimeout(B,t?4E3:3E4);E=!0}return E};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};+EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,k,v){d=d.toDataURL("image/"+k);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<v&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",v));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,k,v,t){var x="jpeg"==k?"jpg":k;v=this.getBaseFilename(v)+(null!=g?".drawio":+"")+"."+x;d=this.createImageDataUri(d,g,k,t);this.saveData(v,x,d.substring(d.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));+this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,k,v,t,x){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=x?x:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=v?this.base64ToBlob(d,k):new Blob([d],{type:k}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==+k?mxUtils.popup(d,!0):(k.document.write(d),k.document.close(),k.document.execCommand("SaveAs",!0,g),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,k,v);else{var A=document.createElement("a");x=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof A.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var J=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);+x=65==(J?parseInt(J[2],10):!1)?!1:x}if(x||this.isOffline()){A.href=URL.createObjectURL(v?this.base64ToBlob(d,k):new Blob([d],{type:k}));x?A.download=g:A.setAttribute("target","_blank");document.body.appendChild(A);try{window.setTimeout(function(){URL.revokeObjectURL(A.href)},2E4),A.click(),A.parentNode.removeChild(A)}catch(D){}}else this.createEchoRequest(d,g,k,v,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,v,t,x){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,+d+(null!=k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=x?"&base64="+x:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(v?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,g,k,v,t,x,A,J){x=null!=x?x:!1;A=null!=A?A:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var D=mxUtils.bind(this,function(R,V,Q,P){try{if("_blank"==V)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,v);else if(null!=k&&"text/html"==k.substring(0,9)){var q=new EmbedDialog(this,d);this.showDialog(q.container,+450,240,!0,!0);q.init()}else{var y=window.open("about:blank");null==y?mxUtils.popup(d,!0):(y.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),y.document.close())}else if(V==App.MODE_DEVICE||"download"==V)this.doSaveLocalFile(d,R,k,v,null,J);else if(null!=R&&0<R.length){var B=mxUtils.bind(this,function(C){try{this.exportFile(d,R,k,v,V,C)}catch(M){this.handleError(M)}});null!=P?B(P):this.pickFolder(V,B)}}catch(C){this.handleError(C)}});t=[];x||t.push(App.MODE_BROWSER);A||t.push("_blank");+var E=new SaveDialog(this,g,mxUtils.bind(this,function(R,V,Q){D(R.value,V,R,Q);this.hideDialog(null,null,E.container)}),t,d,k,v);this.showDialog(E.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));E.init()};EditorUi.prototype.openInNewWindow=function(d,g,k){var v=window.open("about:blank");if(null==v||null==v.document)mxUtils.popup(d,!0);else{var t="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var x=mxUtils.parseXml(d).documentElement.style.backgroundColor;+""!=x&&(t="background: "+x+";")}t='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+t+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(x=k?d:btoa(unescape(encodeURIComponent(d))),v.document.write(t+'<img style="max-width:100%;" src="data:'+g+";base64,"+x+'"/></body></html>')):v.document.write(t+d+"</body></html>"):v.document.write(t+"<pre>"+mxUtils.htmlEntities(d,!1)+"</pre></body></html>");v.document.close()}};var c=EditorUi.prototype.addChromelessToolbarItems;+EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=d(mxUtils.bind(this,function(v){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;-mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var v=g.getBoundingClientRect();this.tagsDialog.style.left=v.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";v=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=v.zIndex;document.body.appendChild(this.tagsDialog);-this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(t)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var t=this.editor.graph.getAllTags();g.style.display=0<t.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=+mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var t=g.getBoundingClientRect();this.tagsDialog.style.left=t.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=t.zIndex;document.body.appendChild(this.tagsDialog);+this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(v)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var v=this.editor.graph.getAllTags();g.style.display=0<v.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,-"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var m=d(mxUtils.bind(this,function(t){var v=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",v);null!=this.exportDialog&&-(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)v.apply(this);else{this.exportDialog=document.createElement("div");var y=m.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=-"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=y.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=y.zIndex;var C=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",-speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});C.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",v);this.editor.exportToCanvas(mxUtils.bind(this,function(I){C.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var K=this.createImageDataUri(I,null,"png");I=document.createElement("img");I.style.maxWidth="140px";I.style.maxHeight="140px";-I.style.cursor="pointer";I.style.backgroundColor="white";I.setAttribute("title",mxResources.get("openInNewWindow"));I.setAttribute("border","0");I.setAttribute("src",K);this.exportDialog.appendChild(I);mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.openInNewWindow(K.substring(K.indexOf(",")+1),"image/png",!0);v.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(I){C.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),-this.exportDialog=null);this.handleError(I)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,m,t,v){this.isLocalFileSave()?this.saveLocalFile(m,d,t,v,g):this.saveRequest(d,g,mxUtils.bind(this,function(y,C){return this.createEchoRequest(m,y,t,v,g,C)}),m,v,t)};EditorUi.prototype.saveRequest=function(d,g,m,t,v,y,C){C=null!=C?C:!mxClient.IS_IOS||!navigator.standalone;var I=mxUtils.bind(this,-function(J,U,P,R){if("_blank"==U||null!=J&&0<J.length){var n=m("_blank"==U?null:J,U==App.MODE_DEVICE||"download"==U||null==U||"_blank"==U?"0":"1");null!=n&&(U==App.MODE_DEVICE||"download"==U||"_blank"==U?n.simulate(document,"_blank"):(P=mxUtils.bind(this,function(z){y=null!=y?y:"pdf"==g?"application/pdf":"image/"+g;if(null!=t)try{this.exportFile(t,J,y,!0,U,z)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&n.send(mxUtils.bind(this,function(){this.spinner.stop();-if(200<=n.getStatus()&&299>=n.getStatus())try{this.exportFile(n.getText(),J,y,!0,U,z)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(A){this.spinner.stop();this.handleError(A)}))}),null!=R?P(R):this.pickFolder(U,P)))}});v=[App.MODE_BROWSER];C||v.push("_blank");var K=new SaveDialog(this,d,mxUtils.bind(this,function(J,U,P){I(J.value,U,J,P);this.hideDialog(null,null,K.container)}),v,null,"application/pdf");this.showDialog(K.container,-420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));K.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,m,t,v,y){};EditorUi.prototype.getServiceForName=function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,g,m){g(null)};EditorUi.prototype.exportSvg=function(d,g,m,t,v,y,-C,I,K,J,U,P,R,n){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(O){Editor.addRetryToError(O,mxUtils.bind(this,function(){this.exportSvg(d,g,m,t,v,y,C,I,K,J,U,P,R,n)}));this.handleError(O)})))try{var z=this.editor.graph.isSelectionEmpty();m=null!=m?m:z;var A=g?null:this.editor.graph.background;A==mxConstants.NONE&&(A=null);null==A&&0==g&&(A=this.editor.graph.shapeBackgroundColor);var B=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&-(this.editor.graph.addForeignObjectWarning=function(){});var M=this.editor.graph.createSvgImageExport(v),S=this.editor.graph.getSvg(A,d,C,I,null,m,null,M,"blank"==J?"_blank":"self"==J?"_top":null,null,!R,U,P);this.editor.graph.addForeignObjectWarning=B;t&&this.editor.graph.addSvgShadow(S);var l=this.getBaseFilename()+(v?".drawio":"")+".svg";n=null!=n?n:mxUtils.bind(this,function(O){this.isLocalFileSave()||O.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(O)}))});var x=mxUtils.bind(this,function(O){this.spinner.stop();v&&O.setAttribute("content",this.getFileData(!0,null,null,null,m,K,null,null,null,null,null,d,C));n(Graph.xmlDeclaration+"\n"+(v?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(O))});this.editor.graph.mathEnabled&&this.editor.addMathCss(S);var F=mxUtils.bind(this,function(O){Editor.replaceSvgDataUris&&y&&EditorUi.embedSvgImages(O);Editor.foreignObjectImages&&-R?this.replaceAlternateContent(O,U,x):x(O)}),N=mxUtils.bind(this,function(O){y&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(O,F,this.thumbImageCache)):F(O)});R?this.embedFonts(S,N):(this.editor.addFontCss(S),N(S))}catch(O){this.handleError(O)}};EditorUi.prototype.replaceAlternateContent=function(d,g,m){function t(P,R,n,z,A){var B=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");B.setAttribute("x",R);B.setAttribute("y",-n+.5);B.setAttribute("width",z.width);B.setAttribute("height",z.height);null==B.setAttributeNS?B.setAttribute("xlink:href",A):B.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",A);P.replaceChild(B,P.lastChild);I()}function v(){if(C<U.length)U[C++](v)}var y="";g=d.getElementsByTagName("style");for(var C=0;C<g.length;C++)y+=g[C].innerHTML;g=d.getElementsByTagName("switch");counter=g.length;var I=mxUtils.bind(this,function(){counter--;0==counter&&m(d)}),K={},J={},U=[];for(C=0;C<g.length;C++)mxUtils.bind(this,-function(P){var R=P.getElementsByTagName("div");if(0<R.length)try{var n=R[0].cloneNode(!0),z=parseInt(n.style.marginLeft),A=parseInt(n.style.paddingTop),B=n.getElementsByTagName("div")[1],M=R=!1,S=n.style.alignItems,l=n.style.justifyContent;if(null!=n.style.writingMode){var x=n.style.writingMode;M="vertical-"==x.substring(0,9);R="-rl"==x.substring(x.length-3)}var F=!M&&"1px"==n.style.width||M&&"1px"==n.style.height;if(!M&&"1px"==n.style.height||M&&"1px"==n.style.width)n.style.alignItems=M&&R?"unsafe flex-end":-"unsafe flex-start";F&&(n.style.justifyContent="unsafe flex-start");n.style.paddingTop="";n.style.marginLeft="";var N=n.outerHTML,O=K[N];null==O&&(n.style.position="absolute",n.style.visibility="hidden",document.body.appendChild(n),x=1,x="1px"==n.style.width?B.offsetWidth:parseInt(n.style.width),F=1,F="1px"==n.style.height?B.offsetHeight:parseInt(n.style.height),document.body.removeChild(n),O=new mxRectangle(z,A,x,F),K[N]=O);"1px"==n.style.height&&("unsafe center"==S?A-=O.height/2:"unsafe flex-end"==-S&&(A-=O.height));if("1px"==n.style.width)if(!M&&"unsafe center"==l||M&&"unsafe center"==S)z-=O.width/2;else if(!M&&"unsafe flex-end"==l||M&&(!R&&"unsafe flex-end"==S||R&&"unsafe flex-start"==S))z-=O.width;O=new mxRectangle(z,A,O.width,O.height+parseInt(B.style.fontSize)/4);U.push(mxUtils.bind(this,function(Q){var V=J[N];null==V?Graph.htmlToPng(N,O.width,O.height,mxUtils.bind(this,function(T){t(P,z,A,O,T);J[N]=T;Q()}),y):(t(P,z,A,O,V),Q())}))}catch(Q){I()}else I()})(g[C]);0==counter&&m(d);C=0;v()};-EditorUi.prototype.addRadiobox=function(d,g,m,t,v,y,C){return this.addCheckbox(d,m,t,v,y,C,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,m,t,v,y,C,I){y=null!=y?y:!0;var K=document.createElement("input");K.style.marginRight="8px";K.style.marginTop="16px";K.setAttribute("type",C?"radio":"checkbox");C="geCheckbox-"+Editor.guid();K.id=C;null!=I&&K.setAttribute("name",I);m&&(K.setAttribute("checked","checked"),K.defaultChecked=!0);t&&K.setAttribute("disabled","disabled");y&&(d.appendChild(K),m=document.createElement("label"),-mxUtils.write(m,g),m.setAttribute("for",C),d.appendChild(m),v||mxUtils.br(d));return K};EditorUi.prototype.addEditButton=function(d,g){var m=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);m.style.marginLeft="24px";var t=this.getCurrentFile(),v="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(v=window.location.href);var y=document.createElement("select");y.style.maxWidth="200px";y.style.width="auto";y.style.marginLeft="8px";y.style.marginRight="10px";y.className=-"geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));y.appendChild(t);var C=document.createElement("option");C.setAttribute("value","custom");mxUtils.write(C,mxResources.get("custom")+"...");y.appendChild(C);d.appendChild(y);mxEvent.addListener(y,"change",mxUtils.bind(this,function(){if("custom"==y.value){var I=new FilenameDialog(this,v,mxResources.get("ok"),function(K){null!=K?(v=K,C.setAttribute("title",K)):(y.value="blank",C.removeAttribute("title"))},-mxResources.get("url"),null,null,null,null,function(){y.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(m,"change",mxUtils.bind(this,function(){m.checked&&(null==g||g.checked)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return m.checked?"blank"===y.value?"_blank":v:null},getEditInput:function(){return m},getEditSelect:function(){return y}}};EditorUi.prototype.addLinkSection=function(d,g){function m(){var I=-document.createElement("div");I.style.width="100%";I.style.height="100%";I.style.boxSizing="border-box";null!=y&&y!=mxConstants.NONE?(I.style.border="1px solid black",I.style.backgroundColor=y):(I.style.backgroundPosition="center center",I.style.backgroundRepeat="no-repeat",I.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");C.innerText="";C.appendChild(I)}mxUtils.write(d,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";-t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var v=document.createElement("option");v.setAttribute("value","auto");mxUtils.write(v,mxResources.get("automatic"));t.appendChild(v);v=document.createElement("option");v.setAttribute("value","blank");mxUtils.write(v,mxResources.get("openInNewWindow"));t.appendChild(v);v=document.createElement("option");v.setAttribute("value","self");mxUtils.write(v,mxResources.get("openInThisWindow"));t.appendChild(v);g&&(g=document.createElement("option"),-g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),t.appendChild(g));d.appendChild(t);mxUtils.write(d,mxResources.get("borderColor")+":");var y="#0000ff",C=null;C=mxUtils.button("",mxUtils.bind(this,function(I){this.pickColor(y||"none",function(K){y=K;m()});mxEvent.consume(I)}));m();C.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";C.style.marginLeft="4px";C.style.height="22px";C.style.width="22px";C.style.position="relative";-C.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";C.className="geColorBtn";d.appendChild(C);mxUtils.br(d);return{getColor:function(){return y},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,m,t,v,y){y=null!=y?y:[];m&&(y.push("lightbox=1"),"auto"!=d&&y.push("target="+d),null!=g&&g!=mxConstants.NONE&&y.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=t&&0<t.length&&y.push("edit="+encodeURIComponent(t)),-v&&y.push("layers=1"),this.editor.graph.foldingEnabled&&y.push("nav=1"));return y};EditorUi.prototype.createLink=function(d,g,m,t,v,y,C,I,K,J,U){var P=this.getCurrentFile();K=this.createUrlParameters(d,g,t,v,y,K);d=!0;null!=C?m="#U"+encodeURIComponent(C):I||null==P||""==P.getHash()?m="#R"+encodeURIComponent(m?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(m="#"+P.getHash(),d=!1);d&&null!=P&&null!=P.getTitle()&&P.getTitle()!=-this.defaultFilename&&K.push("title="+encodeURIComponent(P.getTitle()));J&&1<m.length&&(K.push("open="+m.substring(1)),m="");U&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());return(t&&(null!=C||null!=P&&P.getMode()!=App.MODE_GITHUB&&P.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+m};EditorUi.prototype.createHtml=-function(d,g,m,t,v,y,C,I,K,J,U,P,R){this.getBasenames();var n={};""!=v&&v!=mxConstants.NONE&&(n.highlight=v);"auto"!==t&&(n.target=t);J||(n.lightbox=!1);n.nav=this.editor.graph.foldingEnabled;m=parseInt(m);isNaN(m)||100==m||(n.zoom=m/100);m=[];C&&(m.push("pages"),n.resize=!0,null!=this.pages&&null!=this.currentPage&&(n.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(m.push("zoom"),n.resize=!0);I&&m.push("layers");K&&m.push("tags");null!=R&&(n["dark-mode"]=R);0<m.length&&(J&&m.push("lightbox"),-n.toolbar=m.join(" "));null!=U&&0<U.length&&(n.edit=U);null!=d?n.url=d:n.xml=this.getFileData(!0,null,null,null,null,!C);g='<div class="mxgraph" style="'+(y?"max-width:100%;":"")+(""!=m?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(n))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";P(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?-"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,m,t){var v=document.createElement("div");v.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("html"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";v.appendChild(y);var C=document.createElement("div");C.style.cssText=-"border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var I=document.createElement("input");I.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";I.setAttribute("value","url");I.setAttribute("type","radio");I.setAttribute("name","type-embedhtmldialog");y=I.cloneNode(!0);y.setAttribute("value","copy");C.appendChild(y);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));C.appendChild(K);mxUtils.br(C);C.appendChild(I);K=-document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));C.appendChild(K);var J=this.getCurrentFile();null==m&&null!=J&&J.constructor==window.DriveFile&&(K=document.createElement("a"),K.style.paddingLeft="12px",K.style.color="gray",K.style.cursor="pointer",mxUtils.write(K,mxResources.get("share")),C.appendChild(K),mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(J.getId(),J)})));y.setAttribute("checked","checked");null==-m&&I.setAttribute("disabled","disabled");v.appendChild(C);C=380;var U=this.addLinkSection(v),P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="8px";P.style.marginTop="16px";K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));P.appendChild(K);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));P.appendChild(K);K=document.createElement("option");K.setAttribute("value",-"auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected","selected");P.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(v,mxResources.get("appearance")+":");v.appendChild(P);mxUtils.br(v);C+=26;var R=this.addCheckbox(v,mxResources.get("zoom"),!0,null,!0);mxUtils.write(v,":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";v.appendChild(n);-var z=this.addCheckbox(v,mxResources.get("fit"),!0);K=null!=this.pages&&1<this.pages.length;var A=A=this.addCheckbox(v,mxResources.get("allPages"),K,!K),B=this.addCheckbox(v,mxResources.get("layers"),!0),M=this.addCheckbox(v,mxResources.get("tags"),!0),S=this.addCheckbox(v,mxResources.get("lightbox"),!0),l=null;if(EditorUi.enableHtmlEditOption){l=this.addEditButton(v,S);var x=l.getEditInput();x.style.marginBottom="16px";C+=50;mxEvent.addListener(S,"change",function(){S.checked?x.removeAttribute("disabled"):-x.setAttribute("disabled","disabled");x.checked&&S.checked?l.getEditSelect().removeAttribute("disabled"):l.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,v,mxUtils.bind(this,function(){t(I.checked?m:null,R.checked,n.value,U.getTarget(),U.getColor(),z.checked,A.checked,B.checked,M.checked,S.checked,null!=l?l.getLink():null,null!=P?P.value:null)}),null,d,g);this.showDialog(d.container,340,C,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,m,t,v,-y,C,I,K){var J=document.createElement("div");J.style.whiteSpace="nowrap";var U=document.createElement("h3");mxUtils.write(U,d||mxResources.get("publish"));U.style.width="100%";U.style.textAlign="center";U.style.marginTop="2px";U.style.marginBottom="20px";J.appendChild(U);var P=document.createElement("select");d=30;P.className="geBtn";P.style.marginBottom="8px";P.style.marginLeft="0px";P.style.width="100%";P.style.boxSizing="border-box";if(null==I||""==I.getHash())v=null!=v?v:"https://www.drawio.com/doc/faq/publish-diagram-as-link",-U=document.createElement("option"),mxUtils.write(U,mxResources.get("makeCopy")),U.setAttribute("value","copy"),P.appendChild(U);U=document.createElement("option");mxUtils.write(U,mxResources.get("authorizationRequired"));U.setAttribute("value","auth");P.appendChild(U);null!=I&&""!=I.getHash()||U.setAttribute("disabled","disabled");I=document.createElement("option");I.setAttribute("value","public");P.appendChild(I);null!=C?(mxUtils.write(I,mxResources.get("publicDiagramUrl")),I.setAttribute("title",-C),P.value="public"):(mxUtils.write(I,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),I.setAttribute("disabled","disabled"));J.appendChild(P);mxUtils.br(J);P.focus();var R=null,n=null;if(null!=g||null!=m)d+=30,mxUtils.write(J,mxResources.get("width")+":"),R=document.createElement("input"),R.setAttribute("type","text"),R.style.marginRight="16px",R.style.width="50px",R.style.marginLeft="6px",R.style.marginRight="16px",R.style.marginBottom="10px",R.value="100%",J.appendChild(R),-mxUtils.write(J,mxResources.get("height")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",n.style.marginLeft="6px",n.style.marginBottom="10px",n.value=m+"px",J.appendChild(n),mxUtils.br(J);var z=this.addLinkSection(J,t),A=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(d+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),A=this.addCheckbox(J,mxResources.get("selectedPage")+-": "+g));var B=this.addCheckbox(J,mxResources.get("lightbox"),!0,null,null,!t),M=this.addEditButton(J,B),S=M.getEditInput();t&&(S.style.marginLeft=B.style.marginLeft,B.style.display="none",d-=20);var l=this.addCheckbox(J,mxResources.get("layers"),!0);l.style.marginLeft=S.style.marginLeft;l.style.marginTop="8px";var x=this.addCheckbox(J,mxResources.get("tags"),!0);x.style.marginLeft=S.style.marginLeft;x.style.marginBottom="16px";x.style.marginTop="16px";mxEvent.addListener(B,"change",function(){B.checked?-(l.removeAttribute("disabled"),S.removeAttribute("disabled"),x.removeAttribute("disabled")):(l.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"));S.checked&&B.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});t=new CustomDialog(this,J,mxUtils.bind(this,function(){K(z.getTarget(),z.getColor(),null==A?!1:A.checked,B.checked,M.getLink(),l.checked,null!=R?R.value:null,null!=n?n.value:-null,x.checked,P.value)}),null,mxResources.get("create"),v,y);this.showDialog(t.container,340,296+d,!0,!0);null!=R?(R.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?R.select():document.execCommand("selectAll",!1,null)):null==P.parentNode;z.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,m,t,v){var y=document.createElement("div");y.style.whiteSpace="nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("image"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+-(v?"10":"4")+"px";y.appendChild(C);if(v){mxUtils.write(y,mxResources.get("zoom")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.style.marginRight="12px";I.value=this.lastExportZoom||"100%";y.appendChild(I);mxUtils.write(y,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=-this.lastExportBorder||"0";y.appendChild(K);mxUtils.br(y)}var J=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),U=t?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);C=this.editor.graph;var P=t?null:this.addCheckbox(y,mxResources.get("transparentBackground"),C.background==mxConstants.NONE||null==C.background);null!=P&&(P.style.marginBottom="16px");d=new CustomDialog(this,y,mxUtils.bind(this,function(){var R=-parseInt(I.value)/100||1,n=parseInt(K.value)||0;m(!J.checked,null!=U?U.checked:!1,null!=P?P.checked:!1,R,n)}),null,d,g);this.showDialog(d.container,300,(v?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,m,t,v,y,C,I,K){C=null!=C?C:Editor.defaultIncludeDiagram;var J=document.createElement("div");J.style.whiteSpace="nowrap";var U=this.editor.graph,P="jpeg"==I||"webp"==I?220:320,R=document.createElement("h3");mxUtils.write(R,d);R.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";-J.appendChild(R);mxUtils.write(J,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value=this.lastExportZoom||"100%";J.appendChild(n);mxUtils.write(J,mxResources.get("borderWidth")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.value=this.lastExportBorder||-"0";J.appendChild(z);mxUtils.br(J);var A=this.addCheckbox(J,mxResources.get("selectionOnly"),!1,U.isSelectionEmpty()),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.style.marginLeft="24px";B.setAttribute("disabled","disabled");B.setAttribute("type","checkbox");var M=document.createElement("select");M.style.marginTop="16px";M.style.marginLeft="8px";d=["selectionOnly","diagram","page"];for(R=0;R<d.length;R++)if(!U.isSelectionEmpty()||"selectionOnly"!=d[R]){var S=-document.createElement("option");mxUtils.write(S,mxResources.get(d[R]));S.setAttribute("value",d[R]);M.appendChild(S)}K?(mxUtils.write(J,mxResources.get("size")+":"),J.appendChild(M),mxUtils.br(J),P+=26,mxEvent.addListener(M,"change",function(){"selectionOnly"==M.value&&(A.checked=!0)})):y&&(J.appendChild(B),mxUtils.write(J,mxResources.get("crop")),mxUtils.br(J),P+=30,mxEvent.addListener(A,"change",function(){A.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));U.isSelectionEmpty()?-K&&(A.style.display="none",A.nextSibling.style.display="none",A.nextSibling.nextSibling.style.display="none",P-=30):(M.value="diagram",B.setAttribute("checked","checked"),B.defaultChecked=!0,mxEvent.addListener(A,"change",function(){M.value=A.checked?"selectionOnly":"diagram"}));var l=this.addCheckbox(J,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=I&&"webp"!=I),x=document.createElement("select");x.style.maxWidth="260px";x.style.marginLeft="8px";x.style.marginTop="16px";y=document.createElement("option");-y.setAttribute("value","light");mxUtils.write(y,mxResources.get("light"));x.appendChild(y);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));x.appendChild(K);"svg"==I?(y=document.createElement("option"),y.setAttribute("value","auto"),mxUtils.write(y,mxResources.get("automatic")),y.setAttribute("selected","selected"),x.appendChild(y)):Editor.isDarkMode()?K.setAttribute("selected","selected"):y.setAttribute("selected","selected");mxUtils.write(J,-mxResources.get("appearance")+":");J.appendChild(x);mxUtils.br(J);P+=26;var F=this.addCheckbox(J,mxResources.get("shadow"),U.shadowVisible),N=null;if("png"==I||"jpeg"==I||"webp"==I)N=this.addCheckbox(J,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),P+=30;var O=this.addCheckbox(J,mxResources.get("includeCopyOfMyDiagram")+":",C,null,null,"jpeg"!=I&&"webp"!=I),Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="28px";"png"==I||"svg"==I?(C=function(){O.checked?-Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled")},U=document.createElement("option"),U.setAttribute("value","allPages"),mxUtils.write(U,mxResources.get("allPages")),Q.appendChild(U),U=document.createElement("option"),U.setAttribute("value","currentPage"),mxUtils.write(U,mxResources.get("currentPage")),Q.appendChild(U),O.style.marginBottom="12px",Q.style.marginBottom="16px",J.appendChild(Q),mxUtils.br(J),P+=20,null!=this.lastEmbedInclude&&(Q.value=this.lastEmbedInclude),mxEvent.addListener(O,-"change",C),C()):O.style.marginBottom="16px";var V=document.createElement("input");V.style.marginBottom="16px";V.style.marginRight="8px";V.setAttribute("type","checkbox");var T=document.createElement("input");T.style.marginBottom="16px";T.style.marginRight="8px";T.setAttribute("type","checkbox");g&&(V.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,J.appendChild(V),mxUtils.write(J,mxResources.get("embedImages")),mxUtils.br(J),T.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,-J.appendChild(T),mxUtils.write(J,mxResources.get("embedFonts")),mxUtils.br(J),P+=50);var W=document.createElement("select");W.style.maxWidth="260px";W.style.marginLeft="8px";y=document.createElement("option");y.setAttribute("value","auto");mxUtils.write(y,mxResources.get("automatic"));W.appendChild(y);C=document.createElement("option");C.setAttribute("value","blank");mxUtils.write(C,mxResources.get("openInNewWindow"));W.appendChild(C);C=document.createElement("option");C.setAttribute("value","self");-mxUtils.write(C,mxResources.get("openInThisWindow"));W.appendChild(C);C=document.createElement("div");mxUtils.write(C,mxResources.get("LinksLost"));C.style.margin="7px";C.style.display="none";"svg"==I&&(mxUtils.write(J,mxResources.get("links")+":"),J.appendChild(W),J.appendChild(C),mxUtils.br(J),mxUtils.br(J),P+=50);m=new CustomDialog(this,J,mxUtils.bind(this,function(){this.lastExportBorder=z.value;this.lastExportZoom=n.value;this.lastEmbedImages=V.checked;this.lastEmbedFonts=T.checked;this.lastEmbedInclude=-Q.value;v(n.value,l.checked,!A.checked,F.checked,O.checked,V.checked&&g,z.value,B.checked,("png"==I||"svg"==I)&&"currentPage"==Q.value,W.value,null!=N?N.checked:null,null!=x?x.value:null,M.value,T.checked)}),null,m,t);this.showDialog(m.container,340,P,!0,!0,null,null,null,null,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,m,t,v){var y=document.createElement("div");y.style.whiteSpace=-"nowrap";var C=this.editor.graph;if(null!=g){var I=document.createElement("h3");mxUtils.write(I,g);I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(I)}var K=this.addCheckbox(y,mxResources.get("fit"),!0),J=this.addCheckbox(y,mxResources.get("shadow"),C.shadowVisible&&t,!t),U=this.addCheckbox(y,m),P=this.addCheckbox(y,mxResources.get("lightbox"),!0),R=this.addEditButton(y,P),n=R.getEditInput(),z=1<C.model.getChildCount(C.model.getRoot()),A=this.addCheckbox(y,-mxResources.get("layers"),z,!z);A.style.marginLeft=n.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(P,"change",function(){P.checked?(z&&A.removeAttribute("disabled"),n.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"));n.checked&&P.checked?R.getEditSelect().removeAttribute("disabled"):R.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,y,mxUtils.bind(this,function(){d(K.checked,-J.checked,U.checked,P.checked,R.getLink(),A.checked)}),null,mxResources.get("embed"),v);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,m,t,v,y,C,I){function K(n){var z=" ",A="";t&&(z=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+-EditorUi.lightboxHost+"/?client=1"+(null!=U?"&page="+U:"")+(v?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",A+="cursor:pointer;");d&&(A+="max-width:100%;");var B="";m&&(B=' width="'+Math.round(J.width)+'" height="'+Math.round(J.height)+'"');C('<img src="'+n+'"'+B+(""!=A?' style="'+A+'"':"")+z+"/>")}var J=this.editor.graph.getGraphBounds(),U=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(n){var z=t?this.getFileData(!0):null;n=-this.createImageDataUri(n,z,"png");K(n)}),null,null,null,mxUtils.bind(this,function(n){I({message:mxResources.get("unknownError")})}),null,!0,m?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),J.width*J.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var P="";m&&(P="&w="+Math.round(2*J.width)+"&h="+Math.round(2*J.height));var R=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+P+"&xml="+encodeURIComponent(g));R.send(mxUtils.bind(this,function(){200<=R.getStatus()&&-299>=R.getStatus()?K("data:image/png;base64,"+R.getText()):I({message:mxResources.get("unknownError")})}))}else I({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,m,t,v,y,C){var I=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!m,"auto"),K=I.getElementsByTagName("a");if(null!=K)for(var J=0;J<K.length;J++){var U=K[J].getAttribute("href");null!=U&&"#"==U.charAt(0)&&"_blank"==K[J].getAttribute("target")&&K[J].removeAttribute("target")}t&&-I.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(I);if(m){var P=" ",R="";t&&(P="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(v?"&edit=_blank":"")+(y?"&layers=1":-"")+"');}})(this);\"",R+="cursor:pointer;");d&&(R+="max-width:100%;");this.editor.convertImages(I,mxUtils.bind(this,function(n){C('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(n))+'"'+(""!=R?' style="'+R+'"':"")+P+"/>")}))}else R="",t&&(g=this.getSelectedPageIndex(),I.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+-EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(v?"&edit=_blank":"")+(y?"&layers=1":"")+"');}}})(this);"),R+="cursor:pointer;"),d&&(d=parseInt(I.getAttribute("width")),v=parseInt(I.getAttribute("height")),I.setAttribute("viewBox","-0.5 -0.5 "+d+" "+v),R+="max-width:100%;max-height:"+v+"px;",I.removeAttribute("height")),""!=R&&I.setAttribute("style",R),this.editor.addFontCss(I),this.editor.graph.mathEnabled&&this.editor.addMathCss(I),C(mxUtils.getXml(I))};EditorUi.prototype.timeSince=function(d){d=-Math.floor((new Date-d)/1E3);var g=Math.floor(d/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(d/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(d/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(d/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(d/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,g){if(null!=d){var m=null;if("diagram"==d.nodeName)m=-d;else if("mxfile"==d.nodeName){var t=d.getElementsByTagName("diagram");if(0<t.length){m=t[0];var v=g.getGlobalVariable;g.getGlobalVariable=function(y){return"page"==y?m.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==y?1:v.apply(this,arguments)}}}null!=m&&(d=Editor.parseDiagramNode(m))}t=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(y){}finally{this.editor.graph=t}return d};EditorUi.prototype.getSvgFileProperties=function(d){return this.getPngFileProperties(d)};-EditorUi.prototype.getPngFileProperties=function(d){var g=1,m=0;if(null!=d){if(d.hasAttribute("scale")){var t=parseFloat(d.getAttribute("scale"));!isNaN(t)&&0<t&&(g=t)}d.hasAttribute("border")&&(t=parseInt(d.getAttribute("border")),!isNaN(t)&&0<t&&(m=t))}return{scale:g,border:m}};EditorUi.prototype.getEmbeddedPng=function(d,g,m,t,v){try{var y=this.editor.graph,C=null;if(null!=m&&0<m.length)y=this.createTemporaryGraph(y.getStylesheet()),document.body.appendChild(y.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,-!0),y),C=m;else if(null!=this.pages&&this.currentPage!=this.pages[0]){y=this.createTemporaryGraph(y.getStylesheet());var I=y.getGlobalVariable;y.setBackgroundImage=this.editor.graph.setBackgroundImage;var K=this.pages[0];this.currentPage==K?y.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&y.setBackgroundImage(K.viewState.backgroundImage);y.getGlobalVariable=function(J){return"page"==J?K.getName():"pagenumber"==J?1:I.apply(this,arguments)};document.body.appendChild(y.container);-y.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var U=J.toDataURL("image/png");U=Editor.writeGraphModelToPng(U,"tEXt","mxfile",encodeURIComponent(C));d(U.substring(U.lastIndexOf(",")+1));y!=this.editor.graph&&y.container.parentNode.removeChild(y.container)}catch(P){null!=g&&g(P)}}),null,null,null,mxUtils.bind(this,function(J){null!=g&&g(J)}),null,null,t,null,y.shadowVisible,null,y,v,null,-null,null,"diagram",null)}catch(J){null!=g&&g(J)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,m,t,v,y,C,I,K,J,U,P,R){I=null!=I?I:!0;U=null!=U?U:0;C=null!=K?K:g.background;C==mxConstants.NONE&&(C=null);null==C&&"none"==g.getAdaptiveColors()&&(C="#ffffff");K=this.editor.graph.createSvgImageExport(null!=d);y=g.getSvg(C,J,U,null,null,y,null,K,null,g.shadowVisible||P,null,R,"diagram");(g.shadowVisible||P)&&g.addSvgShadow(y,null,null,0==U);null!=d&&y.setAttribute("content",d);null!=m&&y.setAttribute("resource",-m);var n=mxUtils.bind(this,function(z){z=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(z);null!=v&&v(z);return z});g.mathEnabled&&this.editor.addMathCss(y);if(null!=v)this.embedFonts(y,mxUtils.bind(this,function(z){I?this.editor.convertImages(z,mxUtils.bind(this,function(A){n(A)})):n(z)}));else return n(y)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(m){try{null!=m&&this.editor.addFontCss(d,m),g(d)}catch(t){g(d)}}))}catch(m){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,m,t,v,y,C,I,K,J,U,P,R){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(z){Editor.addRetryToError(z,mxUtils.bind(this,function(){this.exportImage(d,g,m,t,v,y,C,I,K,J,U,P,R)}));this.handleError(z)}))){var n=this.editor.graph.isSelectionEmpty();-m=null!=m?m:n;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(z){this.spinner.stop();try{this.saveCanvas(z,v?this.getFileData(!0,null,null,null,m,I,null,null,null,null,null,d,y):null,K,null==this.pages||0==this.pages.length,U)}catch(A){this.handleError(A)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}),null,m,d||1,g,t,null,null,y,C,J,P,R)}catch(z){this.spinner.stop(),this.handleError(z)}}};-EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.addLocalPagesToMapping=function(d){d=null!=d?d:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)d[this.pages[g].getId()]=this.pages[g].getId();return d};EditorUi.prototype.importXml=function(d,g,m,t,v,y,C){g=null!=g?g:0;m=null!=m?m:0;var I=[];try{var K=this.editor.graph;if(null!=d&&0<d.length){K.model.beginUpdate();try{var J=mxUtils.parseXml(d);d={};var U=this.editor.extractGraphModel(J.documentElement,-null!=this.pages);if(null!=U&&"mxfile"==U.nodeName&&null!=this.pages){var P=U.getElementsByTagName("diagram");if(1==P.length&&!y){if(U=Editor.parseDiagramNode(P[0]),null!=this.currentPage&&(d[P[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var R=P[0].getAttribute("name");null!=R&&""!=R&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,R))}}else if(0<P.length){y=[];var n=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[P[0].getAttribute("id")]=-this.pages[0].getId(),R=P[0].getAttribute("name"),null!=R&&""!=R&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],R)),U=Editor.parseDiagramNode(P[0]),t=!1,n=1);for(;n<P.length;n++){var z=P[n].getAttribute("id");P[n].removeAttribute("id");var A=this.updatePageRoot(new DiagramPage(P[n]));d[z]=P[n].getAttribute("id");var B=this.pages.length;null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[B+1]));K.model.execute(new ChangePage(this,A,A,B,!0));y.push(A)}this.updatePageLinks(d,-y)}}if(null!=U&&"mxGraphModel"===U.nodeName){I=K.importGraphModel(U,g,m,t);if(null!=I)for(this.addLocalPagesToMapping(d),n=0;n<I.length;n++)this.updatePageLinksForCell(d,I[n]);var M=K.parseBackgroundImage(U.getAttribute("backgroundImage"));if(null!=M&&null!=M.originalSrc){this.updateBackgroundPageLink(d,M);var S=new ChangePageSetup(this,null,M);S.ignoreColor=!0;K.model.execute(S)}}C&&K.pasteCellStyles(K.includeDescendants(I),K.defaultVertexStyle,K.defaultEdgeStyle)}finally{K.model.endUpdate()}}}catch(l){if(v)throw l;-this.handleError(l)}return I};EditorUi.prototype.updatePageLinks=function(d,g){for(var m=0;m<g.length;m++)this.updatePageLinksForCell(d,g[m].root),null!=g[m].viewState&&this.updateBackgroundPageLink(d,g[m].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var m=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=m&&(g.originalSrc="data:page/id,"+m)}}catch(t){}};EditorUi.prototype.updatePageLinksForCell=-function(d,g){var m=document.createElement("div"),t=this.editor.graph,v=t.getLinkForCell(g);null!=v&&t.setLinkForCell(g,this.updatePageLink(d,v));if(t.isHtmlLabel(g)){m.innerHTML=Graph.sanitizeHtml(t.getLabel(g));for(var y=m.getElementsByTagName("a"),C=!1,I=0;I<y.length;I++)v=y[I].getAttribute("href"),null!=v&&(y[I].setAttribute("href",this.updatePageLink(d,v)),C=!0);C&&t.labelChanged(g,m.innerHTML)}for(I=0;I<t.model.getChildCount(g);I++)this.updatePageLinksForCell(d,t.model.getChildAt(g,I))};EditorUi.prototype.updatePageLink=-function(d,g){if(Graph.isPageLink(g)){var m=d[g.substring(g.indexOf(",")+1)];g=null!=m?"data:page/id,"+m:null}else if("data:action/json,"==g.substring(0,17))try{var t=JSON.parse(g.substring(17));if(null!=t.actions){for(var v=0;v<t.actions.length;v++){var y=t.actions[v];if(null!=y.open&&Graph.isPageLink(y.open)){var C=y.open.substring(y.open.indexOf(",")+1);m=d[C];null!=m?y.open="data:page/id,"+m:null==this.getPageById(C)&&delete y.open}}g="data:action/json,"+JSON.stringify(t)}}catch(I){}return g};-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,m,t,v){var y=mxUtils.bind(this,function(C){this.loadingExtensions=!1;null!=m?m(C):this.handleError(C)});this.createTimeout(null,mxUtils.bind(this,function(C){t=null!=t?t:d.name;var I=mxUtils.bind(this,function(J){C.clear()&&y(J)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var J=this.isRemoteVisioFormat(t);-try{var U=t.lastIndexOf(".");if(0<=U&&U<t.length)t.substring(U+1).toUpperCase();else{var P=t.lastIndexOf("/");0<=P&&P<t.length&&(t=t.substring(P+1))}}catch(n){}if(J)if(null==VSD_CONVERT_URL||this.isOffline())I({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{J=new FormData;J.append("file1",d,t);var R=new XMLHttpRequest;R.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));R.responseType="blob";this.addRemoteServiceSecurityCheck(R);-null!=v&&R.setRequestHeader("x-convert-custom",v);R.onreadystatechange=mxUtils.bind(this,function(){if(4==R.readyState&&C.clear())if(200<=R.status&&299>=R.status)try{var n=R.response;if("text/xml"==n.type){var z=new FileReader;z.onload=mxUtils.bind(this,function(A){try{g(A.target.result)}catch(B){I({message:mxResources.get("errorLoadingFile")})}});z.readAsText(n)}else this.doImportVisio(n,g,I,t)}catch(A){I(A)}else try{""==R.responseType||"text"==R.responseType?I({message:R.responseText}):(z=new FileReader,-z.onload=function(){try{I({message:JSON.parse(z.result).Message})}catch(A){I(A)}},z.readAsText(R.response))}catch(A){I({})}});R.send(J)}else if(C.clear())try{this.doImportVisio(d,g,I,t)}catch(n){I(n)}}else I({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?K():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",K,null,null,null,I))}),y)};EditorUi.prototype.importGraphML=function(d,g,m){var t=-mxUtils.bind(this,function(v){this.loadingExtensions=!1;null!=m?m(v):this.handleError(v)});this.createTimeout(null,mxUtils.bind(this,function(v){var y=mxUtils.bind(this,function(I){v.clear()&&t(I)}),C=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(v.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,g,t)}catch(I){y(I)}else y({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?C():(this.loadingExtensions=!0,-mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",C,null,null,null,y))}),t)};EditorUi.prototype.exportVisio=function(d){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(m){this.loadingExtensions=!1;this.handleError(m)});this.createTimeout(null,mxUtils.bind(this,function(m){var t=mxUtils.bind(this,function(y){m.clear()&&g(y)}),v=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(m.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),-(new VsdxExport(this)).exportCurrentDiagrams(d)||t({message:mxResources.get("unknownError")})}catch(y){t(y)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(v,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",v,null,null,null,t))}),g)}};EditorUi.prototype.convertLucidChart=function(d,g,m){var t=mxUtils.bind(this,function(v){this.loadingExtensions=!1;-null!=m?m(v):this.handleError(v)});this.createTimeout(null,mxUtils.bind(this,function(v){var y=mxUtils.bind(this,function(I){v.clear()&&t(I)}),C=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(v.clear())if("undefined"!==typeof window.LucidImporter)try{var I=JSON.parse(d);g(LucidImporter.importState(I));try{if(null!=window.console&&"1"==urlParams.test){var K=[(new Date).toISOString(),"convertLucidChart",I];null!=I.state&&K.push(JSON.parse(I.state));if(null!=I.svgThumbs)for(var J=0;J<I.svgThumbs.length;J++)K.push(Editor.createSvgDataUri(I.svgThumbs[J]));-null!=I.thumb&&K.push(I.thumb);console.log.apply(console,K)}}catch(U){}}catch(U){null!=window.console&&console.error(U),y(U)}else y({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(C,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",-function(){mxscript("js/orgchart/mxOrgChartLayout.js",C,null,null,null,y)},null,null,null,y)},null,null,null,y)},null,null,null,y)},null,null,null,y):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",C,null,null,null,y))}),t)};EditorUi.prototype.createMermaidXml=function(d,g,m,t,v,y){var C=new Graph(document.createElement("div"));m=C.insertVertex(null,null,null,0,0,t,v,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+m+";");C.setAttributeForCell(m,"mermaidData",JSON.stringify({data:d,-config:g},null,2));null!=y&&C.setAttributeForCell(m,"templatePrompt",y);d=(new mxCodec).encode(C.getModel());return mxUtils.getXml(d)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(d,g,m){var t=0,v=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(y){var C=new mxXmlRequest("https://www.draw.io/generate/v2",d,"POST"),I=mxUtils.bind(this,function(K){y.clear()&&m(K)});C.send(mxUtils.bind(this,function(K){if(y.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,-function(){var U=mxUtils.trim(K.getText());this.generateMermaidImage(U,null,mxUtils.bind(this,function(P,R,n){this.tryAndHandle(mxUtils.bind(this,function(){y.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",d,"\nresult:",U),g(U,P,R,n))}),I)}),I,mxUtils.bind(this,function(P){3>t++?y.clear()&&v():I(P)}))}),I);else{var J={message:mxResources.get("error")+" "+K.getStatus()};try{J=JSON.parse(K.getText()),J=J.error}catch(U){}I(J)}}),I)}),m)});v()};EditorUi.prototype.extractMermaidDeclaration=-function(d){d=mxUtils.trim(d);"o\n\n"==d.substring(0,3)&&(d=d.substring(3));var g=d.split("```");g=1<g.length?g:d.split("<pre>");g=1<g.length?g:d.split("~~~");g=1<g.length?g:d.split("%%");g=1<g.length?g:d.split("(Begins)");d=mxUtils.trim(1>=g.length?d:g[1]);g=d.split("\n");var m=1<g.length?g[1]:null;if(null!=m){var t=m.indexOf("-");0<t&&(m=m.substring(0,t))}if(0<g.length&&"mermaid"==mxUtils.trim(g[0])||null!=m&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,m))g.shift(),d=mxUtils.trim(g.join("\n")),-g=d.split("\n");m=g[0].split(" ")[0].replace(/:$/,"");t=m.indexOf("-");0<t&&(m=m.substring(0,t));try{"mindmap"==m&&2<g.length&&(d=extractMermaidMindmap(g))}catch(v){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,m)&&(d=null);return d};EditorUi.prototype.generateMermaidImage=function(d,g,m,t,v){var y=mxUtils.bind(this,function(I){this.loadingMermaid=!1;null!=t?t(I):this.handleError(I)}),C=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);-g.securityLevel="strict";g.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=d.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme="dark");var I=mxUtils.bind(this,function(K){try{if(mxClient.IS_IE||mxClient.IS_IE11)K=K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<J.length&&"error"!=-J[0].getAttribute("aria-roledescription")){var U=parseFloat(J[0].getAttribute("width")),P=parseFloat(J[0].getAttribute("height"));if(isNaN(U)||isNaN(P))try{var R=J[0].getAttribute("viewBox").split(/\s+/);U=parseFloat(R[2]);P=parseFloat(R[3])}catch(n){U=U||100,P=P||100}m(this.convertDataUri(Editor.createSvgDataUri(K)),U,P)}else null!=v?v():t({message:mxResources.get("invalidInput")})}catch(n){t(n)}});mermaid.mermaidAPI.initialize(g);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),-d).then(function(K){I(K.svg)}).catch(function(K){null!=v?v(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(C,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(I){this.importXml(I,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",C,null,null,null,y)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",C,null,null,null,y))};-EditorUi.prototype.generatePlantUmlImage=function(d,g,m,t){function v(I,K,J){c1=I>>2;c2=(I&3)<<4|K>>4;c3=(K&15)<<2|J>>6;c4=J&63;r="";r+=y(c1&63);r+=y(c2&63);r+=y(c3&63);return r+=y(c4&63)}function y(I){if(10>I)return String.fromCharCode(48+I);I-=10;if(26>I)return String.fromCharCode(65+I);I-=26;if(26>I)return String.fromCharCode(97+I);I-=26;return 0==I?"-":1==I?"_":"?"}var C=new XMLHttpRequest;C.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(I){r="";-for(i=0;i<I.length;i+=3)r=i+2==I.length?r+v(I.charCodeAt(i),I.charCodeAt(i+1),0):i+1==I.length?r+v(I.charCodeAt(i),0,0):r+v(I.charCodeAt(i),I.charCodeAt(i+1),I.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(C.responseType="blob");C.onload=function(I){if(200<=this.status&&300>this.status)if("txt"==g)m(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(J){var U=new Image;U.onload=function(){try{var P=U.width,R=U.height;-if(0==P&&0==R){var n=K.result,z=n.indexOf(","),A=decodeURIComponent(escape(atob(n.substring(z+1)))),B=mxUtils.parseXml(A).getElementsByTagName("svg");0<B.length&&(P=parseFloat(B[0].getAttribute("width")),R=parseFloat(B[0].getAttribute("height")))}m(K.result,P,R)}catch(M){t(M)}};U.src=K.result};K.onerror=function(J){t(J)}}else t(I)};C.onerror=function(I){t(I)};C.send()};EditorUi.prototype.insertAsPreText=function(d,g,m){var t=this.editor.graph,v=null;t.getModel().beginUpdate();try{v=t.insertVertex(null,-null,"<pre>"+d+"</pre>",g,m,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(v,!0)}finally{t.getModel().endUpdate()}return v};EditorUi.prototype.insertTextAt=function(d,g,m,t,v,y,C,I){y=null!=y?y:!0;C=null!=C?C:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(R){4==R.readyState&&200<=-R.status&&299>=R.status&&this.editor.graph.setSelectionCells(this.insertTextAt(R.responseText,g,m,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(v||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var K=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var J=Editor.extractGraphModelFromPdf(d);if(null!=J&&0<J.length)return this.importXml(J,g,m,y,!0,I)}if(Editor.isPngDataUrl(d)&&(J=Editor.extractGraphModelFromPng(d),null!=J&&0<J.length))return this.importXml(J,g,m,y,-!0,I);if("data:image/svg+xml;"==d.substring(0,19))try{J=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(J=d.substring(d.indexOf(",")+1),J=window.atob&&!mxClient.IS_SF?atob(J):Base64.decode(J,!0)):J=decodeURIComponent(d.substring(d.indexOf(",")+1));var U=this.importXml(J,g,m,y,!0,I);if(0<U.length)return U}catch(R){}this.loadImage(d,mxUtils.bind(this,function(R){if("data:"==d.substring(0,5))this.resizeImage(R,d,mxUtils.bind(this,function(A,B,M){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(g),-K.snap(m),B,M,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(A)+";"))}),C,this.maxImageSize);else{var n=Math.min(1,Math.min(this.maxImageSize/R.width,this.maxImageSize/R.height)),z=Math.round(R.width*n);R=Math.round(R.height*n);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(g),K.snap(m),z,R,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+-d+";"))}}),mxUtils.bind(this,function(){var R=null;K.getModel().beginUpdate();try{R=K.insertVertex(K.getDefaultParent(),null,d,K.snap(g),K.snap(m),1,1,"text;"+(t?"html=1;":"")),K.updateCellSize(R),K.fireEvent(new mxEventObject("textInserted","cells",[R]))}finally{K.getModel().endUpdate()}K.setSelectionCell(R)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,m,y,null,I);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,-function(R){this.editor.graph.setSelectionCells(this.importXml(R,g,m,y,null,I))}),mxUtils.bind(this,function(R){this.handleError(R)}));else{K=this.editor.graph;v=null;K.getModel().beginUpdate();try{v=K.insertVertex(K.getDefaultParent(),null,"",K.snap(g),K.snap(m),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));K.fireEvent(new mxEventObject("textInserted","cells",[v]));t&&(d=K.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");v.value=d;K.updateCellSize(v);if(0<this.maxTextWidth&&-v.geometry.width>this.maxTextWidth){var P=K.getPreferredSizeForCell(v,this.maxTextWidth);v.geometry.width=P.width;v.geometry.height=P.height}Graph.isLink(v.value)&&K.setLinkForCell(v,v.value);v.geometry.width+=K.gridSize;v.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[v]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=-function(d){if("data:"==d.substring(0,5)){var g=d.indexOf(";");0<g&&(d=d.substring(0,g)+d.substring(d.indexOf(",",g+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,g){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,g){if(d&&Graph.fileSupport){if(null==this.importFileInputElt){var m=-document.createElement("input");m.setAttribute("type","file");mxEvent.addListener(m,"change",mxUtils.bind(this,function(){null!=m.files&&(this.importFiles(m.files,null,null,this.maxImageSize),m.type="",m.type="file",m.value="")}));m.style.display="none";document.body.appendChild(m);this.importFileInputElt=m}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(C,I){StorageFile.listFiles(this,"F",C,I)});window.openBrowserFile=-mxUtils.bind(this,function(C,I,K){StorageFile.getFileContent(this,C,I,K)});window.deleteBrowserFile=mxUtils.bind(this,function(C,I,K){StorageFile.deleteFile(this,C,I,K)});if(!g){var t=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(C){this.hideDialog(C)}));window.openFile.setConsumer(mxUtils.bind(this,function(C,I){null!=I&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(I)?(C=new Blob([C],{type:"application/octet-stream"}),this.importVisio(C,-mxUtils.bind(this,function(K){this.importXml(K,0,0,!0)}),null,I)):this.editor.graph.setSelectionCells(this.importXml(C,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var v=this.dialog,y=v.close;this.dialog.close=mxUtils.bind(this,function(C){Editor.useLocalStorage=t;y.apply(v,arguments);C&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=-function(d,g,m){var t=this,v=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(y){if(mxUtils.isEmptyObject(y.files))m();else{var C=0,I,K=!1;y.forEach(function(J,U){J=U.name.toLowerCase();"diagram/diagram.xml"==J?(K=!0,U.async("string").then(function(P){0==P.indexOf("<mxfile ")?g(P):m()})):0==J.indexOf("versions/")&&(J=parseInt(J.substr(9)),J>C&&(C=J,I=U))});0<C?I.async("string").then(function(J){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(J,-d.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,m):t.parseFileData(J,mxUtils.bind(this,function(U){4==U.readyState&&(200<=U.status&&299>=U.status?g(U.responseText):m())}),d.name):m()}):K||m()}},function(y){m(y)}):m()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?v():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",v,null,null,null,m))};EditorUi.prototype.importFile=function(d,g,m,t,v,y,C,-I,K,J,U,P){J=null!=J?J:!0;var R=!1,n=null,z=mxUtils.bind(this,function(A){var B=null;null!=A&&"<mxlibrary"==A.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,A,C)),this.showSidebar()):B=this.importXml(A,m,t,J,null,null!=P?mxEvent.isControlDown(P):null);null!=I&&I(B)});"image"==g.substring(0,5)?(K=!1,"image/png"==g.substring(0,9)&&(U=U?null:this.extractGraphModelFromPng(d),null!=U&&0<U.length&&(n=this.importXml(U,m,t,J,null,null!=P?mxEvent.isControlDown(P):null),K=!0)),K||(K=this.editor.graph,-U=d.indexOf(";"),0<U&&(d=d.substring(0,U)+d.substring(d.indexOf(",",U+1))),J&&K.isGridEnabled()&&(m=K.snap(m),t=K.snap(t)),U="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(U+="editableCssRules=.*;"),n=[K.insertVertex(null,null,"",m,t,v,y,U+"image="+d+";")])):/(\.*<graphml )/.test(d)?(R=!0,this.importGraphML(d,z)):null!=K&&null!=C&&EditorUi.isVisioFilename(C)?(R=!0,this.importVisio(K,z)):(new XMLHttpRequest).upload&&-this.isRemoteFileFormat(d,C)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(R=!0,g=mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?z(A.responseText):null!=I&&(I(null),this.showError(mxResources.get("error"),413==A.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,g,C):this.parseFile(K,g,C)):0==d.indexOf("PK")&&null!=K?(R=!0,this.importZipFile(K,z,mxUtils.bind(this,function(){n=-this.insertTextAt(this.validateFileData(d),m,t,!0,null,J);I(n)}))):/(\.v(sd|dx))($|\?)/i.test(C)||/(\.vs(s|x))($|\?)/i.test(C)||(n=this.insertTextAt(this.validateFileData(d),m,t,!0,null,J,null,null!=P?mxEvent.isControlDown(P):null));R||null==I||I(n);return n};EditorUi.prototype.importFiles=function(d,g,m,t,v,y,C,I,K,J,U,P,R){t=null!=t?t:this.maxImageSize;J=null!=J?J:this.maxImageBytes;var n=null!=g&&null!=m,z=!0;g=null!=g?g:0;m=null!=m?m:0;var A=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var B=U||-this.resampleThreshold,M=0;M<d.length;M++)if("image/svg"!==d[M].type.substring(0,9)&&"image/"===d[M].type.substring(0,6)&&d[M].size>B){A=!0;break}var S=mxUtils.bind(this,function(){var l=this.editor.graph,x=l.gridSize;v=null!=v?v:mxUtils.bind(this,function(T,W,X,Y,Z,aa,ea,ca,da){try{if(null!=T&&"<mxlibrary"==T.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,T,ea)),this.showSidebar(),null;this.isCompatibleString(T)&&1==d.length&&null!=R&&"drop"==R.type&&this.isBlankFile()&&-!this.canUndo()&&(n=!1,Y=X=0);return this.importFile(T,W,X,Y,Z,aa,ea,ca,da,n,P,R)}catch(ja){return this.handleError(ja),null}});y=null!=y?y:mxUtils.bind(this,function(T){l.setSelectionCells(T)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var F=d.length,N=F,O=[],Q=mxUtils.bind(this,function(T,W){O[T]=W;if(0==--N){this.spinner.stop();if(null!=I)I(O);else{var X=[];l.getModel().beginUpdate();try{for(T=0;T<O.length;T++){var Y=O[T]();null!=Y&&(X=X.concat(Y))}}finally{l.getModel().endUpdate()}}y(X)}}),-V=0;V<F;V++)mxUtils.bind(this,function(T){var W=d[T];if(null!=W){var X=new FileReader;X.onload=mxUtils.bind(this,function(Y){if(null==C||C(W))try{if("image/"==W.type.substring(0,6))if("image/svg"==W.type.substring(0,9)){var Z=Graph.clipSvgDataUri(Y.target.result),aa=Z.indexOf(","),ea=decodeURIComponent(escape(atob(Z.substring(aa+1)))),ca=mxUtils.parseXml(ea),da=ca.getElementsByTagName("svg");if(0<da.length){var ja=da[0],ba=P?null:ja.getAttribute("content");null!=ba&&"<"!=ba.charAt(0)&&"%"!=ba.charAt(0)&&-(ba=unescape(window.atob?atob(ba):Base64.decode(ba,!0)));null!=ba&&"%"==ba.charAt(0)&&(ba=decodeURIComponent(ba));null==ba||"<mxfile "!==ba.substring(0,8)&&"<mxGraphModel "!==ba.substring(0,14)?Q(T,mxUtils.bind(this,function(){try{if(null!=ca){var ua=ca.getElementsByTagName("svg");if(0<ua.length){var sa=ua[0],ha=sa.getAttribute("width"),pa=sa.getAttribute("height");ha=null!=ha&&"%"!=ha.charAt(ha.length-1)?parseFloat(ha):NaN;pa=null!=pa&&"%"!=pa.charAt(pa.length-1)?parseFloat(pa):NaN;var ra=sa.getAttribute("viewBox");-if(null==ra||0==ra.length)sa.setAttribute("viewBox","0 0 "+ha+" "+pa);else if(isNaN(ha)||isNaN(pa)){var xa=ra.split(" ");3<xa.length&&(ha=parseFloat(xa[2]),pa=parseFloat(xa[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(sa));var wa=Math.min(1,Math.min(t/Math.max(1,ha)),t/Math.max(1,pa)),fa=v(Z,W.type,g+T*x,m+T*x,Math.max(1,Math.round(ha*wa)),Math.max(1,Math.round(pa*wa)),W.name);if(null!=fa&&(isNaN(ha)||isNaN(pa))){var na=new Image;na.onload=mxUtils.bind(this,function(){ha=Math.max(1,na.width);pa=-Math.max(1,na.height);fa[0].geometry.width=ha;fa[0].geometry.height=pa;sa.setAttribute("viewBox","0 0 "+ha+" "+pa);Z=Editor.createSvgDataUri(mxUtils.getXml(sa));var Aa=Z.indexOf(";");0<Aa&&(Z=Z.substring(0,Aa)+Z.substring(Z.indexOf(",",Aa+1)));l.setCellStyles("image",Z,[fa[0]])});na.src=Editor.createSvgDataUri(mxUtils.getXml(sa))}return fa}}}catch(Aa){}return null})):Q(T,mxUtils.bind(this,function(){return v(ba,"text/xml",g+T*x,m+T*x,0,0,W.name)}))}else Q(T,mxUtils.bind(this,function(){return null}))}else{aa=-!1;if("image/png"==W.type){var ia=P?null:this.extractGraphModelFromPng(Y.target.result);if(null!=ia&&0<ia.length){var ka=new Image;ka.src=Y.target.result;Q(T,mxUtils.bind(this,function(){return v(ia,"text/xml",g+T*x,m+T*x,ka.width,ka.height,W.name)}));aa=!0}}aa||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):-this.loadImage(Y.target.result,mxUtils.bind(this,function(ua){this.resizeImage(ua,Y.target.result,mxUtils.bind(this,function(sa,ha,pa){Q(T,mxUtils.bind(this,function(){if(null!=sa&&sa.length<J){var ra=z&&this.isResampleImageSize(W.size,U)?Math.min(1,Math.min(t/ha,t/pa)):1;return v(sa,W.type,g+T*x,m+T*x,Math.round(ha*ra),Math.round(pa*ra),W.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),z,t,U,W.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=-Y.target.result,v(Z,W.type,g+T*x,m+T*x,240,160,W.name,function(ua){Q(T,function(){return ua})},W)}catch(ua){Q(T,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(ua,W)}else Q(T,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(W.name)?v(null,W.type,g+T*x,m+T*x,240,160,W.name,function(Y){Q(T,function(){return Y})},W):"image"==W.type.substring(0,5)||"application/pdf"==W.type?X.readAsDataURL(W):X.readAsText(W)}})(V)});if(A){A=[];for(M=0;M<d.length;M++)A.push(d[M]);-d=A;this.confirmImageResize(function(l){z=l;S()},K)}else S()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var m=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,v=function(y,C){if(y||g)mxSettings.setResizeImages(y?-C:null),mxSettings.save();m();d(C)};null==t||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(y){v(y,!0)},function(y){v(y,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):v(!1,t)};EditorUi.prototype.parseFile=function(d,g,-m){m=null!=m?m:d.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,g,m)});t.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,m){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){g(t)};t.send("format=xml&filename="+encodeURIComponent(m)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(v){}};-EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,m,t,v,y,C){v=null!=v?v:this.maxImageSize;var I=Math.max(1,d.width),K=Math.max(1,d.height),J=g;if(t&&this.isResampleImageSize(null!=C?C:g.length,y))try{var U=Math.max(I/v,K/v);if(1<U){var P=Math.round(I/U),R=Math.round(K/U),n=document.createElement("canvas");n.width=P;n.height=R;n.getContext("2d").drawImage(d,0,0,P,R);var z=n.toDataURL();if(z.length<g.length){var A=-document.createElement("canvas");A.width=P;A.height=R;var B=A.toDataURL();z!==B&&(g=z,I=P,K=R)}}}catch(M){}t&&J!=g&&v>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(d,g,m,t,v/1.5,y,C):m(g,I,K)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,m){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;g(t)};null!=m&&(t.onerror=m);t.src=d}catch(v){if(null!=-m)m(v);else throw v;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var k=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());k.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&-null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var d=this,g=this.editor.graph,m=g.isEnabled;g.isEnabled=function(){return m.apply(this,arguments)&&!d.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(x){var F=x.getEvent();return null==x.getState()&&!mxEvent.isMouseEvent(F)&&-!g.freehand.isDrawing()||mxEvent.isPopupTrigger(F)&&(null==x.getState()||mxEvent.isControlDown(F)||mxEvent.isShiftDown(F))});g.cellEditor.editPlantUmlData=function(x,F,N){var O=JSON.parse(N);F=new TextareaDialog(d,mxResources.get("plantUml")+":",O.data,function(Q){null!=Q&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(Q,O.format,function(V,T,W){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==O.format)g.labelChanged(x,"<pre>"+V+"</pre>"),g.updateCellSize(x,-!0);else{g.setCellStyles("image",d.convertDataUri(V),[x]);var X=g.model.getGeometry(x);null!=X&&(X=X.clone(),X.width=T,X.height=W,g.cellsResized([x],[X],!1))}g.setAttributeForCell(x,"plantUmlData",JSON.stringify({data:Q,format:O.format}))}finally{g.getModel().endUpdate()}},function(V){d.handleError(V)})},null,null,400,220);d.showDialog(F.container,420,300,!0,!0);F.init()};g.cellEditor.editMermaidData=function(x,F,N){var O=JSON.parse(N);F=new TextareaDialog(d,mxResources.get("mermaid")+":",O.data,-function(Q){null!=Q&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(Q,O.config,function(V,T,W){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",V,[x]);var X=g.model.getGeometry(x);null!=X&&(X=X.clone(),X.width=Math.max(X.width,T),X.height=Math.max(X.height,W),g.cellsResized([x],[X],!1));g.setAttributeForCell(x,"mermaidData",JSON.stringify({data:Q,config:O.config},null,2))}finally{g.getModel().endUpdate()}},function(V){d.handleError(V)})},-null,null,400,220);d.showDialog(F.container,420,300,!0,!0);F.init()};var t=g.cellEditor.startEditing;g.cellEditor.startEditing=function(x,F){try{var N=this.graph.getAttributeForCell(x,"plantUmlData");if(null!=N)this.editPlantUmlData(x,F,N);else if(N=this.graph.getAttributeForCell(x,"mermaidData"),null!=N&&window.isMermaidEnabled)this.editMermaidData(x,F,N);else{var O=g.getCellStyle(x);"1"==mxUtils.getValue(O,"metaEdit","0")?d.showDataDialog(x):t.apply(this,arguments)}}catch(Q){d.handleError(Q)}};-g.getLinkTitle=function(x){return d.getLinkTitle(x)};g.customLinkClicked=function(x,F){var N=!1;try{var O=this.getGraphBounds();d.handleCustomLink(x,F);N=!0;d.chromelessResize&&!O.equals(this.getGraphBounds())&&(d.chromelessResize(),this.scrollCellToVisible(F))}catch(Q){d.handleError(Q)}return N};var v=g.parseBackgroundImage;g.parseBackgroundImage=function(x){var F=v.apply(this,arguments);null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src});return F};var y=g.setBackgroundImage;g.setBackgroundImage=-function(x){null!=x&&null!=x.originalSrc&&(x=d.createImageForPageLink(x.originalSrc,d.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(x,F){x=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=x){var N=x.indexOf(",");if(0<N)for(x=x.substring(N+-1),F=F.getProperty("patches"),N=0;N<F.length;N++)if(null!=F[N][EditorUi.DIFF_UPDATE]&&null!=F[N][EditorUi.DIFF_UPDATE][x]||null!=F[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(F[N][EditorUi.DIFF_REMOVE],x)){g.refreshBackgroundImage();break}}}));var C=g.getBackgroundImageObject;g.getBackgroundImageObject=function(x,F){var N=C.apply(this,arguments);null!=N&&null!=N.originalSrc&&(N=F?d.createImageForPageLink(N.originalSrc,null,null,!0):{src:N.originalSrc});return N};this.isOffline()||"undefined"===typeof window.EditDataDialog||-(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var I=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(x){x=null!=x?x:"";"1"==urlParams.dev&&(x+=(0<x.length?"&":"?")+"dev=1");return I.apply(this,arguments)};var K=g.addClickHandler;g.addClickHandler=function(x,F,N){var O=F;F=-function(Q,V,T){if(null==V){var W=mxEvent.getSource(Q);"a"==W.nodeName.toLowerCase()&&(V=W.getAttribute("href"))}null!=V&&g.isCustomLink(V)&&(mxEvent.isTouchEvent(Q)||!mxEvent.isPopupTrigger(Q))&&g.customLinkClicked(V,T)&&mxEvent.consume(Q);null!=O&&O(Q,V,T)};K.call(this,x,F,N)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var J=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(x,F,N){g.isSelectionEmpty()&&-"simple"==Editor.currentTheme&&this.addMenuItems(x,["zoomIn","zoomOut","-"],null,N);J.apply(this,arguments);g.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(x,["-","addToScratchpad"],null,N);g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(x,["-","exitGroup","home"],null,N)};var U=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(x,F,N){if(d.editor.graph.isSelectionEmpty())U.apply(this,arguments),d.menus.addMenuItems(x,["copyAsImage"],-null,N);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(x,F,N):this.addPopupMenuArrangeItems(x,F,N),this.addMenuItems(x,"- cut copy copyAsImage duplicate -".split(" "),null,N),this.isShowCellEditItems()||this.addPopupDeleteItem(x,F,N),this.addMenuItems(x,["lockUnlock","-"],null,N),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(F)&&g.isCellEditable(F)&&(this.addSubmenu("editCell",x,null,mxResources.get("edit")),x.addSeparator(),g.getModel().isEdge(F))){this.addSubmenu("line",-x);var O=g.getModel().getGeometry(F);null!=O&&null!=O.points&&0<O.points.length&&this.addMenuItems(x,["clearWaypoints"],null,N)}1==g.getSelectionCount()&&this.addMenuItems(x,["enterGroup"],null,N);O=d.getSelectionState();null!=O.mergeCell?this.addMenuItem(x,"mergeCells"):(1<O.style.colspan||1<O.style.rowspan)&&this.addMenuItem(x,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=-function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var P=g.getExportVariables;g.getExportVariables=function(){var x=P.apply(this,arguments),F=d.getCurrentFile();null!=F&&(x.filename=F.getTitle());x.pagecount=null!=d.pages?d.pages.length:1;x.page=null!=d.currentPage?d.currentPage.getName():"";x.pagenumber=null!=d.pages&&null!=d.currentPage?-mxUtils.indexOf(d.pages,d.currentPage)+1:1;return x};var R=g.getGlobalVariable;g.getGlobalVariable=function(x){var F=d.getCurrentFile();return"filename"==x&&null!=F?F.getTitle():"page"==x&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==x?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==x?null!=d.pages?d.pages.length:1:R.apply(this,arguments)};var n=null,z=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var x=this.getCurrentFile(),-F=null!=x&&null!=x.getTitle()?x.getTitle():this.defaultFilename;n!=F&&x==z&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());n=F;z=x}));var A=g.labelLinkClicked;g.labelLinkClicked=function(x,F,N){var O=F.getAttribute("href");if(null==O||!g.isCustomLink(O)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))A.apply(this,arguments);else{if(!g.isEnabled()||null!=x&&g.isCellLocked(x.cell))g.customLinkClicked(O),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=-function(){var x=d.defaultFilename,F=d.getCurrentFile();null!=F&&(x=null!=F.getTitle()?F.getTitle():x);return x};var B=this.actions.get("print");B.setEnabled(!mxClient.IS_IOS||!navigator.standalone);B.visible=B.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=d(mxUtils.bind(this,function(v){var t=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",t);null!=this.exportDialog&&+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)t.apply(this);else{this.exportDialog=document.createElement("div");var x=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=+"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=x.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=x.zIndex;var A=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});A.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",t);this.editor.exportToCanvas(mxUtils.bind(this,function(J){A.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(J,null,"png");J=document.createElement("img");J.style.maxWidth="140px";J.style.maxHeight="140px";+J.style.cursor="pointer";J.style.backgroundColor="white";J.setAttribute("title",mxResources.get("openInNewWindow"));J.setAttribute("border","0");J.setAttribute("src",D);this.exportDialog.appendChild(J);mxEvent.addListener(J,"click",mxUtils.bind(this,function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){A.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),+this.exportDialog=null);this.handleError(J)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(v)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,v,t){this.isLocalFileSave()?this.saveLocalFile(k,d,v,t,g):this.saveRequest(d,g,mxUtils.bind(this,function(x,A){return this.createEchoRequest(k,x,v,t,g,A)}),k,t,v)};EditorUi.prototype.saveRequest=function(d,g,k,v,t,x,A){A=null!=A?A:!mxClient.IS_IOS||!navigator.standalone;var J=mxUtils.bind(this,+function(E,R,V,Q){if("_blank"==R||null!=E&&0<E.length){var P=k("_blank"==R?null:E,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=P&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?P.simulate(document,"_blank"):(V=mxUtils.bind(this,function(q){x=null!=x?x:"pdf"==g?"application/pdf":"image/"+g;if(null!=v)try{this.exportFile(v,E,x,!0,R,q)}catch(y){this.handleError(y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&P.send(mxUtils.bind(this,function(){this.spinner.stop();+if(200<=P.getStatus()&&299>=P.getStatus())try{this.exportFile(P.getText(),E,x,!0,R,q)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}))}),null!=Q?V(Q):this.pickFolder(R,V)))}});t=[App.MODE_BROWSER];A||t.push("_blank");var D=new SaveDialog(this,d,mxUtils.bind(this,function(E,R,V){J(E.value,R,E,V);this.hideDialog(null,null,D.container)}),t,null,"application/pdf");this.showDialog(D.container,+420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));D.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,v,t,x){};EditorUi.prototype.getServiceForName=function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,v,t,x,+A,J,D,E,R,V,Q,P){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(L){Editor.addRetryToError(L,mxUtils.bind(this,function(){this.exportSvg(d,g,k,v,t,x,A,J,D,E,R,V,Q,P)}));this.handleError(L)})))try{var q=this.editor.graph.isSelectionEmpty();k=null!=k?k:q;var y=g?null:this.editor.graph.background;y==mxConstants.NONE&&(y=null);null==y&&0==g&&(y=this.editor.graph.shapeBackgroundColor);var B=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&+(this.editor.graph.addForeignObjectWarning=function(){});var C=this.editor.graph.createSvgImageExport(t),M=this.editor.graph.getSvg(y,d,A,J,null,k,null,C,"blank"==E?"_blank":"self"==E?"_top":null,null,!Q,R,V);this.editor.graph.addForeignObjectWarning=B;v&&this.editor.graph.addSvgShadow(M);var T=this.getBaseFilename()+(t?".drawio":"")+".svg";P=null!=P?P:mxUtils.bind(this,function(L){this.isLocalFileSave()||L.length<=MAX_REQUEST_SIZE?this.saveData(T,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(L)}))});var m=mxUtils.bind(this,function(L){this.spinner.stop();t&&L.setAttribute("content",this.getFileData(!0,null,null,null,k,D,null,null,null,null,null,d,A));P(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(L))});this.editor.graph.mathEnabled&&this.editor.addMathCss(M);var z=mxUtils.bind(this,function(L){Editor.replaceSvgDataUris&&x&&EditorUi.embedSvgImages(L);Editor.foreignObjectImages&&+Q?this.replaceAlternateContent(L,R,m):m(L)}),I=mxUtils.bind(this,function(L){x&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(L,z,this.thumbImageCache)):z(L)});Q?this.embedFonts(M,I):(this.editor.addFontCss(M),I(M))}catch(L){this.handleError(L)}};EditorUi.prototype.replaceAlternateContent=function(d,g,k){function v(V,Q,P,q,y){var B=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");B.setAttribute("x",Q);B.setAttribute("y",+P+.5);B.setAttribute("width",q.width);B.setAttribute("height",q.height);null==B.setAttributeNS?B.setAttribute("xlink:href",y):B.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",y);V.replaceChild(B,V.lastChild);J()}function t(){if(A<R.length)R[A++](t)}var x="";g=d.getElementsByTagName("style");for(var A=0;A<g.length;A++)x+=g[A].innerHTML;g=d.getElementsByTagName("switch");counter=g.length;var J=mxUtils.bind(this,function(){counter--;0==counter&&k(d)}),D={},E={},R=[];for(A=0;A<g.length;A++)mxUtils.bind(this,+function(V){var Q=V.getElementsByTagName("div");if(0<Q.length)try{var P=Q[0].cloneNode(!0),q=parseInt(P.style.marginLeft),y=parseInt(P.style.paddingTop),B=P.getElementsByTagName("div")[1],C=Q=!1,M=P.style.alignItems,T=P.style.justifyContent;if(null!=P.style.writingMode){var m=P.style.writingMode;C="vertical-"==m.substring(0,9);Q="-rl"==m.substring(m.length-3)}var z=!C&&"1px"==P.style.width||C&&"1px"==P.style.height;if(!C&&"1px"==P.style.height||C&&"1px"==P.style.width)P.style.alignItems=C&&Q?"unsafe flex-end":+"unsafe flex-start";z&&(P.style.justifyContent="unsafe flex-start");P.style.paddingTop="";P.style.marginLeft="";var I=P.outerHTML,L=D[I];null==L&&(P.style.position="absolute",P.style.visibility="hidden",document.body.appendChild(P),m=1,m="1px"==P.style.width?B.offsetWidth:parseInt(P.style.width),z=1,z="1px"==P.style.height?B.offsetHeight:parseInt(P.style.height),document.body.removeChild(P),L=new mxRectangle(q,y,m,z),D[I]=L);"1px"==P.style.height&&("unsafe center"==M?y-=L.height/2:"unsafe flex-end"==+M&&(y-=L.height));if("1px"==P.style.width)if(!C&&"unsafe center"==T||C&&"unsafe center"==M)q-=L.width/2;else if(!C&&"unsafe flex-end"==T||C&&(!Q&&"unsafe flex-end"==M||Q&&"unsafe flex-start"==M))q-=L.width;L=new mxRectangle(q,y,L.width,L.height+parseInt(B.style.fontSize)/4);R.push(mxUtils.bind(this,function(N){var O=E[I];null==O?Graph.htmlToPng(I,L.width,L.height,mxUtils.bind(this,function(S){v(V,q,y,L,S);E[I]=S;N()}),x):(v(V,q,y,L,O),N())}))}catch(N){J()}else J()})(g[A]);0==counter&&k(d);A=0;t()};+EditorUi.prototype.addRadiobox=function(d,g,k,v,t,x,A){return this.addCheckbox(d,k,v,t,x,A,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,v,t,x,A,J){x=null!=x?x:!0;var D=document.createElement("input");D.style.marginRight="8px";D.style.marginTop="16px";D.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();D.id=A;null!=J&&D.setAttribute("name",J);k&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);v&&D.setAttribute("disabled","disabled");x&&(d.appendChild(D),k=document.createElement("label"),+mxUtils.write(k,g),k.setAttribute("for",A),d.appendChild(k),t||mxUtils.br(d));return D};EditorUi.prototype.addEditButton=function(d,g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var v=this.getCurrentFile(),t="";null!=v&&v.getMode()!=App.MODE_DEVICE&&v.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var x=document.createElement("select");x.style.maxWidth="200px";x.style.width="auto";x.style.marginLeft="8px";x.style.marginRight="10px";x.className=+"geBtn";v=document.createElement("option");v.setAttribute("value","blank");mxUtils.write(v,mxResources.get("makeCopy"));x.appendChild(v);var A=document.createElement("option");A.setAttribute("value","custom");mxUtils.write(A,mxResources.get("custom")+"...");x.appendChild(A);d.appendChild(x);mxEvent.addListener(x,"change",mxUtils.bind(this,function(){if("custom"==x.value){var J=new FilenameDialog(this,t,mxResources.get("ok"),function(D){null!=D?(t=D,A.setAttribute("title",D)):(x.value="blank",A.removeAttribute("title"))},+mxResources.get("url"),null,null,null,null,function(){x.value="blank"});this.showDialog(J.container,300,80,!0,!1);J.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==g||g.checked)?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===x.value?"_blank":t:null},getEditInput:function(){return k},getEditSelect:function(){return x}}};EditorUi.prototype.addLinkSection=function(d,g){function k(){var J=+document.createElement("div");J.style.width="100%";J.style.height="100%";J.style.boxSizing="border-box";null!=x&&x!=mxConstants.NONE?(J.style.border="1px solid black",J.style.backgroundColor=x):(J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");A.innerText="";A.appendChild(J)}mxUtils.write(d,mxResources.get("links")+":");var v=document.createElement("select");v.style.width="100px";v.style.padding="0px";+v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));v.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));v.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));v.appendChild(t);g&&(g=document.createElement("option"),+g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),v.appendChild(g));d.appendChild(v);mxUtils.write(d,mxResources.get("borderColor")+":");var x="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(J){this.pickColor(x||"none",function(D){x=D;k()});mxEvent.consume(J)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height="22px";A.style.width="22px";A.style.position="relative";+A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";d.appendChild(A);mxUtils.br(d);return{getColor:function(){return x},getTarget:function(){return v.value},focus:function(){v.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,v,t,x){x=null!=x?x:[];k&&(x.push("lightbox=1"),"auto"!=d&&x.push("target="+d),null!=g&&g!=mxConstants.NONE&&x.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=v&&0<v.length&&x.push("edit="+encodeURIComponent(v)),+t&&x.push("layers=1"),this.editor.graph.foldingEnabled&&x.push("nav=1"));return x};EditorUi.prototype.createLink=function(d,g,k,v,t,x,A,J,D,E,R){var V=this.getCurrentFile();D=this.createUrlParameters(d,g,v,t,x,D);d=!0;null!=A?k="#U"+encodeURIComponent(A):J||null==V||""==V.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+V.getHash(),d=!1);d&&null!=V&&null!=V.getTitle()&&V.getTitle()!=+this.defaultFilename&&D.push("title="+encodeURIComponent(V.getTitle()));E&&1<k.length&&(D.push("open="+k.substring(1)),k="");R&&null!=this.currentPage&&D.push("page-id="+this.currentPage.getId());return(v&&(null!=A||null!=V&&V.getMode()!=App.MODE_GITHUB&&V.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+k};EditorUi.prototype.createHtml=+function(d,g,k,v,t,x,A,J,D,E,R,V,Q){this.getBasenames();var P={};""!=t&&t!=mxConstants.NONE&&(P.highlight=t);"auto"!==v&&(P.target=v);E||(P.lightbox=!1);P.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(P.zoom=k/100);k=[];A&&(k.push("pages"),P.resize=!0,null!=this.pages&&null!=this.currentPage&&(P.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),P.resize=!0);J&&k.push("layers");D&&k.push("tags");null!=Q&&(P["dark-mode"]=Q);0<k.length&&(E&&k.push("lightbox"),+P.toolbar=k.join(" "));null!=R&&0<R.length&&(P.edit=R);null!=d?P.url=d:P.xml=this.getFileData(!0,null,null,null,null,!A);g='<div class="mxgraph" style="'+(x?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(P))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";V(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?+"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,v){var t=document.createElement("div");t.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("html"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(x);var A=document.createElement("div");A.style.cssText=+"border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var J=document.createElement("input");J.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";J.setAttribute("value","url");J.setAttribute("type","radio");J.setAttribute("name","type-embedhtmldialog");x=J.cloneNode(!0);x.setAttribute("value","copy");A.appendChild(x);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));A.appendChild(D);mxUtils.br(A);A.appendChild(J);D=+document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));A.appendChild(D);var E=this.getCurrentFile();null==k&&null!=E&&E.constructor==window.DriveFile&&(D=document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),A.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(E.getId(),E)})));x.setAttribute("checked","checked");null==+k&&J.setAttribute("disabled","disabled");t.appendChild(A);A=380;var R=this.addLinkSection(t),V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";V.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));V.appendChild(D);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));V.appendChild(D);D=document.createElement("option");D.setAttribute("value",+"auto");mxUtils.write(D,mxResources.get("automatic"));D.setAttribute("selected","selected");V.appendChild(D);D.setAttribute("selected","selected");mxUtils.write(t,mxResources.get("appearance")+":");t.appendChild(V);mxUtils.br(t);A+=26;var Q=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value="100%";t.appendChild(P);+var q=this.addCheckbox(t,mxResources.get("fit"),!0);D=null!=this.pages&&1<this.pages.length;var y=y=this.addCheckbox(t,mxResources.get("allPages"),D,!D),B=this.addCheckbox(t,mxResources.get("layers"),!0),C=this.addCheckbox(t,mxResources.get("tags"),!0),M=this.addCheckbox(t,mxResources.get("lightbox"),!0),T=null;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(t,M);var m=T.getEditInput();m.style.marginBottom="16px";A+=50;mxEvent.addListener(M,"change",function(){M.checked?m.removeAttribute("disabled"):+m.setAttribute("disabled","disabled");m.checked&&M.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,t,mxUtils.bind(this,function(){v(J.checked?k:null,Q.checked,P.value,R.getTarget(),R.getColor(),q.checked,y.checked,B.checked,C.checked,M.checked,null!=T?T.getLink():null,null!=V?V.value:null)}),null,d,g);this.showDialog(d.container,340,A,!0,!0);x.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,v,t,+x,A,J,D){var E=document.createElement("div");E.style.whiteSpace="nowrap";var R=document.createElement("h3");mxUtils.write(R,d||mxResources.get("publish"));R.style.width="100%";R.style.textAlign="center";R.style.marginTop="2px";R.style.marginBottom="20px";E.appendChild(R);var V=document.createElement("select");d=30;V.className="geBtn";V.style.marginBottom="8px";V.style.marginLeft="0px";V.style.width="100%";V.style.boxSizing="border-box";if(null==J||""==J.getHash())t=null!=t?t:"https://www.drawio.com/doc/faq/publish-diagram-as-link",+R=document.createElement("option"),mxUtils.write(R,mxResources.get("makeCopy")),R.setAttribute("value","copy"),V.appendChild(R);R=document.createElement("option");mxUtils.write(R,mxResources.get("authorizationRequired"));R.setAttribute("value","auth");V.appendChild(R);null!=J&&""!=J.getHash()||R.setAttribute("disabled","disabled");J=document.createElement("option");J.setAttribute("value","public");V.appendChild(J);null!=A?(mxUtils.write(J,mxResources.get("publicDiagramUrl")),J.setAttribute("title",+A),V.value="public"):(mxUtils.write(J,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),J.setAttribute("disabled","disabled"));E.appendChild(V);mxUtils.br(E);V.focus();var Q=null,P=null;if(null!=g||null!=k)d+=30,mxUtils.write(E,mxResources.get("width")+":"),Q=document.createElement("input"),Q.setAttribute("type","text"),Q.style.marginRight="16px",Q.style.width="50px",Q.style.marginLeft="6px",Q.style.marginRight="16px",Q.style.marginBottom="10px",Q.value="100%",E.appendChild(Q),+mxUtils.write(E,mxResources.get("height")+":"),P=document.createElement("input"),P.setAttribute("type","text"),P.style.width="50px",P.style.marginLeft="6px",P.style.marginBottom="10px",P.value=k+"px",E.appendChild(P),mxUtils.br(E);var q=this.addLinkSection(E,v),y=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(d+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),y=this.addCheckbox(E,mxResources.get("selectedPage")++": "+g));var B=this.addCheckbox(E,mxResources.get("lightbox"),!0,null,null,!v),C=this.addEditButton(E,B),M=C.getEditInput();v&&(M.style.marginLeft=B.style.marginLeft,B.style.display="none",d-=20);var T=this.addCheckbox(E,mxResources.get("layers"),!0);T.style.marginLeft=M.style.marginLeft;T.style.marginTop="8px";var m=this.addCheckbox(E,mxResources.get("tags"),!0);m.style.marginLeft=M.style.marginLeft;m.style.marginBottom="16px";m.style.marginTop="16px";mxEvent.addListener(B,"change",function(){B.checked?+(T.removeAttribute("disabled"),M.removeAttribute("disabled"),m.removeAttribute("disabled")):(T.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),m.setAttribute("disabled","disabled"));M.checked&&B.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});v=new CustomDialog(this,E,mxUtils.bind(this,function(){D(q.getTarget(),q.getColor(),null==y?!1:y.checked,B.checked,C.getLink(),T.checked,null!=Q?Q.value:null,null!=P?P.value:+null,m.checked,V.value)}),null,mxResources.get("create"),t,x);this.showDialog(v.container,340,296+d,!0,!0);null!=Q?(Q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Q.select():document.execCommand("selectAll",!1,null)):null==V.parentNode;q.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,v,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"++(t?"10":"4")+"px";x.appendChild(A);if(t){mxUtils.write(x,mxResources.get("zoom")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.style.marginRight="12px";J.value=this.lastExportZoom||"100%";x.appendChild(J);mxUtils.write(x,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=+this.lastExportBorder||"0";x.appendChild(D);mxUtils.br(x)}var E=this.addCheckbox(x,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=v?null:this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);A=this.editor.graph;var V=v?null:this.addCheckbox(x,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=V&&(V.style.marginBottom="16px");d=new CustomDialog(this,x,mxUtils.bind(this,function(){var Q=+parseInt(J.value)/100||1,P=parseInt(D.value)||0;k(!E.checked,null!=R?R.checked:!1,null!=V?V.checked:!1,Q,P)}),null,d,g);this.showDialog(d.container,300,(t?25:0)+(v?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,v,t,x,A,J,D){A=null!=A?A:Editor.defaultIncludeDiagram;var E=document.createElement("div");E.style.whiteSpace="nowrap";var R=this.editor.graph,V="jpeg"==J||"webp"==J?220:320,Q=document.createElement("h3");mxUtils.write(Q,d);Q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";+E.appendChild(Q);mxUtils.write(E,mxResources.get("zoom")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value=this.lastExportZoom||"100%";E.appendChild(P);mxUtils.write(E,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||+"0";E.appendChild(q);mxUtils.br(E);var y=this.addCheckbox(E,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.style.marginLeft="24px";B.setAttribute("disabled","disabled");B.setAttribute("type","checkbox");var C=document.createElement("select");C.style.marginTop="16px";C.style.marginLeft="8px";d=["selectionOnly","diagram","page"];for(Q=0;Q<d.length;Q++)if(!R.isSelectionEmpty()||"selectionOnly"!=d[Q]){var M=+document.createElement("option");mxUtils.write(M,mxResources.get(d[Q]));M.setAttribute("value",d[Q]);C.appendChild(M)}D?(mxUtils.write(E,mxResources.get("size")+":"),E.appendChild(C),mxUtils.br(E),V+=26,mxEvent.addListener(C,"change",function(){"selectionOnly"==C.value&&(y.checked=!0)})):x&&(E.appendChild(B),mxUtils.write(E,mxResources.get("crop")),mxUtils.br(E),V+=30,mxEvent.addListener(y,"change",function(){y.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?+D&&(y.style.display="none",y.nextSibling.style.display="none",y.nextSibling.nextSibling.style.display="none",V-=30):(C.value="diagram",B.setAttribute("checked","checked"),B.defaultChecked=!0,mxEvent.addListener(y,"change",function(){C.value=y.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(E,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=J&&"webp"!=J),m=document.createElement("select");m.style.maxWidth="260px";m.style.marginLeft="8px";m.style.marginTop="16px";x=document.createElement("option");+x.setAttribute("value","light");mxUtils.write(x,mxResources.get("light"));m.appendChild(x);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));m.appendChild(D);"svg"==J?(x=document.createElement("option"),x.setAttribute("value","auto"),mxUtils.write(x,mxResources.get("automatic")),x.setAttribute("selected","selected"),m.appendChild(x)):Editor.isDarkMode()?D.setAttribute("selected","selected"):x.setAttribute("selected","selected");mxUtils.write(E,+mxResources.get("appearance")+":");E.appendChild(m);mxUtils.br(E);V+=26;var z=this.addCheckbox(E,mxResources.get("shadow"),R.shadowVisible),I=null;if("png"==J||"jpeg"==J||"webp"==J)I=this.addCheckbox(E,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),V+=30;var L=this.addCheckbox(E,mxResources.get("includeCopyOfMyDiagram")+":",A,null,null,"jpeg"!=J&&"webp"!=J),N=document.createElement("select");N.style.maxWidth="260px";N.style.marginLeft="28px";"png"==J||"svg"==J?(A=function(){L.checked?+N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")},R=document.createElement("option"),R.setAttribute("value","allPages"),mxUtils.write(R,mxResources.get("allPages")),N.appendChild(R),R=document.createElement("option"),R.setAttribute("value","currentPage"),mxUtils.write(R,mxResources.get("currentPage")),N.appendChild(R),L.style.marginBottom="12px",N.style.marginBottom="16px",E.appendChild(N),mxUtils.br(E),V+=20,null!=this.lastEmbedInclude&&(N.value=this.lastEmbedInclude),mxEvent.addListener(L,+"change",A),A()):L.style.marginBottom="16px";var O=document.createElement("input");O.style.marginBottom="16px";O.style.marginRight="8px";O.setAttribute("type","checkbox");var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");g&&(O.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,E.appendChild(O),mxUtils.write(E,mxResources.get("embedImages")),mxUtils.br(E),S.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,+E.appendChild(S),mxUtils.write(E,mxResources.get("embedFonts")),mxUtils.br(E),V+=50);var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));U.appendChild(x);A=document.createElement("option");A.setAttribute("value","blank");mxUtils.write(A,mxResources.get("openInNewWindow"));U.appendChild(A);A=document.createElement("option");A.setAttribute("value","self");+mxUtils.write(A,mxResources.get("openInThisWindow"));U.appendChild(A);A=document.createElement("div");mxUtils.write(A,mxResources.get("LinksLost"));A.style.margin="7px";A.style.display="none";"svg"==J&&(mxUtils.write(E,mxResources.get("links")+":"),E.appendChild(U),E.appendChild(A),mxUtils.br(E),mxUtils.br(E),V+=50);k=new CustomDialog(this,E,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=P.value;this.lastEmbedImages=O.checked;this.lastEmbedFonts=S.checked;this.lastEmbedInclude=+N.value;t(P.value,T.checked,!y.checked,z.checked,L.checked,O.checked&&g,q.value,B.checked,("png"==J||"svg"==J)&&"currentPage"==N.value,U.value,null!=I?I.checked:null,null!=m?m.value:null,C.value,S.checked)}),null,k,v);this.showDialog(k.container,340,V,!0,!0,null,null,null,null,!0);P.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?P.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,v,t){var x=document.createElement("div");x.style.whiteSpace=+"nowrap";var A=this.editor.graph;if(null!=g){var J=document.createElement("h3");mxUtils.write(J,g);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";x.appendChild(J)}var D=this.addCheckbox(x,mxResources.get("fit"),!0),E=this.addCheckbox(x,mxResources.get("shadow"),A.shadowVisible&&v,!v),R=this.addCheckbox(x,k),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),Q=this.addEditButton(x,V),P=Q.getEditInput(),q=1<A.model.getChildCount(A.model.getRoot()),y=this.addCheckbox(x,+mxResources.get("layers"),q,!q);y.style.marginLeft=P.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(V,"change",function(){V.checked?(q&&y.removeAttribute("disabled"),P.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&V.checked?Q.getEditSelect().removeAttribute("disabled"):Q.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,x,mxUtils.bind(this,function(){d(D.checked,+E.checked,R.checked,V.checked,Q.getLink(),y.checked)}),null,mxResources.get("embed"),t);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,v,t,x,A,J){function D(P){var q=" ",y="";v&&(q=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"++EditorUi.lightboxHost+"/?client=1"+(null!=R?"&page="+R:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",y+="cursor:pointer;");d&&(y+="max-width:100%;");var B="";k&&(B=' width="'+Math.round(E.width)+'" height="'+Math.round(E.height)+'"');A('<img src="'+P+'"'+B+(""!=y?' style="'+y+'"':"")+q+"/>")}var E=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(P){var q=v?this.getFileData(!0):null;P=+this.createImageDataUri(P,q,"png");D(P)}),null,null,null,mxUtils.bind(this,function(P){J({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),E.width*E.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var V="";k&&(V="&w="+Math.round(2*E.width)+"&h="+Math.round(2*E.height));var Q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(v?"1":"0")+V+"&xml="+encodeURIComponent(g));Q.send(mxUtils.bind(this,function(){200<=Q.getStatus()&&+299>=Q.getStatus()?D("data:image/png;base64,"+Q.getText()):J({message:mxResources.get("unknownError")})}))}else J({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,v,t,x,A){var J=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),D=J.getElementsByTagName("a");if(null!=D)for(var E=0;E<D.length;E++){var R=D[E].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==D[E].getAttribute("target")&&D[E].removeAttribute("target")}v&&+J.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(J);if(k){var V=" ",Q="";v&&(V="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(t?"&edit=_blank":"")+(x?"&layers=1":+"")+"');}})(this);\"",Q+="cursor:pointer;");d&&(Q+="max-width:100%;");this.editor.convertImages(J,mxUtils.bind(this,function(P){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(P))+'"'+(""!=Q?' style="'+Q+'"':"")+V+"/>")}))}else Q="",v&&(g=this.getSelectedPageIndex(),J.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"++EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}}})(this);"),Q+="cursor:pointer;"),d&&(d=parseInt(J.getAttribute("width")),t=parseInt(J.getAttribute("height")),J.setAttribute("viewBox","-0.5 -0.5 "+d+" "+t),Q+="max-width:100%;max-height:"+t+"px;",J.removeAttribute("height")),""!=Q&&J.setAttribute("style",Q),this.editor.addFontCss(J),this.editor.graph.mathEnabled&&this.editor.addMathCss(J),A(mxUtils.getXml(J))};EditorUi.prototype.timeSince=function(d){d=+Math.floor((new Date-d)/1E3);var g=Math.floor(d/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(d/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(d/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(d/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(d/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,g){if(null!=d){var k=null;if("diagram"==d.nodeName)k=+d;else if("mxfile"==d.nodeName){var v=d.getElementsByTagName("diagram");if(0<v.length){k=v[0];var t=g.getGlobalVariable;g.getGlobalVariable=function(x){return"page"==x?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==x?1:t.apply(this,arguments)}}}null!=k&&(d=Editor.parseDiagramNode(k))}v=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(x){}finally{this.editor.graph=v}return d};EditorUi.prototype.getSvgFileProperties=function(d){return this.getPngFileProperties(d)};+EditorUi.prototype.getPngFileProperties=function(d){var g=1,k=0;if(null!=d){if(d.hasAttribute("scale")){var v=parseFloat(d.getAttribute("scale"));!isNaN(v)&&0<v&&(g=v)}d.hasAttribute("border")&&(v=parseInt(d.getAttribute("border")),!isNaN(v)&&0<v&&(k=v))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(d,g,k,v,t){try{var x=this.editor.graph,A=null;if(null!=k&&0<k.length)x=this.createTemporaryGraph(x.getStylesheet()),document.body.appendChild(x.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,+!0),x),A=k;else if(null!=this.pages&&this.currentPage!=this.pages[0]){x=this.createTemporaryGraph(x.getStylesheet());var J=x.getGlobalVariable;x.setBackgroundImage=this.editor.graph.setBackgroundImage;var D=this.pages[0];this.currentPage==D?x.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&x.setBackgroundImage(D.viewState.backgroundImage);x.getGlobalVariable=function(E){return"page"==E?D.getName():"pagenumber"==E?1:J.apply(this,arguments)};document.body.appendChild(x.container);+x.model.setRoot(D.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(E){try{null==A&&(A=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var R=E.toDataURL("image/png");R=Editor.writeGraphModelToPng(R,"tEXt","mxfile",encodeURIComponent(A));d(R.substring(R.lastIndexOf(",")+1));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container)}catch(V){null!=g&&g(V)}}),null,null,null,mxUtils.bind(this,function(E){null!=g&&g(E)}),null,null,v,null,x.shadowVisible,null,x,t,null,+null,null,"diagram",null)}catch(E){null!=g&&g(E)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,v,t,x,A,J,D,E,R,V,Q){J=null!=J?J:!0;R=null!=R?R:0;A=null!=D?D:g.background;A==mxConstants.NONE&&(A=null);null==A&&"none"==g.getAdaptiveColors()&&(A="#ffffff");D=this.editor.graph.createSvgImageExport(null!=d);x=g.getSvg(A,E,R,null,null,x,null,D,null,g.shadowVisible||V,null,Q,"diagram");(g.shadowVisible||V)&&g.addSvgShadow(x,null,null,0==R);null!=d&&x.setAttribute("content",d);null!=k&&x.setAttribute("resource",+k);var P=mxUtils.bind(this,function(q){q=(v?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(q);null!=t&&t(q);return q});g.mathEnabled&&this.editor.addMathCss(x);if(null!=t)this.embedFonts(x,mxUtils.bind(this,function(q){J?this.editor.convertImages(q,mxUtils.bind(this,function(y){P(y)})):P(q)}));else return P(x)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(v){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,v,t,x,A,J,D,E,R,V,Q){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(q){Editor.addRetryToError(q,mxUtils.bind(this,function(){this.exportImage(d,g,k,v,t,x,A,J,D,E,R,V,Q)}));this.handleError(q)}))){var P=this.editor.graph.isSelectionEmpty();+k=null!=k?k:P;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(q){this.spinner.stop();try{this.saveCanvas(q,t?this.getFileData(!0,null,null,null,k,J,null,null,null,null,null,d,x):null,D,null==this.pages||0==this.pages.length,R)}catch(y){this.handleError(y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,k,d||1,g,v,null,null,x,A,E,V,Q)}catch(q){this.spinner.stop(),this.handleError(q)}}};+EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.addLocalPagesToMapping=function(d){d=null!=d?d:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)d[this.pages[g].getId()]=this.pages[g].getId();return d};EditorUi.prototype.importXml=function(d,g,k,v,t,x,A){g=null!=g?g:0;k=null!=k?k:0;var J=[];try{var D=this.editor.graph;if(null!=d&&0<d.length){D.model.beginUpdate();try{var E=mxUtils.parseXml(d);d={};var R=this.editor.extractGraphModel(E.documentElement,+null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var V=R.getElementsByTagName("diagram");if(1==V.length&&!x){if(R=Editor.parseDiagramNode(V[0]),null!=this.currentPage&&(d[V[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Q=V[0].getAttribute("name");null!=Q&&""!=Q&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,Q))}}else if(0<V.length){x=[];var P=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[V[0].getAttribute("id")]=+this.pages[0].getId(),Q=V[0].getAttribute("name"),null!=Q&&""!=Q&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],Q)),R=Editor.parseDiagramNode(V[0]),v=!1,P=1);for(;P<V.length;P++){var q=V[P].getAttribute("id");V[P].removeAttribute("id");var y=this.updatePageRoot(new DiagramPage(V[P]));d[q]=V[P].getAttribute("id");var B=this.pages.length;null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[B+1]));D.model.execute(new ChangePage(this,y,y,B,!0));x.push(y)}this.updatePageLinks(d,+x)}}if(null!=R&&"mxGraphModel"===R.nodeName){J=D.importGraphModel(R,g,k,v);if(null!=J)for(this.addLocalPagesToMapping(d),P=0;P<J.length;P++)this.updatePageLinksForCell(d,J[P]);var C=D.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=C&&null!=C.originalSrc){this.updateBackgroundPageLink(d,C);var M=new ChangePageSetup(this,null,C);M.ignoreColor=!0;D.model.execute(M)}}A&&D.pasteCellStyles(D.includeDescendants(J),D.defaultVertexStyle,D.defaultEdgeStyle)}finally{D.model.endUpdate()}}}catch(T){if(t)throw T;+this.handleError(T)}return J};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(v){}};EditorUi.prototype.updatePageLinksForCell=+function(d,g){var k=document.createElement("div"),v=this.editor.graph,t=v.getLinkForCell(g);null!=t&&v.setLinkForCell(g,this.updatePageLink(d,t));if(v.isHtmlLabel(g)){k.innerHTML=Graph.sanitizeHtml(v.getLabel(g));for(var x=k.getElementsByTagName("a"),A=!1,J=0;J<x.length;J++)t=x[J].getAttribute("href"),null!=t&&(x[J].setAttribute("href",this.updatePageLink(d,t)),A=!0);A&&v.labelChanged(g,k.innerHTML)}for(J=0;J<v.model.getChildCount(g);J++)this.updatePageLinksForCell(d,v.model.getChildAt(g,J))};EditorUi.prototype.updatePageLink=+function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var v=JSON.parse(g.substring(17));if(null!=v.actions){for(var t=0;t<v.actions.length;t++){var x=v.actions[t];if(null!=x.open&&Graph.isPageLink(x.open)){var A=x.open.substring(x.open.indexOf(",")+1);k=d[A];null!=k?x.open="data:page/id,"+k:null==this.getPageById(A)&&delete x.open}}g="data:action/json,"+JSON.stringify(v)}}catch(J){}return g};+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,v,t){var x=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=k?k(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){v=null!=v?v:d.name;var J=mxUtils.bind(this,function(E){A.clear()&&x(E)}),D=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var E=this.isRemoteVisioFormat(v);+try{var R=v.lastIndexOf(".");if(0<=R&&R<v.length)v.substring(R+1).toUpperCase();else{var V=v.lastIndexOf("/");0<=V&&V<v.length&&(v=v.substring(V+1))}}catch(P){}if(E)if(null==VSD_CONVERT_URL||this.isOffline())J({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{E=new FormData;E.append("file1",d,v);var Q=new XMLHttpRequest;Q.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(v)?"?stencil=1":""));Q.responseType="blob";this.addRemoteServiceSecurityCheck(Q);+null!=t&&Q.setRequestHeader("x-convert-custom",t);Q.onreadystatechange=mxUtils.bind(this,function(){if(4==Q.readyState&&A.clear())if(200<=Q.status&&299>=Q.status)try{var P=Q.response;if("text/xml"==P.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{g(y.target.result)}catch(B){J({message:mxResources.get("errorLoadingFile")})}});q.readAsText(P)}else this.doImportVisio(P,g,J,v)}catch(y){J(y)}else try{""==Q.responseType||"text"==Q.responseType?J({message:Q.responseText}):(q=new FileReader,+q.onload=function(){try{J({message:JSON.parse(q.result).Message})}catch(y){J(y)}},q.readAsText(Q.response))}catch(y){J({})}});Q.send(E)}else if(A.clear())try{this.doImportVisio(d,g,J,v)}catch(P){J(P)}}else J({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?D():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",D,null,null,null,J))}),x)};EditorUi.prototype.importGraphML=function(d,g,k){var v=+mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var x=mxUtils.bind(this,function(J){t.clear()&&v(J)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,g,v)}catch(J){x(J)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,+mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))}),v)};EditorUi.prototype.exportVisio=function(d){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(k){this.loadingExtensions=!1;this.handleError(k)});this.createTimeout(null,mxUtils.bind(this,function(k){var v=mxUtils.bind(this,function(x){k.clear()&&g(x)}),t=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(k.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),+(new VsdxExport(this)).exportCurrentDiagrams(d)||v({message:mxResources.get("unknownError")})}catch(x){v(x)}else v({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(t,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,v))}),g)}};EditorUi.prototype.convertLucidChart=function(d,g,k){var v=mxUtils.bind(this,function(t){this.loadingExtensions=!1;+null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var x=mxUtils.bind(this,function(J){t.clear()&&v(J)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if("undefined"!==typeof window.LucidImporter)try{var J=JSON.parse(d);g(LucidImporter.importState(J));try{if(null!=window.console&&"1"==urlParams.test){var D=[(new Date).toISOString(),"convertLucidChart",J];null!=J.state&&D.push(JSON.parse(J.state));if(null!=J.svgThumbs)for(var E=0;E<J.svgThumbs.length;E++)D.push(Editor.createSvgDataUri(J.svgThumbs[E]));+null!=J.thumb&&D.push(J.thumb);console.log.apply(console,D)}}catch(R){}}catch(R){null!=window.console&&console.error(R),x(R)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(A,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",+function(){mxscript("js/orgchart/mxOrgChartLayout.js",A,null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))}),v)};EditorUi.prototype.createMermaidXml=function(d,g,k,v,t,x){var A=new Graph(document.createElement("div"));k=A.insertVertex(null,null,null,0,0,v,t,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+k+";");A.setAttributeForCell(k,"mermaidData",JSON.stringify({data:d,+config:g},null,2));null!=x&&A.setAttributeForCell(k,"templatePrompt",x);d=(new mxCodec).encode(A.getModel());return mxUtils.getXml(d)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(d,g,k){var v=0,t=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(x){var A=new mxXmlRequest("https://www.draw.io/generate/v2",d,"POST"),J=mxUtils.bind(this,function(D){x.clear()&&k(D)});A.send(mxUtils.bind(this,function(D){if(x.isAlive())if(200<=D.getStatus()&&299>=D.getStatus())this.tryAndHandle(mxUtils.bind(this,+function(){var R=mxUtils.trim(D.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(V,Q,P){this.tryAndHandle(mxUtils.bind(this,function(){x.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",d,"\nresult:",R),g(R,V,Q,P))}),J)}),J,mxUtils.bind(this,function(V){3>v++?x.clear()&&t():J(V)}))}),J);else{var E={message:mxResources.get("error")+" "+D.getStatus()};try{E=JSON.parse(D.getText()),E=E.error}catch(R){}J(E)}}),J)}),k)});t()};EditorUi.prototype.extractMermaidDeclaration=+function(d){d=mxUtils.trim(d);"o\n\n"==d.substring(0,3)&&(d=d.substring(3));var g=d.split("```");g=1<g.length?g:d.split("<pre>");g=1<g.length?g:d.split("~~~");g=1<g.length?g:d.split("%%");g=1<g.length?g:d.split("(Begins)");d=mxUtils.trim(1>=g.length?d:g[1]);g=d.split("\n");var k=1<g.length?g[1]:null;if(null!=k){var v=k.indexOf("-");0<v&&(k=k.substring(0,v))}if(0<g.length&&"mermaid"==mxUtils.trim(g[0])||null!=k&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k))g.shift(),d=mxUtils.trim(g.join("\n")),+g=d.split("\n");k=g[0].split(" ")[0].replace(/:$/,"");v=k.indexOf("-");0<v&&(k=k.substring(0,v));try{"mindmap"==k&&2<g.length&&(d=extractMermaidMindmap(g))}catch(t){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k)&&(d=null);return d};EditorUi.prototype.generateMermaidImage=function(d,g,k,v,t){var x=mxUtils.bind(this,function(J){this.loadingMermaid=!1;null!=v?v(J):this.handleError(J)}),A=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);+g.securityLevel="strict";g.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=d.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme="dark");var J=mxUtils.bind(this,function(D){try{if(mxClient.IS_IE||mxClient.IS_IE11)D=D.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var E=mxUtils.parseXml(D).getElementsByTagName("svg");if(0<E.length&&"error"!=+E[0].getAttribute("aria-roledescription")){var R=parseFloat(E[0].getAttribute("width")),V=parseFloat(E[0].getAttribute("height"));if(isNaN(R)||isNaN(V))try{var Q=E[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(Q[2]);V=parseFloat(Q[3])}catch(P){R=R||100,V=V||100}k(this.convertDataUri(Editor.createSvgDataUri(D)),R,V)}else null!=t?t():v({message:mxResources.get("invalidInput")})}catch(P){v(P)}});mermaid.mermaidAPI.initialize(g);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),+d).then(function(D){J(D.svg)}).catch(function(D){null!=t?t(D):v(D)})}catch(D){v(D)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(A,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(J){this.importXml(J,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",A,null,null,null,x)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))};+EditorUi.prototype.generatePlantUmlImage=function(d,g,k,v){function t(J,D,E){c1=J>>2;c2=(J&3)<<4|D>>4;c3=(D&15)<<2|E>>6;c4=E&63;r="";r+=x(c1&63);r+=x(c2&63);r+=x(c3&63);return r+=x(c4&63)}function x(J){if(10>J)return String.fromCharCode(48+J);J-=10;if(26>J)return String.fromCharCode(65+J);J-=26;if(26>J)return String.fromCharCode(97+J);J-=26;return 0==J?"-":1==J?"_":"?"}var A=new XMLHttpRequest;A.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(J){r="";+for(i=0;i<J.length;i+=3)r=i+2==J.length?r+t(J.charCodeAt(i),J.charCodeAt(i+1),0):i+1==J.length?r+t(J.charCodeAt(i),0,0):r+t(J.charCodeAt(i),J.charCodeAt(i+1),J.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(J){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(E){var R=new Image;R.onload=function(){try{var V=R.width,Q=R.height;+if(0==V&&0==Q){var P=D.result,q=P.indexOf(","),y=decodeURIComponent(escape(atob(P.substring(q+1)))),B=mxUtils.parseXml(y).getElementsByTagName("svg");0<B.length&&(V=parseFloat(B[0].getAttribute("width")),Q=parseFloat(B[0].getAttribute("height")))}k(D.result,V,Q)}catch(C){v(C)}};R.src=D.result};D.onerror=function(E){v(E)}}else v(J)};A.onerror=function(J){v(J)};A.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var v=this.editor.graph,t=null;v.getModel().beginUpdate();try{t=v.insertVertex(null,+null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),v.updateCellSize(t,!0)}finally{v.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(d,g,k,v,t,x,A,J){x=null!=x?x:!0;A=null!=A?A:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(Q){4==Q.readyState&&200<=+Q.status&&299>=Q.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Q.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var D=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var E=Editor.extractGraphModelFromPdf(d);if(null!=E&&0<E.length)return this.importXml(E,g,k,x,!0,J)}if(Editor.isPngDataUrl(d)&&(E=Editor.extractGraphModelFromPng(d),null!=E&&0<E.length))return this.importXml(E,g,k,x,+!0,J);if("data:image/svg+xml;"==d.substring(0,19))try{E=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(E=d.substring(d.indexOf(",")+1),E=window.atob&&!mxClient.IS_SF?atob(E):Base64.decode(E,!0)):E=decodeURIComponent(d.substring(d.indexOf(",")+1));var R=this.importXml(E,g,k,x,!0,J);if(0<R.length)return R}catch(Q){}this.loadImage(d,mxUtils.bind(this,function(Q){if("data:"==d.substring(0,5))this.resizeImage(Q,d,mxUtils.bind(this,function(y,B,C){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(g),+D.snap(k),B,C,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(y)+";"))}),A,this.maxImageSize);else{var P=Math.min(1,Math.min(this.maxImageSize/Q.width,this.maxImageSize/Q.height)),q=Math.round(Q.width*P);Q=Math.round(Q.height*P);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(g),D.snap(k),q,Q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="++d+";"))}}),mxUtils.bind(this,function(){var Q=null;D.getModel().beginUpdate();try{Q=D.insertVertex(D.getDefaultParent(),null,d,D.snap(g),D.snap(k),1,1,"text;"+(v?"html=1;":"")),D.updateCellSize(Q),D.fireEvent(new mxEventObject("textInserted","cells",[Q]))}finally{D.getModel().endUpdate()}D.setSelectionCell(Q)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,x,null,J);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,+function(Q){this.editor.graph.setSelectionCells(this.importXml(Q,g,k,x,null,J))}),mxUtils.bind(this,function(Q){this.handleError(Q)}));else{D=this.editor.graph;t=null;D.getModel().beginUpdate();try{t=D.insertVertex(D.getDefaultParent(),null,"",D.snap(g),D.snap(k),1,1,"text;whiteSpace=wrap;"+(v?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[t]));v&&(d=D.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");t.value=d;D.updateCellSize(t);if(0<this.maxTextWidth&&+t.geometry.width>this.maxTextWidth){var V=D.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=V.width;t.geometry.height=V.height}Graph.isLink(t.value)&&D.setLinkForCell(t,t.value);t.geometry.width+=D.gridSize;t.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=+function(d){if("data:"==d.substring(0,5)){var g=d.indexOf(";");0<g&&(d=d.substring(0,g)+d.substring(d.indexOf(",",g+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,g){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,g){if(d&&Graph.fileSupport){if(null==this.importFileInputElt){var k=+document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(A,J){StorageFile.listFiles(this,"F",A,J)});window.openBrowserFile=+mxUtils.bind(this,function(A,J,D){StorageFile.getFileContent(this,A,J,D)});window.deleteBrowserFile=mxUtils.bind(this,function(A,J,D){StorageFile.deleteFile(this,A,J,D)});if(!g){var v=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(A){this.hideDialog(A)}));window.openFile.setConsumer(mxUtils.bind(this,function(A,J){null!=J&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(J)?(A=new Blob([A],{type:"application/octet-stream"}),this.importVisio(A,+mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,J)):this.editor.graph.setSelectionCells(this.importXml(A,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var t=this.dialog,x=t.close;this.dialog.close=mxUtils.bind(this,function(A){Editor.useLocalStorage=v;x.apply(t,arguments);A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=+function(d,g,k){var v=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(x){if(mxUtils.isEmptyObject(x.files))k();else{var A=0,J,D=!1;x.forEach(function(E,R){E=R.name.toLowerCase();"diagram/diagram.xml"==E?(D=!0,R.async("string").then(function(V){0==V.indexOf("<mxfile ")?g(V):k()})):0==E.indexOf("versions/")&&(E=parseInt(E.substr(9)),E>A&&(A=E,J=R))});0<A?J.async("string").then(function(E){(new XMLHttpRequest).upload&&v.isRemoteFileFormat(E,+d.name)?v.isOffline()?v.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):v.parseFileData(E,mxUtils.bind(this,function(R){4==R.readyState&&(200<=R.status&&299>=R.status?g(R.responseText):k())}),d.name):k()}):D||k()}},function(x){k(x)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,k))};EditorUi.prototype.importFile=function(d,g,k,v,t,x,A,+J,D,E,R,V){E=null!=E?E:!0;var Q=!1,P=null,q=mxUtils.bind(this,function(y){var B=null;null!=y&&"<mxlibrary"==y.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,y,A)),this.showSidebar()):B=this.importXml(y,k,v,E,null,null!=V?mxEvent.isControlDown(V):null);null!=J&&J(B)});"image"==g.substring(0,5)?(D=!1,"image/png"==g.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(d),null!=R&&0<R.length&&(P=this.importXml(R,k,v,E,null,null!=V?mxEvent.isControlDown(V):null),D=!0)),D||(D=this.editor.graph,+R=d.indexOf(";"),0<R&&(d=d.substring(0,R)+d.substring(d.indexOf(",",R+1))),E&&D.isGridEnabled()&&(k=D.snap(k),v=D.snap(v)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(R+="editableCssRules=.*;"),P=[D.insertVertex(null,null,"",k,v,t,x,R+"image="+d+";")])):/(\.*<graphml )/.test(d)?(Q=!0,this.importGraphML(d,q)):null!=D&&null!=A&&EditorUi.isVisioFilename(A)?(Q=!0,this.importVisio(D,q)):(new XMLHttpRequest).upload&&+this.isRemoteFileFormat(d,A)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Q=!0,g=mxUtils.bind(this,function(y){4==y.readyState&&(200<=y.status&&299>=y.status?q(y.responseText):null!=J&&(J(null),this.showError(mxResources.get("error"),413==y.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,g,A):this.parseFile(D,g,A)):0==d.indexOf("PK")&&null!=D?(Q=!0,this.importZipFile(D,q,mxUtils.bind(this,function(){P=+this.insertTextAt(this.validateFileData(d),k,v,!0,null,E);J(P)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(P=this.insertTextAt(this.validateFileData(d),k,v,!0,null,E,null,null!=V?mxEvent.isControlDown(V):null));Q||null==J||J(P);return P};EditorUi.prototype.importFiles=function(d,g,k,v,t,x,A,J,D,E,R,V,Q){v=null!=v?v:this.maxImageSize;E=null!=E?E:this.maxImageBytes;var P=null!=g&&null!=k,q=!0;g=null!=g?g:0;k=null!=k?k:0;var y=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var B=R||+this.resampleThreshold,C=0;C<d.length;C++)if("image/svg"!==d[C].type.substring(0,9)&&"image/"===d[C].type.substring(0,6)&&d[C].size>B){y=!0;break}var M=mxUtils.bind(this,function(){var T=this.editor.graph,m=T.gridSize;t=null!=t?t:mxUtils.bind(this,function(S,U,W,X,Z,Y,ba,ea,ca){try{if(null!=S&&"<mxlibrary"==S.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,S,ba)),this.showSidebar(),null;this.isCompatibleString(S)&&1==d.length&&null!=Q&&"drop"==Q.type&&this.isBlankFile()&&+!this.canUndo()&&(P=!1,X=W=0);return this.importFile(S,U,W,X,Z,Y,ba,ea,ca,P,V,Q)}catch(fa){return this.handleError(fa),null}});x=null!=x?x:mxUtils.bind(this,function(S){T.setSelectionCells(S)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var z=d.length,I=z,L=[],N=mxUtils.bind(this,function(S,U){L[S]=U;if(0==--I){this.spinner.stop();if(null!=J)J(L);else{var W=[];T.getModel().beginUpdate();try{for(S=0;S<L.length;S++){var X=L[S]();null!=X&&(W=W.concat(X))}}finally{T.getModel().endUpdate()}}x(W)}}),+O=0;O<z;O++)mxUtils.bind(this,function(S){var U=d[S];if(null!=U){var W=new FileReader;W.onload=mxUtils.bind(this,function(X){if(null==A||A(U))try{if("image/"==U.type.substring(0,6))if("image/svg"==U.type.substring(0,9)){var Z=Graph.clipSvgDataUri(X.target.result),Y=Z.indexOf(","),ba=decodeURIComponent(escape(atob(Z.substring(Y+1)))),ea=mxUtils.parseXml(ba),ca=ea.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],aa=V?null:fa.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&+(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,14)?N(S,mxUtils.bind(this,function(){try{if(null!=ea){var pa=ea.getElementsByTagName("svg");if(0<pa.length){var oa=pa[0],ha=oa.getAttribute("width"),xa=oa.getAttribute("height");ha=null!=ha&&"%"!=ha.charAt(ha.length-1)?parseFloat(ha):NaN;xa=null!=xa&&"%"!=xa.charAt(xa.length-1)?parseFloat(xa):NaN;var qa=oa.getAttribute("viewBox");+if(null==qa||0==qa.length)oa.setAttribute("viewBox","0 0 "+ha+" "+xa);else if(isNaN(ha)||isNaN(xa)){var ua=qa.split(" ");3<ua.length&&(ha=parseFloat(ua[2]),xa=parseFloat(ua[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(oa));var ya=Math.min(1,Math.min(v/Math.max(1,ha)),v/Math.max(1,xa)),ja=t(Z,U.type,g+S*m,k+S*m,Math.max(1,Math.round(ha*ya)),Math.max(1,Math.round(xa*ya)),U.name);if(null!=ja&&(isNaN(ha)||isNaN(xa))){var ma=new Image;ma.onload=mxUtils.bind(this,function(){ha=Math.max(1,ma.width);xa=+Math.max(1,ma.height);ja[0].geometry.width=ha;ja[0].geometry.height=xa;oa.setAttribute("viewBox","0 0 "+ha+" "+xa);Z=Editor.createSvgDataUri(mxUtils.getXml(oa));var ka=Z.indexOf(";");0<ka&&(Z=Z.substring(0,ka)+Z.substring(Z.indexOf(",",ka+1)));T.setCellStyles("image",Z,[ja[0]])});ma.src=Editor.createSvgDataUri(mxUtils.getXml(oa))}return ja}}}catch(ka){}return null})):N(S,mxUtils.bind(this,function(){return t(aa,"text/xml",g+S*m,k+S*m,0,0,U.name)}))}else N(S,mxUtils.bind(this,function(){return null}))}else{Y=+!1;if("image/png"==U.type){var da=V?null:this.extractGraphModelFromPng(X.target.result);if(null!=da&&0<da.length){var ia=new Image;ia.src=X.target.result;N(S,mxUtils.bind(this,function(){return t(da,"text/xml",g+S*m,k+S*m,ia.width,ia.height,U.name)}));Y=!0}}Y||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):+this.loadImage(X.target.result,mxUtils.bind(this,function(pa){this.resizeImage(pa,X.target.result,mxUtils.bind(this,function(oa,ha,xa){N(S,mxUtils.bind(this,function(){if(null!=oa&&oa.length<E){var qa=q&&this.isResampleImageSize(U.size,R)?Math.min(1,Math.min(v/ha,v/xa)):1;return t(oa,U.type,g+S*m,k+S*m,Math.round(ha*qa),Math.round(xa*qa),U.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),q,v,R,U.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=+X.target.result,t(Z,U.type,g+S*m,k+S*m,240,160,U.name,function(pa){N(S,function(){return pa})},U)}catch(pa){N(S,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(pa,U)}else N(S,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(U.name)?t(null,U.type,g+S*m,k+S*m,240,160,U.name,function(X){N(S,function(){return X})},U):"image"==U.type.substring(0,5)||"application/pdf"==U.type?W.readAsDataURL(U):W.readAsText(U)}})(O)});if(y){y=[];for(C=0;C<d.length;C++)y.push(d[C]);+d=y;this.confirmImageResize(function(T){q=T;M()},D)}else M()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},v=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,t=function(x,A){if(x||g)mxSettings.setResizeImages(x?+A:null),mxSettings.save();k();d(A)};null==v||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(x){t(x,!0)},function(x){t(x,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):t(!1,v)};EditorUi.prototype.parseFile=function(d,g,+k){k=null!=k?k:d.name;var v=new FileReader;v.onload=mxUtils.bind(this,function(){this.parseFileData(v.result,g,k)});v.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var v=new XMLHttpRequest;v.open("POST",OPEN_URL);v.setRequestHeader("Content-Type","application/x-www-form-urlencoded");v.onreadystatechange=function(){g(v)};v.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(t){}};+EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,v,t,x,A){t=null!=t?t:this.maxImageSize;var J=Math.max(1,d.width),D=Math.max(1,d.height),E=g;if(v&&this.isResampleImageSize(null!=A?A:g.length,x))try{var R=Math.max(J/t,D/t);if(1<R){var V=Math.round(J/R),Q=Math.round(D/R),P=document.createElement("canvas");P.width=V;P.height=Q;P.getContext("2d").drawImage(d,0,0,V,Q);var q=P.toDataURL();if(q.length<g.length){var y=+document.createElement("canvas");y.width=V;y.height=Q;var B=y.toDataURL();q!==B&&(g=q,J=V,D=Q)}}}catch(C){}v&&E!=g&&t>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(d,g,k,v,t/1.5,x,A):k(g,J,D)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var v=new Image;v.onload=function(){v.width=0<v.width?v.width:120;v.height=0<v.height?v.height:120;g(v)};null!=k&&(v.onerror=k);v.src=d}catch(t){if(null!=+k)k(t);else throw t;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var l=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());l.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&+null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var d=this,g=this.editor.graph,k=g.isEnabled;g.isEnabled=function(){return k.apply(this,arguments)&&!d.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(m){var z=m.getEvent();return null==m.getState()&&!mxEvent.isMouseEvent(z)&&+!g.freehand.isDrawing()||mxEvent.isPopupTrigger(z)&&(null==m.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))});g.cellEditor.editPlantUmlData=function(m,z,I){var L=JSON.parse(I);z=new TextareaDialog(d,mxResources.get("plantUml")+":",L.data,function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(N,L.format,function(O,S,U){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==L.format)g.labelChanged(m,"<pre>"+O+"</pre>"),g.updateCellSize(m,+!0);else{g.setCellStyles("image",d.convertDataUri(O),[m]);var W=g.model.getGeometry(m);null!=W&&(W=W.clone(),W.width=S,W.height=U,g.cellsResized([m],[W],!1))}g.setAttributeForCell(m,"plantUmlData",JSON.stringify({data:N,format:L.format}))}finally{g.getModel().endUpdate()}},function(O){d.handleError(O)})},null,null,400,220);d.showDialog(z.container,420,300,!0,!0);z.init()};g.cellEditor.editMermaidData=function(m,z,I){var L=JSON.parse(I);z=new TextareaDialog(d,mxResources.get("mermaid")+":",L.data,+function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(N,L.config,function(O,S,U){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",O,[m]);var W=g.model.getGeometry(m);null!=W&&(W=W.clone(),W.width=Math.max(W.width,S),W.height=Math.max(W.height,U),g.cellsResized([m],[W],!1));g.setAttributeForCell(m,"mermaidData",JSON.stringify({data:N,config:L.config},null,2))}finally{g.getModel().endUpdate()}},function(O){d.handleError(O)})},+null,null,400,220);d.showDialog(z.container,420,300,!0,!0);z.init()};var v=g.cellEditor.startEditing;g.cellEditor.startEditing=function(m,z){try{var I=this.graph.getAttributeForCell(m,"plantUmlData");if(null!=I)this.editPlantUmlData(m,z,I);else if(I=this.graph.getAttributeForCell(m,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(m,z,I);else{var L=g.getCellStyle(m);"1"==mxUtils.getValue(L,"metaEdit","0")?d.showDataDialog(m):v.apply(this,arguments)}}catch(N){d.handleError(N)}};+g.getLinkTitle=function(m){return d.getLinkTitle(m)};g.customLinkClicked=function(m,z){var I=!1;try{var L=this.getGraphBounds();d.handleCustomLink(m,z);I=!0;d.chromelessResize&&!L.equals(this.getGraphBounds())&&(d.chromelessResize(),this.scrollCellToVisible(z))}catch(N){d.handleError(N)}return I};var t=g.parseBackgroundImage;g.parseBackgroundImage=function(m){var z=t.apply(this,arguments);null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src});return z};var x=g.setBackgroundImage;g.setBackgroundImage=+function(m){null!=m&&null!=m.originalSrc&&(m=d.createImageForPageLink(m.originalSrc,d.currentPage,this));x.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(m,z){m=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=m){var I=m.indexOf(",");if(0<I)for(m=m.substring(I++1),z=z.getProperty("patches"),I=0;I<z.length;I++)if(null!=z[I][EditorUi.DIFF_UPDATE]&&null!=z[I][EditorUi.DIFF_UPDATE][m]||null!=z[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(z[I][EditorUi.DIFF_REMOVE],m)){g.refreshBackgroundImage();break}}}));var A=g.getBackgroundImageObject;g.getBackgroundImageObject=function(m,z){var I=A.apply(this,arguments);null!=I&&null!=I.originalSrc&&(I=z?d.createImageForPageLink(I.originalSrc,null,null,!0):{src:I.originalSrc});return I};this.isOffline()||"undefined"===typeof window.EditDataDialog||+(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var J=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(m){m=null!=m?m:"";"1"==urlParams.dev&&(m+=(0<m.length?"&":"?")+"dev=1");return J.apply(this,arguments)};var D=g.addClickHandler;g.addClickHandler=function(m,z,I){var L=z;z=+function(N,O,S){if(null==O){var U=mxEvent.getSource(N);"a"==U.nodeName.toLowerCase()&&(O=U.getAttribute("href"))}null!=O&&g.isCustomLink(O)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&g.customLinkClicked(O,S)&&mxEvent.consume(N);null!=L&&L(N,O,S)};D.call(this,m,z,I)};n.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var E=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(m,z,I){g.isSelectionEmpty()&&+"simple"==Editor.currentTheme&&this.addMenuItems(m,["zoomIn","zoomOut","-"],null,I);E.apply(this,arguments);g.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(m,["-","addToScratchpad"],null,I);g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(m,["-","exitGroup","home"],null,I)};var R=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(m,z,I){if(d.editor.graph.isSelectionEmpty())R.apply(this,arguments),d.menus.addMenuItems(m,["copyAsImage"],+null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(m,z,I):this.addPopupMenuArrangeItems(m,z,I),this.addMenuItems(m,"- cut copy copyAsImage duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(m,z,I),this.addMenuItems(m,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(z)&&g.isCellEditable(z)&&(this.addSubmenu("editCell",m,null,mxResources.get("edit")),m.addSeparator(),g.getModel().isEdge(z))){this.addSubmenu("line",+m);var L=g.getModel().getGeometry(z);null!=L&&null!=L.points&&0<L.points.length&&this.addMenuItems(m,["clearWaypoints"],null,I)}1==g.getSelectionCount()&&this.addMenuItems(m,["enterGroup"],null,I);L=d.getSelectionState();null!=L.mergeCell?this.addMenuItem(m,"mergeCells"):(1<L.style.colspan||1<L.style.rowspan)&&this.addMenuItem(m,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=+function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var V=g.getExportVariables;g.getExportVariables=function(){var m=V.apply(this,arguments),z=d.getCurrentFile();null!=z&&(m.filename=z.getTitle());m.pagecount=null!=d.pages?d.pages.length:1;m.page=null!=d.currentPage?d.currentPage.getName():"";m.pagenumber=null!=d.pages&&null!=d.currentPage?+mxUtils.indexOf(d.pages,d.currentPage)+1:1;return m};var Q=g.getGlobalVariable;g.getGlobalVariable=function(m){var z=d.getCurrentFile();return"filename"==m&&null!=z?z.getTitle():"page"==m&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==m?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==m?null!=d.pages?d.pages.length:1:Q.apply(this,arguments)};var P=null,q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var m=this.getCurrentFile(),+z=null!=m&&null!=m.getTitle()?m.getTitle():this.defaultFilename;P!=z&&m==q&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());P=z;q=m}));var y=g.labelLinkClicked;g.labelLinkClicked=function(m,z,I){var L=z.getAttribute("href");if(null==L||!g.isCustomLink(L)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))y.apply(this,arguments);else{if(!g.isEnabled()||null!=m&&g.isCellLocked(m.cell))g.customLinkClicked(L),g.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=+function(){var m=d.defaultFilename,z=d.getCurrentFile();null!=z&&(m=null!=z.getTitle()?z.getTitle():m);return m};var B=this.actions.get("print");B.setEnabled(!mxClient.IS_IOS||!navigator.standalone);B.visible=B.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]=-"synchronize","1"==urlParams.embedInline&&g.addListener(mxEvent.ESCAPE,function(x,F){null!=F&&g.isEnabled()&&!g.isEditing()&&null!=F.getProperty("event")&&d.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(x){var F=g.cellEditor.text2,-N=null;null!=F&&(mxEvent.addListener(F,"dragleave",function(O){null!=N&&(N.parentNode.removeChild(N),N=null);O.stopPropagation();O.preventDefault()}),mxEvent.addListener(F,"dragover",mxUtils.bind(this,function(O){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=this.highlightElement(F));O.stopPropagation();O.preventDefault()})),mxEvent.addListener(F,"drop",mxUtils.bind(this,function(O){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<O.dataTransfer.files.length)this.importFiles(O.dataTransfer.files,-0,0,this.maxImageSize,function(V,T,W,X,Y,Z){g.insertImage(V,Y,Z)},function(){},function(V){return"image/"==V.type.substring(0,6)},function(V){for(var T=0;T<V.length;T++)V[T]()},mxEvent.isControlDown(O));else if(0<=mxUtils.indexOf(O.dataTransfer.types,"text/uri-list")){var Q=O.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Q)?this.loadImage(decodeURIComponent(Q),mxUtils.bind(this,function(V){var T=Math.max(1,V.width);V=Math.max(1,V.height);var W=this.maxImageSize;W=Math.min(1,-Math.min(W/Math.max(1,T)),W/Math.max(1,V));g.insertImage(decodeURIComponent(Q),T*W,V*W)})):document.execCommand("insertHTML",!1,O.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(O.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,O.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(O.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,O.dataTransfer.getData("text/plain"));O.stopPropagation();O.preventDefault()})))}));if(Editor.isSettingsEnabled()){B=-this.editor.graph.view;var M=mxSettings.getUnit();B.setUnit(M);Editor.pageSizeUnit=M==mxConstants.METERS?mxConstants.MILLIMETERS:M;B.addListener("unitChanged",function(x,F){x=F.getProperty("unit");mxSettings.setUnit(x);mxSettings.save();Editor.pageSizeUnit=x==mxConstants.METERS?mxConstants.MILLIMETERS:x});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,B.unit);+"synchronize","1"==urlParams.embedInline&&g.addListener(mxEvent.ESCAPE,function(m,z){null!=z&&g.isEnabled()&&!g.isEditing()&&null!=z.getProperty("event")&&d.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(m){var z=g.cellEditor.text2,+I=null;null!=z&&(mxEvent.addListener(z,"dragleave",function(L){null!=I&&(I.parentNode.removeChild(I),I=null);L.stopPropagation();L.preventDefault()}),mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(L){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(z));L.stopPropagation();L.preventDefault()})),mxEvent.addListener(z,"drop",mxUtils.bind(this,function(L){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<L.dataTransfer.files.length)this.importFiles(L.dataTransfer.files,+0,0,this.maxImageSize,function(O,S,U,W,X,Z){g.insertImage(O,X,Z)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var S=0;S<O.length;S++)O[S]()},mxEvent.isControlDown(L));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var N=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,function(O){var S=Math.max(1,O.width);O=Math.max(1,O.height);var U=this.maxImageSize;U=Math.min(1,+Math.min(U/Math.max(1,S)),U/Math.max(1,O));g.insertImage(decodeURIComponent(N),S*U,O*U)})):document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"));L.stopPropagation();L.preventDefault()})))}));if(Editor.isSettingsEnabled()){B=+this.editor.graph.view;var C=mxSettings.getUnit();B.setUnit(C);Editor.pageSizeUnit=C==mxConstants.METERS?mxConstants.MILLIMETERS:C;B.addListener("unitChanged",function(m,z){m=z.getProperty("unit");mxSettings.setUnit(m);mxSettings.save();Editor.pageSizeUnit=m==mxConstants.METERS?mxConstants.MILLIMETERS:m});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,B.unit);this.refresh()}if("1"==urlParams.styledev){B=document.getElementById("geFooter");null!=B&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),-this.styleInput.value)})),B.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(x,F){0<this.editor.graph.getSelectionCount()?(x=this.editor.graph.getSelectionCell(),x=this.editor.graph.getModel().getStyle(x),this.styleInput.value=x||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var S=this.isSelectionAllowed;this.isSelectionAllowed=function(x){return mxEvent.getSource(x)==this.styleInput?-!0:S.apply(this,arguments)}}B=document.getElementById("geInfo");null!=B&&B.parentNode.removeChild(B);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var l=null;mxEvent.addListener(g.container,"dragleave",function(x){g.isEnabled()&&(null!=l&&(l.parentNode.removeChild(l),l=null),x.stopPropagation(),x.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(x){null==l&&(!mxClient.IS_IE||10<document.documentMode)&&(l=this.highlightElement(g.container));-null!=this.sidebar&&this.sidebar.hideTooltip();x.stopPropagation();x.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(x){null!=l&&(l.parentNode.removeChild(l),l=null);if(g.isEnabled()){var F=mxUtils.convertPoint(g.container,mxEvent.getClientX(x),mxEvent.getClientY(x)),N=x.dataTransfer.files,O=g.view.translate,Q=g.view.scale,V=F.x/Q-O.x,T=F.y/Q-O.y;if(0<N.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(x)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&-this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(x)&&(T=V=null),this.importFiles(N,V,T,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(x),null,null,mxEvent.isShiftDown(x),x));else{mxEvent.isAltDown(x)&&(T=V=0);var W=0<=mxUtils.indexOf(x.dataTransfer.types,"text/uri-list")?x.dataTransfer.getData("text/uri-list"):null;F=this.extractGraphModelFromEvent(x,null!=this.pages);if(null!=F)g.setSelectionCells(this.importXml(F,V,T,!0));else if(0<=mxUtils.indexOf(x.dataTransfer.types,-"text/html")){var X=x.dataTransfer.getData("text/html");F=document.createElement("div");F.innerHTML=Graph.sanitizeHtml(X);var Y=null;N=F.getElementsByTagName("img");null!=N&&1==N.length?(X=N[0].getAttribute("src"),null==X&&(X=N[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||(Y=!0)):(N=F.getElementsByTagName("a"),null!=N&&1==N.length?X=N[0].getAttribute("href"):(F=F.getElementsByTagName("pre"),null!=F&&1==F.length&&(X=mxUtils.getTextContent(F[0]))));var Z=!0,aa=mxUtils.bind(this,-function(){g.setSelectionCells(this.insertTextAt(X,V,T,!0,Y,null,Z,mxEvent.isControlDown(x)))});Y&&null!=X&&X.length>this.resampleThreshold?this.confirmImageResize(function(ea){Z=ea;aa()},mxEvent.isControlDown(x)):aa()}else null!=W&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(ea){var ca=Math.max(1,ea.width);ea=Math.max(1,ea.height);var da=this.maxImageSize;da=Math.min(1,Math.min(da/Math.max(1,ca)),da/Math.max(1,ea));g.setSelectionCell(g.insertVertex(null,-null,"",V,T,ca*da,ea*da,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+W+";"))}),mxUtils.bind(this,function(ea){g.setSelectionCells(this.insertTextAt(W,V,T,!0))})):0<=mxUtils.indexOf(x.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(x.dataTransfer.getData("text/plain"),V,T,!0))}}x.stopPropagation();x.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",-mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==d.embedViewport)mxUtils.fit(this.div);else{var x=parseInt(this.div.offsetLeft),F=-parseInt(this.div.offsetWidth),N=d.embedViewport.x+d.embedViewport.width,O=parseInt(this.div.offsetTop),Q=parseInt(this.div.offsetHeight),V=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(x,N-F))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(O,V-Q))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(d.embedViewport.width,parseInt(this.div.style.width))+"px"}};-if(!this.editor.chromeless||this.editor.editable)if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme)B=Editor.currentTheme,Editor.currentTheme="",this.doSetCurrentTheme(B,mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}));B=!1;null!=urlParams.dark?B=urlParams.dark:-(B="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||B&&"auto"!=mxSettings.settings.darkMode||(B=mxSettings.settings.darkMode));"auto"==B&&this.isAutoDarkModeSupported()&&(B=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof B?"1"==B:B);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(x){this.isAutoDarkMode()&&this.setDarkMode(x.matches)}))}catch(x){this.actions.get("autoMode").setEnabled(!1)}"1"==-urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(x,F){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&-d.editor.loadFonts()};var q=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&d<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&d>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=-d}q.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,m=this.sketchPickerMenuElt,t=this.editor.graph;m.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(J){mxEvent.getSource(J)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var v=-document.createElement("div");v.style.position="absolute";v.style.width="10px";v.style.height="10px";v.style.borderRadius="5px";v.style.border="1px solid gray";v.style.background="#ffffff";v.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(v);this.bottomResizer=v;var y=null,C=null,I=null,K=null;mxEvent.addGestureListeners(v,mxUtils.bind(this,function(J){K=parseInt(this.diagramContainer.style.height);C=mxEvent.getClientY(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));-v=v.cloneNode(!1);v.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(v);this.rightResizer=v;mxEvent.addGestureListeners(v,mxUtils.bind(this,function(J){I=parseInt(this.diagramContainer.style.width);y=mxEvent.getClientX(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(J){var U=!1;null!=y&&(this.diagramContainer.style.width=Math.max(20,I+mxEvent.getClientX(J)-y)+"px",U=!0);null!=C&&(this.diagramContainer.style.height=-Math.max(20,K+mxEvent.getClientY(J)-C)+"px",U=!0);U&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(J){null==y&&null==C||mxEvent.consume(J);C=y=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=-"hidden";this.sketchMenubarElt.style.display="none";g.style.visibility="hidden";d.style.visibility="hidden";m.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(J){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(J){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=-"hidden";g.style.visibility="hidden";d.style.visibility="hidden";m.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var m=g.clipboardData||g.originalEvent.clipboardData,t=!1,v=0;v<m.types.length;v++)if("text/"===m.types[v].substring(0,5)){t=!0;break}if(!t){var y=-m.items;for(index in y){var C=y[index];if("file"===C.kind){if(d.isEditing())this.importFiles([C.getAsFile()],0,0,this.maxImageSize,function(K,J,U,P,R,n){d.insertImage(K,R,n)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var J=0;J<K.length;J++)K[J]()});else{var I=this.editor.graph.getInsertPoint();this.importFiles([C.getAsFile()],I.x,I.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){m.innerHTML=-" ";m.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,m=document.createElement("div");m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("autocapitalize","off");m.setAttribute("spellcheck","false");m.style.textRendering="optimizeSpeed";m.style.fontFamily="monospace";m.style.wordBreak="break-all";m.style.background="transparent";m.style.color="transparent";m.style.position="absolute";m.style.whiteSpace="nowrap";m.style.overflow=-"hidden";m.style.display="block";m.style.fontSize="1";m.style.zIndex="-1";m.style.resize="none";m.style.outline="none";m.style.width="1px";m.style.height="1px";mxUtils.setOpacity(m,0);m.contentEditable=!0;m.innerHTML=" ";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(y){var C=mxEvent.getSource(y);null==g.container||!g.isEnabled()||g.isMouseDown||-g.isEditing()||null!=this.dialog||"INPUT"==C.nodeName||"TEXTAREA"==C.nodeName||"true"==C.contentEditable||224!=y.keyCode&&(mxClient.IS_MAC||17!=y.keyCode)&&(!mxClient.IS_MAC||91!=y.keyCode&&93!=y.keyCode)||t||(m.style.left=g.container.scrollLeft+10+"px",m.style.top=g.container.scrollTop+10+"px",y=g.container.scrollLeft,C=g.container.scrollTop,g.container.appendChild(m),t=!0,m.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=y,g.container.scrollTop=C)}));mxEvent.addListener(document,-"keyup",mxUtils.bind(this,function(y){var C=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||224!=C&&17!=C&&91!=C&&93!=C||(t=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),m.parentNode.removeChild(m),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(m,"copy",mxUtils.bind(this,function(y){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(m),d()}catch(C){this.handleError(C)}}));mxEvent.addListener(m,"cut",mxUtils.bind(this,function(y){if(g.isEnabled())try{mxClipboard.copy(g),-this.copyCells(m,!0),d()}catch(C){this.handleError(C)}}));mxEvent.addListener(m,"paste",mxUtils.bind(this,function(y){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{if(m.innerHTML=" ",m.focus(),null!=y.clipboardData&&(Graph.removePasteFormatting(m.firstChild),this.pasteCells(y,m,!0,!0)),!mxEvent.isConsumed(y)){var C=g.container.scrollLeft,I=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{g.container.scrollLeft=C,g.container.scrollTop=I,Graph.removePasteFormatting(m.firstChild),-this.pasteCells(y,m,!1,!0)}catch(K){this.handleError(K)}}),0)}}catch(K){this.handleError(K)}}),!0);var v=this.isSelectionAllowed;this.isSelectionAllowed=function(y){return mxEvent.getSource(y)==m?!0:v.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,g){mxSettings.setUi(d);(g=this.doSetCurrentTheme(d)||g)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=-function(d,g){function m(I){return"simple"==I||"sketch"==I}var t=Editor.currentTheme,v=m(t)&&this.isDefaultTheme(d)||this.isDefaultTheme(t)&&m(d),y=v&&"sketch"!=d&&"sketch"!=t;if(v&&!this.themeSwitching){var C=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=d;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,function(){m(t)&&this.isDefaultTheme(d)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="block",-this.tabContainer.style.display="flex",this.hsplit.style.display="block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(t)&&m(d)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=d?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display="flex");this.switchTheme(d);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));-this.editor.graph.refresh();this.restoreScrollState(C);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&m(d)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=g&&g()}),0)}return y};EditorUi.prototype.saveScrollState=function(){var d=this.editor.graph.view.translate,g=this.diagramContainer.scrollLeft,m=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(g-=this.embedViewport.x,m-=this.embedViewport.y):-(g+=this.embedViewport.x,m+=this.embedViewport.y));return{x:g,y:m,tx:d.x,ty:d.y}};EditorUi.prototype.restoreScrollState=function(d){var g=this.editor.graph.view.scale,m=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=d.x+(m.x-d.tx)*g;this.diagramContainer.scrollTop=d.y+(m.y-d.ty)*g};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&-""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(this.statusContainer.style.display="none")}));var m=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var t=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;g=null!=t&&null!=t.getAttribute("class");if(!g&&null!=t){t=-t.getAttribute("title");var v=this.getCurrentFile();v=null!=v?v.savingStatusKey:DrawioFile.prototype.savingStatusKey;t==mxResources.get(v)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(v))+'..."src="'+Editor.tailSpin+'"></div>',g=!0)}this.statusContainer.style.display="none";t=32>=d.clientWidth;d.style.visibility=t&&""==this.editor.getStatus()?"hidden":"";if(t||g)this.statusContainer.style.display="inline-flex",g=!0}else"simple"==Editor.currentTheme?-(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",m);m()};EditorUi.prototype.switchTheme=function(d){this.isDefaultTheme(d)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=+this.styleInput.value)})),B.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(m,z){0<this.editor.graph.getSelectionCount()?(m=this.editor.graph.getSelectionCell(),m=this.editor.graph.getModel().getStyle(m),this.styleInput.value=m||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var M=this.isSelectionAllowed;this.isSelectionAllowed=function(m){return mxEvent.getSource(m)==this.styleInput?+!0:M.apply(this,arguments)}}B=document.getElementById("geInfo");null!=B&&B.parentNode.removeChild(B);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var T=null;mxEvent.addListener(g.container,"dragleave",function(m){g.isEnabled()&&(null!=T&&(T.parentNode.removeChild(T),T=null),m.stopPropagation(),m.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(m){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=this.highlightElement(g.container));+null!=this.sidebar&&this.sidebar.hideTooltip();m.stopPropagation();m.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(m){null!=T&&(T.parentNode.removeChild(T),T=null);if(g.isEnabled()){var z=mxUtils.convertPoint(g.container,mxEvent.getClientX(m),mxEvent.getClientY(m)),I=m.dataTransfer.files,L=g.view.translate,N=g.view.scale,O=z.x/N-L.x,S=z.y/N-L.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(m)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&+this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(m)&&(S=O=null),this.importFiles(I,O,S,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(m),null,null,mxEvent.isShiftDown(m),m));else{mxEvent.isAltDown(m)&&(S=O=0);var U=0<=mxUtils.indexOf(m.dataTransfer.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):null;z=this.extractGraphModelFromEvent(m,null!=this.pages);if(null!=z)g.setSelectionCells(this.importXml(z,O,S,!0));else if(0<=mxUtils.indexOf(m.dataTransfer.types,+"text/html")){var W=m.dataTransfer.getData("text/html");z=document.createElement("div");z.innerHTML=Graph.sanitizeHtml(W);var X=null;I=z.getElementsByTagName("img");null!=I&&1==I.length?(W=I[0].getAttribute("src"),null==W&&(W=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)||(X=!0)):(I=z.getElementsByTagName("a"),null!=I&&1==I.length?W=I[0].getAttribute("href"):(z=z.getElementsByTagName("pre"),null!=z&&1==z.length&&(W=mxUtils.getTextContent(z[0]))));var Z=!0,Y=mxUtils.bind(this,+function(){g.setSelectionCells(this.insertTextAt(W,O,S,!0,X,null,Z,mxEvent.isControlDown(m)))});X&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(ba){Z=ba;Y()},mxEvent.isControlDown(m)):Y()}else null!=U&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(ba){var ea=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ca=this.maxImageSize;ca=Math.min(1,Math.min(ca/Math.max(1,ea)),ca/Math.max(1,ba));g.setSelectionCell(g.insertVertex(null,+null,"",O,S,ea*ca,ba*ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+U+";"))}),mxUtils.bind(this,function(ba){g.setSelectionCells(this.insertTextAt(U,O,S,!0))})):0<=mxUtils.indexOf(m.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(m.dataTransfer.getData("text/plain"),O,S,!0))}}m.stopPropagation();m.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",+mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==d.embedViewport)mxUtils.fit(this.div);else{var m=parseInt(this.div.offsetLeft),z=+parseInt(this.div.offsetWidth),I=d.embedViewport.x+d.embedViewport.width,L=parseInt(this.div.offsetTop),N=parseInt(this.div.offsetHeight),O=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(m,I-z))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(L,O-N))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(d.embedViewport.width,parseInt(this.div.style.width))+"px"}};+if(!this.editor.chromeless||this.editor.editable)if(B=Editor.currentTheme,"simple"==B||"sketch"==B)Editor.currentTheme="",this.doSetCurrentTheme(B,mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);B=!1;null!=urlParams.dark?B=urlParams.dark:(B="dark"==Editor.currentTheme,+!Editor.isSettingsEnabled()||"1"==urlParams.embed||B&&"auto"!=mxSettings.settings.darkMode||(B=mxSettings.settings.darkMode));"auto"==B&&this.isAutoDarkModeSupported()&&(B=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof B?"1"==B:B);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(m){this.isAutoDarkMode()&&this.setDarkMode(m.matches)}))}catch(m){this.actions.get("autoMode").setEnabled(!1)}"1"==+urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(m,z){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&+d.editor.loadFonts()};var p=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&d<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&d>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=+d}p.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,v=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(E){mxEvent.getSource(E)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(E),mxEvent.getClientY(E)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var t=+document.createElement("div");t.style.position="absolute";t.style.width="10px";t.style.height="10px";t.style.borderRadius="5px";t.style.border="1px solid gray";t.style.background="#ffffff";t.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(t);this.bottomResizer=t;var x=null,A=null,J=null,D=null;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(E){D=parseInt(this.diagramContainer.style.height);A=mxEvent.getClientY(E);v.popupMenuHandler.hideMenu();mxEvent.consume(E)}));+t=t.cloneNode(!1);t.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(t);this.rightResizer=t;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(E){J=parseInt(this.diagramContainer.style.width);x=mxEvent.getClientX(E);v.popupMenuHandler.hideMenu();mxEvent.consume(E)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(E){var R=!1;null!=x&&(this.diagramContainer.style.width=Math.max(20,J+mxEvent.getClientX(E)-x)+"px",R=!0);null!=A&&(this.diagramContainer.style.height=+Math.max(20,D+mxEvent.getClientY(E)-A)+"px",R=!0);R&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(E){null==x&&null==A||mxEvent.consume(E);A=x=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=+"hidden";this.sketchMenubarElt.style.display="none";g.style.visibility="hidden";d.style.visibility="hidden";k.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(E){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(E){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=+"hidden";g.style.visibility="hidden";d.style.visibility="hidden";k.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,v=!1,t=0;t<k.types.length;t++)if("text/"===k.types[t].substring(0,5)){v=!0;break}if(!v){var x=+k.items;for(index in x){var A=x[index];if("file"===A.kind){if(d.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize,function(D,E,R,V,Q,P){d.insertImage(D,Q,P)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var E=0;E<D.length;E++)D[E]()});else{var J=this.editor.graph.getInsertPoint();this.importFiles([A.getAsFile()],J.x,J.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML=+" ";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow=+"hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML=" ";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(x){var A=mxEvent.getSource(x);null==g.container||!g.isEnabled()||g.isMouseDown||+g.isEditing()||null!=this.dialog||"INPUT"==A.nodeName||"TEXTAREA"==A.nodeName||"true"==A.contentEditable||224!=x.keyCode&&(mxClient.IS_MAC||17!=x.keyCode)&&(!mxClient.IS_MAC||91!=x.keyCode&&93!=x.keyCode)||v||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",x=g.container.scrollLeft,A=g.container.scrollTop,g.container.appendChild(k),v=!0,k.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=x,g.container.scrollTop=A)}));mxEvent.addListener(document,+"keyup",mxUtils.bind(this,function(x){var A=x.keyCode;window.setTimeout(mxUtils.bind(this,function(){!v||224!=A&&17!=A&&91!=A&&93!=A||(v=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(x){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k),d()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(x){if(g.isEnabled())try{mxClipboard.copy(g),+this.copyCells(k,!0),d()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(x){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{if(k.innerHTML=" ",k.focus(),null!=x.clipboardData&&(Graph.removePasteFormatting(k.firstChild),this.pasteCells(x,k,!0,!0)),!mxEvent.isConsumed(x)){var A=g.container.scrollLeft,J=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{g.container.scrollLeft=A,g.container.scrollTop=J,Graph.removePasteFormatting(k.firstChild),+this.pasteCells(x,k,!1,!0)}catch(D){this.handleError(D)}}),0)}}catch(D){this.handleError(D)}}),!0);var t=this.isSelectionAllowed;this.isSelectionAllowed=function(x){return mxEvent.getSource(x)==k?!0:t.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,g){mxSettings.setUi(d);(g=this.doSetCurrentTheme(d)||g)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=+function(d,g,k){function v(J){return"simple"==J||"sketch"==J}var t=Editor.currentTheme,x="simple"==t&&this.isDefaultTheme(d)||this.isDefaultTheme(t)&&"simple"==d;if((x||k)&&!this.themeSwitching){var A=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=d;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,function(){v(t)&&this.isDefaultTheme(d)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="",this.tabContainer.style.display=+"",this.hsplit.style.display="block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(t)&&v(d)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=d?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display="");this.switchTheme(d);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));+this.editor.graph.refresh();this.restoreScrollState(A);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&v(d)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=g&&g()}),0)}return x};EditorUi.prototype.saveScrollState=function(){var d=this.editor.graph.view.translate,g=this.diagramContainer.scrollLeft,k=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(g-=this.embedViewport.x,k-=this.embedViewport.y):+(g+=this.embedViewport.x,k+=this.embedViewport.y));return{x:g,y:k,tx:d.x,ty:d.y}};EditorUi.prototype.restoreScrollState=function(d){var g=this.editor.graph.view.scale,k=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=d.x+(k.x-d.tx)*g;this.diagramContainer.scrollTop=d.y+(k.y-d.ty)*g};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&+""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(this.statusContainer.style.display="none")}));var k=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var v=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;g=null!=v&&null!=v.getAttribute("class");if(!g&&null!=v){v=+v.getAttribute("title");var t=this.getCurrentFile();t=null!=t?t.savingStatusKey:DrawioFile.prototype.savingStatusKey;v==mxResources.get(t)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(t))+'..."src="'+Editor.tailSpin+'"></div>',g=!0)}this.statusContainer.style.display="none";v=32>=d.clientWidth;d.style.visibility=v&&""==this.editor.getStatus()?"hidden":"";if(v||g)this.statusContainer.style.display="inline-flex",g=!0}else"simple"==Editor.currentTheme?+(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",k);k()};EditorUi.prototype.switchTheme=function(d){this.isDefaultTheme(d)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);this.createMainMenuForTheme(d);this.createFooterMenuForTheme(d);this.createPickerMenuForTheme(d);this.createMenubarForTheme(d);this.sidebarContainer.style.display="";if("sketch"==d){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var g=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);this.createShapesWindow();this.sidebarContainer.className="";this.sidebarContainer.style.position="absolute";this.sidebarContainer.style.left="0px";this.sidebarContainer.style.top="0px";this.sidebarContainer.style.bottom=g?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(d=this.isDefaultTheme(d)||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var d=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(d=d.concat([this.actions.outlineWindow,this.actions.layersWindow]));@@ -13355,33 +13355,33 @@ EditorUi.prototype.createWrapperForTheme=function(d){null!=this.sketchWrapperEltfunction(d){};EditorUi.prototype.createPickerMenuForTheme=function(d){};EditorUi.prototype.getNetworkStatus=function(){var d=null;if(this.isOffline(!0))d=mxResources.get("offline");else{var g=this.getCurrentFile();null!=g&&(g.invalidChecksum?d=mxResources.get("error")+": "+mxResources.get("checksum"):null==g.sync||g.sync.enabled&&g.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==g.sync||g.sync.isConnected()?g.isRealtimeEnabled()&&g.isRealtimeSupported()&&1<g.getRealtimeState()&&(d=g.getRealtimeError(),d=mxResources.get("realtimeCollaboration")+": "+(null!=d&&null!=d.message?d.message:mxResources.get("error"))):d=mxResources.get("notConnected"):d=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return d};EditorUi.prototype.createMenubarForTheme=function(d){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="",this.menubar.container.appendChild(this.statusContainer));null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);d=this.menubar.langIcon;null!=d&&(d.style.position="absolute",d.style.height="18px",d.style.width="18px",d.style.flexShrink="",d.style.opacity="",this.menubarContainer.parentNode.insertBefore(d,this.menubarContainer));null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};-EditorUi.prototype.createMenu=function(d,g,m,t){m=null!=m?m:"geToolbarButton";var v=this.menus.get(d);t=this.menubar.addMenu(mxResources.get(d),v.funct,null,t);t.className=m;t.style.display="inline-block";t.style.cursor="pointer";t.style.height="24px";t.setAttribute("title",mxResources.get(d));this.menus.menuCreated(v,t,m);null!=g&&(t.style.backgroundImage="url("+g+")",t.style.backgroundPosition="center center",t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="100% 100%",t.style.width=-"24px",t.innerText="");return t};EditorUi.prototype.createToolbarButton=function(d,g,m,t){t=null!=t?t:24;var v=document.createElement("a");v.className="geToolbarButton geAdaptiveAsset";v.setAttribute("title",g);v.style.backgroundImage="url("+d+")";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";v.style.backgroundSize="100% 100%";v.style.display="inline-block";v.style.cursor="pointer";v.style.marginLeft="6px";v.style.width=t+"px";v.style.height=t+"px";v.style.flexShrink=-"0";v.style.flexGrow="0";null!=m&&(mxEvent.addListener(v,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(y){y.preventDefault()})),mxEvent.addListener(v,"click",function(y){"disabled"!=v.getAttribute("disabled")&&m(y);mxEvent.consume(y)}));return v};EditorUi.prototype.createMenuItem=function(d,g,m){var t=this.actions.get(d),v=null!=t?t.funct:null,y=this.createToolbarButton(g,mxResources.get(d)+(null!=t&&null!=t.shortcut?" ("+t.shortcut+")":""),v);null==t||m||(d=function(){t.isEnabled()?-(y.removeAttribute("disabled"),y.style.cursor="pointer"):(y.setAttribute("disabled","disabled"),y.style.cursor="default");y.style.opacity=t.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",d),t.addListener("stateChanged",d),d());return y};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight--10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,60,240,g,mxUtils.bind(this,function(v){v.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var m=this.formatWindow.window.toggleMinimized,t=240;this.formatWindow.window.toggleMinimized=function(){m.apply(this,arguments);this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",-this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(v){mxEvent.getSource(v)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?+EditorUi.prototype.createMenu=function(d,g,k,v){k=null!=k?k:"geToolbarButton";var t=this.menus.get(d);v=this.menubar.addMenu(mxResources.get(d),t.funct,null,v);v.className=k;v.style.display="inline-block";v.style.cursor="pointer";v.style.height="24px";v.setAttribute("title",mxResources.get(d));this.menus.menuCreated(t,v,k);null!=g&&(v.style.backgroundImage="url("+g+")",v.style.backgroundPosition="center center",v.style.backgroundRepeat="no-repeat",v.style.backgroundSize="100% 100%",v.style.width=+"24px",v.innerText="");return v};EditorUi.prototype.createToolbarButton=function(d,g,k,v){v=null!=v?v:24;var t=document.createElement("a");t.className="geToolbarButton geAdaptiveAsset";t.setAttribute("title",g);t.style.backgroundImage="url("+d+")";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";t.style.backgroundSize="100% 100%";t.style.display="inline-block";t.style.cursor="pointer";t.style.marginLeft="6px";t.style.width=v+"px";t.style.height=v+"px";t.style.flexShrink=+"0";t.style.flexGrow="0";null!=k&&(mxEvent.addListener(t,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()})),mxEvent.addListener(t,"click",function(x){"disabled"!=t.getAttribute("disabled")&&k(x);mxEvent.consume(x)}));return t};EditorUi.prototype.createMenuItem=function(d,g,k){var v=this.actions.get(d),t=null!=v?v.funct:null,x=this.createToolbarButton(g,mxResources.get(d)+(null!=v&&null!=v.shortcut?" ("+v.shortcut+")":""),t);null==v||k||(d=function(){v.isEnabled()?+(x.removeAttribute("disabled"),x.style.cursor="pointer"):(x.setAttribute("disabled","disabled"),x.style.cursor="default");x.style.opacity=v.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",d),v.addListener("stateChanged",d),d());return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-+10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,60,240,g,mxUtils.bind(this,function(t){t.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var k=this.formatWindow.window.toggleMinimized,v=240;this.formatWindow.window.toggleMinimized=function(){k.apply(this,arguments);this.minimized?(v=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",+this.div.style.left=parseInt(this.div.style.left)+v-140+"px"):(this.div.style.width=v+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-v+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(t){mxEvent.getSource(t)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?(d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>d)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var u=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(d){var g=this.formatWindow;null!=g?g.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):u.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=-function(d){if(this.isShapesPanelVisible()!=d){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=this.defaultSidebarWidth);var m=this.hsplitPosition,t=mxUtils.bind(this,function(){this.hsplitPosition=v;this.refresh();this.diagramContainer.scrollLeft-=m-this.hsplitPosition}),v=d?g:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==v?"translateX(0)":"translateX(-100%)");0!=v&&t();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",-0==v?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==v&&t()}),-300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var E=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():E.apply(this,arguments)};var H=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){d=null!=d?d:!0;if("1"!=urlParams.embedInline){var g=this.container.clientWidth;this.container==-document.body&&(g=document.body.clientWidth||document.documentElement.clientWidth);var m=this.getDiagramContainerOffset();var t=m.x;var v=m.y;"simple"==Editor.currentTheme&&(v+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=v+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,g=Math.max(0,-Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,g-this.splitSize-40))),this.sidebarContainer.style.width=g+"px",this.diagramContainer.style.left=g+t+"px",this.tabContainer.style.left=g+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=g+"px",this.diagramContainer.style.right=this.formatWidth+"px",-this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=m.x+"px",this.diagramContainer.style.right="0")}d&&this.editor.graph.sizeDidChange()}else H.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(d){var g=mxUtils.bind(this,function(t){t=this.createMenu(t,null,"geTitle");t.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";-d.appendChild(t);return t});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))g=document.createElement("div"),g.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;",g.className="geTitle",mxUtils.write(g,mxResources.get("newLibrary")),d.appendChild(g),mxEvent.addListener(g,-"click",this.actions.get("newLibrary").funct),g=g.cloneNode(!1),g.style.left="50%",g.style.borderLeftStyle="solid",mxUtils.write(g,mxResources.get("openLibrary")),d.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var m=g("newLibrary");m.style.fontSize="11px";m.style.left="0";m=g("openLibraryFrom");m.style.borderLeftStyle="solid";m.style.fontSize="11px";m.style.left="50%"}d.appendChild(this.sidebarContainer);d.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=-function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),m="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),m&&"1"!=urlParams.embedInline?66:10,m&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,d-6,g-6,mxUtils.bind(this,function(t){this.createShapesPanel(t)}));+function(d){if(this.isShapesPanelVisible()!=d){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=this.defaultSidebarWidth);var k=this.hsplitPosition,v=mxUtils.bind(this,function(){this.hsplitPosition=t;this.refresh();this.diagramContainer.scrollLeft-=k-this.hsplitPosition}),t=d?g:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==t?"translateX(0)":"translateX(-100%)");0!=t&&v();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",+0==t?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==t&&v()}),+300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var G=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():G.apply(this,arguments)};var H=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){d=null!=d?d:!0;if("1"!=urlParams.embedInline){var g=this.container.clientWidth;this.container==+document.body&&(g=document.body.clientWidth||document.documentElement.clientWidth);var k=this.getDiagramContainerOffset();var v=k.x;var t=k.y;"simple"==Editor.currentTheme&&(t+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=t+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,g=Math.max(0,+Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,g-this.splitSize-40))),this.sidebarContainer.style.width=g+"px",this.diagramContainer.style.left=g+v+"px",this.tabContainer.style.left=g+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=g+"px",this.diagramContainer.style.right=this.formatWidth+"px",+this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=k.x+"px",this.diagramContainer.style.right="0")}d&&this.editor.graph.sizeDidChange()}else H.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(d){var g=mxUtils.bind(this,function(v){v=this.createMenu(v,null,"geTitle");v.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";+d.appendChild(v);return v});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))g=document.createElement("div"),g.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;",g.className="geTitle",mxUtils.write(g,mxResources.get("newLibrary")),d.appendChild(g),mxEvent.addListener(g,+"click",this.actions.get("newLibrary").funct),g=g.cloneNode(!1),g.style.left="50%",g.style.borderLeftStyle="solid",mxUtils.write(g,mxResources.get("openLibrary")),d.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var k=g("newLibrary");k.style.fontSize="11px";k.style.left="0";k=g("openLibraryFrom");k.style.borderLeftStyle="solid";k.style.fontSize="11px";k.style.left="50%"}d.appendChild(this.sidebarContainer);d.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=+function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),k="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),k&&"1"!=urlParams.embedInline?66:10,k&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,d-6,g-6,mxUtils.bind(this,function(v){this.createShapesPanel(v)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setAndPersistDarkMode=function(d){var g=d;"auto"==d&&(g=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(g);mxSettings.settings.darkMode=d;mxSettings.save();d=mxSettings.getUi();null==urlParams.ui&&"dark"==d&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(d){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE)};EditorUi.prototype.setAndPersistHighContrast=function(d){this.setHighContrast(d);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=d,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var d=document.getElementById("high-contrast-stylesheet");return null!=d&&window.matchMedia?(d=d.getAttribute("media"),"all"==d||"not all"!=d&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(d){var g=document.getElementById("high-contrast-stylesheet");-if(null!=g&&window.matchMedia){var m=window.matchMedia("(forced-colors: active)").matches,t=g.getAttribute("media");(t="all"==t||"not all"!=t&&m)&&!d?g.setAttribute("media",m?"not all":"(forced-colors: active)"):!t&&d&&g.setAttribute("media",m?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(d){var g=this.getDiagramContainerOffset();mxSettings.setRulerOn(d);mxSettings.save();d||null==this.ruler?d&&+if(null!=g&&window.matchMedia){var k=window.matchMedia("(forced-colors: active)").matches,v=g.getAttribute("media");(v="all"==v||"not all"!=v&&k)&&!d?g.setAttribute("media",k?"not all":"(forced-colors: active)"):!v&&d&&g.setAttribute("media",k?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(d){var g=this.getDiagramContainerOffset();mxSettings.setRulerOn(d);mxSettings.save();d||null==this.ruler?d&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.refresh();this.fireEvent(new mxEventObject("rulerVisibleChanged"));d=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=d.x-g.x;this.diagramContainer.scrollTop+=d.x-g.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(d){return!d&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(d){Editor.darkMode=d;d=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff";null!=d&&(Editor.isDarkMode()?(d.classList.add("geDarkMode"),d.style.colorScheme="dark"):(d.classList.remove("geDarkMode"),d.style.colorScheme="light"));null!=this.ruler&&this.ruler.updateStyle();this.fireEvent(new mxEventObject("darkModeChanged"))};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,g){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),Editor.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=-function(d){Editor.inlineFullscreen!=d&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:d,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,m=this.sketchPickerMenuElt,t=this.editor.graph;if(Editor.inlineFullscreen)g.style.left="10px",g.style.top="10px",m.style.left=-"10px",m.style.top="60px",d.style.top="10px",d.style.right="12px",d.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width=-"",this.diagramContainer.style.height="");else{var v=this.diagramContainer.getAttribute("data-bounds");if(null!=v){this.diagramContainer.removeAttribute("data-bounds");t.getGraphBounds();var y=v.split(" ");t=mxUtils.getDocumentSize();this.diagramContainer.style.top=y[0];this.diagramContainer.style.left=y[1];v=parseInt(y[2]);y=parseInt(y[3]);v=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,v):v,t.width-80);y=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,y):y,t.height--80);this.diagramContainer.style.width=v+"px";this.diagramContainer.style.height=y+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}g.style.left=this.diagramContainer.offsetLeft+"px";g.style.top=this.diagramContainer.offsetTop-g.offsetHeight-4+"px";m.style.display="";m.style.left=this.diagramContainer.offsetLeft-m.offsetWidth-4+"px";m.style.top=+function(d){Editor.inlineFullscreen!=d&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:d,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,v=this.editor.graph;if(Editor.inlineFullscreen)g.style.left="10px",g.style.top="10px",k.style.left=+"10px",k.style.top="60px",d.style.top="10px",d.style.right="12px",d.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width=+"",this.diagramContainer.style.height="");else{var t=this.diagramContainer.getAttribute("data-bounds");if(null!=t){this.diagramContainer.removeAttribute("data-bounds");v.getGraphBounds();var x=t.split(" ");v=mxUtils.getDocumentSize();this.diagramContainer.style.top=x[0];this.diagramContainer.style.left=x[1];t=parseInt(x[2]);x=parseInt(x[3]);t=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,t):t,v.width-80);x=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,x):x,v.height-+80);this.diagramContainer.style.width=t+"px";this.diagramContainer.style.height=x+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}g.style.left=this.diagramContainer.offsetLeft+"px";g.style.top=this.diagramContainer.offsetTop-g.offsetHeight-4+"px";k.style.display="";k.style.left=this.diagramContainer.offsetLeft-k.offsetWidth-4+"px";k.style.top=this.diagramContainer.offsetTop+"px";d.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-d.offsetWidth+"px";d.style.top=g.style.top;d.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;g.style.visibility="";d.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(d){Editor.sketchMode!=d&&(Editor.sketchMode=d,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);d.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(d.vertexFontSize=16,d.edgeFontSize=d.vertexFontSize-4):"sketch"==Editor.currentTheme?(d.vertexFontSize=20,d.edgeFontSize=d.vertexFontSize-@@ -13389,222 +13389,221 @@ EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defa"1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.jettySize="auto",d.defaultEdgeStyle.orthogonalLoop="1",d.defaultEdgeStyle.endArrow="open",d.defaultEdgeStyle.endSize="14",d.defaultEdgeStyle.startSize="14",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(d.defaultVertexStyle.sketch="1",d.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultVertexStyle.hachureGap="4",d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(d){var g=Graph.prototype.getLinkTitle.apply(this,-arguments);if(Graph.isPageLink(d)){var m=d.indexOf(",");0<m&&(g=this.getPageById(d.substring(m+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(g=this.getCustomLinkTitle(d));return g};EditorUi.prototype.getCustomLinkTitle=function(d){var g=mxResources.get("action");if("data:action/json,"==d.substring(0,17))try{var m=JSON.parse(d.substring(17));null!=m&&null!=m.title&&(g=m.title)}catch(t){}return g};EditorUi.prototype.handleCustomLink=function(d,g){if(Graph.isPageLink(d))if(g=+arguments);if(Graph.isPageLink(d)){var k=d.indexOf(",");0<k&&(g=this.getPageById(d.substring(k+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(g=this.getCustomLinkTitle(d));return g};EditorUi.prototype.getCustomLinkTitle=function(d){var g=mxResources.get("action");if("data:action/json,"==d.substring(0,17))try{var k=JSON.parse(d.substring(17));null!=k&&null!=k.title&&(g=k.title)}catch(v){}return g};EditorUi.prototype.handleCustomLink=function(d,g){if(Graph.isPageLink(d))if(g=d.indexOf(","),d=this.getPageById(d.substring(g+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(d,g)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var d=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(g){g.key==mxSettings.key&&-(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(g){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(g,m){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));d.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));-this.addListener("copyConnectChanged",mxUtils.bind(this,function(g,m){mxSettings.setCreateTarget(d.connectionHandler.isCreateTarget());mxSettings.save()}));d.pageFormat=null!=d.defaultPageFormat?d.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(g,m){mxSettings.setPageFormat(d.pageFormat);mxSettings.save()}));d.view.defaultDarkGridColor=mxSettings.getGridColor(!0);d.view.defaultGridColor=mxSettings.getGridColor(!1);d.view.gridColor="light-dark("+-d.view.defaultGridColor+", "+d.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(g,m){mxSettings.setGridColor(d.view.defaultGridColor,!1);mxSettings.setGridColor(d.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(g,m){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||-this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(g,m){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",-mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,g,m){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,-function(t,v){try{this.spinner.stop();var y=this.createImageDataUri(t,g,"png"),C=parseInt(v.getAttribute("width")),I=parseInt(v.getAttribute("height"));this.writeImageToClipboard(y,C,I,mxUtils.bind(this,function(K){this.handleError(K)}))}catch(K){this.handleError(K)}}),null,null,null,mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),null,null,null!=m?m:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?-d:null)}catch(t){this.handleError(t)}};EditorUi.prototype.copyCells=function(d,g){var m=this.editor.graph;if(m.isSelectionEmpty())d.innerText="";else{var t=mxUtils.sortCells(m.model.getTopmostCells(m.getSelectionCells())),v=mxUtils.getXml(m.encodeCells(t));mxUtils.setTextContent(d,encodeURIComponent(v));g?(m.removeCells(t,!1),m.lastPasteXml=null):(m.lastPasteXml=v,m.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var g=-this.editor.graph;g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,m,t,v){v=null!=v?v:!0;var y=this.editor.graph,C=null;y.lastPasteXml==d?y.pasteCounter++:(y.lastPasteXml=d,y.pasteCounter=0);var I=y.pasteCounter*y.gridSize;if(m||this.isCompatibleString(d))C=this.importXml(d,I,I),y.setSelectionCells(C);else if(g&&1==-y.getSelectionCount()){v=y.getStartEditingCell(y.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==y.getCurrentCellStyle(v)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,d,[v]);else{y.model.beginUpdate();try{y.labelChanged(v,d),Graph.isLink(d)&&y.setLinkForCell(v,d)}finally{y.model.endUpdate()}}y.setSelectionCell(v)}else C=y.getInsertPoint(),y.isMouseInsertPoint()&&(I=0,y.lastPasteXml==d&&0<y.pasteCounter&&y.pasteCounter--),C=this.insertTextAt(d,C.x+I,-C.y+I,v),y.setSelectionCells(C);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return C};EditorUi.prototype.pasteCells=function(d,g,m,t){if(!mxEvent.isConsumed(d)){var v=g,y=!1;if(m&&null!=d.clipboardData&&d.clipboardData.getData){var C=d.clipboardData.getData("text/plain"),I=!1;if(null!=C&&0<C.length&&"%3CmxGraphModel%3E"==C.substring(0,18))try{var K=decodeURIComponent(C);this.isCompatibleString(K)&&-(I=!0,C=K)}catch(z){}I=I?null:d.clipboardData.getData("text/html");null!=I&&0<I.length?(v=this.parseHtmlData(I),y="text/plain"!=v.getAttribute("data-type")):null!=C&&0<C.length&&(v=document.createElement("div"),mxUtils.setTextContent(v,I))}C=v.getElementsByTagName("span");if(null!=C&&0<C.length&&"application/vnd.lucid.chart.objects"===C[0].getAttribute("data-lucid-type"))m=C[0].getAttribute("data-lucid-content"),null!=m&&0<m.length&&(this.convertLucidChart(m,mxUtils.bind(this,function(z){var A=this.editor.graph;-A.lastPasteXml==z?A.pasteCounter++:(A.lastPasteXml=z,A.pasteCounter=0);var B=A.pasteCounter*A.gridSize;A.setSelectionCells(this.importXml(z,B,B));A.scrollCellToVisible(A.getSelectionCell())}),mxUtils.bind(this,function(z){this.handleError(z)})),mxEvent.consume(d));else{var J=!1,U="";U=y?null!=v.textContent&&"<mxfile"==v.textContent.substring(0,7)&&"</mxfile>"==v.textContent.substring(v.textContent.length-9)||"<mxGraphModel"==v.textContent.substring(0,13)&&"</mxGraphModel>"==v.textContent.substring(v.textContent.length--15)?v.textContent.replace(/\u00a0/g," "):v.innerHTML:mxUtils.trim(null==v.innerText?mxUtils.getTextContent(v):v.innerText);try{var P=U.lastIndexOf("%3E");0<=P&&P<U.length-3&&(U=U.substring(0,P+3))}catch(z){}try{C=v.getElementsByTagName("span"),(K=null!=C&&0<C.length?mxUtils.trim(decodeURIComponent(C[0].textContent)):decodeURIComponent(U))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,U=K)}catch(z){}try{if(null!=U&&0<U.length){if(0==U.substring(0,-20).replace(/\s/g,"").indexOf('{"isProtected":')){var R=mxUtils.bind(this,function(){try{U=(new MiroImporter).importMiroJson(JSON.parse(U)),this.pasteXml(U,t,J,d)}catch(z){console.log("Miro import error:",z)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",R):R()}else this.pasteXml(U,t,J,d,y);try{mxEvent.consume(d)}catch(z){}}else if(!m){var n=this.editor.graph;n.lastPasteXml=null;n.pasteCounter=0}}catch(z){this.handleError(z)}}}g.innerHTML=" "};EditorUi.prototype.showPrintDialog=-function(d,g){var m=320;this.editor.graph.isEnabled()&&(m+=40);null!=this.pages&&1<this.pages.length&&(m+=40,this.editor.graph.isEnabled()||(m+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(m+=20);this.showDialog((new PrintDialog(this,d,g)).container,320,m,!0,!0)};EditorUi.prototype.print=function(d,g){var m=this.editor,t=m.graph,v=this.getPageIndex(this.currentPage),y=null!=v?v+1:1,C=mxUtils.bind(this,function(B,M,S,l){var x=B.useCssTransforms,F=B.currentTranslate,N=B.currentScale,-O=B.view.translate,Q=B.view.scale;B.useCssTransforms&&(B.useCssTransforms=!1,B.currentTranslate=new mxPoint(0,0),B.currentScale=1,B.view.translate=new mxPoint(0,0),B.view.scale=1);var V=B.getGraphBounds(),T=0,W=0,X=mxRectangle.fromRectangle(B.pageFormat),Y=g.fit||g.crop||!B.pageVisible,Z=g.scale;X.width=Math.ceil(X.width*B.pageScale);X.height=Math.ceil(X.height*B.pageScale);var aa=1;if(g.fit){aa=g.sheetsAcross;var ea=g.sheetsDown;isNaN(Z)||(X.width=Math.ceil(X.width*Z),X.height=Math.ceil(X.height*-Z));aa=Math.min(X.height*ea/(V.height/B.view.scale),X.width*aa/(V.width/B.view.scale))}else aa=isNaN(Z)?1:Z;aa*=1;!Y&&B.pageVisible?(Z=B.getPageLayout(),T-=Z.x*X.width,W-=Z.y*X.height):Y=!0;g.crop&&(g.selection&&(V=t.getBoundingBox(t.getSelectionCells())),X.width=(V.width+1)*aa/B.view.scale,X.height=(V.height+1)*aa/B.view.scale);X.width=Math.ceil(1*X.width);X.height=Math.ceil(1*X.height);l=null!=l?"page/id,"+l:null;if(null==M){M=PrintDialog.createPrintPreview(B,aa,null,0,T,W,Y);M.title=this.getBaseFilename(!0);-M.pageSelector=!1;M.mathEnabled=!1;T=g.border;isNaN(T)||(M.pageMargin=T);g.selection&&(M.isCellVisible=function(ba){return B.isCellSelected(ba)});var ca=M.writeHead;M.writeHead=function(ba){ca.apply(this,arguments);mxClient.IS_GC&&(ba.writeln('<style type="text/css">'),ba.writeln("@media print {"),ba.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ba.writeln("}"),ba.writeln("</style>"));null!=m.fontCss&&(ba.writeln('<style type="text/css">'),ba.writeln(mxUtils.htmlEntities(m.fontCss,!1,!1,-!1)),ba.writeln("</style>"));for(var ia=B.getCustomFonts(),ka=0;ka<ia.length;ka++){var ua=ia[ka].name,sa=ia[ka].url;Graph.isCssFontUrl(sa)?ba.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(sa))+'" charset="UTF-8" type="text/css">'):(ba.writeln('<style type="text/css">'),ba.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(ua)+'";\nsrc: url("'+mxUtils.htmlEntities(sa)+'");\n}'),ba.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var da=M.drawBackgroundImage;-M.drawBackgroundImage=function(ba){da.apply(this,arguments);null!=ba.node&&(EditorUi.embedSvgImages(ba.node),t.disableSvgLinks(ba.node,function(ia){ia.setAttribute("href","javascript:void(0)")}))}}var ja=M.addGraphFragment;M.addGraphFragment=function(ba,ia,ka,ua,sa,ha){ja.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:sa.classList.add("geDisableMathJax")};g.grid&&(M.gridSize=B.gridSize,M.gridSteps=B.view.gridSteps,M.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:-B.view.gridColor);M.open(null,null,S,!0,l,X,g.selection?B.getSelectionCells():null)}else{V=B.background;if(null==V||""==V||V==mxConstants.NONE)V="#ffffff";M.backgroundColor=V;M.autoOrigin=Y;g.grid&&(M.gridSize=B.gridSize,M.gridSteps=B.view.gridSteps,M.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:B.view.gridColor);M.appendGraph(B,aa,T,W,S,!0,l,X,g.selection?B.getSelectionCells():null);S=B.getCustomFonts();if(null!=M.wnd)for(X=0;X<S.length;X++)T=S[X].name,W=S[X].url,Graph.isCssFontUrl(W)?-M.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(W)+'" charset="UTF-8" type="text/css">'):(M.wnd.document.writeln('<style type="text/css">'),M.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(T)+'";\nsrc: url("'+mxUtils.htmlEntities(W)+'");\n}'),M.wnd.document.writeln("</style>"))}x&&(B.useCssTransforms=x,B.currentTranslate=F,B.currentScale=N,B.view.translate=O,B.view.scale=Q);return M}),I=g.pagesFrom,K=g.pagesTo,J=!g.allPages;v=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,-g);else{J&&(J=g.selection||I==y&&K==y);if(!J&&null!=this.pages&&this.pages.length){J=0;y=this.pages.length-1;g.allPages||(J=parseInt(I)-1,y=parseInt(K)-1);for(var U=J;U<=y;U++){var P=this.pages[U];I=P==this.currentPage?t:null;if(null==I){I=this.createTemporaryGraph(t.stylesheet);I.shapeForegroundColor=t.shapeForegroundColor;I.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;J=!1;var R=null,n=null;null==P.viewState&&null==P.root&&this.updatePageRoot(P);null!=P.viewState&&(K=P.viewState.pageVisible,-J=P.viewState.mathEnabled,R=P.viewState.background,n=P.viewState.backgroundImage,I.pageFormat=P.viewState.pageFormat,I.gridSize=P.viewState.gridSize);null!=n&&null!=n.originalSrc&&(n=this.createImageForPageLink(n.originalSrc,P));I.background=R;I.backgroundImage=null!=n?new mxImage(n.src,n.width,n.height,n.x,n.y):null;I.pageVisible=K;I.mathEnabled=J;var z=I.getGraphBounds;I.getGraphBounds=function(){var B=z.apply(this,arguments),M=this.backgroundImage;if(null!=M&&null!=M.width&&null!=M.height){var S=-this.view.translate,l=this.view.scale;B=mxRectangle.fromRectangle(B);B.add(new mxRectangle((S.x+M.x)*l,(S.y+M.y)*l,M.width*l,M.height*l))}return B};var A=I.getGlobalVariable;I.getGlobalVariable=function(B){return"page"==B?P.getName():"pagenumber"==B?U+1:"pagecount"==B?null!=this.pages?this.pages.length:1:A.apply(this,arguments)};document.body.appendChild(I.container);this.updatePageRoot(P);I.model.setRoot(P.root)}v=C(I,v,U!=y,P.getId());I!=t&&I.container.parentNode.removeChild(I.container)}}else v=-C(t);null==v||null==v.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(v.mathEnabled&&(C=v.wnd.document,d||(v.wnd.IMMEDIATE_PRINT=!0),C.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),v.closeDocument(),Graph.rewritePageLinks(v.wnd.document,!0),v.mathEnabled||d||PrintDialog.printPreview(v));return v}};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,m=0;m<d.length;m++)mxEvent.addListener(d[m],"dragleave",function(t){null!=-g&&(g.parentNode.removeChild(g),g=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(d[m],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(d[m],"drop",mxUtils.bind(this,function(t){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<-t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);else{var v=this.extractGraphModelFromEvent(t);if(null==v){var y=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=y&&(10==document.documentMode||11==document.documentMode?v=y.getData("Text"):(v=null,v=0<=mxUtils.indexOf(y.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):-0<=mxUtils.indexOf(y.types,"text/html")?y.getData("text/html"):null,null!=v&&0<v.length?(y=document.createElement("div"),y.innerHTML=Graph.sanitizeHtml(v),y=y.getElementsByTagName("img"),0<y.length&&(v=y[0].getAttribute("src"))):0<=mxUtils.indexOf(y.types,"text/plain")&&(v=y.getData("text/plain"))),null!=v&&(Editor.isPngDataUrl(v)?(v=Editor.extractGraphModelFromPng(v),null!=v&&0<v.length&&this.openLocalFile(v,null,!0)):this.isRemoteFileFormat(v)?this.isOffline()?this.showError(mxResources.get("error"),-mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(v))).send(mxUtils.bind(this,function(C){200<=C.getStatus()&&299>=C.getStatus()?this.openLocalFile(C.getText(),null,!0):this.showError(mxResources.get("error"),413==C.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(v)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(v):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+-"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(v)))))}else this.openLocalFile(v,null,!0)}t.stopPropagation();t.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var g=0,m=0;if(null==d){var t=document.body;var v=document.documentElement;var y=(t.clientWidth||v.clientWidth)-3;t=Math.max(t.clientHeight||0,v.clientHeight)-3}else g=d.offsetTop,m=d.offsetLeft,y=d.clientWidth,t=d.clientHeight;v=document.createElement("div");v.style.zIndex=mxPopupMenu.prototype.zIndex+-2;v.style.border="3px dotted rgb(254, 137, 12)";v.style.pointerEvents="none";v.style.position="absolute";v.style.top=g+"px";v.style.left=m+"px";v.style.width=Math.max(0,y-3)+"px";v.style.height=Math.max(0,t-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(v):document.body.appendChild(v);return v};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var g=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=g){var m=new mxCodec(g.ownerDocument),-t=new mxGraphModel;m.decode(g,t);g=t.getChildAt(t.getRoot(),0);for(m=0;m<t.getChildCount(g);m++)d.push(t.getChildAt(g,m))}return d};EditorUi.prototype.openFileHandle=function(d,g,m,t,v,y){if(null!=g&&0<g.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(g)||/(\.pdf)$/i.test(g))g=g.substring(0,g.length-4),/(\.drawio)$/i.test(g)||(g+=".drawio");var C=mxUtils.bind(this,function(K){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==K.substring(0,10)){null==-this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,K,g)),this.showSidebar()}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,g,t)});if(EditorUi.isVisioFilename(g))this.importVisio(m,mxUtils.bind(this,function(K){this.spinner.stop();C(K)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(K){this.spinner.stop();C(K)}));else if(Graph.fileSupport&&-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(m,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),200<=K.status&&299>=K.status?C(K.responseText):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(g)&&(g=g.substring(0,-g.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(K){this.spinner.stop();this.openLocalFile(K,g,t)}),mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,d,m.name)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else if(0==-d.indexOf("PK"))this.importZipFile(m,mxUtils.bind(this,function(K){this.spinner.stop();C(K)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,t)}));else{if("image/png"==m.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==m.type){var I=Editor.extractGraphModelFromPdf(d);null!=I&&(v=null,t=!0,d=I)}this.spinner.stop();this.openLocalFile(d,g,t,v,null!=v?m:null,y)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var m=-0;m<d.length;m++)mxUtils.bind(this,function(t){var v=new FileReader;v.onload=mxUtils.bind(this,function(y){try{this.openFileHandle(y.target.result,t.name,t,g)}catch(C){this.handleError(C)}});v.onerror=mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y);window.openFile=null});"image"!==t.type.substring(0,5)&&"application/pdf"!==t.type||"image/svg"===t.type.substring(0,9)?v.readAsText(t):v.readAsDataURL(t)})(d[m])};EditorUi.prototype.openLocalFile=function(d,g,m,t,v,y){var C=this.getCurrentFile(),-I=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var K=mxUtils.parseXml(d);null!=K&&(this.editor.setGraphXml(K.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,g||this.defaultFilename,m,t,v,y))});if(null!=d&&0<d.length)null==C||!C.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)&&null!=C&&C.isModified()?this.confirm(mxResources.get("allChangesLost"),-null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,g),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=C&&C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var g=-0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);g=[];for(var m in d)g.push(m);return g};EditorUi.prototype.addBasenamesForCell=function(d,g){function m(C){if(null!=C){var I=C.lastIndexOf(".");0<I&&(C=C.substring(I+1,C.length));null==g[C]&&(g[C]=!0)}}var t=this.editor.graph,v=t.getCellStyle(d);m(mxStencilRegistry.getBasenameForStencil(v[mxConstants.STYLE_SHAPE]));t.model.isEdge(d)&&-(m(mxMarker.getPackageForType(v[mxConstants.STYLE_STARTARROW])),m(mxMarker.getPackageForType(v[mxConstants.STYLE_ENDARROW])));v=t.model.getChildCount(d);for(var y=0;y<v;y++)this.addBasenamesForCell(t.model.getChildAt(d,y),g)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?+(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(g){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(g,k){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));d.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));+this.addListener("copyConnectChanged",mxUtils.bind(this,function(g,k){mxSettings.setCreateTarget(d.connectionHandler.isCreateTarget());mxSettings.save()}));d.pageFormat=null!=d.defaultPageFormat?d.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(g,k){mxSettings.setPageFormat(d.pageFormat);mxSettings.save()}));d.view.defaultDarkGridColor=mxSettings.getGridColor(!0);d.view.defaultGridColor=mxSettings.getGridColor(!1);d.view.gridColor="light-dark("++d.view.defaultGridColor+", "+d.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(g,k){mxSettings.setGridColor(d.view.defaultGridColor,!1);mxSettings.setGridColor(d.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(g,k){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||+this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(g,k){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",+mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,g,k){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,+function(v,t){try{this.spinner.stop();var x=this.createImageDataUri(v,g,"png"),A=parseInt(t.getAttribute("width")),J=parseInt(t.getAttribute("height"));this.writeImageToClipboard(x,A,J,mxUtils.bind(this,function(D){this.handleError(D)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?+d:null)}catch(v){this.handleError(v)}};EditorUi.prototype.copyCells=function(d,g){var k=this.editor.graph;if(k.isSelectionEmpty())d.innerText="";else{var v=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),t=mxUtils.getXml(k.encodeCells(v));mxUtils.setTextContent(d,encodeURIComponent(t));g?(k.removeCells(v,!1),k.lastPasteXml=null):(k.lastPasteXml=t,k.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var g=+this.editor.graph;g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,k,v,t){t=null!=t?t:!0;var x=this.editor.graph,A=null;x.lastPasteXml==d?x.pasteCounter++:(x.lastPasteXml=d,x.pasteCounter=0);var J=x.pasteCounter*x.gridSize;if(k||this.isCompatibleString(d))A=this.importXml(d,J,J),x.setSelectionCells(A);else if(g&&1==+x.getSelectionCount()){t=x.getStartEditingCell(x.getSelectionCell(),v);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==x.getCurrentCellStyle(t)[mxConstants.STYLE_SHAPE])x.setCellStyles(mxConstants.STYLE_IMAGE,d,[t]);else{x.model.beginUpdate();try{x.labelChanged(t,d),Graph.isLink(d)&&x.setLinkForCell(t,d)}finally{x.model.endUpdate()}}x.setSelectionCell(t)}else A=x.getInsertPoint(),x.isMouseInsertPoint()&&(J=0,x.lastPasteXml==d&&0<x.pasteCounter&&x.pasteCounter--),A=this.insertTextAt(d,A.x+J,+A.y+J,t),x.setSelectionCells(A);x.isSelectionEmpty()||(x.scrollCellToVisible(x.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(x.view.getState(x.getSelectionCell())));return A};EditorUi.prototype.pasteCells=function(d,g,k,v){if(!mxEvent.isConsumed(d)){var t=g,x=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var A=d.clipboardData.getData("text/plain"),J=!1;if(null!=A&&0<A.length&&"%3CmxGraphModel%3E"==A.substring(0,18))try{var D=decodeURIComponent(A);this.isCompatibleString(D)&&+(J=!0,A=D)}catch(q){}J=J?null:d.clipboardData.getData("text/html");null!=J&&0<J.length?(t=this.parseHtmlData(J),x="text/plain"!=t.getAttribute("data-type")):null!=A&&0<A.length&&(t=document.createElement("div"),mxUtils.setTextContent(t,J))}A=t.getElementsByTagName("span");if(null!=A&&0<A.length&&"application/vnd.lucid.chart.objects"===A[0].getAttribute("data-lucid-type"))k=A[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(q){var y=this.editor.graph;+y.lastPasteXml==q?y.pasteCounter++:(y.lastPasteXml=q,y.pasteCounter=0);var B=y.pasteCounter*y.gridSize;y.setSelectionCells(this.importXml(q,B,B));y.scrollCellToVisible(y.getSelectionCell())}),mxUtils.bind(this,function(q){this.handleError(q)})),mxEvent.consume(d));else{var E=!1,R="";R=x?null!=t.textContent&&"<mxfile"==t.textContent.substring(0,7)&&"</mxfile>"==t.textContent.substring(t.textContent.length-9)||"<mxGraphModel"==t.textContent.substring(0,13)&&"</mxGraphModel>"==t.textContent.substring(t.textContent.length-+15)?t.textContent.replace(/\u00a0/g," "):t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText);try{var V=R.lastIndexOf("%3E");0<=V&&V<R.length-3&&(R=R.substring(0,V+3))}catch(q){}try{A=t.getElementsByTagName("span"),(D=null!=A&&0<A.length?mxUtils.trim(decodeURIComponent(A[0].textContent)):decodeURIComponent(R))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(E=!0,R=D)}catch(q){}try{if(null!=R&&0<R.length){if(0==R.substring(0,+20).replace(/\s/g,"").indexOf('{"isProtected":')){var Q=mxUtils.bind(this,function(){try{R=(new MiroImporter).importMiroJson(JSON.parse(R)),this.pasteXml(R,v,E,d)}catch(q){console.log("Miro import error:",q)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Q):Q()}else this.pasteXml(R,v,E,d,x);try{mxEvent.consume(d)}catch(q){}}else if(!k){var P=this.editor.graph;P.lastPasteXml=null;P.pasteCounter=0}}catch(q){this.handleError(q)}}}g.innerHTML=" "};EditorUi.prototype.showPrintDialog=+function(d,g){var k=320;this.editor.graph.isEnabled()&&(k+=40);null!=this.pages&&1<this.pages.length&&(k+=40,this.editor.graph.isEnabled()||(k+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(k+=20);this.showDialog((new PrintDialog(this,d,g)).container,320,k,!0,!0)};EditorUi.prototype.print=function(d,g){var k=this.editor,v=k.graph,t=this.getPageIndex(this.currentPage),x=null!=t?t+1:1,A=mxUtils.bind(this,function(B,C,M,T){var m=B.useCssTransforms,z=B.currentTranslate,I=B.currentScale,+L=B.view.translate,N=B.view.scale;B.useCssTransforms&&(B.useCssTransforms=!1,B.currentTranslate=new mxPoint(0,0),B.currentScale=1,B.view.translate=new mxPoint(0,0),B.view.scale=1);var O=B.getGraphBounds(),S=0,U=0,W=mxRectangle.fromRectangle(B.pageFormat),X=g.fit||g.crop||!B.pageVisible,Z=g.scale;W.width=Math.ceil(W.width*B.pageScale);W.height=Math.ceil(W.height*B.pageScale);var Y=1;if(g.fit){Y=g.sheetsAcross;var ba=g.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));+Y=Math.min(W.height*ba/(O.height/B.view.scale),W.width*Y/(O.width/B.view.scale))}else Y=isNaN(Z)?1:Z;Y*=1;!X&&B.pageVisible?(Z=B.getPageLayout(),S-=Z.x*W.width,U-=Z.y*W.height):X=!0;g.crop&&(g.selection&&(O=v.getBoundingBox(v.getSelectionCells())),W.width=(O.width+1)*Y/B.view.scale,W.height=(O.height+1)*Y/B.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);T=null!=T?"page/id,"+T:null;if(null==C){C=PrintDialog.createPrintPreview(B,Y,null,0,S,U,X);C.title=this.getBaseFilename(!0);+C.pageSelector=!1;C.mathEnabled=!1;S=g.border;isNaN(S)||(C.pageMargin=S);g.selection&&(C.isCellVisible=function(aa){return B.isCellSelected(aa)});var ea=C.writeHead;C.writeHead=function(aa){ea.apply(this,arguments);mxClient.IS_GC&&(aa.writeln('<style type="text/css">'),aa.writeln("@media print {"),aa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),aa.writeln("}"),aa.writeln("</style>"));null!=k.fontCss&&(aa.writeln('<style type="text/css">'),aa.writeln(mxUtils.htmlEntities(k.fontCss,!1,!1,+!1)),aa.writeln("</style>"));for(var da=B.getCustomFonts(),ia=0;ia<da.length;ia++){var pa=da[ia].name,oa=da[ia].url;Graph.isCssFontUrl(oa)?aa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(oa))+'" charset="UTF-8" type="text/css">'):(aa.writeln('<style type="text/css">'),aa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(pa)+'";\nsrc: url("'+mxUtils.htmlEntities(oa)+'");\n}'),aa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=C.drawBackgroundImage;+C.drawBackgroundImage=function(aa){ca.apply(this,arguments);null!=aa.node&&(EditorUi.embedSvgImages(aa.node),v.disableSvgLinks(aa.node,function(da){da.setAttribute("href","javascript:void(0)")}))}}var fa=C.addGraphFragment;C.addGraphFragment=function(aa,da,ia,pa,oa,ha){fa.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:oa.classList.add("geDisableMathJax")};g.grid&&(C.gridSize=B.gridSize,C.gridSteps=B.view.gridSteps,C.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:+B.view.gridColor);C.open(null,null,M,!0,T,W,g.selection?B.getSelectionCells():null)}else{O=B.background;if(null==O||""==O||O==mxConstants.NONE)O="#ffffff";C.backgroundColor=O;C.autoOrigin=X;g.grid&&(C.gridSize=B.gridSize,C.gridSteps=B.view.gridSteps,C.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:B.view.gridColor);C.appendGraph(B,Y,S,U,M,!0,T,W,g.selection?B.getSelectionCells():null);M=B.getCustomFonts();if(null!=C.wnd)for(W=0;W<M.length;W++)S=M[W].name,U=M[W].url,Graph.isCssFontUrl(U)?+C.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(U)+'" charset="UTF-8" type="text/css">'):(C.wnd.document.writeln('<style type="text/css">'),C.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(S)+'";\nsrc: url("'+mxUtils.htmlEntities(U)+'");\n}'),C.wnd.document.writeln("</style>"))}m&&(B.useCssTransforms=m,B.currentTranslate=z,B.currentScale=I,B.view.translate=L,B.view.scale=N);return C}),J=g.pagesFrom,D=g.pagesTo,E=!g.allPages;t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,+g);else{E&&(E=g.selection||J==x&&D==x);if(!E&&null!=this.pages&&this.pages.length){E=0;x=this.pages.length-1;g.allPages||(E=parseInt(J)-1,x=parseInt(D)-1);for(var R=E;R<=x;R++){var V=this.pages[R];J=V==this.currentPage?v:null;if(null==J){J=this.createTemporaryGraph(v.stylesheet);J.shapeForegroundColor=v.shapeForegroundColor;J.shapeBackgroundColor=v.shapeBackgroundColor;D=!0;E=!1;var Q=null,P=null;null==V.viewState&&null==V.root&&this.updatePageRoot(V);null!=V.viewState&&(D=V.viewState.pageVisible,+E=V.viewState.mathEnabled,Q=V.viewState.background,P=V.viewState.backgroundImage,J.pageFormat=V.viewState.pageFormat,J.gridSize=V.viewState.gridSize);null!=P&&null!=P.originalSrc&&(P=this.createImageForPageLink(P.originalSrc,V));J.background=Q;J.backgroundImage=null!=P?new mxImage(P.src,P.width,P.height,P.x,P.y):null;J.pageVisible=D;J.mathEnabled=E;var q=J.getGraphBounds;J.getGraphBounds=function(){var B=q.apply(this,arguments),C=this.backgroundImage;if(null!=C&&null!=C.width&&null!=C.height){var M=+this.view.translate,T=this.view.scale;B=mxRectangle.fromRectangle(B);B.add(new mxRectangle((M.x+C.x)*T,(M.y+C.y)*T,C.width*T,C.height*T))}return B};var y=J.getGlobalVariable;J.getGlobalVariable=function(B){return"page"==B?V.getName():"pagenumber"==B?R+1:"pagecount"==B?null!=this.pages?this.pages.length:1:y.apply(this,arguments)};document.body.appendChild(J.container);this.updatePageRoot(V);J.model.setRoot(V.root)}t=A(J,t,R!=x,V.getId());J!=v&&J.container.parentNode.removeChild(J.container)}}else t=+A(v);null==t||null==t.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(A=t.wnd.document,d||(t.wnd.IMMEDIATE_PRINT=!0),A.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),t.closeDocument(),Graph.rewritePageLinks(t.wnd.document,!0),t.mathEnabled||d||PrintDialog.printPreview(t));return t}};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",function(v){null!=+g&&(g.parentNode.removeChild(g),g=null);v.stopPropagation();v.preventDefault()}),mxEvent.addListener(d[k],"dragover",mxUtils.bind(this,function(v){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());v.stopPropagation();v.preventDefault()})),mxEvent.addListener(d[k],"drop",mxUtils.bind(this,function(v){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<+v.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(v.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(v)&&!mxEvent.isShiftDown(v)):this.openFiles(v.dataTransfer.files,!0);else{var t=this.extractGraphModelFromEvent(v);if(null==t){var x=null!=v.dataTransfer?v.dataTransfer:v.clipboardData;null!=x&&(10==document.documentMode||11==document.documentMode?t=x.getData("Text"):(t=null,t=0<=mxUtils.indexOf(x.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):+0<=mxUtils.indexOf(x.types,"text/html")?x.getData("text/html"):null,null!=t&&0<t.length?(x=document.createElement("div"),x.innerHTML=Graph.sanitizeHtml(t),x=x.getElementsByTagName("img"),0<x.length&&(t=x[0].getAttribute("src"))):0<=mxUtils.indexOf(x.types,"text/plain")&&(t=x.getData("text/plain"))),null!=t&&(Editor.isPngDataUrl(t)?(t=Editor.extractGraphModelFromPng(t),null!=t&&0<t.length&&this.openLocalFile(t,null,!0)):this.isRemoteFileFormat(t)?this.isOffline()?this.showError(mxResources.get("error"),+mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(t))).send(mxUtils.bind(this,function(A){200<=A.getStatus()&&299>=A.getStatus()?this.openLocalFile(A.getText(),null,!0):this.showError(mxResources.get("error"),413==A.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(t)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(t):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost++"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(t)))))}else this.openLocalFile(t,null,!0)}v.stopPropagation();v.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var g=0,k=0;if(null==d){var v=document.body;var t=document.documentElement;var x=(v.clientWidth||t.clientWidth)-3;v=Math.max(v.clientHeight||0,t.clientHeight)-3}else g=d.offsetTop,k=d.offsetLeft,x=d.clientWidth,v=d.clientHeight;t=document.createElement("div");t.style.zIndex=mxPopupMenu.prototype.zIndex++2;t.style.border="3px dotted rgb(254, 137, 12)";t.style.pointerEvents="none";t.style.position="absolute";t.style.top=g+"px";t.style.left=k+"px";t.style.width=Math.max(0,x-3)+"px";t.style.height=Math.max(0,v-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(t):document.body.appendChild(t);return t};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var g=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=g){var k=new mxCodec(g.ownerDocument),+v=new mxGraphModel;k.decode(g,v);g=v.getChildAt(v.getRoot(),0);for(k=0;k<v.getChildCount(g);k++)d.push(v.getChildAt(g,k))}return d};EditorUi.prototype.openFileHandle=function(d,g,k,v,t,x){if(null!=g&&0<g.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(g)||/(\.pdf)$/i.test(g))g=g.substring(0,g.length-4),/(\.drawio)$/i.test(g)||(g+=".drawio");var A=mxUtils.bind(this,function(D){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==D.substring(0,10)){null==+this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,D,g)),this.showSidebar()}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,g,v)});if(EditorUi.isVisioFilename(g))this.importVisio(k,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}));else if(Graph.fileSupport&&+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),200<=D.status&&299>=D.status?A(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(g)&&(g=g.substring(0,+g.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,g,v)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,d,k.name)),this.showSidebar()}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==+d.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,v)}));else{if("image/png"==k.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==k.type){var J=Editor.extractGraphModelFromPdf(d);null!=J&&(t=null,v=!0,d=J)}this.spinner.stop();this.openLocalFile(d,g,v,t,null!=t?k:null,x)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=+0;k<d.length;k++)mxUtils.bind(this,function(v){var t=new FileReader;t.onload=mxUtils.bind(this,function(x){try{this.openFileHandle(x.target.result,v.name,v,g)}catch(A){this.handleError(A)}});t.onerror=mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x);window.openFile=null});"image"!==v.type.substring(0,5)&&"application/pdf"!==v.type||"image/svg"===v.type.substring(0,9)?t.readAsText(v):t.readAsDataURL(v)})(d[k])};EditorUi.prototype.openLocalFile=function(d,g,k,v,t,x){var A=this.getCurrentFile(),+J=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(d);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,g||this.defaultFilename,k,v,t,x))});if(null!=d&&0<d.length)null==A||!A.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)?J():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)&&null!=A&&A.isModified()?this.confirm(mxResources.get("allChangesLost"),+null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,g),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=A&&A.isModified()?this.confirm(mxResources.get("allChangesLost"),null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):J()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var g=+0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);g=[];for(var k in d)g.push(k);return g};EditorUi.prototype.addBasenamesForCell=function(d,g){function k(A){if(null!=A){var J=A.lastIndexOf(".");0<J&&(A=A.substring(J+1,A.length));null==g[A]&&(g[A]=!0)}}var v=this.editor.graph,t=v.getCellStyle(d);k(mxStencilRegistry.getBasenameForStencil(t[mxConstants.STYLE_SHAPE]));v.model.isEdge(d)&&+(k(mxMarker.getPackageForType(t[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(t[mxConstants.STYLE_ENDARROW])));t=v.model.getChildCount(d);for(var x=0;x<t;x++)this.addBasenamesForCell(v.model.getChildAt(d,x),g)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?"":"none";this.editor.graph.setEnabled(d);null!=this.tabContainer&&(this.tabContainer.style.visibility=d&&0<parseInt(this.tabContainer.style.height)?"":"hidden");null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");d||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=-!1;this.installMessageHandler(mxUtils.bind(this,function(g,m,t,v){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(v)try{var y=this.editor.graph;y.setGridEnabled(!1);y.pageVisible=!1;var C=y.model.cells,I;for(I in C){var K=C[I];null!=K&&null!=K.style&&(K.style+=";sketch=1;"+(-1==K.style.indexOf("fontFamily=")||-1<K.style.indexOf("fontFamily=Helvetica;")?-"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(J){console.log(J)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=t?t:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=-function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,g){null!=d?this.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(mxUtils.bind(this,function(m){this.spinner.stop();g(m)})):g(null)};EditorUi.prototype.createLoadMessage=function(d){var g=this.editor.graph;return{event:d,pageVisible:g.pageVisible,-translate:g.view.translate,bounds:g.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var m=window.opener||window.parent;if(this.editor.modified){var t=g.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,-null,null,!1),g,null,!0,mxUtils.bind(this,function(v){m.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(v)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else d||m.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=-!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(v){d||this.handleError(v)}};EditorUi.prototype.installMessageHandler=function(d){var g=null,m=!1,t=!1,v=null,y=mxUtils.bind(this,function(K,J){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,y);mxEvent.addListener(window,"message",mxUtils.bind(this,-function(K){if(K.source==(window.opener||window.parent)){var J=K.data,U=null,P=mxUtils.bind(this,function(ba){if(null!=ba&&"function"===typeof ba.charAt&&"<"!=ba.charAt(0))try{Editor.isPngDataUrl(ba)?ba=Editor.extractGraphModelFromPng(ba):"data:image/svg+xml;base64,"==ba.substring(0,26)?ba=atob(ba.substring(26)):"data:image/svg+xml;utf8,"==ba.substring(0,24)&&(ba=ba.substring(24)),null!=ba&&(""==ba.trim()?ba=null:"%"==ba.charAt(0)?ba=decodeURIComponent(ba):"<"!=ba.charAt(0)&&(ba=Graph.decompress(ba)))}catch(ia){}return ba});-if("json"==urlParams.proto){var R=!1;try{J=JSON.parse(J),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[J])}catch(ba){J=null}try{if(null==J)return;if("dialog"==J.action){this.showError(null!=J.titleKey?mxResources.get(J.titleKey):J.title,null!=J.messageKey?mxResources.get(J.messageKey):mxUtils.htmlEntities(J.message),null!=J.buttonKey?mxResources.get(J.buttonKey):J.button);null!=J.modified&&(this.editor.modified=J.modified);return}if("layout"==J.action){this.executeLayouts(this.editor.graph.createLayouts(J.layouts));-return}if("prompt"==J.action){this.spinner.stop();var n=new FilenameDialog(this,J.defaultValue||"",null!=J.okKey?mxResources.get(J.okKey):J.ok,function(ba){null!=ba?C.postMessage(JSON.stringify({event:"prompt",value:ba,message:J}),"*"):C.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")},null!=J.titleKey?mxResources.get(J.titleKey):J.title,null,null,null,null,function(){C.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")});this.showDialog(n.container,300,80,!0,!1);-n.init();return}if("draft"==J.action){var z=P(J.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[J.name||this.defaultFilename]),z,mxUtils.bind(this,function(){this.hideDialog();C.postMessage(JSON.stringify({event:"draft",result:"edit",message:J}),"*")}),mxUtils.bind(this,function(){this.hideDialog();C.postMessage(JSON.stringify({event:"draft",result:"discard",message:J}),"*")}),J.editKey?mxResources.get(J.editKey):null,J.discardKey?mxResources.get(J.discardKey):null,J.ignore?-mxUtils.bind(this,function(){this.hideDialog();C.postMessage(JSON.stringify({event:"draft",result:"ignore",message:J}),"*")}):null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(ba){ba&&this.actions.get("exit").funct()}));try{n.init()}catch(ba){C.postMessage(JSON.stringify({event:"draft",error:ba.toString(),message:J}),"*")}return}if("template"==J.action){this.spinner.stop();var A=1==J.enableRecent,B=1==J.enableSearch,M=1==J.enableCustomTemp;n=new NewDialog(this,!1,J.templatesOnly?-!1:null!=J.callback,mxUtils.bind(this,function(ba,ia,ka,ua){ba=ba||this.emptyDiagramXml;null!=J.callback?C.postMessage(JSON.stringify({event:"template",xml:ba,blank:ba==this.emptyDiagramXml,name:ia,tempUrl:ka,libs:ua,builtIn:!0,message:J}),"*"):(d(ba,K,ba!=this.emptyDiagramXml,J.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,A?mxUtils.bind(this,function(ba){this.remoteInvoke("getRecentDiagrams",[null],null,ba,function(){ba(null,"Network Error!")})}):-null,B?mxUtils.bind(this,function(ba,ia){this.remoteInvoke("searchDiagrams",[ba,null],null,ia,function(){ia(null,"Network Error!")})}):null,mxUtils.bind(this,function(ba,ia,ka){C.postMessage(JSON.stringify({event:"template",docUrl:ba,info:ia,name:ka}),"*")}),null,null,M?mxUtils.bind(this,function(ba){this.remoteInvoke("getCustomTemplates",null,null,ba,function(){ba({},0)})}):null,1==J.withoutType);this.showDialog(n.container,620,460,!0,!1,mxUtils.bind(this,function(ba){null!=this.sidebar&&this.sidebar.hideTooltip();-ba&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==J.action){var S=this.getDiagramTextContent();C.postMessage(JSON.stringify({event:"textContent",data:S,message:J}),"*");return}if("status"==J.action){null!=J.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(J.messageKey))):null!=J.message&&this.editor.setStatus(mxUtils.htmlEntities(J.message));null!=J.modified&&(this.editor.modified=J.modified);return}if("spinner"==J.action){var l=null!=J.messageKey?mxResources.get(J.messageKey):-J.message;null==J.show||J.show?this.spinner.spin(document.body,l):this.spinner.stop();return}if("exit"==J.action){this.actions.get("exit").funct();return}if("viewport"==J.action){null!=J.viewport&&(this.embedViewport=J.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==J.action){n=null;try{var x=this.diagramContainer.getAttribute("data-scrollState");null!=x&&(this.diagramContainer.removeAttribute("data-scrollState"),n=JSON.parse(x))}catch(ba){}Editor.inlineFullscreen=-J.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=n&&this.restoreScrollState(n);return}if("snapshot"==J.action){this.sendEmbeddedSvgExport(!0);return}if("export"==J.action){if("png"==J.format||"xmlpng"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){var F=null!=J.xml?J.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var N=this.editor.graph,O=mxUtils.bind(this,function(ba,ia){if(J.withSvg)J.withSvg=-!1,this.getEmbeddedSvg(F,this.editor.graph,null,!0,function(ua){O(ba,ua)},null,null,J.embedImages,this.editor.graph.background,J.scale,J.border,J.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ka=this.createLoadMessage("export");ka.format=J.format;ka.message=J;ka.data=ba;ka.svg=ia;ka.xml=F;C.postMessage(JSON.stringify(ka),"*")}}),Q=mxUtils.bind(this,function(ba){null==ba&&(ba=Editor.blankImage);"xmlpng"==J.format&&(ba=Editor.writeGraphModelToPng(ba,"tEXt","mxfile",encodeURIComponent(F)));-N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);O(ba)}),V=J.pageId||(null!=this.pages?J.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var T=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=V){var ba=N.getGlobalVariable;N=this.createTemporaryGraph(N.getStylesheet());for(var ia,ka=0;ka<this.pages.length;ka++)if(this.pages[ka].getId()==V){ia=this.updatePageRoot(this.pages[ka]);break}null==ia&&(ia=this.currentPage);-N.getGlobalVariable=function(pa){return"page"==pa?ia.getName():"pagenumber"==pa?1:ba.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(ia.root)}if(null!=J.layerIds){var ua=N.model,sa=ua.getChildCells(ua.getRoot()),ha={};for(ka=0;ka<J.layerIds.length;ka++)ha[J.layerIds[ka]]=!0;for(ka=0;ka<sa.length;ka++)ua.setVisible(sa[ka],ha[sa[ka].id]||!1)}ka=null;J.keepTheme&&(ka=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(pa){Q(pa.toDataURL("image/png"))}),-J.width,null,J.background,mxUtils.bind(this,function(){Q(null)}),null,null,J.scale,J.transparent,J.shadow,null,N,J.border,null,J.grid,ka)});null!=J.xml&&0<J.xml.length&&(m=!0,this.setFileData(F),m=!1);T()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==J.format?"1":"0")+(null!=V?"&pageId="+V:"")+(null!=J.layerIds&&0<J.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:J.layerIds})):"")+(null!=J.scale?"&scale="+J.scale:"")+"&base64=1&xml="+encodeURIComponent(F))).send(mxUtils.bind(this,-function(ba){200<=ba.getStatus()&&299>=ba.getStatus()?O("data:image/png;base64,"+ba.getText()):Q(null)}),mxUtils.bind(this,function(){Q(null)}))}}else if(T=mxUtils.bind(this,function(){var ba=this.createLoadMessage("export");ba.message=J;if("html2"==J.format||"html"==J.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ia=this.getXmlFileData();ba.xml=mxUtils.getXml(ia);ba.data=this.getFileData(null,null,!0,null,null,null,ia);ba.format=J.format}else if("html"==J.format)ia=this.editor.getGraphXml(),-ba.data=this.getHtml(ia,this.editor.graph),ba.xml=mxUtils.getXml(ia),ba.format=J.format;else{mxSvgCanvas2D.prototype.foAltText=null;ia=null!=J.background?J.background:this.editor.graph.background;ia==mxConstants.NONE&&(ia=null);ba.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ba.format="svg";var ka=mxUtils.bind(this,function(sa){this.editor.graph.setEnabled(!0);this.spinner.stop();ba.data=Editor.createSvgDataUri(sa);C.postMessage(JSON.stringify(ba),"*")}),ua="auto";J.keepTheme&&-(ua=Editor.isDarkMode()?"dark":"light");null!=J.theme&&(ua=J.theme);if("xmlsvg"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){ua=null;if(this.isAutoDarkMode()||Editor.isDarkMode())ua="auto";null!=J.theme&&(ua=J.theme);this.getEmbeddedSvg(ba.xml,this.editor.graph,null,!0,ka,null,null,J.embedImages,ia,J.scale,J.border,J.shadow,ua)}}else if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?-mxResources.get(J.spinKey):J.spin))this.editor.graph.setEnabled(!1),ia=this.editor.graph.getSvg(ia,J.scale,J.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||J.shadow,null,ua),(this.editor.graph.shadowVisible||J.shadow)&&this.editor.graph.addSvgShadow(ia),this.embedFonts(ia,mxUtils.bind(this,function(sa){J.embedImages||null==J.embedImages?this.editor.convertImages(sa,mxUtils.bind(this,function(ha){ka(mxUtils.getXml(ha))})):ka(mxUtils.getXml(sa))}));return}C.postMessage(JSON.stringify(ba),-"*")}),null!=J.xml&&0<J.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);T()}}m=!0;this.setFileData(J.xml);m=!1;this.editor.graph.mathEnabled||T()}else T();return}if("load"==J.action){R=J.toSketch;t=1==J.autosave;this.hideDialog();null!=J.modified&&null==urlParams.modified&&(urlParams.modified=J.modified);null!=J.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=J.saveAndExit);if("1"==urlParams.saveAndExit||-"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=J.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=J.noSaveBtn);if(null!=J.rough){var X=Editor.sketchMode;this.doSetSketchMode(J.rough);X!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=-J.dark&&this.setDarkMode(J.dark);null!=J.border&&(this.embedExportBorder=J.border);null!=J.theme&&(this.embedExportTheme=J.theme);null!=J.background&&(this.embedExportBackground=J.background);null!=J.viewport&&(this.embedViewport=J.viewport);this.embedExitPoint=null;if(null!=J.rect){var Y=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,J.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,J.rect.top)+"px";this.minInlineWidth=J.minWidth;this.minInlineHeight=J.minHeight;-this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Z=J.maxFitScale,aa=J.rect.width+2*Y,ea=J.rect.height+2*Y;U=mxUtils.bind(this,function(){var ba=mxUtils.getDocumentSize();aa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,aa):aa,ba.width-80);ba=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ea):ea,ba.height-80);this.diagramContainer.style.width=aa+"px";this.diagramContainer.style.height=-ba+"px";var ia=this.editor.graph;ba=ia.maxFitScale;ia.maxFitScale=Z;ia.fit(2*Y,null,null,null,null,null,ea);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ia.getGraphBounds().width<this.minInlineWidth){var ka=ia.container.scrollTop;this.resetScrollbars();ia.container.scrollTop=ka}ia.maxFitScale=ba;ia.container.scrollTop-=Y;ia.container.scrollLeft-=Y;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[J]));ia.container.focus();null!=this.formatWindow&&-null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=ia.container.style.top);var ua=ia.getGraphBounds();ia.container.clientWidth>ua.width+2*Y&&(ia.container.scrollLeft=ua.x+(ua.width+Y-ia.container.clientWidth)/2)}),10)})}null!=J.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=J.noExitBtn);null!=J.title&&null!=this.buttonContainer&&(z=this.createStatusDiv(""),mxUtils.write(z,J.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),-this.buttonContainer.appendChild(z),this.embedFilenameSpan=z);try{J.libs&&this.sidebar.showEntries(J.libs)}catch(ba){}J=null!=J.xmlpng?this.extractGraphModelFromPng(J.xmlpng):null!=J.descriptor?J.descriptor:J.xml}else{if("merge"==J.action){var ca=this.getCurrentFile();null!=ca&&(z=P(J.xml),null!=z&&""!=z&&ca.mergeFile(new LocalFile(this,z),function(){C.postMessage(JSON.stringify({event:"merge",message:J}),"*")},function(ba){C.postMessage(JSON.stringify({event:"merge",message:J,error:ba}),"*")}))}else"remoteInvokeReady"==-J.action?this.handleRemoteInvokeReady(C):"remoteInvoke"==J.action?this.handleRemoteInvoke(J,K.origin):"remoteInvokeResponse"==J.action?this.handleRemoteInvokeResponse(J):C.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(J)}),"*");return}}catch(ba){this.handleError(ba)}}var da=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ja=mxUtils.bind(this,function(ba,ia){m=!0;-try{d(ba,ia,null,R)}catch(ka){this.handleError(ka)}m=!1;null!=urlParams.modified&&this.editor.setStatus("");v=da();t&&null==g&&(g=mxUtils.bind(this,function(ka,ua){ka=da();ka==v||m||(ua=this.createLoadMessage("autosave"),ua.xml=ka,(window.opener||window.parent).postMessage(JSON.stringify(ua),"*"));v=ka}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",-g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ia=this.createLoadMessage("load"),ia.xml=ba,C.postMessage(JSON.stringify(ia),"*");null!=U&&U()});null!=J&&-"function"===typeof J.substring&&"data:application/vnd.visio;base64,"==J.substring(0,34)?(P="0M8R4KGxGuE"==J.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(J.substring(J.indexOf(",")+1)),function(ba){ja(ba,K)},mxUtils.bind(this,function(ba){this.handleError(ba)}),P)):null!=J&&"function"===typeof J.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(J,-mxUtils.bind(this,function(ba){4==ba.readyState&&(200<=ba.status&&299>=ba.status&&"<mxGraphModel"==ba.responseText.substring(0,13)?ja(ba.responseText,K):this.handleError({message:413==ba.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=J&&"function"===typeof J.substring&&this.isLucidChartData(J)?this.convertLucidChart(J,mxUtils.bind(this,function(ba){ja(ba)}),mxUtils.bind(this,function(ba){this.handleError(ba)})):null==J||"object"!==typeof J||null==J.format||-null==J.data&&null==J.url?(J=P(J),ja(J,K)):this.loadDescriptor(J,mxUtils.bind(this,function(ba){ja(da(),K)}),mxUtils.bind(this,function(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}))}}));var C=window.opener||window.parent;y="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";C.postMessage(y,"*");if("json"==urlParams.proto){var I=this.editor.graph.openLink;this.editor.graph.openLink=function(K,J,U){I.apply(this,arguments);C.postMessage(JSON.stringify({event:"openLink",-href:K,target:J,allowOpener:U}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,g,m,t){var v="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,y=document.createElement("button");y.setAttribute("title",d+(null!=m?" ("+m+")":""));y.style.marginLeft="6px";mxUtils.write(y,d);v?(y.className=t?"gePrimaryBtn":"",y.style.marginLeft="8px",y.style.padding="6px"):y.className="geBigButton"+(t?"":" geBigStandardButton");mxEvent.addListener(y,"click",g);return y};+!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,v,t){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(t)try{var x=this.editor.graph;x.setGridEnabled(!1);x.pageVisible=!1;var A=x.model.cells,J;for(J in A){var D=A[J];null!=D&&null!=D.style&&(D.style+=";sketch=1;"+(-1==D.style.indexOf("fontFamily=")||-1<D.style.indexOf("fontFamily=Helvetica;")?+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(E){console.log(E)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=v?v:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=+function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,g){null!=d?this.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(mxUtils.bind(this,function(k){this.spinner.stop();g(k)})):g(null)};EditorUi.prototype.createLoadMessage=function(d){var g=this.editor.graph;return{event:d,pageVisible:g.pageVisible,+translate:g.view.translate,bounds:g.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var v=g.background;if(null==v||v==mxConstants.NONE)v=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,+null,null,!1),g,null,!0,mxUtils.bind(this,function(t){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,v,1,this.embedExportBorder,null,this.embedExportTheme)}else d||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(t){d||this.handleError(t)}};EditorUi.prototype.installMessageHandler=function(d){var g=null,k=!1,v=!1,t=null,x=mxUtils.bind(this,function(D,E){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,x);mxEvent.addListener(window,"message",mxUtils.bind(this,+function(D){if(D.source==(window.opener||window.parent)){var E=D.data,R=null,V=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(da){}return aa});+if("json"==urlParams.proto){var Q=!1;try{E=JSON.parse(E),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[E])}catch(aa){E=null}try{if(null==E)return;if("dialog"==E.action){this.showError(null!=E.titleKey?mxResources.get(E.titleKey):E.title,null!=E.messageKey?mxResources.get(E.messageKey):mxUtils.htmlEntities(E.message),null!=E.buttonKey?mxResources.get(E.buttonKey):E.button);null!=E.modified&&(this.editor.modified=E.modified);return}if("layout"==E.action){this.executeLayouts(this.editor.graph.createLayouts(E.layouts));+return}if("prompt"==E.action){this.spinner.stop();var P=new FilenameDialog(this,E.defaultValue||"",null!=E.okKey?mxResources.get(E.okKey):E.ok,function(aa){null!=aa?A.postMessage(JSON.stringify({event:"prompt",value:aa,message:E}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:E}),"*")},null!=E.titleKey?mxResources.get(E.titleKey):E.title,null,null,null,null,function(){A.postMessage(JSON.stringify({event:"prompt-cancel",message:E}),"*")});this.showDialog(P.container,300,80,!0,!1);+P.init();return}if("draft"==E.action){var q=V(E.xml);this.spinner.stop();P=new DraftDialog(this,mxResources.get("draftFound",[E.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"edit",message:E}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"discard",message:E}),"*")}),E.editKey?mxResources.get(E.editKey):null,E.discardKey?mxResources.get(E.discardKey):null,E.ignore?+mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"ignore",message:E}),"*")}):null);this.showDialog(P.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{P.init()}catch(aa){A.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:E}),"*")}return}if("template"==E.action){this.spinner.stop();var y=1==E.enableRecent,B=1==E.enableSearch,C=1==E.enableCustomTemp;P=new NewDialog(this,!1,E.templatesOnly?+!1:null!=E.callback,mxUtils.bind(this,function(aa,da,ia,pa){aa=aa||this.emptyDiagramXml;null!=E.callback?A.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:da,tempUrl:ia,libs:pa,builtIn:!0,message:E}),"*"):(d(aa,D,aa!=this.emptyDiagramXml,E.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,y?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):+null,B?mxUtils.bind(this,function(aa,da){this.remoteInvoke("searchDiagrams",[aa,null],null,da,function(){da(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,da,ia){A.postMessage(JSON.stringify({event:"template",docUrl:aa,info:da,name:ia}),"*")}),null,null,C?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==E.withoutType);this.showDialog(P.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();+aa&&this.actions.get("exit").funct()}));P.init();return}if("textContent"==E.action){var M=this.getDiagramTextContent();A.postMessage(JSON.stringify({event:"textContent",data:M,message:E}),"*");return}if("status"==E.action){null!=E.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(E.messageKey))):null!=E.message&&this.editor.setStatus(mxUtils.htmlEntities(E.message));null!=E.modified&&(this.editor.modified=E.modified);return}if("spinner"==E.action){var T=null!=E.messageKey?mxResources.get(E.messageKey):+E.message;null==E.show||E.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==E.action){this.actions.get("exit").funct();return}if("viewport"==E.action){null!=E.viewport&&(this.embedViewport=E.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==E.action){P=null;try{var m=this.diagramContainer.getAttribute("data-scrollState");null!=m&&(this.diagramContainer.removeAttribute("data-scrollState"),P=JSON.parse(m))}catch(aa){}Editor.inlineFullscreen=+E.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=P&&this.restoreScrollState(P);return}if("snapshot"==E.action){this.sendEmbeddedSvgExport(!0);return}if("export"==E.action){if("png"==E.format||"xmlpng"==E.format){if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?mxResources.get(E.spinKey):E.spin)){var z=null!=E.xml?E.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,L=mxUtils.bind(this,function(aa,da){if(E.withSvg)E.withSvg=+!1,this.getEmbeddedSvg(z,this.editor.graph,null,!0,function(pa){L(aa,pa)},null,null,E.embedImages,this.editor.graph.background,E.scale,E.border,E.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ia=this.createLoadMessage("export");ia.format=E.format;ia.message=E;ia.data=aa;ia.svg=da;ia.xml=z;A.postMessage(JSON.stringify(ia),"*")}}),N=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==E.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(z)));+I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);L(aa)}),O=E.pageId||(null!=this.pages?E.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var S=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=O){var aa=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var da,ia=0;ia<this.pages.length;ia++)if(this.pages[ia].getId()==O){da=this.updatePageRoot(this.pages[ia]);break}null==da&&(da=this.currentPage);+I.getGlobalVariable=function(xa){return"page"==xa?da.getName():"pagenumber"==xa?1:aa.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(da.root)}if(null!=E.layerIds){var pa=I.model,oa=pa.getChildCells(pa.getRoot()),ha={};for(ia=0;ia<E.layerIds.length;ia++)ha[E.layerIds[ia]]=!0;for(ia=0;ia<oa.length;ia++)pa.setVisible(oa[ia],ha[oa[ia].id]||!1)}ia=null;E.keepTheme&&(ia=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(xa){N(xa.toDataURL("image/png"))}),+E.width,null,E.background,mxUtils.bind(this,function(){N(null)}),null,null,E.scale,E.transparent,E.shadow,null,I,E.border,null,E.grid,ia)});null!=E.xml&&0<E.xml.length&&(k=!0,this.setFileData(z),k=!1);S()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==E.format?"1":"0")+(null!=O?"&pageId="+O:"")+(null!=E.layerIds&&0<E.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:E.layerIds})):"")+(null!=E.scale?"&scale="+E.scale:"")+"&base64=1&xml="+encodeURIComponent(z))).send(mxUtils.bind(this,+function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?L("data:image/png;base64,"+aa.getText()):N(null)}),mxUtils.bind(this,function(){N(null)}))}}else if(S=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=E;if("html2"==E.format||"html"==E.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var da=this.getXmlFileData();aa.xml=mxUtils.getXml(da);aa.data=this.getFileData(null,null,!0,null,null,null,da);aa.format=E.format}else if("html"==E.format)da=this.editor.getGraphXml(),+aa.data=this.getHtml(da,this.editor.graph),aa.xml=mxUtils.getXml(da),aa.format=E.format;else{mxSvgCanvas2D.prototype.foAltText=null;da=null!=E.background?E.background:this.editor.graph.background;da==mxConstants.NONE&&(da=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var ia=mxUtils.bind(this,function(oa){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=Editor.createSvgDataUri(oa);A.postMessage(JSON.stringify(aa),"*")}),pa="auto";E.keepTheme&&+(pa=Editor.isDarkMode()?"dark":"light");null!=E.theme&&(pa=E.theme);if("xmlsvg"==E.format){if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?mxResources.get(E.spinKey):E.spin)){pa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())pa="auto";null!=E.theme&&(pa=E.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,ia,null,null,E.embedImages,da,E.scale,E.border,E.shadow,pa)}}else if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?+mxResources.get(E.spinKey):E.spin))this.editor.graph.setEnabled(!1),da=this.editor.graph.getSvg(da,E.scale,E.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||E.shadow,null,pa),(this.editor.graph.shadowVisible||E.shadow)&&this.editor.graph.addSvgShadow(da),this.embedFonts(da,mxUtils.bind(this,function(oa){E.embedImages||null==E.embedImages?this.editor.convertImages(oa,mxUtils.bind(this,function(ha){ia(mxUtils.getXml(ha))})):ia(mxUtils.getXml(oa))}));return}A.postMessage(JSON.stringify(aa),+"*")}),null!=E.xml&&0<E.xml.length){if(this.editor.graph.mathEnabled){var U=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){U.apply(this,arguments);S()}}k=!0;this.setFileData(E.xml);k=!1;this.editor.graph.mathEnabled||S()}else S();return}if("load"==E.action){Q=E.toSketch;v=1==E.autosave;this.hideDialog();null!=E.modified&&null==urlParams.modified&&(urlParams.modified=E.modified);null!=E.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=E.saveAndExit);if("1"==urlParams.saveAndExit||+"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=E.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=E.noSaveBtn);if(null!=E.rough){var W=Editor.sketchMode;this.doSetSketchMode(E.rough);W!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=+E.dark&&this.setDarkMode(E.dark);null!=E.border&&(this.embedExportBorder=E.border);null!=E.theme&&(this.embedExportTheme=E.theme);null!=E.background&&(this.embedExportBackground=E.background);null!=E.viewport&&(this.embedViewport=E.viewport);this.embedExitPoint=null;if(null!=E.rect){var X=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,E.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,E.rect.top)+"px";this.minInlineWidth=E.minWidth;this.minInlineHeight=E.minHeight;+this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Z=E.maxFitScale,Y=E.rect.width+2*X,ba=E.rect.height+2*X;R=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();Y=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Y):Y,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ba):ba,aa.height-80);this.diagramContainer.style.width=Y+"px";this.diagramContainer.style.height=+aa+"px";var da=this.editor.graph;aa=da.maxFitScale;da.maxFitScale=Z;da.fit(2*X,null,null,null,null,null,ba);this.setPageVisible(!1);if(null!=this.minInlineWidth&&da.getGraphBounds().width<this.minInlineWidth){var ia=da.container.scrollTop;this.resetScrollbars();da.container.scrollTop=ia}da.maxFitScale=aa;da.container.scrollTop-=X;da.container.scrollLeft-=X;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[E]));da.container.focus();null!=this.formatWindow&&+null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=da.container.style.top);var pa=da.getGraphBounds();da.container.clientWidth>pa.width+2*X&&(da.container.scrollLeft=pa.x+(pa.width+X-da.container.clientWidth)/2)}),10)})}null!=E.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=E.noExitBtn);null!=E.title&&null!=this.buttonContainer&&(q=this.createStatusDiv(""),mxUtils.write(q,E.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),+this.buttonContainer.appendChild(q),this.embedFilenameSpan=q);try{E.libs&&this.sidebar.showEntries(E.libs)}catch(aa){}E=null!=E.xmlpng?this.extractGraphModelFromPng(E.xmlpng):null!=E.descriptor?E.descriptor:E.xml}else{if("merge"==E.action){var ea=this.getCurrentFile();null!=ea&&(q=V(E.xml),null!=q&&""!=q&&ea.mergeFile(new LocalFile(this,q),function(){A.postMessage(JSON.stringify({event:"merge",message:E}),"*")},function(aa){A.postMessage(JSON.stringify({event:"merge",message:E,error:aa}),"*")}))}else"remoteInvokeReady"==+E.action?this.handleRemoteInvokeReady(A):"remoteInvoke"==E.action?this.handleRemoteInvoke(E,D.origin):"remoteInvokeResponse"==E.action?this.handleRemoteInvokeResponse(E):A.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(E)}),"*");return}}catch(aa){this.handleError(aa)}}var ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(aa,da){k=!0;+try{d(aa,da,null,Q)}catch(ia){this.handleError(ia)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");t=ca();v&&null==g&&(g=mxUtils.bind(this,function(ia,pa){ia=ca();ia==t||k||(pa=this.createLoadMessage("autosave"),pa.xml=ia,(window.opener||window.parent).postMessage(JSON.stringify(pa),"*"));t=ia}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",+g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)da=this.createLoadMessage("load"),da.xml=aa,A.postMessage(JSON.stringify(da),"*");null!=R&&R()});null!=E&&+"function"===typeof E.substring&&"data:application/vnd.visio;base64,"==E.substring(0,34)?(V="0M8R4KGxGuE"==E.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(E.substring(E.indexOf(",")+1)),function(aa){fa(aa,D)},mxUtils.bind(this,function(aa){this.handleError(aa)}),V)):null!=E&&"function"===typeof E.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(E,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(E,+mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?fa(aa.responseText,D):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=E&&"function"===typeof E.substring&&this.isLucidChartData(E)?this.convertLucidChart(E,mxUtils.bind(this,function(aa){fa(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==E||"object"!==typeof E||null==E.format||+null==E.data&&null==E.url?(E=V(E),fa(E,D)):this.loadDescriptor(E,mxUtils.bind(this,function(aa){fa(ca(),D)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var A=window.opener||window.parent;x="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";A.postMessage(x,"*");if("json"==urlParams.proto){var J=this.editor.graph.openLink;this.editor.graph.openLink=function(D,E,R){J.apply(this,arguments);A.postMessage(JSON.stringify({event:"openLink",+href:D,target:E,allowOpener:R}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,g,k,v){var t="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,x=document.createElement("button");x.setAttribute("title",d+(null!=k?" ("+k+")":""));x.style.marginLeft="6px";mxUtils.write(x,d);t?(x.className=v?"gePrimaryBtn":"",x.style.marginLeft="8px",x.style.padding="6px"):x.className="geBigButton"+(v?"":" geBigStandardButton");mxEvent.addListener(x,"click",g);return x};EditorUi.prototype.addEmbedButtons=function(){var d=document.createElement("div");d.style.display="inline-flex";d.style.alignItems="center";d.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(d.style.marginRight="66px",d.style["float"]="right","atlas"==Editor.currentTheme&&(d.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&d.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(d.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&d.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&d.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.appendChild(d),this.toolbar.staticElements.push(d)):(this.buttonContainer.appendChild(d),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(d){this.loadOrgChartLayouts(mxUtils.bind(this,-function(){var g=new TextareaDialog(this,mxResources.get("layout"),d,mxUtils.bind(this,function(m){if(0<m.length)try{var t=JSON.parse(m);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(v){this.handleError(v)}}),null,null,null,null,mxUtils.bind(this,function(m,t){var v=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var y=t.value;t.value=JSON.stringify(JSON.parse(y));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?-t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=y}catch(C){this.handleError(C)}}));v.setAttribute("title","copy");v.className="geBtn";m.appendChild(v)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(d){this.createTimeout(null,mxUtils.bind(this,function(g){var m=mxUtils.bind(this,function(){this.loadingOrgChart=-!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),d())}),t=mxUtils.bind(this,function(v){this.loadingOrgChart=!1;g.clear()&&this.handleError(v)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?m():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",-function(){mxscript("js/orgchart/mxOrgChartLayout.js",m,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",m,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var m=d.split("\n"),t=[],v=[],y=[],C={};if(0<m.length){var I={},K=this.editor.graph,J=null,U=null,P=null,R=null,-n=null,z=null,A=null,B="whiteSpace=wrap;html=1;",M=null,S=null,l="",x="auto",F="auto",N=!1,O=null,Q=null,V=40,T=40,W=100,X=0,Y=mxUtils.bind(this,function(){null!=g?g(Da):(K.setSelectionCells(Da),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=K.getFreeInsertPoint(),aa=Z.x,ea=Z.y;Z=ea;var ca=null,da="auto";S=null;for(var ja=[],ba=null,ia=null,ka=0;ka<m.length&&"#"==m[ka].charAt(0);){d=m[ka].replace(/\r$/,-"");for(ka++;ka<m.length&&"\\"==d.charAt(d.length-1)&&"#"==m[ka].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(m[ka].substring(1)),ka++;if("#"!=d.charAt(1)){var ua=d.indexOf(":");if(0<ua){var sa=mxUtils.trim(d.substring(1,ua)),ha=mxUtils.trim(d.substring(ua+1));"label"==sa?ca=Graph.sanitizeHtml(ha):"labelname"==sa&&0<ha.length&&"-"!=ha?n=ha:"labels"==sa&&0<ha.length&&"-"!=ha?A=JSON.parse(ha):"style"==sa?U=ha:"parentstyle"==sa?B=ha:"unknownStyle"==sa&&"-"!=ha?z=ha:"stylename"==sa&&0<ha.length&&-"-"!=ha?R=ha:"styles"==sa&&0<ha.length&&"-"!=ha?P=JSON.parse(ha):"vars"==sa&&0<ha.length&&"-"!=ha?J=JSON.parse(ha):"identity"==sa&&0<ha.length&&"-"!=ha?M=ha:"parent"==sa&&0<ha.length&&"-"!=ha?S=ha:"namespace"==sa&&0<ha.length&&"-"!=ha?l=ha:"width"==sa?x=ha:"height"==sa?F=ha:"collapsed"==sa&&"-"!=ha?N="true"==ha:"left"==sa&&0<ha.length?O=ha:"top"==sa&&0<ha.length?Q=ha:"ignore"==sa?ia=ha.split(","):"connect"==sa?ja.push(JSON.parse(ha)):"link"==sa?ba=ha:"padding"==sa?X=parseFloat(ha):"edgespacing"==-sa?V=parseFloat(ha):"nodespacing"==sa?T=parseFloat(ha):"levelspacing"==sa?W=parseFloat(ha):"layout"==sa&&(da=ha)}}}if(null==m[ka])throw Error(mxResources.get("invalidOrMissingFile"));var pa=this.editor.csvToArray(m[ka].replace(/\r$/,""));ua=d=null;sa=[];for(ha=0;ha<pa.length;ha++)M==pa[ha]&&(d=ha),S==pa[ha]&&(ua=ha),sa.push(mxUtils.trim(pa[ha]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ca&&(ca="%"+sa[0]+"%");if(null!=ja)for(var ra=0;ra<ja.length;ra++)null==I[ja[ra].to]&&-(I[ja[ra].to]={});M=[];for(ha=ka+1;ha<m.length;ha++){var xa=this.editor.csvToArray(m[ha].replace(/\r$/,""));if(null==xa){var wa=40<m[ha].length?m[ha].substring(0,40)+"...":m[ha];throw Error(wa+" ("+ha+"):\n"+mxResources.get("containsValidationErrors"));}0<xa.length&&M.push(xa)}K.model.beginUpdate();try{for(ha=0;ha<M.length;ha++){xa=M[ha];var fa=null,na=null!=d?l+xa[d]:null;m=!1;null!=na&&(fa=K.model.getCell(na),m=null==fa||0<=mxUtils.indexOf(t,fa));var Aa=new mxCell(ca,new mxGeometry(aa,Z,0,0),U||-"whiteSpace=wrap;html=1;");Aa.collapsed=N;Aa.vertex=!0;Aa.id=na;null==fa||m||K.model.setCollapsed(fa,N);for(var oa=0;oa<xa.length;oa++)K.setAttributeForCell(Aa,sa[oa],xa[oa]),null==fa||m||K.setAttributeForCell(fa,sa[oa],xa[oa]);if(null!=n&&null!=A){var Ea=A[Aa.getAttribute(n)];null!=Ea&&(K.labelChanged(Aa,Ea),null==fa||m||K.cellLabelChanged(fa,Ea))}if(null!=R&&null!=P){var va=P[Aa.getAttribute(R)];null!=va&&(Aa.style=va)}K.setAttributeForCell(Aa,"placeholders","1");Aa.style=K.replacePlaceholders(Aa,-Aa.style,J);null==fa||m?K.fireEvent(new mxEventObject("cellsInserted","cells",[Aa])):(K.model.setStyle(fa,Aa.style),0>mxUtils.indexOf(y,fa)&&y.push(fa),K.fireEvent(new mxEventObject("cellsInserted","cells",[fa])));m=null!=fa;fa=Aa;if(!m)for(ra=0;ra<ja.length;ra++)I[ja[ra].to][fa.getAttribute(ja[ra].to)]=fa;null!=ba&&"link"!=ba&&(K.setLinkForCell(fa,fa.getAttribute(ba)),K.setAttributeForCell(fa,ba,null));var Ca=this.editor.graph.getPreferredSizeForCell(fa);S=null!=ua?K.model.getCell(l+xa[ua]):null;-if(fa.vertex){wa=null!=S?0:aa;ka=null!=S?0:ea;null!=O&&null!=fa.getAttribute(O)&&(fa.geometry.x=wa+parseFloat(fa.getAttribute(O)));null!=Q&&null!=fa.getAttribute(Q)&&(fa.geometry.y=ka+parseFloat(fa.getAttribute(Q)));var Fa="@"==x.charAt(0)?fa.getAttribute(x.substring(1)):null;fa.geometry.width=null!=Fa&&"auto"!=Fa?parseFloat(fa.getAttribute(x.substring(1))):"auto"==x||"auto"==Fa?Ca.width+X:parseFloat(x);var Ma="@"==F.charAt(0)?fa.getAttribute(F.substring(1)):null;fa.geometry.height=null!=Ma&&"auto"!=-Ma&&"width"!=F?parseFloat(Ma):"auto"==F||"auto"==Ma?Ca.height+X:"width"==F?fa.geometry.width:parseFloat(F);Z+=fa.geometry.height+T}m?(null==C[na]&&(C[na]=[]),C[na].push(fa)):(t.push(fa),null!=S?(S.style=K.replacePlaceholders(S,B,J),K.addCell(fa,S),v.push(S)):y.push(K.addCell(fa)))}for(ha=0;ha<v.length;ha++)Fa="@"==x.charAt(0)?v[ha].getAttribute(x.substring(1)):null,Ma="@"==F.charAt(0)?v[ha].getAttribute(F.substring(1)):null,"auto"!=x&&"auto"!=Fa||"auto"!=F&&"auto"!=Ma||K.updateGroupBounds([v[ha]],-X,!0);var Ba=y.slice(),Da=y.slice();for(ra=0;ra<ja.length;ra++){var Ia=ja[ra];for(ha=0;ha<t.length;ha++){fa=t[ha];var Va=mxUtils.bind(this,function(ta,qa,ma){var za=qa.getAttribute(ma.from);if(null!=za&&""!=za){za=za.split(",");for(var Ja=0;Ja<za.length;Ja++){var Ga=I[ma.to][za[Ja]];if(null==Ga&&null!=z){Ga=new mxCell(za[Ja],new mxGeometry(aa,ea,0,0),z);Ga.style=K.replacePlaceholders(qa,Ga.style,J);var La=this.editor.graph.getPreferredSizeForCell(Ga);Ga.geometry.width=La.width+X;Ga.geometry.height=-La.height+X;I[ma.to][za[Ja]]=Ga;Ga.vertex=!0;Ga.id=za[Ja];y.push(K.addCell(Ga))}if(null!=Ga){La=ma.label;null!=ma.fromlabel&&(La=(qa.getAttribute(ma.fromlabel)||"")+(La||""));null!=ma.sourcelabel&&(La=K.replacePlaceholders(qa,ma.sourcelabel,J)+(La||""));null!=ma.tolabel&&(La=(La||"")+(Ga.getAttribute(ma.tolabel)||""));null!=ma.targetlabel&&(La=(La||"")+K.replacePlaceholders(Ga,ma.targetlabel,J));var Pa="target"==ma.placeholders==!ma.invert?Ga:ta;Pa=null!=ma.style?K.replacePlaceholders(Pa,ma.style,-J):K.createCurrentEdgeStyle();La=K.insertEdge(null,null,La||"",ma.invert?Ga:ta,ma.invert?ta:Ga,Pa);if(null!=ma.labels)for(Pa=0;Pa<ma.labels.length;Pa++){var Ka=ma.labels[Pa],Ra=new mxCell(Ka.label||Pa,new mxGeometry(null!=Ka.x?Ka.x:0,null!=Ka.y?Ka.y:0,0,0),"resizable=0;html=1;");Ra.vertex=!0;Ra.connectable=!1;Ra.geometry.relative=!0;null!=Ka.placeholders&&(Ra.value=K.replacePlaceholders("target"==Ka.placeholders==!ma.invert?Ga:ta,Ra.value,J));if(null!=Ka.dx||null!=Ka.dy)Ra.geometry.offset=new mxPoint(null!=-Ka.dx?Ka.dx:0,null!=Ka.dy?Ka.dy:0);La.insert(Ra)}if(null!=ma.data)for(var Na in ma.data)K.setAttributeForCell(La,Na,ma.data[Na]);Da.push(La);mxUtils.remove(ma.invert?ta:Ga,Ba)}}}});Va(fa,fa,Ia);if(null!=C[fa.id])for(oa=0;oa<C[fa.id].length;oa++)Va(fa,C[fa.id][oa],Ia)}}if(null!=ia)for(ha=0;ha<t.length;ha++)for(fa=t[ha],oa=0;oa<ia.length;oa++)K.setAttributeForCell(fa,mxUtils.trim(ia[oa]),null);if(0<y.length){var Ta=new mxParallelEdgeLayout(K);Ta.spacing=V;Ta.checkOverlap=!0;var Xa=function(){0<Ta.spacing&&-Ta.execute(K.getDefaultParent());for(var ta=0;ta<y.length;ta++){var qa=K.getCellGeometry(y[ta]);qa.x=Math.round(K.snap(qa.x));qa.y=Math.round(K.snap(qa.y));"auto"==x&&(qa.width=Math.round(K.snap(qa.width)));"auto"==F&&(qa.height=Math.round(K.snap(qa.height)))}};if("["==da.charAt(0)){var jb=Y;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(da)),function(){Xa();jb()});Y=null}else if("circle"==da){var Sa=new mxCircleLayout(K);Sa.disableEdgeStyle=!1;Sa.resetEdges=!1;var bb=Sa.isVertexIgnored;-Sa.isVertexIgnored=function(ta){return bb.apply(this,arguments)||0>mxUtils.indexOf(y,ta)};this.executeLayout(function(){Sa.execute(K.getDefaultParent());Xa()},!0,Y);Y=null}else if("horizontaltree"==da||"verticaltree"==da||"auto"==da&&Da.length==2*y.length-1&&1==Ba.length){K.view.validate();var Wa=new mxCompactTreeLayout(K,"horizontaltree"==da);Wa.levelDistance=T;Wa.edgeRouting=!1;Wa.resetEdges=!1;Wa.sortEdges=!0;this.executeLayout(function(){Wa.execute(K.getDefaultParent(),0<Ba.length?Ba[0]:null)},-!0,Y);Y=null}else if("horizontalflow"==da||"verticalflow"==da||"auto"==da&&1==Ba.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==da?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);cb.intraCellSpacing=T;cb.parallelEdgeSpacing=V;cb.interRankCellSpacing=W;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),Da);K.moveCells(Da,aa,ea)},!0,Y);Y=null}else if("orgchart"==da){K.view.validate();var hb=new mxOrgChartLayout(K,2,W,T),db=hb.isVertexIgnored;-hb.isVertexIgnored=function(ta){return db.apply(this,arguments)||0>mxUtils.indexOf(y,ta)};this.executeLayout(function(){hb.execute(K.getDefaultParent());Xa()},!0,Y);Y=null}else if("organic"==da||"auto"==da&&Da.length>y.length){K.view.validate();var la=new mxFastOrganicLayout(K);la.forceConstant=3*T;la.disableEdgeStyle=!1;la.resetEdges=!1;var ya=la.isVertexIgnored;la.isVertexIgnored=function(ta){return ya.apply(this,arguments)||0>mxUtils.indexOf(y,ta)};this.executeLayout(function(){la.execute(K.getDefaultParent());-Xa()},!0,Y);Y=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=Y&&Y()}}catch(ta){this.handleError(ta)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var m="?",t;for(t in urlParams)0>mxUtils.indexOf(d,t)&&null!=urlParams[t]&&(g+=m+t+"="+urlParams[t],m="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;-if("1"==urlParams.offline)d+=window.location.search;else{var m="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),t;for(t in urlParams)0>mxUtils.indexOf(m,t)&&(d=0==g?d+"?":d+"&",null!=urlParams[t]&&(d+=t+"="+urlParams[t],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,m,t,v){d=new LinkDialog(this,d,g,m,!0,t,v);this.showDialog(d.container,440,120,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&+function(){var g=new TextareaDialog(this,mxResources.get("layout"),d,mxUtils.bind(this,function(k){if(0<k.length)try{var v=JSON.parse(k);this.executeLayouts(this.editor.graph.createLayouts(v));this.customLayoutConfig=v;this.hideDialog()}catch(t){this.handleError(t)}}),null,null,null,null,mxUtils.bind(this,function(k,v){var t=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var x=v.value;v.value=JSON.stringify(JSON.parse(x));v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?+v.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));v.value=x}catch(A){this.handleError(A)}}));t.setAttribute("title","copy");t.className="geBtn";k.appendChild(t)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(d){this.createTimeout(null,mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.loadingOrgChart=+!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),d())}),v=mxUtils.bind(this,function(t){this.loadingOrgChart=!1;g.clear()&&this.handleError(t)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?k():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",+function(){mxscript("js/orgchart/mxOrgChartLayout.js",k,null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",k,null,null,null,v))}),onerror)};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"),v=[],t=[],x=[],A={};if(0<k.length){var J={},D=this.editor.graph,E=null,R=null,V=null,Q=null,+P=null,q=null,y=null,B="whiteSpace=wrap;html=1;",C=null,M=null,T="",m="auto",z="auto",I=!1,L=null,N=null,O=40,S=40,U=100,W=0,X=mxUtils.bind(this,function(){null!=g?g(Aa):(D.setSelectionCells(Aa),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=D.getFreeInsertPoint(),Y=Z.x,ba=Z.y;Z=ba;var ea=null,ca="auto";M=null;for(var fa=[],aa=null,da=null,ia=0;ia<k.length&&"#"==k[ia].charAt(0);){d=k[ia].replace(/\r$/,+"");for(ia++;ia<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[ia].substring(1)),ia++;if("#"!=d.charAt(1)){var pa=d.indexOf(":");if(0<pa){var oa=mxUtils.trim(d.substring(1,pa)),ha=mxUtils.trim(d.substring(pa+1));"label"==oa?ea=Graph.sanitizeHtml(ha):"labelname"==oa&&0<ha.length&&"-"!=ha?P=ha:"labels"==oa&&0<ha.length&&"-"!=ha?y=JSON.parse(ha):"style"==oa?R=ha:"parentstyle"==oa?B=ha:"unknownStyle"==oa&&"-"!=ha?q=ha:"stylename"==oa&&0<ha.length&&+"-"!=ha?Q=ha:"styles"==oa&&0<ha.length&&"-"!=ha?V=JSON.parse(ha):"vars"==oa&&0<ha.length&&"-"!=ha?E=JSON.parse(ha):"identity"==oa&&0<ha.length&&"-"!=ha?C=ha:"parent"==oa&&0<ha.length&&"-"!=ha?M=ha:"namespace"==oa&&0<ha.length&&"-"!=ha?T=ha:"width"==oa?m=ha:"height"==oa?z=ha:"collapsed"==oa&&"-"!=ha?I="true"==ha:"left"==oa&&0<ha.length?L=ha:"top"==oa&&0<ha.length?N=ha:"ignore"==oa?da=ha.split(","):"connect"==oa?fa.push(JSON.parse(ha)):"link"==oa?aa=ha:"padding"==oa?W=parseFloat(ha):"edgespacing"==+oa?O=parseFloat(ha):"nodespacing"==oa?S=parseFloat(ha):"levelspacing"==oa?U=parseFloat(ha):"layout"==oa&&(ca=ha)}}}if(null==k[ia])throw Error(mxResources.get("invalidOrMissingFile"));var xa=this.editor.csvToArray(k[ia].replace(/\r$/,""));pa=d=null;oa=[];for(ha=0;ha<xa.length;ha++)C==xa[ha]&&(d=ha),M==xa[ha]&&(pa=ha),oa.push(mxUtils.trim(xa[ha]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+oa[0]+"%");if(null!=fa)for(var qa=0;qa<fa.length;qa++)null==J[fa[qa].to]&&+(J[fa[qa].to]={});C=[];for(ha=ia+1;ha<k.length;ha++){var ua=this.editor.csvToArray(k[ha].replace(/\r$/,""));if(null==ua){var ya=40<k[ha].length?k[ha].substring(0,40)+"...":k[ha];throw Error(ya+" ("+ha+"):\n"+mxResources.get("containsValidationErrors"));}0<ua.length&&C.push(ua)}D.model.beginUpdate();try{for(ha=0;ha<C.length;ha++){ua=C[ha];var ja=null,ma=null!=d?T+ua[d]:null;k=!1;null!=ma&&(ja=D.model.getCell(ma),k=null==ja||0<=mxUtils.indexOf(v,ja));var ka=new mxCell(ea,new mxGeometry(Y,Z,0,0),R||+"whiteSpace=wrap;html=1;");ka.collapsed=I;ka.vertex=!0;ka.id=ma;null==ja||k||D.model.setCollapsed(ja,I);for(var Ba=0;Ba<ua.length;Ba++)D.setAttributeForCell(ka,oa[Ba],ua[Ba]),null==ja||k||D.setAttributeForCell(ja,oa[Ba],ua[Ba]);if(null!=P&&null!=y){var sa=y[ka.getAttribute(P)];null!=sa&&(D.labelChanged(ka,sa),null==ja||k||D.cellLabelChanged(ja,sa))}if(null!=Q&&null!=V){var Ea=V[ka.getAttribute(Q)];null!=Ea&&(ka.style=Ea)}D.setAttributeForCell(ka,"placeholders","1");ka.style=D.replacePlaceholders(ka,+ka.style,E);null==ja||k?D.fireEvent(new mxEventObject("cellsInserted","cells",[ka])):(D.model.setStyle(ja,ka.style),0>mxUtils.indexOf(x,ja)&&x.push(ja),D.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));k=null!=ja;ja=ka;if(!k)for(qa=0;qa<fa.length;qa++)J[fa[qa].to][ja.getAttribute(fa[qa].to)]=ja;null!=aa&&"link"!=aa&&(D.setLinkForCell(ja,ja.getAttribute(aa)),D.setAttributeForCell(ja,aa,null));var wa=this.editor.graph.getPreferredSizeForCell(ja);M=null!=pa?D.model.getCell(T+ua[pa]):null;+if(ja.vertex){ya=null!=M?0:Y;ia=null!=M?0:ba;null!=L&&null!=ja.getAttribute(L)&&(ja.geometry.x=ya+parseFloat(ja.getAttribute(L)));null!=N&&null!=ja.getAttribute(N)&&(ja.geometry.y=ia+parseFloat(ja.getAttribute(N)));var Ca="@"==m.charAt(0)?ja.getAttribute(m.substring(1)):null;ja.geometry.width=null!=Ca&&"auto"!=Ca?parseFloat(ja.getAttribute(m.substring(1))):"auto"==m||"auto"==Ca?wa.width+W:parseFloat(m);var Da="@"==z.charAt(0)?ja.getAttribute(z.substring(1)):null;ja.geometry.height=null!=Da&&"auto"!=+Da&&"width"!=z?parseFloat(Da):"auto"==z||"auto"==Da?wa.height+W:"width"==z?ja.geometry.width:parseFloat(z);Z+=ja.geometry.height+S}k?(null==A[ma]&&(A[ma]=[]),A[ma].push(ja)):(v.push(ja),null!=M?(M.style=D.replacePlaceholders(M,B,E),D.addCell(ja,M),t.push(M)):x.push(D.addCell(ja)))}for(ha=0;ha<t.length;ha++)Ca="@"==m.charAt(0)?t[ha].getAttribute(m.substring(1)):null,Da="@"==z.charAt(0)?t[ha].getAttribute(z.substring(1)):null,"auto"!=m&&"auto"!=Ca||"auto"!=z&&"auto"!=Da||D.updateGroupBounds([t[ha]],+W,!0);var Ka=x.slice(),Aa=x.slice();for(qa=0;qa<fa.length;qa++){var Fa=fa[qa];for(ha=0;ha<v.length;ha++){ja=v[ha];var Ja=mxUtils.bind(this,function(va,ta,na){var ra=ta.getAttribute(na.from);if(null!=ra&&""!=ra){ra=ra.split(",");for(var za=0;za<ra.length;za++){var Ga=J[na.to][ra[za]];if(null==Ga&&null!=q){Ga=new mxCell(ra[za],new mxGeometry(Y,ba,0,0),q);Ga.style=D.replacePlaceholders(ta,Ga.style,E);var Ia=this.editor.graph.getPreferredSizeForCell(Ga);Ga.geometry.width=Ia.width+W;Ga.geometry.height=+Ia.height+W;J[na.to][ra[za]]=Ga;Ga.vertex=!0;Ga.id=ra[za];x.push(D.addCell(Ga))}if(null!=Ga){Ia=na.label;null!=na.fromlabel&&(Ia=(ta.getAttribute(na.fromlabel)||"")+(Ia||""));null!=na.sourcelabel&&(Ia=D.replacePlaceholders(ta,na.sourcelabel,E)+(Ia||""));null!=na.tolabel&&(Ia=(Ia||"")+(Ga.getAttribute(na.tolabel)||""));null!=na.targetlabel&&(Ia=(Ia||"")+D.replacePlaceholders(Ga,na.targetlabel,E));var Pa="target"==na.placeholders==!na.invert?Ga:va;Pa=null!=na.style?D.replacePlaceholders(Pa,na.style,+E):D.createCurrentEdgeStyle();Ia=D.insertEdge(null,null,Ia||"",na.invert?Ga:va,na.invert?va:Ga,Pa);if(null!=na.labels)for(Pa=0;Pa<na.labels.length;Pa++){var La=na.labels[Pa],Na=new mxCell(La.label||Pa,new mxGeometry(null!=La.x?La.x:0,null!=La.y?La.y:0,0,0),"resizable=0;html=1;");Na.vertex=!0;Na.connectable=!1;Na.geometry.relative=!0;null!=La.placeholders&&(Na.value=D.replacePlaceholders("target"==La.placeholders==!na.invert?Ga:va,Na.value,E));if(null!=La.dx||null!=La.dy)Na.geometry.offset=new mxPoint(null!=+La.dx?La.dx:0,null!=La.dy?La.dy:0);Ia.insert(Na)}if(null!=na.data)for(var Va in na.data)D.setAttributeForCell(Ia,Va,na.data[Va]);Aa.push(Ia);mxUtils.remove(na.invert?va:Ga,Ka)}}}});Ja(ja,ja,Fa);if(null!=A[ja.id])for(Ba=0;Ba<A[ja.id].length;Ba++)Ja(ja,A[ja.id][Ba],Fa)}}if(null!=da)for(ha=0;ha<v.length;ha++)for(ja=v[ha],Ba=0;Ba<da.length;Ba++)D.setAttributeForCell(ja,mxUtils.trim(da[Ba]),null);if(0<x.length){var Ra=new mxParallelEdgeLayout(D);Ra.spacing=O;Ra.checkOverlap=!0;var Sa=function(){0<Ra.spacing&&+Ra.execute(D.getDefaultParent());for(var va=0;va<x.length;va++){var ta=D.getCellGeometry(x[va]);ta.x=Math.round(D.snap(ta.x));ta.y=Math.round(D.snap(ta.y));"auto"==m&&(ta.width=Math.round(D.snap(ta.width)));"auto"==z&&(ta.height=Math.round(D.snap(ta.height)))}};if("["==ca.charAt(0)){var ab=X;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(ca)),function(){Sa();ab()});X=null}else if("circle"==ca){var db=new mxCircleLayout(D);db.disableEdgeStyle=!1;db.resetEdges=!1;var Wa=db.isVertexIgnored;+db.isVertexIgnored=function(va){return Wa.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){db.execute(D.getDefaultParent());Sa()},!0,X);X=null}else if("horizontaltree"==ca||"verticaltree"==ca||"auto"==ca&&Aa.length==2*x.length-1&&1==Ka.length){D.view.validate();var Xa=new mxCompactTreeLayout(D,"horizontaltree"==ca);Xa.levelDistance=S;Xa.edgeRouting=!1;Xa.resetEdges=!1;Xa.sortEdges=!0;this.executeLayout(function(){Xa.execute(D.getDefaultParent(),0<Ka.length?Ka[0]:null)},+!0,X);X=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==Ka.length){D.view.validate();var Ua=new mxHierarchicalLayout(D,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=S;Ua.parallelEdgeSpacing=O;Ua.interRankCellSpacing=U;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(D.getDefaultParent(),Aa);D.moveCells(Aa,Y,ba)},!0,X);X=null}else if("orgchart"==ca){D.view.validate();var eb=new mxOrgChartLayout(D,2,U,S),jb=eb.isVertexIgnored;+eb.isVertexIgnored=function(va){return jb.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){eb.execute(D.getDefaultParent());Sa()},!0,X);X=null}else if("organic"==ca||"auto"==ca&&Aa.length>x.length){D.view.validate();var $a=new mxFastOrganicLayout(D);$a.forceConstant=3*S;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var la=$a.isVertexIgnored;$a.isVertexIgnored=function(va){return la.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){$a.execute(D.getDefaultParent());+Sa()},!0,X);X=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=X&&X()}}catch(va){this.handleError(va)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",v;for(v in urlParams)0>mxUtils.indexOf(d,v)&&null!=urlParams[v]&&(g+=k+v+"="+urlParams[v],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;+if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),v;for(v in urlParams)0>mxUtils.indexOf(k,v)&&(d=0==g?d+"?":d+"&",null!=urlParams[v]&&(d+=v+"="+urlParams[v],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,v,t){d=new LinkDialog(this,d,g,k,!0,v,t);this.showDialog(d.container,440,120,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;d&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);-this.menus.get("viewZoom").setEnabled(g);var m=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!m);this.actions.get("print").setEnabled(!m);this.menus.get("exportAs").setEnabled(!m);this.menus.get("embed").setEnabled(!m);m="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(m);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(m),this.menus.get("newLibrary").setEnabled(m));-d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);this.actions.get("smartFit").setEnabled(g);this.actions.get("resetView").setEnabled(g);this.actions.get("darkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("lightMode").setEnabled("atlas"!=Editor.currentTheme);m=this.actions.get("autoMode");m.setEnabled(m.isEnabled()&&"atlas"!=Editor.currentTheme);+this.menus.get("viewZoom").setEnabled(g);var k=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!k);this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));+d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);this.actions.get("smartFit").setEnabled(g);this.actions.get("resetView").setEnabled(g);this.actions.get("darkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("lightMode").setEnabled("atlas"!=Editor.currentTheme);k=this.actions.get("autoMode");k.setEnabled(k.isEnabled()&&"atlas"!=Editor.currentTheme);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};-EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var D=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var g=D.apply(this,arguments),m=mxUtils.bind(this,function(){g.refresh();this.restoreOpenLibraries()});this.addListener("sketchModeChanged",m);this.addListener("currentThemeChanged",m);return g};EditorUi.prototype.restoreOpenLibraries=-function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var g=0;g<d.length;g++)this.libraryLoaded(d[g].file,d[g].images,d[g].title,null!=d[g].div?"none"!=d[g].div.style.display:d[g].expand)};var L=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){L.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),m=this.getSelectionState(),t=this.isDiagramActive(),v="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=g&&g.isEditable();-this.actions.get("undo").setEnabled(this.canUndo()&&v);this.actions.get("redo").setEnabled(this.canRedo()&&v);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(t);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("editConnectionPoints").setEnabled(t&&0==m.edges.length&&1==m.vertices.length);this.actions.get("editImage").setEnabled(t&&m.image&&0<m.cells.length);this.actions.get("crop").setEnabled(t&&-m.image&&0<m.cells.length);this.actions.get("pageSetup").setEnabled(t);this.actions.get("shadowVisible").setEnabled(t);this.actions.get("connectionArrows").setEnabled(t);this.actions.get("connectionPoints").setEnabled(t);this.actions.get("copyStyle").setEnabled(t&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&t&&0<m.cells.length);this.actions.get("editGeometry").setEnabled(0<m.vertices.length);this.actions.get("createShape").setEnabled(t);this.actions.get("createRevision").setEnabled(t);-this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(t&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("removeFormat").setEnabled(d.isEnabled()&&!d.isSelectionEmpty()&&!d.isEditing());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);-this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.actions.get("properties").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):-"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var G=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);G.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,m,t,v,y,C,I){var K=d.editor.graph;-if("xml"==m)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==m)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(K.getSvg(t,v,y)),"image/svg+xml");else{var J=d.getFileData(!0,null,null,null,null,!0),U=K.getGraphBounds(),P=Math.floor(U.width*v/K.view.scale),R=Math.floor(U.height*v/K.view.scale);if(J.length<=MAX_REQUEST_SIZE&&P*R<MAX_AREA)if(d.hideDialog(),"png"!=m&&"jpg"!=m&&"jpeg"!=m||!d.isExportToCanvas()){var n={globalVars:K.getExportVariables()};-I&&(n.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});d.saveRequest(g,m,function(z,A){return new mxXmlRequest(EXPORT_URL,"format="+m+"&base64="+(A||"0")+(null!=z?"&filename="+encodeURIComponent(z):"")+"&extras="+encodeURIComponent(JSON.stringify(n))+(0<C?"&dpi="+C:"")+"&bg="+(null!=t?t:"none")+"&w="+P+"&h="+R+"&border="+y+"&xml="+encodeURIComponent(J))})}else"png"==m?d.exportImage(v,null==t||"none"==t,!0,!1,!1,y,!0,!1,null,I,C):d.exportImage(v,!1,!0,!1,!1,y,!0,!1,"jpeg",I);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});-EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var m=0;m<this.pages.length;m++){var t=d;this.currentPage!=this.pages[m]&&(t=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[m]),t.model.setRoot(this.pages[m].root));g+=this.pages[m].getName()+" "+t.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=-function(d){var g={},m=document.createElement("div");m.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxUtils.htmlEntities(d));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(t);var v=document.createElement("div");v.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";v.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var y={};try{var C=mxSettings.getCustomLibraries();-for(d=0;d<C.length;d++){var I=C[d];if("R"==I.substring(0,1)){var K=JSON.parse(decodeURIComponent(I.substring(1)));y[K[0]]={id:K[0],title:K[1],downloadUrl:K[2]}}}}catch(J){}this.remoteInvoke("getCustomLibraries",null,null,function(J){v.innerText="";if(0==J.length)v.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var U=0;U<J.length;U++){var P=J[U];y[P.id]&&(g[P.id]=P);var R=this.addCheckbox(v,P.title,y[P.id]);-(function(n,z){mxEvent.addListener(z,"change",function(){this.checked?g[n.id]=n:delete g[n.id]})})(P,R)}},mxUtils.bind(this,function(J){v.innerText="";var U=document.createElement("div");U.style.padding="8px";U.style.textAlign="center";mxUtils.write(U,mxResources.get("error")+": ");mxUtils.write(U,null!=J&&null!=J.message?J.message:mxResources.get("unknownError"));v.appendChild(U)}));m.appendChild(v);m=new CustomDialog(this,m,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));-var J=0,U;for(U in g)null==y[U]&&(J++,mxUtils.bind(this,function(P){this.remoteInvoke("getFileContent",[P.downloadUrl],null,mxUtils.bind(this,function(R){J--;0==J&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,R,P)),this.showSidebar()}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){J--;0==J&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[U]));for(U in y)g[U]||this.closeLibrary(new RemoteLibrary(this,-null,y[U]));0==J&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(m.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=-[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var g=d.msgMarkers,m=this.remoteInvokeCallbacks[g.callbackId];if(null==m)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?m.error&&m.error(d.error.errResp):m.callback&&m.callback.apply(this,-d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,m,t,v){var y=!0,C=window.setTimeout(mxUtils.bind(this,function(){y=!1;v({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),I=mxUtils.bind(this,function(){window.clearTimeout(C);y&&t.apply(this,arguments)}),K=mxUtils.bind(this,function(){window.clearTimeout(C);y&&v.apply(this,arguments)});m=m||{};m.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:I,-error:K});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:m});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var m=mxUtils.bind(this,function(J,U){var P={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=U?P.error={errResp:U}:null!=J&&(P.resp=J);this.remoteWin.postMessage(JSON.stringify(P),"*")});try{var t=d.funtionName,v=this.remoteInvokableFns[t];if(null!=v&&"function"===-typeof this[t]){if(v.allowedDomains){for(var y=!1,C=0;C<v.allowedDomains.length;C++)if(g=="https://"+v.allowedDomains[C]){y=!0;break}if(!y){m(null,"Invalid Call: "+t+" is not allowed.");return}}var I=d.functionArgs;Array.isArray(I)||(I=[]);if(v.isAsync)I.push(function(){m(Array.prototype.slice.apply(arguments))}),I.push(function(J){m(null,J||"Unkown Error")}),this[t].apply(this,I);else{var K=this[t].apply(this,I);m([K])}}else m(null,"Invalid Call: "+t+" is not found.")}catch(J){m(null,"Invalid Call: An error occurred, "+-J.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var m=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=m)try{var t=m.open("database",2);t.onupgradeneeded=function(v){try{var y=t.result;1>v.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>v.oldVersion&&(y.createObjectStore("files",{keyPath:"title"}),y.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(C){null!=g&&g(C)}};t.onsuccess=-mxUtils.bind(this,function(v){try{var y=t.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(C){if(!C||"1"==urlParams.forceMigration){var I=document.createElement("iframe");I.style.display="none";I.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);-document.body.appendChild(I);var K=!0,J=!1,U,P=0,R=mxUtils.bind(this,function(){J=!0;this.setDatabaseItem(".drawioMigrated3",!0);I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),n=mxUtils.bind(this,function(){P++;z()}),z=mxUtils.bind(this,function(){try{if(P>=U.length)R();else{var B=U[P];StorageFile.getFileContent(this,B,mxUtils.bind(this,function(M){null==M||".scratchpad"==B&&M==this.emptyLibraryXml?I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",-funtionName:"getLocalStorageFile",functionArgs:[B]}),"*"):n()}),n)}}catch(M){console.log(M)}}),A=mxUtils.bind(this,function(B){try{this.setDatabaseItem(null,[{title:B.title,size:B.data.length,lastModified:Date.now(),type:B.isLib?"L":"F"},{title:B.title,data:B.data}],n,n,["filesInfo","files"])}catch(M){console.log(M)}});C=mxUtils.bind(this,function(B){try{if(B.source==I.contentWindow){var M={};try{M=JSON.parse(B.data)}catch(S){}"init"==M.event?(I.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),-"*"),I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=M.event||J||(K?null!=M.resp&&0<M.resp.length&&null!=M.resp[0]?(U=M.resp[0],K=!1,z()):R():null!=M.resp&&0<M.resp.length&&null!=M.resp[0]?A(M.resp[0]):n())}}catch(S){console.log(S)}});window.addEventListener("message",C)}})));d(y);y.onversionchange=function(){y.close()}}catch(C){null!=g?g(C):null!=window.console&&console.warn(C)}});t.onerror=g;t.onblocked=function(){}}catch(v){null!=-g?g(v):null!=window.console&&console.error(v)}else null!=g&&g(Error("IndexedDB not supported"))}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,m,t,v){this.openDatabase(mxUtils.bind(this,function(y){try{v=v||"objects";Array.isArray(v)||(v=[v],d=[d],g=[g]);var C=y.transaction(v,"readwrite");C.oncomplete=m;C.onerror=t;for(y=0;y<v.length;y++)C.objectStore(v[y]).put(null!=d&&null!=d[y]?{key:d[y],data:g[y]}:g[y])}catch(I){null!=t&&t(I)}}),t)};EditorUi.prototype.removeDatabaseItem=-function(d,g,m,t){this.openDatabase(mxUtils.bind(this,function(v){try{t=t||"objects";Array.isArray(t)||(t=[t],d=[d]);var y=v.transaction(t,"readwrite");y.oncomplete=g;y.onerror=m;for(v=0;v<t.length;v++)y.objectStore(t[v]).delete(d[v])}catch(C){null!=m&&m(C)}}),m)};EditorUi.prototype.getDatabaseItem=function(d,g,m,t){this.openDatabase(mxUtils.bind(this,function(v){try{t=t||"objects";var y=v.transaction([t],"readonly").objectStore(t).get(d);y.onsuccess=function(){g(y.result)};y.onerror=m}catch(C){null!=-m&&m(C)}}),m)};EditorUi.prototype.getDatabaseItems=function(d,g,m){this.openDatabase(mxUtils.bind(this,function(t){try{m=m||"objects";var v=t.transaction([m],"readonly").objectStore(m).openCursor(IDBKeyRange.lowerBound(0)),y=[];v.onsuccess=function(C){null==C.target.result?d(y):(y.push(C.target.result.value),C.target.result.continue())};v.onerror=g}catch(C){null!=g&&g(C)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,m){this.openDatabase(mxUtils.bind(this,function(t){try{m=m||"objects";-var v=t.transaction([m],"readonly").objectStore(m).getAllKeys();v.onsuccess=function(){d(v.result)};v.onerror=g}catch(y){null!=g&&g(y)}}),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():!1};-EditorUi.prototype.getComments=function(d,g){var m=this.getCurrentFile();null!=m?m.getComments(d,g):d([])};EditorUi.prototype.addComment=function(d,g,m){var t=this.getCurrentFile();null!=t?t.addComment(d,g,m):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var m=this.getCurrentFile();-return null!=m?m.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,g){var m=this.getCurrentFile();null!=m&&m.getRevisions?m.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==-DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,m,t,v,y,C,I){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,g,m,t,v,y,C,I)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};-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,m,t,v,y,C,I,K,J,U,P,R,n,z,A){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");-return this.editor.exportToCanvas(d,g,m,t,v,y,C,I,K,J,U,P,R,n,z,A)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,m,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,m,t)};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,m,t){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,m,t)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,m,t,v){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");-return Editor.writeGraphModelToPng(d,g,m,t,v)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var m=localStorage.key(g),t=localStorage.getItem(m);if(0<m.length&&(".scratchpad"==m||"."!=m.charAt(0))&&0<t.length){var v="<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12);t="<mxlibrary>"===t.substring(0,11);(v||-t)&&d.push(m)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();-var CommentsWindow=function(b,e,f,c,k,p){function q(){for(var n=y.getElementsByTagName("div"),z=0,A=0;A<n.length;A++)"none"!=n[A].style.display&&n[A].parentNode==y&&z++;C.style.display=0==z?"block":"none"}function u(n,z,A,B){function M(){z.removeChild(x);z.removeChild(F);l.style.display="block";S.style.display="block"}m={div:z,comment:n,saveCallback:A,deleteOnCancel:B};var S=z.querySelector(".geCommentTxt"),l=z.querySelector(".geCommentActionsList"),x=document.createElement("textarea");x.className=-"geCommentEditTxtArea";x.style.minHeight=S.offsetHeight+"px";x.value=n.content;z.insertBefore(x,S);var F=document.createElement("div");F.className="geCommentEditBtns";var N=mxUtils.button(mxResources.get("cancel"),function(){B?(z.parentNode.removeChild(z),q()):M();m=null});N.className="geCommentEditBtn";F.appendChild(N);var O=mxUtils.button(mxResources.get("save"),function(){S.innerText="";n.content=x.value;mxUtils.write(S,n.content);M();A(n);m=null});mxEvent.addListener(x,"keydown",mxUtils.bind(this,-function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(O.click(),mxEvent.consume(Q)):27==Q.keyCode&&(N.click(),mxEvent.consume(Q)))}));O.focus();O.className="geCommentEditBtn gePrimaryBtn";F.appendChild(O);z.insertBefore(F,S);l.style.display="none";S.style.display="none";x.focus()}function E(n,z){z.innerText="";n=new Date(n.modifiedDate);var A=b.timeSince(n);null==A&&(A=mxResources.get("lessThanAMinute"));mxUtils.write(z,mxResources.get("timeAgo",-[A],"{1} ago"));z.setAttribute("title",n.toLocaleDateString()+" "+n.toLocaleTimeString())}function H(n){var z=document.createElement("img");z.className="geCommentBusyImg";z.src=IMAGE_PATH+"/spin.gif";n.appendChild(z);n.busyImg=z}function D(n){n.style.border="1px solid red";n.busyImg.parentNode==n&&n.removeChild(n.busyImg)}function L(n){n.style.border="";n.busyImg.parentNode==n&&n.removeChild(n.busyImg)}function G(n,z,A,B,M){function S(T,W,X){var Y=document.createElement("li");Y.className="geCommentAction";-var Z=document.createElement("a");Z.className="geCommentActionLnk";mxUtils.write(Z,T);Y.appendChild(Z);mxEvent.addListener(Z,"click",function(aa){W(aa,n);aa.preventDefault();mxEvent.consume(aa)});V.appendChild(Y);X&&(Y.style.display="none")}function l(){function T(Y){W.push(X);if(null!=Y.replies)for(var Z=0;Z<Y.replies.length;Z++)X=X.nextSibling,T(Y.replies[Z])}var W=[],X=F;T(n);return{pdiv:X,replies:W}}function x(T,W,X,Y,Z){function aa(){H(ja);n.addReply(da,function(ba){da.id=ba;n.replies.push(da);-L(ja);X&&X()},function(ba){ea();D(ja);b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,Z)}function ea(){u(da,ja,function(ba){aa()},!0)}var ca=l().pdiv,da=b.newComment(T,b.getCurrentUser());da.pCommentId=n.id;null==n.replies&&(n.replies=[]);var ja=G(da,n.replies,ca,B+1);W?ea():aa()}if(M||!n.isResolved){C.style.display="none";var F=document.createElement("div");F.className="geCommentContainer";F.setAttribute("data-commentId",n.id);F.style.marginLeft=20*B+5+-"px";n.isResolved&&(t.style.opacity="0.7");var N=document.createElement("div");N.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=null!=n.user&&null!=n.user.pictureUrl?n.user.pictureUrl:Editor.userImage;N.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";N.appendChild(O);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,null!=n.user?n.user.displayName:mxResources.get("unknownUser"));-O.appendChild(Q);Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",n.id);E(n,Q);O.appendChild(Q);F.appendChild(N);N=document.createElement("div");N.className="geCommentTxt";mxUtils.write(N,n.content||"");F.appendChild(N);n.isLocked&&(F.style.opacity="0.5");N=document.createElement("div");N.className="geCommentActions";var V=document.createElement("ul");V.className="geCommentActionsList";N.appendChild(V);d||n.isLocked||0!=B&&!g||S(mxResources.get("reply"),-function(){x("",!0)},n.isResolved);O=b.getCurrentUser();null==O||null==n.user||O.id!=n.user.id||d||n.isLocked||(S(mxResources.get("edit"),function(){function T(){u(n,F,function(){H(F);n.editComment(n.content,function(){L(F)},function(W){D(F);T();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},n.isResolved),S(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){H(F);n.deleteComment(function(T){if(!0===T){T=F.querySelector(".geCommentTxt");-T.innerText="";mxUtils.write(T,mxResources.get("msgDeleted"));var W=F.querySelectorAll(".geCommentAction");for(T=0;T<W.length;T++)W[T].parentNode.removeChild(W[T]);L(F);F.style.opacity="0.5"}else{W=l(n).replies;for(T=0;T<W.length;T++)y.removeChild(W[T]);for(T=0;T<z.length;T++)if(z[T]==n){z.splice(T,1);break}C.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(T){D(F);b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},n.isResolved));-d||n.isLocked||0!=B||S(n.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function W(){var X=T.target;X.innerText="";n.isResolved=!n.isResolved;mxUtils.write(X,n.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=n.isResolved?"none":"",Z=l(n).replies,aa="light-dark("+(n.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<Z.length;ea++){Z[ea].style.backgroundColor=aa;for(var ca=Z[ea].querySelectorAll(".geCommentAction"),da=0;da<ca.length;da++)ca[da]!=-X.parentNode&&(ca[da].style.display=Y);U||(Z[ea].style.display="none")}q()}n.isResolved?x(mxResources.get("reOpened")+": ",!0,W,!1,!0):x(mxResources.get("markedAsResolved"),!1,W,!0)});F.appendChild(N);null!=A?y.insertBefore(F,A.nextSibling):y.appendChild(F);for(A=0;null!=n.replies&&A<n.replies.length;A++)N=n.replies[A],N.isResolved=n.isResolved,G(N,n.replies,null,B+1,M);null!=m&&(m.comment.id==n.id?(M=n.content,n.content=m.comment.content,u(n,F,m.saveCallback,m.deleteOnCancel),n.content=M):null==-m.comment.id&&m.comment.pCommentId==n.id&&(y.appendChild(m.div),u(m.comment,m.div,m.saveCallback,m.deleteOnCancel)));return F}}var d=!b.canComment(),g=b.canReplyToReplies(),m=null,t=document.createElement("div");t.className="geCommentsWin";t.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var v=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";y.style.bottom=parseInt(v)+-7+"px";t.appendChild(y);var C=document.createElement("span");C.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(C,mxResources.get("noCommentsFound"));var I=document.createElement("div");I.className="geToolbarContainer geCommentsToolbar";I.style.height=v;I.style.padding="3px 4px 4px 4px";v=document.createElement("a");v.className="geToolbarButton geAdaptiveAsset geToggleItem";v.style.width="16px";v.style.height="18px";v.style.backgroundPosition="center center";v.style.backgroundRepeat=-"no-repeat";v.style.backgroundSize="20px";v.style.margin="0 2px";v.style.display="inline-block";v.style.cursor="pointer";if(!d){var K=v.cloneNode();K.style.backgroundImage="url("+Editor.plusImage+")";K.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(K,"click",function(n){function z(){u(A,B,function(M){H(B);b.addComment(M,function(S){M.id=S;P.push(M);L(B)},function(S){D(B);z();b.handleError(S,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var A=-b.newComment("",b.getCurrentUser()),B=G(A,P,null,0);z();n.preventDefault();mxEvent.consume(n)});I.appendChild(K)}var J=v.cloneNode();J.classList.add("geToggleItem");J.style.backgroundImage="url("+Editor.checkImage+")";J.setAttribute("title",mxResources.get("showResolved"));var U=!1;mxEvent.addListener(J,"click",function(n){(U=!U)?J.classList.add("geActiveItem"):J.classList.remove("geActiveItem");R();n.preventDefault();mxEvent.consume(n)});I.appendChild(J);b.commentsRefreshNeeded()&&(K=v.cloneNode(),-K.style.backgroundImage="url("+Editor.refreshImage+")",K.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(K,"click",function(n){R();n.preventDefault();mxEvent.consume(n)}),I.appendChild(K));b.commentsSaveNeeded()&&(v=v.cloneNode(),v.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',v.setAttribute("title",mxResources.get("save")),v.className="geButton geAdaptiveAsset",mxEvent.addListener(v,"click",function(n){p();n.preventDefault();mxEvent.consume(n)}),-I.appendChild(v));t.appendChild(I);var P=[],R=mxUtils.bind(this,function(){this.hasError=!1;if(null!=m)try{m.div=m.div.cloneNode(!0);var n=m.div.querySelector(".geCommentEditTxtArea"),z=m.div.querySelector(".geCommentEditBtns");m.comment.content=n.value;n.parentNode.removeChild(n);z.parentNode.removeChild(z)}catch(A){b.handleError(A)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+-"...</div>";g=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(A){function B(M){if(null!=M){M.sort(function(l,x){return new Date(l.modifiedDate)-new Date(x.modifiedDate)});for(var S=0;S<M.length;S++)B(M[S].replies)}}A.sort(function(M,S){return new Date(M.modifiedDate)-new Date(S.modifiedDate)});y.innerText="";y.appendChild(C);C.style.display="block";P=A;for(A=0;A<P.length;A++)B(P[A].replies),G(P[A],P,null,0,U);null!=m&&null==m.comment.id&&null==m.comment.pCommentId&&(y.appendChild(m.div),-u(m.comment,m.div,m.saveCallback,m.deleteOnCancel))},mxUtils.bind(this,function(A){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(A&&A.message?": "+A.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});R();this.refreshComments=R;I=mxUtils.bind(this,function(){function n(S){var l=A[S.id];if(null!=l)for(E(S,l),l=0;null!=S.replies&&l<S.replies.length;l++)n(S.replies[l])}if(this.window.isVisible()){for(var z=y.querySelectorAll(".geCommentDate"),A=-{},B=0;B<z.length;B++){var M=z[B];A[M.getAttribute("data-commentId")]=M}for(B=0;B<P.length;B++)n(P[B])}});setInterval(I,6E4);this.refreshCommentsTime=I;this.window=new mxWindow(mxResources.get("comments"),t,e,f,c,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));-b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,f,c,k,p,q,u,E,H,D){var L=document.createElement("div");L.style.textAlign="center";D=null!=D?D:44;var G=document.createElement("div");G.style.padding="6px";G.style.overflow="auto";G.style.maxHeight=D+"px";G.style.lineHeight="1.2em";mxUtils.write(G,e);L.appendChild(G);null!=H&&(G=document.createElement("div"),G.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",H),G.appendChild(e),L.appendChild(G));H=document.createElement("div");-H.style.textAlign="center";H.style.whiteSpace="nowrap";var d=document.createElement("input");d.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(d.checked)});p.className="geBtn";null!=u&&(p.innerHTML=u+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&H.appendChild(p);var g=mxUtils.button(k||mxResources.get("ok"),function(){b.hideDialog();null!=f&&-f(d.checked)});H.appendChild(g);null!=q?(g.innerHTML=q+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||H.appendChild(p);L.appendChild(H);E?(H.style.marginTop="10px",G=document.createElement("p"),G.style.marginTop="20px",G.style.marginBottom="0px",G.appendChild(d),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),-G.appendChild(k),L.appendChild(G),mxEvent.addListener(k,"click",function(m){d.checked=!d.checked;mxEvent.consume(m)})):H.style.marginTop="12px";this.init=function(){g.focus()};this.container=L},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};+EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var g=0;g<d.length;g++)this.libraryLoaded(d[g].file,d[g].images,d[g].title,null!=d[g].div?"none"!=d[g].div.style.display:d[g].expand)};var F=EditorUi.prototype.updateActionStates;+EditorUi.prototype.updateActionStates=function(){F.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),k=this.getSelectionState(),v=this.isDiagramActive(),t="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=g&&g.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&t);this.actions.get("redo").setEnabled(this.canRedo()&&t);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(v);this.actions.get("editData").setEnabled(d.isEnabled());+this.actions.get("editConnectionPoints").setEnabled(v&&0==k.edges.length&&1==k.vertices.length);this.actions.get("editImage").setEnabled(v&&k.image&&0<k.cells.length);this.actions.get("crop").setEnabled(v&&k.image&&0<k.cells.length);this.actions.get("pageSetup").setEnabled(v);this.actions.get("shadowVisible").setEnabled(v);this.actions.get("connectionArrows").setEnabled(v);this.actions.get("connectionPoints").setEnabled(v);this.actions.get("copyStyle").setEnabled(v&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=+this.copiedStyle&&v&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(v);this.actions.get("createRevision").setEnabled(v);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(v&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("removeFormat").setEnabled(d.isEnabled()&&+!d.isSelectionEmpty()&&!d.isEditing());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.actions.get("properties").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=+g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(v&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var K=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=+null);K.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,v,t,x,A,J){var D=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(D.getSvg(v,t,x)),"image/svg+xml");else{var E=d.getFileData(!0,null,null,null,null,!0),R=D.getGraphBounds(),V=Math.floor(R.width*t/D.view.scale),Q=Math.floor(R.height*+t/D.view.scale);if(E.length<=MAX_REQUEST_SIZE&&V*Q<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var P={globalVars:D.getExportVariables()};J&&(P.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});d.saveRequest(g,k,function(q,y){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(y||"0")+(null!=q?"&filename="+encodeURIComponent(q):"")+"&extras="+encodeURIComponent(JSON.stringify(P))+(0<A?"&dpi="+A:"")+"&bg="+(null!=v?v:"none")+"&w="+V+"&h="++Q+"&border="+x+"&xml="+encodeURIComponent(E))})}else"png"==k?d.exportImage(t,null==v||"none"==v,!0,!1,!1,x,!0,!1,null,J,A):d.exportImage(t,!1,!0,!1,!1,x,!0,!1,"jpeg",J);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var v=d;this.currentPage!=this.pages[k]&&(v=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),+v.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+v.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxUtils.htmlEntities(d));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(v);var t=document.createElement("div");t.style.cssText=+"border:1px solid lightGray;overflow: auto;height:300px";t.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var x={};try{var A=mxSettings.getCustomLibraries();for(d=0;d<A.length;d++){var J=A[d];if("R"==J.substring(0,1)){var D=JSON.parse(decodeURIComponent(J.substring(1)));x[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(E){}this.remoteInvoke("getCustomLibraries",null,null,function(E){t.innerText="";if(0==E.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'++mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<E.length;R++){var V=E[R];x[V.id]&&(g[V.id]=V);var Q=this.addCheckbox(t,V.title,x[V.id]);(function(P,q){mxEvent.addListener(q,"change",function(){this.checked?g[P.id]=P:delete g[P.id]})})(V,Q)}},mxUtils.bind(this,function(E){t.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=E&&null!=E.message?E.message:+mxResources.get("unknownError"));t.appendChild(R)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var E=0,R;for(R in g)null==x[R]&&(E++,mxUtils.bind(this,function(V){this.remoteInvoke("getFileContent",[V.downloadUrl],null,mxUtils.bind(this,function(Q){E--;0==E&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Q,V)),this.showSidebar()}catch(P){this.handleError(P,mxResources.get("errorLoadingFile"))}}),+mxUtils.bind(this,function(){E--;0==E&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[R]));for(R in x)g[R]||this.closeLibrary(new RemoteLibrary(this,null,x[R]));0==E&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},+getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=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,v,t){var x=!0,A=window.setTimeout(mxUtils.bind(this,function(){x=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),J=mxUtils.bind(this,function(){window.clearTimeout(A);x&&v.apply(this,arguments)}),D=mxUtils.bind(this,+function(){window.clearTimeout(A);x&&t.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:J,error:D});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(E,R){var V={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=R?+V.error={errResp:R}:null!=E&&(V.resp=E);this.remoteWin.postMessage(JSON.stringify(V),"*")});try{var v=d.funtionName,t=this.remoteInvokableFns[v];if(null!=t&&"function"===typeof this[v]){if(t.allowedDomains){for(var x=!1,A=0;A<t.allowedDomains.length;A++)if(g=="https://"+t.allowedDomains[A]){x=!0;break}if(!x){k(null,"Invalid Call: "+v+" is not allowed.");return}}var J=d.functionArgs;Array.isArray(J)||(J=[]);if(t.isAsync)J.push(function(){k(Array.prototype.slice.apply(arguments))}),J.push(function(E){k(null,+E||"Unkown Error")}),this[v].apply(this,J);else{var D=this[v].apply(this,J);k([D])}}else k(null,"Invalid Call: "+v+" is not found.")}catch(E){k(null,"Invalid Call: An error occurred, "+E.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var v=k.open("database",2);v.onupgradeneeded=function(t){try{var x=v.result;1>t.oldVersion&&x.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&+(x.createObjectStore("files",{keyPath:"title"}),x.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(A){null!=g&&g(A)}};v.onsuccess=mxUtils.bind(this,function(t){try{var x=v.result;this.database=x;EditorUi.migrateStorageFiles&&(StorageFile.migrate(x),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if(!A||+"1"==urlParams.forceMigration){var J=document.createElement("iframe");J.style.display="none";J.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(J);var D=!0,E=!1,R,V=0,Q=mxUtils.bind(this,function(){E=!0;this.setDatabaseItem(".drawioMigrated3",!0);J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),P=mxUtils.bind(this,function(){V++;q()}),q=mxUtils.bind(this,function(){try{if(V>=+R.length)Q();else{var B=R[V];StorageFile.getFileContent(this,B,mxUtils.bind(this,function(C){null==C||".scratchpad"==B&&C==this.emptyLibraryXml?J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[B]}),"*"):P()}),P)}}catch(C){console.log(C)}}),y=mxUtils.bind(this,function(B){try{this.setDatabaseItem(null,[{title:B.title,size:B.data.length,lastModified:Date.now(),type:B.isLib?"L":"F"},{title:B.title,data:B.data}],P,P,["filesInfo","files"])}catch(C){console.log(C)}});+A=mxUtils.bind(this,function(B){try{if(B.source==J.contentWindow){var C={};try{C=JSON.parse(B.data)}catch(M){}"init"==C.event?(J.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=C.event||E||(D?null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?(R=C.resp[0],D=!1,q()):Q():null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?y(C.resp[0]):P())}}catch(M){console.log(M)}});+window.addEventListener("message",A)}})));d(x);x.onversionchange=function(){x.close()}}catch(A){null!=g?g(A):null!=window.console&&console.warn(A)}});v.onerror=g;v.onblocked=function(){}}catch(t){null!=g?g(t):null!=window.console&&console.error(t)}else null!=g&&g(Error("IndexedDB not supported"))}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,v,t){this.openDatabase(mxUtils.bind(this,function(x){try{t=t||"objects";Array.isArray(t)||(t=[t],d=[d],g=[g]);var A=x.transaction(t,+"readwrite");A.oncomplete=k;A.onerror=v;for(x=0;x<t.length;x++)A.objectStore(t[x]).put(null!=d&&null!=d[x]?{key:d[x],data:g[x]}:g[x])}catch(J){null!=v&&v(J)}}),v)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,v){this.openDatabase(mxUtils.bind(this,function(t){try{v=v||"objects";Array.isArray(v)||(v=[v],d=[d]);var x=t.transaction(v,"readwrite");x.oncomplete=g;x.onerror=k;for(t=0;t<v.length;t++)x.objectStore(v[t]).delete(d[t])}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItem=+function(d,g,k,v){this.openDatabase(mxUtils.bind(this,function(t){try{v=v||"objects";var x=t.transaction([v],"readonly").objectStore(v).get(d);x.onsuccess=function(){g(x.result)};x.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(v){try{k=k||"objects";var t=v.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),x=[];t.onsuccess=function(A){null==A.target.result?d(x):(x.push(A.target.result.value),+A.target.result.continue())};t.onerror=g}catch(A){null!=g&&g(A)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(v){try{k=k||"objects";var t=v.transaction([k],"readonly").objectStore(k).getAllKeys();t.onsuccess=function(){d(t.result)};t.onerror=g}catch(x){null!=g&&g(x)}}),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():!1};EditorUi.prototype.getComments=function(d,g){var k=this.getCurrentFile();null!=k?k.getComments(d,g):d([])};EditorUi.prototype.addComment=function(d,g,k){var v=this.getCurrentFile();null!=v?v.addComment(d,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?+d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile();return null!=k?k.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,g){var k=this.getCurrentFile();null!=+k&&k.getRevisions?k.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,v,t,x,A,J){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");+return this.editor.loadUrl(d,g,k,v,t,x,A,J)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};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,v,t,x,A,J,D,E,R,V,Q,P,q,y){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,k,v,t,x,A,J,D,E,R,V,Q,P,q,y)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,v){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");+return this.editor.convertImages(d,g,k,v)};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,v){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,v)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");+return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,v,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,g,k,v,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),v=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<v.length){var t=+"<mxfile "===v.substring(0,8)||"<?xml"===v.substring(0,5)||"\x3c!--[if IE]>"===v.substring(0,12);v="<mxlibrary>"===v.substring(0,11);(t||v)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();+var CommentsWindow=function(b,e,f,c,l,n){function p(){for(var q=A.getElementsByTagName("div"),y=0,B=0;B<q.length;B++)"none"!=q[B].style.display&&q[B].parentNode==A&&y++;J.style.display=0==y?"block":"none"}function u(q,y,B,C){function M(){y.removeChild(z);y.removeChild(I);m.style.display="block";T.style.display="block"}v={div:y,comment:q,saveCallback:B,deleteOnCancel:C};var T=y.querySelector(".geCommentTxt"),m=y.querySelector(".geCommentActionsList"),z=document.createElement("textarea");z.className=+"geCommentEditTxtArea";z.style.minHeight=T.offsetHeight+"px";z.value=q.content;y.insertBefore(z,T);var I=document.createElement("div");I.className="geCommentEditBtns";var L=mxUtils.button(mxResources.get("cancel"),function(){C?(y.parentNode.removeChild(y),p()):M();v=null});L.className="geCommentEditBtn";I.appendChild(L);var N=mxUtils.button(mxResources.get("save"),function(){T.innerText="";q.content=z.value;mxUtils.write(T,q.content);M();B(q);v=null});mxEvent.addListener(z,"keydown",mxUtils.bind(this,+function(O){mxEvent.isConsumed(O)||((mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O))&&13==O.keyCode?(N.click(),mxEvent.consume(O)):27==O.keyCode&&(L.click(),mxEvent.consume(O)))}));N.focus();N.className="geCommentEditBtn gePrimaryBtn";I.appendChild(N);y.insertBefore(I,T);m.style.display="none";T.style.display="none";z.focus()}function G(q,y){y.innerText="";q=new Date(q.modifiedDate);var B=b.timeSince(q);null==B&&(B=mxResources.get("lessThanAMinute"));mxUtils.write(y,mxResources.get("timeAgo",+[B],"{1} ago"));y.setAttribute("title",q.toLocaleDateString()+" "+q.toLocaleTimeString())}function H(q){var y=document.createElement("img");y.className="geCommentBusyImg";y.src=IMAGE_PATH+"/spin.gif";q.appendChild(y);q.busyImg=y}function F(q){q.style.border="1px solid red";q.busyImg.parentNode==q&&q.removeChild(q.busyImg)}function K(q){q.style.border="";q.busyImg.parentNode==q&&q.removeChild(q.busyImg)}function d(q,y,B,C,M){function T(U,W,X){var Z=document.createElement("li");Z.className="geCommentAction";+var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,U);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){W(ba,q);ba.preventDefault();mxEvent.consume(ba)});S.appendChild(Z);X&&(Z.style.display="none")}function m(){function U(Z){W.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,U(Z.replies[Y])}var W=[],X=I;U(q);return{pdiv:X,replies:W}}function z(U,W,X,Z,Y){function ba(){H(aa);q.addReply(fa,function(da){fa.id=da;q.replies.push(fa);+K(aa);X&&X()},function(da){ea();F(aa);b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function ea(){u(fa,aa,function(da){ba()},!0)}var ca=m().pdiv,fa=b.newComment(U,b.getCurrentUser());fa.pCommentId=q.id;null==q.replies&&(q.replies=[]);var aa=d(fa,q.replies,ca,C+1);W?ea():ba()}if(M||!q.isResolved){J.style.display="none";var I=document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",q.id);I.style.marginLeft=20*C+5++"px";q.isResolved&&(t.style.opacity="0.7");var L=document.createElement("div");L.className="geCommentHeader";var N=document.createElement("img");N.className="geCommentUserImg";N.src=null!=q.user&&null!=q.user.pictureUrl?q.user.pictureUrl:Editor.userImage;L.appendChild(N);N=document.createElement("div");N.className="geCommentHeaderTxt";L.appendChild(N);var O=document.createElement("div");O.className="geCommentUsername";mxUtils.write(O,null!=q.user?q.user.displayName:mxResources.get("unknownUser"));+N.appendChild(O);O=document.createElement("div");O.className="geCommentDate";O.setAttribute("data-commentId",q.id);G(q,O);N.appendChild(O);I.appendChild(L);L=document.createElement("div");L.className="geCommentTxt";mxUtils.write(L,q.content||"");I.appendChild(L);q.isLocked&&(I.style.opacity="0.5");L=document.createElement("div");L.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";L.appendChild(S);g||q.isLocked||0!=C&&!k||T(mxResources.get("reply"),+function(){z("",!0)},q.isResolved);N=b.getCurrentUser();null==N||null==q.user||N.id!=q.user.id||g||q.isLocked||(T(mxResources.get("edit"),function(){function U(){u(q,I,function(){H(I);q.editComment(q.content,function(){K(I)},function(W){F(I);U();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}U()},q.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){H(I);q.deleteComment(function(U){if(!0===U){U=I.querySelector(".geCommentTxt");+U.innerText="";mxUtils.write(U,mxResources.get("msgDeleted"));var W=I.querySelectorAll(".geCommentAction");for(U=0;U<W.length;U++)W[U].parentNode.removeChild(W[U]);K(I);I.style.opacity="0.5"}else{W=m(q).replies;for(U=0;U<W.length;U++)A.removeChild(W[U]);for(U=0;U<y.length;U++)if(y[U]==q){y.splice(U,1);break}J.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(U){F(I);b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},q.isResolved));+g||q.isLocked||0!=C||T(q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(U){function W(){var X=U.target;X.innerText="";q.isResolved=!q.isResolved;mxUtils.write(X,q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=q.isResolved?"none":"",Y=m(q).replies,ba="light-dark("+(q.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<Y.length;ea++){Y[ea].style.backgroundColor=ba;for(var ca=Y[ea].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=+X.parentNode&&(ca[fa].style.display=Z);V||(Y[ea].style.display="none")}p()}q.isResolved?z(mxResources.get("reOpened")+": ",!0,W,!1,!0):z(mxResources.get("markedAsResolved"),!1,W,!0)});I.appendChild(L);null!=B?A.insertBefore(I,B.nextSibling):A.appendChild(I);for(B=0;null!=q.replies&&B<q.replies.length;B++)L=q.replies[B],L.isResolved=q.isResolved,d(L,q.replies,null,C+1,M);null!=v&&(v.comment.id==q.id?(M=q.content,q.content=v.comment.content,u(q,I,v.saveCallback,v.deleteOnCancel),q.content=M):null==+v.comment.id&&v.comment.pCommentId==q.id&&(A.appendChild(v.div),u(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return I}}var g=!b.canComment(),k=b.canReplyToReplies(),v=null,t=document.createElement("div");t.className="geCommentsWin";t.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var x=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";A.style.bottom=parseInt(x)++7+"px";t.appendChild(A);var J=document.createElement("span");J.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(J,mxResources.get("noCommentsFound"));var D=document.createElement("div");D.className="geToolbarContainer geCommentsToolbar";D.style.height=x;D.style.padding="3px 4px 4px 4px";x=document.createElement("a");x.className="geToolbarButton geAdaptiveAsset geToggleItem";x.style.width="16px";x.style.height="18px";x.style.backgroundPosition="center center";x.style.backgroundRepeat=+"no-repeat";x.style.backgroundSize="20px";x.style.margin="0 2px";x.style.display="inline-block";x.style.cursor="pointer";if(!g){var E=x.cloneNode();E.style.backgroundImage="url("+Editor.plusImage+")";E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(q){function y(){u(B,C,function(M){H(C);b.addComment(M,function(T){M.id=T;Q.push(M);K(C)},function(T){F(C);y();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var B=+b.newComment("",b.getCurrentUser()),C=d(B,Q,null,0);y();q.preventDefault();mxEvent.consume(q)});D.appendChild(E)}var R=x.cloneNode();R.classList.add("geToggleItem");R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var V=!1;mxEvent.addListener(R,"click",function(q){(V=!V)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");P();q.preventDefault();mxEvent.consume(q)});D.appendChild(R);b.commentsRefreshNeeded()&&(E=x.cloneNode(),+E.style.backgroundImage="url("+Editor.refreshImage+")",E.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(E,"click",function(q){P();q.preventDefault();mxEvent.consume(q)}),D.appendChild(E));b.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),x.className="geButton geAdaptiveAsset",mxEvent.addListener(x,"click",function(q){n();q.preventDefault();mxEvent.consume(q)}),+D.appendChild(x));t.appendChild(D);var Q=[],P=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var q=v.div.querySelector(".geCommentEditTxtArea"),y=v.div.querySelector(".geCommentEditBtns");v.comment.content=q.value;q.parentNode.removeChild(q);y.parentNode.removeChild(y)}catch(B){b.handleError(B)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))++"...</div>";k=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(B){function C(M){if(null!=M){M.sort(function(m,z){return new Date(m.modifiedDate)-new Date(z.modifiedDate)});for(var T=0;T<M.length;T++)C(M[T].replies)}}B.sort(function(M,T){return new Date(M.modifiedDate)-new Date(T.modifiedDate)});A.innerText="";A.appendChild(J);J.style.display="block";Q=B;for(B=0;B<Q.length;B++)C(Q[B].replies),d(Q[B],Q,null,0,V);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(A.appendChild(v.div),+u(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(B){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(B&&B.message?": "+B.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});P();this.refreshComments=P;D=mxUtils.bind(this,function(){function q(T){var m=B[T.id];if(null!=m)for(G(T,m),m=0;null!=T.replies&&m<T.replies.length;m++)q(T.replies[m])}if(this.window.isVisible()){for(var y=A.querySelectorAll(".geCommentDate"),B=+{},C=0;C<y.length;C++){var M=y[C];B[M.getAttribute("data-commentId")]=M}for(C=0;C<Q.length;C++)q(Q[C])}});setInterval(D,6E4);this.refreshCommentsTime=D;this.window=new mxWindow(mxResources.get("comments"),t,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));+b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,f,c,l,n,p,u,G,H,F){var K=document.createElement("div");K.style.textAlign="center";F=null!=F?F:44;var d=document.createElement("div");d.style.padding="6px";d.style.overflow="auto";d.style.maxHeight=F+"px";d.style.lineHeight="1.2em";mxUtils.write(d,e);K.appendChild(d);null!=H&&(d=document.createElement("div"),d.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",H),d.appendChild(e),K.appendChild(d));H=document.createElement("div");+H.style.textAlign="center";H.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(g.checked)});n.className="geBtn";null!=u&&(n.innerHTML=u+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");b.editor.cancelFirst&&H.appendChild(n);var k=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&+f(g.checked)});H.appendChild(k);null!=p?(k.innerHTML=p+"<br>"+k.innerHTML+"<br>",k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.className="geBtn",k.style.width="40%"):k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||H.appendChild(n);K.appendChild(H);G?(H.style.marginTop="10px",d=document.createElement("p"),d.style.marginTop="20px",d.style.marginBottom="0px",d.appendChild(g),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),+d.appendChild(l),K.appendChild(d),mxEvent.addListener(l,"click",function(v){g.checked=!g.checked;mxEvent.consume(v)})):H.style.marginTop="12px";this.init=function(){k.focus()};this.container=K},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};-EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,e,f,c,k){if(null!=e)for(var p=0;p<e.length;p++)null!=e[p]&&(b=this.patchPages(b,e[p],f,c,k));return b};-EditorUi.prototype.patchPages=function(b,e,f,c,k){var p={},q=[],u={},E={},H={},D={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var L in c[EditorUi.DIFF_UPDATE])p[L]=c[EditorUi.DIFF_UPDATE][L];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)E[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)u[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(L in e[EditorUi.DIFF_UPDATE])c=-e[EditorUi.DIFF_UPDATE][L],null!=c.previous&&(D[c.previous]=L);if(null!=b){var G="";for(c=0;c<b.length;c++){var d=b[c].getId();H[d]=b[c];null!=D[G]||E[d]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][d]&&null!=e[EditorUi.DIFF_UPDATE][d].previous||(D[G]=d);G=d}}var g={},m=mxUtils.bind(this,function(v){var y=null!=v?v.getId():"";if(null!=v&&!g[y]){g[y]=!0;q.push(v);var C=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][y]:null;null!=C&&(this.updatePageRoot(v),null!=C.name&&v.setName(C.name),-null!=C.view&&this.patchViewState(v,C.view),null!=C.cells&&this.patchPage(v,C.cells,p[v.getId()],k),!f||null==C.cells&&null==C.view||(v.needsUpdate=!0))}v=D[y];null!=v&&(delete D[y],m(H[v]));v=u[y];null!=v&&(delete u[y],t(v))}),t=mxUtils.bind(this,function(v){v=mxUtils.parseXml(v.data).documentElement;v=new DiagramPage(v);this.updatePageRoot(v);var y=H[v.getId()];null==y?m(v):(this.patchPage(y,this.diffPages([y],[v]),p[y.getId()],k),f&&(y.needsUpdate=!0))});m();for(L in D)m(H[D[L]]),delete D[L];for(L in u)t(u[L]),-delete u[L];return q};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])};-EditorUi.prototype.createParentLookup=function(b,e){function f(H){var D=c[H];null==D&&(D={inserted:[],moved:{}},c[H]=D);return D}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var k=0;k<e[EditorUi.DIFF_INSERT].length;k++){var p=e[EditorUi.DIFF_INSERT][k],q=null!=p.parent?p.parent:"",u=null!=p.previous?p.previous:"";f(q).inserted[u]=p}if(null!=e[EditorUi.DIFF_UPDATE])for(var E in e[EditorUi.DIFF_UPDATE])p=e[EditorUi.DIFF_UPDATE][E],null!=p.previous&&(q=p.parent,null==q&&(k=b.getCell(E),null!=k&&(k=-b.getParent(k),null!=k&&(q=k.getId()))),null!=q&&(f(q).moved[p.previous]=E));return c};-EditorUi.prototype.patchPage=function(b,e,f,c){var k=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),p=this.createParentLookup(k,e);k.beginUpdate();try{var q=k.updateEdgeParent,u=new mxDictionary,E=[];k.updateEdgeParent=function(t,v){!u.get(t)&&c&&(u.put(t,!0),E.push(t))};var H=p[""],D=null!=H&&null!=H.inserted?H.inserted[""]:null,L=null;null!=D&&(L=this.getCellForJson(D));if(null==L){var G=null!=H&&null!=H.moved?H.moved[""]:null;null!=G&&(L=k.getCell(G))}null!=L&&(k.setRoot(L),-b.root=L,EditorUi.debug("EditorUi.patchPage: Root changed",L.id));this.patchCellRecursive(b,k,k.root,p,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var d=0;d<e[EditorUi.DIFF_REMOVE].length;d++){G=e[EditorUi.DIFF_REMOVE][d];var g=k.getCell(G);null!=g&&k.remove(g)}if(null!=e[EditorUi.DIFF_UPDATE]){var m=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(G in e[EditorUi.DIFF_UPDATE])g=k.getCell(G),null!=g?this.patchCell(k,g,e[EditorUi.DIFF_UPDATE][G],null!=m?m[G]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",-G,"diff",[e[EditorUi.DIFF_UPDATE][G]])}if(null!=e[EditorUi.DIFF_INSERT])for(d=0;d<e[EditorUi.DIFF_INSERT].length;d++)D=e[EditorUi.DIFF_INSERT][d],g=k.getCell(D.id),null!=g&&(k.setTerminal(g,k.getCell(D.source),!0),k.setTerminal(g,k.getCell(D.target),!1));k.updateEdgeParent=q;if(c&&0<E.length)for(d=0;d<E.length;d++)k.contains(E[d])&&k.updateEdgeParent(E[d])}finally{k.endUpdate()}};-EditorUi.prototype.patchCellRecursive=function(b,e,f,c,k){if(null!=f){var p=c[f.getId()],q=null!=p&&null!=p.inserted?p.inserted:{};p=null!=p&&null!=p.moved?p.moved:{};for(var u=0,E=e.getChildCount(f),H="",D=0;D<E;D++){var L=e.getChildAt(f,D).getId();null==p[H]&&(null==k[EditorUi.DIFF_UPDATE]||null==k[EditorUi.DIFF_UPDATE][L]||null==k[EditorUi.DIFF_UPDATE][L].previous&&null==k[EditorUi.DIFF_UPDATE][L].parent)&&(p[H]=L);H=L}E=mxUtils.bind(this,function(G,d){var g=null!=G?G.getId():"";null==g&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",-"cell",G);null!=G&&d&&(d=e.getCell(g),null!=d&&d!=G&&(G=null));null!=G&&(e.getChildAt(f,u)!=G&&e.add(f,G,u),this.patchCellRecursive(b,e,G,c,k),u++);return g});for(H=[null];0<H.length;)if(D=H.shift(),D=E(null!=D?D.child:null,null!=D?D.insert:!1),L=p[D],null!=L&&(delete p[D],H.push({child:e.getCell(L)})),L=q[D],null!=L&&(delete q[D],H.push({child:this.getCellForJson(L),insert:!0})),0==H.length){for(D in p)H.push({child:e.getCell(p[D])}),delete p[D];for(D in q)H.push({child:this.getCellForJson(q[D]),-insert:!0}),delete q[D]}}};+EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,e,f,c,l){if(null!=e)for(var n=0;n<e.length;n++)null!=e[n]&&(b=this.patchPages(b,e[n],f,c,l));return b};+EditorUi.prototype.patchPages=function(b,e,f,c,l){var n={},p=[],u={},G={},H={},F={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var K in c[EditorUi.DIFF_UPDATE])n[K]=c[EditorUi.DIFF_UPDATE][K];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)G[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)u[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(K in e[EditorUi.DIFF_UPDATE])c=+e[EditorUi.DIFF_UPDATE][K],null!=c.previous&&(F[c.previous]=K);if(null!=b){var d="";for(c=0;c<b.length;c++){var g=b[c].getId();H[g]=b[c];null!=F[d]||G[g]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][g]&&null!=e[EditorUi.DIFF_UPDATE][g].previous||(F[d]=g);d=g}}var k={},v=mxUtils.bind(this,function(x){var A=null!=x?x.getId():"";if(null!=x&&!k[A]){k[A]=!0;p.push(x);var J=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][A]:null;null!=J&&(this.updatePageRoot(x),null!=J.name&&x.setName(J.name),+null!=J.view&&this.patchViewState(x,J.view),null!=J.cells&&this.patchPage(x,J.cells,n[x.getId()],l),!f||null==J.cells&&null==J.view||(x.needsUpdate=!0))}x=F[A];null!=x&&(delete F[A],v(H[x]));x=u[A];null!=x&&(delete u[A],t(x))}),t=mxUtils.bind(this,function(x){x=mxUtils.parseXml(x.data).documentElement;x=new DiagramPage(x);this.updatePageRoot(x);var A=H[x.getId()];null==A?v(x):(this.patchPage(A,this.diffPages([A],[x]),n[A.getId()],l),f&&(A.needsUpdate=!0))});v();for(K in F)v(H[F[K]]),delete F[K];for(K in u)t(u[K]),+delete u[K];return p};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])};+EditorUi.prototype.createParentLookup=function(b,e){function f(H){var F=c[H];null==F&&(F={inserted:[],moved:{}},c[H]=F);return F}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var l=0;l<e[EditorUi.DIFF_INSERT].length;l++){var n=e[EditorUi.DIFF_INSERT][l],p=null!=n.parent?n.parent:"",u=null!=n.previous?n.previous:"";f(p).inserted[u]=n}if(null!=e[EditorUi.DIFF_UPDATE])for(var G in e[EditorUi.DIFF_UPDATE])n=e[EditorUi.DIFF_UPDATE][G],null!=n.previous&&(p=n.parent,null==p&&(l=b.getCell(G),null!=l&&(l=+b.getParent(l),null!=l&&(p=l.getId()))),null!=p&&(f(p).moved[n.previous]=G));return c};+EditorUi.prototype.patchPage=function(b,e,f,c){var l=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),n=this.createParentLookup(l,e);l.beginUpdate();try{var p=l.updateEdgeParent,u=new mxDictionary,G=[];l.updateEdgeParent=function(t,x){!u.get(t)&&c&&(u.put(t,!0),G.push(t))};var H=n[""],F=null!=H&&null!=H.inserted?H.inserted[""]:null,K=null;null!=F&&(K=this.getCellForJson(F));if(null==K){var d=null!=H&&null!=H.moved?H.moved[""]:null;null!=d&&(K=l.getCell(d))}null!=K&&(l.setRoot(K),+b.root=K,EditorUi.debug("EditorUi.patchPage: Root changed",K.id));this.patchCellRecursive(b,l,l.root,n,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var g=0;g<e[EditorUi.DIFF_REMOVE].length;g++){d=e[EditorUi.DIFF_REMOVE][g];var k=l.getCell(d);null!=k&&l.remove(k)}if(null!=e[EditorUi.DIFF_UPDATE]){var v=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(d in e[EditorUi.DIFF_UPDATE])k=l.getCell(d),null!=k?this.patchCell(l,k,e[EditorUi.DIFF_UPDATE][d],null!=v?v[d]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",+d,"diff",[e[EditorUi.DIFF_UPDATE][d]])}if(null!=e[EditorUi.DIFF_INSERT])for(g=0;g<e[EditorUi.DIFF_INSERT].length;g++)F=e[EditorUi.DIFF_INSERT][g],k=l.getCell(F.id),null!=k&&(l.setTerminal(k,l.getCell(F.source),!0),l.setTerminal(k,l.getCell(F.target),!1));l.updateEdgeParent=p;if(c&&0<G.length)for(g=0;g<G.length;g++)l.contains(G[g])&&l.updateEdgeParent(G[g])}finally{l.endUpdate()}};+EditorUi.prototype.patchCellRecursive=function(b,e,f,c,l){if(null!=f){var n=c[f.getId()],p=null!=n&&null!=n.inserted?n.inserted:{};n=null!=n&&null!=n.moved?n.moved:{};for(var u=0,G=e.getChildCount(f),H="",F=0;F<G;F++){var K=e.getChildAt(f,F).getId();null==n[H]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][K]||null==l[EditorUi.DIFF_UPDATE][K].previous&&null==l[EditorUi.DIFF_UPDATE][K].parent)&&(n[H]=K);H=K}G=mxUtils.bind(this,function(d,g){var k=null!=d?d.getId():"";null==k&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",+"cell",d);null!=d&&g&&(g=e.getCell(k),null!=g&&g!=d&&(d=null));null!=d&&(e.getChildAt(f,u)!=d&&e.add(f,d,u),this.patchCellRecursive(b,e,d,c,l),u++);return k});for(H=[null];0<H.length;)if(F=H.shift(),F=G(null!=F?F.child:null,null!=F?F.insert:!1),K=n[F],null!=K&&(delete n[F],H.push({child:e.getCell(K)})),K=p[F],null!=K&&(delete p[F],H.push({child:this.getCellForJson(K),insert:!0})),0==H.length){for(F in n)H.push({child:e.getCell(n[F])}),delete n[F];for(F in p)H.push({child:this.getCellForJson(p[F]),+insert:!0}),delete p[F]}}};EditorUi.prototype.patchCell=function(b,e,f,c){if(null!=e&&null!=f){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in f?b.setValue(e,f.value):null!=f.xmlValue&&b.setValue(e,mxUtils.parseXml(f.xmlValue).documentElement);null!=c&&null!=c.style||null==f.style||b.setStyle(e,f.style);null!=f.visible&&b.setVisible(e,1==f.visible);null!=f.collapsed&&b.setCollapsed(e,1==f.collapsed);null!=f.vertex&&(e.vertex=1==f.vertex);null!=f.edge&&(e.edge=1==f.edge);null!=f.connectable&&(e.connectable=-1==f.connectable);null!=f.geometry&&b.setGeometry(e,this.codec.decode(mxUtils.parseXml(f.geometry).documentElement));null!=f.source&&b.setTerminal(e,b.getCell(f.source),!0);null!=f.target&&b.setTerminal(e,b.getCell(f.target),!1);for(var k in f)this.cellProperties[k]||(e[k]=f[k])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var e=null;null!=b&&(e=mxUtils.getXml(b));return e};-EditorUi.prototype.getNodeForPages=function(b){var e=null;if(null!=this.fileNode&&null!=b){e=this.fileNode.cloneNode(!1);for(var f=0;f<b.length;f++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[f].root));this.editor.graph.saveViewState(b[f].viewState,c);var k=b[f].node.cloneNode(!1);k.appendChild(c);e.appendChild(k)}}return e};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};+1==f.connectable);null!=f.geometry&&b.setGeometry(e,this.codec.decode(mxUtils.parseXml(f.geometry).documentElement));null!=f.source&&b.setTerminal(e,b.getCell(f.source),!0);null!=f.target&&b.setTerminal(e,b.getCell(f.target),!1);for(var l in f)this.cellProperties[l]||(e[l]=f[l])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var e=null;null!=b&&(e=mxUtils.getXml(b));return e};+EditorUi.prototype.getNodeForPages=function(b){var e=null;if(null!=this.fileNode&&null!=b){e=this.fileNode.cloneNode(!1);for(var f=0;f<b.length;f++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[f].root));this.editor.graph.saveViewState(b[f].viewState,c);var l=b[f].node.cloneNode(!1);l.appendChild(c);e.appendChild(l)}}return e};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};EditorUi.prototype.getPagesForNode=function(b,e){var f=this.editor.extractGraphModel(b,!0,!0);null!=f&&(b=f);e=b.getElementsByTagName(e||"diagram");f=[];if(0<e.length)for(b=0;b<e.length;b++){var c=new DiagramPage(e[b]);this.updatePageRoot(c,!0);f.push(c)}else"mxGraphModel"==b.nodeName&&(c=new DiagramPage(b.ownerDocument.createElement("diagram")),c.setName(mxResources.get("pageWithNumber",[1])),c.node.appendChild(b.cloneNode(!0)),f.push(c));return f};-EditorUi.prototype.diffPages=function(b,e){var f=[],c=[],k={},p={},q={},u=null;if(null!=b&&null!=e){for(var E=0;E<e.length;E++)p[e[E].getId()]={page:e[E],prev:u},u=e[E];u=null;for(E=0;E<b.length;E++){var H=b[E].getId();e=p[H];if(null==e)c.push(H);else{this.updatePageRoot(b[E]);this.updatePageRoot(e.page);var D=this.diffCells(b[E].root,e.page.root),L={};mxUtils.isEmptyObject(D)||(L.cells=D);D=this.diffViewState(b[E],e.page);mxUtils.isEmptyObject(D)||(L.view=D);if((null!=e.prev?null==u:null!=u)||null!=-u&&null!=e.prev&&u.getId()!=e.prev.getId())L.previous=null!=e.prev?e.prev.getId():"";null!=e.page.getName()&&b[E].getName()!=e.page.getName()&&(L.name=e.page.getName());mxUtils.isEmptyObject(L)||(q[H]=L)}delete p[b[E].getId()];u=b[E]}for(H in p)e=p[H],f.push({id:e.page.getId(),data:mxUtils.getXml(e.page.node),previous:null!=e.prev?e.prev.getId():""});mxUtils.isEmptyObject(q)||(k[EditorUi.DIFF_UPDATE]=q);0<c.length&&(k[EditorUi.DIFF_REMOVE]=c);0<f.length&&(k[EditorUi.DIFF_INSERT]=f)}return k};-EditorUi.prototype.createCellLookup=function(b,e,f){f=null!=f?f:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):f[b.getId()]={cell:b,prev:e};var c=b.getChildCount();e=null;for(var k=0;k<c;k++){var p=b.getChildAt(k);this.createCellLookup(p,e,f);e=p}return f};-EditorUi.prototype.diffCellRecursive=function(b,e,f,c,k){c=null!=c?c:{};var p=f[b.getId()];delete f[b.getId()];if(null==p)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):k.push(b.getId());else{var q=this.diffCell(b,p.cell);if(null!=q.parent||(null!=p.prev?null==e:null!=e)||null!=e&&null!=p.prev&&e.getId()!=p.prev.getId())q.previous=null!=p.prev?p.prev.getId():"";mxUtils.isEmptyObject(q)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",-b,"diff",q):c[b.getId()]=q)}p=b.getChildCount();e=null;for(q=0;q<p;q++){var u=b.getChildAt(q);this.diffCellRecursive(u,e,f,c,k);e=u}return c};-EditorUi.prototype.diffCells=function(b,e){var f={},c=[],k=this.createCellLookup(e);e.id==b.id?(e=[],b=this.diffCellRecursive(b,null,k,null,e),mxUtils.isEmptyObject(b)||(f[EditorUi.DIFF_UPDATE]=b),0<e.length&&(f[EditorUi.DIFF_REMOVE]=e)):EditorUi.debug("EditorUi.diffCells: Root changed",e.id);for(var p in k)b=k[p],c.push(this.getJsonForCell(b.cell,b.prev));0<c.length&&(f[EditorUi.DIFF_INSERT]=c);return f};-EditorUi.prototype.diffViewState=function(b,e){var f=b.viewState,c=e.viewState,k={};b==this.currentPage&&(f=this.editor.graph.getViewState());e==this.currentPage&&(c=this.editor.graph.getViewState());if(null!=f&&null!=c)for(var p in this.viewStateProperties)this.diffViewStateProperty(f,c,p,k);return k};EditorUi.prototype.diffViewStateProperty=function(b,e,f,c){b=JSON.stringify(this.getViewStateProperty(b,f));e=JSON.stringify(this.getViewStateProperty(e,f));b!=e&&(c[f]=e)};+EditorUi.prototype.diffPages=function(b,e){var f=[],c=[],l={},n={},p={},u=null;if(null!=b&&null!=e){for(var G=0;G<e.length;G++)n[e[G].getId()]={page:e[G],prev:u},u=e[G];u=null;for(G=0;G<b.length;G++){var H=b[G].getId();e=n[H];if(null==e)c.push(H);else{this.updatePageRoot(b[G]);this.updatePageRoot(e.page);var F=this.diffCells(b[G].root,e.page.root),K={};mxUtils.isEmptyObject(F)||(K.cells=F);F=this.diffViewState(b[G],e.page);mxUtils.isEmptyObject(F)||(K.view=F);if((null!=e.prev?null==u:null!=u)||null!=+u&&null!=e.prev&&u.getId()!=e.prev.getId())K.previous=null!=e.prev?e.prev.getId():"";null!=e.page.getName()&&b[G].getName()!=e.page.getName()&&(K.name=e.page.getName());mxUtils.isEmptyObject(K)||(p[H]=K)}delete n[b[G].getId()];u=b[G]}for(H in n)e=n[H],f.push({id:e.page.getId(),data:mxUtils.getXml(e.page.node),previous:null!=e.prev?e.prev.getId():""});mxUtils.isEmptyObject(p)||(l[EditorUi.DIFF_UPDATE]=p);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f)}return l};+EditorUi.prototype.createCellLookup=function(b,e,f){f=null!=f?f:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):f[b.getId()]={cell:b,prev:e};var c=b.getChildCount();e=null;for(var l=0;l<c;l++){var n=b.getChildAt(l);this.createCellLookup(n,e,f);e=n}return f};+EditorUi.prototype.diffCellRecursive=function(b,e,f,c,l){c=null!=c?c:{};var n=f[b.getId()];delete f[b.getId()];if(null==n)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):l.push(b.getId());else{var p=this.diffCell(b,n.cell);if(null!=p.parent||(null!=n.prev?null==e:null!=e)||null!=e&&null!=n.prev&&e.getId()!=n.prev.getId())p.previous=null!=n.prev?n.prev.getId():"";mxUtils.isEmptyObject(p)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",+b,"diff",p):c[b.getId()]=p)}n=b.getChildCount();e=null;for(p=0;p<n;p++){var u=b.getChildAt(p);this.diffCellRecursive(u,e,f,c,l);e=u}return c};+EditorUi.prototype.diffCells=function(b,e){var f={},c=[],l=this.createCellLookup(e);e.id==b.id?(e=[],b=this.diffCellRecursive(b,null,l,null,e),mxUtils.isEmptyObject(b)||(f[EditorUi.DIFF_UPDATE]=b),0<e.length&&(f[EditorUi.DIFF_REMOVE]=e)):EditorUi.debug("EditorUi.diffCells: Root changed",e.id);for(var n in l)b=l[n],c.push(this.getJsonForCell(b.cell,b.prev));0<c.length&&(f[EditorUi.DIFF_INSERT]=c);return f};+EditorUi.prototype.diffViewState=function(b,e){var f=b.viewState,c=e.viewState,l={};b==this.currentPage&&(f=this.editor.graph.getViewState());e==this.currentPage&&(c=this.editor.graph.getViewState());if(null!=f&&null!=c)for(var n in this.viewStateProperties)this.diffViewStateProperty(f,c,n,l);return l};EditorUi.prototype.diffViewStateProperty=function(b,e,f,c){b=JSON.stringify(this.getViewStateProperty(b,f));e=JSON.stringify(this.getViewStateProperty(e,f));b!=e&&(c[f]=e)};EditorUi.prototype.getViewStateProperty=function(b,e){b=b[e];"backgroundImage"==e&&null!=b&&null!=b.originalSrc?b={originalSrc:b.originalSrc}:"extFonts"==e&&null==b&&(b=[]);return b};EditorUi.prototype.getCellForJson=function(b){var e=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,f=b.value;null!=b.xmlValue&&(f=mxUtils.parseXml(b.xmlValue).documentElement);e=new mxCell(f,e,b.style);e.connectable=0!=b.connectable;e.collapsed=1==b.collapsed;e.visible=0!=b.visible;e.vertex=1==b.vertex;e.edge=1==b.edge;e.id=b.id;for(var c in b)this.cellProperties[c]||(e[c]=b[c]);return e};EditorUi.prototype.getJsonForCell=function(b,e){var f={id:b.getId()};b.vertex&&(f.vertex=1);b.edge&&(f.edge=1);b.connectable||(f.connectable=0);null!=b.parent&&(f.parent=b.parent.getId());null!=e&&(f.previous=e.getId());null!=b.source&&(f.source=b.source.getId());null!=b.target&&(f.target=b.target.getId());null!=b.style&&(f.style=b.style);null!=b.geometry&&(f.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(f.collapsed=1);b.visible||(f.visible=0);null!=b.value&&("object"===typeof b.value&&"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?f.xmlValue=mxUtils.getXml(b.value):f.value=b.value);for(var c in b)this.cellProperties[c]||"function"===typeof b[c]||(f[c]=b[c]);return f};-EditorUi.prototype.diffCell=function(b,e){function f(q){return null!=q&&"object"===typeof q&&"number"===typeof q.nodeType&&"string"===typeof q.nodeName&&"function"===typeof q.getAttribute}var c={};b.vertex!=e.vertex&&(c.vertex=e.vertex?1:0);b.edge!=e.edge&&(c.edge=e.edge?1:0);b.connectable!=e.connectable&&(c.connectable=e.connectable?1:0);if((null!=b.parent?null==e.parent:null!=e.parent)||null!=b.parent&&null!=e.parent&&b.parent.getId()!=e.parent.getId())c.parent=null!=e.parent?e.parent.getId():"";+EditorUi.prototype.diffCell=function(b,e){function f(p){return null!=p&&"object"===typeof p&&"number"===typeof p.nodeType&&"string"===typeof p.nodeName&&"function"===typeof p.getAttribute}var c={};b.vertex!=e.vertex&&(c.vertex=e.vertex?1:0);b.edge!=e.edge&&(c.edge=e.edge?1:0);b.connectable!=e.connectable&&(c.connectable=e.connectable?1:0);if((null!=b.parent?null==e.parent:null!=e.parent)||null!=b.parent&&null!=e.parent&&b.parent.getId()!=e.parent.getId())c.parent=null!=e.parent?e.parent.getId():"";if((null!=b.source?null==e.source:null!=e.source)||null!=b.source&&null!=e.source&&b.source.getId()!=e.source.getId())c.source=null!=e.source?e.source.getId():"";if((null!=b.target?null==e.target:null!=e.target)||null!=b.target&&null!=e.target&&b.target.getId()!=e.target.getId())c.target=null!=e.target?e.target.getId():"";f(b.value)&&f(e.value)?b.value.isEqualNode(e.value)||(c.xmlValue=mxUtils.getXml(e.value)):b.value!=e.value&&(f(e.value)?c.xmlValue=mxUtils.getXml(e.value):c.value=null!=e.value?-e.value:null);b.style!=e.style&&(c.style=e.style);b.visible!=e.visible&&(c.visible=e.visible?1:0);b.collapsed!=e.collapsed&&(c.collapsed=e.collapsed?1:0);if(!this.isObjectEqual(b.geometry,e.geometry,new mxGeometry)){var k=this.codec.encode(e.geometry);null!=k&&(c.geometry=mxUtils.getXml(k))}for(var p in b)this.cellProperties[p]||"function"===typeof b[p]||"function"===typeof e[p]||b[p]==e[p]||(c[p]=void 0===e[p]?null:e[p]);for(p in e)p in b||this.cellProperties[p]||"function"===typeof b[p]||"function"===-typeof e[p]||b[p]==e[p]||(c[p]=void 0===e[p]?null:e[p]);return c};EditorUi.prototype.resolveCrossReferences=function(b,e){var f={};mxUtils.isEmptyObject(e)||(this.adoptTheirPages(b,e,f),this.adoptTheirCells(b,e,f));EditorUi.debug("EditorUi.resolveCrossReferences",[this],"ownDiff",b,"theirDiff",e,"resolve",f);return f};-EditorUi.prototype.adoptTheirPages=function(b,e,f){var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var k=0;k<e[EditorUi.DIFF_INSERT].length;k++)c[e[EditorUi.DIFF_INSERT][k].id]=e[EditorUi.DIFF_INSERT][k];for(var p in b[EditorUi.DIFF_UPDATE])null!=c[p]&&(null==f[EditorUi.DIFF_INSERT]&&(f[EditorUi.DIFF_INSERT]=[]),null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={}),f[EditorUi.DIFF_INSERT].push(c[p]),f[EditorUi.DIFF_UPDATE][p]=b[EditorUi.DIFF_UPDATE][p],delete b[EditorUi.DIFF_UPDATE][p])};-EditorUi.prototype.adoptTheirCells=function(b,e,f){for(var c in b[EditorUi.DIFF_UPDATE]){var k=b[EditorUi.DIFF_UPDATE][c];null!=k.cells&&this.adoptTheirCellsFromPage(k,e,c,f)}};-EditorUi.prototype.adoptTheirCellsFromPage=function(b,e,f,c){var k=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][f]:null;if(null!=k&&null!=k.cells&&null!=k.cells[EditorUi.DIFF_INSERT]){e=k.cells[EditorUi.DIFF_UPDATE];for(var p={},q=0;q<k.cells[EditorUi.DIFF_INSERT].length;q++){var u=k.cells[EditorUi.DIFF_INSERT][q];p[u.id]=u}k={cells:{}};k.cells[EditorUi.DIFF_INSERT]=[];k.cells[EditorUi.DIFF_UPDATE]={};k.inserted={};this.resolveOwnInsertedCells(b.cells[EditorUi.DIFF_INSERT],p,k);this.resolveOwnUpdatedCells(b.cells[EditorUi.DIFF_UPDATE],-p,e,k);null==c[EditorUi.DIFF_UPDATE]&&(c[EditorUi.DIFF_UPDATE]={});delete k.inserted;c[EditorUi.DIFF_UPDATE][f]=k}};EditorUi.prototype.resolveOwnInsertedCells=function(b,e,f){if(null!=b)for(var c=0;c<b.length;c++){var k=b[c];null!=k&&(this.adoptParentCell(k.id,null,e,f),this.adoptTerminalCell(k.id,k,e,!0,f),this.adoptTerminalCell(k.id,k,e,!1,f))}};-EditorUi.prototype.resolveOwnUpdatedCells=function(b,e,f,c){if(null!=b)for(var k in b){var p=e[k];null!=p?(c.inserted[k]||(c.cells[EditorUi.DIFF_INSERT].push(p),c.inserted[k]=!0),c.cells[EditorUi.DIFF_UPDATE][k]=b[k]):null!=f&&(p=f[k],null!=p&&(this.adoptParentCell(k,p,e,c),this.adoptTerminalCell(k,p,e,!0,c,k),this.adoptTerminalCell(k,p,e,!1,c,k)))}};-EditorUi.prototype.adoptParentCell=function(b,e,f,c){var k=f[b],p=null!=e?e.parent:null!=k?k.parent:null;null!=p&&this.adoptParentCell(p,null,f,c);null!=k?c.inserted[b]||(c.cells[EditorUi.DIFF_INSERT].push(k),c.inserted[b]=!0):null!=e&&(null==c.cells[EditorUi.DIFF_UPDATE][b]&&(c.cells[EditorUi.DIFF_UPDATE][b]={}),c.cells[EditorUi.DIFF_UPDATE][b]=e)};-EditorUi.prototype.adoptTerminalCell=function(b,e,f,c,k){e=c?e.source:e.target;f=f[e];null!=f&&(k.inserted[e]||(k.cells[EditorUi.DIFF_INSERT].push(f),k.inserted[e]=!0),null==k.cells[EditorUi.DIFF_UPDATE][b]&&(k.cells[EditorUi.DIFF_UPDATE][b]={}),k.cells[EditorUi.DIFF_UPDATE][b][c?"source":"target"]=e)};-EditorUi.prototype.isObjectEqual=function(b,e,f){if(null==b&&null==e)return!0;if(null!=b?null==e:null!=e)return!1;var c=function(k,p){return null==f||f[k]!=p?!0===p?1:p:void 0};return JSON.stringify(b,c)==JSON.stringify(e,c)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?+e.value:null);b.style!=e.style&&(c.style=e.style);b.visible!=e.visible&&(c.visible=e.visible?1:0);b.collapsed!=e.collapsed&&(c.collapsed=e.collapsed?1:0);if(!this.isObjectEqual(b.geometry,e.geometry,new mxGeometry)){var l=this.codec.encode(e.geometry);null!=l&&(c.geometry=mxUtils.getXml(l))}for(var n in b)this.cellProperties[n]||"function"===typeof b[n]||"function"===typeof e[n]||b[n]==e[n]||(c[n]=void 0===e[n]?null:e[n]);for(n in e)n in b||this.cellProperties[n]||"function"===typeof b[n]||"function"===+typeof e[n]||b[n]==e[n]||(c[n]=void 0===e[n]?null:e[n]);return c};EditorUi.prototype.resolveCrossReferences=function(b,e){var f={};mxUtils.isEmptyObject(e)||(this.adoptTheirPages(b,e,f),this.adoptTheirCells(b,e,f));EditorUi.debug("EditorUi.resolveCrossReferences",[this],"ownDiff",b,"theirDiff",e,"resolve",f);return f};+EditorUi.prototype.adoptTheirPages=function(b,e,f){var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var l=0;l<e[EditorUi.DIFF_INSERT].length;l++)c[e[EditorUi.DIFF_INSERT][l].id]=e[EditorUi.DIFF_INSERT][l];for(var n in b[EditorUi.DIFF_UPDATE])null!=c[n]&&(null==f[EditorUi.DIFF_INSERT]&&(f[EditorUi.DIFF_INSERT]=[]),null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={}),f[EditorUi.DIFF_INSERT].push(c[n]),f[EditorUi.DIFF_UPDATE][n]=b[EditorUi.DIFF_UPDATE][n],delete b[EditorUi.DIFF_UPDATE][n])};+EditorUi.prototype.adoptTheirCells=function(b,e,f){for(var c in b[EditorUi.DIFF_UPDATE]){var l=b[EditorUi.DIFF_UPDATE][c];null!=l.cells&&this.adoptTheirCellsFromPage(l,e,c,f)}};+EditorUi.prototype.adoptTheirCellsFromPage=function(b,e,f,c){var l=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][f]:null;if(null!=l&&null!=l.cells&&null!=l.cells[EditorUi.DIFF_INSERT]){e=l.cells[EditorUi.DIFF_UPDATE];for(var n={},p=0;p<l.cells[EditorUi.DIFF_INSERT].length;p++){var u=l.cells[EditorUi.DIFF_INSERT][p];n[u.id]=u}l={cells:{}};l.cells[EditorUi.DIFF_INSERT]=[];l.cells[EditorUi.DIFF_UPDATE]={};l.inserted={};this.resolveOwnInsertedCells(b.cells[EditorUi.DIFF_INSERT],n,l);this.resolveOwnUpdatedCells(b.cells[EditorUi.DIFF_UPDATE],+n,e,l);null==c[EditorUi.DIFF_UPDATE]&&(c[EditorUi.DIFF_UPDATE]={});delete l.inserted;c[EditorUi.DIFF_UPDATE][f]=l}};EditorUi.prototype.resolveOwnInsertedCells=function(b,e,f){if(null!=b)for(var c=0;c<b.length;c++){var l=b[c];null!=l&&(this.adoptParentCell(l.id,null,e,f),this.adoptTerminalCell(l.id,l,e,!0,f),this.adoptTerminalCell(l.id,l,e,!1,f))}};+EditorUi.prototype.resolveOwnUpdatedCells=function(b,e,f,c){if(null!=b)for(var l in b){var n=e[l];null!=n?(c.inserted[l]||(c.cells[EditorUi.DIFF_INSERT].push(n),c.inserted[l]=!0),c.cells[EditorUi.DIFF_UPDATE][l]=b[l]):null!=f&&(n=f[l],null!=n&&(this.adoptParentCell(l,n,e,c),this.adoptTerminalCell(l,n,e,!0,c,l),this.adoptTerminalCell(l,n,e,!1,c,l)))}};+EditorUi.prototype.adoptParentCell=function(b,e,f,c){var l=f[b],n=null!=e?e.parent:null!=l?l.parent:null;null!=n&&this.adoptParentCell(n,null,f,c);null!=l?c.inserted[b]||(c.cells[EditorUi.DIFF_INSERT].push(l),c.inserted[b]=!0):null!=e&&(null==c.cells[EditorUi.DIFF_UPDATE][b]&&(c.cells[EditorUi.DIFF_UPDATE][b]={}),c.cells[EditorUi.DIFF_UPDATE][b]=e)};+EditorUi.prototype.adoptTerminalCell=function(b,e,f,c,l){e=c?e.source:e.target;f=f[e];null!=f&&(l.inserted[e]||(l.cells[EditorUi.DIFF_INSERT].push(f),l.inserted[e]=!0),null==l.cells[EditorUi.DIFF_UPDATE][b]&&(l.cells[EditorUi.DIFF_UPDATE][b]={}),l.cells[EditorUi.DIFF_UPDATE][b][c?"source":"target"]=e)};+EditorUi.prototype.isObjectEqual=function(b,e,f){if(null==b&&null==e)return!0;if(null!=b?null==e:null!=e)return!1;var c=function(l,n){return null==f||f[l]!=n?!0===n?1:n:void 0};return JSON.stringify(b,c)==JSON.stringify(e,c)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings())mxSettings.settings.ui=b,mxSettings.save();else{var e=mxSettings.getMainSettings();e.ui=b;localStorage.setItem(".drawio-config",JSON.stringify(e))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b?mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,e){e?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],e=0;e<b.length;e++)"string"===typeof b[e]&&(b[e]={name:b[e],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,b)&&("L.scratchpad"===b?mxSettings.settings.customLibraries.splice(0,@@ -13619,7 +13618,7 @@ null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.setti!1,mxSettings.save()),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFilePolling=function(b,e){this.file=b;this.sync=e};DrawioFilePolling.prototype.maxRetries=2;DrawioFilePolling.prototype.minPollDelay=2E3;DrawioFilePolling.prototype.start=function(b){if(!this.isConnected()){this.delay=this.maxDelay=b;var e=mxUtils.bind(this,function(){this.poll(0,f)}),f=mxUtils.bind(this,function(){this.thread=setTimeout(e,this.delay);this.delay=Math.min(this.maxDelay,this.delay+2E3)});f();EditorUi.debug("DrawioFilePolling.start",[this],"thread",this.thread,"delay",b,"rev",this.file.getCurrentRevisionId())}};DrawioFilePolling.prototype.updateStatus=function(){this.hasOtherWriters()&&(this.sync.lastMessage=mxResources.get("otherUsersEditing"));this.sync.lastModified=this.file.getLastModifiedDate();this.sync.updateStatus()};-DrawioFilePolling.prototype.poll=function(b,e){b=null!=b?b:0;var f=mxUtils.bind(this,function(c){b<this.maxRetries?this.retryPoll(mxUtils.bind(this,function(){this.poll(b+1,e)})):e()});this.file.getLatestVersionId(mxUtils.bind(this,function(c){if(-1!=c){var k=this.file.getCurrentRevisionId();c!=k?this.file.getLatestVersion(mxUtils.bind(this,function(p){this.file.mergeFile(p,mxUtils.bind(this,function(){this.delay=this.minPollDelay;this.lastOtherWriter=Date.now();this.updateStatus();e()}),f)}),f):+DrawioFilePolling.prototype.poll=function(b,e){b=null!=b?b:0;var f=mxUtils.bind(this,function(c){b<this.maxRetries?this.retryPoll(mxUtils.bind(this,function(){this.poll(b+1,e)})):e()});this.file.getLatestVersionId(mxUtils.bind(this,function(c){if(-1!=c){var l=this.file.getCurrentRevisionId();c!=l?this.file.getLatestVersion(mxUtils.bind(this,function(n){this.file.mergeFile(n,mxUtils.bind(this,function(){this.delay=this.minPollDelay;this.lastOtherWriter=Date.now();this.updateStatus();e()}),f)}),f):(this.updateStatus(),e())}else e()}),f)};DrawioFilePolling.prototype.retryPoll=function(b){var e=300+300*Math.random();window.setTimeout(b,e);EditorUi.debug("StorageFile.retryPoll",[this],"delay",e)};DrawioFilePolling.prototype.stop=function(){EditorUi.debug("DrawioFilePolling.stop",[this],"thread",this.thread);clearTimeout(this.thread);this.thread=null};DrawioFilePolling.prototype.isConnected=function(){return null!=this.thread};DrawioFilePolling.prototype.hasOtherWriters=function(){return null!=this.lastOtherWriter&&6E4>Date.now()-this.lastOtherWriter};DrawioFileSync=function(b){mxEventSource.call(this);this.lastActivity=Date.now();this.clientId=Editor.guid();this.ui=b.ui;this.file=b;this.onlineListener=mxUtils.bind(this,function(){this.updateOnlineState();this.isConnected()&&!this.ui.isOffline(!0)?this.fileChangedNotify():this.updateStatus()});mxEvent.addListener(window,"offline",this.onlineListener);mxEvent.addListener(window,"online",this.onlineListener);this.realtimeListener=mxUtils.bind(this,function(){this.updateOnlineState()});this.file.addListener("realtimeStateChanged",this.realtimeListener);this.autosaveListener=mxUtils.bind(this,function(){this.updateRealtime()});this.ui.editor.addListener("autosaveChanged",this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(e){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?@@ -13653,43 +13652,43 @@ DrawioFileSync.prototype.fileChangedNotify=function(b,e){if(this.isValidState())this.notifyThread!=f}),!0,e)};DrawioFileSync.prototype.localFileChanged=function(){this.file.isRealtime()&&(window.clearTimeout(this.triggerSendThread),this.localFileWasChanged=!0,this.scheduleCleanup(!0),this.triggerSendThread=window.setTimeout(mxUtils.bind(this,function(){this.sendLocalChanges()}),Math.min(this.file.autosaveDelay,this.syncSendMessageDelay-20)))};DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var e=this.clientId+"."+this.syncChangeCounter++,f=this.createMessage({a:"change",c:b,id:e,t:Date.now()});e=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(f):"1"==urlParams.dev?(f=encodeURIComponent(this.objectToString(f)),0==this.maxSyncMessageSize||f.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+f):e=!0):e=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],"changes",b,e?"(skipped)":"")}};-DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(k,p){return k.id<p.id?-1:k.id>p.id?1:0});for(var e=null,f=0;f<this.receivedData.length;f++){var c=JSON.stringify(this.receivedData[f].c);c!=e&&this.doReceiveRemoteChanges(this.receivedData[f].c);+DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(l,n){return l.id<n.id?-1:l.id>n.id?1:0});for(var e=null,f=0;f<this.receivedData.length;f++){var c=JSON.stringify(this.receivedData[f].c);c!=e&&this.doReceiveRemoteChanges(this.receivedData[f].c);e=c}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){var e=Math.min(15,Math.floor(this.file.getSize()/5E6));e=0==b?0:this.cleanupDelay+1E3*e;var f=this.cleanupThread;if(1!=b||null!=this.cleanupThread)window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanup(null,mxUtils.bind(this,function(c){this.file.handleFileError(c)}))}),e);EditorUi.debug("DrawioFileSync.scheduleCleanup",[this],"lazy",b,"delay",e,"prev",f,"thread",this.cleanupThread)};-DrawioFileSync.prototype.cleanup=function(b,e,f){var c=this.cleanupThread;window.clearTimeout(this.cleanupThread);this.cleanupThread=null;if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var k=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.cleanup",[this],"thread",c,"patches",k,"checkFile",f,"checksum",this.ui.getHashValueForPages(this.ui.pages));-this.file.ignorePatches(k)||this.file.patch(k);f?this.file.getLatestVersion(mxUtils.bind(this,function(p){try{if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()){var q=p.getShadowPages();k=[this.ui.diffPages(this.ui.pages,q),this.ui.diffPages(q,this.file.ownPages)];this.file.ignorePatches(k)||this.file.patch(k);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",p,"patches",k)}null!=b&&b()}catch(u){null!=e&&e(u)}}),e):(document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||+DrawioFileSync.prototype.cleanup=function(b,e,f){var c=this.cleanupThread;window.clearTimeout(this.cleanupThread);this.cleanupThread=null;if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var l=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.cleanup",[this],"thread",c,"patches",l,"checkFile",f,"checksum",this.ui.getHashValueForPages(this.ui.pages));+this.file.ignorePatches(l)||this.file.patch(l);f?this.file.getLatestVersion(mxUtils.bind(this,function(n){try{if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()){var p=n.getShadowPages();l=[this.ui.diffPages(this.ui.pages,p),this.ui.diffPages(p,this.file.ownPages)];this.file.ignorePatches(l)||this.file.patch(l);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",n,"patches",l)}null!=b&&b()}catch(u){null!=e&&e(u)}}),e):(document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||this.testChecksum(),null!=b&&b())}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",f,"modified",this.file.isModified()))};-DrawioFileSync.prototype.testChecksum=function(){var b=this.ui.getHashValueForPages(this.ui.pages),e=this.file.getCurrentRevisionId();this.file.getLatestVersion(mxUtils.bind(this,function(f){if(!document.hidden){var c=this.ui.getHashValueForPages(f.getShadowPages()),k=f.getDescriptorChecksum(f.getDescriptor()),p=f.getCurrentRevisionId();EditorUi.debug("DrawioFileSync.testChecksum","local",[this.file],"modified",this.file.isModified(),"inConflictState",this.file.inConflictState,"autosaveThread",this.file.autosaveThread,-"savingFile",this.file.savingFile,"localFileWasChanged",this.localFileWasChanged,"remoteFileChanged",this.remoteFileChanged,"cleanup",this.cleanupThread,"checksum",b);EditorUi.debug("DrawioFileSync.testChecksum","remote",[f],"rev",p==e,"desc",k==c,"checksum",c);c!=b?(EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums do not match"),this.ui.alert("Checksums do not match")):EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums match")}}),mxUtils.bind(this,function(f){EditorUi.debug("DrawioFileSync.testChecksum",+DrawioFileSync.prototype.testChecksum=function(){var b=this.ui.getHashValueForPages(this.ui.pages),e=this.file.getCurrentRevisionId();this.file.getLatestVersion(mxUtils.bind(this,function(f){if(!document.hidden){var c=this.ui.getHashValueForPages(f.getShadowPages()),l=f.getDescriptorChecksum(f.getDescriptor()),n=f.getCurrentRevisionId();EditorUi.debug("DrawioFileSync.testChecksum","local",[this.file],"modified",this.file.isModified(),"inConflictState",this.file.inConflictState,"autosaveThread",this.file.autosaveThread,+"savingFile",this.file.savingFile,"localFileWasChanged",this.localFileWasChanged,"remoteFileChanged",this.remoteFileChanged,"cleanup",this.cleanupThread,"checksum",b);EditorUi.debug("DrawioFileSync.testChecksum","remote",[f],"rev",n==e,"desc",l==c,"checksum",c);c!=b?(EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums do not match"),this.ui.alert("Checksums do not match")):EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums match")}}),mxUtils.bind(this,function(f){EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksum test error",f)}))};DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};-DrawioFileSync.prototype.extractRemove=function(b){var e={};null!=b[EditorUi.DIFF_REMOVE]&&(e[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var f in b[EditorUi.DIFF_UPDATE]){var c=b[EditorUi.DIFF_UPDATE][f];if(null!=c.cells&&null!=c.cells[EditorUi.DIFF_REMOVE]){null==e[EditorUi.DIFF_UPDATE]&&(e[EditorUi.DIFF_UPDATE]={});e[EditorUi.DIFF_UPDATE][f]={};var k=e[EditorUi.DIFF_UPDATE][f];k.cells={};k.cells[EditorUi.DIFF_REMOVE]=c.cells[EditorUi.DIFF_REMOVE]}}return e};-DrawioFileSync.prototype.patchRealtime=function(b,e,f,c){var k=null;if(this.file.isRealtime()){k=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var p=this.extractRemove(this.extractLocal(k)),q=(null==f?b:b.concat(f)).concat([p]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,q,!0,e);mxUtils.isEmptyObject(p)?this.scheduleCleanup(null!=c?!1:null):this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",e,"own",f,-"all",k,"local",p,"applied",q,"immediate",c)}return k};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};+DrawioFileSync.prototype.extractRemove=function(b){var e={};null!=b[EditorUi.DIFF_REMOVE]&&(e[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var f in b[EditorUi.DIFF_UPDATE]){var c=b[EditorUi.DIFF_UPDATE][f];if(null!=c.cells&&null!=c.cells[EditorUi.DIFF_REMOVE]){null==e[EditorUi.DIFF_UPDATE]&&(e[EditorUi.DIFF_UPDATE]={});e[EditorUi.DIFF_UPDATE][f]={};var l=e[EditorUi.DIFF_UPDATE][f];l.cells={};l.cells[EditorUi.DIFF_REMOVE]=c.cells[EditorUi.DIFF_REMOVE]}}return e};+DrawioFileSync.prototype.patchRealtime=function(b,e,f,c){var l=null;if(this.file.isRealtime()){l=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var n=this.extractRemove(this.extractLocal(l)),p=(null==f?b:b.concat(f)).concat([n]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,p,!0,e);mxUtils.isEmptyObject(n)?this.scheduleCleanup(null!=c?!1:null):this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",e,"own",f,+"all",l,"local",n,"applied",p,"immediate",c)}return l};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),e=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,e,!0);this.snapshot=b;var f=this.ui.resolveCrossReferences(e,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.isRealtimeActive()&&this.doSendLocalChanges([f,e])}this.localFileWasChanged=!1}catch(c){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),b,c)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};-DrawioFileSync.prototype.merge=function(b,e,f,c,k,p,q){try{this.file.stats.merged++;this.lastModified=new Date;var u=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var E=this.ui.clonePages(this.file.getShadowPages()),H=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(E,this.ui.pages):null,D=this.file.isRealtime()?this.ui.diffPages(E,this.file.ownPages):null;E=this.ui.applyPatches(E,b);var L=null==e?null:this.ui.getHashValueForPages(E);-EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",H,"pending",D,"checksum",e,"current",L,"valid",e==L,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",u,"etag",this.file.getDescriptorEtag(f),"immediate",q);if(null!=e&&e!=L){this.reload(mxUtils.bind(this,function(){null!=c&&c()}),mxUtils.bind(this,function(){null!=k&&k()}),p,null,q);return}this.file.setShadowPages(E);null==this.patchRealtime(b,null,D,q)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?-H:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);null!=c&&c(!0)}catch(g){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=k&&k(g);try{var G=this.file.getCurrentUser(),d=null!=G?G.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),d,g)}catch(m){}}};-DrawioFileSync.prototype.fileChanged=function(b,e,f,c,k){var p=window.setTimeout(mxUtils.bind(this,function(){null!=f&&f()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"immediate",k,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(q){null!=f&&f()||(this.isValidState()?this.catchup(q,b,e,f,k):null!=e&&e())}),e)):null!=e&&e())}),c?this.cacheReadyDelay:0);return this.notifyThread=-p};+DrawioFileSync.prototype.merge=function(b,e,f,c,l,n,p){try{this.file.stats.merged++;this.lastModified=new Date;var u=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var G=this.ui.clonePages(this.file.getShadowPages()),H=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(G,this.ui.pages):null,F=this.file.isRealtime()?this.ui.diffPages(G,this.file.ownPages):null;G=this.ui.applyPatches(G,b);var K=null==e?null:this.ui.getHashValueForPages(G);+EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",H,"pending",F,"checksum",e,"current",K,"valid",e==K,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",u,"etag",this.file.getDescriptorEtag(f),"immediate",p);if(null!=e&&e!=K){this.reload(mxUtils.bind(this,function(){null!=c&&c()}),mxUtils.bind(this,function(){null!=l&&l()}),n,null,p);return}this.file.setShadowPages(G);null==this.patchRealtime(b,null,F,p)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?+H:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);null!=c&&c(!0)}catch(k){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=l&&l(k);try{var d=this.file.getCurrentUser(),g=null!=d?d.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),g,k)}catch(v){}}};+DrawioFileSync.prototype.fileChanged=function(b,e,f,c,l){var n=window.setTimeout(mxUtils.bind(this,function(){null!=f&&f()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"immediate",l,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(p){null!=f&&f()||(this.isValidState()?this.catchup(p,b,e,f,l):null!=e&&e())}),e)):null!=e&&e())}),c?this.cacheReadyDelay:0);return this.notifyThread=+n};DrawioFileSync.prototype.fastForward=function(b){this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.setShadowPages(this.ui.clonePages(this.ui.pages));this.file.theirPages=this.ui.clonePages(this.ui.pages);var e=this.file.ownPages;this.file.ownPages=this.ui.clonePages(this.ui.pages);for(var f=0;f<this.file.ownPages.length;f++)null!=e[f]&&this.ui.getHashValueForPages([this.file.ownPages[f]])!=this.ui.getHashValueForPages([e[f]])&&(this.file.ownPages[f].needsUpdate=!0);e=this.cleanupThread;window.clearTimeout(this.cleanupThread);this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fastForward",[this],"desc",[b],"cleanup",e,"checksum",this.ui.getHashValueForPages(this.ui.pages));document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum()};DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};-DrawioFileSync.prototype.catchup=function(b,e,f,c,k){if(null!=b&&(null==c||!c())){var p=this.file.getCurrentRevisionId(),q=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",p,"to",q,"immediate",k,"valid",this.isValidState());if(p==q)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),-document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=e&&e(!0);else if(this.isValidState()){var u=this.file.getDescriptorChecksum(b),E=this.file.getDescriptorSecret(b);if(null!=u&&u==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=e&&e(!0);else if(Editor.enableRealtimeCache&&null!=E&&"1"!=urlParams.lockdown){var H=0,D=!1,L=mxUtils.bind(this,function(){if(null==c||!c())if(p!=this.file.getCurrentRevisionId())null!=e&&-e(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var G=!0,d=window.setTimeout(mxUtils.bind(this,function(){G=!1;this.reload(e,f,c,null,k)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(p)+"&to="+encodeURIComponent(q)+(null!=E?"&secret="+encodeURIComponent(E):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(d);if(G&&(null==c||!c()))if(p!=this.file.getCurrentRevisionId())null!=-e&&e(!0);else if(this.isValidState()){var m=null,t=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[g],"status",g.getStatus(),"cacheReadyRetryCount",H,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var v=JSON.parse(g.getText());if(null!=v&&0<v.length)for(var y=0;y<v.length;y++){var C=this.stringToObject(v[y]);if(C.v>DrawioFileSync.PROTOCOL){D=!0;t=[];break}else if(C.v===DrawioFileSync.PROTOCOL&&null!=C.d)m=C.d.checksum,-t.push(C.d.patch);else{D=!0;t=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[v],"status",D?"failed":"ok","temp",t,"checksum",m)}catch(I){t=[],null!=window.console&&"1"==urlParams.test&&console.log(I)}try{0<t.length?(this.file.stats.cacheHits++,this.merge(t,m,b,e,f,c,k)):H<=this.maxCacheReadyRetries-1&&!D&&401!=g.getStatus()&&503!=g.getStatus()&&410!=g.getStatus()?(H++,this.file.stats.cacheMiss++,window.setTimeout(L,(H+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,-this.reload(e,f,c,null,k))}catch(I){null!=f&&f(I)}}else null!=f&&f()}),f)}else null!=f&&f()});window.setTimeout(L,this.cacheReadyDelay)}else this.reload(e,f,c,null,k)}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,e,f,c,k){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",k);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(p){null!=e&&e(p)}),f,c,k)};+DrawioFileSync.prototype.catchup=function(b,e,f,c,l){if(null!=b&&(null==c||!c())){var n=this.file.getCurrentRevisionId(),p=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",n,"to",p,"immediate",l,"valid",this.isValidState());if(n==p)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),+document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=e&&e(!0);else if(this.isValidState()){var u=this.file.getDescriptorChecksum(b),G=this.file.getDescriptorSecret(b);if(null!=u&&u==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=e&&e(!0);else if(Editor.enableRealtimeCache&&null!=G&&"1"!=urlParams.lockdown){var H=0,F=!1,K=mxUtils.bind(this,function(){if(null==c||!c())if(n!=this.file.getCurrentRevisionId())null!=e&&+e(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;this.reload(e,f,c,null,l)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(n)+"&to="+encodeURIComponent(p)+(null!=G?"&secret="+encodeURIComponent(G):""),mxUtils.bind(this,function(k){this.file.stats.bytesReceived+=k.getText().length;window.clearTimeout(g);if(d&&(null==c||!c()))if(n!=this.file.getCurrentRevisionId())null!=+e&&e(!0);else if(this.isValidState()){var v=null,t=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[k],"status",k.getStatus(),"cacheReadyRetryCount",H,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=k.getStatus()&&299>=k.getStatus()&&0<k.getText().length)try{var x=JSON.parse(k.getText());if(null!=x&&0<x.length)for(var A=0;A<x.length;A++){var J=this.stringToObject(x[A]);if(J.v>DrawioFileSync.PROTOCOL){F=!0;t=[];break}else if(J.v===DrawioFileSync.PROTOCOL&&null!=J.d)v=J.d.checksum,+t.push(J.d.patch);else{F=!0;t=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[x],"status",F?"failed":"ok","temp",t,"checksum",v)}catch(D){t=[],null!=window.console&&"1"==urlParams.test&&console.log(D)}try{0<t.length?(this.file.stats.cacheHits++,this.merge(t,v,b,e,f,c,l)):H<=this.maxCacheReadyRetries-1&&!F&&401!=k.getStatus()&&503!=k.getStatus()&&410!=k.getStatus()?(H++,this.file.stats.cacheMiss++,window.setTimeout(K,(H+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,+this.reload(e,f,c,null,l))}catch(D){null!=f&&f(D)}}else null!=f&&f()}),f)}else null!=f&&f()});window.setTimeout(K,this.cacheReadyDelay)}else this.reload(e,f,c,null,l)}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,e,f,c,l){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",l);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(n){null!=e&&e(n)}),f,c,l)};DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),f=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(f)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",f)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};-DrawioFileSync.prototype.createToken=function(b,e,f){var c=!0,k=window.setTimeout(mxUtils.bind(this,function(){c=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(p){window.clearTimeout(k);c&&(200<=p.getStatus()&&299>=p.getStatus()?e(p.getText()):f({code:p.getStatus(),message:"Token Error "+p.getStatus()}))}),f)};+DrawioFileSync.prototype.createToken=function(b,e,f){var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(n){window.clearTimeout(l);c&&(200<=n.getStatus()&&299>=n.getStatus()?e(n.getText()):f({code:n.getStatus(),message:"Token Error "+n.getStatus()}))}),f)};DrawioFileSync.prototype.fileSaving=function(){this.file.isOptimisticSync()&&this.notify(this.createMessage({m:Date.now(),type:"optimistic"}));EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};-DrawioFileSync.prototype.fileSaved=function(b,e,f,c,k,p){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var q=this.file.getDescriptorSecret(this.file.getDescriptor()),u=this.createMessage({m:this.lastModified.getTime()}),E=this.file.getDescriptorRevisionId(e),H=this.file.getCurrentRevisionId();if(null!=q&&null!=k&&-"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var D=this.ui.diffPages(this.file.getShadowPages(),b);e=this.file.getDescriptorSecret(e);p=null!=p?p:this.ui.getHashValueForPages(b);var L=this.objectToString(this.createMessage({patch:D,checksum:p}));this.file.stats.bytesSent+=L.length;this.file.stats.msgSent++;var G=!0,d=window.setTimeout(mxUtils.bind(this,function(){G=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+-"&from="+encodeURIComponent(E)+"&to="+encodeURIComponent(H)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(u)))+(null!=q?"&secret="+encodeURIComponent(q):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(L.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(L):"")+(null!=k?"&token="+encodeURIComponent(k):""),mxUtils.bind(this,function(g){window.clearTimeout(d);G&&(200<=g.getStatus()&&299>=g.getStatus()?(Editor.p2pSyncNotify&&this.notify(u),null!=f&&f()):c({message:mxResources.get("realtimeCollaboration")+-(0!=g.getStatus()?": "+g.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",E,"to",H,"etag",this.file.getCurrentEtag(),"diff",D,L.length,"bytes","checksum",p)}else this.notify(u),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",E,"to",H,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};+DrawioFileSync.prototype.fileSaved=function(b,e,f,c,l,n){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var p=this.file.getDescriptorSecret(this.file.getDescriptor()),u=this.createMessage({m:this.lastModified.getTime()}),G=this.file.getDescriptorRevisionId(e),H=this.file.getCurrentRevisionId();if(null!=p&&null!=l&&+"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var F=this.ui.diffPages(this.file.getShadowPages(),b);e=this.file.getDescriptorSecret(e);n=null!=n?n:this.ui.getHashValueForPages(b);var K=this.objectToString(this.createMessage({patch:F,checksum:n}));this.file.stats.bytesSent+=K.length;this.file.stats.msgSent++;var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()++"&from="+encodeURIComponent(G)+"&to="+encodeURIComponent(H)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(u)))+(null!=p?"&secret="+encodeURIComponent(p):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(K.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(K):"")+(null!=l?"&token="+encodeURIComponent(l):""),mxUtils.bind(this,function(k){window.clearTimeout(g);d&&(200<=k.getStatus()&&299>=k.getStatus()?(Editor.p2pSyncNotify&&this.notify(u),null!=f&&f()):c({message:mxResources.get("realtimeCollaboration")++(0!=k.getStatus()?": "+k.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",G,"to",H,"etag",this.file.getCurrentEtag(),"diff",F,K.length,"bytes","checksum",n)}else this.notify(u),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",G,"to",H,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};DrawioFileSync.prototype.fileConflict=function(b,e,f){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,e,f):this.fileChanged(e,f)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};DrawioFileSync.prototype.stop=function(){null!=this.pusher?(null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null),EditorUi.debug("DrawioFileSync.stop",[this])):null!=this.polling&&(this.polling.stop(),@@ -13698,374 +13697,374 @@ DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&null!=this.collaboratorsElement.parentNode&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];function mxAsyncCanvas(b){mxAbstractCanvas2D.call(this);this.htmlCanvas=b;b.images=b.images||[];b.subCanvas=b.subCanvas||[]}mxUtils.extend(mxAsyncCanvas,mxAbstractCanvas2D);mxAsyncCanvas.prototype.htmlCanvas=null;mxAsyncCanvas.prototype.canvasIndex=0;mxAsyncCanvas.prototype.waitCounter=0;mxAsyncCanvas.prototype.onComplete=null;mxAsyncCanvas.prototype.incWaitCounter=function(){this.waitCounter++};-mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(b,e,f,c,k){};+mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(b,e,f,c,l){};mxAsyncCanvas.prototype.setAlpha=function(b){this.state.alpha=b};mxAsyncCanvas.prototype.setFontColor=function(b){this.state.fontColor=b};mxAsyncCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxAsyncCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxAsyncCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};-mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,e,f,c){};mxAsyncCanvas.prototype.roundrect=function(b,e,f,c,k,p){};mxAsyncCanvas.prototype.ellipse=function(b,e,f,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};-mxAsyncCanvas.prototype.image=function(b,e,f,c,k,p,q,u){k=this.rewriteImageSource(k);b=this.htmlCanvas.images[k];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[k]=b,b.src=k)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};-mxAsyncCanvas.prototype.text=function(b,e,f,c,k,p,q,u,E,H,D,L){if(null!=k&&0!=k.length&&(b=this.state.scale,"html"==E&&"function"===typeof html2canvas)){this.incWaitCounter();var G=this.canvasIndex++;html2canvas(k,{onrendered:mxUtils.bind(this,function(d){this.htmlCanvas.subCanvas[G]=d;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;-mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,f,c,k){return f+f+c+c+k+k});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};+mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,e,f,c){};mxAsyncCanvas.prototype.roundrect=function(b,e,f,c,l,n){};mxAsyncCanvas.prototype.ellipse=function(b,e,f,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};+mxAsyncCanvas.prototype.image=function(b,e,f,c,l,n,p,u){l=this.rewriteImageSource(l);b=this.htmlCanvas.images[l];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[l]=b,b.src=l)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};+mxAsyncCanvas.prototype.text=function(b,e,f,c,l,n,p,u,G,H,F,K){if(null!=l&&0!=l.length&&(b=this.state.scale,"html"==G&&"function"===typeof html2canvas)){this.incWaitCounter();var d=this.canvasIndex++;html2canvas(l,{onrendered:mxUtils.bind(this,function(g){this.htmlCanvas.subCanvas[d]=g;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;+mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,f,c,l){return f+f+c+c+l+l});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(b){this.state.scale*=b;this.state.strokeWidth*=b;this.ctx.scale(b,b)};mxJsCanvas.prototype.translate=function(b,e){this.state.dx+=b;this.state.dy+=e;this.ctx.translate(b,e)};-mxJsCanvas.prototype.rotate=function(b,e,f,c,k){c-=this.state.dx;k-=this.state.dy;this.ctx.translate(c,k);(e||f)&&this.ctx.scale(e?-1:1,f?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-k)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};-mxJsCanvas.prototype.setGradient=function(b,e,f,c,k,p,q,u,E){f=this.ctx.createLinearGradient(0,c,0,c+p);c=this.state;c.fillColor=b;c.fillAlpha=null!=u?u:1;c.gradientColor=e;c.gradientAlpha=null!=E?E:1;c.gradientDirection=q;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&f.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&f.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=f};+mxJsCanvas.prototype.rotate=function(b,e,f,c,l){c-=this.state.dx;l-=this.state.dy;this.ctx.translate(c,l);(e||f)&&this.ctx.scale(e?-1:1,f?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-l)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};+mxJsCanvas.prototype.setGradient=function(b,e,f,c,l,n,p,u,G){f=this.ctx.createLinearGradient(0,c,0,c+n);c=this.state;c.fillColor=b;c.fillAlpha=null!=u?u:1;c.gradientColor=e;c.gradientAlpha=null!=G?G:1;c.gradientDirection=p;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&f.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&f.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=f};mxJsCanvas.prototype.setStrokeColor=function(b){null!=b&&(b==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=b,this.state.strokeColor=b))};mxJsCanvas.prototype.setStrokeWidth=function(b){this.ctx.lineWidth=b};mxJsCanvas.prototype.setDashed=function(b){if(this.state.dashed=b){b=this.state.dashPattern.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.setLineDash(b)}else this.setLineDash([0])};mxJsCanvas.prototype.setLineDash=function(b){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(b)}catch(e){}};mxJsCanvas.prototype.setDashPattern=function(b){this.state.dashPattern=b;if(this.state.dashed){b=b.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.ctx.setLineDash(b)}};mxJsCanvas.prototype.setLineCap=function(b){this.ctx.lineCap=b};mxJsCanvas.prototype.setLineJoin=function(b){this.ctx.lineJoin=b};mxJsCanvas.prototype.setMiterLimit=function(b){this.ctx.lineJoin=b};mxJsCanvas.prototype.setFontColor=function(b){this.ctx.fillStyle=b};mxJsCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxJsCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxJsCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};mxJsCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxJsCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxJsCanvas.prototype.setShadow=function(b){(this.state.shadow=b)?(this.setShadowOffset(this.state.shadowDx,this.state.shadowDy),this.setShadowAlpha(this.state.shadowAlpha)):(this.ctx.shadowColor="transparent",this.ctx.shadowBlur=0,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0)};mxJsCanvas.prototype.setShadowColor=function(b){if(null==b||b==mxConstants.NONE)b=null,this.ctx.shadowColor="transparent";this.state.shadowColor=b;if(this.state.shadow&&null!=b){var e=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;b=this.hexToRgb(b);this.ctx.shadowColor="rgba("+b.r+","+b.g+","+b.b+","+e+")"}};mxJsCanvas.prototype.setShadowAlpha=function(b){this.state.shadowAlpha=b;this.setShadowColor(this.state.shadowColor)};mxJsCanvas.prototype.setShadowOffset=function(b,e){this.state.shadowDx=b;this.state.shadowDy=e;this.state.shadow&&(this.ctx.shadowOffsetX=b,this.ctx.shadowOffsetY=e)};mxJsCanvas.prototype.moveTo=function(b,e){this.ctx.moveTo(b,e);this.lastMoveX=b;this.lastMoveY=e};mxJsCanvas.prototype.lineTo=function(b,e){this.ctx.lineTo(b,e);this.lastMoveX=b;this.lastMoveY=e};mxJsCanvas.prototype.quadTo=function(b,e,f,c){this.ctx.quadraticCurveTo(b,e,f,c);this.lastMoveX=f;this.lastMoveY=c};-mxJsCanvas.prototype.arcTo=function(b,e,f,c,k,p,q){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,e,f,c,k,p,q);if(null!=b)for(e=0;e<b.length;e+=6)this.curveTo(b[e],b[e+1],b[e+2],b[e+3],b[e+4],b[e+5])};mxJsCanvas.prototype.curveTo=function(b,e,f,c,k,p){this.ctx.bezierCurveTo(b,e,f,c,k,p);this.lastMoveX=k;this.lastMoveY=p};mxJsCanvas.prototype.rect=function(b,e,f,c){this.begin();this.moveTo(b,e);this.lineTo(b+f,e);this.lineTo(b+f,e+c);this.lineTo(b,e+c);this.close()};-mxJsCanvas.prototype.roundrect=function(b,e,f,c,k,p){this.begin();this.moveTo(b+k,e);this.lineTo(b+f-k,e);this.quadTo(b+f,e,b+f,e+p);this.lineTo(b+f,e+c-p);this.quadTo(b+f,e+c,b+f-k,e+c);this.lineTo(b+k,e+c);this.quadTo(b,e+c,b,e+c-p);this.lineTo(b,e+p);this.quadTo(b,e,b+k,e)};mxJsCanvas.prototype.ellipse=function(b,e,f,c){this.ctx.save();this.ctx.translate(b+f/2,e+c/2);this.ctx.scale(f/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};+mxJsCanvas.prototype.arcTo=function(b,e,f,c,l,n,p){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,e,f,c,l,n,p);if(null!=b)for(e=0;e<b.length;e+=6)this.curveTo(b[e],b[e+1],b[e+2],b[e+3],b[e+4],b[e+5])};mxJsCanvas.prototype.curveTo=function(b,e,f,c,l,n){this.ctx.bezierCurveTo(b,e,f,c,l,n);this.lastMoveX=l;this.lastMoveY=n};mxJsCanvas.prototype.rect=function(b,e,f,c){this.begin();this.moveTo(b,e);this.lineTo(b+f,e);this.lineTo(b+f,e+c);this.lineTo(b,e+c);this.close()};+mxJsCanvas.prototype.roundrect=function(b,e,f,c,l,n){this.begin();this.moveTo(b+l,e);this.lineTo(b+f-l,e);this.quadTo(b+f,e,b+f,e+n);this.lineTo(b+f,e+c-n);this.quadTo(b+f,e+c,b+f-l,e+c);this.lineTo(b+l,e+c);this.quadTo(b,e+c,b,e+c-n);this.lineTo(b,e+n);this.quadTo(b,e,b+l,e)};mxJsCanvas.prototype.ellipse=function(b,e,f,c){this.ctx.save();this.ctx.translate(b+f/2,e+c/2);this.ctx.scale(f/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};mxJsCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};-mxJsCanvas.prototype.image=function(b,e,f,c,k,p,q,u){k=this.rewriteImageSource(k);k=this.images[k];if(null!=k&&0<k.height&&0<k.width){var E=this.ctx;E.save();if(p){p=k.width;var H=k.height,D=Math.min(f/p,c/H);b+=(f-p*D)/2;e+=(c-H*D)/2;f=p*D;c=H*D}q&&(E.translate(2*b+f,0),E.scale(-1,1));u&&(E.translate(0,2*e+c),E.scale(1,-1));E.drawImage(k,b,e,f,c);E.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};+mxJsCanvas.prototype.image=function(b,e,f,c,l,n,p,u){l=this.rewriteImageSource(l);l=this.images[l];if(null!=l&&0<l.height&&0<l.width){var G=this.ctx;G.save();if(n){n=l.width;var H=l.height,F=Math.min(f/n,c/H);b+=(f-n*F)/2;e+=(c-H*F)/2;f=n*F;c=H*F}p&&(G.translate(2*b+f,0),G.scale(-1,1));u&&(G.translate(0,2*e+c),G.scale(1,-1));G.drawImage(l,b,e,f,c);G.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,e=this.ctx.shadowOffsetX,f=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=e;this.ctx.shadowOffsetY=f}else this.ctx.fill(),this.ctx.stroke()};-mxJsCanvas.prototype.text=function(b,e,f,c,k,p,q,u,E,H,D,L){if(null!=k&&0!=k.length){f=this.state.scale;0!=L&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(L*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==E){k=this.subCanvas[this.canvasIndex++];E=k.height;L=k.width;switch(q){case mxConstants.ALIGN_MIDDLE:e-=E/2/f;break;case mxConstants.ALIGN_BOTTOM:e-=E/f}switch(p){case mxConstants.ALIGN_CENTER:b-=L/2/f;break;case mxConstants.ALIGN_RIGHT:b-=L/f}this.ctx.save();-if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(k.width/f),Math.round(k.height/f))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(k.width/f),Math.round(k.height/f)));this.ctx.scale(1/f,1/f);this.ctx.drawImage(k,-Math.round(b*f),Math.round(e*f))}else{this.ctx.save();this.updateFont();L=document.createElement("div");L.innerHTML=k;L.style.position="absolute";L.style.top="-9999px";L.style.left="-9999px";L.style.fontFamily=this.state.fontFamily;L.style.fontWeight="bold";L.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(L);E=[L.offsetWidth,L.offsetHeight];document.body.removeChild(L);k=k.split("\n");L=E[1];this.ctx.textBaseline="top";E=e;switch(q){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=-"middle";e-=(k.length-1)*L/2;E=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=L*(k.length-1),E=e-this.state.fontSize}q=[];L=[];for(f=0;f<k.length;f++)L[f]=b,q[f]=this.ctx.measureText(k[f]).width,null!=p&&p!=mxConstants.ALIGN_LEFT&&(L[f]-=q[f],p==mxConstants.ALIGN_CENTER&&(L[f]+=q[f]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=L[0];p=q[0];for(f=1;f<k.length;f++)b=Math.min(b,L[f]),p=Math.max(p,q[f]);this.ctx.save();-b=Math.round(b)-.5;E=Math.round(E)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,E,p,this.state.fontSize*mxConstants.LINE_HEIGHT*k.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,E,p,this.state.fontSize*mxConstants.LINE_HEIGHT*k.length));this.ctx.restore()}for(f=0;f<k.length;f++)this.ctx.fillText(k[f],L[f],e),e+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};+mxJsCanvas.prototype.text=function(b,e,f,c,l,n,p,u,G,H,F,K){if(null!=l&&0!=l.length){f=this.state.scale;0!=K&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(K*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==G){l=this.subCanvas[this.canvasIndex++];G=l.height;K=l.width;switch(p){case mxConstants.ALIGN_MIDDLE:e-=G/2/f;break;case mxConstants.ALIGN_BOTTOM:e-=G/f}switch(n){case mxConstants.ALIGN_CENTER:b-=K/2/f;break;case mxConstants.ALIGN_RIGHT:b-=K/f}this.ctx.save();+if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(l.width/f),Math.round(l.height/f))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(l.width/f),Math.round(l.height/f)));this.ctx.scale(1/f,1/f);this.ctx.drawImage(l,+Math.round(b*f),Math.round(e*f))}else{this.ctx.save();this.updateFont();K=document.createElement("div");K.innerHTML=l;K.style.position="absolute";K.style.top="-9999px";K.style.left="-9999px";K.style.fontFamily=this.state.fontFamily;K.style.fontWeight="bold";K.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(K);G=[K.offsetWidth,K.offsetHeight];document.body.removeChild(K);l=l.split("\n");K=G[1];this.ctx.textBaseline="top";G=e;switch(p){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=+"middle";e-=(l.length-1)*K/2;G=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=K*(l.length-1),G=e-this.state.fontSize}p=[];K=[];for(f=0;f<l.length;f++)K[f]=b,p[f]=this.ctx.measureText(l[f]).width,null!=n&&n!=mxConstants.ALIGN_LEFT&&(K[f]-=p[f],n==mxConstants.ALIGN_CENTER&&(K[f]+=p[f]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=K[0];n=p[0];for(f=1;f<l.length;f++)b=Math.min(b,K[f]),n=Math.max(n,p[f]);this.ctx.save();+b=Math.round(b)-.5;G=Math.round(G)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,G,n,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,G,n,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));this.ctx.restore()}for(f=0;f<l.length;f++)this.ctx.fillText(l[f],K[f],e),e+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};DrawioClient=function(b,e){mxEventSource.call(this);this.ui=b;this.cookieName=e;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(b){this.user=b;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName),sessionStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+b.toUTCString()}};DrawioClient.prototype.getPersistentToken=function(b){var e=null;isLocalStorage&&(e=localStorage.getItem("."+this.cookieName),null==e&&b&&(e=sessionStorage.getItem("."+this.cookieName)));if(null==e&&"undefined"!=typeof Storage){var f=document.cookie;b=this.cookieName+"=";var c=f.indexOf(b);0<=c&&(c+=b.length,e=f.indexOf(";",c),0>e?e=f.length:postCookie=f.substring(e),e=f.substring(c,e),e=0<e.length?e:null,null!=e&&isLocalStorage&&(f=new Date,f.setYear(f.getFullYear()-1),document.cookie=b+"; expires="+-f.toUTCString(),localStorage.setItem("."+this.cookieName,e)))}return e};DrawioClient.prototype.setPersistentToken=function(b,e){try{if(null!=b)if(isLocalStorage)e?sessionStorage.setItem("."+this.cookieName,b):localStorage.setItem("."+this.cookieName,b);else{if("undefined"!=typeof Storage){var f=new Date;f.setYear(f.getFullYear()+10);var c=this.cookieName+"="+b+"; path=/"+(e?"":"; expires="+f.toUTCString());"https"==document.location.protocol.toLowerCase()&&(c+=";secure");document.cookie=c}}else this.clearPersistentToken()}catch(k){this.ui.handleError(k)}};DrawioUser=function(b,e,f,c,k){this.id=b;this.email=e;this.displayName=f;this.pictureUrl=c;this.locale=k};DriveFile=function(b,e,f){DrawioFile.call(this,b,e);this.desc=f};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT||null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};+f.toUTCString(),localStorage.setItem("."+this.cookieName,e)))}return e};DrawioClient.prototype.setPersistentToken=function(b,e){try{if(null!=b)if(isLocalStorage)e?sessionStorage.setItem("."+this.cookieName,b):localStorage.setItem("."+this.cookieName,b);else{if("undefined"!=typeof Storage){var f=new Date;f.setYear(f.getFullYear()+10);var c=this.cookieName+"="+b+"; path=/"+(e?"":"; expires="+f.toUTCString());"https"==document.location.protocol.toLowerCase()&&(c+=";secure");document.cookie=c}}else this.clearPersistentToken()}catch(l){this.ui.handleError(l)}};DrawioUser=function(b,e,f,c,l){this.id=b;this.email=e;this.displayName=f;this.pictureUrl=c;this.locale=l};DriveFile=function(b,e,f){DrawioFile.call(this,b,e);this.desc=f};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT||null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};DriveFile.prototype.isConflict=function(b){return null!=b&&null!=b.error&&412==b.error.code};DriveFile.prototype.getCurrentUser=function(){return null!=this.ui.drive?this.ui.drive.user:null};DriveFile.prototype.getMode=function(){return App.MODE_GOOGLE};DriveFile.prototype.getFileUrl=function(){return"https://drive.google.com/open?authuser=0&id="+this.getId()};DriveFile.prototype.getFolderUrl=function(){return null!=this.desc.labels&&this.desc.labels.trashed?"https://drive.google.com/drive/trash":null!=this.desc.parents&&0<this.desc.parents.length?"https://drive.google.com/drive/folders/"+this.desc.parents[0].id:null};DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(e){if(null!=e&&null!=e.items)for(var f=0;f<e.items.length;f++)if("anyoneWithLink"===e.items[f].id||"anyone"===e.items[f].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};-DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,e,f,c,k){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,e,f,c,k)}),f,c,k])};-DriveFile.prototype.saveFile=function(b,e,f,c,k,p){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(q,u){var E=mxUtils.bind(this,function(H,D){try{var L=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,D,mxUtils.bind(this,function(G,d,g,m){try{this.savingFile=!1,0!=G?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),-this.autosaveDelay=Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=G,this.fileSaved(d,L,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(G)}),c,u,g,m)):null!=c&&c(G)}catch(t){if(this.savingFile=!1,null!=c)c(t);else throw t;}}),mxUtils.bind(this,function(G,d){try{this.savingFile=!1,this.isConflict(G)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(d,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,-function(){this.updateFileData();this.setShadowModified(!1);E(H,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(G)}catch(g){if(this.savingFile=!1,null!=c)c(g);else throw g;}}),k,k,H,null,q)}catch(G){if(this.savingFile=!1,null!=c)c(G);else throw G;}});E(p,e)}))):null!=f&&f()}catch(q){if(null!=c)c(q);else throw q;}};+DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,e,f,c,l){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,e,f,c,l)}),f,c,l])};+DriveFile.prototype.saveFile=function(b,e,f,c,l,n){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(p,u){var G=mxUtils.bind(this,function(H,F){try{var K=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,F,mxUtils.bind(this,function(d,g,k,v){try{this.savingFile=!1,0!=d?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),+this.autosaveDelay=Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=d,this.fileSaved(g,K,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(d)}),c,u,k,v)):null!=c&&c(d)}catch(t){if(this.savingFile=!1,null!=c)c(t);else throw t;}}),mxUtils.bind(this,function(d,g){try{this.savingFile=!1,this.isConflict(d)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(g,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,+function(){this.updateFileData();this.setShadowModified(!1);G(H,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(d)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}}),l,l,H,null,p)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}});G(n,e)}))):null!=f&&f()}catch(p){if(null!=c)c(p);else throw p;}};DriveFile.prototype.copyFile=function(b,e){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,b,e)}catch(f){e(f)}}),e,!0)};DriveFile.prototype.makeCopy=function(b,e,f){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,f),mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))};DriveFile.prototype.saveAs=function(b,e,f){this.ui.drive.copyFile(this.getId(),b,e,f)};-DriveFile.prototype.rename=function(b,e,f){var c=this.getCurrentRevisionId();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(k){this.hasSameExtension(b,this.getTitle())?(this.desc=k,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(k)):(this.desc=k,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,f))}),f)};+DriveFile.prototype.rename=function(b,e,f){var c=this.getCurrentRevisionId();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.desc=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(l)):(this.desc=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,f))}),f)};DriveFile.prototype.move=function(b,e,f){this.ui.drive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.desc=c;this.descriptorChanged();null!=e&&e(c)}),f)};DriveFile.prototype.share=function(){this.ui.drive.showPermissions(this.getId(),this)};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};DriveFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&this.desc.editable};DriveFile.prototype.isSyncSupported=function(){return!0};DriveFile.prototype.isRealtimeSupported=function(){return!0};DriveFile.prototype.isRealtimeOptional=function(){return null!=this.sync&&this.sync.isConnected()};DriveFile.prototype.setRealtimeEnabled=function(b,e,f){null!=this.sync?this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/properties?alt=json&supportsAllDrives=true",method:"POST",contentType:"application/json; charset=UTF-8",params:{key:"collaboration",value:b?"enabled":"0"!=urlParams["fast-sync"]?"disabled":""}},mxUtils.bind(this,function(){this.loadDescriptor(mxUtils.bind(this,function(c){null!=c?(this.sync.descriptorChanged(this.getCurrentEtag()),this.sync.updateDescriptor(c),e()):f()}),f)}),f):f()};DriveFile.prototype.isRealtimeEnabled=function(){var b=this.ui.drive.getCustomProperty(this.desc,"collaboration");return DrawioFile.prototype.isRealtimeEnabled.apply(this,arguments)&&"disabled"!=b||Editor.enableRealtime&&"enabled"==b};DriveFile.prototype.isRevisionHistorySupported=function(){return!0};-DriveFile.prototype.getRevisions=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(f){for(var c=0;c<f.items.length;c++)mxUtils.bind(this,function(k){k.title=k.originalFilename;k.getXml=mxUtils.bind(this,function(p,q){this.ui.drive.getXmlFile(k,mxUtils.bind(this,function(u){p(u.getData())}),q)});k.getUrl=mxUtils.bind(this,function(p){return this.ui.getUrl(window.location.pathname+"?rev="+k.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=-p?"&page="+p:""))+window.location.hash})})(f.items[c]);b(f.items)}),e)};DriveFile.prototype.getLatestVersion=function(b,e){this.ui.drive.getFile(this.getId(),b,e,!0)};DriveFile.prototype.getChannelId=function(){var b=this.ui.drive.getCustomProperty(this.desc,"channel");null!=b&&(b="G-"+this.getId()+"."+b);return b};DriveFile.prototype.getChannelKey=function(){return this.ui.drive.getCustomProperty(this.desc,"key")};DriveFile.prototype.getLastModifiedDate=function(){return new Date(this.desc.modifiedDate)};+DriveFile.prototype.getRevisions=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(f){for(var c=0;c<f.items.length;c++)mxUtils.bind(this,function(l){l.title=l.originalFilename;l.getXml=mxUtils.bind(this,function(n,p){this.ui.drive.getXmlFile(l,mxUtils.bind(this,function(u){n(u.getData())}),p)});l.getUrl=mxUtils.bind(this,function(n){return this.ui.getUrl(window.location.pathname+"?rev="+l.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=+n?"&page="+n:""))+window.location.hash})})(f.items[c]);b(f.items)}),e)};DriveFile.prototype.getLatestVersion=function(b,e){this.ui.drive.getFile(this.getId(),b,e,!0)};DriveFile.prototype.getChannelId=function(){var b=this.ui.drive.getCustomProperty(this.desc,"channel");null!=b&&(b="G-"+this.getId()+"."+b);return b};DriveFile.prototype.getChannelKey=function(){return this.ui.drive.getCustomProperty(this.desc,"key")};DriveFile.prototype.getLastModifiedDate=function(){return new Date(this.desc.modifiedDate)};DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototype.setDescriptor=function(b){this.desc=b};DriveFile.prototype.getDescriptorChecksum=function(b){var e=this.ui.drive.getCustomProperty(b,"checksum");b=this.getDescriptorSecret(b);var f=null;null!=e&&null!=b&&(tokens=e.split(":"),2==tokens.length&&tokens[0]==b&&(f=tokens[1]));return f};DriveFile.prototype.getDescriptorSecret=function(b){return this.ui.drive.getCustomProperty(b,"secret")};DriveFile.prototype.setDescriptorRevisionId=function(b,e){b.headRevisionId=e};DriveFile.prototype.getDescriptorRevisionId=function(b){return b.headRevisionId};DriveFile.prototype.getDescriptorEtag=function(b){return b.etag};DriveFile.prototype.setDescriptorEtag=function(b,e){b.etag=e};DriveFile.prototype.loadPatchDescriptor=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(f){b(f)}),e)};DriveFile.prototype.patchDescriptor=function(b,e){b.headRevisionId=e.headRevisionId;b.modifiedDate=e.modifiedDate;DrawioFile.prototype.patchDescriptor.apply(this,arguments)};DriveFile.prototype.loadDescriptor=function(b,e){this.ui.drive.loadDescriptor(this.getId(),b,e)};DriveFile.prototype.commentsSupported=function(){return!0};-DriveFile.prototype.getComments=function(b,e){function f(k,p,q){if(p.deleted)return null;q=new DriveComment(k,p.commentId||p.replyId,p.content,p.modifiedDate,p.createdDate,"resolved"==p.status,p.author.isAuthenticatedUser?c:new DrawioUser(p.author.permissionId,p.author.emailAddress,p.author.displayName,p.author.picture.url),q);for(var u=0;null!=p.replies&&u<p.replies.length;u++)q.addReplyDirect(f(k,p.replies[u],p.commentId));return q}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+-this.getId()+"/comments"},mxUtils.bind(this,function(k){for(var p=[],q=0;q<k.items.length;q++){var u=f(this,k.items[q]);null!=u&&p.push(u)}b(p)}),e)};DriveFile.prototype.addComment=function(b,e,f){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(c){e(c.commentId)}),f)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};+DriveFile.prototype.getComments=function(b,e){function f(l,n,p){if(n.deleted)return null;p=new DriveComment(l,n.commentId||n.replyId,n.content,n.modifiedDate,n.createdDate,"resolved"==n.status,n.author.isAuthenticatedUser?c:new DrawioUser(n.author.permissionId,n.author.emailAddress,n.author.displayName,n.author.picture.url),p);for(var u=0;null!=n.replies&&u<n.replies.length;u++)p.addReplyDirect(f(l,n.replies[u],n.commentId));return p}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"++this.getId()+"/comments"},mxUtils.bind(this,function(l){for(var n=[],p=0;p<l.items.length;p++){var u=f(this,l.items[p]);null!=u&&n.push(u)}b(n)}),e)};DriveFile.prototype.addComment=function(b,e,f){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(c){e(c.commentId)}),f)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};DriveFile.prototype.newComment=function(b,e){return new DriveComment(this,null,b,Date.now(),Date.now(),!1,e)};DriveLibrary=function(b,e,f){DriveFile.call(this,b,e,f)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(b,e,f){this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(c){this.desc=c;null!=e&&e(c)}),f)};DriveLibrary.prototype.open=function(){};(function(){var b=null,e={};window.DriveClient=function(f,c){null==c&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(c=!0);mxEventSource.call(this);DrawioClient.call(this,f,"gDriveAuthInfo");this.isExtAuth=c;this.ui=f;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt&&"1"!=urlParams.extAuth&&(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken());this.appId=window.DRAWIO_GOOGLE_APP_ID||"671128082532";this.clientId=window.DRAWIO_GOOGLE_CLIENT_ID||"671128082532-jhphbq6d0e1gnsus9mn7vf8a6fjn10mp.apps.googleusercontent.com";this.mimeTypes=this.xmlMimeType+",application/mxe,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy";f=JSON.parse(this.token);null!=f&&null!=f.current&&(this.userId=f.current.userId,this.authCalled=!1)};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);DriveClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2";DriveClient.prototype.scopes=["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/userinfo.profile"];DriveClient.prototype.allFields="kind,id,parents,headRevisionId,etag,title,mimeType,modifiedDate,editable,copyable,canComment,labels,properties,downloadUrl,webContentLink,userPermission,fileSize";DriveClient.prototype.catchupFields="etag,headRevisionId,modifiedDate,properties(key,value)";DriveClient.prototype.enableThumbnails=!0;DriveClient.prototype.thumbnailWidth=1E3;DriveClient.prototype.maxThumbnailSize=2E6;DriveClient.prototype.placeholderThumbnail="iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAACN1BMVEXwhwXvhgX4iwXzhwXgbQzvhgXhbAzocgzqcwzldAoAAADhbgvjcQnmdgrlbgDwhgXsfwXufgjwhgXwgQfziAXxgADibgz4iwX4jAX3iwTpcwr1igXoewjsfgj3igX4iwXqcQv4jAX3iwXtfQnndQrvhAbibArwhwXgbQz//////v39jwX6jQX+/v7fagHfawzdVQDwhADgbhPgbhXwhwPocQ3uvKvwiA/faQDscgzxiAT97+XgciTgcSP6jAXgbQ3gcCHwiRfpcQzwhwfeXQD77ef74NLvhgTvegD66uPgbAf66+TvfADwjCzgcCfwiSD67ObhcjjwiBHhczvwiyrgbxj///777ujgcSHgcB/xiRzgbhveWgDeVwDhdEDgbRDqfgffYgDfXwD97+bvfQDxiz7//vvwiRr118rrcgztggbfZgDfZAD++PT98+3gbBPsgAb99vD33tPgcB7icAvuhAX//Pn66N/00sTyy7vuuqbjekLwhwzkcgr88er449n++vfutp/kh1vgcBvhbwvmdwnwgwDwgADeWQD87eLxxrTssJjqpIf0roHmjWTkhFP759n63czvvanomnjnlHDhczD22cr4y6/wwa/3xKX2wJ3rqpH0tY7qp4vpnoDymlbjf0vxjjntcwzldAroegj/kgX12s7518PzqnnnkWfynmLieUjpewjrdAD40Lj1uZTzpm3idTbiciLydQzzfwnyiQTsfgD3xqnzp3TxlkzgbCrdTwDdSwBLKUlNAAAAJ3RSTlP8/b2X/YH8wb+FAIuIggJbQin5opAM9+a/ubaubyD78NjSyr2WgRp4sjN4AAAI70lEQVR42u2cZ38SQRDGT8WGvfde4E4BxVMRRaKiUURRlJhQRDCCSgQVO/bee++9994+nMt5ywoezFJd/fm8uITi3p9n5mbYkcCpO6rVnVu2YEXd+3dRIySuo7pLv4GjGNKg7j3UHTl1l14PajmG9OFBnx7Ird4PumpYEtf1QXc112l0M7OGKXEfeg3guo3iNIyJG92Jaz61mYYxcaNacs1H/8f6j6X5j1WI/mMVIsawRFEzI49SjwOqAJa43emclk8Rp2c7AFZ+LDGyvXE2kmO2Q1Lq17RSd6ND48QIwFVuLNHTOPbEpTOz8ujMpccHGz0AV5mxIo4TpwUeUPj0YwfAVVYs0Tn7VZjnBUA8v+n6CyfERY8FR/DEJj7MQ6oL85vOvfDUAsuVC8s19s5yXuAppOPnvPk4EeSCsehCeBVTwVzHfE6RcFUQa4an8Qw91kpbw2oz4aoc1sSxniO0WAI/J24wriabmEpizZtM79bc+fr4/tUarEpiLabGElJYRsOGjbJfjGDpJCxtmosRLOEnVpqLESzZLYlLg65H1rAkLo2GESwcROwXI1jELcS1Y6OGQSzEVaupZQJLDiLhYtCtFBcbbslYhOueqKllDwtzwVhTq4RFuBh0C3EdEBl0C3OBWNUrEISLvSD+5GLQLYmLoSqfwcUiFuaqzhYDxiJc981lxqqdVsCGbHPcQLBgrtK3rwLt9tWqhblKxxI9hW3267U5ZHhuBrCKzXl4NIJTS5FrmbmMWGIEDZIouOp0/O6boYQ2jxBXWcdu13fzRILuF/2Ku+aGr96uBbhALHo5Z38+XcfXyVRZVx/+Ed513ldDCCCu0rFE0Xlo2mu5TAj8ki0XV0q6ePHilhi+d/15b9ACQGGusg3AFzc+XSMBCPzu89+CNlnB7zfD8t1z4iaLXUvDVT6sGdMOnv5pi47f6r9Qk9YF3xZ0l8S11UfMArlgLMpZM6bamYy6rWnta9q7TrZrzZPgPgoqg3atubY8WK6D8lQXHfb4p/wSK7vFfxmxSsAPQ96AlZ4LxoLNeompdkUDGQVznL5mLr4ar5ESD3PBWHA9fbpbjlT4pq1Bm6H6w9dwfOd69ePouNDYt3S3ULPGZ96S3YqtAW/Tepz1E8bgAANc+xEXhAX36ut1cslcd6rJq81SIvgEe7lmL3kY5iqxVYvOI9isswp22KeMOcrriJlWai5giwHl+yec73Ma9Mbfz+qOJndKz6hLpR5V1uPxavFuTTt0K1XfpbNeO0wKeUaR2IPBN5sMRlqu1eY8bsFmPeIFUpi0CjIGTLvSZY2EGeYSi3VL9Dgeb0I+SQl9MlcZT4TObZKzfmfS5NZSx1GsLQ5r+8Sxp7ERR/1TtDlUn2qNuGXCrZGM5URlLDiEVzDVkje5fdjXdDsm27XpXChBz4XG0UpYcDOMYaxjGc3wtyJxFtu1PohaI71f2K2imqEONcN4nrMZ9TWbMf81wg9z3VNwC26Gr3enY4ObobLqbccFefuz5AKONpVfzQp2y3NoVvrN32GLNl9orA22lTiM+Nqg5CJY1DueOjkwsdtNgAP7gidR2SWVhFqt3o9QwoKHIuiwDcwX+xT/UWztSlvCaqXGmtQBY1GadQmfh6anuE0XlkhhRFs3tGGkd+tuIVhiJN0M+brj0mlAu46lX0bcbizVLbgZrgwl4JhYA+NQa9TJQUetsSJYHscJvAVct7eJKoUbQudxPYmdirqzsYsIojhjoitD01yadH287J+vpZF1/uGt2K4ttinjshQo2C2XMzI2U64X6WY4tyZq99a7wZS3eA3BpNyrUPn1x00Z0uM1ACzilOfg7EN3VmRo8dN16WYYerYw6G9qCOSDCjQ0jQkufRbalt65LVyapaA/2mClxhK3Rxy3rsyavDxDR/DL5sMLFiyYu/7sXps7z8VldPv2Xl6PnjlTwOOuJQuytH7CXpvXCOQWoZrYeHWd4nw2Q+v22OLGnFSG0Nk1PCi0xjgjpVvTGi8hht9F+ARBGq8dtXmtOSLoDm1FhUSHnihkTecESalHkPAaWVhtFbA8jqvQGBmbt8fWkKtNn0Xw9GvAWK6DX9bBVHjzqtyvvcG9a+jXyC5oKoKV/a4YFG7Yij2ofszlgtaA3ZoRwW+pIOH3w0qZFURNh3oNtKsDsAr9LNvMC0pj93H6hTPpX9ocg8FIgTVvcgFYC03jFLBMi6ix0MDAoi8/lh7Cgt2q0VfNrSX0ayhjTa2IW0tKdotNrMq4NbPkILKZW+xdiSoGgshogfh7Ul7FcIEoFevfrPLC3+XWf6y/CEvHZoFQqlts9sQigqjLxFpQCJauakFcsqhKPXH79rGb6bE2B5Qmu0b91zn0WJtN8Wys9tgtIqfjEf2SWw7XKI8gHuKQ0X0eDsQSI44TaGBN6dYN5dlI/eFj9I7f8GWtoUJYOIgkiq6Ds/gw5T7dZDUqTrfscbLbB9eIB7JmEKsUgiii/4uO8ToBfJlhfif5tEGWEsGTMT4Mr6HDa0BBlP5Y88lcnkdkCtLhnyjMM0+Gcn2WzW6xnd/J8zn+LZq4SUeEvUBaA8LCs6Tk1p1AetXt3JoMWexWZSyr3RK6vSUGrRHbmkRUVgCLpP1HW/L4tgl5tO140mdKKFFhrkTUdxta4xleA8DCXC6n/vCYvPJFa9zAWL4m6qNaA8IiqjW73lreWnJrSj0AJYFZpvwq6RZRzjVUGEtB5tX7DdoqCXaL+PXHuEjdYsuvVqva4Sqv6NdabdW4YLeIKsoFYzHGhYPIGBd2izGuVpPaSVgAV7VEsOQgsuUXdosxLuwWxLVMW0WRK5ExLiiIpN4vq2YYVTiIbPmFgii5xRiXimCBqmIcVSS3WMqvdMqz5VcKqzdKeca4UrnVT/ryR6bi2Opuf64TwYJlfl4FLqu2Zxeux5BRXZnisvZ8103NqTtzoziuGa24+wZVRdVK9W7wyNSX1nYeOmrU6JSmjp6KhH5BR+kGvk++Ld0c/X66rPH4SEQeGl+kpq8a33eAumPqK347durWpzm9hrWhUevi1Hd4ZzVC+gGMHY0TYnDOYwAAAABJRU5ErkJggg==".replace(/\+/g,"-").replace(/\//g,"_");DriveClient.prototype.placeholderMimeType="image/png";DriveClient.prototype.libraryMimeType="application/vnd.jgraph.mxlibrary";DriveClient.prototype.newAppHostname="app.diagrams.net";DriveClient.prototype.extension=".drawio";DriveClient.prototype.tokenRefreshInterval=0;DriveClient.prototype.lastTokenRefresh=0;DriveClient.prototype.maxRetries=5;DriveClient.prototype.staleEtagMaxRetries=4;DriveClient.prototype.coolOff=1E3;DriveClient.prototype.mimeTypeCheckCoolOff=6E4;DriveClient.prototype.user=null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirectUrl=null;DriveClient.prototype.setUser=function(f){this.user=f;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=f.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(f){this.userId=f;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=-function(){return this.user};DriveClient.prototype.getUsersList=function(){var f=[],c=JSON.parse(this.getPersistentToken(!0)),k=null;if(null!=c){null!=c.current&&(k=c.current.userId,f.push(c[k].user),f[0].isCurrent=!0);for(var p in c)"current"!=p&&p!=k&&f.push(c[p].user)}return f};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();-this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(k){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(p,q){this.authorize(!1,mxUtils.bind(this,function(){null!=q&&q();f()}),mxUtils.bind(this,function(u){var E=null!=u.message?u.message:mxResources.get("cannotLogin");null!=u&&null!=u.error&&403==u.error.code&&null!=u.error.data&&0<u.error.data.length&&"domainPolicy"==u.error.data[0].reason&&(E=u.error.message);this.logout();this.ui.showError(mxResources.get("error"),-E,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),p)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,k){try{var p=!0,q=null,u=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var E=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=q&&window.clearTimeout(q);q=window.setTimeout(mxUtils.bind(this,-function(){p=!1;null!=k&&k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:E})}),this.ui.timeout);var H=null,D=!1;"string"===typeof f.params?H=f.params:null!=f.params&&(H=JSON.stringify(f.params),D=!0);var L=f.fullUrl||this.GDriveBaseUrl+f.url;D&&(L+=(0<L.indexOf("?")?"&":"?")+"alt=json");var G=new mxXmlRequest(L,H,f.method||"GET");G.setRequestHeaders=mxUtils.bind(this,function(d,g){if(null!=f.headers)for(var m in f.headers)d.setRequestHeader(m,f.headers[m]);else null!=f.contentType?-d.setRequestHeader("Content-Type",f.contentType):D&&d.setRequestHeader("Content-Type","application/json");d.setRequestHeader("Authorization","Bearer "+b)});G.send(mxUtils.bind(this,function(d){try{if(window.clearTimeout(q),p){try{var g=JSON.parse(d.getText())}catch(v){g=null}if(200<=d.getStatus()&&299>=d.getStatus())null!=c&&c(g);else{var m=null!=g&&null!=g.error?null!=g.error.data?g.error.data:g.error.errors:null,t=null!=m&&0<m.length?m[0].reason:null;null==k||null==g||null==g.error||-1!=g.error.code&&-(403!=g.error.code||"domainPolicy"!=t&&"The requested mime type change is forbidden."!=g.error.message)?null!=g&&null!=g.error&&(401==g.error.code||403==g.error.code&&"rateLimitExceeded"!=t)?403==g.error.code&&this.retryAuth||401==g.error.code&&this.retryAuth&&"authError"==t?(null!=k&&k(g),this.retryAuth=!1):(this.retryAuth=!0,this.execute(E)):null!=g&&null!=g.error&&412!=g.error.code&&404!=g.error.code&&400!=g.error.code&&this.currentRequest==f&&u<this.maxRetries?(u++,this.requestThread=window.setTimeout(E,-Math.round(Math.pow(2,u)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=k&&k(g):k(g)}}}catch(v){if(null!=k)k(v);else throw v;}}))}catch(d){if(null!=k)k(d);else throw d;}});null!=b&&this.authCalled?E():this.execute(E)}catch(H){if(null!=k)k(H);else throw H;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};-DriveClient.prototype.authorize=function(f,c,k,p,q){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(u){this.updateAuthInfo(u,!0,!0,c,k)}),k):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(u){200<=u.getStatus()&&299>=u.getStatus()?this.authorizeStep2(u.getText(),f,c,k,p,q):null!=k&&k(u)}),k)};DriveClient.prototype.updateAuthInfo=function(f,c,k,p,q){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in);-f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(k||null==this.user){var u=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var E=JSON.parse(u);this.setPersistentToken(E,!c);null!=p&&p()}),q)}else null!=p&&(this.setPersistentToken(f,!c),p())};DriveClient.prototype.authorizeStep2=function(f,c,k,p,q,u){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var E=-JSON.parse(this.getPersistentToken(!0));E&&null!=E.current&&(this.userId=E.current.userId)}if(c&&null==this.userId)null!=p&&p();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(D){try{if(200<=D.getStatus()&&299>=D.getStatus()){var L=JSON.parse(D.getText());this.updateAuthInfo(L,!0,!1,k,p)}else 0!=D.getStatus()&&this.logout(),null!=p&&p(D)}catch(G){if(null!=-window.console&&console.log("DriveClient.authorizeStep2",G),null!=p)p(G);else throw G;}}),p);else{var H="https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(q?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f+(this.sameWinRedirectUrl?-"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(H),u=null):null==u?u=this.createAuthWin(H):u.location=H;null!=u?(window.onGoogleDriveCallback=mxUtils.bind(this,function(D,L){window.onGoogleDriveCallback=null;try{null==D?null!=p&&p({message:mxResources.get("accessDenied")}):this.updateAuthInfo(D,q,!0,k,p)}catch(G){null!=p&&p(G)}finally{null!=L&&L.close()}}),u.focus()):null!=p&&p({message:mxResources.get("allowPopups")})}}catch(D){if(null!=p)p(D);else throw D;+function(){return this.user};DriveClient.prototype.getUsersList=function(){var f=[],c=JSON.parse(this.getPersistentToken(!0)),l=null;if(null!=c){null!=c.current&&(l=c.current.userId,f.push(c[l].user),f[0].isCurrent=!0);for(var n in c)"current"!=n&&n!=l&&f.push(c[n].user)}return f};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();+this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(l){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(n,p){this.authorize(!1,mxUtils.bind(this,function(){null!=p&&p();f()}),mxUtils.bind(this,function(u){var G=null!=u.message?u.message:mxResources.get("cannotLogin");null!=u&&null!=u.error&&403==u.error.code&&null!=u.error.data&&0<u.error.data.length&&"domainPolicy"==u.error.data[0].reason&&(G=u.error.message);this.logout();this.ui.showError(mxResources.get("error"),+G,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),n)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,l){try{var n=!0,p=null,u=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var G=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=p&&window.clearTimeout(p);p=window.setTimeout(mxUtils.bind(this,+function(){n=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:G})}),this.ui.timeout);var H=null,F=!1;"string"===typeof f.params?H=f.params:null!=f.params&&(H=JSON.stringify(f.params),F=!0);var K=f.fullUrl||this.GDriveBaseUrl+f.url;F&&(K+=(0<K.indexOf("?")?"&":"?")+"alt=json");var d=new mxXmlRequest(K,H,f.method||"GET");d.setRequestHeaders=mxUtils.bind(this,function(g,k){if(null!=f.headers)for(var v in f.headers)g.setRequestHeader(v,f.headers[v]);else null!=f.contentType?+g.setRequestHeader("Content-Type",f.contentType):F&&g.setRequestHeader("Content-Type","application/json");g.setRequestHeader("Authorization","Bearer "+b)});d.send(mxUtils.bind(this,function(g){try{if(window.clearTimeout(p),n){try{var k=JSON.parse(g.getText())}catch(x){k=null}if(200<=g.getStatus()&&299>=g.getStatus())null!=c&&c(k);else{var v=null!=k&&null!=k.error?null!=k.error.data?k.error.data:k.error.errors:null,t=null!=v&&0<v.length?v[0].reason:null;null==l||null==k||null==k.error||-1!=k.error.code&&+(403!=k.error.code||"domainPolicy"!=t&&"The requested mime type change is forbidden."!=k.error.message)?null!=k&&null!=k.error&&(401==k.error.code||403==k.error.code&&"rateLimitExceeded"!=t)?403==k.error.code&&this.retryAuth||401==k.error.code&&this.retryAuth&&"authError"==t?(null!=l&&l(k),this.retryAuth=!1):(this.retryAuth=!0,this.execute(G)):null!=k&&null!=k.error&&412!=k.error.code&&404!=k.error.code&&400!=k.error.code&&this.currentRequest==f&&u<this.maxRetries?(u++,this.requestThread=window.setTimeout(G,+Math.round(Math.pow(2,u)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(k):l(k)}}}catch(x){if(null!=l)l(x);else throw x;}}))}catch(g){if(null!=l)l(g);else throw g;}});null!=b&&this.authCalled?G():this.execute(G)}catch(H){if(null!=l)l(H);else throw H;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};+DriveClient.prototype.authorize=function(f,c,l,n,p){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(u){this.updateAuthInfo(u,!0,!0,c,l)}),l):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(u){200<=u.getStatus()&&299>=u.getStatus()?this.authorizeStep2(u.getText(),f,c,l,n,p):null!=l&&l(u)}),l)};DriveClient.prototype.updateAuthInfo=function(f,c,l,n,p){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in);+f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(l||null==this.user){var u=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var G=JSON.parse(u);this.setPersistentToken(G,!c);null!=n&&n()}),p)}else null!=n&&(this.setPersistentToken(f,!c),n())};DriveClient.prototype.authorizeStep2=function(f,c,l,n,p,u){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var G=+JSON.parse(this.getPersistentToken(!0));G&&null!=G.current&&(this.userId=G.current.userId)}if(c&&null==this.userId)null!=n&&n();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(F){try{if(200<=F.getStatus()&&299>=F.getStatus()){var K=JSON.parse(F.getText());this.updateAuthInfo(K,!0,!1,l,n)}else 0!=F.getStatus()&&this.logout(),null!=n&&n(F)}catch(d){if(null!=+window.console&&console.log("DriveClient.authorizeStep2",d),null!=n)n(d);else throw d;}}),n);else{var H="https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(p?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f+(this.sameWinRedirectUrl?+"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(H),u=null):null==u?u=this.createAuthWin(H):u.location=H;null!=u?(window.onGoogleDriveCallback=mxUtils.bind(this,function(F,K){window.onGoogleDriveCallback=null;try{null==F?null!=n&&n({message:mxResources.get("accessDenied")}):this.updateAuthInfo(F,p,!0,l,n)}catch(d){null!=n&&n(d)}finally{null!=K&&K.close()}}),u.focus()):null!=n&&n({message:mxResources.get("allowPopups")})}}catch(F){if(null!=n)n(F);else throw F;}};DriveClient.prototype.resetTokenRefresh=function(f){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);null!=f&&null==f.error&&0<f.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(f.expires_in),this.lastTokenRefresh=Date.now(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*f.expires_in))};DriveClient.prototype.checkToken=function(f){var c=-0<this.lastTokenRefresh;Date.now()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){f();c&&this.fireEvent(new mxEventObject("disconnected"))})):f()};DriveClient.prototype.updateUser=function(f,c){try{var k={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(p){try{var q=JSON.parse(p);this.executeRequest({url:"/about"},mxUtils.bind(this,function(u){var E=-mxResources.get("notAvailable"),H=E,D=null;null!=u&&null!=u.user&&(E=u.user.emailAddress,H=u.user.displayName,D=null!=u.user.picture?u.user.picture.url:null);this.setUser(new DrawioUser(q.id,E,H,D,q.locale));this.userId=q.id;null!=f&&f()}),c)}catch(u){null!=c&&c(u)}}),c,null,null,null,null,k)}catch(p){if(null!=c)c(p);else throw p;}};DriveClient.prototype.copyFile=function(f,c,k,p){null!=f&&null!=c&&this.executeRequest({url:"/files/"+f+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",-method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},k,p)};DriveClient.prototype.renameFile=function(f,c,k,p){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{title:c}),k,p)};DriveClient.prototype.moveFile=function(f,c,k,p){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{parents:[{kind:"drive#fileLink",id:c}]}),k,p)};DriveClient.prototype.createDriveRequest=function(f,c){return{url:"/files/"+f+"?uploadType=multipart&supportsAllDrives=true",-method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(f,c,k){return this.getFile(f,c,k,!0,!0)};DriveClient.prototype.loadDescriptor=function(f,c,k,p){this.executeRequest({url:"/files/"+f+"?supportsAllDrives=true&fields="+(null!=p?p:this.allFields)},c,k)};DriveClient.prototype.listFiles=function(f,c,k,p,q){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+-"') "+(f?" and (title contains '"+f+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(k?" and ('me' in owners)":""))+"&orderBy=modifiedDate desc,title"},p,q)};DriveClient.prototype.getCustomProperty=function(f,c){f=f.properties;var k=null;if(null!=f)for(var p=0;p<f.length;p++)if(f[p].key==c){k=f[p].value;break}return k};DriveClient.prototype.getFile=function(f,c,k,p,q){p=null!=p?p:!1;q=null!=q?q:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+f+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},-mxUtils.bind(this,function(u){u.title=u.originalFilename;u.headRevisionId=u.id;u.id=f;this.getXmlFile(u,c,k)}),k):this.loadDescriptor(f,mxUtils.bind(this,function(u){try{if(null!=this.user){var E=/\.png$/i.test(u.title);/\.v(dx|sdx?)$/i.test(u.title)||/\.gliffy$/i.test(u.title)||!this.ui.useCanvasForExport&&E?this.ui.convertFile(u.downloadUrl,u.title,u.mimeType,this.extension,c,k,null,{Authorization:"Bearer "+b}):p||q||u.mimeType==this.libraryMimeType||u.mimeType==this.xmlMimeType?this.getXmlFile(u,-c,k,!0,q):this.getXmlFile(u,c,k)}else k({message:mxResources.get("loggedOut")})}catch(H){if(null!=k)k(H);else throw H;}}),k)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,k,p,q){try{var u={Authorization:"Bearer "+b},E=f.downloadUrl;if(null==E)null!=k&&k({message:mxResources.get("exportOptionsDisabledDetails")});else{var H=0,D=mxUtils.bind(this,function(){this.ui.editor.loadUrl(E,-mxUtils.bind(this,function(L){try{if(null==L)k({message:mxResources.get("invalidOrMissingFile")});else if(f.mimeType==this.libraryMimeType||q)f.mimeType!=this.libraryMimeType||q?c(new DriveLibrary(this.ui,L,f)):k({message:mxResources.get("notADiagramFile")});else{var G=!1;if(/\.png$/i.test(f.title)){var d=L.lastIndexOf(",");if(0<d){var g=this.ui.extractGraphModelFromPng(L);if(null!=g&&0<g.length)L=g;else try{g=L.substring(d+1);var m=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(g):-atob(g),t=this.ui.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0);null==t||0<t.getElementsByTagName("parsererror").length?G=!0:L=m}catch(v){G=!0}}}else/\.pdf$/i.test(f.title)?(g=Editor.extractGraphModelFromPdf(L),null!=g&&0<g.length&&(G=!0,L=g)):"data:image/png;base64,PG14ZmlsZS"==L.substring(0,32)&&(m=L.substring(22),L=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(L,E)?this.ui.parseFileData(L,mxUtils.bind(this,-function(v){try{4==v.readyState&&(200<=v.status&&299>=v.status?c(new LocalFile(this.ui,v.responseText,f.title+this.extension,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}catch(y){if(null!=k)k(y);else throw y;}}),f.title):c(G?new LocalFile(this.ui,L,f.title,!0):new DriveFile(this.ui,L,f))}}catch(v){if(null!=k)k(v);else throw v;}}),mxUtils.bind(this,function(L,G){if(H<this.maxRetries&&null!=G&&403==G.getStatus())H++,window.setTimeout(D,2*H*this.coolOff*(1+.1*(Math.random()-.5)));-else if(null!=k)k(L);else throw L;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,u)});D()}}catch(L){if(null!=k)k(L);else throw L;}};DriveClient.prototype.saveFile=function(f,c,k,p,q,u,E,H,D){try{var L=0;f.saveLevel=1;var G=mxUtils.bind(this,function(U){if(null!=p)p(U);else throw U;}),d=mxUtils.bind(this,function(U){G(U);try{EditorUi.logError(U.message,null,-null,null,U)}catch(P){}});if(f.isEditable()&&null!=f.desc){var g=Date.now(),m=f.desc.etag,t=f.desc.modifiedDate,v=f.desc.headRevisionId,y=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());u=null!=u?u:!1;var C=null,I=!1,K={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(K.mimeType))K.mimeType=this.xmlMimeType,C=f.desc,I=c=!0;else if("application/octet-stream"==K.mimeType||"1"==urlParams["override-mime"]&&K.mimeType!=this.xmlMimeType)K.mimeType=this.xmlMimeType;-var J=mxUtils.bind(this,function(U,P,R){try{f.saveLevel=3;var n=f.getData(),z=null,A=null;f.constructor==DriveFile&&(null==H&&(H=[]),null==f.getChannelId()&&H.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&H.push({key:"key",value:Editor.guid(32)}),D=null!=D?D:Editor.guid(32),H.push({key:"secret",value:D}),A=this.ui.getPagesForXml(n),z=this.ui.getHashValueForPages(A),H.push({key:"checksum",value:D+":"+z}));R||(null!=U||u||(U=this.placeholderThumbnail,P=this.placeholderMimeType),-null!=U&&null!=P&&(K.thumbnail={image:U,mimeType:P}));var B=mxUtils.bind(this,function(l){try{if(f.saveDelay=Date.now()-g,f.saveLevel=null,k(l,n,A,z),null!=C){this.executeRequest({url:"/files/"+C.id+"/revisions/"+C.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(x){x.pinned=!0;this.executeRequest({url:"/files/"+C.id+"/revisions/"+C.headRevisionId,method:"PUT",params:x})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+-C.id+"."+C.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(x){}}}catch(x){d(x)}}),M=mxUtils.bind(this,function(l,x){f.saveLevel=4;try{null!=H&&(K.properties=H);var F=E||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:f.getCurrentEtag(),N=mxUtils.bind(this,function(V){f.saveLevel=5;try{var T=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&-f.desc.mimeType!=this.libraryMimeType,W=!0,X=null;try{X=window.setTimeout(mxUtils.bind(this,function(){W=!1;G({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Y){}this.executeRequest(this.createUploadRequest(f.getId(),K,l,c||V||T,x,V?null:F,I),mxUtils.bind(this,function(Y){window.clearTimeout(X);if(W){var Z=null!=Y?(new Date(Y.modifiedDate)).getTime()-(new Date(t)).getTime():0;if(0>=Z||m==Y.etag||c&&v==Y.headRevisionId){var aa=[];null==Y?aa.push("Empty response"):(0>=Z&&aa.push("Invalid modified time"),-m==Y.etag&&aa.push("Stale etag"),c&&v==Y.headRevisionId&&aa.push("Stale revision"),F=Y.etag);0==aa.length&&aa.push(mxResources.get("unknownError"));Z=aa.join(", ");if(L<this.staleEtagMaxRetries)L++,aa=Math.round(Math.pow(2,L)*this.coolOff*(1+.1*(Math.random()-.5))),window.setTimeout(N,aa),"1"==urlParams.test&&EditorUi.debug("DriveClient: Invalid response","retry",L,"delay",aa,"rev",null!=Y?Y.headRevisionId:"null","errors",Z);else{f.saveLevel=12;G({message:mxResources.get("error")+": "+Z},Y);try{EditorUi.logError("Saving to Google Drive failed",-null,"id-"+f.desc.id+"-from-"+v+"."+t+"-"+this.ui.hashValue(m)+"-to-"+Y.headRevisionId+"."+Y.modifiedDate+"-"+this.ui.hashValue(Y.etag)+(0<Z.length?"-errors-"+Z:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")+"-retries-"+L+"-delay-"+(Date.now()-g))}catch(ea){}}}else B(Y)}}),mxUtils.bind(this,function(Y){window.clearTimeout(X);if(W){f.saveLevel=6;try{f.isConflict(Y)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+-this.catchupFields},mxUtils.bind(this,function(Z){f.saveLevel=7;try{if(null!=Z&&Z.etag==F)if(L<this.staleEtagMaxRetries){L++;var aa=Math.round(2*L*this.coolOff*(1+.1*(Math.random()-.5)));window.setTimeout(O,aa);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",L,"delay",aa)}else{O(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?-"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(ea){}}else"1"==urlParams.test&&Z.headRevisionId==v&&EditorUi.debug("DriveClient: Remote Etag Changed","local",F,"remote",Z.etag,"rev",f.desc.headRevisionId,"response",[Z],"file",[f]),G(Y,Z)}catch(ea){d(ea)}}),mxUtils.bind(this,function(){G(Y)})):-G(Y)}catch(Z){d(Z)}}}))}catch(Y){d(Y)}}),O=mxUtils.bind(this,function(V){f.saveLevel=9;if(V||null==F)N(V);else{var T=!0,W=null;try{W=window.setTimeout(mxUtils.bind(this,function(){T=!1;G({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(X){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){window.clearTimeout(W);if(T){f.saveLevel=10;try{null!=X&&X.headRevisionId==v?("1"==urlParams.test&&F!=X.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",-"from",F,"to",X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),F=X.etag,N(V)):G({error:{code:412}},X)}catch(Y){d(Y)}}}),mxUtils.bind(this,function(X){window.clearTimeout(W);T&&(f.saveLevel=11,G(X))}))}});if(y&&null==U){f.saveLevel=8;var Q=new Image;Q.onload=mxUtils.bind(this,function(){try{var V=this.thumbnailWidth/Q.width,T=document.createElement("canvas");T.width=this.thumbnailWidth;T.height=Math.floor(Q.height*V);T.getContext("2d").drawImage(Q,0,0,T.width,T.height);var W=T.toDataURL();-W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");K.thumbnail={image:W,mimeType:"image/png"};O(!1)}catch(X){try{O(!1)}catch(Y){d(Y)}}});Q.src="data:image/png;base64,"+l}else O(!1)}catch(V){d(V)}});if(y){var S=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(l){M(l,!0)}),G,this.ui.getCurrentFile()!=f?n:null,S.scale,S.border)}else M(n,!1)}catch(l){d(l)}});try{f.saveLevel=2,(u||y||f.constructor==DriveLibrary||!this.enableThumbnails||-"0"==urlParams.thumb||null!=K.mimeType&&"application/vnd.jgraph.mxfile"!=K.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(U){try{var P=null;try{null!=U&&(P=U.toDataURL("image/png")),null!=P&&(P=P.length>this.maxThumbnailSize?null:P.substring(P.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(R){P=null}J(P,"image/png")}catch(R){d(R)}}),20))&&J(null,null,f.constructor!=DriveLibrary)}catch(U){d(U)}}else this.ui.editor.graph.reset(),G({message:mxResources.get("readOnly")})}catch(U){d(U)}};-DriveClient.prototype.insertFile=function(f,c,k,p,q,u,E){u=null!=u?u:this.xmlMimeType;f={mimeType:u,title:f};null!=k&&(f.parents=[{kind:"drive#fileLink",id:k}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,E),mxUtils.bind(this,function(H){u==this.libraryMimeType?p(new DriveLibrary(this.ui,c,H)):0==H?null!=q&&q({message:mxResources.get("errorSavingFile")}):p(new DriveFile(this.ui,c,H))}),q)};DriveClient.prototype.createUploadRequest=function(f,c,k,p,q,u,E){q=null!=q?q:!1;var H={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};-null!=u&&(H["If-Match"]=u);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:H,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=k?q?k:!window.btoa||-mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(k):Graph.base64EncodeUnicode(k):"")+"\r\n---------314159265358979323846--"};p||(f.fullUrl+="&newRevision=false");E&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),-k=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);f=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(c).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED)}return f};DriveClient.prototype.pickFile=function(f,c,k){this.filePickerCallback=null!=f?f:mxUtils.bind(this,function(p){this.ui.loadFile("G"+p)});this.filePicked=-mxUtils.bind(this,function(p){p.action==google.picker.Action.PICKED&&this.filePickerCallback(p.docs[0].id,p.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var p=c?"genericPicker":"filePicker",q=mxUtils.bind(this,function(G){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(G).className&&(mxEvent.removeListener(document,"click",q),this[p].setVisible(!1),k&&k())});if(null==e[p]||e[p+"Token"]!=-b){e[p+"Token"]=b;var u=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),E=(new google.picker.DocsView).setIncludeFolders(!0),H=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),D=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(u.setMimeTypes("*/*"),E.setMimeTypes("*/*"),H.setMimeTypes("*/*")):(u.setMimeTypes(this.mimeTypes),E.setMimeTypes(this.mimeTypes),H.setMimeTypes(this.mimeTypes));e[p]=(new google.picker.PickerBuilder).setOAuthToken(e[p+-"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(u).addView(E).addView(H).addView(google.picker.ViewId.RECENTLY_PICKED).addView(D);if(urlParams.gPickerSize){var L=urlParams.gPickerSize.split(",");e[p]=e[p].setSize(L[0],L[1])}urlParams.topBaseUrl&&(e[p]=e[p].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[p]=e[p].setCallback(mxUtils.bind(this,function(G){if(G.action==google.picker.Action.PICKED||G.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,-"click",q),k&&G.action==google.picker.Action.CANCEL&&k();G.action==google.picker.Action.PICKED&&this.filePicked(G)})).build()}mxEvent.addListener(document,"click",q);e[p].setVisible(!0)}catch(G){this.ui.spinner.stop(),this.ui.handleError(G)}}))};DriveClient.prototype.pickFolder=function(f,c){this.folderPickerCallback=f;var k=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var p=-mxUtils.bind(this,function(D){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(D).className&&(mxEvent.removeListener(document,"click",p),e.folderPicker.setVisible(!1))});if(null==e.folderPicker||e.folderPickerToken!=b){e.folderPickerToken=b;var q=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),u=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),-E=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(q).addView(u).addView(E).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));-if(urlParams.gPickerSize){var H=urlParams.gPickerSize.split(",");e.folderPicker=e.folderPicker.setSize(H[0],H[1])}urlParams.topBaseUrl&&(e.folderPicker=e.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.folderPicker=e.folderPicker.setCallback(mxUtils.bind(this,function(D){D.action!=google.picker.Action.PICKED&&D.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",p);this.folderPickerCallback(D)})).build()}mxEvent.addListener(document,"click",p);e.folderPicker.setVisible(!0)}catch(D){this.ui.spinner.stop(),-this.ui.handleError(D)}}))}catch(p){this.ui.handleError(p)}});c?k():this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop(),this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){k()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)}catch(p){this.ui.handleError(p)}}))};+0<this.lastTokenRefresh;Date.now()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){f();c&&this.fireEvent(new mxEventObject("disconnected"))})):f()};DriveClient.prototype.updateUser=function(f,c){try{var l={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(n){try{var p=JSON.parse(n);this.executeRequest({url:"/about"},mxUtils.bind(this,function(u){var G=+mxResources.get("notAvailable"),H=G,F=null;null!=u&&null!=u.user&&(G=u.user.emailAddress,H=u.user.displayName,F=null!=u.user.picture?u.user.picture.url:null);this.setUser(new DrawioUser(p.id,G,H,F,p.locale));this.userId=p.id;null!=f&&f()}),c)}catch(u){null!=c&&c(u)}}),c,null,null,null,null,l)}catch(n){if(null!=c)c(n);else throw n;}};DriveClient.prototype.copyFile=function(f,c,l,n){null!=f&&null!=c&&this.executeRequest({url:"/files/"+f+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",+method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},l,n)};DriveClient.prototype.renameFile=function(f,c,l,n){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{title:c}),l,n)};DriveClient.prototype.moveFile=function(f,c,l,n){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{parents:[{kind:"drive#fileLink",id:c}]}),l,n)};DriveClient.prototype.createDriveRequest=function(f,c){return{url:"/files/"+f+"?uploadType=multipart&supportsAllDrives=true",+method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(f,c,l){return this.getFile(f,c,l,!0,!0)};DriveClient.prototype.loadDescriptor=function(f,c,l,n){this.executeRequest({url:"/files/"+f+"?supportsAllDrives=true&fields="+(null!=n?n:this.allFields)},c,l)};DriveClient.prototype.listFiles=function(f,c,l,n,p){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType++"') "+(f?" and (title contains '"+f+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(l?" and ('me' in owners)":""))+"&orderBy=modifiedDate desc,title"},n,p)};DriveClient.prototype.getCustomProperty=function(f,c){f=f.properties;var l=null;if(null!=f)for(var n=0;n<f.length;n++)if(f[n].key==c){l=f[n].value;break}return l};DriveClient.prototype.getFile=function(f,c,l,n,p){n=null!=n?n:!1;p=null!=p?p:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+f+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},+mxUtils.bind(this,function(u){u.title=u.originalFilename;u.headRevisionId=u.id;u.id=f;this.getXmlFile(u,c,l)}),l):this.loadDescriptor(f,mxUtils.bind(this,function(u){try{if(null!=this.user){var G=/\.png$/i.test(u.title);/\.v(dx|sdx?)$/i.test(u.title)||/\.gliffy$/i.test(u.title)||!this.ui.useCanvasForExport&&G?this.ui.convertFile(u.downloadUrl,u.title,u.mimeType,this.extension,c,l,null,{Authorization:"Bearer "+b}):n||p||u.mimeType==this.libraryMimeType||u.mimeType==this.xmlMimeType?this.getXmlFile(u,+c,l,!0,p):this.getXmlFile(u,c,l)}else l({message:mxResources.get("loggedOut")})}catch(H){if(null!=l)l(H);else throw H;}}),l)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,l,n,p){try{var u={Authorization:"Bearer "+b},G=f.downloadUrl;if(null==G)null!=l&&l({message:mxResources.get("exportOptionsDisabledDetails")});else{var H=0,F=mxUtils.bind(this,function(){this.ui.editor.loadUrl(G,+mxUtils.bind(this,function(K){try{if(null==K)l({message:mxResources.get("invalidOrMissingFile")});else if(f.mimeType==this.libraryMimeType||p)f.mimeType!=this.libraryMimeType||p?c(new DriveLibrary(this.ui,K,f)):l({message:mxResources.get("notADiagramFile")});else{var d=!1;if(/\.png$/i.test(f.title)){var g=K.lastIndexOf(",");if(0<g){var k=this.ui.extractGraphModelFromPng(K);if(null!=k&&0<k.length)K=k;else try{k=K.substring(g+1);var v=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):+atob(k),t=this.ui.editor.extractGraphModel(mxUtils.parseXml(v).documentElement,!0);null==t||0<t.getElementsByTagName("parsererror").length?d=!0:K=v}catch(x){d=!0}}}else/\.pdf$/i.test(f.title)?(k=Editor.extractGraphModelFromPdf(K),null!=k&&0<k.length&&(d=!0,K=k)):"data:image/png;base64,PG14ZmlsZS"==K.substring(0,32)&&(v=K.substring(22),K=window.atob&&!mxClient.IS_SF?atob(v):Base64.decode(v));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(K,G)?this.ui.parseFileData(K,mxUtils.bind(this,+function(x){try{4==x.readyState&&(200<=x.status&&299>=x.status?c(new LocalFile(this.ui,x.responseText,f.title+this.extension,!0)):null!=l&&l({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=l)l(A);else throw A;}}),f.title):c(d?new LocalFile(this.ui,K,f.title,!0):new DriveFile(this.ui,K,f))}}catch(x){if(null!=l)l(x);else throw x;}}),mxUtils.bind(this,function(K,d){if(H<this.maxRetries&&null!=d&&403==d.getStatus())H++,window.setTimeout(F,2*H*this.coolOff*(1+.1*(Math.random()-.5)));+else if(null!=l)l(K);else throw K;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,u)});F()}}catch(K){if(null!=l)l(K);else throw K;}};DriveClient.prototype.saveFile=function(f,c,l,n,p,u,G,H,F){try{var K=0;f.saveLevel=1;var d=mxUtils.bind(this,function(V){if(null!=n)n(V);else throw V;}),g=mxUtils.bind(this,function(V){d(V);try{EditorUi.logError(V.message,null,+null,null,V)}catch(Q){}});if(f.isEditable()&&null!=f.desc){var k=Date.now(),v=f.desc.etag,t=f.desc.modifiedDate,x=f.desc.headRevisionId,A=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());u=null!=u?u:!1;var J=null,D=!1,E={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(E.mimeType))E.mimeType=this.xmlMimeType,J=f.desc,D=c=!0;else if("application/octet-stream"==E.mimeType||"1"==urlParams["override-mime"]&&E.mimeType!=this.xmlMimeType)E.mimeType=this.xmlMimeType;+var R=mxUtils.bind(this,function(V,Q,P){try{f.saveLevel=3;var q=f.getData(),y=null,B=null;f.constructor==DriveFile&&(null==H&&(H=[]),null==f.getChannelId()&&H.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&H.push({key:"key",value:Editor.guid(32)}),F=null!=F?F:Editor.guid(32),H.push({key:"secret",value:F}),B=this.ui.getPagesForXml(q),y=this.ui.getHashValueForPages(B),H.push({key:"checksum",value:F+":"+y}));P||(null!=V||u||(V=this.placeholderThumbnail,Q=this.placeholderMimeType),+null!=V&&null!=Q&&(E.thumbnail={image:V,mimeType:Q}));var C=mxUtils.bind(this,function(m){try{if(f.saveDelay=Date.now()-k,f.saveLevel=null,l(m,q,B,y),null!=J){this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(z){z.pinned=!0;this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId,method:"PUT",params:z})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"++J.id+"."+J.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(z){}}}catch(z){g(z)}}),M=mxUtils.bind(this,function(m,z){f.saveLevel=4;try{null!=H&&(E.properties=H);var I=G||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:f.getCurrentEtag(),L=mxUtils.bind(this,function(S){f.saveLevel=5;try{var U=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&+f.desc.mimeType!=this.libraryMimeType,W=!0,X=null;try{X=window.setTimeout(mxUtils.bind(this,function(){W=!1;d({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(f.getId(),E,m,c||S||U,z,S?null:I,D),mxUtils.bind(this,function(Z){window.clearTimeout(X);if(W){var Y=null!=Z?(new Date(Z.modifiedDate)).getTime()-(new Date(t)).getTime():0;if(0>=Y||v==Z.etag||c&&x==Z.headRevisionId){var ba=[];null==Z?ba.push("Empty response"):(0>=Y&&ba.push("Invalid modified time"),+v==Z.etag&&ba.push("Stale etag"),c&&x==Z.headRevisionId&&ba.push("Stale revision"),I=Z.etag);0==ba.length&&ba.push(mxResources.get("unknownError"));Y=ba.join(", ");if(K<this.staleEtagMaxRetries)K++,ba=Math.round(Math.pow(2,K)*this.coolOff*(1+.1*(Math.random()-.5))),window.setTimeout(L,ba),"1"==urlParams.test&&EditorUi.debug("DriveClient: Invalid response","retry",K,"delay",ba,"rev",null!=Z?Z.headRevisionId:"null","errors",Y);else{f.saveLevel=12;d({message:mxResources.get("error")+": "+Y},Z);try{EditorUi.logError("Saving to Google Drive failed",+null,"id-"+f.desc.id+"-from-"+x+"."+t+"-"+this.ui.hashValue(v)+"-to-"+Z.headRevisionId+"."+Z.modifiedDate+"-"+this.ui.hashValue(Z.etag)+(0<Y.length?"-errors-"+Y:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")+"-retries-"+K+"-delay-"+(Date.now()-k))}catch(ea){}}}else C(Z)}}),mxUtils.bind(this,function(Z){window.clearTimeout(X);if(W){f.saveLevel=6;try{f.isConflict(Z)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="++this.catchupFields},mxUtils.bind(this,function(Y){f.saveLevel=7;try{if(null!=Y&&Y.etag==I)if(K<this.staleEtagMaxRetries){K++;var ba=Math.round(2*K*this.coolOff*(1+.1*(Math.random()-.5)));window.setTimeout(N,ba);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",K,"delay",ba)}else{N(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?+"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(ea){}}else"1"==urlParams.test&&Y.headRevisionId==x&&EditorUi.debug("DriveClient: Remote Etag Changed","local",I,"remote",Y.etag,"rev",f.desc.headRevisionId,"response",[Y],"file",[f]),d(Z,Y)}catch(ea){g(ea)}}),mxUtils.bind(this,function(){d(Z)})):+d(Z)}catch(Y){g(Y)}}}))}catch(Z){g(Z)}}),N=mxUtils.bind(this,function(S){f.saveLevel=9;if(S||null==I)L(S);else{var U=!0,W=null;try{W=window.setTimeout(mxUtils.bind(this,function(){U=!1;d({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(X){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){window.clearTimeout(W);if(U){f.saveLevel=10;try{null!=X&&X.headRevisionId==x?("1"==urlParams.test&&I!=X.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",+"from",I,"to",X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),I=X.etag,L(S)):d({error:{code:412}},X)}catch(Z){g(Z)}}}),mxUtils.bind(this,function(X){window.clearTimeout(W);U&&(f.saveLevel=11,d(X))}))}});if(A&&null==V){f.saveLevel=8;var O=new Image;O.onload=mxUtils.bind(this,function(){try{var S=this.thumbnailWidth/O.width,U=document.createElement("canvas");U.width=this.thumbnailWidth;U.height=Math.floor(O.height*S);U.getContext("2d").drawImage(O,0,0,U.width,U.height);var W=U.toDataURL();+W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");E.thumbnail={image:W,mimeType:"image/png"};N(!1)}catch(X){try{N(!1)}catch(Z){g(Z)}}});O.src="data:image/png;base64,"+m}else N(!1)}catch(S){g(S)}});if(A){var T=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(m){M(m,!0)}),d,this.ui.getCurrentFile()!=f?q:null,T.scale,T.border)}else M(q,!1)}catch(m){g(m)}});try{f.saveLevel=2,(u||A||f.constructor==DriveLibrary||!this.enableThumbnails||+"0"==urlParams.thumb||null!=E.mimeType&&"application/vnd.jgraph.mxfile"!=E.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(V){try{var Q=null;try{null!=V&&(Q=V.toDataURL("image/png")),null!=Q&&(Q=Q.length>this.maxThumbnailSize?null:Q.substring(Q.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(P){Q=null}R(Q,"image/png")}catch(P){g(P)}}),20))&&R(null,null,f.constructor!=DriveLibrary)}catch(V){g(V)}}else this.ui.editor.graph.reset(),d({message:mxResources.get("readOnly")})}catch(V){g(V)}};+DriveClient.prototype.insertFile=function(f,c,l,n,p,u,G){u=null!=u?u:this.xmlMimeType;f={mimeType:u,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,G),mxUtils.bind(this,function(H){u==this.libraryMimeType?n(new DriveLibrary(this.ui,c,H)):0==H?null!=p&&p({message:mxResources.get("errorSavingFile")}):n(new DriveFile(this.ui,c,H))}),p)};DriveClient.prototype.createUploadRequest=function(f,c,l,n,p,u,G){p=null!=p?p:!1;var H={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};+null!=u&&(H["If-Match"]=u);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:H,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=l?p?l:!window.btoa||+mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(l):Graph.base64EncodeUnicode(l):"")+"\r\n---------314159265358979323846--"};n||(f.fullUrl+="&newRevision=false");G&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),+l=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);f=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(c).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED)}return f};DriveClient.prototype.pickFile=function(f,c,l){this.filePickerCallback=null!=f?f:mxUtils.bind(this,function(n){this.ui.loadFile("G"+n)});this.filePicked=+mxUtils.bind(this,function(n){n.action==google.picker.Action.PICKED&&this.filePickerCallback(n.docs[0].id,n.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var n=c?"genericPicker":"filePicker",p=mxUtils.bind(this,function(d){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(d).className&&(mxEvent.removeListener(document,"click",p),this[n].setVisible(!1),l&&l())});if(null==e[n]||e[n+"Token"]!=+b){e[n+"Token"]=b;var u=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),G=(new google.picker.DocsView).setIncludeFolders(!0),H=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),F=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(u.setMimeTypes("*/*"),G.setMimeTypes("*/*"),H.setMimeTypes("*/*")):(u.setMimeTypes(this.mimeTypes),G.setMimeTypes(this.mimeTypes),H.setMimeTypes(this.mimeTypes));e[n]=(new google.picker.PickerBuilder).setOAuthToken(e[n++"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(u).addView(G).addView(H).addView(google.picker.ViewId.RECENTLY_PICKED).addView(F);if(urlParams.gPickerSize){var K=urlParams.gPickerSize.split(",");e[n]=e[n].setSize(K[0],K[1])}urlParams.topBaseUrl&&(e[n]=e[n].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[n]=e[n].setCallback(mxUtils.bind(this,function(d){if(d.action==google.picker.Action.PICKED||d.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,+"click",p),l&&d.action==google.picker.Action.CANCEL&&l();d.action==google.picker.Action.PICKED&&this.filePicked(d)})).build()}mxEvent.addListener(document,"click",p);e[n].setVisible(!0)}catch(d){this.ui.spinner.stop(),this.ui.handleError(d)}}))};DriveClient.prototype.pickFolder=function(f,c){this.folderPickerCallback=f;var l=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var n=+mxUtils.bind(this,function(F){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(F).className&&(mxEvent.removeListener(document,"click",n),e.folderPicker.setVisible(!1))});if(null==e.folderPicker||e.folderPickerToken!=b){e.folderPickerToken=b;var p=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),u=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),+G=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(p).addView(u).addView(G).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));+if(urlParams.gPickerSize){var H=urlParams.gPickerSize.split(",");e.folderPicker=e.folderPicker.setSize(H[0],H[1])}urlParams.topBaseUrl&&(e.folderPicker=e.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.folderPicker=e.folderPicker.setCallback(mxUtils.bind(this,function(F){F.action!=google.picker.Action.PICKED&&F.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",n);this.folderPickerCallback(F)})).build()}mxEvent.addListener(document,"click",n);e.folderPicker.setVisible(!0)}catch(F){this.ui.spinner.stop(),+this.ui.handleError(F)}}))}catch(n){this.ui.handleError(n)}});c?l():this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop(),this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){l()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)}catch(n){this.ui.handleError(n)}}))};DriveClient.prototype.pickLibrary=function(f){this.filePickerCallback=f;this.filePicked=mxUtils.bind(this,function(c){c.action==google.picker.Action.PICKED?this.filePickerCallback(c.docs[0].id):c.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(H){"picker modal-dialog-bg picker-dialog-bg"==-mxEvent.getSource(H).className&&(mxEvent.removeListener(document,"click",c),e.libraryPicker.setVisible(!1))});if(null==e.libraryPicker||e.libraryPickerToken!=b){e.libraryPickerToken=b;var k=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),p=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),-q=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),u=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(k).addView(p).addView(q).addView(google.picker.ViewId.RECENTLY_PICKED).addView(u);if(urlParams.gPickerSize){var E=-urlParams.gPickerSize.split(",");e.libraryPicker=e.libraryPicker.setSize(E[0],E[1])}urlParams.topBaseUrl&&(e.libraryPicker=e.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.libraryPicker=e.libraryPicker.setCallback(mxUtils.bind(this,function(H){H.action!=google.picker.Action.PICKED&&H.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);H.action==google.picker.Action.PICKED&&this.filePicked(H)})).build()}mxEvent.addListener(document,"click",c);e.libraryPicker.setVisible(!0)}catch(H){this.ui.spinner.stop(),-this.ui.handleError(H)}}))};DriveClient.prototype.showPermissions=function(f,c){var k=mxUtils.bind(this,function(){var p=new ConfirmDialog(this.ui,mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){var q=null!=c?c.getFolderUrl():"https://drive.google.com/open?id="+f;this.ui.editor.graph.openLink(q)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(p.container,400,150,!0,!0);p.init()});this.sharingFailed?k():this.checkToken(mxUtils.bind(this,-function(){try{var p=new gapi.drive.share.ShareClient(this.appId);p.setOAuthToken(b);p.setItemIds([f]);p.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(q){for(var u=!1,E=0;E<q.length;E++)for(var H=0;H<q[E].addedNodes.length;H++){var D=q[E].addedNodes[H];"BUTTON"==D.nodeName&&"ok"==D.getAttribute("name")&&null!=D.parentNode&&null!=D.parentNode.parentNode&&-"dialog"==D.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,D.click(),k(),u=!0):"DIV"==D.nodeName&&"shr-q-shr-r-shr-xb"==D.className&&(u=!0)}u&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(q){this.ui.handleError(q)}}))};DriveClient.prototype.clearPersistentToken=function(){var f=JSON.parse(this.getPersistentToken(!0))||{};delete f.current;delete f[this.userId];for(var c in f){f.current={userId:c,-expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(f))};DriveClient.prototype.setPersistentToken=function(f,c){var k=JSON.parse(this.getPersistentToken(!0))||{};f.userId=this.userId;k.current=f;k[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(k),c)}})();DropboxFile=function(b,e,f){DrawioFile.call(this,b,e);this.stat=f};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};+mxEvent.getSource(H).className&&(mxEvent.removeListener(document,"click",c),e.libraryPicker.setVisible(!1))});if(null==e.libraryPicker||e.libraryPickerToken!=b){e.libraryPickerToken=b;var l=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),n=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),+p=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),u=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(l).addView(n).addView(p).addView(google.picker.ViewId.RECENTLY_PICKED).addView(u);if(urlParams.gPickerSize){var G=+urlParams.gPickerSize.split(",");e.libraryPicker=e.libraryPicker.setSize(G[0],G[1])}urlParams.topBaseUrl&&(e.libraryPicker=e.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.libraryPicker=e.libraryPicker.setCallback(mxUtils.bind(this,function(H){H.action!=google.picker.Action.PICKED&&H.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);H.action==google.picker.Action.PICKED&&this.filePicked(H)})).build()}mxEvent.addListener(document,"click",c);e.libraryPicker.setVisible(!0)}catch(H){this.ui.spinner.stop(),+this.ui.handleError(H)}}))};DriveClient.prototype.showPermissions=function(f,c){var l=mxUtils.bind(this,function(){var n=new ConfirmDialog(this.ui,mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){var p=null!=c?c.getFolderUrl():"https://drive.google.com/open?id="+f;this.ui.editor.graph.openLink(p)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(n.container,400,150,!0,!0);n.init()});this.sharingFailed?l():this.checkToken(mxUtils.bind(this,+function(){try{var n=new gapi.drive.share.ShareClient(this.appId);n.setOAuthToken(b);n.setItemIds([f]);n.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(p){for(var u=!1,G=0;G<p.length;G++)for(var H=0;H<p[G].addedNodes.length;H++){var F=p[G].addedNodes[H];"BUTTON"==F.nodeName&&"ok"==F.getAttribute("name")&&null!=F.parentNode&&null!=F.parentNode.parentNode&&+"dialog"==F.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,F.click(),l(),u=!0):"DIV"==F.nodeName&&"shr-q-shr-r-shr-xb"==F.className&&(u=!0)}u&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(p){this.ui.handleError(p)}}))};DriveClient.prototype.clearPersistentToken=function(){var f=JSON.parse(this.getPersistentToken(!0))||{};delete f.current;delete f[this.userId];for(var c in f){f.current={userId:c,+expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(f))};DriveClient.prototype.setPersistentToken=function(f,c){var l=JSON.parse(this.getPersistentToken(!0))||{};f.userId=this.userId;l.current=f;l[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(l),c)}})();DropboxFile=function(b,e,f){DrawioFile.call(this,b,e);this.stat=f};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};DropboxFile.prototype.getFileUrl=function(){return"https://www.dropbox.com/home/Apps"+this.ui.dropbox.appPath+this.stat.path_display};DropboxFile.prototype.getFolderUrl=function(){var b=this.getFileUrl();return b.substring(0,b.lastIndexOf("/"))};-DropboxFile.prototype.getRevisions=function(b,e){var f=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});f.then(mxUtils.bind(this,function(c){try{for(var k=[],p=c.entries.length-1;0<=p;p--)mxUtils.bind(this,function(q){k.push({modifiedDate:q.client_modified,fileSize:q.size,getXml:mxUtils.bind(this,function(u,E){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:q.rev},u,E)}),getUrl:mxUtils.bind(this,function(u){return this.ui.getUrl(window.location.pathname+"?rev="+-q.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=u?"&page="+u:""))+window.location.hash})})})(c.entries[p]);b(k)}catch(q){e(q)}}));f["catch"](function(c){e(c)})};DropboxFile.prototype.getLatestVersion=function(b,e){this.ui.dropbox.getFile(this.getId(),b,e)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,e,f,c,k){this.doSave(this.getTitle(),b,e,f,c,k)};DropboxFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)};-DropboxFile.prototype.doSave=function(b,e,f,c,k,p){var q=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=q;this.saveFile(b,e,f,c,k,p)}),c,k,p])};-DropboxFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(e=mxUtils.bind(this,function(k){if(k)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var p=mxUtils.bind(this,function(u){var E=this.stat.path_display.lastIndexOf("/");E=1<E?this.stat.path_display.substring(1,E+1):null;this.ui.dropbox.saveFile(b,u,mxUtils.bind(this,function(H){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=H;this.contentChanged();-null!=f&&f()}),mxUtils.bind(this,function(H){this.savingFile=!1;null!=c&&c(H)}),E)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var q=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(u){p(this.ui.base64ToBlob(u,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,q.scale,q.border)}else p(this.getData())}catch(u){if(this.savingFile=!1,null!=c)c(u);else throw u;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b,+DropboxFile.prototype.getRevisions=function(b,e){var f=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});f.then(mxUtils.bind(this,function(c){try{for(var l=[],n=c.entries.length-1;0<=n;n--)mxUtils.bind(this,function(p){l.push({modifiedDate:p.client_modified,fileSize:p.size,getXml:mxUtils.bind(this,function(u,G){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:p.rev},u,G)}),getUrl:mxUtils.bind(this,function(u){return this.ui.getUrl(window.location.pathname+"?rev="++p.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=u?"&page="+u:""))+window.location.hash})})})(c.entries[n]);b(l)}catch(p){e(p)}}));f["catch"](function(c){e(c)})};DropboxFile.prototype.getLatestVersion=function(b,e){this.ui.dropbox.getFile(this.getId(),b,e)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};DropboxFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)};+DropboxFile.prototype.doSave=function(b,e,f,c,l,n){var p=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=p;this.saveFile(b,e,f,c,l,n)}),c,l,n])};+DropboxFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(e=mxUtils.bind(this,function(l){if(l)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var n=mxUtils.bind(this,function(u){var G=this.stat.path_display.lastIndexOf("/");G=1<G?this.stat.path_display.substring(1,G+1):null;this.ui.dropbox.saveFile(b,u,mxUtils.bind(this,function(H){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=H;this.contentChanged();+null!=f&&f()}),mxUtils.bind(this,function(H){this.savingFile=!1;null!=c&&c(H)}),G)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var p=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(u){n(this.ui.base64ToBlob(u,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,p.scale,p.border)}else n(this.getData())}catch(u){if(this.savingFile=!1,null!=c)c(u);else throw u;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b,e)):null!=f&&f()};DropboxFile.prototype.rename=function(b,e,f){this.ui.dropbox.renameFile(this,b,mxUtils.bind(this,function(c){this.hasSameExtension(b,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=e&&e()):(this.stat=c,this.descriptorChanged(),this.save(!0,e,f))}),f)};DropboxLibrary=function(b,e,f){DropboxFile.call(this,b,e,f)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};DropboxLibrary.prototype.open=function(){};(function(){var b=null;window.DropboxClient=function(e){DrawioClient.call(this,e,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio-diagrams/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"dropbox";DropboxClient.prototype.logout=-function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(e,f,c){var k=!0,p=window.setTimeout(mxUtils.bind(this,function(){k=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),q=this.client.usersGetCurrentAccount();-q.then(mxUtils.bind(this,function(u){window.clearTimeout(p);k&&(this.setUser(new DrawioUser(u.account_id,u.email,u.name.display_name)),e())}));q["catch"](mxUtils.bind(this,function(u){window.clearTimeout(p);k&&(null==u||401!==u.status||c?f({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)))}))};DropboxClient.prototype.authenticate=function(e,f){(new mxXmlRequest(this.redirectUri+-"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};DropboxClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onDropboxCallback){var k=mxUtils.bind(this,function(){var p=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(q){if(200<=-q.getStatus()&&299>=q.getStatus())try{b=JSON.parse(q.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),f()}catch(u){c({message:mxResources.get("authFailed"),retry:k})}else this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==q.getStatus()?k():c({message:mxResources.get("accessDenied"),retry:k})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(q,u){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+-(q?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(E,H){if(p){window.onDropboxCallback=null;p=!1;try{null==E?c({message:mxResources.get("accessDenied"),retry:k}):(null!=u&&u(),b=E.access_token,this.client.setAccessToken(b),this.setUser(null),q&&this.setPersistentToken("remembered"),f())}catch(D){c(D)}finally{null!=-H&&H.close()}}else null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:k})}),mxUtils.bind(this,function(){p&&(window.onDropboxCallback=null,p=!1,c({message:mxResources.get("accessDenied"),retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,f,c){var k=mxUtils.bind(this,function(q){var u=!0,E=window.setTimeout(mxUtils.bind(this,function(){u=!1;c({code:App.ERROR_TIMEOUT,retry:p})}),this.ui.timeout),H=e();H.then(mxUtils.bind(this,-function(D){window.clearTimeout(E);u&&null!=f&&f(D)}));H["catch"](mxUtils.bind(this,function(D){window.clearTimeout(E);u&&(null==D||500!=D.status&&400!=D.status&&401!=D.status?c({message:mxResources.get("error")+" "+D.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,q?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){p(!0)},c)})}):this.authenticate(function(){k(!0)},c)))}))}),p=mxUtils.bind(this,function(q){null==this.user?-this.updateUser(function(){p(!0)},c,q):k(q)});null==b?this.authenticate(function(){p(!0)},c):p(!1)};DropboxClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};DropboxClient.prototype.getFile=function(e,f,c,k){k=null!=k?k:!1;var p=/\.png$/i.test(e);if(/^https:\/\//i.test(e)||/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&p){var q=mxUtils.bind(this,function(){var u=e.split("/");this.ui.convertFile(e,0<u.length?u[u.length-1]:e,null,this.extension,-f,c)});null!=b?q():this.authenticate(q,c)}else q={path:"/"+e},null!=urlParams.rev&&(q.rev=urlParams.rev),this.readFile(q,mxUtils.bind(this,function(u,E){var H=null;if(0<(p?u.lastIndexOf(","):-1)){var D=this.ui.extractGraphModelFromPng(u);null!=D&&0<D.length?u=D:H=new LocalFile(this,u,e,!0)}f(null!=H?H:k?new DropboxLibrary(this.ui,u,E):new DropboxFile(this.ui,u,E))}),c,p)};DropboxClient.prototype.readFile=function(e,f,c,k){var p=mxUtils.bind(this,function(u){var E=!0,H=window.setTimeout(mxUtils.bind(this,-function(){E=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),D=this.client.filesGetMetadata({path:"/"+e.path.substring(1),include_deleted:!1});D.then(mxUtils.bind(this,function(L){}));D["catch"](function(L){window.clearTimeout(H);E&&null!=L&&409==L.status&&(E=!1,c({message:mxResources.get("fileNotFound")}))});D=this.client.filesDownload(e);D.then(mxUtils.bind(this,function(L){window.clearTimeout(H);if(E){E=!1;try{var G=new FileReader;G.onload=mxUtils.bind(this,function(d){f(G.result,L)});k?G.readAsDataURL(L.fileBlob):-G.readAsText(L.fileBlob)}catch(d){c(d)}}}));D["catch"](mxUtils.bind(this,function(L){window.clearTimeout(H);E&&(E=!1,null==L||500!=L.status&&400!=L.status&&401!=L.status?c({message:mxResources.get("error")+" "+L.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){q(!0)},c)})}):this.authenticate(function(){p(!0)},c)))}))}),q=mxUtils.bind(this,function(u){null==this.user?this.updateUser(function(){q(!0)},-c,u):p(u)});null==b?this.authenticate(function(){q(!0)},c):q(!1)};DropboxClient.prototype.checkExists=function(e,f,c){var k=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+e.toLowerCase(),include_deleted:!1})});this.executePromise(k,mxUtils.bind(this,function(p){c?f(!1,!0,p):this.ui.confirm(mxResources.get("replaceIt",[e]),function(){f(!0,!0,p)},function(){f(!1,!0,p)})}),function(p){f(!0,!1)})};DropboxClient.prototype.renameFile=function(e,f,c,k){if(/[\\\/:\?\*"\|]/.test(f))k({message:mxResources.get("dropboxCharsNotAllowed")});-else{if(null!=e&&null!=f){var p=e.stat.path_display.substring(1),q=p.lastIndexOf("/");0<q&&(f=p.substring(0,q+1)+f)}null!=e&&null!=f&&e.stat.path_lower.substring(1)!==f.toLowerCase()?this.checkExists(f,mxUtils.bind(this,function(u,E,H){u?(u=mxUtils.bind(this,function(D){D=mxUtils.bind(this,function(){return this.client.filesMove({from_path:e.stat.path_display,to_path:"/"+f,autorename:!1})});this.executePromise(D,c,k)}),E&&H.path_lower.substring(1)!==f.toLowerCase()?(E=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+-f.toLowerCase()})}),this.executePromise(E,u,k)):u()):k()})):k({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(e,f,c,k){this.insertFile(e,f,c,k,!0)};DropboxClient.prototype.insertFile=function(e,f,c,k,p){p=null!=p?p:!1;this.checkExists(e,mxUtils.bind(this,function(q){q?this.saveFile(e,f,mxUtils.bind(this,function(u){p?c(new DropboxLibrary(this.ui,f,u)):c(new DropboxFile(this.ui,f,u))}),k):k()}))};DropboxClient.prototype.saveFile=function(e,f,c,k,p){if(/[\\\/:\?\*"\|]/.test(e))k({message:mxResources.get("dropboxCharsNotAllowed")});-else if(15E7<=f.length)k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 150 MB)"});else{p=null!=p?p:"";var q=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+p+e,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([f],{type:"text/plain"})})});this.executePromise(q,c,k)}};DropboxClient.prototype.pickLibrary=function(e){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(f){if(this.ui.spinner.spin(document.body,-mxResources.get("loading"))){var c=mxUtils.bind(this,function(q){this.ui.spinner.stop();this.ui.handleError(q)}),k=null!=f[0].link?f[0].link.indexOf(this.appPath):-1;if(0<k){var p=decodeURIComponent(f[0].link.substring(k+this.appPath.length-1));this.readFile({path:p},mxUtils.bind(this,function(q,u){if(null!=u&&u.id==f[0].id)try{this.ui.spinner.stop(),e(p.substring(1),new DropboxLibrary(this.ui,q,u))}catch(E){this.ui.handleError(E)}else this.createLibrary(f[0],e,c)}),c)}else this.createLibrary(f[0],-e,c)}})})};DropboxClient.prototype.createLibrary=function(e,f,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(k){this.insertFile(e.name,k,mxUtils.bind(this,function(p){try{this.ui.spinner.stop(),f(p.getHash().substring(1),p)}catch(q){c(q)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(e,f){null!=-Dropbox.choose?(e=null!=e?e:mxUtils.bind(this,function(c,k){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):k.getHash(),null,k)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(f)this.ui.spinner.stop(),e(c[0].link);else{var k=mxUtils.bind(this,function(H){this.ui.spinner.stop();this.ui.handleError(H)}),p=mxUtils.bind(this,function(H,D){this.ui.spinner.stop();e(H,-D)}),q=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&q)p(c[0].link);else{var u=null!=c[0].link?c[0].link.indexOf(this.appPath):-1;if(0<u){var E=decodeURIComponent(c[0].link.substring(u+this.appPath.length-1));this.readFile({path:E},mxUtils.bind(this,function(H,D){if(null!=D&&D.id==c[0].id){var L=q?H.lastIndexOf(","):-1;this.ui.spinner.stop();var G=null;0<L&&(L=this.ui.extractGraphModelFromPng(H),null!=L&&0<L.length?H=L:G=new LocalFile(this,-H,E,!0));e(E.substring(1),null!=G?G:new DropboxFile(this.ui,H,D))}else this.createFile(c[0],p,k)}),k,q)}else this.createFile(c[0],p,k)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(e,f,c){var k=/(\.png)$/i.test(e.name);this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(p){null!=p&&0<p.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,-function(){var q=k?p.lastIndexOf(","):-1;0<q&&(q=this.ui.extractGraphModelFromPng(p.substring(q+1)),null!=q&&0<q.length&&(p=q));this.insertFile(e.name,p,mxUtils.bind(this,function(u){f(e.name,u)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,k)}})();OneDriveFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};+function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(e,f,c){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),p=this.client.usersGetCurrentAccount();+p.then(mxUtils.bind(this,function(u){window.clearTimeout(n);l&&(this.setUser(new DrawioUser(u.account_id,u.email,u.name.display_name)),e())}));p["catch"](mxUtils.bind(this,function(u){window.clearTimeout(n);l&&(null==u||401!==u.status||c?f({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)))}))};DropboxClient.prototype.authenticate=function(e,f){(new mxXmlRequest(this.redirectUri++"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};DropboxClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onDropboxCallback){var l=mxUtils.bind(this,function(){var n=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(p){if(200<=+p.getStatus()&&299>=p.getStatus())try{b=JSON.parse(p.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),f()}catch(u){c({message:mxResources.get("authFailed"),retry:l})}else this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==p.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(p,u){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId++(p?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(G,H){if(n){window.onDropboxCallback=null;n=!1;try{null==G?c({message:mxResources.get("accessDenied"),retry:l}):(null!=u&&u(),b=G.access_token,this.client.setAccessToken(b),this.setUser(null),p&&this.setPersistentToken("remembered"),f())}catch(F){c(F)}finally{null!=+H&&H.close()}}else null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onDropboxCallback=null,n=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,f,c){var l=mxUtils.bind(this,function(p){var u=!0,G=window.setTimeout(mxUtils.bind(this,function(){u=!1;c({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),H=e();H.then(mxUtils.bind(this,+function(F){window.clearTimeout(G);u&&null!=f&&f(F)}));H["catch"](mxUtils.bind(this,function(F){window.clearTimeout(G);u&&(null==F||500!=F.status&&400!=F.status&&401!=F.status?c({message:mxResources.get("error")+" "+F.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,p?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){n(!0)},c)})}):this.authenticate(function(){l(!0)},c)))}))}),n=mxUtils.bind(this,function(p){null==this.user?+this.updateUser(function(){n(!0)},c,p):l(p)});null==b?this.authenticate(function(){n(!0)},c):n(!1)};DropboxClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};DropboxClient.prototype.getFile=function(e,f,c,l){l=null!=l?l:!1;var n=/\.png$/i.test(e);if(/^https:\/\//i.test(e)||/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&n){var p=mxUtils.bind(this,function(){var u=e.split("/");this.ui.convertFile(e,0<u.length?u[u.length-1]:e,null,this.extension,+f,c)});null!=b?p():this.authenticate(p,c)}else p={path:"/"+e},null!=urlParams.rev&&(p.rev=urlParams.rev),this.readFile(p,mxUtils.bind(this,function(u,G){var H=null;if(0<(n?u.lastIndexOf(","):-1)){var F=this.ui.extractGraphModelFromPng(u);null!=F&&0<F.length?u=F:H=new LocalFile(this,u,e,!0)}f(null!=H?H:l?new DropboxLibrary(this.ui,u,G):new DropboxFile(this.ui,u,G))}),c,n)};DropboxClient.prototype.readFile=function(e,f,c,l){var n=mxUtils.bind(this,function(u){var G=!0,H=window.setTimeout(mxUtils.bind(this,+function(){G=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),F=this.client.filesGetMetadata({path:"/"+e.path.substring(1),include_deleted:!1});F.then(mxUtils.bind(this,function(K){}));F["catch"](function(K){window.clearTimeout(H);G&&null!=K&&409==K.status&&(G=!1,c({message:mxResources.get("fileNotFound")}))});F=this.client.filesDownload(e);F.then(mxUtils.bind(this,function(K){window.clearTimeout(H);if(G){G=!1;try{var d=new FileReader;d.onload=mxUtils.bind(this,function(g){f(d.result,K)});l?d.readAsDataURL(K.fileBlob):+d.readAsText(K.fileBlob)}catch(g){c(g)}}}));F["catch"](mxUtils.bind(this,function(K){window.clearTimeout(H);G&&(G=!1,null==K||500!=K.status&&400!=K.status&&401!=K.status?c({message:mxResources.get("error")+" "+K.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){p(!0)},c)})}):this.authenticate(function(){n(!0)},c)))}))}),p=mxUtils.bind(this,function(u){null==this.user?this.updateUser(function(){p(!0)},+c,u):n(u)});null==b?this.authenticate(function(){p(!0)},c):p(!1)};DropboxClient.prototype.checkExists=function(e,f,c){var l=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+e.toLowerCase(),include_deleted:!1})});this.executePromise(l,mxUtils.bind(this,function(n){c?f(!1,!0,n):this.ui.confirm(mxResources.get("replaceIt",[e]),function(){f(!0,!0,n)},function(){f(!1,!0,n)})}),function(n){f(!0,!1)})};DropboxClient.prototype.renameFile=function(e,f,c,l){if(/[\\\/:\?\*"\|]/.test(f))l({message:mxResources.get("dropboxCharsNotAllowed")});+else{if(null!=e&&null!=f){var n=e.stat.path_display.substring(1),p=n.lastIndexOf("/");0<p&&(f=n.substring(0,p+1)+f)}null!=e&&null!=f&&e.stat.path_lower.substring(1)!==f.toLowerCase()?this.checkExists(f,mxUtils.bind(this,function(u,G,H){u?(u=mxUtils.bind(this,function(F){F=mxUtils.bind(this,function(){return this.client.filesMove({from_path:e.stat.path_display,to_path:"/"+f,autorename:!1})});this.executePromise(F,c,l)}),G&&H.path_lower.substring(1)!==f.toLowerCase()?(G=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"++f.toLowerCase()})}),this.executePromise(G,u,l)):u()):l()})):l({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(e,f,c,l){this.insertFile(e,f,c,l,!0)};DropboxClient.prototype.insertFile=function(e,f,c,l,n){n=null!=n?n:!1;this.checkExists(e,mxUtils.bind(this,function(p){p?this.saveFile(e,f,mxUtils.bind(this,function(u){n?c(new DropboxLibrary(this.ui,f,u)):c(new DropboxFile(this.ui,f,u))}),l):l()}))};DropboxClient.prototype.saveFile=function(e,f,c,l,n){if(/[\\\/:\?\*"\|]/.test(e))l({message:mxResources.get("dropboxCharsNotAllowed")});+else if(15E7<=f.length)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 150 MB)"});else{n=null!=n?n:"";var p=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+n+e,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([f],{type:"text/plain"})})});this.executePromise(p,c,l)}};DropboxClient.prototype.pickLibrary=function(e){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(f){if(this.ui.spinner.spin(document.body,+mxResources.get("loading"))){var c=mxUtils.bind(this,function(p){this.ui.spinner.stop();this.ui.handleError(p)}),l=null!=f[0].link?f[0].link.indexOf(this.appPath):-1;if(0<l){var n=decodeURIComponent(f[0].link.substring(l+this.appPath.length-1));this.readFile({path:n},mxUtils.bind(this,function(p,u){if(null!=u&&u.id==f[0].id)try{this.ui.spinner.stop(),e(n.substring(1),new DropboxLibrary(this.ui,p,u))}catch(G){this.ui.handleError(G)}else this.createLibrary(f[0],e,c)}),c)}else this.createLibrary(f[0],+e,c)}})})};DropboxClient.prototype.createLibrary=function(e,f,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(l){this.insertFile(e.name,l,mxUtils.bind(this,function(n){try{this.ui.spinner.stop(),f(n.getHash().substring(1),n)}catch(p){c(p)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(e,f){null!=+Dropbox.choose?(e=null!=e?e:mxUtils.bind(this,function(c,l){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):l.getHash(),null,l)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(f)this.ui.spinner.stop(),e(c[0].link);else{var l=mxUtils.bind(this,function(H){this.ui.spinner.stop();this.ui.handleError(H)}),n=mxUtils.bind(this,function(H,F){this.ui.spinner.stop();e(H,+F)}),p=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&p)n(c[0].link);else{var u=null!=c[0].link?c[0].link.indexOf(this.appPath):-1;if(0<u){var G=decodeURIComponent(c[0].link.substring(u+this.appPath.length-1));this.readFile({path:G},mxUtils.bind(this,function(H,F){if(null!=F&&F.id==c[0].id){var K=p?H.lastIndexOf(","):-1;this.ui.spinner.stop();var d=null;0<K&&(K=this.ui.extractGraphModelFromPng(H),null!=K&&0<K.length?H=K:d=new LocalFile(this,+H,G,!0));e(G.substring(1),null!=d?d:new DropboxFile(this.ui,H,F))}else this.createFile(c[0],n,l)}),l,p)}else this.createFile(c[0],n,l)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(e,f,c){var l=/(\.png)$/i.test(e.name);this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(n){null!=n&&0<n.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,+function(){var p=l?n.lastIndexOf(","):-1;0<p&&(p=this.ui.extractGraphModelFromPng(n.substring(p+1)),null!=p&&0<p.length&&(n=p));this.insertFile(e.name,n,mxUtils.bind(this,function(u){f(e.name,u)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,l)}})();OneDriveFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};OneDriveFile.prototype.getFileUrl=function(){var b=this.meta.webUrl;b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType){var e=this.meta.parentReference.path;e=e.substring(e.indexOf("/root:")+6);var f=this.meta.webUrl;b=f.substring(0,f.length-e.length-encodeURIComponent(this.meta.name).length-1);f=f.substring(f.indexOf("/",8));b=b+"/Forms/AllItems.aspx?id="+f+"&parent="+f.substring(0,f.lastIndexOf("/"))}else if("business"==this.meta.parentReference.driveType){b=this.meta["@microsoft.graph.downloadUrl"];var c=b.indexOf("/_layouts/15/download.aspx?");e=f=this.meta.webUrl;f=f.substring(8);f=f.substring(f.indexOf("/"));e=e.substring(0,e.lastIndexOf("/"));e=e.substring(e.indexOf("/",8));b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+-f+"&parent="+e}}catch(k){}return b};OneDriveFile.prototype.getFolderUrl=function(){var b=this.meta.webUrl,e=encodeURIComponent(this.meta.name);b.substring(b.length-e.length,b.length)==e&&(b=b.substring(0,b.length-e.length));return b};OneDriveFile.prototype.share=function(){this.ui.openLink(this.getFileUrl())};OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};+f+"&parent="+e}}catch(l){}return b};OneDriveFile.prototype.getFolderUrl=function(){var b=this.meta.webUrl,e=encodeURIComponent(this.meta.name);b.substring(b.length-e.length,b.length)==e&&(b=b.substring(0,b.length-e.length));return b};OneDriveFile.prototype.share=function(){this.ui.openLink(this.getFileUrl())};OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getIdOf=function(b,e){return(null!=b.parentReference&&null!=b.parentReference.driveId?b.parentReference.driveId+"/":"")+(null!=e?b.parentReference.id:b.id+(b.folder&&b.folder.isRoot?"/root":""))};OneDriveFile.prototype.getChannelId=function(){return"W-"+DrawioFile.prototype.getChannelId.apply(this,arguments)};OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.getId())};OneDriveFile.prototype.getMode=function(){return App.MODE_ONEDRIVE};OneDriveFile.prototype.isAutosaveOptional=function(){return!0};OneDriveFile.prototype.getTitle=function(){return this.meta.name};OneDriveFile.prototype.isRenamable=function(){return!0};OneDriveFile.prototype.isOptimisticSync=function(){return!0};OneDriveFile.prototype.isSyncSupported=function(){return!0};OneDriveFile.prototype.getSize=function(){return this.meta.size};OneDriveFile.prototype.isConflict=function(b){return null!=b&&(412==b.getStatus()||409==b.getStatus())};OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?this.ui.oneDrive.user:null};OneDriveFile.prototype.loadDescriptor=function(b,e){this.ui.oneDrive.executeRequest(this.ui.oneDrive.getItemURL(this.getId()),mxUtils.bind(this,function(f){200<=f.getStatus()&&299>=f.getStatus()?b(JSON.parse(f.getText())):null!=e&&e()}),e)};OneDriveFile.prototype.getLatestVersion=function(b,e){this.ui.oneDrive.getFile(this.getId(),b,e)};OneDriveFile.prototype.getDescriptor=function(){return this.meta};OneDriveFile.prototype.setDescriptor=function(b){this.meta=b};OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,e){b.eTag=e};OneDriveFile.prototype.loadPatchDescriptor=function(b,e){var f=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(f+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):e(this.ui.oneDrive.parseRequestText(c))}),e)};-OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,e,f,c,k){this.doSave(this.getTitle(),b,e,f,c,k)};OneDriveFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)};-OneDriveFile.prototype.doSave=function(b,e,f,c,k,p){var q=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=q;this.saveFile(b,e,f,c,k,p)}),c,k,p])};-OneDriveFile.prototype.saveFile=function(b,e,f,c,k,p){if(!this.isEditable())null!=f&&f();else if(!this.savingFile)if(this.getTitle()==b){var q=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var u=p||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),E=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(H,D){this.setModified(this.getShadowModified());-this.savingFile=!1;this.meta=H;this.fileSaved(D,E,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f()}),c)}),mxUtils.bind(this,function(H,D){try{this.savingFile=!1,this.isConflict(D)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();q()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&-c(H)}catch(L){if(this.savingFile=!1,null!=c)c(L);else throw L;}}),u)}catch(H){if(this.savingFile=!1,null!=c)c(H);else throw H;}});q()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(u){this.setModified(this.getShadowModified());this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(u)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};-OneDriveFile.prototype.rename=function(b,e,f){var c=this.getCurrentRevisionId();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(k){this.hasSameExtension(b,this.getTitle())?(this.meta=k,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(k)):(this.meta=k,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,f))}),f)};-OneDriveFile.prototype.move=function(b,e,f){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.meta=c;this.descriptorChanged();null!=e&&e(c)}),f)};OneDriveLibrary=function(b,e,f){OneDriveFile.call(this,b,e,f)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,e,f){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c){this.desc=c;null!=e&&e(c)}),f)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(e,f,c,k){null==f&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(f=!0);null==c&&(c=null!=window.Editor?Editor.oneDriveInlinePicker:!0);null==k&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(k=!0);DrawioClient.call(this,e,f?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=f;this.inlinePicker=c;this.noLogout=k;e=JSON.parse(this.token);null!=e&&(this.endpointHint=null!=e.endpointHint?e.endpointHint.replace("/Documents",+OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};OneDriveFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)};+OneDriveFile.prototype.doSave=function(b,e,f,c,l,n){var p=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=p;this.saveFile(b,e,f,c,l,n)}),c,l,n])};+OneDriveFile.prototype.saveFile=function(b,e,f,c,l,n){if(!this.isEditable())null!=f&&f();else if(!this.savingFile)if(this.getTitle()==b){var p=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var u=n||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),G=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(H,F){this.setModified(this.getShadowModified());+this.savingFile=!1;this.meta=H;this.fileSaved(F,G,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f()}),c)}),mxUtils.bind(this,function(H,F){try{this.savingFile=!1,this.isConflict(F)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();p()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&+c(H)}catch(K){if(this.savingFile=!1,null!=c)c(K);else throw K;}}),u)}catch(H){if(this.savingFile=!1,null!=c)c(H);else throw H;}});p()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(u){this.setModified(this.getShadowModified());this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(u)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};+OneDriveFile.prototype.rename=function(b,e,f){var c=this.getCurrentRevisionId();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.meta=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(l)):(this.meta=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,f))}),f)};+OneDriveFile.prototype.move=function(b,e,f){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.meta=c;this.descriptorChanged();null!=e&&e(c)}),f)};OneDriveLibrary=function(b,e,f){OneDriveFile.call(this,b,e,f)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,e,f){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c){this.desc=c;null!=e&&e(c)}),f)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(e,f,c,l){null==f&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(f=!0);null==c&&(c=null!=window.Editor?Editor.oneDriveInlinePicker:!0);null==l&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(l=!0);DrawioClient.call(this,e,f?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=f;this.inlinePicker=c;this.noLogout=l;e=JSON.parse(this.token);null!=e&&(this.endpointHint=null!=e.endpointHint?e.endpointHint.replace("/Documents","/_layouts/15/onedrive.aspx"):e.endpointHint)};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"95e4b4ed-ed5c-4a05-935b-b411b4562ef2":"24b129a6-117b-4394-bdc8-3b9955e5cdef");OneDriveClient.prototype.clientId="app.diagrams.net"==window.location.hostname?"b5ff67d6-3155-4fca-965a-59a3655c4476":OneDriveClient.prototype.clientId;OneDriveClient.prototype.clientId="viewer.diagrams.net"==window.location.hostname?"417a451a-a343-4788-b6c1-901e63182565":OneDriveClient.prototype.clientId;OneDriveClient.prototype.scopes="user.read files.readwrite.all sites.read.all";OneDriveClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"microsoft";OneDriveClient.prototype.pickerRedirectUri=window.DRAWIO_SERVER_URL+"onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=OneDriveClient.prototype.defEndpointHint;OneDriveClient.prototype.rootId={id:"root",name:"root",parentReference:{driveId:"me"}};OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.authUrl="https://login.microsoftonline.com/"+(window.DRAWIO_MSGRAPH_TENANT_ID||"common");OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=-function(e){if(null==e||""===e)return!1;for(var f=0;f<this.invalidFilenameRegExs.length;f++)if(this.invalidFilenameRegExs[f].test(e))return!1;return!0};OneDriveClient.prototype.get=function(e,f,c){e=new mxXmlRequest(e,null,"GET");e.setRequestHeaders=mxUtils.bind(this,function(k,p){k.setRequestHeader("Authorization","Bearer "+b)});e.send(f,c);return e};OneDriveClient.prototype.updateUser=function(e,f,c){var k=!0,p=window.setTimeout(mxUtils.bind(this,function(){k=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout);-this.get(this.baseUrl+"/me",mxUtils.bind(this,function(q){window.clearTimeout(p);if(k)if(200>q.getStatus()||300<=q.getStatus())c?f({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f));else try{var u=JSON.parse(q.getText());this.setUser(new DrawioUser(u.id,u.mail,u.displayName));e()}catch(E){f(E)}}),mxUtils.bind(this,function(q){window.clearTimeout(p);k&&f(q)}))};OneDriveClient.prototype.resetTokenRefresh=function(e){null!=-this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<e&&(this.tokenRefreshInterval=1E3*e,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*e))};OneDriveClient.prototype.authenticate=function(e,f,c){this.isExtAuth?(window.oneDriveAuth?window.oneDriveAuth:window.parent.oneDriveAuth)(mxUtils.bind(this,function(k){this.updateAuthInfo(k,!0,null==this.endpointHint,e,f)}),f,null!=-window.urlParams&&"1"==urlParams.odAuthCancellable):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(k){200<=k.getStatus()&&299>=k.getStatus()?this.authenticateStep2(k.getText(),e,f,c):null!=f&&f(k)}),f)};OneDriveClient.prototype.updateAuthInfo=function(e,f,c,k,p){c&&this.setUser(null);b=e.access_token;delete e.access_token;e.expiresOn=Date.now()+1E3*e.expires_in;this.tokenExpiresOn=e.expiresOn;e.remember=f;this.setPersistentToken(JSON.stringify(e),!f);-this.resetTokenRefresh(e.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){k()}),p):k()};OneDriveClient.prototype.authenticateStep2=function(e,f,c,k){if(null==window.onOneDriveCallback){var p=mxUtils.bind(this,function(){var q=!0,u=JSON.parse(this.getPersistentToken(!0));null!=u?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(E){if(200<=E.getStatus()&&-299>=E.getStatus())try{this.updateAuthInfo(JSON.parse(E.getText()),u.remember,!1,f,c)}catch(H){c({message:mxResources.get("authFailed"),retry:p})}else this.clearPersistentToken(),this.setUser(null),b=null,401!=E.getStatus()&&400!=E.getStatus()||k?c({message:mxResources.get("accessDenied"),retry:p}):p()}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(E,H){var D=this.authUrl+"/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+-"&scope="+encodeURIComponent(this.scopes+(E?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e);D=window.open(D,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=D&&(window.onOneDriveCallback=mxUtils.bind(this,function(L,G){if(q){window.onOneDriveCallback=-null;q=!1;try{null==L?c({message:mxResources.get("accessDenied"),retry:p}):(null!=H&&H(),this.updateAuthInfo(L,E,!0,f,c))}catch(d){c(d)}finally{null!=G&&G.close()}}else null!=G&&G.close()}),D.focus())}),mxUtils.bind(this,function(){q&&(window.onOneDriveCallback=null,q=!1,c({message:mxResources.get("accessDenied"),retry:p}))}))});p()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(e,f){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=-c.getStatus()&&299>=c.getStatus()){var k=JSON.parse(c.getText());0<k.webUrl.indexOf(".sharepoint.com")?this.endpointHint=k.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var p=JSON.parse(this.getPersistentToken(!0));null!=p&&(p.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(p),!p.remember));e();return}}catch(q){}f({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),f)};OneDriveClient.prototype.executeRequest=-function(e,f,c){var k=mxUtils.bind(this,function(p){var q=!0,u=window.setTimeout(mxUtils.bind(this,function(){q=!1;c({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(E){window.clearTimeout(u);q&&(200<=E.getStatus()&&299>=E.getStatus()||404==E.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(E)):p||401!==E.getStatus()&&400!==E.getStatus()?c(this.parseRequestText(E)):this.authenticate(function(){k(!0)},c,p))}),mxUtils.bind(this,-function(E){window.clearTimeout(u);q&&c(E)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){k(!0)},c):k(!1)};OneDriveClient.prototype.checkToken=function(e,f){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,null!=f?f:this.emptyFn):e()};OneDriveClient.prototype.getItemRef=function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<-c.length?(e=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)):(f?"":this.baseUrl)+"/me/drive/items/"+e};OneDriveClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(e){var f=e.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');0<f&&(e=e.substring(0,f));return e};OneDriveClient.prototype.getFile=function(e,f,c,k,p){p=null!=p?p:!1;this.executeRequest(this.getItemURL(e),-mxUtils.bind(this,function(q){if(200<=q.getStatus()&&299>=q.getStatus()){var u=JSON.parse(q.getText()),E=/\.png$/i.test(u.name);if(/\.v(dx|sdx?)$/i.test(u.name)||/\.gliffy$/i.test(u.name)||/\.pdf$/i.test(u.name)||!this.ui.useCanvasForExport&&E)this.ui.convertFile(u["@microsoft.graph.downloadUrl"],u.name,null!=u.file?u.file.mimeType:null,this.extension,f,c);else{var H=!0,D=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(u["@microsoft.graph.downloadUrl"],-mxUtils.bind(this,function(L){try{if(window.clearTimeout(D),H){/\.html$/i.test(u.name)&&(L=this.removeExtraHtmlContent(L));var G=null;if(0<(E?L.lastIndexOf(","):-1)){var d=this.ui.extractGraphModelFromPng(L);null!=d&&0<d.length?L=d:G=new LocalFile(this.ui,L,u.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==L.substring(0,32)){var g=L.substring(22);L=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(L,u["@microsoft.graph.downloadUrl"])?-this.ui.parseFileData(L,mxUtils.bind(this,function(m){try{4==m.readyState&&(200<=m.status&&299>=m.status?f(new LocalFile(this.ui,m.responseText,u.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(t){if(null!=c)c(t);else throw t;}}),u.name):null!=G?f(G):p?f(new OneDriveLibrary(this.ui,L,u)):f(new OneDriveFile(this.ui,L,u))}}catch(m){if(null!=c)c(m);else throw m;}}),mxUtils.bind(this,function(L){window.clearTimeout(D);H&&c(this.parseRequestText(L))}),E||null!=-u.file&&null!=u.file.mimeType&&("image/"==u.file.mimeType.substring(0,6)&&"image/svg"!=u.file.mimeType.substring(0,9)||"application/pdf"==u.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(q))}),function(q){null!=c&&(null!=q&&null!=q.error&&"ObjectHandle is Invalid"===q.error.message&&(q.error.message=mxResources.get("fileNotFoundOrDenied")),c(q))})};OneDriveClient.prototype.renameFile=-function(e,f,c,k){null!=e&&null!=f&&(this.isValidFilename(f)?this.checkExists(e.getParentId(),f,!1,mxUtils.bind(this,function(p){p?this.writeFile(this.getItemURL(e.getId()),JSON.stringify({name:f}),"PATCH","application/json",c,k):k()})):k({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(e,f,c,k){f=this.getItemRef(f);var p=this.getItemRef(e);f.driveId!=p.driveId?k({message:mxResources.get("cannotMoveOneDrive",-null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(e),JSON.stringify({parentReference:f}),"PATCH","application/json",c,k)};OneDriveClient.prototype.insertLibrary=function(e,f,c,k,p){this.insertFile(e,f,c,k,!0,p)};OneDriveClient.prototype.insertFile=function(e,f,c,k,p,q){this.isValidFilename(e)?(p=null!=p?p:!1,this.checkExists(q,e,!0,mxUtils.bind(this,function(u){if(u){u="/me/drive/root";null!=q&&(u=this.getItemURL(q,!0));var E=mxUtils.bind(this,function(H){p?-c(new OneDriveLibrary(this.ui,f,H)):c(new OneDriveFile(this.ui,f,H))});u=this.baseUrl+u+"/children/"+encodeURIComponent(e)+"/content";4E6<=f.length?this.writeFile(u,"","PUT",null,mxUtils.bind(this,function(H){this.writeLargeFile(this.getItemURL(H.id),f,E,k)}),k):this.writeFile(u,f,"PUT",null,E,k)}else k()}))):k({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f,-c,k){var p="/me/drive/root";null!=e&&(p=this.getItemURL(e,!0));this.executeRequest(this.baseUrl+p+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(q){404==q.getStatus()?k(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){k(!0)},function(){k(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){k(!1)}))}),function(q){k(!1)},!0)};OneDriveClient.prototype.saveFile=function(e,-f,c,k){try{var p=e.getData(),q=mxUtils.bind(this,function(E){var H=mxUtils.bind(this,function(L){f(L,p)}),D=this.getItemURL(e.getId());4E6<=E.length?this.writeLargeFile(D,E,H,c,k):this.writeFile(D+"/content/",E,"PUT",null,H,c,k)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var u=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(E){q(this.ui.base64ToBlob(E,"image/png"))}),c,this.ui.getCurrentFile()!=e?p:null,u.scale,u.border)}else q(p)}catch(E){c(E)}};-OneDriveClient.prototype.writeLargeFile=function(e,f,c,k,p){try{if(null!=f){var q=(new TextEncoder).encode(f).length,u=mxUtils.bind(this,function(H,D,L,G){try{G=G||0;var d=!0,g=null;g=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var m=f.substr(D,4194304),t=(new TextEncoder).encode(m).length,v=new mxXmlRequest(H,m,"PUT");v.setRequestHeaders=mxUtils.bind(this,function(y,C){y.setRequestHeader("Content-Range","bytes "+L+"-"+(L+t-1)+"/"+q)});v.send(mxUtils.bind(this,-function(y){window.clearTimeout(g);if(d){var C=y.getStatus();200<=C&&299>=C?(C=D+m.length,C==f.length?c(JSON.parse(y.getText())):u(H,C,L+t,G)):500<=C&&599>=C&&2>G?(G++,u(H,D,L,G)):k(this.parseRequestText(y),y)}}),mxUtils.bind(this,function(y){window.clearTimeout(g);d&&k(this.parseRequestText(y))}))}catch(y){k(y)}}),E=mxUtils.bind(this,function(H){try{var D=!0,L=null;try{L=window.setTimeout(mxUtils.bind(this,function(){D=!1;k({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(d){}var G=new mxXmlRequest(e+-"/createUploadSession","{}","POST");G.setRequestHeaders=mxUtils.bind(this,function(d,g){d.setRequestHeader("Content-Type","application/json");d.setRequestHeader("Authorization","Bearer "+b);null!=p&&d.setRequestHeader("If-Match",p)});G.send(mxUtils.bind(this,function(d){window.clearTimeout(L);D&&(200<=d.getStatus()&&299>=d.getStatus()?(d=JSON.parse(d.getText()),u(d.uploadUrl,0,0)):H||401!==d.getStatus()?k(this.parseRequestText(d),d):this.authenticate(function(){E(!0)},k,H))}),mxUtils.bind(this,function(d){window.clearTimeout(L);-D&&k(this.parseRequestText(d))}))}catch(d){k(d)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){E(!0)},k):E(!1)}else k({message:mxResources.get("unknownError")})}catch(H){k(H)}};OneDriveClient.prototype.writeFile=function(e,f,c,k,p,q,u){try{if(null!=e&&null!=f){var E=mxUtils.bind(this,function(H){try{var D=!0,L=null;try{L=window.setTimeout(mxUtils.bind(this,function(){D=!1;q({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(d){}var G=new mxXmlRequest(e,f,c);G.setRequestHeaders=-mxUtils.bind(this,function(d,g){d.setRequestHeader("Content-Type",k||" ");d.setRequestHeader("Authorization","Bearer "+b);null!=u&&d.setRequestHeader("If-Match",u)});G.send(mxUtils.bind(this,function(d){window.clearTimeout(L);D&&(200<=d.getStatus()&&299>=d.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),p(JSON.parse(d.getText()))):H||401!==d.getStatus()?q(this.parseRequestText(d),d):this.authenticate(function(){E(!0)},q,H))}),mxUtils.bind(this,function(d){window.clearTimeout(L);-D&&q(this.parseRequestText(d))}))}catch(d){q(d)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){E(!0)},q):E(!1)}else q({message:mxResources.get("unknownError")})}catch(H){q(H)}};OneDriveClient.prototype.parseRequestText=function(e){var f={message:mxResources.get("unknownError")};try{f=JSON.parse(e.getText()),f.status=e.getStatus(),f.error&&(f.error.status=f.status,f.error.code=f.status)}catch(c){}return f};OneDriveClient.prototype.pickLibrary=function(e){this.pickFile(function(f){e(f)})};-OneDriveClient.prototype.createInlinePicker=function(e,f,c){return mxUtils.bind(this,function(){var k=null,p=document.createElement("div");p.style.position="relative";var q=new CustomDialog(this.ui,p,mxUtils.bind(this,function(){var u=k.getSelectedItem();if(null!=u)if(f&&"object"==typeof u.folder)e({value:[u]});else{if(!u.folder&&this.ui.spinner.spin(document.body,mxResources.get("loading"))){var E=OneDriveFile.prototype.getIdOf(u);this.executeRequest(this.getItemURL(E),mxUtils.bind(this,function(H){this.ui.spinner.stop();-200<=H.getStatus()&&299>=H.getStatus()?(H=JSON.parse(H.getText()),e(E,{value:[H]})):this.ui.handleError({code:H.getStatus()})}),mxUtils.bind(this,function(H){this.ui.spinner.stop();this.ui.handleError(H)}))}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(f?"select":"open"),null,null,null,null,!0);this.ui.showDialog(q.container,550,500,!0,!0);p.style.width=q.container.parentNode.style.width;p.style.height=parseInt(q.container.parentNode.style.height)-60+"px";-k=new mxODPicker(p,null,mxUtils.bind(this,function(u,E,H,D){this.executeRequest(D?u:this.baseUrl+u,function(L){E(JSON.parse(L.getText()))},H)}),mxUtils.bind(this,function(u,E,H,D){this.executeRequest(this.baseUrl+"/drives/"+E+"/items/"+u,function(L){H(JSON.parse(L.getText()))},D)}),null,null,function(u){f?e({value:[u]}):e(OneDriveFile.prototype.getIdOf(u))},mxUtils.bind(this,function(u){this.ui.showError(mxResources.get("error"),u)}),f,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=-function(e,f){var c=mxUtils.bind(this,function(p){this.ui.showError(mxResources.get("error"),p&&p.message?p.message:p)}),k=mxUtils.bind(this,function(p){var q=this.inlinePicker?this.createInlinePicker(e,!0):mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,-function(u){e(u);mxClient.IS_IE11&&(b=u.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});p?q():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){e({value:[this.rootId]})}),q,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){k(this.inlinePicker&&f)}),c):k(f)};OneDriveClient.prototype.pickFile=-function(e,f){e=null!=e?e:mxUtils.bind(this,function(p){this.ui.loadFile("W"+encodeURIComponent(p))});var c=mxUtils.bind(this,function(p){this.ui.showError(mxResources.get("error"),p&&p.message?p.message:p)}),k=this.inlinePicker?this.createInlinePicker(e,null,f):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference,webUrl",-accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(p){null!=p&&null!=p.value&&0<p.value.length&&(mxClient.IS_IE11&&(b=p.accessToken),e(OneDriveFile.prototype.getIdOf(p.value[0]),p))}),cancel:mxUtils.bind(this,function(){}),error:c});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.inlinePicker?k():this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),-mxUtils.bind(this,function(){this.ui.hideDialog();k()}))).container,300,140,!0,!0)}),c):k()};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var e=localStorage.getItem("odpickerv7cache");null!=e&&'{"odsdkLoginHint":{'==e.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}window.open(this.authUrl+"/oauth2/v2.0/logout","logout","width=525,height=525,status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes");this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="++function(e){if(null==e||""===e)return!1;for(var f=0;f<this.invalidFilenameRegExs.length;f++)if(this.invalidFilenameRegExs[f].test(e))return!1;return!0};OneDriveClient.prototype.get=function(e,f,c){e=new mxXmlRequest(e,null,"GET");e.setRequestHeaders=mxUtils.bind(this,function(l,n){l.setRequestHeader("Authorization","Bearer "+b)});e.send(f,c);return e};OneDriveClient.prototype.updateUser=function(e,f,c){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout);+this.get(this.baseUrl+"/me",mxUtils.bind(this,function(p){window.clearTimeout(n);if(l)if(200>p.getStatus()||300<=p.getStatus())c?f({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f));else try{var u=JSON.parse(p.getText());this.setUser(new DrawioUser(u.id,u.mail,u.displayName));e()}catch(G){f(G)}}),mxUtils.bind(this,function(p){window.clearTimeout(n);l&&f(p)}))};OneDriveClient.prototype.resetTokenRefresh=function(e){null!=+this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<e&&(this.tokenRefreshInterval=1E3*e,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*e))};OneDriveClient.prototype.authenticate=function(e,f,c){this.isExtAuth?(window.oneDriveAuth?window.oneDriveAuth:window.parent.oneDriveAuth)(mxUtils.bind(this,function(l){this.updateAuthInfo(l,!0,null==this.endpointHint,e,f)}),f,null!=+window.urlParams&&"1"==urlParams.odAuthCancellable):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()?this.authenticateStep2(l.getText(),e,f,c):null!=f&&f(l)}),f)};OneDriveClient.prototype.updateAuthInfo=function(e,f,c,l,n){c&&this.setUser(null);b=e.access_token;delete e.access_token;e.expiresOn=Date.now()+1E3*e.expires_in;this.tokenExpiresOn=e.expiresOn;e.remember=f;this.setPersistentToken(JSON.stringify(e),!f);+this.resetTokenRefresh(e.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){l()}),n):l()};OneDriveClient.prototype.authenticateStep2=function(e,f,c,l){if(null==window.onOneDriveCallback){var n=mxUtils.bind(this,function(){var p=!0,u=JSON.parse(this.getPersistentToken(!0));null!=u?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(G){if(200<=G.getStatus()&&+299>=G.getStatus())try{this.updateAuthInfo(JSON.parse(G.getText()),u.remember,!1,f,c)}catch(H){c({message:mxResources.get("authFailed"),retry:n})}else this.clearPersistentToken(),this.setUser(null),b=null,401!=G.getStatus()&&400!=G.getStatus()||l?c({message:mxResources.get("accessDenied"),retry:n}):n()}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(G,H){var F=this.authUrl+"/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)++"&scope="+encodeURIComponent(this.scopes+(G?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e);F=window.open(F,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=F&&(window.onOneDriveCallback=mxUtils.bind(this,function(K,d){if(p){window.onOneDriveCallback=+null;p=!1;try{null==K?c({message:mxResources.get("accessDenied"),retry:n}):(null!=H&&H(),this.updateAuthInfo(K,G,!0,f,c))}catch(g){c(g)}finally{null!=d&&d.close()}}else null!=d&&d.close()}),F.focus())}),mxUtils.bind(this,function(){p&&(window.onOneDriveCallback=null,p=!1,c({message:mxResources.get("accessDenied"),retry:n}))}))});n()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(e,f){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=+c.getStatus()&&299>=c.getStatus()){var l=JSON.parse(c.getText());0<l.webUrl.indexOf(".sharepoint.com")?this.endpointHint=l.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var n=JSON.parse(this.getPersistentToken(!0));null!=n&&(n.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(n),!n.remember));e();return}}catch(p){}f({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),f)};OneDriveClient.prototype.executeRequest=+function(e,f,c){var l=mxUtils.bind(this,function(n){var p=!0,u=window.setTimeout(mxUtils.bind(this,function(){p=!1;c({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(G){window.clearTimeout(u);p&&(200<=G.getStatus()&&299>=G.getStatus()||404==G.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(G)):n||401!==G.getStatus()&&400!==G.getStatus()?c(this.parseRequestText(G)):this.authenticate(function(){l(!0)},c,n))}),mxUtils.bind(this,+function(G){window.clearTimeout(u);p&&c(G)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},c):l(!1)};OneDriveClient.prototype.checkToken=function(e,f){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,null!=f?f:this.emptyFn):e()};OneDriveClient.prototype.getItemRef=function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<+c.length?(e=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)):(f?"":this.baseUrl)+"/me/drive/items/"+e};OneDriveClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(e){var f=e.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');0<f&&(e=e.substring(0,f));return e};OneDriveClient.prototype.getFile=function(e,f,c,l,n){n=null!=n?n:!1;this.executeRequest(this.getItemURL(e),+mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus()){var u=JSON.parse(p.getText()),G=/\.png$/i.test(u.name);if(/\.v(dx|sdx?)$/i.test(u.name)||/\.gliffy$/i.test(u.name)||/\.pdf$/i.test(u.name)||!this.ui.useCanvasForExport&&G)this.ui.convertFile(u["@microsoft.graph.downloadUrl"],u.name,null!=u.file?u.file.mimeType:null,this.extension,f,c);else{var H=!0,F=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(u["@microsoft.graph.downloadUrl"],+mxUtils.bind(this,function(K){try{if(window.clearTimeout(F),H){/\.html$/i.test(u.name)&&(K=this.removeExtraHtmlContent(K));var d=null;if(0<(G?K.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(K);null!=g&&0<g.length?K=g:d=new LocalFile(this.ui,K,u.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==K.substring(0,32)){var k=K.substring(22);K=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(K,u["@microsoft.graph.downloadUrl"])?+this.ui.parseFileData(K,mxUtils.bind(this,function(v){try{4==v.readyState&&(200<=v.status&&299>=v.status?f(new LocalFile(this.ui,v.responseText,u.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(t){if(null!=c)c(t);else throw t;}}),u.name):null!=d?f(d):n?f(new OneDriveLibrary(this.ui,K,u)):f(new OneDriveFile(this.ui,K,u))}}catch(v){if(null!=c)c(v);else throw v;}}),mxUtils.bind(this,function(K){window.clearTimeout(F);H&&c(this.parseRequestText(K))}),G||null!=+u.file&&null!=u.file.mimeType&&("image/"==u.file.mimeType.substring(0,6)&&"image/svg"!=u.file.mimeType.substring(0,9)||"application/pdf"==u.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(p))}),function(p){null!=c&&(null!=p&&null!=p.error&&"ObjectHandle is Invalid"===p.error.message&&(p.error.message=mxResources.get("fileNotFoundOrDenied")),c(p))})};OneDriveClient.prototype.renameFile=+function(e,f,c,l){null!=e&&null!=f&&(this.isValidFilename(f)?this.checkExists(e.getParentId(),f,!1,mxUtils.bind(this,function(n){n?this.writeFile(this.getItemURL(e.getId()),JSON.stringify({name:f}),"PATCH","application/json",c,l):l()})):l({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(e,f,c,l){f=this.getItemRef(f);var n=this.getItemRef(e);f.driveId!=n.driveId?l({message:mxResources.get("cannotMoveOneDrive",+null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(e),JSON.stringify({parentReference:f}),"PATCH","application/json",c,l)};OneDriveClient.prototype.insertLibrary=function(e,f,c,l,n){this.insertFile(e,f,c,l,!0,n)};OneDriveClient.prototype.insertFile=function(e,f,c,l,n,p){this.isValidFilename(e)?(n=null!=n?n:!1,this.checkExists(p,e,!0,mxUtils.bind(this,function(u){if(u){u="/me/drive/root";null!=p&&(u=this.getItemURL(p,!0));var G=mxUtils.bind(this,function(H){n?+c(new OneDriveLibrary(this.ui,f,H)):c(new OneDriveFile(this.ui,f,H))});u=this.baseUrl+u+"/children/"+encodeURIComponent(e)+"/content";4E6<=f.length?this.writeFile(u,"","PUT",null,mxUtils.bind(this,function(H){this.writeLargeFile(this.getItemURL(H.id),f,G,l)}),l):this.writeFile(u,f,"PUT",null,G,l)}else l()}))):l({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f,+c,l){var n="/me/drive/root";null!=e&&(n=this.getItemURL(e,!0));this.executeRequest(this.baseUrl+n+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(p){404==p.getStatus()?l(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){l(!0)},function(){l(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){l(!1)}))}),function(p){l(!1)},!0)};OneDriveClient.prototype.saveFile=function(e,+f,c,l){try{var n=e.getData(),p=mxUtils.bind(this,function(G){var H=mxUtils.bind(this,function(K){f(K,n)}),F=this.getItemURL(e.getId());4E6<=G.length?this.writeLargeFile(F,G,H,c,l):this.writeFile(F+"/content/",G,"PUT",null,H,c,l)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var u=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(G){p(this.ui.base64ToBlob(G,"image/png"))}),c,this.ui.getCurrentFile()!=e?n:null,u.scale,u.border)}else p(n)}catch(G){c(G)}};+OneDriveClient.prototype.writeLargeFile=function(e,f,c,l,n){try{if(null!=f){var p=(new TextEncoder).encode(f).length,u=mxUtils.bind(this,function(H,F,K,d){try{d=d||0;var g=!0,k=null;k=window.setTimeout(mxUtils.bind(this,function(){g=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var v=f.substr(F,4194304),t=(new TextEncoder).encode(v).length,x=new mxXmlRequest(H,v,"PUT");x.setRequestHeaders=mxUtils.bind(this,function(A,J){A.setRequestHeader("Content-Range","bytes "+K+"-"+(K+t-1)+"/"+p)});x.send(mxUtils.bind(this,+function(A){window.clearTimeout(k);if(g){var J=A.getStatus();200<=J&&299>=J?(J=F+v.length,J==f.length?c(JSON.parse(A.getText())):u(H,J,K+t,d)):500<=J&&599>=J&&2>d?(d++,u(H,F,K,d)):l(this.parseRequestText(A),A)}}),mxUtils.bind(this,function(A){window.clearTimeout(k);g&&l(this.parseRequestText(A))}))}catch(A){l(A)}}),G=mxUtils.bind(this,function(H){try{var F=!0,K=null;try{K=window.setTimeout(mxUtils.bind(this,function(){F=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(g){}var d=new mxXmlRequest(e++"/createUploadSession","{}","POST");d.setRequestHeaders=mxUtils.bind(this,function(g,k){g.setRequestHeader("Content-Type","application/json");g.setRequestHeader("Authorization","Bearer "+b);null!=n&&g.setRequestHeader("If-Match",n)});d.send(mxUtils.bind(this,function(g){window.clearTimeout(K);F&&(200<=g.getStatus()&&299>=g.getStatus()?(g=JSON.parse(g.getText()),u(g.uploadUrl,0,0)):H||401!==g.getStatus()?l(this.parseRequestText(g),g):this.authenticate(function(){G(!0)},l,H))}),mxUtils.bind(this,function(g){window.clearTimeout(K);+F&&l(this.parseRequestText(g))}))}catch(g){l(g)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){G(!0)},l):G(!1)}else l({message:mxResources.get("unknownError")})}catch(H){l(H)}};OneDriveClient.prototype.writeFile=function(e,f,c,l,n,p,u){try{if(null!=e&&null!=f){var G=mxUtils.bind(this,function(H){try{var F=!0,K=null;try{K=window.setTimeout(mxUtils.bind(this,function(){F=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(g){}var d=new mxXmlRequest(e,f,c);d.setRequestHeaders=+mxUtils.bind(this,function(g,k){g.setRequestHeader("Content-Type",l||" ");g.setRequestHeader("Authorization","Bearer "+b);null!=u&&g.setRequestHeader("If-Match",u)});d.send(mxUtils.bind(this,function(g){window.clearTimeout(K);F&&(200<=g.getStatus()&&299>=g.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),n(JSON.parse(g.getText()))):H||401!==g.getStatus()?p(this.parseRequestText(g),g):this.authenticate(function(){G(!0)},p,H))}),mxUtils.bind(this,function(g){window.clearTimeout(K);+F&&p(this.parseRequestText(g))}))}catch(g){p(g)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){G(!0)},p):G(!1)}else p({message:mxResources.get("unknownError")})}catch(H){p(H)}};OneDriveClient.prototype.parseRequestText=function(e){var f={message:mxResources.get("unknownError")};try{f=JSON.parse(e.getText()),f.status=e.getStatus(),f.error&&(f.error.status=f.status,f.error.code=f.status)}catch(c){}return f};OneDriveClient.prototype.pickLibrary=function(e){this.pickFile(function(f){e(f)})};+OneDriveClient.prototype.createInlinePicker=function(e,f,c){return mxUtils.bind(this,function(){var l=null,n=document.createElement("div");n.style.position="relative";var p=new CustomDialog(this.ui,n,mxUtils.bind(this,function(){var u=l.getSelectedItem();if(null!=u)if(f&&"object"==typeof u.folder)e({value:[u]});else{if(!u.folder&&this.ui.spinner.spin(document.body,mxResources.get("loading"))){var G=OneDriveFile.prototype.getIdOf(u);this.executeRequest(this.getItemURL(G),mxUtils.bind(this,function(H){this.ui.spinner.stop();+200<=H.getStatus()&&299>=H.getStatus()?(H=JSON.parse(H.getText()),e(G,{value:[H]})):this.ui.handleError({code:H.getStatus()})}),mxUtils.bind(this,function(H){this.ui.spinner.stop();this.ui.handleError(H)}))}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(f?"select":"open"),null,null,null,null,!0);this.ui.showDialog(p.container,550,500,!0,!0);n.style.width=p.container.parentNode.style.width;n.style.height=parseInt(p.container.parentNode.style.height)-60+"px";+l=new mxODPicker(n,null,mxUtils.bind(this,function(u,G,H,F){this.executeRequest(F?u:this.baseUrl+u,function(K){G(JSON.parse(K.getText()))},H)}),mxUtils.bind(this,function(u,G,H,F){this.executeRequest(this.baseUrl+"/drives/"+G+"/items/"+u,function(K){H(JSON.parse(K.getText()))},F)}),null,null,function(u){f?e({value:[u]}):e(OneDriveFile.prototype.getIdOf(u))},mxUtils.bind(this,function(u){this.ui.showError(mxResources.get("error"),u)}),f,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=+function(e,f){var c=mxUtils.bind(this,function(n){this.ui.showError(mxResources.get("error"),n&&n.message?n.message:n)}),l=mxUtils.bind(this,function(n){var p=this.inlinePicker?this.createInlinePicker(e,!0):mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,+function(u){e(u);mxClient.IS_IE11&&(b=u.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});n?p():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){e({value:[this.rootId]})}),p,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){l(this.inlinePicker&&f)}),c):l(f)};OneDriveClient.prototype.pickFile=+function(e,f){e=null!=e?e:mxUtils.bind(this,function(n){this.ui.loadFile("W"+encodeURIComponent(n))});var c=mxUtils.bind(this,function(n){this.ui.showError(mxResources.get("error"),n&&n.message?n.message:n)}),l=this.inlinePicker?this.createInlinePicker(e,null,f):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference,webUrl",+accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(n){null!=n&&null!=n.value&&0<n.value.length&&(mxClient.IS_IE11&&(b=n.accessToken),e(OneDriveFile.prototype.getIdOf(n.value[0]),n))}),cancel:mxUtils.bind(this,function(){}),error:c});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.inlinePicker?l():this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),+mxUtils.bind(this,function(){this.ui.hideDialog();l()}))).container,300,140,!0,!0)}),c):l()};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var e=localStorage.getItem("odpickerv7cache");null!=e&&'{"odsdkLoginHint":{'==e.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}window.open(this.authUrl+"/oauth2/v2.0/logout","logout","width=525,height=525,status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes");this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null}})();GitHubFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.peer=this.ui.gitHub};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.share=function(){this.ui.editor.graph.openLink("https://github.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/settings/access")};GitHubFile.prototype.getId=function(){return encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+this.getId())};GitHubFile.prototype.getFileUrl=function(){return"https://github.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/blob/"+this.meta.ref+"/"+this.meta.path};GitHubFile.prototype.getFolderUrl=function(){return"https://github.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/tree/"+this.meta.ref+"/"+this.meta.path.split("/").slice(0,-1).join("/")};GitHubFile.prototype.getPublicUrl=function(b){if(null!=this.meta.download_url)try{""!=(new URL(this.meta.download_url)).search?b(null):mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(e){b(200<=e.getStatus()&&299>=e.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){b(null)}))}catch(e){b(null)}else b(null)};GitHubFile.prototype.isConflict=function(b){return null!=b&&409==b.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(b,e){this.peer.getFile(this.getId(),b,e)};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(b){this.meta=b};GitHubFile.prototype.getDescriptorEtag=function(b){return b.sha};-GitHubFile.prototype.setDescriptorEtag=function(b,e){b.sha=e};GitHubFile.prototype.save=function(b,e,f,c,k,p){this.doSave(this.getTitle(),e,f,c,k,p)};GitHubFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};GitHubFile.prototype.doSave=function(b,e,f,c,k,p){var q=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=q;this.saveFile(b,!1,e,f,c,k,p)}),f,c,k])};-GitHubFile.prototype.saveFile=function(b,e,f,c,k,p,q){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var u=mxUtils.bind(this,function(E){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var H=this.getCurrentEtag(),D=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(L){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,L);this.fileSaved(D,H,mxUtils.bind(this,function(){this.contentChanged();-null!=f&&f()}),c)}),mxUtils.bind(this,function(L){this.savingFile=!1;this.isConflict(L)?(this.inConflictState=!0,null!=c&&(L.commitMessage=E,c(L))):null!=c&&c(L)}),p,E)}catch(L){if(this.savingFile=!1,null!=c)c(L);else throw L;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(L){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(G){this.setModified(this.getShadowModified());this.savingFile=!1;-null!=f&&f();this.ui.fileLoaded(G)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,L,E)}))});null!=q?u(q):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(E){u(E)}),c)}else null!=f&&f()};GitHubLibrary=function(b,e,f){GitHubFile.call(this,b,e,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(e,f){DrawioClient.call(this,e,f||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"github2";GitHubClient.prototype.maxFileSize=-5E7;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,f,c){var k=!0,p=window.setTimeout(mxUtils.bind(this,function(){k=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),q=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),u=this.authToken+" "+b;q.setRequestHeaders=function(E,H){E.setRequestHeader("Authorization",u)};q.send(mxUtils.bind(this,function(){window.clearTimeout(p);k&&(401===-q.getStatus()?c?f({code:q.getStatus(),message:this.getErrorMessage(q,mxResources.get("accessDenied"))}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)):200>q.getStatus()||300<=q.getStatus()?f({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(q.getText()))),e()))}),f)};GitHubClient.prototype.createUser=function(e){return new DrawioUser(e.id,e.email,e.name)};GitHubClient.prototype.authenticate=function(e,f){(new mxXmlRequest(this.redirectUri+-"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitHubClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitHubCallback){var k=mxUtils.bind(this,function(){var p=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(q){if(200<=-q.getStatus()&&299>=q.getStatus())try{b=JSON.parse(q.getText()).access_token,this.setUser(null),f()}catch(u){c({message:mxResources.get("authFailed"),retry:k})}else this.clearPersistentToken(),this.setUser(null),b=null,401==q.getStatus()?k():c({message:mxResources.get("accessDenied"),retry:k})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(q,u){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+-window.location.host+"&token="+e),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(E,H){p?(window.onGitHubCallback=null,p=!1,null==E?c({message:mxResources.get("accessDenied"),retry:k}):(null!=u&&u(),b=E.access_token,this.setUser(null),q&&this.setPersistentToken("remembered"),f(),null!=H&&H.close())):null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:k})}),mxUtils.bind(this,function(){p&&(window.onGitHubCallback=null,p=!1,c({message:mxResources.get("accessDenied"),-retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(e,f){try{var c=JSON.parse(e.getText());null!=c&&null!=c.message&&(f=c.message)}catch(k){}return f};GitHubClient.prototype.showAuthorizeDialog=function(e,f){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/blog/single-repository-diagrams")}),e,mxResources.get("authorize"),-mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,k,p){var q=mxUtils.bind(this,function(E){var H=!0,D=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT,retry:u})}),this.ui.timeout),L=this.authToken+" "+b;e.setRequestHeaders=function(G,d){G.setRequestHeader("Authorization",-L)};e.send(mxUtils.bind(this,function(){window.clearTimeout(D);var G=mxUtils.bind(this,function(){var m=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){m();u()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(H)if(200<=e.getStatus()&&299>=e.getStatus()||k&&404==e.getStatus())f(e);else if(401===e.getStatus())E?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},-c)})}):this.authenticate(function(){q(!0)},c);else if(403===e.getStatus()){var d=!1;try{var g=JSON.parse(e.getText());null!=g&&"Resource not accessible by integration"==g.message?G():(null!=g&&null!=g.errors&&0<g.errors.length&&(d="too_large"==g.errors[0].code),c({message:mxResources.get(d?"drawingTooLarge":"forbidden")}))}catch(m){c({message:mxResources.get(d?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?p?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):-G():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(G){window.clearTimeout(D);H&&c(G)}))}),u=mxUtils.bind(this,function(E){null==this.user?this.updateUser(function(){u(!0)},c,E):q(E)});null==b?this.authenticate(function(){u(!0)},c):u(!1)};GitHubClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};GitHubClient.prototype.getSha=function(e,f,c,k,p,q,u){var E=-"&t="+(new Date).getTime();e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+c+"?ref="+k+E,null,"HEAD");this.executeRequest(e,mxUtils.bind(this,function(H){try{p(H.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(D){q(D)}}),q,null,u)};GitHubClient.prototype.getFile=function(e,f,c,k,p){k=null!=k?k:!1;var q=e.split("/"),u=q[0],E=q[1],H=q[2];e=q.slice(3,q.length).join("/");q=/\.png$/i.test(e);if(!p&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&-q))if(null!=b){p=this.baseUrl+"/repos/"+u+"/"+E+"/contents/"+e+"?ref="+H;var D={Authorization:"token "+b};q=e.split("/");this.ui.convertFile(p,0<q.length?q[q.length-1]:e,null,this.extension,f,c,null,D)}else c({message:mxResources.get("accessDenied")});else q="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+u+"/"+E+"/contents/"+e+"?ref="+H+q,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(L){try{var G=JSON.parse(L.getText());if(""==G.content&&null!=G.git_url){var d=-new mxXmlRequest(G.git_url,null,"GET");this.executeRequest(d,mxUtils.bind(this,function(g){g=JSON.parse(g.getText());""!=g.content?(G.content=g.content,G.encoding=g.encoding,f(this.createGitHubFile(u,E,H,G,k))):c({message:mxResources.get("errorLoadingFile")})}),c)}else f(this.createGitHubFile(u,E,H,G,k))}catch(g){c(g)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f,c,k,p){e={org:e,repo:f,ref:c,name:k.name,path:k.path,sha:k.sha,html_url:k.html_url,download_url:k.download_url};f=k.content;-"base64"===k.encoding&&(/\.jpe?g$/i.test(k.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(k.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(k.name)?(k=this.ui.extractGraphModelFromPng(f),f=null!=k&&0<k.length?k:"data:image/png;base64,"+f):f=Base64.decode(f));return p?new GitHubLibrary(this.ui,f,e):new GitHubFile(this.ui,f,e)};GitHubClient.prototype.insertLibrary=function(e,f,c,k,p){this.insertFile(e,f,c,k,!0,p,!1)};GitHubClient.prototype.insertFile=function(e,f,c,k,p,q,u){p=null!=p?p:!1;q=q.split("/");-var E=q[0],H=q[1],D=q[2],L=q.slice(3,q.length).join("/");0<L.length&&(L+="/");L+=e;this.checkExists(E+"/"+H+"/"+D+"/"+L,!0,mxUtils.bind(this,function(G,d){G?p?(u||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(g){this.writeFile(E,H,D,L,g,f,d,mxUtils.bind(this,function(m){try{var t=JSON.parse(m.getText());c(this.createGitHubFile(E,H,D,t.content,p))}catch(v){k(v)}}),k)}),k)):c(new GitHubFile(this.ui,f,{org:E,repo:H,ref:D,name:e,path:L,sha:d,isNew:!0})):k()}))};GitHubClient.prototype.showCommitDialog=-function(e,f,c,k){var p=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(q){p(function(){c(q)})}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){k()}));this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=function(e,f,c,k,p,q,u,E,H){q.length>=this.maxFileSize?H({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(q.length)+-" / 1 MB)"}):(c={path:k,branch:decodeURIComponent(c),message:p,content:q},null!=u&&(c.sha=u),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+k,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(D){E(D)}),mxUtils.bind(this,function(D){404==D.code&&(D.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,D.code=null);H(D)})))};GitHubClient.prototype.checkExists=function(e,f,c){var k=e.split("/"),p=k[0],q=k[1],u=k[2];e=k.slice(3,k.length).join("/");-this.getSha(p,q,e,u,mxUtils.bind(this,function(E){if(f){var H=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){H();c(!0,E)},function(){H();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(E){c(!0)}),!0)};GitHubClient.prototype.saveFile=function(e,f,c,k,p){var q=e.meta.org,u=e.meta.repo,E=e.meta.ref,H=e.meta.path,D=mxUtils.bind(this,function(G,-d){this.writeFile(q,u,E,H,p,d,G,mxUtils.bind(this,function(g){delete e.meta.isNew;f(JSON.parse(g.getText()).content.sha)}),mxUtils.bind(this,function(g){c(g)}))}),L=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var G=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){D(e.meta.sha,d)}),c,this.ui.getCurrentFile()!=e?e.getData():null,G.scale,G.border)}else D(e.meta.sha,Base64.encode(e.getData()))});k?this.getSha(q,u,-H,E,mxUtils.bind(this,function(G){e.meta.sha=G;L()}),c):L()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e,!0)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog=function(e,f,c){var k=null,p=null,q=null,u=null,E=document.createElement("div");E.style.whiteSpace=-"nowrap";E.style.overflow="hidden";E.style.height="320px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";E.appendChild(H);H=this.ui.createToolbarButton(Editor.refreshImage,mxResources.get("refresh"),mxUtils.bind(this,function(){I()}));H.style.position="absolute";H.style.right="40px";H.style.top="26px";E.appendChild(H);var D=document.createElement("div");D.style.whiteSpace=-"nowrap";D.style.border="1px solid lightgray";D.style.boxSizing="border-box";D.style.padding="4px";D.style.overflow="auto";D.style.lineHeight="1.2em";D.style.height="290px";E.appendChild(D);var L=document.createElement("div");L.style.textOverflow="ellipsis";L.style.boxSizing="border-box";L.style.overflow="hidden";L.style.padding="4px";L.style.width="100%";var G=new CustomDialog(this.ui,E,mxUtils.bind(this,function(){f(k+"/"+p+"/"+encodeURIComponent(q)+"/"+u)}),null,null,"https://www.drawio.com/blog/single-repository-diagrams",-null,null,null,null,[[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]],"16px");this.ui.showDialog(G.container,420,370,!0,!0);e&&G.okButton.parentNode.removeChild(G.okButton);var d=mxUtils.bind(this,function(K,J,U,P){var R=document.createElement("a");R.setAttribute("title",K);R.style.cursor="pointer";mxUtils.write(R,K);mxEvent.addListener(R,"click",-J);P&&(R.style.textDecoration="underline");null!=U&&(K=L.cloneNode(),K.style.padding=U,K.appendChild(R),R=K);return R}),g=mxUtils.bind(this,function(K){var J=document.createElement("div");J.style.marginBottom="8px";J.appendChild(d(k+"/"+p,mxUtils.bind(this,function(){u=null;I()}),null,!0));K||(mxUtils.write(J," / "),J.appendChild(d(decodeURIComponent(q),mxUtils.bind(this,function(){u=null;C()}),null,!0)));if(null!=u&&0<u.length){var U=u.split("/");for(K=0;K<U.length;K++)(function(P){mxUtils.write(J,-" / ");J.appendChild(d(U[P],mxUtils.bind(this,function(){u=U.slice(0,P+1).join("/");y()}),null,!0))})(K)}D.appendChild(J)}),m=mxUtils.bind(this,function(K){this.ui.handleError(K,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(u=q=p=k=null,I()):this.ui.hideDialog()}),null,{})}),t=null,v=null,y=mxUtils.bind(this,function(K){null==K&&(D.innerText="",K=1);var J=new mxXmlRequest(this.baseUrl+"/repos/"+k+"/"+p+"/contents/"+u+"?ref="+encodeURIComponent(q)+"&per_page=100&page="+-K,null,"GET");this.ui.spinner.spin(D,mxResources.get("loading"));G.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(D,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){y(K+1)});mxEvent.addListener(t,"click",U);this.executeRequest(J,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,-function(){this.ui.spinner.stop();1==K&&(g(),D.appendChild(d("../ [Up]",mxUtils.bind(this,function(){if(""==u)u=null,I();else{var B=u.split("/");u=B.slice(0,B.length-1).join("/");y()}}),"4px")));var R=JSON.parse(P.getText());if(null==R||0==R.length)c||(mxUtils.br(D),mxUtils.write(D,mxResources.get("noFiles")));else{var n=!0,z=0,A=mxUtils.bind(this,function(B){for(var M=0;M<R.length;M++)mxUtils.bind(this,function(S,l){if(B==("dir"==S.type)){l=L.cloneNode();l.style.backgroundColor=n?Editor.isDarkMode()?-"#000000":"#eeeeee":"";n=!n;var x=document.createElement("img");x.src=IMAGE_PATH+"/"+("dir"==S.type?"folder.png":"file.png");x.setAttribute("align","absmiddle");x.style.marginRight="4px";x.style.marginTop="-4px";x.width=20;l.appendChild(x);l.appendChild(d(S.name+("dir"==S.type?"/":""),mxUtils.bind(this,function(){"dir"==S.type?(u=S.path,y()):e&&"file"==S.type&&(this.ui.hideDialog(),f(k+"/"+p+"/"+encodeURIComponent(q)+"/"+S.path))})));D.appendChild(l);z++}})(R[M],M)});A(!0);e&&A(!1)}}))}),m,!0)}),-C=mxUtils.bind(this,function(K,J){null==K&&(D.innerText="",K=1);var U=new mxXmlRequest(this.baseUrl+"/repos/"+k+"/"+p+"/branches?per_page=100&page="+K,null,"GET");G.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(D,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(D,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var P=-mxUtils.bind(this,function(){C(K+1)});mxEvent.addListener(t,"click",P);this.executeRequest(U,mxUtils.bind(this,function(R){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==K&&(g(!0),D.appendChild(d("../ [Up]",mxUtils.bind(this,function(){u=null;I()}),"4px")));var n=JSON.parse(R.getText());if(null==n||0==n.length)mxUtils.br(D),mxUtils.write(D,mxResources.get("repositoryNotFound"));else if(1==n.length&&J)q=n[0].name,u="",y();else{for(var z=0;z<n.length;z++)mxUtils.bind(this,-function(A,B){var M=L.cloneNode();M.style.backgroundColor=0==B%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";M.appendChild(d(A.name,mxUtils.bind(this,function(){q=A.name;u="";y()})));D.appendChild(M)})(n[z],z);100==n.length&&(D.appendChild(t),v=function(){D.scrollTop>=D.scrollHeight-D.offsetHeight&&P()},mxEvent.addListener(D,"scroll",v))}}))}),m)}),I=mxUtils.bind(this,function(K){null==K&&(D.innerText="",K=1);var J=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+K,null,"GET");G.okButton.setAttribute("disabled",-"disabled");this.ui.spinner.spin(D,mxResources.get("loading"));null!=v&&mxEvent.removeListener(D,"scroll",v);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){I(K+1)});mxEvent.addListener(t,"click",U);this.executeRequest(J,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var R=JSON.parse(P.getText());-if(null==R||0==R.length)mxUtils.br(D),mxUtils.write(D,mxResources.get("repositoryNotFound"));else{1==K&&(D.appendChild(d(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var z=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(A){if(null!=A){var B=A.split("/");if(1<B.length){A=B[0];var M=B[1];3>B.length?(k=A,p=M,u=q=null,C()):this.ui.spinner.spin(D,mxResources.get("loading"))&&(B=encodeURIComponent(B.slice(2,B.length).join("/")),this.getFile(A+-"/"+M+"/"+B,mxUtils.bind(this,function(S){this.ui.spinner.stop();k=S.meta.org;p=S.meta.repo;q=decodeURIComponent(S.meta.ref);u="";y()}),mxUtils.bind(this,function(S){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(z.container,300,80,!0,!1);z.init()}))),mxUtils.br(D),mxUtils.br(D));for(var n=0;n<R.length;n++)mxUtils.bind(this,-function(z,A){var B=L.cloneNode();B.style.backgroundColor=0==A%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";B.appendChild(d(z.full_name,mxUtils.bind(this,function(){k=z.owner.login;p=z.name;u="";C(null,!0)})));D.appendChild(B)})(R[n],n)}100==R.length&&(D.appendChild(t),v=function(){D.scrollTop>=D.scrollHeight-D.offsetHeight&&U()},mxEvent.addListener(D,"scroll",v))}))}),m)});I()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};+GitHubFile.prototype.setDescriptorEtag=function(b,e){b.sha=e};GitHubFile.prototype.save=function(b,e,f,c,l,n){this.doSave(this.getTitle(),e,f,c,l,n)};GitHubFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};GitHubFile.prototype.doSave=function(b,e,f,c,l,n){var p=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=p;this.saveFile(b,!1,e,f,c,l,n)}),f,c,l])};+GitHubFile.prototype.saveFile=function(b,e,f,c,l,n,p){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var u=mxUtils.bind(this,function(G){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var H=this.getCurrentEtag(),F=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(K){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,K);this.fileSaved(F,H,mxUtils.bind(this,function(){this.contentChanged();+null!=f&&f()}),c)}),mxUtils.bind(this,function(K){this.savingFile=!1;this.isConflict(K)?(this.inConflictState=!0,null!=c&&(K.commitMessage=G,c(K))):null!=c&&c(K)}),n,G)}catch(K){if(this.savingFile=!1,null!=c)c(K);else throw K;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(K){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;+null!=f&&f();this.ui.fileLoaded(d)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,K,G)}))});null!=p?u(p):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(G){u(G)}),c)}else null!=f&&f()};GitHubLibrary=function(b,e,f){GitHubFile.call(this,b,e,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(e,f){DrawioClient.call(this,e,f||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"github2";GitHubClient.prototype.maxFileSize=+5E7;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,f,c){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),p=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),u=this.authToken+" "+b;p.setRequestHeaders=function(G,H){G.setRequestHeader("Authorization",u)};p.send(mxUtils.bind(this,function(){window.clearTimeout(n);l&&(401===+p.getStatus()?c?f({code:p.getStatus(),message:this.getErrorMessage(p,mxResources.get("accessDenied"))}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)):200>p.getStatus()||300<=p.getStatus()?f({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(p.getText()))),e()))}),f)};GitHubClient.prototype.createUser=function(e){return new DrawioUser(e.id,e.email,e.name)};GitHubClient.prototype.authenticate=function(e,f){(new mxXmlRequest(this.redirectUri++"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitHubClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitHubCallback){var l=mxUtils.bind(this,function(){var n=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(p){if(200<=+p.getStatus()&&299>=p.getStatus())try{b=JSON.parse(p.getText()).access_token,this.setUser(null),f()}catch(u){c({message:mxResources.get("authFailed"),retry:l})}else this.clearPersistentToken(),this.setUser(null),b=null,401==p.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(p,u){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="++window.location.host+"&token="+e),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(G,H){n?(window.onGitHubCallback=null,n=!1,null==G?c({message:mxResources.get("accessDenied"),retry:l}):(null!=u&&u(),b=G.access_token,this.setUser(null),p&&this.setPersistentToken("remembered"),f(),null!=H&&H.close())):null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onGitHubCallback=null,n=!1,c({message:mxResources.get("accessDenied"),+retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(e,f){try{var c=JSON.parse(e.getText());null!=c&&null!=c.message&&(f=c.message)}catch(l){}return f};GitHubClient.prototype.showAuthorizeDialog=function(e,f){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/blog/single-repository-diagrams")}),e,mxResources.get("authorize"),+mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,l,n){var p=mxUtils.bind(this,function(G){var H=!0,F=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT,retry:u})}),this.ui.timeout),K=this.authToken+" "+b;e.setRequestHeaders=function(d,g){d.setRequestHeader("Authorization",+K)};e.send(mxUtils.bind(this,function(){window.clearTimeout(F);var d=mxUtils.bind(this,function(){var v=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){v();u()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(H)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())G?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},+c)})}):this.authenticate(function(){p(!0)},c);else if(403===e.getStatus()){var g=!1;try{var k=JSON.parse(e.getText());null!=k&&"Resource not accessible by integration"==k.message?d():(null!=k&&null!=k.errors&&0<k.errors.length&&(g="too_large"==k.errors[0].code),c({message:mxResources.get(g?"drawingTooLarge":"forbidden")}))}catch(v){c({message:mxResources.get(g?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?n?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):+d():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(d){window.clearTimeout(F);H&&c(d)}))}),u=mxUtils.bind(this,function(G){null==this.user?this.updateUser(function(){u(!0)},c,G):p(G)});null==b?this.authenticate(function(){u(!0)},c):u(!1)};GitHubClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};GitHubClient.prototype.getSha=function(e,f,c,l,n,p,u){var G=+"&t="+(new Date).getTime();e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+c+"?ref="+l+G,null,"HEAD");this.executeRequest(e,mxUtils.bind(this,function(H){try{n(H.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(F){p(F)}}),p,null,u)};GitHubClient.prototype.getFile=function(e,f,c,l,n){l=null!=l?l:!1;var p=e.split("/"),u=p[0],G=p[1],H=p[2];e=p.slice(3,p.length).join("/");p=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&+p))if(null!=b){n=this.baseUrl+"/repos/"+u+"/"+G+"/contents/"+e+"?ref="+H;var F={Authorization:"token "+b};p=e.split("/");this.ui.convertFile(n,0<p.length?p[p.length-1]:e,null,this.extension,f,c,null,F)}else c({message:mxResources.get("accessDenied")});else p="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+u+"/"+G+"/contents/"+e+"?ref="+H+p,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(K){try{var d=JSON.parse(K.getText());if(""==d.content&&null!=d.git_url){var g=+new mxXmlRequest(d.git_url,null,"GET");this.executeRequest(g,mxUtils.bind(this,function(k){k=JSON.parse(k.getText());""!=k.content?(d.content=k.content,d.encoding=k.encoding,f(this.createGitHubFile(u,G,H,d,l))):c({message:mxResources.get("errorLoadingFile")})}),c)}else f(this.createGitHubFile(u,G,H,d,l))}catch(k){c(k)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f,c,l,n){e={org:e,repo:f,ref:c,name:l.name,path:l.path,sha:l.sha,html_url:l.html_url,download_url:l.download_url};f=l.content;+"base64"===l.encoding&&(/\.jpe?g$/i.test(l.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(l.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(l.name)?(l=this.ui.extractGraphModelFromPng(f),f=null!=l&&0<l.length?l:"data:image/png;base64,"+f):f=Base64.decode(f));return n?new GitHubLibrary(this.ui,f,e):new GitHubFile(this.ui,f,e)};GitHubClient.prototype.insertLibrary=function(e,f,c,l,n){this.insertFile(e,f,c,l,!0,n,!1)};GitHubClient.prototype.insertFile=function(e,f,c,l,n,p,u){n=null!=n?n:!1;p=p.split("/");+var G=p[0],H=p[1],F=p[2],K=p.slice(3,p.length).join("/");0<K.length&&(K+="/");K+=e;this.checkExists(G+"/"+H+"/"+F+"/"+K,!0,mxUtils.bind(this,function(d,g){d?n?(u||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(k){this.writeFile(G,H,F,K,k,f,g,mxUtils.bind(this,function(v){try{var t=JSON.parse(v.getText());c(this.createGitHubFile(G,H,F,t.content,n))}catch(x){l(x)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:G,repo:H,ref:F,name:e,path:K,sha:g,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=+function(e,f,c,l){var n=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(p){n(function(){c(p)})}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}));this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=function(e,f,c,l,n,p,u,G,H){p.length>=this.maxFileSize?H({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(p.length)++" / 1 MB)"}):(c={path:l,branch:decodeURIComponent(c),message:n,content:p},null!=u&&(c.sha=u),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+l,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(F){G(F)}),mxUtils.bind(this,function(F){404==F.code&&(F.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,F.code=null);H(F)})))};GitHubClient.prototype.checkExists=function(e,f,c){var l=e.split("/"),n=l[0],p=l[1],u=l[2];e=l.slice(3,l.length).join("/");+this.getSha(n,p,e,u,mxUtils.bind(this,function(G){if(f){var H=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){H();c(!0,G)},function(){H();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(G){c(!0)}),!0)};GitHubClient.prototype.saveFile=function(e,f,c,l,n){var p=e.meta.org,u=e.meta.repo,G=e.meta.ref,H=e.meta.path,F=mxUtils.bind(this,function(d,+g){this.writeFile(p,u,G,H,n,g,d,mxUtils.bind(this,function(k){delete e.meta.isNew;f(JSON.parse(k.getText()).content.sha)}),mxUtils.bind(this,function(k){c(k)}))}),K=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){F(e.meta.sha,g)}),c,this.ui.getCurrentFile()!=e?e.getData():null,d.scale,d.border)}else F(e.meta.sha,Base64.encode(e.getData()))});l?this.getSha(p,u,+H,G,mxUtils.bind(this,function(d){e.meta.sha=d;K()}),c):K()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e,!0)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog=function(e,f,c){var l=null,n=null,p=null,u=null,G=document.createElement("div");G.style.whiteSpace=+"nowrap";G.style.overflow="hidden";G.style.height="320px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";G.appendChild(H);H=this.ui.createToolbarButton(Editor.refreshImage,mxResources.get("refresh"),mxUtils.bind(this,function(){D()}));H.style.position="absolute";H.style.right="40px";H.style.top="26px";G.appendChild(H);var F=document.createElement("div");F.style.whiteSpace=+"nowrap";F.style.border="1px solid lightgray";F.style.boxSizing="border-box";F.style.padding="4px";F.style.overflow="auto";F.style.lineHeight="1.2em";F.style.height="290px";G.appendChild(F);var K=document.createElement("div");K.style.textOverflow="ellipsis";K.style.boxSizing="border-box";K.style.overflow="hidden";K.style.padding="4px";K.style.width="100%";var d=new CustomDialog(this.ui,G,mxUtils.bind(this,function(){f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+u)}),null,null,"https://www.drawio.com/blog/single-repository-diagrams",+null,null,null,null,[[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]],"16px");this.ui.showDialog(d.container,420,370,!0,!0);e&&d.okButton.parentNode.removeChild(d.okButton);var g=mxUtils.bind(this,function(E,R,V,Q){var P=document.createElement("a");P.setAttribute("title",E);P.style.cursor="pointer";mxUtils.write(P,E);mxEvent.addListener(P,"click",+R);Q&&(P.style.textDecoration="underline");null!=V&&(E=K.cloneNode(),E.style.padding=V,E.appendChild(P),P=E);return P}),k=mxUtils.bind(this,function(E){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(g(l+"/"+n,mxUtils.bind(this,function(){u=null;D()}),null,!0));E||(mxUtils.write(R," / "),R.appendChild(g(decodeURIComponent(p),mxUtils.bind(this,function(){u=null;J()}),null,!0)));if(null!=u&&0<u.length){var V=u.split("/");for(E=0;E<V.length;E++)(function(Q){mxUtils.write(R,+" / ");R.appendChild(g(V[Q],mxUtils.bind(this,function(){u=V.slice(0,Q+1).join("/");A()}),null,!0))})(E)}F.appendChild(R)}),v=mxUtils.bind(this,function(E){this.ui.handleError(E,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(u=p=n=l=null,D()):this.ui.hideDialog()}),null,{})}),t=null,x=null,A=mxUtils.bind(this,function(E){null==E&&(F.innerText="",E=1);var R=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+n+"/contents/"+u+"?ref="+encodeURIComponent(p)+"&per_page=100&page="++E,null,"GET");this.ui.spinner.spin(F,mxResources.get("loading"));d.okButton.removeAttribute("disabled");null!=x&&(mxEvent.removeListener(F,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){A(E+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,+function(){this.ui.spinner.stop();1==E&&(k(),F.appendChild(g("../ [Up]",mxUtils.bind(this,function(){if(""==u)u=null,D();else{var C=u.split("/");u=C.slice(0,C.length-1).join("/");A()}}),"4px")));var P=JSON.parse(Q.getText());if(null==P||0==P.length)c||(mxUtils.br(F),mxUtils.write(F,mxResources.get("noFiles")));else{var q=!0,y=0,B=mxUtils.bind(this,function(C){for(var M=0;M<P.length;M++)mxUtils.bind(this,function(T,m){if(C==("dir"==T.type)){m=K.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?+"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("dir"==T.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(g(T.name+("dir"==T.type?"/":""),mxUtils.bind(this,function(){"dir"==T.type?(u=T.path,A()):e&&"file"==T.type&&(this.ui.hideDialog(),f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+T.path))})));F.appendChild(m);y++}})(P[M],M)});B(!0);e&&B(!1)}}))}),v,!0)}),+J=mxUtils.bind(this,function(E,R){null==E&&(F.innerText="",E=1);var V=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+n+"/branches?per_page=100&page="+E,null,"GET");d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=x&&(mxEvent.removeListener(F,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var Q=+mxUtils.bind(this,function(){J(E+1)});mxEvent.addListener(t,"click",Q);this.executeRequest(V,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==E&&(k(!0),F.appendChild(g("../ [Up]",mxUtils.bind(this,function(){u=null;D()}),"4px")));var q=JSON.parse(P.getText());if(null==q||0==q.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)p=q[0].name,u="",A();else{for(var y=0;y<q.length;y++)mxUtils.bind(this,+function(B,C){var M=K.cloneNode();M.style.backgroundColor=0==C%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";M.appendChild(g(B.name,mxUtils.bind(this,function(){p=B.name;u="";A()})));F.appendChild(M)})(q[y],y);100==q.length&&(F.appendChild(t),x=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&Q()},mxEvent.addListener(F,"scroll",x))}}))}),v)}),D=mxUtils.bind(this,function(E){null==E&&(F.innerText="",E=1);var R=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+E,null,"GET");d.okButton.setAttribute("disabled",+"disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=x&&mxEvent.removeListener(F,"scroll",x);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){D(E+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var P=JSON.parse(Q.getText());+if(null==P||0==P.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else{1==E&&(F.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var y=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(B){if(null!=B){var C=B.split("/");if(1<C.length){B=C[0];var M=C[1];3>C.length?(l=B,n=M,u=p=null,J()):this.ui.spinner.spin(F,mxResources.get("loading"))&&(C=encodeURIComponent(C.slice(2,C.length).join("/")),this.getFile(B++"/"+M+"/"+C,mxUtils.bind(this,function(T){this.ui.spinner.stop();l=T.meta.org;n=T.meta.repo;p=decodeURIComponent(T.meta.ref);u="";A()}),mxUtils.bind(this,function(T){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(y.container,300,80,!0,!1);y.init()}))),mxUtils.br(F),mxUtils.br(F));for(var q=0;q<P.length;q++)mxUtils.bind(this,+function(y,B){var C=K.cloneNode();C.style.backgroundColor=0==B%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";C.appendChild(g(y.full_name,mxUtils.bind(this,function(){l=y.owner.login;n=y.name;u="";J(null,!0)})));F.appendChild(C)})(P[q],q)}100==P.length&&(F.appendChild(t),x=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&V()},mxEvent.addListener(F,"scroll",x))}))}),v)});D()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};TrelloFile.prototype.save=function(b,e,f){this.doSave(this.getTitle(),e,f)};TrelloFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};TrelloFile.prototype.doSave=function(b,e,f){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,f)}),f])};-TrelloFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(k){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=k;this.contentChanged();null!=f&&f();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,-function(k){this.savingFile=!1;null!=c&&c(k)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(k){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(p){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(p);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,k)}))):null!=f&&f()};TrelloLibrary=function(b,e,f){TrelloFile.call(this,b,e,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";-TrelloClient.prototype.authenticate=function(b,e,f){f&&this.logout();f=mxUtils.bind(this,function(c,k){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){localStorage.setItem("drawio_trello_token",localStorage.trello_token);null!=k&&k();b()},error:function(){null!=k&&k();null!=e&&e(mxResources.get("loggedOut"))}})});this.isAuthorized()?f(!0):this.ui.showAuthDialog(this,!0,f)};+TrelloFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(l){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=l;this.contentChanged();null!=f&&f();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,+function(l){this.savingFile=!1;null!=c&&c(l)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(l){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(n){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(n);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,l)}))):null!=f&&f()};TrelloLibrary=function(b,e,f){TrelloFile.call(this,b,e,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";+TrelloClient.prototype.authenticate=function(b,e,f){f&&this.logout();f=mxUtils.bind(this,function(c,l){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){localStorage.setItem("drawio_trello_token",localStorage.trello_token);null!=l&&l();b()},error:function(){null!=l&&l();null!=e&&e(mxResources.get("loggedOut"))}})});this.isAuthorized()?f(!0):this.ui.showAuthDialog(this,!0,f)};TrelloClient.prototype.getLibrary=function(b,e,f){this.getFile(b,e,f,!1,!0)};-TrelloClient.prototype.getFile=function(b,e,f,c,k){k=null!=k?k:!1;var p=mxUtils.bind(this,function(){var q=b.split(this.SEPARATOR),u=!0,E=window.setTimeout(mxUtils.bind(this,function(){u=!1;f({code:App.ERROR_TIMEOUT,retry:p})}),this.ui.timeout);Trello.cards.get(q[0]+"/attachments/"+q[1],mxUtils.bind(this,function(H){window.clearTimeout(E);if(u){var D=/\.png$/i.test(H.name),L={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(H.name)||-/\.gliffy$/i.test(H.name)||!this.ui.useCanvasForExport&&D?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(H.url),H.name,H.mimeType,this.extension,e,f,null,L):(u=!0,E=window.setTimeout(mxUtils.bind(this,function(){u=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(H.url),mxUtils.bind(this,function(G){window.clearTimeout(E);if(u){H.compoundId=b;if(0<(D?G.lastIndexOf(","):-1)){var d=this.ui.extractGraphModelFromPng(G);null!=d&&0<d.length&&-(G=d)}k?e(new TrelloLibrary(this.ui,G,H)):e(new TrelloFile(this.ui,G,H))}}),mxUtils.bind(this,function(G,d){window.clearTimeout(E);u&&(401==d.status?this.authenticate(p,f,!0):f())}),D||null!=H.mimeType&&"image/"==H.mimeType.substring(0,6),null,null,null,L))}}),mxUtils.bind(this,function(H){window.clearTimeout(E);u&&(null!=H&&401==H.status?this.authenticate(p,f,!0):f())}))});this.authenticate(p,f)};TrelloClient.prototype.insertLibrary=function(b,e,f,c,k){this.insertFile(b,e,f,c,!0,k)};-TrelloClient.prototype.insertFile=function(b,e,f,c,k,p){k=null!=k?k:!1;var q=mxUtils.bind(this,function(){var u=mxUtils.bind(this,function(E){this.writeFile(b,E,p,mxUtils.bind(this,function(H){k?f(new TrelloLibrary(this.ui,e,H)):f(new TrelloFile(this.ui,e,H))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(E){u(this.ui.base64ToBlob(E,"image/png"))}),c,e):u(e)});this.authenticate(q,c)};-TrelloClient.prototype.saveFile=function(b,e,f){var c=b.meta.compoundId.split(this.SEPARATOR),k=mxUtils.bind(this,function(q){this.writeFile(b.meta.name,q,c[0],function(u){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(u)}),mxUtils.bind(this,function(E){null!=E&&401==E.status?this.authenticate(p,f,!0):f()}))},f)}),p=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(q){k(this.ui.base64ToBlob(q,-"image/png"))}),f,this.ui.getCurrentFile()!=b?b.getData():null):k(b.getData())});this.authenticate(p,f)};-TrelloClient.prototype.writeFile=function(b,e,f,c,k){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var p=mxUtils.bind(this,function(){var q=!0,u=window.setTimeout(mxUtils.bind(this,function(){q=!1;k({code:App.ERROR_TIMEOUT,retry:p})}),this.ui.timeout),E=new FormData;E.append("key",Trello.key());E.append("token",Trello.token());E.append("file","string"===typeof e?new Blob([e]):e,b);E.append("name",-b);var H=new XMLHttpRequest;H.responseType="json";H.onreadystatechange=mxUtils.bind(this,function(){if(4===H.readyState&&(window.clearTimeout(u),q))if(200==H.status){var D=H.response;D.compoundId=f+this.SEPARATOR+D.id;c(D)}else 401==H.status?this.authenticate(p,k,!0):k()});H.open("POST",this.baseUrl+"cards/"+f+"/attachments");H.send(E)});this.authenticate(p,k)}else k({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};+TrelloClient.prototype.getFile=function(b,e,f,c,l){l=null!=l?l:!1;var n=mxUtils.bind(this,function(){var p=b.split(this.SEPARATOR),u=!0,G=window.setTimeout(mxUtils.bind(this,function(){u=!1;f({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);Trello.cards.get(p[0]+"/attachments/"+p[1],mxUtils.bind(this,function(H){window.clearTimeout(G);if(u){var F=/\.png$/i.test(H.name),K={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(H.name)||+/\.gliffy$/i.test(H.name)||!this.ui.useCanvasForExport&&F?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(H.url),H.name,H.mimeType,this.extension,e,f,null,K):(u=!0,G=window.setTimeout(mxUtils.bind(this,function(){u=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(H.url),mxUtils.bind(this,function(d){window.clearTimeout(G);if(u){H.compoundId=b;if(0<(F?d.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(d);null!=g&&0<g.length&&+(d=g)}l?e(new TrelloLibrary(this.ui,d,H)):e(new TrelloFile(this.ui,d,H))}}),mxUtils.bind(this,function(d,g){window.clearTimeout(G);u&&(401==g.status?this.authenticate(n,f,!0):f())}),F||null!=H.mimeType&&"image/"==H.mimeType.substring(0,6),null,null,null,K))}}),mxUtils.bind(this,function(H){window.clearTimeout(G);u&&(null!=H&&401==H.status?this.authenticate(n,f,!0):f())}))});this.authenticate(n,f)};TrelloClient.prototype.insertLibrary=function(b,e,f,c,l){this.insertFile(b,e,f,c,!0,l)};+TrelloClient.prototype.insertFile=function(b,e,f,c,l,n){l=null!=l?l:!1;var p=mxUtils.bind(this,function(){var u=mxUtils.bind(this,function(G){this.writeFile(b,G,n,mxUtils.bind(this,function(H){l?f(new TrelloLibrary(this.ui,e,H)):f(new TrelloFile(this.ui,e,H))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(G){u(this.ui.base64ToBlob(G,"image/png"))}),c,e):u(e)});this.authenticate(p,c)};+TrelloClient.prototype.saveFile=function(b,e,f){var c=b.meta.compoundId.split(this.SEPARATOR),l=mxUtils.bind(this,function(p){this.writeFile(b.meta.name,p,c[0],function(u){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(u)}),mxUtils.bind(this,function(G){null!=G&&401==G.status?this.authenticate(n,f,!0):f()}))},f)}),n=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(p){l(this.ui.base64ToBlob(p,+"image/png"))}),f,this.ui.getCurrentFile()!=b?b.getData():null):l(b.getData())});this.authenticate(n,f)};+TrelloClient.prototype.writeFile=function(b,e,f,c,l){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var n=mxUtils.bind(this,function(){var p=!0,u=window.setTimeout(mxUtils.bind(this,function(){p=!1;l({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),G=new FormData;G.append("key",Trello.key());G.append("token",Trello.token());G.append("file","string"===typeof e?new Blob([e]):e,b);G.append("name",+b);var H=new XMLHttpRequest;H.responseType="json";H.onreadystatechange=mxUtils.bind(this,function(){if(4===H.readyState&&(window.clearTimeout(u),p))if(200==H.status){var F=H.response;F.compoundId=f+this.SEPARATOR+F.id;c(F)}else 401==H.status?this.authenticate(n,l,!0):l()});H.open("POST",this.baseUrl+"cards/"+f+"/attachments");H.send(G)});this.authenticate(n,l)}else l({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(e){this.ui.showError(mxResources.get("error"),e)}))};TrelloClient.prototype.pickFile=function(b,e){b=null!=b?b:mxUtils.bind(this,function(f){this.ui.loadFile("T"+encodeURIComponent(f))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(f){this.ui.showError(mxResources.get("error"),f,mxResources.get("ok"))}))};-TrelloClient.prototype.showTrelloDialog=function(b,e){var f=null,c="@me",k=0,p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.overflow="hidden";p.style.height="224px";var q=document.createElement("h3");mxUtils.write(q,b?mxResources.get("selectFile"):mxResources.get("selectCard"));q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";p.appendChild(q);var u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.overflow="auto";u.style.height=-"194px";p.appendChild(u);p=new CustomDialog(this.ui,p);this.ui.showDialog(p.container,340,290,!0,!0);p.okButton.parentNode.removeChild(p.okButton);var E=mxUtils.bind(this,function(g,m,t){k++;var v=document.createElement("div");v.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==k%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var y=document.createElement("a");y.style.cursor="pointer";if(null!=t){var C=document.createElement("img");-C.src=t.url;C.width=t.width;C.height=t.height;C.style="border: 1px solid black;margin:5px;vertical-align:middle";y.appendChild(C)}mxUtils.write(y,g);mxEvent.addListener(y,"click",m);v.appendChild(y);return v}),H=mxUtils.bind(this,function(g){this.ui.handleError(g,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),D=mxUtils.bind(this,function(){k=0;u.innerText="";this.ui.spinner.spin(u,mxResources.get("loading"));var g=mxUtils.bind(this,function(){Trello.cards.get(f+-"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(m){this.ui.spinner.stop();u.appendChild(E("../ [Up]",mxUtils.bind(this,function(){d()})));mxUtils.br(u);null==m||0==m.length?mxUtils.write(u,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var t=0;t<m.length;t++)mxUtils.bind(this,function(v){u.appendChild(E(v.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+v.id)}),null!=v.previews?v.previews[0]:null))})(m[t])})()}),mxUtils.bind(this,function(m){401==-m.status?this.authenticate(g,H,!0):null!=H&&H(m)}))});g()}),L=null,G=null,d=mxUtils.bind(this,function(g){null==g&&(k=0,u.innerText="",g=1);this.ui.spinner.spin(u,mxResources.get("loading"));null!=L&&null!=L.parentNode&&L.parentNode.removeChild(L);L=document.createElement("a");L.style.display="block";L.style.cursor="pointer";mxUtils.write(L,mxResources.get("more")+"...");var m=mxUtils.bind(this,function(){mxEvent.removeListener(u,"scroll",G);d(g+1)});mxEvent.addListener(L,"click",m);var t=mxUtils.bind(this,-function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:g-1},mxUtils.bind(this,function(v){this.ui.spinner.stop();v=null!=v?v.cards:null;if(null==v||0==v.length)mxUtils.write(u,mxResources.get("noFiles"));else{1==g&&(u.appendChild(E(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var C=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(I){null!=I&&(c=I,d())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");-this.ui.showDialog(C.container,300,80,!0,!1);C.init()}))),mxUtils.br(u));for(var y=0;y<v.length;y++)mxUtils.bind(this,function(C){u.appendChild(E(C.name,mxUtils.bind(this,function(){b?(f=C.id,D()):(this.ui.hideDialog(),e(C.id))})))})(v[y]);100==v.length&&(u.appendChild(L),G=function(){u.scrollTop>=u.scrollHeight-u.offsetHeight&&m()},mxEvent.addListener(u,"scroll",G))}}),mxUtils.bind(this,function(v){401==v.status?this.authenticate(t,H,!0):null!=H&&H({message:v.responseText})}))});t()});d()};+TrelloClient.prototype.showTrelloDialog=function(b,e){var f=null,c="@me",l=0,n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.height="224px";var p=document.createElement("h3");mxUtils.write(p,b?mxResources.get("selectFile"):mxResources.get("selectCard"));p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(p);var u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.overflow="auto";u.style.height=+"194px";n.appendChild(u);n=new CustomDialog(this.ui,n);this.ui.showDialog(n.container,340,290,!0,!0);n.okButton.parentNode.removeChild(n.okButton);var G=mxUtils.bind(this,function(k,v,t){l++;var x=document.createElement("div");x.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var A=document.createElement("a");A.style.cursor="pointer";if(null!=t){var J=document.createElement("img");+J.src=t.url;J.width=t.width;J.height=t.height;J.style="border: 1px solid black;margin:5px;vertical-align:middle";A.appendChild(J)}mxUtils.write(A,k);mxEvent.addListener(A,"click",v);x.appendChild(A);return x}),H=mxUtils.bind(this,function(k){this.ui.handleError(k,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),F=mxUtils.bind(this,function(){l=0;u.innerText="";this.ui.spinner.spin(u,mxResources.get("loading"));var k=mxUtils.bind(this,function(){Trello.cards.get(f++"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(v){this.ui.spinner.stop();u.appendChild(G("../ [Up]",mxUtils.bind(this,function(){g()})));mxUtils.br(u);null==v||0==v.length?mxUtils.write(u,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var t=0;t<v.length;t++)mxUtils.bind(this,function(x){u.appendChild(G(x.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+x.id)}),null!=x.previews?x.previews[0]:null))})(v[t])})()}),mxUtils.bind(this,function(v){401==+v.status?this.authenticate(k,H,!0):null!=H&&H(v)}))});k()}),K=null,d=null,g=mxUtils.bind(this,function(k){null==k&&(l=0,u.innerText="",k=1);this.ui.spinner.spin(u,mxResources.get("loading"));null!=K&&null!=K.parentNode&&K.parentNode.removeChild(K);K=document.createElement("a");K.style.display="block";K.style.cursor="pointer";mxUtils.write(K,mxResources.get("more")+"...");var v=mxUtils.bind(this,function(){mxEvent.removeListener(u,"scroll",d);g(k+1)});mxEvent.addListener(K,"click",v);var t=mxUtils.bind(this,+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:k-1},mxUtils.bind(this,function(x){this.ui.spinner.stop();x=null!=x?x.cards:null;if(null==x||0==x.length)mxUtils.write(u,mxResources.get("noFiles"));else{1==k&&(u.appendChild(G(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var J=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(D){null!=D&&(c=D,g())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");+this.ui.showDialog(J.container,300,80,!0,!1);J.init()}))),mxUtils.br(u));for(var A=0;A<x.length;A++)mxUtils.bind(this,function(J){u.appendChild(G(J.name,mxUtils.bind(this,function(){b?(f=J.id,F()):(this.ui.hideDialog(),e(J.id))})))})(x[A]);100==x.length&&(u.appendChild(K),d=function(){u.scrollTop>=u.scrollHeight-u.offsetHeight&&v()},mxEvent.addListener(u,"scroll",d))}}),mxUtils.bind(this,function(x){401==x.status?this.authenticate(t,H,!0):null!=H&&H({message:x.responseText})}))});t()});g()};TrelloClient.prototype.isAuthorized=function(){try{var b=localStorage.trello_token;null==b&&(b=localStorage.drawio_trello_token,null!=b&&localStorage.setItem("trello_token",b));return null!=b}catch(e){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("drawio_trello_token");Trello.deauthorize()};GitLabFile=function(b,e,f){GitHubFile.call(this,b,e,f);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.getFileUrl=function(){return this.meta.html_url};GitLabFile.prototype.getFolderUrl=function(){var b=this.getFileUrl();return b.substring(0,b.lastIndexOf("/"))};GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+this.meta.org+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id};GitLabFile.prototype.setDescriptorEtag=function(b,e){b.last_commit_id=e};GitLabLibrary=function(b,e,f){GitLabFile.call(this,b,e,f)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(e){GitHubClient.call(this,e,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"gitlab";GitLabClient.prototype.authenticate=-function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitLabClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitLabCallback){var k=mxUtils.bind(this,function(){var p=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+-e),null,"GET")).send(mxUtils.bind(this,function(q){if(200<=q.getStatus()&&299>=q.getStatus())try{b=JSON.parse(q.getText()).access_token,this.setToken(b),this.setUser(null),f()}catch(u){c({message:mxResources.get("authFailed"),retry:k})}else this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==q.getStatus()?k():c({message:mxResources.get("accessDenied"),retry:k})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(q,u){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+-this.clientId+"&scope="+this.scope+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(E,H){p?(window.onGitLabCallback=null,p=!1,null==E?c({message:mxResources.get("accessDenied"),retry:k}):(null!=u&&u(),b=E.access_token,this.setToken(b),this.setUser(null),q&&this.setPersistentToken("remembered"),f(),null!=H&&H.close())):-null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:k})}),mxUtils.bind(this,function(){p&&(window.onGitLabCallback=null,p=!1,c({message:mxResources.get("accessDenied"),retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,f,c,k){var p=mxUtils.bind(this,function(u){var E=!0,H=window.setTimeout(mxUtils.bind(this,function(){E=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),D=this.authToken+-" "+b;e.setRequestHeaders=function(L,G){L.setRequestHeader("Authorization",D);L.setRequestHeader("PRIVATE_TOKEN",D);L.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(H);if(E)if(200<=e.getStatus()&&299>=e.getStatus()||k&&404==e.getStatus())f(e);else if(401===e.getStatus())u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){q(!0)},c)})}):this.authenticate(function(){p(!0)},c);else if(403===-e.getStatus()){var L=!1;try{var G=JSON.parse(e.getText());null!=G&&null!=G.errors&&0<G.errors.length&&(L="too_large"==G.errors[0].code)}catch(d){}c({message:mxResources.get(L?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(L){window.clearTimeout(H);E&&c(L)}))}),q=mxUtils.bind(this,function(u){null==-this.user?this.updateUser(function(){q(!0)},c,u):p(u)});null==b?this.authenticate(function(){q(!0)},c):q(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,k,p,q){if(null!=p)c(e,p);else{var u=e.length-2,E=mxUtils.bind(this,function(){if(2>u)k({message:mxResources.get("fileNotFound")});else{var H=Math.max(u-1,0),D=e.slice(0,H).join("/");H=e[H];var L=e[u],G=e.slice(u+1,e.length).join("/");D=this.baseUrl+"/projects/"+encodeURIComponent(D+"/"+H)+"/repository/"+(f?q?"branches?per_page=1&page=1&ref="+-L:"tree?path="+G+"&ref="+L:"files/"+encodeURIComponent(G)+"?ref="+L);var d=new mxXmlRequest(D,null,"HEAD");this.executeRequest(d,mxUtils.bind(this,function(){200==d.getStatus()?c(e,u):k({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==d.getStatus()?(u--,E()):k({message:mxResources.get("fileNotFound")})}))}});E()}};GitLabClient.prototype.getFile=function(e,f,c,k,p,q){k=null!=k?k:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(u,E){var H=Math.max(E-1,0),-D=u.slice(0,H).join("/"),L=u[H],G=u[E];e=u.slice(E+1,u.length).join("/");u=/\.png$/i.test(e);if(!p&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&u))if(null!=b){H="&t="+(new Date).getTime();var d=this.baseUrl+"/projects/"+encodeURIComponent(D+"/"+L)+"/repository/files/"+encodeURIComponent(e)+"?ref="+G;u=e.split("/");this.ui.convertFile(d+H,0<u.length?u[u.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(g,m,t){g=new mxXmlRequest(g,null,-"GET");this.executeRequest(g,mxUtils.bind(this,function(v){try{m(this.getFileContent(JSON.parse(v.getText())))}catch(y){t(y)}}),t)}))}else c({message:mxResources.get("accessDenied")});else H="&t="+(new Date).getTime(),d=this.baseUrl+"/projects/"+encodeURIComponent(D+"/"+L)+"/repository/files/"+encodeURIComponent(e)+"?ref="+G,u=new mxXmlRequest(d+H,null,"GET"),this.executeRequest(u,mxUtils.bind(this,function(g){try{f(this.createGitLabFile(D,L,G,JSON.parse(g.getText()),k,E))}catch(m){c(m)}}),c)}),c,-q)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,k,p,q){var u=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,-ref:c,name:k.file_name,path:k.file_path,html_url:u+e+"/"+f+"/blob/"+c+"/"+k.file_path,download_url:u+e+"/"+f+"/raw/"+c+"/"+k.file_path+"?inline=false",last_commit_id:k.last_commit_id,refPos:q};k=this.getFileContent(k);return p?new GitLabLibrary(this.ui,k,e):new GitLabFile(this.ui,k,e)};GitLabClient.prototype.insertFile=function(e,f,c,k,p,q,u){p=null!=p?p:!1;q=q.split("/");this.getRefIndex(q,!0,mxUtils.bind(this,function(E,H){var D=Math.max(H-1,0),L=E.slice(0,D).join("/"),G=E[D],d=E[H];path=E.slice(H+-1,E.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(L+"/"+G+"/"+d+"/"+path,!0,mxUtils.bind(this,function(g,m){g?p?(u||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(t){this.writeFile(L,G,d,path,t,f,m,mxUtils.bind(this,function(v){try{var y=JSON.parse(v.getText());c(this.createGitLabFile(L,G,d,null!=y.content?y.content:y,p,H))}catch(C){k(C)}}),k)}),k)):(g=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:L,repo:G,ref:d,name:e,path:path,html_url:g+-L+"/"+G+"/blob/"+d+"/"+path,download_url:g+L+"/"+G+"/raw/"+d+"/"+path+"?inline=false",refPos:H,last_commit_id:m,isNew:!0}))):k()}))}),k,null,4>=q.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(k){if(f){var p=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){p();c(!0,k.getCurrentEtag())},function(){p();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),-mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(k){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e,f,c,k,p,q,u,E,H){if(q.length>=this.maxFileSize)H({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(q.length)+" / 10 MB)"});else{var D="POST";c={path:encodeURIComponent(k),branch:decodeURIComponent(c),commit_message:p,content:q,encoding:"base64"};null!=u&&(c.last_commit_id=u,D="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"+-encodeURIComponent(k);D=new mxXmlRequest(e,JSON.stringify(c),D);this.executeRequest(D,mxUtils.bind(this,function(L){E(L)}),H)}};GitLabClient.prototype.saveFile=function(e,f,c,k,p){var q=e.meta.org,u=e.meta.repo,E=e.meta.ref,H=e.meta.path,D=mxUtils.bind(this,function(G,d){this.writeFile(q,u,E,H,p,d,G,mxUtils.bind(this,function(g){delete e.meta.isNew;this.getFile(q+"/"+u+"/"+E+"/"+H,mxUtils.bind(this,function(m){m.getData()==e.getData()?f(m.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,-null,e.meta.refPos)}),c)}),L=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var G=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){D(e.meta.last_commit_id,d)}),c,this.ui.getCurrentFile()!=e?e.getData():null,G.scale,G.border)}else D(e.meta.last_commit_id,Base64.encode(e.getData()))});k?this.getFile(q+"/"+u+"/"+E+"/"+H,mxUtils.bind(this,function(G){e.meta.last_commit_id=G.meta.last_commit_id;L()}),c):L()};GitLabClient.prototype.pickFolder=-function(e){this.showGitLabDialog(!1,e,!0)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f,c){var k=null,p=null,q=null,u=null,E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.height="304px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));-H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";E.appendChild(H);var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.border="1px solid lightgray";D.style.boxSizing="border-box";D.style.padding="4px";D.style.overflow="auto";D.style.lineHeight="1.2em";D.style.height="274px";E.appendChild(D);var L=document.createElement("div");L.style.textOverflow="ellipsis";L.style.boxSizing="border-box";L.style.overflow="hidden";L.style.padding="4px";L.style.width=-"100%";var G=new CustomDialog(this.ui,E,mxUtils.bind(this,function(){f(k+"/"+p+"/"+encodeURIComponent(q)+"/"+u)}));this.ui.showDialog(G.container,420,370,!0,!0);e&&G.okButton.parentNode.removeChild(G.okButton);var d=mxUtils.bind(this,function(K,J,U,P){var R=document.createElement("a");R.setAttribute("title",K);R.style.cursor="pointer";mxUtils.write(R,K);mxEvent.addListener(R,"click",J);P&&(R.style.textDecoration="underline");null!=U&&(K=L.cloneNode(),K.style.padding=U,K.appendChild(R),R=K);return R}),-g=mxUtils.bind(this,function(K){var J=document.createElement("div");J.style.marginBottom="8px";J.appendChild(d(k+"/"+p,mxUtils.bind(this,function(){u=null;I()}),null,!0));K||(mxUtils.write(J," / "),J.appendChild(d(decodeURIComponent(q),mxUtils.bind(this,function(){u=null;C()}),null,!0)));if(null!=u&&0<u.length){var U=u.split("/");for(K=0;K<U.length;K++)(function(P){mxUtils.write(J," / ");J.appendChild(d(U[P],mxUtils.bind(this,function(){u=U.slice(0,P+1).join("/");y()}),null,!0))})(K)}D.appendChild(J)}),-m=mxUtils.bind(this,function(K){this.ui.handleError(K,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(u=q=p=k=null,I()):this.ui.hideDialog()}))}),t=null,v=null,y=mxUtils.bind(this,function(K){null==K&&(D.innerText="",K=1);var J=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(k+"/"+p)+"/repository/tree?path="+u+"&ref="+q+"&per_page=100&page="+K,null,"GET");this.ui.spinner.spin(D,mxResources.get("loading"));G.okButton.removeAttribute("disabled");null!=v&&-(mxEvent.removeListener(D,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){y(K+1)});mxEvent.addListener(t,"click",U);this.executeRequest(J,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==K&&(g(!q),D.appendChild(d("../ [Up]",mxUtils.bind(this,function(){if(""==-u||null==u)u=null,I();else{var B=u.split("/");u=B.slice(0,B.length-1).join("/");y()}}),"4px")));var R=JSON.parse(P.getText());if(null==R||0==R.length)c||(mxUtils.br(D),mxUtils.write(D,mxResources.get("noFiles")));else{var n=!0,z=0,A=mxUtils.bind(this,function(B){for(var M=0;M<R.length;M++)mxUtils.bind(this,function(S){if(B==("tree"==S.type)){var l=L.cloneNode();l.style.backgroundColor=n?Editor.isDarkMode()?"#000000":"#eeeeee":"";n=!n;var x=document.createElement("img");x.src=IMAGE_PATH+"/"+("tree"==-S.type?"folder.png":"file.png");x.setAttribute("align","absmiddle");x.style.marginRight="4px";x.style.marginTop="-4px";x.width=20;l.appendChild(x);l.appendChild(d(S.name+("tree"==S.type?"/":""),mxUtils.bind(this,function(){"tree"==S.type?(u=S.path,y()):e&&"blob"==S.type&&(this.ui.hideDialog(),f(k+"/"+p+"/"+q+"/"+S.path))})));D.appendChild(l);z++}})(R[M])});A(!0);e&&A(!1);100==z&&(D.appendChild(t),v=function(){D.scrollTop>=D.scrollHeight-D.offsetHeight&&U()},mxEvent.addListener(D,"scroll",v))}}))}),-m,!0)}),C=mxUtils.bind(this,function(K,J){null==K&&(D.innerText="",K=1);var U=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(k+"/"+p)+"/repository/branches?per_page=100&page="+K,null,"GET");G.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(D,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(D,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,-mxResources.get("more")+"...");var P=mxUtils.bind(this,function(){C(K+1)});mxEvent.addListener(t,"click",P);this.executeRequest(U,mxUtils.bind(this,function(R){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==K&&(g(!0),D.appendChild(d("../ [Up]",mxUtils.bind(this,function(){u=null;I()}),"4px")));var n=JSON.parse(R.getText());if(null==n||0==n.length)mxUtils.br(D),mxUtils.write(D,mxResources.get("repositoryNotFound"));else if(1==n.length&&J)q=n[0].name,u="",y();else{for(var z=-0;z<n.length;z++)mxUtils.bind(this,function(A,B){var M=L.cloneNode();M.style.backgroundColor=0==B%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";M.appendChild(d(A.name,mxUtils.bind(this,function(){q=encodeURIComponent(A.name);u="";y()})));D.appendChild(M)})(n[z],z);100==n.length&&(D.appendChild(t),v=function(){D.scrollTop>=D.scrollHeight-D.offsetHeight&&P()},mxEvent.addListener(D,"scroll",v))}}))}),m)});G.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(D,mxResources.get("loading"));-var I=mxUtils.bind(this,function(K){var J=this.ui.spinner,U=0;this.ui.spinner.stop();var P=function(){J.spin(D,mxResources.get("loading"));U+=1},R=function(){--U;0===U&&J.stop()};null==K&&(D.innerText="",K=1);null!=v&&(mxEvent.removeListener(D,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var n=mxUtils.bind(this,function(){0===U&&I(K+1)});mxEvent.addListener(t,-"click",n);var z=mxUtils.bind(this,function(B){P();var M=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(M,mxUtils.bind(this,function(S){this.ui.tryAndHandle(mxUtils.bind(this,function(){B(JSON.parse(S.getText()));R()}))}),m)}),A=mxUtils.bind(this,function(B,M){P();var S=new mxXmlRequest(this.baseUrl+"/groups/"+B.id+"/projects?per_page=100",null,"GET");this.executeRequest(S,mxUtils.bind(this,function(l){this.ui.tryAndHandle(mxUtils.bind(this,function(){M(B,JSON.parse(l.getText()));-R()}))}),m)});z(mxUtils.bind(this,function(B){if(null==this.user)mxUtils.write(D,mxResources.get("loggedOut"));else{P();var M=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+K,null,"GET");this.executeRequest(M,mxUtils.bind(this,function(S){S=JSON.parse(S.getText());if(null!=S&&0!=S.length||null!=B&&0!=B.length){1==K&&(D.appendChild(d(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===U){var F=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),-mxUtils.bind(this,function(N){null!=N&&(N=N.split("/"),1<N.length?(k=N[0],p=N[1],q=u=null,2<N.length?(q=encodeURIComponent(N.slice(2,N.length).join("/")),y()):C(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(F.container,300,80,!0,!1);F.init()}}))),mxUtils.br(D),mxUtils.br(D));for(var l=!0,x=0;x<S.length;x++)mxUtils.bind(this,function(F){var N=L.cloneNode();N.style.backgroundColor=l?Editor.isDarkMode()?-"#000000":"#eeeeee":"";l=!l;N.appendChild(d(F.name_with_namespace,mxUtils.bind(this,function(){0===U&&(k=F.owner.username,p=F.path,u="",C(null,!0))})));D.appendChild(N)})(S[x]);for(x=0;x<B.length;x++)P(),A(B[x],mxUtils.bind(this,function(F,N){R();for(var O=0;O<N.length;O++){var Q=L.cloneNode();Q.style.backgroundColor=l?Editor.isDarkMode()?"#000000":"#eeeeee":"";l=!l;mxUtils.bind(this,function(V){Q.appendChild(d(V.name_with_namespace,mxUtils.bind(this,function(){0===U&&(k=F.full_path,p=V.path,u="",-C(null,!0))})));D.appendChild(Q)})(N[O])}}));R()}else R(),mxUtils.br(D),mxUtils.write(D,mxResources.get("repositoryNotFound"));100==S.length&&(D.appendChild(t),v=function(){D.scrollTop>=D.scrollHeight-D.offsetHeight&&n()},mxEvent.addListener(D,"scroll",v))}),m)}}))});b?this.user?I():this.updateUser(function(){I()},m,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){I()},m,!0)}),m)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+-encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,k,p,q){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=k;this.isResolved=p;this.user=q;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,k){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,k,p,q,u){DrawioComment.call(this,b,e,f,c,k,p,q);this.pCommentId=u};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,k){b={content:b.content};c?b.verb="resolve":k&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(p){e(p.replyId)}),f)};+function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitLabClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitLabCallback){var l=mxUtils.bind(this,function(){var n=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="++e),null,"GET")).send(mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus())try{b=JSON.parse(p.getText()).access_token,this.setToken(b),this.setUser(null),f()}catch(u){c({message:mxResources.get("authFailed"),retry:l})}else this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==p.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(p,u){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="++this.clientId+"&scope="+this.scope+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(G,H){n?(window.onGitLabCallback=null,n=!1,null==G?c({message:mxResources.get("accessDenied"),retry:l}):(null!=u&&u(),b=G.access_token,this.setToken(b),this.setUser(null),p&&this.setPersistentToken("remembered"),f(),null!=H&&H.close())):+null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onGitLabCallback=null,n=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,f,c,l){var n=mxUtils.bind(this,function(u){var G=!0,H=window.setTimeout(mxUtils.bind(this,function(){G=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),F=this.authToken++" "+b;e.setRequestHeaders=function(K,d){K.setRequestHeader("Authorization",F);K.setRequestHeader("PRIVATE_TOKEN",F);K.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(H);if(G)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){p(!0)},c)})}):this.authenticate(function(){n(!0)},c);else if(403===+e.getStatus()){var K=!1;try{var d=JSON.parse(e.getText());null!=d&&null!=d.errors&&0<d.errors.length&&(K="too_large"==d.errors[0].code)}catch(g){}c({message:mxResources.get(K?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(K){window.clearTimeout(H);G&&c(K)}))}),p=mxUtils.bind(this,function(u){null==+this.user?this.updateUser(function(){p(!0)},c,u):n(u)});null==b?this.authenticate(function(){p(!0)},c):p(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,l,n,p){if(null!=n)c(e,n);else{var u=e.length-2,G=mxUtils.bind(this,function(){if(2>u)l({message:mxResources.get("fileNotFound")});else{var H=Math.max(u-1,0),F=e.slice(0,H).join("/");H=e[H];var K=e[u],d=e.slice(u+1,e.length).join("/");F=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+H)+"/repository/"+(f?p?"branches?per_page=1&page=1&ref="++K:"tree?path="+d+"&ref="+K:"files/"+encodeURIComponent(d)+"?ref="+K);var g=new mxXmlRequest(F,null,"HEAD");this.executeRequest(g,mxUtils.bind(this,function(){200==g.getStatus()?c(e,u):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==g.getStatus()?(u--,G()):l({message:mxResources.get("fileNotFound")})}))}});G()}};GitLabClient.prototype.getFile=function(e,f,c,l,n,p){l=null!=l?l:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(u,G){var H=Math.max(G-1,0),+F=u.slice(0,H).join("/"),K=u[H],d=u[G];e=u.slice(G+1,u.length).join("/");u=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&u))if(null!=b){H="&t="+(new Date).getTime();var g=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+K)+"/repository/files/"+encodeURIComponent(e)+"?ref="+d;u=e.split("/");this.ui.convertFile(g+H,0<u.length?u[u.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(k,v,t){k=new mxXmlRequest(k,null,+"GET");this.executeRequest(k,mxUtils.bind(this,function(x){try{v(this.getFileContent(JSON.parse(x.getText())))}catch(A){t(A)}}),t)}))}else c({message:mxResources.get("accessDenied")});else H="&t="+(new Date).getTime(),g=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+K)+"/repository/files/"+encodeURIComponent(e)+"?ref="+d,u=new mxXmlRequest(g+H,null,"GET"),this.executeRequest(u,mxUtils.bind(this,function(k){try{f(this.createGitLabFile(F,K,d,JSON.parse(k.getText()),l,G))}catch(v){c(v)}}),c)}),c,+p)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,l,n,p){var u=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,+ref:c,name:l.file_name,path:l.file_path,html_url:u+e+"/"+f+"/blob/"+c+"/"+l.file_path,download_url:u+e+"/"+f+"/raw/"+c+"/"+l.file_path+"?inline=false",last_commit_id:l.last_commit_id,refPos:p};l=this.getFileContent(l);return n?new GitLabLibrary(this.ui,l,e):new GitLabFile(this.ui,l,e)};GitLabClient.prototype.insertFile=function(e,f,c,l,n,p,u){n=null!=n?n:!1;p=p.split("/");this.getRefIndex(p,!0,mxUtils.bind(this,function(G,H){var F=Math.max(H-1,0),K=G.slice(0,F).join("/"),d=G[F],g=G[H];path=G.slice(H++1,G.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(K+"/"+d+"/"+g+"/"+path,!0,mxUtils.bind(this,function(k,v){k?n?(u||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(t){this.writeFile(K,d,g,path,t,f,v,mxUtils.bind(this,function(x){try{var A=JSON.parse(x.getText());c(this.createGitLabFile(K,d,g,null!=A.content?A.content:A,n,H))}catch(J){l(J)}}),l)}),l)):(k=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:K,repo:d,ref:g,name:e,path:path,html_url:k++K+"/"+d+"/blob/"+g+"/"+path,download_url:k+K+"/"+d+"/raw/"+g+"/"+path+"?inline=false",refPos:H,last_commit_id:v,isNew:!0}))):l()}))}),l,null,4>=p.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(l){if(f){var n=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){n();c(!0,l.getCurrentEtag())},function(){n();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),+mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(l){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e,f,c,l,n,p,u,G,H){if(p.length>=this.maxFileSize)H({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(p.length)+" / 10 MB)"});else{var F="POST";c={path:encodeURIComponent(l),branch:decodeURIComponent(c),commit_message:n,content:p,encoding:"base64"};null!=u&&(c.last_commit_id=u,F="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"++encodeURIComponent(l);F=new mxXmlRequest(e,JSON.stringify(c),F);this.executeRequest(F,mxUtils.bind(this,function(K){G(K)}),H)}};GitLabClient.prototype.saveFile=function(e,f,c,l,n){var p=e.meta.org,u=e.meta.repo,G=e.meta.ref,H=e.meta.path,F=mxUtils.bind(this,function(d,g){this.writeFile(p,u,G,H,n,g,d,mxUtils.bind(this,function(k){delete e.meta.isNew;this.getFile(p+"/"+u+"/"+G+"/"+H,mxUtils.bind(this,function(v){v.getData()==e.getData()?f(v.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,+null,e.meta.refPos)}),c)}),K=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){F(e.meta.last_commit_id,g)}),c,this.ui.getCurrentFile()!=e?e.getData():null,d.scale,d.border)}else F(e.meta.last_commit_id,Base64.encode(e.getData()))});l?this.getFile(p+"/"+u+"/"+G+"/"+H,mxUtils.bind(this,function(d){e.meta.last_commit_id=d.meta.last_commit_id;K()}),c):K()};GitLabClient.prototype.pickFolder=+function(e){this.showGitLabDialog(!1,e,!0)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f,c){var l=null,n=null,p=null,u=null,G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.overflow="hidden";G.style.height="304px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));+H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";G.appendChild(H);var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.border="1px solid lightgray";F.style.boxSizing="border-box";F.style.padding="4px";F.style.overflow="auto";F.style.lineHeight="1.2em";F.style.height="274px";G.appendChild(F);var K=document.createElement("div");K.style.textOverflow="ellipsis";K.style.boxSizing="border-box";K.style.overflow="hidden";K.style.padding="4px";K.style.width=+"100%";var d=new CustomDialog(this.ui,G,mxUtils.bind(this,function(){f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+u)}));this.ui.showDialog(d.container,420,370,!0,!0);e&&d.okButton.parentNode.removeChild(d.okButton);var g=mxUtils.bind(this,function(E,R,V,Q){var P=document.createElement("a");P.setAttribute("title",E);P.style.cursor="pointer";mxUtils.write(P,E);mxEvent.addListener(P,"click",R);Q&&(P.style.textDecoration="underline");null!=V&&(E=K.cloneNode(),E.style.padding=V,E.appendChild(P),P=E);return P}),+k=mxUtils.bind(this,function(E){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(g(l+"/"+n,mxUtils.bind(this,function(){u=null;D()}),null,!0));E||(mxUtils.write(R," / "),R.appendChild(g(decodeURIComponent(p),mxUtils.bind(this,function(){u=null;J()}),null,!0)));if(null!=u&&0<u.length){var V=u.split("/");for(E=0;E<V.length;E++)(function(Q){mxUtils.write(R," / ");R.appendChild(g(V[Q],mxUtils.bind(this,function(){u=V.slice(0,Q+1).join("/");A()}),null,!0))})(E)}F.appendChild(R)}),+v=mxUtils.bind(this,function(E){this.ui.handleError(E,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(u=p=n=l=null,D()):this.ui.hideDialog()}))}),t=null,x=null,A=mxUtils.bind(this,function(E){null==E&&(F.innerText="",E=1);var R=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/tree?path="+u+"&ref="+p+"&per_page=100&page="+E,null,"GET");this.ui.spinner.spin(F,mxResources.get("loading"));d.okButton.removeAttribute("disabled");null!=x&&+(mxEvent.removeListener(F,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){A(E+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==E&&(k(!p),F.appendChild(g("../ [Up]",mxUtils.bind(this,function(){if(""==+u||null==u)u=null,D();else{var C=u.split("/");u=C.slice(0,C.length-1).join("/");A()}}),"4px")));var P=JSON.parse(Q.getText());if(null==P||0==P.length)c||(mxUtils.br(F),mxUtils.write(F,mxResources.get("noFiles")));else{var q=!0,y=0,B=mxUtils.bind(this,function(C){for(var M=0;M<P.length;M++)mxUtils.bind(this,function(T){if(C==("tree"==T.type)){var m=K.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==+T.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(g(T.name+("tree"==T.type?"/":""),mxUtils.bind(this,function(){"tree"==T.type?(u=T.path,A()):e&&"blob"==T.type&&(this.ui.hideDialog(),f(l+"/"+n+"/"+p+"/"+T.path))})));F.appendChild(m);y++}})(P[M])});B(!0);e&&B(!1);100==y&&(F.appendChild(t),x=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&V()},mxEvent.addListener(F,"scroll",x))}}))}),+v,!0)}),J=mxUtils.bind(this,function(E,R){null==E&&(F.innerText="",E=1);var V=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/branches?per_page=100&page="+E,null,"GET");d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=x&&(mxEvent.removeListener(F,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,+mxResources.get("more")+"...");var Q=mxUtils.bind(this,function(){J(E+1)});mxEvent.addListener(t,"click",Q);this.executeRequest(V,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==E&&(k(!0),F.appendChild(g("../ [Up]",mxUtils.bind(this,function(){u=null;D()}),"4px")));var q=JSON.parse(P.getText());if(null==q||0==q.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)p=q[0].name,u="",A();else{for(var y=+0;y<q.length;y++)mxUtils.bind(this,function(B,C){var M=K.cloneNode();M.style.backgroundColor=0==C%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";M.appendChild(g(B.name,mxUtils.bind(this,function(){p=encodeURIComponent(B.name);u="";A()})));F.appendChild(M)})(q[y],y);100==q.length&&(F.appendChild(t),x=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&Q()},mxEvent.addListener(F,"scroll",x))}}))}),v)});d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));+var D=mxUtils.bind(this,function(E){var R=this.ui.spinner,V=0;this.ui.spinner.stop();var Q=function(){R.spin(F,mxResources.get("loading"));V+=1},P=function(){--V;0===V&&R.stop()};null==E&&(F.innerText="",E=1);null!=x&&(mxEvent.removeListener(F,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){0===V&&D(E+1)});mxEvent.addListener(t,+"click",q);var y=mxUtils.bind(this,function(C){Q();var M=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(M,mxUtils.bind(this,function(T){this.ui.tryAndHandle(mxUtils.bind(this,function(){C(JSON.parse(T.getText()));P()}))}),v)}),B=mxUtils.bind(this,function(C,M){Q();var T=new mxXmlRequest(this.baseUrl+"/groups/"+C.id+"/projects?per_page=100",null,"GET");this.executeRequest(T,mxUtils.bind(this,function(m){this.ui.tryAndHandle(mxUtils.bind(this,function(){M(C,JSON.parse(m.getText()));+P()}))}),v)});y(mxUtils.bind(this,function(C){if(null==this.user)mxUtils.write(F,mxResources.get("loggedOut"));else{Q();var M=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+E,null,"GET");this.executeRequest(M,mxUtils.bind(this,function(T){T=JSON.parse(T.getText());if(null!=T&&0!=T.length||null!=C&&0!=C.length){1==E&&(F.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===V){var I=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),+mxUtils.bind(this,function(L){null!=L&&(L=L.split("/"),1<L.length?(l=L[0],n=L[1],p=u=null,2<L.length?(p=encodeURIComponent(L.slice(2,L.length).join("/")),A()):J(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(I.container,300,80,!0,!1);I.init()}}))),mxUtils.br(F),mxUtils.br(F));for(var m=!0,z=0;z<T.length;z++)mxUtils.bind(this,function(I){var L=K.cloneNode();L.style.backgroundColor=m?Editor.isDarkMode()?+"#000000":"#eeeeee":"";m=!m;L.appendChild(g(I.name_with_namespace,mxUtils.bind(this,function(){0===V&&(l=I.owner.username,n=I.path,u="",J(null,!0))})));F.appendChild(L)})(T[z]);for(z=0;z<C.length;z++)Q(),B(C[z],mxUtils.bind(this,function(I,L){P();for(var N=0;N<L.length;N++){var O=K.cloneNode();O.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;mxUtils.bind(this,function(S){O.appendChild(g(S.name_with_namespace,mxUtils.bind(this,function(){0===V&&(l=I.full_path,n=S.path,u="",+J(null,!0))})));F.appendChild(O)})(L[N])}}));P()}else P(),mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));100==T.length&&(F.appendChild(t),x=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&q()},mxEvent.addListener(F,"scroll",x))}),v)}}))});b?this.user?D():this.updateUser(function(){D()},v,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){D()},v,!0)}),v)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="++encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,l,n,p){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=l;this.isResolved=n;this.user=p;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,l){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,l,n,p,u){DrawioComment.call(this,b,e,f,c,l,n,p);this.pCommentId=u};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,l){b={content:b.content};c?b.verb="resolve":l&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(n){e(n.replyId)}),f)};DriveComment.prototype.editComment=function(b,e,f){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},e,f)};-DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,k,p,q,u,E,H,D,L,G,d){function g(T,W){W=W||document;return W.querySelector(T)}function m(T,W,X){if(null==T["@microsoft.graph.downloadUrl"])if(null==T.parentReference)X();else{c(T.id,T.parentReference.driveId,function(aa){m(aa,W,X)},X);return}var Y=new XMLHttpRequest;Y.open("GET",T["@microsoft.graph.downloadUrl"]);var Z=T.file?"image/png"==T.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var aa=Y.responseText;-Z?(aa="data:image/png;base64,"+Editor.base64Encode(aa),aa=Editor.extractGraphModelFromPng(aa)):/\.pdf$/.test(T.name)&&(aa="data:application/pdf;base64,"+Editor.base64Encode(aa),aa=Editor.extractGraphModelFromPdf(aa));var ea=mxUtils.parseXml(aa),ca="mxlibrary"==ea.documentElement.nodeName?ea.documentElement:Editor.extractGraphModel(ea.documentElement);if(null!=ca){W(ca.ownerDocument);return}}catch(da){}X()}};(Z||/\.pdf$/.test(T.name))&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");-Y.send()}function t(){L&&null!=z?n.exportToCanvas(function(T){T=EditorUi.prototype.createImageDataUri(T,null,"png");q(A,T);p(A)},400,null,null,function(T){console.log(T)},600,null,null,null,null,null,z):(q(A,void 0),p(A))}function v(T){function W(X){O.style.background="transparent";O.innerText="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,X);O.appendChild(Y);R.stop()}if(null!=O)if(O.style.background="transparent",O.innerText="",null==T||T.folder||/\.drawiolib$/.test(T.name))W(mxResources.get("noPreview"));-else try{null!=T.remoteItem&&(T=T.remoteItem),x=T,R.spin(O),m(T,function(X){R.stop();if(x==T)if("mxlibrary"==X.documentElement.nodeName)W(mxResources.get("noPreview"));else{var Y=X.getElementsByTagName("diagram");z=AspectDialog.prototype.createViewer(O,0==Y.length?X.documentElement:Y[0],null,"transparent")}},function(){A=null;W(mxResources.get("notADiagramFile"))})}catch(X){A=null,W(mxResources.get("notADiagramFile"))}}function y(){var T=g(".odFilesBreadcrumb");if(null!=T){T.innerText="";for(var W=-0;W<S.length-1;W++){var X=document.createElement("span");X.className="odBCFolder";X.innerHTML=mxUtils.htmlEntities(S[W].name||mxResources.get("home"));T.appendChild(X);(function(Z,aa){X.addEventListener("click",function(){e(null);S=S.slice(0,aa);I(Z.driveId,Z.folderId,Z.siteId,Z.name)})})(S[W],W);var Y=document.createElement("span");Y.innerHTML=" > ";T.appendChild(Y)}null!=S[S.length-1]&&(W=document.createElement("span"),W.innerHTML=mxUtils.htmlEntities(1==S.length?mxResources.get(E?"selectFolder":-"officeSelDiag"):S[S.length-1].name||mxResources.get("home")),T.appendChild(W))}}function C(){if(null!=A&&!M)if("sharepoint"==B)I("site",null,A.id,A.displayName);else if("site"==B)I("subsite",null,A.id,A.name);else{var T=A.folder;A=A.remoteItem?A.remoteItem:A;var W=(A.parentReference?A.parentReference.driveId:null)||B,X=A.id;T?I(W,X,null,A.name):t()}}function I(T,W,X,Y,Z){function aa(pa){R.stop();var ra=document.createElement("table");ra.className="odFileListGrid";for(var xa=null,wa=0,fa=0;null!=-pa&&fa<pa.length;fa++){var na=pa[fa];if(1!=da||!na.webUrl||0<na.webUrl.indexOf("sharepoint.com/sites/")||0>na.webUrl.indexOf("sharepoint.com/")){var Aa=na.displayName||na.name,oa=mxUtils.htmlEntities(na.description||Aa);da&&(na.folder=2==da?{isRoot:!0}:!0);var Ea=null!=na.folder;if(!E||Ea){var va=document.createElement("tr");va.className=wa++%2?"odOddRow":"odEvenRow";var Ca=document.createElement("td");Ca.style.width="36px";var Fa=document.createElement("img");Fa.src="/images/"+(Ea?"folder.png":"file.png");-Fa.className="odFileImg";Ca.appendChild(Fa);va.appendChild(Ca);Ca=document.createElement("td");Ea=document.createElement("div");Ea.className="odFileTitle";Ea.innerHTML=mxUtils.htmlEntities(Aa);Ea.setAttribute("title",oa);Ca.appendChild(Ea);va.appendChild(Ca);ra.appendChild(va);null==xa&&(xa=va,xa.className+=" odRowSelected",A=na,B=T,d||e(A));(function(Ma,Ba){va.addEventListener("dblclick",C);va.addEventListener("click",function(){xa!=Ba&&(xa.className=xa.className.replace("odRowSelected",""),xa=Ba,-xa.className+=" odRowSelected",A=Ma,B=T,d||e(A))})})(na,va)}}}0==wa?(pa=document.createElement("div"),pa.className="odEmptyFolder",pa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ba.appendChild(pa)):ba.appendChild(ra);y();M=!1}function ea(pa){f(pa?pa:sa,function(ra){if(ca){var xa=ra.value||[];if(d||da)Array.prototype.push.apply(ha,xa);else{for(var wa=0;wa<xa.length;wa++){var fa=xa[wa],na=fa.file?fa.file.mimeType:null;(fa.folder||"text/html"==na||"text/xml"==-na||"application/xml"==na||"image/png"==na||/\.svg$/.test(fa.name)||/\.html$/.test(fa.name)||/\.xml$/.test(fa.name)||/\.png$/.test(fa.name)||/\.drawio$/.test(fa.name)||/\.drawiolib$/.test(fa.name)||/\.pdf$/.test(fa.name))&&ha.push(fa)}ha.sort(function(Aa,oa){var Ea=Aa.name.toLowerCase(),va=oa.name.toLowerCase();return Aa.folder&&!oa.folder?-1:!Aa.folder&&oa.folder?1:Ea<va?-1:Ea>va?1:0})}ra["@odata.nextLink"]&&1E3>ha.length?ea(ra["@odata.nextLink"]):(clearTimeout(ja),aa(ha))}},function(ra){if(ca){clearTimeout(ja);-var xa=null;try{xa=JSON.parse(ra.responseText).error.message}catch(wa){}u(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=xa?" ("+xa+")":""));M=!1;R.stop()}},null!=pa)}if(!M){g(".odCatsList").style.display="block";g(".odFilesSec").style.display="block";null!=O&&(O.innerText="",O.style.top="50%");var ca=M=!0,da=0;l=arguments;var ja=setTimeout(function(){M=ca=!1;R.stop();u(mxResources.get("timeout"))},2E4),ba=g(".odFilesList");ba.innerText="";R.spin(ba);switch(T){case "recent":S=-[{name:mxResources.get("recent",null,"Recent"),driveId:T}];var ia=k()||{},ka=[],ua;for(ua in ia)ka.push(ia[ua]);clearTimeout(ja);aa(ka);return;case "shared":var sa="/me/drive/sharedWithMe";S=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:T}];break;case "sharepoint":sa="/sites?search=";S=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:T}];da=1;break;case "site":S.push({name:Y,driveId:T,folderId:W,siteId:X});sa="/sites/"+X+"/drives";da=2;break;case "subsite":S.push({name:Y,-driveId:T,folderId:W,siteId:X});sa="/drives/"+X+(W?"/items/"+W:"/root")+"/children";break;case "search":T=B;S=[{driveId:T,name:mxResources.get("back",null,"Back")}];Z=encodeURIComponent(Z.replace(/'/g,"\\'"));sa=T?"/drives/"+T+"/root/search(q='"+Z+"')":"/me/drive/root/search(q='"+Z+"')";break;default:null==W?S=[{driveId:T}]:S.push({name:Y,driveId:T,folderId:W}),sa=(T?"/drives/"+T:"/me/drive")+(W?"/items/"+W:"/root")+"/children"}da||(sa+=(0<sa.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");-var ha=[];ea()}}function K(T){Q.className=Q.className.replace("odCatSelected","");Q=T;Q.className+=" odCatSelected"}function J(T){M||(V=null,I("search",null,null,null,T))}var U="";null==e&&(e=v,U='<div style="text-align: center;" class="odPreview"></div>');null==k&&(k=function(){var T=null;try{T=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(W){}return T});null==p&&(p=function(T){if(null!=T){var W=k()||{};delete T["@microsoft.graph.downloadUrl"];W[T.id]=T;localStorage.setItem("mxODPickerRecentList",-JSON.stringify(W))}});U='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+-mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img class="geAdaptiveAsset" src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+U+(H?'<div id="odBackBtn" class="odLinkBtn">< '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(D?'<button id="odSubmitBtn" class="odSubmitBtn">'+-mxUtils.htmlEntities(mxResources.get(E?"select":"open"))+"</button>":"");var P=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();P=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+-(P?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(P?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";-var R=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),n=new Editor,z=null,A=null,B=null,M=!1,S=[],l=null,x=null;this.getSelectedItem=function(){null!=A&&p(A);return A};if(null==g("#mxODPickerCss")){var F=document.head||document.getElementsByTagName("head")[0],N=document.createElement("style");F.appendChild(N);N.type="text/css";N.id="mxODPickerCss";N.appendChild(document.createTextNode(P))}b.innerHTML=-U;var O=g(".odPreview"),Q=g("#odFiles");b=function(T,W){W=W||document;return W.querySelectorAll(T)}(".odCatListTitle");for(U=0;U<b.length;U++)b[U].addEventListener("click",function(){A=x=null;if(!M)switch(K(this),this.id){case "odFiles":I();break;case "odRecent":I("recent");break;case "odShared":I("shared");break;case "odSharepoint":I("sharepoint")}});var V=null;g("#odSearchBox").addEventListener("keyup",function(T){var W=this;null!=V&&clearTimeout(V);13==T.keyCode?J(W.value):V=setTimeout(function(){J(W.value)},-500)});g("#refreshOD").addEventListener("click",function(){if(null!=l){e(null);var T=S.slice();I.apply(this,l);S=T}});H&&g("#odBackBtn").addEventListener("click",H);D&&g("#odSubmitBtn").addEventListener("click",t);null!=G?(H=G.pop(),"sharepoint"==G[0].driveId&&K(g("#odSharepoint")),S=G,I(H.driveId,H.folderId,H.siteId,H.name)):I()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&c.isModified()&&(c.getHash(),c.savingFile&&null!=c.savingFileTime&&(Date.now(),c.savingFileTime.getTime()),null!=c.ageStart&&(Date.now(),c.ageStart.getTime()),c.isAutosave(),null!=c.opened&&(Date.now(),c.opened.getTime()),null!=c.lastSaved&&(Date.now(),c.lastSaved.getTime()),+DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,l,n,p,u,G,H,F,K,d,g){function k(U,W){W=W||document;return W.querySelector(U)}function v(U,W,X){if(null==U["@microsoft.graph.downloadUrl"])if(null==U.parentReference)X();else{c(U.id,U.parentReference.driveId,function(ba){v(ba,W,X)},X);return}var Z=new XMLHttpRequest;Z.open("GET",U["@microsoft.graph.downloadUrl"]);var Y=U.file?"image/png"==U.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ba=Z.responseText;+Y?(ba="data:image/png;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPng(ba)):/\.pdf$/.test(U.name)&&(ba="data:application/pdf;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPdf(ba));var ea=mxUtils.parseXml(ba),ca="mxlibrary"==ea.documentElement.nodeName?ea.documentElement:Editor.extractGraphModel(ea.documentElement);if(null!=ca){W(ca.ownerDocument);return}}catch(fa){}X()}};(Y||/\.pdf$/.test(U.name))&&Z.overrideMimeType&&Z.overrideMimeType("text/plain; charset=x-user-defined");+Z.send()}function t(){K&&null!=y?q.exportToCanvas(function(U){U=EditorUi.prototype.createImageDataUri(U,null,"png");p(B,U);n(B)},400,null,null,function(U){console.log(U)},600,null,null,null,null,null,y):(p(B,void 0),n(B))}function x(U){function W(X){N.style.background="transparent";N.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,X);N.appendChild(Z);P.stop()}if(null!=N)if(N.style.background="transparent",N.innerText="",null==U||U.folder||/\.drawiolib$/.test(U.name))W(mxResources.get("noPreview"));+else try{null!=U.remoteItem&&(U=U.remoteItem),z=U,P.spin(N),v(U,function(X){P.stop();if(z==U)if("mxlibrary"==X.documentElement.nodeName)W(mxResources.get("noPreview"));else{var Z=X.getElementsByTagName("diagram");y=AspectDialog.prototype.createViewer(N,0==Z.length?X.documentElement:Z[0],null,"transparent")}},function(){B=null;W(mxResources.get("notADiagramFile"))})}catch(X){B=null,W(mxResources.get("notADiagramFile"))}}function A(){var U=k(".odFilesBreadcrumb");if(null!=U){U.innerText="";for(var W=+0;W<T.length-1;W++){var X=document.createElement("span");X.className="odBCFolder";X.innerHTML=mxUtils.htmlEntities(T[W].name||mxResources.get("home"));U.appendChild(X);(function(Y,ba){X.addEventListener("click",function(){e(null);T=T.slice(0,ba);D(Y.driveId,Y.folderId,Y.siteId,Y.name)})})(T[W],W);var Z=document.createElement("span");Z.innerHTML=" > ";U.appendChild(Z)}null!=T[T.length-1]&&(W=document.createElement("span"),W.innerHTML=mxUtils.htmlEntities(1==T.length?mxResources.get(G?"selectFolder":+"officeSelDiag"):T[T.length-1].name||mxResources.get("home")),U.appendChild(W))}}function J(){if(null!=B&&!M)if("sharepoint"==C)D("site",null,B.id,B.displayName);else if("site"==C)D("subsite",null,B.id,B.name);else{var U=B.folder;B=B.remoteItem?B.remoteItem:B;var W=(B.parentReference?B.parentReference.driveId:null)||C,X=B.id;U?D(W,X,null,B.name):t()}}function D(U,W,X,Z,Y){function ba(qa){P.stop();var ua=document.createElement("table");ua.className="odFileListGrid";for(var ya=null,ja=0,ma=0;null!=+qa&&ma<qa.length;ma++){var ka=qa[ma];if(1!=fa||!ka.webUrl||0<ka.webUrl.indexOf("sharepoint.com/sites/")||0>ka.webUrl.indexOf("sharepoint.com/")){var Ba=ka.displayName||ka.name,sa=mxUtils.htmlEntities(ka.description||Ba);fa&&(ka.folder=2==fa?{isRoot:!0}:!0);var Ea=null!=ka.folder;if(!G||Ea){var wa=document.createElement("tr");wa.className=ja++%2?"odOddRow":"odEvenRow";var Ca=document.createElement("td");Ca.style.width="36px";var Da=document.createElement("img");Da.src="/images/"+(Ea?"folder.png":"file.png");+Da.className="odFileImg";Ca.appendChild(Da);wa.appendChild(Ca);Ca=document.createElement("td");Ea=document.createElement("div");Ea.className="odFileTitle";Ea.innerHTML=mxUtils.htmlEntities(Ba);Ea.setAttribute("title",sa);Ca.appendChild(Ea);wa.appendChild(Ca);ua.appendChild(wa);null==ya&&(ya=wa,ya.className+=" odRowSelected",B=ka,C=U,g||e(B));(function(Ka,Aa){wa.addEventListener("dblclick",J);wa.addEventListener("click",function(){ya!=Aa&&(ya.className=ya.className.replace("odRowSelected",""),ya=Aa,+ya.className+=" odRowSelected",B=Ka,C=U,g||e(B))})})(ka,wa)}}}0==ja?(qa=document.createElement("div"),qa.className="odEmptyFolder",qa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),da.appendChild(qa)):da.appendChild(ua);A();M=!1}function ea(qa){f(qa?qa:ha,function(ua){if(ca){var ya=ua.value||[];if(g||fa)Array.prototype.push.apply(xa,ya);else{for(var ja=0;ja<ya.length;ja++){var ma=ya[ja],ka=ma.file?ma.file.mimeType:null;(ma.folder||"text/html"==ka||"text/xml"==+ka||"application/xml"==ka||"image/png"==ka||/\.svg$/.test(ma.name)||/\.html$/.test(ma.name)||/\.xml$/.test(ma.name)||/\.png$/.test(ma.name)||/\.drawio$/.test(ma.name)||/\.drawiolib$/.test(ma.name)||/\.pdf$/.test(ma.name))&&xa.push(ma)}xa.sort(function(Ba,sa){var Ea=Ba.name.toLowerCase(),wa=sa.name.toLowerCase();return Ba.folder&&!sa.folder?-1:!Ba.folder&&sa.folder?1:Ea<wa?-1:Ea>wa?1:0})}ua["@odata.nextLink"]&&1E3>xa.length?ea(ua["@odata.nextLink"]):(clearTimeout(aa),ba(xa))}},function(ua){if(ca){clearTimeout(aa);+var ya=null;try{ya=JSON.parse(ua.responseText).error.message}catch(ja){}u(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ya?" ("+ya+")":""));M=!1;P.stop()}},null!=qa)}if(!M){k(".odCatsList").style.display="block";k(".odFilesSec").style.display="block";null!=N&&(N.innerText="",N.style.top="50%");var ca=M=!0,fa=0;m=arguments;var aa=setTimeout(function(){M=ca=!1;P.stop();u(mxResources.get("timeout"))},2E4),da=k(".odFilesList");da.innerText="";P.spin(da);switch(U){case "recent":T=+[{name:mxResources.get("recent",null,"Recent"),driveId:U}];var ia=l()||{},pa=[],oa;for(oa in ia)pa.push(ia[oa]);clearTimeout(aa);ba(pa);return;case "shared":var ha="/me/drive/sharedWithMe";T=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:U}];break;case "sharepoint":ha="/sites?search=";T=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:U}];fa=1;break;case "site":T.push({name:Z,driveId:U,folderId:W,siteId:X});ha="/sites/"+X+"/drives";fa=2;break;case "subsite":T.push({name:Z,+driveId:U,folderId:W,siteId:X});ha="/drives/"+X+(W?"/items/"+W:"/root")+"/children";break;case "search":U=C;T=[{driveId:U,name:mxResources.get("back",null,"Back")}];Y=encodeURIComponent(Y.replace(/'/g,"\\'"));ha=U?"/drives/"+U+"/root/search(q='"+Y+"')":"/me/drive/root/search(q='"+Y+"')";break;default:null==W?T=[{driveId:U}]:T.push({name:Z,driveId:U,folderId:W}),ha=(U?"/drives/"+U:"/me/drive")+(W?"/items/"+W:"/root")+"/children"}fa||(ha+=(0<ha.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");+var xa=[];ea()}}function E(U){O.className=O.className.replace("odCatSelected","");O=U;O.className+=" odCatSelected"}function R(U){M||(S=null,D("search",null,null,null,U))}var V="";null==e&&(e=x,V='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var U=null;try{U=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(W){}return U});null==n&&(n=function(U){if(null!=U){var W=l()||{};delete U["@microsoft.graph.downloadUrl"];W[U.id]=U;localStorage.setItem("mxODPickerRecentList",+JSON.stringify(W))}});V='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'++mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img class="geAdaptiveAsset" src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+V+(H?'<div id="odBackBtn" class="odLinkBtn">< '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(F?'<button id="odSubmitBtn" class="odSubmitBtn">'++mxUtils.htmlEntities(mxResources.get(G?"select":"open"))+"</button>":"");var Q=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();Q=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"++(Q?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(Q?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";+var P=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),q=new Editor,y=null,B=null,C=null,M=!1,T=[],m=null,z=null;this.getSelectedItem=function(){null!=B&&n(B);return B};if(null==k("#mxODPickerCss")){var I=document.head||document.getElementsByTagName("head")[0],L=document.createElement("style");I.appendChild(L);L.type="text/css";L.id="mxODPickerCss";L.appendChild(document.createTextNode(Q))}b.innerHTML=+V;var N=k(".odPreview"),O=k("#odFiles");b=function(U,W){W=W||document;return W.querySelectorAll(U)}(".odCatListTitle");for(V=0;V<b.length;V++)b[V].addEventListener("click",function(){B=z=null;if(!M)switch(E(this),this.id){case "odFiles":D();break;case "odRecent":D("recent");break;case "odShared":D("shared");break;case "odSharepoint":D("sharepoint")}});var S=null;k("#odSearchBox").addEventListener("keyup",function(U){var W=this;null!=S&&clearTimeout(S);13==U.keyCode?R(W.value):S=setTimeout(function(){R(W.value)},+500)});k("#refreshOD").addEventListener("click",function(){if(null!=m){e(null);var U=T.slice();D.apply(this,m);T=U}});H&&k("#odBackBtn").addEventListener("click",H);F&&k("#odSubmitBtn").addEventListener("click",t);null!=d?(H=d.pop(),"sharepoint"==d[0].driveId&&E(k("#odSharepoint")),T=d,D(H.driveId,H.folderId,H.siteId,H.name)):D()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&c.isModified()&&(c.getHash(),c.savingFile&&null!=c.savingFileTime&&(Date.now(),c.savingFileTime.getTime()),null!=c.ageStart&&(Date.now(),c.ageStart.getTime()),c.isAutosave(),null!=c.opened&&(Date.now(),c.opened.getTime()),null!=c.lastSaved&&(Date.now(),c.lastSaved.getTime()),null!=c.lastChanged&&(Date.now(),c.lastChanged.getTime()),Date.now(),App.startTime.getTime(),c.constructor==DriveFile&&null!=c.desc&&null!=this.drive&&c.getSize())}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":-(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(c,k,p){if("1"==urlParams.openInSameWin||navigator.standalone)null!=p&&p();else{var q=null;try{q=window.open(c)}catch(u){}null==q||void 0===q?this.showDialog((new PopupDialog(this,c,k,p)).container,320,160,!0,!0):null!=k&&k()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&+(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(c,l,n){if("1"==urlParams.openInSameWin||navigator.standalone)null!=n&&n();else{var p=null;try{p=window.open(c)}catch(u){}null==p||void 0===p?this.showDialog((new PopupDialog(this,c,l,n)).container,320,160,!0,!0):null!=l&&l()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(c){null!=window.console&&console.log("Plugin Error:",c,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(c){try{c(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":"js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="js/jquery/jquery-3.6.0.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL="js/simplepeer/simplepeer9.10.0.min.js";App.GOOGLE_APIS="drive-share";App.startTime=new Date;App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",nxtcld:"plugins/nextcloud.js",monday:"plugins/monday.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js","import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex tips svgdata number sql props text anim update trees replay anon webcola tags".split(" ");-App.loadScripts=function(b,e,f){for(var c=b.length,k=!1,p=0;p<b.length;p++)mxscript(b[p],function(){0!=--c||k||null==e||e()},null,null,null,function(q){k=!0;null!=f&&f(Error(q))})};-App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage)try{for(var e=document.cookie.split(";"),f=0;f<e.length;f++){var c=mxUtils.trim(e[f]);if("MODE="==c.substring(0,5)){b=c.substring(5);break}}if(null!=b&&isLocalStorage){var k=new Date;k.setYear(k.getFullYear()-1);document.cookie="MODE=; expires="+k.toUTCString();localStorage.setItem(".mode",b)}}catch(p){}return b};+App.loadScripts=function(b,e,f){for(var c=b.length,l=!1,n=0;n<b.length;n++)mxscript(b[n],function(){0!=--c||l||null==e||e()},null,null,null,function(p){l=!0;null!=f&&f(Error(p))})};+App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage)try{for(var e=document.cookie.split(";"),f=0;f<e.length;f++){var c=mxUtils.trim(e[f]);if("MODE="==c.substring(0,5)){b=c.substring(5);break}}if(null!=b&&isLocalStorage){var l=new Date;l.setYear(l.getFullYear()-1);document.cookie="MODE=; expires="+l.toUTCString();localStorage.setItem(".mode",b)}}catch(n){}return b};(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode),null==App.mode&&"1"!=urlParams.embed&&(App.mode=App.getStoredMode()),null!=window.mxscript&&"1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();App.clearServiceWorker=function(b,e){navigator.serviceWorker.getRegistrations().then(function(f){if(null!=f&&0<f.length){for(var c=0;c<f.length;c++)f[c].unregister();null!=b&&b()}})["catch"](function(){null!=e&&e()})};App.isSameDomain=function(b){var e=document.createElement("a");e.href=b;return e.protocol===window.location.protocol||e.host===window.location.host};App.isBuiltInPlugin=function(b){for(var e in App.pluginRegistry)if(App.pluginRegistry[e]==b)return!0;return!1};-App.main=function(b,e){try{var f=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var d=parseInt(mxSettings.settings.autosaveDelay);!isNaN(d)&&0<d?(DrawioFile.prototype.autosaveDelay=d,EditorUi.debug("Setting autosaveDelay",d)):EditorUi.debug("Invalid autosaveDelay",d)}null!=mxSettings.settings.defaultEdgeLength&&(d=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(d)&&0<d?(Graph.prototype.defaultEdgeLength=d,EditorUi.debug("Using defaultEdgeLength",d)):-EditorUi.debug("Invalid defaultEdgeLength",d))}}catch(m){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(m.stack)):console.error(m)}try{if(null!=Menus.prototype.defaultFonts)for(d=0;d<Menus.prototype.defaultFonts.length;d++){var g=Menus.prototype.defaultFonts[d];"string"!==typeof g&&null!=g.fontFamily&&null!=g.fontUrl&&Graph.addFont(g.fontFamily,g.fontUrl)}mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,-mxLanguage))}catch(m){document.body.innerHTML="",g=document.createElement("pre"),mxUtils.write(g,m.stack),document.body.appendChild(g)}},c=function(d){mxUtils.getAll("1"!=urlParams.dev?[d]:[d,STYLE_PATH+"/default.xml"],function(g){function m(){try{""!=Editor.currentTheme&&"kennedy"!=Editor.currentTheme&&"dark"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");var I=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,+App.main=function(b,e){try{var f=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var g=parseInt(mxSettings.settings.autosaveDelay);!isNaN(g)&&0<g?(DrawioFile.prototype.autosaveDelay=g,EditorUi.debug("Setting autosaveDelay",g)):EditorUi.debug("Invalid autosaveDelay",g)}null!=mxSettings.settings.defaultEdgeLength&&(g=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(g)&&0<g?(Graph.prototype.defaultEdgeLength=g,EditorUi.debug("Using defaultEdgeLength",g)):+EditorUi.debug("Invalid defaultEdgeLength",g))}}catch(v){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(v.stack)):console.error(v)}try{if(null!=Menus.prototype.defaultFonts)for(g=0;g<Menus.prototype.defaultFonts.length;g++){var k=Menus.prototype.defaultFonts[g];"string"!==typeof k&&null!=k.fontFamily&&null!=k.fontUrl&&Graph.addFont(k.fontFamily,k.fontUrl)}mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,+mxLanguage))}catch(v){document.body.innerHTML="",k=document.createElement("pre"),mxUtils.write(k,v.stack),document.body.appendChild(k)}},c=function(g){mxUtils.getAll("1"!=urlParams.dev?[g]:[g,STYLE_PATH+"/default.xml"],function(k){function v(){try{""!=Editor.currentTheme&&"kennedy"!=Editor.currentTheme&&"dark"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");var D=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)}):"undefined"===typeof window.Dropbox&&(window.DropboxClient=null),"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null),"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===-typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(I);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,I,(new Date).getTime()-t0.getTime()+"ms"]),null!=-urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(K){EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(K.stack)):(EditorUi.logError(K.message,null,null,null,K),window.setTimeout(function(){alert(K.message)},1))}}mxResources.parse(g[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var t=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=t){EditorUi.debug("Setting configuration",-JSON.stringify(t));if(null!=t.merge){var v=localStorage.getItem(Editor.configurationKey);if(null!=v)try{var y=JSON.parse(v),C;for(C in t.merge)y[C]=t.merge[C];t=y}catch(I){window.location.hash="",alert(I)}else t=t.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(t)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(I){window.location.hash="",alert(I)}1<g.length&&-(Graph.prototype.defaultThemes["default-style2"]=g[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=g[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?m():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],m,function(I){document.body.innerHTML="";var K=document.createElement("pre");mxUtils.write(K,I.stack);document.body.appendChild(K)}))},function(g){g=document.getElementById("geStatus");null!=g&&-(g.innerHTML="Error loading page. <a>Please try refreshing.</a>",g.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';-else if(App.isMainCalled=!0,window.onerror=function(d,g,m,t,v){EditorUi.logError("Global: "+(null!=d?d:""),g,m,t,v,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",d,"\nURL:",g,"\nLine:",m,"\nColumn:",t,"\nError:",v)):console.error("Message:",d,"\nURL:",g,"\nLine:",m,"\nColumn:",t,"\nError:",v);window.setTimeout(function(){alert("Error: "+(null!=d?d:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&-"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var k=document.getElementById("geInfo");null!=k&&k.parentNode.removeChild(k)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){var p=document.getElementById("geBootstrap");-if(null!=p){var q=mxUtils.getTextContent(p);"ff68e9badc5b6bcb8f482e0c64b103a7"!=CryptoJS.MD5(q).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(q).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}var u=document.getElementById("geMain");null!=u&&(q=mxUtils.getTextContent(u),"69c25556b6237c57cdb7d017147af34b"!=CryptoJS.MD5(q).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(q).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&-("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(d){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||-"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var E=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var H=JSON.parse(localStorage.getItem(mxSettings.key));null!=H&&(E=H.plugins)}catch(d){}H=urlParams.p;App.initPluginCallback();null!=H&&App.loadPlugins(H.split(";"));if(null!=E&&0<-E.length&&"0"!=urlParams.plugins)for(k=0;k<E.length;k++)try{("/"==E[k].charAt(0)&&(E[k]=PLUGINS_BASE_PATH+E[k]),App.isSameDomain(E[k]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(E[k])?null==App.pluginsLoaded[E[k]]&&(App.pluginsLoaded[E[k]]=!0,App.embedModePluginsCount++,mxscript(E[k])):null!=window.console&&console.log("Unknown plugin:",E[k]):null!=window.console&&console.log("Blocked plugin:",E[k])}catch(d){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&-"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var D=window.opener||window.parent,L=function(d){if(d.source==D)try{var g=JSON.parse(d.data);null!=g&&"configure"==-g.action&&(mxEvent.removeListener(window,"message",L),Editor.configure(g.config),mxSettings.load(),null!=g.config.darkColor&&document.body.style.setProperty("--dark-color",g.config.darkColor),g.colorSchemeMeta&&mxmeta("color-scheme","dark light"),f())}catch(m){null!=window.console&&console.log("Error in configure message: "+m,d.data)}};mxEvent.addListener(window,"message",L);D.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",-window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(d){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(d.stack)):console.error(d)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var G=localStorage.getItem(Editor.configurationKey);if(null!=G)try{G=JSON.parse(G),null!=G&&(EditorUi.debug("Using local configuration",G),Editor.configure(G),mxSettings.load())}catch(d){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(d.stack)):-console.error(d)}}}f()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(d){document.body.innerHTML="",E=document.createElement("pre"),mxUtils.write(E,d.stack),document.body.appendChild(E)}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;+typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(D);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,D,(new Date).getTime()-t0.getTime()+"ms"]),null!=+urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(E){EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(E.stack)):(EditorUi.logError(E.message,null,null,null,E),window.setTimeout(function(){alert(E.message)},1))}}mxResources.parse(k[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var t=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=t){EditorUi.debug("Setting configuration",+JSON.stringify(t));if(null!=t.merge){var x=localStorage.getItem(Editor.configurationKey);if(null!=x)try{var A=JSON.parse(x),J;for(J in t.merge)A[J]=t.merge[J];t=A}catch(D){window.location.hash="",alert(D)}else t=t.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(t)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(D){window.location.hash="",alert(D)}1<k.length&&+(Graph.prototype.defaultThemes["default-style2"]=k[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=k[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?v():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],v,function(D){document.body.innerHTML="";var E=document.createElement("pre");mxUtils.write(E,D.stack);document.body.appendChild(E)}))},function(k){k=document.getElementById("geStatus");null!=k&&+(k.innerHTML="Error loading page. <a>Please try refreshing.</a>",k.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';+else if(App.isMainCalled=!0,window.onerror=function(g,k,v,t,x){EditorUi.logError("Global: "+(null!=g?g:""),k,v,t,x,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",g,"\nURL:",k,"\nLine:",v,"\nColumn:",t,"\nError:",x)):console.error("Message:",g,"\nURL:",k,"\nLine:",v,"\nColumn:",t,"\nError:",x);window.setTimeout(function(){alert("Error: "+(null!=g?g:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&+"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l=document.getElementById("geInfo");null!=l&&l.parentNode.removeChild(l)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){var n=document.getElementById("geBootstrap");+if(null!=n){var p=mxUtils.getTextContent(n);"ff68e9badc5b6bcb8f482e0c64b103a7"!=CryptoJS.MD5(p).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(p).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}var u=document.getElementById("geMain");null!=u&&(p=mxUtils.getTextContent(u),"69c25556b6237c57cdb7d017147af34b"!=CryptoJS.MD5(p).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(p).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&+("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(g){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||+"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var G=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var H=JSON.parse(localStorage.getItem(mxSettings.key));null!=H&&(G=H.plugins)}catch(g){}H=urlParams.p;App.initPluginCallback();null!=H&&App.loadPlugins(H.split(";"));if(null!=G&&0<+G.length&&"0"!=urlParams.plugins)for(l=0;l<G.length;l++)try{("/"==G[l].charAt(0)&&(G[l]=PLUGINS_BASE_PATH+G[l]),App.isSameDomain(G[l]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(G[l])?null==App.pluginsLoaded[G[l]]&&(App.pluginsLoaded[G[l]]=!0,App.embedModePluginsCount++,mxscript(G[l])):null!=window.console&&console.log("Unknown plugin:",G[l]):null!=window.console&&console.log("Blocked plugin:",G[l])}catch(g){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&+"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var F=window.opener||window.parent,K=function(g){if(g.source==F)try{var k=JSON.parse(g.data);null!=k&&"configure"==+k.action&&(mxEvent.removeListener(window,"message",K),Editor.configure(k.config),mxSettings.load(),null!=k.config.darkColor&&document.body.style.setProperty("--dark-color",k.config.darkColor),k.colorSchemeMeta&&mxmeta("color-scheme","dark light"),f())}catch(v){null!=window.console&&console.log("Error in configure message: "+v,g.data)}};mxEvent.addListener(window,"message",K);F.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",+window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):console.error(g)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var d=localStorage.getItem(Editor.configurationKey);if(null!=d)try{d=JSON.parse(d),null!=d&&(EditorUi.debug("Using local configuration",d),Editor.configure(d),mxSettings.load())}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):+console.error(g)}}}f()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(g){document.body.innerHTML="",G=document.createElement("pre"),mxUtils.write(G,g.stack),document.body.appendChild(G)}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;-App.loadPlugins=function(b,e){EditorUi.debug("Loading plugins",b);for(var f=0;f<b.length;f++)if(null!=b[f]&&0<b[f].length)try{if(null!=App.pluginRegistry[b[f]]){var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[f]];null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(c):mxscript(c):e?mxinclude(c):mxscript(drawDevUrl+c))}else null!=window.console&&console.log("Unknown plugin:",b[f])}catch(k){null!=window.console&&console.log("Error loading plugin:",-b[f],k)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};+App.loadPlugins=function(b,e){EditorUi.debug("Loading plugins",b);for(var f=0;f<b.length;f++)if(null!=b[f]&&0<b[f].length)try{if(null!=App.pluginRegistry[b[f]]){var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[f]];null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(c):mxscript(c):e?mxinclude(c):mxscript(drawDevUrl+c))}else null!=window.console&&console.log("Unknown plugin:",b[f])}catch(l){null!=window.console&&console.log("Error loading plugin:",+b[f],l)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};App.prototype.init=function(){if(!App.blockedAncestorFrames()){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.toggleCompactMode(!0)}));try{this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==-urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this),null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}))}catch(p){null!=window.console&&console.log("GitHubClient disabled: "+p.message)}try{this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this),null!=this.gitLab&&-this.gitLab.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}))}catch(p){null!=window.console&&console.log("GitLabClient disabled: "+p.message)}if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){if("undefined"!==typeof OneDrive)try{this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded",-"client",this.oneDrive))}catch(p){null!=window.console&&console.log("OneDriveClient disabled: "+p.message)}else null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var e=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded",-"client",this.trello))}catch(p){null!=window.console&&console.log("TrelloClient disabled: "+p.message)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var f=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var p=mxUtils.bind(this,function(){try{this.drive=new DriveClient(this),this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()})),-this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))}catch(q){null!=window.console&&console.log("DriveClient disabled: "+q.message)}});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,p),window.DrawGapiClientCallback=null):p()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){if("function"===typeof Dropbox){window.DrawDropboxClientCallback=-null;try{this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(p){null!=window.console&&console.log("DropboxClient disabled: "+p.message)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=c)});c()}if("1"!=urlParams.embed){if(this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility=-"hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(p){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){p.prompt()})})),!this.isOwnDomain()||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",-mxUtils.bind(this,function(){var p=this.getCurrentFile();p=null!=p?p.getMode():null;mxClient.IS_CHROMEAPP||mxClient.IS_ANDROID||mxClient.IS_IOS||EditorUi.isElectronApp||this.isOffline()||null!=urlParams.open||"1"==urlParams.extAuth||p!=App.MODE_DEVICE&&p!=App.MODE_BROWSER||this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||!Editor.enableRealtimeCache||this.editor.chromeless&&-!this.editor.editable)){var k=window.setTimeout(mxUtils.bind(this,function(){Editor.enableRealtimeCache=!1}),Editor.cacheTimeout);mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(p){Editor.enableRealtimeCache=200<=p.getStatus()&&299>=p.getStatus();window.clearTimeout(k)}),function(){Editor.enableRealtimeCache=!1;window.clearTimeout(k)})}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=this.createButtonContainer(),-this.menubar.container.appendChild(this.buttonContainer),"atlas"==Editor.currentTheme&&this.toggleCompactMode(!1),"atlas"==Editor.currentTheme||"1"==urlParams.atlas)&&(this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="1"==urlParams.atlas?"7px":"6px","1"!=urlParams.embed&&(this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(p){this.appIconClicked(p)}))),+urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this),null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}))}catch(n){null!=window.console&&console.log("GitHubClient disabled: "+n.message)}try{this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this),null!=this.gitLab&&+this.gitLab.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}))}catch(n){null!=window.console&&console.log("GitLabClient disabled: "+n.message)}if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){if("undefined"!==typeof OneDrive)try{this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded",+"client",this.oneDrive))}catch(n){null!=window.console&&console.log("OneDriveClient disabled: "+n.message)}else null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var e=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded",+"client",this.trello))}catch(n){null!=window.console&&console.log("TrelloClient disabled: "+n.message)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var f=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var n=mxUtils.bind(this,function(){try{this.drive=new DriveClient(this),this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()})),+this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))}catch(p){null!=window.console&&console.log("DriveClient disabled: "+p.message)}});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,n),window.DrawGapiClientCallback=null):n()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){if("function"===typeof Dropbox){window.DrawDropboxClientCallback=+null;try{this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(n){null!=window.console&&console.log("DropboxClient disabled: "+n.message)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=c)});c()}if("1"!=urlParams.embed){if(this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility=+"hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(n){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){n.prompt()})})),!this.isOwnDomain()||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",+mxUtils.bind(this,function(){var n=this.getCurrentFile();n=null!=n?n.getMode():null;mxClient.IS_CHROMEAPP||mxClient.IS_ANDROID||mxClient.IS_IOS||EditorUi.isElectronApp||this.isOffline()||null!=urlParams.open||"1"==urlParams.extAuth||n!=App.MODE_DEVICE&&n!=App.MODE_BROWSER||this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||!Editor.enableRealtimeCache||this.editor.chromeless&&+!this.editor.editable)){var l=window.setTimeout(mxUtils.bind(this,function(){Editor.enableRealtimeCache=!1}),Editor.cacheTimeout);mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(n){Editor.enableRealtimeCache=200<=n.getStatus()&&299>=n.getStatus();window.clearTimeout(l)}),function(){Editor.enableRealtimeCache=!1;window.clearTimeout(l)})}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=this.createButtonContainer(),+this.menubar.container.appendChild(this.buttonContainer),"atlas"==Editor.currentTheme&&this.toggleCompactMode(!1),"atlas"==Editor.currentTheme||"1"==urlParams.atlas)&&(this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="1"==urlParams.atlas?"7px":"6px","1"!=urlParams.embed&&(this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(n){this.appIconClicked(n)}))),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild));this.editor.graph.isViewer()&&this.initializeViewerMode()}};App.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&b.substring(0,b.length-1);b="";for(var e=0;e<window.location.ancestorOrigins.length;e++)if(b+=" -> "+window.location.ancestorOrigins[e],b.endsWith("dan6v7pm1f1a1.cloudfront.net")||b.endsWith("confluence-cloud-excalidraw-ll3likebca-uc.a.run.app"))return!0}}catch(f){}return!1};App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};@@ -14079,29 +14078,29 @@ App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBann"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.closeImage);e.setAttribute("title",mxResources.get("close"));e.setAttribute("border","0");e.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(e);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.setAttribute("title","1 star");f.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");f.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");b.appendChild(f);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.setAttribute("title","2 star");c.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");c.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");-b.appendChild(c);var k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.setAttribute("title","3 star");k.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");k.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");-b.appendChild(k);var p=document.createElement("img");p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.setAttribute("title","4 star");p.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");p.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");-b.appendChild(p);this.bannerShowing=!0;var q=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(u){mxEvent.consume(u);q()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(u){mxEvent.consume(u);q()}));mxEvent.addListener(c,"click",mxUtils.bind(this,-function(u){mxEvent.consume(u);q()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(u){mxEvent.consume(u);q()}));mxEvent.addListener(p,"click",mxUtils.bind(this,function(u){mxEvent.consume(u);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");q()}));e=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){q()}),1E3)});window.setTimeout(mxUtils.bind(this,+b.appendChild(c);var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.setAttribute("title","3 star");l.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");l.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");+b.appendChild(l);var n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.setAttribute("title","4 star");n.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");n.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");+b.appendChild(n);this.bannerShowing=!0;var p=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(u){mxEvent.consume(u);p()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(u){mxEvent.consume(u);p()}));mxEvent.addListener(c,"click",mxUtils.bind(this,+function(u){mxEvent.consume(u);p()}));mxEvent.addListener(l,"click",mxUtils.bind(this,function(u){mxEvent.consume(u);p()}));mxEvent.addListener(n,"click",mxUtils.bind(this,function(u){mxEvent.consume(u);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");p()}));e=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){p()}),1E3)});window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(e,6E4)}};-App.prototype.checkLicense=function(){var b=this.drive.getUser(),e=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=e&&null!=b.id){var f=e.lastIndexOf("@"),c=0<=f?e.substring(f+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(k){try{if(200<=k.getStatus()&&299>=k.getStatus()){var p=k.getText();if(0<p.length){var q=JSON.parse(p);null!=q&&this.handleLicense(q,+App.prototype.checkLicense=function(){var b=this.drive.getUser(),e=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=e&&null!=b.id){var f=e.lastIndexOf("@"),c=0<=f?e.substring(f+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(l){try{if(200<=l.getStatus()&&299>=l.getStatus()){var n=l.getText();if(0<n.length){var p=JSON.parse(n);null!=p&&this.handleLicense(p,c)}}}catch(u){}}))}};App.prototype.handleLicense=function(b,e){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};-App.prototype.addRecent=function(b,e,f){if(isLocalStorage&&null!=localStorage){e=null!=e?e:"";var c=this.getRecent(e);if(null==c)c=[];else for(var k=0;k<c.length;k++)c[k].mode==b.mode&&c[k].id==b.id&&c.splice(k,1);null!=c&&(f=null!=f?f:10,c.unshift(b),c=c.slice(0,f),localStorage.setItem(".recent"+e,JSON.stringify(c)))}};App.prototype.getRecent=function(b){if(isLocalStorage&&null!=localStorage){try{var e=localStorage.getItem(".recent"+(null!=b?b:""));if(null!=e)return JSON.parse(e)}catch(f){}return null}};+App.prototype.addRecent=function(b,e,f){if(isLocalStorage&&null!=localStorage){e=null!=e?e:"";var c=this.getRecent(e);if(null==c)c=[];else for(var l=0;l<c.length;l++)c[l].mode==b.mode&&c[l].id==b.id&&c.splice(l,1);null!=c&&(f=null!=f?f:10,c.unshift(b),c=c.slice(0,f),localStorage.setItem(".recent"+e,JSON.stringify(c)))}};App.prototype.getRecent=function(b){if(isLocalStorage&&null!=localStorage){try{var e=localStorage.getItem(".recent"+(null!=b?b:""));if(null!=e)return JSON.parse(e)}catch(f){}return null}};App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(e){}};App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return this.logIfModified(b),mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,e=this.getCurrentFile();null==e||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=e&&(b=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};-App.prototype.getThumbnail=function(b,e,f){f=null!=f?f:0;var c=!1;try{var k=!0,p=window.setTimeout(mxUtils.bind(this,function(){k=!1;e(null)}),this.timeout),q=mxUtils.bind(this,function(P){window.clearTimeout(p);k&&e(P)});null==this.thumbImageCache&&(this.thumbImageCache={});var u=this.editor.graph,E=u.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var H=u.getGlobalVariable;u=this.createTemporaryGraph(u.getStylesheet());u.setBackgroundImage=this.editor.graph.setBackgroundImage;-var D=this.pages[0];this.currentPage==D?u.setBackgroundImage(E):null!=D.viewState&&null!=D.viewState&&(E=D.viewState.backgroundImage,u.setBackgroundImage(E));u.getGlobalVariable=function(P){return"page"==P?D.getName():"pagenumber"==P?1:H.apply(this,arguments)};u.getGlobalVariable=H;document.body.appendChild(u.container);u.model.setRoot(D.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(P){try{u!=this.editor.graph&&null!=u.container.parentNode&&-u.container.parentNode.removeChild(u.container)}catch(R){P=null}q(P)}),b,this.thumbImageCache,"#ffffff",function(){q()},null,null,null,null,null,null,u,f,null,null,null,"diagram",null),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var L=document.createElement("canvas"),G=u.getGraphBounds(),d=u.view.translate,g=u.view.scale;null!=E&&(G=mxRectangle.fromRectangle(G),G.add(new mxRectangle((d.x+E.x)*g,(d.y+E.y)*g,E.width*g,E.height*g)));var m=b/G.width;m=Math.min(1,Math.min(3*b/(4*G.height),-m));var t=Math.floor(G.x),v=Math.floor(G.y);L.setAttribute("width",Math.ceil(m*(G.width+4)));L.setAttribute("height",Math.ceil(m*(G.height+4)));var y=L.getContext("2d");y.scale(m,m);y.translate(-t,-v);var C=u.background;if(null==C||""==C||C==mxConstants.NONE)C="#ffffff";y.save();y.fillStyle=C;y.fillRect(t,v,Math.ceil(G.width+4),Math.ceil(G.height+4));y.restore();if(null!=E){var I=new Image;I.src=E.src;y.drawImage(I,E.x*m,E.y*m,E.width*m,E.height*m)}var K=new mxJsCanvas(L),J=new mxAsyncCanvas(this.thumbImageCache);-K.images=this.thumbImageCache.images;var U=new mxImageExport;U.drawShape=function(P,R){P.shape instanceof mxShape&&P.shape.checkBounds()&&(R.save(),R.translate(.5,.5),P.shape.paint(R),R.translate(-.5,-.5),R.restore())};U.drawText=function(P,R){};U.drawState(u.getView().getState(u.model.root),J);J.finish(mxUtils.bind(this,function(){try{U.drawState(u.getView().getState(u.model.root),K),u!=this.editor.graph&&null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}catch(P){L=null}q(L)}));-c=!0}}catch(P){c=!1,null!=u&&u!=this.editor.graph&&null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}c||window.clearTimeout(p);return c};+App.prototype.getThumbnail=function(b,e,f){f=null!=f?f:0;var c=!1;try{var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;e(null)}),this.timeout),p=mxUtils.bind(this,function(Q){window.clearTimeout(n);l&&e(Q)});null==this.thumbImageCache&&(this.thumbImageCache={});var u=this.editor.graph,G=u.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var H=u.getGlobalVariable;u=this.createTemporaryGraph(u.getStylesheet());u.setBackgroundImage=this.editor.graph.setBackgroundImage;+var F=this.pages[0];this.currentPage==F?u.setBackgroundImage(G):null!=F.viewState&&null!=F.viewState&&(G=F.viewState.backgroundImage,u.setBackgroundImage(G));u.getGlobalVariable=function(Q){return"page"==Q?F.getName():"pagenumber"==Q?1:H.apply(this,arguments)};u.getGlobalVariable=H;document.body.appendChild(u.container);u.model.setRoot(F.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(Q){try{u!=this.editor.graph&&null!=u.container.parentNode&&+u.container.parentNode.removeChild(u.container)}catch(P){Q=null}p(Q)}),b,this.thumbImageCache,"#ffffff",function(){p()},null,null,null,null,null,null,u,f,null,null,null,"diagram",null),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var K=document.createElement("canvas"),d=u.getGraphBounds(),g=u.view.translate,k=u.view.scale;null!=G&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle((g.x+G.x)*k,(g.y+G.y)*k,G.width*k,G.height*k)));var v=b/d.width;v=Math.min(1,Math.min(3*b/(4*d.height),+v));var t=Math.floor(d.x),x=Math.floor(d.y);K.setAttribute("width",Math.ceil(v*(d.width+4)));K.setAttribute("height",Math.ceil(v*(d.height+4)));var A=K.getContext("2d");A.scale(v,v);A.translate(-t,-x);var J=u.background;if(null==J||""==J||J==mxConstants.NONE)J="#ffffff";A.save();A.fillStyle=J;A.fillRect(t,x,Math.ceil(d.width+4),Math.ceil(d.height+4));A.restore();if(null!=G){var D=new Image;D.src=G.src;A.drawImage(D,G.x*v,G.y*v,G.width*v,G.height*v)}var E=new mxJsCanvas(K),R=new mxAsyncCanvas(this.thumbImageCache);+E.images=this.thumbImageCache.images;var V=new mxImageExport;V.drawShape=function(Q,P){Q.shape instanceof mxShape&&Q.shape.checkBounds()&&(P.save(),P.translate(.5,.5),Q.shape.paint(P),P.translate(-.5,-.5),P.restore())};V.drawText=function(Q,P){};V.drawState(u.getView().getState(u.model.root),R);R.finish(mxUtils.bind(this,function(){try{V.drawState(u.getView().getState(u.model.root),E),u!=this.editor.graph&&null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}catch(Q){K=null}p(K)}));+c=!0}}catch(Q){c=!1,null!=u&&u!=this.editor.graph&&null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}c||window.clearTimeout(n);return c};(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,f){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();e=null!=c?c.getMode():e;e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),-this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(f)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var k=new Date;k.setYear(k.getFullYear()+1);document.cookie="MODE="+e+"; expires="+k.toUTCString()}}catch(p){}}})();+this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(f)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var l=new Date;l.setYear(l.getFullYear()+1);document.cookie="MODE="+e+"; expires="+l.toUTCString()}}catch(n){}}})();App.prototype.appIconClicked=function(b){var e=this.getCurrentFile(),f=null!=e?e.getMode():null;e=null!=e?mxEvent.isAltDown(b)?e.getFolderUrl():e.getFileUrl():null;null!=e?this.openLink(e):f==App.MODE_GOOGLE?this.openLink("https://drive.google.com/?authuser=0"):f==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):f==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):f==App.MODE_GITHUB?this.openLink("https://github.com/"):f==App.MODE_GITLAB?this.openLink(DRAWIO_GITLAB_URL):f==App.MODE_TRELLO?this.openLink("https://trello.com/"):f==App.MODE_DEVICE?this.openLink("https://get.draw.io/"):this.openLink("https://www.drawio.com/");mxEvent.consume(b)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};-App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var e=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(e.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(f,c,k){this.spinner.stop();null==c&&(c=urlParams.title,k=!0,c=null!=c?decodeURIComponent(c):this.defaultFilename);0<(this.useCanvasForExport?--1:".png"==c.substring(c.length-4))&&(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,f,c):new LocalFile(this,f,c,k))}))}}catch(f){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};+App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var e=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(e.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(f,c,l){this.spinner.stop();null==c&&(c=urlParams.title,l=!0,c=null!=c?decodeURIComponent(c):this.defaultFilename);0<(this.useCanvasForExport?+-1:".png"==c.substring(c.length-4))&&(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,f,c):new LocalFile(this,f,c,l))}))}}catch(f){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};App.prototype.load=function(){try{if("1"!=urlParams.embed)try{if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(b){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash="G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}catch(b){this.handleError(b)}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})}catch(b){EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(b.stack)):(EditorUi.logError(b.message,null,null,null,b),alert(b.message))}};App.prototype.showRefreshDialog=function(b,e){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),e||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var f=this.getCurrentFile();null!=f&&f.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&@@ -14109,88 +14108,88 @@ App.prototype.showRefreshDialog=function(b,e){this.showingRefreshDialog||(this.sApp.prototype.showAlert=function(b){if(null!=b&&0<b.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";e.style.maxWidth="80%";e.style.width="max-content";e.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");e.appendChild(b);mxEvent.addListener(b,"click",function(f){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(f))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},2E3)},15E3)}};-App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(q,u,E,H,D){"ResizeObserver loop limit exceeded"!=q&&(EditorUi.logError("Uncaught: "+(null!=q?q:""),u,E,H,D,null,!0),b.handleError({message:q},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(q){var u=this.getCurrentFile();EditorUi.debug("storage event",[q],-[u]);null!=u&&".draft-alive-check"==q.key&&null!=q.newValue&&null!=u.draftId&&(this.draftAliveCheck=q.newValue,u.saveDraft())}))}catch(q){}var e=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(q){try{var u=this.getDiagramId();if(u!=e){e=u;var E=this.getCurrentFile();null!=E&&E.getHash()==u||this.loadFile(u,!0)}else{var H=this.getHashObject();if(null!=H&&null!=H.pageId&&null!=this.currentPage&&H.pageId!=this.currentPage.getId()){var D=this.getPageById(H.pageId);-null!=D&&this.selectPage(D)}}}catch(L){null!=document.body&&this.handleError(L,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var G=this.getCurrentFile();window.location.hash=null!=G?G.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(q){this.handleError(q,mxResources.get("errorLoadingFile"))}))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}else if((null==-window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var q=mxUtils.bind(this,function(H){Editor.isPngDataUrl(H)&&(H=Editor.extractGraphModelFromPng(H));var D=urlParams.title;D=null!=D?decodeURIComponent(D):this.defaultFilename;H=new LocalFile(this,-H,D,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(H.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(H);this.editor.chromeless||(H.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),u=window.opener||window.parent;if(u!=window){var E=urlParams.create;null!=E?q(u[decodeURIComponent(E)]):(E=urlParams.data,null!=E?q(decodeURIComponent(E)):this.installMessageHandler(mxUtils.bind(this,function(H,-D){D.source==u&&q(H)})))}}else if(null==this.dialog)if("1"==urlParams.demo)E=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=E;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),this.actions.get("insertTemplate").funct();else{E=!1;try{E=null!=window.opener&&null!=window.opener.openFile}catch(H){}E?this.spinner.spin(document.body,mxResources.get("loading")):(E=this.getDiagramId(),-!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=E&&0!=E.length||this.editor.isChromelessView()?null!=E&&0<E.length?this.loadFile(E,null,null,mxUtils.bind(this,function(){var H=decodeURIComponent(urlParams.viewbox||"");if(""!=H)try{var D=JSON.parse(H);this.editor.graph.fitWindow(D,D.border)}catch(L){console.error(L)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,-null,null,null,null,!0):this.checkDrafts())}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var k=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),p=mxUtils.bind(this,function(q){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,-q,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var u=urlParams.title;u=null!=u?decodeURIComponent(u):this.defaultFilename;q=this.getServiceCount(!0);isLocalStorage&&q++;var E=4>=q?2:6<q?4:3;u=new CreateDialog(this,u,mxUtils.bind(this,function(H,D){if(null==D){this.hideDialog();var L=Editor.useLocalStorage;this.createFile(0<H.length?H:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=L}else this.pickFolder(D,mxUtils.bind(this,function(G){this.createFile(H,-this.getFileData(!0),null,D,null,!0,G)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,E,null,null,null,this.editor.fileExtensions);this.showDialog(u.container,420,q>E?390:280,!0,!1,mxUtils.bind(this,function(H){H&&null==this.getCurrentFile()&&this.showSplash()}));u.init()}});if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))if("{"==c.charAt(0))this.spinner.stop(),c=JSON.parse(c),window.isMermaidEnabled&&"mermaid"==c.type?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(q){q!=-this.emptyDiagramXml&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"])),this.createFile(null!=q.filename?q.filename:this.defaultFilename,q,null,null,null,!0,null,!0),this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct())})),this.generateMermaidImage(c.data,null,function(){},mxUtils.bind(this,function(q){for(var u=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),E=0;E<u.length;E++)u[E].parentNode.removeChild(u[E]);mxMermaidToDrawio.resetListeners();-this.handleError(q)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"));else try{null!=window.opener&&null!=window.opener[c]?p(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(q){p(q)},mxUtils.bind(this,function(q){this.handleError(q,mxResources.get("errorLoadingFile"),k)}))}else(null==window.location.hash||1>=+App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(p,u,G,H,F){"ResizeObserver loop limit exceeded"!=p&&(EditorUi.logError("Uncaught: "+(null!=p?p:""),u,G,H,F,null,!0),b.handleError({message:p},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(p){var u=this.getCurrentFile();EditorUi.debug("storage event",[p],+[u]);null!=u&&".draft-alive-check"==p.key&&null!=p.newValue&&null!=u.draftId&&(this.draftAliveCheck=p.newValue,u.saveDraft())}))}catch(p){}var e=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(p){try{var u=this.getDiagramId();if(u!=e){e=u;var G=this.getCurrentFile();null!=G&&G.getHash()==u||this.loadFile(u,!0)}else{var H=this.getHashObject();if(null!=H&&null!=H.pageId&&null!=this.currentPage&&H.pageId!=this.currentPage.getId()){var F=this.getPageById(H.pageId);+null!=F&&this.selectPage(F)}}}catch(K){null!=document.body&&this.handleError(K,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var d=this.getCurrentFile();window.location.hash=null!=d?d.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(p){this.handleError(p,mxResources.get("errorLoadingFile"))}))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}else if((null==+window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var p=mxUtils.bind(this,function(H){Editor.isPngDataUrl(H)&&(H=Editor.extractGraphModelFromPng(H));var F=urlParams.title;F=null!=F?decodeURIComponent(F):this.defaultFilename;H=new LocalFile(this,+H,F,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(H.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(H);this.editor.chromeless||(H.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),u=window.opener||window.parent;if(u!=window){var G=urlParams.create;null!=G?p(u[decodeURIComponent(G)]):(G=urlParams.data,null!=G?p(decodeURIComponent(G)):this.installMessageHandler(mxUtils.bind(this,function(H,+F){F.source==u&&p(H)})))}}else if(null==this.dialog)if("1"==urlParams.demo)G=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=G;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),this.actions.get("insertTemplate").funct();else{G=!1;try{G=null!=window.opener&&null!=window.opener.openFile}catch(H){}G?this.spinner.spin(document.body,mxResources.get("loading")):(G=this.getDiagramId(),+!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=G&&0!=G.length||this.editor.isChromelessView()?null!=G&&0<G.length?this.loadFile(G,null,null,mxUtils.bind(this,function(){var H=decodeURIComponent(urlParams.viewbox||"");if(""!=H)try{var F=JSON.parse(H);this.editor.graph.fitWindow(F,F.border)}catch(K){console.error(K)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,+null,null,null,null,!0):this.checkDrafts())}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var l=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),n=mxUtils.bind(this,function(p){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,+p,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var u=urlParams.title;u=null!=u?decodeURIComponent(u):this.defaultFilename;p=this.getServiceCount(!0);isLocalStorage&&p++;var G=4>=p?2:6<p?4:3;u=new CreateDialog(this,u,mxUtils.bind(this,function(H,F){if(null==F){this.hideDialog();var K=Editor.useLocalStorage;this.createFile(0<H.length?H:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=K}else this.pickFolder(F,mxUtils.bind(this,function(d){this.createFile(H,+this.getFileData(!0),null,F,null,!0,d)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,G,null,null,null,this.editor.fileExtensions);this.showDialog(u.container,420,p>G?390:280,!0,!1,mxUtils.bind(this,function(H){H&&null==this.getCurrentFile()&&this.showSplash()}));u.init()}});if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))if("{"==c.charAt(0))this.spinner.stop(),c=JSON.parse(c),window.isMermaidEnabled&&"mermaid"==c.type?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(p){p!=+this.emptyDiagramXml&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"])),this.createFile(null!=p.filename?p.filename:this.defaultFilename,p,null,null,null,!0,null,!0),this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct())})),this.generateMermaidImage(c.data,null,function(){},mxUtils.bind(this,function(p){for(var u=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),G=0;G<u.length;G++)u[G].parentNode.removeChild(u[G]);mxMermaidToDrawio.resetListeners();+this.handleError(p)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"));else try{null!=window.opener&&null!=window.opener[c]?n(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(p){n(p)},mxUtils.bind(this,function(p){this.handleError(p,mxResources.get("errorLoadingFile"),l)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,-null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),f())}}catch(q){this.handleError(q)}};+null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),f())}}catch(p){this.handleError(p)}};App.prototype.loadDraft=function(b,e){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var f=this.getCurrentFile();null!=f&&(f.fileChanged(),null!=e&&e())}),0)}),null,null,!0)};-App.prototype.filterDrafts=function(b,e,f){function c(){f(k)}var k=[];try{this.getDatabaseItems(mxUtils.bind(this,function(p){EditorUi.debug("App.filterDrafts",[this],"items",p);for(var q=0;q<p.length;q++)try{var u=p[q].key;if(null!=u&&".draft_"==u.substring(0,7)){var E=JSON.parse(p[q].data);null!=E&&"draft"==E.type&&E.aliveCheck!=e&&(null==b&&null==E.fileObject||null!=E.fileObject&&E.fileObject.path==b)&&(E.key=u,k.push(E))}}catch(H){}c()}),c)}catch(p){c()}};+App.prototype.filterDrafts=function(b,e,f){function c(){f(l)}var l=[];try{this.getDatabaseItems(mxUtils.bind(this,function(n){EditorUi.debug("App.filterDrafts",[this],"items",n);for(var p=0;p<n.length;p++)try{var u=n[p].key;if(null!=u&&".draft_"==u.substring(0,7)){var G=JSON.parse(n[p].data);null!=G&&"draft"==G.type&&G.aliveCheck!=e&&(null==b&&null==G.fileObject||null!=G.fileObject&&G.fileObject.path==b)&&(G.key=u,l.push(G))}}catch(H){}c()}),c)}catch(n){c()}};App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(e){if(1==e.length)this.loadDraft(e[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[0].key)}));else if(1<e.length){var f=new Date(e[0].modified);f=new DraftDialog(this,1<e.length?mxResources.get("selectDraft"):mxResources.get("draftFound",-[f.toLocaleDateString()+" "+f.toLocaleTimeString()]),1<e.length?null:e[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c?c:0;this.loadDraft(e[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[c].key)}))}),mxUtils.bind(this,function(c,k){this.removeDatabaseItem(e[""!=c?c:0].key);null!=k&&k()}),null,null,null,1<e.length?e:null);this.showDialog(f.container,640,480,!0,!1,mxUtils.bind(this,function(c){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,+[f.toLocaleDateString()+" "+f.toLocaleTimeString()]),1<e.length?null:e[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c?c:0;this.loadDraft(e[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[c].key)}))}),mxUtils.bind(this,function(c,l){this.removeDatabaseItem(e[""!=c?c:0].key);null!=l&&l()}),null,null,null,1<e.length?e:null);this.showDialog(f.container,640,480,!0,!1,mxUtils.bind(this,function(c){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));f.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(e){}};-App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var e=this.getServiceCount(!0),f=mxUtils.bind(this,function(){var k=new SplashDialog(this);this.showDialog(k.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(p,q){!p&&!q||mxClient.IS_CHROMEAPP||(p=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=p)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},+App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var e=this.getServiceCount(!0),f=mxUtils.bind(this,function(){var l=new SplashDialog(this);this.showDialog(l.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(n,p){!n&&!p||mxClient.IS_CHROMEAPP||(n=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=n)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&f();else{b=4==e?2:3;var c=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();f()}),b);this.showDialog(c.container,3>b?200:300,3<e?320:210,!0,!1)}}};App.prototype.addLanguageMenu=function(b,e,f){var c=null;null!=this.menus.get("language")&&(c=document.createElement("div"),c.setAttribute("title",mxResources.get("language")),c.className="geIcon geAdaptiveAsset",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="right center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="19px 19px",c.style.width="19px",c.style.height="19px",mxUtils.setOpacity(c,40),c.style.position="absolute",c.style.cursor="pointer",-c.style.bottom="20px",c.style.right=null!=f?f:"22px",e&&(c.style.direction="rtl",c.style.textAlign="right",c.style.right=null!=f?f:"24px",e=document.createElement("span"),e.style.display="inline-block",e.style.fontSize="12px",e.style.margin="2px 24px 0 0",e.style.userSelect="none",mxUtils.write(e,mxResources.get("language")),c.appendChild(e),e.className="geAdaptiveAsset"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(k){this.editor.graph.popupMenuHandler.hideMenu();var p=new mxPopupMenu(this.menus.get("language").funct);-p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);p.destroy()});var q=mxUtils.getOffset(c);p.popup(q.x,q.y+c.offsetHeight,null,k);this.setCurrentMenu(p)})),b.appendChild(c));return c};-App.prototype.loadFileSystemEntry=function(b,e,f){f=null!=f?f:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var k=new FileReader;k.onload=mxUtils.bind(this,function(p){var q=mxUtils.bind(this,function(u){try{if(null!=e){var E=p.target.result;"image/png"==c.type&&(E=this.extractGraphModelFromPng(E));e(new LocalFile(this,E,c.name,null,b,c,u))}else this.openFileHandle(p.target.result,c.name,c,!1,b,u)}catch(H){f(H)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,-function(u){q("denied"!==u)})):b.createWritable().then(mxUtils.bind(this,function(){q(!0)}),mxUtils.bind(this,function(u){q(!1)}))});k.onerror=f;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||"image/svg"===c.type.substring(0,9)?k.readAsText(c):k.readAsDataURL(c)}),f)}catch(c){f(c)}};-App.prototype.createFileSystemOptions=function(b){var e=[],f=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(f=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var k={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};k.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==f?e.splice(0,0,-k):this.editor.diagramFileTypes[c].extension==f?e.splice(0,0,k):e.push(k)}return{types:e,suggestedName:b}};App.prototype.showSaveFilePicker=function(b,e,f){e=null!=e?e:mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)});f=null!=f?f:this.createFileSystemOptions();window.showSaveFilePicker(f).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(k){b(c,k)}),e)}),e)};-App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getServiceForName(b);if(null!=e)e.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(q){null!=q&&0<q.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(q[0])}),-mxUtils.bind(this,function(q){"AbortError"!=q.name&&this.handleError(q)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.openFiles(f.files),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.openFileInputElt=f}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(q,u){StorageFile.listFiles(this,"F",q,u)});window.openBrowserFile=mxUtils.bind(this,function(q,u,E){StorageFile.getFileContent(this,q,u,E)});window.deleteBrowserFile=mxUtils.bind(this,function(q,u,E){StorageFile.deleteFile(this,q,u,E)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,-function(q,u){var E=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=u.substring(u.length-4)||(u=u.substring(0,u.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,q,u):new LocalFile(this,q,u))}),H=this.getCurrentFile();null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):E()}));var k=this.dialog,p=k.close;this.dialog.close=mxUtils.bind(this,function(q){Editor.useLocalStorage=-c;p.apply(k,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(q){this.handleError(q)}};-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var e=mxUtils.bind(this,function(p){try{this.loadLibrary(p);this.showSidebar();try{this.sidebar.palettes[p.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(q){}}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?-this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(p,q){null!=q?e(q):this.spinner.spin(document.body,mxResources.get("loading"))&&f.getLibrary(p,mxUtils.bind(this,function(u){this.spinner.stop();e(u)}),mxUtils.bind(this,function(u){this.handleError(u,null!=u?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var c=document.createElement("input");-c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files){for(var p=0;p<c.files.length;p++)mxUtils.bind(this,function(q){var u=new FileReader;u.onload=mxUtils.bind(this,function(E){e(new LocalLibrary(this,E.target.result,q.name))});u.readAsText(q)})(c.files[p]);c.type="";c.type="file";c.value=""}}));c.style.display="none";document.body.appendChild(c);this.libFileInputElt=c}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=-mxUtils.bind(this,function(p,q){StorageFile.listFiles(this,"L",p,q)});window.openBrowserFile=mxUtils.bind(this,function(p,q,u){StorageFile.getFileContent(this,p,q,u)});window.deleteBrowserFile=mxUtils.bind(this,function(p,q,u){StorageFile.deleteFile(this,p,q,u)});var k=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(p){this.hideDialog(p)}));window.openFile.setConsumer(mxUtils.bind(this,function(p,q){e(b==App.MODE_BROWSER?new StorageLibrary(this,-p,q):new LocalLibrary(this,p,q))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=k;window.openFile=null})}};-App.prototype.saveLibrary=function(b,e,f,c,k,p,q){try{c=null!=c?c:this.mode;k=null!=k?k:!1;p=null!=p?p:!1;var u=this.createLibraryDataFromImages(e),E=mxUtils.bind(this,function(L){this.spinner.stop();null!=q&&q();this.handleError(L,null!=L?mxResources.get("errorSavingFile"):null)});null==f&&c==App.MODE_DEVICE&&(f=new LocalLibrary(this,u,b));if(null==f)this.pickFolder(c,mxUtils.bind(this,function(L){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?-this.drive.insertFile(b,u,L,mxUtils.bind(this,function(G){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(G,e)}),E,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,u,mxUtils.bind(this,function(G){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(G,e)}),E,L):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,-u,mxUtils.bind(this,function(G){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(G,e)}),E,L):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,u,mxUtils.bind(this,function(G){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(G,e)}),E,L):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,u,mxUtils.bind(this,function(G){this.spinner.stop();-this.hideDialog(!0);this.libraryLoaded(G,e)}),E,L):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,u,mxUtils.bind(this,function(G){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(G,e)}),E,L):c==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,u,b),mxUtils.bind(this,function(G){this.hideDialog(!0);this.libraryLoaded(G,e)}),E):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));-else if(k||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData(u);var H=mxUtils.bind(this,function(){f.save(!0,mxUtils.bind(this,function(L){this.spinner.stop();this.hideDialog(!0);p||this.libraryLoaded(f,e);null!=q&&q()}),E)});if(b!=f.getTitle()){var D=f.getHash();f.rename(b,mxUtils.bind(this,function(L){f.constructor!=LocalLibrary&&D!=f.getHash()&&(mxSettings.removeCustomLibrary(D),mxSettings.addCustomLibrary(f.getHash()));this.removeLibrarySidebar(D);H()}),E)}else H()}}catch(L){this.handleError(L)}};-App.prototype.saveFile=function(b,e){var f=this.getCurrentFile(),c=this.mode;if(null!=f){var k=mxUtils.bind(this,function(){EditorUi.enableDrafts&&f.removeDraft();this.getCurrentFile()==f||f.isModified()||(f.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=e&&e()});if(b||null==f.getTitle()||null!=f.invalidFileHandle||null==this.mode)if(null!=f&&f.constructor==LocalFile&&null!=f.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,-function(u,E){f.invalidFileHandle=null;f.fileHandle=u;f.title=E.name;f.desc=E;f.editable=null;this.save(E.name,k)}),null,this.createFileSystemOptions(f.getTitle()));else{b=null!=f.getTitle()?f.getTitle():this.defaultFilename;var p=mxUtils.bind(this,function(u,E,H,D){if(null!=u&&0<u.length)if(/(\.pdf)$/i.test(u))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){H.value=u.split(".").slice(0,--1).join(".");H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==c&&E==App.MODE_DEVICE)null!=f&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(G,d){f.fileHandle=G;f.mode=App.MODE_DEVICE;f.title=d.name;f.desc=d;this.setMode(App.MODE_DEVICE);this.save(d.name,k)}),mxUtils.bind(this,function(G){"AbortError"!=G.name&&this.handleError(G)}),-this.createFileSystemOptions(u)):(this.setMode(App.MODE_DEVICE),this.save(u,k));else if("download"==E)(new LocalFile(this,null,u)).save();else if("_blank"==E)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(c!=E){var L=mxUtils.bind(this,function(G){var d=this.editor.graph,g=d.getSelectionCells(),m=d.getViewState(),t=this.currentPage;this.createFile(u,this.getFileData(/(\.xml)$/i.test(u)||-0>u.indexOf(".")||/(\.drawio)$/i.test(u),/(\.svg)$/i.test(u),/(\.html)$/i.test(u)),null,E,k,null==this.mode,G,null,null,mxUtils.bind(this,function(){this.restoreViewState(t,m,g)}))});null!=D?L(D):this.pickFolder(E,L)}else null!=E&&this.save(u,k)}),q=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(u,E,H){p(u.value,E,u,H);this.hideDialog()}),q?null:["_blank"]);this.showDialog(b.container,420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(f.getTitle(),-k)}};-App.prototype.loadTemplate=function(b,e,f,c,k){var p=!1,q=b,u=null!=c?c:b;c=/\.png$/i.test(u)||/\.pdf$/i.test(u);var E=EditorUi.isVisioFilename(u);this.editor.isCorsEnabledForUrl(q)||(p=c||E,q="t="+(new Date).getTime(),q=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+q+(p?"&base64=1":""));this.editor.loadUrl(q,mxUtils.bind(this,function(H){try{var D=p?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(H):atob(H):H;if(E||this.isVisioData(D))E||(u=k?this.isRemoteVisioData(D)?"raw.vss":"raw.vssx":this.isRemoteVisioData(D)?-"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(H.substring(H.indexOf(",")+1)),function(L){e(L)},f,u);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(D,u))this.isExternalDataComms()?this.parseFileData(D,mxUtils.bind(this,function(L){4==L.readyState&&200<=L.status&&299>=L.status&&"<mxGraphModel"==L.responseText.substring(0,13)&&e(L.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f);else if(this.isLucidChartData(D))this.convertLucidChart(D,-mxUtils.bind(this,function(L){e(L)}),mxUtils.bind(this,function(L){f(L)}));else{if(/(\.png)($|\?)/i.test(u)||Editor.isPngData(D))D=Editor.extractGraphModelFromPng(H);e(D)}}catch(L){f(L)}}),f,/(\.png)($|\?)/i.test(u)||E,null,null,p)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};+c.style.bottom="20px",c.style.right=null!=f?f:"22px",e&&(c.style.direction="rtl",c.style.textAlign="right",c.style.right=null!=f?f:"24px",e=document.createElement("span"),e.style.display="inline-block",e.style.fontSize="12px",e.style.margin="2px 24px 0 0",e.style.userSelect="none",mxUtils.write(e,mxResources.get("language")),c.appendChild(e),e.className="geAdaptiveAsset"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();var n=new mxPopupMenu(this.menus.get("language").funct);+n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);n.destroy()});var p=mxUtils.getOffset(c);n.popup(p.x,p.y+c.offsetHeight,null,l);this.setCurrentMenu(n)})),b.appendChild(c));return c};+App.prototype.loadFileSystemEntry=function(b,e,f){f=null!=f?f:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var l=new FileReader;l.onload=mxUtils.bind(this,function(n){var p=mxUtils.bind(this,function(u){try{if(null!=e){var G=n.target.result;"image/png"==c.type&&(G=this.extractGraphModelFromPng(G));e(new LocalFile(this,G,c.name,null,b,c,u))}else this.openFileHandle(n.target.result,c.name,c,!1,b,u)}catch(H){f(H)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,+function(u){p("denied"!==u)})):b.createWritable().then(mxUtils.bind(this,function(){p(!0)}),mxUtils.bind(this,function(u){p(!1)}))});l.onerror=f;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||"image/svg"===c.type.substring(0,9)?l.readAsText(c):l.readAsDataURL(c)}),f)}catch(c){f(c)}};+App.prototype.createFileSystemOptions=function(b){var e=[],f=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(f=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var l={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};l.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==f?e.splice(0,0,+l):this.editor.diagramFileTypes[c].extension==f?e.splice(0,0,l):e.push(l)}return{types:e,suggestedName:b}};App.prototype.showSaveFilePicker=function(b,e,f){e=null!=e?e:mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)});f=null!=f?f:this.createFileSystemOptions();window.showSaveFilePicker(f).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(l){b(c,l)}),e)}),e)};+App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getServiceForName(b);if(null!=e)e.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(p){null!=p&&0<p.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(p[0])}),+mxUtils.bind(this,function(p){"AbortError"!=p.name&&this.handleError(p)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.openFiles(f.files),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.openFileInputElt=f}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(p,u){StorageFile.listFiles(this,"F",p,u)});window.openBrowserFile=mxUtils.bind(this,function(p,u,G){StorageFile.getFileContent(this,p,u,G)});window.deleteBrowserFile=mxUtils.bind(this,function(p,u,G){StorageFile.deleteFile(this,p,u,G)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,+function(p,u){var G=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=u.substring(u.length-4)||(u=u.substring(0,u.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,p,u):new LocalFile(this,p,u))}),H=this.getCurrentFile();null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):G()}));var l=this.dialog,n=l.close;this.dialog.close=mxUtils.bind(this,function(p){Editor.useLocalStorage=+c;n.apply(l,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(p){this.handleError(p)}};+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var e=mxUtils.bind(this,function(n){try{this.loadLibrary(n);this.showSidebar();try{this.sidebar.palettes[n.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(p){}}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?+this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(n,p){null!=p?e(p):this.spinner.spin(document.body,mxResources.get("loading"))&&f.getLibrary(n,mxUtils.bind(this,function(u){this.spinner.stop();e(u)}),mxUtils.bind(this,function(u){this.handleError(u,null!=u?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var c=document.createElement("input");+c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files){for(var n=0;n<c.files.length;n++)mxUtils.bind(this,function(p){var u=new FileReader;u.onload=mxUtils.bind(this,function(G){e(new LocalLibrary(this,G.target.result,p.name))});u.readAsText(p)})(c.files[n]);c.type="";c.type="file";c.value=""}}));c.style.display="none";document.body.appendChild(c);this.libFileInputElt=c}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=+mxUtils.bind(this,function(n,p){StorageFile.listFiles(this,"L",n,p)});window.openBrowserFile=mxUtils.bind(this,function(n,p,u){StorageFile.getFileContent(this,n,p,u)});window.deleteBrowserFile=mxUtils.bind(this,function(n,p,u){StorageFile.deleteFile(this,n,p,u)});var l=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(n){this.hideDialog(n)}));window.openFile.setConsumer(mxUtils.bind(this,function(n,p){e(b==App.MODE_BROWSER?new StorageLibrary(this,+n,p):new LocalLibrary(this,n,p))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=l;window.openFile=null})}};+App.prototype.saveLibrary=function(b,e,f,c,l,n,p){try{c=null!=c?c:this.mode;l=null!=l?l:!1;n=null!=n?n:!1;var u=this.createLibraryDataFromImages(e),G=mxUtils.bind(this,function(K){this.spinner.stop();null!=p&&p();this.handleError(K,null!=K?mxResources.get("errorSavingFile"):null)});null==f&&c==App.MODE_DEVICE&&(f=new LocalLibrary(this,u,b));if(null==f)this.pickFolder(c,mxUtils.bind(this,function(K){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?+this.drive.insertFile(b,u,K,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),G,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),G,K):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,+u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),G,K):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),G,K):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();+this.hideDialog(!0);this.libraryLoaded(d,e)}),G,K):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),G,K):c==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,u,b),mxUtils.bind(this,function(d){this.hideDialog(!0);this.libraryLoaded(d,e)}),G):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));+else if(l||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData(u);var H=mxUtils.bind(this,function(){f.save(!0,mxUtils.bind(this,function(K){this.spinner.stop();this.hideDialog(!0);n||this.libraryLoaded(f,e);null!=p&&p()}),G)});if(b!=f.getTitle()){var F=f.getHash();f.rename(b,mxUtils.bind(this,function(K){f.constructor!=LocalLibrary&&F!=f.getHash()&&(mxSettings.removeCustomLibrary(F),mxSettings.addCustomLibrary(f.getHash()));this.removeLibrarySidebar(F);H()}),G)}else H()}}catch(K){this.handleError(K)}};+App.prototype.saveFile=function(b,e){var f=this.getCurrentFile(),c=this.mode;if(null!=f){var l=mxUtils.bind(this,function(){EditorUi.enableDrafts&&f.removeDraft();this.getCurrentFile()==f||f.isModified()||(f.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=e&&e()});if(b||null==f.getTitle()||null!=f.invalidFileHandle||null==this.mode)if(null!=f&&f.constructor==LocalFile&&null!=f.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,+function(u,G){f.invalidFileHandle=null;f.fileHandle=u;f.title=G.name;f.desc=G;f.editable=null;this.save(G.name,l)}),null,this.createFileSystemOptions(f.getTitle()));else{b=null!=f.getTitle()?f.getTitle():this.defaultFilename;var n=mxUtils.bind(this,function(u,G,H,F){if(null!=u&&0<u.length)if(/(\.pdf)$/i.test(u))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){H.value=u.split(".").slice(0,+-1).join(".");H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==c&&G==App.MODE_DEVICE)null!=f&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(d,g){f.fileHandle=d;f.mode=App.MODE_DEVICE;f.title=g.name;f.desc=g;this.setMode(App.MODE_DEVICE);this.save(g.name,l)}),mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)}),+this.createFileSystemOptions(u)):(this.setMode(App.MODE_DEVICE),this.save(u,l));else if("download"==G)(new LocalFile(this,null,u)).save();else if("_blank"==G)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(c!=G){var K=mxUtils.bind(this,function(d){var g=this.editor.graph,k=g.getSelectionCells(),v=g.getViewState(),t=this.currentPage;this.createFile(u,this.getFileData(/(\.xml)$/i.test(u)||+0>u.indexOf(".")||/(\.drawio)$/i.test(u),/(\.svg)$/i.test(u),/(\.html)$/i.test(u)),null,G,l,null==this.mode,d,null,null,mxUtils.bind(this,function(){this.restoreViewState(t,v,k)}))});null!=F?K(F):this.pickFolder(G,K)}else null!=G&&this.save(u,l)}),p=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(u,G,H){n(u.value,G,u,H);this.hideDialog()}),p?null:["_blank"]);this.showDialog(b.container,420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(f.getTitle(),+l)}};+App.prototype.loadTemplate=function(b,e,f,c,l){var n=!1,p=b,u=null!=c?c:b;c=/\.png$/i.test(u)||/\.pdf$/i.test(u);var G=EditorUi.isVisioFilename(u);this.editor.isCorsEnabledForUrl(p)||(n=c||G,p="t="+(new Date).getTime(),p=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+p+(n?"&base64=1":""));this.editor.loadUrl(p,mxUtils.bind(this,function(H){try{var F=n?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(H):atob(H):H;if(G||this.isVisioData(F))G||(u=l?this.isRemoteVisioData(F)?"raw.vss":"raw.vssx":this.isRemoteVisioData(F)?+"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(H.substring(H.indexOf(",")+1)),function(K){e(K)},f,u);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,u))this.isExternalDataComms()?this.parseFileData(F,mxUtils.bind(this,function(K){4==K.readyState&&200<=K.status&&299>=K.status&&"<mxGraphModel"==K.responseText.substring(0,13)&&e(K.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f);else if(this.isLucidChartData(F))this.convertLucidChart(F,+mxUtils.bind(this,function(K){e(K)}),mxUtils.bind(this,function(K){f(K)}));else{if(/(\.png)($|\?)/i.test(u)||Editor.isPngData(F))F=Editor.extractGraphModelFromPng(H);e(F)}}catch(K){f(K)}}),f,/(\.png)($|\?)/i.test(u)||G,null,null,n)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};App.prototype.isModeEnabled=function(b){return b==App.MODE_GOOGLE?"function"===typeof window.DriveClient&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode):b==App.MODE_GITHUB?null!=this.gitHub:b==App.MODE_GITLAB?null!=this.gitLab:b==App.MODE_DROPBOX?"function"===typeof window.DropboxClient&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):b==App.MODE_ONEDRIVE?"function"===typeof window.OneDriveClient&&("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode):b==App.MODE_TRELLO?"function"===typeof window.TrelloClient&&"1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):!1};App.prototype.isModeReady=function(b){return null!=this.getServiceForName(b)&&(b!=App.MODE_DROPBOX||"undefined"!==typeof Dropbox.choose)};-App.prototype.uncompressPages=function(b){if(null!=b)try{var e=mxUtils.parseXml(b);if("mxfile"==e.documentElement.nodeName){for(var f=e.documentElement.getElementsByTagName("diagram"),c=0;c<f.length;c++){var k=Editor.parseDiagramNode(f[c],!0);null!=k&&(mxUtils.setTextContent(f[c],""),f[c].appendChild(k))}b=mxUtils.getPrettyXml(e.documentElement)}}catch(p){}return b};-App.prototype.createFile=function(b,e,f,c,k,p,q,u,E,H){c=u?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;null==e||Editor.defaultCompressed||(e=this.uncompressPages(e));var D=mxUtils.bind(this,function(){this.spinner.stop()}),L=mxUtils.bind(this,function(d){D();null==d&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=d&&this.handleError(d)});try{var G=mxUtils.bind(this,function(d){D();this.fileCreated(d,-f,p,k,E,H)});c==App.MODE_GOOGLE&&null!=this.drive?(null==q&&null!=this.stateArg&&null!=this.stateArg.folderId&&(q=this.stateArg.folderId),this.drive.insertFile(b,e,q,G,L)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,G,L,!1,q):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,G,L,!1,q):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,G,L,!1,q):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,G,L):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?-this.oneDrive.insertFile(b,e,G,L,!1,q):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,G,L):!u&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(D(),this.showSaveFilePicker(mxUtils.bind(this,function(d,g){var m=new LocalFile(this,e,g.name,null,d,g);m.saveFile(g.name,!1,mxUtils.bind(this,function(){this.fileCreated(m,f,p,k,E,H)}),L,!0)}),mxUtils.bind(this,function(d){"AbortError"!=d.name&&L(d)}),this.createFileSystemOptions(b))):(D(),this.fileCreated(new LocalFile(this,e,b,null==c),f,p,k,E,H))}catch(d){D(),-this.handleError(d)}}};-App.prototype.fileCreated=function(b,e,f,c,k,p){var q=window.location.pathname;null!=e&&0<e.length&&(q+="?libs="+e);null!=k&&0<k.length&&(q+="?clibs="+k);q=this.getUrl(q);b.getMode()!=App.MODE_DEVICE&&(q+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var u=b.getData();u=0<u.length?this.editor.extractGraphModel(mxUtils.parseXml(u).documentElement,!0):null;var E=window.location.protocol+"//"+window.location.hostname+q,H=u,D=null;null!=u&&/\.svg$/i.test(b.getTitle())&&(D=-this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(D.container),H=this.decodeNodeIntoGraph(H,D));b.setData(this.createFileData(u,D,b,E));null!=D&&D.container.parentNode.removeChild(D.container);var L=mxUtils.bind(this,function(){this.spinner.stop()}),G=mxUtils.bind(this,function(){L();var d=this.getCurrentFile();null==f&&null!=d&&(f=!d.isModified()&&null==d.getMode());var g=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,p);f&&b.addAllSavedStatus();-null!=e&&this.sidebar.showEntries(e);if(null!=k){for(var t=[],v=k.split(";"),y=0;y<v.length;y++)t.push(decodeURIComponent(v[y]));this.loadLibraries(t)}null!=c&&c()}),m=mxUtils.bind(this,function(){f||null==d||!d.isModified()?g():this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==f||f?m():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),-null==b.getMode())),window.geOpenWindow(q,null,m))});b.constructor==LocalFile?G():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){G()}),mxUtils.bind(this,function(d){L();null!=d&&"AbortError"==d.name||this.handleError(d)}))}};-App.prototype.loadFile=function(b,e,f,c,k){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var p=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var E=mxUtils.bind(this,function(d){this.handleError(d,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();-window.location.hash=null!=g?g.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null!=d?(this.fileLoaded(new StorageFile(this,d,b)),null!=c&&c()):E({message:mxResources.get("fileNotFound")})}),E)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var d=this.getCurrentFile();window.location.hash=null!=d?d.getHash():""}));else if(null!=f)this.spinner.stop(),+App.prototype.uncompressPages=function(b){if(null!=b)try{var e=mxUtils.parseXml(b);if("mxfile"==e.documentElement.nodeName){for(var f=e.documentElement.getElementsByTagName("diagram"),c=0;c<f.length;c++){var l=Editor.parseDiagramNode(f[c],!0);null!=l&&(mxUtils.setTextContent(f[c],""),f[c].appendChild(l))}b=mxUtils.getPrettyXml(e.documentElement)}}catch(n){}return b};+App.prototype.createFile=function(b,e,f,c,l,n,p,u,G,H){c=u?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;null==e||Editor.defaultCompressed||(e=this.uncompressPages(e));var F=mxUtils.bind(this,function(){this.spinner.stop()}),K=mxUtils.bind(this,function(g){F();null==g&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=g&&this.handleError(g)});try{var d=mxUtils.bind(this,function(g){F();this.fileCreated(g,+f,n,l,G,H)});c==App.MODE_GOOGLE&&null!=this.drive?(null==p&&null!=this.stateArg&&null!=this.stateArg.folderId&&(p=this.stateArg.folderId),this.drive.insertFile(b,e,p,d,K)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,d,K,!1,p):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,d,K,!1,p):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,d,K,!1,p):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,d,K):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?+this.oneDrive.insertFile(b,e,d,K,!1,p):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,d,K):!u&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(F(),this.showSaveFilePicker(mxUtils.bind(this,function(g,k){var v=new LocalFile(this,e,k.name,null,g,k);v.saveFile(k.name,!1,mxUtils.bind(this,function(){this.fileCreated(v,f,n,l,G,H)}),K,!0)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&K(g)}),this.createFileSystemOptions(b))):(F(),this.fileCreated(new LocalFile(this,e,b,null==c),f,n,l,G,H))}catch(g){F(),+this.handleError(g)}}};+App.prototype.fileCreated=function(b,e,f,c,l,n){var p=window.location.pathname;null!=e&&0<e.length&&(p+="?libs="+e);null!=l&&0<l.length&&(p+="?clibs="+l);p=this.getUrl(p);b.getMode()!=App.MODE_DEVICE&&(p+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var u=b.getData();u=0<u.length?this.editor.extractGraphModel(mxUtils.parseXml(u).documentElement,!0):null;var G=window.location.protocol+"//"+window.location.hostname+p,H=u,F=null;null!=u&&/\.svg$/i.test(b.getTitle())&&(F=+this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(F.container),H=this.decodeNodeIntoGraph(H,F));b.setData(this.createFileData(u,F,b,G));null!=F&&F.container.parentNode.removeChild(F.container);var K=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(){K();var g=this.getCurrentFile();null==f&&null!=g&&(f=!g.isModified()&&null==g.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,n);f&&b.addAllSavedStatus();+null!=e&&this.sidebar.showEntries(e);if(null!=l){for(var t=[],x=l.split(";"),A=0;A<x.length;A++)t.push(decodeURIComponent(x[A]));this.loadLibraries(t)}null!=c&&c()}),v=mxUtils.bind(this,function(){f||null==g||!g.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==f||f?v():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),+null==b.getMode())),window.geOpenWindow(p,null,v))});b.constructor==LocalFile?d():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){d()}),mxUtils.bind(this,function(g){K();null!=g&&"AbortError"==g.name||this.handleError(g)}))}};+App.prototype.loadFile=function(b,e,f,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var n=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var G=mxUtils.bind(this,function(g){this.handleError(g,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var k=this.getCurrentFile();+window.location.hash=null!=k?k.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(g){null!=g?(this.fileLoaded(new StorageFile(this,g,b)),null!=c&&c()):G({message:mxResources.get("fileNotFound")})}),G)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.getHash():""}));else if(null!=f)this.spinner.stop(),this.fileLoaded(f),null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var H=decodeURIComponent(b.substring(1));"<"!=H.charAt(0)&&(H=Graph.decompress(H));H=new LocalFile(this,H,null!=urlParams.title?decodeURIComponent(urlParams.title):-this.defaultFilename,!0);H.getHash=function(){return b};this.fileLoaded(H);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(d,g){this.spinner.stop();this.fileLoaded(new EmbedFile(this,d,g));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var D=decodeURIComponent(b.substring(1)),L=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=D.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var d=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var g=D.substring(31,D.lastIndexOf("&ex"));this.loadFile("G"+g,e,null,mxUtils.bind(this,function(){var m=this.getCurrentFile();null!=m&&this.editor.chromeless&&-!this.editor.editable&&(m.getHash=function(){return"G"+g},window.location.hash="#"+m.getHash());null!=c&&c()}));return!0}return!1});!d()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",d);return!0});this.loadTemplate(D,mxUtils.bind(this,function(d){this.spinner.stop();if(null!=d&&0<d.length){var g=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var m=D,t=D.lastIndexOf("."),v=m.lastIndexOf("/");t>v&&0<v&&(m=m.substring(v+1,t),t=D.substring(t),-this.useCanvasForExport||".png"!=t||(t=".drawio"),".svg"===t||".xml"===t||".html"===t||".png"===t||".drawio"===t)&&(g=m+t)}d=new LocalFile(this,d,null!=urlParams.title?decodeURIComponent(urlParams.title):g,!0);d.getHash=function(){return b};this.fileLoaded(d,!0)?null!=c&&c():L()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else L()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,-function(){L()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var G=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var d=this.getServiceForName(G);if(null==d)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();-window.location.hash=null!=m?m.getHash():""}));else{var g=b.charAt(0);b=decodeURIComponent(b.substring(1));d.getFile(b,mxUtils.bind(this,function(m){this.spinner.stop();this.fileLoaded(m);var t=this.getCurrentFile();if(null==t)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){t.getHash=function(){return g+b};m="#"+t.getHash();try{var v=this.getHashObject();null==v||mxUtils.isEmptyObject(v)||(m=m+"#"+encodeURIComponent(JSON.stringify(v)))}catch(y){}window.location.replace(m)}else m==-t&&null==m.getMode()&&(v=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+v+'" class="geStatusAlert">'+v+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(m){null!=window.console&&null!=m&&console.log("error in loadFile:",b,m);var t=mxUtils.bind(this,function(){var v=this.getCurrentFile();null==v?(window.location.hash="",this.showSplash()):window.location.hash="#"+v.getHash()});null==m||"AbortError"!=m.name?this.handleError(m,null!=m?mxResources.get("errorLoadingFile"):null,-t,null,null,"#"+g+b):t()}))}})()}}),q=this.getCurrentFile(),u=mxUtils.bind(this,function(){k||null==q||!q.isModified()?p():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=q&&(window.location.hash=q.getHash())}),p,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?u():null==q||e?u():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,u)).container,320,160,!0,!0)};+this.defaultFilename,!0);H.getHash=function(){return b};this.fileLoaded(H);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(g,k){this.spinner.stop();this.fileLoaded(new EmbedFile(this,g,k));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var F=decodeURIComponent(b.substring(1)),K=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=F.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var g=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var k=F.substring(31,F.lastIndexOf("&ex"));this.loadFile("G"+k,e,null,mxUtils.bind(this,function(){var v=this.getCurrentFile();null!=v&&this.editor.chromeless&&+!this.editor.editable&&(v.getHash=function(){return"G"+k},window.location.hash="#"+v.getHash());null!=c&&c()}));return!0}return!1});!g()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",g);return!0});this.loadTemplate(F,mxUtils.bind(this,function(g){this.spinner.stop();if(null!=g&&0<g.length){var k=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var v=F,t=F.lastIndexOf("."),x=v.lastIndexOf("/");t>x&&0<x&&(v=v.substring(x+1,t),t=F.substring(t),+this.useCanvasForExport||".png"!=t||(t=".drawio"),".svg"===t||".xml"===t||".html"===t||".png"===t||".drawio"===t)&&(k=v+t)}g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):k,!0);g.getHash=function(){return b};this.fileLoaded(g,!0)?null!=c&&c():K()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else K()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,+function(){K()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var d=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var g=this.getServiceForName(d);if(null==g)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var v=this.getCurrentFile();+window.location.hash=null!=v?v.getHash():""}));else{var k=b.charAt(0);b=decodeURIComponent(b.substring(1));g.getFile(b,mxUtils.bind(this,function(v){this.spinner.stop();this.fileLoaded(v);var t=this.getCurrentFile();if(null==t)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){t.getHash=function(){return k+b};v="#"+t.getHash();try{var x=this.getHashObject();null==x||mxUtils.isEmptyObject(x)||(v=v+"#"+encodeURIComponent(JSON.stringify(x)))}catch(A){}window.location.replace(v)}else v==+t&&null==v.getMode()&&(x=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+x+'" class="geStatusAlert">'+x+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(v){null!=window.console&&null!=v&&console.log("error in loadFile:",b,v);var t=mxUtils.bind(this,function(){var x=this.getCurrentFile();null==x?(window.location.hash="",this.showSplash()):window.location.hash="#"+x.getHash()});null==v||"AbortError"!=v.name?this.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null,+t,null,null,"#"+k+b):t()}))}})()}}),p=this.getCurrentFile(),u=mxUtils.bind(this,function(){l||null==p||!p.isModified()?n():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=p&&(window.location.hash=p.getHash())}),n,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?u():null==p||e?u():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,u)).container,320,160,!0,!0)};App.prototype.getLibraryStorageHint=function(b){var e=b.getTitle();b.constructor!=LocalLibrary&&(e+="\n"+b.getHash());b.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?e+=" ("+mxResources.get("browser")+")":b.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};App.prototype.restoreLibraries=function(){function b(f){for(var c=0;c<f.length;c++)""!=f[c]&&0>mxUtils.indexOf(e,f[c])&&e.push(f[c])}var e=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(e)};-App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(H,D){D||mxSettings.removeCustomLibrary(H);delete this.loadedLibraries[H]}),c=0,k=[],p=0<b.length&&"L.scratchpad"==b[0]?1:0,q=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var H=b.length-1;0<=H;H--)null!=k[H]&&this.loadLibrary(k[H],H<=p);null!=e&&e()}});if(null!=b)for(var u=0;u<b.length;u++){var E=encodeURIComponent(decodeURIComponent(b[u]));-mxUtils.bind(this,function(H,D){if(null!=H&&0<H.length&&null==this.loadedLibraries[H]&&null==this.sidebar.palettes[H]){this.loadedLibraries[H]=!0;c++;var L=mxUtils.bind(this,function(v){k[D]=v;c--;q()}),G=mxUtils.bind(this,function(v){f(H,v);c--;q()}),d=H.substring(0,1);if("L"==d)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var v=decodeURIComponent(H.substring(1));StorageFile.getFileContent(this,v,mxUtils.bind(this,function(y){".scratchpad"==v&&null==-y&&(y=this.emptyLibraryXml);null!=y?L(new StorageLibrary(this,y,v)):G()}),G)}catch(y){G()}}),0);else if("U"==d){var g=decodeURIComponent(H.substring(1));this.isOffline()?G(!0):this.loadTemplate(g,mxUtils.bind(this,function(v){null!=v&&0<v.length?L(new UrlLibrary(this,v,g)):G()}),function(){G()},null,!0)}else if("R"==d){d=decodeURIComponent(H.substring(1));try{d=JSON.parse(d);var m={id:d[0],title:d[1],downloadUrl:d[2]};this.remoteInvoke("getFileContent",[m.downloadUrl],null,mxUtils.bind(this,function(v){try{L(new RemoteLibrary(this,-v,m))}catch(y){G()}}),function(){G()})}catch(v){G()}}else if("S"==d&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(H.substring(1)),function(v){L(v)},G)}catch(v){G()}else{var t=null;"G"==d?null!=this.drive&&null!=this.drive.user&&(t=this.drive):"H"==d?null!=this.gitHub&&null!=this.gitHub.getUser()&&(t=this.gitHub):"T"==d?null!=this.trello&&this.trello.isAuthorized()&&(t=this.trello):"D"==d?null!=this.dropbox&&null!=this.dropbox.getUser()&&(t=this.dropbox):"W"==d&&null!=this.oneDrive&&-null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(H.substring(1)),mxUtils.bind(this,function(v){try{L(v)}catch(y){G()}}),function(v){G()}):G(!0)}}})(E,u)}q()}};+App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(H,F){F||mxSettings.removeCustomLibrary(H);delete this.loadedLibraries[H]}),c=0,l=[],n=0<b.length&&"L.scratchpad"==b[0]?1:0,p=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var H=b.length-1;0<=H;H--)null!=l[H]&&this.loadLibrary(l[H],H<=n);null!=e&&e()}});if(null!=b)for(var u=0;u<b.length;u++){var G=encodeURIComponent(decodeURIComponent(b[u]));+mxUtils.bind(this,function(H,F){if(null!=H&&0<H.length&&null==this.loadedLibraries[H]&&null==this.sidebar.palettes[H]){this.loadedLibraries[H]=!0;c++;var K=mxUtils.bind(this,function(x){l[F]=x;c--;p()}),d=mxUtils.bind(this,function(x){f(H,x);c--;p()}),g=H.substring(0,1);if("L"==g)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var x=decodeURIComponent(H.substring(1));StorageFile.getFileContent(this,x,mxUtils.bind(this,function(A){".scratchpad"==x&&null==+A&&(A=this.emptyLibraryXml);null!=A?K(new StorageLibrary(this,A,x)):d()}),d)}catch(A){d()}}),0);else if("U"==g){var k=decodeURIComponent(H.substring(1));this.isOffline()?d(!0):this.loadTemplate(k,mxUtils.bind(this,function(x){null!=x&&0<x.length?K(new UrlLibrary(this,x,k)):d()}),function(){d()},null,!0)}else if("R"==g){g=decodeURIComponent(H.substring(1));try{g=JSON.parse(g);var v={id:g[0],title:g[1],downloadUrl:g[2]};this.remoteInvoke("getFileContent",[v.downloadUrl],null,mxUtils.bind(this,function(x){try{K(new RemoteLibrary(this,+x,v))}catch(A){d()}}),function(){d()})}catch(x){d()}}else if("S"==g&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(H.substring(1)),function(x){K(x)},d)}catch(x){d()}else{var t=null;"G"==g?null!=this.drive&&null!=this.drive.user&&(t=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(t=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(t=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(t=this.dropbox):"W"==g&&null!=this.oneDrive&&+null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(H.substring(1)),mxUtils.bind(this,function(x){try{K(x)}catch(A){d()}}),function(x){d()}):d(!0)}}})(G,u)}p()}};App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&(this.buttonContainer.style.paddingRight="1"==urlParams.atlas?"32px":"8px");this.commentsSupported()&&"simple"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton geAdaptiveAsset",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;width:24px;height:24px;background-size:24px 24px;background-position:center center;cursor:pointer;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),null!=this.userElement&&this.userElement.parentNode==this.buttonContainer?this.buttonContainer.insertBefore(this.commentButton,this.userElement):null!=this.shareButton&&this.shareButton.parentNode==this.buttonContainer?this.buttonContainer.insertBefore(this.commentButton,this.shareButton):this.buttonContainer.appendChild(this.commentButton)):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);if("draw.io"!=this.getServiceName()||"1"==urlParams.embed||this.isStandaloneApp())null!=urlParams.notif&&@@ -14199,48 +14198,48 @@ this.fetchAndShowNotification(urlParams.notif),!this.isStandaloneApp()||"simple"null!=this.shareButton&&(this.shareButton.style.display="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme?"none":"inline-flex","simple"==Editor.currentTheme||"sketch"==Editor.currentTheme))this.shareButton.parentNode.style.display=0==this.shareButton.parentNode.clientWidth?"none":""}else null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null);"1"!=urlParams.extAuth&&"atlas"!=Editor.currentTheme&&this.fetchAndShowNotification("online",this.mode)}null!=this.commentButton&&(this.commentButton.style.marginRight="",this.commentButton.style.top="","simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&"1"!=urlParams.embed?this.commentButton.style.top="-6px":"1"==urlParams.embed&&(this.commentButton.style.marginRight="4px"));null!=this.notificationBtn&&("simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&"1"!=urlParams.embed?(this.notificationBtn.style.marginRight="4px",this.notificationBtn.style.marginTop="-12px"):(this.notificationBtn.style.marginRight="",this.notificationBtn.style.marginTop=""))}};-App.prototype.fetchAndShowNotification=function(b,e){if(!this.fetchingNotif){b=b||"online";var f=null,c=mxUtils.bind(this,function(k){k=k.filter(function(E){return!E.targets||-1<E.targets.indexOf(b)||null!=e&&-1<E.targets.indexOf(e)});for(var p=b+"NotifReadTS",q=isLocalStorage?parseInt(localStorage.getItem(p)):!0,u=0;u<k.length;u++)k[u].isNew=!q||k[u].timestamp>q;this.showNotification(k,p)});try{isLocalStorage&&(f=JSON.parse(localStorage.getItem(".notifCache")))}catch(k){}null==f||f.ts+864E5<Date.now()?-(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(k){if(200<=k.getStatus()&&299>=k.getStatus())try{var p=JSON.parse(k.getText());p.sort(function(q,u){return u.timestamp-q.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:p}));this.fetchingNotif=!1;c(p)}catch(q){}}))):c(f.notifs)}};-App.prototype.showNotification=function(b,e){function f(H){var D=document.querySelector(".geNotification-count");null!=D&&(D.innerHTML=H,D.style.display=0==H?"none":"",D=document.querySelector(".geNotification-bell"),D.style.animation=0==H?"none":"",D.className="geNotification-bell"+(0==H?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==H?"none":"")}var c=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var k=c=0;k<b.length;k++)b[k].isNew&&-c++;if(0==c)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var p=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var H=this.notificationWin.querySelectorAll(".circle.active"),D=0;D<H.length;D++)H[D].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(e,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=-"geNotification-box";c=document.createElement("span");c.className="geNotification-count";this.notificationBtn.appendChild(c);this.notifCount=c;c=document.createElement("div");c.className="geNotification-bell";k=document.createElement("span");k.className="geBell-top";c.appendChild(k);k=document.createElement("span");k.className="geBell-middle";c.appendChild(k);k=document.createElement("span");k.className="geBell-bottom";c.appendChild(k);k=document.createElement("span");k.className="geBell-rad";c.appendChild(k);-this.notificationBtn.appendChild(c);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);k=document.createElement("div");k.className="header";c=document.createElement("span");c.className="title";c.textContent=mxResources.get("notifications");k.appendChild(c);c=document.createElement("span");-c.className="closeBtn";c.textContent="x";k.appendChild(c);this.notificationWin.appendChild(k);k=document.createElement("div");k.className="notifications clearfix";var q=document.createElement("div");q.setAttribute("id","geNotifList");q.style.position="relative";k.appendChild(q);this.notificationWin.appendChild(k);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=-0;var H=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=H.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=H.right-this.notificationWin.clientWidth+"px";f(0)}else p()}));mxEvent.addListener(c,"click",p)}else this.notificationBtn.style.display="";var u=0,E=document.getElementById("geNotifList");if(null!=E){E.innerHTML='<div class="line"></div>';for(k=0;k<b.length;k++)(function(H,D){D.isNew&&u++;var L=document.createElement("div");L.className="notification";-H=H.timeSince(new Date(D.timestamp));null==H&&(H=mxResources.get("lessThanAMinute"));L.innerHTML='<div class="circle'+(D.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[H],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(D.content)+"</p>";D.link&&mxEvent.addListener(L,"click",function(){window.open(D.link,"notifWin")});E.appendChild(L)})(this,b[k]);f(u)}}};-App.prototype.save=function(b,e){var f=this.getCurrentFile(),c=!0,k=mxUtils.bind(this,function(){c&&(c=!1,f.handleFileSuccess(!0),null!=e&&e())}),p=mxUtils.bind(this,function(q){if(c){c=!1;Editor.addRetryToError(q,mxUtils.bind(this,function(){this.save(b,e)}));if(null!=q&&null!=q.retry){var u=q.retry;q.retry=function(){c=!0;try{f.isModified()?u():k()}catch(E){p(E)}}}f.handleFileError(q,null==q||"AbortError"!=q.name)}});if(null!=f&&this.spinner.spin(document.body,mxResources.get("saving"),p,3*this.timeout))try{this.editor.setStatus(""),-this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==f.getTitle()?f.save(!0,k,p):f.saveAs(b,k,p)}catch(q){p(q)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};+App.prototype.fetchAndShowNotification=function(b,e){if(!this.fetchingNotif){b=b||"online";var f=null,c=mxUtils.bind(this,function(l){l=l.filter(function(G){return!G.targets||-1<G.targets.indexOf(b)||null!=e&&-1<G.targets.indexOf(e)});for(var n=b+"NotifReadTS",p=isLocalStorage?parseInt(localStorage.getItem(n)):!0,u=0;u<l.length;u++)l[u].isNew=!p||l[u].timestamp>p;this.showNotification(l,n)});try{isLocalStorage&&(f=JSON.parse(localStorage.getItem(".notifCache")))}catch(l){}null==f||f.ts+864E5<Date.now()?+(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(l){if(200<=l.getStatus()&&299>=l.getStatus())try{var n=JSON.parse(l.getText());n.sort(function(p,u){return u.timestamp-p.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:n}));this.fetchingNotif=!1;c(n)}catch(p){}}))):c(f.notifs)}};+App.prototype.showNotification=function(b,e){function f(H){var F=document.querySelector(".geNotification-count");null!=F&&(F.innerHTML=H,F.style.display=0==H?"none":"",F=document.querySelector(".geNotification-bell"),F.style.animation=0==H?"none":"",F.className="geNotification-bell"+(0==H?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==H?"none":"")}var c=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var l=c=0;l<b.length;l++)b[l].isNew&&+c++;if(0==c)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var n=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var H=this.notificationWin.querySelectorAll(".circle.active"),F=0;F<H.length;F++)H[F].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(e,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=+"geNotification-box";c=document.createElement("span");c.className="geNotification-count";this.notificationBtn.appendChild(c);this.notifCount=c;c=document.createElement("div");c.className="geNotification-bell";l=document.createElement("span");l.className="geBell-top";c.appendChild(l);l=document.createElement("span");l.className="geBell-middle";c.appendChild(l);l=document.createElement("span");l.className="geBell-bottom";c.appendChild(l);l=document.createElement("span");l.className="geBell-rad";c.appendChild(l);+this.notificationBtn.appendChild(c);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);l=document.createElement("div");l.className="header";c=document.createElement("span");c.className="title";c.textContent=mxResources.get("notifications");l.appendChild(c);c=document.createElement("span");+c.className="closeBtn";c.textContent="x";l.appendChild(c);this.notificationWin.appendChild(l);l=document.createElement("div");l.className="notifications clearfix";var p=document.createElement("div");p.setAttribute("id","geNotifList");p.style.position="relative";l.appendChild(p);this.notificationWin.appendChild(l);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=+0;var H=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=H.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=H.right-this.notificationWin.clientWidth+"px";f(0)}else n()}));mxEvent.addListener(c,"click",n)}else this.notificationBtn.style.display="";var u=0,G=document.getElementById("geNotifList");if(null!=G){G.innerHTML='<div class="line"></div>';for(l=0;l<b.length;l++)(function(H,F){F.isNew&&u++;var K=document.createElement("div");K.className="notification";+H=H.timeSince(new Date(F.timestamp));null==H&&(H=mxResources.get("lessThanAMinute"));K.innerHTML='<div class="circle'+(F.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[H],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(F.content)+"</p>";F.link&&mxEvent.addListener(K,"click",function(){window.open(F.link,"notifWin")});G.appendChild(K)})(this,b[l]);f(u)}}};+App.prototype.save=function(b,e){var f=this.getCurrentFile(),c=!0,l=mxUtils.bind(this,function(){c&&(c=!1,f.handleFileSuccess(!0),null!=e&&e())}),n=mxUtils.bind(this,function(p){if(c){c=!1;Editor.addRetryToError(p,mxUtils.bind(this,function(){this.save(b,e)}));if(null!=p&&null!=p.retry){var u=p.retry;p.retry=function(){c=!0;try{f.isModified()?u():l()}catch(G){n(G)}}}f.handleFileError(p,null==p||"AbortError"!=p.name)}});if(null!=f&&this.spinner.spin(document.body,mxResources.get("saving"),n,3*this.timeout))try{this.editor.setStatus(""),+this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==f.getTitle()?f.save(!0,l,n):f.saveAs(b,l,n)}catch(p){n(p)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};App.prototype.getTitleForService=function(b){return b==App.MODE_GOOGLE?mxResources.get("googleDrive"):b==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):EditorUi.prototype.getTitleForService.apply(this,arguments)};-App.prototype.pickFolder=function(b,e,f,c,k,p){f=null!=f?f:!0;var q=this.spinner.pause();f&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(u){q();if(u.action==google.picker.Action.PICKED){var E=null;null!=u.docs&&0<u.docs.length&&"folder"==u.docs[0].type&&(E=u.docs[0].id);e(p?u:E)}}),k):f&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(u){q();if(null!=u&&null!=u.value&&0<u.value.length){var E=OneDriveFile.prototype.getIdOf(u.value[0]);-e(p?u:E)}}),c):f&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(u){q();e(u)})):f&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(u){q();e(u)})):f&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(u){q();e(u)})):EditorUi.prototype.pickFolder.apply(this,arguments)};-App.prototype.exportFile=function(b,e,f,c,k,p){k==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)})):k==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,b,p,mxUtils.bind(this,function(q){this.spinner.stop()}),-mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),f,c):k==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),!1,p):k==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,b,mxUtils.bind(this,-function(){this.spinner.stop()}),mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),!0,p,c):k==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(e,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),!0,p,c):k==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,c?this.base64ToBlob(b,-f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),!1,p):k==App.MODE_BROWSER&&(null!=window.StorageFile&&!c&&this.spinner.spin(document.body,mxResources.get("saving"))?(f="<mxlibrary"==b.substring(0,10)?new StorageLibrary(this,b,e):new StorageFile(this,b,e),StorageFile.doInsertFile(f,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}))):(f=mxUtils.bind(this,+App.prototype.pickFolder=function(b,e,f,c,l,n){f=null!=f?f:!0;var p=this.spinner.pause();f&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(u){p();if(u.action==google.picker.Action.PICKED){var G=null;null!=u.docs&&0<u.docs.length&&"folder"==u.docs[0].type&&(G=u.docs[0].id);e(n?u:G)}}),l):f&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(u){p();if(null!=u&&null!=u.value&&0<u.value.length){var G=OneDriveFile.prototype.getIdOf(u.value[0]);+e(n?u:G)}}),c):f&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(u){p();e(u)})):f&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(u){p();e(u)})):f&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(u){p();e(u)})):EditorUi.prototype.pickFolder.apply(this,arguments)};+App.prototype.exportFile=function(b,e,f,c,l,n){l==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)})):l==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,b,n,mxUtils.bind(this,function(p){this.spinner.stop()}),+mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),f,c):l==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),!1,n):l==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,b,mxUtils.bind(this,+function(){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),!0,n,c):l==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(e,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),!0,n,c):l==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,c?this.base64ToBlob(b,+f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),!1,n):l==App.MODE_BROWSER&&(null!=window.StorageFile&&!c&&this.spinner.spin(document.body,mxResources.get("saving"))?(f="<mxlibrary"==b.substring(0,10)?new StorageLibrary(this,b,e):new StorageFile(this,b,e),StorageFile.doInsertFile(f,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}))):(f=mxUtils.bind(this,function(){localStorage.setItem(e,b)}),null==localStorage.getItem(e)?f():this.confirm(mxResources.get("replaceIt",[e]),f)))};App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var e=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}e=this.editor.graph;var f=b.isEditable();e.isEnabled()&&!f&&e.reset();e.setEnabled(f);null==urlParams.rev&&(this.updateDocumentTitle(),e=b.getHash(),0<e.length?(e!=this.getDiagramId()&&(window.location.hash=e),this.updateHashObject()):0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};-App.prototype.showAuthDialog=function(b,e,f,c){var k=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(p){try{null!=f&&f(p,mxUtils.bind(this,function(){this.hideDialog();k()}))}catch(q){this.editor.setStatus(mxUtils.htmlEntities(q.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(p){null!=c&&c(p);p&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};-App.prototype.convertFile=function(b,e,f,c,k,p,q,u){var E=e;/\.svg$/i.test(E)||(E=E.substring(0,e.lastIndexOf("."))+c);var H=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(H=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var D=new XMLHttpRequest;D.open("GET",b,!0);H||(D.responseType="blob");if(u)for(var L in u)D.setRequestHeader(L,u[L]);D.onload=mxUtils.bind(this,function(){if(200<=-D.status&&299>=D.status){var d=null;H?(d=JSON.parse(D.responseText),d=this.base64ToBlob(d.content,"application/octet-stream")):d=new Blob([D.response],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(g){k(new LocalFile(this,g,E,!0))}),p,e)}else null!=p&&p({message:mxResources.get("errorLoadingFile")})});D.onerror=p;D.send()}else{var G=mxUtils.bind(this,function(d){try{if(/\.pdf$/i.test(e)){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&k(new LocalFile(this,-g,E,!0))}else/\.png$/i.test(e)?(g=this.extractGraphModelFromPng(d),null!=g?k(new LocalFile(this,g,E,!0)):k(new LocalFile(this,d,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,b)?this.parseFileData(d,mxUtils.bind(this,function(m){4==m.readyState&&(200<=m.status&&299>=m.status?k(new LocalFile(this,m.responseText,E,!0)):null!=p&&p({message:mxResources.get("errorLoadingFile")}))}),e):k(new LocalFile(this,d,E,!0))}catch(m){null!=p&&p(m)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||-/\.pdf$/i.test(e)||null!=f&&"image/"==f.substring(0,6);H?mxUtils.get(b,mxUtils.bind(this,function(d){if(200<=d.getStatus()&&299>=d.getStatus()){if(null!=k){d=JSON.parse(d.getText());var g=d.content;"base64"===d.encoding&&(g=/\.png$/i.test(e)?"data:image/png;base64,"+g:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+g:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(g):atob(g));G(g)}}else null!=p&&p({code:App.ERROR_UNKNOWN})}),function(){null!=p&&p({code:App.ERROR_UNKNOWN})},!1,this.timeout,-function(){null!=p&&p({code:App.ERROR_TIMEOUT,retry:fn})},u):null!=q?q(b,G,p,f):this.editor.loadUrl(b,G,p,f,null,null,null,u)}};+App.prototype.showAuthDialog=function(b,e,f,c){var l=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(n){try{null!=f&&f(n,mxUtils.bind(this,function(){this.hideDialog();l()}))}catch(p){this.editor.setStatus(mxUtils.htmlEntities(p.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(n){null!=c&&c(n);n&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};+App.prototype.convertFile=function(b,e,f,c,l,n,p,u){var G=e;/\.svg$/i.test(G)||(G=G.substring(0,e.lastIndexOf("."))+c);var H=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(H=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var F=new XMLHttpRequest;F.open("GET",b,!0);H||(F.responseType="blob");if(u)for(var K in u)F.setRequestHeader(K,u[K]);F.onload=mxUtils.bind(this,function(){if(200<=+F.status&&299>=F.status){var g=null;H?(g=JSON.parse(F.responseText),g=this.base64ToBlob(g.content,"application/octet-stream")):g=new Blob([F.response],{type:"application/octet-stream"});this.importVisio(g,mxUtils.bind(this,function(k){l(new LocalFile(this,k,G,!0))}),n,e)}else null!=n&&n({message:mxResources.get("errorLoadingFile")})});F.onerror=n;F.send()}else{var d=mxUtils.bind(this,function(g){try{if(/\.pdf$/i.test(e)){var k=Editor.extractGraphModelFromPdf(g);null!=k&&0<k.length&&l(new LocalFile(this,+k,G,!0))}else/\.png$/i.test(e)?(k=this.extractGraphModelFromPng(g),null!=k?l(new LocalFile(this,k,G,!0)):l(new LocalFile(this,g,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,b)?this.parseFileData(g,mxUtils.bind(this,function(v){4==v.readyState&&(200<=v.status&&299>=v.status?l(new LocalFile(this,v.responseText,G,!0)):null!=n&&n({message:mxResources.get("errorLoadingFile")}))}),e):l(new LocalFile(this,g,G,!0))}catch(v){null!=n&&n(v)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||+/\.pdf$/i.test(e)||null!=f&&"image/"==f.substring(0,6);H?mxUtils.get(b,mxUtils.bind(this,function(g){if(200<=g.getStatus()&&299>=g.getStatus()){if(null!=l){g=JSON.parse(g.getText());var k=g.content;"base64"===g.encoding&&(k=/\.png$/i.test(e)?"data:image/png;base64,"+k:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+k:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):atob(k));d(k)}}else null!=n&&n({code:App.ERROR_UNKNOWN})}),function(){null!=n&&n({code:App.ERROR_UNKNOWN})},!1,this.timeout,+function(){null!=n&&n({code:App.ERROR_TIMEOUT,retry:fn})},u):null!=p?p(b,d,n,f):this.editor.loadUrl(b,d,n,f,null,null,null,u)}};App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.backgroundColor="light-dark(#f08705, transparent)";this.appIcon.style.margin="8px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundSize="100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(c){this.appIconClicked(c)}));mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&(c=c.getMode(),c==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):c==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):c==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):c==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):c==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="100% 100%"):c==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70% 70%"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundSize="90% 90%"}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);this.fnameWrapper=document.createElement("div");this.fnameWrapper.style.position="absolute";this.fnameWrapper.style.right="120px";this.fnameWrapper.style.left="60px";this.fnameWrapper.style.top="9px";this.fnameWrapper.style.height="26px";this.fnameWrapper.style.display="none";this.fnameWrapper.style.overflow="hidden";this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",-mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(c){c.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(c){var k=this.getCurrentFile();null!=k&&k.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),+mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(c){c.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(c){var l=this.getCurrentFile();null!=l&&l.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(c)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box",this.menubar.container.style.top="34px");var e="atlas"!=Editor.currentTheme&&"1"!=urlParams.embed?30:10;this.toggleFormatElement=-document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("format")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="atlas"==Editor.currentTheme?"8px":"6px";this.toggleFormatElement.style.right=e+"px";this.toggleFormatElement.style.padding="2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="geButton geAdaptiveAsset";-this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundSize="16px 16px";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);e+=20;mxEvent.addListener(this.toggleFormatElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(c){c.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,-"click",mxUtils.bind(this,function(c){this.actions.get("format").funct();mxEvent.consume(c)}));var f=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+Editor.rightPanelCloseImage+"')":"url('"+Editor.rightPanelOpenImage+"')"});this.addListener("formatWidthChanged",f);f();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage=-"url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=e+"px";this.toolbarContainer.appendChild(this.fullscreenElement);e+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(c){c.preventDefault()}));mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(c){var k=this.fullscreenMode;"atlas"!=Editor.currentTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(k);this.toggleShapesPanel(k);this.toggleFormatPanel(k);-this.fullscreenMode=!k;this.fullscreenElement.style.backgroundImage="url('"+(this.fullscreenMode?Editor.fullscreenExitImage:Editor.fullscreenImage)+"')";mxEvent.consume(c)}));"atlas"==Editor.currentTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));"1"!=urlParams.embed&&"atlas"!=Editor.currentTheme&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className=-"geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display="inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",this.toggleElement.style.top="6px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+Editor.chevronUpImage+-"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat="no-repeat",this.toggleElement.style.backgroundSize="16px 16px",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(c){c.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(c){this.toggleCompactMode();mxEvent.consume(c)})),"atlas"!=Editor.currentTheme&&this.toolbarContainer.appendChild(this.toggleElement),-!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,function(){this.toggleElement.click()}),0))}};+document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("format")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.right=e+"px";this.toggleFormatElement.style.padding="2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="geButton geAdaptiveAsset";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height=+"16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundSize="16px 16px";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);e+=20;mxEvent.addListener(this.toggleFormatElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(c){c.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(c){this.actions.get("format").funct();+mxEvent.consume(c)}));var f=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+Editor.rightPanelCloseImage+"')":"url('"+Editor.rightPanelOpenImage+"')"});this.addListener("formatWidthChanged",f);f();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=+e+"px";this.toolbarContainer.appendChild(this.fullscreenElement);e+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(c){c.preventDefault()}));mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(c){var l=this.fullscreenMode;"atlas"!=Editor.currentTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(l);this.toggleShapesPanel(l);this.toggleFormatPanel(l);this.fullscreenMode=!l;this.fullscreenElement.style.backgroundImage=+"url('"+(this.fullscreenMode?Editor.fullscreenExitImage:Editor.fullscreenImage)+"')";mxEvent.consume(c)}));"atlas"==Editor.currentTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));"1"!=urlParams.embed&&"atlas"!=Editor.currentTheme&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",+this.toggleElement.style.display="inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+Editor.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat="no-repeat",+this.toggleElement.style.backgroundSize="16px 16px",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(c){c.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(c){this.toggleCompactMode();mxEvent.consume(c)})),"atlas"!=Editor.currentTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,+function(){this.toggleElement.click()}),0))}};App.prototype.toggleCompactMode=function(b){(b=null!=b?b:this.compactMode)?(this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.menubar.container.style.paddingTop="",this.menubar.container.style.paddingBottom="",this.menubar.container.style.top="34px",this.toolbar.container.style.paddingLeft="16px",this.buttonContainer.style.visibility="visible",this.appIcon.style.display="block",this.fnameWrapper.style.display="block",this.fnameWrapper.style.visibility="visible",this.menubarHeight=App.prototype.menubarHeight):(this.menubar.container.style.position="relative",this.menubar.container.style.paddingLeft="4px",this.menubar.container.style.paddingTop="0px",this.menubar.container.style.paddingBottom="0px",this.menubar.container.style.top="0px",this.toolbar.container.style.paddingLeft="8px",this.appIcon.style.display="none",this.fnameWrapper.style.display="none",this.fnameWrapper.style.visibility="hidden",this.menubarHeight=EditorUi.prototype.menubarHeight,"atlas"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&(this.buttonContainer.style.visibility="hidden"));null!=this.toggleElement&&(this.toggleElement.style.backgroundImage="url('"+(b?Editor.chevronUpImage:Editor.chevronDownImage)+"')");this.refresh();this.compactMode=!b};@@ -14249,243 +14248,243 @@ App.prototype.updateUserElement=function(){null==this.userElement&&(this.userEleApp.prototype.updateUserElementStyle=function(){var b=this.userElement;null!=b&&("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme?(b.className="geUser geToolbarButton",b.style.backgroundImage="url("+Editor.userImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="100% 100%",b.style.position="relative",b.style.margin="0px",b.style.padding="0px",b.style.height="24px",b.style.width="24px",b.style.right=""):(b.className="geUser geItem",b.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",b.style.backgroundPosition="100% 70%",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="",b.style.position="absolute",b.style.margin="4px",b.style.padding="2px",b.style.paddingRight="16px",b.style.width="",b.style.height="",b.style.right="atlas"==Editor.currentTheme||null!=this.darkModeElement?"12px":"26px",b.style.top="atlas"==Editor.currentTheme?"8px":"2px"))};App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=b){var e=this.getCurrentFile(),f=this.getMainUser();if("1"==urlParams.embed||null==e||null==f)b.style.display="none";else{var c=mxResources.get("changeUser");EditorUi.removeChildNodes(b);b.style.display="";b.innerText="";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?mxUtils.write(b,f.displayName):c=f.displayName;if(e.isRealtimeEnabled()&&e.isRealtimeSupported()){f=document.createElement("img");-f.setAttribute("border","0");f.style.position="absolute";f.style.left="16px";f.style.width="12px";f.style.height="12px";f.className="geAdaptiveAsset";var k=e.getRealtimeError();e=e.getRealtimeState();c+=" (";1==e?(f.src=Editor.syncImage,c+=mxResources.get("online")):(f.src=Editor.syncProblemImage,c=null!=k&&null!=k.message?c+k.message:c+mxResources.get("disconnected"));c+=")";"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme?(b.appendChild(f),"min"==Editor.currentTheme&&+f.setAttribute("border","0");f.style.position="absolute";f.style.left="16px";f.style.width="12px";f.style.height="12px";f.className="geAdaptiveAsset";var l=e.getRealtimeError();e=e.getRealtimeState();c+=" (";1==e?(f.src=Editor.syncImage,c+=mxResources.get("online")):(f.src=Editor.syncProblemImage,c=null!=l&&null!=l.message?c+l.message:c+mxResources.get("disconnected"));c+=")";"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme?(b.appendChild(f),"min"==Editor.currentTheme&&(b.style.marginRight="4px")):f.style.top="2px"}b.setAttribute("title",c)}}};App.prototype.hideUserPanel=function(){null!=this.userPanel&&null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)};-App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog";b.style.position="absolute";b.style.zIndex=5;b.style.padding="0px";b.style.cursor="default";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(q){mxEvent.isConsumed(q)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var e=!1;this.userPanel.innerText=-"";b=document.createElement("img");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.className="geDialogClose";b.style.top="8px";b.style.right="8px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var f=this.drive.getUsersList();if(0<f.length){var c=mxUtils.bind(this,function(q,u){var E=this.getCurrentFile();null!=E&&E.constructor==DriveFile?(this.spinner.spin(document.body,-u),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();q()}),2E3)):q()});b=mxUtils.bind(this,function(q){var u=document.createElement("tr"),E=document.createElement("td");E.setAttribute("valig","middle");E.style.height="59px";E.style.width="66px";var H=document.createElement("img");H.setAttribute("width","50");H.setAttribute("height","50");H.setAttribute("border","0");H.setAttribute("src",null!=q.pictureUrl?q.pictureUrl:this.defaultUserPicture);H.style.borderRadius=-"50%";H.style.margin="4px 8px 0 8px";E.appendChild(H);u.appendChild(E);E=document.createElement("td");E.setAttribute("valign","middle");E.style.whiteSpace="nowrap";E.style.paddingTop="4px";E.style.maxWidth="0";E.style.overflow="hidden";E.style.textOverflow="ellipsis";mxUtils.write(E,q.displayName+(q.isCurrent&&1<f.length?" ("+mxResources.get("default")+")":""));null!=q.email&&(mxUtils.br(E),H=document.createElement("small"),H.style.color="gray",mxUtils.write(H,q.email),E.appendChild(H));H=document.createElement("div");-H.style.marginTop="4px";var D=document.createElement("i");mxUtils.write(D,mxResources.get("googleDrive"));H.appendChild(D);E.appendChild(H);u.appendChild(E);q.isCurrent?u.setAttribute("title","User ID: "+q.id):(u.setAttribute("title",mxResources.get("login")+" (User ID: "+q.id+")"),u.style.cursor="pointer",u.style.opacity="0.3",mxEvent.addListener(u,"mouseenter",mxUtils.bind(this,function(){u.style.opacity="1"})),mxEvent.addListener(u,"mouseleave",mxUtils.bind(this,function(){u.style.opacity="0.3"})),-mxEvent.addListener(u,"click",mxUtils.bind(this,function(L){this.hideUserPanel();c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(q);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(G){this.handleError(G)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(L)})));return u});e=!0;var k=document.createElement("table");k.style.borderSpacing="0";k.style.fontSize="10pt";k.style.width=-"100%";k.style.padding="10px";for(var p=0;p<f.length;p++)k.appendChild(b(f[p]));this.userPanel.appendChild(k);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";k=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);-this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));k.className="geBtn";k.style.float="right";b.appendChild(k);k=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var q=this.drive.createAuthWin();q.blur();window.focus();c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(u){this.handleError(u)}),!0,q)}),mxResources.get("closingFile")+-"...")}));k.className="geBtn";k.style.margin="0px";b.appendChild(k);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(q,u,E,H){if(null!=q){e&&this.userPanel.appendChild(document.createElement("hr"));e=!0;var D=document.createElement("table");D.style.borderSpacing="0";D.style.fontSize="10pt";D.style.width="100%";D.style.padding="10px";var L=document.createElement("tbody"),G=document.createElement("tr"),d=document.createElement("td");d.setAttribute("valig","top");d.style.width="40px";if(null!=-u){var g=document.createElement("img");g.setAttribute("width","40");g.setAttribute("height","40");g.setAttribute("border","0");g.setAttribute("src",u);g.style.marginRight="6px";d.appendChild(g)}G.appendChild(d);d=document.createElement("td");d.setAttribute("valign","middle");d.style.whiteSpace="nowrap";d.style.maxWidth="0";d.style.overflow="hidden";d.style.textOverflow="ellipsis";mxUtils.write(d,q.displayName);null!=q.email&&(mxUtils.br(d),u=document.createElement("small"),u.style.color="gray",mxUtils.write(u,-q.email),d.appendChild(u));null!=H&&(q=document.createElement("div"),q.style.marginTop="4px",u=document.createElement("i"),mxUtils.write(u,H),q.appendChild(u),d.appendChild(q));G.appendChild(d);L.appendChild(G);D.appendChild(L);this.userPanel.appendChild(D);q=document.createElement("div");q.style.textAlign="center";q.style.padding="10px";q.style.whiteSpace="nowrap";null!=E&&(E=mxUtils.button(mxResources.get("signOut"),E),E.className="geBtn",q.appendChild(E));this.userPanel.appendChild(q)}});null!=-this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var q=this.getCurrentFile();if(null!=q&&q.constructor==DropboxFile){var u=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});q.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",-this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var q=this.getCurrentFile();if(null!=q&&q.constructor==OneDriveFile){var u=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});q.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var q=-this.getCurrentFile();if(null!=q&&q.constructor==GitHubFile){var u=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});q.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var q=this.getCurrentFile();if(null!=q&&q.constructor==GitLabFile){var u=-mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});q.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var q=this.getCurrentFile();if(null!=q&&q.constructor==TrelloFile){var u=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=-""});q.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(k=this.getCurrentFile(),null!=k&&k.isRealtimeEnabled()&&k.isRealtimeSupported()&&(b=document.createElement("div"),b.style.padding="10px",b.style.whiteSpace="nowrap",b.style.borderTop="1px solid rgb(224, 224, 224)",b.style.marginTop="4px",b.style.textAlign="center",b.style.padding="10px",b.style.fontSize=-"9pt",p=k.getRealtimeError(),1!=k.getRealtimeState()&&(mxUtils.write(b,mxResources.get("realtimeCollaboration")+": "+(null!=p&&null!=p.message?p.message:mxResources.get("disconnected"))),this.userPanel.appendChild(b))));document.body.appendChild(this.userPanel)}};+App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog";b.style.position="absolute";b.style.zIndex=5;b.style.padding="0px";b.style.cursor="default";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(p){mxEvent.isConsumed(p)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var e=!1;this.userPanel.innerText=+"";b=document.createElement("img");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.className="geDialogClose";b.style.top="8px";b.style.right="8px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var f=this.drive.getUsersList();if(0<f.length){var c=mxUtils.bind(this,function(p,u){var G=this.getCurrentFile();null!=G&&G.constructor==DriveFile?(this.spinner.spin(document.body,+u),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();p()}),2E3)):p()});b=mxUtils.bind(this,function(p){var u=document.createElement("tr"),G=document.createElement("td");G.setAttribute("valig","middle");G.style.height="59px";G.style.width="66px";var H=document.createElement("img");H.setAttribute("width","50");H.setAttribute("height","50");H.setAttribute("border","0");H.setAttribute("src",null!=p.pictureUrl?p.pictureUrl:this.defaultUserPicture);H.style.borderRadius=+"50%";H.style.margin="4px 8px 0 8px";G.appendChild(H);u.appendChild(G);G=document.createElement("td");G.setAttribute("valign","middle");G.style.whiteSpace="nowrap";G.style.paddingTop="4px";G.style.maxWidth="0";G.style.overflow="hidden";G.style.textOverflow="ellipsis";mxUtils.write(G,p.displayName+(p.isCurrent&&1<f.length?" ("+mxResources.get("default")+")":""));null!=p.email&&(mxUtils.br(G),H=document.createElement("small"),H.style.color="gray",mxUtils.write(H,p.email),G.appendChild(H));H=document.createElement("div");+H.style.marginTop="4px";var F=document.createElement("i");mxUtils.write(F,mxResources.get("googleDrive"));H.appendChild(F);G.appendChild(H);u.appendChild(G);p.isCurrent?u.setAttribute("title","User ID: "+p.id):(u.setAttribute("title",mxResources.get("login")+" (User ID: "+p.id+")"),u.style.cursor="pointer",u.style.opacity="0.3",mxEvent.addListener(u,"mouseenter",mxUtils.bind(this,function(){u.style.opacity="1"})),mxEvent.addListener(u,"mouseleave",mxUtils.bind(this,function(){u.style.opacity="0.3"})),+mxEvent.addListener(u,"click",mxUtils.bind(this,function(K){this.hideUserPanel();c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(p);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(d){this.handleError(d)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(K)})));return u});e=!0;var l=document.createElement("table");l.style.borderSpacing="0";l.style.fontSize="10pt";l.style.width=+"100%";l.style.padding="10px";for(var n=0;n<f.length;n++)l.appendChild(b(f[n]));this.userPanel.appendChild(l);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";l=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);+this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));l.className="geBtn";l.style.float="right";b.appendChild(l);l=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var p=this.drive.createAuthWin();p.blur();window.focus();c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(u){this.handleError(u)}),!0,p)}),mxResources.get("closingFile")++"...")}));l.className="geBtn";l.style.margin="0px";b.appendChild(l);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(p,u,G,H){if(null!=p){e&&this.userPanel.appendChild(document.createElement("hr"));e=!0;var F=document.createElement("table");F.style.borderSpacing="0";F.style.fontSize="10pt";F.style.width="100%";F.style.padding="10px";var K=document.createElement("tbody"),d=document.createElement("tr"),g=document.createElement("td");g.setAttribute("valig","top");g.style.width="40px";if(null!=+u){var k=document.createElement("img");k.setAttribute("width","40");k.setAttribute("height","40");k.setAttribute("border","0");k.setAttribute("src",u);k.style.marginRight="6px";g.appendChild(k)}d.appendChild(g);g=document.createElement("td");g.setAttribute("valign","middle");g.style.whiteSpace="nowrap";g.style.maxWidth="0";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,p.displayName);null!=p.email&&(mxUtils.br(g),u=document.createElement("small"),u.style.color="gray",mxUtils.write(u,+p.email),g.appendChild(u));null!=H&&(p=document.createElement("div"),p.style.marginTop="4px",u=document.createElement("i"),mxUtils.write(u,H),p.appendChild(u),g.appendChild(p));d.appendChild(g);K.appendChild(d);F.appendChild(K);this.userPanel.appendChild(F);p=document.createElement("div");p.style.textAlign="center";p.style.padding="10px";p.style.whiteSpace="nowrap";null!=G&&(G=mxUtils.button(mxResources.get("signOut"),G),G.className="geBtn",p.appendChild(G));this.userPanel.appendChild(p)}});null!=+this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==DropboxFile){var u=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",+this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==OneDriveFile){var u=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var p=+this.getCurrentFile();if(null!=p&&p.constructor==GitHubFile){var u=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==GitLabFile){var u=+mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==TrelloFile){var u=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=+""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(l=this.getCurrentFile(),null!=l&&l.isRealtimeEnabled()&&l.isRealtimeSupported()&&(b=document.createElement("div"),b.style.padding="10px",b.style.whiteSpace="nowrap",b.style.borderTop="1px solid rgb(224, 224, 224)",b.style.marginTop="4px",b.style.textAlign="center",b.style.padding="10px",b.style.fontSize=+"9pt",n=l.getRealtimeError(),1!=l.getRealtimeState()&&(mxUtils.write(b,mxResources.get("realtimeCollaboration")+": "+(null!=n&&null!=n.message?n.message:mxResources.get("disconnected"))),this.userPanel.appendChild(b))));document.body.appendChild(this.userPanel)}};App.prototype.createUserElement=function(){var b=document.createElement("a");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(e){e.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){this.toggleUserPanel();this.userPanel.style.top=b.clientTop+b.clientHeight+6+"px";this.userPanel.style.right="36px";this.userPanel.style.left="";mxEvent.consume(e)}));return b};App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(f){var c=document.createElement("div");c.setAttribute("title",mxResources.get("help"));c.style.display="inline-flex";c.style.alignItems="center";-c.style.marginLeft="4px";c.style.cursor="help";c.style.color="blue";var k=document.createElement("img");k.setAttribute("src",Editor.helpImage);k.setAttribute("valign","bottom");k.setAttribute("border","0");k.className="geAdaptiveAsset";mxUtils.setOpacity(k,60);k.style.height="16px";k.style.width="16px";c.appendChild(k);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(p){this.editorUi.hideCurrentMenu();this.editorUi.openLink(f);mxEvent.consume(p)}));return c};Menus.prototype.addLinkToItem=-function(f,c){null!=f&&(c=this.createHelpLink(c),c.style.display="inline",c.style.marginLeft="8px",f.firstChild.nextSibling.appendChild(c))};Menus.prototype.removeCustomFont=function(f,c){for(var k=0;k<this.customFonts.length;k++)if(this.customFonts[k].name==f&&this.customFonts[k].url==c){this.customFonts.splice(k,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(f,c){for(var k=0;k<this.customFonts.length;k++)if(this.customFonts[k].name==-f&&this.customFonts[k].url==c)return!0;for(k=0;k<this.defaultFonts.length;k++){var p=this.defaultFonts[k];if("string"!==typeof p&&p.fontFamily==f&&p.fontUrl==c||"string"===typeof p&&p==f&&null==c)return!0}return!1};Menus.prototype.addCustomFont=function(f,c){null==f||this.containsFont(f,c)||(this.customFonts.push({name:f,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var e=Menus.prototype.init;Menus.prototype.init=function(){function f(n,-z,A){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(B,M,S,l,x,F,N,O,Q,V,T,W,X){var Y=parseInt(B);!isNaN(Y)&&0<Y&&(c.exportImage(Y/100,M&&"png"==n,S,l,x&&"png"==n,N,!O,Q,n,T,null,W,X),null!=A&&A(B,M,S,l,x,F,N,O,Q,V,T,W,X))}),!0,z,n,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(B,M,S,l,-x){c.downloadFile(M&&"png"==n?"xmlpng":n,null,null,B,null,null,S,l,x)}),!1,!0)}e.apply(this,arguments);var c=this.editorUi,k=c.editor.graph,p=mxUtils.bind(k,k.isEnabled);mxClient.IS_SVG||c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(n){return"file"!=n}));c.actions.addAction("new...",function(){var n=c.isOffline(),z=new NewDialog(c,n,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(z.container,-n?350:620,n?70:460,!0,!0,function(A){c.sidebar.hideTooltip();A&&null==c.getCurrentFile()&&c.showSplash()});z.init()});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())){var n=new NewDialog(c,null,!1,function(z){c.hideDialog();if(null!=z){var A=c.editor.graph.getFreeInsertPoint();k.setSelectionCells(c.importXml(z,Math.max(A.x,20),Math.max(A.y,20),!0,null,null,!0));k.scrollCellToVisible(k.getSelectionCell())}},-null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(n.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});n.init()}})).isEnabled=p;var q=c.actions.addAction("shareCursor",function(){c.setShareCursorPosition(!c.isShareCursorPosition())});q.setToggleAction(!0);q.setSelectedCallback(function(){return c.isShareCursorPosition()});q=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});q.setToggleAction(!0);-q.setSelectedCallback(function(){return c.isShowRemoteCursors()});q=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});q.setToggleAction(!0);q.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.POINTS});q=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});q.setToggleAction(!0);q.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});q=c.actions.addAction("millimeters",-function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});q.setToggleAction(!0);q.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});q=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)});q.setToggleAction(!0);q.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(n,z){this.addMenuItems(n,["points","inches","millimeters","meters"],-z);"min"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme||c.menus.addMenuItems(n,["-","pageScale"],z)})));q=c.actions.addAction("pageTabs",function(){c.setTabContainerVisible(!c.isTabContainerVisible())});q.setToggleAction(!0);q.setSelectedCallback(function(){return c.isTabContainerVisible()});q=c.actions.addAction("ruler",function(){c.setRulerVisible(!c.isRulerVisible())});q.setEnabled(c.canvasSupported&&9!=document.documentMode);q.setToggleAction(!0);q.setSelectedCallback(function(){return c.isRulerVisible()});-q=c.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?c.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});q.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;q.setToggleAction(!0);q.setSelectedCallback(function(){return"1"==urlParams.embedInline?Editor.inlineFullscreen:null!=document.fullscreenElement});q=c.actions.put("lightMode",-new Action(mxResources.get("light"),function(n){c.setAndPersistDarkMode(!1)}));q.setToggleAction(!0);q.setSelectedCallback(function(){return!c.isAutoDarkMode(!0)&&!Editor.isDarkMode()});q=c.actions.put("darkMode",new Action(mxResources.get("dark"),function(n){c.setAndPersistDarkMode(!0)}));q.setToggleAction(!0);q.setSelectedCallback(function(){return!c.isAutoDarkMode(!0)&&Editor.isDarkMode()});q=c.actions.put("autoMode",new Action(mxResources.get("automatic"),function(n){c.setAndPersistDarkMode("auto")}));-q.setToggleAction(!0);q.setSelectedCallback(function(){return c.isAutoDarkMode(!0)});0<=mxUtils.indexOf(Editor.themes,"simple")&&(q=c.actions.put("toggleSimpleMode",new Action(mxResources.get("simple"),function(n){c.setCurrentTheme("simple"==Editor.currentTheme?Editor.isDarkMode()?"dark":"kennedy":"simple")})),q.setToggleAction(!0),q.visible="min"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme,q.setSelectedCallback(function(){return"simple"==Editor.currentTheme}));-q=c.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(n){c.setSketchMode(!Editor.sketchMode)}));q.setToggleAction(!0);q.setSelectedCallback(function(){return Editor.sketchMode});c.actions.addAction("properties...",function(){c.getPublicUrl(c.getCurrentFile(),function(n){n=new FilePropertiesDialog(c,n);c.showDialog(n.container,340,200,!0,!0);n.init()})}).isEnabled=p;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(k.isEnabled()){if(null==-c.freehandWindow){var n=!mxClient.IS_IE&&!mxClient.IS_IE11;c.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,n?126:90,n)}k.freehand.isDrawing()?k.freehand.stopDrawing():k.freehand.startDrawing();c.freehandWindow.window.setVisible(k.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return p()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var n=document.createElement("div");n.style.whiteSpace="nowrap";var z=-null==c.pages||1>=c.pages.length,A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatXml"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";n.appendChild(A);var B=c.addCheckbox(n,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),M=c.addCheckbox(n,mxResources.get("compressed"),Editor.defaultCompressed),S=c.addCheckbox(n,mxResources.get("allPages"),!z,z);S.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?S.setAttribute("disabled",-"disabled"):S.removeAttribute("disabled")});n=new CustomDialog(c,n,mxUtils.bind(this,function(){c.downloadFile("xml",!M.checked,null,!B.checked,z||!S.checked)}),null,mxResources.get("export"));c.showDialog(n.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(n,z,A,B,M,S,l,x,F){l=[];B&&F&&l.push("tags=%7B%7D");n=new EmbedDialog(c,c.createLink(n,-z,!0,B,M,S,null,!0,l,null,A));c.showDialog(n.container,450,240,!0,!0);n.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(n){c.showHtmlDialog(mxResources.get("export"),null,n,function(z,A,B,M,S,l,x,F,N,O,Q,V){c.createHtml(z,A,B,M,S,l,x,F,N,O,Q,mxUtils.bind(this,function(T,W){var X=c.getBaseFilename(x);T='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+-mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+T+"\n"+W+"\n</body>\n</html>";c.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",T,"text/html")}),V)})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport?c.showPrintDialog(mxResources.get("formatPdf"),mxUtils.bind(this,function(n,z){n=null!=c.pages?c.pages.length:1;var A=null==c.pages||1>=c.pages.length,-B=c.getPageIndex(c.currentPage);B=null!=B?B+1:1;c.downloadFile("pdf",null,null,!z.selection,A||!z.allPages&&z.pagesFrom==B&&z.pagesTo==B,!z.crop,z.transparent,z.scale,null,z.grid,z.includeCopy,z.allPages||z.pagesFrom==B&&z.pagesTo==B?null:{from:Math.max(0,Math.min(n-1,z.pagesFrom-1)),to:Math.max(0,Math.min(n-1,z.pagesTo-1))},z.border,z.fit,z.sheetsAcross,z.sheetsDown)})):c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,320,null!=c.pages&&1<c.pages.length&&(c.editor.editable||-"1"!=urlParams["hide-pages"])?350:280,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function n(){null!=z&&z.removeDraft();c.fileLoaded(null)}var z=c.getCurrentFile();null!=z&&z.isModified()?c.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges")):n()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){k.getSelectionCells();if(1==k.getSelectionCount()){var n=k.getSelectionCell(),-z=k.view.getState(n);null!=z&&null!=z.shape&&null!=z.shape.stencil&&(n=new EditShapeDialog(c,n,mxResources.get("editShape")+":",630,400),c.showDialog(n.container,640,480,!0,!1),n.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(n,z){c.spinner.stop();n=new RevisionDialog(c,n,z);c.showDialog(n.container,640,480,!0,!0);n.init()}),mxUtils.bind(this,function(n){c.handleError(null!=-n?n:mxResources.get("notAvailable"))})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");q=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(q.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var n=c.getCurrentFile();null!=-n&&(window.drawdata=c.getFileData(),n=null!=n.getTitle()?n.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(n),null,!0))});"undefined"!==typeof MathJax&&(q=c.actions.addAction("mathematicalTypesetting",function(){var n=new ChangePageSetup(c);n.ignoreColor=!0;n.ignoreImage=!0;n.mathEnabled=!c.isMathEnabled();k.model.execute(n)}),q.setToggleAction(!0),q.setSelectedCallback(function(){return c.isMathEnabled()}),-q.isEnabled=p);q=c.actions.put("defaultAdaptiveColors",new Action(mxResources.get("default")+" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")",function(){var n=new ChangePageSetup(c);n.ignoreColor=!0;n.ignoreImage=!0;n.adaptiveColors="default";k.model.execute(n)}));q.setToggleAction(!0);q.setSelectedCallback(function(){return null==k.adaptiveColors});q=c.actions.put("automaticAdaptiveColors",new Action(mxResources.get("automatic"),function(){var n=new ChangePageSetup(c);n.ignoreColor=-!0;n.ignoreImage=!0;n.adaptiveColors="auto";k.model.execute(n)}));q.setToggleAction(!0);q.setSelectedCallback(function(){return"auto"==k.adaptiveColors});q=c.actions.put("simpleAdaptiveColors",new Action(mxResources.get("simple"),function(){var n=new ChangePageSetup(c);n.ignoreColor=!0;n.ignoreImage=!0;n.adaptiveColors="simple";k.model.execute(n)}));q.setToggleAction(!0);q.setSelectedCallback(function(){return"simple"==k.adaptiveColors});q=c.actions.put("noAdaptiveColors",new Action(mxResources.get("none"),-function(){var n=new ChangePageSetup(c);n.ignoreColor=!0;n.ignoreImage=!0;n.adaptiveColors="none";k.model.execute(n)}));q.setToggleAction(!0);q.setSelectedCallback(function(){return"none"==k.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(n,z){this.addMenuItems(n,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],z)})));isLocalStorage&&(q=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());-mxSettings.save()}),q.setToggleAction(!0),q.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var u=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});u.setToggleAction(!0);u.setSelectedCallback(function(){return u.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var n=k.getSelectionCells(),z=[],A=0;A<n.length;A++)k.getModel().isVertex(n[A])&&z.push(n[A]);0<z.length&&(n=new EditGeometryDialog(c,z),c.showDialog(n.container,-200,270,!0,!0),n.init())},null,null,Editor.ctrlKey+"+Shift+M");c.actions.addAction("copyStyle",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var n=k.getSelectionCell(),z=k.getCellStyle(n,!1);c.copiedStyle={};var A=[],B=[],M;for(M in z)A.push(z[M]),B.push(M);k.copyCellStyles([n],B,A,c.copiedStyle,c.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");c.actions.addAction("pasteStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&null!=c.copiedStyle&&k.pasteCellStyles(k.includeDescendants(k.getSelectionCells()),-c.copiedStyle,c.copiedStyle,!0)},null,null,"Alt+V");c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(n,z,A,B,M,S,l,x,F,N,O,Q,V,T){n=parseInt(n);c.lastExportSvgEditable=M;!isNaN(n)&&0<n&&c.exportSvg(n/100,z,A,B,M,S,l,!x,F,N,Q,V,T)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+-"...",function(){f("png",c.lastExportPngEditable,function(n,z,A,B,M){c.lastExportPngEditable=M})}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){f("jpeg")}));c.actions.put("exportWebp",new Action(mxResources.get("formatWebp")+"...",function(){f("webp")}));q=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var n=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),z=mxUtils.getXml(0==n.length?c.editor.getGraphXml():k.encodeCells(n));-c.copyImage(n,z)}),null,null,"Ctrl+Alt+X");q.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;q=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){k.setShadowVisible(!k.shadowVisible)}));q.setToggleAction(!0);q.setSelectedCallback(function(){return k.shadowVisible});c.actions.put("about",new Action("v"+EditorUi.VERSION,function(n,z){}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):+c.style.marginLeft="4px";c.style.cursor="help";c.style.color="blue";var l=document.createElement("img");l.setAttribute("src",Editor.helpImage);l.setAttribute("valign","bottom");l.setAttribute("border","0");l.className="geAdaptiveAsset";mxUtils.setOpacity(l,60);l.style.height="16px";l.style.width="16px";c.appendChild(l);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(n){this.editorUi.hideCurrentMenu();this.editorUi.openLink(f);mxEvent.consume(n)}));return c};Menus.prototype.addLinkToItem=+function(f,c){null!=f&&(c=this.createHelpLink(c),c.style.display="inline",c.style.marginLeft="8px",f.firstChild.nextSibling.appendChild(c))};Menus.prototype.removeCustomFont=function(f,c){for(var l=0;l<this.customFonts.length;l++)if(this.customFonts[l].name==f&&this.customFonts[l].url==c){this.customFonts.splice(l,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(f,c){for(var l=0;l<this.customFonts.length;l++)if(this.customFonts[l].name==+f&&this.customFonts[l].url==c)return!0;for(l=0;l<this.defaultFonts.length;l++){var n=this.defaultFonts[l];if("string"!==typeof n&&n.fontFamily==f&&n.fontUrl==c||"string"===typeof n&&n==f&&null==c)return!0}return!1};Menus.prototype.addCustomFont=function(f,c){null==f||this.containsFont(f,c)||(this.customFonts.push({name:f,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var e=Menus.prototype.init;Menus.prototype.init=function(){function f(q,+y,B){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(C,M,T,m,z,I,L,N,O,S,U,W,X){var Z=parseInt(C);!isNaN(Z)&&0<Z&&(c.exportImage(Z/100,M&&"png"==q,T,m,z&&"png"==q,L,!N,O,q,U,null,W,X),null!=B&&B(C,M,T,m,z,I,L,N,O,S,U,W,X))}),!0,y,q,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(C,M,T,m,+z){c.downloadFile(M&&"png"==q?"xmlpng":q,null,null,C,null,null,T,m,z)}),!1,!0)}e.apply(this,arguments);var c=this.editorUi,l=c.editor.graph,n=mxUtils.bind(l,l.isEnabled);mxClient.IS_SVG||c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(q){return"file"!=q}));c.actions.addAction("new...",function(){var q=c.isOffline(),y=new NewDialog(c,q,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(y.container,+q?350:620,q?70:460,!0,!0,function(B){c.sidebar.hideTooltip();B&&null==c.getCurrentFile()&&c.showSplash()});y.init()});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())){var q=new NewDialog(c,null,!1,function(y){c.hideDialog();if(null!=y){var B=c.editor.graph.getFreeInsertPoint();l.setSelectionCells(c.importXml(y,Math.max(B.x,20),Math.max(B.y,20),!0,null,null,!0));l.scrollCellToVisible(l.getSelectionCell())}},+null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(q.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});q.init()}})).isEnabled=n;var p=c.actions.addAction("shareCursor",function(){c.setShareCursorPosition(!c.isShareCursorPosition())});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.isShareCursorPosition()});p=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});p.setToggleAction(!0);+p.setSelectedCallback(function(){return c.isShowRemoteCursors()});p=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.POINTS});p=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});p=c.actions.addAction("millimeters",+function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});p=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,["points","inches","millimeters","meters"],+y);"min"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme||c.menus.addMenuItems(q,["-","pageScale"],y)})));p=c.actions.addAction("pageTabs",function(){c.setTabContainerVisible(!c.isTabContainerVisible())});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.isTabContainerVisible()});p=c.actions.addAction("ruler",function(){c.setRulerVisible(!c.isRulerVisible())});p.setEnabled(c.canvasSupported&&9!=document.documentMode);p.setToggleAction(!0);p.setSelectedCallback(function(){return c.isRulerVisible()});+p=c.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?c.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});p.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;p.setToggleAction(!0);p.setSelectedCallback(function(){return"1"==urlParams.embedInline?Editor.inlineFullscreen:null!=document.fullscreenElement});p=c.actions.put("lightMode",+new Action(mxResources.get("light"),function(q){c.setAndPersistDarkMode(!1)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return!c.isAutoDarkMode(!0)&&!Editor.isDarkMode()});p=c.actions.put("darkMode",new Action(mxResources.get("dark"),function(q){c.setAndPersistDarkMode(!0)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return!c.isAutoDarkMode(!0)&&Editor.isDarkMode()});p=c.actions.put("autoMode",new Action(mxResources.get("automatic"),function(q){c.setAndPersistDarkMode("auto")}));+p.setToggleAction(!0);p.setSelectedCallback(function(){return c.isAutoDarkMode(!0)});0<=mxUtils.indexOf(Editor.themes,"simple")&&(p=c.actions.put("toggleSimpleMode",new Action(mxResources.get("simple"),function(q){c.setCurrentTheme("simple"==Editor.currentTheme?Editor.isDarkMode()?"dark":"kennedy":"simple")})),p.setToggleAction(!0),p.visible="min"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme,p.setSelectedCallback(function(){return"simple"==Editor.currentTheme}));+p=c.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(q){c.setSketchMode(!Editor.sketchMode)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return Editor.sketchMode});c.actions.addAction("properties...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){q=new FilePropertiesDialog(c,q);c.showDialog(q.container,340,200,!0,!0);q.init()})}).isEnabled=n;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(l.isEnabled()){if(null==+c.freehandWindow){var q=!mxClient.IS_IE&&!mxClient.IS_IE11;c.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,q?126:90,q)}l.freehand.isDrawing()?l.freehand.stopDrawing():l.freehand.startDrawing();c.freehandWindow.window.setVisible(l.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return n()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var q=document.createElement("div");q.style.whiteSpace="nowrap";var y=+null==c.pages||1>=c.pages.length,B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatXml"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(B);var C=c.addCheckbox(q,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),M=c.addCheckbox(q,mxResources.get("compressed"),Editor.defaultCompressed),T=c.addCheckbox(q,mxResources.get("allPages"),!y,y);T.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?T.setAttribute("disabled",+"disabled"):T.removeAttribute("disabled")});q=new CustomDialog(c,q,mxUtils.bind(this,function(){c.downloadFile("xml",!M.checked,null,!C.checked,y||!T.checked)}),null,mxResources.get("export"));c.showDialog(q.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(q,y,B,C,M,T,m,z,I){m=[];C&&I&&m.push("tags=%7B%7D");q=new EmbedDialog(c,c.createLink(q,+y,!0,C,M,T,null,!0,m,null,B));c.showDialog(q.container,450,240,!0,!0);q.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("export"),null,q,function(y,B,C,M,T,m,z,I,L,N,O,S){c.createHtml(y,B,C,M,T,m,z,I,L,N,O,mxUtils.bind(this,function(U,W){var X=c.getBaseFilename(z);U='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'++mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+U+"\n"+W+"\n</body>\n</html>";c.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",U,"text/html")}),S)})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport?c.showPrintDialog(mxResources.get("formatPdf"),mxUtils.bind(this,function(q,y){q=null!=c.pages?c.pages.length:1;var B=null==c.pages||1>=c.pages.length,+C=c.getPageIndex(c.currentPage);C=null!=C?C+1:1;c.downloadFile("pdf",null,null,!y.selection,B||!y.allPages&&y.pagesFrom==C&&y.pagesTo==C,!y.crop,y.transparent,y.scale,null,y.grid,y.includeCopy,y.allPages||y.pagesFrom==C&&y.pagesTo==C?null:{from:Math.max(0,Math.min(q-1,y.pagesFrom-1)),to:Math.max(0,Math.min(q-1,y.pagesTo-1))},y.border,y.fit,y.sheetsAcross,y.sheetsDown)})):c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,320,null!=c.pages&&1<c.pages.length&&(c.editor.editable||+"1"!=urlParams["hide-pages"])?350:280,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function q(){null!=y&&y.removeDraft();c.fileLoaded(null)}var y=c.getCurrentFile();null!=y&&y.isModified()?c.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){l.getSelectionCells();if(1==l.getSelectionCount()){var q=l.getSelectionCell(),+y=l.view.getState(q);null!=y&&null!=y.shape&&null!=y.shape.stencil&&(q=new EditShapeDialog(c,q,mxResources.get("editShape")+":",630,400),c.showDialog(q.container,640,480,!0,!1),q.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(q,y){c.spinner.stop();q=new RevisionDialog(c,q,y);c.showDialog(q.container,640,480,!0,!0);q.init()}),mxUtils.bind(this,function(q){c.handleError(null!=+q?q:mxResources.get("notAvailable"))})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");p=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(p.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var q=c.getCurrentFile();null!=+q&&(window.drawdata=c.getFileData(),q=null!=q.getTitle()?q.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(q),null,!0))});"undefined"!==typeof MathJax&&(p=c.actions.addAction("mathematicalTypesetting",function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.mathEnabled=!c.isMathEnabled();l.model.execute(q)}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isMathEnabled()}),+p.isEnabled=n);p=c.actions.put("defaultAdaptiveColors",new Action(mxResources.get("default")+" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")",function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="default";l.model.execute(q)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return null==l.adaptiveColors});p=c.actions.put("automaticAdaptiveColors",new Action(mxResources.get("automatic"),function(){var q=new ChangePageSetup(c);q.ignoreColor=+!0;q.ignoreImage=!0;q.adaptiveColors="auto";l.model.execute(q)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return"auto"==l.adaptiveColors});p=c.actions.put("simpleAdaptiveColors",new Action(mxResources.get("simple"),function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="simple";l.model.execute(q)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return"simple"==l.adaptiveColors});p=c.actions.put("noAdaptiveColors",new Action(mxResources.get("none"),+function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="none";l.model.execute(q)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return"none"==l.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],y)})));isLocalStorage&&(p=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());+mxSettings.save()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var u=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});u.setToggleAction(!0);u.setSelectedCallback(function(){return u.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var q=l.getSelectionCells(),y=[],B=0;B<q.length;B++)l.getModel().isVertex(q[B])&&y.push(q[B]);0<y.length&&(q=new EditGeometryDialog(c,y),c.showDialog(q.container,+200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+Shift+M");c.actions.addAction("copyStyle",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var q=l.getSelectionCell(),y=l.getCellStyle(q,!1);c.copiedStyle={};var B=[],C=[],M;for(M in y)B.push(y[M]),C.push(M);l.copyCellStyles([q],C,B,c.copiedStyle,c.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");c.actions.addAction("pasteStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&null!=c.copiedStyle&&l.pasteCellStyles(l.includeDescendants(l.getSelectionCells()),+c.copiedStyle,c.copiedStyle,!0)},null,null,"Alt+V");c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(q,y,B,C,M,T,m,z,I,L,N,O,S,U){q=parseInt(q);c.lastExportSvgEditable=M;!isNaN(q)&&0<q&&c.exportSvg(q/100,y,B,C,M,T,m,!z,I,L,O,S,U)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")++"...",function(){f("png",c.lastExportPngEditable,function(q,y,B,C,M){c.lastExportPngEditable=M})}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){f("jpeg")}));c.actions.put("exportWebp",new Action(mxResources.get("formatWebp")+"...",function(){f("webp")}));p=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var q=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),y=mxUtils.getXml(0==q.length?c.editor.getGraphXml():l.encodeCells(q));+c.copyImage(q,y)}),null,null,"Ctrl+Alt+X");p.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;p=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){l.setShadowVisible(!l.shadowVisible)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return l.shadowVisible});c.actions.put("about",new Action("v"+EditorUi.VERSION,function(q,y){}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",-function(){var n=new FeedbackDialog(c);c.showDialog(n.container,610,360,!0,!1);n.init()});c.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?c.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});q=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,-function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");q.setToggleAction(!0);q.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModel||-null==Editor.gptUrl||c.isOffline()||EditorUi.isElectronApp||(q=c.actions.addAction("chatWindowTitle",mxUtils.bind(this,function(){null==this.chatWindow?(this.chatWindow=new ChatWindow(c,220,document.body.offsetHeight-380,250,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("chat"))})),this.chatWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("chat"))):-this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),q.setToggleAction(!0),q.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));q=c.actions.addAction("findReplace",mxUtils.bind(this,function(n,z){var A=(n=k.isEnabled()&&(null==z||!mxEvent.isShiftDown(z)))?"findReplace":"find";z=A+"Window";if(null==this[z]){var B="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,M=n?B?330:-300:240;this[z]=new FindWindow(c,document.body.offsetWidth-(M+20),100,M,n?B?304:288:170,n);this[z].window.addListener("show",function(){c.fireEvent(new mxEventObject(A))});this[z].window.addListener("hide",function(){c.fireEvent(new mxEventObject(A))});this[z].window.setVisible(!0)}else this[z].window.setVisible(!this[z].window.isVisible())}),null,null,Editor.ctrlKey+"+F");q.setToggleAction(!0);q.setSelectedCallback(mxUtils.bind(this,function(){var n=k.isEnabled()?"findReplaceWindow":"findWindow";-return null!=this[n]&&this[n].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var n=null==c.pages||1>=c.pages.length;if(n)c.exportVisio();else{var z=document.createElement("div");z.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatVsdx"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";z.appendChild(A);var B=c.addCheckbox(z,mxResources.get("allPages"),-!n,n);B.style.marginBottom="16px";n=new CustomDialog(c,z,mxUtils.bind(this,function(){c.exportVisio(!B.checked)}),null,mxResources.get("export"));c.showDialog(n.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginRight="8px";n.checked=mxSettings.getShowStartScreen();n.defaultChecked=n.checked;if(Editor.isSettingsEnabled()&&("sketch"==-Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var z=document.createElement("span");z.style.display="flex";z.style.alignItems="center";z.style["float"]="right";z.style.cursor="pointer";z.style.userSelect="none";z.style.marginTop="-3px";z.appendChild(n);mxUtils.write(z,mxResources.get("showStartScreen"));mxEvent.addListener(z,"click",function(B){mxEvent.getSource(B)!=n&&(n.checked=!n.checked)});header=z}z=[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),-function(){try{localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(B){c.handleError(B)}})}]];if(!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS){var A=c.actions.get("plugins");null==A||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||z.push([mxResources.get("plugins"),A.funct])}EditorUi.isElectronApp||z.push([mxResources.get("link"),function(B,M){if(0<M.value.length)try{var S=-JSON.parse(M.value),l=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(S)),x=new EmbedDialog(c,l);c.showDialog(x.container,450,240,!0);x.init()}catch(F){c.handleError(F)}else c.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=c.getServiceName()&&"1"!=urlParams.embed&&z.push([mxResources.get("preferences"),function(){c.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),-function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(B){c.handleError(B)}})}]])}]);c.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,z,n.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=n.parentNode&&(mxSettings.setShowStartScreen(n.checked),mxSettings.save())})});-if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(n,z){var A=mxLanguage;null==urlParams.lang&&isLocalStorage&&(A=mxSettings.settings.language);var B=mxUtils.bind(this,function(S){var l=""==S?mxResources.get("automatic"):mxLanguageMap[S],x=null;""!=l&&(x=n.addItem(l,null,mxUtils.bind(this,function(){c.setAndPersistLanguage(S);c.alert(mxResources.get("restartForChangeRequired"))}),z),(S==A||""==S&&null==A)&&n.addCheckmark(x,Editor.checkmarkImage));return x});-B("");n.addSeparator(z);for(var M in mxLanguageMap)B(M)})));var E=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(n){var z=E.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=z&&Editor.enableSimpleTheme&&"atlassian"!=c.getServiceName()){var A=this.get("dynamicAppearance");if(null!=A){var B=z.addMenu("",A.funct);B.setAttribute("title",mxResources.get("appearance"));B.className="geToolbarButton geAdaptiveAsset";B.style.backgroundPosition="center center";-B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="100% 100%";B.style.display="inline-block";B.style.cursor="pointer";B.style.zIndex="1";B.style.position="absolute";B.style.height="18px";B.style.width="18px";"atlas"==Editor.currentTheme?(B.style.filter="invert(100%)",B.style.right="11px",B.style.top="10px"):(B.style.right="10px",B.style.top="5px");document.body.appendChild(B);z.langIcon=B;A=mxUtils.bind(this,function(){var M=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;-B.style.display="atlas"==Editor.currentTheme||"min"==Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";B.style.backgroundImage="simple"==Editor.currentTheme?750>M?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()?Editor.thinDarkImage:Editor.thinLightImage)+")":"url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",A);this.editorUi.addListener("darkModeChanged",A);mxEvent.addListener(window,"resize",-A);A()}}return z}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){c.showCustomLayoutDialog(JSON.stringify(c.customLayoutConfig,null,2))});c.actions.put("adaptiveColors",new Action("adaptiveColors",function(n){null==c.adaptiveColorsWindow&&(c.adaptiveColorsWindow=new AdaptiveColorsWindow(c,document.body.offsetWidth-520,80,200,160));-c.adaptiveColorsWindow.window.setVisible(!0)}));q=this.get("viewZoom");var H=q.funct;q.funct=mxUtils.bind(this,function(n,z){H.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(n,["-","outline","fullscreen"],z)});q=this.get("layout");var D=q.funct;q.funct=function(n,z){D.apply(this,arguments);n.addItem(mxResources.get("orgChart"),null,function(){var A=null,B=20,M=20,S=function(){"undefined"!==typeof mxOrgChartLayout&&null!=A&&c.tryAndHandle(mxUtils.bind(this,-function(){var T=c.editor.graph,W=new mxOrgChartLayout(T,A,B,M),X=T.getDefaultParent();1<T.model.getChildCount(T.getSelectionCell())&&(X=T.getSelectionCell());W.execute(X)}))},l=document.createElement("div"),x=document.createElement("div");x.style.marginTop="6px";x.style.display="inline-block";x.style.width="180px";mxUtils.write(x,mxResources.get("orgChartType")+": ");l.appendChild(x);var F=document.createElement("select");F.style.width="160px";F.style.boxSizing="border-box";x=[mxResources.get("linear"),-mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var N=0;N<x.length;N++){var O=document.createElement("option");mxUtils.write(O,x[N]);O.value=N;2==N&&O.setAttribute("selected","selected");F.appendChild(O)}mxEvent.addListener(F,"change",function(){A=F.value});l.appendChild(F);x=document.createElement("div");x.style.marginTop="6px";x.style.display=-"inline-block";x.style.width="180px";mxUtils.write(x,mxResources.get("parentChildSpacing")+": ");l.appendChild(x);var Q=document.createElement("input");Q.type="number";Q.value=B;Q.style.width="160px";Q.style.boxSizing="border-box";l.appendChild(Q);mxEvent.addListener(Q,"change",function(){B=Q.value});x=document.createElement("div");x.style.marginTop="6px";x.style.display="inline-block";x.style.width="180px";mxUtils.write(x,mxResources.get("siblingSpacing")+": ");l.appendChild(x);var V=document.createElement("input");-V.type="number";V.value=M;V.style.width="160px";V.style.boxSizing="border-box";l.appendChild(V);mxEvent.addListener(V,"change",function(){M=V.value});x=mxUtils.button(mxResources.get("custom")+"...",function(){var T=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(F.value),parentChildSpacing:parseInt(Q.value),siblingSpacing:parseInt(V.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(T,null,2))});x.className="geBtn";l=new CustomDialog(c,l,function(){null==A&&(A=2);c.loadOrgChartLayouts(S)},-null,null,null,x);c.showDialog(l.container,355,140,!0,!0)},z,null,p());n.addSeparator(z);n.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var A=new mxParallelEdgeLayout(k);A.checkOverlap=!0;c.prompt(mxResources.get("spacing"),A.spacing,mxUtils.bind(this,function(B){c.tryAndHandle(mxUtils.bind(this,function(){A.spacing=B;c.executeLayout(function(){A.execute(k.getDefaultParent(),k.isSelectionEmpty()?null:k.getSelectionCells())},!1)}))}))}))}),-z);n.addSeparator(z);c.menus.addMenuItem(n,"runLayout",z,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(n,z){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(n,["keyboardShortcuts","-","about"],z);else{var A=n.addItem("Search:",null,null,z,null,null,!1);A.style.cursor="default";var B=document.createElement("input");B.setAttribute("type","text");B.setAttribute("size","25");B.style.borderWidth="1px";B.style.marginLeft="8px";mxEvent.addListener(B,-"keydown",mxUtils.bind(this,function(M){var S=mxUtils.trim(B.value);13==M.keyCode&&0<S.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(S)),B.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:S}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==M.keyCode&&(B.value="")}));A.firstChild.nextSibling.appendChild(B);mxEvent.addGestureListeners(B,-function(M){document.activeElement!=B&&B.focus();mxEvent.consume(M)},function(M){mxEvent.consume(M)},function(M){mxEvent.consume(M)});window.setTimeout(function(){B.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.drawio.com")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),c.actions.put("desktopZoomIn",new Action(mxResources.get("zoomIn"),function(){c.desktopZoomIn()})),c.actions.put("desktopZoomOut",new Action(mxResources.get("zoomOut"),-function(){c.desktopZoomOut()})),c.actions.put("desktopResetZoom",new Action(mxResources.get("actualSize"),function(){c.desktopResetZoom()})),this.addMenuItems(n,"- keyboardShortcuts quickStart website support -".split(" "),z),"1"!=urlParams.disableUpdate&&this.addMenuItems(n,["check4Updates","-"],z),this.addMenuItems(n,"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),z)):this.addMenuItems(n,"- keyboardShortcuts quickStart support - about".split(" "),z)}"1"==urlParams.test&&-(n.addSeparator(z),this.addSubmenu("testDevelop",n,z))})));c.actions.addAction("languageCode...",function(){var n=new FilenameDialog(c,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(z){null!=z&&(Graph.diagramLanguage=0<z.length?z:null,Graph.translateDiagram=!0,k.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");c.showDialog(n.container,340,80,!0,!0);n.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(n,-z){this.addMenuItems(n,["languageCode","-"],z);z=n.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;k.refresh()},z);Graph.translateDiagram||n.addCheckmark(z,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");-mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!k.isSelectionEmpty()){var n=k.cloneCells(k.getSelectionCells()),z=k.getBoundingBoxFromGeometry(n,-!0);n=k.moveCells(n,-z.x,-z.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+z.width+", "+z.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(k.encodeCells(n)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function n(l){return null==l||null==l.boundingBox||!isNaN(l.boundingBox.x)&&!isNaN(l.boundingBox.y)&&!isNaN(l.boundingBox.width)&&!isNaN(l.boundingBox.height)}var z=k.getGraphBounds(),A=k.view.translate,B=k.view.scale;k.insertVertex(k.getDefaultParent(),-null,"",z.x/B-A.x,z.y/B-A.y,z.width/B,z.height/B,"fillColor=none;strokeColor=red;");var M=0,S=0;k.view.states.visit(function(l,x){l=!0;n(x.shape)||(console.log("invalid shape",x.cell.id,x.shape),l=!1);n(x.text)||(console.log("invalid text",x.cell.id,x.text),l=!1);l||M++;S++});console.log("states checked",S,"invalid",M)}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var n=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";n=new TextareaDialog(c,-"Paste Data:",n,function(z){if(0<z.length)try{var A=function(x){function F(aa){if(null==Z[aa]){if(Z[aa]=!0,null!=Q[aa]){for(;0<Q[aa].length;){var ea=Q[aa].pop();F(ea)}delete Q[aa]}}else mxLog.debug(N+": Visited: "+aa)}var N=x.parentNode.id,O=x.childNodes;x={};for(var Q={},V=null,T={},W=0;W<O.length;W++){var X=O[W];if(null!=X.id&&0<X.id.length)if(null==x[X.id]){x[X.id]=X.id;var Y=X.getAttribute("parent");null==Y?null!=V?mxLog.debug(N+": Multiple roots: "+X.id):V=X.id:(null==Q[Y]&&(Q[Y]=[]),Q[Y].push(X.id))}else T[X.id]=-X.id}O=Object.keys(T);0<O.length?(O=N+": "+O.length+" Duplicates: "+O.join(", "),mxLog.debug(O+" (see console)")):mxLog.debug(N+": Checked");var Z={};null==V?mxLog.debug(N+": No root"):(F(V),Object.keys(Z).length!=Object.keys(x).length&&(mxLog.debug(N+": Invalid tree: (see console)"),console.log(N+": Invalid tree",Q)))};"<"!=z.charAt(0)&&(z=Graph.decompress(z),mxLog.debug("See console for uncompressed XML"),console.log("xml",z));var B=mxUtils.parseXml(z),M=c.getPagesForNode(B.documentElement,"mxGraphModel");-if(null!=M&&0<M.length)try{var S=c.getHashValueForPages(M);mxLog.debug("Checksum: ",S)}catch(x){mxLog.debug("Error: ",x.message)}else mxLog.debug("No pages found for checksum");var l=B.getElementsByTagName("root");for(z=0;z<l.length;z++)A(l[z]);mxLog.show()}catch(x){c.handleError(x),null!=window.console&&console.error(x)}});c.showDialog(n.container,620,460,!0,!0);n.init()}));var L=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var n=new TextareaDialog(c,"Diff/Sync:",-"",function(z){var A=c.getCurrentFile();if(0<z.length&&null!=A)try{var B=JSON.parse(z);A.patch([B],null,!0,!0);c.hideDialog()}catch(M){c.handleError(M)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(z,A){L=c.getPagesForXml(c.getFileData(!0));n.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(L)}],["Diff",function(z,A){try{n.textarea.value=JSON.stringify(c.diffPages(L,c.pages),null,2)}catch(B){c.handleError(B)}}]]);null==L?-(L=c.getPagesForXml(c.getFileData(!0)),n.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(L)):n.textarea.value=JSON.stringify(c.diffPages(L,c.pages),null,2);c.showDialog(n.container,620,460,!0,!0);n.init()}else c.alert("No pages")}));c.actions.addAction("testChecksum",mxUtils.bind(this,function(){var n=c.getCurrentFile();null!=c.pages&&null!=n?c.spinner.spin(document.body,mxResources.get("loading"))&&n.getLatestVersion(function(z){c.spinner.stop();-var A=c.getHashValueForPages(c.pages),B=n.getCurrentRevisionId(),M=c.getHashValueForPages(z.getShadowPages()),S=z.getDescriptorChecksum(z.getDescriptor()),l=z.getCurrentRevisionId();console.log("Local File",[n],"modified",n.isModified(),"checksum",A);console.log("Remote File",[z],"rev",l==B,"desc",S==M,"checksum",M);c.alert("Checksums "+(M==A?"match":"no not match"))},function(z){console.log("Error getLatestVersion",z);c.handleError(z)}):console.log("Checksum: no file or pages")}));c.actions.addAction("testCheckPages",-mxUtils.bind(this,function(){var n=c.getCurrentFile();console.log("editorUi",c,"file",n);if(null!=n&&n.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(n.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(n.theirPages));console.log("diff ownPages/theirPages",c.diffPages(n.ownPages,n.theirPages));var z=n.getShadowPages();null!=z&&(console.log("Checksum shadowPages",c.getHashValueForPages(z)),console.log("diff shadowPages/ownPages",c.diffPages(z,n.ownPages)),console.log("diff ownPages/shadowPages",-c.diffPages(n.ownPages,z)),console.log("diff theirPages/shadowPages",c.diffPages(n.theirPages,z)));null!=n.sync&&null!=n.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(n.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(n.ownPages,n.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(n.theirPages,n.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(n.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",-c.diffPages(n.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(n.theirPages,c.pages)))}null!=n&&console.log("Shadow pages",[c.getXmlForPages(n.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var n=c.getCurrentFile();null!=n&&n.isRealtime()&&null!=n.shadowPages&&(console.log("patching actualPages to shadowPages",n.patch([c.diffPages(n.shadowPages,-c.pages)])),n.ownPages=c.clonePages(c.pages),n.theirPages=c.clonePages(c.pages),n.shadowPages=c.clonePages(c.pages),null!=n.sync&&(n.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){k.model.beginUpdate();try{var n=k.model.cells,z=0,A=[],B=[],M;for(M in n){var S=n[M],l=k.getCurrentCellStyle(S)[mxConstants.STYLE_IMAGE];null!=l&&"data:"==l.substring(0,5)&&(null==A[l]&&(A[l]=(A[l]||0)+1,z++),B.push(S))}k.setCellStyles(mxConstants.STYLE_IMAGE,null,-B);console.log("Removed",z,"image(s) from",B.length,"cell(s): ",[B,A])}finally{k.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,k.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var n=new mxImageExport,z=k.getGraphBounds(),A=k.view.scale,B=mxUtils.createXmlDocument(),M=B.createElement("output");B.appendChild(M);B=new mxXmlCanvas2D(M);B.translate(Math.floor((1-z.x)/A),Math.floor((1-z.y)/A));B.scale(1/A);var S=-0,l=B.save;B.save=function(){S++;l.apply(this,arguments)};var x=B.restore;B.restore=function(){S--;x.apply(this,arguments)};var F=n.drawShape;n.drawShape=function(N){mxLog.debug("entering shape",N,S);F.apply(this,arguments);mxLog.debug("leaving shape",N,S)};n.drawState(k.getView().getState(k.model.root),B);mxLog.show();mxLog.debug(mxUtils.getXml(M));mxLog.debug("stateCounter",S)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=-mxPopupMenu.prototype.zIndex-2});var G=null,d=null,g=null,m=null,t=null,v=null,y=null,C=null;c.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=G?(k.view.revalidate=G,G=null):(G=k.view.revalidate,k.view.revalidate=function(){var n=Date.now(),z=G.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-n+" ms","args",arguments);return z});null!=d?(c.selectPage=d,d=null):(d=c.selectPage,c.selectPage=function(){var n=Date.now(),z=d.apply(this,-arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-n+" ms","args",arguments);return z});null!=g?(c.diffPages=g,g=null):(g=c.diffPages,c.diffPages=function(){var n=Date.now(),z=g.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-n+" ms","args",arguments);return z});null!=m?(c.patchPages=m,m=null):(m=c.patchPages,c.patchPages=function(){var n=Date.now(),z=m.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",-[this],"time",Date.now()-n+" ms","args",arguments);return z});null!=t?(c.clonePages=t,t=null):(t=c.clonePages,c.clonePages=function(){var n=Date.now(),z=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-n+" ms","args",arguments);return z});null!=y?(c.getHashValueForPages=y,y=null):(y=c.getHashValueForPages,c.getHashValueForPages=function(){var n=Date.now(),z=y.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],-"time",Date.now()-n+" ms","args",arguments);return z});null!=C?(c.resolveCrossReferences=C,C=null):(C=c.resolveCrossReferences,c.resolveCrossReferences=function(){var n=Date.now(),z=C.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-n+" ms","args",arguments);return z});null!=v?(c.getFileData=v,v=null):(v=c.getFileData,c.getFileData=function(){var n=Date.now(),z=v.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",-[this],"time",Date.now()-n+" ms","args",arguments);return z});EditorUi.debug("[Performance]",null!=G?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(n,z){this.addMenuItems(n,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),z);var A=n.addItem(mxResources.get("testPerformance"),null,function(){c.actions.get("testPerformance").funct()},z);null!=G&&n.addCheckmark(A,-Editor.checkmarkImage);this.addMenuItems(n,["-","testShowConsole"],z)})))}c.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(n){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)}));c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(n){k.isEnabled()&&-(n=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),n.vertex=!0,n=new EditShapeDialog(c,n,mxResources.get("editShape")+":",630,400),c.showDialog(n.container,640,480,!0,!1),n.init())})).isEnabled=p;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(n){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",n,function(z,A,B,M,S,l,x,F,N,O,Q,V){c.createHtml(z,A,B,M,S,l,x,F,-N,O,Q,mxUtils.bind(this,function(T,W){var X=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+T+"\n"+W+"\n",null,null,function(){var Y=window.open(),Z=Y.document;if(null!=Z){"CSS1Compat"===document.compatMode&&Z.writeln("<!DOCTYPE html>");Z.writeln("<html>");Z.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Z.writeln("<body>");Z.writeln(T);var aa=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;aa&&Z.writeln(W);-Z.writeln("</body>");Z.writeln("</html>");Z.close();if(!aa){var ea=Y.document.createElement("div");ea.marginLeft="26px";ea.marginTop="26px";mxUtils.write(ea,mxResources.get("updatingDocument"));aa=Y.document.createElement("img");aa.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");aa.style.marginLeft="6px";ea.appendChild(aa);Y.document.body.insertBefore(ea,Y.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");-ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(W)[1];Z.body.appendChild(ca);ea.parentNode.removeChild(ea)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(X.container,450,240,!0,!0);X.init()}),V)})})}));c.actions.put("liveImage",new Action("Live image...",function(){var n=c.getCurrentFile();null!=n&&c.getPublicUrl(n,function(z){null!=z?(z=new EmbedDialog(c,'<img src="'+(n.constructor!=DriveFile?z:"https://drive.google.com/uc?id="+n.getId())+-'"/>'),c.showDialog(z.container,450,240,!0,!0),z.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(n,z,A,B,M,S){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(n,z,A,B,M,S,function(l){c.spinner.stop();l=new EmbedDialog(c,l);c.showDialog(l.container,450,240,!0,!0);l.init()},function(l){c.spinner.stop();c.handleError(l)})},mxResources.get("image"),-mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(n,z,A,B,M,S){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(n,z,A,B,M,S,function(l){c.spinner.stop();l=new EmbedDialog(c,l);c.showDialog(l.container,450,240,!0,!0);l.init()},function(l){c.spinner.stop();c.handleError(l)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));-c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(n){var z=k.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,z.height/k.view.scale))+2,null,null,null,n,c.getCurrentFile(),function(A,B,M,S,l,x,F,N,O,Q){var V=[];O&&V.push("tags=%7B%7D");A=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+F+";height:"+N+';" src="'+c.createLink(A,B,!0,S,l,x,"public"==Q?n:null,null,V,null,-M)+'"></iframe>');c.showDialog(A.container,450,240,!0,!0);A.init()},!0)})}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var n=document.createElement("div");n.style.position="absolute";n.style.bottom="30px";n.style.textAlign="center";n.style.width="100%";n.style.left="0px";var z=document.createElement("a");z.setAttribute("href","javascript:void(0);");z.setAttribute("target","_blank");z.style.cursor="pointer";mxUtils.write(z,mxResources.get("getNotionChromeExtension"));-n.appendChild(z);mxUtils.setPrefixedStyle(z.style,"transition","all 1s ease");mxUtils.setOpacity(z,0);window.setTimeout(function(){mxUtils.setOpacity(z,100)},300);mxEvent.addListener(z,"click",function(A){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(A)});c.getPublicUrl(c.getCurrentFile(),function(A){c.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",n,A,c.getCurrentFile(),-function(B,M,S,l,x,F,N,O,Q,V){N=["border=0"];Q&&N.push("tags=%7B%7D");B=new EmbedDialog(c,c.createLink(B,M,!0,l,x,F,"public"==V?A:null,null,N,null,S));c.showDialog(B.container,450,240,!0,!0);B.init()})})}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(n){c.showPublishLinkDialog(null,null,null,null,null,null,n,c.getCurrentFile(),function(z,A,B,M,S,l,x,F,N,O){x=[];M&&N&&x.push("tags=%7B%7D");z=new EmbedDialog(c,c.createLink(z,-A,!0,M,S,l,"public"==O?n:null,null,x,null,B));c.showDialog(z.container,450,240,!0,!0);z.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",-function(){c.getPublicUrl(c.getCurrentFile(),function(n){n=new GoogleSitesDialog(c,n);c.showDialog(n.container,420,256,!0,!0);n.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)q=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),q.setToggleAction(!0),q.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&-(q=c.actions.addAction("highContrast",function(){c.setAndPersistHighContrast(!c.isHighContrast())}),q.setToggleAction(!0),q.setSelectedCallback(function(){return c.isHighContrast()}));q=c.actions.addAction("search",function(){if(null!=c.sidebar){var n=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!n);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!n,mxSettings.save())}});q.label=mxResources.get("searchShapes");q.setToggleAction(!0);q.setSelectedCallback(function(){return null!=-c.sidebar&&c.sidebar.isEntryVisible("search")});c.actions.get("clearDefaultStyle").funct=function(n){k.isEnabled()&&(c.clearDefaultStyle(),Editor.sketchMode&&c.setSketchMode(!1))};"1"==urlParams.embed&&(c.actions.get("saveAs").setEnabled(!1),c.actions.get("save").funct=function(n){k.isEditing()&&k.stopEditing();var z="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var A=c.createLoadMessage("save");A.xml=z;!0!==-n||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(A.exit=!0);z=JSON.stringify(A)}(window.opener||window.parent).postMessage(z,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));n=c.getCurrentFile();null==n||n.constructor==EmbedFile||n.constructor==LocalFile&&null==n.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+-"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var n=function(){c.editor.modified=!1;var z="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(z,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges")):-n()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(n,z){c.isExportToCanvas()?(this.addMenuItems(n,["exportPng"],z),c.jpgSupported&&this.addMenuItems(n,["exportJpg"],z),c.webpSupported&&this.addMenuItems(n,["exportWebp"],z)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["exportPng","exportJpg"],z);this.addMenuItems(n,["exportSvg","-"],z);c.isOffline()||c.printPdfExport?this.addMenuItems(n,["exportPdf"],z):-c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["exportPdf"],z);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(n,["exportVsdx"],z);this.addMenuItems(n,["-","exportHtml","exportXml","exportUrl"],z);c.isOffline()||(n.addSeparator(z),this.addMenuItem(n,"export",z).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||this.addMenuItems(n,["publishLink"],-z);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(n.addSeparator(z),c.menus.addSubmenu("embed",n,z))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(n,z){function A(S){S.pickFile(function(l){c.spinner.spin(document.body,mxResources.get("loading"))&&S.getFile(l,function(x){var F="data:image/"==x.getData().substring(0,11)?M(x.getTitle()):"text/xml";/\.svg$/i.test(x.getTitle())&&!c.editor.isDataSvg(x.getData())&&-(x.setData(Editor.createSvgDataUri(x.getData())),F="image/svg+xml");B(x.getData(),F,x.getTitle())},function(x){c.handleError(x,null!=x?mxResources.get("errorLoadingFile"):null)},S==c.drive)},!0)}var B=mxUtils.bind(this,function(S,l,x){var F=k.view,N=k.getGraphBounds(),O=k.snap(Math.ceil(Math.max(0,N.x/F.scale-F.translate.x)+4*k.gridSize)),Q=k.snap(Math.ceil(Math.max(0,(N.y+N.height)/F.scale-F.translate.y)+4*k.gridSize));"data:image/"==S.substring(0,11)?c.loadImage(S,mxUtils.bind(this,function(V){var T=-!0,W=mxUtils.bind(this,function(){c.resizeImage(V,S,mxUtils.bind(this,function(X,Y,Z){X=T?Math.min(1,Math.min(c.maxImageSize/Y,c.maxImageSize/Z)):1;c.importFile(S,l,O,Q,Math.round(Y*X),Math.round(Z*X),x,function(aa){c.spinner.stop();k.setSelectionCells(aa);k.scrollCellToVisible(k.getSelectionCell())})}),T)});S.length>c.resampleThreshold?c.confirmImageResize(function(X){T=X;W()}):W()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(S,l,O,Q,0,-0,x,function(V){c.spinner.stop();k.setSelectionCells(V);k.scrollCellToVisible(k.getSelectionCell())})}),M=mxUtils.bind(this,function(S){var l="text/xml";/\.png$/i.test(S)?l="image/png":/\.jpe?g$/i.test(S)?l="image/jpg":/\.gif$/i.test(S)?l="image/gif":/\.pdf$/i.test(S)&&(l="application/pdf");return l});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){A(c.drive)},z):c.isModeEnabled(App.MODE_GOOGLE)&&n.addItem(mxResources.get("googleDrive")+-" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?n.addItem(mxResources.get("oneDrive")+"...",null,function(){A(c.oneDrive)},z):c.isModeEnabled(App.MODE_ONEDRIVE)&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_DROPBOX)?n.addItem(mxResources.get("dropbox")+"...",null,function(){A(c.dropbox)},z):c.isModeEnabled(App.MODE_DROPBOX)&&n.addItem(mxResources.get("dropbox")+-" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);n.addSeparator(z);c.isModeReady(App.MODE_GITHUB)&&n.addItem(mxResources.get("github")+"...",null,function(){A(c.gitHub)},z);c.isModeReady(App.MODE_GITLAB)&&n.addItem(mxResources.get("gitlab")+"...",null,function(){A(c.gitLab)},z);c.isModeReady(App.MODE_TRELLO)?n.addItem(mxResources.get("trello")+"...",null,function(){A(c.trello)},z):c.isModeEnabled(App.MODE_TRELLO)&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+-"...)",null,function(){},z,null,!1);n.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},z);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},z);c.isOffline()||(n.addSeparator(z),n.addItem(mxResources.get("url")+"...",null,function(){var S=new FilenameDialog(c,"",mxResources.get("import"),function(l){if(null!=l&&0<l.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var x=-/(\.png)($|\?)/i.test(l)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(l),function(F){B(F,x,l)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==x)}},mxResources.get("url"));c.showDialog(S.container,300,80,!0,!0);S.init()},z))}))).isEnabled=p;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(n,z){var A=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&-(750>A&&this.addSubmenu("viewZoom",n,z,mxResources.get("zoom")),460>A&&c.isPageMenuVisible()&&this.addSubmenu("pages",n,z),320>A&&this.addSubmenu("insert",n,z),360>A&&"1"!=urlParams.embed&&"draw.io"==c.getServiceName()&&this.addSubmenu("share",n,z));this.addMenuItems(n,["-","lightMode","darkMode"],z);c.isAutoDarkModeSupported()&&(A=c.menus.addMenuItem(n,"autoMode",z),null!=A&&A.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")"));"1"!=urlParams.embed&&-this.addMenuItems(n,["-","toggleSimpleMode"],z)})));this.put("appearance",new Menu(mxUtils.bind(this,function(n,z){this.addMenuItems(n,["-","lightMode","darkMode"],z);if(c.isAutoDarkModeSupported()){var A=c.menus.addMenuItem(n,"autoMode",z);null!=A&&A.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}n.addSeparator(z);A=c.menus.addMenuItem(n,"highContrast",z);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(A,-"https://github.com/jgraph/drawio/issues/4296")})));c.actions.addAction("addToScratchpad",function(n){k.isSelectionEmpty()||null==c.addSelectionToScratchpad||c.addSelectionToScratchpad(n)});c.actions.addAction("accounts...",function(){c.toggleUserPanel();c.userPanel.style.right="10px";c.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(n,z){var A="1"==urlParams.sketch?"sketch":mxSettings.getUi(),B=n.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},-z),M=n.addItem(mxResources.get("classic"),null,function(){c.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy")},z),S=!1;if("kennedy"==A||"dark"==A)n.addCheckmark(M,Editor.checkmarkImage),S=!0;for(var l=0;l<Editor.themes.length;l++)mxUtils.bind(this,function(x){M=n.addItem(mxResources.get("min"==x?"minimal":x),null,function(){c.setCurrentTheme(x)},z);A==x&&(n.addCheckmark(M,Editor.checkmarkImage),S=!0)})(Editor.themes[l]);S||n.addCheckmark(B,Editor.checkmarkImage)})));q=this.editorUi.actions.addAction("rename...",-mxUtils.bind(this,function(){var n=this.editorUi.getCurrentFile();if(null!=n)if(n.constructor==LocalFile&&null!=n.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(A,B){n.invalidFileHandle=null;n.fileHandle=A;n.title=B.name;n.desc=B;c.save(B.name)}),null,c.createFileSystemOptions(n.getTitle()));else{var z=null!=n.getTitle()?n.getTitle():this.editorUi.defaultFilename;z=new FilenameDialog(this.editorUi,z,mxResources.get("rename"),mxUtils.bind(this,function(A){null!=A&&0<A.length&&null!=n&&A!=-n.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&n.rename(A,mxUtils.bind(this,function(B){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(B){this.editorUi.handleError(B,null!=B?mxResources.get("errorRenamingFile"):null)}))}),n.constructor==DriveFile||n.constructor==StorageFile?mxResources.get("diagramName"):null,function(A){if(null!=A&&0<A.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},-null,FilenameDialog.filenameHelpLink,null,null,c.editor.fileExtensions);this.editorUi.showDialog(z.container,340,96,!0,!0);z.init()}}));q.isEnabled=function(){return this.enabled&&p.apply(this,arguments)};q.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var n=c.getCurrentFile();if(null!=n){var z=c.getCopyFilename(n);n.constructor==DriveFile?(z=new CreateDialog(c,z,mxUtils.bind(this,function(A,B){"_blank"==B?c.editor.editAsNew(c.getFileData(),A):("download"==-B&&(B=App.MODE_GOOGLE),null!=A&&0<A.length&&(B==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&n.saveAs(A,mxUtils.bind(this,function(M){n.desc=M;n.save(!1,mxUtils.bind(this,function(){c.spinner.stop();n.setModified(!1);n.addAllSavedStatus()}),mxUtils.bind(this,function(S){c.handleError(S)}))}),mxUtils.bind(this,function(M){c.handleError(M)})):c.createFile(A,c.getFileData(!0),null,B)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),-null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(z.container,420,380,!0,!0),z.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),z)}}));c.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(n,z){n=c.getCurrentFile();null!=n&&c.openLink(n.getFolderUrl())}));c.actions.addAction("openFile...",mxUtils.bind(this,function(){var n=c.getCurrentFile();null!=n&&c.openLink(n.getFileUrl())}));c.actions.addAction("moveToFolder...",-mxUtils.bind(this,function(){var n=c.getCurrentFile();if(n.getMode()==App.MODE_GOOGLE||n.getMode()==App.MODE_ONEDRIVE){var z=!1;if(n.getMode()==App.MODE_GOOGLE&&null!=n.desc.parents)for(var A=0;A<n.desc.parents.length;A++)if(n.desc.parents[A].isRoot){z=!0;break}c.pickFolder(n.getMode(),mxUtils.bind(this,function(B){c.spinner.spin(document.body,mxResources.get("moving"))&&n.move(B,mxUtils.bind(this,function(M){c.spinner.stop()}),mxUtils.bind(this,function(M){c.handleError(M)}))}),null,!0,z)}}));this.put("publish",-new Menu(mxUtils.bind(this,function(n,z){this.addMenuItems(n,["publishLink"],z)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var n=c.getCurrentFile();null!=n&&n.share()}catch(z){c.handleError(z)}})).isEnabled=p;this.put("embed",new Menu(mxUtils.bind(this,function(n,z){var A=c.getCurrentFile();null==A||A.getMode()!=App.MODE_GOOGLE&&A.getMode()!=-App.MODE_GITHUB||!/(\.png)$/i.test(A.getTitle())||this.addMenuItems(n,["liveImage","-"],z);this.addMenuItems(n,["embedImage","embedSvg","-","embedHtml"],z);navigator.standalone||c.isOffline()||this.addMenuItems(n,["embedIframe"],z);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(n,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),z)})));c.addInsertItem=function(n,z,A,B){("plantUml"!=B||EditorUi.enablePlantUml&&!c.isOffline())&&n.addItem(A,null,mxUtils.bind(this,-function(){if("fromText"==B||"formatSql"==B||"plantUml"==B||"mermaid"==B){var M=new ParseDialog(c,A,B);c.showDialog(M.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else M=new CreateGraphDialog(c,A,B),c.showDialog(M.container,620,420,!0,!1,function(S,l){if(l)return c.confirm(mxResources.get("areYouSure"),function(){c.hideDialog()}),!1;null!=M.graph&&(null!=M.graph.container.parentNode&&M.graph.container.parentNode.removeChild(M.graph.container),M.graph.destroy(),M.graph=null)});-M.init()}),z,null,p())};var I=function(n){k.getModel().beginUpdate();try{n=k.addCell(n),k.fireEvent(new mxEventObject("cellsInserted","cells",[n])),k.model.isVertex(n)&&k.isAutoSizeCell(n)&&k.updateCellSize(n)}finally{k.getModel().endUpdate()}k.scrollCellToVisible(n);k.setSelectionCell(n);k.container.focus();k.editAfterInsert&&k.startEditing(n);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(k.view.getState(n))},0);return n},K=function(n,z,A,B,M){n=new mxCell(n,new mxGeometry(0,-0,z,A),B);n.vertex=!0;null==M&&(M=k.getCenterInsertPoint(k.getBoundingBoxFromGeometry([n],!0)));n.geometry.x=M.x;n.geometry.y=M.y;return I(n)};c.actions.put("insertText",new Action(mxResources.get("text"),function(n){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&k.startEditingAtCell(K("Text",60,30,k.appendFontSize("text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",k.vertexFontSize),null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||-!k.isMouseInsertPoint()?null:k.getInsertPoint()))},null,null,"A")).isEnabled=p;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(n){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&K("",120,60,"whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!k.isMouseInsertPoint()?null:k.getInsertPoint())},null,null,"D")).isEnabled=p;c.actions.put("insertNote",new Action(mxResources.get("note"),function(n){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&-K("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!k.isMouseInsertPoint()?null:k.getInsertPoint())},null,null,"S")).isEnabled=p;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(n){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&-K("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!k.isMouseInsertPoint()?null:k.getInsertPoint())},null,null,"F")).isEnabled=p;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(n){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&K("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!k.isMouseInsertPoint()?null:k.getInsertPoint())},null,null,"R")).isEnabled=p;c.actions.put("insertEdge",-new Action(mxResources.get("line"),function(n){if(k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())){var z=k.defaultEdgeLength;n=null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!k.isMouseInsertPoint()?null:k.getInsertPoint();null==n&&(n=k.getCenterInsertPoint(k.getBoundingBoxFromGeometry([A],!0)));var A=new mxCell("",new mxGeometry(0,0,z,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");A.geometry.setTerminalPoint(n,!0);A.geometry.setTerminalPoint(new mxPoint(n.x+A.geometry.width,-n.y),!1);A.geometry.points=[];A.geometry.relative=!0;A.edge=!0;I(A)}},null,null,"C")).isEnabled=p;q=c.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=c.sidebarWindow?c.sidebarWindow.window.setVisible(!c.sidebarWindow.window.isVisible()):c.toggleShapesPanel(!c.isShapesPanelVisible())},null,null,Editor.ctrlKey+"+Shift+K"));q.setToggleAction(!0);q.setSelectedCallback(mxUtils.bind(this,function(){return null!=c.sidebarWindow&&c.sidebarWindow.window.isVisible()||null==-c.sidebarWindow&&0<c.hsplitPosition}));c.addInsertMenuItems=mxUtils.bind(this,function(n,z,A){for(var B=0;B<A.length;B++)"-"==A[B]?n.addSeparator(z):c.addInsertItem(n,z,mxResources.get(A[B])+"...",A[B])});this.put("insert",new Menu(mxUtils.bind(this,function(n,z){"sketch"==Editor.currentTheme?(c.menus.addMenuItems(n,["toggleShapes"],z),c.menus.addSubmenu("table",n,z),n.addSeparator(z),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(n,["insertTemplate"],z),c.menus.addMenuItems(n,["insertImage",-"insertLink","-"],z),c.menus.addSubmenu("insertAdvanced",n,z,mxResources.get("advanced")),c.menus.addSubmenu("layout",n,z)):(this.addMenuItems(n,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),z),c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(n,["insertTemplate"],z),n.addSeparator(z),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("layout",n,z),this.addSubmenu("insertLayout",-n,z,mxResources.get("insert")),n.addSeparator(z),this.addSubmenu("table",n,z)):this.addSubmenu("insertLayout",n,z,mxResources.get("layout")),this.addSubmenu("insertAdvanced",n,z,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,function(n,z){c.menus.addInsertTableCellItem(n,z)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(n,z){c.addInsertMenuItems(n,z,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));-this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(n,z){var A=["fromText","plantUml"].concat(window.isMermaidEnabled?["mermaid"]:[]).concat(["-","formatSql"]);c.addInsertMenuItems(n,z,A);n.addItem(mxResources.get("csv")+"...",null,function(){k.popupMenuHandler.hideMenu();c.showImportCsvDialog()},z,null,p());"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(n,["-","createShape","editDiagram"],z)})));this.put("openRecent",new Menu(function(n,z){var A=c.getRecent();-if(null!=A){for(var B=0;B<A.length;B++)(function(M){var S=M.mode;S==App.MODE_GOOGLE?S="googleDrive":S==App.MODE_ONEDRIVE&&(S="oneDrive");n.addItem(M.title+" ("+mxResources.get(S)+")",null,function(){c.loadFile(M.id)},z)})(A[B]);n.addSeparator(z)}n.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},z)}));this.put("openFrom",new Menu(function(n,z){null!=c.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},z):c.isModeEnabled(App.MODE_GOOGLE)&&-n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_ONEDRIVE)?n.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},z):c.isModeEnabled(App.MODE_ONEDRIVE)&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_DROPBOX)?n.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},z):-c.isModeEnabled(App.MODE_DROPBOX)&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);n.addSeparator(z);c.isModeReady(App.MODE_GITHUB)&&n.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},z);c.isModeReady(App.MODE_GITLAB)&&n.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},z);c.isModeReady(App.MODE_TRELLO)?n.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},-z):c.isModeEnabled(App.MODE_TRELLO)&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);n.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},z);c.isOffline()||(n.addSeparator(z),n.addItem(mxResources.get("url")+"...",null,function(){var A=-new FilenameDialog(c,"",mxResources.get("open"),function(B){null!=B&&0<B.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(B):window.geOpenWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(B)))},mxResources.get("url"));c.showDialog(A.container,300,80,!0,!0);A.init()},z))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(n,z){"undefined"!=typeof google&&"undefined"!=-typeof google.picker&&(null!=c.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},z):c.isModeEnabled(App.MODE_GOOGLE)&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?n.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},z):c.isModeEnabled(App.MODE_ONEDRIVE)&&n.addItem(mxResources.get("oneDrive")+-" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_DROPBOX)?n.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},z):c.isModeEnabled(App.MODE_DROPBOX)&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);n.addSeparator(z);c.isModeReady(App.MODE_GITHUB)&&n.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,-null,App.MODE_GITHUB)},z);c.isModeReady(App.MODE_GITLAB)&&n.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},z);c.isModeReady(App.MODE_TRELLO)?n.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},z):c.isModeEnabled(App.MODE_TRELLO)&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);n.addSeparator(z);isLocalStorage&&"0"!=-urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},z);"1"==urlParams.confLib&&n.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showLibraryDialog(null,null,null,null,"CONF_LIB")},z)})),this.put("openLibraryFrom",new Menu(function(n,z){"undefined"!=typeof google&&-"undefined"!=typeof google.picker&&(null!=c.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},z):c.isModeEnabled(App.MODE_GOOGLE)&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?n.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},z):c.isModeEnabled(App.MODE_ONEDRIVE)&&n.addItem(mxResources.get("oneDrive")+" ("+-mxResources.get("loading")+"...)",null,function(){},z,null,!1);c.isModeReady(App.MODE_DROPBOX)?n.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},z):c.isModeEnabled(App.MODE_DROPBOX)&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);n.addSeparator(z);c.isModeReady(App.MODE_GITHUB)&&n.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},z);c.isModeReady(App.MODE_GITLAB)&&-n.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},z);c.isModeReady(App.MODE_TRELLO)?n.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},z):c.isModeEnabled(App.MODE_TRELLO)&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);n.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},-z);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},z);c.isOffline()||(n.addSeparator(z),n.addItem(mxResources.get("url")+"...",null,function(){var A=new FilenameDialog(c,"",mxResources.get("open"),function(B){if(null!=B&&0<B.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var M=B;c.editor.isCorsEnabledForUrl(B)||(M=PROXY_URL+"?url="+encodeURIComponent(B));mxUtils.get(M,function(S){if(200<=S.getStatus()&&299>=S.getStatus()){c.spinner.stop();-try{c.loadLibrary(new UrlLibrary(c,S.getText(),B)),c.showSidebar()}catch(l){c.handleError(l,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));c.showDialog(A.container,300,80,!0,!0);A.init()},z));"1"==urlParams.confLib&&(n.addSeparator(z),n.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},-z))})));this.put("edit",new Menu(mxUtils.bind(this,function(n,z){this.addMenuItems(n,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));q=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",-function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var n=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(n);this.commentsWindow.refreshCommentsTime();n&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));q.setToggleAction(!0);q.setSelectedCallback(mxUtils.bind(this,-function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(n,z){var A=c.getCurrentFile();c.menus.addMenuItems(n,"toggleShapes format ruler - findReplace layers tags chatWindowTitle outline -".split(" "),z);c.commentsSupported()&&c.menus.addMenuItems(n,["comments"],z);null!=A&&A.isRealtimeEnabled()&&-A.isRealtimeSupported()&&c.menus.addMenuItems(n,["showRemoteCursors"],z);c.menus.addMenuItems(n,["-","fullscreen"],z)};this.put("view",new Menu(mxUtils.bind(this,function(n,z){if("simple"==Editor.currentTheme){var A=c.getCurrentFile();c.menus.addMenuItems(n,["toggleShapes","format"],z);c.isPageMenuVisible()&&c.menus.addMenuItems(n,["pageTabs"],z);c.menus.addMenuItems(n,["ruler","-","search"],z);if(isLocalStorage||mxClient.IS_CHROMEAPP){var B=c.menus.addMenuItem(n,"scratchpad",z);(!c.isOffline()||-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(B,"https://www.drawio.com/doc/faq/scratchpad")}c.menus.addMenuItems(n,"- findReplace layers tags chatWindowTitle outline -".split(" "),z);c.commentsSupported()&&c.menus.addMenuItems(n,["comments"],z);null!=A&&A.isRealtimeEnabled()&&A.isRealtimeSupported()&&this.addMenuItems(n,["showRemoteCursors"],z);this.addMenuItems(n,["-","fullscreen"],z)}else{this.addMenuItems(n,["format","outline","layers","tags","chatWindowTitle"].concat(c.commentsSupported()?-["comments","-"]:["-"]));this.addMenuItems(n,["-","search"],z);if(isLocalStorage||mxClient.IS_CHROMEAPP)B=this.addMenuItem(n,"scratchpad",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.drawio.com/doc/faq/scratchpad");this.addMenuItems(n,["toggleShapes","-","pageView","pageScale"]);this.addSubmenu("units",n,z);n.addSeparator(z);c.isPageMenuVisible()&&c.menus.addMenuItems(n,["pageTabs"],z);this.addMenuItems(n,"ruler - tooltips animations - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),-z);"1"!=urlParams.sketch&&this.addMenuItems(n,["-","fullscreen"],z)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(n,z){this.addMenuItems(n,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),z)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(n,z){var A=c.currentPage;null!=A&&(n.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){c.renamePage(A,A.getName())}),-z),n.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){c.removePage(A)}),z),1<c.pages.length&&(c.menus.addSubmenu("movePage",n,z,mxResources.get("move")),n.addSeparator(z)),n.addSeparator(z),n.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){c.duplicatePage(A,mxResources.get("copyOf",[A.getName()]))}),z),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||n.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,-function(){c.editor.editAsNew(c.getFileData(!0,null,null,null,!0,!0))}),z)))})));this.put("pages",new Menu(mxUtils.bind(this,function(n,z){var A=c.currentPage;c.editor.graph.isLightboxView()||(n.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{c.insertPage()}catch(M){c.handleError(M)}}),z,null,c.editor.graph.isEnabled()),n.addSeparator(z));if(null!=c.pages)for(var B=0;B<c.pages.length;B++)mxUtils.bind(this,function(M){var S=null;S=c.pages[M]!=A||c.editor.graph.isLightboxView()?-n.addItem(c.getShortPageName(c.pages[M]),null,mxUtils.bind(this,function(){c.selectPage(c.pages[M])}),z):c.menus.addSubmenu("currentPage",n,z,c.getShortPageName(A));var l=c.pages[M].getId();S.setAttribute("title",c.pages[M].getName()+" ("+(M+1)+"/"+c.pages.length+")"+(null!=l?" ["+l+"]":""));c.pages[M]==A&&n.addCheckmark(S,Editor.checkmarkImage)})(B)})));if(EditorUi.isElectronApp){var J="1"==urlParams.enableSpellCheck;q=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();J=!J;c.alert(mxResources.get("restartForChangeRequired"))});-q.setToggleAction(!0);q.setSelectedCallback(function(){return J});var U="1"==urlParams.enableStoreBkp;q=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();U=!U});q.setToggleAction(!0);q.setSelectedCallback(function(){return U});var P="1"==urlParams.isGoogleFontsEnabled;q=c.actions.addAction("googleFonts",function(){c.toggleGoogleFonts();P=!P;c.alert(mxResources.get("restartForChangeRequired"))});q.setToggleAction(!0);q.setSelectedCallback(function(){return P});c.actions.addAction("openDevTools",-function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var n=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(z){z=parseInt(z);0<=z&&(EditorUi.draftSaveDelay=1E3*z,EditorUi.enableDrafts=0<z,mxSettings.setDraftSaveDelay(z),mxSettings.save())}),mxResources.get("draftSaveInt"));c.showDialog(n.container,320,80,!0,!0);n.init()})}var R=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(n,z){if("simple"==Editor.currentTheme||-"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||c.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",n,z);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",n,z);n.addSeparator(z);null==R||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",n,z);c.menus.addSubmenu("units",-n,z);c.menus.addMenuItems(n,"- copyConnect collapseExpand - tooltips animations -".split(" "),z);var A=c.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=A&&A.isRealtimeEnabled()&&A.isRealtimeSupported()&&this.addMenuItems(n,["showRemoteCursors"],z),c.menus.addMenuItems(n,["ruler","-"],z));EditorUi.isElectronApp&&c.menus.addMenuItems(n,"- googleFonts spellCheck autoBkp drafts -".split(" "),z);this.addSubmenu("diagramLanguage",n,z);n.addSeparator(z);c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(n,-"configuration",z);n.addSeparator(z)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",n,z),"1"==urlParams.embed&&"1"!=urlParams.atlas||"atlas"==Editor.currentTheme||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",n,z),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",n,z),n.addSeparator(z),A=this.addSubmenu("adaptiveColors",n,z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&-c.menus.addLinkToItem(A,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(A=this.addMenuItem(n,"mathematicalTypesetting",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(A,"https://www.drawio.com/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(n,["googleFonts","spellCheck","autoBkp","drafts","-"],z),this.addMenuItems(n,["copyConnect","collapseExpand","-"],z),"1"!=urlParams.embed&&(A=c.getCurrentFile(),null!=-A&&A.isRealtimeEnabled()&&A.isRealtimeSupported()&&this.addMenuItems(n,["showRemoteCursors","shareCursor"],z),this.addMenuItems(n,["autosave"],z)),n.addSeparator(z),!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(n,"plugins",z),n.addSeparator(z),this.addSubmenu("diagramLanguage",n,z),this.addMenuItem(n,"editDiagram",z),n.addSeparator(z),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(n,["showStartScreen"],z),this.addMenuItems(n,["configuration"],z)})));this.put("movePage",-new Menu(mxUtils.bind(this,function(n,z){var A=c.currentPage,B=c.getPageIndex(A);if(null!=c.pages)for(var M=0;M<c.pages.length;M++)M!=B&&function(S){n.addItem(c.getShortPageName(c.pages[S]),null,function(){c.movePage(B,S);c.scrollToPage(A,!0)},z)}(M)})));this.put("share",new Menu(mxUtils.bind(this,function(n,z){if(!c.isStandaloneApp()){var A=c.isOffline(!0)?mxResources.get("offline"):c.getNetworkStatus();null!=A&&(n.addItem(A,null,null,z,null,!1),n.addSeparator(z));c.menus.addMenuItems(n,["share"],-z)}this.addMenuItem(n,"publishLink",z,null,null,mxResources.get("publish")+"...");null!=c.getMainUser()&&this.addMenuItems(n,["accounts"],z)})));this.put("diagram",new Menu(mxUtils.bind(this,function(n,z){var A=c.getCurrentFile();"simple"!=Editor.currentTheme&&(c.menus.addSubmenu("extras",n,z,mxResources.get("settings")),n.addSeparator(z));var B="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)c.menus.addMenuItems(n,"new open - synchronize properties - save saveAs -".split(" "),-z);else if(c.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(n,["-","save"],z);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||c.mode==App.MODE_ATLAS)c.menus.addMenuItems(n,["saveAndExit"],z),null!=A&&A.isRevisionHistorySupported()&&c.menus.addMenuItems(n,["revisionHistory"],z);n.addSeparator(z)}else c.mode==App.MODE_ATLAS?c.menus.addMenuItems(n,["save","synchronize","-"],z):"1"!=urlParams.noFileMenu&&(c.menus.addSubmenu("file",-n,z),n.addSeparator(z),"min"==Editor.currentTheme&&(c.menus.addMenuItems(n,"toggleShapes format layers tags chatWindowTitle - findReplace".split(" "),z),c.commentsSupported()&&c.menus.addMenuItems(n,["comments"],z),n.addSeparator(z)));c.menus.addSubmenu("exportAs",n,z);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"atlassian"==c.getServiceName()?c.menus.addMenuItems(n,["import"],z):"1"!=urlParams.noFileMenu&&c.menus.addSubmenu("importFrom",n,z);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?-(c.menus.addMenuItems(n,["-","findReplace"],z),c.commentsSupported()&&c.menus.addMenuItems(n,["comments","-"],z),c.menus.addMenuItems(n,"toggleShapes format layers tags chatWindowTitle -".split(" "),z),c.menus.addMenuItems(n,["pageSetup"],z)):"min"!=Editor.currentTheme&&(this.addMenuItems(n,["-"],z),this.addSubmenu("newLibrary",n,z),this.addSubmenu("openLibraryFrom",n,z));n.addSeparator(z);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(n,["print"],z);B||"min"==-Editor.currentTheme||null==A||null==c.fileNode||"1"==urlParams.embedInline||(B=null!=A.getTitle()?A.getTitle():c.defaultFilename,/(\.html)$/i.test(B)||this.addMenuItems(n,["-","properties"]));n.addSeparator(z);"simple"==Editor.currentTheme&&(c.menus.addSubmenu("extras",n,z,mxResources.get("settings")),n.addSeparator(z));c.menus.addSubmenu("help",n,z);n.addSeparator(z);"1"==urlParams.embed&&("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(n,["save"],z),"1"==urlParams.saveAndExit||-"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(c.menus.addMenuItems(n,["saveAndExit"],z),null!=A&&A.isRevisionHistorySupported()&&c.menus.addMenuItems(n,["revisionHistory"],z));"1"!=urlParams.embed&&c.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&c.mode!=App.MODE_ATLAS||c.menus.addMenuItems(n,["exit"],z);"1"!=urlParams.embed&&null!=A&&"undefined"==typeof AtlasFile&&c.menus.addMenuItems(n,["-","close"],z)})));this.put("save",new Menu(mxUtils.bind(this,function(n,z){var A=c.getCurrentFile();-null==A||A.constructor!=DriveFile&&A.constructor!=OneDriveFile?(c.menus.addMenuItems(n,["save","saveAs","-","rename"],z),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],z):c.menus.addMenuItems(n,["makeCopy"],z)):c.menus.addMenuItems(n,["save","makeCopy","-","rename","moveToFolder"],z);c.menus.addMenuItems(n,["-","autosave"],z);null!=A&&A.isRevisionHistorySupported()&&c.menus.addMenuItems(n,["-","revisionHistory"],z)})));this.put("file",-new Menu(mxUtils.bind(this,function(n,z){var A="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",n,z),this.addSubmenu("exportAs",n,z),this.addSubmenu("embed",n,z),"1"==urlParams.libraries&&(this.addMenuItems(n,["-"],z),this.addSubmenu("newLibrary",n,z),this.addSubmenu("openLibraryFrom",n,z)),c.isRevisionHistorySupported()&&this.addMenuItems(n,["-","revisionHistory"],z),this.addMenuItems(n,["-","pageSetup",-"print","-","rename"],z),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(n,["saveAndExit"],z):(this.addMenuItems(n,["save"],z),"1"==urlParams.saveAndExit&&this.addMenuItems(n,["saveAndExit"],z))),"1"!=urlParams.noExitBtn&&this.addMenuItems(n,["exit"],z);else if(A){A=c.getCurrentFile();c.menus.addMenuItems(n,["new"],z);c.menus.addSubmenu("openFrom",n,z);isLocalStorage&&this.addSubmenu("openRecent",n,z);n.addSeparator(z);c.menus.addMenuItems(n,["-",-"save"],z);null!=A&&A.constructor==DriveFile||c.menus.addMenuItems(n,["saveAs"],z);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==A||A.constructor==LocalFile&&null==A.fileHandle||c.menus.addMenuItems(n,["synchronize"],z);n.addSeparator(z);null!=A&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"sketch"!=Editor.currentTheme||this.addMenuItem(n,"publishLink",z,null,null,mxResources.get("publish")+"..."),"simple"==Editor.currentTheme||A.constructor!=DriveFile&&A.constructor!=GitHubFile&&A.constructor!=-OneDriveFile||c.menus.addMenuItems(n,["share"],z));n.addSeparator(z);null!=A&&A.isRenamable()&&this.addMenuItems(n,["rename"],z);c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],z):(c.menus.addMenuItems(n,["makeCopy"],z),null!=A&&(A.constructor!=OneDriveFile&&A.constructor!=DriveFile||c.menus.addMenuItems(n,["moveToFolder"],z),n.addSeparator(z),null!=A.getFolderUrl()&&c.menus.addMenuItems(n,["openFolder"],z),null!=A.getFileUrl()&&c.menus.addMenuItems(n,-["openFile"],z)));n.addSeparator(z);null!=A&&A.isRevisionHistorySupported()&&c.menus.addMenuItems(n,["revisionHistory"],z);if(null!=A&&null!=c.fileNode&&"1"!=urlParams.embedInline){var B=null!=A.getTitle()?A.getTitle():c.defaultFilename;(A.constructor==DriveFile&&null!=A.sync&&A.sync.isConnected()||!/(\.html)$/i.test(B))&&this.addMenuItems(n,["properties"],z)}"simple"==Editor.currentTheme&&c.menus.addMenuItems(n,["-","autosave"],z)}else A=this.editorUi.getCurrentFile(),null!=A&&A.constructor==DriveFile?-(A.isRestricted()&&this.addMenuItems(n,["exportOptionsDisabled"],z),this.addMenuItems(n,["save","-","share"],z),B=this.addMenuItem(n,"synchronize",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.drawio.com/doc/faq/synchronize"),n.addSeparator(z)):this.addMenuItems(n,["new"],z),this.addSubmenu("openFrom",n,z),isLocalStorage&&this.addSubmenu("openRecent",n,z),null!=A&&A.constructor==DriveFile?this.addMenuItems(n,"new - rename makeCopy openFolder moveToFolder".split(" "),-z):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==A||A.constructor==LocalFile&&null==A.fileHandle||(n.addSeparator(z),B=this.addMenuItem(n,"synchronize",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(n,["-","save","saveAs","-"],z),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==A||this.addMenuItems(n,["share","-"],z),null!=A&&A.isRenamable()&&-this.addMenuItems(n,["rename"],z),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],z):(this.addMenuItems(n,["makeCopy"],z),null!=A&&(A.constructor==OneDriveFile&&this.addMenuItems(n,["moveToFolder"],z),null!=A.getFolderUrl()&&c.menus.addMenuItems(n,["openFolder"],z)))),n.addSeparator(z),this.addSubmenu("importFrom",n,z),this.addSubmenu("exportAs",n,z),n.addSeparator(z),this.addSubmenu("embed",n,z),this.addSubmenu("publish",n,z),n.addSeparator(z),-this.addSubmenu("newLibrary",n,z),this.addSubmenu("openLibraryFrom",n,z),c.isRevisionHistorySupported()&&this.addMenuItems(n,["-","revisionHistory"],z),null!=A&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(B=null!=A.getTitle()?A.getTitle():c.defaultFilename,(A.constructor==DriveFile&&null!=A.sync&&A.sync.isConnected()||!/(\.html)$/i.test(B))&&this.addMenuItems(n,["-","properties"])),this.addMenuItems(n,["-","pageSetup"],z),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["print"],z),-this.addMenuItems(n,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(n,z){function A(O){var Q=encodeURIComponent(O.name)+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!M[Q]){for(var V=O.name,T=0;null!=F[V.toLowerCase()];)V=O.name+" ("+ ++T+")";null==x[Q]&&(N.push({name:O.name,url:O.url,label:V,title:O.url}),F[V.toLowerCase()]=O,x[Q]=O)}}for(var B=mxUtils.bind(this,function(O,Q,V,T,W){var X=c.editor.graph,Y=this.styleChange(n,null!=T?T:O,[mxConstants.STYLE_FONTFAMILY,-"fontSource","FType"],[O,null!=Q?encodeURIComponent(Q):null,null],null,z,function(){X.setFont(O,Q);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[O,null!=Q?encodeURIComponent(Q):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Z){Z.removeAttribute("face");Z.style.fontFamily=null;"PRE"==Z.nodeName&&X.replaceElement(Z,"div")})});V&&(V=document.createElement("img"),-V.className="geAdaptiveAsset",V.setAttribute("src",Editor.crossImage),V.setAttribute("title",mxResources.get("delete")),V.setAttribute("valign","absmiddle"),V.setAttribute("border","0"),V.style.position="relative",V.style.top="2px",V.style.width="14px",V.style.cursor="default",V.style.margin="0 3px",Y.firstChild.nextSibling.nextSibling.appendChild(V),mxEvent.addListener(V,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Z){this.removeCustomFont(O,Q);this.editorUi.hideCurrentMenu();-mxEvent.consume(Z)})));Graph.addFont(O,Q);Y.firstChild.nextSibling.style.fontFamily=O;W=null!=T?T:O;null!=Q&&(W+=" ("+Q+")");Y.setAttribute("title",W)}),M={},S=0;S<this.defaultFonts.length;S++){var l=this.defaultFonts[S];"string"===typeof l?B(l):null!=l.fontFamily&&null!=l.fontUrl&&(M[encodeURIComponent(l.fontFamily)+"@"+encodeURIComponent(l.fontUrl)]=!0,B(l.fontFamily,l.fontUrl))}n.addSeparator(z);var x={},F={},N=[];for(S=0;S<this.customFonts.length;S++)A(this.customFonts[S]);N.sort(function(O,Q){return O.label<-Q.label?-1:O.label>Q.label?1:0});if(0<N.length){for(S=0;S<N.length;S++)B(N[S].name,N[S].url,!0,N[S].label);n.addSeparator(z)}n.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),z);n.addSeparator(z);n.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,Q=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],V="s",T=null;if(O.isEditing()){var W=-O.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){Q=mxUtils.getCssFontFamily(X.fontFamily);X=O.getView().getState(O.cellEditor.getEditingCell());T=null!=X?X.style.fontSource:null;for(null!=T&&(T=decodeURIComponent(T));null!=W&&W!=O.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){T=W.getAttribute("data-font-src");break}else if(W.getAttribute("face")==Q){T=null;break}W=W.parentNode}null!=T&&(Graph.isGoogleFontUrl(T)?-(T=null,V="g"):V="w")}}}else X=O.getView().getState(O.getSelectionCell()),null!=X&&(Q=X.style[mxConstants.STYLE_FONTFAMILY]||Q,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?V="g":(V="w",T=W)));null!=T&&T.substring(0,PROXY_URL.length)==PROXY_URL&&(T=decodeURIComponent(T.substr((PROXY_URL+"?url=").length)));var Y=null;document.activeElement==O.cellEditor.textarea&&(Y=O.cellEditor.saveSelection());Q=new FontDialog(this.editorUi,Q,T,V,mxUtils.bind(this,function(Z,aa,-ea){null!=Y&&(O.cellEditor.restoreSelection(Y),Y=null);if(null!=Z&&0<Z.length)if(this.addCustomFont(Z,aa),O.isEditing())O.setFont(Z,aa);else{O.getModel().beginUpdate();try{O.stopEditing(!1),O.setCellStyles(mxConstants.STYLE_FONTFAMILY,Z),O.setCellStyles("fontSource",null!=aa?encodeURIComponent(aa):null),O.setCellStyles("FType",null)}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(Q.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);Q.init()}),-z,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};+function(){var q=new FeedbackDialog(c);c.showDialog(q.container,610,360,!0,!1);q.init()});c.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?c.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});p=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,+function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModel||+null==Editor.gptUrl||c.isOffline()||EditorUi.isElectronApp||(p=c.actions.addAction("chatWindowTitle",mxUtils.bind(this,function(){null==this.chatWindow?(this.chatWindow=new ChatWindow(c,220,document.body.offsetHeight-380,250,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("chat"))})),this.chatWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("chat"))):+this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),p.setToggleAction(!0),p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));p=c.actions.addAction("findReplace",mxUtils.bind(this,function(q,y){var B=(q=l.isEnabled()&&(null==y||!mxEvent.isShiftDown(y)))?"findReplace":"find";y=B+"Window";if(null==this[y]){var C="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,M=q?C?330:+300:240;this[y]=new FindWindow(c,document.body.offsetWidth-(M+20),100,M,q?C?304:288:170,q);this[y].window.addListener("show",function(){c.fireEvent(new mxEventObject(B))});this[y].window.addListener("hide",function(){c.fireEvent(new mxEventObject(B))});this[y].window.setVisible(!0)}else this[y].window.setVisible(!this[y].window.isVisible())}),null,null,Editor.ctrlKey+"+F");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){var q=l.isEnabled()?"findReplaceWindow":"findWindow";+return null!=this[q]&&this[q].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var q=null==c.pages||1>=c.pages.length;if(q)c.exportVisio();else{var y=document.createElement("div");y.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatVsdx"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(B);var C=c.addCheckbox(y,mxResources.get("allPages"),+!q,q);C.style.marginBottom="16px";q=new CustomDialog(c,y,mxUtils.bind(this,function(){c.exportVisio(!C.checked)}),null,mxResources.get("export"));c.showDialog(q.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginRight="8px";q.checked=mxSettings.getShowStartScreen();q.defaultChecked=q.checked;if(Editor.isSettingsEnabled()&&("sketch"==+Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var y=document.createElement("span");y.style.display="flex";y.style.alignItems="center";y.style["float"]="right";y.style.cursor="pointer";y.style.userSelect="none";y.style.marginTop="-3px";y.appendChild(q);mxUtils.write(y,mxResources.get("showStartScreen"));mxEvent.addListener(y,"click",function(C){mxEvent.getSource(C)!=q&&(q.checked=!q.checked)});header=y}y=[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),+function(){try{localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(C){c.handleError(C)}})}]];if(!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS){var B=c.actions.get("plugins");null==B||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||y.push([mxResources.get("plugins"),B.funct])}EditorUi.isElectronApp||y.push([mxResources.get("link"),function(C,M){if(0<M.value.length)try{var T=+JSON.parse(M.value),m=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(T)),z=new EmbedDialog(c,m);c.showDialog(z.container,450,240,!0);z.init()}catch(I){c.handleError(I)}else c.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=c.getServiceName()&&"1"!=urlParams.embed&&y.push([mxResources.get("preferences"),function(){c.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),+function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(C){c.handleError(C)}})}]])}]);c.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,y,q.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=q.parentNode&&(mxSettings.setShowStartScreen(q.checked),mxSettings.save())})});+if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(q,y){var B=mxLanguage;null==urlParams.lang&&isLocalStorage&&(B=mxSettings.settings.language);var C=mxUtils.bind(this,function(T){var m=""==T?mxResources.get("automatic"):mxLanguageMap[T],z=null;""!=m&&(z=q.addItem(m,null,mxUtils.bind(this,function(){c.setAndPersistLanguage(T);c.alert(mxResources.get("restartForChangeRequired"))}),y),(T==B||""==T&&null==B)&&q.addCheckmark(z,Editor.checkmarkImage));return z});+C("");q.addSeparator(y);for(var M in mxLanguageMap)C(M)})));var G=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(q){var y=G.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=y&&Editor.enableSimpleTheme&&"atlassian"!=c.getServiceName()){var B=this.get("dynamicAppearance");if(null!=B){var C=y.addMenu("",B.funct);C.setAttribute("title",mxResources.get("appearance"));C.className="geToolbarButton geAdaptiveAsset";C.style.backgroundPosition="center center";+C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="100% 100%";C.style.display="inline-block";C.style.cursor="pointer";C.style.zIndex="1";C.style.position="absolute";C.style.height="18px";C.style.width="18px";"atlas"==Editor.currentTheme?(C.style.filter="invert(100%)",C.style.right="11px",C.style.top="10px"):(C.style.right="10px",C.style.top="5px");document.body.appendChild(C);y.langIcon=C;B=mxUtils.bind(this,function(){var M=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;+C.style.display="atlas"==Editor.currentTheme||"min"==Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";C.style.backgroundImage="simple"==Editor.currentTheme?750>M?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()?Editor.thinDarkImage:Editor.thinLightImage)+")":"url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",B);this.editorUi.addListener("darkModeChanged",B);mxEvent.addListener(window,"resize",+B);B()}}return y}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){c.showCustomLayoutDialog(JSON.stringify(c.customLayoutConfig,null,2))});c.actions.put("adaptiveColors",new Action("adaptiveColors",function(q){null==c.adaptiveColorsWindow&&(c.adaptiveColorsWindow=new AdaptiveColorsWindow(c,document.body.offsetWidth-520,80,200,160));+c.adaptiveColorsWindow.window.setVisible(!0)}));p=this.get("viewZoom");var H=p.funct;p.funct=mxUtils.bind(this,function(q,y){H.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","outline","fullscreen"],y)});p=this.get("layout");var F=p.funct;p.funct=function(q,y){F.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var B=null,C=20,M=20,T=function(){"undefined"!==typeof mxOrgChartLayout&&null!=B&&c.tryAndHandle(mxUtils.bind(this,+function(){var U=c.editor.graph,W=new mxOrgChartLayout(U,B,C,M),X=U.getDefaultParent();1<U.model.getChildCount(U.getSelectionCell())&&(X=U.getSelectionCell());W.execute(X)}))},m=document.createElement("div"),z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("orgChartType")+": ");m.appendChild(z);var I=document.createElement("select");I.style.width="160px";I.style.boxSizing="border-box";z=[mxResources.get("linear"),+mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var L=0;L<z.length;L++){var N=document.createElement("option");mxUtils.write(N,z[L]);N.value=L;2==L&&N.setAttribute("selected","selected");I.appendChild(N)}mxEvent.addListener(I,"change",function(){B=I.value});m.appendChild(I);z=document.createElement("div");z.style.marginTop="6px";z.style.display=+"inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("parentChildSpacing")+": ");m.appendChild(z);var O=document.createElement("input");O.type="number";O.value=C;O.style.width="160px";O.style.boxSizing="border-box";m.appendChild(O);mxEvent.addListener(O,"change",function(){C=O.value});z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("siblingSpacing")+": ");m.appendChild(z);var S=document.createElement("input");+S.type="number";S.value=M;S.style.width="160px";S.style.boxSizing="border-box";m.appendChild(S);mxEvent.addListener(S,"change",function(){M=S.value});z=mxUtils.button(mxResources.get("custom")+"...",function(){var U=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(I.value),parentChildSpacing:parseInt(O.value),siblingSpacing:parseInt(S.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(U,null,2))});z.className="geBtn";m=new CustomDialog(c,m,function(){null==B&&(B=2);c.loadOrgChartLayouts(T)},+null,null,null,z);c.showDialog(m.container,355,140,!0,!0)},y,null,n());q.addSeparator(y);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var B=new mxParallelEdgeLayout(l);B.checkOverlap=!0;c.prompt(mxResources.get("spacing"),B.spacing,mxUtils.bind(this,function(C){c.tryAndHandle(mxUtils.bind(this,function(){B.spacing=C;c.executeLayout(function(){B.execute(l.getDefaultParent(),l.isSelectionEmpty()?null:l.getSelectionCells())},!1)}))}))}))}),+y);q.addSeparator(y);c.menus.addMenuItem(q,"runLayout",y,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,y){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(q,["keyboardShortcuts","-","about"],y);else{var B=q.addItem("Search:",null,null,y,null,null,!1);B.style.cursor="default";var C=document.createElement("input");C.setAttribute("type","text");C.setAttribute("size","25");C.style.borderWidth="1px";C.style.marginLeft="8px";mxEvent.addListener(C,+"keydown",mxUtils.bind(this,function(M){var T=mxUtils.trim(C.value);13==M.keyCode&&0<T.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(T)),C.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:T}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==M.keyCode&&(C.value="")}));B.firstChild.nextSibling.appendChild(C);mxEvent.addGestureListeners(C,+function(M){document.activeElement!=C&&C.focus();mxEvent.consume(M)},function(M){mxEvent.consume(M)},function(M){mxEvent.consume(M)});window.setTimeout(function(){C.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.drawio.com")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),c.actions.put("desktopZoomIn",new Action(mxResources.get("zoomIn"),function(){c.desktopZoomIn()})),c.actions.put("desktopZoomOut",new Action(mxResources.get("zoomOut"),+function(){c.desktopZoomOut()})),c.actions.put("desktopResetZoom",new Action(mxResources.get("actualSize"),function(){c.desktopResetZoom()})),this.addMenuItems(q,"- keyboardShortcuts quickStart website support -".split(" "),y),"1"!=urlParams.disableUpdate&&this.addMenuItems(q,["check4Updates","-"],y),this.addMenuItems(q,"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),y)):this.addMenuItems(q,"- keyboardShortcuts quickStart support - about".split(" "),y)}"1"==urlParams.test&&+(q.addSeparator(y),this.addSubmenu("testDevelop",q,y))})));c.actions.addAction("languageCode...",function(){var q=new FilenameDialog(c,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(y){null!=y&&(Graph.diagramLanguage=0<y.length?y:null,Graph.translateDiagram=!0,l.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");c.showDialog(q.container,340,80,!0,!0);q.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(q,+y){this.addMenuItems(q,["languageCode","-"],y);y=q.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;l.refresh()},y);Graph.translateDiagram||q.addCheckmark(y,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");+mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!l.isSelectionEmpty()){var q=l.cloneCells(l.getSelectionCells()),y=l.getBoundingBoxFromGeometry(q,+!0);q=l.moveCells(q,-y.x,-y.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+y.width+", "+y.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(l.encodeCells(q)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function q(m){return null==m||null==m.boundingBox||!isNaN(m.boundingBox.x)&&!isNaN(m.boundingBox.y)&&!isNaN(m.boundingBox.width)&&!isNaN(m.boundingBox.height)}var y=l.getGraphBounds(),B=l.view.translate,C=l.view.scale;l.insertVertex(l.getDefaultParent(),+null,"",y.x/C-B.x,y.y/C-B.y,y.width/C,y.height/C,"fillColor=none;strokeColor=red;");var M=0,T=0;l.view.states.visit(function(m,z){m=!0;q(z.shape)||(console.log("invalid shape",z.cell.id,z.shape),m=!1);q(z.text)||(console.log("invalid text",z.cell.id,z.text),m=!1);m||M++;T++});console.log("states checked",T,"invalid",M)}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";q=new TextareaDialog(c,+"Paste Data:",q,function(y){if(0<y.length)try{var B=function(z){function I(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=O[ba]){for(;0<O[ba].length;){var ea=O[ba].pop();I(ea)}delete O[ba]}}else mxLog.debug(L+": Visited: "+ba)}var L=z.parentNode.id,N=z.childNodes;z={};for(var O={},S=null,U={},W=0;W<N.length;W++){var X=N[W];if(null!=X.id&&0<X.id.length)if(null==z[X.id]){z[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?mxLog.debug(L+": Multiple roots: "+X.id):S=X.id:(null==O[Z]&&(O[Z]=[]),O[Z].push(X.id))}else U[X.id]=+X.id}N=Object.keys(U);0<N.length?(N=L+": "+N.length+" Duplicates: "+N.join(", "),mxLog.debug(N+" (see console)")):mxLog.debug(L+": Checked");var Y={};null==S?mxLog.debug(L+": No root"):(I(S),Object.keys(Y).length!=Object.keys(z).length&&(mxLog.debug(L+": Invalid tree: (see console)"),console.log(L+": Invalid tree",O)))};"<"!=y.charAt(0)&&(y=Graph.decompress(y),mxLog.debug("See console for uncompressed XML"),console.log("xml",y));var C=mxUtils.parseXml(y),M=c.getPagesForNode(C.documentElement,"mxGraphModel");+if(null!=M&&0<M.length)try{var T=c.getHashValueForPages(M);mxLog.debug("Checksum: ",T)}catch(z){mxLog.debug("Error: ",z.message)}else mxLog.debug("No pages found for checksum");var m=C.getElementsByTagName("root");for(y=0;y<m.length;y++)B(m[y]);mxLog.show()}catch(z){c.handleError(z),null!=window.console&&console.error(z)}});c.showDialog(q.container,620,460,!0,!0);q.init()}));var K=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var q=new TextareaDialog(c,"Diff/Sync:",+"",function(y){var B=c.getCurrentFile();if(0<y.length&&null!=B)try{var C=JSON.parse(y);B.patch([C],null,!0,!0);c.hideDialog()}catch(M){c.handleError(M)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(y,B){K=c.getPagesForXml(c.getFileData(!0));q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(K)}],["Diff",function(y,B){try{q.textarea.value=JSON.stringify(c.diffPages(K,c.pages),null,2)}catch(C){c.handleError(C)}}]]);null==K?+(K=c.getPagesForXml(c.getFileData(!0)),q.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(K)):q.textarea.value=JSON.stringify(c.diffPages(K,c.pages),null,2);c.showDialog(q.container,620,460,!0,!0);q.init()}else c.alert("No pages")}));c.actions.addAction("testChecksum",mxUtils.bind(this,function(){var q=c.getCurrentFile();null!=c.pages&&null!=q?c.spinner.spin(document.body,mxResources.get("loading"))&&q.getLatestVersion(function(y){c.spinner.stop();+var B=c.getHashValueForPages(c.pages),C=q.getCurrentRevisionId(),M=c.getHashValueForPages(y.getShadowPages()),T=y.getDescriptorChecksum(y.getDescriptor()),m=y.getCurrentRevisionId();console.log("Local File",[q],"modified",q.isModified(),"checksum",B);console.log("Remote File",[y],"rev",m==C,"desc",T==M,"checksum",M);c.alert("Checksums "+(M==B?"match":"no not match"))},function(y){console.log("Error getLatestVersion",y);c.handleError(y)}):console.log("Checksum: no file or pages")}));c.actions.addAction("testCheckPages",+mxUtils.bind(this,function(){var q=c.getCurrentFile();console.log("editorUi",c,"file",q);if(null!=q&&q.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(q.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(q.theirPages));console.log("diff ownPages/theirPages",c.diffPages(q.ownPages,q.theirPages));var y=q.getShadowPages();null!=y&&(console.log("Checksum shadowPages",c.getHashValueForPages(y)),console.log("diff shadowPages/ownPages",c.diffPages(y,q.ownPages)),console.log("diff ownPages/shadowPages",+c.diffPages(q.ownPages,y)),console.log("diff theirPages/shadowPages",c.diffPages(q.theirPages,y)));null!=q.sync&&null!=q.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(q.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(q.ownPages,q.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(q.theirPages,q.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(q.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",+c.diffPages(q.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(q.theirPages,c.pages)))}null!=q&&console.log("Shadow pages",[c.getXmlForPages(q.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var q=c.getCurrentFile();null!=q&&q.isRealtime()&&null!=q.shadowPages&&(console.log("patching actualPages to shadowPages",q.patch([c.diffPages(q.shadowPages,+c.pages)])),q.ownPages=c.clonePages(c.pages),q.theirPages=c.clonePages(c.pages),q.shadowPages=c.clonePages(c.pages),null!=q.sync&&(q.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){l.model.beginUpdate();try{var q=l.model.cells,y=0,B=[],C=[],M;for(M in q){var T=q[M],m=l.getCurrentCellStyle(T)[mxConstants.STYLE_IMAGE];null!=m&&"data:"==m.substring(0,5)&&(null==B[m]&&(B[m]=(B[m]||0)+1,y++),C.push(T))}l.setCellStyles(mxConstants.STYLE_IMAGE,null,+C);console.log("Removed",y,"image(s) from",C.length,"cell(s): ",[C,B])}finally{l.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,l.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var q=new mxImageExport,y=l.getGraphBounds(),B=l.view.scale,C=mxUtils.createXmlDocument(),M=C.createElement("output");C.appendChild(M);C=new mxXmlCanvas2D(M);C.translate(Math.floor((1-y.x)/B),Math.floor((1-y.y)/B));C.scale(1/B);var T=+0,m=C.save;C.save=function(){T++;m.apply(this,arguments)};var z=C.restore;C.restore=function(){T--;z.apply(this,arguments)};var I=q.drawShape;q.drawShape=function(L){mxLog.debug("entering shape",L,T);I.apply(this,arguments);mxLog.debug("leaving shape",L,T)};q.drawState(l.getView().getState(l.model.root),C);mxLog.show();mxLog.debug(mxUtils.getXml(M));mxLog.debug("stateCounter",T)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=+mxPopupMenu.prototype.zIndex-2});var d=null,g=null,k=null,v=null,t=null,x=null,A=null,J=null;c.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=d?(l.view.revalidate=d,d=null):(d=l.view.revalidate,l.view.revalidate=function(){var q=Date.now(),y=d.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=g?(c.selectPage=g,g=null):(g=c.selectPage,c.selectPage=function(){var q=Date.now(),y=g.apply(this,+arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=k?(c.diffPages=k,k=null):(k=c.diffPages,c.diffPages=function(){var q=Date.now(),y=k.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=v?(c.patchPages=v,v=null):(v=c.patchPages,c.patchPages=function(){var q=Date.now(),y=v.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",+[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=t?(c.clonePages=t,t=null):(t=c.clonePages,c.clonePages=function(){var q=Date.now(),y=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=A?(c.getHashValueForPages=A,A=null):(A=c.getHashValueForPages,c.getHashValueForPages=function(){var q=Date.now(),y=A.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],+"time",Date.now()-q+" ms","args",arguments);return y});null!=J?(c.resolveCrossReferences=J,J=null):(J=c.resolveCrossReferences,c.resolveCrossReferences=function(){var q=Date.now(),y=J.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=x?(c.getFileData=x,x=null):(x=c.getFileData,c.getFileData=function(){var q=Date.now(),y=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",+[this],"time",Date.now()-q+" ms","args",arguments);return y});EditorUi.debug("[Performance]",null!=d?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),y);var B=q.addItem(mxResources.get("testPerformance"),null,function(){c.actions.get("testPerformance").funct()},y);null!=d&&q.addCheckmark(B,+Editor.checkmarkImage);this.addMenuItems(q,["-","testShowConsole"],y)})))}c.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(q){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)}));c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(q){l.isEnabled()&&+(q=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(c,q,mxResources.get("editShape")+":",630,400),c.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=n;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",q,function(y,B,C,M,T,m,z,I,L,N,O,S){c.createHtml(y,B,C,M,T,m,z,I,+L,N,O,mxUtils.bind(this,function(U,W){var X=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+U+"\n"+W+"\n",null,null,function(){var Z=window.open(),Y=Z.document;if(null!=Y){"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(U);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Y.writeln(W);+Y.writeln("</body>");Y.writeln("</html>");Y.close();if(!ba){var ea=Z.document.createElement("div");ea.marginLeft="26px";ea.marginTop="26px";mxUtils.write(ea,mxResources.get("updatingDocument"));ba=Z.document.createElement("img");ba.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ba.style.marginLeft="6px";ea.appendChild(ba);Z.document.body.insertBefore(ea,Z.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");+ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(W)[1];Y.body.appendChild(ca);ea.parentNode.removeChild(ea)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(X.container,450,240,!0,!0);X.init()}),S)})})}));c.actions.put("liveImage",new Action("Live image...",function(){var q=c.getCurrentFile();null!=q&&c.getPublicUrl(q,function(y){null!=y?(y=new EmbedDialog(c,'<img src="'+(q.constructor!=DriveFile?y:"https://drive.google.com/uc?id="+q.getId())++'"/>'),c.showDialog(y.container,450,240,!0,!0),y.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(q,y,B,C,M,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(q,y,B,C,M,T,function(m){c.spinner.stop();m=new EmbedDialog(c,m);c.showDialog(m.container,450,240,!0,!0);m.init()},function(m){c.spinner.stop();c.handleError(m)})},mxResources.get("image"),+mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(q,y,B,C,M,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(q,y,B,C,M,T,function(m){c.spinner.stop();m=new EmbedDialog(c,m);c.showDialog(m.container,450,240,!0,!0);m.init()},function(m){c.spinner.stop();c.handleError(m)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));+c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){var y=l.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,y.height/l.view.scale))+2,null,null,null,q,c.getCurrentFile(),function(B,C,M,T,m,z,I,L,N,O){var S=[];N&&S.push("tags=%7B%7D");B=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+I+";height:"+L+';" src="'+c.createLink(B,C,!0,T,m,z,"public"==O?q:null,null,S,null,+M)+'"></iframe>');c.showDialog(B.container,450,240,!0,!0);B.init()},!0)})}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var y=document.createElement("a");y.setAttribute("href","javascript:void(0);");y.setAttribute("target","_blank");y.style.cursor="pointer";mxUtils.write(y,mxResources.get("getNotionChromeExtension"));+q.appendChild(y);mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");mxUtils.setOpacity(y,0);window.setTimeout(function(){mxUtils.setOpacity(y,100)},300);mxEvent.addListener(y,"click",function(B){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(B)});c.getPublicUrl(c.getCurrentFile(),function(B){c.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",q,B,c.getCurrentFile(),+function(C,M,T,m,z,I,L,N,O,S){L=["border=0"];O&&L.push("tags=%7B%7D");C=new EmbedDialog(c,c.createLink(C,M,!0,m,z,I,"public"==S?B:null,null,L,null,T));c.showDialog(C.container,450,240,!0,!0);C.init()})})}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showPublishLinkDialog(null,null,null,null,null,null,q,c.getCurrentFile(),function(y,B,C,M,T,m,z,I,L,N){z=[];M&&L&&z.push("tags=%7B%7D");y=new EmbedDialog(c,c.createLink(y,+B,!0,M,T,m,"public"==N?q:null,null,z,null,C));c.showDialog(y.container,450,240,!0,!0);y.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",+function(){c.getPublicUrl(c.getCurrentFile(),function(q){q=new GoogleSitesDialog(c,q);c.showDialog(q.container,420,256,!0,!0);q.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)p=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&+(p=c.actions.addAction("highContrast",function(){c.setAndPersistHighContrast(!c.isHighContrast())}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isHighContrast()}));p=c.actions.addAction("search",function(){if(null!=c.sidebar){var q=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!q);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!q,mxSettings.save())}});p.label=mxResources.get("searchShapes");p.setToggleAction(!0);p.setSelectedCallback(function(){return null!=+c.sidebar&&c.sidebar.isEntryVisible("search")});c.actions.get("clearDefaultStyle").funct=function(q){l.isEnabled()&&(c.clearDefaultStyle(),Editor.sketchMode&&c.setSketchMode(!1))};"1"==urlParams.embed&&(c.actions.get("saveAs").setEnabled(!1),c.actions.get("save").funct=function(q){l.isEditing()&&l.stopEditing();var y="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var B=c.createLoadMessage("save");B.xml=y;!0!==+q||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(B.exit=!0);y=JSON.stringify(B)}(window.opener||window.parent).postMessage(y,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));q=c.getCurrentFile();null==q||q.constructor==EmbedFile||q.constructor==LocalFile&&null==q.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)},null,null,Editor.ctrlKey++"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var q=function(){c.editor.modified=!1;var y="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(y,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):+q()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(q,y){c.isExportToCanvas()?(this.addMenuItems(q,["exportPng"],y),c.jpgSupported&&this.addMenuItems(q,["exportJpg"],y),c.webpSupported&&this.addMenuItems(q,["exportWebp"],y)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPng","exportJpg"],y);this.addMenuItems(q,["exportSvg","-"],y);c.isOffline()||c.printPdfExport?this.addMenuItems(q,["exportPdf"],y):+c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPdf"],y);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(q,["exportVsdx"],y);this.addMenuItems(q,["-","exportHtml","exportXml","exportUrl"],y);c.isOffline()||(q.addSeparator(y),this.addMenuItem(q,"export",y).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||this.addMenuItems(q,["publishLink"],+y);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(q.addSeparator(y),c.menus.addSubmenu("embed",q,y))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,y){function B(T){T.pickFile(function(m){c.spinner.spin(document.body,mxResources.get("loading"))&&T.getFile(m,function(z){var I="data:image/"==z.getData().substring(0,11)?M(z.getTitle()):"text/xml";/\.svg$/i.test(z.getTitle())&&!c.editor.isDataSvg(z.getData())&&+(z.setData(Editor.createSvgDataUri(z.getData())),I="image/svg+xml");C(z.getData(),I,z.getTitle())},function(z){c.handleError(z,null!=z?mxResources.get("errorLoadingFile"):null)},T==c.drive)},!0)}var C=mxUtils.bind(this,function(T,m,z){var I=l.view,L=l.getGraphBounds(),N=l.snap(Math.ceil(Math.max(0,L.x/I.scale-I.translate.x)+4*l.gridSize)),O=l.snap(Math.ceil(Math.max(0,(L.y+L.height)/I.scale-I.translate.y)+4*l.gridSize));"data:image/"==T.substring(0,11)?c.loadImage(T,mxUtils.bind(this,function(S){var U=+!0,W=mxUtils.bind(this,function(){c.resizeImage(S,T,mxUtils.bind(this,function(X,Z,Y){X=U?Math.min(1,Math.min(c.maxImageSize/Z,c.maxImageSize/Y)):1;c.importFile(T,m,N,O,Math.round(Z*X),Math.round(Y*X),z,function(ba){c.spinner.stop();l.setSelectionCells(ba);l.scrollCellToVisible(l.getSelectionCell())})}),U)});T.length>c.resampleThreshold?c.confirmImageResize(function(X){U=X;W()}):W()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(T,m,N,O,0,+0,z,function(S){c.spinner.stop();l.setSelectionCells(S);l.scrollCellToVisible(l.getSelectionCell())})}),M=mxUtils.bind(this,function(T){var m="text/xml";/\.png$/i.test(T)?m="image/png":/\.jpe?g$/i.test(T)?m="image/jpg":/\.gif$/i.test(T)?m="image/gif":/\.pdf$/i.test(T)&&(m="application/pdf");return m});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){B(c.drive)},y):c.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")++" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){B(c.oneDrive)},y):c.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){B(c.dropbox)},y):c.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")++" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);c.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){B(c.gitHub)},y);c.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){B(c.gitLab)},y);c.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){B(c.trello)},y):c.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")++"...)",null,function(){},y,null,!1);q.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},y);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},y);c.isOffline()||(q.addSeparator(y),q.addItem(mxResources.get("url")+"...",null,function(){var T=new FilenameDialog(c,"",mxResources.get("import"),function(m){if(null!=m&&0<m.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var z=+/(\.png)($|\?)/i.test(m)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(m),function(I){C(I,z,m)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==z)}},mxResources.get("url"));c.showDialog(T.container,300,80,!0,!0);T.init()},y))}))).isEnabled=n;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(q,y){var B=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&+(750>B&&this.addSubmenu("viewZoom",q,y,mxResources.get("zoom")),460>B&&c.isPageMenuVisible()&&this.addSubmenu("pages",q,y),320>B&&this.addSubmenu("insert",q,y),360>B&&"1"!=urlParams.embed&&"draw.io"==c.getServiceName()&&this.addSubmenu("share",q,y));this.addMenuItems(q,["-","lightMode","darkMode"],y);c.isAutoDarkModeSupported()&&(B=c.menus.addMenuItem(q,"autoMode",y),null!=B&&B.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")"));"1"!=urlParams.embed&&+this.addMenuItems(q,["-","toggleSimpleMode"],y)})));this.put("appearance",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,["-","lightMode","darkMode"],y);if(c.isAutoDarkModeSupported()){var B=c.menus.addMenuItem(q,"autoMode",y);null!=B&&B.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}q.addSeparator(y);B=c.menus.addMenuItem(q,"highContrast",y);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(B,+"https://github.com/jgraph/drawio/issues/4296")})));c.actions.addAction("addToScratchpad",function(q){l.isSelectionEmpty()||null==c.addSelectionToScratchpad||c.addSelectionToScratchpad(q)});c.actions.addAction("accounts...",function(){c.toggleUserPanel();c.userPanel.style.right="10px";c.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(q,y){var B="1"==urlParams.sketch?"sketch":mxSettings.getUi(),C=q.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},+y),M=q.addItem(mxResources.get("classic"),null,function(){c.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy")},y),T=!1;if("kennedy"==B||"dark"==B)q.addCheckmark(M,Editor.checkmarkImage),T=!0;for(var m=0;m<Editor.themes.length;m++)mxUtils.bind(this,function(z){M=q.addItem(mxResources.get("min"==z?"minimal":z),null,function(){c.setCurrentTheme(z)},y);B==z&&(q.addCheckmark(M,Editor.checkmarkImage),T=!0)})(Editor.themes[m]);T||q.addCheckmark(C,Editor.checkmarkImage)})));p=this.editorUi.actions.addAction("rename...",+mxUtils.bind(this,function(){var q=this.editorUi.getCurrentFile();if(null!=q)if(q.constructor==LocalFile&&null!=q.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(B,C){q.invalidFileHandle=null;q.fileHandle=B;q.title=C.name;q.desc=C;c.save(C.name)}),null,c.createFileSystemOptions(q.getTitle()));else{var y=null!=q.getTitle()?q.getTitle():this.editorUi.defaultFilename;y=new FilenameDialog(this.editorUi,y,mxResources.get("rename"),mxUtils.bind(this,function(B){null!=B&&0<B.length&&null!=q&&B!=+q.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&q.rename(B,mxUtils.bind(this,function(C){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(C){this.editorUi.handleError(C,null!=C?mxResources.get("errorRenamingFile"):null)}))}),q.constructor==DriveFile||q.constructor==StorageFile?mxResources.get("diagramName"):null,function(B){if(null!=B&&0<B.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},+null,FilenameDialog.filenameHelpLink,null,null,c.editor.fileExtensions);this.editorUi.showDialog(y.container,340,96,!0,!0);y.init()}}));p.isEnabled=function(){return this.enabled&&n.apply(this,arguments)};p.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var q=c.getCurrentFile();if(null!=q){var y=c.getCopyFilename(q);q.constructor==DriveFile?(y=new CreateDialog(c,y,mxUtils.bind(this,function(B,C){"_blank"==C?c.editor.editAsNew(c.getFileData(),B):("download"==+C&&(C=App.MODE_GOOGLE),null!=B&&0<B.length&&(C==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&q.saveAs(B,mxUtils.bind(this,function(M){q.desc=M;q.save(!1,mxUtils.bind(this,function(){c.spinner.stop();q.setModified(!1);q.addAllSavedStatus()}),mxUtils.bind(this,function(T){c.handleError(T)}))}),mxUtils.bind(this,function(M){c.handleError(M)})):c.createFile(B,c.getFileData(!0),null,C)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),+null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(y.container,420,380,!0,!0),y.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),y)}}));c.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(q,y){q=c.getCurrentFile();null!=q&&c.openLink(q.getFolderUrl())}));c.actions.addAction("openFile...",mxUtils.bind(this,function(){var q=c.getCurrentFile();null!=q&&c.openLink(q.getFileUrl())}));c.actions.addAction("moveToFolder...",+mxUtils.bind(this,function(){var q=c.getCurrentFile();if(q.getMode()==App.MODE_GOOGLE||q.getMode()==App.MODE_ONEDRIVE){var y=!1;if(q.getMode()==App.MODE_GOOGLE&&null!=q.desc.parents)for(var B=0;B<q.desc.parents.length;B++)if(q.desc.parents[B].isRoot){y=!0;break}c.pickFolder(q.getMode(),mxUtils.bind(this,function(C){c.spinner.spin(document.body,mxResources.get("moving"))&&q.move(C,mxUtils.bind(this,function(M){c.spinner.stop()}),mxUtils.bind(this,function(M){c.handleError(M)}))}),null,!0,y)}}));this.put("publish",+new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,["publishLink"],y)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var q=c.getCurrentFile();null!=q&&q.share()}catch(y){c.handleError(y)}})).isEnabled=n;this.put("embed",new Menu(mxUtils.bind(this,function(q,y){var B=c.getCurrentFile();null==B||B.getMode()!=App.MODE_GOOGLE&&B.getMode()!=+App.MODE_GITHUB||!/(\.png)$/i.test(B.getTitle())||this.addMenuItems(q,["liveImage","-"],y);this.addMenuItems(q,["embedImage","embedSvg","-","embedHtml"],y);navigator.standalone||c.isOffline()||this.addMenuItems(q,["embedIframe"],y);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(q,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),y)})));c.addInsertItem=function(q,y,B,C){("plantUml"!=C||EditorUi.enablePlantUml&&!c.isOffline())&&q.addItem(B,null,mxUtils.bind(this,+function(){if("fromText"==C||"formatSql"==C||"plantUml"==C||"mermaid"==C){var M=new ParseDialog(c,B,C);c.showDialog(M.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else M=new CreateGraphDialog(c,B,C),c.showDialog(M.container,620,420,!0,!1,function(T,m){if(m)return c.confirm(mxResources.get("areYouSure"),function(){c.hideDialog()}),!1;null!=M.graph&&(null!=M.graph.container.parentNode&&M.graph.container.parentNode.removeChild(M.graph.container),M.graph.destroy(),M.graph=null)});+M.init()}),y,null,n())};var D=function(q){l.getModel().beginUpdate();try{q=l.addCell(q),l.fireEvent(new mxEventObject("cellsInserted","cells",[q])),l.model.isVertex(q)&&l.isAutoSizeCell(q)&&l.updateCellSize(q)}finally{l.getModel().endUpdate()}l.scrollCellToVisible(q);l.setSelectionCell(q);l.container.focus();l.editAfterInsert&&l.startEditing(q);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(l.view.getState(q))},0);return q},E=function(q,y,B,C,M){q=new mxCell(q,new mxGeometry(0,+0,y,B),C);q.vertex=!0;null==M&&(M=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([q],!0)));q.geometry.x=M.x;q.geometry.y=M.y;return D(q)};c.actions.put("insertText",new Action(mxResources.get("text"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&l.startEditingAtCell(E("Text",60,30,l.appendFontSize("text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",l.vertexFontSize),null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||+!l.isMouseInsertPoint()?null:l.getInsertPoint()))},null,null,"A")).isEnabled=n;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&E("",120,60,"whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"D")).isEnabled=n;c.actions.put("insertNote",new Action(mxResources.get("note"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&+E("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"S")).isEnabled=n;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&+E("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"F")).isEnabled=n;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&E("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"R")).isEnabled=n;c.actions.put("insertEdge",+new Action(mxResources.get("line"),function(q){if(l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())){var y=l.defaultEdgeLength;q=null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint();null==q&&(q=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([B],!0)));var B=new mxCell("",new mxGeometry(0,0,y,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");B.geometry.setTerminalPoint(q,!0);B.geometry.setTerminalPoint(new mxPoint(q.x+B.geometry.width,+q.y),!1);B.geometry.points=[];B.geometry.relative=!0;B.edge=!0;D(B)}},null,null,"C")).isEnabled=n;p=c.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=c.sidebarWindow?c.sidebarWindow.window.setVisible(!c.sidebarWindow.window.isVisible()):c.toggleShapesPanel(!c.isShapesPanelVisible())},null,null,Editor.ctrlKey+"+Shift+K"));p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=c.sidebarWindow&&c.sidebarWindow.window.isVisible()||null==+c.sidebarWindow&&0<c.hsplitPosition}));c.addInsertMenuItems=mxUtils.bind(this,function(q,y,B){for(var C=0;C<B.length;C++)"-"==B[C]?q.addSeparator(y):c.addInsertItem(q,y,mxResources.get(B[C])+"...",B[C])});this.put("insert",new Menu(mxUtils.bind(this,function(q,y){"sketch"==Editor.currentTheme?(c.menus.addMenuItems(q,["toggleShapes"],y),c.menus.addSubmenu("table",q,y),q.addSeparator(y),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(q,["insertTemplate"],y),c.menus.addMenuItems(q,["insertImage",+"insertLink","-"],y),c.menus.addSubmenu("insertAdvanced",q,y,mxResources.get("advanced")),c.menus.addSubmenu("layout",q,y)):(this.addMenuItems(q,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),y),c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(q,["insertTemplate"],y),q.addSeparator(y),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("layout",q,y),this.addSubmenu("insertLayout",+q,y,mxResources.get("insert")),q.addSeparator(y),this.addSubmenu("table",q,y)):this.addSubmenu("insertLayout",q,y,mxResources.get("layout")),this.addSubmenu("insertAdvanced",q,y,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,function(q,y){c.menus.addInsertTableCellItem(q,y)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(q,y){c.addInsertMenuItems(q,y,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));+this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(q,y){var B=["fromText","plantUml"].concat(window.isMermaidEnabled?["mermaid"]:[]).concat(["-","formatSql"]);c.addInsertMenuItems(q,y,B);q.addItem(mxResources.get("csv")+"...",null,function(){l.popupMenuHandler.hideMenu();c.showImportCsvDialog()},y,null,n());"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","createShape","editDiagram"],y)})));this.put("openRecent",new Menu(function(q,y){var B=c.getRecent();+if(null!=B){for(var C=0;C<B.length;C++)(function(M){var T=M.mode;T==App.MODE_GOOGLE?T="googleDrive":T==App.MODE_ONEDRIVE&&(T="oneDrive");q.addItem(M.title+" ("+mxResources.get(T)+")",null,function(){c.loadFile(M.id)},y)})(B[C]);q.addSeparator(y)}q.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},y)}));this.put("openFrom",new Menu(function(q,y){null!=c.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},y):c.isModeEnabled(App.MODE_GOOGLE)&&+q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},y):c.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},y):+c.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);c.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},y);c.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},y);c.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},+y):c.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},y);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},y);c.isOffline()||(q.addSeparator(y),q.addItem(mxResources.get("url")+"...",null,function(){var B=+new FilenameDialog(c,"",mxResources.get("open"),function(C){null!=C&&0<C.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(C):window.geOpenWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(C)))},mxResources.get("url"));c.showDialog(B.container,300,80,!0,!0);B.init()},y))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(q,y){"undefined"!=typeof google&&"undefined"!=+typeof google.picker&&(null!=c.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},y):c.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},y):c.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")++" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},y):c.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);c.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,+null,App.MODE_GITHUB)},y);c.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},y);c.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},y):c.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);isLocalStorage&&"0"!=+urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},y);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},y);"1"==urlParams.confLib&&q.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showLibraryDialog(null,null,null,null,"CONF_LIB")},y)})),this.put("openLibraryFrom",new Menu(function(q,y){"undefined"!=typeof google&&+"undefined"!=typeof google.picker&&(null!=c.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},y):c.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},y):c.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("++mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},y):c.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);c.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},y);c.isModeReady(App.MODE_GITLAB)&&+q.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},y);c.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},y):c.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},+y);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},y);c.isOffline()||(q.addSeparator(y),q.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(c,"",mxResources.get("open"),function(C){if(null!=C&&0<C.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var M=C;c.editor.isCorsEnabledForUrl(C)||(M=PROXY_URL+"?url="+encodeURIComponent(C));mxUtils.get(M,function(T){if(200<=T.getStatus()&&299>=T.getStatus()){c.spinner.stop();+try{c.loadLibrary(new UrlLibrary(c,T.getText(),C)),c.showSidebar()}catch(m){c.handleError(m,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));c.showDialog(B.container,300,80,!0,!0);B.init()},y));"1"==urlParams.confLib&&(q.addSeparator(y),q.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},+y))})));this.put("edit",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));p=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",+function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var q=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(q);this.commentsWindow.refreshCommentsTime();q&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,+function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(q,y){var B=c.getCurrentFile();c.menus.addMenuItems(q,"toggleShapes format ruler - findReplace layers tags chatWindowTitle outline -".split(" "),y);c.commentsSupported()&&c.menus.addMenuItems(q,["comments"],y);null!=B&&B.isRealtimeEnabled()&&+B.isRealtimeSupported()&&c.menus.addMenuItems(q,["showRemoteCursors"],y);c.menus.addMenuItems(q,["-","fullscreen"],y)};this.put("view",new Menu(mxUtils.bind(this,function(q,y){if("simple"==Editor.currentTheme){var B=c.getCurrentFile();c.menus.addMenuItems(q,["toggleShapes","format"],y);c.isPageMenuVisible()&&c.menus.addMenuItems(q,["pageTabs"],y);c.menus.addMenuItems(q,["ruler","-","search"],y);if(isLocalStorage||mxClient.IS_CHROMEAPP){var C=c.menus.addMenuItem(q,"scratchpad",y);(!c.isOffline()||+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(C,"https://www.drawio.com/doc/faq/scratchpad")}c.menus.addMenuItems(q,"- findReplace layers tags chatWindowTitle outline -".split(" "),y);c.commentsSupported()&&c.menus.addMenuItems(q,["comments"],y);null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors"],y);this.addMenuItems(q,["-","fullscreen"],y)}else{this.addMenuItems(q,["format","outline","layers","tags","chatWindowTitle"].concat(c.commentsSupported()?+["comments","-"]:["-"]));this.addMenuItems(q,["-","search"],y);if(isLocalStorage||mxClient.IS_CHROMEAPP)C=this.addMenuItem(q,"scratchpad",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.drawio.com/doc/faq/scratchpad");this.addMenuItems(q,["toggleShapes","-","pageView","pageScale"]);this.addSubmenu("units",q,y);q.addSeparator(y);c.isPageMenuVisible()&&c.menus.addMenuItems(q,["pageTabs"],y);this.addMenuItems(q,"ruler - tooltips animations - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),+y);"1"!=urlParams.sketch&&this.addMenuItems(q,["-","fullscreen"],y)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),y)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(q,y){var B=c.currentPage;null!=B&&(q.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){c.renamePage(B,B.getName())}),+y),q.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){c.removePage(B)}),y),1<c.pages.length&&(c.menus.addSubmenu("movePage",q,y,mxResources.get("move")),q.addSeparator(y)),q.addSeparator(y),q.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){c.duplicatePage(B,mxResources.get("copyOf",[B.getName()]))}),y),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||q.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,+function(){c.editor.editAsNew(c.getFileData(!0,null,null,null,!0,!0))}),y)))})));this.put("pages",new Menu(mxUtils.bind(this,function(q,y){var B=c.currentPage;c.editor.graph.isLightboxView()||(q.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{c.insertPage()}catch(M){c.handleError(M)}}),y,null,c.editor.graph.isEnabled()),q.addSeparator(y));if(null!=c.pages)for(var C=0;C<c.pages.length;C++)mxUtils.bind(this,function(M){var T=null;T=c.pages[M]!=B||c.editor.graph.isLightboxView()?+q.addItem(c.getShortPageName(c.pages[M]),null,mxUtils.bind(this,function(){c.selectPage(c.pages[M])}),y):c.menus.addSubmenu("currentPage",q,y,c.getShortPageName(B));var m=c.pages[M].getId();T.setAttribute("title",c.pages[M].getName()+" ("+(M+1)+"/"+c.pages.length+")"+(null!=m?" ["+m+"]":""));c.pages[M]==B&&q.addCheckmark(T,Editor.checkmarkImage)})(C)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;p=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();R=!R;c.alert(mxResources.get("restartForChangeRequired"))});+p.setToggleAction(!0);p.setSelectedCallback(function(){return R});var V="1"==urlParams.enableStoreBkp;p=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();V=!V});p.setToggleAction(!0);p.setSelectedCallback(function(){return V});var Q="1"==urlParams.isGoogleFontsEnabled;p=c.actions.addAction("googleFonts",function(){c.toggleGoogleFonts();Q=!Q;c.alert(mxResources.get("restartForChangeRequired"))});p.setToggleAction(!0);p.setSelectedCallback(function(){return Q});c.actions.addAction("openDevTools",+function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var q=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(y){y=parseInt(y);0<=y&&(EditorUi.draftSaveDelay=1E3*y,EditorUi.enableDrafts=0<y,mxSettings.setDraftSaveDelay(y),mxSettings.save())}),mxResources.get("draftSaveInt"));c.showDialog(q.container,320,80,!0,!0);q.init()})}var P=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(q,y){if("simple"==Editor.currentTheme||+"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||c.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",q,y);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",q,y);q.addSeparator(y);null==P||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",q,y);c.menus.addSubmenu("units",+q,y);c.menus.addMenuItems(q,"- copyConnect collapseExpand - tooltips animations -".split(" "),y);var B=c.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors"],y),c.menus.addMenuItems(q,["ruler","-"],y));EditorUi.isElectronApp&&c.menus.addMenuItems(q,"- googleFonts spellCheck autoBkp drafts -".split(" "),y);this.addSubmenu("diagramLanguage",q,y);q.addSeparator(y);c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(q,+"configuration",y);q.addSeparator(y)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",q,y),"1"==urlParams.embed&&"1"!=urlParams.atlas||"atlas"==Editor.currentTheme||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",q,y),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",q,y),q.addSeparator(y),B=this.addSubmenu("adaptiveColors",q,y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&+c.menus.addLinkToItem(B,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(B=this.addMenuItem(q,"mathematicalTypesetting",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.drawio.com/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(q,["googleFonts","spellCheck","autoBkp","drafts","-"],y),this.addMenuItems(q,["copyConnect","collapseExpand","-"],y),"1"!=urlParams.embed&&(B=c.getCurrentFile(),null!=+B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors","shareCursor"],y),this.addMenuItems(q,["autosave"],y)),q.addSeparator(y),!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(q,"plugins",y),q.addSeparator(y),this.addSubmenu("diagramLanguage",q,y),this.addMenuItem(q,"editDiagram",y),q.addSeparator(y),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(q,["showStartScreen"],y),this.addMenuItems(q,["configuration"],y)})));this.put("movePage",+new Menu(mxUtils.bind(this,function(q,y){var B=c.currentPage,C=c.getPageIndex(B);if(null!=c.pages)for(var M=0;M<c.pages.length;M++)M!=C&&function(T){q.addItem(c.getShortPageName(c.pages[T]),null,function(){c.movePage(C,T);c.scrollToPage(B,!0)},y)}(M)})));this.put("share",new Menu(mxUtils.bind(this,function(q,y){if(!c.isStandaloneApp()){var B=c.isOffline(!0)?mxResources.get("offline"):c.getNetworkStatus();null!=B&&(q.addItem(B,null,null,y,null,!1),q.addSeparator(y));c.menus.addMenuItems(q,["share"],+y)}this.addMenuItem(q,"publishLink",y,null,null,mxResources.get("publish")+"...");null!=c.getMainUser()&&this.addMenuItems(q,["accounts"],y)})));this.put("diagram",new Menu(mxUtils.bind(this,function(q,y){var B=c.getCurrentFile();"simple"!=Editor.currentTheme&&(c.menus.addSubmenu("extras",q,y,mxResources.get("settings")),q.addSeparator(y));var C="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)c.menus.addMenuItems(q,"new open - synchronize properties - save saveAs -".split(" "),+y);else if(c.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(q,["-","save"],y);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||c.mode==App.MODE_ATLAS)c.menus.addMenuItems(q,["saveAndExit"],y),null!=B&&B.isRevisionHistorySupported()&&c.menus.addMenuItems(q,["revisionHistory"],y);q.addSeparator(y)}else c.mode==App.MODE_ATLAS?c.menus.addMenuItems(q,["save","synchronize","-"],y):"1"!=urlParams.noFileMenu&&(c.menus.addSubmenu("file",+q,y),q.addSeparator(y),"min"==Editor.currentTheme&&(c.menus.addMenuItems(q,"toggleShapes format layers tags chatWindowTitle - findReplace".split(" "),y),c.commentsSupported()&&c.menus.addMenuItems(q,["comments"],y),q.addSeparator(y)));c.menus.addSubmenu("exportAs",q,y);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"atlassian"==c.getServiceName()?c.menus.addMenuItems(q,["import"],y):"1"!=urlParams.noFileMenu&&c.menus.addSubmenu("importFrom",q,y);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?+(c.menus.addMenuItems(q,["-","findReplace"],y),c.commentsSupported()&&c.menus.addMenuItems(q,["comments","-"],y),c.menus.addMenuItems(q,"toggleShapes format layers tags chatWindowTitle -".split(" "),y),c.menus.addMenuItems(q,["pageSetup"],y)):"min"!=Editor.currentTheme&&(this.addMenuItems(q,["-"],y),this.addSubmenu("newLibrary",q,y),this.addSubmenu("openLibraryFrom",q,y));q.addSeparator(y);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(q,["print"],y);C||"min"==+Editor.currentTheme||null==B||null==c.fileNode||"1"==urlParams.embedInline||(C=null!=B.getTitle()?B.getTitle():c.defaultFilename,/(\.html)$/i.test(C)||this.addMenuItems(q,["-","properties"]));q.addSeparator(y);"simple"==Editor.currentTheme&&(c.menus.addSubmenu("extras",q,y,mxResources.get("settings")),q.addSeparator(y));c.menus.addSubmenu("help",q,y);q.addSeparator(y);"1"==urlParams.embed&&("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(q,["save"],y),"1"==urlParams.saveAndExit||+"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(c.menus.addMenuItems(q,["saveAndExit"],y),null!=B&&B.isRevisionHistorySupported()&&c.menus.addMenuItems(q,["revisionHistory"],y));"1"!=urlParams.embed&&c.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&c.mode!=App.MODE_ATLAS||c.menus.addMenuItems(q,["exit"],y);"1"!=urlParams.embed&&null!=B&&"undefined"==typeof AtlasFile&&c.menus.addMenuItems(q,["-","close"],y)})));this.put("save",new Menu(mxUtils.bind(this,function(q,y){var B=c.getCurrentFile();+null==B||B.constructor!=DriveFile&&B.constructor!=OneDriveFile?(c.menus.addMenuItems(q,["save","saveAs","-","rename"],y),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(q,["upload"],y):c.menus.addMenuItems(q,["makeCopy"],y)):c.menus.addMenuItems(q,["save","makeCopy","-","rename","moveToFolder"],y);c.menus.addMenuItems(q,["-","autosave"],y);null!=B&&B.isRevisionHistorySupported()&&c.menus.addMenuItems(q,["-","revisionHistory"],y)})));this.put("file",+new Menu(mxUtils.bind(this,function(q,y){var B="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",q,y),this.addSubmenu("exportAs",q,y),this.addSubmenu("embed",q,y),"1"==urlParams.libraries&&(this.addMenuItems(q,["-"],y),this.addSubmenu("newLibrary",q,y),this.addSubmenu("openLibraryFrom",q,y)),c.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],y),this.addMenuItems(q,["-","pageSetup",+"print","-","rename"],y),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(q,["saveAndExit"],y):(this.addMenuItems(q,["save"],y),"1"==urlParams.saveAndExit&&this.addMenuItems(q,["saveAndExit"],y))),"1"!=urlParams.noExitBtn&&this.addMenuItems(q,["exit"],y);else if(B){B=c.getCurrentFile();c.menus.addMenuItems(q,["new"],y);c.menus.addSubmenu("openFrom",q,y);isLocalStorage&&this.addSubmenu("openRecent",q,y);q.addSeparator(y);c.menus.addMenuItems(q,["-",+"save"],y);null!=B&&B.constructor==DriveFile||c.menus.addMenuItems(q,["saveAs"],y);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||c.menus.addMenuItems(q,["synchronize"],y);q.addSeparator(y);null!=B&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"sketch"!=Editor.currentTheme||this.addMenuItem(q,"publishLink",y,null,null,mxResources.get("publish")+"..."),"simple"==Editor.currentTheme||B.constructor!=DriveFile&&B.constructor!=GitHubFile&&B.constructor!=+OneDriveFile||c.menus.addMenuItems(q,["share"],y));q.addSeparator(y);null!=B&&B.isRenamable()&&this.addMenuItems(q,["rename"],y);c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(q,["upload"],y):(c.menus.addMenuItems(q,["makeCopy"],y),null!=B&&(B.constructor!=OneDriveFile&&B.constructor!=DriveFile||c.menus.addMenuItems(q,["moveToFolder"],y),q.addSeparator(y),null!=B.getFolderUrl()&&c.menus.addMenuItems(q,["openFolder"],y),null!=B.getFileUrl()&&c.menus.addMenuItems(q,+["openFile"],y)));q.addSeparator(y);null!=B&&B.isRevisionHistorySupported()&&c.menus.addMenuItems(q,["revisionHistory"],y);if(null!=B&&null!=c.fileNode&&"1"!=urlParams.embedInline){var C=null!=B.getTitle()?B.getTitle():c.defaultFilename;(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(C))&&this.addMenuItems(q,["properties"],y)}"simple"==Editor.currentTheme&&c.menus.addMenuItems(q,["-","autosave"],y)}else B=this.editorUi.getCurrentFile(),null!=B&&B.constructor==DriveFile?+(B.isRestricted()&&this.addMenuItems(q,["exportOptionsDisabled"],y),this.addMenuItems(q,["save","-","share"],y),C=this.addMenuItem(q,"synchronize",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.drawio.com/doc/faq/synchronize"),q.addSeparator(y)):this.addMenuItems(q,["new"],y),this.addSubmenu("openFrom",q,y),isLocalStorage&&this.addSubmenu("openRecent",q,y),null!=B&&B.constructor==DriveFile?this.addMenuItems(q,"new - rename makeCopy openFolder moveToFolder".split(" "),+y):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||(q.addSeparator(y),C=this.addMenuItem(q,"synchronize",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(q,["-","save","saveAs","-"],y),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==B||this.addMenuItems(q,["share","-"],y),null!=B&&B.isRenamable()&&+this.addMenuItems(q,["rename"],y),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(q,["upload"],y):(this.addMenuItems(q,["makeCopy"],y),null!=B&&(B.constructor==OneDriveFile&&this.addMenuItems(q,["moveToFolder"],y),null!=B.getFolderUrl()&&c.menus.addMenuItems(q,["openFolder"],y)))),q.addSeparator(y),this.addSubmenu("importFrom",q,y),this.addSubmenu("exportAs",q,y),q.addSeparator(y),this.addSubmenu("embed",q,y),this.addSubmenu("publish",q,y),q.addSeparator(y),+this.addSubmenu("newLibrary",q,y),this.addSubmenu("openLibraryFrom",q,y),c.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],y),null!=B&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(C=null!=B.getTitle()?B.getTitle():c.defaultFilename,(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(C))&&this.addMenuItems(q,["-","properties"])),this.addMenuItems(q,["-","pageSetup"],y),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],y),+this.addMenuItems(q,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,y){function B(N){var O=encodeURIComponent(N.name)+(null==N.url?"":"@"+encodeURIComponent(N.url));if(!M[O]){for(var S=N.name,U=0;null!=I[S.toLowerCase()];)S=N.name+" ("+ ++U+")";null==z[O]&&(L.push({name:N.name,url:N.url,label:S,title:N.url}),I[S.toLowerCase()]=N,z[O]=N)}}for(var C=mxUtils.bind(this,function(N,O,S,U,W){var X=c.editor.graph,Z=this.styleChange(q,null!=U?U:N,[mxConstants.STYLE_FONTFAMILY,+"fontSource","FType"],[N,null!=O?encodeURIComponent(O):null,null],null,y,function(){X.setFont(N,O);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[N,null!=O?encodeURIComponent(O):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});S&&(S=document.createElement("img"),+S.className="geAdaptiveAsset",S.setAttribute("src",Editor.crossImage),S.setAttribute("title",mxResources.get("delete")),S.setAttribute("valign","absmiddle"),S.setAttribute("border","0"),S.style.position="relative",S.style.top="2px",S.style.width="14px",S.style.cursor="default",S.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(S),mxEvent.addListener(S,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(N,O);this.editorUi.hideCurrentMenu();+mxEvent.consume(Y)})));Graph.addFont(N,O);Z.firstChild.nextSibling.style.fontFamily=N;W=null!=U?U:N;null!=O&&(W+=" ("+O+")");Z.setAttribute("title",W)}),M={},T=0;T<this.defaultFonts.length;T++){var m=this.defaultFonts[T];"string"===typeof m?C(m):null!=m.fontFamily&&null!=m.fontUrl&&(M[encodeURIComponent(m.fontFamily)+"@"+encodeURIComponent(m.fontUrl)]=!0,C(m.fontFamily,m.fontUrl))}q.addSeparator(y);var z={},I={},L=[];for(T=0;T<this.customFonts.length;T++)B(this.customFonts[T]);L.sort(function(N,O){return N.label<+O.label?-1:N.label>O.label?1:0});if(0<L.length){for(T=0;T<L.length;T++)C(L[T].name,L[T].url,!0,L[T].label);q.addSeparator(y)}q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),y);q.addSeparator(y);q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var N=this.editorUi.editor.graph,O=N.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",U=null;if(N.isEditing()){var W=+N.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){O=mxUtils.getCssFontFamily(X.fontFamily);X=N.getView().getState(N.cellEditor.getEditingCell());U=null!=X?X.style.fontSource:null;for(null!=U&&(U=decodeURIComponent(U));null!=W&&W!=N.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){U=W.getAttribute("data-font-src");break}else if(W.getAttribute("face")==O){U=null;break}W=W.parentNode}null!=U&&(Graph.isGoogleFontUrl(U)?+(U=null,S="g"):S="w")}}}else X=N.getView().getState(N.getSelectionCell()),null!=X&&(O=X.style[mxConstants.STYLE_FONTFAMILY]||O,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?S="g":(S="w",U=W)));null!=U&&U.substring(0,PROXY_URL.length)==PROXY_URL&&(U=decodeURIComponent(U.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==N.cellEditor.textarea&&(Z=N.cellEditor.saveSelection());O=new FontDialog(this.editorUi,O,U,S,mxUtils.bind(this,function(Y,ba,+ea){null!=Z&&(N.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),N.isEditing())N.setFont(Y,ba);else{N.getModel().beginUpdate();try{N.stopEditing(!1),N.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),N.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),N.setCellStyles("FType",null)}finally{N.getModel().endUpdate()}}}));this.editorUi.showDialog(O.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);O.init()}),+y,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,e,f){this.ui=b;this.page=e;this.previous=this.name=f}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,e,f){this.ui=b;this.oldIndex=e;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(b,e,f){this.ui=b;this.previousPage=this.page=e;null!=e&&(this.ui.updatePageRoot(e),null!=f&&(e.viewState=f))}SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var e=this.ui.editor,f=e.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(e.getGraphXml(!0)));b.viewState=f.getViewState();b.root=f.model.root;null!=b.model&&b.model.rootChanged(b.root);f.view.clear(b.root,!0);f.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;-f.model.prefix=Editor.guid()+"-";f.model.rootChanged(b.root);f.setViewState(b.viewState);f.gridEnabled=f.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,e,f,c,k){SelectPage.call(this,b,f);this.relatedPage=e;this.index=c;this.previousIndex=null;this.noSelect=k}mxUtils.extend(ChangePage,SelectPage);+f.model.prefix=Editor.guid()+"-";f.model.rootChanged(b.root);f.setViewState(b.viewState);f.gridEnabled=f.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,e,f,c,l){SelectPage.call(this,b,f);this.relatedPage=e;this.index=c;this.previousIndex=null;this.noSelect=l}mxUtils.extend(ChangePage,SelectPage);ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};function ReplaceDiagram(b,e){this.ui=b;this.data=e}ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,e=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var f=new mxCodec(this.data.ownerDocument),c=new mxGraphModel;f.decode(this.data,c);this.data=e;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=c.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,!0);b.model.rootChanged(c.root);b.fireEvent(new mxEventObject(mxEvent.ROOT))};EditorUi.prototype.tabContainerHeight=36;EditorUi.prototype.setTabContainerVisible=function(b){this.tabContainerHeight=b?EditorUi.prototype.tabContainerHeight:0;isLocalStorage&&(mxSettings.settings.pages=0<this.tabContainerHeight,mxSettings.save());this.editor.updateGraphComponents();this.refresh()};EditorUi.prototype.isTabContainerVisible=function(){return 0<this.tabContainerHeight};EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var f=0;f<this.pages.length;f++)if(this.pages[f]==b){e=f;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var f=0;f<e.length;f++)if(e[f].getId()==b)return e[f];return null};-EditorUi.prototype.createImageForPageLink=function(b,e,f,c){var k=b.indexOf(","),p=null;0<k&&(k=this.getPageById(b.substring(k+1)),null!=k&&k!=e&&(p=this.getImageForPage(k,e,f,c),p.originalSrc=b));null==p&&(p={originalSrc:b});return p};+EditorUi.prototype.createImageForPageLink=function(b,e,f,c){var l=b.indexOf(","),n=null;0<l&&(l=this.getPageById(b.substring(l+1)),null!=l&&l!=e&&(n=this.getImageForPage(l,e,f,c),n.originalSrc=b));null==n&&(n={originalSrc:b});return n};EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,e=this.currentPage;null!=e&&(b.tooltipHandler.hide(),null==e.viewState||null==e.viewState.scrollTop||null==e.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(e.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};-EditorUi.prototype.getImageForPage=function(b,e,f,c){f=null!=f?f:this.editor.graph;var k=f.getGlobalVariable;f=this.createTemporaryGraph(f.getStylesheet());var p=this.getPageIndex(null!=e?e:this.currentPage);f.getGlobalVariable=function(u){return"pagenumber"==u?p+1:"page"==u&&null!=e?e.getName():k.apply(this,arguments)};document.body.appendChild(f.container);this.updatePageRoot(b);f.setAdaptiveColors(b.viewState.adaptiveColors);f.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=-"";c=f.getSvg(null,null,null,null,null,null,null,null,null,null,c,null,null,null,!0,!0);var q=f.getGraphBounds();document.body.removeChild(f.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(c)),q.width,q.height,q.x,q.y)};-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var q=-this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";this.tabContainer.style.visibility=0==parseInt(this.tabContainer.style.height)?"hidden":"";q!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,-function(q,u){q=u.getProperty("edit").changes;for(u=0;u<q.length;u++)if(q[u]instanceof RenamePage||q[u]instanceof ChangePage||q[u]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==q.length&&q[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var f=b.sizeDidChange,c=null,k=this;b.sizeDidChange=function(){var q=f.apply(this,arguments);null!=k.currentPage&&c!=k.currentPage&&(c=k.currentPage,k.pageSelected());return q};b.addListener(mxEvent.ROOT,mxUtils.bind(this,-function(){b.checkDefaultParent()}));var p=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",p);this.editor.addListener("pagesPatched",p);this.editor.addListener("pageRenamed",p);this.editor.addListener("pageMoved",p);this.editor.addListener("fileLoaded",p);this.editor.addListener("pageSelected",mxUtils.bind(this,function(q,u){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle();null!=-this.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(q,u){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};+EditorUi.prototype.getImageForPage=function(b,e,f,c){f=null!=f?f:this.editor.graph;var l=f.getGlobalVariable;f=this.createTemporaryGraph(f.getStylesheet());var n=this.getPageIndex(null!=e?e:this.currentPage);f.getGlobalVariable=function(u){return"pagenumber"==u?n+1:"page"==u&&null!=e?e.getName():l.apply(this,arguments)};document.body.appendChild(f.container);this.updatePageRoot(b);f.setAdaptiveColors(b.viewState.adaptiveColors);f.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=+"";c=f.getSvg(null,null,null,null,null,null,null,null,null,null,c,null,null,null,!0,!0);var p=f.getGraphBounds();document.body.removeChild(f.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(c)),p.width,p.height,p.x,p.y)};+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var p=+this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";this.tabContainer.style.visibility=0==parseInt(this.tabContainer.style.height)?"hidden":"";p!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,+function(p,u){p=u.getProperty("edit").changes;for(u=0;u<p.length;u++)if(p[u]instanceof RenamePage||p[u]instanceof ChangePage||p[u]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==p.length&&p[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var f=b.sizeDidChange,c=null,l=this;b.sizeDidChange=function(){var p=f.apply(this,arguments);null!=l.currentPage&&c!=l.currentPage&&(c=l.currentPage,l.pageSelected());return p};b.addListener(mxEvent.ROOT,mxUtils.bind(this,+function(){b.checkDefaultParent()}));var n=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",n);this.editor.addListener("pagesPatched",n);this.editor.addListener("pageRenamed",n);this.editor.addListener("pageMoved",n);this.editor.addListener("fileLoaded",n);this.editor.addListener("pageSelected",mxUtils.bind(this,function(p,u){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle();null!=+this.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(p,u){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};EditorUi.prototype.scrollToPage=function(b,e){var f=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),c=null!=b?b:this.currentPage;null!=f&&null!=this.tabScroller&&this.tabScroller.children.length>f&&null!=this.tabScroller.children[f]&&(c!=this.lastScrollPage||e)&&(this.tabScroller.children[f].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[f].className="geTab gePageTab geActivePage",this.lastScrollPage=c)};EditorUi.prototype.restoreViewState=function(b,e,f){b=null!=b?this.getPageById(b.getId()):null;var c=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(c.setViewState(e),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+e.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+e.scrollTop,c.restoreSelection(f))};-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),f=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),k=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),q=this.parseBackgroundImage(b.getAttribute("backgroundImage")),u=b.getAttribute("extFonts");if(u)try{u=u.split("|").map(function(E){E=E.split("^");return{name:E[0],url:E[1]}})}catch(E){console.log("ExtFonts format error: "+E.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:q,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(c)||isNaN(k)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:-mxSettings.getPageFormat():new mxRectangle(0,0,c,k),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:u||[]}};+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),f=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),l=parseFloat(b.getAttribute("pageHeight")),n=b.getAttribute("background"),p=this.parseBackgroundImage(b.getAttribute("backgroundImage")),u=b.getAttribute("extFonts");if(u)try{u=u.split("|").map(function(G){G=G.split("^");return{name:G[0],url:G[1]}})}catch(G){console.log("ExtFonts format error: "+G.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:p,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(c)||isNaN(l)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:+mxSettings.getPageFormat():new mxRectangle(0,0,c,l),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:u||[]}};Graph.prototype.saveViewState=function(b,e,f,c){f||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);f=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=f&&(e.setAttribute("pageWidth",f.width),e.setAttribute("pageHeight",f.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),c=this.getBackgroundImageObject(b.backgroundImage,c),null!=c&&e.setAttribute("backgroundImage",-JSON.stringify(c)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?e.removeAttribute("adaptiveColors"):e.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(k){return k.name+"^"+k.url}).join("|"))};+JSON.stringify(c)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?e.removeAttribute("adaptiveColors"):e.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(l){return l.name+"^"+l.url}).join("|"))};Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,adaptiveColors:this.adaptiveColors,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};Graph.prototype.setViewState=function(b,e){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.adaptiveColors=b.adaptiveColors;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;@@ -14493,26 +14492,26 @@ this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParthis.extFonts[e].url,!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat="undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.adaptiveColors=null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,e,f){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=e*this.view.scale+b.scrollLeft,this.container.scrollTop=f*this.view.scale+b.scrollTop)};-Graph.prototype.addExtFont=function(b,e,f){if(b&&e){var c="extFont_"+b;if(null==document.getElementById(c))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,c);else{document.getElementsByTagName("head");var k=document.createElement("style");k.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));k.setAttribute("id",c);document.getElementsByTagName("head")[0].appendChild(k)}if(!f){null==this.extFonts&&(this.extFonts=[]);f=this.extFonts;-c=!0;for(k=0;k<f.length;k++)if(f[k].name==b){c=!1;break}c&&this.extFonts.push({name:b,url:e})}}};+Graph.prototype.addExtFont=function(b,e,f){if(b&&e){var c="extFont_"+b;if(null==document.getElementById(c))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,c);else{document.getElementsByTagName("head");var l=document.createElement("style");l.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));l.setAttribute("id",c);document.getElementsByTagName("head")[0].appendChild(l)}if(!f){null==this.extFonts&&(this.extFonts=[]);f=this.extFonts;+c=!0;for(l=0;l<f.length;l++)if(f[l].name==b){c=!1;break}c&&this.extFonts.push({name:b,url:e})}}};EditorUi.prototype.updatePageRoot=function(b,e){if(null==b.root){e=this.editor.extractGraphModel(b.node,null,e);var f=Editor.extractParserError(e);if(f)throw Error(f);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),f=new mxCodec(e.ownerDocument),b.root=f.decode(e).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);if(f=Editor.extractParserError(e))throw Error(f);null!=e&&(b.graphModelNode=e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)e=new mxCell,e.setId("1"),b.root.insert(e),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};-EditorUi.prototype.updateDiagramData=function(b,e){if(null==this.getPageIndex(b.page))this.insertPage(null,null,e);else{var f=new mxCodec(b.node.ownerDocument),c=new mxGraphModel;f.decode(b.node,c);f=new mxCodec(e.ownerDocument);var k=new mxGraphModel;f.decode(e,k);this.selectPage(b.page);e=this.diffCells(c.root,k.root);this.patchPage(b.page,e,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};-EditorUi.prototype.selectPage=function(b,e,f){try{if(b!=this.currentPage){var c=this.editor.graph;c.isEditing()&&c.stopEditing(!1);e=null!=e?e:!1;c.isMouseDown=!1;c.reset();var k=c.model.createUndoableEdit();k.ignoreEdit=!0;var p=new SelectPage(this,b,f);p.execute();k.add(p);k.notify();e||c.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",k))}}catch(q){this.handleError(q)}};+EditorUi.prototype.updateDiagramData=function(b,e){if(null==this.getPageIndex(b.page))this.insertPage(null,null,e);else{var f=new mxCodec(b.node.ownerDocument),c=new mxGraphModel;f.decode(b.node,c);f=new mxCodec(e.ownerDocument);var l=new mxGraphModel;f.decode(e,l);this.selectPage(b.page);e=this.diffCells(c.root,l.root);this.patchPage(b.page,e,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};+EditorUi.prototype.selectPage=function(b,e,f){try{if(b!=this.currentPage){var c=this.editor.graph;c.isEditing()&&c.stopEditing(!1);e=null!=e?e:!1;c.isMouseDown=!1;c.reset();var l=c.model.createUndoableEdit();l.ignoreEdit=!0;var n=new SelectPage(this,b,f);n.execute();l.add(n);l.notify();e||c.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",l))}}catch(p){this.handleError(p)}};EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),b?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(b,e,f){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),f),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};EditorUi.prototype.createPage=function(b,e,f){e=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e,f);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var f=this.pages[e].getName();null!=f&&0<f.length&&(b[f]=f)}e=this.pages.length;do f=mxResources.get("pageWithNumber",[++e]);while(null!=b[f]);return f};-EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,f=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=f){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(f==this.pages.length-1?f--:f++,c=this.pages[f]):1>=this.pages.length&&(c=this.insertPage(),e.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,c))}finally{e.model.endUpdate()}}}catch(k){this.handleError(k)}return b};-EditorUi.prototype.duplicatePage=function(b,e){var f=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var k=b.node.cloneNode(!1);k.removeAttribute("id");var p={},q=c.createCellLookup([c.model.root]);f=new DiagramPage(k);f.root=c.cloneCell(c.model.root,null,p);var u=new mxGraphModel;u.prefix=Editor.guid()+"-";u.setRoot(f.root);c.updateCustomLinks(c.createCellMapping(p,q),[f.root]);f.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(f);-f.viewState.scale=1;delete f.viewState.scrollLeft;delete f.viewState.scrollTop;delete f.viewState.currentRoot;delete f.viewState.defaultParent;f.setName(e);f=this.insertPage(f,mxUtils.indexOf(this.pages,b)+1)}}catch(E){this.handleError(E)}return f};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};-EditorUi.prototype.clonePages=function(b){for(var e=[],f=[],c=0;c<b.length;c++)try{f.push(this.clonePage(b[c]))}catch(k){e.push(mxResources.get("pageWithNumber",[c+1])+": "+k.toString())}if(0<e.length){b=Error(e.join("\n"));try{0<f.length&&(b.fallbackFileData=this.getXmlForPages(f))}catch(k){}throw b;}return f};+EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,f=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=f){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(f==this.pages.length-1?f--:f++,c=this.pages[f]):1>=this.pages.length&&(c=this.insertPage(),e.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,c))}finally{e.model.endUpdate()}}}catch(l){this.handleError(l)}return b};+EditorUi.prototype.duplicatePage=function(b,e){var f=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var l=b.node.cloneNode(!1);l.removeAttribute("id");var n={},p=c.createCellLookup([c.model.root]);f=new DiagramPage(l);f.root=c.cloneCell(c.model.root,null,n);var u=new mxGraphModel;u.prefix=Editor.guid()+"-";u.setRoot(f.root);c.updateCustomLinks(c.createCellMapping(n,p),[f.root]);f.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(f);+f.viewState.scale=1;delete f.viewState.scrollLeft;delete f.viewState.scrollTop;delete f.viewState.currentRoot;delete f.viewState.defaultParent;f.setName(e);f=this.insertPage(f,mxUtils.indexOf(this.pages,b)+1)}}catch(G){this.handleError(G)}return f};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};+EditorUi.prototype.clonePages=function(b){for(var e=[],f=[],c=0;c<b.length;c++)try{f.push(this.clonePage(b[c]))}catch(l){e.push(mxResources.get("pageWithNumber",[c+1])+": "+l.toString())}if(0<e.length){b=Error(e.join("\n"));try{0<f.length&&(b.fallbackFileData=this.getXmlForPages(f))}catch(l){}throw b;}return f};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),f=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(f,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);e.diagramModified=b.diagramModified;return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(f){null!=f&&0<f.length&&this.editor.graph.model.execute(new RenamePage(this,b,f))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer geTabItem";return b};-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.className="geTabScroller";for(var f=null,c=0;c<this.pages.length;c++)mxUtils.bind(this,function(k,p){p.className=this.pages[k]==this.currentPage?"geTab gePageTab geActivePage":"geTab gePageTab geInactivePage";p.setAttribute("draggable","true");mxEvent.addListener(p,"dragstart",mxUtils.bind(this,function(q){b.isEnabled()?(mxClient.IS_FF&&q.dataTransfer.setData("Text",-"<diagram/>"),f=k):mxEvent.consume(q)}));mxEvent.addListener(p,"dragend",mxUtils.bind(this,function(q){f=null;q.stopPropagation();q.preventDefault()}));mxEvent.addListener(p,"dragover",mxUtils.bind(this,function(q){null!=f&&(q.dataTransfer.dropEffect="move");q.stopPropagation();q.preventDefault()}));mxEvent.addListener(p,"drop",mxUtils.bind(this,function(q){null!=f&&k!=f&&this.movePage(f,k);q.stopPropagation();q.preventDefault()}));e.appendChild(p)})(c,this.createTabForPage(this.pages[c],c+1));c=+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.className="geTabScroller";for(var f=null,c=0;c<this.pages.length;c++)mxUtils.bind(this,function(l,n){n.className=this.pages[l]==this.currentPage?"geTab gePageTab geActivePage":"geTab gePageTab geInactivePage";n.setAttribute("draggable","true");mxEvent.addListener(n,"dragstart",mxUtils.bind(this,function(p){b.isEnabled()?(mxClient.IS_FF&&p.dataTransfer.setData("Text",+"<diagram/>"),f=l):mxEvent.consume(p)}));mxEvent.addListener(n,"dragend",mxUtils.bind(this,function(p){f=null;p.stopPropagation();p.preventDefault()}));mxEvent.addListener(n,"dragover",mxUtils.bind(this,function(p){null!=f&&(p.dataTransfer.dropEffect="move");p.stopPropagation();p.preventDefault()}));mxEvent.addListener(n,"drop",mxUtils.bind(this,function(p){null!=f&&l!=f&&this.movePage(f,l);p.stopPropagation();p.preventDefault()}));e.appendChild(n)})(c,this.createTabForPage(this.pages[c],c+1));c=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(e);this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());this.leftScrollTab=this.createLeftScrollTab();this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);-this.tabScroller=e;this.tabScroller.scrollLeft=c;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(k){this.checkTabScrollerOverflow()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.leftScrollTab.style,"transition","all 0.2s linear");mxUtils.setPrefixedStyle(this.rightScrollTab.style,"transition","all 0.2s linear")}),0)}};+this.tabScroller=e;this.tabScroller.scrollLeft=c;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(l){this.checkTabScrollerOverflow()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.leftScrollTab.style,"transition","all 0.2s linear");mxUtils.setPrefixedStyle(this.rightScrollTab.style,"transition","all 0.2s linear")}),0)}};EditorUi.prototype.checkTabScrollerOverflow=function(){null!=this.tabScroller&&null!=this.tabContainer&&2<this.tabContainer.children.length&&(this.tabScroller.scrollWidth>this.tabScroller.offsetWidth?(this.leftScrollTab.style.display="",this.rightScrollTab.style.display="",0==this.tabScroller.scrollLeft?this.leftScrollTab.classList.add("geDisabledControlTab"):this.leftScrollTab.classList.remove("geDisabledControlTab"),Math.ceil(this.tabScroller.scrollLeft)+this.tabScroller.offsetWidth>=this.tabScroller.scrollWidth?this.rightScrollTab.classList.add("geDisabledControlTab"):this.rightScrollTab.classList.remove("geDisabledControlTab")):(this.leftScrollTab.style.display="none",this.rightScrollTab.style.display="none"))};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};EditorUi.prototype.createTab=function(){var b=document.createElement("div");b.className="geTab";return b};EditorUi.prototype.getShortPageName=function(b){var e=null;null!=b&&(e=b.getName(),null!=e&&36<e.length&&(e=e.substring(0,34)+"..."));return e};@@ -14520,157 +14519,157 @@ EditorUi.prototype.createControlTab=function(b,e,f){var c=this.createTab();c.claEditorUi.prototype.createPageInsertTab=function(){return this.createControlTab(mxResources.get("insertPage"),Editor.plusImage,mxUtils.bind(this,function(b){try{this.insertPage()}catch(e){this.handleError(e)}mxEvent.consume(b)}))};EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(null,Editor.thinArrowLeftImage,mxUtils.bind(this,function(b){var e=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:-e,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft-=e;mxEvent.consume(b)}))};EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.thinArrowRightImage,mxUtils.bind(this,function(b){var e=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:e,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=e;mxEvent.consume(b)}))};-EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.verticalDotsImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(mxUtils.bind(this,function(k,p){this.menus.get("pages").funct(k,p)}));e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);e.destroy()});var f=mxEvent.getClientX(b),-c=mxEvent.getClientY(b);e.popup(f,c,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var f=this.createTab(),c=b.getName()||mxResources.get("untitled"),k=b.getId();f.setAttribute("title",c+(null!=k?" ("+k+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,c);f.appendChild(e);this.addTabListeners(b,f);return f};-EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var f=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(E){this.renamePage(b);mxEvent.consume(E)}));var c=document.createElement("div");c.className="geTabMenuButton";c.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";c.style.backgroundSize="10px";e.appendChild(c);var k=!1,p=!1,q=mxUtils.bind(this,-function(E){k=null!=this.currentMenu;p=b==this.currentPage;this.scrollToPage(b);f.isMouseDown||p||this.selectPage(b)}),u=mxUtils.bind(this,function(E){if(f.isEnabled()&&!f.isMouseDown&&(p&&(mxEvent.isTouchEvent(E)||mxEvent.getSource(E)==c)||mxEvent.isPopupTrigger(E))&&(f.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(E)||!k)){var H=new mxPopupMenu(this.createPageMenu(b));H.div.className+=" geMenubarMenu";H.smartSeparators=!0;H.showDisabled=!0;H.autoExpand=!0;H.hideMenu=mxUtils.bind(this,-function(){mxPopupMenu.prototype.hideMenu.apply(H,arguments);this.resetCurrentMenu();H.destroy()});var D=mxEvent.getClientX(E),L=mxEvent.getClientY(E);H.popup(D,L,null,E);this.setCurrentMenu(H,e)}mxEvent.consume(E)});mxEvent.addGestureListeners(c,q,null,u);mxEvent.addGestureListeners(e,q,null,u)};+EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.verticalDotsImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(mxUtils.bind(this,function(l,n){this.menus.get("pages").funct(l,n)}));e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);e.destroy()});var f=mxEvent.getClientX(b),+c=mxEvent.getClientY(b);e.popup(f,c,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var f=this.createTab(),c=b.getName()||mxResources.get("untitled"),l=b.getId();f.setAttribute("title",c+(null!=l?" ("+l+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,c);f.appendChild(e);this.addTabListeners(b,f);return f};+EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var f=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(G){this.renamePage(b);mxEvent.consume(G)}));var c=document.createElement("div");c.className="geTabMenuButton";c.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";c.style.backgroundSize="10px";e.appendChild(c);var l=!1,n=!1,p=mxUtils.bind(this,+function(G){l=null!=this.currentMenu;n=b==this.currentPage;this.scrollToPage(b);f.isMouseDown||n||this.selectPage(b)}),u=mxUtils.bind(this,function(G){if(f.isEnabled()&&!f.isMouseDown&&(n&&(mxEvent.isTouchEvent(G)||mxEvent.getSource(G)==c)||mxEvent.isPopupTrigger(G))&&(f.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(G)||!l)){var H=new mxPopupMenu(this.createPageMenu(b));H.div.className+=" geMenubarMenu";H.smartSeparators=!0;H.showDisabled=!0;H.autoExpand=!0;H.hideMenu=mxUtils.bind(this,+function(){mxPopupMenu.prototype.hideMenu.apply(H,arguments);this.resetCurrentMenu();H.destroy()});var F=mxEvent.getClientX(G),K=mxEvent.getClientY(G);H.popup(F,K,null,G);this.setCurrentMenu(H,e)}mxEvent.consume(G)});mxEvent.addGestureListeners(c,p,null,u);mxEvent.addGestureListeners(e,p,null,u)};EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(f,c){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||f.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),c));f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),c);f.addSeparator(c);this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",f,c,mxResources.get("move"));f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c);f.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,e)}),c)})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.oldIndex;c.oldIndex=c.newIndex;c.newIndex=e;return c};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.previous;c.previous=c.name;c.name=e;return c};mxCodecRegistry.register(b)})();-(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(e,f,c){c.setAttribute("relatedPage",f.relatedPage.getId());null==f.index&&(c.setAttribute("name",f.relatedPage.getName()),null!=f.relatedPage.viewState&&c.setAttribute("viewState",JSON.stringify(f.relatedPage.viewState,function(k,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,k)?p:void 0})),null!=f.relatedPage.root&&e.encodeCell(f.relatedPage.root,c));return c};-b.beforeDecode=function(e,f,c){c.ui=e.ui;c.relatedPage=c.ui.getPageById(f.getAttribute("relatedPage"));if(null==c.relatedPage){var k=f.ownerDocument.createElement("diagram");k.setAttribute("id",f.getAttribute("relatedPage"));k.setAttribute("name",f.getAttribute("name"));c.relatedPage=new DiagramPage(k);k=f.getAttribute("viewState");null!=k&&(c.relatedPage.viewState=JSON.parse(k),f.removeAttribute("viewState"));f=f.cloneNode(!0);k=f.firstChild;if(null!=k)for(c.relatedPage.root=e.decodeCell(k,!1),c=-k.nextSibling,k.parentNode.removeChild(k),k=c;null!=k;){c=k.nextSibling;if(k.nodeType==mxConstants.NODETYPE_ELEMENT){var p=k.getAttribute("id");null==e.lookup(p)&&e.decodeCell(k)}k.parentNode.removeChild(k);k=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,k,p,q,u){k=null!=k?k:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var E=p.slice(),H=0;H<p.length;H++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[H]),"treeFolding","0")&&this.foldTreeCell(c,p[H]);p=E;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=function(c,k){this.model.beginUpdate();try{var p=-[];this.traverse(k,!0,mxUtils.bind(this,function(u,E){var H=null!=E&&this.isTreeEdge(E);H&&p.push(E);u==k||null!=E&&!H||p.push(u);return(null==E||H)&&(u==k||!this.model.isCollapsed(u))}));this.model.setCollapsed(k,c);for(var q=0;q<p.length;q++)this.model.setVisible(p[q],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,k,p,q,u,E){return this.model.filterCells(this.getEdges(c,k,p,q,u,E),mxUtils.bind(this,-function(H){return this.isTreeEdge(H)}))};Graph.prototype.getIncomingTreeEdges=function(c,k){return this.getTreeEdges(c,k,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,k){return this.getTreeEdges(c,k,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(B){return m.isVertex(B)&&p(B)}function k(B){var M=!1;null!=B&&(M="1"==-g.getCurrentCellStyle(B).treeMoving);return M}function p(B){var M=!1;null!=B&&(B=m.getParent(B),M=g.view.getState(B),M="tree"==(null!=M?M.style:g.getCellStyle(B)).containerType);return M}function q(B){var M=!1;null!=B&&(B=m.getParent(B),M=g.view.getState(B),g.view.getState(B),M=null!=(null!=M?M.style:g.getCellStyle(B)).childLayout);return M}function u(B){B=g.view.getState(B);if(null!=B){var M=g.getIncomingTreeEdges(B.cell);if(0<M.length&&(M=g.view.getState(M[0]),null!=M&&(M=M.absolutePoints,null!=-M&&0<M.length&&(M=M[M.length-1],null!=M)))){if(M.y==B.y&&Math.abs(M.x-B.getCenterX())<B.width/2)return mxConstants.DIRECTION_SOUTH;if(M.y==B.y+B.height&&Math.abs(M.x-B.getCenterX())<B.width/2)return mxConstants.DIRECTION_NORTH;if(M.x>B.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function E(B,M){M=null!=M?M:!0;g.model.beginUpdate();try{var S=g.model.getParent(B),l=g.getIncomingTreeEdges(B),x=g.cloneCells([l[0],B]);g.model.setTerminal(x[0],g.model.getTerminal(l[0],-!0),!0);var F=u(B),N=S.geometry;F==mxConstants.DIRECTION_SOUTH||F==mxConstants.DIRECTION_NORTH?x[1].geometry.x+=M?B.geometry.width+10:-x[1].geometry.width-10:x[1].geometry.y+=M?B.geometry.height+10:-x[1].geometry.height-10;g.view.currentRoot!=S&&(x[1].geometry.x-=N.x,x[1].geometry.y-=N.y);var O=g.view.getState(B),Q=g.view.scale;if(null!=O){var V=mxRectangle.fromRectangle(O);F==mxConstants.DIRECTION_SOUTH||F==mxConstants.DIRECTION_NORTH?V.x+=(M?B.geometry.width+10:-x[1].geometry.width-10)*Q:V.y+=(M?-B.geometry.height+10:-x[1].geometry.height-10)*Q;var T=g.getOutgoingTreeEdges(g.model.getTerminal(l[0],!0));if(null!=T){for(var W=F==mxConstants.DIRECTION_SOUTH||F==mxConstants.DIRECTION_NORTH,X=N=l=0;X<T.length;X++){var Y=g.model.getTerminal(T[X],!1);if(F==u(Y)){var Z=g.view.getState(Y);Y!=B&&null!=Z&&(W&&M!=Z.getCenterX()<O.getCenterX()||!W&&M!=Z.getCenterY()<O.getCenterY())&&mxUtils.intersects(V,Z)&&(l=10+Math.max(l,(Math.min(V.x+V.width,Z.x+Z.width)-Math.max(V.x,Z.x))/Q),N=10+Math.max(N,(Math.min(V.y+-V.height,Z.y+Z.height)-Math.max(V.y,Z.y))/Q))}}W?N=0:l=0;for(X=0;X<T.length;X++)if(Y=g.model.getTerminal(T[X],!1),F==u(Y)&&(Z=g.view.getState(Y),Y!=B&&null!=Z&&(W&&M!=Z.getCenterX()<O.getCenterX()||!W&&M!=Z.getCenterY()<O.getCenterY()))){var aa=[];g.traverse(Z.cell,!0,function(ea,ca){var da=null!=ca&&g.isTreeEdge(ca);da&&aa.push(ca);(null==ca||da)&&aa.push(ea);return null==ca||da});g.moveCells(aa,(M?1:-1)*l,(M?1:-1)*N)}}}return g.addCells(x,S)}finally{g.model.endUpdate()}}function H(B){g.model.beginUpdate();-try{var M=u(B),S=g.getIncomingTreeEdges(B),l=g.cloneCells([S[0],B]);g.model.setTerminal(S[0],l[1],!1);g.model.setTerminal(l[0],l[1],!0);g.model.setTerminal(l[0],B,!1);var x=g.model.getParent(B),F=x.geometry,N=[];g.view.currentRoot!=x&&(l[1].geometry.x-=F.x,l[1].geometry.y-=F.y);g.traverse(B,!0,function(V,T){var W=null!=T&&g.isTreeEdge(T);W&&N.push(T);(null==T||W)&&N.push(V);return null==T||W});var O=B.geometry.width+40,Q=B.geometry.height+40;M==mxConstants.DIRECTION_SOUTH?O=0:M==mxConstants.DIRECTION_NORTH?-(O=0,Q=-Q):M==mxConstants.DIRECTION_WEST?(O=-O,Q=0):M==mxConstants.DIRECTION_EAST&&(Q=0);g.moveCells(N,O,Q);return g.addCells(l,x)}finally{g.model.endUpdate()}}function D(B,M){g.model.beginUpdate();try{var S=g.model.getParent(B),l=g.getIncomingTreeEdges(B),x=u(B);0==l.length&&(l=[g.createEdge(S,null,"",null,null,g.createCurrentEdgeStyle())],x=M);var F=g.cloneCells([l[0],B]);g.model.setTerminal(F[0],B,!0);null==g.model.getTerminal(F[0],!1)&&(g.model.setTerminal(F[0],F[1],!1),g.applyNewEdgeStyle(F[1],-[F[0]],x));l=g.getOutgoingTreeEdges(B);var N=S.geometry;M=[];g.view.currentRoot==S&&(N=new mxRectangle);for(var O=0;O<l.length;O++){var Q=g.model.getTerminal(l[O],!1);null!=Q&&M.push(Q)}var V=g.view.getBounds(M),T=g.view.translate,W=g.view.scale;x==mxConstants.DIRECTION_SOUTH?(F[1].geometry.x=null==V?B.geometry.x+(B.geometry.width-F[1].geometry.width)/2:(V.x+V.width)/W-T.x-N.x+10,F[1].geometry.y+=F[1].geometry.height-N.y+40):x==mxConstants.DIRECTION_NORTH?(F[1].geometry.x=null==V?B.geometry.x+(B.geometry.width--F[1].geometry.width)/2:(V.x+V.width)/W-T.x+-N.x+10,F[1].geometry.y-=F[1].geometry.height+N.y+40):(F[1].geometry.x=x==mxConstants.DIRECTION_WEST?F[1].geometry.x-(F[1].geometry.width+N.x+40):F[1].geometry.x+(F[1].geometry.width-N.x+40),F[1].geometry.y=null==V?B.geometry.y+(B.geometry.height-F[1].geometry.height)/2:(V.y+V.height)/W-T.y+-N.y+10);return g.addCells(F,S)}finally{g.model.endUpdate()}}function L(B,M,S){B=g.getOutgoingTreeEdges(B);S=g.view.getState(S);var l=[];if(null!=S&&null!=B){for(var x=-0;x<B.length;x++){var F=g.view.getState(g.model.getTerminal(B[x],!1));null!=F&&(!M&&Math.min(F.x+F.width,S.x+S.width)>=Math.max(F.x,S.x)||M&&Math.min(F.y+F.height,S.y+S.height)>=Math.max(F.y,S.y))&&l.push(F)}l.sort(function(N,O){return M?N.x+N.width-O.x-O.width:N.y+N.height-O.y-O.height})}return l}function G(B,M){var S=u(B),l=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;(S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST)==l&&S!=M?d.actions.get("selectParent").funct():S==-M?(M=g.getOutgoingTreeEdges(B),null!=M&&0<M.length&&g.setSelectionCell(g.model.getTerminal(M[0],!1))):(S=g.getIncomingTreeEdges(B),null!=S&&0<S.length&&(l=L(g.model.getTerminal(S[0],!0),l,B),B=g.view.getState(B),null!=B&&(B=mxUtils.indexOf(l,B),0<=B&&(B+=M==mxConstants.DIRECTION_NORTH||M==mxConstants.DIRECTION_WEST?-1:1,0<=B&&B<=l.length-1&&g.setSelectionCell(l[B].cell)))))}var d=this,g=d.editor.graph,m=g.getModel(),t=d.menus.createPopupMenu;d.menus.createPopupMenu=function(B,M,S){t.apply(this,arguments);-if(1==g.getSelectionCount()){M=g.getSelectionCell();var l=g.getOutgoingTreeEdges(M);B.addSeparator();0<l.length&&(c(g.getSelectionCell())&&this.addMenuItems(B,["selectChildren"],null,S),this.addMenuItems(B,["selectDescendants"],null,S));c(g.getSelectionCell())?(B.addSeparator(),0<g.getIncomingTreeEdges(M).length&&this.addMenuItems(B,["selectSiblings","selectParent"],null,S)):0<g.model.getEdgeCount(M)&&this.addMenuItems(B,["selectConnections"],null,S)}};d.actions.addAction("selectChildren",function(B){if(g.isEnabled()&&-1==g.getSelectionCount()){var M=g.getSelectionCell();B=mxEvent.isControlDown(B)?null:g.getOutgoingTreeEdges(M);if(null!=B&&0<B.length){M=[];for(var S=0;S<B.length;S++)M.push(g.model.getTerminal(B[S],!1));g.setSelectionCells(M)}else g.setSelectionCells(g.model.getChildren(M))}},null,null,"Alt+Shift+C");d.actions.addAction("selectDescendants",function(B){var M=g.getSelectionCell();if(g.isEnabled()&&null!=M){var S=[];mxEvent.isControlDown(B)||g.traverse(M,!0,function(l,x){var F=null!=x&&g.isTreeEdge(x);-F&&mxEvent.isControlDown(B)&&S.push(x);(null==x||F)&&S.push(l);return null==x||F});if(0==S.length||1==S.length&&S[0]==M)S=g.model.getDescendants(M);g.setSelectionCells(S)}},null,null,"Alt+Shift+X");d.actions.addAction("selectParent",function(B){var M=g.getSelectionCell();g.isEnabled()&&null!=M&&(B=mxEvent.isControlDown(B)?null:g.getIncomingTreeEdges(M),null!=B&&0<B.length?g.setSelectionCell(g.model.getTerminal(B[0],!0)):g.selectParentCell())},null,null,"Alt+Shift+P");d.actions.addAction("selectSiblings",-function(B){if(g.isEnabled()&&1==g.getSelectionCount()){var M=g.getSelectionCell(),S=mxEvent.isControlDown(B)?null:g.getIncomingTreeEdges(M);B=[];if(null!=S&&0<S.length&&(S=g.getOutgoingTreeEdges(g.model.getTerminal(S[0],!0)),null!=S))for(var l=0;l<S.length;l++)B.push(g.model.getTerminal(S[l],!1));0==B.length&&(B=g.model.getChildren(g.model.getParent(M)));g.setSelectionCells(B)}},null,null,"Alt+Shift+S");var v=g.removeCells;g.removeCells=function(B,M){M=null!=M?M:!0;null==B&&(B=this.getDeletableCells(this.getSelectionCells()));-M&&(B=this.getDeletableCells(this.addAllEdges(B)));for(var S=[],l=0;l<B.length;l++){var x=B[l];m.isEdge(x)&&p(x)&&(S.push(x),x=m.getTerminal(x,!1));if(c(x)){var F=[];g.traverse(x,!0,function(N,O){var Q=null!=O&&g.isTreeEdge(O);Q&&F.push(O);(null==O||Q)&&F.push(N);return null==O||Q});0<F.length&&(S=S.concat(F),x=g.getIncomingTreeEdges(B[l]),B=B.concat(x))}else null!=x&&S.push(B[l])}B=S;return v.apply(this,arguments)};d.hoverIcons.getStateAt=function(B,M,S){return c(B.cell)?null:this.graph.view.getState(this.graph.getCellAt(M,-S))};var y=g.duplicateCells;g.duplicateCells=function(B,M){B=null!=B?B:this.getSelectionCells();for(var S=B.slice(0),l=0;l<S.length;l++){var x=g.view.getState(S[l]);if(null!=x&&c(x.cell)){var F=g.getIncomingTreeEdges(x.cell);for(x=0;x<F.length;x++)mxUtils.remove(F[x],B)}}this.model.beginUpdate();try{var N=y.call(this,B,M);if(N.length==B.length)for(l=0;l<B.length;l++)if(c(B[l])){var O=g.getIncomingTreeEdges(N[l]);F=g.getIncomingTreeEdges(B[l]);if(0==O.length&&0<F.length){var Q=this.cloneCell(F[0]);-this.addEdge(Q,g.getDefaultParent(),this.model.getTerminal(F[0],!0),N[l])}}}finally{this.model.endUpdate()}return N};var C=g.moveCells;g.moveCells=function(B,M,S,l,x,F,N){for(var O=null,Q=[],V=0;V<B.length;V++)(k(B[V])||c(B[V]))&&!q(B[V])&&this.isCellCollapsed(B[V])?Q=Q.concat(this.getSubtree(B[V])):Q.push(B[V]);B=mxUtils.removeDuplicates(Q);this.model.beginUpdate();try{Q=x;var T=this.getCurrentCellStyle(x);if(null!=B&&c(x)&&"1"==mxUtils.getValue(T,"treeFolding","0")){for(V=0;V<B.length;V++)if(c(B[V])||-g.model.isEdge(B[V])&&null==g.model.getTerminal(B[V],!0)){x=g.model.getParent(B[V]);break}if(null!=Q&&x!=Q&&null!=this.view.getState(B[0])){var W=g.getIncomingTreeEdges(B[0]);if(0<W.length){var X=g.view.getState(g.model.getTerminal(W[0],!0));if(null!=X){var Y=g.view.getState(Q);null!=Y&&(M=(Y.getCenterX()-X.getCenterX())/g.view.scale,S=(Y.getCenterY()-X.getCenterY())/g.view.scale)}}}}O=C.apply(this,arguments);if(null!=O&&null!=B&&O.length==B.length)for(V=0;V<O.length;V++)if(this.model.isEdge(O[V]))c(Q)&&-0>mxUtils.indexOf(O,this.model.getTerminal(O[V],!0))&&this.model.setTerminal(O[V],Q,!0);else if(c(B[V])&&(W=g.getIncomingTreeEdges(B[V]),0<W.length))if(!l)c(Q)&&0>mxUtils.indexOf(B,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],Q,!0);else if(0==g.getIncomingTreeEdges(O[V]).length){T=Q;if(null==T||T==g.model.getParent(B[V]))T=g.model.getTerminal(W[0],!0);l=this.cloneCell(W[0]);this.addEdge(l,g.getDefaultParent(),T,O[V])}}finally{this.model.endUpdate()}return O};if(null!=d.sidebar){var I=-d.sidebar.dropAndConnect;d.sidebar.dropAndConnect=function(B,M,S,l){var x=g.model,F=null;x.beginUpdate();try{if(F=I.apply(this,arguments),c(B))for(var N=0;N<F.length;N++)if(x.isEdge(F[N])&&null==x.getTerminal(F[N],!0)){x.setTerminal(F[N],B,!0);var O=g.getCellGeometry(F[N]);O.points=null;null!=O.getTerminalPoint(!0)&&O.setTerminalPoint(null,!0)}}finally{x.endUpdate()}return F}}var K={67:d.actions.get("selectChildren"),88:d.actions.get("selectDescendants"),80:d.actions.get("selectParent"),83:d.actions.get("selectSiblings")},-J={67:d.actions.get("copyStyle"),86:d.actions.get("pasteStyle")},U=d.onKeyDown;d.onKeyDown=function(B){try{var M=g.getSelectionCell();if(g.isEnabled()&&!g.isEditing()&&null!=M){var S=mxEvent.isAltDown(B)&&mxEvent.isShiftDown(B)?K[B.keyCode]:mxEvent.isAltDown(B)?J[B.keyCode]:null;null!=S?(S.funct(B),mxEvent.consume(B)):c(M)&&(S=null,0<g.getIncomingTreeEdges(M).length&&(9==B.which?S=mxEvent.isShiftDown(B)?H(M):D(M):13==B.which&&(S=E(M,!mxEvent.isShiftDown(B)))),null!=S&&0<S.length?(1==S.length&&g.model.isEdge(S[0])?-g.setSelectionCell(g.model.getTerminal(S[0],!1)):g.setSelectionCell(S[S.length-1]),null!=d.hoverIcons&&d.hoverIcons.update(g.view.getState(M)),g.startEditingAtCell(M),mxEvent.consume(B)):37==B.keyCode?(G(M,mxConstants.DIRECTION_WEST),mxEvent.consume(B)):38==B.keyCode?(G(M,mxConstants.DIRECTION_NORTH),mxEvent.consume(B)):39==B.keyCode?(G(M,mxConstants.DIRECTION_EAST),mxEvent.consume(B)):40==B.keyCode&&(G(M,mxConstants.DIRECTION_SOUTH),mxEvent.consume(B)))}}catch(l){d.handleError(l)}mxEvent.isConsumed(B)||-U.apply(this,arguments)};var P=g.connectVertex;g.connectVertex=function(B,M,S,l,x,F,N){var O=g.getIncomingTreeEdges(B);if(c(B)){var Q=u(B),V=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,T=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;return Q==M||0==O.length?D(B,M):V==T?H(B):E(B,M!=mxConstants.DIRECTION_NORTH&&M!=mxConstants.DIRECTION_WEST)}return P.apply(this,arguments)};g.getSubtree=function(B){var M=[B];!k(B)&&!c(B)||q(B)||g.traverse(B,!0,function(S,l){var x=null!=-l&&g.isTreeEdge(l);x&&0>mxUtils.indexOf(M,l)&&M.push(l);(null==l||x)&&0>mxUtils.indexOf(M,S)&&M.push(S);return null==l||x});return M};var R=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){R.apply(this,arguments);(k(this.state.cell)||c(this.state.cell))&&!q(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",-"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(B){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(B),mxEvent.getClientY(B),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=-mxEvent.isMouseEvent(B);this.graph.isMouseDown=!0;d.hoverIcons.reset();mxEvent.consume(B)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var n=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){n.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:-0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var z=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(B){z.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=B?"":"none")};var A=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(B,M){A.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=-null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),k=this.graph,p=this;return c.concat([this.addEntry("tree container",function(){var q=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");q.vertex=!0;var u=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');-u.vertex=!0;var E=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);E.insertEdge(H,!1);q.insert(H);q.insert(u);q.insert(E);-return p.createVertexTemplateFromCells([q],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var q=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");q.vertex=!0;var u=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-u.vertex=!0;var E=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');E.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");-H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);E.insertEdge(H,!1);var D=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-D.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),H.style);L.geometry.relative=!0;L.edge=!0;u.insertEdge(L,!0);D.insertEdge(L,!1);var G=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-G.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),H.style);d.geometry.relative=!0;d.edge=!0;u.insertEdge(d,!0);G.insertEdge(d,!1);var g=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),H.style);m.geometry.relative=!0;m.edge=!0;u.insertEdge(m,!0);g.insertEdge(m,!1);q.insert(H);q.insert(L);q.insert(d);q.insert(m);q.insert(u);q.insert(E);q.insert(D);q.insert(G);q.insert(g);return p.createVertexTemplateFromCells([q],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var q=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');-q.vertex=!0;return p.createVertexTemplateFromCells([q],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var q=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-q.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");u.geometry.setTerminalPoint(new mxPoint(-40,40),!0);u.geometry.relative=!0;u.edge=!0;q.insertEdge(u,!1);return p.createVertexTemplateFromCells([q,u],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var q=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),-'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');q.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");-u.geometry.setTerminalPoint(new mxPoint(-40,40),!0);u.geometry.relative=!0;u.edge=!0;q.insertEdge(u,!1);return p.createVertexTemplateFromCells([q,u],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree orgchart organization division",function(){var q=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.vertex=!0;var u=new mxCell("Organization",new mxGeometry(80,-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');k.setAttributeForCell(u,"treeRoot","1");u.vertex=!0;var E=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);E.insertEdge(H,!1);var D=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");L.geometry.relative=-!0;L.edge=!0;u.insertEdge(L,!0);D.insertEdge(L,!1);q.insert(H);q.insert(L);q.insert(u);q.insert(E);q.insert(D);return p.createVertexTemplateFromCells([q],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree root",function(){var q=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');k.setAttributeForCell(q,"treeRoot","1");q.vertex=!0;return p.createVertexTemplateFromCells([q],-q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree division",function(){var q=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-u.geometry.setTerminalPoint(new mxPoint(0,0),!0);u.geometry.relative=!0;u.edge=!0;q.insertEdge(u,!1);return p.createVertexTemplateFromCells([q,u],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree sub sections",function(){var q=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");q.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");-u.geometry.setTerminalPoint(new mxPoint(110,-40),!0);u.geometry.relative=!0;u.edge=!0;q.insertEdge(u,!1);var E=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");E.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),u.style);H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=!0;H.edge=!0;E.insertEdge(H,!1);return p.createVertexTemplateFromCells([u,H,q,E],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;-EditorUi.initMinimalTheme=function(){function b(G,d){if(EditorUi.windowed){var g=G.editor.graph;g.popupMenuHandler.hideMenu();null==G.formatWindow?(d=Math.max(10,G.diagramContainer.clientWidth-248),g=Math.min(566,g.container.clientHeight-10),G.formatWindow=new WrapperWindow(G,mxResources.get("format"),d,60,240,g,function(m){G.createFormat(m).init()}),G.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){G.formatWindow.window.fit()})),G.formatWindow.window.minimumSize=new mxRectangle(0,-0,240,80)):G.formatWindow.window.setVisible(null!=d?d:!G.formatWindow.window.isVisible())}else null==G.formatElt&&(G.formatElt=G.createSidebarContainer(),G.createFormat(G.formatElt).init(),G.formatElt.style.border="none",G.formatElt.style.width="240px",G.formatElt.style.borderLeftWidth="1px",G.formatElt.style.borderLeftStyle="solid",G.formatElt.style.right="0px"),g=G.diagramContainer.parentNode,null!=G.formatElt.parentNode?(G.formatElt.parentNode.removeChild(G.formatElt),g.style.right="0px"):(g.parentNode.appendChild(G.formatElt),-g.style.right=G.formatElt.style.width)}function e(G,d){function g(v,y){var C=G.menus.get(v);v=m.addMenu(y,mxUtils.bind(this,function(){C.funct.apply(this,arguments)}));v.setAttribute("title",y);v.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";v.className="geTitle";d.appendChild(v);return v}var m=new Menubar(G,d);if(Editor.enableCustomLibraries&&-("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=G.actions.get("newLibrary")){var t=document.createElement("div");t.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";t.className="geTitle";mxUtils.write(t,mxResources.get("newLibrary"));d.appendChild(t);mxEvent.addListener(t,"click",this.actions.get("newLibrary").funct);-t=t.cloneNode(!1);t.style.left="50%";t.style.borderLeftStyle="solid";mxUtils.write(t,mxResources.get("openLibrary"));d.appendChild(t);mxEvent.addListener(t,"click",this.actions.get("openLibrary").funct)}else t=g("newLibrary",mxResources.get("newLibrary")),t.style.display="block",t.style.fontSize="11px",t.style.left="0",t=g("openLibraryFrom",mxResources.get("openLibraryFrom")),t.style.borderLeftStyle="solid",t.style.display="block",t.style.fontSize="11px",t.style.left="50%";d.appendChild(G.sidebar.container);-d.style.overflow="hidden"}function f(G,d){if(EditorUi.windowed){var g=G.editor.graph;g.popupMenuHandler.hideMenu();null==G.sidebarWindow?(d=Math.min(g.container.clientWidth-10,218),g=Math.min(g.container.clientHeight-40,650),G.sidebarWindow=new WrapperWindow(G,mxResources.get("shapes"),10,56,d-6,g-6,function(m){e(G,m)}),G.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){G.sidebarWindow.window.fit()})),G.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),G.sidebarWindow.window.setVisible(!0),-isLocalStorage&&G.getLocalData("sidebar",function(m){G.sidebar.showEntries(m,null,!0)}),G.restoreLibraries()):G.sidebarWindow.window.setVisible(null!=d?d:!G.sidebarWindow.window.isVisible())}else null==G.sidebarElt&&(G.sidebarElt=G.createSidebarContainer(),e(G,G.sidebarElt),G.sidebarElt.style.border="none",G.sidebarElt.style.width="210px",G.sidebarElt.style.borderRight="1px solid gray"),g=G.diagramContainer.parentNode,null!=G.sidebarElt.parentNode?(G.sidebarElt.parentNode.removeChild(G.sidebarElt),-g.style.left="0px"):(g.parentNode.appendChild(G.sidebarElt),g.style.left=G.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(G){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');+(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(e,f,c){c.setAttribute("relatedPage",f.relatedPage.getId());null==f.index&&(c.setAttribute("name",f.relatedPage.getName()),null!=f.relatedPage.viewState&&c.setAttribute("viewState",JSON.stringify(f.relatedPage.viewState,function(l,n){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,l)?n:void 0})),null!=f.relatedPage.root&&e.encodeCell(f.relatedPage.root,c));return c};+b.beforeDecode=function(e,f,c){c.ui=e.ui;c.relatedPage=c.ui.getPageById(f.getAttribute("relatedPage"));if(null==c.relatedPage){var l=f.ownerDocument.createElement("diagram");l.setAttribute("id",f.getAttribute("relatedPage"));l.setAttribute("name",f.getAttribute("name"));c.relatedPage=new DiagramPage(l);l=f.getAttribute("viewState");null!=l&&(c.relatedPage.viewState=JSON.parse(l),f.removeAttribute("viewState"));f=f.cloneNode(!0);l=f.firstChild;if(null!=l)for(c.relatedPage.root=e.decodeCell(l,!1),c=+l.nextSibling,l.parentNode.removeChild(l),l=c;null!=l;){c=l.nextSibling;if(l.nodeType==mxConstants.NODETYPE_ELEMENT){var n=l.getAttribute("id");null==e.lookup(n)&&e.decodeCell(l)}l.parentNode.removeChild(l);l=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,l,n,p,u){l=null!=l?l:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var G=n.slice(),H=0;H<n.length;H++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[H]),"treeFolding","0")&&this.foldTreeCell(c,n[H]);n=G;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=function(c,l){this.model.beginUpdate();try{var n=+[];this.traverse(l,!0,mxUtils.bind(this,function(u,G){var H=null!=G&&this.isTreeEdge(G);H&&n.push(G);u==l||null!=G&&!H||n.push(u);return(null==G||H)&&(u==l||!this.model.isCollapsed(u))}));this.model.setCollapsed(l,c);for(var p=0;p<n.length;p++)this.model.setVisible(n[p],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,l,n,p,u,G){return this.model.filterCells(this.getEdges(c,l,n,p,u,G),mxUtils.bind(this,+function(H){return this.isTreeEdge(H)}))};Graph.prototype.getIncomingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(C){return v.isVertex(C)&&n(C)}function l(C){var M=!1;null!=C&&(M="1"==+k.getCurrentCellStyle(C).treeMoving);return M}function n(C){var M=!1;null!=C&&(C=v.getParent(C),M=k.view.getState(C),M="tree"==(null!=M?M.style:k.getCellStyle(C)).containerType);return M}function p(C){var M=!1;null!=C&&(C=v.getParent(C),M=k.view.getState(C),k.view.getState(C),M=null!=(null!=M?M.style:k.getCellStyle(C)).childLayout);return M}function u(C){C=k.view.getState(C);if(null!=C){var M=k.getIncomingTreeEdges(C.cell);if(0<M.length&&(M=k.view.getState(M[0]),null!=M&&(M=M.absolutePoints,null!=+M&&0<M.length&&(M=M[M.length-1],null!=M)))){if(M.y==C.y&&Math.abs(M.x-C.getCenterX())<C.width/2)return mxConstants.DIRECTION_SOUTH;if(M.y==C.y+C.height&&Math.abs(M.x-C.getCenterX())<C.width/2)return mxConstants.DIRECTION_NORTH;if(M.x>C.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function G(C,M){M=null!=M?M:!0;k.model.beginUpdate();try{var T=k.model.getParent(C),m=k.getIncomingTreeEdges(C),z=k.cloneCells([m[0],C]);k.model.setTerminal(z[0],k.model.getTerminal(m[0],+!0),!0);var I=u(C),L=T.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?z[1].geometry.x+=M?C.geometry.width+10:-z[1].geometry.width-10:z[1].geometry.y+=M?C.geometry.height+10:-z[1].geometry.height-10;k.view.currentRoot!=T&&(z[1].geometry.x-=L.x,z[1].geometry.y-=L.y);var N=k.view.getState(C),O=k.view.scale;if(null!=N){var S=mxRectangle.fromRectangle(N);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?S.x+=(M?C.geometry.width+10:-z[1].geometry.width-10)*O:S.y+=(M?+C.geometry.height+10:-z[1].geometry.height-10)*O;var U=k.getOutgoingTreeEdges(k.model.getTerminal(m[0],!0));if(null!=U){for(var W=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,X=L=m=0;X<U.length;X++){var Z=k.model.getTerminal(U[X],!1);if(I==u(Z)){var Y=k.view.getState(Z);Z!=C&&null!=Y&&(W&&M!=Y.getCenterX()<N.getCenterX()||!W&&M!=Y.getCenterY()<N.getCenterY())&&mxUtils.intersects(S,Y)&&(m=10+Math.max(m,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/O),L=10+Math.max(L,(Math.min(S.y++S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/O))}}W?L=0:m=0;for(X=0;X<U.length;X++)if(Z=k.model.getTerminal(U[X],!1),I==u(Z)&&(Y=k.view.getState(Z),Z!=C&&null!=Y&&(W&&M!=Y.getCenterX()<N.getCenterX()||!W&&M!=Y.getCenterY()<N.getCenterY()))){var ba=[];k.traverse(Y.cell,!0,function(ea,ca){var fa=null!=ca&&k.isTreeEdge(ca);fa&&ba.push(ca);(null==ca||fa)&&ba.push(ea);return null==ca||fa});k.moveCells(ba,(M?1:-1)*m,(M?1:-1)*L)}}}return k.addCells(z,T)}finally{k.model.endUpdate()}}function H(C){k.model.beginUpdate();+try{var M=u(C),T=k.getIncomingTreeEdges(C),m=k.cloneCells([T[0],C]);k.model.setTerminal(T[0],m[1],!1);k.model.setTerminal(m[0],m[1],!0);k.model.setTerminal(m[0],C,!1);var z=k.model.getParent(C),I=z.geometry,L=[];k.view.currentRoot!=z&&(m[1].geometry.x-=I.x,m[1].geometry.y-=I.y);k.traverse(C,!0,function(S,U){var W=null!=U&&k.isTreeEdge(U);W&&L.push(U);(null==U||W)&&L.push(S);return null==U||W});var N=C.geometry.width+40,O=C.geometry.height+40;M==mxConstants.DIRECTION_SOUTH?N=0:M==mxConstants.DIRECTION_NORTH?+(N=0,O=-O):M==mxConstants.DIRECTION_WEST?(N=-N,O=0):M==mxConstants.DIRECTION_EAST&&(O=0);k.moveCells(L,N,O);return k.addCells(m,z)}finally{k.model.endUpdate()}}function F(C,M){k.model.beginUpdate();try{var T=k.model.getParent(C),m=k.getIncomingTreeEdges(C),z=u(C);0==m.length&&(m=[k.createEdge(T,null,"",null,null,k.createCurrentEdgeStyle())],z=M);var I=k.cloneCells([m[0],C]);k.model.setTerminal(I[0],C,!0);null==k.model.getTerminal(I[0],!1)&&(k.model.setTerminal(I[0],I[1],!1),k.applyNewEdgeStyle(I[1],+[I[0]],z));m=k.getOutgoingTreeEdges(C);var L=T.geometry;M=[];k.view.currentRoot==T&&(L=new mxRectangle);for(var N=0;N<m.length;N++){var O=k.model.getTerminal(m[N],!1);null!=O&&M.push(O)}var S=k.view.getBounds(M),U=k.view.translate,W=k.view.scale;z==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==S?C.geometry.x+(C.geometry.width-I[1].geometry.width)/2:(S.x+S.width)/W-U.x-L.x+10,I[1].geometry.y+=I[1].geometry.height-L.y+40):z==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==S?C.geometry.x+(C.geometry.width-+I[1].geometry.width)/2:(S.x+S.width)/W-U.x+-L.x+10,I[1].geometry.y-=I[1].geometry.height+L.y+40):(I[1].geometry.x=z==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+L.x+40):I[1].geometry.x+(I[1].geometry.width-L.x+40),I[1].geometry.y=null==S?C.geometry.y+(C.geometry.height-I[1].geometry.height)/2:(S.y+S.height)/W-U.y+-L.y+10);return k.addCells(I,T)}finally{k.model.endUpdate()}}function K(C,M,T){C=k.getOutgoingTreeEdges(C);T=k.view.getState(T);var m=[];if(null!=T&&null!=C){for(var z=+0;z<C.length;z++){var I=k.view.getState(k.model.getTerminal(C[z],!1));null!=I&&(!M&&Math.min(I.x+I.width,T.x+T.width)>=Math.max(I.x,T.x)||M&&Math.min(I.y+I.height,T.y+T.height)>=Math.max(I.y,T.y))&&m.push(I)}m.sort(function(L,N){return M?L.x+L.width-N.x-N.width:L.y+L.height-N.y-N.height})}return m}function d(C,M){var T=u(C),m=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==m&&T!=M?g.actions.get("selectParent").funct():T==+M?(M=k.getOutgoingTreeEdges(C),null!=M&&0<M.length&&k.setSelectionCell(k.model.getTerminal(M[0],!1))):(T=k.getIncomingTreeEdges(C),null!=T&&0<T.length&&(m=K(k.model.getTerminal(T[0],!0),m,C),C=k.view.getState(C),null!=C&&(C=mxUtils.indexOf(m,C),0<=C&&(C+=M==mxConstants.DIRECTION_NORTH||M==mxConstants.DIRECTION_WEST?-1:1,0<=C&&C<=m.length-1&&k.setSelectionCell(m[C].cell)))))}var g=this,k=g.editor.graph,v=k.getModel(),t=g.menus.createPopupMenu;g.menus.createPopupMenu=function(C,M,T){t.apply(this,arguments);+if(1==k.getSelectionCount()){M=k.getSelectionCell();var m=k.getOutgoingTreeEdges(M);C.addSeparator();0<m.length&&(c(k.getSelectionCell())&&this.addMenuItems(C,["selectChildren"],null,T),this.addMenuItems(C,["selectDescendants"],null,T));c(k.getSelectionCell())?(C.addSeparator(),0<k.getIncomingTreeEdges(M).length&&this.addMenuItems(C,["selectSiblings","selectParent"],null,T)):0<k.model.getEdgeCount(M)&&this.addMenuItems(C,["selectConnections"],null,T)}};g.actions.addAction("selectChildren",function(C){if(k.isEnabled()&&+1==k.getSelectionCount()){var M=k.getSelectionCell();C=mxEvent.isControlDown(C)?null:k.getOutgoingTreeEdges(M);if(null!=C&&0<C.length){M=[];for(var T=0;T<C.length;T++)M.push(k.model.getTerminal(C[T],!1));k.setSelectionCells(M)}else k.setSelectionCells(k.model.getChildren(M))}},null,null,"Alt+Shift+C");g.actions.addAction("selectDescendants",function(C){var M=k.getSelectionCell();if(k.isEnabled()&&null!=M){var T=[];mxEvent.isControlDown(C)||k.traverse(M,!0,function(m,z){var I=null!=z&&k.isTreeEdge(z);+I&&mxEvent.isControlDown(C)&&T.push(z);(null==z||I)&&T.push(m);return null==z||I});if(0==T.length||1==T.length&&T[0]==M)T=k.model.getDescendants(M);k.setSelectionCells(T)}},null,null,"Alt+Shift+X");g.actions.addAction("selectParent",function(C){var M=k.getSelectionCell();k.isEnabled()&&null!=M&&(C=mxEvent.isControlDown(C)?null:k.getIncomingTreeEdges(M),null!=C&&0<C.length?k.setSelectionCell(k.model.getTerminal(C[0],!0)):k.selectParentCell())},null,null,"Alt+Shift+P");g.actions.addAction("selectSiblings",+function(C){if(k.isEnabled()&&1==k.getSelectionCount()){var M=k.getSelectionCell(),T=mxEvent.isControlDown(C)?null:k.getIncomingTreeEdges(M);C=[];if(null!=T&&0<T.length&&(T=k.getOutgoingTreeEdges(k.model.getTerminal(T[0],!0)),null!=T))for(var m=0;m<T.length;m++)C.push(k.model.getTerminal(T[m],!1));0==C.length&&(C=k.model.getChildren(k.model.getParent(M)));k.setSelectionCells(C)}},null,null,"Alt+Shift+S");var x=k.removeCells;k.removeCells=function(C,M){M=null!=M?M:!0;null==C&&(C=this.getDeletableCells(this.getSelectionCells()));+M&&(C=this.getDeletableCells(this.addAllEdges(C)));for(var T=[],m=0;m<C.length;m++){var z=C[m];v.isEdge(z)&&n(z)&&(T.push(z),z=v.getTerminal(z,!1));if(c(z)){var I=[];k.traverse(z,!0,function(L,N){var O=null!=N&&k.isTreeEdge(N);O&&I.push(N);(null==N||O)&&I.push(L);return null==N||O});0<I.length&&(T=T.concat(I),z=k.getIncomingTreeEdges(C[m]),C=C.concat(z))}else null!=z&&T.push(C[m])}C=T;return x.apply(this,arguments)};g.hoverIcons.getStateAt=function(C,M,T){return c(C.cell)?null:this.graph.view.getState(this.graph.getCellAt(M,+T))};var A=k.duplicateCells;k.duplicateCells=function(C,M){C=null!=C?C:this.getSelectionCells();for(var T=C.slice(0),m=0;m<T.length;m++){var z=k.view.getState(T[m]);if(null!=z&&c(z.cell)){var I=k.getIncomingTreeEdges(z.cell);for(z=0;z<I.length;z++)mxUtils.remove(I[z],C)}}this.model.beginUpdate();try{var L=A.call(this,C,M);if(L.length==C.length)for(m=0;m<C.length;m++)if(c(C[m])){var N=k.getIncomingTreeEdges(L[m]);I=k.getIncomingTreeEdges(C[m]);if(0==N.length&&0<I.length){var O=this.cloneCell(I[0]);+this.addEdge(O,k.getDefaultParent(),this.model.getTerminal(I[0],!0),L[m])}}}finally{this.model.endUpdate()}return L};var J=k.moveCells;k.moveCells=function(C,M,T,m,z,I,L){for(var N=null,O=[],S=0;S<C.length;S++)(l(C[S])||c(C[S]))&&!p(C[S])&&this.isCellCollapsed(C[S])?O=O.concat(this.getSubtree(C[S])):O.push(C[S]);C=mxUtils.removeDuplicates(O);this.model.beginUpdate();try{O=z;var U=this.getCurrentCellStyle(z);if(null!=C&&c(z)&&"1"==mxUtils.getValue(U,"treeFolding","0")){for(S=0;S<C.length;S++)if(c(C[S])||+k.model.isEdge(C[S])&&null==k.model.getTerminal(C[S],!0)){z=k.model.getParent(C[S]);break}if(null!=O&&z!=O&&null!=this.view.getState(C[0])){var W=k.getIncomingTreeEdges(C[0]);if(0<W.length){var X=k.view.getState(k.model.getTerminal(W[0],!0));if(null!=X){var Z=k.view.getState(O);null!=Z&&(M=(Z.getCenterX()-X.getCenterX())/k.view.scale,T=(Z.getCenterY()-X.getCenterY())/k.view.scale)}}}}N=J.apply(this,arguments);if(null!=N&&null!=C&&N.length==C.length)for(S=0;S<N.length;S++)if(this.model.isEdge(N[S]))c(O)&&+0>mxUtils.indexOf(N,this.model.getTerminal(N[S],!0))&&this.model.setTerminal(N[S],O,!0);else if(c(C[S])&&(W=k.getIncomingTreeEdges(C[S]),0<W.length))if(!m)c(O)&&0>mxUtils.indexOf(C,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],O,!0);else if(0==k.getIncomingTreeEdges(N[S]).length){U=O;if(null==U||U==k.model.getParent(C[S]))U=k.model.getTerminal(W[0],!0);m=this.cloneCell(W[0]);this.addEdge(m,k.getDefaultParent(),U,N[S])}}finally{this.model.endUpdate()}return N};if(null!=g.sidebar){var D=+g.sidebar.dropAndConnect;g.sidebar.dropAndConnect=function(C,M,T,m){var z=k.model,I=null;z.beginUpdate();try{if(I=D.apply(this,arguments),c(C))for(var L=0;L<I.length;L++)if(z.isEdge(I[L])&&null==z.getTerminal(I[L],!0)){z.setTerminal(I[L],C,!0);var N=k.getCellGeometry(I[L]);N.points=null;null!=N.getTerminalPoint(!0)&&N.setTerminalPoint(null,!0)}}finally{z.endUpdate()}return I}}var E={67:g.actions.get("selectChildren"),88:g.actions.get("selectDescendants"),80:g.actions.get("selectParent"),83:g.actions.get("selectSiblings")},+R={67:g.actions.get("copyStyle"),86:g.actions.get("pasteStyle")},V=g.onKeyDown;g.onKeyDown=function(C){try{var M=k.getSelectionCell();if(k.isEnabled()&&!k.isEditing()&&null!=M){var T=mxEvent.isAltDown(C)&&mxEvent.isShiftDown(C)?E[C.keyCode]:mxEvent.isAltDown(C)?R[C.keyCode]:null;null!=T?(T.funct(C),mxEvent.consume(C)):c(M)&&(T=null,0<k.getIncomingTreeEdges(M).length&&(9==C.which?T=mxEvent.isShiftDown(C)?H(M):F(M):13==C.which&&(T=G(M,!mxEvent.isShiftDown(C)))),null!=T&&0<T.length?(1==T.length&&k.model.isEdge(T[0])?+k.setSelectionCell(k.model.getTerminal(T[0],!1)):k.setSelectionCell(T[T.length-1]),null!=g.hoverIcons&&g.hoverIcons.update(k.view.getState(M)),k.startEditingAtCell(M),mxEvent.consume(C)):37==C.keyCode?(d(M,mxConstants.DIRECTION_WEST),mxEvent.consume(C)):38==C.keyCode?(d(M,mxConstants.DIRECTION_NORTH),mxEvent.consume(C)):39==C.keyCode?(d(M,mxConstants.DIRECTION_EAST),mxEvent.consume(C)):40==C.keyCode&&(d(M,mxConstants.DIRECTION_SOUTH),mxEvent.consume(C)))}}catch(m){g.handleError(m)}mxEvent.isConsumed(C)||+V.apply(this,arguments)};var Q=k.connectVertex;k.connectVertex=function(C,M,T,m,z,I,L){var N=k.getIncomingTreeEdges(C);if(c(C)){var O=u(C),S=O==mxConstants.DIRECTION_EAST||O==mxConstants.DIRECTION_WEST,U=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;return O==M||0==N.length?F(C,M):S==U?H(C):G(C,M!=mxConstants.DIRECTION_NORTH&&M!=mxConstants.DIRECTION_WEST)}return Q.apply(this,arguments)};k.getSubtree=function(C){var M=[C];!l(C)&&!c(C)||p(C)||k.traverse(C,!0,function(T,m){var z=null!=+m&&k.isTreeEdge(m);z&&0>mxUtils.indexOf(M,m)&&M.push(m);(null==m||z)&&0>mxUtils.indexOf(M,T)&&M.push(T);return null==m||z});return M};var P=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){P.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!p(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",+"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(C){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(C),mxEvent.getClientY(C),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=+mxEvent.isMouseEvent(C);this.graph.isMouseDown=!0;g.hoverIcons.reset();mxEvent.consume(C)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var q=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){q.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:+0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(C){y.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=C?"":"none")};var B=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(C,M){B.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=+null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),l=this.graph,n=this;return c.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var u=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');+u.vertex=!0;var G=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);G.insertEdge(H,!1);p.insert(H);p.insert(u);p.insert(G);+return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var u=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+u.vertex=!0;var G=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");+H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);G.insertEdge(H,!1);var F=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+F.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),H.style);K.geometry.relative=!0;K.edge=!0;u.insertEdge(K,!0);F.insertEdge(K,!1);var d=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),H.style);g.geometry.relative=!0;g.edge=!0;u.insertEdge(g,!0);d.insertEdge(g,!1);var k=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+k.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),H.style);v.geometry.relative=!0;v.edge=!0;u.insertEdge(v,!0);k.insertEdge(v,!1);p.insert(H);p.insert(K);p.insert(g);p.insert(v);p.insert(u);p.insert(G);p.insert(F);p.insert(d);p.insert(k);return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');+p.vertex=!0;return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");u.geometry.setTerminalPoint(new mxPoint(-40,40),!0);u.geometry.relative=!0;u.edge=!0;p.insertEdge(u,!1);return n.createVertexTemplateFromCells([p,u],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),+'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");+u.geometry.setTerminalPoint(new mxPoint(-40,40),!0);u.geometry.relative=!0;u.edge=!0;p.insertEdge(u,!1);return n.createVertexTemplateFromCells([p,u],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var u=new mxCell("Organization",new mxGeometry(80,+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(u,"treeRoot","1");u.vertex=!0;var G=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");+H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);G.insertEdge(H,!1);var F=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");K.geometry.relative=+!0;K.edge=!0;u.insertEdge(K,!0);F.insertEdge(K,!1);p.insert(H);p.insert(K);p.insert(u);p.insert(G);p.insert(F);return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(p,"treeRoot","1");p.vertex=!0;return n.createVertexTemplateFromCells([p],+p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");+u.geometry.setTerminalPoint(new mxPoint(0,0),!0);u.geometry.relative=!0;u.edge=!0;p.insertEdge(u,!1);return n.createVertexTemplateFromCells([p,u],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");+u.geometry.setTerminalPoint(new mxPoint(110,-40),!0);u.geometry.relative=!0;u.edge=!0;p.insertEdge(u,!1);var G=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),u.style);H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=!0;H.edge=!0;G.insertEdge(H,!1);return n.createVertexTemplateFromCells([u,H,p,G],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;+EditorUi.initMinimalTheme=function(){function b(d,g){if(EditorUi.windowed){var k=d.editor.graph;k.popupMenuHandler.hideMenu();null==d.formatWindow?(g=Math.max(10,d.diagramContainer.clientWidth-248),k=Math.min(566,k.container.clientHeight-10),d.formatWindow=new WrapperWindow(d,mxResources.get("format"),g,60,240,k,function(v){d.createFormat(v).init()}),d.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){d.formatWindow.window.fit()})),d.formatWindow.window.minimumSize=new mxRectangle(0,+0,240,80)):d.formatWindow.window.setVisible(null!=g?g:!d.formatWindow.window.isVisible())}else null==d.formatElt&&(d.formatElt=d.createSidebarContainer(),d.createFormat(d.formatElt).init(),d.formatElt.style.border="none",d.formatElt.style.width="240px",d.formatElt.style.borderLeftWidth="1px",d.formatElt.style.borderLeftStyle="solid",d.formatElt.style.right="0px"),k=d.diagramContainer.parentNode,null!=d.formatElt.parentNode?(d.formatElt.parentNode.removeChild(d.formatElt),k.style.right="0px"):(k.parentNode.appendChild(d.formatElt),+k.style.right=d.formatElt.style.width)}function e(d,g){function k(x,A){var J=d.menus.get(x);x=v.addMenu(A,mxUtils.bind(this,function(){J.funct.apply(this,arguments)}));x.setAttribute("title",A);x.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";x.className="geTitle";g.appendChild(x);return x}var v=new Menubar(d,g);if(Editor.enableCustomLibraries&&+("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=d.actions.get("newLibrary")){var t=document.createElement("div");t.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";t.className="geTitle";mxUtils.write(t,mxResources.get("newLibrary"));g.appendChild(t);mxEvent.addListener(t,"click",this.actions.get("newLibrary").funct);+t=t.cloneNode(!1);t.style.left="50%";t.style.borderLeftStyle="solid";mxUtils.write(t,mxResources.get("openLibrary"));g.appendChild(t);mxEvent.addListener(t,"click",this.actions.get("openLibrary").funct)}else t=k("newLibrary",mxResources.get("newLibrary")),t.style.display="block",t.style.fontSize="11px",t.style.left="0",t=k("openLibraryFrom",mxResources.get("openLibraryFrom")),t.style.borderLeftStyle="solid",t.style.display="block",t.style.fontSize="11px",t.style.left="50%";g.appendChild(d.sidebar.container);+g.style.overflow="hidden"}function f(d,g){if(EditorUi.windowed){var k=d.editor.graph;k.popupMenuHandler.hideMenu();null==d.sidebarWindow?(g=Math.min(k.container.clientWidth-10,218),k=Math.min(k.container.clientHeight-40,650),d.sidebarWindow=new WrapperWindow(d,mxResources.get("shapes"),10,56,g-6,k-6,function(v){e(d,v)}),d.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){d.sidebarWindow.window.fit()})),d.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),d.sidebarWindow.window.setVisible(!0),+isLocalStorage&&d.getLocalData("sidebar",function(v){d.sidebar.showEntries(v,null,!0)}),d.restoreLibraries()):d.sidebarWindow.window.setVisible(null!=g?g:!d.sidebarWindow.window.isVisible())}else null==d.sidebarElt&&(d.sidebarElt=d.createSidebarContainer(),e(d,d.sidebarElt),d.sidebarElt.style.border="none",d.sidebarElt.style.width="210px",d.sidebarElt.style.borderRight="1px solid gray"),k=d.diagramContainer.parentNode,null!=d.sidebarElt.parentNode?(d.sidebarElt.parentNode.removeChild(d.sidebarElt),+k.style.left="0px"):(k.parentNode.appendChild(d.sidebarElt),k.style.left=d.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(d){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur=-"1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var k=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(G){k.apply(this,arguments);-null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(G,d){null!=d.shortcut&&900>c&&!mxClient.IS_IOS?G.firstChild.nextSibling.setAttribute("title",d.shortcut):-q.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(G){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=G?G:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();u.apply(this,arguments)};var E=EditorUi.prototype.setGraphEnabled;-EditorUi.prototype.setGraphEnabled=function(G){E.apply(this,arguments);if(G){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=d&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=d&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};-var H=Menus.prototype.init;Menus.prototype.init=function(){H.apply(this,arguments);var G=this.editorUi;EditorUi.enablePlantUml&&!G.isOffline()&&G.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var m=new ParseDialog(G,mxResources.get("plantUml")+"...","plantUml");G.showDialog(m.container,620,420,!0,!1);m.init()}));G.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var m=new ParseDialog(G,mxResources.get("mermaid")+"...","mermaid");G.showDialog(m.container,-620,420,!0,!1);m.init()}));var d="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),g=function(m,t,v,y){m.addItem(v,null,mxUtils.bind(this,function(){var C=new CreateGraphDialog(G,v,y);G.showDialog(C.container,620,420,!0,!1);C.init()}),t)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(m,t){for(var v=0;v<d.length;v++)"-"==d[v]?m.addSeparator(t):g(m,t,mxResources.get(d[v])+"...",d[v])})))};EditorUi.prototype.installFormatToolbar=function(G){var d=-this.editor.graph,g=document.createElement("div");g.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";d.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(m,t){0<d.getSelectionCount()?(G.appendChild(g),g.innerHTML="Selected: "+d.getSelectionCount()):null!=g.parentNode&&g.parentNode.removeChild(g)}))};var D=!1;EditorUi.prototype.initFormatWindow=-function(){if(!D&&null!=this.formatWindow){D=!0;var G=this.formatWindow.window.toggleMinimized,d=240;this.formatWindow.window.toggleMinimized=function(){G.apply(this,arguments);this.minimized?(d=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+d-140+"px"):(this.div.style.width=d+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-d+140)+"px");this.fit()};-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(g){mxEvent.getSource(g)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var L=EditorUi.prototype.init;EditorUi.prototype.init=function(){function G(W,X,Y){var Z=y.menus.get(W),aa=J.addMenu(mxResources.get(W),mxUtils.bind(this,function(){aa.classList.contains("mxDisabled")||Z.funct.apply(this,arguments)}),K);aa.className="geMenuItem";aa.style.display="inline-block";aa.style.boxSizing=-"border-box";aa.style.top="6px";aa.style.marginRight="6px";aa.style.height="30px";aa.style.paddingTop="6px";aa.style.paddingBottom="6px";aa.style.cursor="pointer";aa.setAttribute("title",mxResources.get(W));y.menus.menuCreated(Z,aa,"geMenuItem");null!=Y?(aa.style.backgroundImage="url("+Y+")",aa.style.backgroundPosition="center center",aa.style.backgroundRepeat="no-repeat",aa.style.backgroundSize="24px 24px",aa.style.width="34px",aa.innerText=""):X||(aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+-")",aa.style.backgroundPosition="right 6px center",aa.style.backgroundRepeat="no-repeat",aa.style.paddingRight="22px");return aa}function d(W,X,Y,Z,aa,ea){var ca=document.createElement("a");ca.className="geMenuItem";ca.style.display="inline-block";ca.style.boxSizing="border-box";ca.style.height="30px";ca.style.padding="6px";ca.style.position="relative";ca.style.verticalAlign="top";ca.style.top="0px";null!=y.statusContainer?I.insertBefore(ca,y.statusContainer):I.appendChild(ca);null!=ea?(ca.style.backgroundImage=-"url("+ea+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.width="34px"):mxUtils.write(ca,W);mxEvent.addListener(ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(da){da.preventDefault()}));mxEvent.addListener(ca,"click",function(da){"disabled"!=ca.getAttribute("disabled")&&X(da);mxEvent.consume(da)});null==Y&&(ca.style.marginRight="4px");null!=Z&&ca.setAttribute("title",Z);null!=aa&&(W=function(){aa.isEnabled()?-(ca.removeAttribute("disabled"),ca.style.cursor="pointer"):(ca.setAttribute("disabled","disabled"),ca.style.cursor="default")},aa.addListener("stateChanged",W),C.addListener("enabledChanged",W),W());return ca}function g(W,X,Y){Y=document.createElement("div");Y.className="geMenuItem";Y.style.display="inline-block";Y.style.verticalAlign="top";Y.style.marginRight="6px";Y.style.padding="0 4px 0 4px";Y.style.height="30px";Y.style.position="relative";Y.style.top="0px";for(var Z=0;Z<W.length;Z++)null!=W[Z]&&-(W[Z].style.margin="0px",W[Z].style.boxShadow="none",Y.appendChild(W[Z]));null!=X&&mxUtils.setOpacity(Y,X);null!=y.statusContainer?I.insertBefore(Y,y.statusContainer):I.appendChild(Y);return Y}function m(){for(var W=I.firstChild;null!=W;){var X=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=X}K=I.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;W=1E3>c;var Y=null;W||(Y=G("diagram"));X=W?G("diagram",null,-Editor.menuImage):null;null!=X&&(Y=X);g([Y,d(mxResources.get("shapes"),y.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),y.actions.get("image"),W?Editor.shapesImage:null),d(mxResources.get("format"),y.actions.get("format").funct,null,mxResources.get("format")+" ("+y.actions.get("format").shortcut+")",y.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=G("insert",!0,W?R:null);g([X,d(mxResources.get("delete"),y.actions.get("delete").funct,null,mxResources.get("delete"),-y.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);C.isEnabled()||X.classList.add("mxDisabled");411<=c&&(g([N,O],60),520<=c&&g([Q,640<=c?d("",M.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",M,Editor.zoomInImage):null,640<=c?d("",S.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",S,Editor.zoomOutImage):null],60))}L.apply(this,arguments);var t=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=t&&(t.classList.add("geSimple"),-t.classList.add("geMinimal"));t=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var v=document.createElement("div");v.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";v.style.bottom=t?"32px":"0px";this.sidebar=this.createSidebar(v);if(1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),-this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=c&&(b(this,!0),this.formatWindow.window.setVisible(!0));var y=this,C=y.editor.graph;y.toolbar=this.createToolbar(y.createDiv("geToolbar"));y.defaultLibraryName=mxResources.get("untitledLibrary");var I=document.createElement("div");I.className="geMenubarContainer";var K=null,J=new Menubar(y,I);y.statusContainer=y.createStatusContainer();y.statusContainer.style.position="relative";y.statusContainer.style.maxWidth="";y.statusContainer.style.cursor=-"default";var U=y.hideCurrentMenu;y.hideCurrentMenu=function(){U.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var P=y.descriptorChanged;y.descriptorChanged=function(){P.apply(this,arguments);var W=y.getCurrentFile();if(null!=W&&null!=W.getTitle()){var X=W.getMode();"google"==X?X="googleDrive":"github"==X?X="gitHub":"gitlab"==X?X="gitLab":"onedrive"==X&&(X="oneDrive");X=mxResources.get(X);I.setAttribute("title",W.getTitle()+(null!=X?" ("+X+")":""))}else I.removeAttribute("title")};-y.setStatusText(y.editor.getStatus());I.appendChild(y.statusContainer);y.buttonContainer=document.createElement("div");y.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";I.appendChild(y.buttonContainer);y.menubarContainer=y.buttonContainer;y.tabContainer=document.createElement("div");y.tabContainer.className="geTabContainer geTabItem";y.tabContainer.style.cssText=-"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";t=y.diagramContainer.parentNode;v=document.createElement("div");v.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";y.diagramContainer.style.top="47px";var R=Editor.addBoxImage;if(null!=y.hoverIcons){var n=y.hoverIcons.update;y.hoverIcons.update=function(){C.freehand.isDrawing()||n.apply(this,arguments)}}if(null!=C.freehand){var z=C.freehand.createStyle;C.freehand.createStyle=-function(W){return z.apply(this,arguments)+"sketch=0;"}}y.editor.addListener("statusChanged",mxUtils.bind(this,function(){y.setStatusText(y.editor.getStatus())}));y.setStatusText(y.editor.getStatus());var A=y.menus.get("viewZoom");if(null!=A){var B=function(W){if(mxEvent.isAltDown(W))y.hideCurrentMenu(),y.actions.get("customZoom").funct(),mxEvent.consume(W);else if("geMenuItem"==mxEvent.getSource(W).className||mxEvent.isShiftDown(W))y.hideCurrentMenu(),y.actions.get("smartFit").funct(),mxEvent.consume(W)},-M=y.actions.get("zoomIn"),S=y.actions.get("zoomOut"),l=y.actions.get("resetView"),x=y.actions.get("undo"),F=y.actions.get("redo"),N=d("",x.funct,null,mxResources.get("undo")+" ("+x.shortcut+")",x,Editor.undoImage),O=d("",F.funct,null,mxResources.get("redo")+" ("+F.shortcut+")",F,Editor.redoImage),Q=d("",B,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",l,Editor.zoomFitImage);I.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";-this.tabContainer.style.right="70px";var V=J.addMenu("100%",A.funct);V.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");V.className="geTabItem";V.style.height=y.tabContainerHeight+"px";V.style.position="absolute";V.style.display="0"!=urlParams.pages?"flex":"none";V.style.alignItems="center";V.style.justifyContent="center";V.style.paddingRight="11px";V.style.whiteSpace="nowrap";V.style.overflow="hidden";V.style.fontSize="11px";V.style.width="51px";V.style.right="0px";V.style.bottom=-"0px";V.style.boxSizing="content-box";V.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";V.style.backgroundPosition="right 6px top 15px";V.style.backgroundRepeat="no-repeat";V.style.backgroundSize="10px";V.style.zIndex="1";v.appendChild(V);(function(W){mxEvent.addListener(W,"click",B);var X=mxUtils.bind(this,function(Y,Z,aa){W.innerText="";mxUtils.write(W,Math.round(100*y.editor.graph.view.scale*(null!=aa?aa:1))+"%")});y.editor.graph.view.addListener(mxEvent.EVENT_SCALE,X);y.editor.addListener("resetGraphView",-X);y.editor.addListener("pageSelected",X);y.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(Y,Z){X(Y,Z,Z.getProperty("factor"))}))})(V);var T=y.setGraphEnabled;y.setGraphEnabled=function(){T.apply(this,arguments);null!=this.tabContainer&&(V.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}v.appendChild(I);v.appendChild(y.diagramContainer);-t.appendChild(v);y.updateTabContainer();!EditorUi.windowed&&1E3<=c&&b(this,!0);v.appendChild(y.tabContainer);m();y.addListener("lockedChanged",m);mxEvent.addListener(window,"resize",function(){m();null!=y.sidebarWindow&&y.sidebarWindow.window.fit();null!=y.formatWindow&&y.formatWindow.window.fit();null!=y.actions.outlineWindow&&y.actions.outlineWindow.window.fit();null!=y.actions.layersWindow&&y.actions.layersWindow.window.fit();null!=y.menus.chatWindow&&y.menus.chatWindow.window.fit();null!=y.menus.tagsWindow&&-y.menus.tagsWindow.window.fit();null!=y.menus.findWindow&&y.menus.findWindow.window.fit();null!=y.menus.findReplaceWindow&&y.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,k,p,q){var u=k.y,E=k.x,H=!1,D=!1;if(null!=this.states&&null!=c&&null!=k){var L=this,G=new mxCellState,d=this.graph.getView().scale,g=Math.max(2,this.getGuideTolerance()/2);G.x=c.x+E;G.y=c.y+u;G.width=c.width;G.height=c.height;for(var m=[],t=[],v=0;v<this.states.length;v++){var y=this.states[v];y instanceof mxCellState&&(q||!this.graph.isCellSelected(y.cell))&&((G.x>=y.x&&G.x<=y.x+y.width||y.x>=G.x&&y.x<=G.x+G.width)&&(G.y>-y.y+y.height+4||G.y+G.height+4<y.y)?m.push(y):(G.y>=y.y&&G.y<=y.y+y.height||y.y>=G.y&&y.y<=G.y+G.height)&&(G.x>y.x+y.width+4||G.x+G.width+4<y.x)&&t.push(y))}var C=0,I=0,K=y=0,J=0,U=0,P=0,R=0,n=5*d;if(1<m.length){m.push(G);m.sort(function(M,S){return M.y-S.y});var z=!1;v=G==m[0];d=G==m[m.length-1];if(!v&&!d)for(v=1;v<m.length-1;v++)if(G==m[v]){d=m[v-1];v=m[v+1];y=I=K=(v.y-d.y-d.height-G.height)/2;break}for(v=0;v<m.length-1;v++){d=m[v];var A=m[v+1],B=G==d||G==A;A=A.y-d.y-d.height;z|=G==d;if(0==I&&0==-C)I=A,C=1;else if(Math.abs(I-A)<=(B||1==v&&z?g:0))C+=1;else if(1<C&&z){m=m.slice(0,v+1);break}else if(3<=m.length-v&&!z)C=0,y=I=0!=K?K:0,m.splice(0,0==v?1:v),v=-1;else break;0!=y||B||(I=y=A)}3==m.length&&m[1]==G&&(y=0)}if(1<t.length){t.push(G);t.sort(function(M,S){return M.x-S.x});z=!1;v=G==t[0];d=G==t[t.length-1];if(!v&&!d)for(v=1;v<t.length-1;v++)if(G==t[v]){d=t[v-1];v=t[v+1];P=U=R=(v.x-d.x-d.width-G.width)/2;break}for(v=0;v<t.length-1;v++){d=t[v];A=t[v+1];B=G==d||G==A;A=A.x-d.x-d.width;z|=G==d;-if(0==U&&0==J)U=A,J=1;else if(Math.abs(U-A)<=(B||1==v&&z?g:0))J+=1;else if(1<J&&z){t=t.slice(0,v+1);break}else if(3<=t.length-v&&!z)J=0,P=U=0!=R?R:0,t.splice(0,0==v?1:v),v=-1;else break;0!=P||B||(U=P=A)}3==t.length&&t[1]==G&&(P=0)}g=function(M,S,l,x){var F=[];if(x){x=n;var N=0}else x=0,N=n;F.push(new mxPoint(M.x-x,M.y-N));F.push(new mxPoint(M.x+x,M.y+N));F.push(M);F.push(S);F.push(new mxPoint(S.x-x,S.y-N));F.push(new mxPoint(S.x+x,S.y+N));if(null!=l)return l.points=F,l;M=new mxPolyline(F,mxConstants.GUIDE_COLOR,-mxConstants.GUIDE_STROKEWIDTH);M.dialect=mxConstants.DIALECT_SVG;M.pointerEvents=!1;M.init(L.graph.getView().getOverlayPane());return M};U=function(M,S){if(M&&null!=L.guidesArrHor)for(M=0;M<L.guidesArrHor.length;M++)L.guidesArrHor[M].node.style.visibility="hidden";if(S&&null!=L.guidesArrVer)for(M=0;M<L.guidesArrVer.length;M++)L.guidesArrVer[M].node.style.visibility="hidden"};if(1<J&&J==t.length-1){J=[];R=L.guidesArrHor;H=[];E=0;v=t[0]==G?1:0;z=t[v].y+t[v].height;if(0<P)for(v=0;v<t.length-1;v++)d=-t[v],A=t[v+1],G==d?(E=A.x-d.width-P,H.push(new mxPoint(E+d.width+n,z)),H.push(new mxPoint(A.x-n,z))):G==A?(H.push(new mxPoint(d.x+d.width+n,z)),E=d.x+d.width+P,H.push(new mxPoint(E-n,z))):(H.push(new mxPoint(d.x+d.width+n,z)),H.push(new mxPoint(A.x-n,z)));else d=t[0],v=t[2],E=d.x+d.width+(v.x-d.x-d.width-G.width)/2,H.push(new mxPoint(d.x+d.width+n,z)),H.push(new mxPoint(E-n,z)),H.push(new mxPoint(E+G.width+n,z)),H.push(new mxPoint(v.x-n,z));for(v=0;v<H.length;v+=2)t=H[v],P=H[v+1],t=g(t,P,null!=R?-R[v/2]:null),t.node.style.visibility="visible",t.redraw(),J.push(t);for(v=H.length/2;null!=R&&v<R.length;v++)R[v].destroy();L.guidesArrHor=J;E-=c.x;H=!0}else U(!0);if(1<C&&C==m.length-1){J=[];R=L.guidesArrVer;D=[];u=0;v=m[0]==G?1:0;C=m[v].x+m[v].width;if(0<y)for(v=0;v<m.length-1;v++)d=m[v],A=m[v+1],G==d?(u=A.y-d.height-y,D.push(new mxPoint(C,u+d.height+n)),D.push(new mxPoint(C,A.y-n))):G==A?(D.push(new mxPoint(C,d.y+d.height+n)),u=d.y+d.height+y,D.push(new mxPoint(C,u-n))):(D.push(new mxPoint(C,d.y+-d.height+n)),D.push(new mxPoint(C,A.y-n)));else d=m[0],v=m[2],u=d.y+d.height+(v.y-d.y-d.height-G.height)/2,D.push(new mxPoint(C,d.y+d.height+n)),D.push(new mxPoint(C,u-n)),D.push(new mxPoint(C,u+G.height+n)),D.push(new mxPoint(C,v.y-n));for(v=0;v<D.length;v+=2)t=D[v],P=D[v+1],t=g(t,P,null!=R?R[v/2]:null,!0),t.node.style.visibility="visible",t.redraw(),J.push(t);for(v=D.length/2;null!=R&&v<R.length;v++)R[v].destroy();L.guidesArrVer=J;u-=c.y;D=!0}else U(!1,!0)}if(H||D)return G=new mxPoint(E,u),m=b.call(this,-c,G,p,q),H&&!D?G.y=m.y:D&&!H&&(G.x=m.x),m.y!=G.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),m.x!=G.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),G;U(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var k=this.guidesArrVer,p=this.guidesArrHor;if(null!=k)for(var q=0;q<k.length;q++)k[q].node.style.visibility=c?"visible":"hidden";if(null!=-p)for(q=0;q<p.length;q++)p[q].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,k=this.guidesArrHor;if(null!=c){for(var p=0;p<c.length;p++)c[p].destroy();this.guidesArrVer=null}if(null!=k){for(p=0;p<k.length;p++)k[p].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function k(){var C=b.diagramContainer;L.style.top=C.offsetTop-E+"px";L.style.left=C.offsetLeft-E+"px";L.style.width=(f?0:C.offsetWidth)+E+"px";L.style.height=(f?C.offsetHeight:0)+E+"px"}function p(C,I,K){if(null!=q)return C;var J;return function(){var U=this,P=arguments,R=K&&!J;clearTimeout(J);J=setTimeout(function(){J=null;K||C.apply(U,P)},I);R&&C.apply(U,P)}}var q=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,-u=window.cancelAnimationFrame||window.mozCancelAnimationFrame,E=this.RULER_THICKNESS,H=this;this.unit=e;var D=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},L=document.createElement("div");L.className="geRuler";L.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){D=-Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};L.style[f?"borderRight":"borderBottom"]="0.5px solid "+D.strokeClr;L.style.borderLeft="0.5px solid "+D.strokeClr});this.updateStyle();b.diagramContainer.appendChild(L);mxEvent.disableContextMenu(L);this.editorUiRefresh=b.refresh;b.refresh=function(C){H.editorUiRefresh.apply(b,-arguments);k()};k();var G=document.createElement("canvas");G.width=L.offsetWidth;G.height=L.offsetHeight;L.style.overflow="hidden";G.style.position="relative";L.appendChild(G);var d=G.getContext("2d");this.ui=b;var g=b.editor.graph;this.graph=g;this.container=L;this.canvas=G;var m=function(C,I,K,J,U){C=Math.round(C);I=Math.round(I);K=Math.round(K);J=Math.round(J);d.beginPath();d.moveTo(C+.5,I+.5);d.lineTo(K+.5,J+.5);d.stroke();U&&(f?(d.save(),d.translate(C,I),d.rotate(-Math.PI/2),d.fillText(U,0,0),-d.restore()):d.fillText(U,C,I))},t=function(){d.clearRect(0,0,G.width,G.height);d.beginPath();d.lineWidth=.7;d.strokeStyle=D.strokeClr;d.setLineDash([]);d.font="9px Arial";d.textAlign="center";var C=g.view.scale,I=g.view.getBackgroundPageBounds(),K=g.view.translate,J=g.pageVisible;K=J?E+(f?I.y-g.container.scrollTop:I.x-g.container.scrollLeft):E+(f?K.y*C-g.container.scrollTop:K.x*C-g.container.scrollLeft);var U=0;J&&(U=g.getPageLayout(),U=f?U.y*g.pageFormat.height:U.x*g.pageFormat.width);var P;switch(H.unit){case mxConstants.POINTS:var R=-P=10;var n=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:P=10;R=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:P=20;R=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:P=.5>=C||4<=C?8:16,R=mxConstants.PIXELS_PER_INCH/P,n=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var z=R;2<=C?z=R/(2*Math.floor(C/2)):.5>=C&&(z=R*Math.floor(1/C/2)*(H.unit==mxConstants.MILLIMETERS?2:1));R=null;I=J?Math.min(K+(f?I.height:I.width),f?-G.height:G.width):f?G.height:G.width;if(J)if(d.fillStyle=D.outBkgClr,f){var A=K-E;0<A&&d.fillRect(0,E,E,A);I<G.height&&d.fillRect(0,I,E,G.height)}else A=K-E,0<A&&d.fillRect(E,0,A,E),I<G.width&&d.fillRect(I,0,G.width,E);d.fillStyle=D.fontClr;for(J=J?K:K%(z*C);J<=I;J+=z*C)if(A=Math.round((J-K)/C/z),!(J<E||A==R)){R=A;var B=null;0==A%P&&(B=H.formatText(U+A*z)+"");f?m(E-n[Math.abs(A)%P],J,E,J,B):m(J,E-n[Math.abs(A)%P],J,E,B)}d.lineWidth=1;m(f?0:E,f?E:0,E,E);d.fillStyle=D.cornerClr;d.fillRect(0,0,E,E)},-v=-1,y=function(){null!=q?(null!=u&&u(v),v=q(t)):t()};this.drawRuler=y;this.sizeListener=e=p(function(){var C=g.container;f?(C=C.offsetHeight+E,G.height!=C&&(G.height=C,L.style.height=C+"px",y())):(C=C.offsetWidth+E,G.width!=C&&(G.width=C,L.style.width=C+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=c=p(function(){var C=f?g.container.scrollTop:g.container.scrollLeft;H.lastScroll!=C&&(H.lastScroll=C,y())},10);this.unitListener=function(C,I){H.setUnit(I.getProperty("unit"))};-g.addListener(mxEvent.SIZE,e);g.container.addEventListener("scroll",c);g.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(C){D=C;L.style.background=D.bkgClr;t()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(C,I,K,J){if(f&&4<C.height||!f&&4<C.width){if(null!=H.guidePart)try{d.putImageData(H.guidePart.imgData1,-H.guidePart.x1,H.guidePart.y1),d.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),d.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3)}catch(x){}var U=H.origGuideMove.apply(this,arguments);try{d.lineWidth=.5;d.strokeStyle=D.guideClr;d.setLineDash([2]);if(f){var P=C.y+U.y+E-this.graph.container.scrollTop;var R=0;var n=P+C.height/2;var z=E/2;var A=P+C.height;var B=0;var M=d.getImageData(R,P-1,E,3);m(R,P,E,P);P--;var S=d.getImageData(z,n-1,E,3);m(z,n,E,n);n--;var l=d.getImageData(B,-A-1,E,3);m(B,A,E,A);A--}else P=0,R=C.x+U.x+E-this.graph.container.scrollLeft,n=E/2,z=R+C.width/2,A=0,B=R+C.width,M=d.getImageData(R-1,P,3,E),m(R,P,R,E),R--,S=d.getImageData(z-1,n,3,E),m(z,n,z,E),z--,l=d.getImageData(B-1,A,3,E),m(B,A,B,E),B--;if(null==H.guidePart||H.guidePart.x1!=R||H.guidePart.y1!=P)H.guidePart={imgData1:M,x1:R,y1:P,imgData2:S,x2:z,y2:n,imgData3:l,x3:B,y3:A}}catch(x){}}else U=H.origGuideMove.apply(this,arguments);return U};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=-function(){var C=H.origGuideDestroy.apply(this,arguments);if(null!=H.guidePart)try{d.putImageData(H.guidePart.imgData1,H.guidePart.x1,H.guidePart.y1),d.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),d.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3),H.guidePart=null}catch(I){}return C}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};+"1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var l=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){l.apply(this,arguments);+null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(d,g){null!=g.shortcut&&900>c&&!mxClient.IS_IOS?d.firstChild.nextSibling.setAttribute("title",g.shortcut):+p.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(d){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=d?d:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();u.apply(this,arguments)};var G=EditorUi.prototype.setGraphEnabled;+EditorUi.prototype.setGraphEnabled=function(d){G.apply(this,arguments);if(d){var g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=g&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=g&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};+var H=Menus.prototype.init;Menus.prototype.init=function(){H.apply(this,arguments);var d=this.editorUi;EditorUi.enablePlantUml&&!d.isOffline()&&d.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var v=new ParseDialog(d,mxResources.get("plantUml")+"...","plantUml");d.showDialog(v.container,620,420,!0,!1);v.init()}));d.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var v=new ParseDialog(d,mxResources.get("mermaid")+"...","mermaid");d.showDialog(v.container,+620,420,!0,!1);v.init()}));var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(v,t,x,A){v.addItem(x,null,mxUtils.bind(this,function(){var J=new CreateGraphDialog(d,x,A);d.showDialog(J.container,620,420,!0,!1);J.init()}),t)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(v,t){for(var x=0;x<g.length;x++)"-"==g[x]?v.addSeparator(t):k(v,t,mxResources.get(g[x])+"...",g[x])})))};EditorUi.prototype.installFormatToolbar=function(d){var g=+this.editor.graph,k=document.createElement("div");k.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";g.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,t){0<g.getSelectionCount()?(d.appendChild(k),k.innerHTML="Selected: "+g.getSelectionCount()):null!=k.parentNode&&k.parentNode.removeChild(k)}))};var F=!1;EditorUi.prototype.initFormatWindow=+function(){if(!F&&null!=this.formatWindow){F=!0;var d=this.formatWindow.window.toggleMinimized,g=240;this.formatWindow.window.toggleMinimized=function(){d.apply(this,arguments);this.minimized?(g=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+g-140+"px"):(this.div.style.width=g+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-g+140)+"px");this.fit()};+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(k){mxEvent.getSource(k)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var K=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(W,X,Z){var Y=A.menus.get(W),ba=R.addMenu(mxResources.get(W),mxUtils.bind(this,function(){ba.classList.contains("mxDisabled")||Y.funct.apply(this,arguments)}),E);ba.className="geMenuItem";ba.style.display="inline-block";ba.style.boxSizing=+"border-box";ba.style.top="6px";ba.style.marginRight="6px";ba.style.height="30px";ba.style.paddingTop="6px";ba.style.paddingBottom="6px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(W));A.menus.menuCreated(Y,ba,"geMenuItem");null!=Z?(ba.style.backgroundImage="url("+Z+")",ba.style.backgroundPosition="center center",ba.style.backgroundRepeat="no-repeat",ba.style.backgroundSize="24px 24px",ba.style.width="34px",ba.innerText=""):X||(ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage++")",ba.style.backgroundPosition="right 6px center",ba.style.backgroundRepeat="no-repeat",ba.style.paddingRight="22px");return ba}function g(W,X,Z,Y,ba,ea){var ca=document.createElement("a");ca.className="geMenuItem";ca.style.display="inline-block";ca.style.boxSizing="border-box";ca.style.height="30px";ca.style.padding="6px";ca.style.position="relative";ca.style.verticalAlign="top";ca.style.top="0px";null!=A.statusContainer?D.insertBefore(ca,A.statusContainer):D.appendChild(ca);null!=ea?(ca.style.backgroundImage=+"url("+ea+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.width="34px"):mxUtils.write(ca,W);mxEvent.addListener(ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fa){fa.preventDefault()}));mxEvent.addListener(ca,"click",function(fa){"disabled"!=ca.getAttribute("disabled")&&X(fa);mxEvent.consume(fa)});null==Z&&(ca.style.marginRight="4px");null!=Y&&ca.setAttribute("title",Y);null!=ba&&(W=function(){ba.isEnabled()?+(ca.removeAttribute("disabled"),ca.style.cursor="pointer"):(ca.setAttribute("disabled","disabled"),ca.style.cursor="default")},ba.addListener("stateChanged",W),J.addListener("enabledChanged",W),W());return ca}function k(W,X,Z){Z=document.createElement("div");Z.className="geMenuItem";Z.style.display="inline-block";Z.style.verticalAlign="top";Z.style.marginRight="6px";Z.style.padding="0 4px 0 4px";Z.style.height="30px";Z.style.position="relative";Z.style.top="0px";for(var Y=0;Y<W.length;Y++)null!=W[Y]&&+(W[Y].style.margin="0px",W[Y].style.boxShadow="none",Z.appendChild(W[Y]));null!=X&&mxUtils.setOpacity(Z,X);null!=A.statusContainer?D.insertBefore(Z,A.statusContainer):D.appendChild(Z);return Z}function v(){for(var W=D.firstChild;null!=W;){var X=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=X}E=D.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;W=1E3>c;var Z=null;W||(Z=d("diagram"));X=W?d("diagram",null,+Editor.menuImage):null;null!=X&&(Z=X);k([Z,g(mxResources.get("shapes"),A.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),A.actions.get("image"),W?Editor.shapesImage:null),g(mxResources.get("format"),A.actions.get("format").funct,null,mxResources.get("format")+" ("+A.actions.get("format").shortcut+")",A.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=d("insert",!0,W?P:null);k([X,g(mxResources.get("delete"),A.actions.get("delete").funct,null,mxResources.get("delete"),+A.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);J.isEnabled()||X.classList.add("mxDisabled");411<=c&&(k([L,N],60),520<=c&&k([O,640<=c?g("",M.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",M,Editor.zoomInImage):null,640<=c?g("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,Editor.zoomOutImage):null],60))}K.apply(this,arguments);var t=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=t&&(t.classList.add("geSimple"),+t.classList.add("geMinimal"));t=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var x=document.createElement("div");x.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";x.style.bottom=t?"32px":"0px";this.sidebar=this.createSidebar(x);if(1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),+this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=c&&(b(this,!0),this.formatWindow.window.setVisible(!0));var A=this,J=A.editor.graph;A.toolbar=this.createToolbar(A.createDiv("geToolbar"));A.defaultLibraryName=mxResources.get("untitledLibrary");var D=document.createElement("div");D.className="geMenubarContainer";var E=null,R=new Menubar(A,D);A.statusContainer=A.createStatusContainer();A.statusContainer.style.position="relative";A.statusContainer.style.maxWidth="";A.statusContainer.style.cursor=+"default";var V=A.hideCurrentMenu;A.hideCurrentMenu=function(){V.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var Q=A.descriptorChanged;A.descriptorChanged=function(){Q.apply(this,arguments);var W=A.getCurrentFile();if(null!=W&&null!=W.getTitle()){var X=W.getMode();"google"==X?X="googleDrive":"github"==X?X="gitHub":"gitlab"==X?X="gitLab":"onedrive"==X&&(X="oneDrive");X=mxResources.get(X);D.setAttribute("title",W.getTitle()+(null!=X?" ("+X+")":""))}else D.removeAttribute("title")};+A.setStatusText(A.editor.getStatus());D.appendChild(A.statusContainer);A.buttonContainer=document.createElement("div");A.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";D.appendChild(A.buttonContainer);A.menubarContainer=A.buttonContainer;A.tabContainer=document.createElement("div");A.tabContainer.className="geTabContainer geTabItem";A.tabContainer.style.cssText=+"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";t=A.diagramContainer.parentNode;x=document.createElement("div");x.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";A.diagramContainer.style.top="47px";var P=Editor.addBoxImage;if(null!=A.hoverIcons){var q=A.hoverIcons.update;A.hoverIcons.update=function(){J.freehand.isDrawing()||q.apply(this,arguments)}}if(null!=J.freehand){var y=J.freehand.createStyle;J.freehand.createStyle=+function(W){return y.apply(this,arguments)+"sketch=0;"}}A.editor.addListener("statusChanged",mxUtils.bind(this,function(){A.setStatusText(A.editor.getStatus())}));A.setStatusText(A.editor.getStatus());var B=A.menus.get("viewZoom");if(null!=B){var C=function(W){if(mxEvent.isAltDown(W))A.hideCurrentMenu(),A.actions.get("customZoom").funct(),mxEvent.consume(W);else if("geMenuItem"==mxEvent.getSource(W).className||mxEvent.isShiftDown(W))A.hideCurrentMenu(),A.actions.get("smartFit").funct(),mxEvent.consume(W)},+M=A.actions.get("zoomIn"),T=A.actions.get("zoomOut"),m=A.actions.get("resetView"),z=A.actions.get("undo"),I=A.actions.get("redo"),L=g("",z.funct,null,mxResources.get("undo")+" ("+z.shortcut+")",z,Editor.undoImage),N=g("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),O=g("",C,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",m,Editor.zoomFitImage);D.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";+this.tabContainer.style.right="70px";var S=R.addMenu("100%",B.funct);S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");S.className="geTabItem";S.style.height=A.tabContainerHeight+"px";S.style.position="absolute";S.style.display="0"!=urlParams.pages?"flex":"none";S.style.alignItems="center";S.style.justifyContent="center";S.style.paddingRight="11px";S.style.whiteSpace="nowrap";S.style.overflow="hidden";S.style.fontSize="11px";S.style.width="51px";S.style.right="0px";S.style.bottom=+"0px";S.style.boxSizing="content-box";S.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";S.style.backgroundPosition="right 6px top 15px";S.style.backgroundRepeat="no-repeat";S.style.backgroundSize="10px";S.style.zIndex="1";x.appendChild(S);(function(W){mxEvent.addListener(W,"click",C);var X=mxUtils.bind(this,function(Z,Y,ba){W.innerText="";mxUtils.write(W,Math.round(100*A.editor.graph.view.scale*(null!=ba?ba:1))+"%")});A.editor.graph.view.addListener(mxEvent.EVENT_SCALE,X);A.editor.addListener("resetGraphView",+X);A.editor.addListener("pageSelected",X);A.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(Z,Y){X(Z,Y,Y.getProperty("factor"))}))})(S);var U=A.setGraphEnabled;A.setGraphEnabled=function(){U.apply(this,arguments);null!=this.tabContainer&&(S.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}x.appendChild(D);x.appendChild(A.diagramContainer);+t.appendChild(x);A.updateTabContainer();!EditorUi.windowed&&1E3<=c&&b(this,!0);x.appendChild(A.tabContainer);v();A.addListener("lockedChanged",v);mxEvent.addListener(window,"resize",function(){v();null!=A.sidebarWindow&&A.sidebarWindow.window.fit();null!=A.formatWindow&&A.formatWindow.window.fit();null!=A.actions.outlineWindow&&A.actions.outlineWindow.window.fit();null!=A.actions.layersWindow&&A.actions.layersWindow.window.fit();null!=A.menus.chatWindow&&A.menus.chatWindow.window.fit();null!=A.menus.tagsWindow&&+A.menus.tagsWindow.window.fit();null!=A.menus.findWindow&&A.menus.findWindow.window.fit();null!=A.menus.findReplaceWindow&&A.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,n,p){var u=l.y,G=l.x,H=!1,F=!1;if(null!=this.states&&null!=c&&null!=l){var K=this,d=new mxCellState,g=this.graph.getView().scale,k=Math.max(2,this.getGuideTolerance()/2);d.x=c.x+G;d.y=c.y+u;d.width=c.width;d.height=c.height;for(var v=[],t=[],x=0;x<this.states.length;x++){var A=this.states[x];A instanceof mxCellState&&(p||!this.graph.isCellSelected(A.cell))&&((d.x>=A.x&&d.x<=A.x+A.width||A.x>=d.x&&A.x<=d.x+d.width)&&(d.y>+A.y+A.height+4||d.y+d.height+4<A.y)?v.push(A):(d.y>=A.y&&d.y<=A.y+A.height||A.y>=d.y&&A.y<=d.y+d.height)&&(d.x>A.x+A.width+4||d.x+d.width+4<A.x)&&t.push(A))}var J=0,D=0,E=A=0,R=0,V=0,Q=0,P=0,q=5*g;if(1<v.length){v.push(d);v.sort(function(M,T){return M.y-T.y});var y=!1;x=d==v[0];g=d==v[v.length-1];if(!x&&!g)for(x=1;x<v.length-1;x++)if(d==v[x]){g=v[x-1];x=v[x+1];A=D=E=(x.y-g.y-g.height-d.height)/2;break}for(x=0;x<v.length-1;x++){g=v[x];var B=v[x+1],C=d==g||d==B;B=B.y-g.y-g.height;y|=d==g;if(0==D&&0==+J)D=B,J=1;else if(Math.abs(D-B)<=(C||1==x&&y?k:0))J+=1;else if(1<J&&y){v=v.slice(0,x+1);break}else if(3<=v.length-x&&!y)J=0,A=D=0!=E?E:0,v.splice(0,0==x?1:x),x=-1;else break;0!=A||C||(D=A=B)}3==v.length&&v[1]==d&&(A=0)}if(1<t.length){t.push(d);t.sort(function(M,T){return M.x-T.x});y=!1;x=d==t[0];g=d==t[t.length-1];if(!x&&!g)for(x=1;x<t.length-1;x++)if(d==t[x]){g=t[x-1];x=t[x+1];Q=V=P=(x.x-g.x-g.width-d.width)/2;break}for(x=0;x<t.length-1;x++){g=t[x];B=t[x+1];C=d==g||d==B;B=B.x-g.x-g.width;y|=d==g;+if(0==V&&0==R)V=B,R=1;else if(Math.abs(V-B)<=(C||1==x&&y?k:0))R+=1;else if(1<R&&y){t=t.slice(0,x+1);break}else if(3<=t.length-x&&!y)R=0,Q=V=0!=P?P:0,t.splice(0,0==x?1:x),x=-1;else break;0!=Q||C||(V=Q=B)}3==t.length&&t[1]==d&&(Q=0)}k=function(M,T,m,z){var I=[];if(z){z=q;var L=0}else z=0,L=q;I.push(new mxPoint(M.x-z,M.y-L));I.push(new mxPoint(M.x+z,M.y+L));I.push(M);I.push(T);I.push(new mxPoint(T.x-z,T.y-L));I.push(new mxPoint(T.x+z,T.y+L));if(null!=m)return m.points=I,m;M=new mxPolyline(I,mxConstants.GUIDE_COLOR,+mxConstants.GUIDE_STROKEWIDTH);M.dialect=mxConstants.DIALECT_SVG;M.pointerEvents=!1;M.init(K.graph.getView().getOverlayPane());return M};V=function(M,T){if(M&&null!=K.guidesArrHor)for(M=0;M<K.guidesArrHor.length;M++)K.guidesArrHor[M].node.style.visibility="hidden";if(T&&null!=K.guidesArrVer)for(M=0;M<K.guidesArrVer.length;M++)K.guidesArrVer[M].node.style.visibility="hidden"};if(1<R&&R==t.length-1){R=[];P=K.guidesArrHor;H=[];G=0;x=t[0]==d?1:0;y=t[x].y+t[x].height;if(0<Q)for(x=0;x<t.length-1;x++)g=+t[x],B=t[x+1],d==g?(G=B.x-g.width-Q,H.push(new mxPoint(G+g.width+q,y)),H.push(new mxPoint(B.x-q,y))):d==B?(H.push(new mxPoint(g.x+g.width+q,y)),G=g.x+g.width+Q,H.push(new mxPoint(G-q,y))):(H.push(new mxPoint(g.x+g.width+q,y)),H.push(new mxPoint(B.x-q,y)));else g=t[0],x=t[2],G=g.x+g.width+(x.x-g.x-g.width-d.width)/2,H.push(new mxPoint(g.x+g.width+q,y)),H.push(new mxPoint(G-q,y)),H.push(new mxPoint(G+d.width+q,y)),H.push(new mxPoint(x.x-q,y));for(x=0;x<H.length;x+=2)t=H[x],Q=H[x+1],t=k(t,Q,null!=P?+P[x/2]:null),t.node.style.visibility="visible",t.redraw(),R.push(t);for(x=H.length/2;null!=P&&x<P.length;x++)P[x].destroy();K.guidesArrHor=R;G-=c.x;H=!0}else V(!0);if(1<J&&J==v.length-1){R=[];P=K.guidesArrVer;F=[];u=0;x=v[0]==d?1:0;J=v[x].x+v[x].width;if(0<A)for(x=0;x<v.length-1;x++)g=v[x],B=v[x+1],d==g?(u=B.y-g.height-A,F.push(new mxPoint(J,u+g.height+q)),F.push(new mxPoint(J,B.y-q))):d==B?(F.push(new mxPoint(J,g.y+g.height+q)),u=g.y+g.height+A,F.push(new mxPoint(J,u-q))):(F.push(new mxPoint(J,g.y++g.height+q)),F.push(new mxPoint(J,B.y-q)));else g=v[0],x=v[2],u=g.y+g.height+(x.y-g.y-g.height-d.height)/2,F.push(new mxPoint(J,g.y+g.height+q)),F.push(new mxPoint(J,u-q)),F.push(new mxPoint(J,u+d.height+q)),F.push(new mxPoint(J,x.y-q));for(x=0;x<F.length;x+=2)t=F[x],Q=F[x+1],t=k(t,Q,null!=P?P[x/2]:null,!0),t.node.style.visibility="visible",t.redraw(),R.push(t);for(x=F.length/2;null!=P&&x<P.length;x++)P[x].destroy();K.guidesArrVer=R;u-=c.y;F=!0}else V(!1,!0)}if(H||F)return d=new mxPoint(G,u),v=b.call(this,+c,d,n,p),H&&!F?d.y=v.y:F&&!H&&(d.x=v.x),v.y!=d.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=d.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),d;V(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var l=this.guidesArrVer,n=this.guidesArrHor;if(null!=l)for(var p=0;p<l.length;p++)l[p].node.style.visibility=c?"visible":"hidden";if(null!=+n)for(p=0;p<n.length;p++)n[p].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=l){for(n=0;n<l.length;n++)l[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function l(){var J=b.diagramContainer;K.style.top=J.offsetTop-G+"px";K.style.left=J.offsetLeft-G+"px";K.style.width=(f?0:J.offsetWidth)+G+"px";K.style.height=(f?J.offsetHeight:0)+G+"px"}function n(J,D,E){if(null!=p)return J;var R;return function(){var V=this,Q=arguments,P=E&&!R;clearTimeout(R);R=setTimeout(function(){R=null;E||J.apply(V,Q)},D);P&&J.apply(V,Q)}}var p=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,+u=window.cancelAnimationFrame||window.mozCancelAnimationFrame,G=this.RULER_THICKNESS,H=this;this.unit=e;var F=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},K=document.createElement("div");K.className="geRuler";K.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){F=+Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};K.style[f?"borderRight":"borderBottom"]="0.5px solid "+F.strokeClr;K.style.borderLeft="0.5px solid "+F.strokeClr});this.updateStyle();b.diagramContainer.appendChild(K);mxEvent.disableContextMenu(K);this.editorUiRefresh=b.refresh;b.refresh=function(J){H.editorUiRefresh.apply(b,+arguments);l()};l();var d=document.createElement("canvas");d.width=K.offsetWidth;d.height=K.offsetHeight;K.style.overflow="hidden";d.style.position="relative";K.appendChild(d);var g=d.getContext("2d");this.ui=b;var k=b.editor.graph;this.graph=k;this.container=K;this.canvas=d;var v=function(J,D,E,R,V){J=Math.round(J);D=Math.round(D);E=Math.round(E);R=Math.round(R);g.beginPath();g.moveTo(J+.5,D+.5);g.lineTo(E+.5,R+.5);g.stroke();V&&(f?(g.save(),g.translate(J,D),g.rotate(-Math.PI/2),g.fillText(V,0,0),+g.restore()):g.fillText(V,J,D))},t=function(){g.clearRect(0,0,d.width,d.height);g.beginPath();g.lineWidth=.7;g.strokeStyle=F.strokeClr;g.setLineDash([]);g.font="9px Arial";g.textAlign="center";var J=k.view.scale,D=k.view.getBackgroundPageBounds(),E=k.view.translate,R=k.pageVisible;E=R?G+(f?D.y-k.container.scrollTop:D.x-k.container.scrollLeft):G+(f?E.y*J-k.container.scrollTop:E.x*J-k.container.scrollLeft);var V=0;R&&(V=k.getPageLayout(),V=f?V.y*k.pageFormat.height:V.x*k.pageFormat.width);var Q;switch(H.unit){case mxConstants.POINTS:var P=+Q=10;var q=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:Q=10;P=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:Q=20;P=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:Q=.5>=J||4<=J?8:16,P=mxConstants.PIXELS_PER_INCH/Q,q=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=P;2<=J?y=P/(2*Math.floor(J/2)):.5>=J&&(y=P*Math.floor(1/J/2)*(H.unit==mxConstants.MILLIMETERS?2:1));P=null;D=R?Math.min(E+(f?D.height:D.width),f?+d.height:d.width):f?d.height:d.width;if(R)if(g.fillStyle=F.outBkgClr,f){var B=E-G;0<B&&g.fillRect(0,G,G,B);D<d.height&&g.fillRect(0,D,G,d.height)}else B=E-G,0<B&&g.fillRect(G,0,B,G),D<d.width&&g.fillRect(D,0,d.width,G);g.fillStyle=F.fontClr;for(R=R?E:E%(y*J);R<=D;R+=y*J)if(B=Math.round((R-E)/J/y),!(R<G||B==P)){P=B;var C=null;0==B%Q&&(C=H.formatText(V+B*y)+"");f?v(G-q[Math.abs(B)%Q],R,G,R,C):v(R,G-q[Math.abs(B)%Q],R,G,C)}g.lineWidth=1;v(f?0:G,f?G:0,G,G);g.fillStyle=F.cornerClr;g.fillRect(0,0,G,G)},+x=-1,A=function(){null!=p?(null!=u&&u(x),x=p(t)):t()};this.drawRuler=A;this.sizeListener=e=n(function(){var J=k.container;f?(J=J.offsetHeight+G,d.height!=J&&(d.height=J,K.style.height=J+"px",A())):(J=J.offsetWidth+G,d.width!=J&&(d.width=J,K.style.width=J+"px",A()))},10);this.pageListener=function(){A()};this.scrollListener=c=n(function(){var J=f?k.container.scrollTop:k.container.scrollLeft;H.lastScroll!=J&&(H.lastScroll=J,A())},10);this.unitListener=function(J,D){H.setUnit(D.getProperty("unit"))};+k.addListener(mxEvent.SIZE,e);k.container.addEventListener("scroll",c);k.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(J){F=J;K.style.background=F.bkgClr;t()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(J,D,E,R){if(f&&4<J.height||!f&&4<J.width){if(null!=H.guidePart)try{g.putImageData(H.guidePart.imgData1,+H.guidePart.x1,H.guidePart.y1),g.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),g.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3)}catch(z){}var V=H.origGuideMove.apply(this,arguments);try{g.lineWidth=.5;g.strokeStyle=F.guideClr;g.setLineDash([2]);if(f){var Q=J.y+V.y+G-this.graph.container.scrollTop;var P=0;var q=Q+J.height/2;var y=G/2;var B=Q+J.height;var C=0;var M=g.getImageData(P,Q-1,G,3);v(P,Q,G,Q);Q--;var T=g.getImageData(y,q-1,G,3);v(y,q,G,q);q--;var m=g.getImageData(C,+B-1,G,3);v(C,B,G,B);B--}else Q=0,P=J.x+V.x+G-this.graph.container.scrollLeft,q=G/2,y=P+J.width/2,B=0,C=P+J.width,M=g.getImageData(P-1,Q,3,G),v(P,Q,P,G),P--,T=g.getImageData(y-1,q,3,G),v(y,q,y,G),y--,m=g.getImageData(C-1,B,3,G),v(C,B,C,G),C--;if(null==H.guidePart||H.guidePart.x1!=P||H.guidePart.y1!=Q)H.guidePart={imgData1:M,x1:P,y1:Q,imgData2:T,x2:y,y2:q,imgData3:m,x3:C,y3:B}}catch(z){}}else V=H.origGuideMove.apply(this,arguments);return V};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=+function(){var J=H.origGuideDestroy.apply(this,arguments);if(null!=H.guidePart)try{g.putImageData(H.guidePart.imgData1,H.guidePart.x1,H.guidePart.y1),g.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),g.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3),H.guidePart=null}catch(D){}return J}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};-function mxDualRuler(b,e){var f=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return f};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,e,!0);this.hRuler=new mxRuler(b,e,!1,!0);e=mxUtils.bind(this,function(c){var k=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,-function(p){k=null!=b.currentMenu;mxEvent.consume(p)}),null,mxUtils.bind(this,function(p){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(p)||mxEvent.isPopupTrigger(p))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!k){var q=new mxPopupMenu(mxUtils.bind(this,function(H,D){b.menus.addMenuItems(H,["points","inches","millimeters","meters"],D)}));q.div.className+=" geMenubarMenu";q.smartSeparators=!0;q.showDisabled=!0;q.autoExpand=-!0;q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(q,arguments);b.resetCurrentMenu();q.destroy()});var u=mxEvent.getClientX(p),E=mxEvent.getClientY(p);q.popup(u,E,null,p);b.setCurrentMenu(q,c)}mxEvent.consume(p)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.MILD_SMOOTHING,c=null,k=[],p,q=[],u,E=!1,H=!0,D=!0,L=!0,G=!0,d=[],g=!1,m=!1,t=!1,v="default",y={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},C=!0;this.setClosedPath=function(n){E=n};this.setAutoClose=function(n){H=n};this.setAutoInsert=-function(n){D=n};this.setAutoScroll=function(n){L=n};this.setOpenFill=function(n){G=n};this.setStopClickEnabled=function(n){m=n};this.setSelectInserted=function(n){t=n};this.setSmoothing=function(n){f=n};this.getSmoothing=function(){return f};this.setPerfectFreehandMode=function(n){C=n};this.isPerfectFreehandMode=function(){return C};this.setBrushSize=function(n){y.size=n};this.getBrushSize=function(){return y.size};var I=function(n){g=n;b.getRubberband().setEnabled(!n);b.graphHandler.setSelectEnabled(!n);-b.graphHandler.setMoveEnabled(!n);b.container.style.cursor=n?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){I(!0)};this.isDrawing=function(){return g};var K=mxUtils.bind(this,function(n){if(c){var z=u.length,A=m&&0<q.length&&null!=u&&2>u.length;A||q.push.apply(q,u);u=[];q.push(null);k.push(c);c=null;(A||D)&&this.stopDrawing();D&&(!A||2<=z)&&this.startDrawing();mxEvent.consume(n)}}),J=new mxCell;J.edge=!0;this.getStrokeColor=function(n){var z=null!=-v?v:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(J),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=z||n||(z=b.shapeForegroundColor);return z};this.setStrokeColor=function(n){v=n};this.createStyle=function(n){var z=";fillColor=none;";C&&(z=";lineShape=1;");z+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+n+z};this.stopDrawing=function(){if(0<k.length){if(C){for(var n=[],z=0;z<q.length;z++)null!=q[z]&&n.push([q[z].x,-q[z].y]);n=PerfectFreehand.getStroke(n,y);q=[];for(z=0;z<n.length;z++)q.push({x:n[z][0],y:n[z][1]});q.push(null)}n=q[0].x;var A=q[0].x,B=q[0].y,M=q[0].y;for(z=1;z<q.length;z++)null!=q[z]&&(n=Math.max(n,q[z].x),A=Math.min(A,q[z].x),B=Math.max(B,q[z].y),M=Math.min(M,q[z].y));n-=A;B-=M;if(0<n&&0<B){var S=100/n,l=100/B;q.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-A)*S;Q.y=(Q.y-M)*l;return Q});var x='<shape strokewidth="inherit"><foreground>',F=0;for(z=0;z<q.length;z++){var N=q[z];if(null==N){N=!1;F=-q[F];var O=q[z-1];!E&&H&&(N=F.x-O.x,O=F.y-O.y,N=Math.sqrt(N*N+O*O)<=b.tolerance);if(E||N)x+='<line x="'+F.x.toFixed(2)+'" y="'+F.y.toFixed(2)+'"/>';x+="</path>"+(G||E||N?"<fillstroke/>":"<stroke/>");F=z+1}else x=z==F?x+('<path><move x="'+N.x.toFixed(2)+'" y="'+N.y.toFixed(2)+'"/>'):x+('<line x="'+N.x.toFixed(2)+'" y="'+N.y.toFixed(2)+'"/>')}x+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){z=this.createStyle("stencil("+Graph.compress(x)+")");x=b.view.scale;F=b.view.translate;-z=new mxCell("",new mxGeometry(A/x-F.x,M/x-F.y,n/x,B/x),z);z.vertex=1;b.model.beginUpdate();try{z=b.addCell(z),b.fireEvent(new mxEventObject("cellsInserted","cells",[z])),b.fireEvent(new mxEventObject("freehandInserted","cell",z))}finally{b.model.endUpdate()}t&&b.setSelectionCells([z])}}for(z=0;z<k.length;z++)k[z].parentNode.removeChild(k[z]);c=null;k=[];q=[]}I(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(n,z){n=z.getProperty("eventName");z=z.getProperty("event");n==mxEvent.MOUSE_MOVE&&-g&&(null!=z.sourceState&&z.sourceState.setCursor("crosshair"),z.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(n,z){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(n=z.getEvent(),g&&!mxEvent.isPopupTrigger(n)&&!mxEvent.isMiddleMouseButton(n)&&!mxEvent.isMultiTouchEvent(n))){var A=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);A=Math.max(1,A*b.view.scale);var B=this.getStrokeColor();c=document.createElementNS("http://www.w3.org/2000/svg","path");-c.setAttribute("fill",C?B:"none");c.setAttribute("pointer-events","none");c.setAttribute("stroke",B);c.setAttribute("stroke-width",A);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(B=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",B=B.split(" ").map(function(M){return parseFloat(M)*A}).join(" "),c.setAttribute("stroke-dasharray",B));d=[];n=U(n);P(n);p="M"+n.x+" "+n.y;q.push(n);u=[];c.setAttribute("d",C?PerfectFreehand.getSvgPathFromStroke([[n.x,n.y]],y):p);e.appendChild(c);z.consume()}}),-mouseMove:mxUtils.bind(this,function(n,z){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){n=z.getEvent();n=U(n);P(n);var A=R(0);if(A)if(q.push(A),C){var B=[];for(A=0;A<q.length;A++)B.push([q[A].x,q[A].y]);u=[];for(var M=2;M<d.length;M+=2)A=R(M),B.push([A.x,A.y]),u.push(A);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(B,y))}else{p+=" L"+A.x+" "+A.y;B="";u=[];for(M=2;M<d.length;M+=2)A=R(M),B+=" L"+A.x+" "+A.y,u.push(A);c.setAttribute("d",p+B)}L&&(A=b.view.translate,b.scrollRectToVisible((new mxRectangle(n.x--A.x,n.y-A.y)).grow(20)));z.consume()}}),mouseUp:mxUtils.bind(this,function(n,z){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(K(z.getEvent()),z.consume())})});var U=function(n){return mxUtils.convertPoint(b.container,mxEvent.getClientX(n),mxEvent.getClientY(n))},P=function(n){for(d.push(n);d.length>f;)d.shift()},R=function(n){var z=d.length;if(1===z%2||z>=f){var A=0,B=0,M,S=0;for(M=n;M<z;M++)S++,n=d[M],A+=n.x,B+=n.y;return{x:A/S,y:B/S}}return null}}}-mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(F,N){try{if(!R){var O=e.file.getCurrentUser();if(P&&null!=O&&null!=O.displayName){var Q={from:I,id:m,type:F,sessionId:e.clientId,userId:O.id,username:O.displayName,data:N,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};Q={bytes:e.objectToString(Q),data:"aes"};Q=JSON.stringify(Q);n&&"cursor"!=F&&EditorUi.debug("P2PCollab: sending to socket server",[Q]);m++;O=!n&&("cursor"==F||"selectionChange"==F);U&&!O&&M("message",Q);if(O)for(p2pId in J)J[p2pId].send(Q)}}}catch(V){null!=-window.console&&console.error(V,F,N)}}function k(F){if(b.shareCursorPosition&&!D.isMouseDown){var N=mxUtils.getOffset(D.container),O=D.view.translate,Q=D.view.scale,V=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:V,x:Math.round((F.getX()-N.x+D.container.scrollLeft)/Q-O.x),y:Math.round((F.getY()-N.y+D.container.scrollTop)/Q-O.y)})}}function p(F,N){var O=null!=b.currentPage?b.currentPage.getId():null;if(null!=F&&null!=F.cursor&&null!=F.lastCursor)if(null!=F.lastCursor.hide||!b.isShowRemoteCursors()||-null!=F.lastCursor.pageId&&F.lastCursor.pageId!=O)F.cursor.style.display="none";else{O=function(){var Y=Math.max(D.container.scrollLeft,Math.min(D.container.scrollLeft+D.container.clientWidth-F.cursor.clientWidth,T)),Z=Math.max(D.container.scrollTop-22,Math.min(D.container.scrollTop+D.container.clientHeight-F.cursor.clientHeight,W));X.style.opacity=Y!=T||Z!=W?0:1;F.cursor.style.left=Y+"px";F.cursor.style.top=Z+"px";F.cursor.style.display=""};var Q=D.view.translate,V=D.view.scale,T=(Q.x+F.lastCursor.x)*-V+8,W=(Q.y+F.lastCursor.y)*V-12,X=F.cursor.getElementsByTagName("img")[0];N?(mxUtils.setPrefixedStyle(F.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(X.style,"transition","all 900ms ease-out"),window.setTimeout(O,0)):(mxUtils.setPrefixedStyle(F.cursor.style,"transition",null),mxUtils.setPrefixedStyle(X.style,"transition",null),O())}}function q(F,N){try{var O=function(){if(null==g[V]){var ca=C[V];null==ca&&(ca=L%d.length,C[V]=ca,L++);var da=d[ca];ca=11<ca?"black":"white";-g[V]={cursor:document.createElement("div"),color:da,selection:{}};v[N]=V;T=g[V].cursor;T.style.pointerEvents="none";T.style.position="absolute";T.style.display="none";T.style.opacity="0.9";var ja=document.createElement("img");mxUtils.setPrefixedStyle(ja.style,"transform","rotate(-45deg)translateX(-14px)");ja.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+da+'" fill="'+da+'"/>').src);ja.style.width="10px";T.appendChild(ja);ja=document.createElement("div");-ja.style.backgroundColor=da;ja.style.color=ca;ja.style.fontSize="9pt";ja.style.padding="3px 7px";ja.style.marginTop="8px";ja.style.borderRadius="10px";ja.style.maxWidth="100px";ja.style.overflow="hidden";ja.style.textOverflow="ellipsis";ja.style.whiteSpace="nowrap";mxUtils.write(ja,Q);T.appendChild(ja);b.diagramContainer.appendChild(T)}else T=g[V].cursor;W=g[V].selection};if(!R){F=JSON.parse(F);null!=F.bytes&&(F=e.stringToObject(F.bytes));n&&"cursor"!=F.type&&EditorUi.debug("P2PCollab: msg received",-[F]);if(null!=N){if(F.from==I||t[F.from]>=F.id){EditorUi.debug("P2PCollab: Dropped Message",F,I,t[F.from]);return}t[F.from]=F.id}var Q=F.username?F.username:"Anonymous",V=F.sessionId,T,W;null!=g[V]&&(clearTimeout(g[V].inactiveTO),g[V].inactiveTO=setTimeout(function(){E(null,V)},12E4));var X=F.data;switch(F.type){case "cursor":O();g[V].lastCursor=X;p(g[V],!0);break;case "diff":try{F=null!=X.patch?e.stringToObject(decodeURIComponent(X.patch)):X.diff,e.receiveRemoteChanges(F.d)}catch(ca){EditorUi.debug("P2PCollab: Diff msg error",-ca)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Y=null!=b.currentPage?b.currentPage.getId():null;if(null==Y||null!=X.pageId&&X.pageId==Y){O();for(O=0;O<X.removed.length;O++){var Z=X.removed[O];if(null!=Z){var aa=W[Z];delete W[Z];null!=aa&&aa.destroy()}}for(O=0;O<X.added.length;O++)if(Z=X.added[O],null!=Z){var ea=D.model.getCell(Z);null!=ea&&(W[Z]=D.highlightCell(ea,g[V].color,6E4,70,3))}}}break;case "notify":F=null!=X.data?e.stringToObject(decodeURIComponent(X.data)):X.msg,-e.handleMessageData(F.d)}e.file.fireEvent(new mxEventObject("realtimeMessage","message",F))}}catch(ca){null!=window.console&&console.warn(ca,F,N)}}function u(F,N){if(!n&&SimplePeer.WEBRTC_SUPPORT){var O=new SimplePeer({initiator:N,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});O.on("signal",function(Q){M("sendSignal",{to:F,from:I,signal:Q})});O.on("error",function(Q){delete K[F];EditorUi.debug("P2PCollab: p2p socket error",Q);!R&&N&&O.destroyed&&y[F]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",-F),u(F,!0))});O.on("connect",function(){delete K[F];null==J[F]||J[F].destroyed?(J[F]=O,y[F]=!0,EditorUi.debug("P2PCollab: p2p socket connected",F)):(O.noP2PMapDel=!0,O.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",F))});O.on("close",function(){O.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",F),H(v[F]),delete J[F])});O.on("data",q);return K[F]=O}}function E(F,N){H(N||v[F]);null!=F&&(delete v[F],y[F]=!1)}function H(F){var N=g[F];if(null!=N){var O=N.selection,Q;for(Q in O)null!=-O[Q]&&O[Q].destroy();null!=N.cursor&&null!=N.cursor.parentNode&&N.cursor.parentNode.removeChild(N.cursor);clearTimeout(N.inactiveTO);delete g[F]}}var D=b.editor.graph,L=0,G=null,d="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),g={},m=1,t={},v={},y={},C={},I,K={},J={},U=!0,P=!1,R=!1,n="0"!=urlParams["no-p2p"],z=!1,A=0,B=null,M=mxUtils.bind(this,function(F,N){if(!R)try{null!=-G?(G.send(JSON.stringify({action:F,msg:N})),n||EditorUi.debug("P2PCollab: sending to socket server",[F],[N])):this.joinFile(!0)}catch(O){B=O,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,O)}});this.sendMessage=c;this.sendDiff=function(F){this.sendMessage("diff",{diff:F})};this.sendNotification=function(F){this.sendMessage("notify",{msg:F})};this.getState=function(){return null!=G?G.readyState:3};this.getLastError=function(){return B};-this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(F,N){},mouseMove:function(F,N){var O,Q=-1;return function(){clearTimeout(O);var V=this,T=arguments,W=function(){O=null;Q=Date.now();F.apply(V,T)};Date.now()-Q>N?W():O=setTimeout(W,N)}}(function(F,N){k(N)},300),mouseUp:function(F,N){k(N)}};D.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);-var S=mxGraphHandler.prototype.maxCells,l=null,x={};this.selectionChangeListener=function(F,N){var O=function(Q){return null!=Q?Q.id:null};null!=l&&window.clearTimeout(l);l=window.setTimeout(function(){for(var Q=D.getSelectionCount()>S?[]:D.getSelectionCells().map(O),V=null!=b.currentPage?b.currentPage.getId():null,T={},W=[],X=[],Y=0;Y<Q.length;Y++){var Z=Q[Y];null!=Z&&(T[Z]=!0,null==x[Z]&&X.push(Z))}for(Z in x)T[Z]||W.push(Z);x=T;c("selectionChange",{pageId:V,removed:W,added:X})},300)};D.getSelectionModel().addListener(mxEvent.CHANGE,-this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var F in g)p(g[F])});mxEvent.addListener(D.container,"scroll",this.cursorHandler);D.getView().addListener(mxEvent.SCALE,this.cursorHandler);D.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);D.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(F){if(!R)try{z&&-(EditorUi.debug("P2PCollab: joinInProgress on",z),B="busy");z=++A;try{null!=G&&1==G.readyState&&(EditorUi.debug("P2PCollab: force closing socket on",G.joinId),G.close(1E3),G=null)}catch(Q){EditorUi.debug("P2PCollab: closing socket error",Q)}var N=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);null==G&&(G=N);N.addEventListener("open",function(Q){G=N;G.joinId=z;z=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",G.joinId);Editor.enableRealtimeCache||-window.setTimeout(function(){e.sendJoinMessage()},0);F&&e.scheduleCleanup()});N.addEventListener("message",function(Q){try{n||EditorUi.debug("P2PCollab: msg received",[Q]);var V=JSON.parse(Q.data);n&&"message"!=V.action&&EditorUi.debug("P2PCollab: msg received",[Q]);switch(V.action){case "message":q(V.msg,V.from);break;case "clientsList":var T=V.msg;I=T.cId;P=!0;for(V=0;V<T.list.length;V++)u(T.list[V],!0);break;case "signal":var W=V.msg;if(!n){if(K[W.from])var X=K[W.from];else X=u(W.from,!1),U=!0;-X.signal(W.signal)}break;case "newClient":U=!0;break;case "clientLeft":E(V.msg);break;case "sendSignalFailed":var Y=V.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Y);delete K[Y.to];y[Y.to]=!1}}catch(Z){null!=window.console&&console.warn(Z,Q)}});var O=!1;N.addEventListener("close",mxUtils.bind(this,function(Q){EditorUi.debug("P2PCollab: WebSocket closed",N.joinId,"reconnecting",Q.code,Q.reason);EditorUi.debug("P2PCollab: closing socket on",N.joinId);R||1E3==Q.code||A!=-N.joinId||(z==A&&(EditorUi.debug("P2PCollab: joinInProgress in close on",N.joinId),z=!1),O||(EditorUi.debug("P2PCollab: calling rejoin on",N.joinId),window.setTimeout(mxUtils.bind(this,function(){O=!0;this.joinFile(!0)}),500)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));N.addEventListener("error",mxUtils.bind(this,function(Q){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",Q);EditorUi.debug("P2PCollab: error socket on",N.joinId);R||A!=N.joinId||(z==A&&(EditorUi.debug("P2PCollab: joinInProgress in error on",-N.joinId),z=!1),O||(EditorUi.debug("P2PCollab: calling rejoin on",N.joinId),O=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(Q){B=Q,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!R){EditorUi.debug("P2PCollab: destroyed");R=!0;for(sessionId in g)H(sessionId);null!=this.mouseListeners&&D.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&-D.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(D.container,"scroll",this.cursorHandler),D.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=G&&1<=G.readyState&&(G.close(1E3),G=null);for(var F in J)null!=J[F]&&J[F].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}+function mxDualRuler(b,e){var f=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return f};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,e,!0);this.hRuler=new mxRuler(b,e,!1,!0);e=mxUtils.bind(this,function(c){var l=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,+function(n){l=null!=b.currentMenu;mxEvent.consume(n)}),null,mxUtils.bind(this,function(n){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(n)||mxEvent.isPopupTrigger(n))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!l){var p=new mxPopupMenu(mxUtils.bind(this,function(H,F){b.menus.addMenuItems(H,["points","inches","millimeters","meters"],F)}));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=+!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);b.resetCurrentMenu();p.destroy()});var u=mxEvent.getClientX(n),G=mxEvent.getClientY(n);p.popup(u,G,null,n);b.setCurrentMenu(p,c)}mxEvent.consume(n)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.MILD_SMOOTHING,c=null,l=[],n,p=[],u,G=!1,H=!0,F=!0,K=!0,d=!0,g=[],k=!1,v=!1,t=!1,x="default",A={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},J=!0;this.setClosedPath=function(q){G=q};this.setAutoClose=function(q){H=q};this.setAutoInsert=+function(q){F=q};this.setAutoScroll=function(q){K=q};this.setOpenFill=function(q){d=q};this.setStopClickEnabled=function(q){v=q};this.setSelectInserted=function(q){t=q};this.setSmoothing=function(q){f=q};this.getSmoothing=function(){return f};this.setPerfectFreehandMode=function(q){J=q};this.isPerfectFreehandMode=function(){return J};this.setBrushSize=function(q){A.size=q};this.getBrushSize=function(){return A.size};var D=function(q){k=q;b.getRubberband().setEnabled(!q);b.graphHandler.setSelectEnabled(!q);+b.graphHandler.setMoveEnabled(!q);b.container.style.cursor=q?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){D(!0)};this.isDrawing=function(){return k};var E=mxUtils.bind(this,function(q){if(c){var y=u.length,B=v&&0<p.length&&null!=u&&2>u.length;B||p.push.apply(p,u);u=[];p.push(null);l.push(c);c=null;(B||F)&&this.stopDrawing();F&&(!B||2<=y)&&this.startDrawing();mxEvent.consume(q)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(q){var y=null!=+x?x:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=y||q||(y=b.shapeForegroundColor);return y};this.setStrokeColor=function(q){x=q};this.createStyle=function(q){var y=";fillColor=none;";J&&(y=";lineShape=1;");y+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+q+y};this.stopDrawing=function(){if(0<l.length){if(J){for(var q=[],y=0;y<p.length;y++)null!=p[y]&&q.push([p[y].x,+p[y].y]);q=PerfectFreehand.getStroke(q,A);p=[];for(y=0;y<q.length;y++)p.push({x:q[y][0],y:q[y][1]});p.push(null)}q=p[0].x;var B=p[0].x,C=p[0].y,M=p[0].y;for(y=1;y<p.length;y++)null!=p[y]&&(q=Math.max(q,p[y].x),B=Math.min(B,p[y].x),C=Math.max(C,p[y].y),M=Math.min(M,p[y].y));q-=B;C-=M;if(0<q&&0<C){var T=100/q,m=100/C;p.map(function(O){if(null==O)return O;O.x=(O.x-B)*T;O.y=(O.y-M)*m;return O});var z='<shape strokewidth="inherit"><foreground>',I=0;for(y=0;y<p.length;y++){var L=p[y];if(null==L){L=!1;I=+p[I];var N=p[y-1];!G&&H&&(L=I.x-N.x,N=I.y-N.y,L=Math.sqrt(L*L+N*N)<=b.tolerance);if(G||L)z+='<line x="'+I.x.toFixed(2)+'" y="'+I.y.toFixed(2)+'"/>';z+="</path>"+(d||G||L?"<fillstroke/>":"<stroke/>");I=y+1}else z=y==I?z+('<path><move x="'+L.x.toFixed(2)+'" y="'+L.y.toFixed(2)+'"/>'):z+('<line x="'+L.x.toFixed(2)+'" y="'+L.y.toFixed(2)+'"/>')}z+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){y=this.createStyle("stencil("+Graph.compress(z)+")");z=b.view.scale;I=b.view.translate;+y=new mxCell("",new mxGeometry(B/z-I.x,M/z-I.y,q/z,C/z),y);y.vertex=1;b.model.beginUpdate();try{y=b.addCell(y),b.fireEvent(new mxEventObject("cellsInserted","cells",[y])),b.fireEvent(new mxEventObject("freehandInserted","cell",y))}finally{b.model.endUpdate()}t&&b.setSelectionCells([y])}}for(y=0;y<l.length;y++)l[y].parentNode.removeChild(l[y]);c=null;l=[];p=[]}D(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(q,y){q=y.getProperty("eventName");y=y.getProperty("event");q==mxEvent.MOUSE_MOVE&&+k&&(null!=y.sourceState&&y.sourceState.setCursor("crosshair"),y.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(q,y){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(q=y.getEvent(),k&&!mxEvent.isPopupTrigger(q)&&!mxEvent.isMiddleMouseButton(q)&&!mxEvent.isMultiTouchEvent(q))){var B=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);B=Math.max(1,B*b.view.scale);var C=this.getStrokeColor();c=document.createElementNS("http://www.w3.org/2000/svg","path");+c.setAttribute("fill",J?C:"none");c.setAttribute("pointer-events","none");c.setAttribute("stroke",C);c.setAttribute("stroke-width",B);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(C=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",C=C.split(" ").map(function(M){return parseFloat(M)*B}).join(" "),c.setAttribute("stroke-dasharray",C));g=[];q=V(q);Q(q);n="M"+q.x+" "+q.y;p.push(q);u=[];c.setAttribute("d",J?PerfectFreehand.getSvgPathFromStroke([[q.x,q.y]],A):n);e.appendChild(c);y.consume()}}),+mouseMove:mxUtils.bind(this,function(q,y){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){q=y.getEvent();q=V(q);Q(q);var B=P(0);if(B)if(p.push(B),J){var C=[];for(B=0;B<p.length;B++)C.push([p[B].x,p[B].y]);u=[];for(var M=2;M<g.length;M+=2)B=P(M),C.push([B.x,B.y]),u.push(B);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(C,A))}else{n+=" L"+B.x+" "+B.y;C="";u=[];for(M=2;M<g.length;M+=2)B=P(M),C+=" L"+B.x+" "+B.y,u.push(B);c.setAttribute("d",n+C)}K&&(B=b.view.translate,b.scrollRectToVisible((new mxRectangle(q.x-+B.x,q.y-B.y)).grow(20)));y.consume()}}),mouseUp:mxUtils.bind(this,function(q,y){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(E(y.getEvent()),y.consume())})});var V=function(q){return mxUtils.convertPoint(b.container,mxEvent.getClientX(q),mxEvent.getClientY(q))},Q=function(q){for(g.push(q);g.length>f;)g.shift()},P=function(q){var y=g.length;if(1===y%2||y>=f){var B=0,C=0,M,T=0;for(M=q;M<y;M++)T++,q=g[M],B+=q.x,C+=q.y;return{x:B/T,y:C/T}}return null}}}+mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(I,L){try{if(!P){var N=e.file.getCurrentUser();if(Q&&null!=N&&null!=N.displayName){var O={from:D,id:v,type:I,sessionId:e.clientId,userId:N.id,username:N.displayName,data:L,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};O={bytes:e.objectToString(O),data:"aes"};O=JSON.stringify(O);q&&"cursor"!=I&&EditorUi.debug("P2PCollab: sending to socket server",[O]);v++;N=!q&&("cursor"==I||"selectionChange"==I);V&&!N&&M("message",O);if(N)for(p2pId in R)R[p2pId].send(O)}}}catch(S){null!=+window.console&&console.error(S,I,L)}}function l(I){if(b.shareCursorPosition&&!F.isMouseDown){var L=mxUtils.getOffset(F.container),N=F.view.translate,O=F.view.scale,S=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:S,x:Math.round((I.getX()-L.x+F.container.scrollLeft)/O-N.x),y:Math.round((I.getY()-L.y+F.container.scrollTop)/O-N.y)})}}function n(I,L){var N=null!=b.currentPage?b.currentPage.getId():null;if(null!=I&&null!=I.cursor&&null!=I.lastCursor)if(null!=I.lastCursor.hide||!b.isShowRemoteCursors()||+null!=I.lastCursor.pageId&&I.lastCursor.pageId!=N)I.cursor.style.display="none";else{N=function(){var Z=Math.max(F.container.scrollLeft,Math.min(F.container.scrollLeft+F.container.clientWidth-I.cursor.clientWidth,U)),Y=Math.max(F.container.scrollTop-22,Math.min(F.container.scrollTop+F.container.clientHeight-I.cursor.clientHeight,W));X.style.opacity=Z!=U||Y!=W?0:1;I.cursor.style.left=Z+"px";I.cursor.style.top=Y+"px";I.cursor.style.display=""};var O=F.view.translate,S=F.view.scale,U=(O.x+I.lastCursor.x)*+S+8,W=(O.y+I.lastCursor.y)*S-12,X=I.cursor.getElementsByTagName("img")[0];L?(mxUtils.setPrefixedStyle(I.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(X.style,"transition","all 900ms ease-out"),window.setTimeout(N,0)):(mxUtils.setPrefixedStyle(I.cursor.style,"transition",null),mxUtils.setPrefixedStyle(X.style,"transition",null),N())}}function p(I,L){try{var N=function(){if(null==k[S]){var ca=J[S];null==ca&&(ca=K%g.length,J[S]=ca,K++);var fa=g[ca];ca=11<ca?"black":"white";+k[S]={cursor:document.createElement("div"),color:fa,selection:{}};x[L]=S;U=k[S].cursor;U.style.pointerEvents="none";U.style.position="absolute";U.style.display="none";U.style.opacity="0.9";var aa=document.createElement("img");mxUtils.setPrefixedStyle(aa.style,"transform","rotate(-45deg)translateX(-14px)");aa.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+fa+'" fill="'+fa+'"/>').src);aa.style.width="10px";U.appendChild(aa);aa=document.createElement("div");+aa.style.backgroundColor=fa;aa.style.color=ca;aa.style.fontSize="9pt";aa.style.padding="3px 7px";aa.style.marginTop="8px";aa.style.borderRadius="10px";aa.style.maxWidth="100px";aa.style.overflow="hidden";aa.style.textOverflow="ellipsis";aa.style.whiteSpace="nowrap";mxUtils.write(aa,O);U.appendChild(aa);b.diagramContainer.appendChild(U)}else U=k[S].cursor;W=k[S].selection};if(!P){I=JSON.parse(I);null!=I.bytes&&(I=e.stringToObject(I.bytes));q&&"cursor"!=I.type&&EditorUi.debug("P2PCollab: msg received",+[I]);if(null!=L){if(I.from==D||t[I.from]>=I.id){EditorUi.debug("P2PCollab: Dropped Message",I,D,t[I.from]);return}t[I.from]=I.id}var O=I.username?I.username:"Anonymous",S=I.sessionId,U,W;null!=k[S]&&(clearTimeout(k[S].inactiveTO),k[S].inactiveTO=setTimeout(function(){G(null,S)},12E4));var X=I.data;switch(I.type){case "cursor":N();k[S].lastCursor=X;n(k[S],!0);break;case "diff":try{I=null!=X.patch?e.stringToObject(decodeURIComponent(X.patch)):X.diff,e.receiveRemoteChanges(I.d)}catch(ca){EditorUi.debug("P2PCollab: Diff msg error",+ca)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Z=null!=b.currentPage?b.currentPage.getId():null;if(null==Z||null!=X.pageId&&X.pageId==Z){N();for(N=0;N<X.removed.length;N++){var Y=X.removed[N];if(null!=Y){var ba=W[Y];delete W[Y];null!=ba&&ba.destroy()}}for(N=0;N<X.added.length;N++)if(Y=X.added[N],null!=Y){var ea=F.model.getCell(Y);null!=ea&&(W[Y]=F.highlightCell(ea,k[S].color,6E4,70,3))}}}break;case "notify":I=null!=X.data?e.stringToObject(decodeURIComponent(X.data)):X.msg,+e.handleMessageData(I.d)}e.file.fireEvent(new mxEventObject("realtimeMessage","message",I))}}catch(ca){null!=window.console&&console.warn(ca,I,L)}}function u(I,L){if(!q&&SimplePeer.WEBRTC_SUPPORT){var N=new SimplePeer({initiator:L,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});N.on("signal",function(O){M("sendSignal",{to:I,from:D,signal:O})});N.on("error",function(O){delete E[I];EditorUi.debug("P2PCollab: p2p socket error",O);!P&&L&&N.destroyed&&A[I]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",+I),u(I,!0))});N.on("connect",function(){delete E[I];null==R[I]||R[I].destroyed?(R[I]=N,A[I]=!0,EditorUi.debug("P2PCollab: p2p socket connected",I)):(N.noP2PMapDel=!0,N.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",I))});N.on("close",function(){N.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",I),H(x[I]),delete R[I])});N.on("data",p);return E[I]=N}}function G(I,L){H(L||x[I]);null!=I&&(delete x[I],A[I]=!1)}function H(I){var L=k[I];if(null!=L){var N=L.selection,O;for(O in N)null!=+N[O]&&N[O].destroy();null!=L.cursor&&null!=L.cursor.parentNode&&L.cursor.parentNode.removeChild(L.cursor);clearTimeout(L.inactiveTO);delete k[I]}}var F=b.editor.graph,K=0,d=null,g="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),k={},v=1,t={},x={},A={},J={},D,E={},R={},V=!0,Q=!1,P=!1,q="0"!=urlParams["no-p2p"],y=!1,B=0,C=null,M=mxUtils.bind(this,function(I,L){if(!P)try{null!=+d?(d.send(JSON.stringify({action:I,msg:L})),q||EditorUi.debug("P2PCollab: sending to socket server",[I],[L])):this.joinFile(!0)}catch(N){C=N,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,N)}});this.sendMessage=c;this.sendDiff=function(I){this.sendMessage("diff",{diff:I})};this.sendNotification=function(I){this.sendMessage("notify",{msg:I})};this.getState=function(){return null!=d?d.readyState:3};this.getLastError=function(){return C};+this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(I,L){},mouseMove:function(I,L){var N,O=-1;return function(){clearTimeout(N);var S=this,U=arguments,W=function(){N=null;O=Date.now();I.apply(S,U)};Date.now()-O>L?W():N=setTimeout(W,L)}}(function(I,L){l(L)},300),mouseUp:function(I,L){l(L)}};F.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);+var T=mxGraphHandler.prototype.maxCells,m=null,z={};this.selectionChangeListener=function(I,L){var N=function(O){return null!=O?O.id:null};null!=m&&window.clearTimeout(m);m=window.setTimeout(function(){for(var O=F.getSelectionCount()>T?[]:F.getSelectionCells().map(N),S=null!=b.currentPage?b.currentPage.getId():null,U={},W=[],X=[],Z=0;Z<O.length;Z++){var Y=O[Z];null!=Y&&(U[Y]=!0,null==z[Y]&&X.push(Y))}for(Y in z)U[Y]||W.push(Y);z=U;c("selectionChange",{pageId:S,removed:W,added:X})},300)};F.getSelectionModel().addListener(mxEvent.CHANGE,+this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var I in k)n(k[I])});mxEvent.addListener(F.container,"scroll",this.cursorHandler);F.getView().addListener(mxEvent.SCALE,this.cursorHandler);F.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);F.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(I){if(!P)try{y&&+(EditorUi.debug("P2PCollab: joinInProgress on",y),C="busy");y=++B;try{null!=d&&1==d.readyState&&(EditorUi.debug("P2PCollab: force closing socket on",d.joinId),d.close(1E3),d=null)}catch(O){EditorUi.debug("P2PCollab: closing socket error",O)}var L=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);null==d&&(d=L);L.addEventListener("open",function(O){d=L;d.joinId=y;y=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",d.joinId);Editor.enableRealtimeCache||+window.setTimeout(function(){e.sendJoinMessage()},0);I&&e.scheduleCleanup()});L.addEventListener("message",function(O){try{q||EditorUi.debug("P2PCollab: msg received",[O]);var S=JSON.parse(O.data);q&&"message"!=S.action&&EditorUi.debug("P2PCollab: msg received",[O]);switch(S.action){case "message":p(S.msg,S.from);break;case "clientsList":var U=S.msg;D=U.cId;Q=!0;for(S=0;S<U.list.length;S++)u(U.list[S],!0);break;case "signal":var W=S.msg;if(!q){if(E[W.from])var X=E[W.from];else X=u(W.from,!1),V=!0;+X.signal(W.signal)}break;case "newClient":V=!0;break;case "clientLeft":G(S.msg);break;case "sendSignalFailed":var Z=S.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Z);delete E[Z.to];A[Z.to]=!1}}catch(Y){null!=window.console&&console.warn(Y,O)}});var N=!1;L.addEventListener("close",mxUtils.bind(this,function(O){EditorUi.debug("P2PCollab: WebSocket closed",L.joinId,"reconnecting",O.code,O.reason);EditorUi.debug("P2PCollab: closing socket on",L.joinId);P||1E3==O.code||B!=+L.joinId||(y==B&&(EditorUi.debug("P2PCollab: joinInProgress in close on",L.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",L.joinId),window.setTimeout(mxUtils.bind(this,function(){N=!0;this.joinFile(!0)}),500)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));L.addEventListener("error",mxUtils.bind(this,function(O){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",O);EditorUi.debug("P2PCollab: error socket on",L.joinId);P||B!=L.joinId||(y==B&&(EditorUi.debug("P2PCollab: joinInProgress in error on",+L.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",L.joinId),N=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(O){C=O,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!P){EditorUi.debug("P2PCollab: destroyed");P=!0;for(sessionId in k)H(sessionId);null!=this.mouseListeners&&F.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&+F.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(F.container,"scroll",this.cursorHandler),F.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=d&&1<=d.readyState&&(d.close(1E3),d=null);for(var I in R)null!=R[I]&&R[I].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}};diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.jsindex cbc9d9589..3406c8544 100644--- a/src/main/webapp/js/extensions.min.js+++ b/src/main/webapp/js/extensions.min.js@@ -1,334 +1,334 @@LucidImporter={};-(function(){function g(u){if(u&&null!=LucidImporter.imgSrcRepl){var F=LucidImporter.imgSrcRepl.attMap;if(F[u])u=F[u];else{F=LucidImporter.imgSrcRepl.imgRepl;for(var D=0;D<F.length;D++){var t=F[D];u=u.replace(t.searchVal,t.replVal)}LucidImporter.hasExtImgs=!0}}return u}function y(u){lb="";try{if(u){var F=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(F=LucidImporter.advImpConfig.fontMapping[u]);if(F){for(var D in F)lb+=D+"="+F[D]+";";return F.fontFamily?"font-family: "+F.fontFamily:-""}if("Liberation Sans"!=u)return lb="fontFamily="+u+";","font-family: "+u+";"}}catch(t){}return""}function z(u){return Math.round(10*u)/10}function B(u,F,D){function t(la,Ma){var ya="",za=la.t,Pb=la.l||{v:za&&"ul"==za.v?"auto":"decimal"};if(null==za||0!=Na&&Na==za.v&&Ka==Pb.v)null==za&&(Na&&(ya+=P(!0),Na=!1),ya+='<div style="',Ca.push("div"));else{Na&&(ya+=P(!0));Na=za.v;Ka=Pb.v;"ul"==za.v?(ya+="<ul ",Ca.push("ul")):(ya+="<ol ",Ca.push("ol"));ya+='style="margin: 0px; padding-left: 10px;list-style-position: inside; list-style-type:';+(function(){function g(w){if(w&&null!=LucidImporter.imgSrcRepl){var F=LucidImporter.imgSrcRepl.attMap;if(F[w])w=F[w];else{F=LucidImporter.imgSrcRepl.imgRepl;for(var D=0;D<F.length;D++){var u=F[D];w=w.replace(u.searchVal,u.replVal)}LucidImporter.hasExtImgs=!0}}return w}function y(w){lb="";try{if(w){var F=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(F=LucidImporter.advImpConfig.fontMapping[w]);if(F){for(var D in F)lb+=D+"="+F[D]+";";return F.fontFamily?"font-family: "+F.fontFamily:+""}if("Liberation Sans"!=w)return lb="fontFamily="+w+";","font-family: "+w+";"}}catch(u){}return""}function z(w){return Math.round(10*w)/10}function B(w,F,D){function u(la,Ma){var ya="",za=la.t,Pb=la.l||{v:za&&"ul"==za.v?"auto":"decimal"};if(null==za||0!=Na&&Na==za.v&&Ka==Pb.v)null==za&&(Na&&(ya+=P(!0),Na=!1),ya+='<div style="',Ca.push("div"));else{Na&&(ya+=P(!0));Na=za.v;Ka=Pb.v;"ul"==za.v?(ya+="<ul ",Ca.push("ul")):(ya+="<ol ",Ca.push("ol"));ya+='style="margin: 0px; padding-left: 10px;list-style-position: inside; list-style-type:';if("hl"==za.v)ya+="upper-roman";else switch(Pb.v){case "auto":ya+="disc";break;case "inv":ya+="circle";break;case "disc":ya+="circle";break;case "trib":ya+="square";break;case "square":ya+="square";break;case "dash":ya+="square";break;case "heart":ya+="disc";break;default:ya+="decimal"}ya+='">'}if(null!=za){ya+='<li style="text-align:'+(la.a?la.a.v:D.TextAlign||"center")+";";if(null!=Ma){if(Ma.c)var fa=Ma.c.v;if(Ma.s)var xb=Ma.s.v}try{var Va=aa[ja],rc=ra[Aa];Ma=ja;if(Va&&rc&&Va.s<rc.e)for(var vc=Va.s;null!=Va&&Va.s==vc;)"s"==Va.n?xb=Va.v:"c"==Va.n&&(fa=Va.v),Va=aa[++Ma]}catch(Fb){console.log(Fb)}fa=R(fa);null!=fa&&(fa=fa.substring(0,7),ya+="color:"+fa+";");xb&&(ya+="font-size:"+z(.75*xb)+"px;");ya+='">';Ca.push("li");ya+='<span style="';Ca.push("span")}Na||(xb=fa=la.a?la.a.v:D.TextAlign||"center","left"==fa?xb="flex-start":"right"==fa&&(xb="flex-end"),ya+="display: flex; justify-content: "+xb+"; text-align: "+fa+"; align-items: baseline; font-size: 0; line-height: 1.25;");la.il&&(ya+="margin-left: "+Math.max(0,z(.75*la.il.v-(Na?28:0)))+"px;");la.ir&&(ya+="margin-right: "+z(.75*la.ir.v)+"px;");la.mt&&(ya+="margin-top: "+z(.75*la.mt.v)+"px;");la.mb&&(ya+="margin-bottom: "+z(.75*la.mb.v)+"px;");ya+='margin-top: -2px;">';Na||(ya+="<span>",Ca.push("span"));return ya}function e(la){if(mxUtils.isEmptyObject(la))return"";var Ma="",ya=0;if(la.lk){var za=la.lk;null!=za.v&&0<za.v.length&&(Ma+='<a href="'+n(za.v[0])+'">',Ba.push("a"),ya++)}Ma+='<span style="';Ba.push("span");ya++;Ma+="font-size:"+(la.s&&la.s.v?z(.75*la.s.v):"13")+"px;";la.c&&(za=R(la.c.v),null!=za&&(za=za.substring(0,7),Ma+="color:"+za+";"));if(la.b&&la.b.v||la.fc&&la.fc.v&&0==la.fc.v.indexOf("Bold"))Ma+="font-weight: bold;";la.i&&la.i.v&&(Ma+="font-style: italic;");la.ac&&la.ac.v&&(Ma+="text-transform: uppercase;");za=null;la.f?za=la.f.v:D.Font&&(za=D.Font);Ma+=y(za);za=[];la.u&&la.u.v&&za.push("underline");la.k&&la.k.v&&za.push("line-through");0<za.length&&(Ma+="text-decoration: "+za.join(" ")+";");Ma+='">';Pa.push(ya);return Ma}-function P(la){var Ma="";do{var ya=Ca.pop();if(!la&&Na&&("ul"==ya||"ol"==ya)){Ca.push(ya);break}Ma+="</"+ya+">"}while(0<Ca.length);return Ma}function r(la,Ma,ya,za){la=la?la.substring(Ma,ya):"";Na&&(la=la.trim());0==Ba.length&&0<la.length&&(la=e({dummy:1})+la);la=la.replace(/</g,"<").replace(/>/g,">");do for(Ma=Pa.pop(),ya=0;ya<Ma;ya++){var Pb=Ba.pop();la+="</"+Pb+">"}while(za&&0<Ba.length);return la}var q={a:!0,il:!0,ir:!0,mt:!0,mb:!0,p:!0,t:!0,l:!0},Z={lk:!0,s:!0,c:!0,b:!0,fc:!0,i:!0,u:!0,-k:!0,f:!0,ac:!0};F.sort(function(la,Ma){return la.s-Ma.s});var aa=F.filter(function(la){return Z[la.n]});aa[0]&&0!=aa[0].s&&aa.unshift({s:0,n:"dummy",v:"",e:aa[0].s});F=F.filter(function(la){return q[la.n]});for(var V=[0],wa=0;0<(wa=u.indexOf("\n",wa));)wa++,V.push(wa);for(var ja=wa=0;ja<F.length;ja++){if(F[ja].s>V[wa])F.splice(ja,0,{s:V[wa],n:"a",v:D.TextAlign||"center"});else{for(var na=0;ja+na<F.length&&F[ja+na].s==V[wa];)na++;1<na&&(ja+=na-1)}wa++}null!=V[wa]&&F.push({s:V[wa],n:"a",v:D.TextAlign||-"center"});V="";var ra=aa.slice();ra.sort(function(la,Ma){return la.e-Ma.e});var Aa=ja=0;wa=0;na={};for(var ma={},Ba=[],Pa=[],Ca=[],ua=!1,Na=!1,Ka,La=0,l=0,Ia=u.length,bb=!0;wa<F.length||bb;){bb=!1;if(wa<F.length){var Ea=F[wa],Ra=F[wa].s;ua&&(ma={},V+=r(u,La,Ia,!0),l=La=Ia,V+=P());for(;null!=Ea&&Ea.s==Ra;)ma[Ea.n]=Ea,Ea=F[++wa];Ia=null!=Ea?Ea.s:u.length;V+=t(ma,na);ua&&(V+=e(na));ua=!0}for(;ja>=Aa&&(ja<aa.length||Aa<ra.length);)if(Ea=aa[ja],Ra=ra[Aa],Ea&&Ra&&Ea.s<Ra.e){if(Ea.s>=Ia)break;La=Ea.s;0<-La-l&&(V+=e(na)+r(u,l,La),l=La);for(;null!=Ea&&Ea.s==La;)na[Ea.n]=Ea,Ea=aa[++ja];V+=e(na)}else if(Ra){if(Ra.e>Ia)break;l=Ra.e;do delete na[Ra.n],Ra=ra[++Aa];while(null!=Ra&&Ra.e==l);V+=r(u,La,l);La=l;0!=Pa.length||null!=Ea&&Ea.s==l||(aa.splice(ja,0,{s:l,n:"dummy",v:""}),ra.splice(Aa,0,{e:Ea?Ea.s:Ia,n:"dummy",v:""}))}else break}V+=r(null,null,null,!0);ua&&(l!=Ia&&(V+=e({dummy:1})+r(u,l,Ia)),V+=P(!0));return V}function m(u,F){G=!1;var D=null!=u.Text&&u.Text.t?u.Text:null!=u.Value&&u.Value.t?u.Value:-null!=u.Lane_0&&u.Lane_0.t?u.Lane_0:null;null==D&&null!=u.State?u.State.t&&(D=u.State):null==D&&null!=u.Note?u.Note.t&&(D=u.Note):null==D&&null!=u.Title?u.Title.t&&(D=u.Title):u.t&&(D=u);null==D&&null!=u.TextAreas?null!=u.TextAreas.Text&&null!=u.TextAreas.Text.Value&&u.TextAreas.Text.Value.t&&(D=u.TextAreas.Text.Value):null==D&&null!=u.t0&&u.t0.t&&(D=u.t0);if(null!=D){if(null!=D.t){var t=D.t;t=t.replace(/\u2028/g,"\n");D=D.m;try{/ /.test(t)&&(LucidImporter.hasUnknownShapes=!0);for(var e=0;e<D.length;e++)if(0<-D[e].s||null!=D[e].e&&D[e].e<t.length||"t"==D[e].n||"ac"==D[e].n||"lk"==D[e].n){G=!0;break}if(G=G||F)return B(t,D,u)}catch(P){console.log(P)}t=t.replace(/</g,"<");return t=t.replace(/>/g,">")}if(null!=D.Value&&null!=D.Value.t)return D.Value.t=D.Value.t.replace(/</g,"<"),D.Value.t=D.Value.t.replace(/>/g,">"),D.Value.t}return""}function h(u){return null!=u.Action?u.Action:u}function c(u){if(null!=u.Text){if(null!=u.Text.m)return u.Text.m}else if(null!=u.TextAreas){if(null!=u.TextAreas.Text&&-null!=u.TextAreas.Text.Value&&null!=u.TextAreas.Text.Value.m)return u.TextAreas.Text.Value.m}else{if(null!=u.m)return u.m;if(null!=u.Title){if(null!=u.Title.m)return u.Title.m}else if(null!=u.State){if(null!=u.State.m)return u.State.m}else if(null!=u.Note&&null!=u.Note.m)return u.Note.m}return null}function a(u,F){u="whiteSpace=wrap;"+(F?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+lb:f(u)+k(u)+p(u)+x(u)+C(u)+J(u)+M(u)+L(u)+Q(u))+U(u)+H(u)+Zb(mxConstants.STYLE_ALIGN,u.TextAlign,"center");lb=-"";return u}function b(u,F,D,t,e,P){P=null==P?!1:P;var r="",q=!1,Z=!1;if(null!=u)if(P){P=u.split(";");u="";for(var aa=0;aa<P.length;aa++)"fillColor=none"==P[aa]?Z=!0:"strokeColor=none"==P[aa]?q=!0:""!=P[aa]&&(u+=P[aa]+";")}else""!=u&&";"!=u.charAt(u.length-1)&&(r=";");r+=(Xc(u,"whiteSpace")?"":"whiteSpace=wrap;")+(e?(Xc(u,"overflow")?"":"overflow=block;blockSpacing=1;")+(Xc(u,"html")?"":"html=1;")+"fontSize=13;"+lb:d(mxConstants.STYLE_FONTSIZE,u,F,D,t)+d(mxConstants.STYLE_FONTFAMILY,u,F,D,t)+d(mxConstants.STYLE_FONTCOLOR,-u,F,D,t)+d(mxConstants.STYLE_FONTSTYLE,u,F,D,t)+d(mxConstants.STYLE_ALIGN,u,F,D,t)+d(mxConstants.STYLE_SPACING_LEFT,u,F,D,t)+d(mxConstants.STYLE_SPACING_RIGHT,u,F,D,t)+d(mxConstants.STYLE_SPACING_TOP,u,F,D,t)+d(mxConstants.STYLE_SPACING_BOTTOM,u,F,D,t))+d(mxConstants.STYLE_ALIGN+"Global",u,F,D,t)+d(mxConstants.STYLE_SPACING,u,F,D,t)+d(mxConstants.STYLE_VERTICAL_ALIGN,u,F,D,t)+d(mxConstants.STYLE_STROKECOLOR,u,F,D,t)+d(mxConstants.STYLE_OPACITY,u,F,D,t)+d(mxConstants.STYLE_ROUNDED,u,F,D,t)+d(mxConstants.STYLE_ROTATION,-u,F,D,t)+d(mxConstants.STYLE_FLIPH,u,F,D,t)+d(mxConstants.STYLE_FLIPV,u,F,D,t)+d(mxConstants.STYLE_SHADOW,u,F,D,t)+d(mxConstants.STYLE_FILLCOLOR,u,F,D,t)+d(mxConstants.STYLE_DASHED,u,F,D,t)+d(mxConstants.STYLE_STROKEWIDTH,u,F,D,t)+d(mxConstants.STYLE_IMAGE,u,F,D,t)+d(mxConstants.STYLE_POINTER_EVENTS,u,F,D,t);Z&&!Xc(r,mxConstants.STYLE_FILLCOLOR)&&(r+="fillColor=none;");q&&!Xc(r,mxConstants.STYLE_STROKECOLOR)&&(r+="strokeColor=none;");lb="";return r}function d(u,F,D,t,e){if(!Xc(F,u))switch(u){case mxConstants.STYLE_FONTSIZE:return f(D);-case mxConstants.STYLE_FONTFAMILY:return k(D);case mxConstants.STYLE_FONTCOLOR:return p(D);case mxConstants.STYLE_FONTSTYLE:return x(D);case mxConstants.STYLE_ALIGN:return C(D);case mxConstants.STYLE_ALIGN+"Global":return Zb(mxConstants.STYLE_ALIGN,D.TextAlign,"center");case mxConstants.STYLE_SPACING_LEFT:return J(D);case mxConstants.STYLE_SPACING_RIGHT:return M(D);case mxConstants.STYLE_SPACING_TOP:return L(D);case mxConstants.STYLE_SPACING_BOTTOM:return Q(D);case mxConstants.STYLE_SPACING:return U(D);-case mxConstants.STYLE_VERTICAL_ALIGN:return H(D);case mxConstants.STYLE_STROKECOLOR:return I(D,t);case mxConstants.STYLE_OPACITY:return O(D,t,e);case mxConstants.STYLE_ROUNDED:return u=!e.edge&&!e.style.includes("rounded")&&null!=D.Rounding&&0<D.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+z(.75*D.Rounding)+";":"",u;case mxConstants.STYLE_ROTATION:return ba(D,t,e);case mxConstants.STYLE_FLIPH:return u=D.FlipX?"flipH=1;":"",u;case mxConstants.STYLE_FLIPV:return u=D.FlipY?"flipV=1;":"",u;case mxConstants.STYLE_SHADOW:return W(D);-case mxConstants.STYLE_FILLCOLOR:return ca(D,t);case mxConstants.STYLE_DASHED:return qa(D);case mxConstants.STYLE_STROKEWIDTH:return sa(D);case mxConstants.STYLE_IMAGE:return Fa(D,t);case mxConstants.STYLE_POINTER_EVENTS:return D.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("s"==D.n&&D.v)return"fontSize="+z(.75*D.v)+";";F++}return"fontSize=13;"}function k(u){var F=c(u);if(null!=F)for(var D=-0;D<F.length;D++)if("f"==F[D].n&&F[D].v){var t=F[D].v;break}!t&&u.Font&&(t=u.Font);y(t);return lb}function n(u){return"ext"==u.tp?u.url:"ml"==u.tp?"mailto:"+u.eml:"pg"==u.tp?"data:page/id,"+(LucidImporter.pageIdsMap[u.id]||0):"c"==u.tp?"data:confluence/id,"+u.ccid:null}function p(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("c"==D.n&&null!=D.v)return u=R(D.v).substring(0,7),"#000000"==u&&(u="default"),mxConstants.STYLE_FONTCOLOR+"="+u+";";F++}return""}function x(u){return A(c(u))}function A(u){if(null!=-u){var F=0,D=!1;if(null!=u)for(var t=0;!D&&t<u.length;){var e=u[t];"b"==e.n?null!=e.v&&e.v&&(D=!0,F+=1):"fc"==e.n&&"Bold"==e.v&&(D=!0,F+=1);t++}D=!1;if(null!=u)for(t=0;!D&&t<u.length;)e=u[t],"i"==e.n&&null!=e.v&&e.v&&(D=!0,F+=2),t++;D=!1;if(null!=u)for(t=0;!D&&t<u.length;)e=u[t],"u"==e.n&&null!=e.v&&e.v&&(D=!0,F+=4),t++;if(0<F)return"fontStyle="+F+";"}return""}function C(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("a"==D.n&&null!=D.v)return"align="+D.v+";";F++}return""}function J(u){u=-c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if(null!=D.v&&"il"==D.n)return"spacingLeft="+z(.75*D.v)+";";F++}return""}function M(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("ir"==D.n&&null!=D.v)return"spacingRight="+z(.75*D.v)+";";F++}return""}function L(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("mt"==D.n&&null!=D.v)return"spacingTop="+z(.75*D.v)+";";F++}return""}function Q(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("mb"==D.n&&null!=D.v)return"spacingBottom="+-z(.75*D.v)+";";F++}return""}function U(u){return"number"===typeof u.InsetMargin?"spacing="+Math.max(0,z(.75*u.InsetMargin))+";":""}function H(u){return null!=u.Text_VAlign&&"string"===typeof u.Text_VAlign?"verticalAlign="+u.Text_VAlign+";":null!=u.Title_VAlign&&"string"===typeof u.Title_VAlign?"verticalAlign="+u.Title_VAlign+";":Zb(mxConstants.STYLE_VERTICAL_ALIGN,u.TextVAlign,"middle")}function I(u,F){return 0==u.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":Zb(mxConstants.STYLE_STROKECOLOR,S(u.LineColor),-"#000000")}function N(u){return null!=u?mxConstants.STYLE_FILLCOLOR+"="+S(u)+";":""}function K(u){return null!=u?"swimlaneFillColor="+S(u)+";":""}function O(u,F,D){F="";if("string"===typeof u.LineColor&&(u.LineColor=R(u.LineColor),7<u.LineColor.length)){var t="0x"+u.LineColor.substring(u.LineColor.length-2,u.LineColor.length);D.style.includes("strokeOpacity")||(F+="strokeOpacity="+Math.round(parseInt(t)/2.55)+";")}"string"===typeof u.FillColor&&(u.FillColor=R(u.FillColor),7<u.FillColor.length&&(u=-"0x"+u.FillColor.substring(u.FillColor.length-2,u.FillColor.length),D.style.includes("fillOpacity")||(F+="fillOpacity="+Math.round(parseInt(u)/2.55)+";")));return F}function ba(u,F,D){var t="";if(null!=u.Rotation){u=mxUtils.toDegree(parseFloat(u.Rotation));var e=!0;0!=u&&F.Class&&("UMLSwimLaneBlockV2"==F.Class||(0<=F.Class.indexOf("Rotated")||-90==u||270==u)&&(0<=F.Class.indexOf("Pool")||0<=F.Class.indexOf("SwimLane")))?(u+=90,D.geometry.rotate90(),D.geometry.isRotated=!0,e=!1):0<=mxUtils.indexOf(vf,-F.Class)?(u-=90,D.geometry.rotate90()):0<=mxUtils.indexOf(wf,F.Class)&&(u+=180);0!=u&&(t+="rotation="+u+";");e||(t+="horizontal=0;")}return t}function W(u){return null!=u.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function R(u){if(u){if("object"===typeof u)try{u=u.cs[0].c}catch(F){console.log(F),u="#ffffff"}"rgb"==u.substring(0,3)?u="#"+u.match(/\d+/g).map(function(F){F=parseInt(F).toString(16);return(1==F.length?"0":"")+F}).join(""):"#"!=u.charAt(0)&&(u="#"+u)}return u}function S(u){return(u=R(u))?-u.substring(0,7):null}function ka(u,F){return(u=R(u))&&7<u.length?F+"="+Math.round(parseInt("0x"+u.substr(7))/2.55)+";":""}function ca(u,F){if(null!=u.FillColor)if("object"===typeof u.FillColor){if(null!=u.FillColor.cs&&1<u.FillColor.cs.length)return Zb(mxConstants.STYLE_FILLCOLOR,S(u.FillColor.cs[0].c))+Zb(mxConstants.STYLE_GRADIENTCOLOR,S(u.FillColor.cs[1].c))}else return"string"===typeof u.FillColor?Zb(mxConstants.STYLE_FILLCOLOR,S(u.FillColor),"#FFFFFF"):Zb(mxConstants.STYLE_FILLCOLOR,"none");-return""}function qa(u){return"dotted"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=1 4;":"dashdot"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 5 1 5;":"dashdotdot"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 5 1 5 1 5;":"dotdotdot"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=1 2;":"longdash"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=16 6;":"dashlongdash"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 6 16 6;":"dashed24"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=3 8;":-"dashed32"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=6 5;":"dashed44"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=8 8;":null!=u.StrokeStyle&&"dashed"==u.StrokeStyle.substring(0,6)?"dashed=1;fixDash=1;":""}function sa(u){return null!=u.LineWidth?Zb(mxConstants.STYLE_STROKEWIDTH,z(.75*parseFloat(u.LineWidth)),"1"):""}function Fa(u,F,D){var t="";u.FillColor&&u.FillColor.url?(D=u.FillColor.url,"fill"==u.FillColor.pos&&(t="imageAspect=0;")):"ImageSearchBlock2"==F.Class?D=u.URL:"UserImage2Block"==-F.Class&&null!=u.ImageFillProps&&null!=u.ImageFillProps.url&&(D=u.ImageFillProps.url);return null!=D?"image="+g(D)+";"+t:""}function pa(u,F,D){null!=F.Link&&0<F.Link.length&&D.setAttributeForCell(u,"link",n(F.Link[0]));null!=F.NoteHint&&F.NoteHint.t&&D.setAttributeForCell(u,"Notes",F.NoteHint.t);var t=[],e=D.convertValueToString(u),P=!1;if(null!=e){for(var r=0;match=xf.exec(e);){var q=match[0];P=!0;if(2<q.length){var Z=q.substring(2,q.length-2);"documentName"==Z?Z="filename":"pageName"==Z?Z="page":-"totalPages"==Z?Z="pagecount":"page"==Z?Z="pagenumber":"date:"==Z.substring(0,5)?Z="date{"+Z.substring(5).replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy")+"}":"lastModifiedTime"==Z.substring(0,16)?Z=Z.replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy"):"i18nDate:"==Z.substring(0,9)&&(Z="date{"+Z.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");Z="%"+Z+"%";t.push(e.substring(r,match.index)+(null!=Z?Z:q));r=-match.index+q.length}}P&&(t.push(e.substring(r)),D.setAttributeForCell(u,"label",t.join("")),D.setAttributeForCell(u,"placeholders","1"))}for(var aa in F)if(F.hasOwnProperty(aa)&&aa.toString().startsWith("ShapeData_"))try{var V=F[aa],wa=mxUtils.trim(V.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Za(u,wa,V.Value,D)}catch(ja){window.console&&console.log("Ignored "+aa+":",ja)}}function Za(u,F,D,t){for(var e=F,P=0;null!=t.getAttributeForCell(u,e);)P++,e=F+"_"+P;t.setAttributeForCell(u,-e,null!=D?D:"")}function Qb(u,F,D,t,e,P){var r=h(F);if(null!=r){var q=Od[r.Class];null!=q?(u.style+=q,";"!=u.style.charAt(u.style.length-1)&&(u.style+=";")):u.edge||(console.log("No mapping found for: "+r.Class),LucidImporter.hasUnknownShapes=!0);q=null!=r.Properties?r.Properties:r;if(null!=q&&(u.value=P?"":m(q),u.style+=b(u.style,q,r,u,G,!0),u.style.includes("strokeColor")||(u.style+=I(q,r)),pa(u,q,D),q.Title&&q.Title.t&&q.Text&&q.Text.t&&"ExtShape"!=r.Class.substr(0,8)&&(D=u.geometry,D=new mxCell(m(q.Title),-new mxGeometry(0,D.height,D.width,10),"strokeColor=none;fillColor=none;"),D.vertex=!0,u.insert(D),D.style+=a(q.Title,G)),u.edge)){u.style=null!=q.Rounding&&"diagonal"!=q.Shape?u.style+("rounded=1;arcSize="+q.Rounding+";"):u.style+"rounded=0;";if(D="curve"==q.Shape)u.style+="curved=1;";else if("diagonal"!=q.Shape)if(null!=q.ElbowPoints&&0<q.ElbowPoints.length)for(u.geometry.points=[],r=0;r<q.ElbowPoints.length;r++)u.geometry.points.push(new mxPoint(Math.round(.75*q.ElbowPoints[r].x+wc),Math.round(.75*-q.ElbowPoints[r].y+xc)));else if("elbow"==q.Shape||null!=q.Endpoint1.Block&&null!=q.Endpoint2.Block)u.style+="edgeStyle=orthogonalEdgeStyle;";if(q.LineJumps||LucidImporter.globalProps.LineJumps)u.style+="jumpStyle=arc;";null!=q.Endpoint1.Style&&(P=Ee[q.Endpoint1.Style],null!=P?(P=P.replace(/xyz/g,"start"),u.style+="startArrow="+P+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+q.Endpoint1.Style)));null!=q.Endpoint2.Style&&(P=Ee[q.Endpoint2.Style],null!=-P?(P=P.replace(/xyz/g,"end"),u.style+="endArrow="+P+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+q.Endpoint2.Style)));P=null!=q.ElbowControlPoints&&0<q.ElbowControlPoints.length?q.ElbowControlPoints:q.Joints;if(D&&null!=q.BezierJoints&&0<q.BezierJoints.length){P=[];D=q.BezierJoints[q.BezierJoints.length-1];D.p.x=q.Endpoint2.x;D.p.y=q.Endpoint2.y;for(r=0;r<q.BezierJoints.length;r++)D=q.BezierJoints[r],P.push({x:D.p.x+D.nt.x*D.lcps*.75,y:D.p.y+D.nt.y*-D.lcps*.75}),P.push({x:D.p.x+D.nt.x*D.rcps*.75,y:D.p.y+D.nt.y*D.rcps*.75});P=P.slice(1,P.length-1)}else D&&(P=[],P.push({x:q.Endpoint1.x+(.1>q.Endpoint1.LinkX?-250:.9<q.Endpoint1.LinkX?250:0),y:q.Endpoint1.y+(.1>q.Endpoint1.LinkY?-250:.9<q.Endpoint1.LinkY?250:0)}),P.push({x:q.Endpoint2.x+(.1>q.Endpoint2.LinkX?-250:.9<q.Endpoint2.LinkX?250:0),y:q.Endpoint2.y+(.1>q.Endpoint2.LinkY?-250:.9<q.Endpoint2.LinkY?250:0)}));if(null!=P)for(u.geometry.points=[],r=0;r<P.length;r++)D=P[r].p?P[r].p:P[r],u.geometry.points.push(new mxPoint(Math.round(.75*-D.x+wc),Math.round(.75*D.y+xc)));D=!1;if((null==u.geometry.points||0==u.geometry.points.length)&&null!=q.Endpoint1.Block&&q.Endpoint1.Block==q.Endpoint2.Block&&null!=t&&null!=e){D=new mxPoint(Math.round(t.geometry.x+t.geometry.width*q.Endpoint1.LinkX),Math.round(t.geometry.y+t.geometry.height*q.Endpoint1.LinkY));P=new mxPoint(Math.round(e.geometry.x+e.geometry.width*q.Endpoint2.LinkX),Math.round(e.geometry.y+e.geometry.height*q.Endpoint2.LinkY));wc=D.x==P.x?Math.abs(D.x-t.geometry.x)<t.geometry.width/-2?-20:20:0;xc=D.y==P.y?Math.abs(D.y-t.geometry.y)<t.geometry.height/2?-20:20:0;var Z=new mxPoint(D.x+wc,D.y+xc),aa=new mxPoint(P.x+wc,P.y+xc);Z.generated=!0;aa.generated=!0;u.geometry.points=[Z,aa];D=D.x==P.x}null!=t&&t.geometry.isRotated||(Z=Fe(u,q.Endpoint1,!0,D,null,t));null!=t&&null!=Z&&(null==t.stylePoints&&(t.stylePoints=[]),t.stylePoints.push(Z),LucidImporter.stylePointsSet.add(t));null!=e&&e.geometry.isRotated||(aa=Fe(u,q.Endpoint2,!1,D,null,e));null!=e&&null!=aa&&(null==e.stylePoints&&(e.stylePoints=-[]),e.stylePoints.push(aa),LucidImporter.stylePointsSet.add(e))}}null!=F.id&&(u.style+=";lucidId="+F.id+";");u.lucidchartObject=F}function vb(u,F){var D=h(u).Properties,t=D.BoundingBox;null==u.Class||"AWS"!==u.Class.substring(0,3)&&"Amazon"!==u.Class.substring(0,6)||u.Class.includes("AWS19")||(t.h-=20);v=new mxCell("",new mxGeometry(Math.round(.75*t.x+wc),Math.round(.75*t.y+xc),Math.round(.75*t.w),Math.round(.75*t.h)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;Qb(v,u,F);-v.zOrder=D.ZOrder;Ge(v,D);D.Hidden&&(v.visible=!1);return v}function yf(u,F,D,t){var e=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");e.geometry.relative=!0;e.edge=!0;Qb(e,u,F,D,t,!0);var P=h(u).Properties,r=null!=P?P.TextAreas:u.TextAreas;if(null!=r){for(var q=0;void 0!==r["t"+q];){var Z=r["t"+q];null!=Z&&(e=Pd(Z,e,u,D,t,F));q++}for(q=0;void 0!==r["m"+q]||1>q;)Z=r["m"+q],null!=Z&&(e=Pd(Z,e,u,D,t,F)),q++;null!=r.Text&&(e=Pd(r.Text,e,u,D,t,F));r=null!=P?P.TextAreas:u.TextAreas;null!=-r.Message&&(e=Pd(r.Message,e,u,D,t,F))}u.Hidden&&(e.visible=!1);return e}function Pd(u,F,D,t,e,P){var r=2*(parseFloat(u.Location)-.5);isNaN(r)&&null!=u.Text&&null!=u.Text.Location&&(r=2*(parseFloat(u.Text.Location)-.5));P=m(u);var q=mxCell;r=new mxGeometry(isNaN(r)?0:r,0,0,0);var Z=ge;var aa=D;if(G)aa=lb;else{var V="13",wa="";if(null!=u&&null!=u.Value&&null!=u.Value.m){wa=A(u.Value.m);for(var ja=0;ja<u.Value.m.length;ja++)if("s"==u.Value.m[ja].n&&u.Value.m[ja].v)V=z(.75*parseFloat(u.Value.m[ja].v));-else if("c"==u.Value.m[ja].n){var na=R(u.Value.m[ja].v);null!=na&&(na=na.substring(0,7));"#000000"==na&&(na="default");wa+="fontColor="+na+";"}wa+=k(aa);lb=""}aa=wa+";fontSize="+V+";"}q=new q(P,r,Z+aa);q.geometry.relative=!0;q.vertex=!0;if(u.Side)try{D.Action&&D.Action.Properties&&(D=D.Action.Properties);if(null!=t&&null!=e){var ra=t.geometry,Aa=e.geometry;var ma=Math.abs(ra.x+ra.width*D.Endpoint1.LinkX-(Aa.x+Aa.width*D.Endpoint2.LinkX));var Ba=Math.abs(ra.y+ra.height*D.Endpoint1.LinkY-(Aa.y+Aa.height*-D.Endpoint2.LinkY))}else ma=Math.abs(D.Endpoint1.x-D.Endpoint2.x),Ba=Math.abs(D.Endpoint1.y-D.Endpoint2.y);var Pa=mxUtils.getSizeForString(P.replace(/\n/g,"<br>"));q.geometry.offset=0==ma||ma<Ba?new mxPoint(Math.sign(D.Endpoint1.y-D.Endpoint2.y)*u.Side*(Pa.width/2+5+ma),0):new mxPoint(0,Math.sign(D.Endpoint2.x-D.Endpoint1.x)*u.Side*(Pa.height/2+5+Ba))}catch(Ca){console.log(Ca)}q.lucidchartObject=u;F.insert(q);return F}function Zb(u,F,D,t){null!=F&&null!=t&&(F=t(F));return null!=F&&F!=D?u+"="+F+";":-""}function Fe(u,F,D,t,e,P){if(null!=F&&null!=F.LinkX&&null!=F.LinkY&&(F.LinkX=Math.round(1E3*F.LinkX)/1E3,F.LinkY=Math.round(1E3*F.LinkY)/1E3,null!=P&&P.style&&-1<P.style.indexOf("flipH=1")&&(F.LinkX=1-F.LinkX),null!=P&&P.style&&-1<P.style.indexOf("flipV=1")&&(F.LinkY=1-F.LinkY),u.style+=(t?"":(D?"exitX":"entryX")+"="+F.LinkX+";")+(e?"":(D?"exitY":"entryY")+"="+F.LinkY+";")+(D?"exitPerimeter":"entryPerimeter")+"=0;",F.Inside))return"["+F.LinkX+","+F.LinkY+",0]"}function He(u,F,D,t,e){try{var P=function(ma,-Ba){if(null!=ma)if(Array.isArray(ma))for(var Pa=0;Pa<ma.length;Pa++)P(ma[Pa].p?ma[Pa].p:ma[Pa],Ba);else Ba=Ba?.75:1,q=Math.min(q,ma.x*Ba),Z=Math.min(Z,ma.y*Ba),aa=Math.max(aa,(ma.x+(ma.width?ma.width:0))*Ba),V=Math.max(V,(ma.y+(ma.height?ma.height:0))*Ba)};null!=u.Action&&null!=u.Action.Properties&&(u=u.Action.Properties);var r=new mxCell("",new mxGeometry,"group;dropTarget=0;pointerEvents=0;");r.vertex=!0;r.zOrder=u.ZOrder;var q=Infinity,Z=Infinity,aa=-Infinity,V=-Infinity,wa=u.Members;e=[];for(var ja in wa){var na=-F[ja];null!=na?e.push(na):null!=t[ja]&&(e.push(t[ja]),D[ja]=r)}e.sort(function(ma,Ba){ma=ma.zOrder||ma.ZOrder;Ba=Ba.zOrder||Ba.ZOrder;return null!=ma&&null!=Ba?ma>Ba?1:ma<Ba?-1:0:0});for(D=F=0;D<e.length;D++)if(na=e[D],na.vertex)P(na.geometry),na.parent=r,r.insert(na,F++);else{var ra=null!=na.Action&&na.Action.Properties?na.Action.Properties:na;P(ra.Endpoint1,!0);P(ra.Endpoint2,!0);P(ra.ElbowPoints,!0);P(ra.ElbowControlPoints,!0);P(ra.BezierJoints,!0);P(ra.Joints,!0)}r.geometry.x=q;r.geometry.y=Z;-r.geometry.width=aa-q;r.geometry.height=V-Z;if(null!=r.children)for(D=0;D<r.children.length;D++){var Aa=r.children[D].geometry;Aa.x-=q;Aa.y-=Z}u.IsState?(r.lucidLayerInfo={name:u.Name,visible:!u.Hidden,locked:u.Restrictions.b&&u.Restrictions.p&&u.Restrictions.c},r.style+="container=1;collapsible=0;recursiveResize=0;"):u.Hidden&&(r.visible=!1);r.lucidchartObject=u;return r}catch(ma){console.log(ma)}}function zf(u,F,D){LucidImporter.hasMath=!1;LucidImporter.stylePointsSet=new Set;u.getModel().beginUpdate();-try{var t=function(Ca,ua){function Na(Ra,la,Ma){null==Ra||Ra.generated||(Ra.x-=la,Ra.y-=Ma)}var Ka=null!=ua.Endpoint1.Block?P[ua.Endpoint1.Block]:null,La=null!=ua.Endpoint2.Block?P[ua.Endpoint2.Block]:null,l=yf(Ca,u,Ka,La);if(ua.Endpoint1&&ua.Endpoint1.Line||ua.Endpoint2&&ua.Endpoint2.Line)console.log("Edge to Edge case"),LucidImporter.hasUnknownShapes=!0;null==Ka&&null!=ua.Endpoint1&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.75*ua.Endpoint1.x),Math.round(.75*ua.Endpoint1.y)),!0);null==-La&&null!=ua.Endpoint2&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.75*ua.Endpoint2.x),Math.round(.75*ua.Endpoint2.y)),!1);Ca=r[Ca.id];if(null!=Ca){for(var Ia=l.geometry,bb=ua=0,Ea=Ca;null!=Ea&&null!=Ea.geometry;)ua+=Ea.geometry.x,bb+=Ea.geometry.y,Ea=Ea.parent;Na(Ia.sourcePoint,ua,bb);Na(Ia.targetPoint,ua,bb);Na(Ia.offset,ua,bb);Ia=Ia.points;if(null!=Ia)for(Ea=0;Ea<Ia.length;Ea++)Na(Ia[Ea],ua,bb)}e.push(u.addCell(l,Ca,null,Ka,La))},e=[],P={},r={},q={},Z=[];null!=F.Lines&&(q=F.Lines);if(null!=-F.Blocks){Object.assign(q,F.Blocks);for(var aa in F.Blocks){var V=F.Blocks[aa];V.id=aa;var wa=!1;null!=Od[V.Class]&&"mxCompositeShape"==Od[V.Class]&&(P[V.id]=Ie(V,e,u),Z.push(V),wa=!0);wa||(P[V.id]=vb(V,u),Z.push(V))}if(null!=F.Generators)for(aa in F.Generators)"OrgChart2018"==F.Generators[aa].ClassName?(LucidImporter.hasUnknownShapes=!0,Je(aa,F.Generators[aa],F.Data,u,P)):LucidImporter.hasUnknownShapes=!0}else{for(var ja=0;ja<F.Objects.length;ja++)V=F.Objects[ja],q[V.id]=V,null!=V.Action&&"mxCompositeShape"==-Od[V.Action.Class]?P[V.id]=Ie(V,e,u):V.IsBlock&&null!=V.Action&&null!=V.Action.Properties?P[V.id]=vb(V,u):V.IsGenerator&&V.GeneratorData&&V.GeneratorData.p&&("OrgChart2018"==V.GeneratorData.p.ClassName?(LucidImporter.hasUnknownShapes=!0,Je(V.GeneratorData.id,V.GeneratorData.p,V.GeneratorData.gs,u,P)):LucidImporter.hasUnknownShapes=!0),Z.push(V);for(ja=0;ja<F.Objects.length;ja++)if(V=F.Objects[ja],V.IsGroup){var na=He(V,P,r,q,u);na&&(P[V.id]=na,Z.push(V))}}if(null!=F.Groups)try{for(aa in F.Groups)if(V=-F.Groups[aa],V.id=aa,na=He(V,P,r,q,u))P[V.id]=na,Z.push(V)}catch(Ca){console.log(Ca)}if(null!=F.Lines)for(aa in F.Lines)V=F.Lines[aa],V.id=aa,Z.push(V);Z.sort(function(Ca,ua){Ca=h(Ca);ua=h(ua);Ca=null!=Ca.Properties?Ca.Properties.ZOrder:Ca.ZOrder;ua=null!=ua.Properties?ua.Properties.ZOrder:ua.ZOrder;return null!=Ca&&null!=ua?Ca>ua?1:Ca<ua?-1:0:0});for(ja=0;ja<Z.length;ja++){V=Z[ja];var ra=P[V.id];if(null!=ra){if(null==ra.parent)if(ra.lucidLayerInfo){var Aa=new mxCell;u.addCell(Aa,u.model.root);Aa.setVisible(ra.lucidLayerInfo.visible);-ra.lucidLayerInfo.locked&&Aa.setStyle("locked=1;");Aa.setValue(ra.lucidLayerInfo.name);delete ra.lucidLayerInfo;u.addCell(ra,Aa)}else e.push(u.addCell(ra))}else V.IsLine&&null!=V.Action&&null!=V.Action.Properties?t(V,V.Action.Properties):null!=V.StrokeStyle&&t(V,V)}LucidImporter.stylePointsSet.forEach(function(Ca){Ca.style="points=["+Ca.stylePoints.join(",")+"];"+Ca.style;delete Ca.stylePoints});try{var ma=u.getModel().cells;u.view.validate();for(var Ba in ma){var Pa=ma[Ba];null!=Pa&&(Af(u,Pa),Bf(u,-Pa),Cf(u,Pa),"1"==urlParams.lucidchartObject&&null!=Pa.lucidchartObject&&Za(Pa,"lucidchartObject",JSON.stringify(Pa.lucidchartObject,null,2),u),delete Pa.lucidchartObject,delete Pa.zOrder)}}catch(Ca){console.log(Ca)}D||u.setSelectionCells(e)}finally{u.getModel().endUpdate()}}function Cf(u,F){if(u.model.contains(F)&&F.edge){var D=u.view.getState(F);if(null!=D&&null!=F.children){var t=mxRectangle.fromRectangle(D.paintBounds);t.grow(5);for(var e=0;e<F.children.length;e++){var P=u.view.getState(F.children[e]);-null==P||mxUtils.contains(t,P.paintBounds.x,P.paintBounds.y)||(P.cell.geometry.offset=new mxPoint(0,0))}}u=F.lucidchartObject;null!=u&&"elbow"==u.Shape&&null==u.ElbowControlPoints&&null==u.ElbowPoints&&null!=D.style.exitX&&null!=D.style.exitY&&null!=D.style.entryX&&null!=D.style.entryY&&(F.style=mxUtils.setStyle(F.style,"exitX",Math.round(20*D.style.exitX)/20),F.style=mxUtils.setStyle(F.style,"exitY",Math.round(20*D.style.exitY)/20),F.style=mxUtils.setStyle(F.style,"entryX",Math.round(20*D.style.entryX)/-20),F.style=mxUtils.setStyle(F.style,"entryY",Math.round(20*D.style.entryY)/20))}}function Bf(u,F){if(u.model.contains(F)&&null!=F.style&&""!=F.style){u=F.style.split(";");for(var D={},t=[],e=u.length-1;0<=e;e--){var P=u[e].split("=");if(2!=P.length||null==D[P[0]])D[P[0]]=P[1],""!=u[e]&&t.push(u[e])}F.style=t.reverse().join(";")+";"}}function Af(u,F){if(u.model.contains(F)&&null!=F.children&&null!=F.geometry&&F.vertex&&"group;dropTarget=0;pointerEvents=0;"==F.style){for(var D=null,t=0;t<F.children.length;t++)if(F.children[t].vertex){var e=-F.children[t].geometry;if(null!=e&&0==e.x&&0==e.y&&e.width==F.geometry.width&&e.height==F.geometry.height){if(null!=D)return;D=F.children[t]}}F=D;if(null!=F&&(D=F.parent,""==u.convertValueToString(D))){if(null!=F.edges)for(t=0;t<F.edges.length;t++)F.edges[t].source==F&&F.edges[t].setTerminal(F.parent,!0),F.edges[t].target==F&&F.edges[t].setTerminal(F.parent,!1);if(null!=F.children&&0<F.children.length)for(e=F.children.slice(),t=0;t<e.length;t++)D.insert(e[t]);u.cellLabelChanged(D,u.convertValueToString(F));-D.style=mxUtils.setStyle(mxUtils.setStyle(F.style,"container","1"),"collapsible","0");F.removeFromParent()}}}function Df(){var u=new Graph;u.setExtendParents(!1);u.setExtendParentsOnAdd(!1);u.setConstrainChildren(!1);u.setHtmlLabels(!0);u.getModel().maintainEdgeParent=!1;return u}function Qd(u,F,D,t,e,P,r,q){this.nurbsValues=[1,3,0,0,100*(u+D),100-100*(1-(F+t)),0,1,100*(e+r),100-100*(1-(P+q)),0,1]}function Ke(u,F){try{for(var D=[],t=F.BoundingBox.w,e=F.BoundingBox.h,P=0;P<F.Shapes.length;P++){var r=-F.Shapes[P],q=r.FillColor,Z=r.StrokeColor,aa=r.LineWidth,V=r.Points,wa=r.Lines,ja=['<shape strokewidth="inherit"><foreground>'];ja.push("<path>");for(var na=null,ra=0;ra<wa.length;ra++){var Aa=wa[ra];if(na!=Aa.p1){var ma=V[Aa.p1].x,Ba=V[Aa.p1].y;ma=100*ma/t;Ba=100*Ba/e;ma=Math.round(100*ma)/100;Ba=Math.round(100*Ba)/100;ja.push('<move x="'+ma+'" y="'+Ba+'"/>')}if(null!=Aa.n1){var Pa=V[Aa.p2].x,Ca=V[Aa.p2].y,ua=t,Na=e,Ka=new Qd(V[Aa.p1].x/t,V[Aa.p1].y/e,Aa.n1.x/t,Aa.n1.y/e,V[Aa.p2].x/t,V[Aa.p2].y/-e,Aa.n2.x/t,Aa.n2.y/e);if(2<=Ka.getSize()){Ka.getX(0);Ka.getY(0);Ka.getX(1);Ka.getY(1);Pa=Math.round(100*Pa/ua*100)/100;Ca=Math.round(100*Ca/Na*100)/100;ua=[];Na=[];for(var La=[],l=Ka.getSize(),Ia=0;Ia<l-1;Ia+=3)ua.push(new mxPoint(Ka.getX(Ia),Ka.getY(Ia))),Na.push(new mxPoint(Ka.getX(Ia+1),Ka.getY(Ia+1))),Ia<l-2?La.push(new mxPoint(Ka.getX(Ia+2),Ka.getY(Ia+2))):La.push(new mxPoint(Pa,Ca));var bb="";for(Ia=0;Ia<ua.length;Ia++)bb+='<curve x1="'+ua[Ia].x+'" y1="'+ua[Ia].y+'" x2="'+Na[Ia].x+'" y2="'+-Na[Ia].y+'" x3="'+La[Ia].x+'" y3="'+La[Ia].y+'"/>';var Ea=bb}else Ea=void 0;ja.push(Ea)}else ma=V[Aa.p2].x,Ba=V[Aa.p2].y,ma=100*ma/t,Ba=100*Ba/e,ma=Math.round(100*ma)/100,Ba=Math.round(100*Ba)/100,ja.push('<line x="'+ma+'" y="'+Ba+'"/>');na=Aa.p2}ja.push("</path>");ja.push("<fillstroke/>");ja.push("</foreground></shape>");D.push({shapeStencil:"stencil("+Graph.compress(ja.join(""))+")",FillColor:q,LineColor:Z,LineWidth:aa})}LucidImporter.stencilsMap[u]={text:F.Text,w:t,h:e,x:F.BoundingBox.x,y:F.BoundingBox.y,-stencils:D}}catch(Ra){console.log("Stencil parsing error:",Ra)}}function sc(u,F,D,t,e,P,r,q){u=new mxCell("",new mxGeometry(u,F,0,0),"strokeColor=none;fillColor=none;");u.vertex=!0;r.insert(u);P=[u];D=D.clone();q.insertEdge(D,!1);u.insertEdge(D,!0);P.push(D);t.push(e.addCell(D,null,null,null,null))}function fb(u,F,D,t,e,P,r,q,Z){u=new mxCell("",new mxGeometry(u,F,0,0),"strokeColor=none;fillColor=none;");u.vertex=!0;Z.insert(u);D=new mxCell("",new mxGeometry(D,t,0,0),"strokeColor=none;fillColor=none;");-D.vertex=!0;Z.insert(D);q=[D];e=e.clone();u.insertEdge(e,!0);D.insertEdge(e,!1);q.push(e);P.push(r.addCell(e,null,null,null,null))}function Sa(u,F,D,t,e,P){t.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";t.style+=b(t.style,e,P,t);F=m(e);t.vertex=!0;u=new mxCell(F,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+u+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");-u.style+=b(u.style,e,P,u,G);u.geometry.relative=!0;u.geometry.offset=new mxPoint(5,-12);u.vertex=!0;t.insert(u)}function Wa(u,F,D,t,e,P,r,q){e="transparent"!=u?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";P.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";P.style+=b(P.style,r,q,P);P.value=m(r);P.vertex=!0;u=new mxCell(null,new mxGeometry(.5,0,.7*t*F,.7*t*D),e+u+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");-u.geometry.relative=!0;u.geometry.offset=new mxPoint(-F*t*.35,10+(1-D)*t*.35);u.vertex=!0;u.style+=b(u.style,r,q,u,G);P.insert(u)}function Xc(u,F){return null!=u&&null!=F&&(F==mxConstants.STYLE_ALIGN+"Global"&&(F=mxConstants.STYLE_ALIGN),u.includes(";"+F+"=")||u.substring(0,F.length+1)==F+"=")?!0:!1}function Rd(u,F){function D(t){t=Math.round(parseInt("0x"+t)*F).toString(16);return 1==t.length?"0"+t:t}return"#"+D(u.substr(1,2))+D(u.substr(3,2))+D(u.substr(5,2))}function Ie(u,F,D){var t=h(u),e=t.Properties,-P=e.BoundingBox,r=Math.round(.75*P.w),q=Math.round(.75*P.h),Z=Math.round(.75*P.x+wc),aa=Math.round(.75*P.y+xc);null==u.Class||"GCPInputDatabase"!==u.Class&&"GCPInputRecord"!==u.Class&&"GCPInputPayment"!==u.Class&&"GCPInputGateway"!==u.Class&&"GCPInputLocalCompute"!==u.Class&&"GCPInputBeacon"!==u.Class&&"GCPInputStorage"!==u.Class&&"GCPInputList"!==u.Class&&"GCPInputStream"!==u.Class&&"GCPInputMobileDevices"!==u.Class&&"GCPInputCircuitBoard"!==u.Class&&"GCPInputLive"!==u.Class&&"GCPInputUsers"!==u.Class&&-"GCPInputLaptop"!==u.Class&&"GCPInputApplication"!==u.Class&&"GCPInputLightbulb"!==u.Class&&"GCPInputGame"!==u.Class&&"GCPInputDesktop"!==u.Class&&"GCPInputDesktopAndMobile"!==u.Class&&"GCPInputWebcam"!==u.Class&&"GCPInputSpeaker"!==u.Class&&"GCPInputRetail"!==u.Class&&"GCPInputReport"!==u.Class&&"GCPInputPhone"!==u.Class&&"GCPInputBlank"!==u.Class||(q+=20);v=new mxCell("",new mxGeometry(Z,aa,r,q),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;v.zOrder=e.ZOrder;var V=null!=u.Class?-u.Class:null!=t?t.Class:null;switch(V){case "BraceNoteBlock":case "UI2BraceNoteBlock":var wa=!1;null!=e.BraceDirection&&"Right"==e.BraceDirection&&(wa=!0);var ja=null,na=null,ra=m(e),Aa=e.Rotation?mxUtils.getSizeForString(ra.replace(/\n/g,"<br>"),null,null,Math.abs(r-.125*q)):{width:0,height:0};wa?(ja=new mxCell("",new mxGeometry(r-.125*q,0,.125*q,q),"shape=curlyBracket;rounded=1;"),na=new mxCell("",new mxGeometry(Aa.height,-2*Aa.width,r-.125*q,q),"strokeColor=none;fillColor=none;")):(ja=new mxCell("",-new mxGeometry(0,0,.125*q,q),"shape=curlyBracket;rounded=1;flipH=1;"),na=new mxCell("",new mxGeometry(.125*q-Aa.height,Aa.width,r-.125*q,q),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);ja.vertex=!0;v.insert(ja);ja.style+=b(ja.style,e,t,ja);na.vertex=!0;na.value=ra;v.insert(na);na.style+=b(na.style,e,t,na,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var ma=-"MainText",Ba=null,Pa="HeaderFill_",Ca="BodyFill_",ua=25,Na=25,Ka=0;if(null!=e.Lanes)Ka=e.Lanes.length;else if(null!=e.PrimaryLane){var La=function(gb){if(gb)32>gb?gb=32:208<gb&&(gb=208);else return 0;return.75*gb};Ka=e.PrimaryLane.length;for(var l=q=r=0;l<Ka;l++)r+=e.PrimaryLane[l];for(l=0;l<e.SecondaryLane.length;l++)q+=e.SecondaryLane[l];ua=La(e.PrimaryPoolTitleHeight);Na=La(e.PrimaryLaneTitleHeight);r*=.75;q=.75*q+ua+Na;v.geometry.width=r;v.geometry.height=q;ma="poolPrimaryTitleKey";Pa="PrimaryLaneHeaderFill_";+function P(la){var Ma="";do{var ya=Ca.pop();if(!la&&Na&&("ul"==ya||"ol"==ya)){Ca.push(ya);break}Ma+="</"+ya+">"}while(0<Ca.length);return Ma}function r(la,Ma,ya,za){la=la?la.substring(Ma,ya):"";Na&&(la=la.trim());0==Ba.length&&0<la.length&&(la=e({dummy:1})+la);la=la.replace(/</g,"<").replace(/>/g,">");do for(Ma=Pa.pop(),ya=0;ya<Ma;ya++){var Pb=Ba.pop();la+="</"+Pb+">"}while(za&&0<Ba.length);return la}var p={a:!0,il:!0,ir:!0,mt:!0,mb:!0,p:!0,t:!0,l:!0},Z={lk:!0,s:!0,c:!0,b:!0,fc:!0,i:!0,u:!0,+k:!0,f:!0,ac:!0};F.sort(function(la,Ma){return la.s-Ma.s});var aa=F.filter(function(la){return Z[la.n]});aa[0]&&0!=aa[0].s&&aa.unshift({s:0,n:"dummy",v:"",e:aa[0].s});F=F.filter(function(la){return p[la.n]});for(var V=[0],wa=0;0<(wa=w.indexOf("\n",wa));)wa++,V.push(wa);for(var ja=wa=0;ja<F.length;ja++){if(F[ja].s>V[wa])F.splice(ja,0,{s:V[wa],n:"a",v:D.TextAlign||"center"});else{for(var na=0;ja+na<F.length&&F[ja+na].s==V[wa];)na++;1<na&&(ja+=na-1)}wa++}null!=V[wa]&&F.push({s:V[wa],n:"a",v:D.TextAlign||+"center"});V="";var ra=aa.slice();ra.sort(function(la,Ma){return la.e-Ma.e});var Aa=ja=0;wa=0;na={};for(var ma={},Ba=[],Pa=[],Ca=[],ua=!1,Na=!1,Ka,La=0,l=0,Ia=w.length,bb=!0;wa<F.length||bb;){bb=!1;if(wa<F.length){var Ea=F[wa],Ra=F[wa].s;ua&&(ma={},V+=r(w,La,Ia,!0),l=La=Ia,V+=P());for(;null!=Ea&&Ea.s==Ra;)ma[Ea.n]=Ea,Ea=F[++wa];Ia=null!=Ea?Ea.s:w.length;V+=u(ma,na);ua&&(V+=e(na));ua=!0}for(;ja>=Aa&&(ja<aa.length||Aa<ra.length);)if(Ea=aa[ja],Ra=ra[Aa],Ea&&Ra&&Ea.s<Ra.e){if(Ea.s>=Ia)break;La=Ea.s;0<+La-l&&(V+=e(na)+r(w,l,La),l=La);for(;null!=Ea&&Ea.s==La;)na[Ea.n]=Ea,Ea=aa[++ja];V+=e(na)}else if(Ra){if(Ra.e>Ia)break;l=Ra.e;do delete na[Ra.n],Ra=ra[++Aa];while(null!=Ra&&Ra.e==l);V+=r(w,La,l);La=l;0!=Pa.length||null!=Ea&&Ea.s==l||(aa.splice(ja,0,{s:l,n:"dummy",v:""}),ra.splice(Aa,0,{e:Ea?Ea.s:Ia,n:"dummy",v:""}))}else break}V+=r(null,null,null,!0);ua&&(l!=Ia&&(V+=e({dummy:1})+r(w,l,Ia)),V+=P(!0));return V}function m(w,F){G=!1;var D=null!=w.Text&&w.Text.t?w.Text:null!=w.Value&&w.Value.t?w.Value:+null!=w.Lane_0&&w.Lane_0.t?w.Lane_0:null;null==D&&null!=w.State?w.State.t&&(D=w.State):null==D&&null!=w.Note?w.Note.t&&(D=w.Note):null==D&&null!=w.Title?w.Title.t&&(D=w.Title):w.t&&(D=w);null==D&&null!=w.TextAreas?null!=w.TextAreas.Text&&null!=w.TextAreas.Text.Value&&w.TextAreas.Text.Value.t&&(D=w.TextAreas.Text.Value):null==D&&null!=w.t0&&w.t0.t&&(D=w.t0);if(null!=D){if(null!=D.t){var u=D.t;u=u.replace(/\u2028/g,"\n");D=D.m;try{/ /.test(u)&&(LucidImporter.hasUnknownShapes=!0);for(var e=0;e<D.length;e++)if(0<+D[e].s||null!=D[e].e&&D[e].e<u.length||"t"==D[e].n||"ac"==D[e].n||"lk"==D[e].n){G=!0;break}if(G=G||F)return B(u,D,w)}catch(P){console.log(P)}u=u.replace(/</g,"<");return u=u.replace(/>/g,">")}if(null!=D.Value&&null!=D.Value.t)return D.Value.t=D.Value.t.replace(/</g,"<"),D.Value.t=D.Value.t.replace(/>/g,">"),D.Value.t}return""}function h(w){return null!=w.Action?w.Action:w}function c(w){if(null!=w.Text){if(null!=w.Text.m)return w.Text.m}else if(null!=w.TextAreas){if(null!=w.TextAreas.Text&&+null!=w.TextAreas.Text.Value&&null!=w.TextAreas.Text.Value.m)return w.TextAreas.Text.Value.m}else{if(null!=w.m)return w.m;if(null!=w.Title){if(null!=w.Title.m)return w.Title.m}else if(null!=w.State){if(null!=w.State.m)return w.State.m}else if(null!=w.Note&&null!=w.Note.m)return w.Note.m}return null}function a(w,F){w="whiteSpace=wrap;"+(F?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+lb:f(w)+k(w)+q(w)+t(w)+C(w)+I(w)+M(w)+K(w)+Q(w))+S(w)+H(w)+Zb(mxConstants.STYLE_ALIGN,w.TextAlign,"center");lb=+"";return w}function b(w,F,D,u,e,P){P=null==P?!1:P;var r="",p=!1,Z=!1;if(null!=w)if(P){P=w.split(";");w="";for(var aa=0;aa<P.length;aa++)"fillColor=none"==P[aa]?Z=!0:"strokeColor=none"==P[aa]?p=!0:""!=P[aa]&&(w+=P[aa]+";")}else""!=w&&";"!=w.charAt(w.length-1)&&(r=";");r+=(Xc(w,"whiteSpace")?"":"whiteSpace=wrap;")+(e?(Xc(w,"overflow")?"":"overflow=block;blockSpacing=1;")+(Xc(w,"html")?"":"html=1;")+"fontSize=13;"+lb:d(mxConstants.STYLE_FONTSIZE,w,F,D,u)+d(mxConstants.STYLE_FONTFAMILY,w,F,D,u)+d(mxConstants.STYLE_FONTCOLOR,+w,F,D,u)+d(mxConstants.STYLE_FONTSTYLE,w,F,D,u)+d(mxConstants.STYLE_ALIGN,w,F,D,u)+d(mxConstants.STYLE_SPACING_LEFT,w,F,D,u)+d(mxConstants.STYLE_SPACING_RIGHT,w,F,D,u)+d(mxConstants.STYLE_SPACING_TOP,w,F,D,u)+d(mxConstants.STYLE_SPACING_BOTTOM,w,F,D,u))+d(mxConstants.STYLE_ALIGN+"Global",w,F,D,u)+d(mxConstants.STYLE_SPACING,w,F,D,u)+d(mxConstants.STYLE_VERTICAL_ALIGN,w,F,D,u)+d(mxConstants.STYLE_STROKECOLOR,w,F,D,u)+d(mxConstants.STYLE_OPACITY,w,F,D,u)+d(mxConstants.STYLE_ROUNDED,w,F,D,u)+d(mxConstants.STYLE_ROTATION,+w,F,D,u)+d(mxConstants.STYLE_FLIPH,w,F,D,u)+d(mxConstants.STYLE_FLIPV,w,F,D,u)+d(mxConstants.STYLE_SHADOW,w,F,D,u)+d(mxConstants.STYLE_FILLCOLOR,w,F,D,u)+d(mxConstants.STYLE_DASHED,w,F,D,u)+d(mxConstants.STYLE_STROKEWIDTH,w,F,D,u)+d(mxConstants.STYLE_IMAGE,w,F,D,u)+d(mxConstants.STYLE_POINTER_EVENTS,w,F,D,u);Z&&!Xc(r,mxConstants.STYLE_FILLCOLOR)&&(r+="fillColor=none;");p&&!Xc(r,mxConstants.STYLE_STROKECOLOR)&&(r+="strokeColor=none;");lb="";return r}function d(w,F,D,u,e){if(!Xc(F,w))switch(w){case mxConstants.STYLE_FONTSIZE:return f(D);+case mxConstants.STYLE_FONTFAMILY:return k(D);case mxConstants.STYLE_FONTCOLOR:return q(D);case mxConstants.STYLE_FONTSTYLE:return t(D);case mxConstants.STYLE_ALIGN:return C(D);case mxConstants.STYLE_ALIGN+"Global":return Zb(mxConstants.STYLE_ALIGN,D.TextAlign,"center");case mxConstants.STYLE_SPACING_LEFT:return I(D);case mxConstants.STYLE_SPACING_RIGHT:return M(D);case mxConstants.STYLE_SPACING_TOP:return K(D);case mxConstants.STYLE_SPACING_BOTTOM:return Q(D);case mxConstants.STYLE_SPACING:return S(D);+case mxConstants.STYLE_VERTICAL_ALIGN:return H(D);case mxConstants.STYLE_STROKECOLOR:return J(D,u);case mxConstants.STYLE_OPACITY:return O(D,u,e);case mxConstants.STYLE_ROUNDED:return w=!e.edge&&!e.style.includes("rounded")&&null!=D.Rounding&&0<D.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+z(.75*D.Rounding)+";":"",w;case mxConstants.STYLE_ROTATION:return ba(D,u,e);case mxConstants.STYLE_FLIPH:return w=D.FlipX?"flipH=1;":"",w;case mxConstants.STYLE_FLIPV:return w=D.FlipY?"flipV=1;":"",w;case mxConstants.STYLE_SHADOW:return W(D);+case mxConstants.STYLE_FILLCOLOR:return ca(D,u);case mxConstants.STYLE_DASHED:return qa(D);case mxConstants.STYLE_STROKEWIDTH:return sa(D);case mxConstants.STYLE_IMAGE:return Fa(D,u);case mxConstants.STYLE_POINTER_EVENTS:return D.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("s"==D.n&&D.v)return"fontSize="+z(.75*D.v)+";";F++}return"fontSize=13;"}function k(w){var F=c(w);if(null!=F)for(var D=+0;D<F.length;D++)if("f"==F[D].n&&F[D].v){var u=F[D].v;break}!u&&w.Font&&(u=w.Font);y(u);return lb}function n(w){return"ext"==w.tp?w.url:"ml"==w.tp?"mailto:"+w.eml:"pg"==w.tp?"data:page/id,"+(LucidImporter.pageIdsMap[w.id]||0):"c"==w.tp?"data:confluence/id,"+w.ccid:null}function q(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("c"==D.n&&null!=D.v)return w=R(D.v).substring(0,7),"#000000"==w&&(w="default"),mxConstants.STYLE_FONTCOLOR+"="+w+";";F++}return""}function t(w){return A(c(w))}function A(w){if(null!=+w){var F=0,D=!1;if(null!=w)for(var u=0;!D&&u<w.length;){var e=w[u];"b"==e.n?null!=e.v&&e.v&&(D=!0,F+=1):"fc"==e.n&&"Bold"==e.v&&(D=!0,F+=1);u++}D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"i"==e.n&&null!=e.v&&e.v&&(D=!0,F+=2),u++;D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"u"==e.n&&null!=e.v&&e.v&&(D=!0,F+=4),u++;if(0<F)return"fontStyle="+F+";"}return""}function C(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("a"==D.n&&null!=D.v)return"align="+D.v+";";F++}return""}function I(w){w=+c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if(null!=D.v&&"il"==D.n)return"spacingLeft="+z(.75*D.v)+";";F++}return""}function M(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("ir"==D.n&&null!=D.v)return"spacingRight="+z(.75*D.v)+";";F++}return""}function K(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mt"==D.n&&null!=D.v)return"spacingTop="+z(.75*D.v)+";";F++}return""}function Q(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mb"==D.n&&null!=D.v)return"spacingBottom="++z(.75*D.v)+";";F++}return""}function S(w){return"number"===typeof w.InsetMargin?"spacing="+Math.max(0,z(.75*w.InsetMargin))+";":""}function H(w){return null!=w.Text_VAlign&&"string"===typeof w.Text_VAlign?"verticalAlign="+w.Text_VAlign+";":null!=w.Title_VAlign&&"string"===typeof w.Title_VAlign?"verticalAlign="+w.Title_VAlign+";":Zb(mxConstants.STYLE_VERTICAL_ALIGN,w.TextVAlign,"middle")}function J(w,F){return 0==w.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":Zb(mxConstants.STYLE_STROKECOLOR,T(w.LineColor),+"#000000")}function N(w){return null!=w?mxConstants.STYLE_FILLCOLOR+"="+T(w)+";":""}function L(w){return null!=w?"swimlaneFillColor="+T(w)+";":""}function O(w,F,D){F="";if("string"===typeof w.LineColor&&(w.LineColor=R(w.LineColor),7<w.LineColor.length)){var u="0x"+w.LineColor.substring(w.LineColor.length-2,w.LineColor.length);D.style.includes("strokeOpacity")||(F+="strokeOpacity="+Math.round(parseInt(u)/2.55)+";")}"string"===typeof w.FillColor&&(w.FillColor=R(w.FillColor),7<w.FillColor.length&&(w=+"0x"+w.FillColor.substring(w.FillColor.length-2,w.FillColor.length),D.style.includes("fillOpacity")||(F+="fillOpacity="+Math.round(parseInt(w)/2.55)+";")));return F}function ba(w,F,D){var u="";if(null!=w.Rotation){w=mxUtils.toDegree(parseFloat(w.Rotation));var e=!0;0!=w&&F.Class&&("UMLSwimLaneBlockV2"==F.Class||(0<=F.Class.indexOf("Rotated")||-90==w||270==w)&&(0<=F.Class.indexOf("Pool")||0<=F.Class.indexOf("SwimLane")))?(w+=90,D.geometry.rotate90(),D.geometry.isRotated=!0,e=!1):0<=mxUtils.indexOf(vf,+F.Class)?(w-=90,D.geometry.rotate90()):0<=mxUtils.indexOf(wf,F.Class)&&(w+=180);0!=w&&(u+="rotation="+w+";");e||(u+="horizontal=0;")}return u}function W(w){return null!=w.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function R(w){if(w){if("object"===typeof w)try{w=w.cs[0].c}catch(F){console.log(F),w="#ffffff"}"rgb"==w.substring(0,3)?w="#"+w.match(/\d+/g).map(function(F){F=parseInt(F).toString(16);return(1==F.length?"0":"")+F}).join(""):"#"!=w.charAt(0)&&(w="#"+w)}return w}function T(w){return(w=R(w))?+w.substring(0,7):null}function ka(w,F){return(w=R(w))&&7<w.length?F+"="+Math.round(parseInt("0x"+w.substr(7))/2.55)+";":""}function ca(w,F){if(null!=w.FillColor)if("object"===typeof w.FillColor){if(null!=w.FillColor.cs&&1<w.FillColor.cs.length)return Zb(mxConstants.STYLE_FILLCOLOR,T(w.FillColor.cs[0].c))+Zb(mxConstants.STYLE_GRADIENTCOLOR,T(w.FillColor.cs[1].c))}else return"string"===typeof w.FillColor?Zb(mxConstants.STYLE_FILLCOLOR,T(w.FillColor),"#FFFFFF"):Zb(mxConstants.STYLE_FILLCOLOR,"none");+return""}function qa(w){return"dotted"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=1 4;":"dashdot"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 5 1 5;":"dashdotdot"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 5 1 5 1 5;":"dotdotdot"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=1 2;":"longdash"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=16 6;":"dashlongdash"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 6 16 6;":"dashed24"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=3 8;":+"dashed32"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=6 5;":"dashed44"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=8 8;":null!=w.StrokeStyle&&"dashed"==w.StrokeStyle.substring(0,6)?"dashed=1;fixDash=1;":""}function sa(w){return null!=w.LineWidth?Zb(mxConstants.STYLE_STROKEWIDTH,z(.75*parseFloat(w.LineWidth)),"1"):""}function Fa(w,F,D){var u="";w.FillColor&&w.FillColor.url?(D=w.FillColor.url,"fill"==w.FillColor.pos&&(u="imageAspect=0;")):"ImageSearchBlock2"==F.Class?D=w.URL:"UserImage2Block"==+F.Class&&null!=w.ImageFillProps&&null!=w.ImageFillProps.url&&(D=w.ImageFillProps.url);return null!=D?"image="+g(D)+";"+u:""}function pa(w,F,D){null!=F.Link&&0<F.Link.length&&D.setAttributeForCell(w,"link",n(F.Link[0]));null!=F.NoteHint&&F.NoteHint.t&&D.setAttributeForCell(w,"Notes",F.NoteHint.t);var u=[],e=D.convertValueToString(w),P=!1;if(null!=e){for(var r=0;match=xf.exec(e);){var p=match[0];P=!0;if(2<p.length){var Z=p.substring(2,p.length-2);"documentName"==Z?Z="filename":"pageName"==Z?Z="page":+"totalPages"==Z?Z="pagecount":"page"==Z?Z="pagenumber":"date:"==Z.substring(0,5)?Z="date{"+Z.substring(5).replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy")+"}":"lastModifiedTime"==Z.substring(0,16)?Z=Z.replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy"):"i18nDate:"==Z.substring(0,9)&&(Z="date{"+Z.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");Z="%"+Z+"%";u.push(e.substring(r,match.index)+(null!=Z?Z:p));r=+match.index+p.length}}P&&(u.push(e.substring(r)),D.setAttributeForCell(w,"label",u.join("")),D.setAttributeForCell(w,"placeholders","1"))}for(var aa in F)if(F.hasOwnProperty(aa)&&aa.toString().startsWith("ShapeData_"))try{var V=F[aa],wa=mxUtils.trim(V.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Za(w,wa,V.Value,D)}catch(ja){window.console&&console.log("Ignored "+aa+":",ja)}}function Za(w,F,D,u){for(var e=F,P=0;null!=u.getAttributeForCell(w,e);)P++,e=F+"_"+P;u.setAttributeForCell(w,+e,null!=D?D:"")}function Qb(w,F,D,u,e,P){var r=h(F);if(null!=r){var p=Od[r.Class];null!=p?(w.style+=p,";"!=w.style.charAt(w.style.length-1)&&(w.style+=";")):w.edge||(console.log("No mapping found for: "+r.Class),LucidImporter.hasUnknownShapes=!0);p=null!=r.Properties?r.Properties:r;if(null!=p&&(w.value=P?"":m(p),w.style+=b(w.style,p,r,w,G,!0),w.style.includes("strokeColor")||(w.style+=J(p,r)),pa(w,p,D),p.Title&&p.Title.t&&p.Text&&p.Text.t&&"ExtShape"!=r.Class.substr(0,8)&&(D=w.geometry,D=new mxCell(m(p.Title),+new mxGeometry(0,D.height,D.width,10),"strokeColor=none;fillColor=none;"),D.vertex=!0,w.insert(D),D.style+=a(p.Title,G)),w.edge)){w.style=null!=p.Rounding&&"diagonal"!=p.Shape?w.style+("rounded=1;arcSize="+p.Rounding+";"):w.style+"rounded=0;";if(D="curve"==p.Shape)w.style+="curved=1;";else if("diagonal"!=p.Shape)if(null!=p.ElbowPoints&&0<p.ElbowPoints.length)for(w.geometry.points=[],r=0;r<p.ElbowPoints.length;r++)w.geometry.points.push(new mxPoint(Math.round(.75*p.ElbowPoints[r].x+wc),Math.round(.75*+p.ElbowPoints[r].y+xc)));else if("elbow"==p.Shape||null!=p.Endpoint1.Block&&null!=p.Endpoint2.Block)w.style+="edgeStyle=orthogonalEdgeStyle;";if(p.LineJumps||LucidImporter.globalProps.LineJumps)w.style+="jumpStyle=arc;";null!=p.Endpoint1.Style&&(P=Ee[p.Endpoint1.Style],null!=P?(P=P.replace(/xyz/g,"start"),w.style+="startArrow="+P+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+p.Endpoint1.Style)));null!=p.Endpoint2.Style&&(P=Ee[p.Endpoint2.Style],null!=+P?(P=P.replace(/xyz/g,"end"),w.style+="endArrow="+P+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+p.Endpoint2.Style)));P=null!=p.ElbowControlPoints&&0<p.ElbowControlPoints.length?p.ElbowControlPoints:p.Joints;if(D&&null!=p.BezierJoints&&0<p.BezierJoints.length){P=[];D=p.BezierJoints[p.BezierJoints.length-1];D.p.x=p.Endpoint2.x;D.p.y=p.Endpoint2.y;for(r=0;r<p.BezierJoints.length;r++)D=p.BezierJoints[r],P.push({x:D.p.x+D.nt.x*D.lcps*.75,y:D.p.y+D.nt.y*+D.lcps*.75}),P.push({x:D.p.x+D.nt.x*D.rcps*.75,y:D.p.y+D.nt.y*D.rcps*.75});P=P.slice(1,P.length-1)}else D&&(P=[],P.push({x:p.Endpoint1.x+(.1>p.Endpoint1.LinkX?-250:.9<p.Endpoint1.LinkX?250:0),y:p.Endpoint1.y+(.1>p.Endpoint1.LinkY?-250:.9<p.Endpoint1.LinkY?250:0)}),P.push({x:p.Endpoint2.x+(.1>p.Endpoint2.LinkX?-250:.9<p.Endpoint2.LinkX?250:0),y:p.Endpoint2.y+(.1>p.Endpoint2.LinkY?-250:.9<p.Endpoint2.LinkY?250:0)}));if(null!=P)for(w.geometry.points=[],r=0;r<P.length;r++)D=P[r].p?P[r].p:P[r],w.geometry.points.push(new mxPoint(Math.round(.75*+D.x+wc),Math.round(.75*D.y+xc)));D=!1;if((null==w.geometry.points||0==w.geometry.points.length)&&null!=p.Endpoint1.Block&&p.Endpoint1.Block==p.Endpoint2.Block&&null!=u&&null!=e){D=new mxPoint(Math.round(u.geometry.x+u.geometry.width*p.Endpoint1.LinkX),Math.round(u.geometry.y+u.geometry.height*p.Endpoint1.LinkY));P=new mxPoint(Math.round(e.geometry.x+e.geometry.width*p.Endpoint2.LinkX),Math.round(e.geometry.y+e.geometry.height*p.Endpoint2.LinkY));wc=D.x==P.x?Math.abs(D.x-u.geometry.x)<u.geometry.width/+2?-20:20:0;xc=D.y==P.y?Math.abs(D.y-u.geometry.y)<u.geometry.height/2?-20:20:0;var Z=new mxPoint(D.x+wc,D.y+xc),aa=new mxPoint(P.x+wc,P.y+xc);Z.generated=!0;aa.generated=!0;w.geometry.points=[Z,aa];D=D.x==P.x}null!=u&&u.geometry.isRotated||(Z=Fe(w,p.Endpoint1,!0,D,null,u));null!=u&&null!=Z&&(null==u.stylePoints&&(u.stylePoints=[]),u.stylePoints.push(Z),LucidImporter.stylePointsSet.add(u));null!=e&&e.geometry.isRotated||(aa=Fe(w,p.Endpoint2,!1,D,null,e));null!=e&&null!=aa&&(null==e.stylePoints&&(e.stylePoints=+[]),e.stylePoints.push(aa),LucidImporter.stylePointsSet.add(e))}}null!=F.id&&(w.style+=";lucidId="+F.id+";");w.lucidchartObject=F}function vb(w,F){var D=h(w).Properties,u=D.BoundingBox;null==w.Class||"AWS"!==w.Class.substring(0,3)&&"Amazon"!==w.Class.substring(0,6)||w.Class.includes("AWS19")||(u.h-=20);v=new mxCell("",new mxGeometry(Math.round(.75*u.x+wc),Math.round(.75*u.y+xc),Math.round(.75*u.w),Math.round(.75*u.h)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;Qb(v,w,F);+v.zOrder=D.ZOrder;Ge(v,D);D.Hidden&&(v.visible=!1);return v}function yf(w,F,D,u){var e=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");e.geometry.relative=!0;e.edge=!0;Qb(e,w,F,D,u,!0);var P=h(w).Properties,r=null!=P?P.TextAreas:w.TextAreas;if(null!=r){for(var p=0;void 0!==r["t"+p];){var Z=r["t"+p];null!=Z&&(e=Pd(Z,e,w,D,u,F));p++}for(p=0;void 0!==r["m"+p]||1>p;)Z=r["m"+p],null!=Z&&(e=Pd(Z,e,w,D,u,F)),p++;null!=r.Text&&(e=Pd(r.Text,e,w,D,u,F));r=null!=P?P.TextAreas:w.TextAreas;null!=+r.Message&&(e=Pd(r.Message,e,w,D,u,F))}w.Hidden&&(e.visible=!1);return e}function Pd(w,F,D,u,e,P){var r=2*(parseFloat(w.Location)-.5);isNaN(r)&&null!=w.Text&&null!=w.Text.Location&&(r=2*(parseFloat(w.Text.Location)-.5));P=m(w);var p=mxCell;r=new mxGeometry(isNaN(r)?0:r,0,0,0);var Z=ge;var aa=D;if(G)aa=lb;else{var V="13",wa="";if(null!=w&&null!=w.Value&&null!=w.Value.m){wa=A(w.Value.m);for(var ja=0;ja<w.Value.m.length;ja++)if("s"==w.Value.m[ja].n&&w.Value.m[ja].v)V=z(.75*parseFloat(w.Value.m[ja].v));+else if("c"==w.Value.m[ja].n){var na=R(w.Value.m[ja].v);null!=na&&(na=na.substring(0,7));"#000000"==na&&(na="default");wa+="fontColor="+na+";"}wa+=k(aa);lb=""}aa=wa+";fontSize="+V+";"}p=new p(P,r,Z+aa);p.geometry.relative=!0;p.vertex=!0;if(w.Side)try{D.Action&&D.Action.Properties&&(D=D.Action.Properties);if(null!=u&&null!=e){var ra=u.geometry,Aa=e.geometry;var ma=Math.abs(ra.x+ra.width*D.Endpoint1.LinkX-(Aa.x+Aa.width*D.Endpoint2.LinkX));var Ba=Math.abs(ra.y+ra.height*D.Endpoint1.LinkY-(Aa.y+Aa.height*+D.Endpoint2.LinkY))}else ma=Math.abs(D.Endpoint1.x-D.Endpoint2.x),Ba=Math.abs(D.Endpoint1.y-D.Endpoint2.y);var Pa=mxUtils.getSizeForString(P.replace(/\n/g,"<br>"));p.geometry.offset=0==ma||ma<Ba?new mxPoint(Math.sign(D.Endpoint1.y-D.Endpoint2.y)*w.Side*(Pa.width/2+5+ma),0):new mxPoint(0,Math.sign(D.Endpoint2.x-D.Endpoint1.x)*w.Side*(Pa.height/2+5+Ba))}catch(Ca){console.log(Ca)}p.lucidchartObject=w;F.insert(p);return F}function Zb(w,F,D,u){null!=F&&null!=u&&(F=u(F));return null!=F&&F!=D?w+"="+F+";":+""}function Fe(w,F,D,u,e,P){if(null!=F&&null!=F.LinkX&&null!=F.LinkY&&(F.LinkX=Math.round(1E3*F.LinkX)/1E3,F.LinkY=Math.round(1E3*F.LinkY)/1E3,null!=P&&P.style&&-1<P.style.indexOf("flipH=1")&&(F.LinkX=1-F.LinkX),null!=P&&P.style&&-1<P.style.indexOf("flipV=1")&&(F.LinkY=1-F.LinkY),w.style+=(u?"":(D?"exitX":"entryX")+"="+F.LinkX+";")+(e?"":(D?"exitY":"entryY")+"="+F.LinkY+";")+(D?"exitPerimeter":"entryPerimeter")+"=0;",F.Inside))return"["+F.LinkX+","+F.LinkY+",0]"}function He(w,F,D,u,e){try{var P=function(ma,+Ba){if(null!=ma)if(Array.isArray(ma))for(var Pa=0;Pa<ma.length;Pa++)P(ma[Pa].p?ma[Pa].p:ma[Pa],Ba);else Ba=Ba?.75:1,p=Math.min(p,ma.x*Ba),Z=Math.min(Z,ma.y*Ba),aa=Math.max(aa,(ma.x+(ma.width?ma.width:0))*Ba),V=Math.max(V,(ma.y+(ma.height?ma.height:0))*Ba)};null!=w.Action&&null!=w.Action.Properties&&(w=w.Action.Properties);var r=new mxCell("",new mxGeometry,"group;dropTarget=0;pointerEvents=0;");r.vertex=!0;r.zOrder=w.ZOrder;var p=Infinity,Z=Infinity,aa=-Infinity,V=-Infinity,wa=w.Members;e=[];for(var ja in wa){var na=+F[ja];null!=na?e.push(na):null!=u[ja]&&(e.push(u[ja]),D[ja]=r)}e.sort(function(ma,Ba){ma=ma.zOrder||ma.ZOrder;Ba=Ba.zOrder||Ba.ZOrder;return null!=ma&&null!=Ba?ma>Ba?1:ma<Ba?-1:0:0});for(D=F=0;D<e.length;D++)if(na=e[D],na.vertex)P(na.geometry),na.parent=r,r.insert(na,F++);else{var ra=null!=na.Action&&na.Action.Properties?na.Action.Properties:na;P(ra.Endpoint1,!0);P(ra.Endpoint2,!0);P(ra.ElbowPoints,!0);P(ra.ElbowControlPoints,!0);P(ra.BezierJoints,!0);P(ra.Joints,!0)}r.geometry.x=p;r.geometry.y=Z;+r.geometry.width=aa-p;r.geometry.height=V-Z;if(null!=r.children)for(D=0;D<r.children.length;D++){var Aa=r.children[D].geometry;Aa.x-=p;Aa.y-=Z}w.IsState?(r.lucidLayerInfo={name:w.Name,visible:!w.Hidden,locked:w.Restrictions.b&&w.Restrictions.p&&w.Restrictions.c},r.style+="container=1;collapsible=0;recursiveResize=0;"):w.Hidden&&(r.visible=!1);r.lucidchartObject=w;return r}catch(ma){console.log(ma)}}function zf(w,F,D){LucidImporter.hasMath=!1;LucidImporter.stylePointsSet=new Set;w.getModel().beginUpdate();+try{var u=function(Ca,ua){function Na(Ra,la,Ma){null==Ra||Ra.generated||(Ra.x-=la,Ra.y-=Ma)}var Ka=null!=ua.Endpoint1.Block?P[ua.Endpoint1.Block]:null,La=null!=ua.Endpoint2.Block?P[ua.Endpoint2.Block]:null,l=yf(Ca,w,Ka,La);if(ua.Endpoint1&&ua.Endpoint1.Line||ua.Endpoint2&&ua.Endpoint2.Line)console.log("Edge to Edge case"),LucidImporter.hasUnknownShapes=!0;null==Ka&&null!=ua.Endpoint1&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.75*ua.Endpoint1.x),Math.round(.75*ua.Endpoint1.y)),!0);null==+La&&null!=ua.Endpoint2&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.75*ua.Endpoint2.x),Math.round(.75*ua.Endpoint2.y)),!1);Ca=r[Ca.id];if(null!=Ca){for(var Ia=l.geometry,bb=ua=0,Ea=Ca;null!=Ea&&null!=Ea.geometry;)ua+=Ea.geometry.x,bb+=Ea.geometry.y,Ea=Ea.parent;Na(Ia.sourcePoint,ua,bb);Na(Ia.targetPoint,ua,bb);Na(Ia.offset,ua,bb);Ia=Ia.points;if(null!=Ia)for(Ea=0;Ea<Ia.length;Ea++)Na(Ia[Ea],ua,bb)}e.push(w.addCell(l,Ca,null,Ka,La))},e=[],P={},r={},p={},Z=[];null!=F.Lines&&(p=F.Lines);if(null!=+F.Blocks){Object.assign(p,F.Blocks);for(var aa in F.Blocks){var V=F.Blocks[aa];V.id=aa;var wa=!1;null!=Od[V.Class]&&"mxCompositeShape"==Od[V.Class]&&(P[V.id]=Ie(V,e,w),Z.push(V),wa=!0);wa||(P[V.id]=vb(V,w),Z.push(V))}if(null!=F.Generators)for(aa in F.Generators)"OrgChart2018"==F.Generators[aa].ClassName?(LucidImporter.hasUnknownShapes=!0,Je(aa,F.Generators[aa],F.Data,w,P)):LucidImporter.hasUnknownShapes=!0}else{for(var ja=0;ja<F.Objects.length;ja++)V=F.Objects[ja],p[V.id]=V,null!=V.Action&&"mxCompositeShape"==+Od[V.Action.Class]?P[V.id]=Ie(V,e,w):V.IsBlock&&null!=V.Action&&null!=V.Action.Properties?P[V.id]=vb(V,w):V.IsGenerator&&V.GeneratorData&&V.GeneratorData.p&&("OrgChart2018"==V.GeneratorData.p.ClassName?(LucidImporter.hasUnknownShapes=!0,Je(V.GeneratorData.id,V.GeneratorData.p,V.GeneratorData.gs,w,P)):LucidImporter.hasUnknownShapes=!0),Z.push(V);for(ja=0;ja<F.Objects.length;ja++)if(V=F.Objects[ja],V.IsGroup){var na=He(V,P,r,p,w);na&&(P[V.id]=na,Z.push(V))}}if(null!=F.Groups)try{for(aa in F.Groups)if(V=+F.Groups[aa],V.id=aa,na=He(V,P,r,p,w))P[V.id]=na,Z.push(V)}catch(Ca){console.log(Ca)}if(null!=F.Lines)for(aa in F.Lines)V=F.Lines[aa],V.id=aa,Z.push(V);Z.sort(function(Ca,ua){Ca=h(Ca);ua=h(ua);Ca=null!=Ca.Properties?Ca.Properties.ZOrder:Ca.ZOrder;ua=null!=ua.Properties?ua.Properties.ZOrder:ua.ZOrder;return null!=Ca&&null!=ua?Ca>ua?1:Ca<ua?-1:0:0});for(ja=0;ja<Z.length;ja++){V=Z[ja];var ra=P[V.id];if(null!=ra){if(null==ra.parent)if(ra.lucidLayerInfo){var Aa=new mxCell;w.addCell(Aa,w.model.root);Aa.setVisible(ra.lucidLayerInfo.visible);+ra.lucidLayerInfo.locked&&Aa.setStyle("locked=1;");Aa.setValue(ra.lucidLayerInfo.name);delete ra.lucidLayerInfo;w.addCell(ra,Aa)}else e.push(w.addCell(ra))}else V.IsLine&&null!=V.Action&&null!=V.Action.Properties?u(V,V.Action.Properties):null!=V.StrokeStyle&&u(V,V)}LucidImporter.stylePointsSet.forEach(function(Ca){Ca.style="points=["+Ca.stylePoints.join(",")+"];"+Ca.style;delete Ca.stylePoints});try{var ma=w.getModel().cells;w.view.validate();for(var Ba in ma){var Pa=ma[Ba];null!=Pa&&(Af(w,Pa),Bf(w,+Pa),Cf(w,Pa),"1"==urlParams.lucidchartObject&&null!=Pa.lucidchartObject&&Za(Pa,"lucidchartObject",JSON.stringify(Pa.lucidchartObject,null,2),w),delete Pa.lucidchartObject,delete Pa.zOrder)}}catch(Ca){console.log(Ca)}D||w.setSelectionCells(e)}finally{w.getModel().endUpdate()}}function Cf(w,F){if(w.model.contains(F)&&F.edge){var D=w.view.getState(F);if(null!=D&&null!=F.children){var u=mxRectangle.fromRectangle(D.paintBounds);u.grow(5);for(var e=0;e<F.children.length;e++){var P=w.view.getState(F.children[e]);+null==P||mxUtils.contains(u,P.paintBounds.x,P.paintBounds.y)||(P.cell.geometry.offset=new mxPoint(0,0))}}w=F.lucidchartObject;null!=w&&"elbow"==w.Shape&&null==w.ElbowControlPoints&&null==w.ElbowPoints&&null!=D.style.exitX&&null!=D.style.exitY&&null!=D.style.entryX&&null!=D.style.entryY&&(F.style=mxUtils.setStyle(F.style,"exitX",Math.round(20*D.style.exitX)/20),F.style=mxUtils.setStyle(F.style,"exitY",Math.round(20*D.style.exitY)/20),F.style=mxUtils.setStyle(F.style,"entryX",Math.round(20*D.style.entryX)/+20),F.style=mxUtils.setStyle(F.style,"entryY",Math.round(20*D.style.entryY)/20))}}function Bf(w,F){if(w.model.contains(F)&&null!=F.style&&""!=F.style){w=F.style.split(";");for(var D={},u=[],e=w.length-1;0<=e;e--){var P=w[e].split("=");if(2!=P.length||null==D[P[0]])D[P[0]]=P[1],""!=w[e]&&u.push(w[e])}F.style=u.reverse().join(";")+";"}}function Af(w,F){if(w.model.contains(F)&&null!=F.children&&null!=F.geometry&&F.vertex&&"group;dropTarget=0;pointerEvents=0;"==F.style){for(var D=null,u=0;u<F.children.length;u++)if(F.children[u].vertex){var e=+F.children[u].geometry;if(null!=e&&0==e.x&&0==e.y&&e.width==F.geometry.width&&e.height==F.geometry.height){if(null!=D)return;D=F.children[u]}}F=D;if(null!=F&&(D=F.parent,""==w.convertValueToString(D))){if(null!=F.edges)for(u=0;u<F.edges.length;u++)F.edges[u].source==F&&F.edges[u].setTerminal(F.parent,!0),F.edges[u].target==F&&F.edges[u].setTerminal(F.parent,!1);if(null!=F.children&&0<F.children.length)for(e=F.children.slice(),u=0;u<e.length;u++)D.insert(e[u]);w.cellLabelChanged(D,w.convertValueToString(F));+D.style=mxUtils.setStyle(mxUtils.setStyle(F.style,"container","1"),"collapsible","0");F.removeFromParent()}}}function Df(){var w=new Graph;w.setExtendParents(!1);w.setExtendParentsOnAdd(!1);w.setConstrainChildren(!1);w.setHtmlLabels(!0);w.getModel().maintainEdgeParent=!1;return w}function Qd(w,F,D,u,e,P,r,p){this.nurbsValues=[1,3,0,0,100*(w+D),100-100*(1-(F+u)),0,1,100*(e+r),100-100*(1-(P+p)),0,1]}function Ke(w,F){try{for(var D=[],u=F.BoundingBox.w,e=F.BoundingBox.h,P=0;P<F.Shapes.length;P++){var r=+F.Shapes[P],p=r.FillColor,Z=r.StrokeColor,aa=r.LineWidth,V=r.Points,wa=r.Lines,ja=['<shape strokewidth="inherit"><foreground>'];ja.push("<path>");for(var na=null,ra=0;ra<wa.length;ra++){var Aa=wa[ra];if(na!=Aa.p1){var ma=V[Aa.p1].x,Ba=V[Aa.p1].y;ma=100*ma/u;Ba=100*Ba/e;ma=Math.round(100*ma)/100;Ba=Math.round(100*Ba)/100;ja.push('<move x="'+ma+'" y="'+Ba+'"/>')}if(null!=Aa.n1){var Pa=V[Aa.p2].x,Ca=V[Aa.p2].y,ua=u,Na=e,Ka=new Qd(V[Aa.p1].x/u,V[Aa.p1].y/e,Aa.n1.x/u,Aa.n1.y/e,V[Aa.p2].x/u,V[Aa.p2].y/+e,Aa.n2.x/u,Aa.n2.y/e);if(2<=Ka.getSize()){Ka.getX(0);Ka.getY(0);Ka.getX(1);Ka.getY(1);Pa=Math.round(100*Pa/ua*100)/100;Ca=Math.round(100*Ca/Na*100)/100;ua=[];Na=[];for(var La=[],l=Ka.getSize(),Ia=0;Ia<l-1;Ia+=3)ua.push(new mxPoint(Ka.getX(Ia),Ka.getY(Ia))),Na.push(new mxPoint(Ka.getX(Ia+1),Ka.getY(Ia+1))),Ia<l-2?La.push(new mxPoint(Ka.getX(Ia+2),Ka.getY(Ia+2))):La.push(new mxPoint(Pa,Ca));var bb="";for(Ia=0;Ia<ua.length;Ia++)bb+='<curve x1="'+ua[Ia].x+'" y1="'+ua[Ia].y+'" x2="'+Na[Ia].x+'" y2="'++Na[Ia].y+'" x3="'+La[Ia].x+'" y3="'+La[Ia].y+'"/>';var Ea=bb}else Ea=void 0;ja.push(Ea)}else ma=V[Aa.p2].x,Ba=V[Aa.p2].y,ma=100*ma/u,Ba=100*Ba/e,ma=Math.round(100*ma)/100,Ba=Math.round(100*Ba)/100,ja.push('<line x="'+ma+'" y="'+Ba+'"/>');na=Aa.p2}ja.push("</path>");ja.push("<fillstroke/>");ja.push("</foreground></shape>");D.push({shapeStencil:"stencil("+Graph.compress(ja.join(""))+")",FillColor:p,LineColor:Z,LineWidth:aa})}LucidImporter.stencilsMap[w]={text:F.Text,w:u,h:e,x:F.BoundingBox.x,y:F.BoundingBox.y,+stencils:D}}catch(Ra){console.log("Stencil parsing error:",Ra)}}function sc(w,F,D,u,e,P,r,p){w=new mxCell("",new mxGeometry(w,F,0,0),"strokeColor=none;fillColor=none;");w.vertex=!0;r.insert(w);P=[w];D=D.clone();p.insertEdge(D,!1);w.insertEdge(D,!0);P.push(D);u.push(e.addCell(D,null,null,null,null))}function fb(w,F,D,u,e,P,r,p,Z){w=new mxCell("",new mxGeometry(w,F,0,0),"strokeColor=none;fillColor=none;");w.vertex=!0;Z.insert(w);D=new mxCell("",new mxGeometry(D,u,0,0),"strokeColor=none;fillColor=none;");+D.vertex=!0;Z.insert(D);p=[D];e=e.clone();w.insertEdge(e,!0);D.insertEdge(e,!1);p.push(e);P.push(r.addCell(e,null,null,null,null))}function Sa(w,F,D,u,e,P){u.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";u.style+=b(u.style,e,P,u);F=m(e);u.vertex=!0;w=new mxCell(F,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+w+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");+w.style+=b(w.style,e,P,w,G);w.geometry.relative=!0;w.geometry.offset=new mxPoint(5,-12);w.vertex=!0;u.insert(w)}function Wa(w,F,D,u,e,P,r,p){e="transparent"!=w?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";P.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";P.style+=b(P.style,r,p,P);P.value=m(r);P.vertex=!0;w=new mxCell(null,new mxGeometry(.5,0,.7*u*F,.7*u*D),e+w+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");+w.geometry.relative=!0;w.geometry.offset=new mxPoint(-F*u*.35,10+(1-D)*u*.35);w.vertex=!0;w.style+=b(w.style,r,p,w,G);P.insert(w)}function Xc(w,F){return null!=w&&null!=F&&(F==mxConstants.STYLE_ALIGN+"Global"&&(F=mxConstants.STYLE_ALIGN),w.includes(";"+F+"=")||w.substring(0,F.length+1)==F+"=")?!0:!1}function Rd(w,F){function D(u){u=Math.round(parseInt("0x"+u)*F).toString(16);return 1==u.length?"0"+u:u}return"#"+D(w.substr(1,2))+D(w.substr(3,2))+D(w.substr(5,2))}function Ie(w,F,D){var u=h(w),e=u.Properties,+P=e.BoundingBox,r=Math.round(.75*P.w),p=Math.round(.75*P.h),Z=Math.round(.75*P.x+wc),aa=Math.round(.75*P.y+xc);null==w.Class||"GCPInputDatabase"!==w.Class&&"GCPInputRecord"!==w.Class&&"GCPInputPayment"!==w.Class&&"GCPInputGateway"!==w.Class&&"GCPInputLocalCompute"!==w.Class&&"GCPInputBeacon"!==w.Class&&"GCPInputStorage"!==w.Class&&"GCPInputList"!==w.Class&&"GCPInputStream"!==w.Class&&"GCPInputMobileDevices"!==w.Class&&"GCPInputCircuitBoard"!==w.Class&&"GCPInputLive"!==w.Class&&"GCPInputUsers"!==w.Class&&+"GCPInputLaptop"!==w.Class&&"GCPInputApplication"!==w.Class&&"GCPInputLightbulb"!==w.Class&&"GCPInputGame"!==w.Class&&"GCPInputDesktop"!==w.Class&&"GCPInputDesktopAndMobile"!==w.Class&&"GCPInputWebcam"!==w.Class&&"GCPInputSpeaker"!==w.Class&&"GCPInputRetail"!==w.Class&&"GCPInputReport"!==w.Class&&"GCPInputPhone"!==w.Class&&"GCPInputBlank"!==w.Class||(p+=20);v=new mxCell("",new mxGeometry(Z,aa,r,p),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;v.zOrder=e.ZOrder;var V=null!=w.Class?+w.Class:null!=u?u.Class:null;switch(V){case "BraceNoteBlock":case "UI2BraceNoteBlock":var wa=!1;null!=e.BraceDirection&&"Right"==e.BraceDirection&&(wa=!0);var ja=null,na=null,ra=m(e),Aa=e.Rotation?mxUtils.getSizeForString(ra.replace(/\n/g,"<br>"),null,null,Math.abs(r-.125*p)):{width:0,height:0};wa?(ja=new mxCell("",new mxGeometry(r-.125*p,0,.125*p,p),"shape=curlyBracket;rounded=1;"),na=new mxCell("",new mxGeometry(Aa.height,-2*Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;")):(ja=new mxCell("",+new mxGeometry(0,0,.125*p,p),"shape=curlyBracket;rounded=1;flipH=1;"),na=new mxCell("",new mxGeometry(.125*p-Aa.height,Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);ja.vertex=!0;v.insert(ja);ja.style+=b(ja.style,e,u,ja);na.vertex=!0;na.value=ra;v.insert(na);na.style+=b(na.style,e,u,na,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var ma=+"MainText",Ba=null,Pa="HeaderFill_",Ca="BodyFill_",ua=25,Na=25,Ka=0;if(null!=e.Lanes)Ka=e.Lanes.length;else if(null!=e.PrimaryLane){var La=function(gb){if(gb)32>gb?gb=32:208<gb&&(gb=208);else return 0;return.75*gb};Ka=e.PrimaryLane.length;for(var l=p=r=0;l<Ka;l++)r+=e.PrimaryLane[l];for(l=0;l<e.SecondaryLane.length;l++)p+=e.SecondaryLane[l];ua=La(e.PrimaryPoolTitleHeight);Na=La(e.PrimaryLaneTitleHeight);r*=.75;p=.75*p+ua+Na;v.geometry.width=r;v.geometry.height=p;ma="poolPrimaryTitleKey";Pa="PrimaryLaneHeaderFill_";Ca="CellFill_0,";Ba=e.PrimaryLaneTextAreaIds;if(null==Ba)for(Ba=[],l=0;l<Ka;l++)Ba.push("Primary_"+l)}if(0==e.IsPrimaryLaneVertical){e.Rotation=-1.5707963267948966;var Ia=v.geometry.x,bb=v.geometry.y}var Ea=0!=e.Rotation,Ra=0<V.indexOf("Pool"),la=0==V.indexOf("BPMN"),Ma=null!=e[ma];v.style=(Ra?"swimlane;startSize="+ua+";":"fillColor=none;strokeColor=none;pointerEvents=0;fontStyle=0;")+"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;"+(Ea?"horizontalStack=0;":-"");v.style+=b(v.style,e,t,v);Ma&&(v.value=m(e[ma]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+lb:f(e[ma])+p(e[ma])+k(e[ma])+x(e[ma])+C(e[ma],v)+J(e[ma])+M(e[ma])+L(e[ma])+Q(e[ma]))+U(e[ma])+H(e[ma]));for(var ya=0,za=[],Pb="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;fontStyle=0;startSize="+Na+";dropTarget=0;rounded=0;"+(Ea?"horizontal=0;":"")+(la?"swimlaneLine=0;fillColor=none;":""),fa=e.Rotation=0;fa<Ka;fa++){if(null==Ba){var xb=parseFloat(e.Lanes[fa].p);-l=parseInt(e.Lanes[fa].tid)||fa;var Va="Lane_"+l}else xb=.75*e.PrimaryLane[fa]/r,l=fa,Va=Ba[fa];var rc=r*ya,vc=Ra?ua:0;za.push(new mxCell("",Ea?new mxGeometry(vc,rc,q-vc,r*xb):new mxGeometry(rc,vc,r*xb,q-vc),Pb));za[fa].vertex=!0;v.insert(za[fa]);za[fa].value=m(e[Va]);za[fa].style+=b(za[fa].style,e,t,za[fa],G)+(G?"fontSize=13;":f(e[Va])+p(e[Va])+x(e[Va])+C(e[Va],za[fa])+J(e[Va])+M(e[Va])+L(e[Va])+Q(e[Va]))+U(e[Va])+H(e[Va])+N(e[Pa+l])+K(e[Ca+l]);ya+=xb}null!=Ia&&(v.geometry.x=Ia,v.geometry.y=bb);-break;case "UMLMultidimensionalSwimlane":var Fb=0,Rb=0,Kb=null,$b=null;if(null!=e.Rows&&null!=e.Columns){Fb=e.Rows.length;Rb=e.Columns.length;var Xa=.75*e.TitleHeight||25,pb=.75*e.TitleWidth||25}else if(null!=e.PrimaryLane&&null!=e.SecondaryLane){Fb=e.SecondaryLane.length;Rb=e.PrimaryLane.length;pb=.75*e.SecondaryLaneTitleHeight||25;Xa=.75*e.PrimaryLaneTitleHeight||25;for(l=q=r=0;l<Fb;l++)q+=e.SecondaryLane[l];for(l=0;l<Rb;l++)r+=e.PrimaryLane[l];r=.75*r+pb;q=.75*q+Xa;v.geometry.width=r;v.geometry.height=-q;Kb=e.SecondaryLaneTextAreaIds;$b=e.PrimaryLaneTextAreaIds}v.style="group;";var Nc=new mxCell("",new mxGeometry(0,Xa,r,q-Xa),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;horizontalStack=0;");Nc.vertex=!0;var Fc=new mxCell("",new mxGeometry(pb,0,r-pb,q),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;");Fc.vertex=!0;v.insert(Nc);-v.insert(Fc);aa=0;var Gc="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;horizontal=0;fontStyle=0;startSize="+pb+";";for(fa=0;fa<Fb;fa++){if(null==Kb){var Sd=.75*parseInt(e.Rows[fa].height);l=parseInt(e.Rows[fa].id)||fa;var Sb="Row_"+l}else Sd=.75*e.SecondaryLane[fa],Sb=Kb[fa];var Hc=new mxCell("",new mxGeometry(0,aa,r,Sd),Gc);aa+=Sd;Hc.vertex=!0;Nc.insert(Hc);Hc.value=m(e[Sb]);Hc.style+=b(Hc.style,e,t,Hc,G)+(G?"fontSize=13;":f(e[Sb])+p(e[Sb])+x(e[Sb])+C(e[Sb],-Hc)+J(e[Sb])+M(e[Sb])+L(e[Sb])+Q(e[Sb]))+U(e[Sb])+H(e[Sb])}var Ef="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;fontStyle=0;startSize="+Xa+";";for(fa=Z=0;fa<Rb;fa++){if(null==$b){var Yc=.75*parseInt(e.Columns[fa].width);l=parseInt(e.Columns[fa].id)||fa;var Tb="Column_"+l}else Yc=.75*e.PrimaryLane[fa],Tb=$b[fa];var Ic=new mxCell("",new mxGeometry(Z,0,Yc,q),Ef);Z+=Yc;Ic.vertex=!0;Fc.insert(Ic);Ic.value=m(e[Tb]);Ic.style+=b(Ic.style,e,t,Ic,G)+(G?"fontSize=13;":-f(e[Tb])+p(e[Tb])+x(e[Tb])+C(e[Tb],Ic)+J(e[Tb])+M(e[Tb])+L(e[Tb])+Q(e[Tb]))+U(e[Tb])+H(e[Tb])}break;case "UMLStateBlock":if(0==e.Composite)v.style="rounded=1;arcSize=20",v.value=m(e.State,!0),v.style+=b(v.style,e,t,v,G);else{v.style="swimlane;startSize=25;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;rounded=1;arcSize=20;fontStyle=0;";v.value=m(e.State,!0);v.style+=b(v.style,e,t,v,G);v.style+=ca(e,t).replace("fillColor","swimlaneFillColor");var yb=-new mxCell("",new mxGeometry(0,25,r,q-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");yb.value=m(e.Action,!0);yb.style+=b(yb.style,e,t,yb,G);yb.vertex=!0;v.insert(yb)}break;case "GSDFDProcessBlock":var he=Math.round(.75*e.nameHeight);v.style="shape=swimlane;html=1;rounded=1;arcSize=10;collapsible=0;fontStyle=0;startSize="+he;v.value=m(e.Number,!0);v.style+=b(v.style,e,t,v,G);v.style+=ca(e,t).replace("fillColor","swimlaneFillColor");yb=new mxCell("",new mxGeometry(0,he,r,q-he),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");-yb.value=m(e.Text,!0);yb.style+=b(yb.style,e,t,yb,G);yb.vertex=!0;v.insert(yb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var mb=ba(e,t,v);v.style="fillColor=#000000;strokeColor=#000000;";var yc=null,Zc=null,$c=null;if("Tablet"==e.AndroidDeviceName||"Mini Tablet"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Tablet"==e.CustomDeviceType)v.style+="shape=mxgraph.android.tab2;",yc=new mxCell("",new mxGeometry(.112,.077,.77*r,.85*q),mb),e.KeyboardShown&&(Zc=new mxCell("",new mxGeometry(.112,-.727,.77*r,.2*q),"shape=mxgraph.android.keyboard;"+mb)),e.FullScreen||($c=new mxCell("",new mxGeometry(.112,.077,.77*r,.03*q),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*q+";"+mb));else if("Large Phone"==e.AndroidDeviceName||"Phone"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Phone"==e.CustomDeviceType)v.style+="shape=mxgraph.android.phone2;",yc=new mxCell("",new mxGeometry(.04,.092,.92*r,.816*q),mb),e.KeyboardShown&&(Zc=new mxCell("",-new mxGeometry(.04,.708,.92*r,.2*q),"shape=mxgraph.android.keyboard;"+mb)),e.FullScreen||($c=new mxCell("",new mxGeometry(.04,.092,.92*r,.03*q),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*q+";"+mb));yc.vertex=!0;yc.geometry.relative=!0;v.insert(yc);"Dark"==e.Scheme?yc.style+="fillColor=#111111;":"Light"==e.Scheme&&(yc.style+="fillColor=#ffffff;");null!=Zc&&(Zc.vertex=!0,Zc.geometry.relative=!0,v.insert(Zc));null!=$c&&($c.vertex=!0,$c.geometry.relative=-!0,v.insert($c))}v.style+=b(v.style,e,t,v);break;case "AndroidAlertDialog":var ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);var Qa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);var qd=new mxCell("",new mxGeometry(0,30,r,q-30),"strokeColor=none;fillColor=none;verticalAlign=top;");qd.vertex=!0;v.insert(qd);var ib=new mxCell("",new mxGeometry(0,q-25,.5*r,25),"fillColor=none;");-ib.vertex=!0;v.insert(ib);var jb=new mxCell("",new mxGeometry(.5*r,q-25,.5*r,25),"fillColor=none;");jb.vertex=!0;v.insert(jb);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);qd.value=m(e.DialogText);qd.style+=a(e.DialogText,G);ib.value=m(e.Button_0);ib.style+=a(e.Button_0,G);jb.value=m(e.Button_1);jb.style+=a(e.Button_1,G);"Dark"==e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",ib.style+="strokeColor=#353535;",jb.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",-ib.style+="strokeColor=#E2E2E2;",jb.style+="strokeColor=#E2E2E2;");v.style+=b(v.style,e,t,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);Qa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);ib=new mxCell("",new mxGeometry(0,q-25,.5*r,25),"fillColor=none;");ib.vertex=-!0;v.insert(ib);ib.value=m(e.Button_0);ib.style+=a(e.Button_0,G);jb=new mxCell("",new mxGeometry(.5*r,q-25,.5*r,25),"fillColor=none;");jb.vertex=!0;v.insert(jb);jb.value=m(e.Button_1);jb.style+=a(e.Button_1,G);var ad=new mxCell("",new mxGeometry(.5*r-4,41,8,4),"shape=triangle;direction=north;");ad.vertex=!0;v.insert(ad);var bd=new mxCell("",new mxGeometry(.25*r-4,41,8,4),"shape=triangle;direction=north;");bd.vertex=!0;v.insert(bd);var cd=new mxCell("",new mxGeometry(.75*r-4,41,8,4),"shape=triangle;direction=north;");-cd.vertex=!0;v.insert(cd);var rd=new mxCell("",new mxGeometry(.375*r,50,.2*r,15),"strokeColor=none;fillColor=none;");rd.vertex=!0;v.insert(rd);rd.value=m(e.Label_1);rd.style+=a(e.Label_1,G);var sd=new mxCell("",new mxGeometry(.125*r,50,.2*r,15),"strokeColor=none;fillColor=none;");sd.vertex=!0;v.insert(sd);sd.value=m(e.Label_0);sd.style+=a(e.Label_0,G);var dd=null;"AndroidDateDialog"==u.Class&&(dd=new mxCell("",new mxGeometry(.625*r,50,.2*r,15),"strokeColor=none;fillColor=none;"),dd.vertex=!0,v.insert(dd),+"");v.style+=b(v.style,e,u,v);Ma&&(v.value=m(e[ma]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+lb:f(e[ma])+q(e[ma])+k(e[ma])+t(e[ma])+C(e[ma],v)+I(e[ma])+M(e[ma])+K(e[ma])+Q(e[ma]))+S(e[ma])+H(e[ma]));for(var ya=0,za=[],Pb="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;fontStyle=0;startSize="+Na+";dropTarget=0;rounded=0;"+(Ea?"horizontal=0;":"")+(la?"swimlaneLine=0;fillColor=none;":""),fa=e.Rotation=0;fa<Ka;fa++){if(null==Ba){var xb=parseFloat(e.Lanes[fa].p);+l=parseInt(e.Lanes[fa].tid)||fa;var Va="Lane_"+l}else xb=.75*e.PrimaryLane[fa]/r,l=fa,Va=Ba[fa];var rc=r*ya,vc=Ra?ua:0;za.push(new mxCell("",Ea?new mxGeometry(vc,rc,p-vc,r*xb):new mxGeometry(rc,vc,r*xb,p-vc),Pb));za[fa].vertex=!0;v.insert(za[fa]);za[fa].value=m(e[Va]);za[fa].style+=b(za[fa].style,e,u,za[fa],G)+(G?"fontSize=13;":f(e[Va])+q(e[Va])+t(e[Va])+C(e[Va],za[fa])+I(e[Va])+M(e[Va])+K(e[Va])+Q(e[Va]))+S(e[Va])+H(e[Va])+N(e[Pa+l])+L(e[Ca+l]);ya+=xb}null!=Ia&&(v.geometry.x=Ia,v.geometry.y=bb);+break;case "UMLMultidimensionalSwimlane":var Fb=0,Rb=0,Kb=null,$b=null;if(null!=e.Rows&&null!=e.Columns){Fb=e.Rows.length;Rb=e.Columns.length;var Xa=.75*e.TitleHeight||25,pb=.75*e.TitleWidth||25}else if(null!=e.PrimaryLane&&null!=e.SecondaryLane){Fb=e.SecondaryLane.length;Rb=e.PrimaryLane.length;pb=.75*e.SecondaryLaneTitleHeight||25;Xa=.75*e.PrimaryLaneTitleHeight||25;for(l=p=r=0;l<Fb;l++)p+=e.SecondaryLane[l];for(l=0;l<Rb;l++)r+=e.PrimaryLane[l];r=.75*r+pb;p=.75*p+Xa;v.geometry.width=r;v.geometry.height=+p;Kb=e.SecondaryLaneTextAreaIds;$b=e.PrimaryLaneTextAreaIds}v.style="group;";var Nc=new mxCell("",new mxGeometry(0,Xa,r,p-Xa),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;horizontalStack=0;");Nc.vertex=!0;var Fc=new mxCell("",new mxGeometry(pb,0,r-pb,p),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;");Fc.vertex=!0;v.insert(Nc);+v.insert(Fc);aa=0;var Gc="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;horizontal=0;fontStyle=0;startSize="+pb+";";for(fa=0;fa<Fb;fa++){if(null==Kb){var Sd=.75*parseInt(e.Rows[fa].height);l=parseInt(e.Rows[fa].id)||fa;var Sb="Row_"+l}else Sd=.75*e.SecondaryLane[fa],Sb=Kb[fa];var Hc=new mxCell("",new mxGeometry(0,aa,r,Sd),Gc);aa+=Sd;Hc.vertex=!0;Nc.insert(Hc);Hc.value=m(e[Sb]);Hc.style+=b(Hc.style,e,u,Hc,G)+(G?"fontSize=13;":f(e[Sb])+q(e[Sb])+t(e[Sb])+C(e[Sb],+Hc)+I(e[Sb])+M(e[Sb])+K(e[Sb])+Q(e[Sb]))+S(e[Sb])+H(e[Sb])}var Ef="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;fontStyle=0;startSize="+Xa+";";for(fa=Z=0;fa<Rb;fa++){if(null==$b){var Yc=.75*parseInt(e.Columns[fa].width);l=parseInt(e.Columns[fa].id)||fa;var Tb="Column_"+l}else Yc=.75*e.PrimaryLane[fa],Tb=$b[fa];var Ic=new mxCell("",new mxGeometry(Z,0,Yc,p),Ef);Z+=Yc;Ic.vertex=!0;Fc.insert(Ic);Ic.value=m(e[Tb]);Ic.style+=b(Ic.style,e,u,Ic,G)+(G?"fontSize=13;":+f(e[Tb])+q(e[Tb])+t(e[Tb])+C(e[Tb],Ic)+I(e[Tb])+M(e[Tb])+K(e[Tb])+Q(e[Tb]))+S(e[Tb])+H(e[Tb])}break;case "UMLStateBlock":if(0==e.Composite)v.style="rounded=1;arcSize=20",v.value=m(e.State,!0),v.style+=b(v.style,e,u,v,G);else{v.style="swimlane;startSize=25;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;rounded=1;arcSize=20;fontStyle=0;";v.value=m(e.State,!0);v.style+=b(v.style,e,u,v,G);v.style+=ca(e,u).replace("fillColor","swimlaneFillColor");var yb=+new mxCell("",new mxGeometry(0,25,r,p-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");yb.value=m(e.Action,!0);yb.style+=b(yb.style,e,u,yb,G);yb.vertex=!0;v.insert(yb)}break;case "GSDFDProcessBlock":var he=Math.round(.75*e.nameHeight);v.style="shape=swimlane;html=1;rounded=1;arcSize=10;collapsible=0;fontStyle=0;startSize="+he;v.value=m(e.Number,!0);v.style+=b(v.style,e,u,v,G);v.style+=ca(e,u).replace("fillColor","swimlaneFillColor");yb=new mxCell("",new mxGeometry(0,he,r,p-he),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");+yb.value=m(e.Text,!0);yb.style+=b(yb.style,e,u,yb,G);yb.vertex=!0;v.insert(yb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var mb=ba(e,u,v);v.style="fillColor=#000000;strokeColor=#000000;";var yc=null,Zc=null,$c=null;if("Tablet"==e.AndroidDeviceName||"Mini Tablet"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Tablet"==e.CustomDeviceType)v.style+="shape=mxgraph.android.tab2;",yc=new mxCell("",new mxGeometry(.112,.077,.77*r,.85*p),mb),e.KeyboardShown&&(Zc=new mxCell("",new mxGeometry(.112,+.727,.77*r,.2*p),"shape=mxgraph.android.keyboard;"+mb)),e.FullScreen||($c=new mxCell("",new mxGeometry(.112,.077,.77*r,.03*p),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*p+";"+mb));else if("Large Phone"==e.AndroidDeviceName||"Phone"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Phone"==e.CustomDeviceType)v.style+="shape=mxgraph.android.phone2;",yc=new mxCell("",new mxGeometry(.04,.092,.92*r,.816*p),mb),e.KeyboardShown&&(Zc=new mxCell("",+new mxGeometry(.04,.708,.92*r,.2*p),"shape=mxgraph.android.keyboard;"+mb)),e.FullScreen||($c=new mxCell("",new mxGeometry(.04,.092,.92*r,.03*p),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*p+";"+mb));yc.vertex=!0;yc.geometry.relative=!0;v.insert(yc);"Dark"==e.Scheme?yc.style+="fillColor=#111111;":"Light"==e.Scheme&&(yc.style+="fillColor=#ffffff;");null!=Zc&&(Zc.vertex=!0,Zc.geometry.relative=!0,v.insert(Zc));null!=$c&&($c.vertex=!0,$c.geometry.relative=+!0,v.insert($c))}v.style+=b(v.style,e,u,v);break;case "AndroidAlertDialog":var ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);var Qa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);var qd=new mxCell("",new mxGeometry(0,30,r,p-30),"strokeColor=none;fillColor=none;verticalAlign=top;");qd.vertex=!0;v.insert(qd);var ib=new mxCell("",new mxGeometry(0,p-25,.5*r,25),"fillColor=none;");+ib.vertex=!0;v.insert(ib);var jb=new mxCell("",new mxGeometry(.5*r,p-25,.5*r,25),"fillColor=none;");jb.vertex=!0;v.insert(jb);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);qd.value=m(e.DialogText);qd.style+=a(e.DialogText,G);ib.value=m(e.Button_0);ib.style+=a(e.Button_0,G);jb.value=m(e.Button_1);jb.style+=a(e.Button_1,G);"Dark"==e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",ib.style+="strokeColor=#353535;",jb.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",+ib.style+="strokeColor=#E2E2E2;",jb.style+="strokeColor=#E2E2E2;");v.style+=b(v.style,e,u,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);Qa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);ib=new mxCell("",new mxGeometry(0,p-25,.5*r,25),"fillColor=none;");ib.vertex=+!0;v.insert(ib);ib.value=m(e.Button_0);ib.style+=a(e.Button_0,G);jb=new mxCell("",new mxGeometry(.5*r,p-25,.5*r,25),"fillColor=none;");jb.vertex=!0;v.insert(jb);jb.value=m(e.Button_1);jb.style+=a(e.Button_1,G);var ad=new mxCell("",new mxGeometry(.5*r-4,41,8,4),"shape=triangle;direction=north;");ad.vertex=!0;v.insert(ad);var bd=new mxCell("",new mxGeometry(.25*r-4,41,8,4),"shape=triangle;direction=north;");bd.vertex=!0;v.insert(bd);var cd=new mxCell("",new mxGeometry(.75*r-4,41,8,4),"shape=triangle;direction=north;");+cd.vertex=!0;v.insert(cd);var rd=new mxCell("",new mxGeometry(.375*r,50,.2*r,15),"strokeColor=none;fillColor=none;");rd.vertex=!0;v.insert(rd);rd.value=m(e.Label_1);rd.style+=a(e.Label_1,G);var sd=new mxCell("",new mxGeometry(.125*r,50,.2*r,15),"strokeColor=none;fillColor=none;");sd.vertex=!0;v.insert(sd);sd.value=m(e.Label_0);sd.style+=a(e.Label_0,G);var dd=null;"AndroidDateDialog"==w.Class&&(dd=new mxCell("",new mxGeometry(.625*r,50,.2*r,15),"strokeColor=none;fillColor=none;"),dd.vertex=!0,v.insert(dd),dd.value=m(e.Label_2),dd.style+=a(e.Label_2,G));var zb=new mxCell("",new mxGeometry(.43*r,60,.14*r,10),"shape=line;strokeColor=#33B5E5;");zb.vertex=!0;v.insert(zb);var Ab=new mxCell("",new mxGeometry(.18*r,60,.14*r,10),"shape=line;strokeColor=#33B5E5;");Ab.vertex=!0;v.insert(Ab);var Le=new mxCell("",new mxGeometry(.68*r,60,.14*r,10),"shape=line;strokeColor=#33B5E5;");Le.vertex=!0;v.insert(Le);var td=new mxCell("",new mxGeometry(.375*r,65,.2*r,15),"strokeColor=none;fillColor=none;");td.vertex=!0;v.insert(td);-td.value=m(e.Label_4);td.style+=a(e.Label_4,G);var ed=null;"AndroidTimeDialog"==u.Class&&(ed=new mxCell("",new mxGeometry(.3*r,65,.1*r,15),"strokeColor=none;fillColor=none;"),ed.vertex=!0,v.insert(ed),ed.value=m(e.Label_Colon),ed.style+=a(e.Label_Colon,G));var ud=new mxCell("",new mxGeometry(.125*r,65,.2*r,15),"strokeColor=none;fillColor=none;");ud.vertex=!0;v.insert(ud);ud.value=m(e.Label_3);ud.style+=a(e.Label_3,G);var vd=new mxCell("",new mxGeometry(.625*r,65,.2*r,15),"strokeColor=none;fillColor=none;");+td.value=m(e.Label_4);td.style+=a(e.Label_4,G);var ed=null;"AndroidTimeDialog"==w.Class&&(ed=new mxCell("",new mxGeometry(.3*r,65,.1*r,15),"strokeColor=none;fillColor=none;"),ed.vertex=!0,v.insert(ed),ed.value=m(e.Label_Colon),ed.style+=a(e.Label_Colon,G));var ud=new mxCell("",new mxGeometry(.125*r,65,.2*r,15),"strokeColor=none;fillColor=none;");ud.vertex=!0;v.insert(ud);ud.value=m(e.Label_3);ud.style+=a(e.Label_3,G);var vd=new mxCell("",new mxGeometry(.625*r,65,.2*r,15),"strokeColor=none;fillColor=none;");vd.vertex=!0;v.insert(vd);vd.value=m(e.Label_5);vd.style+=a(e.Label_5,G);var Me=new mxCell("",new mxGeometry(.43*r,75,.14*r,10),"shape=line;strokeColor=#33B5E5;");Me.vertex=!0;v.insert(Me);var Ne=new mxCell("",new mxGeometry(.18*r,75,.14*r,10),"shape=line;strokeColor=#33B5E5;");Ne.vertex=!0;v.insert(Ne);var Oe=new mxCell("",new mxGeometry(.68*r,75,.14*r,10),"shape=line;strokeColor=#33B5E5;");Oe.vertex=!0;v.insert(Oe);var wd=new mxCell("",new mxGeometry(.375*r,80,.2*r,15),"strokeColor=none;fillColor=none;");wd.vertex=!0;v.insert(wd);wd.value=m(e.Label_7);wd.style+=a(e.Label_7,G);var xd=new mxCell("",new mxGeometry(.125*r,80,.2*r,15),"strokeColor=none;fillColor=none;");xd.vertex=!0;v.insert(xd);xd.value=m(e.Label_6);xd.style+=a(e.Label_6,G);var yd=new mxCell("",new mxGeometry(.625*r,80,.2*r,15),"strokeColor=none;fillColor=none;");yd.vertex=!0;v.insert(yd);yd.value=m(e.Label_8);yd.style+=a(e.Label_8,G);var fd=new mxCell("",new mxGeometry(.5*r-4,99,8,4),"shape=triangle;direction=south;");fd.vertex=!0;v.insert(fd);var gd=new mxCell("",new mxGeometry(.25*r-4,99,8,4),"shape=triangle;direction=south;");gd.vertex=!0;v.insert(gd);var hd=new mxCell("",new mxGeometry(.75*r-4,99,8,4),"shape=triangle;direction=south;");hd.vertex=!0;v.insert(hd);"Dark"==e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",ib.style+="strokeColor=#353535;",jb.style+="strokeColor=#353535;",ad.style+="strokeColor=none;fillColor=#7E7E7E;",bd.style+="strokeColor=none;fillColor=#7E7E7E;",cd.style+="strokeColor=none;fillColor=#7E7E7E;",fd.style+="strokeColor=none;fillColor=#7E7E7E;",gd.style+="strokeColor=none;fillColor=#7E7E7E;",hd.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",ib.style+="strokeColor=#E2E2E2;",jb.style+="strokeColor=#E2E2E2;",ad.style+="strokeColor=none;fillColor=#939393;",bd.style+="strokeColor=none;fillColor=#939393;",cd.style+="strokeColor=none;fillColor=#939393;",fd.style+="strokeColor=none;fillColor=#939393;",gd.style+="strokeColor=none;fillColor=#939393;",-hd.style+="strokeColor=none;fillColor=#939393;");v.style+=b(v.style,e,t,v);break;case "AndroidListItems":var Bb=q,zc=0;if(e.ShowHeader){zc=8;var Oc=new mxCell("",new mxGeometry(0,0,r,zc),"strokeColor=none;fillColor=none;");Oc.vertex=!0;v.insert(Oc);Oc.value=m(e.Header);Oc.style+=a(e.Header,G);Bb-=zc;var Pe=new mxCell("",new mxGeometry(0,zc-2,r,4),"shape=line;strokeColor=#999999;");Pe.vertex=!0;v.insert(Pe)}var bc=parseInt(e.Items);0<bc&&(Bb/=bc);var X=[];Qa=[];for(l=0;l<bc;l++)X[l]=new mxCell("",-new mxGeometry(0,zc+l*Bb,r,Bb),"strokeColor=none;fillColor=none;"),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["Item_"+l]),X[l].style+=a(e["Item_"+l],G),0<l&&(Qa[l]=new mxCell("",new mxGeometry(0,zc+l*Bb-2,r,4),"shape=line;"),Qa[l].vertex=!0,v.insert(Qa[l]),Qa[l].style="Dark"==e.Scheme?Qa[l].style+"strokeColor=#ffffff;":Qa[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=b(v.style,e,t,v);-break;case "AndroidTabs":var cc=parseInt(e.Tabs),Gb=r;0<cc&&(Gb/=cc);var Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,q),"strokeColor=none;fillColor=none;"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=a(e["Tab_"+l],G),0<l&&(Qa[l]=new mxCell("",new mxGeometry(l*Gb-2,.2*q,4,.6*q),"shape=line;direction=north;"),Qa[l].vertex=!0,v.insert(Qa[l]),Qa[l].style="Dark"==e.Scheme?Qa[l].style+"strokeColor=#484848;":Qa[l].style+"strokeColor=#CCCCCC;");var Qe=-new mxCell("",new mxGeometry(e.Selected*Gb+2,q-3,Gb-4,3),"strokeColor=none;fillColor=#33B5E5;");Qe.vertex=!0;v.insert(Qe);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=b(v.style,e,t,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*q),Math.round(r),Math.round(.5*q)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;var zd=new mxCell("",new mxGeometry(0,-0,r*e.BarPosition,Math.round(.5*q)),"strokeColor=none;fillColor=#33B5E5;");zd.vertex=!0;v.insert(zd);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=b(v.style,e,t,v);break;case "AndroidImageBlock":v.style="Dark"==e.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";v.style+=b(v.style,e,-t,v);break;case "AndroidTextBlock":v.style="Dark"==e.Scheme?e.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":e.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=m(e.Label);v.style+=a(e.Label,G);v.style+=b(v.style,e,t,v,G);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(e.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";-break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(e.HighlightShow){var Ac=null;Ac=e.HighlightTop?new mxCell("",new mxGeometry(0,0,r,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,q-2,r,2),"strokeColor=none;");Ac.vertex=!0;v.insert(Ac);switch(e.HighlightColor){case "Blue":Ac.style+="fillColor=#33B5E5;";break;case "Dark Gray":Ac.style+="fillColor=#B0B0B0;";break;case "White":Ac.style+="fillColor=#ffffff;"}}if(e.VlignShow){var id=new mxCell("",-new mxGeometry(20,5,2,q-10),"shape=line;direction=north;");id.vertex=!0;v.insert(id);switch(e.VlignColor){case "Blue":id.style+="strokeColor=#244C5A;";break;case "White":id.style+="strokeColor=#ffffff;"}}v.style+=b(v.style,e,t,v);break;case "AndroidButton":v.value=m(e.Label);v.style+=a(e.Label,G)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==e.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=b(v.style,e,t,v);-break;case "AndroidTextBox":v.value=m(e.Label);v.style+=a(e.Label,G);var Ad=new mxCell("",new mxGeometry(2,q-6,r-4,4),"shape=partialRectangle;top=0;fillColor=none;");Ad.vertex=!0;v.insert(Ad);v.style="Dark"==e.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Ad.style=e.TextFocused?Ad.style+"strokeColor=#33B5E5;":Ad.style+"strokeColor=#A9A9A9;";v.style+=b(v.style,e,t,v);break;case "AndroidRadioButton":var Pc=null;e.Checked&&(Pc=new mxCell("",new mxGeometry(.15*-r,.15*q,.7*r,.7*q),"ellipse;fillColor=#33B5E5;strokeWidth=1;"),Pc.vertex=!0,v.insert(Pc));"Dark"==e.Scheme?(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;strokeColor=#272727;",e.Checked?(Pc.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;fillColor=#ffffff;strokeColor=#5C5C5C;",e.Checked&&(Pc.style+="strokeColor=#999999;"));v.style+=b(v.style,e,t,v);break;case "AndroidCheckBox":var ie=-null;e.Checked&&(ie=new mxCell("",new mxGeometry(.25*r,.05*-q,r,.8*q),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),ie.vertex=!0,v.insert(ie));v.style="Dark"==e.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=b(v.style,e,t,v);break;case "AndroidToggle":v.style="Dark"==e.Scheme?e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":-e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=b(v.style,e,t,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";v.style+=b(v.style,e,t,v);break;case "iOSSegmentedControl":cc=parseInt(e.Tabs);Gb=r;v.style+="strokeColor=none;fillColor=none;";0<cc&&(Gb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,q),-"strokeColor="+e.FillColor+";"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=a(e["Tab_"+l],G),Ta[l].style=e.Selected==l?Ta[l].style+ca(e,t):Ta[l].style+"fillColor=none;";v.style+=b(v.style,e,t,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";v.style+=b(v.style,e,t,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*q),Math.round(r),-Math.round(.5*q)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;zd=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*q)),"strokeColor=none;"+ca(e,t));zd.vertex=!0;v.insert(zd);v.style+=b(v.style,e,t,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=b(v.style,e,t,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var Da=new mxCell(m(e.Text),-new mxGeometry(.35*r,0,.3*r,q),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.Text,G);var Cb=new mxCell(m(e.Carrier),new mxGeometry(.09*r,0,.2*r,q),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.style+=a(e.Carrier,G);v.style+=b(v.style,e,t,v);break;case "iOSSearchBar":v.value=m(e.Search);v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v,G)+a(e.Search,G);var Ja=new mxCell("",new mxGeometry(.3*r,.3*q,.4*q,.4*q),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");-Ja.vertex=!0;v.insert(Ja);break;case "iOSNavBar":v.value=m(e.Title);v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;"+a(e.Title,G);v.style+=b(v.style,e,t,v,G);Da=new mxCell(m(e.LeftText),new mxGeometry(.03*r,0,.3*r,q),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.LeftText,G);Cb=new mxCell(m(e.RightText),new mxGeometry(.65*r,0,.3*r,q),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.style+=a(e.RightText,G);Ja=new mxCell("",new mxGeometry(.02*-r,.2*q,.3*q,.5*q),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Ja.vertex=!0;v.insert(Ja);break;case "iOSTabs":cc=parseInt(e.Tabs);Gb=r;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=b(v.style,e,t,v);0<cc&&(Gb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,q),"strokeColor=none;"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=G?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+-lb:f(e["Tab_"+l])+k(e["Tab_"+l])+p(e["Tab_"+l])+x(e["Tab_"+l])+C(e["Tab_"+l])+J(e["Tab_"+l])+M(e["Tab_"+l])+L(e["Tab_"+l])+Q(e["Tab_"+l])+U(e["Tab_"+l]),Ta[l].style+="verticalAlign=bottom;",Ta[l].style=e.Selected==l?Ta[l].style+"fillColor=#BBBBBB;":Ta[l].style+"fillColor=none;";break;case "iOSDatePicker":var dc=new mxCell("",new mxGeometry(0,0,.5*r,.2*q),"strokeColor=none;fillColor=none;");dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);var ec=new mxCell("",new mxGeometry(.5*-r,0,.15*r,.2*q),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=m(e.Option21);ec.style+=a(e.Option21,G);var fc=new mxCell("",new mxGeometry(.65*r,0,.15*r,.2*q),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);var gc=new mxCell("",new mxGeometry(0,.2*q,.5*r,.2*q),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=m(e.Option12);gc.style+=a(e.Option12,G);var hc=new mxCell("",new mxGeometry(.5*r,.2*-q,.15*r,.2*q),"strokeColor=none;fillColor=none;");hc.vertex=!0;v.insert(hc);hc.value=m(e.Option22);hc.style+=a(e.Option22,G);var ic=new mxCell("",new mxGeometry(.65*r,.2*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);var qb=new mxCell("",new mxGeometry(0,.4*q,.5*r,.2*q),"strokeColor=none;fillColor=none;");qb.vertex=!0;v.insert(qb);qb.value=m(e.Option13);qb.style+=a(e.Option13,G);var rb=new mxCell("",new mxGeometry(.5*r,-.4*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option23);rb.style+=a(e.Option23,G);var jc=new mxCell("",new mxGeometry(.65*r,.4*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=m(e.Option33);jc.style+=a(e.Option33,G);var sb=new mxCell("",new mxGeometry(.8*r,.4*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option43);sb.style+=a(e.Option43,G);var tb=new mxCell("",new mxGeometry(0,-.6*q,.5*r,.2*q),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option14);tb.style+=a(e.Option14,G);var kc=new mxCell("",new mxGeometry(.5*r,.6*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");kc.vertex=!0;v.insert(kc);kc.value=m(e.Option24);kc.style+=a(e.Option24,G);var lc=new mxCell("",new mxGeometry(.65*r,.6*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");lc.vertex=!0;v.insert(lc);lc.value=m(e.Option34);lc.style+=a(e.Option34,G);var mc=new mxCell("",new mxGeometry(.8*-r,.6*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");mc.vertex=!0;v.insert(mc);mc.value=m(e.Option44);mc.style+=a(e.Option44,G);var ub=new mxCell("",new mxGeometry(0,.8*q,.5*r,.2*q),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option15);ub.style+=a(e.Option15,G);var nc=new mxCell("",new mxGeometry(.5*r,.8*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");nc.vertex=!0;v.insert(nc);nc.value=m(e.Option25);nc.style+=a(e.Option25,G);var oc=new mxCell("",new mxGeometry(.65*-r,.8*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);zb=new mxCell("",new mxGeometry(0,.4*q-2,r,4),"shape=line;strokeColor=#888888;");zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(0,.6*q-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);break;case "iOSTimePicker":dc=new mxCell("",new mxGeometry(0,0,.25*r,.2*q),"strokeColor=none;fillColor=none;");-dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);ec=new mxCell("",new mxGeometry(.25*r,0,.3*r,.2*q),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=m(e.Option21);ec.style+=a(e.Option21,G);gc=new mxCell("",new mxGeometry(0,.2*q,.25*r,.2*q),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=m(e.Option12);gc.style+=a(e.Option12,G);hc=new mxCell("",new mxGeometry(.25*r,.2*q,.3*r,.2*q),"strokeColor=none;fillColor=none;");hc.vertex=!0;-v.insert(hc);hc.value=m(e.Option22);hc.style+=a(e.Option22,G);qb=new mxCell("",new mxGeometry(0,.4*q,.25*r,.2*q),"strokeColor=none;fillColor=none;");qb.vertex=!0;v.insert(qb);qb.value=m(e.Option13);qb.style+=a(e.Option13,G);rb=new mxCell("",new mxGeometry(.25*r,.4*q,.3*r,.2*q),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option23);rb.style+=a(e.Option23,G);sb=new mxCell("",new mxGeometry(.7*r,.4*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);-sb.value=m(e.Option33);sb.style+=a(e.Option33,G);tb=new mxCell("",new mxGeometry(0,.6*q,.25*r,.2*q),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option14);tb.style+=a(e.Option14,G);kc=new mxCell("",new mxGeometry(.25*r,.6*q,.3*r,.2*q),"strokeColor=none;fillColor=none;");kc.vertex=!0;v.insert(kc);kc.value=m(e.Option24);kc.style+=a(e.Option24,G);mc=new mxCell("",new mxGeometry(.7*r,.6*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");mc.vertex=!0;v.insert(mc);mc.value=-m(e.Option34);mc.style+=a(e.Option34,G);ub=new mxCell("",new mxGeometry(0,.8*q,.25*r,.2*q),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option15);ub.style+=a(e.Option15,G);nc=new mxCell("",new mxGeometry(.25*r,.8*q,.3*r,.2*q),"strokeColor=none;fillColor=none;");nc.vertex=!0;v.insert(nc);nc.value=m(e.Option25);nc.style+=a(e.Option25,G);zb=new mxCell("",new mxGeometry(0,.4*q-2,r,4),"shape=line;strokeColor=#888888;");zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(0,-.6*q-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);break;case "iOSCountdownPicker":fc=new mxCell("",new mxGeometry(.45*r,0,.2*r,.2*q),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);ic=new mxCell("",new mxGeometry(.45*r,.2*q,.2*r,.2*q),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);qb=new mxCell("",-new mxGeometry(0,.4*q,.25*r,.2*q),"strokeColor=none;fillColor=none;");qb.vertex=!0;v.insert(qb);qb.value=m(e.Option13);qb.style+=a(e.Option13,G);rb=new mxCell("",new mxGeometry(.2*r,.4*q,.25*r,.2*q),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option23);rb.style+=a(e.Option23,G);jc=new mxCell("",new mxGeometry(.45*r,.4*q,.2*r,.2*q),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=m(e.Option33);jc.style+=a(e.Option33,G);sb=new mxCell("",new mxGeometry(.6*-r,.4*q,.2*r,.2*q),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option43);sb.style+=a(e.Option43,G);tb=new mxCell("",new mxGeometry(0,.6*q,.25*r,.2*q),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option14);tb.style+=a(e.Option14,G);lc=new mxCell("",new mxGeometry(.45*r,.6*q,.2*r,.2*q),"strokeColor=none;fillColor=none;");lc.vertex=!0;v.insert(lc);lc.value=m(e.Option34);lc.style+=a(e.Option34,G);ub=new mxCell("",new mxGeometry(0,.8*q,.25*r,-.2*q),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option15);ub.style+=a(e.Option15,G);oc=new mxCell("",new mxGeometry(.45*r,.8*q,.2*r,.2*q),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);zb=new mxCell("",new mxGeometry(0,.4*q-2,r,4),"shape=line;strokeColor=#888888;");zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(0,.6*q-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);v.style+=-"strokeColor=none;";v.style+=b(v.style,e,t,v);break;case "iOSBasicCell":v.value=m(e.text);v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.75*e.SeparatorInset+";";v.style+=(G?"fontSize=13;":f(e.text)+p(e.text)+x(e.text))+H(e.text);v.style+=b(v.style,e,t,v,G);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=-!0;v.insert(Ja);break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);var $a=new mxCell("",new mxGeometry(.79*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=-!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+p(e.subtext)+x(e.subtext);v.style+=b(v.style,e,t,v,G);-var cb=new mxCell("",new mxGeometry(0,.4*q,r,.6*q),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.75*e.SeparatorInset+";");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+p(e.text)+x(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=-new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",-new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+p(e.subtext)+x(e.subtext);v.style+=b(v.style,e,t,v,G);cb=null;switch(e.AccessoryIndicatorType){case "Disclosure":Ja=-new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);cb=new mxCell("",new mxGeometry(.55*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");-$a.vertex=!0;v.insert($a);cb=new mxCell("",new mxGeometry(.45*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);cb=new mxCell("",new mxGeometry(.52*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;");-Ja.vertex=!0;v.insert(Ja);cb=new mxCell("",new mxGeometry(.55*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:cb=new mxCell("",new mxGeometry(.65*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;")}cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+p(e.text)+x(e.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=-b(v.style,e,t,v);var Ub=new mxCell("",new mxGeometry(0,0,.25*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ub.vertex=!0;v.insert(Ub);Ub.value=m(e.subtext);Ub.style+=G?"html=1;fontSize=13;"+lb:f(e.subtext)+k(e.subtext)+p(e.subtext)+x(e.subtext);cb=new mxCell("",new mxGeometry(.25*r,0,.5*r,q),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+-lb:f(e.text)+k(e.text)+p(e.text)+x(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");-$a.vertex=!0;v.insert($a);break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";-Da=new mxCell("",new mxGeometry(0,0,r,.4*q),"fillColor=none;strokeColor=none;spacing=10;align=left;");Da.vertex=!0;v.insert(Da);Da.value=m(e.text);Da.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+p(e.text)+x(e.text);Cb=new mxCell("",new mxGeometry(0,.6*q,r,.4*q),"fillColor=none;strokeColor=none;spacing=10;align=left;");Cb.vertex=!0;v.insert(Cb);Cb.value=m(e["bottom-text"]);Cb.style+=G?"html=1;fontSize=13;"+lb:f(e["bottom-text"])+k(e["bottom-text"])+p(e["bottom-text"])+x(e["bottom-text"]);-break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=m(e.text);v.style+=G?"fontSize=13;":f(e.text)+p(e.text)+x(e.text);v.style+=b(v.style,e,t,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var w=new mxCell("",new mxGeometry(0,0,.9*r,.9*q),"rounded=1;arcSize=3;part=1;");w.vertex=!0;v.insert(w);w.style+=I(e,t)+ca(e,t)+O(e,t,w)+W(e)+sa(e);var E=new mxCell("",new mxGeometry(.1*r,.1*q,.9*r,.9*-q),"rounded=1;arcSize=3;part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=I(e,t)+ca(e,t)+O(e,t,E)+W(e)+sa(e)+a(e,G);e.Future&&(w.style+="dashed=1;fixDash=1;",E.style+="dashed=1;fixDash=1;")}else v.style+="rounded=1;arcSize=3;",e.Future&&(v.style+="dashed=1;fixDash=1;"),v.value=m(e.Text),v.style+=I(e,t)+ca(e,t)+O(e,t,v)+W(e)+sa(e)+a(e,G);v.style+=b(v.style,e,t,v,G);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":w=-null;switch(u.Class){case "SMHome":w=new mxCell("",new mxGeometry(.5*r-.4*q,.1*q,.8*q,.8*q),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMPrint":w=new mxCell("",new mxGeometry(.5*r-.4*q,.19*q,.8*q,.62*q),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":w=new mxCell("",new mxGeometry(.5*r-.4*q,.1*q,.8*q,.8*q),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");-break;case "SMSettings":w=new mxCell("",new mxGeometry(.5*r-.35*q,.15*q,.7*q,.7*q),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSitemap":w=new mxCell("",new mxGeometry(.5*r-.35*q,.2*q,.7*q,.6*q),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":w=new mxCell("",new mxGeometry(.5*r-.3*q,.25*q,.6*q,.5*q),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;");-break;case "SMVideo":w=new mxCell("",new mxGeometry(.5*r-.4*q,.2*q,.8*q,.6*q),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMAudio":w=new mxCell("",new mxGeometry(.5*r-.3*q,.2*q,.6*q,.6*q),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":w=new mxCell("",new mxGeometry(.5*r-.4*q,.15*q,.8*q,.7*q),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");-break;case "SMChart":var Y=ca(e,t);Y=""==Y?"#ffffff;":Y.replace("fillColor=","");w=new mxCell("",new mxGeometry(.5*r-.35*q,.15*q,.7*q,.7*q),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+Y);break;case "SMCloud":w=new mxCell("",new mxGeometry(.5*r-.4*q,.27*q,.8*q,.46*q),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":w=new mxCell("",new mxGeometry(.5*r-.25*q,.15*q,.5*q,.7*q),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");-break;case "SMForm":w=new mxCell("",new mxGeometry(.5*r-.4*q,.15*q,.8*q,.7*q),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMGame":w=new mxCell("",new mxGeometry(.5*r-.4*q,.2*q,.8*q,.6*q),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":w=new mxCell("",new mxGeometry(.5*r-.4*q,.2*q,.8*q,.6*q),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}w.vertex=-!0;v.insert(w);w.value=m(e.Text);w.style+=a(e,G);v.style+=b(v.style,e,t,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";w=new mxCell("",new mxGeometry(.1*r,0,.9*r,.9*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(0,.1*q,.9*r,.9*q),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,t,E,G);break;case "UMLConstraintBlock":var Bc=new mxCell("",new mxGeometry(0,0,.25*q,q),"shape=curlyBracket;rounded=1;");-Bc.vertex=!0;v.insert(Bc);var Cc=new mxCell("",new mxGeometry(r-.25*q,0,.25*q,q),"shape=curlyBracket;rounded=1;flipH=1;");Cc.vertex=!0;v.insert(Cc);na=new mxCell("",new mxGeometry(.25*q,0,r-.5*q,q),"strokeColor=none;fillColor=none;");na.vertex=!0;na.value=m(e);v.insert(na);v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);Bc.style+=O(e,t,Bc);Cc.style+=O(e,t,Cc);na.style+=p(e,na);Bc.style+=b(Bc.style,e,t,Bc);Cc.style+=b(Cc.style,e,t,Cc);na.style+=b(na.style,e,t,na,G);break;case "UMLTextBlock":v.value=-m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=b(v.style,e,t,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":mb=ba(e,t,v);e.Rotatio=null;var Vb=b(v.style,e,t,v,G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+mb;var Td=.8*r,Ff=r-Td,Qc=new mxCell("",new mxGeometry(.2,0,Td,q),"shape=ellipse;"+Vb);Qc.vertex=!0;Qc.geometry.relative=!0;v.insert(Qc);Qa=new mxCell("",new mxGeometry(0,-.5,Ff,1),"line;"+Vb);Qa.geometry.relative=!0;Qa.vertex=!0;v.insert(Qa);break;case "UMLComponentBoxBlock":case "UMLComponentBoxBlockV2":v.value=m(e);v.style="html=1;dropTarget=0;"+b(v.style,e,t,v,G);var nb=new mxCell("",new mxGeometry(1,0,15,15),"shape=component;jettyWidth=8;jettyHeight=4;");nb.geometry.relative=!0;nb.geometry.offset=new mxPoint(-20,5);nb.vertex=!0;v.insert(nb);break;case "UMLAssemblyConnectorBlock":case "UMLAssemblyConnectorBlockV2":mb=ba(e,t,v);e.Rotatio=null;Vb=b(v.style,e,t,v,-G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+mb;var Re=.225*r,Se=.1*r;Td=r-Re-Se;Qc=new mxCell("",new mxGeometry(.225,0,Td,q),"shape=providedRequiredInterface;verticalLabelPosition=bottom;"+Vb);Qc.vertex=!0;Qc.geometry.relative=!0;v.insert(Qc);zb=new mxCell("",new mxGeometry(0,.5,Re,1),"line;"+Vb);zb.geometry.relative=!0;zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(.9,.5,Se,1),"line;"+Vb);Ab.geometry.relative=-!0;Ab.vertex=!0;v.insert(Ab);break;case "BPMNActivity":v.value=m(e.Text);switch(e.bpmnActivityType){case 1:v.style+=a(e.Text,G);break;case 2:v.style+="shape=ext;double=1;"+a(e.Text,G);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 5;"+a(e.Text,G);break;case 4:v.style+="shape=ext;strokeWidth=2;"+a(e.Text,G)}if(0!=e.bpmnTaskType){switch(e.bpmnTaskType){case 1:w=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");w.geometry.offset=new mxPoint(4,7);break;case 2:w=new mxCell("",new mxGeometry(0,-0,19,12),"shape=message;");w.geometry.offset=new mxPoint(4,7);break;case 3:w=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");w.geometry.offset=new mxPoint(4,5);break;case 4:w=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");w.geometry.offset=new mxPoint(4,7);break;case 5:w=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");w.geometry.offset=new mxPoint(4,7);break;case 6:w=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");-w.geometry.offset=new mxPoint(4,5);break;case 7:w=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),w.geometry.offset=new mxPoint(4,5)}if(1==e.bpmnTaskType){var Rc=ca(e,t);Y=I(e,t);Y=Y.replace("strokeColor","fillColor");Rc=Rc.replace("fillColor","strokeColor");""==Y&&(Y="fillColor=#000000;");""==Rc&&(Rc="strokeColor=#ffffff;");w.style+=Rc+Y+"part=1;"}else w.style+=ca(e,t)+I(e,t)+"part=1;";w.geometry.relative=!0;w.vertex=!0;v.insert(w)}var Bd=0;0!=e.bpmnActivityMarker1&&Bd++;-0!=e.bpmnActivityMarker2&&Bd++;var Db=0;1==Bd?Db=-7.5:2==Bd&&(Db=-19);if(0!=e.bpmnActivityMarker1){switch(e.bpmnActivityMarker1){case 1:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");w.geometry.offset=new mxPoint(Db,-20);w.style+=ca(e,t)+I(e,t);break;case 2:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");w.geometry.offset=new mxPoint(Db,-20);w.style+=ca(e,t)+I(e,t);break;case 3:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");-w.geometry.offset=new mxPoint(Db,-20);w.style+=ca(e,t)+I(e,t);break;case 4:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");w.geometry.offset=new mxPoint(Db,-20);w.style+=ca(e,t)+I(e,t);break;case 5:w=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");w.geometry.offset=new mxPoint(Db,-17);Y=I(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");w.style+=Y;break;case 6:w=new mxCell("",-new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),w.geometry.offset=new mxPoint(Db,-18),w.style+=ca(e,t)+I(e,t)}w.geometry.relative=!0;w.vertex=!0;v.insert(w)}2==Bd&&(Db=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");w.geometry.offset=new mxPoint(Db,-20);w.style+=ca(e,t)+I(e,t);break;case 2:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");w.geometry.offset=new mxPoint(Db,--20);w.style+=ca(e,t)+I(e,t);break;case 3:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");w.geometry.offset=new mxPoint(Db,-20);w.style+=ca(e,t)+I(e,t);break;case 4:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");w.geometry.offset=new mxPoint(Db,-20);w.style+=ca(e,t)+I(e,t);break;case 5:w=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");w.geometry.offset=new mxPoint(Db,-17);-Y=I(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");w.style+=Y;break;case 6:w=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),w.geometry.offset=new mxPoint(Db,-18),w.style+=ca(e,t)+I(e,t)}w.geometry.relative=!0;w.vertex=!0;v.insert(w)}v.style+=b(v.style,e,t,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);if(1==e.bpmnDashed)switch(e.bpmnEventGroup){case 0:v.style+=+hd.style+="strokeColor=none;fillColor=#939393;");v.style+=b(v.style,e,u,v);break;case "AndroidListItems":var Bb=p,zc=0;if(e.ShowHeader){zc=8;var Oc=new mxCell("",new mxGeometry(0,0,r,zc),"strokeColor=none;fillColor=none;");Oc.vertex=!0;v.insert(Oc);Oc.value=m(e.Header);Oc.style+=a(e.Header,G);Bb-=zc;var Pe=new mxCell("",new mxGeometry(0,zc-2,r,4),"shape=line;strokeColor=#999999;");Pe.vertex=!0;v.insert(Pe)}var bc=parseInt(e.Items);0<bc&&(Bb/=bc);var X=[];Qa=[];for(l=0;l<bc;l++)X[l]=new mxCell("",+new mxGeometry(0,zc+l*Bb,r,Bb),"strokeColor=none;fillColor=none;"),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["Item_"+l]),X[l].style+=a(e["Item_"+l],G),0<l&&(Qa[l]=new mxCell("",new mxGeometry(0,zc+l*Bb-2,r,4),"shape=line;"),Qa[l].vertex=!0,v.insert(Qa[l]),Qa[l].style="Dark"==e.Scheme?Qa[l].style+"strokeColor=#ffffff;":Qa[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=b(v.style,e,u,v);+break;case "AndroidTabs":var cc=parseInt(e.Tabs),Gb=r;0<cc&&(Gb/=cc);var Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,p),"strokeColor=none;fillColor=none;"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=a(e["Tab_"+l],G),0<l&&(Qa[l]=new mxCell("",new mxGeometry(l*Gb-2,.2*p,4,.6*p),"shape=line;direction=north;"),Qa[l].vertex=!0,v.insert(Qa[l]),Qa[l].style="Dark"==e.Scheme?Qa[l].style+"strokeColor=#484848;":Qa[l].style+"strokeColor=#CCCCCC;");var Qe=+new mxCell("",new mxGeometry(e.Selected*Gb+2,p-3,Gb-4,3),"strokeColor=none;fillColor=#33B5E5;");Qe.vertex=!0;v.insert(Qe);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=b(v.style,e,u,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*p),Math.round(r),Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;var zd=new mxCell("",new mxGeometry(0,+0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;fillColor=#33B5E5;");zd.vertex=!0;v.insert(zd);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=b(v.style,e,u,v);break;case "AndroidImageBlock":v.style="Dark"==e.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";v.style+=b(v.style,e,+u,v);break;case "AndroidTextBlock":v.style="Dark"==e.Scheme?e.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":e.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=m(e.Label);v.style+=a(e.Label,G);v.style+=b(v.style,e,u,v,G);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(e.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";+break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(e.HighlightShow){var Ac=null;Ac=e.HighlightTop?new mxCell("",new mxGeometry(0,0,r,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,p-2,r,2),"strokeColor=none;");Ac.vertex=!0;v.insert(Ac);switch(e.HighlightColor){case "Blue":Ac.style+="fillColor=#33B5E5;";break;case "Dark Gray":Ac.style+="fillColor=#B0B0B0;";break;case "White":Ac.style+="fillColor=#ffffff;"}}if(e.VlignShow){var id=new mxCell("",+new mxGeometry(20,5,2,p-10),"shape=line;direction=north;");id.vertex=!0;v.insert(id);switch(e.VlignColor){case "Blue":id.style+="strokeColor=#244C5A;";break;case "White":id.style+="strokeColor=#ffffff;"}}v.style+=b(v.style,e,u,v);break;case "AndroidButton":v.value=m(e.Label);v.style+=a(e.Label,G)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==e.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=b(v.style,e,u,v);+break;case "AndroidTextBox":v.value=m(e.Label);v.style+=a(e.Label,G);var Ad=new mxCell("",new mxGeometry(2,p-6,r-4,4),"shape=partialRectangle;top=0;fillColor=none;");Ad.vertex=!0;v.insert(Ad);v.style="Dark"==e.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Ad.style=e.TextFocused?Ad.style+"strokeColor=#33B5E5;":Ad.style+"strokeColor=#A9A9A9;";v.style+=b(v.style,e,u,v);break;case "AndroidRadioButton":var Pc=null;e.Checked&&(Pc=new mxCell("",new mxGeometry(.15*+r,.15*p,.7*r,.7*p),"ellipse;fillColor=#33B5E5;strokeWidth=1;"),Pc.vertex=!0,v.insert(Pc));"Dark"==e.Scheme?(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;strokeColor=#272727;",e.Checked?(Pc.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;fillColor=#ffffff;strokeColor=#5C5C5C;",e.Checked&&(Pc.style+="strokeColor=#999999;"));v.style+=b(v.style,e,u,v);break;case "AndroidCheckBox":var ie=+null;e.Checked&&(ie=new mxCell("",new mxGeometry(.25*r,.05*-p,r,.8*p),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),ie.vertex=!0,v.insert(ie));v.style="Dark"==e.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=b(v.style,e,u,v);break;case "AndroidToggle":v.style="Dark"==e.Scheme?e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":+e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=b(v.style,e,u,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";v.style+=b(v.style,e,u,v);break;case "iOSSegmentedControl":cc=parseInt(e.Tabs);Gb=r;v.style+="strokeColor=none;fillColor=none;";0<cc&&(Gb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,p),+"strokeColor="+e.FillColor+";"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=a(e["Tab_"+l],G),Ta[l].style=e.Selected==l?Ta[l].style+ca(e,u):Ta[l].style+"fillColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";v.style+=b(v.style,e,u,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*p),Math.round(r),+Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;zd=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;"+ca(e,u));zd.vertex=!0;v.insert(zd);v.style+=b(v.style,e,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=b(v.style,e,u,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var Da=new mxCell(m(e.Text),+new mxGeometry(.35*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.Text,G);var Cb=new mxCell(m(e.Carrier),new mxGeometry(.09*r,0,.2*r,p),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.style+=a(e.Carrier,G);v.style+=b(v.style,e,u,v);break;case "iOSSearchBar":v.value=m(e.Search);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v,G)+a(e.Search,G);var Ja=new mxCell("",new mxGeometry(.3*r,.3*p,.4*p,.4*p),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");+Ja.vertex=!0;v.insert(Ja);break;case "iOSNavBar":v.value=m(e.Title);v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;"+a(e.Title,G);v.style+=b(v.style,e,u,v,G);Da=new mxCell(m(e.LeftText),new mxGeometry(.03*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.LeftText,G);Cb=new mxCell(m(e.RightText),new mxGeometry(.65*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.style+=a(e.RightText,G);Ja=new mxCell("",new mxGeometry(.02*+r,.2*p,.3*p,.5*p),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Ja.vertex=!0;v.insert(Ja);break;case "iOSTabs":cc=parseInt(e.Tabs);Gb=r;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=b(v.style,e,u,v);0<cc&&(Gb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,p),"strokeColor=none;"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=G?"overflow=block;blockSpacing=1;html=1;fontSize=13;"++lb:f(e["Tab_"+l])+k(e["Tab_"+l])+q(e["Tab_"+l])+t(e["Tab_"+l])+C(e["Tab_"+l])+I(e["Tab_"+l])+M(e["Tab_"+l])+K(e["Tab_"+l])+Q(e["Tab_"+l])+S(e["Tab_"+l]),Ta[l].style+="verticalAlign=bottom;",Ta[l].style=e.Selected==l?Ta[l].style+"fillColor=#BBBBBB;":Ta[l].style+"fillColor=none;";break;case "iOSDatePicker":var dc=new mxCell("",new mxGeometry(0,0,.5*r,.2*p),"strokeColor=none;fillColor=none;");dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);var ec=new mxCell("",new mxGeometry(.5*+r,0,.15*r,.2*p),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=m(e.Option21);ec.style+=a(e.Option21,G);var fc=new mxCell("",new mxGeometry(.65*r,0,.15*r,.2*p),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);var gc=new mxCell("",new mxGeometry(0,.2*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=m(e.Option12);gc.style+=a(e.Option12,G);var hc=new mxCell("",new mxGeometry(.5*r,.2*+p,.15*r,.2*p),"strokeColor=none;fillColor=none;");hc.vertex=!0;v.insert(hc);hc.value=m(e.Option22);hc.style+=a(e.Option22,G);var ic=new mxCell("",new mxGeometry(.65*r,.2*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);var qb=new mxCell("",new mxGeometry(0,.4*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");qb.vertex=!0;v.insert(qb);qb.value=m(e.Option13);qb.style+=a(e.Option13,G);var rb=new mxCell("",new mxGeometry(.5*r,+.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option23);rb.style+=a(e.Option23,G);var jc=new mxCell("",new mxGeometry(.65*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=m(e.Option33);jc.style+=a(e.Option33,G);var sb=new mxCell("",new mxGeometry(.8*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option43);sb.style+=a(e.Option43,G);var tb=new mxCell("",new mxGeometry(0,+.6*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option14);tb.style+=a(e.Option14,G);var kc=new mxCell("",new mxGeometry(.5*r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");kc.vertex=!0;v.insert(kc);kc.value=m(e.Option24);kc.style+=a(e.Option24,G);var lc=new mxCell("",new mxGeometry(.65*r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");lc.vertex=!0;v.insert(lc);lc.value=m(e.Option34);lc.style+=a(e.Option34,G);var mc=new mxCell("",new mxGeometry(.8*+r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");mc.vertex=!0;v.insert(mc);mc.value=m(e.Option44);mc.style+=a(e.Option44,G);var ub=new mxCell("",new mxGeometry(0,.8*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option15);ub.style+=a(e.Option15,G);var nc=new mxCell("",new mxGeometry(.5*r,.8*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");nc.vertex=!0;v.insert(nc);nc.value=m(e.Option25);nc.style+=a(e.Option25,G);var oc=new mxCell("",new mxGeometry(.65*+r,.8*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);zb=new mxCell("",new mxGeometry(0,.4*p-2,r,4),"shape=line;strokeColor=#888888;");zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(0,.6*p-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSTimePicker":dc=new mxCell("",new mxGeometry(0,0,.25*r,.2*p),"strokeColor=none;fillColor=none;");+dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);ec=new mxCell("",new mxGeometry(.25*r,0,.3*r,.2*p),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=m(e.Option21);ec.style+=a(e.Option21,G);gc=new mxCell("",new mxGeometry(0,.2*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=m(e.Option12);gc.style+=a(e.Option12,G);hc=new mxCell("",new mxGeometry(.25*r,.2*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");hc.vertex=!0;+v.insert(hc);hc.value=m(e.Option22);hc.style+=a(e.Option22,G);qb=new mxCell("",new mxGeometry(0,.4*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");qb.vertex=!0;v.insert(qb);qb.value=m(e.Option13);qb.style+=a(e.Option13,G);rb=new mxCell("",new mxGeometry(.25*r,.4*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option23);rb.style+=a(e.Option23,G);sb=new mxCell("",new mxGeometry(.7*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);+sb.value=m(e.Option33);sb.style+=a(e.Option33,G);tb=new mxCell("",new mxGeometry(0,.6*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option14);tb.style+=a(e.Option14,G);kc=new mxCell("",new mxGeometry(.25*r,.6*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");kc.vertex=!0;v.insert(kc);kc.value=m(e.Option24);kc.style+=a(e.Option24,G);mc=new mxCell("",new mxGeometry(.7*r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");mc.vertex=!0;v.insert(mc);mc.value=+m(e.Option34);mc.style+=a(e.Option34,G);ub=new mxCell("",new mxGeometry(0,.8*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option15);ub.style+=a(e.Option15,G);nc=new mxCell("",new mxGeometry(.25*r,.8*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");nc.vertex=!0;v.insert(nc);nc.value=m(e.Option25);nc.style+=a(e.Option25,G);zb=new mxCell("",new mxGeometry(0,.4*p-2,r,4),"shape=line;strokeColor=#888888;");zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(0,+.6*p-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSCountdownPicker":fc=new mxCell("",new mxGeometry(.45*r,0,.2*r,.2*p),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);ic=new mxCell("",new mxGeometry(.45*r,.2*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);qb=new mxCell("",+new mxGeometry(0,.4*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");qb.vertex=!0;v.insert(qb);qb.value=m(e.Option13);qb.style+=a(e.Option13,G);rb=new mxCell("",new mxGeometry(.2*r,.4*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option23);rb.style+=a(e.Option23,G);jc=new mxCell("",new mxGeometry(.45*r,.4*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=m(e.Option33);jc.style+=a(e.Option33,G);sb=new mxCell("",new mxGeometry(.6*+r,.4*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option43);sb.style+=a(e.Option43,G);tb=new mxCell("",new mxGeometry(0,.6*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option14);tb.style+=a(e.Option14,G);lc=new mxCell("",new mxGeometry(.45*r,.6*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");lc.vertex=!0;v.insert(lc);lc.value=m(e.Option34);lc.style+=a(e.Option34,G);ub=new mxCell("",new mxGeometry(0,.8*p,.25*r,+.2*p),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option15);ub.style+=a(e.Option15,G);oc=new mxCell("",new mxGeometry(.45*r,.8*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);zb=new mxCell("",new mxGeometry(0,.4*p-2,r,4),"shape=line;strokeColor=#888888;");zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(0,.6*p-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);v.style+=+"strokeColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSBasicCell":v.value=m(e.text);v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.75*e.SeparatorInset+";";v.style+=(G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text))+H(e.text);v.style+=b(v.style,e,u,v,G);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=+!0;v.insert(Ja);break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);var $a=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=+!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+q(e.subtext)+t(e.subtext);v.style+=b(v.style,e,u,v,G);+var cb=new mxCell("",new mxGeometry(0,.4*p,r,.6*p),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.75*e.SeparatorInset+";");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+q(e.text)+t(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=+new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",+new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+q(e.subtext)+t(e.subtext);v.style+=b(v.style,e,u,v,G);cb=null;switch(e.AccessoryIndicatorType){case "Disclosure":Ja=+new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);cb=new mxCell("",new mxGeometry(.55*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");+$a.vertex=!0;v.insert($a);cb=new mxCell("",new mxGeometry(.45*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);cb=new mxCell("",new mxGeometry(.52*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;");+Ja.vertex=!0;v.insert(Ja);cb=new mxCell("",new mxGeometry(.55*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:cb=new mxCell("",new mxGeometry(.65*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;")}cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+q(e.text)+t(e.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=+b(v.style,e,u,v);var Ub=new mxCell("",new mxGeometry(0,0,.25*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ub.vertex=!0;v.insert(Ub);Ub.value=m(e.subtext);Ub.style+=G?"html=1;fontSize=13;"+lb:f(e.subtext)+k(e.subtext)+q(e.subtext)+t(e.subtext);cb=new mxCell("",new mxGeometry(.25*r,0,.5*r,p),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"++lb:f(e.text)+k(e.text)+q(e.text)+t(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");+$a.vertex=!0;v.insert($a);break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";+Da=new mxCell("",new mxGeometry(0,0,r,.4*p),"fillColor=none;strokeColor=none;spacing=10;align=left;");Da.vertex=!0;v.insert(Da);Da.value=m(e.text);Da.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+q(e.text)+t(e.text);Cb=new mxCell("",new mxGeometry(0,.6*p,r,.4*p),"fillColor=none;strokeColor=none;spacing=10;align=left;");Cb.vertex=!0;v.insert(Cb);Cb.value=m(e["bottom-text"]);Cb.style+=G?"html=1;fontSize=13;"+lb:f(e["bottom-text"])+k(e["bottom-text"])+q(e["bottom-text"])+t(e["bottom-text"]);+break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=m(e.text);v.style+=G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text);v.style+=b(v.style,e,u,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var x=new mxCell("",new mxGeometry(0,0,.9*r,.9*p),"rounded=1;arcSize=3;part=1;");x.vertex=!0;v.insert(x);x.style+=J(e,u)+ca(e,u)+O(e,u,x)+W(e)+sa(e);var E=new mxCell("",new mxGeometry(.1*r,.1*p,.9*r,.9*+p),"rounded=1;arcSize=3;part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=J(e,u)+ca(e,u)+O(e,u,E)+W(e)+sa(e)+a(e,G);e.Future&&(x.style+="dashed=1;fixDash=1;",E.style+="dashed=1;fixDash=1;")}else v.style+="rounded=1;arcSize=3;",e.Future&&(v.style+="dashed=1;fixDash=1;"),v.value=m(e.Text),v.style+=J(e,u)+ca(e,u)+O(e,u,v)+W(e)+sa(e)+a(e,G);v.style+=b(v.style,e,u,v,G);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":x=+null;switch(w.Class){case "SMHome":x=new mxCell("",new mxGeometry(.5*r-.4*p,.1*p,.8*p,.8*p),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMPrint":x=new mxCell("",new mxGeometry(.5*r-.4*p,.19*p,.8*p,.62*p),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":x=new mxCell("",new mxGeometry(.5*r-.4*p,.1*p,.8*p,.8*p),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");+break;case "SMSettings":x=new mxCell("",new mxGeometry(.5*r-.35*p,.15*p,.7*p,.7*p),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSitemap":x=new mxCell("",new mxGeometry(.5*r-.35*p,.2*p,.7*p,.6*p),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":x=new mxCell("",new mxGeometry(.5*r-.3*p,.25*p,.6*p,.5*p),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;");+break;case "SMVideo":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMAudio":x=new mxCell("",new mxGeometry(.5*r-.3*p,.2*p,.6*p,.6*p),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":x=new mxCell("",new mxGeometry(.5*r-.4*p,.15*p,.8*p,.7*p),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");+break;case "SMChart":var Y=ca(e,u);Y=""==Y?"#ffffff;":Y.replace("fillColor=","");x=new mxCell("",new mxGeometry(.5*r-.35*p,.15*p,.7*p,.7*p),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+Y);break;case "SMCloud":x=new mxCell("",new mxGeometry(.5*r-.4*p,.27*p,.8*p,.46*p),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":x=new mxCell("",new mxGeometry(.5*r-.25*p,.15*p,.5*p,.7*p),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");+break;case "SMForm":x=new mxCell("",new mxGeometry(.5*r-.4*p,.15*p,.8*p,.7*p),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMGame":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}x.vertex=+!0;v.insert(x);x.value=m(e.Text);x.style+=a(e,G);v.style+=b(v.style,e,u,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.9*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(0,.1*p,.9*r,.9*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,u,E,G);break;case "UMLConstraintBlock":var Bc=new mxCell("",new mxGeometry(0,0,.25*p,p),"shape=curlyBracket;rounded=1;");+Bc.vertex=!0;v.insert(Bc);var Cc=new mxCell("",new mxGeometry(r-.25*p,0,.25*p,p),"shape=curlyBracket;rounded=1;flipH=1;");Cc.vertex=!0;v.insert(Cc);na=new mxCell("",new mxGeometry(.25*p,0,r-.5*p,p),"strokeColor=none;fillColor=none;");na.vertex=!0;na.value=m(e);v.insert(na);v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Bc.style+=O(e,u,Bc);Cc.style+=O(e,u,Cc);na.style+=q(e,na);Bc.style+=b(Bc.style,e,u,Bc);Cc.style+=b(Cc.style,e,u,Cc);na.style+=b(na.style,e,u,na,G);break;case "UMLTextBlock":v.value=+m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=b(v.style,e,u,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":mb=ba(e,u,v);e.Rotatio=null;var Vb=b(v.style,e,u,v,G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+mb;var Td=.8*r,Ff=r-Td,Qc=new mxCell("",new mxGeometry(.2,0,Td,p),"shape=ellipse;"+Vb);Qc.vertex=!0;Qc.geometry.relative=!0;v.insert(Qc);Qa=new mxCell("",new mxGeometry(0,+.5,Ff,1),"line;"+Vb);Qa.geometry.relative=!0;Qa.vertex=!0;v.insert(Qa);break;case "UMLComponentBoxBlock":case "UMLComponentBoxBlockV2":v.value=m(e);v.style="html=1;dropTarget=0;"+b(v.style,e,u,v,G);var nb=new mxCell("",new mxGeometry(1,0,15,15),"shape=component;jettyWidth=8;jettyHeight=4;");nb.geometry.relative=!0;nb.geometry.offset=new mxPoint(-20,5);nb.vertex=!0;v.insert(nb);break;case "UMLAssemblyConnectorBlock":case "UMLAssemblyConnectorBlockV2":mb=ba(e,u,v);e.Rotatio=null;Vb=b(v.style,e,u,v,+G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+mb;var Re=.225*r,Se=.1*r;Td=r-Re-Se;Qc=new mxCell("",new mxGeometry(.225,0,Td,p),"shape=providedRequiredInterface;verticalLabelPosition=bottom;"+Vb);Qc.vertex=!0;Qc.geometry.relative=!0;v.insert(Qc);zb=new mxCell("",new mxGeometry(0,.5,Re,1),"line;"+Vb);zb.geometry.relative=!0;zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(.9,.5,Se,1),"line;"+Vb);Ab.geometry.relative=+!0;Ab.vertex=!0;v.insert(Ab);break;case "BPMNActivity":v.value=m(e.Text);switch(e.bpmnActivityType){case 1:v.style+=a(e.Text,G);break;case 2:v.style+="shape=ext;double=1;"+a(e.Text,G);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 5;"+a(e.Text,G);break;case 4:v.style+="shape=ext;strokeWidth=2;"+a(e.Text,G)}if(0!=e.bpmnTaskType){switch(e.bpmnTaskType){case 1:x=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");x.geometry.offset=new mxPoint(4,7);break;case 2:x=new mxCell("",new mxGeometry(0,+0,19,12),"shape=message;");x.geometry.offset=new mxPoint(4,7);break;case 3:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");x.geometry.offset=new mxPoint(4,5);break;case 4:x=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");x.geometry.offset=new mxPoint(4,7);break;case 5:x=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");x.geometry.offset=new mxPoint(4,7);break;case 6:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");+x.geometry.offset=new mxPoint(4,5);break;case 7:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),x.geometry.offset=new mxPoint(4,5)}if(1==e.bpmnTaskType){var Rc=ca(e,u);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");Rc=Rc.replace("fillColor","strokeColor");""==Y&&(Y="fillColor=#000000;");""==Rc&&(Rc="strokeColor=#ffffff;");x.style+=Rc+Y+"part=1;"}else x.style+=ca(e,u)+J(e,u)+"part=1;";x.geometry.relative=!0;x.vertex=!0;v.insert(x)}var Bd=0;0!=e.bpmnActivityMarker1&&Bd++;+0!=e.bpmnActivityMarker2&&Bd++;var Db=0;1==Bd?Db=-7.5:2==Bd&&(Db=-19);if(0!=e.bpmnActivityMarker1){switch(e.bpmnActivityMarker1){case 1:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 2:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 3:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");+x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Db,-17);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");x.style+=Y;break;case 6:x=new mxCell("",+new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Db,-18),x.style+=ca(e,u)+J(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}2==Bd&&(Db=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 2:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");x.geometry.offset=new mxPoint(Db,+-20);x.style+=ca(e,u)+J(e,u);break;case 3:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Db,-17);+Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");x.style+=Y;break;case 6:x=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Db,-18),x.style+=ca(e,u)+J(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}v.style+=b(v.style,e,u,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);if(1==e.bpmnDashed)switch(e.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break;case 2:v.style+="outline=end;"}else switch(e.bpmnEventGroup){case 0:v.style+="outline=standard;";break;case 1:v.style+="outline=throwing;";break;case 2:v.style+="outline=end;"}switch(e.bpmnEventType){case 1:v.style+="symbol=message;";break;case 2:v.style+="symbol=timer;";break;case 3:v.style+="symbol=escalation;";break;case 4:v.style+="symbol=conditional;";break;case 5:v.style+="symbol=link;";break;case 6:v.style+="symbol=error;";-break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=b(v.style,e,t,v,G);break;case "BPMNChoreography":try{var ia=S(e.FillColor),je=Rd(ia,.75),Jc=f(e.Name).match(/\d+/),db=Math.max(mxUtils.getSizeForString(e.Name.t,Jc?Jc[0]:"13",null,r-10).height,24);ia="swimlaneFillColor="+je+";";v.value=-m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ia+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Name,G);v.style+=b(v.style,e,t,v,G);var Wb=db;Jc=f(e.TaskName).match(/\d+/);var pc=e.TaskHeight?.75*e.TaskHeight:Math.max(mxUtils.getSizeForString(e.TaskName.t,Jc?Jc[0]:"13",null,r-10).height+15,24),Dc=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");-Dc.value=m(e.TaskName);Dc.vertex=!0;v.insert(Dc);Dc.style+=a(e.TaskName,G);Dc.style+=b(Dc.style,e,t,Dc,G);Wb+=pc;X=[];for(l=0;l<e.Fields;l++){var Ud=e["Participant"+(l+1)];Jc=f(Ud).match(/\d+/);pc=Math.max(mxUtils.getSizeForString(Ud.t,Jc?Jc[0]:"13",null,r-10).height,24);X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;fillColor=none;spacingTop=-1;spacingLeft=3;spacingRight=3;");Wb+=pc;X[l].vertex=!0;v.insert(X[l]);X[l].style+=a(Ud,G);X[l].style+=b(X[l].style,e,t,X[l],G);-X[l].value=m(Ud)}}catch(gb){console.log(gb)}break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=m(e.Text);v.style=0==e.bpmnConversationType?v.style+sa(e):v.style+"strokeWidth=2;";e.bpmnIsSubConversation&&(w=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),w.geometry.offset=new mxPoint(-6,-17),w.style+=ca(e,t)+I(e,t),w.geometry.relative=!0,w.vertex=!0,v.insert(w));v.style+=b(v.style,e,t,v,G);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;verticalLabelPosition=bottom;verticalAlign=top;";-switch(e.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=b(v.style,e,t,v);-v.value=m(e.Text);v.style+=a(e,G);break;case "BPMNData":v.style+="shape=note;size=14;";switch(e.bpmnDataType){case 0:v.value=m(e.Text);e.Text&&!e.Text.t&&(e.Text.t=" ");break;case 1:w=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");w.geometry.offset=new mxPoint(-6,-15);w.style+=ca(e,t)+I(e,t);w.geometry.relative=!0;w.vertex=!0;v.insert(w);break;case 2:w=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");w.geometry.offset=new mxPoint(3,-3);w.style+=ca(e,t)+I(e,t);w.geometry.relative=!0;w.vertex=!0;v.insert(w);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;");Da.geometry.offset=new mxPoint(0,14);Da.geometry.relative=!0;Da.vertex=!0;v.insert(Da);Da.value=m(e.Text);Da.style+=a(e,G);break;case 3:w=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),w.geometry.offset=new mxPoint(3,3),w.style+=I(e,t),w.geometry.relative=-!0,w.vertex=!0,v.insert(w),Y=I(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),w.style+=Y,Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;"),Da.geometry.offset=new mxPoint(0,14),Da.geometry.relative=!0,Da.vertex=!0,v.insert(Da),Da.value=m(e.Text),Da.style+=a(e,G)}v.style+=b(v.style,e,t,v);break;case "BPMNBlackPool":v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,r,q),"fillColor=#000000;strokeColor=none;opacity=30;");-w.vertex=!0;v.insert(w);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=new mxCell("",new mxGeometry(0,0,.95*r,.95*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.05*r,.05*q,.95*r,.95*q),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,t,E,G);break;case "GSDFDDataStoreBlock":v.value=m(e.Text);v.style+="shape=partialRectangle;right=0;"+a(e.Text,G);-v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,.2*r,q),"part=1;");w.vertex=!0;v.insert(w);w.value=m(e.Number);w.style+=a(e.Number,G);w.style+=b(w.style,e,t,w,G);break;case "OrgBlock":var Te="";for(Ga in e.Active)"Photo"!=Ga&&e.Active[Ga]&&(Te+=m(e[Ga],!0));if(e.Active.Photo){var ke=.4*r;v.style+="spacingLeft="+ke+";imageWidth="+(ke-4)+";imageHeight="+(ke-4)+";imageAlign=left;imageVerticalAlign=top;image="+g(e.Photo)}v.value=Te;v.style+=b(v.style,e,t,v,!0);break;case "DefaultTableBlock":try{Fb=-e.RowHeights.length;Rb=e.ColWidths.length;var Vd=[],Cd=[];for(l=0;l<Fb;l++)Vd[l]=.75*e.RowHeights[l];for(fa=0;fa<Rb;fa++)Cd[fa]=.75*e.ColWidths[fa];v.style="group;dropTarget=0;pointerEvents=0;";var le=e.BandedColor1,me=e.BandedColor2,Gf=e.BandedRows,Ue=e.BandedCols,Wd=e.HideH,Hf=e.HideV,Ve=e.TextVAlign,We=e.FillColor,Xe=e.StrokeStyle;delete e.StrokeStyle;var If=ka(We,"fillOpacity"),Ye=e.LineColor,Jf=ka(Ye,"strokeOpacity");aa=0;var Dd={};for(l=0;l<Fb;l++){Z=0;q=Vd[l];for(fa=0;fa<Rb;fa++){var Lb=l++break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=b(v.style,e,u,v,G);break;case "BPMNChoreography":try{var ia=T(e.FillColor),je=Rd(ia,.75),Jc=f(e.Name).match(/\d+/),db=Math.max(mxUtils.getSizeForString(e.Name.t,Jc?Jc[0]:"13",null,r-10).height,24);ia="swimlaneFillColor="+je+";";v.value=+m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ia+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);var Wb=db;Jc=f(e.TaskName).match(/\d+/);var pc=e.TaskHeight?.75*e.TaskHeight:Math.max(mxUtils.getSizeForString(e.TaskName.t,Jc?Jc[0]:"13",null,r-10).height+15,24),Dc=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");+Dc.value=m(e.TaskName);Dc.vertex=!0;v.insert(Dc);Dc.style+=a(e.TaskName,G);Dc.style+=b(Dc.style,e,u,Dc,G);Wb+=pc;X=[];for(l=0;l<e.Fields;l++){var Ud=e["Participant"+(l+1)];Jc=f(Ud).match(/\d+/);pc=Math.max(mxUtils.getSizeForString(Ud.t,Jc?Jc[0]:"13",null,r-10).height,24);X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;fillColor=none;spacingTop=-1;spacingLeft=3;spacingRight=3;");Wb+=pc;X[l].vertex=!0;v.insert(X[l]);X[l].style+=a(Ud,G);X[l].style+=b(X[l].style,e,u,X[l],G);+X[l].value=m(Ud)}}catch(gb){console.log(gb)}break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=m(e.Text);v.style=0==e.bpmnConversationType?v.style+sa(e):v.style+"strokeWidth=2;";e.bpmnIsSubConversation&&(x=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),x.geometry.offset=new mxPoint(-6,-17),x.style+=ca(e,u)+J(e,u),x.geometry.relative=!0,x.vertex=!0,v.insert(x));v.style+=b(v.style,e,u,v,G);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;verticalLabelPosition=bottom;verticalAlign=top;";+switch(e.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=b(v.style,e,u,v);+v.value=m(e.Text);v.style+=a(e,G);break;case "BPMNData":v.style+="shape=note;size=14;";switch(e.bpmnDataType){case 0:v.value=m(e.Text);e.Text&&!e.Text.t&&(e.Text.t=" ");break;case 1:x=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(-6,-15);x.style+=ca(e,u)+J(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);break;case 2:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");x.geometry.offset=new mxPoint(3,+3);x.style+=ca(e,u)+J(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;");Da.geometry.offset=new mxPoint(0,14);Da.geometry.relative=!0;Da.vertex=!0;v.insert(Da);Da.value=m(e.Text);Da.style+=a(e,G);break;case 3:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),x.geometry.offset=new mxPoint(3,3),x.style+=J(e,u),x.geometry.relative=+!0,x.vertex=!0,v.insert(x),Y=J(e,u),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),x.style+=Y,Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;"),Da.geometry.offset=new mxPoint(0,14),Da.geometry.relative=!0,Da.vertex=!0,v.insert(Da),Da.value=m(e.Text),Da.style+=a(e,G)}v.style+=b(v.style,e,u,v);break;case "BPMNBlackPool":v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,p),"fillColor=#000000;strokeColor=none;opacity=30;");+x.vertex=!0;v.insert(x);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,.95*r,.95*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.05*p,.95*r,.95*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,u,E,G);break;case "GSDFDDataStoreBlock":v.value=m(e.Text);v.style+="shape=partialRectangle;right=0;"+a(e.Text,G);+v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,.2*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Number);x.style+=a(e.Number,G);x.style+=b(x.style,e,u,x,G);break;case "OrgBlock":var Te="";for(Ga in e.Active)"Photo"!=Ga&&e.Active[Ga]&&(Te+=m(e[Ga],!0));if(e.Active.Photo){var ke=.4*r;v.style+="spacingLeft="+ke+";imageWidth="+(ke-4)+";imageHeight="+(ke-4)+";imageAlign=left;imageVerticalAlign=top;image="+g(e.Photo)}v.value=Te;v.style+=b(v.style,e,u,v,!0);break;case "DefaultTableBlock":try{Fb=+e.RowHeights.length;Rb=e.ColWidths.length;var Vd=[],Cd=[];for(l=0;l<Fb;l++)Vd[l]=.75*e.RowHeights[l];for(fa=0;fa<Rb;fa++)Cd[fa]=.75*e.ColWidths[fa];v.style="group;dropTarget=0;pointerEvents=0;";var le=e.BandedColor1,me=e.BandedColor2,Gf=e.BandedRows,Ue=e.BandedCols,Wd=e.HideH,Hf=e.HideV,Ve=e.TextVAlign,We=e.FillColor,Xe=e.StrokeStyle;delete e.StrokeStyle;var If=ka(We,"fillOpacity"),Ye=e.LineColor,Jf=ka(Ye,"strokeOpacity");aa=0;var Dd={};for(l=0;l<Fb;l++){Z=0;p=Vd[l];for(fa=0;fa<Rb;fa++){var Lb=l+","+fa;if(Dd[Lb])Z+=Cd[fa];else{var kb=e["CellFill_"+Lb],ne=e["NoBand_"+Lb],Xd=e["CellSize_"+Lb],qc=e["Cell_"+Lb],Ze=e["Cell_"+Lb+"_VAlign"],Kf=e["Cell_"+Lb+"_TRotation"],Lf=e["CellBorderWidthH_"+Lb],Mf=e["CellBorderColorH_"+Lb],Nf=e["CellBorderStrokeStyleH_"+Lb],Of=e["CellBorderWidthV_"+Lb],Pf=e["CellBorderColorV_"+Lb],Qf=e["CellBorderStrokeStyleV_"+Lb],$e=Wd?Pf:Mf,af=ka($e,"strokeOpacity"),bf=Wd?Of:Lf,Sc=Wd?Qf:Nf;kb=Gf&&!ne?0==l%2?le:Ue&&!ne?0==fa%2?le:me:me:Ue&&!ne?0==fa%2?le:me:kb;var Rf=ka(kb,-"fillOpacity")||If;r=Cd[fa];var cf=q;Yc=r;for(var Mb=l+1;Mb<l+Xd.h;Mb++)if(null!=Vd[Mb]){cf+=Vd[Mb];Dd[Mb+","+fa]=!0;for(var Tc=fa+1;Tc<fa+Xd.w;Tc++)Dd[Mb+","+Tc]=!0}for(Mb=fa+1;Mb<fa+Xd.w;Mb++)if(null!=Cd[Mb])for(Yc+=Cd[Mb],Dd[l+","+Mb]=!0,Tc=l+1;Tc<l+Xd.h;Tc++)Dd[Tc+","+Mb]=!0;var oa=new mxCell("",new mxGeometry(Z,aa,Yc,cf),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Hf?"left=0;right=0;":"")+(Wd?"top=0;bottom=0;":"")+ca({FillColor:kb||We})+Zb(mxConstants.STYLE_STROKECOLOR,S($e),-S(Ye))+(null!=bf?Zb(mxConstants.STYLE_STROKEWIDTH,Math.round(.75*parseFloat(bf)),"1"):"")+(af?af:Jf)+Rf+"verticalAlign="+(Ze?Ze:Ve?Ve:"middle")+";"+qa({StrokeStyle:Sc?Sc:Xe?Xe:"solid"})+(Kf?"horizontal=0;":""));oa.vertex=!0;oa.value=m(qc);oa.style+=b(oa.style,e,t,oa,G)+(G?"fontSize=13;":f(qc)+p(qc)+x(qc)+C(qc,oa)+J(qc)+M(qc)+L(qc)+Q(qc))+U(qc)+H(qc);v.insert(oa);Z+=r}}aa+=q}}catch(gb){console.log(gb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";-"VSMDedicatedProcessBlock"==u.Class?v.value=m(e.Text):"VSMProductionControlBlock"==u.Class&&(v.value=m(e.Resources));v.style+=b(v.style,e,t,v,G);"VSMDedicatedProcessBlock"==u.Class&&(w=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(4,-13),w.vertex=!0,v.insert(w),w.style+=b(w.style,e,t,w));Da=new mxCell("",new mxGeometry(0,0,r,15),"strokeColor=none;fillColor=none;part=1;");Da.vertex=!0;v.insert(Da);Da.value=-m(e.Title);Da.style+=a(e.Title,G);e.Text=null;break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);Da=new mxCell("",new mxGeometry(.1*r,.3*q,.8*r,.6*q),"part=1;");Da.vertex=!0;v.insert(Da);Da.value=m(e.Resource);Da.style+=a(e.Resource,G);Da.style+=b(Da.style,e,t,Da,G);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";-v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);Bb=q;bc=parseInt(e.Cells);ia=b("part=1;",e,t,v);0<bc&&(Bb/=bc);X=[];Qa=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),ia),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["cell_"+l]),X[l].style+=a(e["cell_"+l],G);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);Bb=q;bc=parseInt(e.Cells);ia=b("part=1;fillColor=none;",e,t,v);0<bc&&(Bb/=bc);X=[];Ub=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Bb,.5*r,Bb),"shape=partialRectangle;left=0;"+ia),X[l].vertex=!0,v.insert(X[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),"strokeColor=none;fillColor=none;part=1;"),Ub[l].vertex=!0,v.insert(Ub[l]),Ub[l].value=-m(e["cell_"+l]),Ub[l].style+=a(e["cell_"+l],G);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=b(v.style,e,t,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.17*r,.2*q,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");w.vertex=!0;v.insert(w);-w.style+=b(w.style,e,t,w);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ia="shape=card;size=18;flipH=1;part=1;";w=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.05*r,.1*q,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);E.vertex=!0;v.insert(E);E.style+=b(E.style,-e,t,E);var T=new mxCell("",new mxGeometry(0,.2*q,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ia);T.vertex=!0;v.insert(T);T.value=m(e.Text);T.style+=b(T.style,e,t,T,G);break;case "VSMElectronicInformationArrow":v.style="group;";v.value=m(e.Title);v.style+=a(e.Title,G);var va=new mxCell("",new mxGeometry(0,0,r,q),"shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;entryX=0;entryY=1;exitX=1;exitY=0;");va.edge=!0;va.geometry.relative=-1;D.addCell(va,v,null,v,v);break;case "AWSRoundedRectangleContainerBlock2":case "AWSRoundedRectangleContainerBlock":v.style+="strokeColor=none;fillColor=none;";e.Spotfleet?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,35,40),-"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Beanstalk?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),-E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.EC2?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),E.geometry.relative=-!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Subnet?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=-new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.VPC?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,-0),E.vertex=!0,v.insert(E)):e.AWS?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):-e.Corporate?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):-(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.value=m(e.Title),v.style+=b(v.style,e,t,v,G));break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,t,v,G);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;";-v.value=m(e.Title);v.style+=b(v.style,e,t,v,G);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,t,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";oa=new mxCell("",new mxGeometry(.25*r,.25*q,.5*r,.5*q),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");oa.vertex=!0;v.insert(oa);var Oa=[oa];oa.style+=ca(e,t);va=new mxCell("",new mxGeometry(0,-0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;sc(.5*r,0,va,F,D,Oa,v,oa);sc(.855*r,.145*q,va,F,D,Oa,v,oa);sc(r,.5*q,va,F,D,Oa,v,oa);sc(.855*r,.855*q,va,F,D,Oa,v,oa);sc(.5*r,q,va,F,D,Oa,v,oa);sc(.145*r,.855*q,va,F,D,Oa,v,oa);sc(0,.5*q,va,F,D,Oa,v,oa);sc(.145*r,.145*q,va,F,D,Oa,v,oa);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";oa=new mxCell("",new mxGeometry(0,.5*q-10,r,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");-oa.vertex=!0;v.insert(oa);Oa=[oa];va=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;Oa=[oa];var Ed=r/e.NumTopNodes;for(l=0;l<e.NumTopNodes;l++)sc(.5*Ed+l*Ed,0,va,F,D,Oa,v,oa);Ed=r/e.NumBottomNodes;for(l=0;l<e.NumBottomNodes;l++)sc(.5*Ed+l*Ed,q,va,F,D,Oa,v,oa);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=m(e.Title);v.style+=b(v.style,e,t,v,G);-e.ToggleCharge&&(v.style+="flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);"EIMessageChannelBlock"==u.Class?(w=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(.45*-r,0)):"EIDatatypeChannelBlock"==-u.Class?(w=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(.45*-r,0)):"EIInvalidMessageChannelBlock"==u.Class?(w=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(.45*-r,0)):"EIDeadLetterChannelBlock"==u.Class?(w=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),w.geometry.offset=-new mxPoint(.45*-r,0)):"EIGuaranteedDeliveryBlock"==u.Class&&(w=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(-10,-7));w.geometry.relative=!0;w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);va=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");va.geometry.relative=!0;va.edge=!0;fb(.15*r,.25*q,.85*r,.25*q,va,F,D,Oa,v,oa);break;-case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,.07*q,.21*r,.86*q),"fillColor=#FFFF33;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.26*r,.09*q,.2*r,.82*q),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,t,E);T=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");-T.geometry.relative=!0;T.geometry.offset=new mxPoint(.4*-r,-10);T.vertex=!0;v.insert(T);T.style+=b(T.style,e,t,T);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");ea.geometry.relative=!0;ea.edge=!0;w.insertEdge(ea,!0);E.insertEdge(ea,!1);ea.style+=I(e,t);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");-da.geometry.relative=!0;da.edge=!0;E.insertEdge(da,!0);T.insertEdge(da,!1);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);var Fd=-e.Messages,oe=(q-17)/Fd;E=[];va=[];for(l=0;l<Fd;l++){var Gd=oe*(l+1)-3;E[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;");E[l].vertex=!0;v.insert(E[l]);switch(u.Class){case "EIMessageBlock":E[l].value=m(e["message_"+(l+1)]);E.style+=a(e["message_"+(l+1)],G);break;case "EICommandMessageBlock":E[l].value="C";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIDocumentMessageBlock":E[l].value="D";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIEventMessageBlock":E[l].value="E",E[l].style+=-"fontStyle=1;fontSize=13;"}E[l].style+=b(E[l].style,e,t,E[l]);va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");va[l].geometry.relative=!0;va[l].edge=!0;w.insertEdge(va[l],!1);E[l].insertEdge(va[l],!0);va[l].style+=b(va[l].style,e,t,va[l]);var Kc=[];Kc.push(new mxPoint(Z+8.5,aa+Gd+10));va[l].geometry.points=Kc;F.push(D.addCell(va[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.45*r,.25*q,.3*r,.5*q),"part=1;fillColor=#ffffff");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);va=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");va.geometry.relative=!0;va.edge=!0;fb(0,.5*q,.4*r,.5*q,va,F,D,Oa,v,oa);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);var ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");ea.geometry.relative=!0;ea.edge=!0;fb(.05*r,.5*q,.85*r,.5*q,ea,F,D,Oa,v,oa);var da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.05*r,.5*q,.85*-r,.15*q,da,F,D,Oa,v,oa);var xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");xa.geometry.relative=!0;xa.edge=!0;fb(.05*r,.5*q,.85*r,.85*q,xa,F,D,Oa,v,oa);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");-ea.geometry.relative=!0;ea.edge=!0;ea.style+=I(e,t);fb(.05*r,.5*q,.95*r,.5*q,ea,F,D,Oa,v,oa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");da.geometry.relative=!0;da.edge=!0;da.style+=I(e,t);fb(.3*r,.1*q,.3*r,.5*q,da,F,D,Oa,v,oa);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");-xa.geometry.relative=!0;xa.edge=!0;xa.style+=I(e,t);fb(.7*r,.1*q,.7*r,.5*q,xa,F,D,Oa,v,oa);var Ya=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");Ya.geometry.relative=!0;Ya.edge=!0;Ya.style+=I(e,t);fb(.5*r,.5*q,.5*r,.9*q,Ya,F,D,Oa,v,oa);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,-e,t,v,G);w=new mxCell("",new mxGeometry(.2*r,.21*q,.16*r,.24*q),"part=1;fillColor=#ffffff;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");ea.geometry.relative=!0;ea.edge=!0;fb(.45*r,.33*q,.8*r,.33*q,ea,F,D,Oa,v,oa);E=new mxCell("",new mxGeometry(.64*r,.55*q,.16*r,.24*q),"part=1;fillColor=#ffffff;");E.vertex=!0;v.insert(E);E.style+=b(E.style,-e,t,E);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.55*r,.67*q,.2*r,.67*q,da,F,D,Oa,v,oa);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.1*r,.15*q,.8*r,.7*q),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");w.vertex=!0;v.insert(w);-w.style+=b(w.style,e,t,w);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.04*r,.06*q,.18*r,.28*q),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.2*r,.56*q,.2*r,.32*q),"part=1;");E.vertex=!0;v.insert(E);E.value="A";E.style+="fontStyle=1;fontSize=13;";w.style+=b(w.style,e,t,w);ea=new mxCell("",new mxGeometry(0,-0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");ea.geometry.relative=!0;ea.edge=!0;w.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.style+=b(ea.style,e,t,ea);Kc=[];Kc.push(new mxPoint(Z+.13*r,aa+.72*q));ea.geometry.points=Kc;F.push(D.addCell(ea,null,null,null,null));T=new mxCell("",new mxGeometry(.6*r,.06*q,.18*r,.28*q),"ellipse;fillColor=#808080;part=1;");T.vertex=!0;v.insert(T);T.style+=I(e,t)+sa(e);T.style+=b(T.style,e,t,T);ta=new mxCell("",new mxGeometry(.76*-r,.56*q,.2*r,.32*q),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=I(e,t)+O(e,t,ta)+sa(e)+qa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=b(ta.style,e,t,ta);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");da.geometry.relative=!0;da.edge=!0;T.insertEdge(da,!1);ta.insertEdge(da,!0);da.style+=b(da.style,e,t,da);var df=[];df.push(new mxPoint(Z+.69*r,aa+.72*q));da.geometry.points=-df;F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");xa.geometry.relative=!0;xa.edge=!0;w.insertEdge(xa,!1);T.insertEdge(xa,!0);xa.style+=b(xa.style,e,t,xa);F.push(D.addCell(xa,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("1",new mxGeometry(.2*r,.4*q,.1*r,.19*q),-"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("2",new mxGeometry(.45*r,.4*q,.1*r,.19*q),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,t,E);T=new mxCell("3",new mxGeometry(.7*r,.4*q,.1*r,.19*q),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");T.vertex=!0;v.insert(T);T.style+=b(T.style,e,t,T);ea=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");-w.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.geometry.points=[new mxPoint(Z+.375*r,aa+.15*q)];ea.geometry.relative=!0;ea.edge=!0;ea.style+=b(ea.style,e,t,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");E.insertEdge(da,!1);T.insertEdge(da,!0);da.geometry.points=[new mxPoint(Z+.675*r,aa+.15*q)];da.geometry.relative=!0;da.edge=!0;da.style+=b(da.style,e,t,da);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=-"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.3*r,.2*q,.4*r,.6*q),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.38*r,.42*q,.24*r,.16*q),"part=1;fillColor=#aefe7d;");-w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*q),"part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,t,E);T=new mxCell("",new mxGeometry(.76*r,.23*q,.24*r,.16*q),"");T.vertex=!0;v.insert(T);T.style=E.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*q,.24*r,.16*q),"");ta.vertex=!0;v.insert(ta);ta.style=E.style;var Yd=new mxCell("",new mxGeometry(.38*r,.84*q,.24*r,.16*q),"");Yd.vertex=!0;v.insert(Yd);Yd.style=E.style;var Zd=new mxCell("",new mxGeometry(0,-.61*q,.24*r,.16*q),"");Zd.vertex=!0;v.insert(Zd);Zd.style=E.style;var $d=new mxCell("",new mxGeometry(0,.23*q,.24*r,.16*q),"");$d.vertex=!0;v.insert($d);$d.style=E.style;ea=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.edge=!0;ea.style+=b(ea.style,e,t,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(da,!1);T.insertEdge(da,!0);da.edge=!0;da.style+=b(da.style,e,t,da);-F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(xa,!1);ta.insertEdge(xa,!0);xa.edge=!0;xa.style+=b(xa.style,e,t,xa);F.push(D.addCell(xa,null,null,null,null));Ya=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Ya,!1);Yd.insertEdge(Ya,!0);Ya.edge=!0;Ya.style+=b(Ya.style,e,t,Ya);F.push(D.addCell(Ya,null,null,null,null));var Lc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Lc,-!1);Zd.insertEdge(Lc,!0);Lc.edge=!0;Lc.style+=b(Lc.style,e,t,Lc);F.push(D.addCell(Lc,null,null,null,null));var Mc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Mc,!1);$d.insertEdge(Mc,!0);Mc.edge=!0;Mc.style+=b(Mc.style,e,t,Mc);F.push(D.addCell(Mc,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");-ea.geometry.relative=!0;ea.edge=!0;fb(.05*r,.5*q,.6*r,.25*q,ea,F,D,Oa,v,oa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.05*r,.5*q,.6*r,.75*q,da,F,D,Oa,v,oa);w=new mxCell("",new mxGeometry(.7*r,.1*q,.15*r,.32*q),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.25*r,.25*q,.5*r,.5*q),"shape=mxgraph.eip.control_bus;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);T=new mxCell("",-new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");T.vertex=!0;v.insert(T);T.style+=b(T.style,e,t,T);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");xa.geometry.relative=!0;xa.edge=!0;w.insertEdge(xa,!1);T.insertEdge(xa,!0);xa.style+=b(xa.style,e,t,xa);xa.geometry.points=[new mxPoint(Z+8.5,aa+40)];F.push(D.addCell(xa,null,null,null,null));ta=new mxCell("",new mxGeometry(r-45,-q-20,20,20),"part=1;");ta.vertex=!0;v.insert(ta);ta.value=m(e.message_0);ta.style+=a(e.message_0,G);ta.style+=b(ta.style,e,t,ta,G);Ya=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");Ya.geometry.relative=!0;Ya.edge=!0;w.insertEdge(Ya,!1);ta.insertEdge(Ya,!0);Ya.style+=b(Ya.style,e,t,Ya);Ya.geometry.points=[new mxPoint(Z+8.5,aa+q-10)];F.push(D.addCell(Ya,null,null,null,null));Fd=e.HistoryMessages;oe=(q-75)/Fd;E=[];va=-[];for(l=0;l<Fd;l++)Gd=oe*(l+1)+30,E[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;"),E[l].vertex=!0,E[l].value=m(e["message_"+(l+1)]),E.style+=a(e["message_"+(l+1)],G),v.insert(E[l]),E[l].style+=b(E[l].style,e,t,E[l],G),va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),va[l].geometry.relative=!0,va[l].edge=!0,T.insertEdge(va[l],!1),E[l].insertEdge(va[l],!0),va[l].style+=b(va[l].style,e,t,va[l]),Kc=[],Kc.push(new mxPoint(Z+-r-30,aa+Gd+10)),va[l].geometry.points=Kc,F.push(D.addCell(va[l],null,null,null,null));break;case "Equation":LucidImporter.hasMath=!0;v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);v.value="$$"+e.Latex+"$$";break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,t,v);break;case "fpWall":v.style+="labelPosition=center;verticalAlign=bottom;verticalLabelPosition=top;";v.value=m(e);v.style+=b(v.style,e,t,v,G);v.style=v.style.replace("rotation=180;",-"");break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,t,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=new mxCell("",new mxGeometry(0,0,r,.25*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=[];var ef=.02*r,pe=(r-2*ef)/e.LightCount,ff=.8*pe;for(l=0;l<e.LightCount;l++)E[l]=new mxCell("",new mxGeometry(ef+pe*l+(pe-ff)/2,.25*q,ff,.75*q),"ellipse;part=1;"),-E[l].vertex=!0,v.insert(E[l]),E[l].style+=b(E[l].style,e,t,E[l]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=[];var gf=r/e.SinkCount;for(l=0;l<e.SinkCount;l++)w[l]=new mxCell("",new mxGeometry(gf*l,0,gf,q),"part=1;shape=mxgraph.floorplan.sink_2;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=b(w[l].style,e,t,w[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Eb=.1*r/e.StallCount;w=new mxCell("",new mxGeometry(0,-0,Eb,q),"fillColor=#000000;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);var Nb=(r-Eb)/e.StallCount,qe=[],Hd=[],Id=[],Jd=[];Y=I(e,t);Y=""==Y?"#000000;":Y.replace("stokreColor=","");var re="part=1;fillColor="+Y;re+=b(re,e,t,v);var se=b("",e,t,v);for(l=0;l<e.StallCount;l++)qe[l]=new mxCell("",new mxGeometry((l+1)*Nb,0,Eb,q),re),qe[l].vertex=!0,v.insert(qe[l]),Id[l]=new mxCell("",new mxGeometry(Eb+l*Nb+.05*(Nb-Eb),q-.92*(Nb-Eb),.9*(Nb-Eb),.92*(Nb-Eb)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),-Id[l].vertex=!0,v.insert(Id[l]),Id[l].style+=se,Hd[l]=new mxCell("",new mxGeometry(Eb+l*Nb+.2*(Nb-Eb),0,.6*(Nb-Eb),.8*(Nb-Eb)),"shape=mxgraph.floorplan.toilet;part=1;"),Hd[l].vertex=!0,v.insert(Hd[l]),Hd[l].style+=se,Jd[l]=new mxCell("",new mxGeometry(Eb+l*Nb,.42*q,.15*(Nb-Eb),.12*(Nb-Eb)),"part=1;"),Jd[l].vertex=!0,v.insert(Jd[l]),Jd[l].style+=se;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var ae="edgeStyle=none;endArrow=none;part=1;";Y=I(e,t);Y=""==Y?"#000000;":Y.replace("strokeColor=",-"");var Uc="shape=triangle;part=1;fillColor="+Y;Uc+=b(Uc,e,t,v);ea=new mxCell("",new mxGeometry(0,0,0,0),ae);ea.geometry.relative=!0;ea.edge=!0;fb(0,.5*q,.65*r,.5*q,ea,F,D,Oa,v,oa);var ha=q/e.numLines;da=[];var Vc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),da[l].geometry.relative=!0,da[l].edge=!0,fb(.65*r,.5*q,.96*r,(l+.5)*ha,da[l],F,D,Oa,v,oa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ha,.05*r,.6*ha),Uc),Vc[l].vertex=!0,v.insert(Vc[l]);break;case "PEMultilines":v.style+=-"strokeColor=none;fillColor=none;";ae="edgeStyle=none;endArrow=none;part=1;";Y=I(e,t);Y=""==Y?"#000000;":Y.replace("strokeColor=","");Uc="shape=triangle;part=1;fillColor="+Y;Uc+=b(Uc,e,t,v);ha=q/e.numLines;da=[];Vc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),da[l].geometry.relative=!0,da[l].edge=!0,fb(0,(l+.5)*ha,.96*r,(l+.5)*ha,da[l],F,D,Oa,v,oa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ha,.05*r,.6*ha),Uc),Vc[l].vertex=!0,v.insert(Vc[l]);break;case "PEVesselBlock":v.style+=-"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);switch(e.vesselType){case 1:v.style+="shape=mxgraph.pid.vessels.pressurized_vessel;";break;case 2:v.style+="shape=hexagon;perimeter=hexagonPerimeter2;size=0.10;direction=south;"}v.style+=b(v.style,e,t,v,G);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);1==e.peakedRoof&&0==e.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==e.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");-v.style+=b(v.style,e,t,v,G);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style=0==e.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";v.style+=b(v.style,e,t,v,G);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,.2*q,r,.6*q),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");-w.vertex=!0;v.insert(w);w.style+=ia;w.style+=b(w.style,e,t,w);ia="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=!0,ea.edge=!0,ea.style+=ia,ea.style+=b(ea.style,e,t,ea),fb(0,0,0,.2*q,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ia,da.style+=b(da.style,e,t,da),fb(r,.67*q,r,q,da,F,D,Oa,v,oa)):(w.style+="flipH=1;",ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=-!0,ea.edge=!0,ea.style+=ia,ea.style+=b(ea.style,e,t,ea),fb(0,0,0,.33*q,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ia,da.style+=b(da.style,e,t,da),fb(r,.8*q,r,q,da,F,D,Oa,v,oa));1==e.centerLineType&&(xa=new mxCell("",new mxGeometry(0,0,0,0),""),xa.geometry.relative=!0,xa.edge=!0,xa.style+=ia,xa.style+=b(xa.style,e,t,xa),fb(.2*r,.5*q,.8*r,.5*q,xa,F,D,Oa,v,oa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";-v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.2*r,.2*q,.6*r,.6*q),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(u.Class){case "PEIndicatorBlock":v.style+="shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+=-"shape=mxgraph.pid2inst.indicator;indType=inst;";break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+="shape=mxgraph.pid2inst.progLogCont;"}v.style+=b(v.style,e,t,v);"PEIndicator2Block"==u.Class||"PESharedIndicator2Block"==u.Class?(w=new mxCell("",-new mxGeometry(0,0,r,.5*r),"part=1;strokeColor=none;fillColor=none;"),w.vertex=!0,v.insert(w),w.value=m(e.TopText),w.style+=a(e.TopText,G),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,.5*r,r,.5*r),"part=1;strokeColor=none;fillColor=none;")):(w=new mxCell("",new mxGeometry(0,0,r,.5*q),"part=1;strokeColor=none;fillColor=none;"),w.vertex=!0,v.insert(w),w.value=m(e.TopText),w.style+=a(e.TopText,G),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,.5*q,r,.5*q),"part=1;strokeColor=none;fillColor=none;"));-E.vertex=!0;v.insert(E);E.value=m(e.BotText);E.style+=a(e.BotText,G);E.style+=b(E.style,e,t,E,G);switch(e.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var te=!1;"PEPoweredValveBlock"==u.Class?1!=e.poweredHandOperated&&(te=!0):1!=-e.handOperated&&(te=!0);if(te){e=h(u).Properties;P=e.BoundingBox;var Sf=P.h;P.h="PEAngleValveBlock"==u.Class||"PEAngleGlobeValveBlock"==u.Class?.7*P.h:.6*P.h;v=new mxCell("",new mxGeometry(Math.round(.75*P.x+wc),Math.round(.75*(P.y+Sf-P.h)+xc),Math.round(.75*P.w),Math.round(.75*P.h)),"");v.vertex=!0;Qb(v,u,D)}if("PEPoweredValveBlock"==u.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",v.style+=b(v.style,e,t,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",-w=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*q),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),w.vertex=!0,v.insert(w),w.value=m(e.PoweredText),w.style+=(G?"":p(e.PoweredText)+x(e.PoweredText)+C(e.PoweredText)+J(e.PoweredText)+M(e.PoweredText)+Q(e.PoweredText)+U(e.PoweredText))+"fontSize=6;"+H(e.PoweredText),w.style+=b(w.style,e,t,w,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=m(e.Text);switch(u.Class){case "PEGateValveBlock":v.style+=-"valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==e.handOperated&&(v.style+="actuator=man;")}v.style+=b(v.style,e,t,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(T=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):-new mxCell("",new mxGeometry(1,0,20,q-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(-20,110),T.vertex=!0,v.insert(T),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),-ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,t,v);break;case "UI2WindowBlock":v.value=m(e.Title);v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+(G?"fontSize=13;":f(e.Title)+p(e.Title)+x(e.Title));1==e.vScroll&&(T=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,-0,20,q-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(-20,30),T.vertex=!0,v.insert(T),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=-!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,t,v,G);break;case "UI2DialogBlock":v.value=m(e.Text);v.style+=a(e.Text,G);w=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");w.vertex=!0;v.insert(w);w.value=m(e.Title);w.style+=a(e.Title,G);w.style+=b(w.style,e,t,w,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=new mxPoint(-25,-10);-E.vertex=!0;w.insert(E);1==e.vScroll&&(T=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(-20,30),T.vertex=!0,v.insert(T),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,-1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,t,v);e.Text=null;break;case "UI2AccordionBlock":w=[];ha=25;for(l=0;l<=e.Panels-1;l++)w[l]=l<e.Selected-1?new mxCell("",new mxGeometry(0,l*ha,r,ha),"part=1;fillColor=#000000;fillOpacity=25;"):-l==e.Selected-1?new mxCell("",new mxGeometry(0,l*ha,r,ha),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,q-(e.Panels-e.Selected)*ha+(l-e.Selected)*ha,r,ha),"part=1;fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Panel_"+(l+1)]),w[l].style+=a(e["Panel_"+(l+1)],G),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=5;");var Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?-new mxCell("",new mxGeometry(1,0,20,q-e.Selected*ha-20-(e.Panels-e.Selected)*ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-e.Selected*ha-(e.Panels-e.Selected)*ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,e.Selected*ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,-e,t,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*ha),T.vertex=!0,v.insert(T),T.style+=Ua,T.style+=b(T.style,e,t,T));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,e.Selected*ha,r-20,q-e.Selected*ha--20-(e.Panels-e.Selected)*ha),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*ha,r-20,q-e.Selected*ha-(e.Panels-e.Selected)*ha),"part=1;fillColor=none;strokeColor=none;");ta.vertex=!0;v.insert(ta);ta.value=m(e.Content_1);ta.style+=a(e.Content_1,G);!G&&0>ta.style.indexOf(";align=")&&(ta.style+="align=left;spacingLeft=5;");v.style+=b(v.style,e,t,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];E=[];ha=25;var Hb=3,Ha=(r+Hb)/-(e.Tabs+1),hb=new mxCell("",new mxGeometry(0,ha,r,q-ha),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Hb,ha),""),E[l].vertex=!0,v.insert(E[l])):(w[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Hb,ha),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Hb,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=-!0,w[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,e,t,E[l]);Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),-E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,t,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20),T.vertex=!0,v.insert(T),T.style+=-Ua,T.style+=b(T.style,e,t,T));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];E=[];ha=25;Hb=3;Ha=(r+Hb)/e.Tabs;hb=new mxCell("",new mxGeometry(0,ha,r,q-ha),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),""),E[l].vertex=!0,v.insert(E[l])):(w[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=-b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Hb,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,t,E[l],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;");Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):-new mxCell("",new mxGeometry(1,0,20,q-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,t,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),-T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20),T.vertex=!0,v.insert(T),T.style+=Ua,T.style+=b(T.style,e,t,T));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];E=[];Hb=3;ha=25+Hb;Ha=80;zc=10;hb=new mxCell("",new mxGeometry(Ha,0,r-Ha,q),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,zc+l*ha,Ha,ha-Hb),""),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Tab_"+-(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,t,E[l],G)):(w[l]=new mxCell("",new mxGeometry(0,zc+l*ha,Ha,ha-Hb),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,ha-Hb),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[l].insert(E[l]),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G)),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,-e,t,E[l]);Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,0),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",-E.style+=Ua,E.style+=b(E.style,e,t,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(Ha,1,r-20-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(Ha,1,r-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20),T.vertex=!0,v.insert(T),T.style+=Ua,T.style+=b(T.style,e,t,T));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";-ha=q/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(0,l*ha+.5*ha-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=I(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,-2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,t,E[l]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(l*Ha,.5*q-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=-a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=I(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,t,E[l]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";ha=q/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(0,-l*ha+.5*ha-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=I(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"ellipse;"),E[l].vertex=!0,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=-b(E[l].style,e,t,E[l]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(l*Ha,.5*q-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=I(e,t),-Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"ellipse;part=1;"),E[l].vertex=!0,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,t,E[l]));break;case "UI2SelectBlock":v.style+="shape=mxgraph.mockup.forms.comboBox;strokeColor=#999999;fillColor=#ddeeff;align=left;fillColor2=#aaddff;mainText=;fontColor=#666666";v.value=m(e.Selected);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+="shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;";-"UI2VSliderBlock"==u.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";v.style+=b(v.style,e,t,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";w=new mxCell("",new mxGeometry(0,0,.6*r,q),"part=1;");w.vertex=!0;v.insert(w);w.value=m(e.Date);w.style+=a(e.Date,G);v.style+=b(v.style,e,t,v);Y=I(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");E=new mxCell("",new mxGeometry(.75*r,0,.25*r,q),"part=1;shape=mxgraph.gmdl.calendar;");-E.vertex=!0;v.insert(E);E.style+=Y;E.style+=b(E.style,e,t,E);break;case "UI2SearchBlock":v.value=m(e.Search);v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+a(e.Search,G);v.style+=b(v.style,e,t,v,G);break;case "UI2NumericStepperBlock":Y=I(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");v.value=m(e.Number);v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+-Y+a(e.Number,G);v.style+=b(v.style,e,t,v,G);break;case "UI2TableBlock":try{kb=S(e.FillColor);var Kd=S(e.LineColor);Sc="";var be=20;v.style="html=1;overflow=fill;verticalAlign=top;spacing=0;";var Ld='<table style="width:100%;height:100%;border-collapse: collapse;border: 1px solid '+Kd+';">',tc=e.Data.split("\n");var hf=e.AltRow&&"default"!=e.AltRow?"none"==e.AltRow?kb:S(e.AltRow):Rd(kb,.95);Oc=e.Header&&"default"!=e.Header?"none"==e.Header?hf:S(e.Header):Rd(kb,.8);if("full"==e.GridLines)Sc="border: 1px solid "+-Kd,be=19;else if("row"==e.GridLines)Sc="border-bottom: 1px solid "+Kd,be=19;else if("default"==e.GridLines||"column"==e.GridLines)Sc="border-right: 1px solid "+Kd;tc=tc.filter(function(gb){return gb});/^\{[^}]*\}$/.test(tc[tc.length-1])&&tc.pop();Fc=tc[0].split(",").length;var jf="";for(fa=0;fa<Fc-1;fa++)jf+=" , ";for(l=tc.length;l<Math.ceil(q/20);l++)tc.push(jf);for(l=0;l<tc.length;l++){Ld+='<tr style="height: '+be+"px;background:"+(0==l?Oc:l%2?kb:hf)+'">';var kf=tc[l].split(",");for(fa=0;fa<kf.length;fa++){var Md=-e["Cell_"+l+"_"+fa],Tf=Md&&Md.m&&Md.m[0]&&"c"==Md.m[0].n?S(Md.m[0].v):Kd;Ld+='<td style="height: '+be+"px;color:"+Tf+";"+Sc+'">'+mxUtils.htmlEntities(kf[fa])+"</td>"}Ld+="</tr>"}Ld+="</table>";v.value=Ld}catch(gb){console.log(gb)}break;case "UI2ButtonBarBlock":v.style+=b(v.style,e,t,v);w=[];E=[];Ha=r/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),""),E[l].vertex=!0,v.insert(E[l])):(w[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"strokeColor=none;"),-w[l].vertex=!0,v.insert(w[l]),w[l].style+=w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,q),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,t,E[l],G);break;case "UI2VerticalButtonBarBlock":v.style+=b(v.style,e,t,v);w=[];E=[];ha=q/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,l*ha,r,ha),""),E[l].vertex=!0,v.insert(E[l])):-(w[l]=new mxCell("",new mxGeometry(0,l*ha,r,ha),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,r,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,t,E[l],G);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)0!=-l?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),E[l].style+=b(E[l].style,e,t,E[l])):E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"fillColor=none;strokeColor=none;"),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Link_"+(l+1)]),E[l].style+=a(e["Link_"+(l+1)],G);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)w[l]=new mxCell("",new mxGeometry(l*-Ha,0,Ha,q),"fillColor=none;strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Link_"+(l+1)]),w[l].style+=a(e["Link_"+(l+1)],G);for(l=1;l<e.Links;l++)E[l]=new mxCell("",new mxGeometry(l/e.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),E[l].geometry.relative=!0,E[l].geometry.offset=new mxPoint(-3,-5),E[l].vertex=!0,v.insert(E[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);w=[];Ha=r/(e.Buttons+1);for(l=0;l<=e.Buttons-1;l++)w[l]=l!=e.Selected--1?new mxCell("",new mxGeometry(0,0,Ha,q),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,Ha,q),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),w[l].geometry.relative=!0,w[l].geometry.offset=new mxPoint(l*Ha,0),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["MenuItem_"+(l+1)]),w[l].style+=a(e["MenuItem_"+(l+1)],G);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";-break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_prev);v.value=m(e.Text_prev)+" ";for(l=0;l<e.Links;l++)v.value+=m(e["Link_"+(l+1)])+" ";v.value+=m(e.Text_next);break;case "UI2ContextMenuBlock":v.style+=b(v.style,e,t,v);X=[];nb=[];var jd=[];ha=q/e.Lines;ia=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ia&&(ia=""+f(e["Item_"+(l+1)])+p(e["Item_"+(l+1)])+x(e["Item_"+(l+1)])),X[l]=new mxCell("",new mxGeometry(0,l*q/e.Lines,r,ha),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia,X[l].value=m(e["Item_"+(l+1)])),null!=e.Icons[l+1]&&null!=X[l]&&("dot"==e.Icons[l+1]?(nb[l]=new mxCell("",new mxGeometry(0,.5,8,8),"ellipse;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6,-4)):"check"==e.Icons[l+1]&&(nb[l]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6.5,-4)),null!=nb[l]&&(nb[l].geometry.relative=!0,nb[l].vertex=!0,X[l].insert(nb[l]),Y=I(e,t),-Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),nb[l].style+=Y)),null!=e["Shortcut_"+(l+1)]&&(null==ia&&(ia=""+f(e["Shortcut_"+(l+1)])+p(e["Shortcut_"+(l+1)])+x(e["Shortcut_"+(l+1)])),jd[l]=new mxCell("",new mxGeometry(.6*r,l*q/e.Lines,.4*r,ha),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),jd[l].vertex=!0,v.insert(jd[l]),jd[l].style+=ia,jd[l].value=m(e["Shortcut_"+(l+1)])),null!=e.Dividers[l+1]&&(X[l]=new mxCell("",new mxGeometry(.05*r,l*q/e.Lines,.9*-r,ha),"shape=line;strokeWidth=1;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=I(e,t));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*e.ScrollVal+";";break;case "CalloutSquareBlock":case "UI2TooltipSquareBlock":v.value=m(e.Tip||e.Text);v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+e.RoundCorners+";"+a(e.Tip||e.Text,G);v.style+=b(v.style,e,t,v,G);v.geometry.height+=10;break;case "UI2CalloutBlock":v.value=-m(e.Txt);v.style+="shape=ellipse;perimeter=ellipsePerimeter;"+a(e.Txt,G);v.style+=b(v.style,e,t,v,G);break;case "UI2AlertBlock":v.value=m(e.Txt);v.style+=a(e.Txt,G);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");w.vertex=!0;v.insert(w);w.value=m(e.Title);w.style+=a(e.Title,G);w.style+=b(w.style,e,t,w,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=-new mxPoint(-25,-10);E.vertex=!0;w.insert(E);var Uf=45*e.Buttons+(10*e.Buttons-1);T=[];for(l=0;l<e.Buttons;l++)T[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),T[l].geometry.relative=!0,T[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),T[l].vertex=!0,v.insert(T[l]),T[l].value=m(e["Button_"+(l+1)]),T[l].style+=a(e["Button_"+(l+1)],G),T[l].style+=b(T[l].style,e,t,T[l],G);break;case "UMLClassBlock":if(0==e.Simple){ia=ca(e,t);db=Math.round(.75*e.TitleHeight)||25;ia=ia.replace("fillColor",-"swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ia+"startSize="+db+";"+a(e.Title,G);v.style+=b(v.style,e,t,v,G);X=[];var ue=[],wb=db/q;Wb=db;for(l=0;l<=e.Attributes;l++)0<l&&(ue[l]=new mxCell("",new mxGeometry(0,Wb,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),-Wb+=8,ue[l].vertex=!0,v.insert(ue[l])),ha=0,0==e.Attributes?ha=l=1:l<e.Attributes?(ha=e["Text"+(l+1)+"Percent"],wb+=ha):ha=1-wb,pc=Math.round((q-db)*ha)+(e.ExtraHeightSet&&1==l?.75*e.ExtraHeight:0),X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;whiteSpace=wrap;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),X[l].style+=-ia+O(e,t,X[l])+a(e["Text"+(l+1)],G),X[l].value=m(e["Text"+(l+1)])}else v.value=m(e.Title),v.style+="align=center;",v.style+=a(e.Title,G),v.style+=b(v.style,e,t,v,G);break;case "ERDEntityBlock":ia=ca(e,t);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ia+"startSize="+-db+";"+a(e.Name,G);v.style+=b(v.style,e,t,v,G);e.ShadedHeader?(ia=S(e.FillColor),je=Rd(ia,.85),v.style+="fillColor="+je+";"):v.style+=ca(e,t);X=[];wb=db/q;Wb=db;for(l=0;l<e.Fields;l++)ha=0,pc=.75*e["Field"+(l+1)+"_h"],X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),-X[l].style+=ia+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;opacity=5;":X[l].style+("fillColor=none;"+O(e,t,X[l])),X[l].value=m(e["Field"+(l+1)]);break;case "ERDEntityBlock2":ia=ca(e,t);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ia+"startSize="+db+";"+a(e.Name,G);v.style=e.ShadedHeader?-v.style+"fillColor=#e0e0e0;":v.style+ca(e,t);v.style+=b(v.style,e,t,v,G);X=[];var Ga=[];wb=db;var Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ia+a(e["Key"+(l+1)],-G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,t,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=-ia+a(e["Field"+(l+1)],G),v.style+=b(v.style,e,t,v),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,t,X[l])),X[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ia=ca(e,t);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ia+"startSize="+db+-";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ca(e,t);v.value=m(e.Name);v.style+=b(v.style,e,t,v,G);X=[];Ga=[];wb=db;Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Field"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),-Ga[l].style+=ia+a(e["Field"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,t,Ga[l])),Ga[l].value=m(e["Field"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,t,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia+a(e["Type"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,t,X[l])),X[l].value=m(e["Type"+(l+1)]),X[l].style+=b(X[l].style,e,t,X[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ia=ca(e,t);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+-ia+"startSize="+db+";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ca(e,t);v.value=m(e.Name);v.style+=b(v.style,e,t,v,G);X=[];Ga=[];var Jb=[];wb=db;Ib=30;var ce=40;null!=e.Column1&&(Ib=.75*e.Column1);null!=e.Column2&&(ce=.75*e.Column2);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),-Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ia+a(e["Key"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,t,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,t,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib-ce,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,t,X[l])),X[l].value=m(e["Field"+(l+1)]),X[l].style+=b(X[l].style,e,t,X[l],G),Jb[l]=new mxCell("",new mxGeometry(r-ce,wb,ce,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),-Jb[l].vertex=!0,v.insert(Jb[l]),Jb[l].style+=ia+a(e["Type"+(l+1)],G),Jb[l].style=1==e.AltRows&&0!=l%2?Jb[l].style+"fillColor=#000000;fillOpacity=5;":Jb[l].style+("fillColor=none;"+O(e,t,Jb[l])),Jb[l].value=m(e["Type"+(l+1)]),Jb[l].style+=b(Jb[l].style,e,t,Jb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Sa("application_system",r,q,v,e,t);break;case "GCPServiceCardAuthorizationBlock":Sa("internal_payment_authorization",r,q,v,e,t);break;case "GCPServiceCardBlankBlock":Sa("blank",-r,q,v,e,t);break;case "GCPServiceCardReallyBlankBlock":Sa("blank",r,q,v,e,t);break;case "GCPServiceCardBucketBlock":Sa("bucket",r,q,v,e,t);break;case "GCPServiceCardCDNInterconnectBlock":Sa("google_network_edge_cache",r,q,v,e,t);break;case "GCPServiceCardCloudDNSBlock":Sa("blank",r,q,v,e,t);break;case "GCPServiceCardClusterBlock":Sa("cluster",r,q,v,e,t);break;case "GCPServiceCardDiskSnapshotBlock":Sa("persistent_disk_snapshot",r,q,v,e,t);break;case "GCPServiceCardEdgePopBlock":Sa("google_network_edge_cache",-r,q,v,e,t);break;case "GCPServiceCardFrontEndPlatformServicesBlock":Sa("frontend_platform_services",r,q,v,e,t);break;case "GCPServiceCardGatewayBlock":Sa("gateway",r,q,v,e,t);break;case "GCPServiceCardGoogleNetworkBlock":Sa("google_network_edge_cache",r,q,v,e,t);break;case "GCPServiceCardImageServicesBlock":Sa("image_services",r,q,v,e,t);break;case "GCPServiceCardLoadBalancerBlock":Sa("network_load_balancer",r,q,v,e,t);break;case "GCPServiceCardLocalComputeBlock":Sa("dedicated_game_server",r,q,v,-e,t);break;case "GCPServiceCardLocalStorageBlock":Sa("persistent_disk_snapshot",r,q,v,e,t);break;case "GCPServiceCardLogsAPIBlock":Sa("logs_api",r,q,v,e,t);break;case "GCPServiceCardMemcacheBlock":Sa("memcache",r,q,v,e,t);break;case "GCPServiceCardNATBlock":Sa("nat",r,q,v,e,t);break;case "GCPServiceCardPaymentFormBlock":Sa("external_payment_form",r,q,v,e,t);break;case "GCPServiceCardPushNotificationsBlock":Sa("push_notification_service",r,q,v,e,t);break;case "GCPServiceCardScheduledTasksBlock":Sa("scheduled_tasks",-r,q,v,e,t);break;case "GCPServiceCardServiceDiscoveryBlock":Sa("service_discovery",r,q,v,e,t);break;case "GCPServiceCardSquidProxyBlock":Sa("squid_proxy",r,q,v,e,t);break;case "GCPServiceCardTaskQueuesBlock":Sa("task_queues",r,q,v,e,t);break;case "GCPServiceCardVirtualFileSystemBlock":Sa("virtual_file_system",r,q,v,e,t);break;case "GCPServiceCardVPNGatewayBlock":Sa("gateway",r,q,v,e,t);break;case "GCPInputDatabase":Wa("database",1,.9,r,q,v,e,t);break;case "GCPInputRecord":Wa("record",1,.66,r,q,v,-e,t);break;case "GCPInputPayment":Wa("payment",1,.8,r,q,v,e,t);break;case "GCPInputGateway":Wa("gateway_icon",1,.44,r,q,v,e,t);break;case "GCPInputLocalCompute":Wa("compute_engine_icon",1,.89,r,q,v,e,t);break;case "GCPInputBeacon":Wa("beacon",.73,1,r,q,v,e,t);break;case "GCPInputStorage":Wa("storage",1,.8,r,q,v,e,t);break;case "GCPInputList":Wa("list",.89,1,r,q,v,e,t);break;case "GCPInputStream":Wa("stream",1,.82,r,q,v,e,t);break;case "GCPInputMobileDevices":Wa("mobile_devices",1,.73,r,q,v,e,t);break;-case "GCPInputCircuitBoard":Wa("circuit_board",1,.9,r,q,v,e,t);break;case "GCPInputLive":Wa("live",.74,1,r,q,v,e,t);break;case "GCPInputUsers":Wa("users",1,.63,r,q,v,e,t);break;case "GCPInputLaptop":Wa("laptop",1,.66,r,q,v,e,t);break;case "GCPInputApplication":Wa("application",1,.8,r,q,v,e,t);break;case "GCPInputLightbulb":Wa("lightbulb",.7,1,r,q,v,e,t);break;case "GCPInputGame":Wa("game",1,.54,r,q,v,e,t);break;case "GCPInputDesktop":Wa("desktop",1,.9,r,q,v,e,t);break;case "GCPInputDesktopAndMobile":Wa("desktop_and_mobile",-1,.66,r,q,v,e,t);break;case "GCPInputWebcam":Wa("webcam",.5,1,r,q,v,e,t);break;case "GCPInputSpeaker":Wa("speaker",.7,1,r,q,v,e,t);break;case "GCPInputRetail":Wa("retail",1,.89,r,q,v,e,t);break;case "GCPInputReport":Wa("report",1,1,r,q,v,e,t);break;case "GCPInputPhone":Wa("phone",.64,1,r,q,v,e,t);break;case "GCPInputBlank":Wa("transparent",1,1,r,q,v,e,t);break;case "PresentationFrameBlock":0==e.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=a(e.Text),v.value=m(e.Text),v.style+=b(v.style,-e,t,v,G));break;case "SVGPathBlock2":try{var Vf=e.LineWidth,Wf=e.LineColor,lf=e.FillColor,mf=e.DrawData.Data,de='<svg viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg">',ve=null;for(l=0;l<mf.length;l++){var uc=mf[l],Xf=uc.a,Yf=("prop"==uc.w||null==uc.w?Vf:uc.w)/Math.min(r,q)*.75;Rc="prop"==uc.s||null==uc.s?Wf:uc.s;Y="prop"==uc.f||null==uc.f?lf:uc.f;"object"==typeof Y&&(null!=Y.url&&(ve="shape=image;image="+g(Y.url)+";"),Y=Array.isArray(Y.cs)?Y.cs[0].c:lf);de+='<path d="'+Xf+'" fill="'+Y+'" stroke="'+-Rc+'" stroke-width="'+Yf+'"/>'}de+="</svg>";v.style=ve?ve:"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+(window.btoa?btoa(de):Base64.encode(de,!0))+";"}catch(gb){}break;case "BraceBlock":case "BraceBlockRotated":case "BracketBlock":case "BracketBlockRotated":var nf=0==V.indexOf("Bracket")?"size=0;arcSize=50;":"",of=b(v.style,e,t,v,G);mb=ba(e,t,v);v.style="group;"+mb;var we=Math.min(.14*(mb?r:q),100),xe=-new mxCell("",new mxGeometry(0,0,we,q),"shape=curlyBracket;rounded=1;"+nf+of);xe.vertex=!0;xe.geometry.relative=!0;var ye=new mxCell("",new mxGeometry(1-we/r,0,we,q),"shape=curlyBracket;rounded=1;flipH=1;"+nf+of);ye.vertex=!0;ye.geometry.relative=!0;v.insert(xe);v.insert(ye);break;case "BPMNTextAnnotation":case "NoteBlock":e.InsetMargin=null;v.value=m(e.Text);v.style="group;spacingLeft=8;align=left;spacing=0;strokeColor=none;";v.style+=b(v.style,e,t,v,G);0>v.style.indexOf("verticalAlign")&&(v.style+=-"verticalAlign=middle;");var kd=new mxCell("",new mxGeometry(0,0,8,q),"shape=partialRectangle;right=0;fillColor=none;");kd.geometry.relative=!0;kd.vertex=!0;kd.style+=b(kd.style,e,t,v,G);v.insert(kd);break;case "VSMTimelineBlock":case "TimelineBlock":case "TimelineMilestoneBlock":case "TimelineIntervalBlock":LucidImporter.hasTimeLine=!0;LucidImporter.hasUnknownShapes=!0;break;case "FreehandBlock":try{mb=ba(e,t,v);v.style="group;"+mb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",-Ke(e.Stencil.id,e.Stencil));var Ob=LucidImporter.stencilsMap[e.Stencil.id],Zf=-Ob.x/Ob.w,$f=-Ob.y/Ob.h;for(l=0;l<Ob.stencils.length;l++){var ob=Ob.stencils[l];oa=new mxCell("",new mxGeometry(Zf,$f,r,q),"shape="+ob.shapeStencil+";");var ag=ob.FillColor,bg=ob.LineColor,cg=ob.LineWidth;"prop"==ob.FillColor&&(ob.FillColor=e.FillColor);null==ob.FillColor&&(ob.FillColor="#ffffff00");"prop"==ob.LineColor&&(ob.LineColor=e.LineColor);null==ob.LineColor&&(ob.LineColor="#ffffff00");"prop"==ob.LineWidth&&(ob.LineWidth=-e.LineWidth);oa.style+=b(oa.style,ob,t,oa,G);ob.FillColor=ag;ob.LineColor=bg;ob.LineWidth=cg;Y=e.FillColor;var dg=e.LineColor,eg=e.LineWidth;e.FillColor=null;e.LineColor=null;e.LineWidth=null;oa.style+=b(oa.style,e,t,oa,G);e.FillColor=Y;e.LineColor=dg;e.LineWidth=eg;oa.vertex=!0;oa.geometry.relative=!0;v.insert(oa)}var Xb=0;for(mb=e.Rotation;e["t"+Xb];){var pf=e["t"+Xb],qf=m(pf);if(qf){ra=new mxCell(qf,new mxGeometry(0,0,r,q),"strokeColor=none;fillColor=none;overflow=visible;");e.Rotation=0;ra.style+=-b(ra.style,pf,t,ra,G);ra.style+=b(ra.style,e,t,ra,G);e.Rotation=mb;if(null!=Ob.text&&null!=Ob.text["t"+Xb]){var eb=Ob.text["t"+Xb];eb.Rotation=mb+(eb.rotation?eb.rotation:0)+(e["t"+Xb+"_TRotation"]?e["t"+Xb+"_TRotation"]:0)+(e["t"+Xb+"_TAngle"]?e["t"+Xb+"_TAngle"]:0);ra.style+=b(ra.style,eb,t,ra,G);var Yb=ra.geometry;eb.w&&(Yb.width*=eb.w/Ob.w);eb.h&&(Yb.height*=eb.h/Ob.h);eb.x&&(Yb.x=eb.x/Ob.w);eb.y&&(Yb.y=eb.y/Ob.h);eb.fw&&(Yb.width*=.75*eb.fw/r);eb.fh&&(Yb.height*=.75*eb.fh/q);eb.fx&&(Yb.x=(0<-eb.fx?1:0)+.75*eb.fx/r);eb.fy&&(Yb.y=(0<eb.fy?1:0)+.75*eb.fy/q)}ra.vertex=!0;ra.geometry.relative=!0;v.insert(ra)}Xb++}}if(e.FillColor&&e.FillColor.url){var Nd=new mxCell("",new mxGeometry(0,0,r,q),"shape=image;html=1;");Nd.style+=Fa({},{},e.FillColor.url);Nd.vertex=!0;Nd.geometry.relative=!0;v.insert(Nd)}}catch(gb){console.log("Freehand error",gb)}break;case "RightArrowBlock":var ze=e.Head*q/r;v.style="shape=singleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=b(v.style,-e,t,v,G);break;case "DoubleArrowBlock":ze=e.Head*q/r;v.style="shape=doubleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=b(v.style,e,t,v,G);break;case "VPCSubnet2017":case "VirtualPrivateCloudContainer2017":case "ElasticBeanStalkContainer2017":case "EC2InstanceContents2017":case "AWSCloudContainer2017":case "CorporateDataCenterContainer2017":switch(V){case "VPCSubnet2017":var ld="shape=mxgraph.aws3.permissions;fillColor=#D9A741;";var md=30;var nd=35;break;case "VirtualPrivateCloudContainer2017":ld=+"fillOpacity")||If;r=Cd[fa];var cf=p;Yc=r;for(var Mb=l+1;Mb<l+Xd.h;Mb++)if(null!=Vd[Mb]){cf+=Vd[Mb];Dd[Mb+","+fa]=!0;for(var Tc=fa+1;Tc<fa+Xd.w;Tc++)Dd[Mb+","+Tc]=!0}for(Mb=fa+1;Mb<fa+Xd.w;Mb++)if(null!=Cd[Mb])for(Yc+=Cd[Mb],Dd[l+","+Mb]=!0,Tc=l+1;Tc<l+Xd.h;Tc++)Dd[Tc+","+Mb]=!0;var oa=new mxCell("",new mxGeometry(Z,aa,Yc,cf),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Hf?"left=0;right=0;":"")+(Wd?"top=0;bottom=0;":"")+ca({FillColor:kb||We})+Zb(mxConstants.STYLE_STROKECOLOR,T($e),+T(Ye))+(null!=bf?Zb(mxConstants.STYLE_STROKEWIDTH,Math.round(.75*parseFloat(bf)),"1"):"")+(af?af:Jf)+Rf+"verticalAlign="+(Ze?Ze:Ve?Ve:"middle")+";"+qa({StrokeStyle:Sc?Sc:Xe?Xe:"solid"})+(Kf?"horizontal=0;":""));oa.vertex=!0;oa.value=m(qc);oa.style+=b(oa.style,e,u,oa,G)+(G?"fontSize=13;":f(qc)+q(qc)+t(qc)+C(qc,oa)+I(qc)+M(qc)+K(qc)+Q(qc))+S(qc)+H(qc);v.insert(oa);Z+=r}}aa+=p}}catch(gb){console.log(gb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";+"VSMDedicatedProcessBlock"==w.Class?v.value=m(e.Text):"VSMProductionControlBlock"==w.Class&&(v.value=m(e.Resources));v.style+=b(v.style,e,u,v,G);"VSMDedicatedProcessBlock"==w.Class&&(x=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(4,-13),x.vertex=!0,v.insert(x),x.style+=b(x.style,e,u,x));Da=new mxCell("",new mxGeometry(0,0,r,15),"strokeColor=none;fillColor=none;part=1;");Da.vertex=!0;v.insert(Da);Da.value=+m(e.Title);Da.style+=a(e.Title,G);e.Text=null;break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);Da=new mxCell("",new mxGeometry(.1*r,.3*p,.8*r,.6*p),"part=1;");Da.vertex=!0;v.insert(Da);Da.value=m(e.Resource);Da.style+=a(e.Resource,G);Da.style+=b(Da.style,e,u,Da,G);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Bb=p;bc=parseInt(e.Cells);ia=b("part=1;",e,u,v);0<bc&&(Bb/=bc);X=[];Qa=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),ia),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["cell_"+l]),X[l].style+=a(e["cell_"+l],G);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);Bb=p;bc=parseInt(e.Cells);ia=b("part=1;fillColor=none;",e,u,v);0<bc&&(Bb/=bc);X=[];Ub=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Bb,.5*r,Bb),"shape=partialRectangle;left=0;"+ia),X[l].vertex=!0,v.insert(X[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),"strokeColor=none;fillColor=none;part=1;"),Ub[l].vertex=!0,v.insert(Ub[l]),Ub[l].value=+m(e["cell_"+l]),Ub[l].style+=a(e["cell_"+l],G);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=b(v.style,e,u,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.17*r,.2*p,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");x.vertex=!0;v.insert(x);+x.style+=b(x.style,e,u,x);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ia="shape=card;size=18;flipH=1;part=1;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.1*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);E.vertex=!0;v.insert(E);E.style+=b(E.style,+e,u,E);var U=new mxCell("",new mxGeometry(0,.2*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ia);U.vertex=!0;v.insert(U);U.value=m(e.Text);U.style+=b(U.style,e,u,U,G);break;case "VSMElectronicInformationArrow":v.style="group;";v.value=m(e.Title);v.style+=a(e.Title,G);var va=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;entryX=0;entryY=1;exitX=1;exitY=0;");va.edge=!0;va.geometry.relative=+1;D.addCell(va,v,null,v,v);break;case "AWSRoundedRectangleContainerBlock2":case "AWSRoundedRectangleContainerBlock":v.style+="strokeColor=none;fillColor=none;";e.Spotfleet?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,35,40),+"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Beanstalk?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),+E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.EC2?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),E.geometry.relative=+!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Subnet?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=+new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.VPC?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,+0),E.vertex=!0,v.insert(E)):e.AWS?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):+e.Corporate?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):+(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.value=m(e.Title),v.style+=b(v.style,e,u,v,G));break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;";+v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";oa=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");oa.vertex=!0;v.insert(oa);var Oa=[oa];oa.style+=ca(e,u);va=new mxCell("",new mxGeometry(0,+0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;sc(.5*r,0,va,F,D,Oa,v,oa);sc(.855*r,.145*p,va,F,D,Oa,v,oa);sc(r,.5*p,va,F,D,Oa,v,oa);sc(.855*r,.855*p,va,F,D,Oa,v,oa);sc(.5*r,p,va,F,D,Oa,v,oa);sc(.145*r,.855*p,va,F,D,Oa,v,oa);sc(0,.5*p,va,F,D,Oa,v,oa);sc(.145*r,.145*p,va,F,D,Oa,v,oa);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";oa=new mxCell("",new mxGeometry(0,.5*p-10,r,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");+oa.vertex=!0;v.insert(oa);Oa=[oa];va=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;Oa=[oa];var Ed=r/e.NumTopNodes;for(l=0;l<e.NumTopNodes;l++)sc(.5*Ed+l*Ed,0,va,F,D,Oa,v,oa);Ed=r/e.NumBottomNodes;for(l=0;l<e.NumBottomNodes;l++)sc(.5*Ed+l*Ed,p,va,F,D,Oa,v,oa);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);+e.ToggleCharge&&(v.style+="flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);"EIMessageChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIDatatypeChannelBlock"==+w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIInvalidMessageChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIDeadLetterChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),x.geometry.offset=+new mxPoint(.45*-r,0)):"EIGuaranteedDeliveryBlock"==w.Class&&(x=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(-10,-7));x.geometry.relative=!0;x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);va=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");va.geometry.relative=!0;va.edge=!0;fb(.15*r,.25*p,.85*r,.25*p,va,F,D,Oa,v,oa);break;+case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.07*p,.21*r,.86*p),"fillColor=#FFFF33;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.26*r,.09*p,.2*r,.82*p),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");+U.geometry.relative=!0;U.geometry.offset=new mxPoint(.4*-r,-10);U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");ea.geometry.relative=!0;ea.edge=!0;x.insertEdge(ea,!0);E.insertEdge(ea,!1);ea.style+=J(e,u);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");+da.geometry.relative=!0;da.edge=!0;E.insertEdge(da,!0);U.insertEdge(da,!1);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);var Fd=+e.Messages,oe=(p-17)/Fd;E=[];va=[];for(l=0;l<Fd;l++){var Gd=oe*(l+1)-3;E[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;");E[l].vertex=!0;v.insert(E[l]);switch(w.Class){case "EIMessageBlock":E[l].value=m(e["message_"+(l+1)]);E.style+=a(e["message_"+(l+1)],G);break;case "EICommandMessageBlock":E[l].value="C";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIDocumentMessageBlock":E[l].value="D";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIEventMessageBlock":E[l].value="E",E[l].style+=+"fontStyle=1;fontSize=13;"}E[l].style+=b(E[l].style,e,u,E[l]);va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");va[l].geometry.relative=!0;va[l].edge=!0;x.insertEdge(va[l],!1);E[l].insertEdge(va[l],!0);va[l].style+=b(va[l].style,e,u,va[l]);var Kc=[];Kc.push(new mxPoint(Z+8.5,aa+Gd+10));va[l].geometry.points=Kc;F.push(D.addCell(va[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.45*r,.25*p,.3*r,.5*p),"part=1;fillColor=#ffffff");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);va=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");va.geometry.relative=!0;va.edge=!0;fb(0,.5*p,.4*r,.5*p,va,F,D,Oa,v,oa);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);var ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");ea.geometry.relative=!0;ea.edge=!0;fb(.05*r,.5*p,.85*r,.5*p,ea,F,D,Oa,v,oa);var da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.05*r,.5*p,.85*+r,.15*p,da,F,D,Oa,v,oa);var xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");xa.geometry.relative=!0;xa.edge=!0;fb(.05*r,.5*p,.85*r,.85*p,xa,F,D,Oa,v,oa);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");+ea.geometry.relative=!0;ea.edge=!0;ea.style+=J(e,u);fb(.05*r,.5*p,.95*r,.5*p,ea,F,D,Oa,v,oa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");da.geometry.relative=!0;da.edge=!0;da.style+=J(e,u);fb(.3*r,.1*p,.3*r,.5*p,da,F,D,Oa,v,oa);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");+xa.geometry.relative=!0;xa.edge=!0;xa.style+=J(e,u);fb(.7*r,.1*p,.7*r,.5*p,xa,F,D,Oa,v,oa);var Ya=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");Ya.geometry.relative=!0;Ya.edge=!0;Ya.style+=J(e,u);fb(.5*r,.5*p,.5*r,.9*p,Ya,F,D,Oa,v,oa);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,+e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.21*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");ea.geometry.relative=!0;ea.edge=!0;fb(.45*r,.33*p,.8*r,.33*p,ea,F,D,Oa,v,oa);E=new mxCell("",new mxGeometry(.64*r,.55*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");E.vertex=!0;v.insert(E);E.style+=b(E.style,+e,u,E);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.55*r,.67*p,.2*r,.67*p,da,F,D,Oa,v,oa);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.1*r,.15*p,.8*r,.7*p),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");x.vertex=!0;v.insert(x);+x.style+=b(x.style,e,u,x);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.04*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.2*r,.56*p,.2*r,.32*p),"part=1;");E.vertex=!0;v.insert(E);E.value="A";E.style+="fontStyle=1;fontSize=13;";x.style+=b(x.style,e,u,x);ea=new mxCell("",new mxGeometry(0,+0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");ea.geometry.relative=!0;ea.edge=!0;x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.style+=b(ea.style,e,u,ea);Kc=[];Kc.push(new mxPoint(Z+.13*r,aa+.72*p));ea.geometry.points=Kc;F.push(D.addCell(ea,null,null,null,null));U=new mxCell("",new mxGeometry(.6*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");U.vertex=!0;v.insert(U);U.style+=J(e,u)+sa(e);U.style+=b(U.style,e,u,U);ta=new mxCell("",new mxGeometry(.76*+r,.56*p,.2*r,.32*p),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=J(e,u)+O(e,u,ta)+sa(e)+qa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=b(ta.style,e,u,ta);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");da.geometry.relative=!0;da.edge=!0;U.insertEdge(da,!1);ta.insertEdge(da,!0);da.style+=b(da.style,e,u,da);var df=[];df.push(new mxPoint(Z+.69*r,aa+.72*p));da.geometry.points=+df;F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("1",new mxGeometry(.2*r,.4*p,.1*r,.19*p),+"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("2",new mxGeometry(.45*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("3",new mxGeometry(.7*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);ea=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");+x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.geometry.points=[new mxPoint(Z+.375*r,aa+.15*p)];ea.geometry.relative=!0;ea.edge=!0;ea.style+=b(ea.style,e,u,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");E.insertEdge(da,!1);U.insertEdge(da,!0);da.geometry.points=[new mxPoint(Z+.675*r,aa+.15*p)];da.geometry.relative=!0;da.edge=!0;da.style+=b(da.style,e,u,da);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=+"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.3*r,.2*p,.4*r,.6*p),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.38*r,.42*p,.24*r,.16*p),"part=1;fillColor=#aefe7d;");+x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*p),"part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("",new mxGeometry(.76*r,.23*p,.24*r,.16*p),"");U.vertex=!0;v.insert(U);U.style=E.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*p,.24*r,.16*p),"");ta.vertex=!0;v.insert(ta);ta.style=E.style;var Yd=new mxCell("",new mxGeometry(.38*r,.84*p,.24*r,.16*p),"");Yd.vertex=!0;v.insert(Yd);Yd.style=E.style;var Zd=new mxCell("",new mxGeometry(0,+.61*p,.24*r,.16*p),"");Zd.vertex=!0;v.insert(Zd);Zd.style=E.style;var $d=new mxCell("",new mxGeometry(0,.23*p,.24*r,.16*p),"");$d.vertex=!0;v.insert($d);$d.style=E.style;ea=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.edge=!0;ea.style+=b(ea.style,e,u,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(da,!1);U.insertEdge(da,!0);da.edge=!0;da.style+=b(da.style,e,u,da);+F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(xa,!1);ta.insertEdge(xa,!0);xa.edge=!0;xa.style+=b(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));Ya=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Ya,!1);Yd.insertEdge(Ya,!0);Ya.edge=!0;Ya.style+=b(Ya.style,e,u,Ya);F.push(D.addCell(Ya,null,null,null,null));var Lc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Lc,+!1);Zd.insertEdge(Lc,!0);Lc.edge=!0;Lc.style+=b(Lc.style,e,u,Lc);F.push(D.addCell(Lc,null,null,null,null));var Mc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Mc,!1);$d.insertEdge(Mc,!0);Mc.edge=!0;Mc.style+=b(Mc.style,e,u,Mc);F.push(D.addCell(Mc,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");+ea.geometry.relative=!0;ea.edge=!0;fb(.05*r,.5*p,.6*r,.25*p,ea,F,D,Oa,v,oa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.05*r,.5*p,.6*r,.75*p,da,F,D,Oa,v,oa);x=new mxCell("",new mxGeometry(.7*r,.1*p,.15*r,.32*p),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"shape=mxgraph.eip.control_bus;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);U=new mxCell("",+new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);xa.geometry.points=[new mxPoint(Z+8.5,aa+40)];F.push(D.addCell(xa,null,null,null,null));ta=new mxCell("",new mxGeometry(r-45,+p-20,20,20),"part=1;");ta.vertex=!0;v.insert(ta);ta.value=m(e.message_0);ta.style+=a(e.message_0,G);ta.style+=b(ta.style,e,u,ta,G);Ya=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");Ya.geometry.relative=!0;Ya.edge=!0;x.insertEdge(Ya,!1);ta.insertEdge(Ya,!0);Ya.style+=b(Ya.style,e,u,Ya);Ya.geometry.points=[new mxPoint(Z+8.5,aa+p-10)];F.push(D.addCell(Ya,null,null,null,null));Fd=e.HistoryMessages;oe=(p-75)/Fd;E=[];va=+[];for(l=0;l<Fd;l++)Gd=oe*(l+1)+30,E[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;"),E[l].vertex=!0,E[l].value=m(e["message_"+(l+1)]),E.style+=a(e["message_"+(l+1)],G),v.insert(E[l]),E[l].style+=b(E[l].style,e,u,E[l],G),va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),va[l].geometry.relative=!0,va[l].edge=!0,U.insertEdge(va[l],!1),E[l].insertEdge(va[l],!0),va[l].style+=b(va[l].style,e,u,va[l]),Kc=[],Kc.push(new mxPoint(Z++r-30,aa+Gd+10)),va[l].geometry.points=Kc,F.push(D.addCell(va[l],null,null,null,null));break;case "Equation":LucidImporter.hasMath=!0;v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);v.value="$$"+e.Latex+"$$";break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,u,v);break;case "fpWall":v.style+="labelPosition=center;verticalAlign=bottom;verticalLabelPosition=top;";v.value=m(e);v.style+=b(v.style,e,u,v,G);v.style=v.style.replace("rotation=180;",+"");break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,u,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,r,.25*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=[];var ef=.02*r,pe=(r-2*ef)/e.LightCount,ff=.8*pe;for(l=0;l<e.LightCount;l++)E[l]=new mxCell("",new mxGeometry(ef+pe*l+(pe-ff)/2,.25*p,ff,.75*p),"ellipse;part=1;"),+E[l].vertex=!0,v.insert(E[l]),E[l].style+=b(E[l].style,e,u,E[l]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];var gf=r/e.SinkCount;for(l=0;l<e.SinkCount;l++)x[l]=new mxCell("",new mxGeometry(gf*l,0,gf,p),"part=1;shape=mxgraph.floorplan.sink_2;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Eb=.1*r/e.StallCount;x=new mxCell("",new mxGeometry(0,+0,Eb,p),"fillColor=#000000;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);var Nb=(r-Eb)/e.StallCount,qe=[],Hd=[],Id=[],Jd=[];Y=J(e,u);Y=""==Y?"#000000;":Y.replace("stokreColor=","");var re="part=1;fillColor="+Y;re+=b(re,e,u,v);var se=b("",e,u,v);for(l=0;l<e.StallCount;l++)qe[l]=new mxCell("",new mxGeometry((l+1)*Nb,0,Eb,p),re),qe[l].vertex=!0,v.insert(qe[l]),Id[l]=new mxCell("",new mxGeometry(Eb+l*Nb+.05*(Nb-Eb),p-.92*(Nb-Eb),.9*(Nb-Eb),.92*(Nb-Eb)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),+Id[l].vertex=!0,v.insert(Id[l]),Id[l].style+=se,Hd[l]=new mxCell("",new mxGeometry(Eb+l*Nb+.2*(Nb-Eb),0,.6*(Nb-Eb),.8*(Nb-Eb)),"shape=mxgraph.floorplan.toilet;part=1;"),Hd[l].vertex=!0,v.insert(Hd[l]),Hd[l].style+=se,Jd[l]=new mxCell("",new mxGeometry(Eb+l*Nb,.42*p,.15*(Nb-Eb),.12*(Nb-Eb)),"part=1;"),Jd[l].vertex=!0,v.insert(Jd[l]),Jd[l].style+=se;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var ae="edgeStyle=none;endArrow=none;part=1;";Y=J(e,u);Y=""==Y?"#000000;":Y.replace("strokeColor=",+"");var Uc="shape=triangle;part=1;fillColor="+Y;Uc+=b(Uc,e,u,v);ea=new mxCell("",new mxGeometry(0,0,0,0),ae);ea.geometry.relative=!0;ea.edge=!0;fb(0,.5*p,.65*r,.5*p,ea,F,D,Oa,v,oa);var ha=p/e.numLines;da=[];var Vc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),da[l].geometry.relative=!0,da[l].edge=!0,fb(.65*r,.5*p,.96*r,(l+.5)*ha,da[l],F,D,Oa,v,oa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ha,.05*r,.6*ha),Uc),Vc[l].vertex=!0,v.insert(Vc[l]);break;case "PEMultilines":v.style+=+"strokeColor=none;fillColor=none;";ae="edgeStyle=none;endArrow=none;part=1;";Y=J(e,u);Y=""==Y?"#000000;":Y.replace("strokeColor=","");Uc="shape=triangle;part=1;fillColor="+Y;Uc+=b(Uc,e,u,v);ha=p/e.numLines;da=[];Vc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),da[l].geometry.relative=!0,da[l].edge=!0,fb(0,(l+.5)*ha,.96*r,(l+.5)*ha,da[l],F,D,Oa,v,oa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ha,.05*r,.6*ha),Uc),Vc[l].vertex=!0,v.insert(Vc[l]);break;case "PEVesselBlock":v.style+=+"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);switch(e.vesselType){case 1:v.style+="shape=mxgraph.pid.vessels.pressurized_vessel;";break;case 2:v.style+="shape=hexagon;perimeter=hexagonPerimeter2;size=0.10;direction=south;"}v.style+=b(v.style,e,u,v,G);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);1==e.peakedRoof&&0==e.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==e.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");+v.style+=b(v.style,e,u,v,G);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style=0==e.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";v.style+=b(v.style,e,u,v,G);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.2*p,r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");+x.vertex=!0;v.insert(x);x.style+=ia;x.style+=b(x.style,e,u,x);ia="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=!0,ea.edge=!0,ea.style+=ia,ea.style+=b(ea.style,e,u,ea),fb(0,0,0,.2*p,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ia,da.style+=b(da.style,e,u,da),fb(r,.67*p,r,p,da,F,D,Oa,v,oa)):(x.style+="flipH=1;",ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=+!0,ea.edge=!0,ea.style+=ia,ea.style+=b(ea.style,e,u,ea),fb(0,0,0,.33*p,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ia,da.style+=b(da.style,e,u,da),fb(r,.8*p,r,p,da,F,D,Oa,v,oa));1==e.centerLineType&&(xa=new mxCell("",new mxGeometry(0,0,0,0),""),xa.geometry.relative=!0,xa.edge=!0,xa.style+=ia,xa.style+=b(xa.style,e,u,xa),fb(.2*r,.5*p,.8*r,.5*p,xa,F,D,Oa,v,oa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.2*p,.6*r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(w.Class){case "PEIndicatorBlock":v.style+="shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+=+"shape=mxgraph.pid2inst.indicator;indType=inst;";break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+="shape=mxgraph.pid2inst.progLogCont;"}v.style+=b(v.style,e,u,v);"PEIndicator2Block"==w.Class||"PESharedIndicator2Block"==w.Class?(x=new mxCell("",+new mxGeometry(0,0,r,.5*r),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,.5*r,r,.5*r),"part=1;strokeColor=none;fillColor=none;")):(x=new mxCell("",new mxGeometry(0,0,r,.5*p),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,.5*p,r,.5*p),"part=1;strokeColor=none;fillColor=none;"));+E.vertex=!0;v.insert(E);E.value=m(e.BotText);E.style+=a(e.BotText,G);E.style+=b(E.style,e,u,E,G);switch(e.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var te=!1;"PEPoweredValveBlock"==w.Class?1!=e.poweredHandOperated&&(te=!0):1!=+e.handOperated&&(te=!0);if(te){e=h(w).Properties;P=e.BoundingBox;var Sf=P.h;P.h="PEAngleValveBlock"==w.Class||"PEAngleGlobeValveBlock"==w.Class?.7*P.h:.6*P.h;v=new mxCell("",new mxGeometry(Math.round(.75*P.x+wc),Math.round(.75*(P.y+Sf-P.h)+xc),Math.round(.75*P.w),Math.round(.75*P.h)),"");v.vertex=!0;Qb(v,w,D)}if("PEPoweredValveBlock"==w.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",v.style+=b(v.style,e,u,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",+x=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*p),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),x.vertex=!0,v.insert(x),x.value=m(e.PoweredText),x.style+=(G?"":q(e.PoweredText)+t(e.PoweredText)+C(e.PoweredText)+I(e.PoweredText)+M(e.PoweredText)+Q(e.PoweredText)+S(e.PoweredText))+"fontSize=6;"+H(e.PoweredText),x.style+=b(x.style,e,u,x,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=m(e.Text);switch(w.Class){case "PEGateValveBlock":v.style+=+"valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==e.handOperated&&(v.style+="actuator=man;")}v.style+=b(v.style,e,u,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):+new mxCell("",new mxGeometry(1,0,20,p-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,110),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),+ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v);break;case "UI2WindowBlock":v.value=m(e.Title);v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+(G?"fontSize=13;":f(e.Title)+q(e.Title)+t(e.Title));1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,+0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,30),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=+!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v,G);break;case "UI2DialogBlock":v.value=m(e.Text);v.style+=a(e.Text,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=b(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=new mxPoint(-25,-10);+E.vertex=!0;x.insert(E);1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,30),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,+1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v);e.Text=null;break;case "UI2AccordionBlock":x=[];ha=25;for(l=0;l<=e.Panels-1;l++)x[l]=l<e.Selected-1?new mxCell("",new mxGeometry(0,l*ha,r,ha),"part=1;fillColor=#000000;fillOpacity=25;"):+l==e.Selected-1?new mxCell("",new mxGeometry(0,l*ha,r,ha),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,p-(e.Panels-e.Selected)*ha+(l-e.Selected)*ha,r,ha),"part=1;fillColor=#000000;fillOpacity=25;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Panel_"+(l+1)]),x[l].style+=a(e["Panel_"+(l+1)],G),0>x[l].style.indexOf(";align=")&&(x[l].style+="align=left;spacingLeft=5;");var Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?+new mxCell("",new mxGeometry(1,0,20,p-e.Selected*ha-20-(e.Panels-e.Selected)*ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-e.Selected*ha-(e.Panels-e.Selected)*ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,e.Selected*ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,+e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*ha),U.vertex=!0,v.insert(U),U.style+=Ua,U.style+=b(U.style,e,u,U));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,e.Selected*ha,r-20,p-e.Selected*ha-+20-(e.Panels-e.Selected)*ha),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*ha,r-20,p-e.Selected*ha-(e.Panels-e.Selected)*ha),"part=1;fillColor=none;strokeColor=none;");ta.vertex=!0;v.insert(ta);ta.value=m(e.Content_1);ta.style+=a(e.Content_1,G);!G&&0>ta.style.indexOf(";align=")&&(ta.style+="align=left;spacingLeft=5;");v.style+=b(v.style,e,u,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];ha=25;var Hb=3,Ha=(r+Hb)/+(e.Tabs+1),hb=new mxCell("",new mxGeometry(0,ha,r,p-ha),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Hb,ha),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Hb,ha),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Hb,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=+!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,e,u,E[l]);Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),+E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=+Ua,U.style+=b(U.style,e,u,U));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];ha=25;Hb=3;Ha=(r+Hb)/e.Tabs;hb=new mxCell("",new mxGeometry(0,ha,r,p-ha),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=+b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Hb,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;");Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):+new mxCell("",new mxGeometry(1,0,20,p-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),+U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Ua,U.style+=b(U.style,e,u,U));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];Hb=3;ha=25+Hb;Ha=80;zc=10;hb=new mxCell("",new mxGeometry(Ha,0,r-Ha,p),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,zc+l*ha,Ha,ha-Hb),""),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Tab_"++(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G)):(x[l]=new mxCell("",new mxGeometry(0,zc+l*ha,Ha,ha-Hb),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,ha-Hb),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G)),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,+e,u,E[l]);Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,0),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",+E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(Ha,1,r-20-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(Ha,1,r-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Ua,U.style+=b(U.style,e,u,U));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";+ha=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,l*ha+.5*ha-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=J(e,u),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,+2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(l*Ha,.5*p-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=+a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=J(e,u),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";ha=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,+l*ha+.5*ha-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=J(e,u),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"ellipse;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Y,E[l].style+=+b(E[l].style,e,u,E[l]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(l*Ha,.5*p-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=J(e,u),+Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"ellipse;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2SelectBlock":v.style+="shape=mxgraph.mockup.forms.comboBox;strokeColor=#999999;fillColor=#ddeeff;align=left;fillColor2=#aaddff;mainText=;fontColor=#666666";v.value=m(e.Selected);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+="shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;";+"UI2VSliderBlock"==w.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";v.style+=b(v.style,e,u,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(0,0,.6*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Date);x.style+=a(e.Date,G);v.style+=b(v.style,e,u,v);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");E=new mxCell("",new mxGeometry(.75*r,0,.25*r,p),"part=1;shape=mxgraph.gmdl.calendar;");+E.vertex=!0;v.insert(E);E.style+=Y;E.style+=b(E.style,e,u,E);break;case "UI2SearchBlock":v.value=m(e.Search);v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+a(e.Search,G);v.style+=b(v.style,e,u,v,G);break;case "UI2NumericStepperBlock":Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");v.value=m(e.Number);v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"++Y+a(e.Number,G);v.style+=b(v.style,e,u,v,G);break;case "UI2TableBlock":try{kb=T(e.FillColor);var Kd=T(e.LineColor);Sc="";var be=20;v.style="html=1;overflow=fill;verticalAlign=top;spacing=0;";var Ld='<table style="width:100%;height:100%;border-collapse: collapse;border: 1px solid '+Kd+';">',tc=e.Data.split("\n");var hf=e.AltRow&&"default"!=e.AltRow?"none"==e.AltRow?kb:T(e.AltRow):Rd(kb,.95);Oc=e.Header&&"default"!=e.Header?"none"==e.Header?hf:T(e.Header):Rd(kb,.8);if("full"==e.GridLines)Sc="border: 1px solid "++Kd,be=19;else if("row"==e.GridLines)Sc="border-bottom: 1px solid "+Kd,be=19;else if("default"==e.GridLines||"column"==e.GridLines)Sc="border-right: 1px solid "+Kd;tc=tc.filter(function(gb){return gb});/^\{[^}]*\}$/.test(tc[tc.length-1])&&tc.pop();Fc=tc[0].split(",").length;var jf="";for(fa=0;fa<Fc-1;fa++)jf+=" , ";for(l=tc.length;l<Math.ceil(p/20);l++)tc.push(jf);for(l=0;l<tc.length;l++){Ld+='<tr style="height: '+be+"px;background:"+(0==l?Oc:l%2?kb:hf)+'">';var kf=tc[l].split(",");for(fa=0;fa<kf.length;fa++){var Md=+e["Cell_"+l+"_"+fa],Tf=Md&&Md.m&&Md.m[0]&&"c"==Md.m[0].n?T(Md.m[0].v):Kd;Ld+='<td style="height: '+be+"px;color:"+Tf+";"+Sc+'">'+mxUtils.htmlEntities(kf[fa])+"</td>"}Ld+="</tr>"}Ld+="</table>";v.value=Ld}catch(gb){console.log(gb)}break;case "UI2ButtonBarBlock":v.style+=b(v.style,e,u,v);x=[];E=[];Ha=r/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),"strokeColor=none;"),+x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,p),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G);break;case "UI2VerticalButtonBarBlock":v.style+=b(v.style,e,u,v);x=[];E=[];ha=p/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,l*ha,r,ha),""),E[l].vertex=!0,v.insert(E[l])):+(x[l]=new mxCell("",new mxGeometry(0,l*ha,r,ha),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,r,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)0!=+l?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),E[l].style+=b(E[l].style,e,u,E[l])):E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),"fillColor=none;strokeColor=none;"),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Link_"+(l+1)]),E[l].style+=a(e["Link_"+(l+1)],G);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)x[l]=new mxCell("",new mxGeometry(l*+Ha,0,Ha,p),"fillColor=none;strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Link_"+(l+1)]),x[l].style+=a(e["Link_"+(l+1)],G);for(l=1;l<e.Links;l++)E[l]=new mxCell("",new mxGeometry(l/e.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),E[l].geometry.relative=!0,E[l].geometry.offset=new mxPoint(-3,-5),E[l].vertex=!0,v.insert(E[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);x=[];Ha=r/(e.Buttons+1);for(l=0;l<=e.Buttons-1;l++)x[l]=l!=e.Selected-+1?new mxCell("",new mxGeometry(0,0,Ha,p),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,Ha,p),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),x[l].geometry.relative=!0,x[l].geometry.offset=new mxPoint(l*Ha,0),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["MenuItem_"+(l+1)]),x[l].style+=a(e["MenuItem_"+(l+1)],G);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";+break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_prev);v.value=m(e.Text_prev)+" ";for(l=0;l<e.Links;l++)v.value+=m(e["Link_"+(l+1)])+" ";v.value+=m(e.Text_next);break;case "UI2ContextMenuBlock":v.style+=b(v.style,e,u,v);X=[];nb=[];var jd=[];ha=p/e.Lines;ia=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ia&&(ia=""+f(e["Item_"+(l+1)])+q(e["Item_"+(l+1)])+t(e["Item_"+(l+1)])),X[l]=new mxCell("",new mxGeometry(0,l*p/e.Lines,r,ha),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia,X[l].value=m(e["Item_"+(l+1)])),null!=e.Icons[l+1]&&null!=X[l]&&("dot"==e.Icons[l+1]?(nb[l]=new mxCell("",new mxGeometry(0,.5,8,8),"ellipse;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6,-4)):"check"==e.Icons[l+1]&&(nb[l]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6.5,-4)),null!=nb[l]&&(nb[l].geometry.relative=!0,nb[l].vertex=!0,X[l].insert(nb[l]),Y=J(e,u),+Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),nb[l].style+=Y)),null!=e["Shortcut_"+(l+1)]&&(null==ia&&(ia=""+f(e["Shortcut_"+(l+1)])+q(e["Shortcut_"+(l+1)])+t(e["Shortcut_"+(l+1)])),jd[l]=new mxCell("",new mxGeometry(.6*r,l*p/e.Lines,.4*r,ha),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),jd[l].vertex=!0,v.insert(jd[l]),jd[l].style+=ia,jd[l].value=m(e["Shortcut_"+(l+1)])),null!=e.Dividers[l+1]&&(X[l]=new mxCell("",new mxGeometry(.05*r,l*p/e.Lines,.9*+r,ha),"shape=line;strokeWidth=1;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=J(e,u));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*e.ScrollVal+";";break;case "CalloutSquareBlock":case "UI2TooltipSquareBlock":v.value=m(e.Tip||e.Text);v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+e.RoundCorners+";"+a(e.Tip||e.Text,G);v.style+=b(v.style,e,u,v,G);v.geometry.height+=10;break;case "UI2CalloutBlock":v.value=+m(e.Txt);v.style+="shape=ellipse;perimeter=ellipsePerimeter;"+a(e.Txt,G);v.style+=b(v.style,e,u,v,G);break;case "UI2AlertBlock":v.value=m(e.Txt);v.style+=a(e.Txt,G);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=b(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=+new mxPoint(-25,-10);E.vertex=!0;x.insert(E);var Uf=45*e.Buttons+(10*e.Buttons-1);U=[];for(l=0;l<e.Buttons;l++)U[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),U[l].geometry.relative=!0,U[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),U[l].vertex=!0,v.insert(U[l]),U[l].value=m(e["Button_"+(l+1)]),U[l].style+=a(e["Button_"+(l+1)],G),U[l].style+=b(U[l].style,e,u,U[l],G);break;case "UMLClassBlock":if(0==e.Simple){ia=ca(e,u);db=Math.round(.75*e.TitleHeight)||25;ia=ia.replace("fillColor",+"swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ia+"startSize="+db+";"+a(e.Title,G);v.style+=b(v.style,e,u,v,G);X=[];var ue=[],wb=db/p;Wb=db;for(l=0;l<=e.Attributes;l++)0<l&&(ue[l]=new mxCell("",new mxGeometry(0,Wb,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),+Wb+=8,ue[l].vertex=!0,v.insert(ue[l])),ha=0,0==e.Attributes?ha=l=1:l<e.Attributes?(ha=e["Text"+(l+1)+"Percent"],wb+=ha):ha=1-wb,pc=Math.round((p-db)*ha)+(e.ExtraHeightSet&&1==l?.75*e.ExtraHeight:0),X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;whiteSpace=wrap;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),X[l].style+=+ia+O(e,u,X[l])+a(e["Text"+(l+1)],G),X[l].value=m(e["Text"+(l+1)])}else v.value=m(e.Title),v.style+="align=center;",v.style+=a(e.Title,G),v.style+=b(v.style,e,u,v,G);break;case "ERDEntityBlock":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ia+"startSize="++db+";"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);e.ShadedHeader?(ia=T(e.FillColor),je=Rd(ia,.85),v.style+="fillColor="+je+";"):v.style+=ca(e,u);X=[];wb=db/p;Wb=db;for(l=0;l<e.Fields;l++)ha=0,pc=.75*e["Field"+(l+1)+"_h"],X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),+X[l].style+=ia+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;opacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]);break;case "ERDEntityBlock2":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ia+"startSize="+db+";"+a(e.Name,G);v.style=e.ShadedHeader?+v.style+"fillColor=#e0e0e0;":v.style+ca(e,u);v.style+=b(v.style,e,u,v,G);X=[];var Ga=[];wb=db;var Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ia+a(e["Key"+(l+1)],+G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,u,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=+ia+a(e["Field"+(l+1)],G),v.style+=b(v.style,e,u,v),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ia+"startSize="+db++";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ca(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Ga=[];wb=db;Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Field"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),+Ga[l].style+=ia+a(e["Field"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,u,Ga[l])),Ga[l].value=m(e["Field"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,u,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia+a(e["Type"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Type"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"++ia+"startSize="+db+";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ca(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Ga=[];var Jb=[];wb=db;Ib=30;var ce=40;null!=e.Column1&&(Ib=.75*e.Column1);null!=e.Column2&&(ce=.75*e.Column2);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),+Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ia+a(e["Key"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,u,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,u,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib-ce,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),Jb[l]=new mxCell("",new mxGeometry(r-ce,wb,ce,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),+Jb[l].vertex=!0,v.insert(Jb[l]),Jb[l].style+=ia+a(e["Type"+(l+1)],G),Jb[l].style=1==e.AltRows&&0!=l%2?Jb[l].style+"fillColor=#000000;fillOpacity=5;":Jb[l].style+("fillColor=none;"+O(e,u,Jb[l])),Jb[l].value=m(e["Type"+(l+1)]),Jb[l].style+=b(Jb[l].style,e,u,Jb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Sa("application_system",r,p,v,e,u);break;case "GCPServiceCardAuthorizationBlock":Sa("internal_payment_authorization",r,p,v,e,u);break;case "GCPServiceCardBlankBlock":Sa("blank",+r,p,v,e,u);break;case "GCPServiceCardReallyBlankBlock":Sa("blank",r,p,v,e,u);break;case "GCPServiceCardBucketBlock":Sa("bucket",r,p,v,e,u);break;case "GCPServiceCardCDNInterconnectBlock":Sa("google_network_edge_cache",r,p,v,e,u);break;case "GCPServiceCardCloudDNSBlock":Sa("blank",r,p,v,e,u);break;case "GCPServiceCardClusterBlock":Sa("cluster",r,p,v,e,u);break;case "GCPServiceCardDiskSnapshotBlock":Sa("persistent_disk_snapshot",r,p,v,e,u);break;case "GCPServiceCardEdgePopBlock":Sa("google_network_edge_cache",+r,p,v,e,u);break;case "GCPServiceCardFrontEndPlatformServicesBlock":Sa("frontend_platform_services",r,p,v,e,u);break;case "GCPServiceCardGatewayBlock":Sa("gateway",r,p,v,e,u);break;case "GCPServiceCardGoogleNetworkBlock":Sa("google_network_edge_cache",r,p,v,e,u);break;case "GCPServiceCardImageServicesBlock":Sa("image_services",r,p,v,e,u);break;case "GCPServiceCardLoadBalancerBlock":Sa("network_load_balancer",r,p,v,e,u);break;case "GCPServiceCardLocalComputeBlock":Sa("dedicated_game_server",r,p,v,+e,u);break;case "GCPServiceCardLocalStorageBlock":Sa("persistent_disk_snapshot",r,p,v,e,u);break;case "GCPServiceCardLogsAPIBlock":Sa("logs_api",r,p,v,e,u);break;case "GCPServiceCardMemcacheBlock":Sa("memcache",r,p,v,e,u);break;case "GCPServiceCardNATBlock":Sa("nat",r,p,v,e,u);break;case "GCPServiceCardPaymentFormBlock":Sa("external_payment_form",r,p,v,e,u);break;case "GCPServiceCardPushNotificationsBlock":Sa("push_notification_service",r,p,v,e,u);break;case "GCPServiceCardScheduledTasksBlock":Sa("scheduled_tasks",+r,p,v,e,u);break;case "GCPServiceCardServiceDiscoveryBlock":Sa("service_discovery",r,p,v,e,u);break;case "GCPServiceCardSquidProxyBlock":Sa("squid_proxy",r,p,v,e,u);break;case "GCPServiceCardTaskQueuesBlock":Sa("task_queues",r,p,v,e,u);break;case "GCPServiceCardVirtualFileSystemBlock":Sa("virtual_file_system",r,p,v,e,u);break;case "GCPServiceCardVPNGatewayBlock":Sa("gateway",r,p,v,e,u);break;case "GCPInputDatabase":Wa("database",1,.9,r,p,v,e,u);break;case "GCPInputRecord":Wa("record",1,.66,r,p,v,+e,u);break;case "GCPInputPayment":Wa("payment",1,.8,r,p,v,e,u);break;case "GCPInputGateway":Wa("gateway_icon",1,.44,r,p,v,e,u);break;case "GCPInputLocalCompute":Wa("compute_engine_icon",1,.89,r,p,v,e,u);break;case "GCPInputBeacon":Wa("beacon",.73,1,r,p,v,e,u);break;case "GCPInputStorage":Wa("storage",1,.8,r,p,v,e,u);break;case "GCPInputList":Wa("list",.89,1,r,p,v,e,u);break;case "GCPInputStream":Wa("stream",1,.82,r,p,v,e,u);break;case "GCPInputMobileDevices":Wa("mobile_devices",1,.73,r,p,v,e,u);break;+case "GCPInputCircuitBoard":Wa("circuit_board",1,.9,r,p,v,e,u);break;case "GCPInputLive":Wa("live",.74,1,r,p,v,e,u);break;case "GCPInputUsers":Wa("users",1,.63,r,p,v,e,u);break;case "GCPInputLaptop":Wa("laptop",1,.66,r,p,v,e,u);break;case "GCPInputApplication":Wa("application",1,.8,r,p,v,e,u);break;case "GCPInputLightbulb":Wa("lightbulb",.7,1,r,p,v,e,u);break;case "GCPInputGame":Wa("game",1,.54,r,p,v,e,u);break;case "GCPInputDesktop":Wa("desktop",1,.9,r,p,v,e,u);break;case "GCPInputDesktopAndMobile":Wa("desktop_and_mobile",+1,.66,r,p,v,e,u);break;case "GCPInputWebcam":Wa("webcam",.5,1,r,p,v,e,u);break;case "GCPInputSpeaker":Wa("speaker",.7,1,r,p,v,e,u);break;case "GCPInputRetail":Wa("retail",1,.89,r,p,v,e,u);break;case "GCPInputReport":Wa("report",1,1,r,p,v,e,u);break;case "GCPInputPhone":Wa("phone",.64,1,r,p,v,e,u);break;case "GCPInputBlank":Wa("transparent",1,1,r,p,v,e,u);break;case "PresentationFrameBlock":0==e.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=a(e.Text),v.value=m(e.Text),v.style+=b(v.style,+e,u,v,G));break;case "SVGPathBlock2":try{var Vf=e.LineWidth,Wf=e.LineColor,lf=e.FillColor,mf=e.DrawData.Data,de='<svg viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg">',ve=null;for(l=0;l<mf.length;l++){var uc=mf[l],Xf=uc.a,Yf=("prop"==uc.w||null==uc.w?Vf:uc.w)/Math.min(r,p)*.75;Rc="prop"==uc.s||null==uc.s?Wf:uc.s;Y="prop"==uc.f||null==uc.f?lf:uc.f;"object"==typeof Y&&(null!=Y.url&&(ve="shape=image;image="+g(Y.url)+";"),Y=Array.isArray(Y.cs)?Y.cs[0].c:lf);de+='<path d="'+Xf+'" fill="'+Y+'" stroke="'++Rc+'" stroke-width="'+Yf+'"/>'}de+="</svg>";v.style=ve?ve:"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+(window.btoa?btoa(de):Base64.encode(de,!0))+";"}catch(gb){}break;case "BraceBlock":case "BraceBlockRotated":case "BracketBlock":case "BracketBlockRotated":var nf=0==V.indexOf("Bracket")?"size=0;arcSize=50;":"",of=b(v.style,e,u,v,G);mb=ba(e,u,v);v.style="group;"+mb;var we=Math.min(.14*(mb?r:p),100),xe=+new mxCell("",new mxGeometry(0,0,we,p),"shape=curlyBracket;rounded=1;"+nf+of);xe.vertex=!0;xe.geometry.relative=!0;var ye=new mxCell("",new mxGeometry(1-we/r,0,we,p),"shape=curlyBracket;rounded=1;flipH=1;"+nf+of);ye.vertex=!0;ye.geometry.relative=!0;v.insert(xe);v.insert(ye);break;case "BPMNTextAnnotation":case "NoteBlock":e.InsetMargin=null;v.value=m(e.Text);v.style="group;spacingLeft=8;align=left;spacing=0;strokeColor=none;";v.style+=b(v.style,e,u,v,G);0>v.style.indexOf("verticalAlign")&&(v.style+=+"verticalAlign=middle;");var kd=new mxCell("",new mxGeometry(0,0,8,p),"shape=partialRectangle;right=0;fillColor=none;");kd.geometry.relative=!0;kd.vertex=!0;kd.style+=b(kd.style,e,u,v,G);v.insert(kd);break;case "VSMTimelineBlock":case "TimelineBlock":case "TimelineMilestoneBlock":case "TimelineIntervalBlock":LucidImporter.hasTimeLine=!0;LucidImporter.hasUnknownShapes=!0;break;case "FreehandBlock":try{mb=ba(e,u,v);v.style="group;"+mb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",+Ke(e.Stencil.id,e.Stencil));var Ob=LucidImporter.stencilsMap[e.Stencil.id],Zf=-Ob.x/Ob.w,$f=-Ob.y/Ob.h;for(l=0;l<Ob.stencils.length;l++){var ob=Ob.stencils[l];oa=new mxCell("",new mxGeometry(Zf,$f,r,p),"shape="+ob.shapeStencil+";");var ag=ob.FillColor,bg=ob.LineColor,cg=ob.LineWidth;"prop"==ob.FillColor&&(ob.FillColor=e.FillColor);null==ob.FillColor&&(ob.FillColor="#ffffff00");"prop"==ob.LineColor&&(ob.LineColor=e.LineColor);null==ob.LineColor&&(ob.LineColor="#ffffff00");"prop"==ob.LineWidth&&(ob.LineWidth=+e.LineWidth);oa.style+=b(oa.style,ob,u,oa,G);ob.FillColor=ag;ob.LineColor=bg;ob.LineWidth=cg;Y=e.FillColor;var dg=e.LineColor,eg=e.LineWidth;e.FillColor=null;e.LineColor=null;e.LineWidth=null;oa.style+=b(oa.style,e,u,oa,G);e.FillColor=Y;e.LineColor=dg;e.LineWidth=eg;oa.vertex=!0;oa.geometry.relative=!0;v.insert(oa)}var Xb=0;for(mb=e.Rotation;e["t"+Xb];){var pf=e["t"+Xb],qf=m(pf);if(qf){ra=new mxCell(qf,new mxGeometry(0,0,r,p),"strokeColor=none;fillColor=none;overflow=visible;");e.Rotation=0;ra.style+=+b(ra.style,pf,u,ra,G);ra.style+=b(ra.style,e,u,ra,G);e.Rotation=mb;if(null!=Ob.text&&null!=Ob.text["t"+Xb]){var eb=Ob.text["t"+Xb];eb.Rotation=mb+(eb.rotation?eb.rotation:0)+(e["t"+Xb+"_TRotation"]?e["t"+Xb+"_TRotation"]:0)+(e["t"+Xb+"_TAngle"]?e["t"+Xb+"_TAngle"]:0);ra.style+=b(ra.style,eb,u,ra,G);var Yb=ra.geometry;eb.w&&(Yb.width*=eb.w/Ob.w);eb.h&&(Yb.height*=eb.h/Ob.h);eb.x&&(Yb.x=eb.x/Ob.w);eb.y&&(Yb.y=eb.y/Ob.h);eb.fw&&(Yb.width*=.75*eb.fw/r);eb.fh&&(Yb.height*=.75*eb.fh/p);eb.fx&&(Yb.x=(0<+eb.fx?1:0)+.75*eb.fx/r);eb.fy&&(Yb.y=(0<eb.fy?1:0)+.75*eb.fy/p)}ra.vertex=!0;ra.geometry.relative=!0;v.insert(ra)}Xb++}}if(e.FillColor&&e.FillColor.url){var Nd=new mxCell("",new mxGeometry(0,0,r,p),"shape=image;html=1;");Nd.style+=Fa({},{},e.FillColor.url);Nd.vertex=!0;Nd.geometry.relative=!0;v.insert(Nd)}}catch(gb){console.log("Freehand error",gb)}break;case "RightArrowBlock":var ze=e.Head*p/r;v.style="shape=singleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=b(v.style,+e,u,v,G);break;case "DoubleArrowBlock":ze=e.Head*p/r;v.style="shape=doubleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "VPCSubnet2017":case "VirtualPrivateCloudContainer2017":case "ElasticBeanStalkContainer2017":case "EC2InstanceContents2017":case "AWSCloudContainer2017":case "CorporateDataCenterContainer2017":switch(V){case "VPCSubnet2017":var ld="shape=mxgraph.aws3.permissions;fillColor=#D9A741;";var md=30;var nd=35;break;case "VirtualPrivateCloudContainer2017":ld="shape=mxgraph.aws3.virtual_private_cloud;fillColor=#F58536;";md=52;nd=36;break;case "ElasticBeanStalkContainer2017":ld="shape=mxgraph.aws3.elastic_beanstalk;fillColor=#F58536;";md=30;nd=41;break;case "EC2InstanceContents2017":ld="shape=mxgraph.aws3.instance;fillColor=#F58536;";md=40;nd=41;break;case "AWSCloudContainer2017":ld="shape=mxgraph.aws3.cloud;fillColor=#F58536;";md=52;nd=36;break;case "CorporateDataCenterContainer2017":ld="shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;",md=-30,nd=42}v.style="rounded=1;arcSize=10;dashed=0;verticalAlign=bottom;";v.value=m(e);v.style+=b(v.style,e,t,v,G);v.geometry.y+=20;v.geometry.height-=20;nb=new mxCell("",new mxGeometry(20,-20,md,nd),ld);nb.vertex=!0;v.insert(nb);break;case "FlexiblePolygonBlock":var Wc=['<shape strokewidth="inherit"><foreground>'];Wc.push("<path>");for(fa=0;fa<e.Vertices.length;fa++)Qa=e.Vertices[fa],0==fa?Wc.push('<move x="'+100*Qa.x+'" y="'+100*Qa.y+'"/>'):Wc.push('<line x="'+100*Qa.x+'" y="'+100*Qa.y+'"/>');Wc.push("</path>");-Wc.push("<fillstroke/>");Wc.push("</foreground></shape>");v.style="shape=stencil("+Graph.compress(Wc.join(""))+");";v.value=m(e);v.style+=b(v.style,e,t,v,G);break;case "InfographicsBlock":var rf=e.ShapeData_1.Value,Ae=e.ShapeData_2.Value-rf,Be=e.ShapeData_3.Value-rf,ee=e.ShapeData_4.Value*r/200;Xb="ProgressBar"==e.InternalStencilId?4:5;kb=e["ShapeData_"+Xb].Value;kb="=fillColor()"==kb?e.FillColor:kb;var od=e["ShapeData_"+(Xb+1)].Value;switch(e.InternalStencilId){case "ProgressDonut":v.style="shape=mxgraph.basic.donut;dx="+-ee+";strokeColor=none;fillColor="+S(od)+";"+ka(od,"fillOpacity");v.style+=b(v.style,e,t,v,G);var ab=new mxCell("",new mxGeometry(0,0,r,q),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Be/Ae+";arcWidth="+ee/r*2+";strokeColor=none;fillColor="+S(kb)+";"+ka(kb,"fillOpacity"));ab.style+=b(ab.style,e,t,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressHalfDonut":v.geometry.height*=2;v.geometry.rotate90();var sf=Be/Ae/2;v.style="shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+-sf+";arcWidth="+2*ee/r+";strokeColor=none;fillColor="+S(kb)+";"+ka(kb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=b(v.style,e,t,v,G);ab=new mxCell("",new mxGeometry(0,0,v.geometry.width,v.geometry.height),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+(.5-sf)+";arcWidth="+2*ee/r+";strokeColor=none;flipH=1;fillColor="+S(od)+";"+ka(od,"fillOpacity"));e.Rotation+=Math.PI;ab.style+=b(ab.style,e,t,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressBar":v.style="strokeColor=none;fillColor="+-S(od)+";"+ka(od,"fillOpacity"),v.style+=b(v.style,e,t,v,G),ab=new mxCell("",new mxGeometry(0,0,r*Be/Ae,q),"strokeColor=none;fillColor="+S(kb)+";"+ka(kb,"fillOpacity")),ab.style+=b(ab.style,e,t,ab,G),ab.vertex=!0,ab.geometry.relative=1,v.insert(ab)}break;case "InternalStorageBlock":v.style+="shape=internalStorage;dx=10;dy=10";if(e.Text&&e.Text.m){var fe=e.Text.m,Ce=!1,De=!1;for(l=0;l<fe.length;l++){var pd=fe[l];Ce||"mt"!=pd.n?De||"il"!=pd.n||(pd.v=17+(pd.v||0),De=!0):(pd.v=17+(pd.v||0),Ce=!0)}Ce||-fe.push({s:0,n:"mt",v:17});De||fe.push({s:0,n:"il",v:17})}v.value=m(e);v.style+=b(v.style,e,t,v,G);break;case "PersonRoleBlock":try{ia=ca(e,t);db=q/2;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Role);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ia+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Role,G);v.style+=b(v.style,-e,t,v,G);var Ec=new mxCell("",new mxGeometry(0,q/2,r,q/2),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");Ec.value=m(e.Name);Ec.vertex=!0;v.insert(Ec);Ec.style+=a(e.Name,G);Ec.style+=b(Ec.style,e,t,Ec,G)}catch(gb){console.log(gb)}}v.style&&0>v.style.indexOf("html")&&(v.style+="html=1;");if(e.Title&&e.Title.t&&e.Text&&e.Text.t)try{var tf=v.geometry,uf=new mxCell(m(e.Title),new mxGeometry(0,tf.height+4,tf.width,10),"strokeColor=none;fillColor=none;whiteSpace=wrap;verticalAlign=top;labelPosition=center;verticalLabelPosition=top;align=center;");-uf.vertex=!0;v.insert(uf);v.style+=a(e.Title,G)}catch(gb){console.log(gb)}Ge(v,e);pa(v,e,D);e.Hidden&&(v.visible=!1);return v}function Ge(u,F){if(F.Text_TRotation||F.TextRotation)try{var D=mxUtils.toDegree(F.Text_TRotation||0)+mxUtils.toDegree(F.TextRotation||0);if(!isNaN(D)&&0!=D&&u.value){var t=u.geometry.width,e=u.geometry.height,P=t,r=e,q=0,Z=0;if(-90==D||-270==D){P=e;r=t;var aa=(e-t)/2;q=-aa/t;Z=aa/e}D+=mxUtils.toDegree(F.Rotation);var V=u.style.split(";").filter(function(ja){return 0>ja.indexOf("fillColor=")&&-0>ja.indexOf("strokeColor=")&&0>ja.indexOf("rotation=")}).join(";"),wa=new mxCell(u.value,new mxGeometry(q,Z,P,r),V+"fillColor=none;strokeColor=none;rotation="+D+";");u.value=null;wa.geometry.relative=!0;wa.vertex=!0;u.insert(wa)}}catch(ja){console.log(ja)}}function Je(u,F,D,t,e){function P(Kb,$b){var Xa="";try{for(var pb=0;pb<Kb.text.length;pb++){var Nc=Kb.text[pb];if(Nc[0]=="t_"+$b){for(var Fc in Nc[1]){var Gc=Nc[1][Fc];if(Gc)switch(Fc){case "font":Xa+=y(Gc);break;case "bold":Xa+="font-weight: bold;";+30,nd=42}v.style="rounded=1;arcSize=10;dashed=0;verticalAlign=bottom;";v.value=m(e);v.style+=b(v.style,e,u,v,G);v.geometry.y+=20;v.geometry.height-=20;nb=new mxCell("",new mxGeometry(20,-20,md,nd),ld);nb.vertex=!0;v.insert(nb);break;case "FlexiblePolygonBlock":var Wc=['<shape strokewidth="inherit"><foreground>'];Wc.push("<path>");for(fa=0;fa<e.Vertices.length;fa++)Qa=e.Vertices[fa],0==fa?Wc.push('<move x="'+100*Qa.x+'" y="'+100*Qa.y+'"/>'):Wc.push('<line x="'+100*Qa.x+'" y="'+100*Qa.y+'"/>');Wc.push("</path>");+Wc.push("<fillstroke/>");Wc.push("</foreground></shape>");v.style="shape=stencil("+Graph.compress(Wc.join(""))+");";v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "InfographicsBlock":var rf=e.ShapeData_1.Value,Ae=e.ShapeData_2.Value-rf,Be=e.ShapeData_3.Value-rf,ee=e.ShapeData_4.Value*r/200;Xb="ProgressBar"==e.InternalStencilId?4:5;kb=e["ShapeData_"+Xb].Value;kb="=fillColor()"==kb?e.FillColor:kb;var od=e["ShapeData_"+(Xb+1)].Value;switch(e.InternalStencilId){case "ProgressDonut":v.style="shape=mxgraph.basic.donut;dx="++ee+";strokeColor=none;fillColor="+T(od)+";"+ka(od,"fillOpacity");v.style+=b(v.style,e,u,v,G);var ab=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Be/Ae+";arcWidth="+ee/r*2+";strokeColor=none;fillColor="+T(kb)+";"+ka(kb,"fillOpacity"));ab.style+=b(ab.style,e,u,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressHalfDonut":v.geometry.height*=2;v.geometry.rotate90();var sf=Be/Ae/2;v.style="shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="++sf+";arcWidth="+2*ee/r+";strokeColor=none;fillColor="+T(kb)+";"+ka(kb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=b(v.style,e,u,v,G);ab=new mxCell("",new mxGeometry(0,0,v.geometry.width,v.geometry.height),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+(.5-sf)+";arcWidth="+2*ee/r+";strokeColor=none;flipH=1;fillColor="+T(od)+";"+ka(od,"fillOpacity"));e.Rotation+=Math.PI;ab.style+=b(ab.style,e,u,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressBar":v.style="strokeColor=none;fillColor="++T(od)+";"+ka(od,"fillOpacity"),v.style+=b(v.style,e,u,v,G),ab=new mxCell("",new mxGeometry(0,0,r*Be/Ae,p),"strokeColor=none;fillColor="+T(kb)+";"+ka(kb,"fillOpacity")),ab.style+=b(ab.style,e,u,ab,G),ab.vertex=!0,ab.geometry.relative=1,v.insert(ab)}break;case "InternalStorageBlock":v.style+="shape=internalStorage;dx=10;dy=10";if(e.Text&&e.Text.m){var fe=e.Text.m,Ce=!1,De=!1;for(l=0;l<fe.length;l++){var pd=fe[l];Ce||"mt"!=pd.n?De||"il"!=pd.n||(pd.v=17+(pd.v||0),De=!0):(pd.v=17+(pd.v||0),Ce=!0)}Ce||+fe.push({s:0,n:"mt",v:17});De||fe.push({s:0,n:"il",v:17})}v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "PersonRoleBlock":try{ia=ca(e,u);db=p/2;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Role);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ia+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Role,G);v.style+=b(v.style,+e,u,v,G);var Ec=new mxCell("",new mxGeometry(0,p/2,r,p/2),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");Ec.value=m(e.Name);Ec.vertex=!0;v.insert(Ec);Ec.style+=a(e.Name,G);Ec.style+=b(Ec.style,e,u,Ec,G)}catch(gb){console.log(gb)}}v.style&&0>v.style.indexOf("html")&&(v.style+="html=1;");if(e.Title&&e.Title.t&&e.Text&&e.Text.t)try{var tf=v.geometry,uf=new mxCell(m(e.Title),new mxGeometry(0,tf.height+4,tf.width,10),"strokeColor=none;fillColor=none;whiteSpace=wrap;verticalAlign=top;labelPosition=center;verticalLabelPosition=top;align=center;");+uf.vertex=!0;v.insert(uf);v.style+=a(e.Title,G)}catch(gb){console.log(gb)}Ge(v,e);pa(v,e,D);e.Hidden&&(v.visible=!1);return v}function Ge(w,F){if(F.Text_TRotation||F.TextRotation)try{var D=mxUtils.toDegree(F.Text_TRotation||0)+mxUtils.toDegree(F.TextRotation||0);if(!isNaN(D)&&0!=D&&w.value){var u=w.geometry.width,e=w.geometry.height,P=u,r=e,p=0,Z=0;if(-90==D||-270==D){P=e;r=u;var aa=(e-u)/2;p=-aa/u;Z=aa/e}D+=mxUtils.toDegree(F.Rotation);var V=w.style.split(";").filter(function(ja){return 0>ja.indexOf("fillColor=")&&+0>ja.indexOf("strokeColor=")&&0>ja.indexOf("rotation=")}).join(";"),wa=new mxCell(w.value,new mxGeometry(p,Z,P,r),V+"fillColor=none;strokeColor=none;rotation="+D+";");w.value=null;wa.geometry.relative=!0;wa.vertex=!0;w.insert(wa)}}catch(ja){console.log(ja)}}function Je(w,F,D,u,e){function P(Kb,$b){var Xa="";try{for(var pb=0;pb<Kb.text.length;pb++){var Nc=Kb.text[pb];if(Nc[0]=="t_"+$b){for(var Fc in Nc[1]){var Gc=Nc[1][Fc];if(Gc)switch(Fc){case "font":Xa+=y(Gc);break;case "bold":Xa+="font-weight: bold;";break;case "italic":Xa+="font-style: italic;";break;case "underline":Xa+="text-decoration: underline;";break;case "size":Xa+="font-size:"+z(.75*Gc)+"px;";break;case "color":Xa+="color:"+R(Gc).substring(0,7)+";";break;case "fill":Xa+="background-color:"+R(Gc).substring(0,7)+";";break;case "align":Xa+="text-align:"+Gc+";"}}break}}}catch(Sd){}return Xa}try{var r=function(Kb,$b,Xa){Kb=Aa+Kb;ra[Kb]=$b;$b="";for(var pb=0;pb<V.length;pb++)$b+='<div style="'+ma[pb]+'">'+(Xa[V[pb]]||" ")+"</div>";pb=-mxUtils.getSizeForString($b);Xa=g(Xa.Image||Xa["018__ImageUrl__"])||"https://cdn4.iconfinder.com/data/icons/basic-user-interface-elements/700/user-account-profile-human-avatar-face-head--128.png";Xa=new mxCell($b,new mxGeometry(0,0,pb.width+Ba,pb.height+Pa),ua+(Ca?Xa:""));Xa.vertex=!0;e[Kb]=Xa;t.addCell(Xa,aa)},q=F.OrgChartBlockType,Z=F.Location,aa=new mxCell("",new mxGeometry(.75*Z.x,.75*Z.y,200,100),"group");aa.vertex=!0;t.addCell(aa);var V=F.FieldNames,wa=F.LayoutSettings,ja=F.BlockItemDefaultStyle||-{props:{}},na=F.EdgeItemDefaultStyle,ra={},Aa=(u||Date.now())+"_";4==q&&(ja.props.LineWidth=0);var ma=[],Ba=25,Pa=40,Ca=!0,ua=b("",ja.props,{},aa,!0);0==q?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Pa+=54):1==q||2==q?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=q&&(Ca=!1);for(u=0;u<V.length;u++)ma.push(P(ja,V[u]));if(D.Items)for(var Na=D.Items.n,Ka=0;Ka<Na.length;Ka++){var La=Na[Ka];-r(La.pk,La.ie[0]?La.ie[0].nf:null,La.f)}else{var l=F.ContractMap.derivative;if(null==l){var Ia=F.ContractMap.c.People;var bb=Ia.id;bb=bb.substr(0,bb.lastIndexOf("_"));for(u=0;u<V.length;u++)V[u]=Ia.f[V[u]]||V[u]}else for(Ka=0;Ka<l.length;Ka++)if("ForeignKeyGraph"==l[Ka].type)bb=l[Ka].c[0].id,bb=bb.substr(0,bb.lastIndexOf("_"));else if("MappedGraph"==l[Ka].type)for(u=0;u<V.length;u++)V[u]=l[Ka].nfs[V[u]]||V[u];var Ea;for(Ea in D){La=D[Ea].Collections;for(var Ra in La)if(Ra==bb)Na=La[Ra].Items;else if(La[Ra].Properties.ForeignKeys&&+mxUtils.getSizeForString($b);Xa=g(Xa.Image||Xa["018__ImageUrl__"])||"https://cdn4.iconfinder.com/data/icons/basic-user-interface-elements/700/user-account-profile-human-avatar-face-head--128.png";Xa=new mxCell($b,new mxGeometry(0,0,pb.width+Ba,pb.height+Pa),ua+(Ca?Xa:""));Xa.vertex=!0;e[Kb]=Xa;u.addCell(Xa,aa)},p=F.OrgChartBlockType,Z=F.Location,aa=new mxCell("",new mxGeometry(.75*Z.x,.75*Z.y,200,100),"group");aa.vertex=!0;u.addCell(aa);var V=F.FieldNames,wa=F.LayoutSettings,ja=F.BlockItemDefaultStyle||+{props:{}},na=F.EdgeItemDefaultStyle,ra={},Aa=(w||Date.now())+"_";4==p&&(ja.props.LineWidth=0);var ma=[],Ba=25,Pa=40,Ca=!0,ua=b("",ja.props,{},aa,!0);0==p?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Pa+=54):1==p||2==p?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=p&&(Ca=!1);for(w=0;w<V.length;w++)ma.push(P(ja,V[w]));if(D.Items)for(var Na=D.Items.n,Ka=0;Ka<Na.length;Ka++){var La=Na[Ka];+r(La.pk,La.ie[0]?La.ie[0].nf:null,La.f)}else{var l=F.ContractMap.derivative;if(null==l){var Ia=F.ContractMap.c.People;var bb=Ia.id;bb=bb.substr(0,bb.lastIndexOf("_"));for(w=0;w<V.length;w++)V[w]=Ia.f[V[w]]||V[w]}else for(Ka=0;Ka<l.length;Ka++)if("ForeignKeyGraph"==l[Ka].type)bb=l[Ka].c[0].id,bb=bb.substr(0,bb.lastIndexOf("_"));else if("MappedGraph"==l[Ka].type)for(w=0;w<V.length;w++)V[w]=l[Ka].nfs[V[w]]||V[w];var Ea;for(Ea in D){La=D[Ea].Collections;for(var Ra in La)if(Ra==bb)Na=La[Ra].Items;else if(La[Ra].Properties.ForeignKeys&&La[Ra].Properties.ForeignKeys[0]){var la=La[Ra].Properties.ForeignKeys[0].SourceFields[0];var Ma=La[Ra].Properties.Schema.PrimaryKey[0]}if(Na)break}F={};for(var ya in Na){La=Na[ya];var za=La[Ma],Pb=La[la];za==Pb?(F[za]=za+Date.now(),za=F[za],La[Ma]=za,r(za,Pb,La)):r(za,F[Pb]||Pb,La)}}for(Ea in ra){var fa=ra[Ea];if(null!=fa){var xb=e[Aa+fa],Va=e[Ea];if(null!=xb&&null!=Va){var rc=new mxCell("",new mxGeometry(0,0,100,100),"");rc.geometry.relative=!0;rc.edge=!0;null!=na&&null!=na.props&&Qb(rc,na.props,-t,null,null,!0);t.addCell(rc,aa,null,xb,Va)}}}var vc=.75*wa.NodeSpacing.LevelSeparation;(new mxOrgChartLayout(t,0,vc,.75*wa.NodeSpacing.NeighborSeparation)).execute(aa);for(Ka=wa=r=0;aa.children&&Ka<aa.children.length;Ka++){var Fb=aa.children[Ka].geometry;r=Math.max(r,Fb.x+Fb.width);wa=Math.max(wa,Fb.y+Fb.height)}var Rb=aa.geometry;Rb.y-=vc;Rb.width=r;Rb.height=wa}catch(Kb){LucidImporter.hasUnknownShapes=!0,LucidImporter.hasOrgChart=!0,console.log(Kb)}}var wc=0,xc=0,ge="text;html=1;resizable=0;labelBackgroundColor=default;align=center;verticalAlign=middle;",+u,null,null,!0);u.addCell(rc,aa,null,xb,Va)}}}var vc=.75*wa.NodeSpacing.LevelSeparation;(new mxOrgChartLayout(u,0,vc,.75*wa.NodeSpacing.NeighborSeparation)).execute(aa);for(Ka=wa=r=0;aa.children&&Ka<aa.children.length;Ka++){var Fb=aa.children[Ka].geometry;r=Math.max(r,Fb.x+Fb.width);wa=Math.max(wa,Fb.y+Fb.height)}var Rb=aa.geometry;Rb.y-=vc;Rb.width=r;Rb.height=wa}catch(Kb){LucidImporter.hasUnknownShapes=!0,LucidImporter.hasOrgChart=!0,console.log(Kb)}}var wc=0,xc=0,ge="text;html=1;resizable=0;labelBackgroundColor=default;align=center;verticalAlign=middle;",G=!1,lb="",vf=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],wf=["fpDoor"],Ee={None:"none;",Arrow:"block;xyzFill=1;","Hollow Arrow":"block;xyzFill=0;","Open Arrow":"open;","CFN ERD Zero Or More Arrow":"ERzeroToMany;xyzSize=10;","CFN ERD One Or More Arrow":"ERoneToMany;xyzSize=10;","CFN ERD Many Arrow":"ERmany;xyzSize=10;","CFN ERD Exactly One Arrow":"ERmandOne;xyzSize=10;","CFN ERD Zero Or One Arrow":"ERzeroToOne;xyzSize=10;","CFN ERD One Arrow":"ERone;xyzSize=16;",Generalization:"block;xyzFill=0;xyzSize=12;","Big Open Arrow":"open;xyzSize=10;",Asynch1:"openAsync;flipV=1;xyzSize=10;",Asynch2:"openAsync;xyzSize=10;",Aggregation:"diamond;xyzFill=0;xyzSize=16;",Composition:"diamond;xyzFill=1;xyzSize=16;",BlockEnd:"box;xyzFill=0;xyzSize=16;",Measure:"ERone;xyzSize=10;",CircleOpen:"oval;xyzFill=0;xyzSize=16;",CircleClosed:"oval;xyzFill=1;xyzSize=16;",BlockEndFill:"box;xyzFill=1;xyzSize=16;",Nesting:"circlePlus;xyzSize=7;xyzFill=0;","BPMN Conditional":"diamond;xyzFill=0;","BPMN Default":"dash;"},Od={DefaultTextBlockNew:"strokeColor=none;fillColor=none",DefaultTextBlock:"strokeColor=none;fillColor=none",DefaultSquareBlock:"",RectangleBlock:"",DefaultNoteBlock:"shape=note;size=15",DefaultNoteBlockV2:"shape=note;size=15",HotspotBlock:"strokeColor=none;fillColor=none",ImageSearchBlock2:"shape=image",UserImage2Block:"shape=image",ExtShapeBoxBlock:"",DefaultStickyNoteBlock:"shadow=1",ProcessBlock:"",DecisionBlock:"rhombus",TerminatorBlock:"rounded=1;arcSize=50",PredefinedProcessBlock:"shape=process",@@ -1045,52 +1045,52 @@ SMCalendar:"shape=mxgraph.sitemap.calendar;strokeColor=#000000;fillColor=#E6E6E6SMGame:"shape=mxgraph.sitemap.game;strokeColor=#000000;fillColor=#E6E6E6",SMJobs:"shape=mxgraph.sitemap.jobs;strokeColor=#000000;fillColor=#E6E6E6",SMLucid:"shape=mxgraph.sitemap.home;strokeColor=#000000;fillColor=#E6E6E6",SMNewspress:"shape=mxgraph.sitemap.news;strokeColor=#000000;fillColor=#E6E6E6",SMPhoto:"shape=mxgraph.sitemap.photo;strokeColor=#000000;fillColor=#E6E6E6",SMPortfolio:"shape=mxgraph.sitemap.portfolio;strokeColor=#000000;fillColor=#E6E6E6",SMPricing:"shape=mxgraph.sitemap.pricing;strokeColor=#000000;fillColor=#E6E6E6",SMProfile:"shape=mxgraph.sitemap.profile;strokeColor=#000000;fillColor=#E6E6E6",SMSlideshow:"shape=mxgraph.sitemap.slideshow;strokeColor=#000000;fillColor=#E6E6E6",SMUpload:"shape=mxgraph.sitemap.upload;strokeColor=#000000;fillColor=#E6E6E6",SVGPathBlock2:"mxCompositeShape",PresentationFrameBlock:"mxCompositeShape",TimelineBlock:"mxCompositeShape",TimelineMilestoneBlock:"mxCompositeShape",TimelineIntervalBlock:"mxCompositeShape",MinimalTextBlock:"strokeColor=none;fillColor=none",FreehandBlock:"mxCompositeShape",ExtShapeLaptopBlock:"strokeColor=none;shape=mxgraph.citrix.laptop_2;verticalLabelPosition=bottom;verticalAlign=top",ExtShapeServerBlock:"strokeColor=none;shape=mxgraph.citrix.tower_server;verticalLabelPosition=bottom;verticalAlign=top",ExtShapeCloudBlock:"strokeColor=none;shape=mxgraph.citrix.cloud;verticalLabelPosition=bottom;verticalAlign=top",ExtShapeUserBlock:"strokeColor=none;shape=mxgraph.aws3d.end_user;verticalLabelPosition=bottom;verticalAlign=top;fillColor=#073763",ExtShapeWorkstationLCDBlock:"strokeColor=none;shape=mxgraph.veeam.3d.workstation;verticalLabelPosition=bottom;verticalAlign=top",-InfographicsBlock:"mxCompositeShape",FlexiblePolygonBlock:"mxCompositeShape",PersonRoleBlock:"mxCompositeShape"},xf=RegExp("{{(date{.*}|[^%^{^}]+)}}","g");Qd.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};Qd.prototype.getX=function(u){return Math.round(100*this.nurbsValues[4*(u+1)])/100};Qd.prototype.getY=function(u){return Math.round(100*this.nurbsValues[4*(u+1)+1])/100};LucidImporter.importState=function(u,F,D){function t(q){null!=q.state&&EditorUi.debug("convertLucidChart addPages",-q);if(q.Properties){for(var Z in q.Properties)"Stencil-"==Z.substr(0,8)&&Ke(Z.substr(8),q.Properties[Z]);LucidImporter.globalProps=q.Properties}for(var aa in q.Pages)Z=q.Pages[aa],Z.id=aa,Z.Data=q.Data,e.push(Z);e.sort(function(V,wa){return V.Properties.Order<wa.Properties.Order?-1:V.Properties.Order>wa.Properties.Order?1:0});for(q=0;q<e.length;q++)LucidImporter.pageIdsMap[e[q].id]=q}xc=wc=0;LucidImporter.stencilsMap={};LucidImporter.imgSrcRepl=F;LucidImporter.advImpConfig=D;LucidImporter.globalProps=+InfographicsBlock:"mxCompositeShape",FlexiblePolygonBlock:"mxCompositeShape",PersonRoleBlock:"mxCompositeShape"},xf=RegExp("{{(date{.*}|[^%^{^}]+)}}","g");Qd.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};Qd.prototype.getX=function(w){return Math.round(100*this.nurbsValues[4*(w+1)])/100};Qd.prototype.getY=function(w){return Math.round(100*this.nurbsValues[4*(w+1)+1])/100};LucidImporter.importState=function(w,F,D){function u(p){null!=p.state&&EditorUi.debug("convertLucidChart addPages",+p);if(p.Properties){for(var Z in p.Properties)"Stencil-"==Z.substr(0,8)&&Ke(Z.substr(8),p.Properties[Z]);LucidImporter.globalProps=p.Properties}for(var aa in p.Pages)Z=p.Pages[aa],Z.id=aa,Z.Data=p.Data,e.push(Z);e.sort(function(V,wa){return V.Properties.Order<wa.Properties.Order?-1:V.Properties.Order>wa.Properties.Order?1:0});for(p=0;p<e.length;p++)LucidImporter.pageIdsMap[e[p].id]=p}xc=wc=0;LucidImporter.stencilsMap={};LucidImporter.imgSrcRepl=F;LucidImporter.advImpConfig=D;LucidImporter.globalProps={};LucidImporter.pageIdsMap={};LucidImporter.hasUnknownShapes=!1;LucidImporter.hasOrgChart=!1;LucidImporter.hasTimeLine=!1;LucidImporter.hasExtImgs=!1;F=['<?xml version="1.0" encoding="UTF-8"?>','<mxfile type="Lucidchart-Import" version="'+EditorUi.VERSION+'" host="'+mxUtils.htmlEntities(window.location.hostname)+'" agent="'+mxUtils.htmlEntities(navigator.appVersion)+'" modified="'+mxUtils.htmlEntities((new Date).toISOString())+'">'];D&&D.transparentEdgeLabels&&(ge=ge.replace("labelBackgroundColor=default;",-"labelBackgroundColor=none;"));var e=[];null!=u.state?t(JSON.parse(u.state)):null==u.Page&&null!=u.Pages?t(u):e.push(u);u=Df();D=new mxCodec;for(var P=0;P<e.length;P++){F.push("<diagram");null!=e[P].Properties&&null!=e[P].Properties.Title&&F.push(' name="'+mxUtils.htmlEntities(e[P].Properties.Title)+'"');F.push(' id="'+P+'"');zf(u,e[P],!0);var r=D.encode(u.getModel());null!=e[P].Properties&&(e[P].Properties.FillColor&&"#ffffff"!=e[P].Properties.FillColor&&r.setAttribute("background",S(e[P].Properties.FillColor)),-e[P].Properties.InfiniteCanvas?r.setAttribute("page",0):null!=e[P].Properties.Size&&(r.setAttribute("page",1),r.setAttribute("pageWidth",.75*e[P].Properties.Size.w),r.setAttribute("pageHeight",.75*e[P].Properties.Size.h)),null!=e[P].Properties.GridSpacing&&(r.setAttribute("grid",1),r.setAttribute("gridSize",.75*e[P].Properties.GridSpacing)));LucidImporter.hasMath&&r.setAttribute("math",1);u.getModel().clear();F.push(">"+Graph.compress(mxUtils.getXml(r))+"</diagram>")}F.push("</mxfile>");LucidImporter.imgSrcRepl=-null;return F.join("")}})();function VsdxExport(g){function y(H,I){var N={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>",+"labelBackgroundColor=none;"));var e=[];null!=w.state?u(JSON.parse(w.state)):null==w.Page&&null!=w.Pages?u(w):e.push(w);w=Df();D=new mxCodec;for(var P=0;P<e.length;P++){F.push("<diagram");null!=e[P].Properties&&null!=e[P].Properties.Title&&F.push(' name="'+mxUtils.htmlEntities(e[P].Properties.Title)+'"');F.push(' id="'+P+'"');zf(w,e[P],!0);var r=D.encode(w.getModel());null!=e[P].Properties&&(e[P].Properties.FillColor&&"#ffffff"!=e[P].Properties.FillColor&&r.setAttribute("background",T(e[P].Properties.FillColor)),+e[P].Properties.InfiniteCanvas?r.setAttribute("page",0):null!=e[P].Properties.Size&&(r.setAttribute("page",1),r.setAttribute("pageWidth",.75*e[P].Properties.Size.w),r.setAttribute("pageHeight",.75*e[P].Properties.Size.h)),null!=e[P].Properties.GridSpacing&&(r.setAttribute("grid",1),r.setAttribute("gridSize",.75*e[P].Properties.GridSpacing)));LucidImporter.hasMath&&r.setAttribute("math",1);w.getModel().clear();F.push(">"+Graph.compress(mxUtils.getXml(r))+"</diagram>")}F.push("</mxfile>");LucidImporter.imgSrcRepl=+null;return F.join("")}})();function VsdxExport(g){function y(H,J){var N={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>","_rels/.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties' Target='docProps/core.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/document' Target='visio/document.xml' /><Relationship Id='rId3' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties' Target='docProps/custom.xml' /><Relationship Id='rId4' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties' Target='docProps/app.xml' /></Relationships>","docProps/app.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\'><Application>Microsoft Visio</Application><AppVersion>15.0000</AppVersion><Template /><Manager /><Company /><HyperlinkBase /></Properties>',"docProps/core.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><cp:coreProperties xmlns:cp='http://schemas.openxmlformats.org/package/2006/metadata/core-properties' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:dcterms='http://purl.org/dc/terms/' xmlns:dcmitype='http://purl.org/dc/dcmitype/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><dc:title /><dc:subject /><dc:creator /><cp:keywords /><dc:description /><cp:category /><dc:language>en-US</dc:language></cp:coreProperties>","docProps/custom.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\' />',"visio/document.xml":"<?xml version='1.0' encoding='utf-8' ?><VisioDocument xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><DocumentSettings TopPage='0' DefaultTextStyle='3' DefaultLineStyle='3' DefaultFillStyle='3' DefaultGuideStyle='4'><GlueSettings>9</GlueSettings><SnapSettings>65847</SnapSettings><SnapExtensions>34</SnapExtensions><SnapAngles/><DynamicGridEnabled>1</DynamicGridEnabled><ProtectStyles>0</ProtectStyles><ProtectShapes>0</ProtectShapes><ProtectMasters>0</ProtectMasters><ProtectBkgnds>0</ProtectBkgnds></DocumentSettings><Colors><ColorEntry IX='24' RGB='#000000'/><ColorEntry IX='25' RGB='#FFFFFF'/><ColorEntry IX='26' RGB='#FF0000'/><ColorEntry IX='27' RGB='#00FF00'/><ColorEntry IX='28' RGB='#0000FF'/><ColorEntry IX='29' RGB='#FFFF00'/><ColorEntry IX='30' RGB='#FF00FF'/><ColorEntry IX='31' RGB='#00FFFF'/><ColorEntry IX='32' RGB='#800000'/><ColorEntry IX='33' RGB='#008000'/><ColorEntry IX='34' RGB='#000080'/><ColorEntry IX='35' RGB='#808000'/><ColorEntry IX='36' RGB='#800080'/><ColorEntry IX='37' RGB='#008080'/><ColorEntry IX='38' RGB='#C0C0C0'/><ColorEntry IX='39' RGB='#E6E6E6'/><ColorEntry IX='40' RGB='#CDCDCD'/><ColorEntry IX='41' RGB='#B3B3B3'/><ColorEntry IX='42' RGB='#9A9A9A'/><ColorEntry IX='43' RGB='#808080'/><ColorEntry IX='44' RGB='#666666'/><ColorEntry IX='45' RGB='#4D4D4D'/><ColorEntry IX='46' RGB='#333333'/><ColorEntry IX='47' RGB='#1A1A1A'/><ColorEntry IX='48' RGB='#7F7F7F'/><ColorEntry IX='49' RGB='#99004D'/><ColorEntry IX='50' RGB='#FF0080'/><ColorEntry IX='51' RGB='#CC0066'/></Colors><FaceNames><FaceName NameU='Calibri' UnicodeRanges='-536859905 -1073732485 9 0' CharSets='536871423 0' Panose='2 15 5 2 2 2 4 3 2 4' Flags='325'/></FaceNames><StyleSheets><StyleSheet ID='0' NameU='No Style' IsCustomNameU='1' Name='No Style' IsCustomName='1'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0.01041666666666667'/><Cell N='LineColor' V='0'/><Cell N='LinePattern' V='1'/><Cell N='Rounding' V='0'/><Cell N='EndArrowSize' V='2'/><Cell N='BeginArrow' V='0'/><Cell N='EndArrow' V='0'/><Cell N='LineCap' V='0'/><Cell N='BeginArrowSize' V='2'/><Cell N='LineColorTrans' V='0'/><Cell N='CompoundType' V='0'/><Cell N='FillForegnd' V='1'/><Cell N='FillBkgnd' V='0'/><Cell N='FillPattern' V='1'/><Cell N='ShdwForegnd' V='0'/><Cell N='ShdwPattern' V='0'/><Cell N='FillForegndTrans' V='0'/><Cell N='FillBkgndTrans' V='0'/><Cell N='ShdwForegndTrans' V='0'/><Cell N='ShapeShdwType' V='0'/><Cell N='ShapeShdwOffsetX' V='0'/><Cell N='ShapeShdwOffsetY' V='0'/><Cell N='ShapeShdwObliqueAngle' V='0'/><Cell N='ShapeShdwScaleFactor' V='1'/><Cell N='ShapeShdwBlur' V='0'/><Cell N='ShapeShdwShow' V='0'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='1'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5'/><Cell N='TextDirection' V='0'/><Cell N='TextBkgndTrans' V='0'/><Cell N='LockWidth' V='0'/><Cell N='LockHeight' V='0'/><Cell N='LockMoveX' V='0'/><Cell N='LockMoveY' V='0'/><Cell N='LockAspect' V='0'/><Cell N='LockDelete' V='0'/><Cell N='LockBegin' V='0'/><Cell N='LockEnd' V='0'/><Cell N='LockRotate' V='0'/><Cell N='LockCrop' V='0'/><Cell N='LockVtxEdit' V='0'/><Cell N='LockTextEdit' V='0'/><Cell N='LockFormat' V='0'/><Cell N='LockGroup' V='0'/><Cell N='LockCalcWH' V='0'/><Cell N='LockSelect' V='0'/><Cell N='LockCustProp' V='0'/><Cell N='LockFromGroupFormat' V='0'/><Cell N='LockThemeColors' V='0'/><Cell N='LockThemeEffects' V='0'/><Cell N='LockThemeConnectors' V='0'/><Cell N='LockThemeFonts' V='0'/><Cell N='LockThemeIndex' V='0'/><Cell N='LockReplace' V='0'/><Cell N='LockVariation' V='0'/><Cell N='NoObjHandles' V='0'/><Cell N='NonPrinting' V='0'/><Cell N='NoCtlHandles' V='0'/><Cell N='NoAlignBox' V='0'/><Cell N='UpdateAlignBox' V='0'/><Cell N='HideText' V='0'/><Cell N='DynFeedback' V='0'/><Cell N='GlueType' V='0'/><Cell N='WalkPreference' V='0'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0'/><Cell N='Comment' V=''/><Cell N='IsDropSource' V='0'/><Cell N='NoLiveDynamics' V='0'/><Cell N='LocalizeMerge' V='0'/><Cell N='NoProofing' V='0'/><Cell N='Calendar' V='0'/><Cell N='LangID' V='en-US'/><Cell N='ShapeKeywords' V=''/><Cell N='DropOnPageScale' V='1'/><Cell N='TheData' V='0' F='No Formula'/><Cell N='TheText' V='0' F='No Formula'/><Cell N='EventDblClick' V='0' F='No Formula'/><Cell N='EventXFMod' V='0' F='No Formula'/><Cell N='EventDrop' V='0' F='No Formula'/><Cell N='EventMultiDrop' V='0' F='No Formula'/><Cell N='HelpTopic' V=''/><Cell N='Copyright' V=''/><Cell N='LayerMember' V=''/><Cell N='XRulerDensity' V='32'/><Cell N='YRulerDensity' V='32'/><Cell N='XRulerOrigin' V='0'/><Cell N='YRulerOrigin' V='0'/><Cell N='XGridDensity' V='8'/><Cell N='YGridDensity' V='8'/><Cell N='XGridSpacing' V='0'/><Cell N='YGridSpacing' V='0'/><Cell N='XGridOrigin' V='0'/><Cell N='YGridOrigin' V='0'/><Cell N='Gamma' V='1'/><Cell N='Contrast' V='0.5'/><Cell N='Brightness' V='0.5'/><Cell N='Sharpen' V='0'/><Cell N='Blur' V='0'/><Cell N='Denoise' V='0'/><Cell N='Transparency' V='0'/><Cell N='SelectMode' V='1'/><Cell N='DisplayMode' V='2'/><Cell N='IsDropTarget' V='0'/><Cell N='IsSnapTarget' V='1'/><Cell N='IsTextEditTarget' V='1'/><Cell N='DontMoveChildren' V='0'/><Cell N='ShapePermeableX' V='0'/><Cell N='ShapePermeableY' V='0'/><Cell N='ShapePermeablePlace' V='0'/><Cell N='Relationships' V='0'/><Cell N='ShapeFixedCode' V='0'/><Cell N='ShapePlowCode' V='0'/><Cell N='ShapeRouteStyle' V='0'/><Cell N='ShapePlaceStyle' V='0'/><Cell N='ConFixedCode' V='0'/><Cell N='ConLineJumpCode' V='0'/><Cell N='ConLineJumpStyle' V='0'/><Cell N='ConLineJumpDirX' V='0'/><Cell N='ConLineJumpDirY' V='0'/><Cell N='ShapePlaceFlip' V='0'/><Cell N='ConLineRouteExt' V='0'/><Cell N='ShapeSplit' V='0'/><Cell N='ShapeSplittable' V='0'/><Cell N='DisplayLevel' V='0'/><Cell N='ResizePage' V='0'/><Cell N='EnableGrid' V='0'/><Cell N='DynamicsOff' V='0'/><Cell N='CtrlAsInput' V='0'/><Cell N='AvoidPageBreaks' V='0'/><Cell N='PlaceStyle' V='0'/><Cell N='RouteStyle' V='0'/><Cell N='PlaceDepth' V='0'/><Cell N='PlowCode' V='0'/><Cell N='LineJumpCode' V='1'/><Cell N='LineJumpStyle' V='0'/><Cell N='PageLineJumpDirX' V='0'/><Cell N='PageLineJumpDirY' V='0'/><Cell N='LineToNodeX' V='0.125'/><Cell N='LineToNodeY' V='0.125'/><Cell N='BlockSizeX' V='0.25'/><Cell N='BlockSizeY' V='0.25'/><Cell N='AvenueSizeX' V='0.375'/><Cell N='AvenueSizeY' V='0.375'/><Cell N='LineToLineX' V='0.125'/><Cell N='LineToLineY' V='0.125'/><Cell N='LineJumpFactorX' V='0.66666666666667'/><Cell N='LineJumpFactorY' V='0.66666666666667'/><Cell N='LineAdjustFrom' V='0'/><Cell N='LineAdjustTo' V='0'/><Cell N='PlaceFlip' V='0'/><Cell N='LineRouteExt' V='0'/><Cell N='PageShapeSplit' V='0'/><Cell N='PageLeftMargin' V='0.25'/><Cell N='PageRightMargin' V='0.25'/><Cell N='PageTopMargin' V='0.25'/><Cell N='PageBottomMargin' V='0.25'/><Cell N='ScaleX' V='1'/><Cell N='ScaleY' V='1'/><Cell N='PagesX' V='1'/><Cell N='PagesY' V='1'/><Cell N='CenterX' V='0'/><Cell N='CenterY' V='0'/><Cell N='OnPage' V='0'/><Cell N='PrintGrid' V='0'/><Cell N='PrintPageOrientation' V='1'/><Cell N='PaperKind' V='1'/><Cell N='PaperSource' V='7'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineGradientDir' V='0'/><Cell N='LineGradientAngle' V='1.5707963267949'/><Cell N='FillGradientDir' V='0'/><Cell N='FillGradientAngle' V='1.5707963267949'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='1'/><Cell N='UseGroupGradient' V='0'/><Cell N='BevelTopType' V='0'/><Cell N='BevelTopWidth' V='0'/><Cell N='BevelTopHeight' V='0'/><Cell N='BevelBottomType' V='0'/><Cell N='BevelBottomWidth' V='0'/><Cell N='BevelBottomHeight' V='0'/><Cell N='BevelDepthColor' V='1'/><Cell N='BevelDepthSize' V='0'/><Cell N='BevelContourColor' V='0'/><Cell N='BevelContourSize' V='0'/><Cell N='BevelMaterialType' V='0'/><Cell N='BevelLightingType' V='0'/><Cell N='BevelLightingAngle' V='0'/><Cell N='RotationXAngle' V='0'/><Cell N='RotationYAngle' V='0'/><Cell N='RotationZAngle' V='0'/><Cell N='RotationType' V='0'/><Cell N='Perspective' V='0'/><Cell N='DistanceFromGround' V='0'/><Cell N='KeepTextFlat' V='0'/><Cell N='ReflectionTrans' V='0'/><Cell N='ReflectionSize' V='0'/><Cell N='ReflectionDist' V='0'/><Cell N='ReflectionBlur' V='0'/><Cell N='GlowColor' V='1'/><Cell N='GlowColorTrans' V='0'/><Cell N='GlowSize' V='0'/><Cell N='SoftEdgesSize' V='0'/><Cell N='SketchSeed' V='0'/><Cell N='SketchEnabled' V='0'/><Cell N='SketchAmount' V='5'/><Cell N='SketchLineWeight' V='0.04166666666666666' U='PT'/><Cell N='SketchLineChange' V='0.14'/><Cell N='SketchFillChange' V='0.1'/><Cell N='ColorSchemeIndex' V='0'/><Cell N='EffectSchemeIndex' V='0'/><Cell N='ConnectorSchemeIndex' V='0'/><Cell N='FontSchemeIndex' V='0'/><Cell N='ThemeIndex' V='0'/><Cell N='VariationColorIndex' V='0'/><Cell N='VariationStyleIndex' V='0'/><Cell N='EmbellishmentIndex' V='0'/><Cell N='ReplaceLockShapeData' V='0'/><Cell N='ReplaceLockText' V='0'/><Cell N='ReplaceLockFormat' V='0'/><Cell N='ReplaceCopyCells' V='0' U='BOOL' F='No Formula'/><Cell N='PageWidth' V='0' F='No Formula'/><Cell N='PageHeight' V='0' F='No Formula'/><Cell N='ShdwOffsetX' V='0' F='No Formula'/><Cell N='ShdwOffsetY' V='0' F='No Formula'/><Cell N='PageScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingSizeType' V='0' F='No Formula'/><Cell N='DrawingScaleType' V='0' F='No Formula'/><Cell N='InhibitSnap' V='0' F='No Formula'/><Cell N='PageLockReplace' V='0' U='BOOL' F='No Formula'/><Cell N='PageLockDuplicate' V='0' U='BOOL' F='No Formula'/><Cell N='UIVisibility' V='0' F='No Formula'/><Cell N='ShdwType' V='0' F='No Formula'/><Cell N='ShdwObliqueAngle' V='0' F='No Formula'/><Cell N='ShdwScaleFactor' V='0' F='No Formula'/><Cell N='DrawingResizeType' V='0' F='No Formula'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Calibri'/><Cell N='Color' V='0'/><Cell N='Style' V='0'/><Cell N='Case' V='0'/><Cell N='Pos' V='0'/><Cell N='FontScale' V='1'/><Cell N='Size' V='0.1666666666666667'/><Cell N='DblUnderline' V='0'/><Cell N='Overline' V='0'/><Cell N='Strikethru' V='0'/><Cell N='DoubleStrikethrough' V='0'/><Cell N='Letterspace' V='0'/><Cell N='ColorTrans' V='0'/><Cell N='AsianFont' V='0'/><Cell N='ComplexScriptFont' V='0'/><Cell N='ComplexScriptSize' V='-1'/><Cell N='LangID' V='en-US'/></Row></Section><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0'/><Cell N='IndLeft' V='0'/><Cell N='IndRight' V='0'/><Cell N='SpLine' V='-1.2'/><Cell N='SpBefore' V='0'/><Cell N='SpAfter' V='0'/><Cell N='HorzAlign' V='1'/><Cell N='Bullet' V='0'/><Cell N='BulletStr' V=''/><Cell N='BulletFont' V='0'/><Cell N='BulletFontSize' V='-1'/><Cell N='TextPosAfterBullet' V='0'/><Cell N='Flags' V='0'/></Row></Section><Section N='Tabs'><Row IX='0'/></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section></StyleSheet><StyleSheet ID='1' NameU='Text Only' IsCustomNameU='1' Name='Text Only' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='Themed' F='Inh'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='0'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='Themed' F='Inh'/><Cell N='FillGradientEnabled' V='Themed' F='Inh'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0' F='Inh'/><Cell N='IndLeft' V='0' F='Inh'/><Cell N='IndRight' V='0' F='Inh'/><Cell N='SpLine' V='-1.2' F='Inh'/><Cell N='SpBefore' V='0' F='Inh'/><Cell N='SpAfter' V='0' F='Inh'/><Cell N='HorzAlign' V='0'/><Cell N='Bullet' V='0' F='Inh'/><Cell N='BulletStr' V='' F='Inh'/><Cell N='BulletFont' V='0' F='Inh'/><Cell N='BulletFontSize' V='-1' F='Inh'/><Cell N='TextPosAfterBullet' V='0' F='Inh'/><Cell N='Flags' V='0' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='2' NameU='None' IsCustomNameU='1' Name='None' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='0'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='QuickStyleLineColor' V='100' F='Inh'/><Cell N='QuickStyleFillColor' V='100' F='Inh'/><Cell N='QuickStyleShadowColor' V='100' F='Inh'/><Cell N='QuickStyleFontColor' V='100' F='Inh'/><Cell N='QuickStyleLineMatrix' V='100' F='Inh'/><Cell N='QuickStyleFillMatrix' V='100' F='Inh'/><Cell N='QuickStyleEffectsMatrix' V='0' F='GUARD(0)'/><Cell N='QuickStyleFontMatrix' V='100' F='Inh'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='2'/></StyleSheet><StyleSheet ID='3' NameU='Normal' IsCustomNameU='1' Name='Normal' IsCustomName='1' LineStyle='6' FillStyle='6' TextStyle='6'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT'/><Cell N='RightMargin' V='0.05555555555555555' U='PT'/><Cell N='TopMargin' V='0.05555555555555555' U='PT'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/></StyleSheet><StyleSheet ID='4' NameU='Guide' IsCustomNameU='1' Name='Guide' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0' U='PT'/><Cell N='LineColor' V='#7f7f7f'/><Cell N='LinePattern' V='23'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='2'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='1'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='ShapePermeableX' V='1'/><Cell N='ShapePermeableY' V='1'/><Cell N='ShapePermeablePlace' V='1'/><Cell N='Relationships' V='0' F='Inh'/><Cell N='ShapeFixedCode' V='0' F='Inh'/><Cell N='ShapePlowCode' V='0' F='Inh'/><Cell N='ShapeRouteStyle' V='0' F='Inh'/><Cell N='ShapePlaceStyle' V='0' F='Inh'/><Cell N='ConFixedCode' V='0' F='Inh'/><Cell N='ConLineJumpCode' V='0' F='Inh'/><Cell N='ConLineJumpStyle' V='0' F='Inh'/><Cell N='ConLineJumpDirX' V='0' F='Inh'/><Cell N='ConLineJumpDirY' V='0' F='Inh'/><Cell N='ShapePlaceFlip' V='0' F='Inh'/><Cell N='ConLineRouteExt' V='0' F='Inh'/><Cell N='ShapeSplit' V='0' F='Inh'/><Cell N='ShapeSplittable' V='0' F='Inh'/><Cell N='DisplayLevel' V='0' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='4'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.125'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='6' NameU='Theme' IsCustomNameU='1' Name='Theme' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='THEMEVAL()'/><Cell N='LineColor' V='Themed' F='THEMEVAL()'/><Cell N='LinePattern' V='Themed' F='THEMEVAL()'/><Cell N='Rounding' V='Themed' F='THEMEVAL()'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='CompoundType' V='Themed' F='THEMEVAL()'/><Cell N='FillForegnd' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgnd' V='Themed' F='THEMEVAL()'/><Cell N='FillPattern' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegnd' V='Themed' F='THEMEVAL()'/><Cell N='ShdwPattern' V='Themed' F='THEMEVAL()'/><Cell N='FillForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwType' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetX' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetY' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwBlur' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='RotateGradientWithShape' V='Themed' F='THEMEVAL()'/><Cell N='UseGroupGradient' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopType' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopWidth' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopHeight' V='Themed' F='THEMEVAL()'/><Cell N='BevelBottomType' V='0' F='Inh'/><Cell N='BevelBottomWidth' V='0' F='Inh'/><Cell N='BevelBottomHeight' V='0' F='Inh'/><Cell N='BevelDepthColor' V='1' F='Inh'/><Cell N='BevelDepthSize' V='0' F='Inh'/><Cell N='BevelContourColor' V='Themed' F='THEMEVAL()'/><Cell N='BevelContourSize' V='Themed' F='THEMEVAL()'/><Cell N='BevelMaterialType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingAngle' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionTrans' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionSize' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionDist' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionBlur' V='Themed' F='THEMEVAL()'/><Cell N='GlowColor' V='Themed' F='THEMEVAL()'/><Cell N='GlowColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GlowSize' V='Themed' F='THEMEVAL()'/><Cell N='SoftEdgesSize' V='Themed' F='THEMEVAL()'/><Cell N='SketchSeed' V='0' F='Inh'/><Cell N='SketchEnabled' V='Themed' F='THEMEVAL()'/><Cell N='SketchAmount' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineWeight' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineChange' V='Themed' F='THEMEVAL()'/><Cell N='SketchFillChange' V='Themed' F='THEMEVAL()'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='0' F='Inh'/><Cell N='ColorSchemeIndex' V='65534'/><Cell N='EffectSchemeIndex' V='65534'/><Cell N='ConnectorSchemeIndex' V='65534'/><Cell N='FontSchemeIndex' V='65534'/><Cell N='ThemeIndex' V='65534'/><Cell N='VariationColorIndex' V='65534'/><Cell N='VariationStyleIndex' V='65534'/><Cell N='EmbellishmentIndex' V='65534'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='THEMEVAL()'/><Cell N='Color' V='Themed' F='THEMEVAL()'/><Cell N='Style' V='Themed' F='THEMEVAL()'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1666666666666667' F='Inh'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section></StyleSheet><StyleSheet ID='7' NameU='Connector' IsCustomNameU='1' Name='Connector' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='#ffffff' F='THEMEGUARD(THEMEVAL(\"BackgroundColor\")+1)'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='0' F='Inh'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='1'/><Cell N='QuickStyleFillMatrix' V='1'/><Cell N='QuickStyleEffectsMatrix' V='1'/><Cell N='QuickStyleFontMatrix' V='1'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrow' V='Themed' F='THEMEVAL()'/><Cell N='EndArrow' V='Themed' F='THEMEVAL()'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='Themed' F='Inh'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1111111111111111'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet></StyleSheets><DocumentSheet NameU='TheDoc' IsCustomNameU='1' Name='TheDoc' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='OutputFormat' V='0'/><Cell N='LockPreview' V='0'/><Cell N='AddMarkup' V='0'/><Cell N='ViewMarkup' V='0'/><Cell N='DocLockReplace' V='0' U='BOOL'/><Cell N='NoCoauth' V='0' U='BOOL'/><Cell N='DocLockDuplicatePage' V='0' U='BOOL'/><Cell N='PreviewQuality' V='0'/><Cell N='PreviewScope' V='0'/><Cell N='DocLangID' V='en-US'/><Section N='User'><Row N='msvNoAutoConnect'><Cell N='Value' V='1'/><Cell N='Prompt' V='' F='No Formula'/></Row></Section></DocumentSheet></VisioDocument>","visio/windows.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Windows ClientWidth='0' ClientHeight='0' xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve' />","visio/_rels/document.xml.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.microsoft.com/visio/2010/relationships/masters' Target='masters/masters.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/pages' Target='pages/pages.xml' /><Relationship Id='rId3' Type='http://schemas.microsoft.com/visio/2010/relationships/windows' Target='windows.xml' /></Relationships>","visio/masters/_rels/masters.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.microsoft.com/visio/2010/relationships/master" Target="master1.xml"/></Relationships>',"visio/masters/masters.xml":"<?xml version='1.0' encoding='utf-8' ?><Masters xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Master ID='4' NameU='Dynamic connector' IsCustomNameU='1' Name='Dynamic connector' IsCustomName='1' Prompt='This connector automatically routes between the shapes it connects.' IconSize='1' AlignName='2' MatchByName='1' IconUpdate='0' UniqueID='{002A9108-0000-0000-8E40-00608CF305B2}' BaseID='{F7290A45-E3AD-11D2-AE4F-006008C9F5A9}' PatternFlags='0' Hidden='0' MasterType='0'><PageSheet LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='PageWidth' V='3'/><Cell N='PageHeight' V='3'/><Cell N='ShdwOffsetX' V='0.125'/><Cell N='ShdwOffsetY' V='-0.125'/><Cell N='PageScale' V='1' U='IN_F'/><Cell N='DrawingScale' V='1' U='IN_F'/><Cell N='DrawingSizeType' V='4'/><Cell N='DrawingScaleType' V='0'/><Cell N='InhibitSnap' V='0'/><Cell N='PageLockReplace' V='0' U='BOOL'/><Cell N='PageLockDuplicate' V='0' U='BOOL'/><Cell N='UIVisibility' V='0'/><Cell N='ShdwType' V='0'/><Cell N='ShdwObliqueAngle' V='0'/><Cell N='ShdwScaleFactor' V='1'/><Cell N='DrawingResizeType' V='0'/><Section N='Layer'><Row IX='0'><Cell N='Name' V='Connector'/><Cell N='Color' V='255'/><Cell N='Status' V='0'/><Cell N='Visible' V='1'/><Cell N='Print' V='1'/><Cell N='Active' V='0'/><Cell N='Lock' V='0'/><Cell N='Snap' V='1'/><Cell N='Glue' V='1'/><Cell N='NameUniv' V='Connector'/><Cell N='ColorTrans' V='0'/></Row></Section></PageSheet><Rel r:id='rId1'/></Master></Masters>","visio/masters/master1.xml":"<?xml version='1.0' encoding='utf-8' ?><MasterContents xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Shapes><Shape ID='5' OriginalID='0' Type='Shape' LineStyle='7' FillStyle='7' TextStyle='7'><Cell N='PinX' V='1.5' F='GUARD((BeginX+EndX)/2)'/><Cell N='PinY' V='1.5' F='GUARD((BeginY+EndY)/2)'/><Cell N='Width' V='1' F='GUARD(EndX-BeginX)'/><Cell N='Height' V='-1' F='GUARD(EndY-BeginY)'/><Cell N='LocPinX' V='0.5' F='GUARD(Width*0.5)'/><Cell N='LocPinY' V='-0.5' F='GUARD(Height*0.5)'/><Cell N='Angle' V='0' F='GUARD(0DA)'/><Cell N='FlipX' V='0' F='GUARD(FALSE)'/><Cell N='FlipY' V='0' F='GUARD(FALSE)'/><Cell N='ResizeMode' V='0'/><Cell N='BeginX' V='1'/><Cell N='BeginY' V='2'/><Cell N='EndX' V='2'/><Cell N='EndY' V='1'/><Cell N='TxtPinX' V='0' F='SETATREF(Controls.TextPosition)'/><Cell N='TxtPinY' V='-1' F='SETATREF(Controls.TextPosition.Y)'/><Cell N='TxtWidth' V='0.5555555555555556' F='MAX(TEXTWIDTH(TheText),5*Char.Size)'/><Cell N='TxtHeight' V='0.2444444444444444' F='TEXTHEIGHT(TheText,TxtWidth)'/><Cell N='TxtLocPinX' V='0.2777777777777778' F='TxtWidth*0.5'/><Cell N='TxtLocPinY' V='0.1222222222222222' F='TxtHeight*0.5'/><Cell N='TxtAngle' V='0'/><Cell N='LockHeight' V='1'/><Cell N='LockCalcWH' V='1'/><Cell N='HelpTopic' V='Vis_SE.chm!#20000'/><Cell N='Copyright' V='Copyright 2001 Microsoft Corporation. All rights reserved.'/><Cell N='NoAlignBox' V='1'/><Cell N='DynFeedback' V='2'/><Cell N='GlueType' V='2'/><Cell N='ObjType' V='2'/><Cell N='NoLiveDynamics' V='1'/><Cell N='ShapeSplittable' V='1'/><Cell N='LayerMember' V='0'/><Section N='Control'><Row N='TextPosition'><Cell N='X' V='0'/><Cell N='Y' V='-1'/><Cell N='XDyn' V='0' F='Controls.TextPosition'/><Cell N='YDyn' V='-1' F='Controls.TextPosition.Y'/><Cell N='XCon' V='5' F='IF(OR(STRSAME(SHAPETEXT(TheText),\"\"),HideText),5,0)'/><Cell N='YCon' V='0'/><Cell N='CanGlue' V='0'/><Cell N='Prompt' V='Reposition Text'/></Row></Section><Section N='Geometry' IX='0'><Cell N='NoFill' V='1'/><Cell N='NoLine' V='0'/><Cell N='NoShow' V='0'/><Cell N='NoSnap' V='0'/><Cell N='NoQuickDrag' V='0'/><Row T='MoveTo' IX='1'><Cell N='X' V='0'/><Cell N='Y' V='0'/></Row><Row T='LineTo' IX='2'><Cell N='X' V='0'/><Cell N='Y' V='-1'/></Row></Section></Shape></Shapes></MasterContents>"},-K;for(K in N)if(1<I&&K==M.CONTENT_TYPES_XML){for(var O=mxUtils.parseXml(N[K]),ba=O.documentElement,W=ba.children,R=null,S=0;S<W.length;S++){var ka=W[S];"/visio/pages/page1.xml"==ka.getAttribute(M.PART_NAME)&&(R=ka)}for(S=2;S<=I;S++)W=R.cloneNode(),W.setAttribute(M.PART_NAME,"/visio/pages/page"+S+".xml"),ba.appendChild(W);A(H,K,O,!0)}else H.file(K,N[K])}function z(H,I,N){return null!=H.createElementNS?H.createElementNS(I,N):H.createElement(N)}function B(H){var I=Q[H];null==I&&(I=U++,Q[H]=I);return I}-function m(H){var I={};try{var N=H.getGraphBounds().clone(),K=H.view.scale,O=H.view.translate,ba=Math.round(N.x/K)-O.x,W=Math.round(N.y/K)-O.y,R=H.pageFormat.width,S=H.pageFormat.height;0>ba&&(ba+=Math.ceil((O.x-N.x/K)/R)*R);0>W&&(W+=Math.ceil((O.y-N.y/K)/S)*S);var ka=Math.max(1,Math.ceil((N.width/K+ba)/R)),ca=Math.max(1,Math.ceil((N.height/K+W)/S));I.gridEnabled=H.gridEnabled;I.gridSize=H.gridSize;I.guidesEnabled=H.graphHandler.guidesEnabled;I.pageVisible=H.pageVisible;I.pageScale=H.pageScale;I.pageWidth=-H.pageFormat.width*ka;I.pageHeight=H.pageFormat.height*ca;I.backgroundClr=H.background;I.mathEnabled=H.mathEnabled;I.shadowVisible=H.shadowVisible}catch(qa){}return I}function h(H,I,N,K){return c(H,I/M.CONVERSION_FACTOR,N,K)}function c(H,I,N,K){N=z(N,M.XMLNS,"Cell");N.setAttribute("N",H);N.setAttribute("V",I);K&&N.setAttribute("F",K);return N}function a(H,I,N,K,O){var ba=z(O,M.XMLNS,"Row");ba.setAttribute("T",H);ba.setAttribute("IX",I);ba.appendChild(h("X",N,O));ba.appendChild(h("Y",K,O));return ba}-function b(H,I,N){var K=mxUtils.rgba2hex(H.style[mxConstants.STYLE_FILLCOLOR]);if(K&&"none"!=K){if(I.appendChild(c("FillForegnd",K,N)),(K=mxUtils.rgba2hex(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=K){I.appendChild(c("FillBkgnd",K,N));K=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var O=28;if(K)switch(K){case mxConstants.DIRECTION_EAST:O=25;break;case mxConstants.DIRECTION_WEST:O=27;break;case mxConstants.DIRECTION_NORTH:O=30}I.appendChild(c("FillPattern",O,N))}}else I.appendChild(c("FillPattern",-0,N));(K=mxUtils.rgba2hex(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=K?I.appendChild(c("LineColor",K,N)):I.appendChild(c("LinePattern",0,N));(K=H.style[mxConstants.STYLE_STROKEWIDTH])&&I.appendChild(h("LineWeight",K,N));(O=H.style[mxConstants.STYLE_OPACITY])?K=O:(K=H.style[mxConstants.STYLE_FILL_OPACITY],O=H.style[mxConstants.STYLE_STROKE_OPACITY]);K&&I.appendChild(c("FillForegndTrans",1-parseInt(K)/100,N));O&&I.appendChild(c("LineColorTrans",1-parseInt(O)/100,N));if(1==H.style[mxConstants.STYLE_DASHED]){K=-H.style[mxConstants.STYLE_DASH_PATTERN];O=9;if(K)switch(K){case "1 1":O=10;break;case "1 2":O=3;break;case "1 4":O=17}I.appendChild(c("LinePattern",O,N))}1==H.style[mxConstants.STYLE_SHADOW]&&(I.appendChild(c("ShdwPattern",1,N)),I.appendChild(c("ShdwForegnd","#000000",N)),I.appendChild(c("ShdwForegndTrans",.6,N)),I.appendChild(c("ShapeShdwType",1,N)),I.appendChild(c("ShapeShdwOffsetX","0.02946278254943948",N)),I.appendChild(c("ShapeShdwOffsetY","-0.02946278254943948",N)),I.appendChild(c("ShapeShdwScaleFactor",-"1",N)),I.appendChild(c("ShapeShdwBlur","0.05555555555555555",N)),I.appendChild(c("ShapeShdwShow",2,N)));1==H.style[mxConstants.STYLE_FLIPH]&&I.appendChild(c("FlipX",1,N));1==H.style[mxConstants.STYLE_FLIPV]&&I.appendChild(c("FlipY",1,N));1==H.style[mxConstants.STYLE_ROUNDED]&&I.appendChild(h("Rounding",.1*H.cell.geometry.width,N));(H=mxUtils.rgba2hex(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&I.appendChild(c("TextBkgnd",H,N))}function d(H,I,N,K,O,ba){var W=z(K,M.XMLNS,"Shape");W.setAttribute("ID",-H);W.setAttribute("NameU","Shape"+H);W.setAttribute("LineStyle","0");W.setAttribute("FillStyle","0");W.setAttribute("TextStyle","0");H=I.width/2;var R=I.height/2;W.appendChild(h("PinX",I.x+H+(ba?0:L.shiftX),K));W.appendChild(h("PinY",O-I.y-R-(ba?0:L.shiftY),K));W.appendChild(h("Width",I.width,K));W.appendChild(h("Height",I.height,K));W.appendChild(h("LocPinX",H,K));W.appendChild(h("LocPinY",R,K));W.appendChild(c("LayerMember",N+"",K));return W}function f(H,I){H=M.ARROWS_MAP[(null==H?"none":H)+"|"+-(null==I?"1":I)];return null!=H?H:1}function k(H){return null==H?2:2>=H?0:3>=H?1:5>=H?2:7>=H?3:9>=H?4:22>=H?5:6}function n(H,I,N,K,O,ba){var W=N.view.getState(H,!0);if(null==W||null==W.absolutePoints||null==W.cellBounds)return null;N=z(K,M.XMLNS,"Shape");var R=B(H.id);N.setAttribute("ID",R);N.setAttribute("NameU","Dynamic connector."+R);N.setAttribute("Name","Dynamic connector."+R);N.setAttribute("Type","Shape");N.setAttribute("Master","4");var S=L.state;R=W.absolutePoints;var ka=W.cellBounds,ca=-ka.width/2,qa=ka.height/2;N.appendChild(h("PinX",ka.x+ca+(ba?0:L.shiftX),K));N.appendChild(h("PinY",O-ka.y-qa-(ba?0:L.shiftY),K));N.appendChild(h("Width",ka.width,K));N.appendChild(h("Height",ka.height,K));N.appendChild(h("LocPinX",ca,K));N.appendChild(h("LocPinY",qa,K));L.newEdge(N,W,K);ca=function(sa,Fa,pa){var Za=sa.x;sa=sa.y;Za=Za*S.scale-ka.x+S.dx+(pa||ba?0:L.shiftX);sa=(Fa?0:ka.height)-sa*S.scale+ka.y-S.dy-(pa||ba?0:L.shiftY);return{x:Za,y:sa}};qa=ca(R[0],!0);N.appendChild(h("BeginX",ka.x+qa.x,-K,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));N.appendChild(h("BeginY",O-ka.y+qa.y,K,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));qa=ca(R[R.length-1],!0);N.appendChild(h("EndX",ka.x+qa.x,K,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));N.appendChild(h("EndY",O-ka.y+qa.y,K,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));N.appendChild(c("BegTrigger","2",K,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));N.appendChild(c("EndTrigger","2",K,H.target?"_XFTRIGGER(Sheet."+-B(H.target.id)+"!EventXFMod)":null));N.appendChild(c("ConFixedCode","6",K));N.appendChild(c("LayerMember",I+"",K));b(W,N,K);I=W.style[mxConstants.STYLE_STARTSIZE];H=f(W.style[mxConstants.STYLE_STARTARROW],W.style[mxConstants.STYLE_STARTFILL]);N.appendChild(c("BeginArrow",H,K));N.appendChild(c("BeginArrowSize",k(I),K));I=W.style[mxConstants.STYLE_ENDSIZE];H=f(W.style[mxConstants.STYLE_ENDARROW],W.style[mxConstants.STYLE_ENDFILL]);N.appendChild(c("EndArrow",H,K));N.appendChild(c("EndArrowSize",k(I),-K));null!=W.text&&W.text.checkBounds()&&(L.save(),W.text.paint(L),L.restore());W=z(K,M.XMLNS,"Section");W.setAttribute("N","Geometry");W.setAttribute("IX","0");for(H=0;H<R.length;H++)I=ca(R[H],!1,!0),W.appendChild(a(0==H?"MoveTo":"LineTo",H+1,I.x,I.y,K));W.appendChild(c("NoFill","1",K));W.appendChild(c("NoLine","0",K));N.appendChild(W);return N}function p(H,I,N,K,O,ba,W){var R=H.geometry,S=R;if(null!=R)try{R.relative&&ba&&(S=R.clone(),R.x*=ba.width,R.y*=ba.height,H.vertex&&null!=R.offset&&(R.x+=R.offset.x,-R.y+=R.offset.y),R.relative=0);var ka=B(H.id);if(!H.treatAsSingle&&0<H.getChildCount()){var ca=d(ka+"10000",R,I,K,O,W);ca.setAttribute("Type","Group");var qa=z(K,M.XMLNS,"Shapes");L.save();L.translate(-R.x,-R.y);var sa=R.clone();sa.x=0;sa.y=0;H.setGeometry(sa);H.treatAsSingle=!0;var Fa=p(H,I,N,K,R.height,R,!0);delete H.treatAsSingle;H.setGeometry(R);null!=Fa&&qa.appendChild(Fa);for(O=0;O<H.getChildCount();O++)Fa=p(H.children[O],I,N,K,R.height,R,!0),null!=Fa&&qa.appendChild(Fa);ca.appendChild(qa);-L.restore();return ca}if(H.vertex){ca=d(ka,R,I,K,O,W);var pa=N.view.getState(H,!0);null!=pa&&(b(pa,ca,K),L.newShape(ca,pa,K),null!=pa.text&&pa.text.checkBounds()&&(L.save(),pa.text.paint(L),L.restore()),null!=pa.shape&&pa.shape.checkBounds()&&(L.save(),pa.shape.paint(L),L.restore()),ca.appendChild(L.getShapeGeo()),L.endShape(),ca.setAttribute("Type",L.getShapeType()));return ca}return n(H,I,N,K,O,W)}finally{H.geometry=S}else return null}function x(H,I){var N=mxUtils.createXmlDocument(),K=z(N,M.XMLNS,-"PageContents");K.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);K.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",M.XMLNS_R);var O=z(N,M.XMLNS,"Shapes");K.appendChild(O);var ba=H.model,W=H.view.translate,R=H.view.scale,S=H.getGraphBounds();L.shiftX=0;L.shiftY=0;if(S.x/R<W.x||S.y/R<W.y)L.shiftX=Math.ceil((W.x-S.x/R)/H.pageFormat.width)*H.pageFormat.width,L.shiftY=Math.ceil((W.y-S.y/R)/H.pageFormat.height)*H.pageFormat.height;L.save();L.translate(-W.x,-W.y);L.scale(1/R);L.newPage();-R=H.model.getChildCells(H.model.root);W={};for(S=0;S<R.length;S++)W[R[S].id]=S;for(var ka in ba.cells)R=ba.cells[ka],S=null!=R.parent?W[R.parent.id]:null,null!=S&&(R=p(R,S,H,N,I.pageHeight),null!=R&&O.appendChild(R));H=z(N,M.XMLNS,"Connects");K.appendChild(H);for(ka in ba.cells)R=ba.cells[ka],R.edge&&(R.source&&(I=z(N,M.XMLNS,"Connect"),I.setAttribute("FromSheet",B(R.id)),I.setAttribute("FromCell","BeginX"),I.setAttribute("ToSheet",B(R.source.id)),H.appendChild(I)),R.target&&(I=z(N,M.XMLNS,"Connect"),-I.setAttribute("FromSheet",B(R.id)),I.setAttribute("FromCell","EndX"),I.setAttribute("ToSheet",B(R.target.id)),H.appendChild(I)));N.appendChild(K);L.restore();return N}function A(H,I,N,K){H.file(I,(K?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(N,"\n"))}function C(H,I,N,K){var O=mxUtils.createXmlDocument(),ba=mxUtils.createXmlDocument(),W=z(O,M.XMLNS,"Pages");W.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);W.setAttributeNS("http://www.w3.org/2000/xmlns/",-"xmlns:r",M.XMLNS_R);var R=z(ba,M.RELS_XMLNS,"Relationships"),S=1,ka;for(ka in I){var ca="page"+S+".xml",qa=z(O,M.XMLNS,"Page");qa.setAttribute("ID",S-1);qa.setAttribute("NameU",ka);qa.setAttribute("Name",ka);var sa=z(O,M.XMLNS,"PageSheet"),Fa=K[ka];sa.appendChild(h("PageWidth",Fa.pageWidth,O));sa.appendChild(h("PageHeight",Fa.pageHeight,O));sa.appendChild(c("PageScale",Fa.pageScale,O));sa.appendChild(c("DrawingScale",1,O));Fa=z(O,M.XMLNS,"Rel");Fa.setAttributeNS(M.XMLNS_R,"r:id","rId"+S);var pa=+L;for(L in N)if(1<J&&L==M.CONTENT_TYPES_XML){for(var O=mxUtils.parseXml(N[L]),ba=O.documentElement,W=ba.children,R=null,T=0;T<W.length;T++){var ka=W[T];"/visio/pages/page1.xml"==ka.getAttribute(M.PART_NAME)&&(R=ka)}for(T=2;T<=J;T++)W=R.cloneNode(),W.setAttribute(M.PART_NAME,"/visio/pages/page"+T+".xml"),ba.appendChild(W);A(H,L,O,!0)}else H.file(L,N[L])}function z(H,J,N){return null!=H.createElementNS?H.createElementNS(J,N):H.createElement(N)}function B(H){var J=Q[H];null==J&&(J=S++,Q[H]=J);return J}+function m(H){var J={};try{var N=H.getGraphBounds().clone(),L=H.view.scale,O=H.view.translate,ba=Math.round(N.x/L)-O.x,W=Math.round(N.y/L)-O.y,R=H.pageFormat.width,T=H.pageFormat.height;0>ba&&(ba+=Math.ceil((O.x-N.x/L)/R)*R);0>W&&(W+=Math.ceil((O.y-N.y/L)/T)*T);var ka=Math.max(1,Math.ceil((N.width/L+ba)/R)),ca=Math.max(1,Math.ceil((N.height/L+W)/T));J.gridEnabled=H.gridEnabled;J.gridSize=H.gridSize;J.guidesEnabled=H.graphHandler.guidesEnabled;J.pageVisible=H.pageVisible;J.pageScale=H.pageScale;J.pageWidth=+H.pageFormat.width*ka;J.pageHeight=H.pageFormat.height*ca;J.backgroundClr=H.background;J.mathEnabled=H.mathEnabled;J.shadowVisible=H.shadowVisible}catch(qa){}return J}function h(H,J,N,L){return c(H,J/M.CONVERSION_FACTOR,N,L)}function c(H,J,N,L){N=z(N,M.XMLNS,"Cell");N.setAttribute("N",H);N.setAttribute("V",J);L&&N.setAttribute("F",L);return N}function a(H,J,N,L,O){var ba=z(O,M.XMLNS,"Row");ba.setAttribute("T",H);ba.setAttribute("IX",J);ba.appendChild(h("X",N,O));ba.appendChild(h("Y",L,O));return ba}+function b(H,J,N){var L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_FILLCOLOR]);if(L&&"none"!=L){if(J.appendChild(c("FillForegnd",L,N)),(L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=L){J.appendChild(c("FillBkgnd",L,N));L=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var O=28;if(L)switch(L){case mxConstants.DIRECTION_EAST:O=25;break;case mxConstants.DIRECTION_WEST:O=27;break;case mxConstants.DIRECTION_NORTH:O=30}J.appendChild(c("FillPattern",O,N))}}else J.appendChild(c("FillPattern",+0,N));(L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=L?J.appendChild(c("LineColor",L,N)):J.appendChild(c("LinePattern",0,N));(L=H.style[mxConstants.STYLE_STROKEWIDTH])&&J.appendChild(h("LineWeight",L,N));(O=H.style[mxConstants.STYLE_OPACITY])?L=O:(L=H.style[mxConstants.STYLE_FILL_OPACITY],O=H.style[mxConstants.STYLE_STROKE_OPACITY]);L&&J.appendChild(c("FillForegndTrans",1-parseInt(L)/100,N));O&&J.appendChild(c("LineColorTrans",1-parseInt(O)/100,N));if(1==H.style[mxConstants.STYLE_DASHED]){L=+H.style[mxConstants.STYLE_DASH_PATTERN];O=9;if(L)switch(L){case "1 1":O=10;break;case "1 2":O=3;break;case "1 4":O=17}J.appendChild(c("LinePattern",O,N))}1==H.style[mxConstants.STYLE_SHADOW]&&(J.appendChild(c("ShdwPattern",1,N)),J.appendChild(c("ShdwForegnd","#000000",N)),J.appendChild(c("ShdwForegndTrans",.6,N)),J.appendChild(c("ShapeShdwType",1,N)),J.appendChild(c("ShapeShdwOffsetX","0.02946278254943948",N)),J.appendChild(c("ShapeShdwOffsetY","-0.02946278254943948",N)),J.appendChild(c("ShapeShdwScaleFactor",+"1",N)),J.appendChild(c("ShapeShdwBlur","0.05555555555555555",N)),J.appendChild(c("ShapeShdwShow",2,N)));1==H.style[mxConstants.STYLE_FLIPH]&&J.appendChild(c("FlipX",1,N));1==H.style[mxConstants.STYLE_FLIPV]&&J.appendChild(c("FlipY",1,N));1==H.style[mxConstants.STYLE_ROUNDED]&&J.appendChild(h("Rounding",.1*H.cell.geometry.width,N));(H=mxUtils.rgba2hex(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&J.appendChild(c("TextBkgnd",H,N))}function d(H,J,N,L,O,ba){var W=z(L,M.XMLNS,"Shape");W.setAttribute("ID",+H);W.setAttribute("NameU","Shape"+H);W.setAttribute("LineStyle","0");W.setAttribute("FillStyle","0");W.setAttribute("TextStyle","0");H=J.width/2;var R=J.height/2;W.appendChild(h("PinX",J.x+H+(ba?0:K.shiftX),L));W.appendChild(h("PinY",O-J.y-R-(ba?0:K.shiftY),L));W.appendChild(h("Width",J.width,L));W.appendChild(h("Height",J.height,L));W.appendChild(h("LocPinX",H,L));W.appendChild(h("LocPinY",R,L));W.appendChild(c("LayerMember",N+"",L));return W}function f(H,J){H=M.ARROWS_MAP[(null==H?"none":H)+"|"++(null==J?"1":J)];return null!=H?H:1}function k(H){return null==H?2:2>=H?0:3>=H?1:5>=H?2:7>=H?3:9>=H?4:22>=H?5:6}function n(H,J,N,L,O,ba){var W=N.view.getState(H,!0);if(null==W||null==W.absolutePoints||null==W.cellBounds)return null;N=z(L,M.XMLNS,"Shape");var R=B(H.id);N.setAttribute("ID",R);N.setAttribute("NameU","Dynamic connector."+R);N.setAttribute("Name","Dynamic connector."+R);N.setAttribute("Type","Shape");N.setAttribute("Master","4");var T=K.state;R=W.absolutePoints;var ka=W.cellBounds,ca=+ka.width/2,qa=ka.height/2;N.appendChild(h("PinX",ka.x+ca+(ba?0:K.shiftX),L));N.appendChild(h("PinY",O-ka.y-qa-(ba?0:K.shiftY),L));N.appendChild(h("Width",ka.width,L));N.appendChild(h("Height",ka.height,L));N.appendChild(h("LocPinX",ca,L));N.appendChild(h("LocPinY",qa,L));K.newEdge(N,W,L);ca=function(sa,Fa,pa){var Za=sa.x;sa=sa.y;Za=Za*T.scale-ka.x+T.dx+(pa||ba?0:K.shiftX);sa=(Fa?0:ka.height)-sa*T.scale+ka.y-T.dy-(pa||ba?0:K.shiftY);return{x:Za,y:sa}};qa=ca(R[0],!0);N.appendChild(h("BeginX",ka.x+qa.x,+L,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));N.appendChild(h("BeginY",O-ka.y+qa.y,L,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));qa=ca(R[R.length-1],!0);N.appendChild(h("EndX",ka.x+qa.x,L,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));N.appendChild(h("EndY",O-ka.y+qa.y,L,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));N.appendChild(c("BegTrigger","2",L,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));N.appendChild(c("EndTrigger","2",L,H.target?"_XFTRIGGER(Sheet."++B(H.target.id)+"!EventXFMod)":null));N.appendChild(c("ConFixedCode","6",L));N.appendChild(c("LayerMember",J+"",L));b(W,N,L);J=W.style[mxConstants.STYLE_STARTSIZE];H=f(W.style[mxConstants.STYLE_STARTARROW],W.style[mxConstants.STYLE_STARTFILL]);N.appendChild(c("BeginArrow",H,L));N.appendChild(c("BeginArrowSize",k(J),L));J=W.style[mxConstants.STYLE_ENDSIZE];H=f(W.style[mxConstants.STYLE_ENDARROW],W.style[mxConstants.STYLE_ENDFILL]);N.appendChild(c("EndArrow",H,L));N.appendChild(c("EndArrowSize",k(J),+L));null!=W.text&&W.text.checkBounds()&&(K.save(),W.text.paint(K),K.restore());W=z(L,M.XMLNS,"Section");W.setAttribute("N","Geometry");W.setAttribute("IX","0");for(H=0;H<R.length;H++)J=ca(R[H],!1,!0),W.appendChild(a(0==H?"MoveTo":"LineTo",H+1,J.x,J.y,L));W.appendChild(c("NoFill","1",L));W.appendChild(c("NoLine","0",L));N.appendChild(W);return N}function q(H,J,N,L,O,ba,W){var R=H.geometry,T=R;if(null!=R)try{R.relative&&ba&&(T=R.clone(),R.x*=ba.width,R.y*=ba.height,H.vertex&&null!=R.offset&&(R.x+=R.offset.x,+R.y+=R.offset.y),R.relative=0);var ka=B(H.id);if(!H.treatAsSingle&&0<H.getChildCount()){var ca=d(ka+"10000",R,J,L,O,W);ca.setAttribute("Type","Group");var qa=z(L,M.XMLNS,"Shapes");K.save();K.translate(-R.x,-R.y);var sa=R.clone();sa.x=0;sa.y=0;H.setGeometry(sa);H.treatAsSingle=!0;var Fa=q(H,J,N,L,R.height,R,!0);delete H.treatAsSingle;H.setGeometry(R);null!=Fa&&qa.appendChild(Fa);for(O=0;O<H.getChildCount();O++)Fa=q(H.children[O],J,N,L,R.height,R,!0),null!=Fa&&qa.appendChild(Fa);ca.appendChild(qa);+K.restore();return ca}if(H.vertex){ca=d(ka,R,J,L,O,W);var pa=N.view.getState(H,!0);null!=pa&&(b(pa,ca,L),K.newShape(ca,pa,L),null!=pa.text&&pa.text.checkBounds()&&(K.save(),pa.text.paint(K),K.restore()),null!=pa.shape&&pa.shape.checkBounds()&&(K.save(),pa.shape.paint(K),K.restore()),ca.appendChild(K.getShapeGeo()),K.endShape(),ca.setAttribute("Type",K.getShapeType()));return ca}return n(H,J,N,L,O,W)}finally{H.geometry=T}else return null}function t(H,J){var N=mxUtils.createXmlDocument(),L=z(N,M.XMLNS,+"PageContents");L.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);L.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",M.XMLNS_R);var O=z(N,M.XMLNS,"Shapes");L.appendChild(O);var ba=H.model,W=H.view.translate,R=H.view.scale,T=H.getGraphBounds();K.shiftX=0;K.shiftY=0;if(T.x/R<W.x||T.y/R<W.y)K.shiftX=Math.ceil((W.x-T.x/R)/H.pageFormat.width)*H.pageFormat.width,K.shiftY=Math.ceil((W.y-T.y/R)/H.pageFormat.height)*H.pageFormat.height;K.save();K.translate(-W.x,-W.y);K.scale(1/R);K.newPage();+R=H.model.getChildCells(H.model.root);W={};for(T=0;T<R.length;T++)W[R[T].id]=T;for(var ka in ba.cells)R=ba.cells[ka],T=null!=R.parent?W[R.parent.id]:null,null!=T&&(R=q(R,T,H,N,J.pageHeight),null!=R&&O.appendChild(R));H=z(N,M.XMLNS,"Connects");L.appendChild(H);for(ka in ba.cells)R=ba.cells[ka],R.edge&&(R.source&&(J=z(N,M.XMLNS,"Connect"),J.setAttribute("FromSheet",B(R.id)),J.setAttribute("FromCell","BeginX"),J.setAttribute("ToSheet",B(R.source.id)),H.appendChild(J)),R.target&&(J=z(N,M.XMLNS,"Connect"),+J.setAttribute("FromSheet",B(R.id)),J.setAttribute("FromCell","EndX"),J.setAttribute("ToSheet",B(R.target.id)),H.appendChild(J)));N.appendChild(L);K.restore();return N}function A(H,J,N,L){H.file(J,(L?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(N,"\n"))}function C(H,J,N,L){var O=mxUtils.createXmlDocument(),ba=mxUtils.createXmlDocument(),W=z(O,M.XMLNS,"Pages");W.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);W.setAttributeNS("http://www.w3.org/2000/xmlns/",+"xmlns:r",M.XMLNS_R);var R=z(ba,M.RELS_XMLNS,"Relationships"),T=1,ka;for(ka in J){var ca="page"+T+".xml",qa=z(O,M.XMLNS,"Page");qa.setAttribute("ID",T-1);qa.setAttribute("NameU",ka);qa.setAttribute("Name",ka);var sa=z(O,M.XMLNS,"PageSheet"),Fa=L[ka];sa.appendChild(h("PageWidth",Fa.pageWidth,O));sa.appendChild(h("PageHeight",Fa.pageHeight,O));sa.appendChild(c("PageScale",Fa.pageScale,O));sa.appendChild(c("DrawingScale",1,O));Fa=z(O,M.XMLNS,"Rel");Fa.setAttributeNS(M.XMLNS_R,"r:id","rId"+T);var pa=z(O,M.XMLNS,"Section");pa.setAttribute("N","Layer");for(var Za=N[ka],Qb=0;Qb<Za.length;Qb++){var vb=z(O,M.XMLNS,"Row");vb.setAttribute("IX",Qb+"");pa.appendChild(vb);vb.appendChild(c("Name",Za[Qb].name,O));vb.appendChild(c("Color","255",O));vb.appendChild(c("Status","0",O));vb.appendChild(c("Visible",Za[Qb].visible?"1":"0",O));vb.appendChild(c("Print","1",O));vb.appendChild(c("Active","0",O));vb.appendChild(c("Lock",Za[Qb].locked?"1":"0",O));vb.appendChild(c("Snap","1",O));vb.appendChild(c("Glue",-"1",O));vb.appendChild(c("NameUniv",Za[Qb].name,O));vb.appendChild(c("ColorTrans","0",O))}sa.appendChild(pa);qa.appendChild(sa);qa.appendChild(Fa);W.appendChild(qa);qa=z(ba,M.RELS_XMLNS,"Relationship");qa.setAttribute("Id","rId"+S);qa.setAttribute("Type",M.PAGES_TYPE);qa.setAttribute("Target",ca);R.appendChild(qa);A(H,M.VISIO_PAGES+ca,I[ka]);S++}O.appendChild(W);ba.appendChild(R);A(H,M.VISIO_PAGES+"pages.xml",O);A(H,M.VISIO_PAGES+"_rels/pages.xml.rels",ba)}function J(H,I){I=M.VISIO_PAGES_RELS+"page"+-I+".xml.rels";var N=mxUtils.createXmlDocument(),K=z(N,M.RELS_XMLNS,"Relationships"),O=z(N,M.RELS_XMLNS,"Relationship");O.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");O.setAttribute("Id","rId1");O.setAttribute("Target","../masters/master1.xml");K.appendChild(O);var ba=L.images;if(0<ba.length)for(var W=0;W<ba.length;W++)O=z(N,M.RELS_XMLNS,"Relationship"),O.setAttribute("Type",M.XMLNS_R+"/image"),O.setAttribute("Id","rId"+(W+2)),O.setAttribute("Target","../media/"+-ba[W]),K.appendChild(O);N.appendChild(K);A(H,I,N)}var M=this,L=new mxVsdxCanvas2D,Q={},U=1;this.exportCurrentDiagrams=function(H){try{if(g.spinner.spin(document.body,mxResources.get("exporting"))){var I=function(Fa,pa){Fa=Fa.model.getChildCells(Fa.model.root);O[pa]=[];for(var Za=0;Za<Fa.length;Za++)Fa[Za].visible&&O[pa].push({name:Fa[Za].value||"Background",visible:Fa[Za].visible,locked:Fa[Za].style&&0<=Fa[Za].style.indexOf("locked=1")})},N=new JSZip;L.init(N);Q={};U=1;var K={},O={},ba={},W=null!=-g.pages?g.pages.length:1;if(null!=g.pages){var R=function(Fa){Fa=Fa.getName();var pa=g.editor.graph,Za=m(pa);K[Fa]=x(pa,Za);I(pa,Fa);J(N,ca+1);ba[Fa]=Za},S=g.editor.graph.getSelectionCells(),ka=g.currentPage;if(H)R(ka);else{for(var ca=0;ca<g.pages.length;ca++){var qa=g.pages[ca];g.currentPage!=qa&&g.selectPage(qa,!0);R(qa)}ka!=g.currentPage&&g.selectPage(ka,!0);g.editor.graph.setSelectionCells(S)}}else{R=g.editor.graph;var sa=m(R);K.Page1=x(R,sa);I(R,"Page1");J(N,1);ba.Page1=sa}y(N,W);C(N,K,O,ba);-H=function(){N.generateAsync({type:"base64"}).then(function(Fa){g.spinner.stop();var pa=g.getBaseFilename();g.saveData(pa+".vsdx","vsdx",Fa,"application/vnd.visio2013",!0)})};0<L.filesLoading?L.onFilesLoaded=H:H()}return!0}catch(Fa){return console.log(Fa),g.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";+"1",O));vb.appendChild(c("NameUniv",Za[Qb].name,O));vb.appendChild(c("ColorTrans","0",O))}sa.appendChild(pa);qa.appendChild(sa);qa.appendChild(Fa);W.appendChild(qa);qa=z(ba,M.RELS_XMLNS,"Relationship");qa.setAttribute("Id","rId"+T);qa.setAttribute("Type",M.PAGES_TYPE);qa.setAttribute("Target",ca);R.appendChild(qa);A(H,M.VISIO_PAGES+ca,J[ka]);T++}O.appendChild(W);ba.appendChild(R);A(H,M.VISIO_PAGES+"pages.xml",O);A(H,M.VISIO_PAGES+"_rels/pages.xml.rels",ba)}function I(H,J){J=M.VISIO_PAGES_RELS+"page"++J+".xml.rels";var N=mxUtils.createXmlDocument(),L=z(N,M.RELS_XMLNS,"Relationships"),O=z(N,M.RELS_XMLNS,"Relationship");O.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");O.setAttribute("Id","rId1");O.setAttribute("Target","../masters/master1.xml");L.appendChild(O);var ba=K.images;if(0<ba.length)for(var W=0;W<ba.length;W++)O=z(N,M.RELS_XMLNS,"Relationship"),O.setAttribute("Type",M.XMLNS_R+"/image"),O.setAttribute("Id","rId"+(W+2)),O.setAttribute("Target","../media/"++ba[W]),L.appendChild(O);N.appendChild(L);A(H,J,N)}var M=this,K=new mxVsdxCanvas2D,Q={},S=1;this.exportCurrentDiagrams=function(H){try{if(g.spinner.spin(document.body,mxResources.get("exporting"))){var J=function(Fa,pa){Fa=Fa.model.getChildCells(Fa.model.root);O[pa]=[];for(var Za=0;Za<Fa.length;Za++)Fa[Za].visible&&O[pa].push({name:Fa[Za].value||"Background",visible:Fa[Za].visible,locked:Fa[Za].style&&0<=Fa[Za].style.indexOf("locked=1")})},N=new JSZip;K.init(N);Q={};S=1;var L={},O={},ba={},W=null!=+g.pages?g.pages.length:1;if(null!=g.pages){var R=function(Fa){Fa=Fa.getName();var pa=g.editor.graph,Za=m(pa);L[Fa]=t(pa,Za);J(pa,Fa);I(N,ca+1);ba[Fa]=Za},T=g.editor.graph.getSelectionCells(),ka=g.currentPage;if(H)R(ka);else{for(var ca=0;ca<g.pages.length;ca++){var qa=g.pages[ca];g.currentPage!=qa&&g.selectPage(qa,!0);R(qa)}ka!=g.currentPage&&g.selectPage(ka,!0);g.editor.graph.setSelectionCells(T)}}else{R=g.editor.graph;var sa=m(R);L.Page1=t(R,sa);J(R,"Page1");I(N,1);ba.Page1=sa}y(N,W);C(N,L,O,ba);+H=function(){N.generateAsync({type:"base64"}).then(function(Fa){g.spinner.stop();var pa=g.getBaseFilename();g.saveData(pa+".vsdx","vsdx",Fa,"application/vnd.visio2013",!0)})};0<K.filesLoading?K.onFilesLoaded=H:H()}return!0}catch(Fa){return console.log(Fa),g.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";VsdxExport.prototype.XMLNS="http://schemas.microsoft.com/office/visio/2012/main";VsdxExport.prototype.VISIO_PAGES="visio/pages/";VsdxExport.prototype.PREFEX="com/mxgraph/io/vsdx/resources/export/";VsdxExport.prototype.VSDX_ENC="ISO-8859-1";VsdxExport.prototype.PART_NAME="PartName";VsdxExport.prototype.CONTENT_TYPES_XML="[Content_Types].xml";VsdxExport.prototype.VISIO_PAGES_RELS="visio/pages/_rels/";VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(g){this.filesLoading=0;this.zip=g};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(g){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,g):this.xmlDoc.createElement(g)};mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var g=this.createElt("Section");g.setAttribute("N","Geometry");g.setAttribute("IX",this.geoIndex++);this.geoSec=g;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(g,y,z){this.geoIndex=0;this.shape=g;this.cellState=y;this.xmGeo=y.cell.geometry;this.xmlDoc=z;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()};mxVsdxCanvas2D.prototype.newEdge=function(g,y,z){this.shape=g;this.cellState=y;this.xmGeo=y.cellBounds;this.xmlDoc=z};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec};mxVsdxCanvas2D.prototype.createCellElemScaled=function(g,y,z){return this.createCellElem(g,y/VsdxExport.prototype.CONVERSION_FACTOR,z)};mxVsdxCanvas2D.prototype.createCellElem=function(g,y,z){var B=this.createElt("Cell");B.setAttribute("N",g);B.setAttribute("V",y);z&&B.setAttribute("F",z);return B};-mxVsdxCanvas2D.prototype.createRowScaled=function(g,y,z,B,m,h,c,a,b,d,f,k,n,p){return this.createRowRel(g,y,z/VsdxExport.prototype.CONVERSION_FACTOR,B/VsdxExport.prototype.CONVERSION_FACTOR,m/VsdxExport.prototype.CONVERSION_FACTOR,h/VsdxExport.prototype.CONVERSION_FACTOR,c/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,b,d,f,k,n,p)};-mxVsdxCanvas2D.prototype.createRowRel=function(g,y,z,B,m,h,c,a,b,d,f,k,n,p){var x=this.createElt("Row");x.setAttribute("T",g);x.setAttribute("IX",y);x.appendChild(this.createCellElem("X",z,b));x.appendChild(this.createCellElem("Y",B,d));null!=m&&isFinite(m)&&x.appendChild(this.createCellElem("A",m,f));null!=h&&isFinite(h)&&x.appendChild(this.createCellElem("B",h,k));null!=c&&isFinite(c)&&x.appendChild(this.createCellElem("C",c,n));null!=a&&isFinite(a)&&x.appendChild(this.createCellElem("D",a,p));-return x};mxVsdxCanvas2D.prototype.begin=function(){1<this.geoStepIndex&&this.createGeoSec()};+mxVsdxCanvas2D.prototype.createRowScaled=function(g,y,z,B,m,h,c,a,b,d,f,k,n,q){return this.createRowRel(g,y,z/VsdxExport.prototype.CONVERSION_FACTOR,B/VsdxExport.prototype.CONVERSION_FACTOR,m/VsdxExport.prototype.CONVERSION_FACTOR,h/VsdxExport.prototype.CONVERSION_FACTOR,c/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,b,d,f,k,n,q)};+mxVsdxCanvas2D.prototype.createRowRel=function(g,y,z,B,m,h,c,a,b,d,f,k,n,q){var t=this.createElt("Row");t.setAttribute("T",g);t.setAttribute("IX",y);t.appendChild(this.createCellElem("X",z,b));t.appendChild(this.createCellElem("Y",B,d));null!=m&&isFinite(m)&&t.appendChild(this.createCellElem("A",m,f));null!=h&&isFinite(h)&&t.appendChild(this.createCellElem("B",h,k));null!=c&&isFinite(c)&&t.appendChild(this.createCellElem("C",c,n));null!=a&&isFinite(a)&&t.appendChild(this.createCellElem("D",a,q));+return t};mxVsdxCanvas2D.prototype.begin=function(){1<this.geoStepIndex&&this.createGeoSec()};mxVsdxCanvas2D.prototype.rect=function(g,y,z,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;z*=m.scale;B*=m.scale;var h=this.xmGeo;g=(g-h.x+m.dx)*m.scale;y=(h.height-y+h.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("MoveTo",this.geoStepIndex++,g,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g+z,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g+z,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g,y))};mxVsdxCanvas2D.prototype.roundrect=function(g,y,z,B,m,h){this.rect(g,y,z,B);this.shape.appendChild(this.createCellElemScaled("Rounding",m))};mxVsdxCanvas2D.prototype.ellipse=function(g,y,z,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;z*=m.scale;B*=m.scale;var h=this.xmGeo,c=h.height*m.scale,a=h.width*m.scale;g=(g-h.x+m.dx)*m.scale;y=c+(-y+h.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,g+z/2,y-B/2,g,y-B/2,g+z/2,y,"Width*"+(g+z/2)/a,"Height*"+(y-B/2)/c,"Width*"+g/a,"Height*"+(y-B/2)/c,"Width*"+(g+z/2)/a,"Height*"+y/c))};@@ -1102,18 +1102,18 @@ mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lasmxVsdxCanvas2D.prototype.convertSvg2Png=function(g,y,z){var B=this;this.filesLoading++;try{var m=document.createElement("canvas"),h=m.getContext("2d");y||(g=String.fromCharCode.apply(null,new Uint8Array(g)),g=window.btoa?btoa(g):Base64.encode(g,!0));y="data:image/svg+xml;base64,"+g;img=new Image;img.onload=function(){m.width=this.width;m.height=this.height;h.drawImage(this,0,0);try{z(m.toDataURL("image/png"))}catch(c){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed");try{z(g)}catch(c){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.src=y}catch(c){console.log("SVG2PNG conversion failed"+c.message);try{z(g)}catch(a){}this.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()}};mxVsdxCanvas2D.prototype.image=function(g,y,z,B,m,h,c,a){var b=this,d="image"+(this.images.length+1)+".";if(0==m.indexOf("data:")){var f=m.indexOf("base64,");h=m.substring(f+7);f=m.substring(11,f-1);0==f.indexOf("svg")?(f="png",d+=f,this.convertSvg2Png(h,!0,function(n){b.zip.file("visio/media/"+d,n.substring(22),{base64:!0})})):(d+=f,this.zip.file("visio/media/"+d,h,{base64:!0}))}else if(window.XMLHttpRequest){m=this.converter.convert(m);this.filesLoading++;f=m.lastIndexOf(".");f=m.substring(f+1);-var k=!1;0==f.indexOf("svg")&&(f="png",k=!0);d+=f;h=new XMLHttpRequest;h.open("GET",m,!0);h.responseType="arraybuffer";h.onreadystatechange=function(n){if(4==this.readyState&&(200==this.status&&(k?b.convertSvg2Png(this.response,!1,function(p){b.zip.file("visio/media/"+d,p.substring(22),{base64:!0})}):b.zip.file("visio/media/"+d,this.response)),b.filesLoading--,0==b.filesLoading))b.onFilesLoaded()};h.send()}this.images.push(d);this.shapeImg={type:f,id:this.images.length+1};m=this.state;z*=m.scale;+var k=!1;0==f.indexOf("svg")&&(f="png",k=!0);d+=f;h=new XMLHttpRequest;h.open("GET",m,!0);h.responseType="arraybuffer";h.onreadystatechange=function(n){if(4==this.readyState&&(200==this.status&&(k?b.convertSvg2Png(this.response,!1,function(q){b.zip.file("visio/media/"+d,q.substring(22),{base64:!0})}):b.zip.file("visio/media/"+d,this.response)),b.filesLoading--,0==b.filesLoading))b.onFilesLoaded()};h.send()}this.images.push(d);this.shapeImg={type:f,id:this.images.length+1};m=this.state;z*=m.scale;B*=m.scale;f=this.xmGeo;g=(g-f.x+m.dx)*m.scale;y=(f.height-y+f.y-m.dy)*m.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",g));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",y-B));this.shape.appendChild(this.createCellElemScaled("ImgWidth",z));this.shape.appendChild(this.createCellElemScaled("ImgHeight",B))};-mxVsdxCanvas2D.prototype.text=function(g,y,z,B,m,h,c,a,b,d,f,k,n){var p=this;if(this.textEnabled&&null!=m){mxUtils.isNode(m)&&(m=mxUtils.getOuterHtml(m));0==z&&0==B&&(B=mxUtils.getSizeForString(m,p.cellState.style.fontSize,p.cellState.style.fontFamily),z=2*B.width,B=2*B.height);"html"==b&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=Graph.sanitizeHtml(m),-m=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));d=this.state;f=this.xmGeo;z*=d.scale;B*=d.scale;var x=this.createElt("Section");x.setAttribute("N","Character");var A=this.createElt("Section");A.setAttribute("N","Paragraph");var C=this.createElt("Text"),J=0,M=0,L=0,Q=0,U=0,H=0,I=0,N=function(R,S,ka,ca,qa){var sa=R.fontSize,Fa=R.fontFamily,pa=mxUtils.getSizeForString(qa,sa,Fa);a&&pa.width>z&&(pa=mxUtils.getSizeForString(qa,sa,Fa,z));R.blockElem?(U+=pa.width,L=Math.min(Math.max(L,U),-z),U=0,H=Math.max(H,pa.height),Q+=H+I,I=H,H=0):(U+=pa.width,L=Math.min(Math.max(L,U),z),H=Math.max(H,pa.height),Q=Math.max(Q,H));pa=p.createElt("Row");pa.setAttribute("IX",J);R.fontColor&&pa.appendChild(p.createCellElem("Color",mxUtils.rgba2hex(R.fontColor)));sa&&pa.appendChild(p.createCellElemScaled("Size",.97*sa));Fa&&pa.appendChild(p.createCellElem("Font",Fa));sa=0;R.bold&&(sa|=17);R.italic&&(sa|=34);R.underline&&(sa|=4);pa.appendChild(p.createCellElem("Style",sa));pa.appendChild(p.createCellElem("Case",-"0"));pa.appendChild(p.createCellElem("Pos","0"));pa.appendChild(p.createCellElem("FontScale","1"));pa.appendChild(p.createCellElem("Letterspace","0"));S.appendChild(pa);S=p.createElt("Row");S.setAttribute("IX",M);switch(R.align){case "left":sa=0;break;case "center":sa=1;break;case "right":sa=2;break;case "start":sa=0;break;case "end":sa=2;break;case "justify":sa=0;break;default:sa=1}S.appendChild(p.createCellElem("HorzAlign",sa));ka.appendChild(S);ka=p.createElt("cp");ka.setAttribute("IX",J++);ca.appendChild(ka);-R=p.xmlDoc.createTextNode(qa+(R.blockElem?"\n":""));ca.appendChild(R)},K=function(R,S){S=S||{};for(var ka=0;ka<R.length;ka++){var ca=R[ka];if(3==ca.nodeType){var qa=p.cellState.style.fontStyle;qa={fontColor:S.fontColor||p.cellState.style.fontColor,fontSize:S.fontSize||p.cellState.style.fontSize,fontFamily:S.fontFamily||p.cellState.style.fontFamily,align:S.align||p.cellState.style.align,bold:S.bold||qa&1,italic:S.italic||qa&2,underline:S.underline||qa&4};var sa=!1;ka+1<R.length&&"BR"==R[ka+1].nodeName.toUpperCase()&&-(sa=!0,ka++);N(qa,x,A,C,(S.OL?S.LiIndex+". ":"")+ca.textContent+(sa?"\n":""))}else if(1==ca.nodeType){sa=ca.nodeName.toUpperCase();var Fa=ca.childNodes.length;qa=window.getComputedStyle(ca,null);qa={bold:"bold"==qa.getPropertyValue("font-weight")||S.bold,italic:"italic"==qa.getPropertyValue("font-style")||S.italic,underline:0<=qa.getPropertyValue("text-decoration").indexOf("underline")||S.underline,align:qa.getPropertyValue("text-align"),fontColor:qa.getPropertyValue("color"),fontSize:parseFloat(qa.getPropertyValue("font-size")),-fontFamily:qa.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==qa.getPropertyValue("display")||"BR"==sa||"LI"==sa,OL:S.OL,LiIndex:S.LiIndex};if("UL"==sa){var pa=p.createElt("Row");pa.setAttribute("IX",M);pa.appendChild(p.createCellElem("HorzAlign","0"));pa.appendChild(p.createCellElem("Bullet","1"));A.appendChild(pa);pa=p.createElt("pp");pa.setAttribute("IX",M++);C.appendChild(pa)}else"OL"==sa?qa.OL=!0:"LI"==sa&&(qa.LiIndex=ka+1);0<Fa?(K(ca.childNodes,qa),"UL"==sa&&(pa=p.createElt("Row"),-pa.setAttribute("IX",M),pa.appendChild(p.createCellElem("Bullet","0")),A.appendChild(pa),pa=p.createElt("pp"),pa.setAttribute("IX",M++),C.appendChild(pa)),N(qa,x,A,C,"")):N(qa,x,A,C,(S.OL?S.LiIndex+". ":"")+ca.textContent)}}};"html"==b&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&K(m.childNodes,{})):N({fontColor:p.cellState.style.fontColor,fontSize:p.cellState.style.fontSize,fontFamily:p.cellState.style.fontFamily},x,A,C,m);b=m=0;B=Math.max(B,-Q);z=Math.max(z,L);n=z/2;var O=B/2,ba=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),W=ba*Math.PI/180;switch(h){case "right":0!=ba?(g-=n*Math.cos(W),y-=n*Math.sin(W)):m=L/2;break;case "left":0!=ba?(g+=n*Math.cos(W),y+=n*Math.sin(W)):m=-L/2}switch(c){case "top":0!=ba?(g+=O*Math.sin(W),y+=O*Math.cos(W)):b=Q/2;break;case "bottom":0!=ba?(g-=O*Math.sin(W),y-=O*Math.cos(W)):b=-Q/2}g=(g-f.x+d.dx)*d.scale;y=(f.height-y+f.y-d.dy)*d.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",-g));this.shape.appendChild(this.createCellElemScaled("TxtPinY",y));this.shape.appendChild(this.createCellElemScaled("TxtWidth",z));this.shape.appendChild(this.createCellElemScaled("TxtHeight",B));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",n+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",O+b));k-=ba;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(x);this.shape.appendChild(A);this.shape.appendChild(C)}};+mxVsdxCanvas2D.prototype.text=function(g,y,z,B,m,h,c,a,b,d,f,k,n){var q=this;if(this.textEnabled&&null!=m){mxUtils.isNode(m)&&(m=mxUtils.getOuterHtml(m));0==z&&0==B&&(B=mxUtils.getSizeForString(m,q.cellState.style.fontSize,q.cellState.style.fontFamily),z=2*B.width,B=2*B.height);"html"==b&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=Graph.sanitizeHtml(m),+m=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));d=this.state;f=this.xmGeo;z*=d.scale;B*=d.scale;var t=this.createElt("Section");t.setAttribute("N","Character");var A=this.createElt("Section");A.setAttribute("N","Paragraph");var C=this.createElt("Text"),I=0,M=0,K=0,Q=0,S=0,H=0,J=0,N=function(R,T,ka,ca,qa){var sa=R.fontSize,Fa=R.fontFamily,pa=mxUtils.getSizeForString(qa,sa,Fa);a&&pa.width>z&&(pa=mxUtils.getSizeForString(qa,sa,Fa,z));R.blockElem?(S+=pa.width,K=Math.min(Math.max(K,S),+z),S=0,H=Math.max(H,pa.height),Q+=H+J,J=H,H=0):(S+=pa.width,K=Math.min(Math.max(K,S),z),H=Math.max(H,pa.height),Q=Math.max(Q,H));pa=q.createElt("Row");pa.setAttribute("IX",I);R.fontColor&&pa.appendChild(q.createCellElem("Color",mxUtils.rgba2hex(R.fontColor)));sa&&pa.appendChild(q.createCellElemScaled("Size",.97*sa));Fa&&pa.appendChild(q.createCellElem("Font",Fa));sa=0;R.bold&&(sa|=17);R.italic&&(sa|=34);R.underline&&(sa|=4);pa.appendChild(q.createCellElem("Style",sa));pa.appendChild(q.createCellElem("Case",+"0"));pa.appendChild(q.createCellElem("Pos","0"));pa.appendChild(q.createCellElem("FontScale","1"));pa.appendChild(q.createCellElem("Letterspace","0"));T.appendChild(pa);T=q.createElt("Row");T.setAttribute("IX",M);switch(R.align){case "left":sa=0;break;case "center":sa=1;break;case "right":sa=2;break;case "start":sa=0;break;case "end":sa=2;break;case "justify":sa=0;break;default:sa=1}T.appendChild(q.createCellElem("HorzAlign",sa));ka.appendChild(T);ka=q.createElt("cp");ka.setAttribute("IX",I++);ca.appendChild(ka);+R=q.xmlDoc.createTextNode(qa+(R.blockElem?"\n":""));ca.appendChild(R)},L=function(R,T){T=T||{};for(var ka=0;ka<R.length;ka++){var ca=R[ka];if(3==ca.nodeType){var qa=q.cellState.style.fontStyle;qa={fontColor:T.fontColor||q.cellState.style.fontColor,fontSize:T.fontSize||q.cellState.style.fontSize,fontFamily:T.fontFamily||q.cellState.style.fontFamily,align:T.align||q.cellState.style.align,bold:T.bold||qa&1,italic:T.italic||qa&2,underline:T.underline||qa&4};var sa=!1;ka+1<R.length&&"BR"==R[ka+1].nodeName.toUpperCase()&&+(sa=!0,ka++);N(qa,t,A,C,(T.OL?T.LiIndex+". ":"")+ca.textContent+(sa?"\n":""))}else if(1==ca.nodeType){sa=ca.nodeName.toUpperCase();var Fa=ca.childNodes.length;qa=window.getComputedStyle(ca,null);qa={bold:"bold"==qa.getPropertyValue("font-weight")||T.bold,italic:"italic"==qa.getPropertyValue("font-style")||T.italic,underline:0<=qa.getPropertyValue("text-decoration").indexOf("underline")||T.underline,align:qa.getPropertyValue("text-align"),fontColor:qa.getPropertyValue("color"),fontSize:parseFloat(qa.getPropertyValue("font-size")),+fontFamily:qa.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==qa.getPropertyValue("display")||"BR"==sa||"LI"==sa,OL:T.OL,LiIndex:T.LiIndex};if("UL"==sa){var pa=q.createElt("Row");pa.setAttribute("IX",M);pa.appendChild(q.createCellElem("HorzAlign","0"));pa.appendChild(q.createCellElem("Bullet","1"));A.appendChild(pa);pa=q.createElt("pp");pa.setAttribute("IX",M++);C.appendChild(pa)}else"OL"==sa?qa.OL=!0:"LI"==sa&&(qa.LiIndex=ka+1);0<Fa?(L(ca.childNodes,qa),"UL"==sa&&(pa=q.createElt("Row"),+pa.setAttribute("IX",M),pa.appendChild(q.createCellElem("Bullet","0")),A.appendChild(pa),pa=q.createElt("pp"),pa.setAttribute("IX",M++),C.appendChild(pa)),N(qa,t,A,C,"")):N(qa,t,A,C,(T.OL?T.LiIndex+". ":"")+ca.textContent)}}};"html"==b&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&L(m.childNodes,{})):N({fontColor:q.cellState.style.fontColor,fontSize:q.cellState.style.fontSize,fontFamily:q.cellState.style.fontFamily},t,A,C,m);b=m=0;B=Math.max(B,+Q);z=Math.max(z,K);n=z/2;var O=B/2,ba=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),W=ba*Math.PI/180;switch(h){case "right":0!=ba?(g-=n*Math.cos(W),y-=n*Math.sin(W)):m=K/2;break;case "left":0!=ba?(g+=n*Math.cos(W),y+=n*Math.sin(W)):m=-K/2}switch(c){case "top":0!=ba?(g+=O*Math.sin(W),y+=O*Math.cos(W)):b=Q/2;break;case "bottom":0!=ba?(g-=O*Math.sin(W),y-=O*Math.cos(W)):b=-Q/2}g=(g-f.x+d.dx)*d.scale;y=(f.height-y+f.y-d.dy)*d.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",+g));this.shape.appendChild(this.createCellElemScaled("TxtPinY",y));this.shape.appendChild(this.createCellElemScaled("TxtWidth",z));this.shape.appendChild(this.createCellElemScaled("TxtHeight",B));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",n+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",O+b));k-=ba;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(t);this.shape.appendChild(A);this.shape.appendChild(C)}};mxVsdxCanvas2D.prototype.rotate=function(g,y,z,B,m){0!=g&&(y=this.state,B+=y.dx,m+=y.dy,B*=y.scale,m*=y.scale,this.shape.appendChild(this.createCellElem("Angle",(360-g)*Math.PI/180)),y.rotation+=g,y.rotationCx=B,y.rotationCy=m)};mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};function BmpDecoder(g,y){this.pos=0;this.buffer=g;this.is_with_alpha=!!y;if(66!=this.buffer[0]&&77!=this.buffer[1])throw Error("Invalid BMP File");this.pos+=2;this.parseHeader();this.parseBGR()}BmpDecoder.prototype.parseHeader=function(){var g=this.buffer;this.fileSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.reserved=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.offset=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.headerSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.width=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];@@ -1130,66 +1130,66 @@ BmpDecoder.prototype.bit32=function(){for(var g=this.height-1;0<=g;g--)for(var y(function(g){(function(y){(function(z){var B=function(){function m(c){this.RESPONSE_END="</mxfile>";this.RESPONSE_DIAGRAM_START="";this.RESPONSE_DIAGRAM_END="</diagram>";this.RESPONSE_HEADER='<?xml version="1.0" encoding="UTF-8"?><mxfile>';this.vertexMap={};this.edgeShapeMap={};this.vertexShapeMap={};this.parentsMap={};this.layerNames=[];this.debugPaths=!1;this.vsdxModel=null;this.editorUi=c;this.shapeIndexShift=0}function h(c,a,b,d,f){c=b.createLabelSubShape(c,a);null!=c&&(0!==d&&(a=c.getStyle().match(/;rotation=(\d+\.*\d+)/),null!=a&&(d+=parseFloat(a[1])),c.setStyle(c.getStyle().replace(/;rotation=(\d+\.*\d+)/,"")+";rotation="+(60<d&&240>d?(d+180)%360:d))),d=c.getGeometry(),d.x=0,d.y=0,d.relative=!0,f=f||new mxPoint(0,0),d.offset=new mxPoint(f.x-d.width/2,f.y-d.height/2))}m.vsdxPlaceholder_$LI$=function(){null==m.vsdxPlaceholder&&(m.vsdxPlaceholder=window.atob?atob("dmlzaW8="):Base64.decode("dmlzaW8=",!0));return m.vsdxPlaceholder};m.parsererrorNS_$LI$=function(){m.parsererrorNS=mxConstants.NS_XHTML;return m.parsererrorNS};m.parseXml=function(c){try{var a=mxUtils.parseXml(c);return 0<a.getElementsByTagNameNS(m.parsererrorNS,"parsererror").length?null:a}catch(b){return null}};m.decodeUTF16LE=function(c){for(var a="",b=0;b<c.length;b+=2)a+=String.fromCharCode(c.charCodeAt(b)|c.charCodeAt(b+1)<<8);return a};m.prototype.scaleGraph=function(c,a){if(1!==a){c=c.getModel();for(var b in c.cells){var d=c.cells[b],f=c.getGeometry(d);if(null!=f&&(this.scaleRect(f,a),this.scaleRect(f.alternateBounds,a),c.isEdge(d)&&(this.scalePoint(f.sourcePoint,-a),this.scalePoint(f.targetPoint,a),this.scalePoint(f.offset,a),d=f.points,null!=d)))for(f=0;f<d.length;f++)this.scalePoint(d[f],a)}}};m.incorrectXMLReqExp=[{regExp:/&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&"}];m.prototype.decodeVsdx=function(c,a,b,d){function f(L,Q,U){function H(){C++;J();Q++;Q==I&&f(L,Q,U)}for(var I=Math.min(Q+M,L.length),N=Q;N<I;N++)(function(K){function O(W){var R=new FormData;R.append("img",W,K.name);R.append("inputformat","emf");R.append("outputformat","png");var S=new XMLHttpRequest;-S.open("POST",EMF_CONVERT_URL);S.responseType="blob";k.editorUi.addRemoteServiceSecurityCheck(S);S.onreadystatechange=mxUtils.bind(this,function(){if(4==S.readyState)if(200<=S.status&&299>=S.status)try{var ka=new FileReader;ka.readAsDataURL(S.response);ka.onloadend=function(){var ca=ka.result.indexOf(",")+1;U[K.name]=ka.result.substr(ca);H()}}catch(ca){console.log(ca),H()}else ba++,3>ba?O(W):H()});S.send(R)}var ba=0;K.async("blob").then(O)})(L[N])}var k=this,n={},p={},x=function(){function L(){I=-I.concat(k.RESPONSE_END);a&&a(I)}for(var Q=m.vsdxPlaceholder+"/document.xml",U=n[Q]?n[Q]:null,H=U.firstChild;null!=H&&1!=H.nodeType;)H=H.nextSibling;if(null!=H&&1==H.nodeType)k.importNodes(U,H,Q,n);else return null;k.vsdxModel=new g.mxgraph.io.vsdx.mxVsdxModel(U,n,p);Q=k.vsdxModel.getPages();var I=k.RESPONSE_HEADER;var N=function(ba){null==ba.entries&&(ba.entries=[]);return ba.entries}(Q),K=function(ba,W){var R=N[ba].getValue(),S=O.createMxGraph();S.getModel().beginUpdate();O.importPage(R,S,S.getDefaultParent(),-!0);O.scaleGraph(S,R.getPageScale()/R.getDrawingScale());S.getModel().endUpdate();O.postImportPage(R,S,function(){O.sanitiseGraph(S);I=I.concat(k.RESPONSE_DIAGRAM_START);I=I.concat(k.processPage(S,R));I=I.concat(k.RESPONSE_DIAGRAM_END);ba<N.length-1?K(ba+1,W):W()})},O=k;0<N.length?K(0,L):L()},A=0,C=0,J=function(){if(C==A)try{x()}catch(L){console.log(L),null!=d?d(L):a("")}},M=window.EMF_CHUNK_SIZE||10;JSZip.loadAsync(c).then(function(L){if(0==Object.keys(L.files).length)null!=d&&d();else{var Q=[];-L.forEach(function(U,H){var I=H.name;U=I.toLowerCase();var N=U.length;U.indexOf(".xml")==N-4||U.indexOf(".rels")==N-5?(A++,H.async("string").then(function(K){if(0!==K.length){65279==K.charCodeAt(0)&&(K=K.substring(1));var O=m.parseXml(K);if(null==O)if(0===K.charCodeAt(1)&&0===K.charCodeAt(3)&&0===K.charCodeAt(5))O=m.parseXml(m.decodeUTF16LE(K));else{for(O=0;O<m.incorrectXMLReqExp.length;O++)m.incorrectXMLReqExp[O].regExp.test(K)&&(K=K.replace(m.incorrectXMLReqExp[O].regExp,m.incorrectXMLReqExp[O].repl));-O=m.parseXml(K)}null!=O&&(O.vsdxFileName=I,n[I]=O)}C++;J()})):0===U.indexOf(m.vsdxPlaceholder+"/media")&&(A++,function(K,O){var ba=K.length-O.length;K=K.indexOf(O,ba);return-1!==K&&K===ba}(U,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?Q.push(H):(C++,J()):function(K,O){var ba=K.length-O.length;K=K.indexOf(O,ba);return-1!==K&&K===ba}(U,".bmp")?JSZip.support.uint8array&&H.async("uint8array").then(function(K){K=new BmpDecoder(K);var O=document.createElement("canvas");O.width=K.width;O.height=K.height;-O.getContext("2d").putImageData(K.imageData,0,0);K=O.toDataURL("image/jpeg");p[I]=K.substr(23);C++;J()}):H.async("base64").then(function(K){p[I]=K;C++;J()}))});f(Q,0,p)}},function(L){null!=d&&d(L)})};m.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};m.prototype.processPage=function(c,a){c=(new mxCodec).encode(c.getModel());c.setAttribute("style","default-style2");+a),this.scalePoint(f.targetPoint,a),this.scalePoint(f.offset,a),d=f.points,null!=d)))for(f=0;f<d.length;f++)this.scalePoint(d[f],a)}}};m.incorrectXMLReqExp=[{regExp:/&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&"}];m.prototype.decodeVsdx=function(c,a,b,d){function f(K,Q,S){function H(){C++;I();Q++;Q==J&&f(K,Q,S)}for(var J=Math.min(Q+M,K.length),N=Q;N<J;N++)(function(L){function O(W){var R=new FormData;R.append("img",W,L.name);R.append("inputformat","emf");R.append("outputformat","png");var T=new XMLHttpRequest;+T.open("POST",EMF_CONVERT_URL);T.responseType="blob";k.editorUi.addRemoteServiceSecurityCheck(T);T.onreadystatechange=mxUtils.bind(this,function(){if(4==T.readyState)if(200<=T.status&&299>=T.status)try{var ka=new FileReader;ka.readAsDataURL(T.response);ka.onloadend=function(){var ca=ka.result.indexOf(",")+1;S[L.name]=ka.result.substr(ca);H()}}catch(ca){console.log(ca),H()}else ba++,3>ba?O(W):H()});T.send(R)}var ba=0;L.async("blob").then(O)})(K[N])}var k=this,n={},q={},t=function(){function K(){J=+J.concat(k.RESPONSE_END);a&&a(J)}for(var Q=m.vsdxPlaceholder+"/document.xml",S=n[Q]?n[Q]:null,H=S.firstChild;null!=H&&1!=H.nodeType;)H=H.nextSibling;if(null!=H&&1==H.nodeType)k.importNodes(S,H,Q,n);else return null;k.vsdxModel=new g.mxgraph.io.vsdx.mxVsdxModel(S,n,q);Q=k.vsdxModel.getPages();var J=k.RESPONSE_HEADER;var N=function(ba){null==ba.entries&&(ba.entries=[]);return ba.entries}(Q),L=function(ba,W){var R=N[ba].getValue(),T=O.createMxGraph();T.getModel().beginUpdate();O.importPage(R,T,T.getDefaultParent(),+!0);O.scaleGraph(T,R.getPageScale()/R.getDrawingScale());T.getModel().endUpdate();O.postImportPage(R,T,function(){O.sanitiseGraph(T);J=J.concat(k.RESPONSE_DIAGRAM_START);J=J.concat(k.processPage(T,R));J=J.concat(k.RESPONSE_DIAGRAM_END);ba<N.length-1?L(ba+1,W):W()})},O=k;0<N.length?L(0,K):K()},A=0,C=0,I=function(){if(C==A)try{t()}catch(K){console.log(K),null!=d?d(K):a("")}},M=window.EMF_CHUNK_SIZE||10;JSZip.loadAsync(c).then(function(K){if(0==Object.keys(K.files).length)null!=d&&d();else{var Q=[];+K.forEach(function(S,H){var J=H.name;S=J.toLowerCase();var N=S.length;S.indexOf(".xml")==N-4||S.indexOf(".rels")==N-5?(A++,H.async("string").then(function(L){if(0!==L.length){65279==L.charCodeAt(0)&&(L=L.substring(1));var O=m.parseXml(L);if(null==O)if(0===L.charCodeAt(1)&&0===L.charCodeAt(3)&&0===L.charCodeAt(5))O=m.parseXml(m.decodeUTF16LE(L));else{for(O=0;O<m.incorrectXMLReqExp.length;O++)m.incorrectXMLReqExp[O].regExp.test(L)&&(L=L.replace(m.incorrectXMLReqExp[O].regExp,m.incorrectXMLReqExp[O].repl));+O=m.parseXml(L)}null!=O&&(O.vsdxFileName=J,n[J]=O)}C++;I()})):0===S.indexOf(m.vsdxPlaceholder+"/media")&&(A++,function(L,O){var ba=L.length-O.length;L=L.indexOf(O,ba);return-1!==L&&L===ba}(S,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?Q.push(H):(C++,I()):function(L,O){var ba=L.length-O.length;L=L.indexOf(O,ba);return-1!==L&&L===ba}(S,".bmp")?JSZip.support.uint8array&&H.async("uint8array").then(function(L){L=new BmpDecoder(L);var O=document.createElement("canvas");O.width=L.width;O.height=L.height;+O.getContext("2d").putImageData(L.imageData,0,0);L=O.toDataURL("image/jpeg");q[J]=L.substr(23);C++;I()}):H.async("base64").then(function(L){q[J]=L;C++;I()}))});f(Q,0,q)}},function(K){null!=d&&d(K)})};m.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};m.prototype.processPage=function(c,a){c=(new mxCodec).encode(c.getModel());c.setAttribute("style","default-style2");c=mxUtils.getXml(c);var b="";if(null!=a){var d=mxUtils.htmlEntities(a.getPageName())+(a.isBackground()?" (Background)":"");a=mxUtils.htmlEntities(a.getPageNameU());b+='<diagram name="'+d+'" id="'+a.replace(/\s/g,"_")+'">'}return b+=Graph.compress(c)};m.prototype.scalePoint=function(c,a){null!=c&&(c.x*=a,c.y*=a);return c};m.prototype.scaleRect=function(c,a){null!=c&&(c.x*=a,c.y*=a,c.height*=a,c.width*=a);return c};m.prototype.importNodes=function(c,a,b,d){var f=b.lastIndexOf("/"),k=b,n=b;if(-1!==f&&-(k=b.substring(0,f),n=b.substring(f+1,b.length),b=function(C,J){return C[J]?C[J]:null}(d,k+"/_rels/"+n+".rels"),null!=b)){var p=b.getElementsByTagName("Relationship");b={};for(f=0;f<p.length;f++){n=p.item(f);var x=n.getAttribute("Id");n=n.getAttribute("Target");b[x]=n}a=a.getElementsByTagName("Rel");for(f=0;f<a.length;f++)if(p=a.item(f),n=function(C,J){return C[J]?C[J]:null}(b,p.getAttribute("r:id")),n=k+"/"+n,null!=n&&(x=d[n]?d[n]:null,null!=x)){p=p.parentNode;for(x=x.firstChild;null!=x&&1!=x.nodeType;)x=-x.nextSibling;if(null!=x&&1==x.nodeType)for(x=x.firstChild;null!=x;){if(null!=x&&1==x.nodeType){var A=p.appendChild(c.importNode(x,!0));this.importNodes(c,A,n,d)}x=x.nextSibling}}}};m.prototype.layerIndexToNames=function(c){var a=[];if(c)for(var b=0;b<c.length;b++){var d=parseInt(c[b]);d<this.layerNames.length&&a.push(this.layerNames[d])}return 0<a.length?a:[mxResources.get("background")]};m.prototype.importPage=function(c,a,b,d){var f=c.getBackPage();if(null!=f){a.getModel().setValue(a.getDefaultParent(),-c.getPageName());var k=new mxCell(f.getPageName());a.addCell(k,a.getModel().getRoot(),0,null,null);this.importPage(f,a,a.getDefaultParent())}var n=c.getLayers();k=c.getShapes();f=[];for(var p=0;p<n.length;p++){var x=n[p],A=x.Name.replace(/\s/g,"_");this.layerNames.push(A);0==x.Visible&&f.push(A)}x=function(C){var J=0;return{next:function(){return J<C.length?C[J++]:null},hasNext:function(){return J<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(k));k=c.getPageDimensions().y;-for(p=c.getId();x.hasNext();)n=x.next(),n=n.getValue(),A=this.addShape(a,n,b,p,k),n=this.layerIndexToNames(n.layerMember),null!=A&&null!=n&&a.addTagsForCells([A],n);for(c=function(C){var J=0;return{next:function(){return J<C.length?C[J++]:null},hasNext:function(){return J<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(c.getConnects()));c.hasNext();)n=c.next(),n=this.addConnectedEdge(a,n.getValue(),p,k),null!=n&&function(C,J){null==C.entries&&(C.entries=[]);for(var M=0;M<-C.entries.length;M++)if(null!=C.entries[M].key.equals&&C.entries[M].key.equals(J)||C.entries[M].key===J)return C.entries.splice(M,1)[0]}(this.edgeShapeMap,n);for(c=function(C){var J=0;return{next:function(){return J<C.length?C[J++]:null},hasNext:function(){return J<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(this.edgeShapeMap));c.hasNext();)n=c.next(),n.getKey().getPageNumber()===p&&(x=this.addUnconnectedEdge(a,function(C,J){null==C.entries&&(C.entries=[]);for(var M=-0;M<C.entries.length;M++)if(null!=C.entries[M].key.equals&&C.entries[M].key.equals(J)||C.entries[M].key===J)return C.entries[M].value;return null}(this.parentsMap,n.getKey()),n.getValue(),k),n=this.layerIndexToNames(n.getValue().layerMember),null!=n&&a.addTagsForCells([x],n));if(0<this.layerNames.length){c=a.getAllTags();p=!1;for(n=0;n<this.layerNames.length;n++)if(0>mxUtils.indexOf(c,this.layerNames[n])){p=!0;break}p&&(b=a.insertVertex(b,null,null,0,0,0,0),a.addTagsForCells([b],this.layerNames),-b.setVisible(!1));a.setHiddenTags(f)}d||this.sanitiseGraph(a);return k};m.prototype.postImportPage=function(c,a,b){try{var d=function(p){if(null!=p){p=p.entries||[];for(var x=0;x<p.length;x++){var A=p[x].value||{};A.toBeCroppedImg&&k.push(A);d(A.getChildShapes())}}},f=this,k=[];d(c.getShapes());if(0<k.length){var n=function(p,x){function A(){p<k.length-1?n(p+1,x):x()}var C=k[p],J=C.toBeCroppedImg,M=function(Q,U){null==Q.entries&&(Q.entries=[]);for(var H=0;H<Q.entries.length;H++)if(null!=Q.entries[H].key.equals&&-Q.entries[H].key.equals(U)||Q.entries[H].key===U)return Q.entries[H].value;return null}(f.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c.Id,C.Id)),L=new Image;L.onload=function(){var Q=J.iData,U=J.iType;try{var H=L.width/J.imgWidth,I=L.height/J.imgHeight,N=-J.imgOffsetX*H,K=(J.imgHeight-J.height+J.imgOffsetY)*I,O=document.createElement("canvas");O.width=J.width*H;O.height=J.height*I;var ba=O.getContext("2d");ba.fillStyle="#FFFFFF";ba.fillRect(0,0,O.width,O.height);ba.drawImage(L,N,K,O.width,O.height,-0,0,O.width,O.height);Q=O.toDataURL("image/jpeg").substr(23);U="jpg"}catch(W){console.log(W)}M.style+=";image=data:image/"+U+","+Q;A()};L.src="data:image/"+J.iType+";base64,"+J.iData;L.onerror=function(){M.style+=";image=data:image/"+J.iType+","+J.iData;A()}};n(0,b)}else b()}catch(p){console.log(p),b()}};m.prototype.addShape=function(c,a,b,d,f){a.parentHeight=f;var k=g.mxgraph.io.vsdx.VsdxShape.getType(a.getShape());if(null!=k&&(function(p,x){return p&&p.equals?p.equals(x):p===x}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||-function(p,x){return p&&p.equals?p.equals(x):p===x}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(p,x){return p&&p.equals?p.equals(x):p===x}(k,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var n=a.getId();if(a.isVertex()){k=null;k=a.isGroup()?this.addGroup(c,a,b,d,f):this.addVertex(c,a,b,d,f);(function(p,x,A){null==p.entries&&(p.entries=[]);for(var C=0;C<p.entries.length;C++)if(null!=p.entries[C].key.equals&&p.entries[C].key.equals(x)||p.entries[C].key===x){p.entries[C].value=A;return}p.entries.push({key:x,-value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);b=a.getHyperlink();b.extLink?c.setLinkForCell(k,b.extLink):b.pageLink&&c.setLinkForCell(k,"data:page/id,"+b.pageLink.replace(/\s/g,"_"));a=a.getProperties();for(b=0;b<a.length;b++)try{c.setAttributeForCell(k,a[b].key,a[b].val)}catch(p){console.log('Attribute: "',a[b].key,'" with value "',a[b].val,'" not allowed in HTML')}return k}a.isGroup()&&this.addGroup(c,-a,b,d,f,!0);a.setShapeIndex(c.getModel().getChildCount(b));(function(p,x,A){null==p.entries&&(p.entries=[]);for(var C=0;C<p.entries.length;C++)if(null!=p.entries[C].key.equals&&p.entries[C].key.equals(x)||p.entries[C].key===x){p.entries[C].value=A;return}p.entries.push({key:x,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);(function(p,x,A){null==p.entries&&(p.entries=[]);for(var C=0;C<p.entries.length;C++)if(null!=-p.entries[C].key.equals&&p.entries[C].key.equals(x)||p.entries[C].key===x){p.entries[C].value=A;return}p.entries.push({key:x,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),b)}return null};m.prototype.addGroup=function(c,a,b,d,f,k){var n=a.getDimensions(),p=a.getMaster(),x=a.getStyleFromShape(),A=a.getGeomList();if(A.isNoFill()||k)x[mxConstants.STYLE_FILLCOLOR]="none",x[mxConstants.STYLE_GRADIENTCOLOR]="none";-if(A.isNoLine()||k)x[mxConstants.STYLE_STROKECOLOR]="none";x.html="1";x[mxConstants.STYLE_WHITE_SPACE]="wrap";var C=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(x,"=");k=null;A=a.getChildShapes();k=null!=A&&0<function(L){null==L.entries&&(L.entries=[]);return L.entries.length}(A);x=a.isDisplacedLabel()||a.isRotatedLabel()||k;k=a.getOriginPoint(f,!0);if(x)k=c.insertVertex(b,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*-n.y)/100),C);else{var J=a.getTextLabel();k=c.insertVertex(b,null,J,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C)}b=k.geometry.height;for(A=function(L){var Q=0;return{next:function(){return Q<L.length?L[Q++]:null},hasNext:function(){return Q<L.length}}}(function(L){null==L.entries&&(L.entries=[]);return L.entries}(A));A.hasNext();)if(C=A.next().getValue(),J=C.getId(),C.isVertex()){var M=g.mxgraph.io.vsdx.VsdxShape.getType(C.getShape());-null!=M&&(function(L,Q){return L&&L.equals?L.equals(Q):L===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(L,Q){return L&&L.equals?L.equals(Q):L===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(L,Q){return L&&L.equals?L.equals(Q):L===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&C.isVertex()&&(C.propagateRotation(a.getRotation()),(M=C.isGroup()?this.addGroup(c,C,k,d,n.y):this.addVertex(c,C,k,d,n.y))&&M.geometry&&(b=Math.max(M.geometry.height,b)));null==p&&function(L,-Q,U){null==L.entries&&(L.entries=[]);for(var H=0;H<L.entries.length;H++)if(null!=L.entries[H].key.equals&&L.entries[H].key.equals(Q)||L.entries[H].key===Q){L.entries[H].value=U;return}L.entries.push({key:Q,value:U,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,J),C)}else null==p?(function(L,Q,U){null==L.entries&&(L.entries=[]);for(var H=0;H<L.entries.length;H++)if(null!=L.entries[H].key.equals&&L.entries[H].key.equals(Q)||-L.entries[H].key===Q){L.entries[H].value=U;return}L.entries.push({key:Q,value:U,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,J),C),function(L,Q,U){null==L.entries&&(L.entries=[]);for(var H=0;H<L.entries.length;H++)if(null!=L.entries[H].key.equals&&L.entries[H].key.equals(Q)||L.entries[H].key===Q){L.entries[H].value=U;return}L.entries.push({key:Q,value:U,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,-new g.mxgraph.io.vsdx.ShapePageId(d,J),k)):this.addUnconnectedEdge(c,k,C,f);if(k.children&&0==k.geometry.height&&0<b)for(k.geometry.height=b,f=0;f<k.children.length;f++)n=k.children[f],n.geometry&&(n.geometry.y+=b);x&&a.createLabelSubShape(c,k);c=a.getRotation();if(0!==c)for(f=k.getGeometry(),p=f.width/2,x=f.height/2,f=0;f<k.getChildCount();f++)n=k.getChildAt(f),g.mxgraph.online.Utils.rotatedGeometry(n.getGeometry(),c,p,x);(function(L,Q,U){null==L.entries&&(L.entries=[]);for(var H=0;H<L.entries.length;H++)if(null!=-L.entries[H].key.equals&&L.entries[H].key.equals(Q)||L.entries[H].key===Q){L.entries[H].value=U;return}L.entries.push({key:Q,value:U,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),k);return k};m.rotatedEdgePoint=function(c,a,b,d){a=a*Math.PI/180;var f=Math.cos(a);a=Math.sin(a);var k=c.x-b,n=c.y-d;c.x=Math.round(k*f-n*a+b);c.y=Math.round(n*f+k*a+d)};m.prototype.addVertex=function(c,a,b,d,f){var k="",n=a.isDisplacedLabel()||-a.isRotatedLabel();n||(k=a.getTextLabel());var p=a.getDimensions(),x=a.getStyleFromShape();x.html="1";var A=x.hasOwnProperty(mxConstants.STYLE_SHAPE)||x.hasOwnProperty("stencil");x.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&A||(x[mxConstants.STYLE_FILLCOLOR]="none");A||(x[mxConstants.STYLE_STROKECOLOR]="none");x.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&A||(x[mxConstants.STYLE_GRADIENTCOLOR]="none");x[mxConstants.STYLE_WHITE_SPACE]="wrap";f=a.getOriginPoint(f,!0);return A||null!=k?(x=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(x,-"="),A=null,A=n?c.insertVertex(b,null,null,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*p.x)/100),Math.floor(Math.round(100*p.y)/100),x):c.insertVertex(b,null,k,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*p.x)/100),Math.floor(Math.round(100*p.y)/100),x),function(C,J,M){null==C.entries&&(C.entries=[]);for(var L=0;L<C.entries.length;L++)if(null!=C.entries[L].key.equals&&C.entries[L].key.equals(J)||-C.entries[L].key===J){C.entries[L].value=M;return}C.entries.push({key:J,value:M,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),A),a.setLabelOffset(A,x),n&&a.createLabelSubShape(c,A),A):null};m.calculateAbsolutePoint=function(c){for(var a=0,b=0;null!=c;){var d=c.geometry;null!=d&&(a+=d.x,b+=d.y);c=c.parent}return new mxPoint(a,b)};m.prototype.processEdgeGeo=function(c,a){try{var b=c.geomList.geomList[0].rows;-for(c=0;c<b.length;c++)if(b[c]instanceof g.mxgraph.io.vsdx.geometry.ArcTo){a.style+="jumpStyle=arc;";break}for(c=0;c<b.length;c++);}catch(d){}};m.prototype.addConnectedEdge=function(c,a,b,d){var f=a.getFromSheet();f=new g.mxgraph.io.vsdx.ShapePageId(b,f);var k=function(I,N){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(N)||I.entries[K].key===N)return I.entries[K].value;return null}(this.edgeShapeMap,f);if(null==k)return null;-var n=function(I,N){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(N)||I.entries[K].key===N)return I.entries[K].value;return null}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(b,k.getId()));if(null!=n){var p=c.getModel().getGeometry(n);null!=p&&(d=p.height)}var x=k.getStartXY(d),A=k.getEndXY(d);p=k.getRoutingPoints(d,x,k.getRotation());this.rotateChildEdge(c.getModel(),n,x,A,p);var C=null,J=a.getSourceToSheet();J=null!=-J?function(I,N){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(N)||I.entries[K].key===N)return I.entries[K].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,J)):null;var M=!0;if(null==J||0==J.geometry.width||0==J.geometry.height)J=c.insertVertex(n,null,null,Math.floor(Math.round(100*x.x)/100),Math.floor(Math.round(100*x.y)/100),0,0);else if(J.style&&-1==J.style.indexOf(";rotation=")){C=m.calculateAbsolutePoint(J);-var L=m.calculateAbsolutePoint(n),Q=J.geometry;C=new mxPoint((L.x+x.x-C.x)/Q.width,(L.y+x.y-C.y)/Q.height)}else M=!1;x=null;a=a.getTargetToSheet();a=null!=a?function(I,N){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(N)||I.entries[K].key===N)return I.entries[K].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,a)):null;L=!0;null==a||0==a.geometry.width||0==a.geometry.height?a=c.insertVertex(n,null,null,-Math.floor(Math.round(100*A.x)/100),Math.floor(Math.round(100*A.y)/100),0,0):a.style&&-1==a.style.indexOf(";rotation=")?(b=m.calculateAbsolutePoint(a),x=m.calculateAbsolutePoint(n),Q=a.geometry,x=new mxPoint((x.x+A.x-b.x)/Q.width,(x.y+A.y-b.y)/Q.height)):L=!1;b=k.getStyleFromEdgeShape(d);Q=k.getRotation();A="";var U=k.isDisplacedLabel()||k.isRotatedLabel()||0!==Q,H=k.getLblEdgeOffset(c.getView(),p);U||(A=k.getTextLabel(!0));A=c.insertEdge(n,null,A,J,a,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,-"="));U?h(c,A,k,Q,H):A.getGeometry().offset=H;null!=C&&c.setConnectionConstraint(A,J,!0,new mxConnectionConstraint(C,!1));M&&p.shift();null!=x&&c.setConnectionConstraint(A,a,!1,new mxConnectionConstraint(x,!1));L&&p.pop();M=c.getModel().getGeometry(A);if(J.parent!=a.parent&&null!=n&&1!=n.id&&1==J.parent.id){a=C=0;do x=n.geometry,null!=x&&(C+=x.x,a+=x.y),n=n.parent;while(null!=n);A.parent=J.parent;for(n=0;n<p.length;n++)p[n].x+=C,p[n].y+=a}M.points=p;b.hasOwnProperty("curved")&&function(I,N){return I&&-I.equals?I.equals(N):I===N}(function(I,N){return I[N]?I[N]:null}(b,"curved"),"1")&&(M=c.getModel().getGeometry(A),d=k.getControlPoints(d),M.points=d);this.processEdgeGeo(k,A);k=this.layerIndexToNames(k.layerMember);null!=k&&c.addTagsForCells([A],k);return f};m.prototype.addUnconnectedEdge=function(c,a,b,d){if(null!=a){var f=c.getModel().getGeometry(a);null!=f&&(d=f.height)}f=b.getStartXY(d);var k=b.getEndXY(d),n=b.getStyleFromEdgeShape(d),p=b.getRoutingPoints(d,f,b.getRotation()),x=b.getRotation();-var A="";var C=b.isDisplacedLabel()||b.isRotatedLabel()||0!==x,J=b.getLblEdgeOffset(c.getView(),p);C||(A=b.getTextLabel(!0));0===b.getShapeIndex()?A=c.insertEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(A=c.createEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),A=c.addEdge(A,a,null,null,b.getShapeIndex()+this.shapeIndexShift++));C?h(c,A,b,x,J):A.getGeometry().offset=J;this.rotateChildEdge(c.getModel(),a,f,k,p);a=c.getModel().getGeometry(A);-p.pop();p.shift();a.points=p;a.setTerminalPoint(f,!0);a.setTerminalPoint(k,!1);n.hasOwnProperty("curved")&&function(M,L){return M&&M.equals?M.equals(L):M===L}(function(M,L){return M[L]?M[L]:null}(n,"curved"),"1")&&(a=c.getModel().getGeometry(A),c=b.getControlPoints(d),a.points=c);this.processEdgeGeo(b,A);return A};m.prototype.rotateChildEdge=function(c,a,b,d,f){if(null!=a){var k=c.getGeometry(a);c=c.getStyle(a);if(null!=k&&null!=c&&(a=c.indexOf("rotation="),-1<a))for(c=parseFloat(c.substring(a+9,-c.indexOf(";",a))),a=k.width/2,k=k.height/2,m.rotatedEdgePoint(b,c,a,k),m.rotatedEdgePoint(d,c,a,k),b=0;b<f.length;b++)m.rotatedEdgePoint(f[b],c,a,k)}};m.prototype.sanitiseGraph=function(c){var a=c.getModel().getRoot();this.sanitiseCell(c,a)};m.prototype.sanitiseCell=function(c,a){for(var b=c.getModel(),d=b.getChildCount(a),f=[],k=0;k<d;k++){var n=b.getChildAt(a,k);this.sanitiseCell(c,n)&&f.push(n)}for(c=0;c<f.length;c++)b.remove(f[c]);f=a.geometry;null!=f&&(0>f.height&&(f.height=Math.abs(f.height),-f.y-=f.height,a.style+=";flipV=1;"),0>f.width&&(f.width=Math.abs(f.width),f.x-=f.width,a.style+=";flipH=1;"));0<d&&(d=b.getChildCount(a));f=(new String(b.getValue(a))).toString();c=b.getStyle(a);return 0!==d||!b.isVertex(a)||null!=b.getValue(a)&&0!==f.length||null==c||-1==c.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==c.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=c.indexOf("image=")?!1:!0};return m}();z.mxVsdxCodec=B;B.__class="com.mxgraph.io.mxVsdxCodec"})(y.io||(y.io={}))})(g.mxgraph||-(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){var B=function(m){function h(c){var a=m.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=c;return a}__extends(h,m);h.prototype.decodeVssx=function(c,a,b,d){var f=this,k="<mxlibrary>[";this.decodeVsdx(c,function(n){k=k.concat(n);var p=f.vsdxModel.getMasterShapes(),x=function(Q){var U=0;return{next:function(){return U<Q.length?Q[U++]:null},hasNext:function(){return U<Q.length}}}(function(Q){var U=-[];null==Q.entries&&(Q.entries=[]);for(var H=0;H<Q.entries.length;H++)U.push(Q.entries[H].value);return U}(f.vsdxModel.getPages())).next();if(null!=p){var A={str:"",toString:function(){return this.str}},C=0===n.length?"":",",J=function(Q){return Object.keys(Q).map(function(U){return Q[U]})}(p);n=function(Q){Q=J[Q];var U=M.createMxGraph(),H=1;if(null!=Q.pageSheet){var I=H=1,N=Q.pageSheet.DrawingScale;null!=N&&(H=parseFloat(N.getAttribute("V"))||1);N=Q.pageSheet.PageScale;null!=N&&(I=parseFloat(N.getAttribute("V"))||-1);H=I/H}I=!1;for(N=0;null!=Q.firstLevelShapes&&N<Q.firstLevelShapes.length;N++){var K=Q.firstLevelShapes[N].getShape(),O=new g.mxgraph.io.vsdx.VsdxShape(x,K,!x.isEdge(K),p,null,M.vsdxModel);K=null;if(O.isVertex()){M.edgeShapeMap.entries=[];M.parentsMap.entries=[];K=M.addShape(U,O,U.getDefaultParent(),0,1169);O=function(S){null==S.entries&&(S.entries=[]);return S.entries}(M.edgeShapeMap);for(var ba=0;ba<O.length;ba++){var W=O[ba],R=function(S,ka){null==S.entries&&(S.entries=[]);for(var ca=0;ca<S.entries.length;ca++)if(null!=-S.entries[ca].key.equals&&S.entries[ca].key.equals(ka)||S.entries[ca].key===ka)return S.entries[ca].value;return null}(M.parentsMap,W.getKey());M.addUnconnectedEdge(U,R,W.getValue(),1169)}}else K=M.addUnconnectedEdge(U,null,O,1169);I|=null!=K}if(I){M.scaleGraph(U,H);H=M.normalizeGraph(U);M.sanitiseGraph(U);if(0===U.getModel().getChildCount(U.getDefaultParent()))return"continue";A.str=A.str.concat(C);A.str=A.str.concat('{"xml":"');U=m.prototype.processPage.call(M,U,null);A.str=A.str.concat(U);A.str=-A.str.concat('","w":');A.str=A.str.concat(H.width);A.str=A.str.concat(',"h":');A.str=A.str.concat(H.height);A.str=A.str.concat(',"title":');Q=Q.getName();null==Q&&(Q="");Q=mxUtils.htmlEntities(JSON.stringify(Q));A.str=A.str.concat(Q);A.str=A.str.concat("}");C=","}};for(var M=f,L=0;L<J.length;L++)n(L);k=k.concat(A)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(Q){null!=d?d(Q):a("")}},b)};h.prototype.normalizeGeo=function(c){var a=c.getGeometry();a.x=0;a.y=0;var b=a.sourcePoint;if(c.isEdge()&&null!=-b){this.transPoint(a.targetPoint,b);this.transPoint(a.offset,b);c=a.points;if(null!=c)for(var d=0;d<c.length;d++)this.transPoint(c[d],b);this.transPoint(b,b)}return a};h.prototype.normalizeGraph=function(c){function a(C){null!=C&&(null==b?(b=C.x,d=C.y,f=C.x+(C.width||0),k=C.y+(C.height||0)):(b=Math.min(C.x,b),d=Math.min(C.y,d),f=Math.max(C.x+(C.width||0),f),k=Math.max(C.y+(C.height||0),k)))}var b,d,f,k,n;for(n in c.model.cells){var p=c.model.cells[n],x=p.geometry;if(null!=x&&1==p.parent.id)if(p.vertex)a(x);-else for(a(x.sourcePoint),a(x.targetPoint),p=x.points,x=0;null!=p&&x<p.length;x++)a(p[x])}var A={x:b,y:d};for(n in c.model.cells)if(p=c.model.cells[n],x=p.geometry,null!=x&&1==p.parent.id&&(x.x-=b,x.y-=d,p.isEdge()))for(this.transPoint(x.sourcePoint,A),this.transPoint(x.targetPoint,A),this.transPoint(x.offset,A),p=x.points,x=0;null!=p&&x<p.length;x++)this.transPoint(p[x],A);return{width:f-b,height:k-d}};h.prototype.transPoint=function(c,a){null!=c&&(c.x-=a.x,c.y-=a.y)};h.prototype.processPage=function(c,-a){var b=c.getModel(),d="",f="";for(p in b.cells){var k=b.cells[p];if(c.getDefaultParent()===b.getParent(k)){d=d.concat(f);d=d.concat('{"xml":"');var n=this.createMxGraph();n.addCell(k);this.sanitiseGraph(n);if(0===n.getModel().getChildCount(n.getDefaultParent()))return"continue";f=this.normalizeGeo(k);n=m.prototype.processPage.call(this,n,null);d=d.concat(n);d=d.concat('","w":');d=d.concat(f.width);d=d.concat(',"h":');d=d.concat(f.height);d=d.concat(',"title":"');f=b.getStyle(k);k="";if(null!=f&&-(n=f.indexOf(g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID),0<=n)){n+=g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;var p=parseInt(f.substring(n,f.indexOf(";",n)));a:{f=this.vertexShapeMap;n=new g.mxgraph.io.vsdx.ShapePageId(a.getId(),p);null==f.entries&&(f.entries=[]);for(var x=0;x<f.entries.length;x++)if(null!=f.entries[x].key.equals&&f.entries[x].key.equals(n)||f.entries[x].key===n){f=f.entries[x].value;break a}f=null}null!=f&&(k=f.getName())}d=d.concat(k);d=d.concat('"}');f=","}}this.RESPONSE_DIAGRAM_START=+(k=b.substring(0,f),n=b.substring(f+1,b.length),b=function(C,I){return C[I]?C[I]:null}(d,k+"/_rels/"+n+".rels"),null!=b)){var q=b.getElementsByTagName("Relationship");b={};for(f=0;f<q.length;f++){n=q.item(f);var t=n.getAttribute("Id");n=n.getAttribute("Target");b[t]=n}a=a.getElementsByTagName("Rel");for(f=0;f<a.length;f++)if(q=a.item(f),n=function(C,I){return C[I]?C[I]:null}(b,q.getAttribute("r:id")),n=k+"/"+n,null!=n&&(t=d[n]?d[n]:null,null!=t)){q=q.parentNode;for(t=t.firstChild;null!=t&&1!=t.nodeType;)t=+t.nextSibling;if(null!=t&&1==t.nodeType)for(t=t.firstChild;null!=t;){if(null!=t&&1==t.nodeType){var A=q.appendChild(c.importNode(t,!0));this.importNodes(c,A,n,d)}t=t.nextSibling}}}};m.prototype.layerIndexToNames=function(c){var a=[];if(c)for(var b=0;b<c.length;b++){var d=parseInt(c[b]);d<this.layerNames.length&&a.push(this.layerNames[d])}return 0<a.length?a:[mxResources.get("background")]};m.prototype.importPage=function(c,a,b,d){var f=c.getBackPage();if(null!=f){a.getModel().setValue(a.getDefaultParent(),+c.getPageName());var k=new mxCell(f.getPageName());a.addCell(k,a.getModel().getRoot(),0,null,null);this.importPage(f,a,a.getDefaultParent())}var n=c.getLayers();k=c.getShapes();f=[];for(var q=0;q<n.length;q++){var t=n[q],A=t.Name.replace(/\s/g,"_");this.layerNames.push(A);0==t.Visible&&f.push(A)}t=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(k));k=c.getPageDimensions().y;+for(q=c.getId();t.hasNext();)n=t.next(),n=n.getValue(),A=this.addShape(a,n,b,q,k),n=this.layerIndexToNames(n.layerMember),null!=A&&null!=n&&a.addTagsForCells([A],n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(c.getConnects()));c.hasNext();)n=c.next(),n=this.addConnectedEdge(a,n.getValue(),q,k),null!=n&&function(C,I){null==C.entries&&(C.entries=[]);for(var M=0;M<+C.entries.length;M++)if(null!=C.entries[M].key.equals&&C.entries[M].key.equals(I)||C.entries[M].key===I)return C.entries.splice(M,1)[0]}(this.edgeShapeMap,n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(this.edgeShapeMap));c.hasNext();)n=c.next(),n.getKey().getPageNumber()===q&&(t=this.addUnconnectedEdge(a,function(C,I){null==C.entries&&(C.entries=[]);for(var M=+0;M<C.entries.length;M++)if(null!=C.entries[M].key.equals&&C.entries[M].key.equals(I)||C.entries[M].key===I)return C.entries[M].value;return null}(this.parentsMap,n.getKey()),n.getValue(),k),n=this.layerIndexToNames(n.getValue().layerMember),null!=n&&a.addTagsForCells([t],n));if(0<this.layerNames.length){c=a.getAllTags();q=!1;for(n=0;n<this.layerNames.length;n++)if(0>mxUtils.indexOf(c,this.layerNames[n])){q=!0;break}q&&(b=a.insertVertex(b,null,null,0,0,0,0),a.addTagsForCells([b],this.layerNames),+b.setVisible(!1));a.setHiddenTags(f)}d||this.sanitiseGraph(a);return k};m.prototype.postImportPage=function(c,a,b){try{var d=function(q){if(null!=q){q=q.entries||[];for(var t=0;t<q.length;t++){var A=q[t].value||{};A.toBeCroppedImg&&k.push(A);d(A.getChildShapes())}}},f=this,k=[];d(c.getShapes());if(0<k.length){var n=function(q,t){function A(){q<k.length-1?n(q+1,t):t()}var C=k[q],I=C.toBeCroppedImg,M=function(Q,S){null==Q.entries&&(Q.entries=[]);for(var H=0;H<Q.entries.length;H++)if(null!=Q.entries[H].key.equals&&+Q.entries[H].key.equals(S)||Q.entries[H].key===S)return Q.entries[H].value;return null}(f.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c.Id,C.Id)),K=new Image;K.onload=function(){var Q=I.iData,S=I.iType;try{var H=K.width/I.imgWidth,J=K.height/I.imgHeight,N=-I.imgOffsetX*H,L=(I.imgHeight-I.height+I.imgOffsetY)*J,O=document.createElement("canvas");O.width=I.width*H;O.height=I.height*J;var ba=O.getContext("2d");ba.fillStyle="#FFFFFF";ba.fillRect(0,0,O.width,O.height);ba.drawImage(K,N,L,O.width,O.height,+0,0,O.width,O.height);Q=O.toDataURL("image/jpeg").substr(23);S="jpg"}catch(W){console.log(W)}M.style+=";image=data:image/"+S+","+Q;A()};K.src="data:image/"+I.iType+";base64,"+I.iData;K.onerror=function(){M.style+=";image=data:image/"+I.iType+","+I.iData;A()}};n(0,b)}else b()}catch(q){console.log(q),b()}};m.prototype.addShape=function(c,a,b,d,f){a.parentHeight=f;var k=g.mxgraph.io.vsdx.VsdxShape.getType(a.getShape());if(null!=k&&(function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||+function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var n=a.getId();if(a.isVertex()){k=null;k=a.isGroup()?this.addGroup(c,a,b,d,f):this.addVertex(c,a,b,d,f);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,+value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);b=a.getHyperlink();b.extLink?c.setLinkForCell(k,b.extLink):b.pageLink&&c.setLinkForCell(k,"data:page/id,"+b.pageLink.replace(/\s/g,"_"));a=a.getProperties();for(b=0;b<a.length;b++)try{c.setAttributeForCell(k,a[b].key,a[b].val)}catch(q){console.log('Attribute: "',a[b].key,'" with value "',a[b].val,'" not allowed in HTML')}return k}a.isGroup()&&this.addGroup(c,+a,b,d,f,!0);a.setShapeIndex(c.getModel().getChildCount(b));(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=+q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),b)}return null};m.prototype.addGroup=function(c,a,b,d,f,k){var n=a.getDimensions(),q=a.getMaster(),t=a.getStyleFromShape(),A=a.getGeomList();if(A.isNoFill()||k)t[mxConstants.STYLE_FILLCOLOR]="none",t[mxConstants.STYLE_GRADIENTCOLOR]="none";+if(A.isNoLine()||k)t[mxConstants.STYLE_STROKECOLOR]="none";t.html="1";t[mxConstants.STYLE_WHITE_SPACE]="wrap";var C=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"=");k=null;A=a.getChildShapes();k=null!=A&&0<function(K){null==K.entries&&(K.entries=[]);return K.entries.length}(A);t=a.isDisplacedLabel()||a.isRotatedLabel()||k;k=a.getOriginPoint(f,!0);if(t)k=c.insertVertex(b,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*+n.y)/100),C);else{var I=a.noLabelGroup?null:a.getTextLabel();k=c.insertVertex(b,null,I,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C)}b=k.geometry.height;for(A=function(K){var Q=0;return{next:function(){return Q<K.length?K[Q++]:null},hasNext:function(){return Q<K.length}}}(function(K){null==K.entries&&(K.entries=[]);return K.entries}(A));A.hasNext();)if(C=A.next().getValue(),I=C.getId(),C.isVertex()){var M=+g.mxgraph.io.vsdx.VsdxShape.getType(C.getShape());null!=M&&(function(K,Q){return K&&K.equals?K.equals(Q):K===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(K,Q){return K&&K.equals?K.equals(Q):K===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(K,Q){return K&&K.equals?K.equals(Q):K===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&C.isVertex()&&(C.propagateRotation(a.getRotation()),(M=C.isGroup()?this.addGroup(c,C,k,d,n.y):this.addVertex(c,C,k,d,n.y))&&M.geometry&&(b=Math.max(M.geometry.height,+b)));null==q&&function(K,Q,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),C)}else null==q?(function(K,Q,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&+K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),C),function(K,Q,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},+getValue:function(){return this.value}})}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),k)):this.addUnconnectedEdge(c,k,C,f);if(k.children&&0==k.geometry.height&&0<b)for(k.geometry.height=b,f=0;f<k.children.length;f++)n=k.children[f],n.geometry&&(n.geometry.y+=b);t&&a.createLabelSubShape(c,k);c=a.getRotation();if(0!==c)for(f=k.getGeometry(),q=f.width/2,t=f.height/2,f=0;f<k.getChildCount();f++)n=k.getChildAt(f),g.mxgraph.online.Utils.rotatedGeometry(n.getGeometry(),c,q,t);(function(K,Q,S){null==+K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),k);return k};m.rotatedEdgePoint=function(c,a,b,d){a=a*Math.PI/180;var f=Math.cos(a);a=Math.sin(a);var k=c.x-b,n=c.y-d;c.x=Math.round(k*f-n*a+b);c.y=Math.round(n*+f+k*a+d)};m.prototype.addVertex=function(c,a,b,d,f){var k="",n=a.isDisplacedLabel()||a.isRotatedLabel();n||(k=a.getTextLabel());var q=a.getDimensions(),t=a.getStyleFromShape();t.html="1";var A=t.hasOwnProperty(mxConstants.STYLE_SHAPE)||t.hasOwnProperty("stencil");t.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&A||(t[mxConstants.STYLE_FILLCOLOR]="none");A||(t[mxConstants.STYLE_STROKECOLOR]="none");t.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&A||(t[mxConstants.STYLE_GRADIENTCOLOR]="none");t[mxConstants.STYLE_WHITE_SPACE]=+"wrap";f=a.getOriginPoint(f,!0);return A||null!=k?(t=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"="),A=null,A=n?c.insertVertex(b,null,null,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t):c.insertVertex(b,null,k,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t),function(C,I,M){null==C.entries&&(C.entries=+[]);for(var K=0;K<C.entries.length;K++)if(null!=C.entries[K].key.equals&&C.entries[K].key.equals(I)||C.entries[K].key===I){C.entries[K].value=M;return}C.entries.push({key:I,value:M,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),A),a.setLabelOffset(A,t),n&&a.createLabelSubShape(c,A),A):null};m.calculateAbsolutePoint=function(c){for(var a=0,b=0;null!=c;){var d=c.geometry;null!=d&&(a+=d.x,b+=d.y);c=c.parent}return new mxPoint(a,+b)};m.prototype.processEdgeGeo=function(c,a){try{var b=c.geomList.geomList[0].rows;for(c=0;c<b.length;c++)if(b[c]instanceof g.mxgraph.io.vsdx.geometry.ArcTo){a.style+="jumpStyle=arc;";break}for(c=0;c<b.length;c++);}catch(d){}};m.prototype.addConnectedEdge=function(c,a,b,d){var f=a.getFromSheet();f=new g.mxgraph.io.vsdx.ShapePageId(b,f);var k=function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===+N)return J.entries[L].value;return null}(this.edgeShapeMap,f);if(null==k)return null;var n=function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===N)return J.entries[L].value;return null}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(b,k.getId()));if(null!=n){var q=c.getModel().getGeometry(n);null!=q&&(d=q.height)}var t=k.getStartXY(d),A=k.getEndXY(d);q=k.getRoutingPoints(d,t,k.getRotation());+this.rotateChildEdge(c.getModel(),n,t,A,q);var C=null,I=a.getSourceToSheet();I=null!=I?function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===N)return J.entries[L].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,I)):null;var M=!0;if(null==I||0==I.geometry.width||0==I.geometry.height)I=c.insertVertex(n,null,null,Math.floor(Math.round(100*t.x)/100),Math.floor(Math.round(100*+t.y)/100),0,0);else if(I.style&&-1==I.style.indexOf(";rotation=")){C=m.calculateAbsolutePoint(I);var K=m.calculateAbsolutePoint(n),Q=I.geometry;C=new mxPoint((K.x+t.x-C.x)/Q.width,(K.y+t.y-C.y)/Q.height)}else M=!1;t=null;a=a.getTargetToSheet();a=null!=a?function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===N)return J.entries[L].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,+a)):null;K=!0;null==a||0==a.geometry.width||0==a.geometry.height?a=c.insertVertex(n,null,null,Math.floor(Math.round(100*A.x)/100),Math.floor(Math.round(100*A.y)/100),0,0):a.style&&-1==a.style.indexOf(";rotation=")?(b=m.calculateAbsolutePoint(a),t=m.calculateAbsolutePoint(n),Q=a.geometry,t=new mxPoint((t.x+A.x-b.x)/Q.width,(t.y+A.y-b.y)/Q.height)):K=!1;b=k.getStyleFromEdgeShape(d);Q=k.getRotation();A="";var S=k.isDisplacedLabel()||k.isRotatedLabel()||0!==Q,H=k.getLblEdgeOffset(c.getView(),q);S||(A=+k.getTextLabel(!0));A=c.insertEdge(n,null,A,I,a,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,"="));S?h(c,A,k,Q,H):A.getGeometry().offset=H;null!=C&&c.setConnectionConstraint(A,I,!0,new mxConnectionConstraint(C,!1));M&&q.shift();null!=t&&c.setConnectionConstraint(A,a,!1,new mxConnectionConstraint(t,!1));K&&q.pop();M=c.getModel().getGeometry(A);if(I.parent!=a.parent&&null!=n&&1!=n.id&&1==I.parent.id){a=C=0;do t=n.geometry,null!=t&&(C+=t.x,a+=t.y),n=n.parent;while(null!=n);A.parent=I.parent;for(n=+0;n<q.length;n++)q[n].x+=C,q[n].y+=a}M.points=q;b.hasOwnProperty("curved")&&function(J,N){return J&&J.equals?J.equals(N):J===N}(function(J,N){return J[N]?J[N]:null}(b,"curved"),"1")&&(M=c.getModel().getGeometry(A),d=k.getControlPoints(d),M.points=d);this.processEdgeGeo(k,A);k=this.layerIndexToNames(k.layerMember);null!=k&&c.addTagsForCells([A],k);return f};m.prototype.addUnconnectedEdge=function(c,a,b,d){if(null!=a){var f=c.getModel().getGeometry(a);null!=f&&(d=f.height)}f=b.getStartXY(d);var k=b.getEndXY(d),+n=b.getStyleFromEdgeShape(d),q=b.getRoutingPoints(d,f,b.getRotation()),t=b.getRotation();var A="";var C=b.isDisplacedLabel()||b.isRotatedLabel()||0!==t,I=b.getLblEdgeOffset(c.getView(),q);C||(A=b.getTextLabel(!0));0===b.getShapeIndex()?A=c.insertEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(A=c.createEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),A=c.addEdge(A,a,null,null,b.getShapeIndex()+this.shapeIndexShift++));C?h(c,A,b,t,I):A.getGeometry().offset=+I;this.rotateChildEdge(c.getModel(),a,f,k,q);a=c.getModel().getGeometry(A);q.pop();q.shift();a.points=q;a.setTerminalPoint(f,!0);a.setTerminalPoint(k,!1);n.hasOwnProperty("curved")&&function(M,K){return M&&M.equals?M.equals(K):M===K}(function(M,K){return M[K]?M[K]:null}(n,"curved"),"1")&&(a=c.getModel().getGeometry(A),c=b.getControlPoints(d),a.points=c);this.processEdgeGeo(b,A);return A};m.prototype.rotateChildEdge=function(c,a,b,d,f){if(null!=a){var k=c.getGeometry(a);c=c.getStyle(a);if(null!=k&&+null!=c&&(a=c.indexOf("rotation="),-1<a))for(c=parseFloat(c.substring(a+9,c.indexOf(";",a))),a=k.width/2,k=k.height/2,m.rotatedEdgePoint(b,c,a,k),m.rotatedEdgePoint(d,c,a,k),b=0;b<f.length;b++)m.rotatedEdgePoint(f[b],c,a,k)}};m.prototype.sanitiseGraph=function(c){var a=c.getModel().getRoot();this.sanitiseCell(c,a)};m.prototype.sanitiseCell=function(c,a){for(var b=c.getModel(),d=b.getChildCount(a),f=[],k=0;k<d;k++){var n=b.getChildAt(a,k);this.sanitiseCell(c,n)&&f.push(n)}for(c=0;c<f.length;c++)b.remove(f[c]);+f=a.geometry;null!=f&&(0>f.height&&(f.height=Math.abs(f.height),f.y-=f.height,a.style+=";flipV=1;"),0>f.width&&(f.width=Math.abs(f.width),f.x-=f.width,a.style+=";flipH=1;"));0<d&&(d=b.getChildCount(a));f=(new String(b.getValue(a))).toString();c=b.getStyle(a);return 0!==d||!b.isVertex(a)||null!=b.getValue(a)&&0!==f.length||null==c||-1==c.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==c.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=c.indexOf("image=")?!1:!0};return m}();z.mxVsdxCodec=B;B.__class=+"com.mxgraph.io.mxVsdxCodec"})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){var B=function(m){function h(c){var a=m.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=c;return a}__extends(h,m);h.prototype.decodeVssx=function(c,a,b,d){var f=this,k="<mxlibrary>[";this.decodeVsdx(c,function(n){k=k.concat(n);var q=f.vsdxModel.getMasterShapes(),t=function(Q){var S=0;return{next:function(){return S<Q.length?Q[S++]:null},hasNext:function(){return S<Q.length}}}(function(Q){var S=+[];null==Q.entries&&(Q.entries=[]);for(var H=0;H<Q.entries.length;H++)S.push(Q.entries[H].value);return S}(f.vsdxModel.getPages())).next();if(null!=q){var A={str:"",toString:function(){return this.str}},C=0===n.length?"":",",I=function(Q){return Object.keys(Q).map(function(S){return Q[S]})}(q);n=function(Q){Q=I[Q];var S=M.createMxGraph(),H=1;if(null!=Q.pageSheet){var J=H=1,N=Q.pageSheet.DrawingScale;null!=N&&(H=parseFloat(N.getAttribute("V"))||1);N=Q.pageSheet.PageScale;null!=N&&(J=parseFloat(N.getAttribute("V"))||+1);H=J/H}J=!1;for(N=0;null!=Q.firstLevelShapes&&N<Q.firstLevelShapes.length;N++){var L=Q.firstLevelShapes[N].getShape(),O=new g.mxgraph.io.vsdx.VsdxShape(t,L,!t.isEdge(L),q,null,M.vsdxModel);L=null;if(O.isVertex()){M.edgeShapeMap.entries=[];M.parentsMap.entries=[];L=M.addShape(S,O,S.getDefaultParent(),0,1169);O=function(T){null==T.entries&&(T.entries=[]);return T.entries}(M.edgeShapeMap);for(var ba=0;ba<O.length;ba++){var W=O[ba],R=function(T,ka){null==T.entries&&(T.entries=[]);for(var ca=0;ca<T.entries.length;ca++)if(null!=+T.entries[ca].key.equals&&T.entries[ca].key.equals(ka)||T.entries[ca].key===ka)return T.entries[ca].value;return null}(M.parentsMap,W.getKey());M.addUnconnectedEdge(S,R,W.getValue(),1169)}}else L=M.addUnconnectedEdge(S,null,O,1169);J|=null!=L}if(J){M.scaleGraph(S,H);H=M.normalizeGraph(S);M.sanitiseGraph(S);if(0===S.getModel().getChildCount(S.getDefaultParent()))return"continue";A.str=A.str.concat(C);A.str=A.str.concat('{"xml":"');S=m.prototype.processPage.call(M,S,null);A.str=A.str.concat(S);A.str=+A.str.concat('","w":');A.str=A.str.concat(H.width);A.str=A.str.concat(',"h":');A.str=A.str.concat(H.height);A.str=A.str.concat(',"title":');Q=Q.getName();null==Q&&(Q="");Q=mxUtils.htmlEntities(JSON.stringify(Q));A.str=A.str.concat(Q);A.str=A.str.concat("}");C=","}};for(var M=f,K=0;K<I.length;K++)n(K);k=k.concat(A)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(Q){null!=d?d(Q):a("")}},b)};h.prototype.normalizeGeo=function(c){var a=c.getGeometry();a.x=0;a.y=0;var b=a.sourcePoint;if(c.isEdge()&&null!=+b){this.transPoint(a.targetPoint,b);this.transPoint(a.offset,b);c=a.points;if(null!=c)for(var d=0;d<c.length;d++)this.transPoint(c[d],b);this.transPoint(b,b)}return a};h.prototype.normalizeGraph=function(c){function a(C){null!=C&&(null==b?(b=C.x,d=C.y,f=C.x+(C.width||0),k=C.y+(C.height||0)):(b=Math.min(C.x,b),d=Math.min(C.y,d),f=Math.max(C.x+(C.width||0),f),k=Math.max(C.y+(C.height||0),k)))}var b,d,f,k,n;for(n in c.model.cells){var q=c.model.cells[n],t=q.geometry;if(null!=t&&1==q.parent.id)if(q.vertex)a(t);+else for(a(t.sourcePoint),a(t.targetPoint),q=t.points,t=0;null!=q&&t<q.length;t++)a(q[t])}var A={x:b,y:d};for(n in c.model.cells)if(q=c.model.cells[n],t=q.geometry,null!=t&&1==q.parent.id&&(t.x-=b,t.y-=d,q.isEdge()))for(this.transPoint(t.sourcePoint,A),this.transPoint(t.targetPoint,A),this.transPoint(t.offset,A),q=t.points,t=0;null!=q&&t<q.length;t++)this.transPoint(q[t],A);return{width:f-b,height:k-d}};h.prototype.transPoint=function(c,a){null!=c&&(c.x-=a.x,c.y-=a.y)};h.prototype.processPage=function(c,+a){var b=c.getModel(),d="",f="";for(q in b.cells){var k=b.cells[q];if(c.getDefaultParent()===b.getParent(k)){d=d.concat(f);d=d.concat('{"xml":"');var n=this.createMxGraph();n.addCell(k);this.sanitiseGraph(n);if(0===n.getModel().getChildCount(n.getDefaultParent()))return"continue";f=this.normalizeGeo(k);n=m.prototype.processPage.call(this,n,null);d=d.concat(n);d=d.concat('","w":');d=d.concat(f.width);d=d.concat(',"h":');d=d.concat(f.height);d=d.concat(',"title":"');f=b.getStyle(k);k="";if(null!=f&&+(n=f.indexOf(g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID),0<=n)){n+=g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;var q=parseInt(f.substring(n,f.indexOf(";",n)));a:{f=this.vertexShapeMap;n=new g.mxgraph.io.vsdx.ShapePageId(a.getId(),q);null==f.entries&&(f.entries=[]);for(var t=0;t<f.entries.length;t++)if(null!=f.entries[t].key.equals&&f.entries[t].key.equals(n)||f.entries[t].key===n){f=f.entries[t].value;break a}f=null}null!=f&&(k=f.getName())}d=d.concat(k);d=d.concat('"}');f=","}}this.RESPONSE_DIAGRAM_START=0<d.length?",":"";return d};return h}(g.mxgraph.io.mxVsdxCodec);z.mxVssxCodec=B;B.__class="com.mxgraph.io.mxVssxCodec"})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=b;this.y=d}c.prototype.getX=function(){return this.x};c.prototype.getY=function(){return this.y};c.prototype.getA=function(){return this.a};c.prototype.getB=function(){return this.b};c.prototype.getC=function(){return this.c};c.prototype.getD=function(){return this.d};c.prototype.getFormulaA=function(){return this.formulaA};c.prototype.getFormulaE=function(){return this.formulaE};c.prototype.getIndex=function(){return this.index};return c}();m.Row=h;h.__class="com.mxgraph.io.vsdx.geometry.Row"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(b){return 1}};c.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(d){}return null};c.getRowObj=function(a,b){var d=a.getAttribute("T"),f=c.getIndex(a);var k=(k=a.getAttribute("Del"))&&k.equals?k.equals("1"):"1"===k;if(!k){var n=null;f<=b.length&&(n=b[f-1]);var p=k=b=null,x=null,-A=null,C=null,J=null,M=null;null!=n&&(b=n.x,k=n.y,p=n.getA(),x=n.getB(),A=n.getC(),C=n.getD(),M=n.getFormulaA(),J=n.getFormulaE());a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(n=0;n<a.length;n++){var L=a[n],Q=L.getAttribute("N"),U=L.getAttribute("V");switch(Q){case "X":b=c.getDoubleVal(U);break;case "Y":k=c.getDoubleVal(U);break;case "A":p=c.getDoubleVal(U);M=L.getAttribute("V");break;case "B":x=c.getDoubleVal(U);break;case "C":A=c.getDoubleVal(U);break;case "D":C=c.getDoubleVal(U);-break;case "E":J=U}}switch(d){case "MoveTo":return new g.mxgraph.io.vsdx.geometry.MoveTo(f,b,k);case "LineTo":return new g.mxgraph.io.vsdx.geometry.LineTo(f,b,k);case "ArcTo":return new g.mxgraph.io.vsdx.geometry.ArcTo(f,b,k,p);case "Ellipse":return new g.mxgraph.io.vsdx.geometry.Ellipse(f,b,k,p,x,A,C);case "EllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.EllipticalArcTo(f,b,k,p,x,A,C);case "InfiniteLine":return new g.mxgraph.io.vsdx.geometry.InfiniteLine(f,b,k,p,x);case "NURBSTo":return new g.mxgraph.io.vsdx.geometry.NURBSTo(f,-b,k,p,x,A,C,J);case "PolylineTo":return new g.mxgraph.io.vsdx.geometry.PolylineTo(f,b,k,M);case "RelCubBezTo":return new g.mxgraph.io.vsdx.geometry.RelCubBezTo(f,b,k,p,x,A,C);case "RelEllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,b,k,p,x,A,C);case "RelLineTo":return new g.mxgraph.io.vsdx.geometry.RelLineTo(f,b,k);case "RelMoveTo":return new g.mxgraph.io.vsdx.geometry.RelMoveTo(f,b,k);case "RelQuadBezTo":return new g.mxgraph.io.vsdx.geometry.RelQuadBezTo(f,b,k,p,x);case "SplineKnot":return new g.mxgraph.io.vsdx.geometry.SplineKnot(f,-b,k,p);case "SplineStart":return new g.mxgraph.io.vsdx.geometry.SplineStart(f,b,k,p,x,A,C)}}return new g.mxgraph.io.vsdx.geometry.DelRow(f)};return c}();m.RowFactory=h;h.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(b){return 1}};c.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(d){}return null};c.getRowObj=function(a,b){var d=a.getAttribute("T"),f=c.getIndex(a);var k=(k=a.getAttribute("Del"))&&k.equals?k.equals("1"):"1"===k;if(!k){var n=null;f<=b.length&&(n=b[f-1]);var q=k=b=null,t=null,+A=null,C=null,I=null,M=null;null!=n&&(b=n.x,k=n.y,q=n.getA(),t=n.getB(),A=n.getC(),C=n.getD(),M=n.getFormulaA(),I=n.getFormulaE());a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(n=0;n<a.length;n++){var K=a[n],Q=K.getAttribute("N"),S=K.getAttribute("V");switch(Q){case "X":b=c.getDoubleVal(S);break;case "Y":k=c.getDoubleVal(S);break;case "A":q=c.getDoubleVal(S);M=K.getAttribute("V");break;case "B":t=c.getDoubleVal(S);break;case "C":A=c.getDoubleVal(S);break;case "D":C=c.getDoubleVal(S);+break;case "E":I=S}}switch(d){case "MoveTo":return new g.mxgraph.io.vsdx.geometry.MoveTo(f,b,k);case "LineTo":return new g.mxgraph.io.vsdx.geometry.LineTo(f,b,k);case "ArcTo":return new g.mxgraph.io.vsdx.geometry.ArcTo(f,b,k,q);case "Ellipse":return new g.mxgraph.io.vsdx.geometry.Ellipse(f,b,k,q,t,A,C);case "EllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.EllipticalArcTo(f,b,k,q,t,A,C);case "InfiniteLine":return new g.mxgraph.io.vsdx.geometry.InfiniteLine(f,b,k,q,t);case "NURBSTo":return new g.mxgraph.io.vsdx.geometry.NURBSTo(f,+b,k,q,t,A,C,I);case "PolylineTo":return new g.mxgraph.io.vsdx.geometry.PolylineTo(f,b,k,M);case "RelCubBezTo":return new g.mxgraph.io.vsdx.geometry.RelCubBezTo(f,b,k,q,t,A,C);case "RelEllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,b,k,q,t,A,C);case "RelLineTo":return new g.mxgraph.io.vsdx.geometry.RelLineTo(f,b,k);case "RelMoveTo":return new g.mxgraph.io.vsdx.geometry.RelMoveTo(f,b,k);case "RelQuadBezTo":return new g.mxgraph.io.vsdx.geometry.RelQuadBezTo(f,b,k,q,t);case "SplineKnot":return new g.mxgraph.io.vsdx.geometry.SplineKnot(f,+b,k,q);case "SplineStart":return new g.mxgraph.io.vsdx.geometry.SplineStart(f,b,k,q,t,A,C)}}return new g.mxgraph.io.vsdx.geometry.DelRow(f)};return c}();m.RowFactory=h;h.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(){this.colorElementMap={};this.fontElementMap={}}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0())};h.defaultColors_$LI$=function(){h.__static_initialize();null==h.defaultColors&&(h.defaultColors={});return h.defaultColors};h.__static_initializer_0=function(){h.defaultColors_$LI$()["0"]="#000000";h.defaultColors_$LI$()["1"]="#FFFFFF";h.defaultColors_$LI$()["2"]="#FF0000";h.defaultColors_$LI$()["3"]="#00FF00";h.defaultColors_$LI$()["4"]="#0000FF";h.defaultColors_$LI$()["5"]="#FFFF00";h.defaultColors_$LI$()["6"]="#FF00FF";h.defaultColors_$LI$()["7"]="#00FFFF";h.defaultColors_$LI$()["8"]="#800000";h.defaultColors_$LI$()["9"]="#008000";h.defaultColors_$LI$()["10"]="#000080";h.defaultColors_$LI$()["11"]="#808000";h.defaultColors_$LI$()["12"]="#800080";h.defaultColors_$LI$()["13"]="#008080";h.defaultColors_$LI$()["14"]="#C0C0C0";h.defaultColors_$LI$()["15"]="#E6E6E6";h.defaultColors_$LI$()["16"]="#CDCDCD";h.defaultColors_$LI$()["17"]="#B3B3B3";h.defaultColors_$LI$()["18"]="#9A9A9A";h.defaultColors_$LI$()["19"]="#808080";h.defaultColors_$LI$()["20"]="#666666";h.defaultColors_$LI$()["21"]="#4D4D4D";h.defaultColors_$LI$()["22"]="#333333";h.defaultColors_$LI$()["23"]="#1A1A1A"};h.prototype.initialise=function(c,a){if(null!=c){a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLORS);if(0<a.length){var b=a.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_ENTRY),@@ -1211,45 +1211,45 @@ m.BULLET="Bullet";m.CASE="Case";m.CHARACTER="Character";m.COLOR="Color";m.COLOR_this.processGeoElem(c);else if((null!=c&&1==c.nodeType||null===c)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(c),this.processGeoElem(c);else throw Error("invalid overload");}h.prototype.getIndex$org_w3c_dom_Element=function(c){try{return parseInt(c.getAttribute("IX"))||0}catch(a){return 0}};h.prototype.getIndex=function(c){if(null!=c&&1==c.nodeType||null===c)return this.getIndex$org_w3c_dom_Element(c);if(void 0===c)return this.getIndex$();throw Error("invalid overload");};h.prototype.processGeoElem=function(c){var a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Cell");c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Row");if(null==this.rows){this.rows=[];for(var b=0;b<c.length;b++)this.rows.push(null)}for(b=0;b<a.length;b++){var d=a[b],f=d.getAttribute("N");d=d.getAttribute("V");switch(f){case "NoFill":this.noFill=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoLine":this.noLine=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoShow":this.noShow=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoSnap":this.noSnap=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoQuickDrag":this.noQuickDrag=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d)}}a=this.rows.length;b=!1;for(f=0;f<c.length;f++)d=g.mxgraph.io.vsdx.geometry.RowFactory.getRowObj(c[f],-this.rows),d.getIndex()>a?(this.rows.push(d),b=!0):this.rows[d.getIndex()-1]=d;b&&function(k,n){n.compare?k.sort(function(p,x){return n.compare(p,x)}):k.sort(n)}(this.rows,new h.mxVsdxGeometry$0(this))};h.prototype.inheritGeo=function(c){this.noFill=c.noFill;this.noLine=c.noLine;this.noShow=c.noShow;this.noSnap=c.noSnap;this.noQuickDrag=c.noQuickDrag;var a=this.rows=[];a.push.apply(a,c.rows)};h.prototype.getIndex$=function(){return this.index};h.prototype.isNoFill=function(){return this.noFill};h.prototype.isNoLine=+this.rows),d.getIndex()>a?(this.rows.push(d),b=!0):this.rows[d.getIndex()-1]=d;b&&function(k,n){n.compare?k.sort(function(q,t){return n.compare(q,t)}):k.sort(n)}(this.rows,new h.mxVsdxGeometry$0(this))};h.prototype.inheritGeo=function(c){this.noFill=c.noFill;this.noLine=c.noLine;this.noShow=c.noShow;this.noSnap=c.noSnap;this.noQuickDrag=c.noQuickDrag;var a=this.rows=[];a.push.apply(a,c.rows)};h.prototype.getIndex$=function(){return this.index};h.prototype.isNoFill=function(){return this.noFill};h.prototype.isNoLine=function(){return this.noLine};h.prototype.isNoShow=function(){return this.noShow};h.prototype.isNoSnap=function(){return this.noSnap};h.prototype.isNoQuickDrag=function(){return this.noQuickDrag};h.prototype.getRows=function(){return this.rows};h.prototype.getPathXML=function(c,a){if(this.noShow)return"";for(var b="",d=0;d<this.rows.length;d++){var f=this.rows[d];b=b.concat(null!=f?f.handle(c,a):"")}return b};return h}();B.mxVsdxGeometry=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometry";(function(h){var c=function(){function a(b){this.__parent=b}a.prototype.compare=function(b,d){b=null!=b?b.getIndex():0;d=null!=d?d.getIndex():0;return b-d};return a}();h.mxVsdxGeometry$0=c;c.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometry||(B.mxVsdxGeometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=c){this.parentGeomList=c.geomList;var a=this.geomList;a.push.apply(a,c.geomList)}}h.prototype.addGeometry=function(c){c=new g.mxgraph.io.vsdx.mxVsdxGeometry(c,this.parentGeomList);c.getIndex()<this.geomList.length?this.geomList[c.getIndex()]=c:(this.geomList.push(c),this.sortNeeded=!0)};h.prototype.sort=function(){this.sortNeeded&&(function(c,a){a.compare?c.sort(function(b,d){return a.compare(b,d)}):c.sort(a)}(this.geomList,new h.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};h.prototype.isNoShow=function(){for(var c=0;c<this.geomList.length;c++)if(!this.geomList[c].isNoShow())return!1;return!0};h.prototype.isNoFill=function(){for(var c=0;c<this.geomList.length;c++){var a=this.geomList[c];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};h.prototype.isNoLine=function(){for(var c=0;c<this.geomList.length;c++){var a=this.geomList[c];if(!a.isNoShow()&&-!a.isNoLine())return!1}return!0};h.prototype.hasGeom=function(){return 0!=this.geomList.length};h.prototype.getGeoCount=function(){for(var c=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||c++;return c};h.prototype.rotatedPoint=function(c,a,b){var d=c.y*a+c.x*b;c.x=c.x*a-c.y*b;c.y=d};h.prototype.getRoutingPoints=function(c,a,b){this.sort();c=[];c.push(a.clone());for(var d=0,f=0,k=0;k<this.geomList.length;k++){var n=this.geomList[k];if(!n.isNoShow()){n=n.getRows();for(var p=0;p<n.length;p++){var x=-n[p];if(0==p&&null!=x&&x instanceof g.mxgraph.io.vsdx.geometry.MoveTo)d=null!=x.x?x.x:0,f=null!=x.y?x.y:0;else if(null!=x&&x instanceof g.mxgraph.io.vsdx.geometry.LineTo){var A=null!=x.x?x.x:0;x=null!=x.y?x.y:0;var C=new mxPoint(A,x);0!==b&&(b=(360-b)*Math.PI/180,this.rotatedPoint(C,Math.cos(b),Math.sin(b)));A=(C.x-d)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();A+=a.x;x=(C.y-f)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;x+=a.y;A=Math.round(100*A)/100;x=Math.round(100*x)/100;-C.x=A;C.y=x;c.push(C)}}}}return c};h.prototype.getShapeXML=function(c){var a=new mxPoint(0,0),b={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},d=b.str.length;var f=this.processGeo(c,a,b,-1,!0);f=this.processGeo(c,a,b,f,!1);if(b.str.length===d)return"";this.closePath(b,f);b.str=b.str.concat("</foreground></shape>");return b.str};h.prototype.processGeo=function(c,a,b,d,f){var k=c.getRounding(),n="";0<k&&(n=' rounded="1" arcSize="'+k*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor+-'" ');for(k=0;k<this.geomList.length;k++){var p=this.geomList[k];if(f!==p.isNoFill()){var x=p.getPathXML(a,c);0!==x.length&&(p=this.getGeoStyle(p),-1===d?b.str=b.str.concat("<path"+n+">"):d!==p&&(this.closePath(b,d),b.str=b.str.concat("<path"+n+">")),b.str=b.str.concat(x),d=p)}}return d};h.prototype.getGeoStyle=function(c){var a=0;c.isNoLine()||c.isNoFill()?c.isNoFill()?c.isNoLine()||(a=3):a=2:a=1;return a};h.prototype.closePath=function(c,a){c.str=c.str.concat("</path>");1===a?c.str=c.str.concat("<fillstroke/>"):+!a.isNoLine())return!1}return!0};h.prototype.hasGeom=function(){return 0!=this.geomList.length};h.prototype.getGeoCount=function(){for(var c=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||c++;return c};h.prototype.rotatedPoint=function(c,a,b){var d=c.y*a+c.x*b;c.x=c.x*a-c.y*b;c.y=d};h.prototype.getRoutingPoints=function(c,a,b){this.sort();c=[];c.push(a.clone());for(var d=0,f=0,k=0;k<this.geomList.length;k++){var n=this.geomList[k];if(!n.isNoShow()){n=n.getRows();for(var q=0;q<n.length;q++){var t=+n[q];if(0==q&&null!=t&&t instanceof g.mxgraph.io.vsdx.geometry.MoveTo)d=null!=t.x?t.x:0,f=null!=t.y?t.y:0;else if(null!=t&&t instanceof g.mxgraph.io.vsdx.geometry.LineTo){var A=null!=t.x?t.x:0;t=null!=t.y?t.y:0;var C=new mxPoint(A,t);0!==b&&(b=(360-b)*Math.PI/180,this.rotatedPoint(C,Math.cos(b),Math.sin(b)));A=(C.x-d)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();A+=a.x;t=(C.y-f)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;t+=a.y;A=Math.round(100*A)/100;t=Math.round(100*t)/100;+C.x=A;C.y=t;c.push(C)}}}}return c};h.prototype.getShapeXML=function(c){var a=new mxPoint(0,0),b={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},d=b.str.length;var f=this.processGeo(c,a,b,-1,!0);f=this.processGeo(c,a,b,f,!1);if(b.str.length===d)return"";this.closePath(b,f);b.str=b.str.concat("</foreground></shape>");return b.str};h.prototype.processGeo=function(c,a,b,d,f){var k=c.getRounding(),n="";0<k&&(n=' rounded="1" arcSize="'+k*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor++'" ');for(k=0;k<this.geomList.length;k++){var q=this.geomList[k];if(f!==q.isNoFill()){var t=q.getPathXML(a,c);0!==t.length&&(q=this.getGeoStyle(q),-1===d?b.str=b.str.concat("<path"+n+">"):d!==q&&(this.closePath(b,d),b.str=b.str.concat("<path"+n+">")),b.str=b.str.concat(t),d=q)}}return d};h.prototype.getGeoStyle=function(c){var a=0;c.isNoLine()||c.isNoFill()?c.isNoFill()?c.isNoLine()||(a=3):a=2:a=1;return a};h.prototype.closePath=function(c,a){c.str=c.str.concat("</path>");1===a?c.str=c.str.concat("<fillstroke/>"):2===a?c.str=c.str.concat("<fill/>"):3===a&&(c.str=c.str.concat("<stroke/>"))};return h}();B.mxVsdxGeometryList=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(h){var c=function(){function a(b){this.__parent=b}a.prototype.compare=function(b,d){return b.getIndex()-d.getIndex()};return a}();h.mxVsdxGeometryList$0=c;c.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometryList||(B.mxVsdxGeometryList={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.masterShape=this.Id=null;this.childShapes={};this.master=c;this.Id=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID)||"";this.processMasterShapes(a)}h.prototype.processMasterShapes=function(c){for(var a=this.master.firstChild;null!=a;){if(null!=a&&1==a.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(a.nodeName,"Rel")){var b=c.getRelationship(a.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/_rels/masters.xml.rels"),-d=b.getAttribute("Target");b=b.getAttribute("Type");var f=null;null!=b&&function(k,n){var p=k.length-n.length;k=k.indexOf(n,p);return-1!==k&&k===p}(b,"master")&&(f=c.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/"+d));if(null!=f)for(d=f.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(d.nodeName,"MasterContents")){this.processMasterShape(d,c);break}d=d.nextSibling}}else if(1==a.nodeType&&"PageSheet"==a.nodeName)for(this.pageSheet={},-d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Cell"),b=0;b<d.length;b++)this.pageSheet[d[b].getAttribute("N")]=d[b];a=a.nextSibling}};h.prototype.processMasterShape=function(c,a,b){b||(this.firstLevelShapes=[]);for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(p,x){return p&&p.equals?p.equals(x):p===x}(c.nodeName,"Shapes"))for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(p,x){return p&&p.equals?p.equals(x):p===x}(d.nodeName,"Shape")){var f=d,k=f.getAttribute("ID"),+d=b.getAttribute("Target");b=b.getAttribute("Type");var f=null;null!=b&&function(k,n){var q=k.length-n.length;k=k.indexOf(n,q);return-1!==k&&k===q}(b,"master")&&(f=c.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/"+d));if(null!=f)for(d=f.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(d.nodeName,"MasterContents")){this.processMasterShape(d,c);break}d=d.nextSibling}}else if(1==a.nodeType&&"PageSheet"==a.nodeName)for(this.pageSheet={},+d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Cell"),b=0;b<d.length;b++)this.pageSheet[d[b].getAttribute("N")]=d[b];a=a.nextSibling}};h.prototype.processMasterShape=function(c,a,b){b||(this.firstLevelShapes=[]);for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(q,t){return q&&q.equals?q.equals(t):q===t}(c.nodeName,"Shapes"))for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(q,t){return q&&q.equals?q.equals(t):q===t}(d.nodeName,"Shape")){var f=d,k=f.getAttribute("ID"),n=new g.mxgraph.io.vsdx.Shape(f,a);this.masterShape=null==this.masterShape?n:this.masterShape;this.childShapes[k]=n;b||this.firstLevelShapes.push(n);this.processMasterShape(f,a,!0)}d=d.nextSibling}else if(null!=c&&1==c.nodeType&&"Connects"==c.nodeName)for(this.connects={},d=c.firstChild;null!=d;)null!=d&&1==d.nodeType&&"Connect"==d.nodeName&&(f=new g.mxgraph.io.vsdx.mxVsdxConnect(d),this.connects[f.getFromSheet()]=f),d=d.nextSibling;c=c.nextSibling}};h.prototype.getMasterShape=function(){return this.masterShape};h.prototype.getSubShape=function(c){var a=this.childShapes;return a[c]?a[c]:null};h.prototype.getNameU=function(){return this.master.getAttribute("NameU")||""};h.prototype.getName=function(){return this.master.getAttribute("Name")||""};h.prototype.getUniqueID=function(){var c="";this.master.hasAttribute("UniqueID")&&(c=this.master.getAttribute("UniqueID"));return c};h.prototype.getId=function(){return this.Id};h.prototype.getMasterElement=function(){return this.master};return h}();B.mxVsdxMaster=m;m.__class="com.mxgraph.io.vsdx.mxVsdxMaster"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a,b){this.pages=this.media=this.xmlDocs=null;this.masters={};this.stylesheets={};this.themes={};this.pm=this.rootElement=null;this.xmlDocs=a;this.media=b;for(c=c.firstChild;null!=c;){if(a=null!=c&&1==c.nodeType)a=c.tagName.toLowerCase(),b=g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"document",a=a&&a.equals?a.equals(b):a===b;if(a){this.rootElement=c;break}c=c.nextSibling}this.pm=new g.mxgraph.io.vsdx.mxPropertiesManager;this.pm.initialise(this.rootElement,this);this.initStylesheets();this.initThemes();this.initMasters();this.initPages()}h.prototype.initThemes=function(){if(null!=this.xmlDocs)for(var c=!0,a=1;c;){var b=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/theme/theme"+a+".xml");if(null!=b){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.tagName,"a:theme")){b=new g.mxgraph.io.vsdx.mxVsdxTheme(b);0>-b.getThemeIndex()&&b.processTheme();var d=function(f,k){null==f.entries&&(f.entries=[]);for(var n=0;n<f.entries.length;n++)if(null!=f.entries[n].key.equals&&f.entries[n].key.equals(k)||f.entries[n].key===k)return f.entries[n].value;return null}(this.themes,b.getThemeIndex());null!=d&&d.isPure()||function(f,k,n){null==f.entries&&(f.entries=[]);for(var p=0;p<f.entries.length;p++)if(null!=f.entries[p].key.equals&&f.entries[p].key.equals(k)||f.entries[p].key===k){f.entries[p].value=n;return}f.entries.push({key:k,+b.getThemeIndex()&&b.processTheme();var d=function(f,k){null==f.entries&&(f.entries=[]);for(var n=0;n<f.entries.length;n++)if(null!=f.entries[n].key.equals&&f.entries[n].key.equals(k)||f.entries[n].key===k)return f.entries[n].value;return null}(this.themes,b.getThemeIndex());null!=d&&d.isPure()||function(f,k,n){null==f.entries&&(f.entries=[]);for(var q=0;q<f.entries.length;q++)if(null!=f.entries[q].key.equals&&f.entries[q].key.equals(k)||f.entries[q].key===k){f.entries[q].value=n;return}f.entries.push({key:k,value:n,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.themes,b.getThemeIndex(),b);break}b=b.nextSibling}a++}else c=!1}};h.prototype.initStylesheets=function(){var c=this.rootElement.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEETS);if(0<c.length){c=c.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEET);for(var a=c.length,b=0;b<a;b++){var d=c.item(b),f=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);d=new g.mxgraph.io.vsdx.Style(d,this);this.stylesheets[f]=d}}for(c=function(k){var n=0;return{next:function(){return n<k.length?k[n++]:null},hasNext:function(){return n<k.length}}}(function(k){return Object.keys(k).map(function(n){return k[n]})}(this.stylesheets));c.hasNext();)d=c.next(),d.stylesheetRefs(this)};h.prototype.initMasters=function(){if(null!=this.xmlDocs){var c=function(b,d){return b[d]?b[d]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/masters.xml");if(null!=c)for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(b,d){return b&&b.equals?b.equals(d):b===d}(c.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.MASTERS)){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(b,d){return b&&b.equals?b.equals(d):b===d}(c.tagName,"Master")){var a=new g.mxgraph.io.vsdx.mxVsdxMaster(c,this);this.masters[a.getId()]=a}c=c.nextSibling}break}c=c.nextSibling}}};h.prototype.initPages=function(){if(null!=this.xmlDocs){var c=function(k,n){return k[n]?k[n]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+-"/pages/pages.xml");if(null!=c)for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(c.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.PAGES)){var a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.PAGE);if(null!=a&&0<a.length){this.pages={};c={};for(var b=a.length,d=0;d<b;d++){var f=a.item(d);f=this.createPage(f);f.isBackground()&&function(k,n,p){null==k.entries&&(k.entries=[]);for(var x=0;x<k.entries.length;x++)if(null!=k.entries[x].key.equals&&-k.entries[x].key.equals(n)||k.entries[x].key===n){k.entries[x].value=p;return}k.entries.push({key:n,value:p,getKey:function(){return this.key},getValue:function(){return this.value}})}(c,f.getId(),f);(function(k,n,p){null==k.entries&&(k.entries=[]);for(var x=0;x<k.entries.length;x++)if(null!=k.entries[x].key.equals&&k.entries[x].key.equals(n)||k.entries[x].key===n){k.entries[x].value=p;return}k.entries.push({key:n,value:p,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.pages,-f.getId(),f)}a=function(k){null==k.entries&&(k.entries=[]);return k.entries}(this.pages);for(b=0;b<a.length;b++)f=a[b].getValue(),d=f.getBackPageId(),null!=d&&(d=function(k,n){null==k.entries&&(k.entries=[]);for(var p=0;p<k.entries.length;p++)if(null!=k.entries[p].key.equals&&k.entries[p].key.equals(n)||k.entries[p].key===n)return k.entries[p].value;return null}(c,d),f.setBackPage(d))}break}c=c.nextSibling}}};h.prototype.getPages=function(){return this.pages};h.prototype.getThemes=function(){return this.themes};+"/pages/pages.xml");if(null!=c)for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(c.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.PAGES)){var a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.PAGE);if(null!=a&&0<a.length){this.pages={};c={};for(var b=a.length,d=0;d<b;d++){var f=a.item(d);f=this.createPage(f);f.isBackground()&&function(k,n,q){null==k.entries&&(k.entries=[]);for(var t=0;t<k.entries.length;t++)if(null!=k.entries[t].key.equals&&+k.entries[t].key.equals(n)||k.entries[t].key===n){k.entries[t].value=q;return}k.entries.push({key:n,value:q,getKey:function(){return this.key},getValue:function(){return this.value}})}(c,f.getId(),f);(function(k,n,q){null==k.entries&&(k.entries=[]);for(var t=0;t<k.entries.length;t++)if(null!=k.entries[t].key.equals&&k.entries[t].key.equals(n)||k.entries[t].key===n){k.entries[t].value=q;return}k.entries.push({key:n,value:q,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.pages,+f.getId(),f)}a=function(k){null==k.entries&&(k.entries=[]);return k.entries}(this.pages);for(b=0;b<a.length;b++)f=a[b].getValue(),d=f.getBackPageId(),null!=d&&(d=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(c,d),f.setBackPage(d))}break}c=c.nextSibling}}};h.prototype.getPages=function(){return this.pages};h.prototype.getThemes=function(){return this.themes};h.prototype.getDefaultTheme=function(){null==this.defaultTheme&&null!=this.themes.entries&&0<this.themes.entries.length&&(this.defaultTheme=this.themes.entries[0].getValue());return this.defaultTheme};h.prototype.getRelationship=function(c,a){a=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,a);if(null==a||null==c||0===c.length)return null;a=a.getElementsByTagName("Relationship");for(var b=0;b<a.length;b++){var d=a.item(b);if(function(f,k){return f&&f.equals?f.equals(k):f===k}(d.getAttribute("Id"),c))return d}return null};h.prototype.getMaster=function(c){var a=this.masters;return a[c]?a[c]:null};h.prototype.createPage=function(c){return new g.mxgraph.io.vsdx.mxVsdxPage(c,this)};h.prototype.getPropertiesManager=function(){return this.pm};h.prototype.setPropertiesManager=function(c){this.pm=c};h.prototype.getMasterShapes=function(){return this.masters};h.prototype.setMasterShapes=function(c){this.masters=c};h.prototype.getStylesheet=function(c){var a=this.stylesheets;return a[c]?a[c]:null};h.prototype.getXmlDoc=function(c){var a=this.xmlDocs;return a[c]?a[c]:null};h.prototype.getMedia=function(c){var a=this.media;return a[c]?a[c]:null};return h}();B.mxVsdxModel=m;m.__class="com.mxgraph.io.vsdx.mxVsdxModel"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.pageName=this.Id=null;this.__isBackground=!1;this.model=this.pageSheet=this.pageElement=this.backPage=this.backPageId=null;this.shapes={};this.connects={};this.connectsMap={};this.cellElements={};this.model=a;this.pageElement=c;this.layers=[];var b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACKGROUND),d;if(d=null!=b)d=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE,d=b&&b.equals?b.equals(d):b===d;this.__isBackground=d?!0:!1;b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACK_PAGE);null!=b&&0<b.length&&(this.backPageId=parseFloat(b));this.Id=parseFloat(c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID));this.pageName=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME)||"";this.pageNameU=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||this.pageName;b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"PageSheet");if(0<b.length){b=b[0];d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,-"Cell");for(var f=0;f<d.length;f++){var k=d[f],n=k.getAttribute("N");this.cellElements[n]=k}b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Section");for(d=0;d<b.length;d++)if(f=b[d],n=f.getAttribute("N"),"Layer"==n)for(n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Row"),f=0;f<n.length;f++){k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n[f],"Cell");for(var p={},x=0;x<k.length;x++)p[k[x].getAttribute("N")]=k[x].getAttribute("V");null==p.Name&&(p.Name="Layer "+-f);this.layers[parseInt(n[f].getAttribute("IX"))]=p}}this.parseNodes(c,a,"pages")}h.prototype.parseNodes=function(c,a,b){for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType){var f=d,k=f.nodeName;if(function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"Connects"))for(f=f.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),f=null!=f&&0<f.length?f.item(0):null;null!=f;){if(null!=f&&1==f.nodeType){k=f;var n=new g.mxgraph.io.vsdx.mxVsdxConnect(k),p=n.getFromSheet();this.connectsMap[p]=-(this.connectsMap[p]||0)+1;p=null!=p&&-1<p?function(x,A){null==x.entries&&(x.entries=[]);for(var C=0;C<x.entries.length;C++)if(null!=x.entries[C].key.equals&&x.entries[C].key.equals(A)||x.entries[C].key===A)return x.entries[C].value;return null}(this.connects,p):null;null!=p?p.addConnect(k):function(x,A,C){null==x.entries&&(x.entries=[]);for(var J=0;J<x.entries.length;J++)if(null!=x.entries[J].key.equals&&x.entries[J].key.equals(A)||x.entries[J].key===A){x.entries[J].value=C;return}x.entries.push({key:A,-value:C,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.connects,n.getFromSheet(),n)}f=f.nextSibling}}d=d.nextSibling}for(d=c.firstChild;null!=d;)null!=d&&1==d.nodeType&&(f=d,k=f.nodeName,function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"Rel")?this.resolveRel(f,a,b):function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"Shapes")?this.shapes=this.parseShapes(f,null,!1):function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"PageSheet")&&(this.pageSheet=f)),d=d.nextSibling};+"Cell");for(var f=0;f<d.length;f++){var k=d[f],n=k.getAttribute("N");this.cellElements[n]=k}b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Section");for(d=0;d<b.length;d++)if(f=b[d],n=f.getAttribute("N"),"Layer"==n)for(n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Row"),f=0;f<n.length;f++){k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n[f],"Cell");for(var q={},t=0;t<k.length;t++)q[k[t].getAttribute("N")]=k[t].getAttribute("V");null==q.Name&&(q.Name="Layer "++f);this.layers[parseInt(n[f].getAttribute("IX"))]=q}}this.parseNodes(c,a,"pages")}h.prototype.parseNodes=function(c,a,b){for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType){var f=d,k=f.nodeName;if(function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Connects"))for(f=f.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),f=null!=f&&0<f.length?f.item(0):null;null!=f;){if(null!=f&&1==f.nodeType){k=f;var n=new g.mxgraph.io.vsdx.mxVsdxConnect(k),q=n.getFromSheet();this.connectsMap[q]=+(this.connectsMap[q]||0)+1;q=null!=q&&-1<q?function(t,A){null==t.entries&&(t.entries=[]);for(var C=0;C<t.entries.length;C++)if(null!=t.entries[C].key.equals&&t.entries[C].key.equals(A)||t.entries[C].key===A)return t.entries[C].value;return null}(this.connects,q):null;null!=q?q.addConnect(k):function(t,A,C){null==t.entries&&(t.entries=[]);for(var I=0;I<t.entries.length;I++)if(null!=t.entries[I].key.equals&&t.entries[I].key.equals(A)||t.entries[I].key===A){t.entries[I].value=C;return}t.entries.push({key:A,+value:C,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.connects,n.getFromSheet(),n)}f=f.nextSibling}}d=d.nextSibling}for(d=c.firstChild;null!=d;)null!=d&&1==d.nodeType&&(f=d,k=f.nodeName,function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Rel")?this.resolveRel(f,a,b):function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Shapes")?this.shapes=this.parseShapes(f,null,!1):function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"PageSheet")&&(this.pageSheet=f)),d=d.nextSibling};h.prototype.resolveRel=function(c,a,b){b=a.getRelationship(c.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/_rels/"+b+".xml.rels");c=b.getAttribute("Target");b=b.getAttribute("Type");if(function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}((new String(b)).toString(),"page")){var d=null;null!=b&&function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}(b,"page")&&(d=a.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/"+c));if(null!=d)for(b=d.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.tagName,"PageContents")){d=c.indexOf(".");-1!==d&&this.parseNodes(b,a,c.substring(0,d));break}b=b.nextSibling}}};h.prototype.parseShapes=function(c,a,b){b={};c=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPE);for(c=null!=c&&0<c.length?c.item(0):null;null!=c;){if(null!=c&&1==c.nodeType){var d=c,f=a;if(null==f){var k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER);-null==k||function(p,x){return p&&p.equals?p.equals(x):p===x}(k,"")||(f=this.model.getMaster(k))}var n=this.isEdge(d);n||null==f||(k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE),n=f.getMasterElement(),null==k||function(p,x){return p&&p.equals?p.equals(x):p===x}(k,"")||(k=f.getSubShape(k),n=null!=k?k.getShape():n),n=this.isEdge(n));d=this.createCell(d,!n,f);(function(p,x,A){null==p.entries&&(p.entries=[]);for(var C=0;C<p.entries.length;C++)if(null!=p.entries[C].key.equals&&p.entries[C].key.equals(x)||-p.entries[C].key===x){p.entries[C].value=A;return}p.entries.push({key:x,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(b,d.getId(),d)}c=c.nextSibling}return b};h.prototype.createCell=function(c,a,b){return new g.mxgraph.io.vsdx.VsdxShape(this,c,a,this.model.getMasterShapes(),b,this.model)};h.prototype.isEdge=function(c){if(null!=c&&(c=c.childNodes,null!=c))for(c=c.item(0);null!=c;){if(null!=c&&1==c.nodeType){var a=c;if(function(b,d){return b&&b.equals?b.equals(d):+null==k||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,"")||(f=this.model.getMaster(k))}var n=this.isEdge(d);n||null==f||(k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE),n=f.getMasterElement(),null==k||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,"")||(k=f.getSubShape(k),n=null!=k?k.getShape():n),n=this.isEdge(n));d=this.createCell(d,!n,f);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||+q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(b,d.getId(),d)}c=c.nextSibling}return b};h.prototype.createCell=function(c,a,b){return new g.mxgraph.io.vsdx.VsdxShape(this,c,a,this.model.getMasterShapes(),b,this.model)};h.prototype.isEdge=function(c){if(null!=c&&(c=c.childNodes,null!=c))for(c=c.item(0);null!=c;){if(null!=c&&1==c.nodeType){var a=c;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a.nodeName,"Cell")&&(a=a.getAttribute("N"),function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"BeginX")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"BeginY")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"EndY")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"EndX")))return!0}c=c.nextSibling}return!1};h.prototype.getPageDimensions=function(){var c=0,a=0,b=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageHeight"),d=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageWidth");null!=b&&(c=parseFloat(b.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),c=Math.round(100*c)/100);null!=d&&(a=parseFloat(d.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),a=Math.round(100*a)/100);return new mxPoint(a,c)};h.prototype.getDrawingScale=function(){var c=this.cellElements;c=c.DrawingScale?c.DrawingScale:null;return null!=c?parseFloat(c.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getPageScale=function(){var c=this.cellElements;c=c.PageScale?c.PageScale:null;return null!=c?parseFloat(c.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getCellValue=function(c){var a=this.cellElements;c=a[c]?a[c]:null;return null!=c?c.getAttribute("V")||"":null};h.prototype.getCellIntValue=function(c,a){c=this.getCellValue(c);return null!=c?parseInt(c):a};h.prototype.getId=function(){return this.Id};h.prototype.getPageName=function(){return this.pageName};h.prototype.getPageNameU=@@ -1271,8 +1271,8 @@ f.equals(k):f===k}(d,"a:fontScheme")?(function(f,k){return f&&f.equals?f.equals(!0}};h.prototype.processExtras=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0;a<c.length;a++){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c[a]);switch(b.nodeName){case "vt:fmtConnectorScheme":var d=this.name;var f=b.getAttribute("name");d=d&&d.equals?d.equals(f):d===f;d||(this.__isPure=!1);b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "a:fillStyleLst":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);for(var k=0;k<f.length;k++)this.connFillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f[k]));break;case "a:lnStyleLst":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.connLineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(f[k]))}break;case "vt:lineStyles":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "vt:fmtConnectorSchemeLineStyles":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);for(k=0;k<f.length;k++)this.connLineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]));break;case "vt:fmtSchemeLineStyles":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.lineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]))}break;case "vt:fontStylesGroup":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "vt:connectorFontStyles":this.fillFontStyles(f,this.connFontColors,this.connFontStyles);-break;case "vt:fontStyles":this.fillFontStyles(f,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b),f=d=0;f<b.length;f++){k=b[f];this.variantEmbellishment[d]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(k,"embellishment");k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(k);for(var n=0,p=0;p<k.length;p++){var x=k[p];this.variantFillIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,-"fillIdx");this.variantLineIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"lineIdx");this.variantEffectIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"effectIdx");this.variantFontIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"fontIdx");n++}d++}}}};h.prototype.fillFontStyles=function(c,a,b){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var d=0;d<c.length;d++){var f=+break;case "vt:fontStyles":this.fillFontStyles(f,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b),f=d=0;f<b.length;f++){k=b[f];this.variantEmbellishment[d]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(k,"embellishment");k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(k);for(var n=0,q=0;q<k.length;q++){var t=k[q];this.variantFillIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,+"fillIdx");this.variantLineIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"lineIdx");this.variantEffectIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"effectIdx");this.variantFontIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"fontIdx");n++}d++}}}};h.prototype.fillFontStyles=function(c,a,b){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var d=0;d<c.length;d++){var f=c[d];b.push(g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"style"));f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f);null!=f&&a.push(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f)))}};h.prototype.processFormats=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0;a<c.length;a++){var b=c[a];switch(b.nodeName){case "a:fillStyleLst":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var d=0;d<b.length;d++)this.fillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(b[d]));break;case "a:lnStyleLst":for(b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b),d=0;d<b.length;d++)this.lineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(b[d]))}}};h.prototype.processFonts=function(c){};h.prototype.processColors=function(c){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType){var a=c,b=a.nodeName;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);var d=(d=b)&&d.equals?d.equals("a:extLst"):"a:extLst"===d;d?3===a.length&&(0>this.themeIndex&&this.extractThemeIndex(a[0]),this.addBkgndColor(a[1]),this.addVariantColors(a[2])):(b=b.substring(2),0<a.length&&this.addBasicColor(b,a[0]))}c=c.nextSibling}};h.prototype.addVariantColors=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);if(null!=c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0,b=0;b<c.length;b++){var d=c[b];this.addVariantColorsSet(a++,d)}}};h.prototype.addVariantColorsSet=@@ -1304,20 +1304,20 @@ throw Error("invalid overload");};h.prototype.getLineWidth$com_mxgraph_io_vsdx_t{}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(){}h.conversionFactor_$LI$=function(){null==h.conversionFactor&&(h.conversionFactor=h.screenCoordinatesPerCm*h.CENTIMETERS_PER_INCHES);return h.conversionFactor};h.getDirectChildNamedElements=function(c,a){var b=[];for(c=c.firstChild;null!=c;c=c.nextSibling){var d;if(d=null!=c&&1==c.nodeType){d=a;var f=c.nodeName;d=d&&d.equals?d.equals(f):d===f}d&&b.push(c)}return b};h.getDirectChildElements=function(c){var a=[];for(c=c.firstChild;null!=c;c=c.nextSibling)null!=c&&1==c.nodeType&&a.push(c);return a};h.getDirectFirstChildElement=function(c){for(c=c.firstChild;null!=c;c=c.nextSibling)if(null!=c&&1==c.nodeType)return c;return null};h.getIntAttr$org_w3c_dom_Element$java_lang_String$int=function(c,a,b){try{var d=c.getAttribute(a);if(null!=d)return parseInt(d)}catch(f){}return b};h.getIntAttr=function(c,a,b){if((null==c||1!=c.nodeType)&&null!==c||"string"!==typeof a&&null!==a||"number"!==typeof b&&null!==b){if((null==-c||1!=c.nodeType)&&null!==c||"string"!==typeof a&&null!==a||void 0!==b)throw Error("invalid overload");return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(c,a)}return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,b)};h.getIntAttr$org_w3c_dom_Element$java_lang_String=function(c,a){return h.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,0)};h.getStyleString=function(c,a){for(var b="",d=function(p){var x=0;return{next:function(){return x<-p.length?p[x++]:null},hasNext:function(){return x<p.length}}}(function(p){return Object.keys(p).map(function(x){return p[x]})}(c)),f=function(p){var x=0;return{next:function(){return x<p.length?p[x++]:null},hasNext:function(){return x<p.length}}}(Object.keys(c));f.hasNext();){var k=f.next(),n=d.next();if(!function(p,x){return p&&p.equals?p.equals(x):p===x}(k,mxConstants.STYLE_SHAPE)||!function(p,x,A){void 0===A&&(A=0);return p.substr(A,x.length)===x}(c[k]?c[k]:null,"image")&&!function(p,x,A){void 0===-A&&(A=0);return p.substr(A,x.length)===x}(c[k]?c[k]:null,"rounded="))try{b=b+k+a}catch(p){}b=b+n+";"}return b};h.surroundByTags=function(c,a,b){return"<"+a+(b?' style="'+b+'"':"")+">"+c+"</"+a+">"};h.htmlEntities=function(c){return c.replace(RegExp("&","g"),"&").replace(RegExp('"',"g"),""").replace(RegExp("'","g"),"′").replace(RegExp("<","g"),"<").replace(RegExp(">","g"),">")};h.toInitialCapital=function(c){c=c.split(" ");for(var a="",b=0;b<c.length;b++){var d=c[b],f=d.substring(0,+c||1!=c.nodeType)&&null!==c||"string"!==typeof a&&null!==a||void 0!==b)throw Error("invalid overload");return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(c,a)}return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,b)};h.getIntAttr$org_w3c_dom_Element$java_lang_String=function(c,a){return h.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,0)};h.getStyleString=function(c,a){for(var b="",d=function(q){var t=0;return{next:function(){return t<+q.length?q[t++]:null},hasNext:function(){return t<q.length}}}(function(q){return Object.keys(q).map(function(t){return q[t]})}(c)),f=function(q){var t=0;return{next:function(){return t<q.length?q[t++]:null},hasNext:function(){return t<q.length}}}(Object.keys(c));f.hasNext();){var k=f.next(),n=d.next();if(!function(q,t){return q&&q.equals?q.equals(t):q===t}(k,mxConstants.STYLE_SHAPE)||!function(q,t,A){void 0===A&&(A=0);return q.substr(A,t.length)===t}(c[k]?c[k]:null,"image")&&!function(q,t,A){void 0===+A&&(A=0);return q.substr(A,t.length)===t}(c[k]?c[k]:null,"rounded="))try{b=b+k+a}catch(q){}b=b+n+";"}return b};h.surroundByTags=function(c,a,b){return"<"+a+(b?' style="'+b+'"':"")+">"+c+"</"+a+">"};h.htmlEntities=function(c){return c.replace(RegExp("&","g"),"&").replace(RegExp('"',"g"),""").replace(RegExp("'","g"),"′").replace(RegExp("<","g"),"<").replace(RegExp(">","g"),">")};h.toInitialCapital=function(c){c=c.split(" ");for(var a="",b=0;b<c.length;b++){var d=c[b],f=d.substring(0,1);d=d.substring(1);f=f.toUpperCase();a+=f+d}return a.substring(0,a.length)};h.toSmallCaps=function(c,a){var b="",d=b;if(a&&a.equals?a.equals(d):a===d)b=c;else for(c=c.split(""),d=0;d<c.length;d++){var f=c[d];(null==f.charCodeAt?f:f.charCodeAt(0))>=(null=="a".charCodeAt?"a":97)&&(null==f.charCodeAt?f:f.charCodeAt(0))<=(null=="z".charCodeAt?"z":122)?(f=(new String(f)).toString(),f=f.toUpperCase(),b+='<font style="font-size:'+parseFloat(a)/1.28+'px">'+f+"</font>"):b+=f}return b};h.getStyleMap=function(c,-a){var b={};c=c.split(";");for(var d=0;d<c.length;d++){var f=c[d],k=f.indexOf(a),n=f.substring(0,k);f=f.substring(k+1);b[n]=f}return b};h.isInsideTriangle=function(c,a,b,d,f,k,n,p){var x=(c-f)*(d-k)-(b-f)*(a-k);f=(c-n)*(k-p)-(f-n)*(a-p);c=(c-b)*(p-d)-(n-b)*(a-d);return!((0>x||0>f||0>c)&&(0<x||0<f||0<c))};return h}();m.screenCoordinatesPerCm=40;m.CENTIMETERS_PER_INCHES=2.54;B.mxVsdxUtils=m;m.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=+a){var b={};c=c.split(";");for(var d=0;d<c.length;d++){var f=c[d],k=f.indexOf(a),n=f.substring(0,k);f=f.substring(k+1);b[n]=f}return b};h.isInsideTriangle=function(c,a,b,d,f,k,n,q){var t=(c-f)*(d-k)-(b-f)*(a-k);f=(c-n)*(k-q)-(f-n)*(a-q);c=(c-b)*(q-d)-(n-b)*(a-d);return!((0>t||0>f||0>c)&&(0<t||0<f||0<c))};return h}();m.screenCoordinatesPerCm=40;m.CENTIMETERS_PER_INCHES=2.54;B.mxVsdxUtils=m;m.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a,b,d){this.paraIndex=this.fields=this.charIndices=this.values=null;this.values=[];this.values.push(c);this.charIndices=[];this.charIndices.push(a);this.fields=[];this.fields.push(d);this.paraIndex=b}h.prototype.addText=function(c,a,b){this.values.push(c);this.charIndices.push(a);this.fields.push(b)};h.prototype.getParagraphIndex=function(){return this.paraIndex};h.prototype.getValue=function(c){return this.values[c]};h.prototype.numValues=function(){return this.values.length};h.prototype.getChar=function(c){return this.charIndices[c]};h.prototype.getField=function(c){return this.fields[c]};return h}();B.Paragraph=m;m.__class="com.mxgraph.io.vsdx.Paragraph"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.elem=c}h.prototype.getIndexedCell=function(c,a){for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.elem,"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("IX");if(function(x,A){return x&&x.equals?x.equals(A):x===A}(k,c)||null==c){f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Cell");for(var n=0;n<f.length;n++){var p=f[n];k=p.getAttribute("N");if(function(x,A){return x&&-x.equals?x.equals(A):x===A}(k,a))return p}}}return null};return h}();B.Section=m;m.__class="com.mxgraph.io.vsdx.Section"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.elem=c}h.prototype.getIndexedCell=function(c,a){for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.elem,"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("IX");if(function(t,A){return t&&t.equals?t.equals(A):t===A}(k,c)||null==c){f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Cell");for(var n=0;n<f.length;n++){var q=f[n];k=q.getAttribute("N");if(function(t,A){return t&&+t.equals?t.equals(A):t===A}(k,a))return q}}}return null};return h}();B.Section=m;m.__class="com.mxgraph.io.vsdx.Section"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.pageNumber=0;this.pageNumber=c;this.Id=a}h.prototype.getId=function(){return this.Id};h.prototype.getPageNumber=function(){return this.pageNumber};h.prototype.equals=function(c){return null==c||this.constructor!==c.constructor||this.pageNumber!==c.pageNumber||this.Id!==c.Id?!1:!0};h.prototype.hashCode=function(){return 1E5*this.pageNumber+this.Id};return h}();B.ShapePageId=m;m.__class="com.mxgraph.io.vsdx.ShapePageId"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=b;this.blue=d}c.NONE_$LI$=function(){null==c.NONE&&(c.NONE=new c(-1,-1,-1));return c.NONE};c.prototype.getRed=function(){return this.red};c.prototype.setRed=function(a){this.red=a};c.prototype.getGreen=function(){return this.green};c.prototype.setGreen=function(a){this.green=a};c.prototype.getBlue=function(){return this.blue};-c.prototype.setBlue=function(a){this.blue=a};c.prototype.toHsl=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,Math.min(b,d)),n=(f+k)/2;if(f===k)a=k=0;else{var p=f-k;k=.5<n?p/(2-f-k):p/(f+k);a=(f===a?(b-d)/p+(b<d?6:0):f===b?(d-a)/p+2:(a-b)/p+4)/6}return new g.mxgraph.io.vsdx.theme.HSLColor(a,k,n)};c.prototype.toHsv=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,+c.prototype.setBlue=function(a){this.blue=a};c.prototype.toHsl=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,Math.min(b,d)),n=(f+k)/2;if(f===k)a=k=0;else{var q=f-k;k=.5<n?q/(2-f-k):q/(f+k);a=(f===a?(b-d)/q+(b<d?6:0):f===b?(d-a)/q+2:(a-b)/q+4)/6}return new g.mxgraph.io.vsdx.theme.HSLColor(a,k,n)};c.prototype.toHsv=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,Math.min(b,d)),n=f-k;a=f===k?0:(f===a?(b-d)/n+(b<d?6:0):f===b?(d-a)/n+2:(a-b)/n+4)/6;return new g.mxgraph.io.vsdx.theme.HSVColor(a,0===f?0:n/f,f)};c.decodeColorHex=function(a){a=parseInt(a,16);return new c(a>>16&255,a>>8&255,a&255)};c.prototype.toHexStr=function(){var a=this.red.toString(16);a=1==a.length?"0"+a:a;var b=this.green.toString(16);b=1==b.length?"0"+b:b;var d=this.blue.toString(16);d=1==d.length?"0"+d:d;return"#"+a+b+d};c.prototype.getGradientClr=function(){return this.gradientClr};c.prototype.setGradientClr=function(a){this.gradientClr=a};return c}();m.Color=h;h.__class="com.mxgraph.io.vsdx.theme.Color"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getFillStyle=function(a){var b=null;switch(a.nodeName){case "a:solidFill":b=new g.mxgraph.io.vsdx.theme.SolidFillStyle(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":b=new g.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":b=new g.mxgraph.io.vsdx.theme.GradFill(a)}return b};return c}();m.FillStyleFactory=@@ -1335,8 +1335,8 @@ a/100;this.lum=this.clamp01(this.lum);return this};c.prototype.satMod=function(athis.isBevelJoin=this.isRoundJoin=!1;this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.lineWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"w");var b=a.getAttribute("cap");if(null!=b)switch(b){case "rnd":this.lineCap=c.LineCapType.ROUND;break;case "sq":this.lineCap=c.LineCapType.SQUARE;break;case "flat":this.lineCap=c.LineCapType.FLAT}b=a.getAttribute("cmpd");if(null!=b)switch(b){case "sng":this.lineComp=c.CompoundLineType.SINGLE;break;case "dbl":this.lineComp=c.CompoundLineType.DOUBLE;break;case "thickThin":this.lineComp=c.CompoundLineType.THICK_THIN_DOUBLE;break;case "thinThick":this.lineComp=c.CompoundLineType.THIN_THICK_DOUBLE;break;case "tri":this.lineComp=c.CompoundLineType.THIN_THICK_THIN_TRIPLE}b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<b.length;d++){var f=b[d];switch(f.nodeName){case "a:noFill":case "a:solidFill":case "a:gradFill":case "a:pattFill":this.fillStyle=g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f);break;case "a:prstDash":f=f.getAttribute("val");this.isLineDashed=!0;switch(f){case "solid":this.isLineDashed=!1;break;case "sysDot":case "dot":this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDash":this.lineDashPattern.push(12);this.lineDashPattern.push(4);break;case "sysDashDot":case "dashDot":this.lineDashPattern.push(8);this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDashDot":this.lineDashPattern.push(12);-this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "sysDashDotDot":case "lgDashDotDot":this.lineDashPattern.push(12),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4)}break;case "a:custDash":this.isLineDashed=!0;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"a:ds");for(var k=0;k<f.length;k++){var n=f[k],p=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,-"d");n=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"sp");this.lineDashPattern.push(p/1E4);this.lineDashPattern.push(n/1E4)}break;case "a:round":this.isRoundJoin=!0;break;case "a:bevel":this.isBevelJoin=!0;break;case "a:miter":g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"lim");this.isMiterJoin=!0;break;case "a:headEnd":this.headEndType=this.getLineEndType(f);this.headEndWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,+this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "sysDashDotDot":case "lgDashDotDot":this.lineDashPattern.push(12),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4)}break;case "a:custDash":this.isLineDashed=!0;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"a:ds");for(var k=0;k<f.length;k++){var n=f[k],q=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,+"d");n=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"sp");this.lineDashPattern.push(q/1E4);this.lineDashPattern.push(n/1E4)}break;case "a:round":this.isRoundJoin=!0;break;case "a:bevel":this.isBevelJoin=!0;break;case "a:miter":g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"lim");this.isMiterJoin=!0;break;case "a:headEnd":this.headEndType=this.getLineEndType(f);this.headEndWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"w");this.headEndLen=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len");break;case "a:tailEnd":this.tailEndType=this.getLineEndType(f),this.tailEndWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"w"),this.tailEndLen=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len")}}}else if(void 0===a)Array.prototype.slice.call(arguments),this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0,this.isLineDashed=!1,this.lineDashPattern=[],this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1,this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0;else throw Error("invalid overload");}c.prototype.getLineEndType=function(a){var b=null;switch(a.getAttribute("type")){case "none":b=c.LineEndType.NONE;break;case "triangle":b=c.LineEndType.TRIANGLE;break;case "stealth":b=c.LineEndType.STEALTH;break;case "diamond":b=c.LineEndType.DIAMOND;break;case "oval":b=c.LineEndType.OVAL;break;case "arrow":b=c.LineEndType.ARROW}return b};c.prototype.getLineColor=function(a,b){return null!=this.fillStyle?this.fillStyle.applyStyle(a,b):b.getDefaultLineClr()};c.prototype.isDashed=function(){return this.isLineDashed};c.prototype.getLineDashPattern=function(){return this.lineDashPattern};c.prototype.getStartSize=@@ -1356,8 +1356,8 @@ function(a){this.blueOff=a;this.hasEffects=!0};c.prototype.setBlueMod=function(a(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getOoxmlColor=function(a){var b=null;switch(a.nodeName){case "a:scrgbClr":b=new g.mxgraph.io.vsdx.theme.ScrgbClr(parseInt(a.getAttribute("r")),parseInt(a.getAttribute("g")),parseInt(a.getAttribute("b")));break;case "a:srgbClr":b=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"));break;case "a:hslClr":b=new g.mxgraph.io.vsdx.theme.HslClr(parseInt(a.getAttribute("hue")),parseInt(a.getAttribute("sat")),parseInt(a.getAttribute("lum")));break;case "a:sysClr":b=new g.mxgraph.io.vsdx.theme.SysClr(a.getAttribute("val"),a.getAttribute("lastClr"));break;case "a:schemeClr":b=new g.mxgraph.io.vsdx.theme.SchemeClr(a.getAttribute("val"));break;case "a:prstClr":b=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"))}a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<a.length;d++){var f=a[d],k=parseInt(f.getAttribute("val"))/1E3|0;switch(f.nodeName){case "a:tint":b.setTint(k);break;case "a:shade":b.setShade(k);break;case "a:satMod":b.setSatMod(k);break;case "a:lumMod":b.setLumMod(k);break;case "a:hueMod":b.setHueMod(k)}}return b};return c}();m.OoxmlColorFactory=h;h.__class="com.mxgraph.io.vsdx.theme.OoxmlColorFactory"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d,f,k,n,p,x,A,C){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=b;this.quickStyleFillMatrix=d;this.quickStyleFontColor=f;this.quickStyleFontMatrix=k;this.quickStyleLineColor=-n;this.quickStyleLineMatrix=p;this.quickStyleShadowColor=x;this.quickStyleType=A;this.quickStyleVariation=C}c.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};c.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};c.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};c.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};c.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix};+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d,f,k,n,q,t,A,C){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=b;this.quickStyleFillMatrix=d;this.quickStyleFontColor=f;this.quickStyleFontMatrix=k;this.quickStyleLineColor=+n;this.quickStyleLineMatrix=q;this.quickStyleShadowColor=t;this.quickStyleType=A;this.quickStyleVariation=C}c.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};c.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};c.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};c.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};c.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix};c.prototype.getQuickStyleLineColor=function(){return this.quickStyleLineColor};c.prototype.getQuickStyleLineMatrix=function(){return this.quickStyleLineMatrix};c.prototype.getQuickStyleShadowColor=function(){return this.quickStyleShadowColor};c.prototype.getQuickStyleType=function(){return this.quickStyleType};c.prototype.getQuickStyleVariation=function(){return this.quickStyleVariation};c.prototype.setQuickStyleEffectsMatrix=function(a){this.quickStyleEffectsMatrix=a};c.prototype.setQuickStyleFillColor=function(a){this.quickStyleFillColor=a};c.prototype.setQuickStyleFillMatrix=function(a){this.quickStyleFillMatrix=a};c.prototype.setQuickStyleFontColor=function(a){this.quickStyleFontColor=a};c.prototype.setQuickStyleFontMatrix=function(a){this.quickStyleFontMatrix=a};c.prototype.setQuickStyleLineColor=function(a){this.quickStyleLineColor=a};c.prototype.setQuickStyleLineMatrix=function(a){this.quickStyleLineMatrix=a};c.prototype.setQuickStyleShadowColor=function(a){this.quickStyleShadowColor=a};c.prototype.setQuickStyleType=function(a){this.quickStyleType=a};c.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return c}();m.QuickStyleVals=h;h.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));@@ -1365,36 +1365,36 @@ function(a){this.quickStyleType=a};c.prototype.setQuickStyleVariation=function(a(function(g){(function(y){(function(z){var B=function(){function m(){}m.MAX_AREA_$LI$=function(){null==m.MAX_AREA&&(m.MAX_AREA=1E8);return m.MAX_AREA};return m}();B.MAX_REQUEST_SIZE=52428800;B.IMAGE_DOMAIN="http://img.diagramly.com/";z.Constants=B;B.__class="com.mxgraph.online.Constants"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){var B=function(){function m(){}m.getRotatedPoint=function(h,c,a,b){var d=h.x-b.x;h=h.y-b.y;return new mxPoint(d*c-h*a+b.x,h*c+d*a+b.y)};m.rotatedGeometry=function(h,c,a,b){c=c*Math.PI/180;var d=Math.cos(c);c=Math.sin(c);var f=h.getCenterX()-a,k=h.getCenterY()-b;h.x=Math.round(f*d-k*c+a-h.width/2);h.y=Math.round(k*d+f*c+b-h.height/2)};return m}();B.CHARSET_FOR_URL_ENCODING="ISO-8859-1";z.Utils=B;B.__class="com.mxgraph.online.Utils"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.a=k;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a){var f=d.getHeight(),k=d.getWidth(),n=Math.floor(Math.round(d.getLastX()*k)/100),p=Math.floor(Math.round(d.getLastY()*f)/100);b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var x=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();x=f-x;var A=-this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(b-n);p=Math.abs(x-p);n=p=.5*A+(n*n+p*p)/(8*A);var C=Math.abs(p);p=Math.round(100*p/k*100)/100;n=Math.round(100*n/f*100)/100;b=Math.round(100*b/k*100)/100;x=Math.round(100*x/f*100)/100;A=Math.round(100*A)/100;p=Math.abs(p);n=Math.abs(n);f=0>A?"1":"0";A=C<Math.abs(A)?"1":"0";d.setLastX(b);d.setLastY(x);return'<arc rx="'+(new String(p)).toString()+'" ry="'+(new String(n)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(x)).toString()++(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.a=k;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a){var f=d.getHeight(),k=d.getWidth(),n=Math.floor(Math.round(d.getLastX()*k)/100),q=Math.floor(Math.round(d.getLastY()*f)/100);b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var t=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();t=f-t;var A=+this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(b-n);q=Math.abs(t-q);n=q=.5*A+(n*n+q*q)/(8*A);var C=Math.abs(q);q=Math.round(100*q/k*100)/100;n=Math.round(100*n/f*100)/100;b=Math.round(100*b/k*100)/100;t=Math.round(100*t/f*100)/100;A=Math.round(100*A)/100;q=Math.abs(q);n=Math.abs(n);f=0>A?"1":"0";A=C<Math.abs(A)?"1":"0";d.setLastX(b);d.setLastY(t);return'<arc rx="'+(new String(q)).toString()+'" ry="'+(new String(n)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(t)).toString()+'" x-axis-rotation="0" large-arc-flag="'+A+'" sweep-flag="'+f+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.ArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b){return c.call(this,b,null,null)||this}__extends(a,c);a.prototype.handle=function(b,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.DelRow=h;h.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,p,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=p;b.d=x;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b=d.getHeight();var f=d.getWidth(),k=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=b-d;var n=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),-p=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();p=b-p;var x=this.c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.d*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(n-k);p=Math.abs(p-d);p=Math.sqrt(n*n+p*p);x=Math.abs(x-k);A=Math.abs(b-A-d);k=100*k/f;A=Math.round(100*Math.sqrt(x*x+A*A)/b/2*100)/100;f=Math.round(100*p/f/2*100)/100;x=Math.round(100*(k-2*f))/100;k=Math.round(100*(k+2*f))/100;b=Math.round(100*d/b*100)/100;return'<move x="'+(new String(x)).toString()+-'" y="'+(new String(b)).toString()+'"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(x)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.Ellipse=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b=d.getHeight();var f=d.getWidth(),k=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=b-d;var n=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),+q=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();q=b-q;var t=this.c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.d*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(n-k);q=Math.abs(q-d);q=Math.sqrt(n*n+q*q);t=Math.abs(t-k);A=Math.abs(b-A-d);k=100*k/f;A=Math.round(100*Math.sqrt(t*t+A*A)/b/2*100)/100;f=Math.round(100*q/f/2*100)/100;t=Math.round(100*(k-2*f))/100;k=Math.round(100*(k+2*f))/100;b=Math.round(100*d/b*100)/100;return'<move x="'+(new String(t)).toString()++'" y="'+(new String(b)).toString()+'"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(t)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.Ellipse=h;h.__class="com.mxgraph.io.vsdx.geometry.Ellipse"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,p,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=p;b.d=x;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=f-n;var p=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),-x=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.c,C=this.d;b=100*b/k;n=100*n/f;var J=d.getLastX()*k/100,M=d.getLastY()*f/100,L=b*k/100,Q=n*f/100,U=f-x,H=-A;A=Math.sqrt(J*J+M*M)*Math.cos(Math.atan2(M,J)-H);x=Math.sqrt(J*J+M*M)*Math.sin(Math.atan2(M,J)-H);var I=Math.sqrt(L*L+Q*Q)*Math.cos(Math.atan2(Q,L)-H),N=Math.sqrt(L*L+Q*Q)*Math.sin(Math.atan2(Q,L)-H),K=Math.sqrt(p*p+U*U)*Math.cos(Math.atan2(U,p)-H),O=Math.sqrt(p*p+U*U)*Math.sin(Math.atan2(U,p)-H),ba=((A-I)*(A+I)*(N-O)-(I--K)*(I+K)*(x-N)+C*C*(x-N)*(N-O)*(x-O))/(2*((A-I)*(N-O)-(I-K)*(x-N))),W=((A-I)*(I-K)*(A-K)/(C*C)+(I-K)*(x-N)*(x+N)-(A-I)*(N-O)*(N+O))/(2*((I-K)*(x-N)-(A-I)*(N-O))),R=A-ba,S=x-W;R=Math.sqrt(R*R+S*S*C*C);C=R/C;H=180*H/Math.PI;b=Math.round(100*b)/100;n=Math.round(100*n)/100;R=Math.round(100*R/k*100)/100;C=Math.round(100*C/f*100)/100;H=Math.round(100*H)/100;f=0<(L-J)*(U-M)-(Q-M)*(p-J)?"0":"1";k="0";g.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ba,W,A,x,I,N,K,O)&&(k="1");d.setLastX(b);d.setLastY(n);return'<arc rx="'+-(new String(R)).toString()+'" ry="'+(new String(C)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(n)).toString()+'" x-axis-rotation="'+(new String(H)).toString()+'" large-arc-flag="'+k+'" sweep-flag="'+f+'"/>'}return""};a.prototype.isReflexAngle=function(b,d,f,k,n,p,x,A){f-=b;k-=d;p-=d;n=x-b;A-=d;d=b=0;f=180*(Math.atan2(k,f)-Math.atan2(d,b))/Math.PI;n=180*(Math.atan2(p,n)-Math.atan2(d,b))/Math.PI;b=180*(Math.atan2(A,x)-Math.atan2(d,b))/Math.PI;f=(f-b)%360;n=(n-b)%360;180<f?f-=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=f-n;var q=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),+t=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.c,C=this.d;b=100*b/k;n=100*n/f;var I=d.getLastX()*k/100,M=d.getLastY()*f/100,K=b*k/100,Q=n*f/100,S=f-t,H=-A;A=Math.sqrt(I*I+M*M)*Math.cos(Math.atan2(M,I)-H);t=Math.sqrt(I*I+M*M)*Math.sin(Math.atan2(M,I)-H);var J=Math.sqrt(K*K+Q*Q)*Math.cos(Math.atan2(Q,K)-H),N=Math.sqrt(K*K+Q*Q)*Math.sin(Math.atan2(Q,K)-H),L=Math.sqrt(q*q+S*S)*Math.cos(Math.atan2(S,q)-H),O=Math.sqrt(q*q+S*S)*Math.sin(Math.atan2(S,q)-H),ba=((A-J)*(A+J)*(N-O)-(J-+L)*(J+L)*(t-N)+C*C*(t-N)*(N-O)*(t-O))/(2*((A-J)*(N-O)-(J-L)*(t-N))),W=((A-J)*(J-L)*(A-L)/(C*C)+(J-L)*(t-N)*(t+N)-(A-J)*(N-O)*(N+O))/(2*((J-L)*(t-N)-(A-J)*(N-O))),R=A-ba,T=t-W;R=Math.sqrt(R*R+T*T*C*C);C=R/C;H=180*H/Math.PI;b=Math.round(100*b)/100;n=Math.round(100*n)/100;R=Math.round(100*R/k*100)/100;C=Math.round(100*C/f*100)/100;H=Math.round(100*H)/100;f=0<(K-I)*(S-M)-(Q-M)*(q-I)?"0":"1";k="0";g.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ba,W,A,t,J,N,L,O)&&(k="1");d.setLastX(b);d.setLastY(n);return'<arc rx="'++(new String(R)).toString()+'" ry="'+(new String(C)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(n)).toString()+'" x-axis-rotation="'+(new String(H)).toString()+'" large-arc-flag="'+k+'" sweep-flag="'+f+'"/>'}return""};a.prototype.isReflexAngle=function(b,d,f,k,n,q,t,A){f-=b;k-=d;q-=d;n=t-b;A-=d;d=b=0;f=180*(Math.atan2(k,f)-Math.atan2(d,b))/Math.PI;n=180*(Math.atan2(q,n)-Math.atan2(d,b))/Math.PI;b=180*(Math.atan2(A,t)-Math.atan2(d,b))/Math.PI;f=(f-b)%360;n=(n-b)%360;180<f?f-=360:-180>f&&(f+=360);180<n?n-=360:-180>n&&(n+=360);return(0<f&&0>n||0>f&&0<n)&&180<Math.abs(f-n)?!0:!1};return a}(g.mxgraph.io.vsdx.geometry.Row);m.EllipticalArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;return b}__extends(a,c);a.prototype.handle=function(b,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.InfiniteLine=h;h.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,n=d.getHeight(),p=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/p*100)/100;k=Math.round(100*(100-100*k/n))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'++(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,n=d.getHeight(),q=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/q*100)/100;k=Math.round(100*(100-100*k/n))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.LineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.LineTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,n=d.getHeight(),p=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/p*100)/100;k=Math.round(100*(100-100*k/n))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,n=d.getHeight(),q=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/q*100)/100;k=Math.round(100*(100-100*k/n))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.MoveTo=h;h.__class="com.mxgraph.io.vsdx.geometry.MoveTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,p,x,A){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=p;b.d=x;b.formulaE=A;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=this.formulaE.split("NURBS(").join("");p=p.split(")").join("");-p=new a.Nurbs(this,p,k,f);if(2<=p.getSize()){var x=p.getX(0),A=p.getY(0),C=p.getX(1),J=p.getY(1);b=Math.round(100*b/k*100)/100;n=Math.round(100*(100-100*n/f))/100;x=Math.round(100*x)/100;A=Math.round(100*A)/100;C=Math.round(100*C)/100;J=Math.round(100*J)/100;d.setLastX(b);d.setLastY(n);if(3===p.getDegree()&&p.isOrderedByThree(this.getA())){d=[];f=[];k=[];A=p.getSize();for(x=0;x<A-1;x+=3)d.push(new mxPoint(p.getX(x),p.getY(x))),f.push(new mxPoint(p.getX(x+1),p.getY(x+1))),x<A-2?k.push(new mxPoint(p.getX(x+-2),p.getY(x+2))):k.push(new mxPoint(b,n));b="";for(x=0;x<d.length;x++)b+='<curve x1="'+d[x].x+'" y1="'+d[x].y+'" x2="'+f[x].x+'" y2="'+f[x].y+'" x3="'+k[x].x+'" y3="'+k[x].y+'"/>\n';return b}return'<curve x1="'+(new String(x)).toString()+'" y1="'+(new String(A)).toString()+'" x2="'+(new String(C)).toString()+'" y2="'+(new String(J)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(n)).toString()+'"/>'}}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.NURBSTo=h;h.__class="com.mxgraph.io.vsdx.geometry.NURBSTo";-(function(c){var a=function(){function b(d,f,k,n){this.__parent=d;this.nurbsValues=[];d=f.split(/\s*,\s*/).slice(0);for(f=0;f<d.length;f++)3<f&&0===f%4?this.nurbsValues.push(100*parseFloat(d[f])):3<f&&1===f%4?this.nurbsValues.push(100-100*parseFloat(d[f])):this.nurbsValues.push(parseFloat(d[f]))}b.prototype.isOrderedByThree=function(d){for(var f=0;f+2<this.getSize();f+=3){var k=Math.round(100*this.getKnot(f))/100,n=Math.round(100*this.getKnot(f+1))/100,p=Math.round(100*this.getKnot(f+2))/100;if(k!==-n||k!==p||n!==p)return!1}f=Math.round(10*this.getKnot(this.getSize()-2))/10;k=Math.round(10*this.getKnot(this.getSize()-1))/10;d=Math.round(10*d)/10;return f!==k||f!==d||k!==d?!1:!0};b.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};b.prototype.getKnotLast=function(){return this.nurbsValues[0]};b.prototype.getDegree=function(){return this.nurbsValues[1]};b.prototype.getXType=function(){return this.nurbsValues[2]};b.prototype.getYType=function(){return this.nurbsValues[3]};b.prototype.getX=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t,A){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;b.formulaE=A;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.formulaE.split("NURBS(").join("");q=q.split(")").join("");+q=new a.Nurbs(this,q,k,f);if(2<=q.getSize()){var t=q.getX(0),A=q.getY(0),C=q.getX(1),I=q.getY(1);b=Math.round(100*b/k*100)/100;n=Math.round(100*(100-100*n/f))/100;t=Math.round(100*t)/100;A=Math.round(100*A)/100;C=Math.round(100*C)/100;I=Math.round(100*I)/100;d.setLastX(b);d.setLastY(n);if(3===q.getDegree()&&q.isOrderedByThree(this.getA())){d=[];f=[];k=[];A=q.getSize();for(t=0;t<A-1;t+=3)d.push(new mxPoint(q.getX(t),q.getY(t))),f.push(new mxPoint(q.getX(t+1),q.getY(t+1))),t<A-2?k.push(new mxPoint(q.getX(t++2),q.getY(t+2))):k.push(new mxPoint(b,n));b="";for(t=0;t<d.length;t++)b+='<curve x1="'+d[t].x+'" y1="'+d[t].y+'" x2="'+f[t].x+'" y2="'+f[t].y+'" x3="'+k[t].x+'" y3="'+k[t].y+'"/>\n';return b}return'<curve x1="'+(new String(t)).toString()+'" y1="'+(new String(A)).toString()+'" x2="'+(new String(C)).toString()+'" y2="'+(new String(I)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(n)).toString()+'"/>'}}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.NURBSTo=h;h.__class="com.mxgraph.io.vsdx.geometry.NURBSTo";+(function(c){var a=function(){function b(d,f,k,n){this.__parent=d;this.nurbsValues=[];d=f.split(/\s*,\s*/).slice(0);for(f=0;f<d.length;f++)3<f&&0===f%4?this.nurbsValues.push(100*parseFloat(d[f])):3<f&&1===f%4?this.nurbsValues.push(100-100*parseFloat(d[f])):this.nurbsValues.push(parseFloat(d[f]))}b.prototype.isOrderedByThree=function(d){for(var f=0;f+2<this.getSize();f+=3){var k=Math.round(100*this.getKnot(f))/100,n=Math.round(100*this.getKnot(f+1))/100,q=Math.round(100*this.getKnot(f+2))/100;if(k!==+n||k!==q||n!==q)return!1}f=Math.round(10*this.getKnot(this.getSize()-2))/10;k=Math.round(10*this.getKnot(this.getSize()-1))/10;d=Math.round(10*d)/10;return f!==k||f!==d||k!==d?!1:!0};b.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};b.prototype.getKnotLast=function(){return this.nurbsValues[0]};b.prototype.getDegree=function(){return this.nurbsValues[1]};b.prototype.getXType=function(){return this.nurbsValues[2]};b.prototype.getYType=function(){return this.nurbsValues[3]};b.prototype.getX=function(d){return this.nurbsValues[4*(d+1)]};b.prototype.getY=function(d){return this.nurbsValues[4*(d+1)+1]};b.prototype.getKnot=function(d){return this.nurbsValues[4*(d+1)+2]};b.prototype.getWeight=function(d){return this.nurbsValues[4*(d+1)+3]};return b}();c.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(h=m.NURBSTo||(m.NURBSTo={}))})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.formulaA=k;return b}__extends(a,c);a.prototype.handle=function(b,d){b="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var f=d.getHeight(),k=d.getWidth(),n=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.round(100*n/k*100)/100;p=Math.round(100*(100-100*p/f))/100;var x=this.formulaA.replace(RegExp("\\s",-"g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),"");var A=x&&x.equals?x.equals("inh"):"inh"===x;if(A)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});x=x.split(",").slice(0).slice(0);A=parseFloat(x.splice(0,1));parseFloat(x.splice(0,1));for(var C,J;0<x.length;)C=parseFloat(x.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),-J=parseFloat(x.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===A&&(C=100*C/k),1===A&&(J=100*J/f),J=100-J,C=Math.round(100*C)/100,J=Math.round(100*J)/100,d.setLastX(C),d.setLastY(J),b+='<line x="'+(new String(C)).toString()+'" y="'+(new String(J)).toString()+'"/>';b+='<line x="'+(new String(n)).toString()+'" y="'+(new String(p)).toString()+'"/>';d.getLastMoveX()===n&&d.getLastMoveY()===p&&(b+="<close/>")}return b};return a}(g.mxgraph.io.vsdx.geometry.Row);m.PolylineTo=h;h.__class=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.formulaA=k;return b}__extends(a,c);a.prototype.handle=function(b,d){b="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var f=d.getHeight(),k=d.getWidth(),n=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.round(100*n/k*100)/100;q=Math.round(100*(100-100*q/f))/100;var t=this.formulaA.replace(RegExp("\\s",+"g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),"");var A=t&&t.equals?t.equals("inh"):"inh"===t;if(A)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});t=t.split(",").slice(0).slice(0);A=parseFloat(t.splice(0,1));parseFloat(t.splice(0,1));for(var C,I;0<t.length;)C=parseFloat(t.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),+I=parseFloat(t.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===A&&(C=100*C/k),1===A&&(I=100*I/f),I=100-I,C=Math.round(100*C)/100,I=Math.round(100*I)/100,d.setLastX(C),d.setLastY(I),b+='<line x="'+(new String(C)).toString()+'" y="'+(new String(I)).toString()+'"/>';b+='<line x="'+(new String(n)).toString()+'" y="'+(new String(q)).toString()+'"/>';d.getLastMoveX()===n&&d.getLastMoveY()===q&&(b+="<close/>")}return b};return a}(g.mxgraph.io.vsdx.geometry.Row);m.PolylineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.PolylineTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,p,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=p;b.d=x;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b,p=100*this.c,x=100-100*this.d;b=Math.round(100*b)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;p=Math.round(100*-p)/100;x=Math.round(100*x)/100;d.setLastX(b);d.setLastY(f);return'<curve x1="'+(new String(k)).toString()+'" y1="'+(new String(n)).toString()+'" x2="'+(new String(p)).toString()+'" y2="'+(new String(x)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelCubBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b,q=100*this.c,t=100-100*this.d;b=Math.round(100*b)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;q=Math.round(100*+q)/100;t=Math.round(100*t)/100;d.setLastX(b);d.setLastY(f);return'<curve x1="'+(new String(k)).toString()+'" y1="'+(new String(n)).toString()+'" x2="'+(new String(q)).toString()+'" y2="'+(new String(t)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelCubBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelLineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelLineTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));@@ -1404,7 +1404,7 @@ m.RelMoveTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelMoveTo"})(B.geometry||((new String(n)).toString()+'" x2="'+(new String(b)).toString()+'" y2="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelQuadBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelQuadBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.a=k;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a){b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();b=Math.round(100*b)/100;f=Math.round(100*(100-f))/100;d.setLastX(b);d.setLastY(f)}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.SplineKnot=h;h.__class="com.mxgraph.io.vsdx.geometry.SplineKnot"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,p,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=p;b.d=x;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){d.getHeight();d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d.setLastKnot(this.c);b=Math.round(100*b)/+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){d.getHeight();d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d.setLastKnot(this.c);b=Math.round(100*b)/100;f=Math.round(100*(100-f))/100;d.getLastX();d.getLastY();d.setLastX(b);d.setLastY(f);return"<curve "}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.SplineStart=h;h.__class="com.mxgraph.io.vsdx.geometry.SplineStart"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.cellElements={};this.sections={};this.styleParents={};this.style=this.pm=this.Id=this.shape=null;this.shape=c;this.pm=a.getPropertiesManager();c=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);try{this.Id=null!=c&&0!==c.length?parseFloat(c):-1}catch(b){this.Id=-1}this.cacheCells(a);this.stylesheetRefs(a)}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0(),h.__static_initializer_1())};h.styleTypes_$LI$=function(){h.__static_initialize();null==h.styleTypes&&(h.styleTypes={});return h.styleTypes};h.__static_initializer_0=function(){h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND_TRANS]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;@@ -1419,8 +1419,8 @@ if(null!=a)for(a=a.item(0);null!=a;)null!=a&&1==a.nodeType&&this.parseShapeElem(h.prototype.getValue=function(c,a){return null!=c?c.getAttribute("V")||"":a};h.prototype.getValueAsDouble=function(c,a){if(null!=c){var b=c.getAttribute("V");if(null!=b){if(function(f,k){return f&&f.equals?f.equals(k):f===k}(b,"Themed"))return 0;try{var d=parseFloat(b);(function(f,k){return f&&f.equals?f.equals(k):f===k})(c.getAttribute("U"),"PT")&&(d*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());return Math.round(100*d)/100}catch(f){}}}return a};h.prototype.getScreenNumericalValue$org_w3c_dom_Element$double=function(c,a){if(null!=c&&(c=c.getAttribute("V"),null!=c))try{var b=parseFloat(c);return this.getScreenNumericalValue$double(b)}catch(d){}return a};h.prototype.getScreenNumericalValue=function(c,a){if((null==c||1!=c.nodeType)&&null!==c||"number"!==typeof a&&null!==a){if("number"!==typeof c&&null!==c||void 0!==a)throw Error("invalid overload");return this.getScreenNumericalValue$double(c)}return this.getScreenNumericalValue$org_w3c_dom_Element$double(c,a)};h.prototype.getScreenNumericalValue$double=function(c){return c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()};h.prototype.getAttribute=function(c,a,b){var d=this.cellElements;c=d[c]?d[c]:null;null!=c&&(b=c.getAttribute(a)||"");return b};h.prototype.getChildValues=function(c,a){var b={};for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType){var d=c,f;if((f=d.nodeName)&&f.equals?f.equals("Cell"):"Cell"===f){f=d.getAttribute("N")||"";var k=d.getAttribute("V")||""}else f=d.nodeName,k=d.textContent;if(null!=a){var n=a[f]?a[f]:null;null!=-n&&(k=d.getAttribute(n)||"")}b[f]=k}c=c.nextSibling}return b};h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(c,a,b){var d=function(p,x){return p[x]?p[x]:null}(this.sections,b),f=null,k=!1;null!=d&&(f=d.getIndexedCell(a,c));if(null!=f){d=f.getAttribute("F");var n=f.getAttribute("V");if(null!=d&&null!=n)if(function(p,x){return p&&p.equals?p.equals(x):p===x}(d,"Inh")&&function(p,x){return p&&p.equals?p.equals(x):p===x}(n,"Themed"))k=!0;else if(function(p,x){return p&&-p.equals?p.equals(x):p===x}(d,"THEMEVAL()")&&function(p,x){return p&&p.equals?p.equals(x):p===x}(n,"Themed")&&null!=this.style){if(function(p,x){return p&&p.equals?p.equals(x):p===x}(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,c))return f;d=this.style.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b);if(null!=d)return d}}if(null==f||k)if(k=function(p,x){return p[x]?p[x]:null}(h.styleTypes_$LI$(),b),k=function(p,x){return p[x]?p[x]:null}(this.styleParents,k),null!=k&&(c=k.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,+n&&(k=d.getAttribute(n)||"")}b[f]=k}c=c.nextSibling}return b};h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(c,a,b){var d=function(q,t){return q[t]?q[t]:null}(this.sections,b),f=null,k=!1;null!=d&&(f=d.getIndexedCell(a,c));if(null!=f){d=f.getAttribute("F");var n=f.getAttribute("V");if(null!=d&&null!=n)if(function(q,t){return q&&q.equals?q.equals(t):q===t}(d,"Inh")&&function(q,t){return q&&q.equals?q.equals(t):q===t}(n,"Themed"))k=!0;else if(function(q,t){return q&&+q.equals?q.equals(t):q===t}(d,"THEMEVAL()")&&function(q,t){return q&&q.equals?q.equals(t):q===t}(n,"Themed")&&null!=this.style){if(function(q,t){return q&&q.equals?q.equals(t):q===t}(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,c))return f;d=this.style.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b);if(null!=d)return d}}if(null==f||k)if(k=function(q,t){return q[t]?q[t]:null}(h.styleTypes_$LI$(),b),k=function(q,t){return q[t]?q[t]:null}(this.styleParents,k),null!=k&&(c=k.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b),null!=c))return c;return f};h.prototype.getCellElement=function(c,a,b){if("string"!==typeof c&&null!==c||"string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b){if("string"!==typeof c&&null!==c||void 0!==a||void 0!==b)throw Error("invalid overload");return this.getCellElement$java_lang_String(c)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b)};h.prototype.getCellElement$java_lang_String=function(c){var a=function(k,n){return k[n]?k[n]:null}(this.cellElements,c),b=!1;if(null!=a){var d=a.getAttribute("F"),f=a.getAttribute("V");if(null!=d&&null!=f)if(function(k,n){return k&&k.equals?k.equals(n):k===n}(d,"Inh")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed"))b=!0;else if(-1!=d.indexOf("THEMEVAL()")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed")&&null!=this.style){if(function(k,n){return k&&k.equals?k.equals(n):k===n}("FillForegnd",c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW,@@ -1455,161 +1455,161 @@ c.push(h.DASH);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.pus(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b){var d=c.call(this)||this;d.hexVal=null;d.hexVal=b;d.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(b);return d}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SrgbClr=h;h.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d){var f=c.call(this)||this;f.lastClr=null;f.val=b;f.lastClr=d;if(null==d)switch(b){case "windowText":d="000000";break;case "window":d="FFFFFF";break;default:d="FFFFFF"}f.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(d);return f}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SysClr=h;h.__class="com.mxgraph.io.vsdx.theme.SysClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,p,x){return c.call(this,b,d,f,k,n,p,x)||this}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=d.getWidth()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=f;this.a*=k;this.b*=f}return c.prototype.handle.call(this,+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){return c.call(this,b,d,f,k,n,q,t)||this}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=d.getWidth()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=f;this.a*=k;this.b*=f}return c.prototype.handle.call(this,b,d)};return a}(g.mxgraph.io.vsdx.geometry.EllipticalArcTo);m.RelEllipticalArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelEllipticalArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b){var d=this;d.text=null;d.fields=null;d.geom=null;d.imageData=null;d.theme=null;d.quickStyleVals=null;d=h.call(this,a,b)||this;d.paragraphs=null;d.styleMap={};d.width=0;d.height=0;d.rotation=0;d.lastX=0;d.lastY=0;d.lastMoveX=0;d.lastMoveY=0;d.lastKnot=-1;d.geomList=null;d.geomListProcessed=!1;d.themeVariant=0;d.cp="0";d.pp="0";d.tp="0";d.fld="0";d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0);d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return d}__extends(c,h);c.UNICODE_LINE_SEP_$LI$=function(){null==c.UNICODE_LINE_SEP&&(c.ERROR_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tIENyZWF0ZWQgd2l0aCBJbmtzY2FwZSAoaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvKSAtLT4NCjxzdmcNCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyINCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIg0KICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiDQogICB3aWR0aD0iMjUwIg0KICAgaGVpZ2h0PSIyNTAiDQogICBpZD0ic3ZnMzMxOSINCiAgIHNvZGlwb2RpOnZlcnNpb249IjAuMzIiDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjQ2Ig0KICAgdmVyc2lvbj0iMS4wIg0KICAgc29kaXBvZGk6ZG9jbmFtZT0ibm9waG90b19pLnN2ZyINCiAgIGlua3NjYXBlOm91dHB1dF9leHRlbnNpb249Im9yZy5pbmtzY2FwZS5vdXRwdXQuc3ZnLmlua3NjYXBlIj4NCiAgPGRlZnMNCiAgICAgaWQ9ImRlZnMzMzIxIj4NCiAgICA8aW5rc2NhcGU6cGVyc3BlY3RpdmUNCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIg0KICAgICAgIGlua3NjYXBlOnZwX3g9IjAgOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIzNzIuMDQ3MjQgOiAzNTAuNzg3MzkgOiAxIg0KICAgICAgIGlkPSJwZXJzcGVjdGl2ZTMzMjciIC8+DQogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlDQogICAgICAgaWQ9InBlcnNwZWN0aXZlMzM0MiINCiAgICAgICBpbmtzY2FwZTpwZXJzcDNkLW9yaWdpbj0iMzcyLjA0NzI0IDogMzUwLjc4NzM5IDogMSINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF94PSIwIDogNTI2LjE4MTA5IDogMSINCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIiAvPg0KICA8L2RlZnM+DQogIDxzb2RpcG9kaTpuYW1lZHZpZXcNCiAgICAgaWQ9ImJhc2UiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCINCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAuMCINCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiINCiAgICAgaW5rc2NhcGU6em9vbT0iMi4yNDI5NDI3Ig0KICAgICBpbmtzY2FwZTpjeD0iMTIxLjk3NjQ4Ig0KICAgICBpbmtzY2FwZTpjeT0iMTIyLjQ0MTk4Ig0KICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiDQogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9ImxheWVyMSINCiAgICAgc2hvd2dyaWQ9ImZhbHNlIg0KICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE2NjQiDQogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijg0NCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii0zIg0KICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTE4IiAvPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhMzMyNCI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgICAgPGRjOnRpdGxlPkZvdG9ncmFmaWVydmVyYm90PC9kYzp0aXRsZT4NCiAgICAgICAgPGRjOmRhdGU+MjAwOC0wNi0yOTwvZGM6ZGF0ZT4NCiAgICAgICAgPGRjOmNyZWF0b3I+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnJzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOmNyZWF0b3I+DQogICAgICAgIDxkYzpyaWdodHM+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnN0ZW4gU2tvbXA8L2RjOnRpdGxlPg0KICAgICAgICAgIDwvY2M6QWdlbnQ+DQogICAgICAgIDwvZGM6cmlnaHRzPg0KICAgICAgICA8ZGM6cHVibGlzaGVyPg0KICAgICAgICAgIDxjYzpBZ2VudD4NCiAgICAgICAgICAgIDxkYzp0aXRsZT5Ub3JzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOnB1Ymxpc2hlcj4NCiAgICAgICAgPGRjOmxhbmd1YWdlPmRlX0RFPC9kYzpsYW5ndWFnZT4NCiAgICAgICAgPGRjOnN1YmplY3Q+DQogICAgICAgICAgPHJkZjpCYWc+DQogICAgICAgICAgICA8cmRmOmxpPlBpa3RvZ3JhbW07IEZvdG9ncmFmaWVydmVyYm90PC9yZGY6bGk+DQogICAgICAgICAgPC9yZGY6QmFnPg0KICAgICAgICA8L2RjOnN1YmplY3Q+DQogICAgICAgIDxkYzpkZXNjcmlwdGlvbj5Gb3RvZ3JhZmllcnZlcmJvdCBhbHMgUGlrdG9ncmFtbSA8L2RjOmRlc2NyaXB0aW9uPg0KICAgICAgICA8Y2M6bGljZW5zZQ0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iIC8+DQogICAgICA8L2NjOldvcms+DQogICAgICA8Y2M6TGljZW5zZQ0KICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIj4NCiAgICAgICAgPGNjOnBlcm1pdHMNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNSZXByb2R1Y3Rpb24iIC8+DQogICAgICAgIDxjYzpwZXJtaXRzDQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIiAvPg0KICAgICAgICA8Y2M6cGVybWl0cw0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI0Rlcml2YXRpdmVXb3JrcyIgLz4NCiAgICAgIDwvY2M6TGljZW5zZT4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlua3NjYXBlOmxhYmVsPSJFYmVuZSAxIg0KICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIg0KICAgICBpZD0ibGF5ZXIxIj4NCiAgICA8cGF0aA0KICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjEiDQogICAgICAgZD0iTSAxNjQuNTMxMjUgNjIuNjg3NSBDIDE2Mi43OTExNSA2Mi42ODc1MDEgMTYxLjM3NSA2NC4wNzI0MTYgMTYxLjM3NSA2NS44MTI1IEwgMTYxLjM3NSA2OC43NSBMIDM4LjM3NSA2OC43NSBDIDM1LjA5MjI5OCA2OC43NDk5OTkgMzIuNDY4NzUgNzEuMzczNTQ4IDMyLjQ2ODc1IDc0LjY1NjI1IEwgMzIuNDY4NzUgMTgxLjM3NSBDIDMyLjQ2ODc1IDE4NC42NTc3IDM1LjA5MjMwNyAxODcuMzEyNTEgMzguMzc1IDE4Ny4zMTI1IEwgMjExLjYyNSAxODcuMzEyNSBDIDIxNC45MDc2OSAxODcuMzEyNSAyMTcuNTMxMjcgMTg0LjY1NzcgMjE3LjUzMTI1IDE4MS4zNzUgTCAyMTcuNTMxMjUgNzQuNjU2MjUgQyAyMTcuNTMxMjUgNzEuMzczNTUxIDIxNC45MDc2OCA2OC43NSAyMTEuNjI1IDY4Ljc1IEwgMjAyLjA2MjUgNjguNzUgTCAyMDIuMDYyNSA2NS44MTI1IEMgMjAyLjA2MjUgNjQuMDcyNDEgMjAwLjY0NjM1IDYyLjY4NzUgMTk4LjkwNjI1IDYyLjY4NzUgTCAxNjQuNTMxMjUgNjIuNjg3NSB6IE0gNDYuODEyNSA3OCBMIDg4LjY1NjI1IDc4IEMgOTAuMzk2MzQyIDc4IDkxLjgxMjUgNzkuMzg0OTA3IDkxLjgxMjUgODEuMTI1IEwgOTEuODEyNSA5Ni4zMTI1IEMgOTEuODEyNSA5OC4wNTI1OTIgOTAuMzk2MzQzIDk5LjQzNzUgODguNjU2MjUgOTkuNDM3NSBMIDQ2LjgxMjUgOTkuNDM3NSBDIDQ1LjA3MjQwOCA5OS40Mzc1IDQzLjY4NzUgOTguMDUyNTkzIDQzLjY4NzUgOTYuMzEyNSBMIDQzLjY4NzUgODEuMTI1IEMgNDMuNjg3NSA3OS4zODQ5MDggNDUuMDcyNDA3IDc4IDQ2LjgxMjUgNzggeiBNIDE0NiA4OC4yMTg3NSBDIDE2Ny43MzQ3NSA4OC4yMTg3NTMgMTg1LjM3NSAxMDYuMTUwNzEgMTg1LjM3NSAxMjguMjUgQyAxODUuMzc0OTkgMTUwLjM0OTI4IDE2Ny43MzQ3NCAxNjguMjgxMjUgMTQ2IDE2OC4yODEyNSBDIDEyNC4yNjUyNyAxNjguMjgxMjYgMTA2LjYyNSAxNTAuMzQ5MjkgMTA2LjYyNSAxMjguMjUgQyAxMDYuNjI1IDEwNi4xNTA3MSAxMjQuMjY1MjYgODguMjE4NzUgMTQ2IDg4LjIxODc1IHogTSAxNDYgOTEuNzE4NzUgQyAxMjYuMTY1NTcgOTEuNzE4NzUgMTEwLjA2MjUgMTA4LjA4Mjg5IDExMC4wNjI1IDEyOC4yNSBDIDExMC4wNjI1IDE0OC40MTcxMSAxMjYuMTY1NTcgMTY0Ljc4MTI2IDE0NiAxNjQuNzgxMjUgQyAxNjUuODM0NDMgMTY0Ljc4MTI1IDE4MS45Mzc1IDE0OC40MTcxIDE4MS45Mzc1IDEyOC4yNSBDIDE4MS45Mzc1IDEwOC4wODI4OSAxNjUuODM0NDMgOTEuNzE4NzUgMTQ2IDkxLjcxODc1IHogTSAxNDYgOTYuNTkzNzUgQyAxNjMuMTc3NjggOTYuNTkzNzUyIDE3Ny4xMjUgMTEwLjc4NDIgMTc3LjEyNSAxMjguMjUgQyAxNzcuMTI0OTkgMTQ1LjcxNTggMTYzLjE3NzY5IDE1OS44NzUgMTQ2IDE1OS44NzUgQyAxMjguODIyMzEgMTU5Ljg3NSAxMTQuODc1IDE0NS43MTU4IDExNC44NzUgMTI4LjI1IEMgMTE0Ljg3NSAxMTAuNzg0MTkgMTI4LjgyMjMxIDk2LjU5Mzc1IDE0NiA5Ni41OTM3NSB6IE0gMTc2LjUgMTcyLjcxODc1IEwgMjA2LjE4NzUgMTcyLjcxODc1IEMgMjA3LjQyMTM4IDE3Mi43MTg3NSAyMDguNDA2MjUgMTczLjEyNzgzIDIwOC40MDYyNSAxNzMuNjI1IEwgMjA4LjQwNjI1IDE3Ny45Njg3NSBDIDIwOC40MDYyNSAxNzguNDY1OTIgMjA3LjQyMTM4IDE3OC44NDM3NSAyMDYuMTg3NSAxNzguODQzNzUgTCAxNzYuNSAxNzguODQzNzUgQyAxNzUuMjY2MTEgMTc4Ljg0Mzc1IDE3NC4yODEyNSAxNzguNDY1OTIgMTc0LjI4MTI1IDE3Ny45Njg3NSBMIDE3NC4yODEyNSAxNzMuNjI1IEMgMTc0LjI4MTI1IDE3My4xMjc4MyAxNzUuMjY2MTIgMTcyLjcxODc1IDE3Ni41IDE3Mi43MTg3NSB6ICINCiAgICAgICBpZD0icmVjdDMyMDkiIC8+DQogICAgPHBhdGgNCiAgICAgICBzdHlsZT0iZmlsbDojYzQyNjFkO2ZpbGwtb3BhY2l0eToxIg0KICAgICAgIGQ9Ik0gMjAgMCBDIDE4LjU1OTkzOCAwIDE3LjE2NDc0NyAwLjE1MDk4NjY2IDE1LjgxMjUgMC40Mzc1IEMgMTUuMjEwMjkxIDAuNTY1MTk1NzggMTQuNjExOTEzIDAuNzI2MjExMjYgMTQuMDMxMjUgMC45MDYyNSBDIDEzLjU1NDc3MyAxLjA1Mzk4NTIgMTMuMDg1MzQ5IDEuMjI0ODUzNiAxMi42MjUgMS40MDYyNSBDIDEyLjMyODc2NiAxLjUyMzA3MzkgMTIuMDM5MDMzIDEuNjUwOTE4MiAxMS43NSAxLjc4MTI1IEMgMTEuMzQ3Mjc4IDEuOTYyMzU5OCAxMC45NTA0MDYgMi4xMzc0MTY1IDEwLjU2MjUgMi4zNDM3NSBDIDEwLjUyMTU1NSAyLjM2NTU2ODggMTAuNDc4MjczIDIuMzg0MTU1NSAxMC40Mzc1IDIuNDA2MjUgQyAxMC40MTY5MzQgMi40MTczNzU0IDEwLjM5NTUyMiAyLjQyNjMwNDkgMTAuMzc1IDIuNDM3NSBDIDkuODMyNjg2MSAyLjczMzM0NDYgOS4zMjI2NDQ4IDMuMDYzMjQ1MiA4LjgxMjUgMy40MDYyNSBDIDguMjgzMTIyMSAzLjc2MjE4NjUgNy43NzI3NzI4IDQuMTU4OTIwOSA3LjI4MTI1IDQuNTYyNSBDIDcuMjc1MDU1IDQuNTY3NTg2NiA3LjI1NjE4ODggNC41NTc0MDYxIDcuMjUgNC41NjI1IEMgNy4yMzg1NDc5IDQuNTcxOTQzNCA3LjIzMDE4MDYgNC41ODQyODE2IDcuMjE4NzUgNC41OTM3NSBDIDcuMTA0NzM1MiA0LjY4ODAxNTkgNi45ODY4NTA3IDQuNzc4MjY4NyA2Ljg3NSA0Ljg3NSBDIDYuNTE1NzAyMSA1LjE4NjQyNjQgNi4xNzk3OTA5IDUuNTA3NzA5MSA1Ljg0Mzc1IDUuODQzNzUgQyA1LjQwNDQwMjUgNi4yODE4MDc4IDQuOTkwNzQ0OSA2Ljc0MTM1NTQgNC41OTM3NSA3LjIxODc1IEMgNC41NzkwMDg2IDcuMjM2NTQ2MiA0LjU3NzE4MDYgNy4yNjM0MDE1IDQuNTYyNSA3LjI4MTI1IEMgMy43Njc0ODk4IDguMjQzOTE4MSAzLjA0MjI3MjEgOS4yNzE4NzA1IDIuNDM3NSAxMC4zNzUgQyAyLjQyNjIyMzIgMTAuMzk1NjM1IDIuNDE3NDU2MSAxMC40MTY4MiAyLjQwNjI1IDEwLjQzNzUgQyAyLjEwODM5MDggMTAuOTg1MzQ4IDEuODQwMjIzMyAxMS41NDcyMTQgMS41OTM3NSAxMi4xMjUgQyAxLjU3NTU4NjUgMTIuMTY3NjY1IDEuNTQ5MTI1NSAxMi4yMDcxODIgMS41MzEyNSAxMi4yNSBDIDEuMjg3NzEzMSAxMi44MzI0MzMgMS4wOTQ2NzU0IDEzLjQyMTgyMiAwLjkwNjI1IDE0LjAzMTI1IEMgMC43Mjk2MzAxNCAxNC42MDI0OTUgMC41NjMwOTYzNCAxNS4xODg4MjggMC40Mzc1IDE1Ljc4MTI1IEMgMC4xNDY5MTQwNCAxNy4xNDI1NzggLTQuMzkwNjEzM2UtMTggMTguNTQ5NDY2IDAgMjAgTCAwIDIzMCBDIDAgMjQxLjA4IDguOTIgMjUwIDIwIDI1MCBMIDIzMCAyNTAgQyAyMzEuNDQwMDYgMjUwIDIzMi44MzUyNSAyNDkuODQ5MDEgMjM0LjE4NzUgMjQ5LjU2MjUgQyAyMzQuNzg5MDMgMjQ5LjQzNDk3IDIzNS4zODg2NiAyNDkuMjczODEgMjM1Ljk2ODc1IDI0OS4wOTM3NSBDIDIzNi40NDQ3NiAyNDguOTQ2IDIzNi45MTUwNSAyNDguNzc1MjYgMjM3LjM3NSAyNDguNTkzNzUgQyAyMzcuNjcxMjMgMjQ4LjQ3NjkzIDIzNy45NjA5NyAyNDguMzQ5MDggMjM4LjI1IDI0OC4yMTg3NSBDIDIzOC4yNzk4MSAyNDguMjA1MzEgMjM4LjMxNDAyIDI0OC4yMDEwOSAyMzguMzQzNzUgMjQ4LjE4NzUgQyAyMzguNzU4MzYgMjQ3Ljk5ODMgMjM5LjE2Mzc0IDI0Ny44MDk4MSAyMzkuNTYyNSAyNDcuNTkzNzUgQyAyMzkuNTgzMTggMjQ3LjU4MjU0IDIzOS42MDQzNiAyNDcuNTczNzggMjM5LjYyNSAyNDcuNTYyNSBDIDI0MC4xNjkyNSAyNDcuMjY1MTIgMjQwLjY3NTU4IDI0Ni45Mzg3MyAyNDEuMTg3NSAyNDYuNTkzNzUgQyAyNDEuNjY4NzggMjQ2LjI2OTQxIDI0Mi4xNDM1OSAyNDUuOTI2MzkgMjQyLjU5Mzc1IDI0NS41NjI1IEMgMjQyLjY0NDc0IDI0NS41MjEyOCAyNDIuNjk5NDMgMjQ1LjQ3OTIxIDI0Mi43NSAyNDUuNDM3NSBDIDI0Mi44NzY1MSAyNDUuMzMzMTggMjQzLjAwMTE1IDI0NS4yMzIzNSAyNDMuMTI1IDI0NS4xMjUgQyAyNDMuNDgyNjUgMjQ0LjgxNTM4IDI0My44MjE1NSAyNDQuNDkwMTkgMjQ0LjE1NjI1IDI0NC4xNTYyNSBDIDI0NC40OTIyOSAyNDMuODIwMjEgMjQ0LjgxMzU3IDI0My40ODQzIDI0NS4xMjUgMjQzLjEyNSBDIDI0NS4yMzE2NyAyNDMuMDAyMzQgMjQ1LjMzMzgxIDI0Mi44NzUyNyAyNDUuNDM3NSAyNDIuNzUgQyAyNDUuNDQyNzYgMjQyLjc0MzYyIDI0NS40MzIyNSAyNDIuNzI1MTMgMjQ1LjQzNzUgMjQyLjcxODc1IEMgMjQ1Ljg0MjQ5IDI0Mi4yMjgzIDI0Ni4yMzY0IDI0MS43MTU3NiAyNDYuNTkzNzUgMjQxLjE4NzUgQyAyNDYuOTM4MTIgMjQwLjY3ODQzIDI0Ny4yNjUzNiAyNDAuMTY2MjIgMjQ3LjU2MjUgMjM5LjYyNSBDIDI0Ny41NzM2MyAyMzkuNjA0NzIgMjQ3LjU4MjY4IDIzOS41ODI4MiAyNDcuNTkzNzUgMjM5LjU2MjUgQyAyNDcuODkxOTcgMjM5LjAxNDggMjQ4LjE1OTMxIDIzOC40NTIzOSAyNDguNDA2MjUgMjM3Ljg3NSBDIDI0OC40MTU1NCAyMzcuODUzMjggMjQ4LjQyODI5IDIzNy44MzQyNiAyNDguNDM3NSAyMzcuODEyNSBDIDI0OC40NDY0NCAyMzcuNzkxMjkgMjQ4LjQ1OTg4IDIzNy43NzEyNSAyNDguNDY4NzUgMjM3Ljc1IEMgMjQ4LjcwOTkyIDIzNy4xNzQ3NiAyNDguOTA2MjggMjM2LjU3MDA4IDI0OS4wOTM3NSAyMzUuOTY4NzUgQyAyNDkuMjczNzUgMjM1LjM5MTM3IDI0OS40MzQ2OCAyMzQuODE3NTQgMjQ5LjU2MjUgMjM0LjIxODc1IEMgMjQ5Ljg1MzA5IDIzMi44NTc0MiAyNTAgMjMxLjQ1MDUzIDI1MCAyMzAgTCAyNTAgMjAgQyAyNTAgOC45MiAyNDEuMDggLTMuMzUzNzk4N2UtMTcgMjMwIDAgTCAyMCAwIHogTSAzNC43ODEyNSAxOS40MDYyNSBMIDIyNS40Njg3NSAxOS40MDYyNSBDIDIyOC4zMDk0NiAxOS40MDYyNSAyMzAuNTkzNzUgMjEuNjkwNTQ0IDIzMC41OTM3NSAyNC41MzEyNSBMIDIzMC41OTM3NSAyMTUuMjUgTCAzNC43ODEyNSAxOS40MDYyNSB6IE0gMTkuNDA2MjUgMzQuNzUgTCAyMTUuMjE4NzUgMjMwLjU5Mzc1IEwgMjQuNTMxMjUgMjMwLjU5Mzc1IEMgMjEuNjkwNTQ0IDIzMC41OTM3NiAxOS40MDYyNSAyMjguMzA5NDYgMTkuNDA2MjUgMjI1LjQ2ODc1IEwgMTkuNDA2MjUgMzQuNzUgeiAiDQogICAgICAgaWQ9InBhdGgzMTk2IiAvPg0KICA8L2c+DQo8L3N2Zz4NCg==",c.UNICODE_LINE_SEP=String.fromCharCode(8232));return c.UNICODE_LINE_SEP};c.prototype.setThemeAndVariant=function(a,b){this.theme=a;this.themeVariant=b};c.prototype.getTheme=function(){null!=this.theme&&this.theme.setVariant(this.themeVariant);return this.theme};c.prototype.getQuickStyleVals=function(){return this.quickStyleVals};c.prototype.processGeomList=function(a){if(!this.geomListProcessed){this.geomList=new g.mxgraph.io.vsdx.mxVsdxGeometryList(a);if(null!=this.geom)for(a=0;a<this.geom.length;a++)this.geomList.addGeometry(this.geom[a]);-this.geomListProcessed=!0}};c.prototype.parseShapeElem=function(a,b){h.prototype.parseShapeElem.call(this,a,b);var d=a.nodeName;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"ForeignData")){d=function(A,C){for(A=A.firstChild;null!=A;){if(1==A.nodeType){var J=A;if("rel"==J.nodeName.toLowerCase()&&(J=J.getAttribute("r:id"),null!=J&&0!==J.length)){A=C.lastIndexOf("/");var M="",L="";try{M=C.substring(0,A),L=C.substring(A,C.length)}catch(Q){break}A=b.getRelationship(J,M+"/_rels"+L+".rels");-if(null!=A){C=A.getAttribute("Target")||"";J=A.getAttribute("Type");A=C.lastIndexOf("/");try{C=C.substring(A+1,C.length)}catch(Q){break}return{type:J,target:C}}break}}A=A.nextSibling}};var f=a.ownerDocument.vsdxFileName,k=a.getAttribute("ForeignType"),n=a.getAttribute("CompressionType")||"",p=null;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"Bitmap"))n=n.toLowerCase();else if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"MetaFile"))n="png";else if(function(A,C){return A&&A.equals?-A.equals(C):A===C}(k,"Enhanced Metafile")||function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"EnhMetaFile"))n="png";else if("Object"==k){if(p=d(a,f),0<p.type.indexOf("/oleObject"))if(n=b.getRelationship("rId1","visio/embeddings/_rels/"+p.target+".rels"),null!=n){p=n.getAttribute("Target");k=n.getAttribute("Type");try{var x=p.lastIndexOf("/");p=p.substring(x+1,p.length)}catch(A){return}n="png";p={type:k,target:p}}else return}else return;null==p&&(p=d(a,f));k=p.type;p=p.target;null!=k&&function(A,-C){var J=A.length-C.length;A=A.indexOf(C,J);return-1!==A&&A===J}(k,"image")&&(this.imageData={},(a=b.getMedia(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+p))?(this.imageData.iData=a,function(A,C){var J=A.length-C.length;A=A.indexOf(C,J);return-1!==A&&A===J}(p.toLowerCase(),".bmp")&&(n="jpg"),this.imageData.iType=n):(this.imageData.iData=c.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,g.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=-a)};c.prototype.parseSection=function(a){var b=a.getAttribute("N");if(function(J,M){return J&&J.equals?J.equals(M):J===M}(b,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(J,M){return J&&J.equals?J.equals(M):J===M}(b,"Field")){a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var d=0;d<a.length;d++){b=a[d];var f=b.getAttribute("IX")||"";if(0!==f.length)if(null==this.fields&&(this.fields={}),function(J,M){return J&&J.equals?J.equals(M):J===M}("1",-b.getAttribute("Del")))this.fields[f]="";else{for(var k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell"),n="",p="",x=0;x<k.length;x++){var A=k[x];b=A.getAttribute("N");A=A.getAttribute("V")||A.textContent||"";switch(b){case "Value":n=A;break;case "Format":p=A}}if("esc(0)"==p)this.fields[f]=n;else if(0!==n.length){try{var C=isNaN(n)?new Date(n):new Date(c.VSDX_START_TIME+Math.floor(864E5*parseFloat(n)));p="c"==p?0==C.getHours()+C.getMinutes()+C.getSeconds()+C.getMilliseconds()?"m/d/yyyy":-"m/d/yyyy h:MM:ss tt":"ddddd"==p?"m/d/yyyy":"dddddd"==p?"dddd, mmmm dd, yyyy":"C"==p?"dddd, mmmm dd, yyyy h:MM:ss tt":"T"==p?"h:MM:ss tt":p.replace(/am\/pm/g,"tt").replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M");n=Graph.prototype.formatDate(C,"UTC:"+p.replace(RegExp("\\{|\\}","g"),""))}catch(J){}this.fields[f]=n}}}}else h.prototype.parseSection.call(this,a)};c.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};c.prototype.getText=function(){return null!=+this.geomListProcessed=!0}};c.prototype.parseShapeElem=function(a,b){h.prototype.parseShapeElem.call(this,a,b);var d=a.nodeName;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"ForeignData")){d=function(A,C){for(A=A.firstChild;null!=A;){if(1==A.nodeType){var I=A;if("rel"==I.nodeName.toLowerCase()&&(I=I.getAttribute("r:id"),null!=I&&0!==I.length)){A=C.lastIndexOf("/");var M="",K="";try{M=C.substring(0,A),K=C.substring(A,C.length)}catch(Q){break}A=b.getRelationship(I,M+"/_rels"+K+".rels");+if(null!=A){C=A.getAttribute("Target")||"";I=A.getAttribute("Type");A=C.lastIndexOf("/");try{C=C.substring(A+1,C.length)}catch(Q){break}return{type:I,target:C}}break}}A=A.nextSibling}};var f=a.ownerDocument.vsdxFileName,k=a.getAttribute("ForeignType"),n=a.getAttribute("CompressionType")||"",q=null;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"Bitmap"))n=n.toLowerCase();else if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"MetaFile"))n="png";else if(function(A,C){return A&&A.equals?+A.equals(C):A===C}(k,"Enhanced Metafile")||function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"EnhMetaFile"))n="png";else if("Object"==k){if(q=d(a,f),0<q.type.indexOf("/oleObject"))if(n=b.getRelationship("rId1","visio/embeddings/_rels/"+q.target+".rels"),null!=n){q=n.getAttribute("Target");k=n.getAttribute("Type");try{var t=q.lastIndexOf("/");q=q.substring(t+1,q.length)}catch(A){return}n="png";q={type:k,target:q}}else return}else return;null==q&&(q=d(a,f));k=q.type;q=q.target;null!=k&&function(A,+C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(k,"image")&&(this.imageData={},(a=b.getMedia(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+q))?(this.imageData.iData=a,function(A,C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(q.toLowerCase(),".bmp")&&(n="jpg"),this.imageData.iType=n):(this.imageData.iData=c.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,g.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=+a)};c.prototype.parseSection=function(a){var b=a.getAttribute("N");if(function(I,M){return I&&I.equals?I.equals(M):I===M}(b,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(I,M){return I&&I.equals?I.equals(M):I===M}(b,"Field")){a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var d=0;d<a.length;d++){b=a[d];var f=b.getAttribute("IX")||"";if(0!==f.length)if(null==this.fields&&(this.fields={}),function(I,M){return I&&I.equals?I.equals(M):I===M}("1",+b.getAttribute("Del")))this.fields[f]="";else{for(var k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell"),n="",q="",t=0;t<k.length;t++){var A=k[t];b=A.getAttribute("N");A=A.getAttribute("V")||A.textContent||"";switch(b){case "Value":n=A;break;case "Format":q=A}}if("esc(0)"==q)this.fields[f]=n;else if(0!==n.length){try{var C=isNaN(n)?new Date(n):new Date(c.VSDX_START_TIME+Math.floor(864E5*parseFloat(n)));q="c"==q?0==C.getHours()+C.getMinutes()+C.getSeconds()+C.getMilliseconds()?"m/d/yyyy":+"m/d/yyyy h:MM:ss tt":"ddddd"==q?"m/d/yyyy":"dddddd"==q?"dddd, mmmm dd, yyyy":"C"==q?"dddd, mmmm dd, yyyy h:MM:ss tt":"T"==q?"h:MM:ss tt":q.replace(/am\/pm/g,"tt").replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M");n=Graph.prototype.formatDate(C,"UTC:"+q.replace(RegExp("\\{|\\}","g"),""))}catch(I){}this.fields[f]=n}}}}else h.prototype.parseSection.call(this,a)};c.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};c.prototype.getText=function(){return null!=this.text?this.text.textContent:null};c.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};c.prototype.getWidth=function(){if(1>this.width&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.width=Math.max(this.childShapes.entries[a].value.width,this.width)}catch(b){}return 0===this.width&&0<this.height?1:this.width};c.prototype.getHeight=function(){if(1>this.height&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.height=Math.max(this.childShapes.entries[a].value.height,this.height)}catch(b){}return 0===this.height&&0<this.width?1:this.height};c.prototype.getRotation=function(){return this.rotation};c.prototype.getStyleMap=function(){return this.styleMap};c.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};c.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};c.prototype.getPPList=function(a){var b=null;""!=a&&(a=this.getBullet(a),"0"!=a&&(b='<ul style="margin: 0;list-style-type: '+("4"==a?"square":"disc")+'">'));return b};c.prototype.getTextParagraphFormated=function(a){var b="",d={};d["text-align"]=this.getHorizontalAlign(this.pp,!0);d["margin-left"]=this.getIndentLeft(this.pp);d["margin-right"]=this.getIndentRight(this.pp);d["margin-top"]=this.getSpBefore(this.pp)+"px";d["margin-bottom"]=this.getSpAfter(this.pp)+"px";d["text-indent"]=this.getIndentFirst(this.pp);d["vertical-align"]=this.getAlignVertical();d.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,-d)};c.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",d="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",k="direction:"+this.getRtlText(this.cp)+";",n="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",p="line-height:"+this.getSpcLine(this.pp),x=";opacity:"+this.getTextOpacity(this.cp),A=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(J,M){return J&&J.equals?J.equals(M):-J===M})(C,"1")?a=a.toUpperCase():function(J,M){return J&&J.equals?J.equals(M):J===M}(C,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(J,M){return J&&J.equals?J.equals(M):J===M})(A,"1")?a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(J,M){return J&&J.equals?J.equals(M):J===M}(A,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,-"i"):a;a=this.isUnderline(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return'<font style="'+d+f+b+k+n+p+x+'">'+a+"</font>"};c.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"0")?a="ltr":function(b,d){return b&&b.equals?b.equals(d):+d)};c.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",d="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",k="direction:"+this.getRtlText(this.cp)+";",n="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",q="line-height:"+this.getSpcLine(this.pp),t=";opacity:"+this.getTextOpacity(this.cp),A=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(I,M){return I&&I.equals?I.equals(M):+I===M})(C,"1")?a=a.toUpperCase():function(I,M){return I&&I.equals?I.equals(M):I===M}(C,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(I,M){return I&&I.equals?I.equals(M):I===M})(A,"1")?a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(I,M){return I&&I.equals?I.equals(M):I===M}(A,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,+"i"):a;a=this.isUnderline(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return'<font style="'+d+f+b+k+n+q+t+'">'+a+"</font>"};c.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"0")?a="ltr":function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1")&&(a="rtl");return a};c.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0<a?a*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),b=!0);return(new String(a)).toString()+(b?"%":"px")};c.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};c.prototype.insertAttributes=function(a,b){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),f=a.substring(d);a=a.substring(0,d);b=' style="'+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return a+b+f}return a};c.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"0")?a="ltr":function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1")&&(a="rtl");return a};c.prototype.isBold=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};c.prototype.isItalic=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=2===(parseInt(a)&2));return b};c.prototype.isUnderline=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=4===(parseInt(a)&4));return b};c.prototype.isSmallCaps=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=8===(parseInt(a)&8));return b};c.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getValue(a,"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(new String(a)).toString());return b};c.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.round(100*a)/100};c.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,b=parseInt(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),"1"));0===b?a=mxConstants.ALIGN_TOP:2===b&&(a=mxConstants.ALIGN_BOTTOM);return a};c.prototype.getGeomList=function(){return this.geomList};c.prototype.getLastX=function(){return this.lastX};c.prototype.getLastY=function(){return this.lastY};c.prototype.getLastMoveX=function(){return this.lastMoveX};c.prototype.getLastMoveY=function(){return this.lastMoveY};c.prototype.getLastKnot=function(){return this.lastKnot};c.prototype.setLastX=function(a){this.lastX=a};c.prototype.setLastY=function(a){this.lastY=-a};c.prototype.setLastMoveX=function(a){this.lastMoveX=a};c.prototype.setLastMoveY=function(a){this.lastMoveY=a};c.prototype.setLastKnot=function(a){this.lastKnot=a};c.prototype.getConnections=function(){var a=[];if(this.sections&&this.sections.Connection)for(var b=this.getHeight(),d=this.getWidth(),f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Connection.elem,"Row"),k=0;k<f.length;k++){for(var n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f[k]),p,x,A=0;A<n.length;A++){var C=-n[A],J=C.getAttribute("N");C=this.getScreenNumericalValue$org_w3c_dom_Element$double(C,0);"X"==J?p=mxUtils.format(C/d):"Y"==J&&(x=mxUtils.format(1-C/b))}null!=p&&null!=x&&a.push({x:p,y:x})}0==a.length&&this.master&&this.master.masterShape&&(a=this.master.masterShape.getConnections());return a};return c}(g.mxgraph.io.vsdx.Style);m.VSDX_START_TIME=(new Date("1899-12-30T00:00:00Z")).getTime();B.Shape=m;m.__class="com.mxgraph.io.vsdx.Shape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=+a};c.prototype.setLastMoveX=function(a){this.lastMoveX=a};c.prototype.setLastMoveY=function(a){this.lastMoveY=a};c.prototype.setLastKnot=function(a){this.lastKnot=a};c.prototype.getConnections=function(){var a=[];if(this.sections&&this.sections.Connection)for(var b=this.getHeight(),d=this.getWidth(),f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Connection.elem,"Row"),k=0;k<f.length;k++){for(var n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f[k]),q,t,A=0;A<n.length;A++){var C=+n[A],I=C.getAttribute("N");C=this.getScreenNumericalValue$org_w3c_dom_Element$double(C,0);"X"==I?q=mxUtils.format(C/d):"Y"==I&&(t=mxUtils.format(1-C/b))}null!=q&&null!=t&&a.push({x:q,y:t})}0==a.length&&this.master&&this.master.masterShape&&(a=this.master.masterShape.getConnections());return a};return c}(g.mxgraph.io.vsdx.Style);m.VSDX_START_TIME=(new Date("1899-12-30T00:00:00Z")).getTime();B.Shape=m;m.__class="com.mxgraph.io.vsdx.Shape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b,d,f,k,n){var p=this;p.masterShape=null;p.master=null;p.parentHeight=0;p=h.call(this,b,n)||this;p.htmlLabels=!0;p.rootShape=p;p.shapeName=null;p.shapeIndex=0;p.vertex=!0;p.childShapes={};var x=p.getMasterId(),A=p.getShapeMasterId();p.master=null!=x?f[x]?f[x]:null:k;null!=p.master&&(p.masterShape=null==x&&null!=A?p.master.getSubShape(A):p.master.getMasterShape());f=p.getNameU();k=f.lastIndexOf(".");-1!==k&&(f=f.substring(0,-k));p.shapeName=f;b=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);null!=b&&0<b.length&&(b=b.item(0),p.childShapes=a.parseShapes(b,p.master,!1));b=p.calcRotation();p.rotation=100*b/100;p.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(p.getValue(p.getCellElement$java_lang_String("ThemeIndex"),"0")));n=function(C,J){null==C.entries&&(C.entries=[]);for(var M=0;M<C.entries.length;M++)if(null!=C.entries[M].key.equals&&C.entries[M].key.equals(J)||C.entries[M].key===-J)return C.entries[M].value;return null}(n.getThemes(),b);null==n&&"1"==urlParams.dev&&console.log("No theme found for index "+b);b=a.getCellIntValue("VariationColorIndex",0);p.setThemeAndVariant(n,b);f=function(C){null==C.entries&&(C.entries=[]);return C.entries}(p.childShapes);for(k=0;k<f.length;k++)x=f[k].getValue(),x.setRootShape(p),null==x.theme&&x.setThemeAndVariant(n,b);p.quickStyleVals=new g.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),-"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFillColor"),"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleLineMatrix"),-"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleShadowColor"),"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=p.masterShape?(p.masterShape.processGeomList(null),p.processGeomList(p.masterShape.getGeomList()),0===p.width&&(p.width=p.getScreenNumericalValue$org_w3c_dom_Element$double(p.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),-0)),0===p.height&&(p.height=p.getScreenNumericalValue$org_w3c_dom_Element$double(p.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0))):p.processGeomList(null);p.vertex=d||2!=a.connectsMap[p.Id]&&null!=p.childShapes&&!function(C){null==C.entries&&(C.entries=[]);return 0==C.entries.length}(p.childShapes)||null!=p.geomList&&(!p.geomList.isNoFill()||1<p.geomList.getGeoCount());p.layerMember=p.getValue(p.getCellElement$java_lang_String("LayerMember"));p.layerMember&&(p.layerMember=-p.layerMember.split(";"));return p}__extends(c,h);c.__static_initialize=function(){c.__static_initialized||(c.__static_initialized=!0,c.__static_initializer_0())};c.OFFSET_ARRAY_$LI$=function(){c.__static_initialize();null==c.OFFSET_ARRAY&&(c.OFFSET_ARRAY=["Organizational unit","Domain 3D"].slice(0).slice(0));return c.OFFSET_ARRAY};c.arrowSizes_$LI$=function(){c.__static_initialize();null==c.arrowSizes&&(c.arrowSizes=[2,3,5,7,9,22,45]);return c.arrowSizes};c.arrowTypes_$LI$=function(){c.__static_initialize();-return c.arrowTypes};c.__static_initializer_0=function(){c.arrowTypes={};(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),2,"blockThin");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=-0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),14,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),17,c.ARROW_NO_FILL_MARKER+-mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),20,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&-a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),22,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),23,"dash");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),24,"ERone");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),25,"ERmandOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),27,"ERmany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),29,"ERzeroToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),7,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),9,"openAsync");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),11,"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),15,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=-[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),16,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=-d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),18,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-19,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),21,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),26,"ERmandOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),31,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),32,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,-d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),33,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||-a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),34,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-35,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),36,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||-a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),37,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-38,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),39,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||-a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),40,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-41,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),42,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&-a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),43,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-44,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){c.__static_initialize();null==c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&-(c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};c.prototype.getShapeNode=function(a){var b=this.cellElements;b=b[a]?b[a]:null;return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};c.prototype.getTextLabel=function(a){var b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");b="1".equals?"1".equals(b):"1"===b;if(b)return null;b=this.getTextChildren();null==b&&null!=-this.masterShape&&(b=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=b)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(),this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),a||(this.styleMap.overflow="width"),this.getHtmlTextContent(b)}else return a=this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};c.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};c.prototype.initLabels=-function(a){this.paragraphs={};for(var b=null,d=null,f=null,k=0;k<a.length;k++){var n=a.item(k);switch(n.nodeName){case "cp":b=this.getIndex(n);break;case "tp":this.getIndex(n);break;case "pp":d=this.getIndex(n);break;case "fld":f=this.getIndex(n);break;case "#text":n=n.textContent;var p=this.paragraphs;p=p[d]?p[d]:null;null==p?(p=new g.mxgraph.io.vsdx.Paragraph(n,b,d,f),this.paragraphs[d]=p):p.addText(n,b,f)}}};c.prototype.createHybridLabel=function(a){var b=function(p,x){return p[x]?p[x]:null}(this.paragraphs,-a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=this.getIndentRight(a);this.styleMap[mxConstants.STYLE_SPACING_TOP]=this.getSpBefore(a);this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=this.getSpAfter(a);this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical();this.styleMap.fontColor=this.getTextColor(a);this.styleMap.fontSize=this.getTextSize(a);-this.styleMap.fontFamily=this.getTextFont(a);var d=this.isBold(a)?mxConstants.FONT_BOLD:0;d|=this.isItalic(a)?mxConstants.FONT_ITALIC:0;d|=this.isUnderline(a)?mxConstants.FONT_UNDERLINE:0;this.styleMap.fontStyle=(new String(d)).toString();a=b.numValues();d=null;for(var f=0;f<a;f++){var k=b.getValue(f);if(0===k.length&&null!=this.fields){var n=b.getField(f);null!=n&&(k=function(p,x){return p[x]?p[x]:null}(this.fields,n),null==k&&null!=this.masterShape&&null!=this.masterShape.fields&&(k=function(p,-x){return p[x]?p[x]:null}(this.masterShape.fields,n)))}null!=k&&(d=null==d?k:d+k)}return d};c.prototype.getHtmlTextContent=function(a){function b(A){A=g.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(A);n&&(A="<li>"+A,n=!1);k?(A=A.split("\n"),A[A.length-1]||(A.pop(),n=!0),A=A.join("</li><li>")):A=A.replace(RegExp("\n","g"),"<br/>").replace(new RegExp(g.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP,"g"),"<br/>");return this.getTextCharFormated(A)}var d="",f=!0,k=!1,n=!1;if(null!=a&&0<a.length)for(var p=0;p<a.length;p++){var x=-a.item(p);(function(A,C){return A&&A.equals?A.equals(C):A===C})(x.nodeName,"cp")?this.cp=this.getIndex(x):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"tp")?this.tp=this.getIndex(x):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"pp")?(this.pp=this.getIndex(x),k&&(d+="</li></ul>"),f?f=!1:d+="</p>",d+=this.getTextParagraphFormated("<p>"),x=this.getPPList(this.pp),n=k=null!=x,d+=k?x:""):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"fld")?(this.fld=-this.getIndex(x),x=null,null!=this.fields&&(x=function(A,C){return A[C]?A[C]:null}(this.fields,this.fld)),null==x&&null!=this.masterShape&&null!=this.masterShape.fields&&(x=function(A,C){return A[C]?A[C]:null}(this.masterShape.fields,this.fld)),null!=x&&(d+=b.call(this,x))):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"#text")&&(x=x.textContent,d+=b.call(this,x))}k&&(d+="</li></ul>");return g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(d+(f?"":"</p>"),"div","font-size: 1px")};c.prototype.isConnectorBigNameU=-function(a){return function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree single")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree single")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree tail")||function(b,d,f){void 0===f&&(f=0);-return b.substr(f,d.length)===d}(a,"60 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 2")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 1")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 3")||function(b,-d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Double flexi-arrow")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Fancy arrow")};c.prototype.isVertex=function(){return this.vertex};c.prototype.getOriginPoint=function(a,b){var d=this.getPinX(),f=this.getPinY(),k=this.getLocPinY(),n=this.getLocPinX(),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),-0);d-=n;a-=f+(x-k);return!b||k===x/2&&n===p/2||0===this.rotation?new mxPoint(d,a):(b=p/2-n,k-=x/2,x=Math.cos((360-this.rotation)*Math.PI/180),n=Math.sin((360-this.rotation)*Math.PI/180),new mxPoint(d+b-(b*x-k*n),b*n+k*x+a-k))};c.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),-0);return new mxPoint(0===a&&0<b?1:a,0===b&&0<a?1:b)};c.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_X),0)};c.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};c.prototype.getLocPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),-0)};c.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};c.prototype.getOpacity=function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};c.prototype.getGradient=function(){if(function(d,f){return d&&d.equals?d.equals(f):d===f}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),-"0"))){var a=function(d,f){return d[f]?d[f]:null}(this.sections,"FillGradient");if(null!=a){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem,"Row");a=this.getColor(a.getIndexedCell(b[b.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");25<=parseInt(b)?a=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):-(b=this.getTheme(),null!=b&&(b=b.getFillGraientColor(this.getQuickStyleVals()),null!=b&&(a=b.toHexStr())));return a};c.prototype.getGradientDirection=function(){var a="",b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"25")?a=mxConstants.DIRECTION_EAST:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"27")?a=mxConstants.DIRECTION_WEST:function(d,f){return d&&d.equals?d.equals(f):-d===f}(b,"28")?a=mxConstants.DIRECTION_SOUTH:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"30")&&(a=mxConstants.DIRECTION_NORTH);return a};c.prototype.calcRotation=function(){var a=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ANGLE),"0"));a=180*a/Math.PI;return 360-a%360*100/100};c.prototype.propagateRotation=function(a){this.rotation+=a;this.rotation%=360;this.rotation=100*this.rotation/100};c.prototype.getTopSpacing=function(){return 100*-(this.getTextTopMargin()/2-2.8)/100};c.prototype.getBottomSpacing=function(){return 100*(this.getTextBottomMargin()/2-2.8)/100};c.prototype.getLeftSpacing=function(){return 100*(this.getTextLeftMargin()/2-2.8)/100};c.prototype.getRightSpacing=function(){return 100*(this.getTextRightMargin()/2-2.8)/100};c.prototype.getLabelRotation=function(){var a=!0,b=this.calcRotation(),d=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),"0"));d=180*d/Math.PI;-d-=b;45>Math.abs(d)||270<Math.abs(d)||(a=!1);return a};c.prototype.getHyperlink=function(){var a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("Address",null,"Hyperlink");a=this.getValue(a,"");var b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("SubAddress",null,"Hyperlink");b=this.getValue(b,"");return{extLink:a,pageLink:b}};c.prototype.getProperties=function(){var a=[];if(this.sections&&this.sections.Property)for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Property.elem,-"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("N"),n=null;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);for(var p=0;p<f.length;p++){var x=f[p],A=x.getAttribute("N");"Value"==A?n=x.getAttribute("V"):"Label"==A&&(k=x.getAttribute("V"))}null!=n&&a.push({key:k,val:n})}return a};c.prototype.getStyleFromShape=function(){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();this.rotation=Math.round(this.rotation);0!==this.rotation&&(this.styleMap[mxConstants.STYLE_ROTATION]=-""+this.rotation);var a=this.getFillColor();(function(n,p){return n&&n.equals?n.equals(p):n===p})(a,"")?this.styleMap[mxConstants.STYLE_FILLCOLOR]="none":this.styleMap[mxConstants.STYLE_FILLCOLOR]=a;var b=this.getId();this.styleDebug("ID = "+b+" , Fill Color = "+a);a=this.getGradient();(function(n,p){return n&&n.equals?n.equals(p):n===p})(a,"")?this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]="none":(this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]=a,a=this.getGradientDirection(),function(n,p){return n&&-n.equals?n.equals(p):n===p}(a,"")||function(n,p){return n&&n.equals?n.equals(p):n===p}(a,mxConstants.DIRECTION_SOUTH)||(this.styleMap[mxConstants.STYLE_GRADIENT_DIRECTION]=a));a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_FILL_OPACITY]=""+a);a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_STROKE_OPACITY]=""+a);a=this.getForm();a.hasOwnProperty(mxConstants.STYLE_SHAPE)&&function(n,-p,x){void 0===x&&(x=0);return n.substr(x,p.length)===p}(function(n,p){return n[p]?n[p]:null}(a,mxConstants.STYLE_SHAPE),"image;")&&(this.styleMap[mxConstants.STYLE_WHITE_SPACE]="wrap");for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=d));d=this.getStrokeColor();var f=this.getStrokeTransparency();this.styleDebug("ID = "+b+" , Color = "+d+" , stroke transparency = "+f);(function(n,-p){return n&&n.equals?n.equals(p):n===p})(d,"")||1===f||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);b=Math.round(this.getTopSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b);b=Math.round(this.getBottomSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b);b=Math.round(this.getLeftSpacing())|-0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+b);b=Math.round(this.getRightSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b);a=this.getDirection(a);a!==mxConstants.DIRECTION_EAST&&(this.styleMap[mxConstants.STYLE_DIRECTION]=a);a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_X),"0");b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_Y),"0");(function(n,p){return n&&n.equals?n.equals(p):-n===p})("1",a)&&(this.styleMap[mxConstants.STYLE_FLIPH]="1");(function(n,p){return n&&n.equals?n.equals(p):n===p})("1",b)&&(this.styleMap[mxConstants.STYLE_FLIPV]="1");try{var k=this.getConnections();a=[];for(b=0;b<k.length;b++)a.push("["+k[b].x+","+k[b].y+",0]");this.styleMap.points="["+a.join(",")+"]"}catch(n){console.log(n)}this.resolveCommonStyles();return this.styleMap};c.prototype.getDashPattern=function(){var a=null,b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),-"0");(b&&b.equals?b.equals("Themed"):"Themed"===b)?(b=this.getTheme(),null!=b&&(a=this.isVertex()?b.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnLineDashPattern(this.getQuickStyleVals()))):a=B.Style.getLineDashPattern(parseInt(b));if(null!=a&&0!=a.length){b="";for(var d=0;d<a.length;d++)b=b.concat(a[d].toFixed(2)+" ");return b.trim()}return null};c.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),-"0");if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):a.isConnLineDashed(this.getQuickStyleVals())}else if(!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1"))return!0;return!1};c.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),-"1"),b=1;try{var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=(this.isVertex()?f.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):f.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else b=parseFloat(a),b=this.getScreenNumericalValue$double(b)}catch(k){}1>b&&(b*=2);return b};c.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");-try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=this.isVertex()?f.getStartSize(this.getQuickStyleVals()):f.getConnStartSize(this.getQuickStyleVals()))}else b=parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE),"4");try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=-this.getTheme();null!=f&&(b=this.isVertex()?f.getEndSize(this.getQuickStyleVals()):f.getConnEndSize(this.getQuickStyleVals()))}else b=parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getRounding=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0");var b=a;b="Themed".equals?"Themed".equals(b):"Themed"===b;b&&(a="0");return parseFloat(a)};c.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),-"0");return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")?!1:!0};c.prototype.getEdgeStyle$java_util_Map=function(a){var b={};(function(d,f){return d&&d.equals?d.equals(f):d===f})(function(d,f){return d[f]?d[f]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")?b[mxConstants.STYLE_EDGE]=mxConstants.NONE:b[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return b};c.prototype.getEdgeStyle=-function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};c.prototype.getMasterId=function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};c.prototype.getShapeMasterId=function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):-null};c.prototype.isGroup=function(){var a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};c.getType=function(a){return a.getAttribute("Type")};c.prototype.getMaster=function(){return this.master};c.prototype.getNameU=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||"",b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};c.prototype.getName=function(){var a=-this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME),b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getName());return a};c.prototype.getMasterName=function(){return this.shapeName};c.prototype.setLabelOffset=function(a,b){var d="",f="";this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(d=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&-this.getMaster().getMasterElement().hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(f=this.getMaster().getMasterElement().getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));if(function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C}(d,"Organizational unit")||function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C}(f,"Organizational unit")){var k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;d="0.0";f=null;f="-0.4";null!=-k&&(d=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent,f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.hasAttribute("F")?f.getAttribute("F"):f.textContent);k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,"Inh")&&(d="0.0");(function(A,C){return A&&A.equals?A.equals(C):A===C})(f,"Inh")&&(f=-"-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");b=b.split(";");for(var n="",p=0;p<b.length;p++){var x=b[p];x=x.trim();(function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C})(x,"tabHeight=")&&(n=x.split("tabHeight=").join(""))}(function(A,C){return A&&A.equals?A.equals(C):A===C})(n,"")&&(n="20");b=parseFloat(n);d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f-b/2);a.getGeometry().offset=d}else if(function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===-C}(d,"Domain 3D")||function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C}(f,"Domain 3D")){k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F")||"",f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.getAttribute("F")||"");k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");-if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(d,""))d="0.0";if(function(A,C){return A&&A.equals?A.equals(C):A===C}(f,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f);a.getGeometry().offset=d}};c.prototype.getForm=function(){var a={};if(this.isVertex())try{var b=c.getType(this.getShape());-this.styleDebug("shape type = "+b);if(null!=this.imageData||function(Q,U){return Q&&Q.equals?Q.equals(U):Q===U}(g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,b)&&null!=this.masterShape&&null!=this.masterShape.imageData){var d=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var f=function(Q,U){return Q[U]?Q[U]:null}(d,"iType"),k=function(Q,U){return Q[U]?Q[U]:null}(d,"iData"),n=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),-p=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),x=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),A=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"),"0")),C=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),J=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=n||0!=p||x!=C||A!=J?this.toBeCroppedImg={imgOffsetX:n,imgOffsetY:p,imgWidth:x,imgHeight:A,-width:C,height:J,iType:f,iData:k}:a.image="data:image/"+f+","+k;return a}var M=this.parseGeom();if(function(Q,U){return Q&&Q.equals?Q.equals(U):Q===U}(M,""))return this.styleDebug("No geom found"),a;var L=Graph.compress(M);a[mxConstants.STYLE_SHAPE]="stencil("+L+")"}catch(Q){}else return this.getEdgeStyle();return a};c.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Off-page reference")||function(b,d){return b&&b.equals?-b.equals(d):b===d}(a,"Lined/Shaded process")?!0:!1};c.prototype.isExternal_process=function(){var a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};c.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+this.shapeName);if(null!=a&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")){if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1"))return mxConstants.DIRECTION_SOUTH;-if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};c.prototype.isSubproces=function(){var a=(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};c.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};c.prototype.getChildShapes=function(){return this.childShapes};c.prototype.setChildShapes=function(a){this.childShapes=-a};c.prototype.isDisplacedLabel=function(){var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),b=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),d=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F",""),f=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","");if(null!=this.masterShape){if(""===a||function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,-"F","");if(""===b||function(k,n){return k&&k.equals?k.equals(n):k===n}(b.toLowerCase(),"inh"))b=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===d||function(k,n){return k&&k.equals?k.equals(n):k===n}(d.toLowerCase(),"inh"))d=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===f||function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,-"F","")}return function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"width*0.5")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(b.toLowerCase(),"height*0.5")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(d.toLowerCase(),"width*1")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"height*1")||!(function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(a.toLowerCase(),"width*")&&function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===-n}(b.toLowerCase(),"height*")&&function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(d.toLowerCase(),"width*")&&function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(f.toLowerCase(),"height*")||function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(a.toLowerCase(),"controls.row_")||function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(b.toLowerCase(),"controls.row_"))?!1:!0};c.prototype.isVerticalLabel=function(){var a=this.getAttribute("TextDirection",-"V","");a||null==this.masterShape||(a=this.masterShape.getAttribute("TextDirection","V",""));return"1"==a};c.prototype.isRotatedLabel=function(){if(this.isVerticalLabel())return!0;var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V","");null!=this.masterShape&&function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")&&(a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")||function(b,-d){return b&&b.equals?b.equals(d):b===d}(a,"0.0")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")?!1:!0};c.prototype.setRootShape=function(a){this.rootShape=a};c.prototype.getRootShape=function(){return this.rootShape};c.prototype.getStartXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),-0)))/100);return new mxPoint(b,a)};c.prototype.getEndXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(b,a)};c.prototype.getRoutingPoints=function(a,b,d){return null!=-this.geomList?this.geomList.getRoutingPoints(a,b,d):null};c.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var d=[];if(null!=this.shape){var f=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.GEOM);if(0<f.length&&(f=f.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=f)){f=f.getAttribute("F")||"";f=f.replace(RegExp("NURBS\\(","g"),"");f=f.replace(RegExp("\\)","g"),"");f=f.replace(RegExp(",",-"g")," ");f=f.replace(RegExp("\\s\\s","g")," ");f=f.split(" ");for(var k=f.length,n=[];0<k--;)n.push(0);for(k=0;k<f.length;k++)n[k]=parseFloat(f[k]);for(k=2;k+4<f.length;k+=4){var p=new mxPoint,x=n[k+3];p.x=Math.floor(Math.round(100*(b.x+Math.min(100,Math.abs(a.x-b.x))*n[k+2]))/100);p.y=Math.floor(Math.round(100*(b.y-100*x))/100);d.push(p)}return d}}return null};c.prototype.getStyleFromEdgeShape=function(a){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();-if(null!=a&&!function(d,f){return d&&d.equals?d.equals(f):d===f}(a,""))for(var b in a)this.styleMap[b]=a[b];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",b=this.getDashPattern(),null!=b&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=b));b=this.getEdgeMarker(!0);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=-b);b=this.getEdgeMarker(!1);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]=b);b=Math.round(this.getStartArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+b);b=Math.round(this.getFinalArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+b);b=Math.round(this.getLineWidth())|0;1!==-b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+b);b=this.getStrokeColor();(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,b=this.getFillColor(),function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=-b));b=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b;b=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b;b=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+b;b=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b;b=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=b;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};-c.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND));var b=a&&a.equals?a.equals(""):""===a;b||"1"!=this.getValue(this.getCellElement$java_lang_String("TextBkgndTrans"),"0")&&(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]=0<this.getRounding()?g.mxgraph.io.vsdx.mxVsdxConstants.TRUE:g.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};c.prototype.getEdgeMarker=-function(a){var b=this.getValue(this.getCellElement$java_lang_String(a?g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),d=0;try{if(function(k,n){return k&&k.equals?k.equals(n):k===n}(b,"Themed")){var f=this.getTheme();null!=f&&(d=this.isVertex()?f.getEdgeMarker(a,this.getQuickStyleVals()):f.getConnEdgeMarker(a,this.getQuickStyleVals()))}else d=parseInt(b)}catch(k){}a=function(k,n){null==k.entries&&(k.entries=[]);for(var p=0;p<k.entries.length;p++)if(null!=-k.entries[p].key.equals&&k.entries[p].key.equals(n)||k.entries[p].key===n)return k.entries[p].value;return null}(c.arrowTypes_$LI$(),d);0<d&&null==a&&(a=function(k,n){null==k.entries&&(k.entries=[]);for(var p=0;p<k.entries.length;p++)if(null!=k.entries[p].key.equals&&k.entries[p].key.equals(n)||k.entries[p].key===n)return k.entries[p].value;return null}(c.arrowTypes_$LI$(),1));return a};c.prototype.getCellElement$java_lang_String=function(a){var b=h.prototype.getCellElement$java_lang_String.call(this,-a);return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};c.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,b,d){var f=h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,a,b,d);return null==f&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d):f};c.prototype.getCellElement=function(a,b,d){if("string"!==typeof a&&null!==a||-"string"!==typeof b&&null!==b||"string"!==typeof d&&null!==d){if("string"!==typeof a&&null!==a||void 0!==b||void 0!==d)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d)};c.prototype.createLabelSubShape=function(a,b){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),-this.getHeight()),k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),f/2),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),k),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),-n),A=this.getValueAsDouble(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),C=this.getTextLabel(1>d||1>f);if(null!=C&&0!==C.length){var J=mxUtils.clone(this.getStyleMap())||{};J[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;J[mxConstants.STYLE_STROKECOLOR]=mxConstants.NONE;J[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;J.hasOwnProperty("align")||(J.align="center");J.hasOwnProperty("verticalAlign")||(J.verticalAlign="middle");J.hasOwnProperty("whiteSpace")||(J.whiteSpace="wrap");-delete J.shape;delete J.image;this.isVerticalLabel()&&(A+=Math.PI+.01,J.horizontal="0");var M=this.getRotation();0!==A&&(A=360-180*A/Math.PI,A=Math.round((A+M)%360*100)/100,0!==A&&(J.rotation=""+A));J="text;"+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(J,"=");n=b.getGeometry().height-(x+f-n);k=p-k;0<M&&(p=new mxGeometry(k,n,d,f),k=b.getGeometry(),g.mxgraph.online.Utils.rotatedGeometry(p,M,k.width/2,k.height/2),k=p.x,n=p.y);return a.insertVertex(b,null,C,Math.round(100*k)/100,Math.round(100*n)/100,-Math.round(100*d)/100,Math.round(100*f)/100,J+";html=1;")}return null};c.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var d=new mxCellState;d.absolutePoints=b;a.updateEdgeBounds(d);a=a.getPoint(d);d=b[0];var f=b[b.length-1];b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth());var k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),-this.getHeight()),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),0),A=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),-0);f=(this.getHeight()-(d.y-f.y))/2+d.y-a.y-(A-p+k/2);a=x-n+b/2+(d.x-a.x);return 1E11<Math.abs(a)?null:new mxPoint(Math.floor(Math.round(100*a)/100),Math.floor(Math.round(100*f)/100))}return null};c.prototype.getShapeIndex=function(){return this.shapeIndex};c.prototype.setShapeIndex=function(a){this.shapeIndex=a};return c}(g.mxgraph.io.vsdx.Shape);m.__static_initialized=!1;m.ARROW_NO_FILL_MARKER="0";m.maxDp=2;m.USE_SHAPE_MATCH=!1;m.stencilTemplate='<shape h="htemplate" w="wtemplate" aspect="variable" strokewidth="inherit"><connections></connections><background></background><foreground></foreground></shape>';-B.VsdxShape=m;m.__class="com.mxgraph.io.vsdx.VsdxShape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b,d,f,k,n){function q(){var I;if(I=2!=a.connectsMap[t.Id])if(I=null!=t.childShapes)I=t.childShapes,null==I.entries&&(I.entries=[]),I=0!=I.entries.length;try{if(1==t.childShapes.entries.length){var M=t.childShapes.entries[0].value,K=t.fields?Object.values(t.fields).join(""):t.text.textContent,Q=M.fields?Object.values(M.fields).join(""):M.text.textContent;K==Q&&(I=!1,t.childShapes.entries=[],t.noLabelGroup=!0)}}catch(S){console.log(S)}return I}+var t=this;t.masterShape=null;t.master=null;t.parentHeight=0;t=h.call(this,b,n)||this;t.htmlLabels=!0;t.rootShape=t;t.shapeName=null;t.shapeIndex=0;t.vertex=!0;t.childShapes={};var A=t.getMasterId(),C=t.getShapeMasterId();t.master=null!=A?f[A]?f[A]:null:k;null!=t.master&&(t.masterShape=null==A&&null!=C?t.master.getSubShape(C):t.master.getMasterShape());f=t.getNameU();k=f.lastIndexOf(".");-1!==k&&(f=f.substring(0,k));t.shapeName=f;b=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);+null!=b&&0<b.length&&(b=b.item(0),t.childShapes=a.parseShapes(b,t.master,!1));b=t.calcRotation();t.rotation=100*b/100;t.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(t.getValue(t.getCellElement$java_lang_String("ThemeIndex"),"0")));n=function(I,M){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(M)||I.entries[K].key===M)return I.entries[K].value;return null}(n.getThemes(),b);null==n&&"1"==urlParams.dev&&+console.log("No theme found for index "+b);b=a.getCellIntValue("VariationColorIndex",0);t.setThemeAndVariant(n,b);f=function(I){null==I.entries&&(I.entries=[]);return I.entries}(t.childShapes);for(k=0;k<f.length;k++)A=f[k].getValue(),A.setRootShape(t),null==A.theme&&A.setThemeAndVariant(n,b);t.quickStyleVals=new g.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFillColor"),+"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleShadowColor"),+"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=t.masterShape?(t.masterShape.processGeomList(null),t.processGeomList(t.masterShape.getGeomList()),0===t.width&&(t.width=t.getScreenNumericalValue$org_w3c_dom_Element$double(t.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===t.height&&(t.height=t.getScreenNumericalValue$org_w3c_dom_Element$double(t.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),+0))):t.processGeomList(null);t.vertex=d||q()||null!=t.geomList&&(!t.geomList.isNoFill()||1<t.geomList.getGeoCount());t.layerMember=t.getValue(t.getCellElement$java_lang_String("LayerMember"));t.layerMember&&(t.layerMember=t.layerMember.split(";"));return t}__extends(c,h);c.__static_initialize=function(){c.__static_initialized||(c.__static_initialized=!0,c.__static_initializer_0())};c.OFFSET_ARRAY_$LI$=function(){c.__static_initialize();null==c.OFFSET_ARRAY&&(c.OFFSET_ARRAY=["Organizational unit",+"Domain 3D"].slice(0).slice(0));return c.OFFSET_ARRAY};c.arrowSizes_$LI$=function(){c.__static_initialize();null==c.arrowSizes&&(c.arrowSizes=[2,3,5,7,9,22,45]);return c.arrowSizes};c.arrowTypes_$LI$=function(){c.__static_initialize();return c.arrowTypes};c.__static_initializer_0=function(){c.arrowTypes={};(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&+(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),2,"blockThin");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,b,d){null==+a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=+d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK);+(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),14,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||+a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),17,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),+20,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),22,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=+a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),23,"dash");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),24,"ERone");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),25,"ERmandOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=+a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),27,"ERmany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),29,"ERzeroToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=+a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),7,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<+a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),9,"openAsync");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),11,"diamond");(function(a,b,d){null==a.entries&&(a.entries=+[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),15,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),16,c.ARROW_NO_FILL_MARKER++mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),18,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&+a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),19,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),21,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),26,"ERmandOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<+a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),31,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),32,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),33,c.ARROW_NO_FILL_MARKER++mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),34,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&+a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),35,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),+36,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),37,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||+a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),38,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),+39,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),40,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&+a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),41,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),42,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),43,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<+a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),44,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){c.__static_initialize();null==c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&(c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};c.prototype.getShapeNode=function(a){var b=this.cellElements;b=b[a]?b[a]:null;return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):+b};c.prototype.getTextLabel=function(a){var b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");b="1".equals?"1".equals(b):"1"===b;if(b)return null;b=this.getTextChildren();null==b&&null!=this.masterShape&&(b=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=b)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(),this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),a||(this.styleMap.overflow=+"width"),this.getHtmlTextContent(b)}else return a=this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};c.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};c.prototype.initLabels=function(a){this.paragraphs={};for(var b=null,d=null,f=null,k=0;k<a.length;k++){var n=a.item(k);switch(n.nodeName){case "cp":b=this.getIndex(n);break;case "tp":this.getIndex(n);break;case "pp":d=this.getIndex(n);break;case "fld":f=this.getIndex(n);break;+case "#text":n=n.textContent;var q=this.paragraphs;q=q[d]?q[d]:null;null==q?(q=new g.mxgraph.io.vsdx.Paragraph(n,b,d,f),this.paragraphs[d]=q):q.addText(n,b,f)}}};c.prototype.createHybridLabel=function(a){var b=function(q,t){return q[t]?q[t]:null}(this.paragraphs,a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=this.getIndentRight(a);this.styleMap[mxConstants.STYLE_SPACING_TOP]=+this.getSpBefore(a);this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=this.getSpAfter(a);this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical();this.styleMap.fontColor=this.getTextColor(a);this.styleMap.fontSize=this.getTextSize(a);this.styleMap.fontFamily=this.getTextFont(a);var d=this.isBold(a)?mxConstants.FONT_BOLD:0;d|=this.isItalic(a)?mxConstants.FONT_ITALIC:0;d|=this.isUnderline(a)?mxConstants.FONT_UNDERLINE:0;this.styleMap.fontStyle=(new String(d)).toString();a=b.numValues();+d=null;for(var f=0;f<a;f++){var k=b.getValue(f);if(0===k.length&&null!=this.fields){var n=b.getField(f);null!=n&&(k=function(q,t){return q[t]?q[t]:null}(this.fields,n),null==k&&null!=this.masterShape&&null!=this.masterShape.fields&&(k=function(q,t){return q[t]?q[t]:null}(this.masterShape.fields,n)))}null!=k&&(d=null==d?k:d+k)}return d};c.prototype.getHtmlTextContent=function(a){function b(A){A=g.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(A);n&&(A="<li>"+A,n=!1);k?(A=A.split("\n"),A[A.length-1]||(A.pop(),+n=!0),A=A.join("</li><li>")):A=A.replace(RegExp("\n","g"),"<br/>").replace(new RegExp(g.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP,"g"),"<br/>");return this.getTextCharFormated(A)}var d="",f=!0,k=!1,n=!1;if(null!=a&&0<a.length)for(var q=0;q<a.length;q++){var t=a.item(q);(function(A,C){return A&&A.equals?A.equals(C):A===C})(t.nodeName,"cp")?this.cp=this.getIndex(t):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"tp")?this.tp=this.getIndex(t):function(A,C){return A&&A.equals?A.equals(C):+A===C}(t.nodeName,"pp")?(this.pp=this.getIndex(t),k&&(d+="</li></ul>"),f?f=!1:d+="</p>",d+=this.getTextParagraphFormated("<p>"),t=this.getPPList(this.pp),n=k=null!=t,d+=k?t:""):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"fld")?(this.fld=this.getIndex(t),t=null,null!=this.fields&&(t=function(A,C){return A[C]?A[C]:null}(this.fields,this.fld)),null==t&&null!=this.masterShape&&null!=this.masterShape.fields&&(t=function(A,C){return A[C]?A[C]:null}(this.masterShape.fields,this.fld)),+null!=t&&(d+=b.call(this,t))):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"#text")&&(t=t.textContent,d+=b.call(this,t))}k&&(d+="</li></ul>");return g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(d+(f?"":"</p>"),"div","font-size: 1px")};c.prototype.isConnectorBigNameU=function(a){return function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree single")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree single")||function(b,d,f){void 0===+f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree tail")||+function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 2")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 1")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 3")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Double flexi-arrow")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Fancy arrow")};c.prototype.isVertex=function(){return this.vertex};c.prototype.getOriginPoint=+function(a,b){var d=this.getPinX(),f=this.getPinY(),k=this.getLocPinY(),n=this.getLocPinX(),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);d-=n;a-=f+(t-k);return!b||k===t/2&&n===q/2||0===this.rotation?new mxPoint(d,a):(b=q/2-n,k-=t/2,t=Math.cos((360-this.rotation)*Math.PI/180),n=Math.sin((360-this.rotation)*+Math.PI/180),new mxPoint(d+b-(b*t-k*n),b*n+k*t+a-k))};c.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0<b?1:a,0===b&&0<a?1:b)};c.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_X),+0)};c.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};c.prototype.getLocPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),0)};c.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};c.prototype.getOpacity=+function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};c.prototype.getGradient=function(){if(function(d,f){return d&&d.equals?d.equals(f):d===f}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var a=function(d,f){return d[f]?d[f]:null}(this.sections,"FillGradient");if(null!=a){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem,+"Row");a=this.getColor(a.getIndexedCell(b[b.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");25<=parseInt(b)?a=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):(b=this.getTheme(),null!=b&&(b=b.getFillGraientColor(this.getQuickStyleVals()),null!=b&&(a=b.toHexStr())));return a};c.prototype.getGradientDirection=+function(){var a="",b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"25")?a=mxConstants.DIRECTION_EAST:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"27")?a=mxConstants.DIRECTION_WEST:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"28")?a=mxConstants.DIRECTION_SOUTH:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"30")&&(a=mxConstants.DIRECTION_NORTH);return a};c.prototype.calcRotation=+function(){var a=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ANGLE),"0"));a=180*a/Math.PI;return 360-a%360*100/100};c.prototype.propagateRotation=function(a){this.rotation+=a;this.rotation%=360;this.rotation=100*this.rotation/100};c.prototype.getTopSpacing=function(){return 100*(this.getTextTopMargin()/2-2.8)/100};c.prototype.getBottomSpacing=function(){return 100*(this.getTextBottomMargin()/2-2.8)/100};c.prototype.getLeftSpacing=function(){return 100*+(this.getTextLeftMargin()/2-2.8)/100};c.prototype.getRightSpacing=function(){return 100*(this.getTextRightMargin()/2-2.8)/100};c.prototype.getLabelRotation=function(){var a=!0,b=this.calcRotation(),d=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),"0"));d=180*d/Math.PI;d-=b;45>Math.abs(d)||270<Math.abs(d)||(a=!1);return a};c.prototype.getHyperlink=function(){var a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("Address",+null,"Hyperlink");a=this.getValue(a,"");var b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("SubAddress",null,"Hyperlink");b=this.getValue(b,"");return{extLink:a,pageLink:b}};c.prototype.getProperties=function(){var a=[];if(this.sections&&this.sections.Property)for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Property.elem,"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("N"),n=null;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);+for(var q=0;q<f.length;q++){var t=f[q],A=t.getAttribute("N");"Value"==A?n=t.getAttribute("V"):"Label"==A&&(k=t.getAttribute("V"))}null!=n&&a.push({key:k,val:n})}return a};c.prototype.getStyleFromShape=function(){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();this.rotation=Math.round(this.rotation);0!==this.rotation&&(this.styleMap[mxConstants.STYLE_ROTATION]=""+this.rotation);var a=this.getFillColor();(function(n,q){return n&&n.equals?n.equals(q):n===q})(a,"")?this.styleMap[mxConstants.STYLE_FILLCOLOR]=+"none":this.styleMap[mxConstants.STYLE_FILLCOLOR]=a;var b=this.getId();this.styleDebug("ID = "+b+" , Fill Color = "+a);a=this.getGradient();(function(n,q){return n&&n.equals?n.equals(q):n===q})(a,"")?this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]="none":(this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]=a,a=this.getGradientDirection(),function(n,q){return n&&n.equals?n.equals(q):n===q}(a,"")||function(n,q){return n&&n.equals?n.equals(q):n===q}(a,mxConstants.DIRECTION_SOUTH)||(this.styleMap[mxConstants.STYLE_GRADIENT_DIRECTION]=+a));a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_FILL_OPACITY]=""+a);a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_STROKE_OPACITY]=""+a);a=this.getForm();a.hasOwnProperty(mxConstants.STYLE_SHAPE)&&function(n,q,t){void 0===t&&(t=0);return n.substr(t,q.length)===q}(function(n,q){return n[q]?n[q]:null}(a,mxConstants.STYLE_SHAPE),"image;")&&(this.styleMap[mxConstants.STYLE_WHITE_SPACE]=+"wrap");for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=d));d=this.getStrokeColor();var f=this.getStrokeTransparency();this.styleDebug("ID = "+b+" , Color = "+d+" , stroke transparency = "+f);(function(n,q){return n&&n.equals?n.equals(q):n===q})(d,"")||1===f||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=+""+b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);b=Math.round(this.getTopSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b);b=Math.round(this.getBottomSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b);b=Math.round(this.getLeftSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+b);b=Math.round(this.getRightSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b);a=+this.getDirection(a);a!==mxConstants.DIRECTION_EAST&&(this.styleMap[mxConstants.STYLE_DIRECTION]=a);a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_X),"0");b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_Y),"0");(function(n,q){return n&&n.equals?n.equals(q):n===q})("1",a)&&(this.styleMap[mxConstants.STYLE_FLIPH]="1");(function(n,q){return n&&n.equals?n.equals(q):n===q})("1",b)&&(this.styleMap[mxConstants.STYLE_FLIPV]=+"1");try{var k=this.getConnections();a=[];for(b=0;b<k.length;b++)a.push("["+k[b].x+","+k[b].y+",0]");this.styleMap.points="["+a.join(",")+"]"}catch(n){console.log(n)}this.resolveCommonStyles();return this.styleMap};c.prototype.getDashPattern=function(){var a=null,b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");(b&&b.equals?b.equals("Themed"):"Themed"===b)?(b=this.getTheme(),null!=b&&(a=this.isVertex()?b.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):+b.getConnLineDashPattern(this.getQuickStyleVals()))):a=B.Style.getLineDashPattern(parseInt(b));if(null!=a&&0!=a.length){b="";for(var d=0;d<a.length;d++)b=b.concat(a[d].toFixed(2)+" ");return b.trim()}return null};c.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):+a.isConnLineDashed(this.getQuickStyleVals())}else if(!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1"))return!0;return!1};c.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),"1"),b=1;try{var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=(this.isVertex()?f.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):+f.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else b=parseFloat(a),b=this.getScreenNumericalValue$double(b)}catch(k){}1>b&&(b*=2);return b};c.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=this.isVertex()?f.getStartSize(this.getQuickStyleVals()):f.getConnStartSize(this.getQuickStyleVals()))}else b=+parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE),"4");try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=this.isVertex()?f.getEndSize(this.getQuickStyleVals()):f.getConnEndSize(this.getQuickStyleVals()))}else b=parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getRounding=+function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0");var b=a;b="Themed".equals?"Themed".equals(b):"Themed"===b;b&&(a="0");return parseFloat(a)};c.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),"0");return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")?!1:!0};c.prototype.getEdgeStyle$java_util_Map=+function(a){var b={};(function(d,f){return d&&d.equals?d.equals(f):d===f})(function(d,f){return d[f]?d[f]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")?b[mxConstants.STYLE_EDGE]=mxConstants.NONE:b[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return b};c.prototype.getEdgeStyle=function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};c.prototype.getMasterId=+function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};c.prototype.getShapeMasterId=function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):null};c.prototype.isGroup=function(){var a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};c.getType=function(a){return a.getAttribute("Type")};+c.prototype.getMaster=function(){return this.master};c.prototype.getNameU=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||"",b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};c.prototype.getName=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME),b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getName());return a};+c.prototype.getMasterName=function(){return this.shapeName};c.prototype.setLabelOffset=function(a,b){var d="",f="";this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(d=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&this.getMaster().getMasterElement().hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(f=this.getMaster().getMasterElement().getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));+if(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(d,"Organizational unit")||function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(f,"Organizational unit")){var k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent,f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),+f=f.hasAttribute("F")?f.getAttribute("F"):f.textContent);k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,"Inh")&&(d="0.0");(function(A,C){return A&&A.equals?A.equals(C):A===C})(f,"Inh")&&(f="-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");b=b.split(";");for(var n="",q=0;q<b.length;q++){var t=b[q];t=t.trim();(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C})(t,"tabHeight=")&&+(n=t.split("tabHeight=").join(""))}(function(A,C){return A&&A.equals?A.equals(C):A===C})(n,"")&&(n="20");b=parseFloat(n);d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f-b/2);a.getGeometry().offset=d}else if(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(d,"Domain 3D")||function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(f,"Domain 3D")){k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;+d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F")||"",f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.getAttribute("F")||"");k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(d,""))d="0.0";if(function(A,C){return A&&A.equals?A.equals(C):+A===C}(f,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f);a.getGeometry().offset=d}};c.prototype.getForm=function(){var a={};if(this.isVertex())try{var b=c.getType(this.getShape());this.styleDebug("shape type = "+b);if(null!=this.imageData||function(Q,S){return Q&&Q.equals?Q.equals(S):Q===S}(g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,b)&&null!=this.masterShape&&+null!=this.masterShape.imageData){var d=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var f=function(Q,S){return Q[S]?Q[S]:null}(d,"iType"),k=function(Q,S){return Q[S]?Q[S]:null}(d,"iData"),n=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),q=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),t=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),A=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"),+"0")),C=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),I=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=n||0!=q||t!=C||A!=I?this.toBeCroppedImg={imgOffsetX:n,imgOffsetY:q,imgWidth:t,imgHeight:A,width:C,height:I,iType:f,iData:k}:a.image="data:image/"+f+","+k;return a}var M=this.parseGeom();if(function(Q,S){return Q&&Q.equals?Q.equals(S):Q===S}(M,""))return this.styleDebug("No geom found"),a;var K=Graph.compress(M);a[mxConstants.STYLE_SHAPE]=+"stencil("+K+")"}catch(Q){}else return this.getEdgeStyle();return a};c.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Off-page reference")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Lined/Shaded process")?!0:!1};c.prototype.isExternal_process=function(){var a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};c.prototype.getDirection=function(a){a=mxResources.get("mxOffset"++this.shapeName);if(null!=a&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")){if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1"))return mxConstants.DIRECTION_SOUTH;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};c.prototype.isSubproces=function(){var a=+(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};c.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};c.prototype.getChildShapes=function(){return this.childShapes};c.prototype.setChildShapes=function(a){this.childShapes=a};c.prototype.isDisplacedLabel=function(){var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),b=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),d=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,+"F",""),f=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","");if(null!=this.masterShape){if(""===a||function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F","");if(""===b||function(k,n){return k&&k.equals?k.equals(n):k===n}(b.toLowerCase(),"inh"))b=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===d||function(k,n){return k&&k.equals?k.equals(n):+k===n}(d.toLowerCase(),"inh"))d=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===f||function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","")}return function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"width*0.5")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(b.toLowerCase(),"height*0.5")&&function(k,n){return k&&k.equals?k.equals(n):+k===n}(d.toLowerCase(),"width*1")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"height*1")||!(function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(a.toLowerCase(),"width*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(b.toLowerCase(),"height*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(d.toLowerCase(),"width*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(f.toLowerCase(),"height*")||function(k,+n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(a.toLowerCase(),"controls.row_")||function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(b.toLowerCase(),"controls.row_"))?!1:!0};c.prototype.isVerticalLabel=function(){var a=this.getAttribute("TextDirection","V","");a||null==this.masterShape||(a=this.masterShape.getAttribute("TextDirection","V",""));return"1"==a};c.prototype.isRotatedLabel=function(){if(this.isVerticalLabel())return!0;var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,+"V","");null!=this.masterShape&&function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")&&(a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0.0")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")?!1:!0};c.prototype.setRootShape=function(a){this.rootShape=a};c.prototype.getRootShape=function(){return this.rootShape};c.prototype.getStartXY=+function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(b,a)};c.prototype.getEndXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_X),+0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(b,a)};c.prototype.getRoutingPoints=function(a,b,d){return null!=this.geomList?this.geomList.getRoutingPoints(a,b,d):null};c.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var d=[];if(null!=this.shape){var f=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.GEOM);+if(0<f.length&&(f=f.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=f)){f=f.getAttribute("F")||"";f=f.replace(RegExp("NURBS\\(","g"),"");f=f.replace(RegExp("\\)","g"),"");f=f.replace(RegExp(",","g")," ");f=f.replace(RegExp("\\s\\s","g")," ");f=f.split(" ");for(var k=f.length,n=[];0<k--;)n.push(0);for(k=0;k<f.length;k++)n[k]=parseFloat(f[k]);for(k=2;k+4<f.length;k+=4){var q=new mxPoint,t=n[k+3];q.x=Math.floor(Math.round(100*(b.x++Math.min(100,Math.abs(a.x-b.x))*n[k+2]))/100);q.y=Math.floor(Math.round(100*(b.y-100*t))/100);d.push(q)}return d}}return null};c.prototype.getStyleFromEdgeShape=function(a){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();if(null!=a&&!function(d,f){return d&&d.equals?d.equals(f):d===f}(a,""))for(var b in a)this.styleMap[b]=a[b];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",b=this.getDashPattern(),null!=b&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=+b));b=this.getEdgeMarker(!0);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=b);b=this.getEdgeMarker(!1);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]=+b);b=Math.round(this.getStartArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+b);b=Math.round(this.getFinalArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+b);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+b);b=this.getStrokeColor();(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);+this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,b=this.getFillColor(),function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=b));b=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b;b=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b;b=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""++b;b=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b;b=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=b;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};c.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND));var b=a&&a.equals?a.equals(""):""===a;b||"1"!=this.getValue(this.getCellElement$java_lang_String("TextBkgndTrans"),+"0")&&(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]=0<this.getRounding()?g.mxgraph.io.vsdx.mxVsdxConstants.TRUE:g.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};c.prototype.getEdgeMarker=function(a){var b=this.getValue(this.getCellElement$java_lang_String(a?g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),d=0;try{if(function(k,n){return k&&k.equals?k.equals(n):k===n}(b,"Themed")){var f=+this.getTheme();null!=f&&(d=this.isVertex()?f.getEdgeMarker(a,this.getQuickStyleVals()):f.getConnEdgeMarker(a,this.getQuickStyleVals()))}else d=parseInt(b)}catch(k){}a=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(c.arrowTypes_$LI$(),d);0<d&&null==a&&(a=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=+k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(c.arrowTypes_$LI$(),1));return a};c.prototype.getCellElement$java_lang_String=function(a){var b=h.prototype.getCellElement$java_lang_String.call(this,a);return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};c.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,b,d){var f=h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,+a,b,d);return null==f&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d):f};c.prototype.getCellElement=function(a,b,d){if("string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b||"string"!==typeof d&&null!==d){if("string"!==typeof a&&null!==a||void 0!==b||void 0!==d)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d)};c.prototype.createLabelSubShape=+function(a,b){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),+f/2),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),k),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),n),A=this.getValueAsDouble(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),C=this.getTextLabel(1>d||1>f);if(null!=C&&0!==C.length){var I=mxUtils.clone(this.getStyleMap())||{};I[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;I[mxConstants.STYLE_STROKECOLOR]=+mxConstants.NONE;I[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;I.hasOwnProperty("align")||(I.align="center");I.hasOwnProperty("verticalAlign")||(I.verticalAlign="middle");I.hasOwnProperty("whiteSpace")||(I.whiteSpace="wrap");delete I.shape;delete I.image;this.isVerticalLabel()&&(A+=Math.PI+.01,I.horizontal="0");var M=this.getRotation();0!==A&&(A=360-180*A/Math.PI,A=Math.round((A+M)%360*100)/100,0!==A&&(I.rotation=""+A));I="text;"+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(I,"=");n=b.getGeometry().height-+(t+f-n);k=q-k;0<M&&(q=new mxGeometry(k,n,d,f),k=b.getGeometry(),g.mxgraph.online.Utils.rotatedGeometry(q,M,k.width/2,k.height/2),k=q.x,n=q.y);return a.insertVertex(b,null,C,Math.round(100*k)/100,Math.round(100*n)/100,Math.round(100*d)/100,Math.round(100*f)/100,I+";html=1;")}return null};c.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var d=new mxCellState;d.absolutePoints=b;a.updateEdgeBounds(d);a=a.getPoint(d);d=b[0];var f=b[b.length-1];b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),+this.getWidth());var k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),+0),A=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),0);f=(this.getHeight()-(d.y-f.y))/2+d.y-a.y-(A-q+k/2);a=t-n+b/2+(d.x-a.x);return 1E11<Math.abs(a)?null:new mxPoint(Math.floor(Math.round(100*a)/100),Math.floor(Math.round(100*f)/100))}return null};c.prototype.getShapeIndex=function(){return this.shapeIndex};c.prototype.setShapeIndex=function(a){this.shapeIndex=a};return c}(g.mxgraph.io.vsdx.Shape);m.__static_initialized=!1;m.ARROW_NO_FILL_MARKER=+"0";m.maxDp=2;m.USE_SHAPE_MATCH=!1;m.stencilTemplate='<shape h="htemplate" w="wtemplate" aspect="variable" strokewidth="inherit"><connections></connections><background></background><foreground></foreground></shape>';B.VsdxShape=m;m.__class="com.mxgraph.io.vsdx.VsdxShape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){var B=function(){function m(){}m.__static_initialize=function(){m.__static_initialized||(m.__static_initialized=!0,m.__static_initializer_0())};m.CA_$LI$=function(){m.__static_initialize();null==m.CA&&(m.CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""));return m.CA};m.IA_$LI$=function(){m.__static_initialize();if(null==m.IA){for(var h=256,c=[];0<h--;)c.push(0);m.IA=c}return m.IA};m.__static_initializer_0=function(){for(var h=m.IA_$LI$(),-c=0;c<h.length;c++)h[c]=-1;h=0;for(c=m.CA_$LI$().length;h<c;h++)m.IA_$LI$()[m.CA_$LI$()[h].charCodeAt(0)]=h;m.IA_$LI$()[61]=0};m.encodeToChar=function(h,c,a){var b=null!=h?h.length-c:0;if(0===b)return[];var d=3*(b/3|0),f=((b-1)/3|0)+1<<2;f+=a?((f-1)/76|0)<<1:0;for(var k=Array(f),n=c,p=0,x=0;n<d+c;){var A=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255;k[p++]=m.CA_$LI$()[A>>>18&63];k[p++]=m.CA_$LI$()[A>>>12&63];k[p++]=m.CA_$LI$()[A>>>6&63];k[p++]=m.CA_$LI$()[A&63];a&&19===++x&&p<f-2&&(k[p++]="\r",k[p++]=-"\n",x=0)}a=b-d;0<a&&(A=(h[d+c]&255)<<10|(2===a?(h[b+c-1]&255)<<2:0),k[f-4]=m.CA_$LI$()[A>>12],k[f-3]=m.CA_$LI$()[A>>>6&63],k[f-2]=2===a?m.CA_$LI$()[A&63]:"=",k[f-1]="=");return k};m.decode$char_A=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h[b].charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h[--b].charCodeAt(0)];)61==function(p){return null==p.charCodeAt?p:p.charCodeAt(0)}(h[b])&&d++;c=(6*(c-a)>>3)-d;a=function(p){for(var x=-[];0<p--;)x.push(0);return x}(c);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var n=m.IA_$LI$()[h[d++].charCodeAt(0)];0<=n?b|=n<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decode=function(h){if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$byte_A(h);+c=0;c<h.length;c++)h[c]=-1;h=0;for(c=m.CA_$LI$().length;h<c;h++)m.IA_$LI$()[m.CA_$LI$()[h].charCodeAt(0)]=h;m.IA_$LI$()[61]=0};m.encodeToChar=function(h,c,a){var b=null!=h?h.length-c:0;if(0===b)return[];var d=3*(b/3|0),f=((b-1)/3|0)+1<<2;f+=a?((f-1)/76|0)<<1:0;for(var k=Array(f),n=c,q=0,t=0;n<d+c;){var A=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255;k[q++]=m.CA_$LI$()[A>>>18&63];k[q++]=m.CA_$LI$()[A>>>12&63];k[q++]=m.CA_$LI$()[A>>>6&63];k[q++]=m.CA_$LI$()[A&63];a&&19===++t&&q<f-2&&(k[q++]="\r",k[q++]=+"\n",t=0)}a=b-d;0<a&&(A=(h[d+c]&255)<<10|(2===a?(h[b+c-1]&255)<<2:0),k[f-4]=m.CA_$LI$()[A>>12],k[f-3]=m.CA_$LI$()[A>>>6&63],k[f-2]=2===a?m.CA_$LI$()[A&63]:"=",k[f-1]="=");return k};m.decode$char_A=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h[b].charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h[--b].charCodeAt(0)];)61==function(q){return null==q.charCodeAt?q:q.charCodeAt(0)}(h[b])&&d++;c=(6*(c-a)>>3)-d;a=function(q){for(var t=+[];0<q--;)t.push(0);return t}(c);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var n=m.IA_$LI$()[h[d++].charCodeAt(0)];0<=n?b|=n<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decode=function(h){if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$byte_A(h);if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decode$java_lang_String(h);throw Error("invalid overload");};m.decodeFast$char_A=function(h){var c=h.length;if(0===c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[h[a].charCodeAt(0)];)a++;for(;0<b&&0>m.IA_$LI$()[h[b].charCodeAt(0)];)b--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[b])?61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[b-1])?2:1:0,f=b-a+1,k=76<c?(13==function(C){return null==C.charCodeAt?-C:C.charCodeAt(0)}(h[76])?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var J=[];0<C--;)J.push(0);return J}(f);for(var n=0,p=0,x=3*(f/3|0);n<x;){var A=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18|m.IA_$LI$()[h[a++].charCodeAt(0)]<<12|m.IA_$LI$()[h[a++].charCodeAt(0)]<<6|m.IA_$LI$()[h[a++].charCodeAt(0)];c[n++]=A>>16|0;c[n++]=A>>8|0;c[n++]=A|0;0<k&&19===++p&&(a+=2,p=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>h|0}return c};m.decodeFast=function(h){if(null!=+C:C.charCodeAt(0)}(h[76])?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var I=[];0<C--;)I.push(0);return I}(f);for(var n=0,q=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18|m.IA_$LI$()[h[a++].charCodeAt(0)]<<12|m.IA_$LI$()[h[a++].charCodeAt(0)]<<6|m.IA_$LI$()[h[a++].charCodeAt(0)];c[n++]=A>>16|0;c[n++]=A>>8|0;c[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>h|0}return c};m.decodeFast=function(h){if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$byte_A(h);if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decodeFast$java_lang_String(h);throw Error("invalid overload");};m.encodeToByte=function(h,c){var a=null!=h?h.length:0;if(0===a)return[];for(var b=3*(a/-3|0),d=((a-1)/3|0)+1<<2,f=d+=c?((d-1)/76|0)<<1:0,k=[];0<f--;)k.push(0);for(var n=0,p=0,x=0;n<b;)f=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255,k[p++]=m.CA_$LI$()[f>>>18&63].charCodeAt(0),k[p++]=m.CA_$LI$()[f>>>12&63].charCodeAt(0),k[p++]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[p++]=m.CA_$LI$()[f&63].charCodeAt(0),c&&19===++x&&p<d-2&&(k[p++]=13,k[p++]=10,x=0);c=a-b;0<c&&(f=(h[b]&255)<<10|(2===c?(h[a-1]&255)<<2:0),k[d-4]=m.CA_$LI$()[f>>12].charCodeAt(0),k[d-3]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[d-2]=+3|0),d=((a-1)/3|0)+1<<2,f=d+=c?((d-1)/76|0)<<1:0,k=[];0<f--;)k.push(0);for(var n=0,q=0,t=0;n<b;)f=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255,k[q++]=m.CA_$LI$()[f>>>18&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f>>>12&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f&63].charCodeAt(0),c&&19===++t&&q<d-2&&(k[q++]=13,k[q++]=10,t=0);c=a-b;0<c&&(f=(h[b]&255)<<10|(2===c?(h[a-1]&255)<<2:0),k[d-4]=m.CA_$LI$()[f>>12].charCodeAt(0),k[d-3]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[d-2]=2===c?m.CA_$LI$()[f&63].charCodeAt(0):61,k[d-1]=61);return k};m.decode$byte_A=function(h){for(var c=h.length,a=0,b=0;b<c;b++)0>m.IA_$LI$()[h[b]&255]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h[--b]&255];)61==h[b]&&d++;b=c=(6*(c-a)>>3)-d;for(a=[];0<b--;)a.push(0);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var n=m.IA_$LI$()[h[d++]&255];0<=n?b|=n<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decodeFast$byte_A=function(h){var c=h.length;if(0===-c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[h[a]&255];)a++;for(;0<b&&0>m.IA_$LI$()[h[b]&255];)b--;var d=61==h[b]?61==h[b-1]?2:1:0,f=b-a+1,k=76<c?(13==h[76]?f/78|0:0)<<1:0,n=f=(6*(f-k)>>3)-d;for(c=[];0<n--;)c.push(0);for(var p=n=0,x=3*(f/3|0);n<x;){var A=m.IA_$LI$()[h[a++]]<<18|m.IA_$LI$()[h[a++]]<<12|m.IA_$LI$()[h[a++]]<<6|m.IA_$LI$()[h[a++]];c[n++]=A>>16|0;c[n++]=A>>8|0;c[n++]=A|0;0<k&&19===++p&&(a+=2,p=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++]]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>-h|0}return c};m.encodeToString=function(h,c,a){return m.encodeToChar(h,c,a).join("")};m.decode$java_lang_String=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h.charAt(b).charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h.charAt(--b).charCodeAt(0)];)61==function(p){return null==p.charCodeAt?p:p.charCodeAt(0)}(h.charAt(b))&&d++;c=(6*(c-a)>>3)-d;a=function(p){for(var x=[];0<p--;)x.push(0);return x}(c);for(var f=d=0;f<c;){for(var k=+c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[h[a]&255];)a++;for(;0<b&&0>m.IA_$LI$()[h[b]&255];)b--;var d=61==h[b]?61==h[b-1]?2:1:0,f=b-a+1,k=76<c?(13==h[76]?f/78|0:0)<<1:0,n=f=(6*(f-k)>>3)-d;for(c=[];0<n--;)c.push(0);for(var q=n=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h[a++]]<<18|m.IA_$LI$()[h[a++]]<<12|m.IA_$LI$()[h[a++]]<<6|m.IA_$LI$()[h[a++]];c[n++]=A>>16|0;c[n++]=A>>8|0;c[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++]]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>+h|0}return c};m.encodeToString=function(h,c,a){return m.encodeToChar(h,c,a).join("")};m.decode$java_lang_String=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h.charAt(b).charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h.charAt(--b).charCodeAt(0)];)61==function(q){return null==q.charCodeAt?q:q.charCodeAt(0)}(h.charAt(b))&&d++;c=(6*(c-a)>>3)-d;a=function(q){for(var t=[];0<q--;)t.push(0);return t}(c);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var n=m.IA_$LI$()[h.charAt(d++).charCodeAt(0)];0<=n?b|=n<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decodeFast$java_lang_String=function(h){var c=h.length;if(0===c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(a))&255];)a++;for(;0<b&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b))&255];)b--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b))?-61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b-1))?2:1:0,f=b-a+1,k=76<c?(13==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(76))?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var J=[];0<C--;)J.push(0);return J}(f);for(var n=0,p=0,x=3*(f/3|0);n<x;){var A=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<12|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<6|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)];c[n++]=A>>16|0;c[n++]=A>>-8|0;c[n++]=A|0;0<k&&19===++p&&(a+=2,p=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>h|0}return c};return m}();B.__static_initialized=!1;z.mxBase64=B;B.__class="com.mxgraph.online.mxBase64"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$();+61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b-1))?2:1:0,f=b-a+1,k=76<c?(13==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(76))?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var I=[];0<C--;)I.push(0);return I}(f);for(var n=0,q=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<12|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<6|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)];c[n++]=A>>16|0;c[n++]=A>>+8|0;c[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>h|0}return c};return m}();B.__static_initialized=!1;z.mxBase64=B;B.__class="com.mxgraph.online.mxBase64"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$();com.mxgraph.io.vsdx.VsdxShape.arrowTypes_$LI$();com.mxgraph.io.vsdx.VsdxShape.arrowSizes_$LI$();com.mxgraph.io.vsdx.VsdxShape.OFFSET_ARRAY_$LI$();com.mxgraph.io.vsdx.VsdxShape.__static_initialize();com.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP_$LI$();com.mxgraph.io.vsdx.Style.lineDashPatterns_$LI$();com.mxgraph.io.vsdx.Style.styleTypes_$LI$();com.mxgraph.io.vsdx.Style.__static_initialize();com.mxgraph.online.Constants.MAX_AREA_$LI$();com.mxgraph.io.vsdx.theme.Color.NONE_$LI$();com.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.colorIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.themesIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.__static_initialize();com.mxgraph.io.vsdx.mxVsdxConstants.MY_SET_$LI$();com.mxgraph.io.vsdx.mxVsdxConstants.SET_VALUES_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.defaultColors_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.__static_initialize();com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder_$LI$();com.mxgraph.io.mxVsdxCodec.parsererrorNS_$LI$();EditorUi.prototype.doImportVisio=function(g,y,z,B){B=B||g.name;null!=B&&/(\.vs(x|sx?))($|\?)/i.test(B)?(new com.mxgraph.io.mxVssxCodec(this)).decodeVssx(g,y,null,z):(new com.mxgraph.io.mxVsdxCodec(this)).decodeVsdx(g,y,null,z)};function mxGraphMlCodec(){this.cachedRefObj={}}mxGraphMlCodec.prototype.refRegexp=/^\{y:GraphMLReference\s+(\d+)\}$/;mxGraphMlCodec.prototype.staticRegexp=/^\{x:Static\s+(.+)\.(.+)\}$/;mxGraphMlCodec.prototype.decode=function(g,y,z){try{var B=mxUtils.parseXml(g),m=this.getDirectChildNamedElements(B.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(B.documentElement);g='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(B=0;B<m.length;B++){var h=m[B],c=this.createMxGraph(),a=c.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(h,c,c.getDefaultParent()),B=0;B<this.edges.length;B++)for(var b=this.edges[B],d=b.edges,f=b.parent,k=b.dx,n=b.dy,-p=0;p<d.length;p++)this.importEdge(d[p],c,f,k,n)}catch(W){throw console.log(W),W;}finally{a.endUpdate()}a.beginUpdate();try{var x=c.getModel().cells,A;for(A in x){var C=x[A];if(C.edge&&0<C.getChildCount())for(B=0;B<C.getChildCount();B++){var J=C.children[B].geometry;if(J.adjustIt){var M=c.view.getState(C),L=M.absolutePoints,Q=L[0],U=L[L.length-1],H=J.x,I=J.y;k=U.x-Q.x;n=U.y-Q.y;var N=Q.x+H*k,K=Q.y+H*n,O=Math.sqrt(k*k+n*n);k/=O;n/=O;N-=I*n;K+=I*k;var ba=c.view.getRelativePoint(M,N,K);J.x=ba.x;J.y=+q=0;q<d.length;q++)this.importEdge(d[q],c,f,k,n)}catch(W){throw console.log(W),W;}finally{a.endUpdate()}a.beginUpdate();try{var t=c.getModel().cells,A;for(A in t){var C=t[A];if(C.edge&&0<C.getChildCount())for(B=0;B<C.getChildCount();B++){var I=C.children[B].geometry;if(I.adjustIt){var M=c.view.getState(C),K=M.absolutePoints,Q=K[0],S=K[K.length-1],H=I.x,J=I.y;k=S.x-Q.x;n=S.y-Q.y;var N=Q.x+H*k,L=Q.y+H*n,O=Math.sqrt(k*k+n*n);k/=O;n/=O;N-=J*n;L+=J*k;var ba=c.view.getRelativePoint(M,N,L);I.x=ba.x;I.y=ba.y}}}}catch(W){throw console.log(W),W;}finally{a.endUpdate()}g+=this.processPage(c,B+1)}y&&y(g+"</mxfile>")}catch(W){z&&z(W)}};mxGraphMlCodec.prototype.initializeKeys=function(g){var y=this.getDirectChildNamedElements(g,mxGraphMlConstants.KEY);this.nodesKeys={};this.edgesKeys={};this.portsKeys={};this.sharedData={};this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY]={};this.nodesKeys[mxGraphMlConstants.USER_TAGS]={};this.nodesKeys[mxGraphMlConstants.NODE_STYLE]={};this.nodesKeys[mxGraphMlConstants.NODE_LABELS]={};this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS]={};this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY]={};this.edgesKeys[mxGraphMlConstants.EDGE_STYLE]={};this.edgesKeys[mxGraphMlConstants.EDGE_LABELS]={};this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER]={};this.portsKeys[mxGraphMlConstants.PORT_STYLE]={};this.portsKeys[mxGraphMlConstants.PORT_VIEW_STATE]={};for(var z,B=0;B<y.length;B++){var m=this.dataElem2Obj(y[B]),h=m[mxGraphMlConstants.ID],c=m[mxGraphMlConstants.KEY_FOR],a=m[mxGraphMlConstants.KEY_NAME],b=m[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(z=h);a=a?a:b;switch(c){case mxGraphMlConstants.NODE:this.nodesKeys[a]=@@ -1624,20 +1624,20 @@ break;case "bpmnOutline":c=mxGraphMlShapesMap.bpmnOutline[h.toLowerCase()];breakmxGraphMlCodec.prototype.importGraph=function(g,y,z){for(var B=this.getDirectChildNamedElements(g,mxGraphMlConstants.NODE),m=z,h=0,c=0;m&&m.geometry;)h+=m.geometry.x,c+=m.geometry.y,m=m.parent;for(m=0;m<B.length;m++)this.importNode(B[m],y,z,h,c);this.edges.push({edges:this.getDirectChildNamedElements(g,mxGraphMlConstants.EDGE),parent:z,dx:h,dy:c})};mxGraphMlCodec.prototype.importPort=function(g,y){var z=g.getAttribute(mxGraphMlConstants.PORT_NAME),B={};g=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA);for(var m=0;m<g.length;m++){var h=g[m];h.getAttribute(mxGraphMlConstants.KEY);h=this.dataElem2Obj(h);h.key==this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER].key&&this.mapObject(h,{"y:FreeNodePortLocationModelParameter.Ratio":function(c,a){c=c.split(",");a.pos={x:c[0],y:c[1]}}},B)}y[z]=B};mxGraphMlCodec.prototype.styleMap2Str=function(g){var y="",z="",B;for(B in g)z+=y+B+"="+g[B],y=";";return z};-mxGraphMlCodec.prototype.importNode=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),c=g.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);y.addCell(a,z);z={graphMlID:c};for(var b=null,d=null,f=null,k=null,n=0;n<h.length;n++){var p=this.dataElem2Obj(h[n]);if(p.key)if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,p,B,m);else if(p.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)f=-p;else if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)b=p,p["yjs:StringTemplateNodeStyle"]?d=p["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,p,z);else if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)k=p;else if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var x=b=null;for(x in p)if("key"!=x&&"#text"!=x){if("y:ProxyAutoBoundsNode"==x){if(x=p[x]["y:Realizers"])for(var A in x)if("active"!=A&&"#text"!=A){b=x[A][x.active];p={};p[A]=b;break}}else b=-p[x];break}b&&(b[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,b[mxGraphMlConstants.GEOMETRY],B,m),b[mxGraphMlConstants.NODE_LABEL]&&(k=b[mxGraphMlConstants.NODE_LABEL]));b=p;this.addNodeStyle(a,p,z)}}m=this.getDirectChildNamedElements(g,mxGraphMlConstants.PORT);B={};for(n=0;n<m.length;n++)this.importPort(m[n],B);d&&this.handleTemplates(d,f,a,z);this.handleFixedRatio(a,z);this.handleCompoundShape(a,z,b,null);0==z.strokeWidth&&(z.strokeColor="none");a.style=this.styleMap2Str(z);g=this.getDirectChildNamedElements(g,+mxGraphMlCodec.prototype.importNode=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),c=g.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);y.addCell(a,z);z={graphMlID:c};for(var b=null,d=null,f=null,k=null,n=0;n<h.length;n++){var q=this.dataElem2Obj(h[n]);if(q.key)if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,q,B,m);else if(q.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)f=+q;else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)b=q,q["yjs:StringTemplateNodeStyle"]?d=q["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,q,z);else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)k=q;else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var t=b=null;for(t in q)if("key"!=t&&"#text"!=t){if("y:ProxyAutoBoundsNode"==t){if(t=q[t]["y:Realizers"])for(var A in t)if("active"!=A&&"#text"!=A){b=t[A][t.active];q={};q[A]=b;break}}else b=+q[t];break}b&&(b[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,b[mxGraphMlConstants.GEOMETRY],B,m),b[mxGraphMlConstants.NODE_LABEL]&&(k=b[mxGraphMlConstants.NODE_LABEL]));b=q;this.addNodeStyle(a,q,z)}}m=this.getDirectChildNamedElements(g,mxGraphMlConstants.PORT);B={};for(n=0;n<m.length;n++)this.importPort(m[n],B);d&&this.handleTemplates(d,f,a,z);this.handleFixedRatio(a,z);this.handleCompoundShape(a,z,b,null);0==z.strokeWidth&&(z.strokeColor="none");a.style=this.styleMap2Str(z);g=this.getDirectChildNamedElements(g,mxGraphMlConstants.GRAPH);for(n=0;n<g.length;n++)this.importGraph(g[n],y,a,B);k&&this.addLabels(a,k,z,y);this.nodesMap[c]={node:a,ports:B}};-mxGraphMlCodec.prototype.addNodeStyle=function(g,y,z){g=function(H,I){if("line"!=H){I.dashed=1;switch(H){case "DashDot":H="3 1 1 1";break;case "Dot":H="1 1";break;case "DashDotDot":H="3 1 1 1 1 1";break;case "Dash":H="3 1";break;case "dotted":H="1 3";break;case "dashed":H="5 2";break;default:H=H.replace(/0/g,"1")}H&&(0>H.indexOf(" ")&&(H=H+" "+H),I.dashPattern=H)}};g={shape:{key:"shape",mod:"shape"},"y:Shape.type":{key:"shape",mod:"shape"},configuration:{key:"shape",mod:"shape"},type:{key:"shape",-mod:"shape"},assetName:{key:"shape",mod:"shape"},activityType:{key:"shape",mod:"shape"},fill:{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"y:Fill":{color:{key:"fillColor",mod:"color"},transparent:function(H,I){"true"==H&&(I.fillColor="none")}},"y:BorderStyle":{color:{key:"strokeColor",mod:"color"},width:"strokeWidth",hasColor:function(H,I){"false"==H&&(I.strokeColor="none")},+mxGraphMlCodec.prototype.addNodeStyle=function(g,y,z){g=function(H,J){if("line"!=H){J.dashed=1;switch(H){case "DashDot":H="3 1 1 1";break;case "Dot":H="1 1";break;case "DashDotDot":H="3 1 1 1 1 1";break;case "Dash":H="3 1";break;case "dotted":H="1 3";break;case "dashed":H="5 2";break;default:H=H.replace(/0/g,"1")}H&&(0>H.indexOf(" ")&&(H=H+" "+H),J.dashPattern=H)}};g={shape:{key:"shape",mod:"shape"},"y:Shape.type":{key:"shape",mod:"shape"},configuration:{key:"shape",mod:"shape"},type:{key:"shape",+mod:"shape"},assetName:{key:"shape",mod:"shape"},activityType:{key:"shape",mod:"shape"},fill:{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"y:Fill":{color:{key:"fillColor",mod:"color"},transparent:function(H,J){"true"==H&&(J.fillColor="none")}},"y:BorderStyle":{color:{key:"strokeColor",mod:"color"},width:"strokeWidth",hasColor:function(H,J){"false"==H&&(J.strokeColor="none")},type:g},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:g,"dashStyle.yjs:DashStyle.dashes":g,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"}};var B=mxUtils.clone(g);B.defaults={fillColor:"#CCCCCC",strokeColor:"#6881B3"};var m=mxUtils.clone(g);m.defaults={shape:"ext;rounded=1",fillColor:"#FFFFFF",strokeColor:"#000090"};var h=mxUtils.clone(g);h.defaults={shape:"rhombus;fillColor=#FFFFFF;strokeColor=#FFCD28"};var c=mxUtils.clone(g);c.defaults={shape:"hexagon",strokeColor:"#007000"};var a=mxUtils.clone(g);a.defaults={shape:"mxgraph.bpmn.shape;perimeter=ellipsePerimeter;symbol=general",outline:"standard"};a.characteristic={key:"outline",mod:"bpmnOutline"};var b=mxUtils.clone(g);b.defaults={shape:"js:bpmnDataObject"};var d=mxUtils.clone(g);d.defaults={shape:"datastore"};var f=mxUtils.clone(g);f.defaults={shape:"swimlane;swimlaneLine=0;startSize=20;dashed=1;dashPattern=3 1 1 1;collapsible=0;rounded=1"};var k=-mxUtils.clone(g);k.defaults={shape:"js:BpmnChoreography"};var n=mxUtils.clone(g);n.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};n.inset="strokeWidth";n.radius="arcSize";n.drawShadow={key:"shadow",mod:"bool"};n.color={key:"fillColor",mod:"color",addGradient:"north"};n["color.yjs:Color.value"]=n.color;var p=mxUtils.clone(g);p.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};p.drawShadow={key:"shadow",mod:"bool"};var x=mxUtils.clone(g);x.defaults={shape:"swimlane",-startSize:20,strokeWidth:4,spacingLeft:10};x.isCollapsible={key:"collapsible",mod:"bool"};x.borderColor={key:"strokeColor",mod:"color"};x.folderFrontColor={key:"fillColor",mod:"color"};var A=mxUtils.clone(g);A.defaults={shape:"swimlane",startSize:20,spacingLeft:10};A["yjs:PanelNodeStyle"]={color:{key:"swimlaneFillColor",mod:"color"},"color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},labelInsetsColor:{key:"fillColor",mod:"color"},"labelInsetsColor.yjs:Color.value":{key:"fillColor",mod:"color"}};-var C=mxUtils.clone(g);C.defaults={shape:"js:table"};var J=mxUtils.clone(g);J.defaults={shape:"image"};J.image=function(H,I){I.image=H};var M=mxUtils.clone(g);M.defaults={shape:"image"};M["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(H,I){I.image="data:image/svg+xml,"+(window.btoa?btoa(H):Base64.encode(H))};var L=mxUtils.clone(g);L.defaults={shape:"swimlane",startSize:20};L["y:Shape.type"]=function(H,I){"roundrectangle"==H&&(I.rounded=1,I.arcSize=5)};var Q=mxUtils.clone(g);Q.defaults={shape:"js:table2"};-var U=mxUtils.clone(g);U.defaults={gradientDirection:"east"};U["y:Fill"].color2={key:"gradientColor",mod:"color"};U["y:StyleProperties.y:Property"]={"com.yworks.bpmn.characteristic":{key:"outline",mod:"bpmnOutline"},"com.yworks.bpmn.icon.fill":{key:"gradientColor",mod:"color"},"com.yworks.bpmn.icon.fill2":{key:"fillColor",mod:"color"},"com.yworks.bpmn.type":{key:"symbol",mod:"bpmnSymbol"},"y.view.ShadowNodePainter.SHADOW_PAINTING":{key:"shadow",mod:"bool"},doubleBorder:{key:"double",mod:"bool"},"com.yworks.sbgn.style.radius":{key:"arcSize",-mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(y,{"yjs:ShapeNodeStyle":g,"demostyle:FlowchartNodeStyle":g,"demostyle:AssetNodeStyle":B,"bpmn:ActivityNodeStyle":m,"bpmn:GatewayNodeStyle":h,"bpmn:ConversationNodeStyle":c,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":b,"bpmn:DataStoreNodeStyle":d,"bpmn:GroupNodeStyle":f,"bpmn:ChoreographyNodeStyle":k,"yjs:BevelNodeStyle":n,"yjs:ShinyPlateNodeStyle":p,"demostyle:DemoGroupStyle":x,"yjs:CollapsibleNodeStyleDecorator":A,-"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":J,"y:ShapeNode":g,"y:GenericNode":U,"y:GenericGroupNode":U,"y:TableNode":Q,"y:SVGNode":M,"y:GroupNode":L},z)};+mxUtils.clone(g);k.defaults={shape:"js:BpmnChoreography"};var n=mxUtils.clone(g);n.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};n.inset="strokeWidth";n.radius="arcSize";n.drawShadow={key:"shadow",mod:"bool"};n.color={key:"fillColor",mod:"color",addGradient:"north"};n["color.yjs:Color.value"]=n.color;var q=mxUtils.clone(g);q.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};q.drawShadow={key:"shadow",mod:"bool"};var t=mxUtils.clone(g);t.defaults={shape:"swimlane",+startSize:20,strokeWidth:4,spacingLeft:10};t.isCollapsible={key:"collapsible",mod:"bool"};t.borderColor={key:"strokeColor",mod:"color"};t.folderFrontColor={key:"fillColor",mod:"color"};var A=mxUtils.clone(g);A.defaults={shape:"swimlane",startSize:20,spacingLeft:10};A["yjs:PanelNodeStyle"]={color:{key:"swimlaneFillColor",mod:"color"},"color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},labelInsetsColor:{key:"fillColor",mod:"color"},"labelInsetsColor.yjs:Color.value":{key:"fillColor",mod:"color"}};+var C=mxUtils.clone(g);C.defaults={shape:"js:table"};var I=mxUtils.clone(g);I.defaults={shape:"image"};I.image=function(H,J){J.image=H};var M=mxUtils.clone(g);M.defaults={shape:"image"};M["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(H,J){J.image="data:image/svg+xml,"+(window.btoa?btoa(H):Base64.encode(H))};var K=mxUtils.clone(g);K.defaults={shape:"swimlane",startSize:20};K["y:Shape.type"]=function(H,J){"roundrectangle"==H&&(J.rounded=1,J.arcSize=5)};var Q=mxUtils.clone(g);Q.defaults={shape:"js:table2"};+var S=mxUtils.clone(g);S.defaults={gradientDirection:"east"};S["y:Fill"].color2={key:"gradientColor",mod:"color"};S["y:StyleProperties.y:Property"]={"com.yworks.bpmn.characteristic":{key:"outline",mod:"bpmnOutline"},"com.yworks.bpmn.icon.fill":{key:"gradientColor",mod:"color"},"com.yworks.bpmn.icon.fill2":{key:"fillColor",mod:"color"},"com.yworks.bpmn.type":{key:"symbol",mod:"bpmnSymbol"},"y.view.ShadowNodePainter.SHADOW_PAINTING":{key:"shadow",mod:"bool"},doubleBorder:{key:"double",mod:"bool"},"com.yworks.sbgn.style.radius":{key:"arcSize",+mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(y,{"yjs:ShapeNodeStyle":g,"demostyle:FlowchartNodeStyle":g,"demostyle:AssetNodeStyle":B,"bpmn:ActivityNodeStyle":m,"bpmn:GatewayNodeStyle":h,"bpmn:ConversationNodeStyle":c,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":b,"bpmn:DataStoreNodeStyle":d,"bpmn:GroupNodeStyle":f,"bpmn:ChoreographyNodeStyle":k,"yjs:BevelNodeStyle":n,"yjs:ShinyPlateNodeStyle":q,"demostyle:DemoGroupStyle":t,"yjs:CollapsibleNodeStyleDecorator":A,+"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":I,"y:ShapeNode":g,"y:GenericNode":S,"y:GenericGroupNode":S,"y:TableNode":Q,"y:SVGNode":M,"y:GroupNode":K},z)};mxGraphMlCodec.prototype.handleTemplates=function(g,y,z,B){if(g){var m=z.geometry.width,h=z.geometry.height;z='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+m+" "+h+'"><g>';for(var c,a=[],b=/\{TemplateBinding\s+([^}]+)\}/g;null!=(c=b.exec(g));){var d="";switch(c[1]){case "width":d=m;break;case "height":d=h}a.push({match:c[0],repl:d})}if(y&&y["y:Json"])for(y=JSON.parse(y["y:Json"]["#text"]),m=/\{Binding\s+([^}]+)\}/g;null!=(c=m.exec(g));)if(h=c[1].split(","),b=y[h[0]])1<h.length&&h[1].indexOf("Converter=")&&(d=mxGraphMlConverters[h[1].substr(11)])&&(b=[b],h[2]&&b.push(h[2].substr(11)),b=d.apply(null,b)),a.push({match:c[0],repl:mxUtils.htmlEntities(b)});for(c=0;c<a.length;c++)g=g.replace(a[c].match,a[c].repl);a=[];for(y=/<text.+data-content="([^"]+).+<\/text>/g;null!=(c=y.exec(g));)b=c[0].substr(0,c[0].length-7)+c[1]+"</text>",a.push({match:c[0],repl:b});for(c=0;c<a.length;c++)g=g.replace(a[c].match,a[c].repl);g=z+g+"</g></svg>";B.shape="image";B.image="data:image/svg+xml,"+(window.btoa?btoa(g):Base64.encode(g))}};@@ -1655,16 +1655,16 @@ mod:"color"},thickness:"strokeWidth"}},"backgroundStyle.yjs:ShapeNodeStyle.fill""Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",mod:"color"},backgroundFill:{key:"oddLaneFill",mod:"color"}}},"Style.yjs:NodeStyleStripeStyleAdapter":{"demotablestyle:DemoStripeStyle":{"stripeInsetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableLineFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"strokeColor",mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(B.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":n},k);c={};b={Insets:function(A,C){C.startSize=A.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",mod:"color"},backgroundFill:{key:"oddLaneFill",mod:"color"}}},"Style.yjs:NodeStyleStripeStyleAdapter":{"demotablestyle:DemoStripeStyle":{"stripeInsetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableLineFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"strokeColor",mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"width"};this.mapObject(B.ColumnDefaults,{defaults:{shape:"swimlane;collapsible=0",startSize:"0",fillColor:"none"},-"y:StripeDefaults":b},c);h=g.geometry;a=B.Rows["y:Row"];d+=parseFloat(c.startSize);var p=f.x,x=f.x;f.lx=f.x;if(a)for(a instanceof Array||(a=[a]),h=0;h<a.length;h++)f.x=x,f.lx=x,d=this.addRow(a[h],g,h&1,d,f,n,k),p=Math.max(f.x,p);B=B.Columns["y:Column"];a=p;if(B)for(B instanceof Array||(B=[B]),h=0;h<B.length;h++)a=this.addColumn(B[h],g,h&1,a,z,b,c);break;case "js:table2":y.shape="swimlane;collapsible=0;swimlaneLine=0";B={};this.mapObject(z,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor",+"y:StripeDefaults":b},c);h=g.geometry;a=B.Rows["y:Row"];d+=parseFloat(c.startSize);var q=f.x,t=f.x;f.lx=f.x;if(a)for(a instanceof Array||(a=[a]),h=0;h<a.length;h++)f.x=t,f.lx=t,d=this.addRow(a[h],g,h&1,d,f,n,k),q=Math.max(f.x,q);B=B.Columns["y:Column"];a=q;if(B)for(B instanceof Array||(B=[B]),h=0;h<B.length;h++)a=this.addColumn(B[h],g,h&1,a,z,b,c);break;case "js:table2":y.shape="swimlane;collapsible=0;swimlaneLine=0";B={};this.mapObject(z,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor",mod:"color"},"yed.table.header.height":"headerH","yed.table.header.color.main":{key:"headerColor",mod:"color"},"yed.table.header.color.alternating":{key:"headerColorAlt",mod:"color"},"yed.table.lane.color.main":{key:"laneColor",mod:"color"},"yed.table.lane.color.alternating":{key:"laneColorAlt",mod:"color"},"yed.table.lane.style":"laneStyle","com.yworks.bpmn.type":"isHorz",POOL_LANE_COLOR_ALTERNATING:{key:"laneColorAlt",mod:"color"},POOL_LANE_COLOR_MAIN:{key:"laneColor",mod:"color"},POOL_LANE_STYLE:"laneStyle",POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},B);y.swimlaneFillColor=y.fillColor;n=c=0;"pool_type_lane_and_column"==B.isHorz||"pool_type_empty"==B.isHorz||"pool_type_lane"==B.isHorz?n=parseFloat(B.tblHWidth):c=parseFloat(B.tblHHeight);y.startSize=c?c:n;try{a=z["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];b=z["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];d="lane.style.rows"==B.laneStyle||"lane_style_rows"==B.laneStyle;a instanceof Array||(a=[a]);b instanceof Array||(b=[b]);f=parseFloat(B.rowHWidth);for(h=0;h<a.length;h++)a[h]["y:Insets"]&&(f=Math.max(f,parseFloat(a[h]["y:Insets"].left)+parseFloat(a[h]["y:Insets"].right)));k=parseFloat(B.colHHeight);for(h=0;h<b.length;h++)b[h]["y:Insets"]&&(k=Math.max(k,parseFloat(b[h]["y:Insets"].top)+parseFloat(b[h]["y:Insets"].bottom)));d?(this.addTbl2Rows(g,a,c,n,f,k,d,B),this.addTbl2Cols(g,b,c,n,f,k,d,B)):(this.addTbl2Cols(g,b,c,n,f,k,d,B),this.addTbl2Rows(g,a,c,n,f,k,d,B))}catch(A){}break;case "js:relationship_big_entity":y.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(g=z["y:GenericNode"]["y:Fill"])y.fillColor=g.color2,y.swimlaneFillColor=g.color;break;case "js:relationship_attribute":y.shape="1"==y["double"]?"doubleEllipse":"ellipse"}0<m.indexOf("Shadow")&&(y.shadow="1")}};-mxGraphMlCodec.prototype.addTbl2Rows=function(g,y,z,B,m,h,c,a){z+=h;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0;horizontal=0",startSize:m,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none",n.swimlaneLine="0");if(c){var p=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=p?p:n.swimlaneFillColor}f=parseFloat(y[d].height);p=b&&0==d?h:0;-k.geometry=new mxGeometry(B,z-p,g.geometry.width-B,f+p);z+=f;k.style=this.styleMap2Str(n);g.insert(k)}};-mxGraphMlCodec.prototype.addTbl2Cols=function(g,y,z,B,m,h,c,a){B=m+B;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0",startSize:h,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none");if(!c){var p=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=p?p:n.swimlaneFillColor}f=parseFloat(y[d].width);p=b&&0==d?m:0;k.geometry=new mxGeometry(B-p,-z,f+p,g.geometry.height-z);B+=f;k.style=this.styleMap2Str(n);g.insert(k)}};+mxGraphMlCodec.prototype.addTbl2Rows=function(g,y,z,B,m,h,c,a){z+=h;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0;horizontal=0",startSize:m,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none",n.swimlaneLine="0");if(c){var q=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=q?q:n.swimlaneFillColor}f=parseFloat(y[d].height);q=b&&0==d?h:0;+k.geometry=new mxGeometry(B,z-q,g.geometry.width-B,f+q);z+=f;k.style=this.styleMap2Str(n);g.insert(k)}};+mxGraphMlCodec.prototype.addTbl2Cols=function(g,y,z,B,m,h,c,a){B=m+B;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0",startSize:h,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none");if(!c){var q=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=q?q:n.swimlaneFillColor}f=parseFloat(y[d].width);q=b&&0==d?m:0;k.geometry=new mxGeometry(B-q,+z,f+q,g.geometry.height-z);B+=f;k.style=this.styleMap2Str(n);g.insert(k)}};mxGraphMlCodec.prototype.addRow=function(g,y,z,B,m,h,c){var a=new mxCell;a.vertex=!0;var b=mxUtils.clone(c);this.mapObject(g,h,b);z?(b.oddFill&&(b.fillColor=b.oddFill),b.oddLaneFill&&(b.swimlaneFillColor=b.oddLaneFill)):(b.evenFill&&(b.fillColor=b.evenFill),b.evenLaneFill&&(b.swimlaneFillColor=b.evenLaneFill));z=parseFloat(b.height);a.geometry=new mxGeometry(m.lx,B,y.geometry.width-m.lx,z);var d=g.Labels;d&&this.addLabels(a,d,b);a.style=this.styleMap2Str(b);y.insert(a);g=g["y:Row"];m.lx=0;b.startSize&&(m.lx=parseFloat(b.startSize),m.x+=m.lx);y=b=m.x;d=m.lx;var f=0;if(g){g instanceof Array||(g=[g]);for(var k=0;k<g.length;k++)m.x=b,m.lx=d,f=this.addRow(g[k],a,k&1,f,m,h,c),y=Math.max(m.x,y)}m.x=y;z=Math.max(z,f);a.geometry.height=z;return B+=z};mxGraphMlCodec.prototype.addColumn=function(g,y,z,B,m,h,c){var a=new mxCell;a.vertex=!0;var b=mxUtils.clone(c);this.mapObject(g,h,b);z?(b.oddFill&&(b.fillColor=b.oddFill),b.oddLaneFill&&(b.swimlaneFillColor=b.oddLaneFill)):(b.evenFill&&(b.fillColor=b.evenFill),b.evenLaneFill&&(b.swimlaneFillColor=b.evenLaneFill));z=parseFloat(b.width);a.geometry=new mxGeometry(B,m,z,y.geometry.height-m);var d=g.Labels;d&&this.addLabels(a,d,b);a.style=this.styleMap2Str(b);y.insert(a);g=g["y:Column"];y=0;if(g)for(g instanceof@@ -1680,16 +1680,16 @@ mxGraphMlCodec.prototype.addEdgeStyle=function(g,y,z){g=function(a,b){b.dashed=1h={defaults:{rounded:0,endArrow:"none"},configuration:{key:"shape",mod:"shape"},"y:LineStyle":{color:{key:"strokeColor",mod:"color"},type:function(a,b){"line"!=a&&(b.dashed=1);var d=null;switch(a){case "dashed":d="3 1";break;case "dotted":d="1 1";break;case "dashed_dotted":d="3 2 1 2"}d&&(b.dashPattern=d)},width:"strokeWidth"},"y:Arrows":{source:function(a,b){b.startArrow=mxGraphMlArrowsMap[a]||"classic";m(a,b)},target:function(a,b){b.endArrow=mxGraphMlArrowsMap[a]||"classic";B(a,b)}},"y:BendStyle":{smoothed:{key:"rounded",mod:"bool"}}},c=mxUtils.clone(h);c.defaults.curved="1";this.mapObject(y,{"yjs:PolylineEdgeStyle":{defaults:{endArrow:"none",rounded:0},smoothingLength:function(a,b){b.rounded=a&&0<parseFloat(a)?"1":"0"},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:g,"dashStyle.yjs:DashStyle.dashes":g,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"},targetArrow:{key:"endArrow",mod:"arrow"},"targetArrow.yjs:Arrow":{defaults:{endArrow:"classic",endFill:"1",endSize:"6"},fill:B,scale:{key:"endSize",mod:"scale",scale:5},type:{key:"endArrow",mod:"arrow"}},sourceArrow:{key:"startArrow",mod:"arrow"},"sourceArrow.yjs:Arrow":{defaults:{startArrow:"classic",startFill:"1",startSize:"6"},fill:m,scale:{key:"startSize",mod:"scale",scale:5},type:{key:"startArrow",mod:"arrow"}}},"y:PolyLineEdge":h,"y:GenericEdge":h,"y:ArcEdge":c,"y:BezierEdge":c,"y:QuadCurveEdge":c,"y:SplineEdge":c},z)};-mxGraphMlCodec.prototype.addLabels=function(g,y,z,B,m){z=g.getChildCount();var h=y[mxGraphMlConstants.Y_LABEL]||y;y=[];var c=[],a=[];if(h){h instanceof Array||(h=[h]);for(var b=0;b<h.length;b++){var d=h[b],f={},k=d[mxGraphMlConstants.TEXT]||d;k&&(k=k["#text"]);var n=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},p=function(L,Q){L&&(L=L.toUpperCase());var U=Q.fontStyle||0;switch(L){case "ITALIC":U|=2;break;case "BOLD":U|=1;break;case "UNDERLINE":U|=4}Q.fontStyle=U};this.mapObject(d,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor",-mod:"color"},"backgroundFill.yjs:SolidColorFill.color":{key:"labelBackgroundColor",mod:"color"},backgroundStroke:{key:"labelBorderColor",mod:"color"},"backgroundStroke.yjs:Stroke.fill":{key:"labelBorderColor",mod:"color"},textFill:{key:"fontColor",mod:"color"},"textFill.yjs:SolidColorFill.color":{key:"fontColor",mod:"color"},textSize:"fontSize",horizontalTextAlignment:"align",verticalTextAlignment:"verticalAlign",wrapping:function(L,Q){L&&(Q.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",-fontSize:"fontSize",fontStyle:p,fontWeight:p,textDecoration:p}},"Style.y:VoidLabelStyle":function(L,Q){Q.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:p,underlinedText:function(L,Q){var U=Q.fontStyle||0;"true"==L&&(U|=4);Q.fontStyle=U},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},f);f.VoidLbl||"0"==f.hasText||(y.push(k),c.push(f),a.push(n))}}for(b=+mxGraphMlCodec.prototype.addLabels=function(g,y,z,B,m){z=g.getChildCount();var h=y[mxGraphMlConstants.Y_LABEL]||y;y=[];var c=[],a=[];if(h){h instanceof Array||(h=[h]);for(var b=0;b<h.length;b++){var d=h[b],f={},k=d[mxGraphMlConstants.TEXT]||d;k&&(k=k["#text"]);var n=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},q=function(K,Q){K&&(K=K.toUpperCase());var S=Q.fontStyle||0;switch(K){case "ITALIC":S|=2;break;case "BOLD":S|=1;break;case "UNDERLINE":S|=4}Q.fontStyle=S};this.mapObject(d,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor",+mod:"color"},"backgroundFill.yjs:SolidColorFill.color":{key:"labelBackgroundColor",mod:"color"},backgroundStroke:{key:"labelBorderColor",mod:"color"},"backgroundStroke.yjs:Stroke.fill":{key:"labelBorderColor",mod:"color"},textFill:{key:"fontColor",mod:"color"},"textFill.yjs:SolidColorFill.color":{key:"fontColor",mod:"color"},textSize:"fontSize",horizontalTextAlignment:"align",verticalTextAlignment:"verticalAlign",wrapping:function(K,Q){K&&(Q.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",+fontSize:"fontSize",fontStyle:q,fontWeight:q,textDecoration:q}},"Style.y:VoidLabelStyle":function(K,Q){Q.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:q,underlinedText:function(K,Q){var S=Q.fontStyle||0;"true"==K&&(S|=4);Q.fontStyle=S},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},f);f.VoidLbl||"0"==f.hasText||(y.push(k),c.push(f),a.push(n))}}for(b=0;b<y.length;b++)if(y[b]&&(!a[b]||!a[b]["bpmn:ParticipantParameter"])){y[b]=mxUtils.htmlEntities(y[b],!1).replace(/\n/g,"<br/>");n=g.geometry;f=new mxCell(y[b],new mxGeometry(0,0,n.width,n.height),"text;html=1;spacing=0;"+this.styleMap2Str(c[b]));f.vertex=!0;g.insert(f,z);h=f.geometry;if(a[b]["y:RatioAnchoredLabelModelParameter"])n=mxUtils.getSizeForString(y[b],c[b].fontSize,c[b].fontFamily),(d=a[b]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(d=d.split(","),h.x=parseFloat(d[0]),h.y=parseFloat(d[1]),h.width=n.width,h.height=n.height,f.style+=";spacingTop=-4;"):f.style+=";align=center;";else if(a[b]["y:InteriorLabelModel"]){switch(a[b]["y:InteriorLabelModel"]){case "Center":f.style+=";verticalAlign=middle;";break;case "North":h.height=1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90"}f.style+=";align=center;"}else if(a[b]["y:StretchStripeLabelModel"]||a[b]["y:StripeLabelModelParameter"])switch(a[b]["y:StretchStripeLabelModel"]||a[b]["y:StripeLabelModelParameter"].Position){case "North":h.height=1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}else if(a[b]["bpmn:PoolHeaderLabelModel"]){switch(a[b]["bpmn:PoolHeaderLabelModel"]){case "NORTH":h.height=1;break;case "WEST":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}f.style+=";align=center;"}else if(a[b]["y:InteriorStretchLabelModelParameter"])f.style+=";align=center;";else if(a[b]["y:ExteriorLabelModel"])switch(a[b]["y:ExteriorLabelModel"]){case "East":f.style+=";labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;";break;case "South":f.style+=";labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;";break;case "North":f.style+=";labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;";break;case "West":f.style+=";labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;"}else if(a[b]["y:FreeEdgeLabelModelParameter"]){h.relative=!0;h.adjustIt=!0;n=a[b]["y:FreeEdgeLabelModelParameter"];-d=n.Ratio;p=n.Distance;var x=n.Angle;d&&(h.x=parseFloat(d));p&&(h.y=parseFloat(p));x&&(f.style+=";rotation="+parseFloat(x)*(180/Math.PI));f.style+=";verticalAlign=middle;"}else if(a[b]["y:EdgePathLabelModelParameter"]){h.relative=!0;n=a[b]["y:EdgePathLabelModelParameter"];k=n.SideOfEdge;d=n.SegmentRatio;h.x=d?2*parseFloat(d)-1:0;if(k)switch(k){case "RightOfEdge":h.y=-15;break;case "LeftOfEdge":h.y=15}f.style+=";verticalAlign=middle;"}else if(n=parseFloat(a[b].x),d=parseFloat(a[b].y),a[b].width&&(h.width=-parseFloat(a[b].width)),a[b].height&&(h.height=parseFloat(a[b].height)),g.edge)if(h.relative=!0,h.x=0,h.y=0,f=g.source.geometry.getCenterX()-g.target.geometry.getCenterX(),k=g.source.geometry.getCenterY()-g.target.geometry.getCenterY(),B&&m&&a[b]["y:ModelParameter"]&&a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){n=a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"];x=parseFloat(n.angle);p=parseFloat(n.distance);var A=n.position;d=parseFloat(n.ratio);n=parseFloat(n.segment);var C=-new mxCellState;C.absolutePoints=m;B.view.updateEdgeBounds(C);var J="left"==A?1:-1;if(-1==n&&6.283185307179586==x)h.offset=new mxPoint(1>Math.abs(d)?C.segments[0]*d:d,J*p);else{-1==n&&(n=0);for(var M=x=0;M<n;M++)x+=C.segments[M];x+=C.segments[n]*d;h.x=x/C.length*2-1;h.y=(("center"==A?0:p)+h.height/2*J*(Math.abs(f)>Math.abs(k)?1:-1))*J}}else isNaN(n)||isNaN(d)||(h.offset=new mxPoint(n+f/2+(0<f?-h.width:h.width),d));else h.x=n||0,h.y=d||0;c[b].rotation&&270==c[b].rotation&&(h.x-=h.height/2)}return{lblTxts:y,+d=n.Ratio;q=n.Distance;var t=n.Angle;d&&(h.x=parseFloat(d));q&&(h.y=parseFloat(q));t&&(f.style+=";rotation="+parseFloat(t)*(180/Math.PI));f.style+=";verticalAlign=middle;"}else if(a[b]["y:EdgePathLabelModelParameter"]){h.relative=!0;n=a[b]["y:EdgePathLabelModelParameter"];k=n.SideOfEdge;d=n.SegmentRatio;h.x=d?2*parseFloat(d)-1:0;if(k)switch(k){case "RightOfEdge":h.y=-15;break;case "LeftOfEdge":h.y=15}f.style+=";verticalAlign=middle;"}else if(n=parseFloat(a[b].x),d=parseFloat(a[b].y),a[b].width&&(h.width=+parseFloat(a[b].width)),a[b].height&&(h.height=parseFloat(a[b].height)),g.edge)if(h.relative=!0,h.x=0,h.y=0,f=g.source.geometry.getCenterX()-g.target.geometry.getCenterX(),k=g.source.geometry.getCenterY()-g.target.geometry.getCenterY(),B&&m&&a[b]["y:ModelParameter"]&&a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){n=a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"];t=parseFloat(n.angle);q=parseFloat(n.distance);var A=n.position;d=parseFloat(n.ratio);n=parseFloat(n.segment);var C=+new mxCellState;C.absolutePoints=m;B.view.updateEdgeBounds(C);var I="left"==A?1:-1;if(-1==n&&6.283185307179586==t)h.offset=new mxPoint(1>Math.abs(d)?C.segments[0]*d:d,I*q);else{-1==n&&(n=0);for(var M=t=0;M<n;M++)t+=C.segments[M];t+=C.segments[n]*d;h.x=t/C.length*2-1;h.y=(("center"==A?0:q)+h.height/2*I*(Math.abs(f)>Math.abs(k)?1:-1))*I}}else isNaN(n)||isNaN(d)||(h.offset=new mxPoint(n+f/2+(0<f?-h.width:h.width),d));else h.x=n||0,h.y=d||0;c[b].rotation&&270==c[b].rotation&&(h.x-=h.height/2)}return{lblTxts:y,lblStyles:c}};mxGraphMlCodec.prototype.processPage=function(g,y){g=(new mxCodec).encode(g.getModel());g.setAttribute("style","default-style2");g=mxUtils.getXml(g);y='<diagram name="Page '+y+'">'+Graph.compress(g);return y+"</diagram>"};mxGraphMlCodec.prototype.getDirectChildNamedElements=function(g,y){var z=[];for(g=g.firstChild;null!=g;g=g.nextSibling)null!=g&&1==g.nodeType&&y==g.nodeName&&z.push(g);return z};mxGraphMlCodec.prototype.getDirectFirstChildNamedElements=function(g,y){for(g=g.firstChild;null!=g;g=g.nextSibling)if(null!=g&&1==g.nodeType&&y==g.nodeName)return g;return null};mxGraphMlCodec.prototype.getDirectChildElements=function(g){var y=[];for(g=g.firstChild;null!=g;g=g.nextSibling)null!=g&&1==g.nodeType&&y.push(g);return y};mxGraphMlCodec.prototype.getDirectFirstChildElement=function(g){for(g=g.firstChild;null!=g;g=g.nextSibling)if(null!=g&&1==g.nodeType)return g;return null};var mxGraphMlConverters={"orgchartconverters.linebreakconverter":function(g,y){if("string"===typeof g){for(var z=g;20<z.length&&-1<z.indexOf(" ");)z=z.substring(0,z.lastIndexOf(" "));return"true"===y?z:g.substring(z.length)}return""},"orgchartconverters.borderconverter":function(g,y){return"boolean"===typeof g?g?"#FFBB33":"rgba(0,0,0,0)":"#FFF"},"orgchartconverters.addhashconverter":function(g,y){return"string"===typeof g?"string"===typeof y?"#"+g+y:"#"+g:g},"orgchartconverters.intermediateconverter":function(g,diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.jsindex 082f4f15b..7305065d5 100644--- a/src/main/webapp/js/integrate.min.js+++ b/src/main/webapp/js/integrate.min.js@@ -64,7 +64,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);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"26.0.7",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.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.9",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&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.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||@@ -2061,21 +2061,21 @@ var WrapperWindow=function(a,b,e,f,h,d,g){var m=a.createSidebarContainer();g(m);(function(){mxGraphView.prototype.validateBackgroundPage=function(){var g=this.graph;if(null!=g.container&&!g.transparentBackground){if(g.pageVisible){var m=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var p=g.container.firstChild;null!=p&&p.nodeType!=mxConstants.NODETYPE_ELEMENT;)p=p.nextSibling;null!=p&&(this.backgroundPageShape=this.createBackgroundPageShape(m),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(g.container),p.style.position="absolute",g.container.insertBefore(this.backgroundPageShape.node,p),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(k){g.dblClick(k)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(k){g.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){null!=g.tooltipHandler&&g.tooltipHandler.isHideOnHover()&&g.tooltipHandler.hide();g.isMouseDown&&!mxEvent.isConsumed(k)&&g.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){g.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(k))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=m,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};-mxGraphView.prototype.validateBackgroundStyles=function(g,m,p){var k=this.graph;g=null!=g?g:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,x=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,z=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",C="none",E="";if(k.isGridEnabled()||k.gridVisible){E=10;mxClient.IS_SVG?(C=unescape(encodeURIComponent(this.createSvgGrid(z,g))),C=window.btoa?-btoa(C):Base64.encode(C,!0),C="url(data:image/svg+xml;base64,"+C+")",E=k.gridSize*this.scale*this.gridSteps*g):C="url("+this.gridImage+")";var D=z=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var G=k.gridSize*this.scale*this.gridSteps,I=m%G;G=p%G;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),z=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*this.scale-z+m,E)+I*g)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale--D+p,E)+G*g)+"px"}g=k.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);z=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=C,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=x,k.view.backgroundPageShape.node.style.colorScheme="none"==k.getAdaptiveColors()?"light":"",k.container.classList.add("geDiagramBackdrop"),-g.style.backgroundImage="none",g.style.backgroundColor="",k.container.style.backgroundColor=z?k.diagramBackgroundColor:""):(k.container.classList.remove("geDiagramBackdrop"),g.style.backgroundPosition=E,g.style.backgroundImage=C,!z||null!=k.background&&k.background!=mxConstants.NONE?g.style.backgroundColor=u:(g.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(g,m){for(var p=this.graph.gridSize*this.scale*(null!=m?m:-1);p<this.minGridSize;)p*=2;m=this.gridSteps*p;for(var k=[],u=1;u<this.gridSteps;u++){var x=u*p;k.push("M 0 "+x+" L "+m+" "+x+" M "+x+" 0 L "+x+" "+m)}g=mxUtils.getLightDarkColor(g);p="color-scheme: light dark;";mxClient.IS_SF&&(p="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+p+'" width="'+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+-k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){a.apply(this,arguments);if(null!=this.shiftPreview1){var p=this.view.canvas;null!=-p.ownerSVGElement&&(p=p.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+g,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";p.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(g,m,p){var k=this.view.scale,u=this.view.translate,x=this.pageFormat,z=k*this.pageScale,C=this.view.getBackgroundPageBounds();m=C.width;p=C.height;var E=new mxRectangle(k*u.x,k*-u.y,x.width*z,x.height*z),D=(g=g&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,G=g?Math.ceil(m/E.width)-1:0,I=C.x+m,L=C.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);g=mxUtils.bind(this,function(T){if(null!=T){for(var K=T==this.horizontalPageBreaks?D:G,U=0;U<=K;U++){var Y=T==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),Math.round(C.y+(U+1)*E.height)),new mxPoint(Math.round(I),-Math.round(C.y+(U+1)*E.height))]:[new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(L))];null!=T[U]?(T[U].points=Y,T[U].redraw()):(Y=new mxPolyline(Y,this.pageBreakColor),Y.dialect=this.dialect,Y.isDashed=this.pageBreakDashed,Y.pointerEvents=!1,Y.init(this.view.backgroundPane),Y.redraw(),T[U]=Y)}for(U=K;U<T.length;U++)null!=T[U]&&T[U].destroy();T.splice(K,T.length-K)}});g(this.horizontalPageBreaks);g(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;-mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(g,m,p){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var g=e.apply(this,arguments);g.intersects=mxUtils.bind(this,function(m,p){return this.isConnecting()?-!0:mxCellMarker.prototype.intersects.apply(g,arguments)});return g};mxGraphView.prototype.createBackgroundPageShape=function(g){return new mxRectangleShape(g,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var g=this.getGraphBounds(),m=0<g.width?g.x/this.scale-this.translate.x:0,p=0<g.height?g.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,u=this.graph.pageScale,x=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/x);var z=Math.floor(Math.min(0,-p)/k);return new mxRectangle(this.scale*(this.translate.x+u*x),this.scale*(this.translate.y+z*k),this.scale*(Math.ceil(Math.max(1,m+g.width/this.scale)/x)-u)*x,this.scale*(Math.ceil(Math.max(1,p+g.height/this.scale)/k)-z)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){f.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=-g+"px",this.view.backgroundPageShape.node.style.marginTop=m+"px")};var h=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(g,m,p,k,u,x){var z=h.apply(this,arguments);null==x||x||mxEvent.addListener(z,"mousedown",function(C){mxEvent.consume(C)});return z};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(g,m,p){var k=this.graph.model.getParent(g);if(m){var u=this.graph.model.isEdge(g)?null:this.graph.getCellGeometry(g);-u=!this.graph.model.isEdge(k)&&!this.graph.isSiblingSelected(g)&&(null!=u&&u.relative||!this.graph.isContainer(k)||this.graph.isPart(g))}else if(u=d.apply(this,arguments),this.graph.isTableCell(g)||this.graph.isTableRow(g))u=k,this.graph.isTable(u)||(u=this.graph.model.getParent(u)),u=!this.graph.selectionCellsHandler.isHandled(u)||this.graph.isCellSelected(u)&&this.graph.isToggleEvent(p.getEvent())||this.graph.isCellSelected(g)&&!this.graph.isToggleEvent(p.getEvent())||this.graph.isTableCell(g)&&-this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(g){g=g.getCell();for(var m=this.graph.getModel(),p=m.getParent(g),k=this.graph.view.getState(p),u=this.graph.isCellSelected(g);null!=k&&(m.isVertex(p)||m.isEdge(p));){var x=this.graph.isCellSelected(p);u=u||x;if(x||!u&&(this.graph.isTableCell(g)||this.graph.isTableRow(g)))g=p;p=m.getParent(p)}return g}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,h=this.editor.graph;h.lightbox=e;var d=h.getGraphBounds;h.getGraphBounds=function(){var M=d.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var aa=this.view.translate,ia=this.view.scale;M=mxRectangle.fromRectangle(M);M.add(new mxRectangle((aa.x+V.x)*ia,(aa.y+V.y)*ia,V.width*ia,V.height*ia))}return M};h.useCssTransforms&&+mxGraphView.prototype.validateBackgroundStyles=function(g,m,p){var k=this.graph;g=null!=g?g:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,x=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,z=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",C="none",E="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){E=+10;mxClient.IS_SVG?(C=unescape(encodeURIComponent(this.createSvgGrid(z,g))),C=window.btoa?btoa(C):Base64.encode(C,!0),C="url(data:image/svg+xml;base64,"+C+")",E=k.gridSize*this.scale*this.gridSteps*g):C="url("+this.gridImage+")";var D=z=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var G=k.gridSize*this.scale*this.gridSteps,I=m%G;G=p%G;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),z=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*+this.scale-z+m,E)+I*g)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale-D+p,E)+G*g)+"px"}g=k.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);z=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=C,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=x,k.view.backgroundPageShape.node.style.colorScheme=+"none"==k.getAdaptiveColors()?"light":"",k.container.classList.add("geDiagramBackdrop"),g.style.backgroundImage="none",g.style.backgroundColor="",k.container.style.backgroundColor=z?k.diagramBackgroundColor:""):(k.container.classList.remove("geDiagramBackdrop"),g.style.backgroundPosition=E,g.style.backgroundImage=C,!z||null!=k.background&&k.background!=mxConstants.NONE?g.style.backgroundColor=u:(g.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=+function(g,m){for(var p=this.graph.gridSize*this.scale*(null!=m?m:1);p<this.minGridSize;)p*=2;m=this.gridSteps*p;for(var k=[],u=1;u<this.gridSteps;u++){var x=u*p;k.push("M 0 "+x+" L "+m+" "+x+" M "+x+" 0 L "+x+" "+m)}g=mxUtils.getLightDarkColor(g);p="color-scheme: light dark;";mxClient.IS_SF&&(p="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+p+'" width="'+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'++m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){a.apply(this,arguments);+if(null!=this.shiftPreview1){var p=this.view.canvas;null!=p.ownerSVGElement&&(p=p.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+g,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";p.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(g,m,p){var k=this.view.scale,u=this.view.translate,x=this.pageFormat,z=k*this.pageScale,C=this.view.getBackgroundPageBounds();+m=C.width;p=C.height;var E=new mxRectangle(k*u.x,k*u.y,x.width*z,x.height*z),D=(g=g&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,G=g?Math.ceil(m/E.width)-1:0,I=C.x+m,L=C.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);g=mxUtils.bind(this,function(T){if(null!=T){for(var K=T==this.horizontalPageBreaks?D:G,U=0;U<=K;U++){var Y=T==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),+Math.round(C.y+(U+1)*E.height)),new mxPoint(Math.round(I),Math.round(C.y+(U+1)*E.height))]:[new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(L))];null!=T[U]?(T[U].points=Y,T[U].redraw()):(Y=new mxPolyline(Y,this.pageBreakColor),Y.dialect=this.dialect,Y.isDashed=this.pageBreakDashed,Y.pointerEvents=!1,Y.init(this.view.backgroundPane),Y.redraw(),T[U]=Y)}for(U=K;U<T.length;U++)null!=T[U]&&T[U].destroy();T.splice(K,T.length-K)}});g(this.horizontalPageBreaks);+g(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(g,m,p){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var g=+e.apply(this,arguments);g.intersects=mxUtils.bind(this,function(m,p){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(g,arguments)});return g};mxGraphView.prototype.createBackgroundPageShape=function(g){return new mxRectangleShape(g,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var g=this.getGraphBounds(),m=0<g.width?g.x/this.scale-this.translate.x:0,p=0<g.height?g.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,+u=this.graph.pageScale,x=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/x);var z=Math.floor(Math.min(0,p)/k);return new mxRectangle(this.scale*(this.translate.x+u*x),this.scale*(this.translate.y+z*k),this.scale*(Math.ceil(Math.max(1,m+g.width/this.scale)/x)-u)*x,this.scale*(Math.ceil(Math.max(1,p+g.height/this.scale)/k)-z)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){f.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=g+"px",this.view.backgroundPageShape.node.style.marginTop=m+"px")};var h=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(g,m,p,k,u,x){var z=h.apply(this,arguments);null==x||x||mxEvent.addListener(z,"mousedown",function(C){mxEvent.consume(C)});return z};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=+function(g,m,p){var k=this.graph.model.getParent(g);if(m){var u=this.graph.model.isEdge(g)?null:this.graph.getCellGeometry(g);u=!this.graph.model.isEdge(k)&&!this.graph.isSiblingSelected(g)&&(null!=u&&u.relative||!this.graph.isContainer(k)||this.graph.isPart(g))}else if(u=d.apply(this,arguments),this.graph.isTableCell(g)||this.graph.isTableRow(g))u=k,this.graph.isTable(u)||(u=this.graph.model.getParent(u)),u=!this.graph.selectionCellsHandler.isHandled(u)||this.graph.isCellSelected(u)&&this.graph.isToggleEvent(p.getEvent())||+this.graph.isCellSelected(g)&&!this.graph.isToggleEvent(p.getEvent())||this.graph.isTableCell(g)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(g){g=g.getCell();for(var m=this.graph.getModel(),p=m.getParent(g),k=this.graph.view.getState(p),u=this.graph.isCellSelected(g);null!=k&&(m.isVertex(p)||m.isEdge(p));){var x=this.graph.isCellSelected(p);u=u||x;if(x||!u&&(this.graph.isTableCell(g)||this.graph.isTableRow(g)))g=p;p=m.getParent(p)}return g}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,h=this.editor.graph;h.lightbox=e;var d=h.getGraphBounds;h.getGraphBounds=function(){var M=d.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var aa=this.view.translate,ia=this.view.scale;M=mxRectangle.fromRectangle(M);M.add(new mxRectangle((aa.x+V.x)*ia,(aa.y+V.y)*ia,V.width*ia,V.height*ia))}return M};h.useCssTransforms&&(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(M,V){this.clearSelectionState()});h.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);h.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);h.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=0;h.isEnabled=function(){return!1};h.panningHandler.isForcePanningEvent=function(M){for(var V=M.getSource();null!=V&&V!=h.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(M.getEvent())};var g=h.panningHandler.start;h.panningHandler.start=function(){g.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!h.standalone){var m=!1,p=!1;this.setDefaultStyle=function(M){try{h.getModel().isEdge(M)?p=h.pasteEdgeStyle=!1:m=!1;var V=h.getCellStyle(M,!1),aa=[],ia=[],na;for(na in V)aa.push(V[na]),ia.push(na);h.getModel().isEdge(M)?h.currentEdgeStyle={}:h.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",aa,"cells",[M],"force",!0));h.getModel().isEdge(M)?p=h.pasteEdgeStyle=!0:m=!0}catch(qa){this.handleError(qa)}};this.clearDefaultStyle=function(){h.currentEdgeStyle=mxUtils.clone(h.defaultEdgeStyle);h.currentVertexStyle=mxUtils.clone(h.defaultVertexStyle);m=@@ -3242,17 +3242,17 @@ T.appendChild(Q);var P=document.createElement("div");P.style.width="30px";P.stylmxUtils.write(x,mxResources.get("linestart"));u.appendChild(x);var aa=this.addUnitInput(u,this.getUnit(),98,52,function(){Z.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ia=this.addUnitInput(u,this.getUnit(),30,52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("spacing"),98,64).style.fontSize="11px";this.addLabel(u,mxResources.get("size"),30,64).style.fontSize="11px";mxUtils.br(u);m=m.cloneNode(!1);m.style.fontWeight="normal";m.style.position="relative";m.style.paddingLeft="16px";m.style.marginBottom="2px";m.style.marginTop="6px";m.style.borderWidth="0px";m.style.paddingBottom="18px";x=document.createElement("div");x.style.position="absolute";x.style.marginLeft="3px";x.style.marginBottom="12px";x.style.marginTop="1px";x.style.fontWeight="normal";x.style.width="120px";mxUtils.write(x,mxResources.get("perimeter"));m.appendChild(x);var na=this.addUnitInput(m,this.getUnit(),30,52,function(){ja.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());g.edges.length==g.cells.length?(a.appendChild(k),a.appendChild(u)):g.vertices.length==g.cells.length&&a.appendChild(m);var qa=mxUtils.bind(this,function(H,ea,oa){function sa(Pa,la,Ba,Ca){Ba=Ba.getElementsByTagName("div")[0];null!=Ba&&h.updateCssForMarker(Ba,Ca,g.style.shape,Pa,la);return Ba}g=h.getSelectionState();if(oa||document.activeElement!=I)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),I.value=isNaN(H)?"":-this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=L)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),L.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();p.style.visibility="connector"==g.style.shape||"filledEdge"==g.style.shape||"wire"==g.style.shape?"":"hidden";"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");"1"==mxUtils.getValue(g.style,mxConstants.STYLE_DASHED,-null)?(ea=mxUtils.getValue(g.style,mxConstants.STYLE_DASH_PATTERN,"").split(" "),2==ea.length?(H=parseInt(ea[0])+parseInt(ea[1]),ea=parseInt(ea[0])/H*100,Q.style.borderBottom="1px solid transparent",Q.style.backgroundImage="linear-gradient(to right, currentcolor "+ea+"%, transparent 0%)",Q.style.backgroundPosition="bottom left",Q.style.backgroundSize=H+"px 1px",Q.style.backgroundRepeat="repeat-x"):Q.style.borderBottom="1px dashed currentcolor"):Q.style.borderBottom="1px solid currentcolor";P.style.backgroundImage=-Q.style.backgroundImage;P.style.backgroundPosition=Q.style.backgroundPosition;P.style.backgroundSize=Q.style.backgroundSize;P.style.backgroundRepeat=Q.style.backgroundRepeat;P.style.borderBottom=Q.style.borderBottom;H=K.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",H.style.height="",ea=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(g.style,mxConstants.STYLE_NOEDGESTYLE,-null)&&(ea=null),"orthogonalEdgeStyle"==ea&&"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?H.style.backgroundImage="url("+Format.curvedImage.src+")":"straight"==ea||"none"==ea||null==ea?H.style.backgroundImage="url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==ea?H.style.backgroundImage="url("+Format.entityImage.src+")":"elbowEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalElbowImage.src+")":-H.style.backgroundImage="url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalIsometricImage.src+")":H.style.backgroundImage="url("+Format.horizontalIsometricImage.src+")":H.style.backgroundImage="url("+Format.orthogonalImage.src+")");H=G.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",-H.style.height="",H.style.backgroundImage="link"==g.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==g.style.shape?"url("+Format.arrowImage.src+")":"arrow"==g.style.shape?"url("+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")");g.edges.length==g.cells.length?(D.style.display="",C.style.display="none"):(D.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<g.edges.length&&0==g.vertices.length&&g.lineJumps&&(a.style.borderBottomStyle="none");sa(mxUtils.getValue(g.style,-mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(g.style,"startFill","1"),U,"start");sa(mxUtils.getValue(g.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(g.style,"endFill","1"),Y,"end");mxUtils.setOpacity(K,"arrow"==g.style.shape?30:100);"connector"!=g.style.shape&&"flexArrow"!=g.style.shape&&"filledEdge"!=g.style.shape&&"wire"!=g.style.shape?(mxUtils.setOpacity(U,30),mxUtils.setOpacity(Y,30)):(mxUtils.setOpacity(U,100),mxUtils.setOpacity(Y,100));if(oa||document.activeElement!=ia)H=parseInt(mxUtils.getValue(g.style,-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),ia.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=aa)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),aa.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=V)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),V.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=-aa)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),M.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=na)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_PERIMETER_SPACING,0)),na.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit()});var O=this.installInputHandler(ia,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var Z=this.installInputHandler(aa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,-0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ca=this.installInputHandler(V,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var W=this.installInputHandler(M,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ja=this.installInputHandler(na,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(I,qa);this.addKeyHandler(ia,-qa);this.addKeyHandler(aa,qa);this.addKeyHandler(V,qa);this.addKeyHandler(M,qa);this.addKeyHandler(na,qa);d.getModel().addListener(mxEvent.CHANGE,qa);this.listeners.push({destroy:function(){d.getModel().removeListener(qa)}});qa();return a};+this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=L)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),L.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();p.style.visibility="connector"==g.style.shape||"filledEdge"==g.style.shape||"wire"==g.style.shape?"":"hidden";"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");Q.style.borderBottom="1px solid currentcolor";+"1"==mxUtils.getValue(g.style,mxConstants.STYLE_DASHED,null)&&(H=mxUtils.getValue(g.style,mxConstants.STYLE_DASH_PATTERN,""),ea=String(H).split(" "),2<=ea.length&&(H=parseInt(ea[0])+parseInt(ea[1]),ea=parseInt(ea[0])/H*100,Q.style.borderBottom="1px solid transparent",Q.style.backgroundImage="linear-gradient(to right, currentcolor "+ea+"%, transparent 0%)",Q.style.backgroundPosition="bottom left",Q.style.backgroundSize=H+"px 1px",Q.style.backgroundRepeat="repeat-x"));P.style.backgroundImage=Q.style.backgroundImage;+P.style.backgroundPosition=Q.style.backgroundPosition;P.style.backgroundSize=Q.style.backgroundSize;P.style.backgroundRepeat=Q.style.backgroundRepeat;P.style.borderBottom=Q.style.borderBottom;H=K.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",H.style.height="",ea=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(g.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(ea=null),"orthogonalEdgeStyle"==+ea&&"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?H.style.backgroundImage="url("+Format.curvedImage.src+")":"straight"==ea||"none"==ea||null==ea?H.style.backgroundImage="url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==ea?H.style.backgroundImage="url("+Format.entityImage.src+")":"elbowEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalElbowImage.src+")":H.style.backgroundImage="url("+Format.horizontalElbowImage.src++")":"isometricEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalIsometricImage.src+")":H.style.backgroundImage="url("+Format.horizontalIsometricImage.src+")":H.style.backgroundImage="url("+Format.orthogonalImage.src+")");H=G.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",H.style.height="",H.style.backgroundImage="link"==+g.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==g.style.shape?"url("+Format.arrowImage.src+")":"arrow"==g.style.shape?"url("+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")");g.edges.length==g.cells.length?(D.style.display="",C.style.display="none"):(D.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<g.edges.length&&0==g.vertices.length&&g.lineJumps&&(a.style.borderBottomStyle="none");sa(mxUtils.getValue(g.style,mxConstants.STYLE_STARTARROW,null),+mxUtils.getValue(g.style,"startFill","1"),U,"start");sa(mxUtils.getValue(g.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(g.style,"endFill","1"),Y,"end");mxUtils.setOpacity(K,"arrow"==g.style.shape?30:100);"connector"!=g.style.shape&&"flexArrow"!=g.style.shape&&"filledEdge"!=g.style.shape&&"wire"!=g.style.shape?(mxUtils.setOpacity(U,30),mxUtils.setOpacity(Y,30)):(mxUtils.setOpacity(U,100),mxUtils.setOpacity(Y,100));if(oa||document.activeElement!=ia)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_STARTSIZE,+mxConstants.DEFAULT_MARKERSIZE)),ia.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=aa)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),aa.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=V)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),V.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=aa)H=parseInt(mxUtils.getValue(g.style,+mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),M.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=na)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_PERIMETER_SPACING,0)),na.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit()});var O=this.installInputHandler(ia,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var Z=this.installInputHandler(aa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999,+this.getUnit(" "),null,this.isFloatUnit(),!0);var ca=this.installInputHandler(V,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var W=this.installInputHandler(M,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ja=this.installInputHandler(na,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(I,qa);this.addKeyHandler(ia,qa);this.addKeyHandler(aa,+qa);this.addKeyHandler(V,qa);this.addKeyHandler(M,qa);this.addKeyHandler(na,qa);d.getModel().addListener(mxEvent.CHANGE,qa);this.listeners.push({destroy:function(){d.getModel().removeListener(qa)}});qa();return a};StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<f.edges.length&&0==f.vertices.length&&f.lineJumps){a.style.padding="2px 0px 24px 14px";var h=document.createElement("div");h.style.position="absolute";h.style.maxWidth="78px";h.style.overflow="hidden";h.style.textOverflow="ellipsis";mxUtils.write(h,mxResources.get("lineJumps"));a.appendChild(h);var d=document.createElement("select");d.style.position="absolute";d.style.height="21px";d.style.marginTop="-2px";d.style.boxSizing="border-box";d.style.textAlign="center";d.style.right="84px";d.style.width="64px";d.style.borderWidth="1px";d.style.borderStyle="solid";h=["none","arc","gap","sharp","line"];for(var g=0;g<h.length;g++){var m=document.createElement("option");m.setAttribute("value",h[g]);mxUtils.write(m,mxResources.get(h[g]));d.appendChild(m)}mxEvent.addListener(d,"change",function(x){e.getModel().beginUpdate();try{e.setCellStyles("jumpStyle",d.value,f.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",f.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(d,"click",function(x){mxEvent.consume(x)});a.appendChild(d);var p=this.addUnitInput(a,this.getUnit(),16,52,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());var k=this.installInputHandler(p,"jumpSize",Graph.defaultJumpSize,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var u=@@ -12138,564 +12138,564 @@ this.createVertexTemplateEntry(a+"vimeo;fillColor=#1AB7EA;strokeColor=none",62.6"yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yammer;fillColor=#0093BE;strokeColor=none",.2*348,59.6,"","Yammer",null,null,this.getTagsForStencil("mxgraph.weblogos","yammer","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yandex",31.8,66.4,"","Yandex",null,null,this.getTagsForStencil("mxgraph.weblogos","yandex","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yelp;fillColor=#C41200;strokeColor=none",.2*317,83,"","Yelp",null,null,this.getTagsForStencil("mxgraph.weblogos","yelp","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yoolink",79.2,79.2,"","Yoolink",null,null,this.getTagsForStencil("mxgraph.weblogos","yoolink","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youmob",76,76.2,"","Youmob",null,null,this.getTagsForStencil("mxgraph.weblogos","youmob","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube;fillColor=#FF2626;gradientColor=#B5171F",.2*786,65.8,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube_2;fillColor=#FF2626;gradientColor=#B5171F",.2*232,32.6,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" "))]);this.setCurrentSearchEntryLibrary()}})();-var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,f){b.raw=f;return b};$jscomp.arrayIteratorImpl=function(b){var f=0;return function(){return f<b.length?{done:!1,value:b[f++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return f?f.call(b):$jscomp.arrayIterator(b)};-$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,f,m){if(b==Array.prototype||b==Object.prototype)return b;b[f]=m.value;return b};-$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var f=0;f<b.length;++f){var m=b[f];if(m&&m.Math==Math)return m}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};-$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,f){var m=$jscomp.propertyToPolyfillSymbol[f];if(null==m)return b[f];m=b[m];return void 0!==m?m:b[f]};$jscomp.polyfill=function(b,f,m,d){f&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,f,m,d):$jscomp.polyfillUnisolated(b,f,m,d))};-$jscomp.polyfillUnisolated=function(b,f,m,d){m=$jscomp.global;b=b.split(".");for(d=0;d<b.length-1;d++){var t=b[d];if(!(t in m))return;m=m[t]}b=b[b.length-1];d=m[b];f=f(d);f!=d&&null!=f&&$jscomp.defineProperty(m,b,{configurable:!0,writable:!0,value:f})};-$jscomp.polyfillIsolated=function(b,f,m,d){var t=b.split(".");b=1===t.length;d=t[0];d=!b&&d in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var y=0;y<t.length-1;y++){var x=t[y];if(!(x in d))return;d=d[x]}t=t[t.length-1];m=$jscomp.IS_SYMBOL_NATIVE&&"es6"===m?d[t]:null;f=f(m);null!=f&&(b?$jscomp.defineProperty($jscomp.polyfills,t,{configurable:!0,writable:!0,value:f}):f!==m&&(void 0===$jscomp.propertyToPolyfillSymbol[t]&&(m=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[t]=$jscomp.IS_SYMBOL_NATIVE?-$jscomp.global.Symbol(t):$jscomp.POLYFILL_PREFIX+m+"$"+t),$jscomp.defineProperty(d,$jscomp.propertyToPolyfillSymbol[t],{configurable:!0,writable:!0,value:f})))};$jscomp.underscoreProtoCanBeSet=function(){var b={a:!0},f={};try{return f.__proto__=b,f.a}catch(m){}return!1};-$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(b,f){b.__proto__=f;if(b.__proto__!==f)throw new TypeError(b+" is not extensible");return b}:null;$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(b){if(!(b instanceof Object))throw new TypeError("Iterator result "+b+" is not an object");};+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,g){b.raw=g;return b};$jscomp.arrayIteratorImpl=function(b){var g=0;return function(){return g<b.length?{done:!1,value:b[g++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var g="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return g?g.call(b):$jscomp.arrayIterator(b)};+$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,g,l){if(b==Array.prototype||b==Object.prototype)return b;b[g]=l.value;return b};+$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var g=0;g<b.length;++g){var l=b[g];if(l&&l.Math==Math)return l}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};+$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,g){var l=$jscomp.propertyToPolyfillSymbol[g];if(null==l)return b[g];l=b[l];return void 0!==l?l:b[g]};$jscomp.polyfill=function(b,g,l,d){g&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,g,l,d):$jscomp.polyfillUnisolated(b,g,l,d))};+$jscomp.polyfillUnisolated=function(b,g,l,d){l=$jscomp.global;b=b.split(".");for(d=0;d<b.length-1;d++){var q=b[d];if(!(q in l))return;l=l[q]}b=b[b.length-1];d=l[b];g=g(d);g!=d&&null!=g&&$jscomp.defineProperty(l,b,{configurable:!0,writable:!0,value:g})};+$jscomp.polyfillIsolated=function(b,g,l,d){var q=b.split(".");b=1===q.length;d=q[0];d=!b&&d in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var y=0;y<q.length-1;y++){var x=q[y];if(!(x in d))return;d=d[x]}q=q[q.length-1];l=$jscomp.IS_SYMBOL_NATIVE&&"es6"===l?d[q]:null;g=g(l);null!=g&&(b?$jscomp.defineProperty($jscomp.polyfills,q,{configurable:!0,writable:!0,value:g}):g!==l&&(void 0===$jscomp.propertyToPolyfillSymbol[q]&&(l=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[q]=$jscomp.IS_SYMBOL_NATIVE?+$jscomp.global.Symbol(q):$jscomp.POLYFILL_PREFIX+l+"$"+q),$jscomp.defineProperty(d,$jscomp.propertyToPolyfillSymbol[q],{configurable:!0,writable:!0,value:g})))};$jscomp.underscoreProtoCanBeSet=function(){var b={a:!0},g={};try{return g.__proto__=b,g.a}catch(l){}return!1};+$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(b,g){b.__proto__=g;if(b.__proto__!==g)throw new TypeError(b+" is not extensible");return b}:null;$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(b){if(!(b instanceof Object))throw new TypeError("Iterator result "+b+" is not an object");};$jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null};$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1};$jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(b){this.yieldResult=b};$jscomp.generator.Context.prototype.throw_=function(b){this.abruptCompletion_={exception:b,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype.return=function(b){this.abruptCompletion_={return:b};this.nextAddress=this.finallyAddress_};-$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(b){this.abruptCompletion_={jumpTo:b};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(b,f){this.nextAddress=f;return{value:b}};$jscomp.generator.Context.prototype.yieldAll=function(b,f){b=$jscomp.makeIterator(b);var m=b.next();$jscomp.generator.ensureIteratorResultIsObject_(m);if(m.done)this.yieldResult=m.value,this.nextAddress=f;else return this.yieldAllIterator_=b,this.yield(m.value,f)};-$jscomp.generator.Context.prototype.jumpTo=function(b){this.nextAddress=b};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(b,f){this.catchAddress_=b;void 0!=f&&(this.finallyAddress_=f)};$jscomp.generator.Context.prototype.setFinallyBlock=function(b){this.catchAddress_=0;this.finallyAddress_=b||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(b,f){this.nextAddress=b;this.catchAddress_=f||0};-$jscomp.generator.Context.prototype.enterCatchBlock=function(b){this.catchAddress_=b||0;b=this.abruptCompletion_.exception;this.abruptCompletion_=null;return b};$jscomp.generator.Context.prototype.enterFinallyBlock=function(b,f,m){m?this.finallyContexts_[m]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=b||0;this.finallyAddress_=f||0};-$jscomp.generator.Context.prototype.leaveFinallyBlock=function(b,f){f=this.finallyContexts_.splice(f||0)[0];if(f=this.abruptCompletion_=this.abruptCompletion_||f){if(f.isException)return this.jumpToErrorHandler_();void 0!=f.jumpTo&&this.finallyAddress_<f.jumpTo?(this.nextAddress=f.jumpTo,this.abruptCompletion_=null):this.nextAddress=this.finallyAddress_}else this.nextAddress=b};$jscomp.generator.Context.prototype.forIn=function(b){return new $jscomp.generator.Context.PropertyIterator(b)};-$jscomp.generator.Context.PropertyIterator=function(b){this.object_=b;this.properties_=[];for(var f in b)this.properties_.push(f);this.properties_.reverse()};$jscomp.generator.Context.PropertyIterator.prototype.getNext=function(){for(;0<this.properties_.length;){var b=this.properties_.pop();if(b in this.object_)return b}return null};$jscomp.generator.Engine_=function(b){this.context_=new $jscomp.generator.Context;this.program_=b};+$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(b){this.abruptCompletion_={jumpTo:b};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(b,g){this.nextAddress=g;return{value:b}};$jscomp.generator.Context.prototype.yieldAll=function(b,g){b=$jscomp.makeIterator(b);var l=b.next();$jscomp.generator.ensureIteratorResultIsObject_(l);if(l.done)this.yieldResult=l.value,this.nextAddress=g;else return this.yieldAllIterator_=b,this.yield(l.value,g)};+$jscomp.generator.Context.prototype.jumpTo=function(b){this.nextAddress=b};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(b,g){this.catchAddress_=b;void 0!=g&&(this.finallyAddress_=g)};$jscomp.generator.Context.prototype.setFinallyBlock=function(b){this.catchAddress_=0;this.finallyAddress_=b||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(b,g){this.nextAddress=b;this.catchAddress_=g||0};+$jscomp.generator.Context.prototype.enterCatchBlock=function(b){this.catchAddress_=b||0;b=this.abruptCompletion_.exception;this.abruptCompletion_=null;return b};$jscomp.generator.Context.prototype.enterFinallyBlock=function(b,g,l){l?this.finallyContexts_[l]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=b||0;this.finallyAddress_=g||0};+$jscomp.generator.Context.prototype.leaveFinallyBlock=function(b,g){g=this.finallyContexts_.splice(g||0)[0];if(g=this.abruptCompletion_=this.abruptCompletion_||g){if(g.isException)return this.jumpToErrorHandler_();void 0!=g.jumpTo&&this.finallyAddress_<g.jumpTo?(this.nextAddress=g.jumpTo,this.abruptCompletion_=null):this.nextAddress=this.finallyAddress_}else this.nextAddress=b};$jscomp.generator.Context.prototype.forIn=function(b){return new $jscomp.generator.Context.PropertyIterator(b)};+$jscomp.generator.Context.PropertyIterator=function(b){this.object_=b;this.properties_=[];for(var g in b)this.properties_.push(g);this.properties_.reverse()};$jscomp.generator.Context.PropertyIterator.prototype.getNext=function(){for(;0<this.properties_.length;){var b=this.properties_.pop();if(b in this.object_)return b}return null};$jscomp.generator.Engine_=function(b){this.context_=new $jscomp.generator.Context;this.program_=b};$jscomp.generator.Engine_.prototype.next_=function(b){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_.next,b,this.context_.next_);this.context_.next_(b);return this.nextStep_()};-$jscomp.generator.Engine_.prototype.return_=function(b){this.context_.start_();var f=this.context_.yieldAllIterator_;if(f)return this.yieldAllStep_("return"in f?f["return"]:function(m){return{value:m,done:!0}},b,this.context_.return);this.context_.return(b);return this.nextStep_()};+$jscomp.generator.Engine_.prototype.return_=function(b){this.context_.start_();var g=this.context_.yieldAllIterator_;if(g)return this.yieldAllStep_("return"in g?g["return"]:function(l){return{value:l,done:!0}},b,this.context_.return);this.context_.return(b);return this.nextStep_()};$jscomp.generator.Engine_.prototype.throw_=function(b){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_["throw"],b,this.context_.next_);this.context_.throw_(b);return this.nextStep_()};-$jscomp.generator.Engine_.prototype.yieldAllStep_=function(b,f,m){try{var d=b.call(this.context_.yieldAllIterator_,f);$jscomp.generator.ensureIteratorResultIsObject_(d);if(!d.done)return this.context_.stop_(),d;var t=d.value}catch(y){return this.context_.yieldAllIterator_=null,this.context_.throw_(y),this.nextStep_()}this.context_.yieldAllIterator_=null;m.call(this.context_,t);return this.nextStep_()};-$jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var b=this.program_(this.context_);if(b)return this.context_.stop_(),{value:b.value,done:!1}}catch(f){this.context_.yieldResult=void 0,this.context_.throw_(f)}this.context_.stop_();if(this.context_.abruptCompletion_){b=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(b.isException)throw b.exception;return{value:b.return,done:!0}}return{value:void 0,done:!0}};-$jscomp.generator.Generator_=function(b){this.next=function(f){return b.next_(f)};this.throw=function(f){return b.throw_(f)};this.return=function(f){return b.return_(f)};this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(b,f){f=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(f));$jscomp.setPrototypeOf&&b.prototype&&$jscomp.setPrototypeOf(f,b.prototype);return f};-$jscomp.asyncExecutePromiseGenerator=function(b){function f(d){return b.next(d)}function m(d){return b.throw(d)}return new Promise(function(d,t){function y(x){x.done?d(x.value):Promise.resolve(x.value).then(f,m).then(y,t)}y(b.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(b){return $jscomp.asyncExecutePromiseGenerator(b())};$jscomp.asyncExecutePromiseGeneratorProgram=function(b){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b)))};-DrawioFile=function(b,f){mxEventSource.call(this);this.ui=b;this.setData(f||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);+$jscomp.generator.Engine_.prototype.yieldAllStep_=function(b,g,l){try{var d=b.call(this.context_.yieldAllIterator_,g);$jscomp.generator.ensureIteratorResultIsObject_(d);if(!d.done)return this.context_.stop_(),d;var q=d.value}catch(y){return this.context_.yieldAllIterator_=null,this.context_.throw_(y),this.nextStep_()}this.context_.yieldAllIterator_=null;l.call(this.context_,q);return this.nextStep_()};+$jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var b=this.program_(this.context_);if(b)return this.context_.stop_(),{value:b.value,done:!1}}catch(g){this.context_.yieldResult=void 0,this.context_.throw_(g)}this.context_.stop_();if(this.context_.abruptCompletion_){b=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(b.isException)throw b.exception;return{value:b.return,done:!0}}return{value:void 0,done:!0}};+$jscomp.generator.Generator_=function(b){this.next=function(g){return b.next_(g)};this.throw=function(g){return b.throw_(g)};this.return=function(g){return b.return_(g)};this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(b,g){g=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(g));$jscomp.setPrototypeOf&&b.prototype&&$jscomp.setPrototypeOf(g,b.prototype);return g};+$jscomp.asyncExecutePromiseGenerator=function(b){function g(d){return b.next(d)}function l(d){return b.throw(d)}return new Promise(function(d,q){function y(x){x.done?d(x.value):Promise.resolve(x.value).then(g,l).then(y,q)}y(b.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(b){return $jscomp.asyncExecutePromiseGenerator(b())};$jscomp.asyncExecutePromiseGeneratorProgram=function(b){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b)))};+DrawioFile=function(b,g){mxEventSource.call(this);this.ui=b;this.setData(g||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};-DrawioFile.prototype.synchronizeFile=function(b,f){if(this.savingFile)null!=f&&f({message:mxResources.get("busy")});else{var m=!0,d=window.setTimeout(mxUtils.bind(this,function(){m=!1;null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,f)})})}),this.ui.timeout),t=mxUtils.bind(this,function(x){m&&(window.clearTimeout(d),null!=f&&f(x))}),y=mxUtils.bind(this,function(){return!m});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,-function(x){m&&(window.clearTimeout(d),this.sync.cleanup(b,f,x))}),t,y):this.updateFile(mxUtils.bind(this,function(){m&&(window.clearTimeout(d),null!=b&&b())}),t,y)}};-DrawioFile.prototype.updateFile=function(b,f,m,d,t){null!=m&&m()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",t,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(y){try{null!=m&&m()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[y]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=y?this.mergeFile(y,b,f,-d,t):this.reloadFile(b,f))}catch(x){null!=f&&f(x)}}),f))};-DrawioFile.prototype.mergeFile=function(b,f,m,d,t){try{var y=b.getShadowPages();if(null!=y&&0<y.length){var x=this.getShadowPages(),C=[this.ui.diffPages(null!=d?d:x,y)],K=this.ignorePatches(C);if(K)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",K),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var M=this.isModified()?this.ui.diffPages(x,-this.isRealtime()?this.ownPages:this.ui.pages):null,N=this.ui.patchPages(this.ui.clonePages(x),C[0]),P=this.ui.getHashValueForPages(N,{}),I=this.ui.getHashValueForPages(y,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",x,"pages",y,"patched",N,"patches",C,"changes",M,"checksum",P,"current",I,"valid",P==I,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",t);if(null!=P&&P!=I)this.checksumError(m,C,null,null,"mergeFile",-P,I,b.getCurrentRevisionId());else{this.setShadowPages(y);if(null!=this.sync){var c=this.sync.patchRealtime(C,DrawioFile.LAST_WRITE_WINS?M:null,null,t);null==c||mxUtils.isEmptyObject(c)||C.push(c)}this.patch(C,DrawioFile.LAST_WRITE_WINS?M:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(n){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=m&&m(n);try{var e=this.getCurrentUser(),l=null!=e?-e.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),l,n)}catch(p){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(n){null!=m&&m(n)}};-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),m=f.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var t=f.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(t=this.ui.anonymizeNode(t,!0));t.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,t,!0);m.appendChild(t)}return mxUtils.getPrettyXml(m)};-DrawioFile.prototype.compressReportData=function(b,f,m){f=null!=f?f:1E4;null!=m&&null!=b&&b.length>m?b=b.substring(0,m)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};-DrawioFile.prototype.checksumError=function(b,f,m,d,t,y,x,C){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var K=this.getCurrentUser(),M=null!=K?K.id:"unknown",N=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",P=JSON.stringify(f).length,I=null;if(null!=f&&1E3>P){for(b=0;b<f.length;b++)this.ui.anonymizePatch(f[b]);I=JSON.stringify(f);I=null!=I&&1E3>I.length?Graph.compress(I):-null}this.getLatestVersion(mxUtils.bind(this,function(c){try{var e=null!=I?"report":"error",l=this.ui.getHashValueForPages(c.getShadowPages()),n="unknown",p="unknown",u="unknown";try{var B=null!=c.initialData&&0<c.initialData.length?mxUtils.parseXml(c.initialData).documentElement:null;null!=B&&(null!=B.getAttribute("version")&&(n=B.getAttribute("version")),null!=B.getAttribute("agent")&&(p=B.getAttribute("agent")),null!=B.getAttribute("type")&&(u=B.getAttribute("type")))}catch(D){}EditorUi.logError("Checksum "+-e+" in "+t,null,this.getMode()+"."+N,"user_"+M+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+P+"-patches_"+f.length+(null!=I?"-json_"+I:"")+"-size_"+this.getSize()+(null!=y?"-expected_"+y:"")+(null!=x?"-current_"+x:"")+(null!=C?"-rev_"+this.ui.hashValue(C):"")+(null!=l?"-latest_"+l:"")+"-latestRev_"+this.ui.hashValue(c.getCurrentRevisionId())+("-latestVersion_"+n)+("-latestAgent_"+p)+("-latestType_"+u));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+N,action:t,label:"user_"+-M+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+P+"-patches_"+f.length+"-size_"+this.getSize()})}catch(D){}}),function(){})}catch(c){}};-DrawioFile.prototype.sendErrorReport=function(b,f,m,d){try{var t=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),y=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),x=this.getCurrentUser(),C=null!=x?this.ui.hashValue(x.id):"unknown",K=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",M=this.getTitle(),N=M.lastIndexOf(".");x="xml";0<N&&(x=M.substring(N));var P=null!=m?m.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+x+")\nUser="+C+K+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:-"")+(null!=m?"\n\nError: "+m.message:"")+"\n\nStack:\n"+P+"\n\nShadow:\n"+t+"\n\nData:\n"+y,d)}catch(I){}};-DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var m=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),d=this.ui.editor.graph,t=d.getSelectionCells(),y=d.getViewState(),x=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(C){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[m],"viewState",[y],"latestFile",C);null!=C?(this.ui.replaceFileData(C.getData(),-[m]),this.ui.restoreViewState(x,y,t),this.setDescriptor(C.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var K=this.ui.getCurrentFile();null!=K&&(K.stats=this.stats,K.patch([m]),K.fileChanged());this.ui.restoreViewState(x,y,t);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(C){null!=f&&f(C)}};-DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var m=0;m<b.length&&f;m++)f=f&&mxUtils.isEmptyObject(b[m]);return f};-DrawioFile.prototype.patch=function(b,f,m,d){if(null!=b){var t=this.ui.editor.undoManager,y=t.history.slice(),x=t.indexOfNextAdd,C=this.ui.editor.graph;C.container.style.visibility="hidden";var K=this.changeListenerEnabled;this.changeListenerEnabled=m;var M=C.foldingEnabled,N=C.mathEnabled,P=C.cellRenderer.redraw;C.cellRenderer.redraw=function(p){p.view.graph.isEditing(p.cell)&&(p.view.graph.scrollCellToVisible(p.cell),p.view.graph.cellEditor.resize());P.apply(this,arguments)};C.model.beginUpdate();-try{if(m){for(var I=this.ui.pages.slice(),c=this.ui.currentPage,e=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),l=0;l<e.length;l++){var n=mxUtils.indexOf(this.ui.pages,e[l]);0>n?this.ui.insertPage(e[l],Math.min(l,this.ui.pages.length)):this.ui.movePage(n,l)}for(l=0;l<I.length;l++)0>mxUtils.indexOf(e,I[l])&&this.ui.removePage(I[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,f,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);C.checkDefaultParent()}finally{C.container.style.visibility="";C.model.endUpdate();C.cellRenderer.redraw=P;this.changeListenerEnabled=K;m||(t.history=y,t.indexOfNextAdd=x,t.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)N!=C.mathEnabled?(this.ui.editor.updateGraphComponents(),C.refresh()):(M!=C.foldingEnabled?-C.view.revalidate():C.view.validate(),C.sizeDidChange());null!=this.sync&&this.isRealtime()&&!d&&(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",f,"undoable",m)}return b};-DrawioFile.prototype.save=function(b,f,m,d,t,y){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",t,"manual",y,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!t&&this.invalidChecksum)if(null!=m)m({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=m)m({message:mxResources.get("readOnly")});-else throw Error(mxResources.get("readOnly"));}catch(x){if(null!=m)m(x);else throw x;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};+DrawioFile.prototype.synchronizeFile=function(b,g){if(this.savingFile)null!=g&&g({message:mxResources.get("busy")});else{var l=!0,d=window.setTimeout(mxUtils.bind(this,function(){l=!1;null!=g&&g({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,g)})})}),this.ui.timeout),q=mxUtils.bind(this,function(x){l&&(window.clearTimeout(d),null!=g&&g(x))}),y=mxUtils.bind(this,function(){return!l});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,+function(x){l&&(window.clearTimeout(d),this.sync.cleanup(b,g,x))}),q,y):this.updateFile(mxUtils.bind(this,function(){l&&(window.clearTimeout(d),null!=b&&b())}),q,y)}};+DrawioFile.prototype.updateFile=function(b,g,l,d,q){null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",q,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=g&&g():this.getLatestVersion(mxUtils.bind(this,function(y){try{null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[y]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=g&&g():null!=y?this.mergeFile(y,b,g,+d,q):this.reloadFile(b,g))}catch(x){null!=g&&g(x)}}),g))};+DrawioFile.prototype.mergeFile=function(b,g,l,d,q){try{var y=b.getShadowPages();if(null!=y&&0<y.length){var x=this.getShadowPages(),D=[this.ui.diffPages(null!=d?d:x,y)],J=this.ignorePatches(D);if(J)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",J),null!=g&&g();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var K=this.isModified()?this.ui.diffPages(x,+this.isRealtime()?this.ownPages:this.ui.pages):null,L=this.ui.patchPages(this.ui.clonePages(x),D[0]),N=this.ui.getHashValueForPages(L,{}),c=this.ui.getHashValueForPages(y,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",x,"pages",y,"patched",L,"patches",D,"changes",K,"checksum",N,"current",c,"valid",N==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",q);if(null!=N&&N!=c)this.checksumError(l,D,null,null,"mergeFile",+N,c,b.getCurrentRevisionId());else{this.setShadowPages(y);if(null!=this.sync){var e=this.sync.patchRealtime(D,DrawioFile.LAST_WRITE_WINS?K:null,null,q);null==e||mxUtils.isEmptyObject(e)||D.push(e)}this.patch(D,DrawioFile.LAST_WRITE_WINS?K:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=g&&g()}}catch(n){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(n);try{var f=this.getCurrentUser(),p=null!=f?+f.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),p,n)}catch(t){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(n){null!=l&&l(n)}};+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var g=new mxCodec(mxUtils.createXmlDocument()),l=g.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var q=g.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(q=this.ui.anonymizeNode(q,!0));q.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,q,!0);l.appendChild(q)}return mxUtils.getPrettyXml(l)};+DrawioFile.prototype.compressReportData=function(b,g,l){g=null!=g?g:1E4;null!=l&&null!=b&&b.length>l?b=b.substring(0,l)+"[...]":null!=b&&b.length>g&&(b=Graph.compress(b)+"\n");return b};+DrawioFile.prototype.checksumError=function(b,g,l,d,q,y,x,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var J=this.getCurrentUser(),K=null!=J?J.id:"unknown",L=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",N=JSON.stringify(g).length,c=null;if(null!=g&&1E3>N){for(b=0;b<g.length;b++)this.ui.anonymizePatch(g[b]);c=JSON.stringify(g);c=null!=c&&1E3>c.length?Graph.compress(c):+null}this.getLatestVersion(mxUtils.bind(this,function(e){try{var f=null!=c?"report":"error",p=this.ui.getHashValueForPages(e.getShadowPages()),n="unknown",t="unknown",z="unknown";try{var F=null!=e.initialData&&0<e.initialData.length?mxUtils.parseXml(e.initialData).documentElement:null;null!=F&&(null!=F.getAttribute("version")&&(n=F.getAttribute("version")),null!=F.getAttribute("agent")&&(t=F.getAttribute("agent")),null!=F.getAttribute("type")&&(z=F.getAttribute("type")))}catch(C){}EditorUi.logError("Checksum "++f+" in "+q,null,this.getMode()+"."+L,"user_"+K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+N+"-patches_"+g.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=y?"-expected_"+y:"")+(null!=x?"-current_"+x:"")+(null!=D?"-rev_"+this.ui.hashValue(D):"")+(null!=p?"-latest_"+p:"")+"-latestRev_"+this.ui.hashValue(e.getCurrentRevisionId())+("-latestVersion_"+n)+("-latestAgent_"+t)+("-latestType_"+z));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+L,action:q,label:"user_"++K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+N+"-patches_"+g.length+"-size_"+this.getSize()})}catch(C){}}),function(){})}catch(e){}};+DrawioFile.prototype.sendErrorReport=function(b,g,l,d){try{var q=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),y=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),x=this.getCurrentUser(),D=null!=x?this.ui.hashValue(x.id):"unknown",J=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",K=this.getTitle(),L=K.lastIndexOf(".");x="xml";0<L&&(x=K.substring(L));var N=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()++":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+x+")\nUser="+D+J+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=g?"\n\n"+g:+"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+N+"\n\nShadow:\n"+q+"\n\nData:\n"+y,d)}catch(c){}};+DrawioFile.prototype.reloadFile=function(b,g){try{this.stats.fileReloaded++;var l=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),d=this.ui.editor.graph,q=d.getSelectionCells(),y=d.getViewState(),x=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(D){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[l],"viewState",[y],"latestFile",D);null!=D?(this.ui.replaceFileData(D.getData(),+[l]),this.ui.restoreViewState(x,y,q),this.setDescriptor(D.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var J=this.ui.getCurrentFile();null!=J&&(J.stats=this.stats,J.patch([l]),J.fileChanged());this.ui.restoreViewState(x,y,q);null!=b&&b()}else null!=g&&g(this.ui.fileLoadedError)}),!0))}),g)}catch(D){null!=g&&g(D)}};+DrawioFile.prototype.copyFile=function(b,g){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var g=!0;if(null!=b)for(var l=0;l<b.length&&g;l++)g=g&&mxUtils.isEmptyObject(b[l]);return g};+DrawioFile.prototype.patch=function(b,g,l,d){if(null!=b){var q=this.ui.editor.undoManager,y=q.history.slice(),x=q.indexOfNextAdd,D=this.ui.editor.graph;D.container.style.visibility="hidden";var J=this.changeListenerEnabled;this.changeListenerEnabled=l;var K=D.foldingEnabled,L=D.mathEnabled,N=D.cellRenderer.redraw;D.cellRenderer.redraw=function(t){t.view.graph.isEditing(t.cell)&&(t.view.graph.scrollCellToVisible(t.cell),t.view.graph.cellEditor.resize());N.apply(this,arguments)};D.model.beginUpdate();+try{if(l){for(var c=this.ui.pages.slice(),e=this.ui.currentPage,f=this.ui.applyPatches(this.ui.pages,b,!0,g,this.isModified()),p=0;p<f.length;p++){var n=mxUtils.indexOf(this.ui.pages,f[p]);0>n?this.ui.insertPage(f[p],Math.min(p,this.ui.pages.length)):this.ui.movePage(n,p)}for(p=0;p<c.length;p++)0>mxUtils.indexOf(f,c[p])&&this.ui.removePage(c[p]);0<=mxUtils.indexOf(this.ui.pages,e)&&this.ui.selectPage(e,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,g,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);D.checkDefaultParent()}finally{D.container.style.visibility="";D.model.endUpdate();D.cellRenderer.redraw=N;this.changeListenerEnabled=J;l||(q.history=y,q.indexOfNextAdd=x,q.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)L!=D.mathEnabled?(this.ui.editor.updateGraphComponents(),D.refresh()):(K!=D.foldingEnabled?+D.view.revalidate():D.view.validate(),D.sizeDidChange());null!=this.sync&&this.isRealtime()&&!d&&(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",g,"undoable",l)}return b};+DrawioFile.prototype.save=function(b,g,l,d,q,y){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",q,"manual",y,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!q&&this.invalidChecksum)if(null!=l)l({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=g&&g();else if(null!=l)l({message:mxResources.get("readOnly")});+else throw Error(mxResources.get("readOnly"));}catch(x){if(null!=l)l(x);else throw x;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var g=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=g&&(g.viewState=this.ui.editor.graph.getViewState(),g.needsUpdate=!0)}g=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return g};DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return Editor.defaultCompressed};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};-DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,f,m){};DrawioFile.prototype.saveFile=function(b,f,m,d){};DrawioFile.prototype.getFileUrl=function(){return null};+DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,g,l){};DrawioFile.prototype.saveFile=function(b,g,l,d){};DrawioFile.prototype.getFileUrl=function(){return null};DrawioFile.prototype.getFolderUrl=function(b){return null};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};-DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,f,m){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,f,m){};-DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var f=this.ui.editor.graph,m=f.getSelectionCells(),d=f.getViewState(),t=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(t,-d,m);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};-DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var f=0;null!=b&&f<b.length;f++){var m=b[f];null!=m.id&&0==m.id.indexOf("extFont_")&&m.parentNode.removeChild(m)}};+DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,g,l){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,g,l){};+DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var g=this.ui.editor.graph,l=g.getSelectionCells(),d=g.getViewState(),q=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(q,+d,l);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};+DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var g=0;null!=b&&g<b.length;g++){var l=b[g];null!=l.id&&0==l.id.indexOf("extFont_")&&l.parentNode.removeChild(l)}};DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();null!=b&&(this.ui.setFileData(b),this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages)));this.installListeners();this.isSyncSupported()&&this.startSync();EditorUi.debug("DrawioFile.open",[this])};DrawioFile.prototype.isPolling=function(){return!1};DrawioFile.prototype.getPollingInterval=function(){return 1E4};DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages&&null!=this.ui.pages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};-DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,f){b(null)};-DrawioFile.prototype.loadDescriptor=function(b,f){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,f){this.loadDescriptor(mxUtils.bind(this,function(m){b(m)}),f)};DrawioFile.prototype.patchDescriptor=function(b,f){this.setDescriptorEtag(b,this.getDescriptorEtag(f));this.descriptorChanged()};+DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,g){b(null)};+DrawioFile.prototype.loadDescriptor=function(b,g){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,g){this.loadDescriptor(mxUtils.bind(this,function(l){b(l)}),g)};DrawioFile.prototype.patchDescriptor=function(b,g){this.setDescriptorEtag(b,this.getDescriptorEtag(g));this.descriptorChanged()};DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};-DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,f){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,f){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};+DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,g){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,g){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};-DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,f){this.setDescriptorEtag(b,f)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,f){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};DrawioFile.prototype.getDescriptorChecksum=function(b){return null};-DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,f){b=null!=f?f.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",+DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,g){this.setDescriptorEtag(b,g)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,g){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};DrawioFile.prototype.getDescriptorChecksum=function(b){return null};+DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,g){b=null!=g?g.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};-DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var f=this.isRevisionHistorySupported()&&b!=mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+f+'title="'+b+'">'+b+(this.isLocked()?' <img class="geToolbarButton geAdaptiveAsset" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'++DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var g=this.isRevisionHistorySupported()&&b!=mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+g+'title="'+b+'">'+b+(this.isLocked()?' <img class="geToolbarButton geAdaptiveAsset" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+Editor.lockedImage+'"/>':"")+"</div>")}};-DrawioFile.prototype.saveDraft=function(b){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var f={type:"draft",created:this.created,modified:(new Date).getTime(),data:null!=b?b:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(f));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[f])}catch(m){this.removeDraft()}};+DrawioFile.prototype.saveDraft=function(b){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var g={type:"draft",created:this.created,modified:(new Date).getTime(),data:null!=b?b:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(g));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[g])}catch(l){this.removeDraft()}};DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};-DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var f=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+f+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+f+" ("+mxUtils.htmlEntities(b.message)+")</div>")}else f=-this.getErrorMessage(b),null==f&&null!=this.lastSaved&&(b=this.ui.timeSince(new Date(this.lastSaved)),null!=b&&(f=mxResources.get("lastSaved",[b]))),null!=f&&60<f.length&&(f=f.substring(0,60)+"..."),f=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=f&&""!=f?" ("+mxUtils.htmlEntities(f)+")":""),b='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"',this.ui.editor.setStatus("<div "+b+' title="'+f+'" class="geStatusAlert">'+f+' <img class="geAdaptiveAsset" src="'++DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var g=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+g+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+g+" ("+mxUtils.htmlEntities(b.message)+")</div>")}else g=+this.getErrorMessage(b),null==g&&null!=this.lastSaved&&(b=this.ui.timeSince(new Date(this.lastSaved)),null!=b&&(g=mxResources.get("lastSaved",[b]))),null!=g&&60<g.length&&(g=g.substring(0,60)+"..."),g=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=g&&""!=g?" ("+mxUtils.htmlEntities(g)+")":""),b='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"',this.ui.editor.setStatus("<div "+b+' title="'+g+'" class="geStatusAlert">'+g+' <img class="geAdaptiveAsset" src="'+Editor.saveImage+'"/></div>'),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),-EditorUi.draftSaveDelay||0))};DrawioFile.prototype.addConflictStatus=function(b,f){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),f);this.ui.spinner.stop();this.clearAutosave()};-DrawioFile.prototype.setConflictStatus=function(b,f){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=f?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.drawio.com/doc/faq/synchronize" src="'+Editor.helpImage+'" style="margin-left:2px;cursor:help;"/></div>',f)};-DrawioFile.prototype.showRefreshDialog=function(b,f,m){null==m&&(m=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,f)})):(this.addConflictStatus(m,mxUtils.bind(this,function(){this.showRefreshDialog(b,f)})),this.ui.showError(mxResources.get("warning")+" ("+m+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(mxUtils.bind(this,-function(){null!=b&&b();this.ui.alert(mxResources.get("copyCreated"))}),f)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.reloadFile(mxUtils.bind(this,function(){this.ui.spinner.stop();null!=b&&b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=f&&f()}))}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};-DrawioFile.prototype.showCopyDialog=function(b,f,m){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,f)}),null,mxResources.get("overwrite"),m,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};-DrawioFile.prototype.showConflictDialog=function(b,f){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),f,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};-DrawioFile.prototype.redirectToNewApp=function(b,f){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var m=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),d=mxResources.get("redirectToNewApp");null!=f&&(d+=" ("+f+")");f=mxUtils.bind(this,function(){var t=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==m?window.location.reload():window.location.href=-m});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()});null!=b?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),-f)}};+EditorUi.draftSaveDelay||0))};DrawioFile.prototype.addConflictStatus=function(b,g){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),g);this.ui.spinner.stop();this.clearAutosave()};+DrawioFile.prototype.setConflictStatus=function(b,g){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=g?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.drawio.com/doc/faq/synchronize" src="'+Editor.helpImage+'" style="margin-left:2px;cursor:help;"/></div>',g)};+DrawioFile.prototype.showRefreshDialog=function(b,g,l){null==l&&(l=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,g)})):(this.addConflictStatus(l,mxUtils.bind(this,function(){this.showRefreshDialog(b,g)})),this.ui.showError(mxResources.get("warning")+" ("+l+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(mxUtils.bind(this,+function(){null!=b&&b();this.ui.alert(mxResources.get("copyCreated"))}),g)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.reloadFile(mxUtils.bind(this,function(){this.ui.spinner.stop();null!=b&&b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=g&&g()}))}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};+DrawioFile.prototype.showCopyDialog=function(b,g,l){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,g)}),null,mxResources.get("overwrite"),l,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};+DrawioFile.prototype.showConflictDialog=function(b,g){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),g,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};+DrawioFile.prototype.redirectToNewApp=function(b,g){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var l=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),d=mxResources.get("redirectToNewApp");null!=g&&(d+=" ("+g+")");g=mxUtils.bind(this,function(){var q=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==l?window.location.reload():window.location.href=+l});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});null!=b?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),g,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,g,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),+g)}};DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified(),"remoteFileChanged",null==this.sync?"n/a":this.sync.remoteFileChanged),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};-DrawioFile.prototype.handleFileError=function(b,f){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,f):(this.isModified()&&this.addUnsavedStatus(b),f?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)++DrawioFile.prototype.handleFileError=function(b,g){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,g):(this.isModified()&&this.addUnsavedStatus(b),g?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+")":"")+"</div>"))))};-DrawioFile.prototype.handleConflictError=function(b,f){var m=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(x){this.handleFileError(x,!0)}),t=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,m,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),y=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,m,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(m,d,t):this.invalidChecksum&&f?this.showRefreshDialog(m,d,this.getErrorMessage(b)):f?this.showConflictDialog(t,y):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));-this.synchronizeFile(m,d)}))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT?f=mxResources.get("timeout"):"0"==f&&(f=mxResources.get("noResponse"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};-DrawioFile.prototype.compressionChanged=function(b){var f=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=f)for(var m=0;m<f.length;m++){var d=f[m].node;if(null!=d&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=f[m].getId())){var t=d.getElementsByTagName("mxGraphModel");t=0<t.length?t[0]:null;var y=Graph.decompress(mxUtils.getNodeValue(d));b?0==y.length&&null!=t&&(EditorUi.removeChildNodes(d),mxUtils.setTextContent(d,Graph.compressNode(t)),EditorUi.debug("DrawioFile.compressionChanged",-[this],"Page "+m+" compressed")):0<y.length&&null==t&&(EditorUi.removeChildNodes(d),d.appendChild(mxUtils.parseXml(y).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+m+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};+DrawioFile.prototype.handleConflictError=function(b,g){var l=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(x){this.handleFileError(x,!0)}),q=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,l,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),y=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,l,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(l,d,q):this.invalidChecksum&&g?this.showRefreshDialog(l,d,this.getErrorMessage(b)):g?this.showConflictDialog(q,y):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));+this.synchronizeFile(l,d)}))};DrawioFile.prototype.getErrorMessage=function(b){var g=null!=b?null!=b.error?b.error.message:b.message:null;null==g&&null!=b&&b.code==App.ERROR_TIMEOUT?g=mxResources.get("timeout"):"0"==g&&(g=mxResources.get("noResponse"));return g};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};+DrawioFile.prototype.compressionChanged=function(b){var g=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=g)for(var l=0;l<g.length;l++){var d=g[l].node;if(null!=d&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=g[l].getId())){var q=d.getElementsByTagName("mxGraphModel");q=0<q.length?q[0]:null;var y=Graph.decompress(mxUtils.getNodeValue(d));b?0==y.length&&null!=q&&(EditorUi.removeChildNodes(d),mxUtils.setTextContent(d,Graph.compressNode(q)),EditorUi.debug("DrawioFile.compressionChanged",+[this],"Page "+l+" compressed")):0<y.length&&null==q&&(EditorUi.removeChildNodes(d),d.appendChild(mxUtils.parseXml(y).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+l+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosaveDelay",this.autosaveDelay,"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,-mxUtils.bind(this,function(f){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(f){this.handleFileError(f)}))):(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 f=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(f,mxUtils.bind(this,function(m){EditorUi.debug("DrawioFile.createSecret",[this],"secret",f,"token",m);b(f,m)}),mxUtils.bind(this,function(){b(f)})):b(f)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};-DrawioFile.prototype.fileSaved=function(b,f,m,d,t,y,x){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;y=null!=y?y:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(y),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=m&&m()):this.sync.fileSaved(y,f,m,d,t,x)}catch(M){this.invalidChecksum=-this.inConflictState=!0;this.descriptorChanged();null!=d&&d(M);try{var C=this.getCurrentUser(),K=null!=C?C.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),K,M)}catch(N){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(M){this.descriptorChanged(),null!=d&&d(M)}};-DrawioFile.prototype.autosave=function(b,f,m,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());var t=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var y=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==y&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",y,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var x=this.isAutosaveRevision();-x&&(this.lastAutosaveRevision=(new Date).getTime());this.save(x,mxUtils.bind(this,function(C){this.autosaveCompleted();null!=m&&m(C)}),mxUtils.bind(this,function(C){null!=d&&d(C)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=m&&m(null)}catch(C){null!=d&&d(C)}}),t);this.autosaveThread=y;EditorUi.debug("DrawioFile.autosave",[this],"thread",y,"delay",b,"maxDelay",f,"actualDelay",t,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};+mxUtils.bind(this,function(g){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(g){this.handleFileError(g)}))):(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 g=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(g,mxUtils.bind(this,function(l){EditorUi.debug("DrawioFile.createSecret",[this],"secret",g,"token",l);b(g,l)}),mxUtils.bind(this,function(){b(g)})):b(g)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};+DrawioFile.prototype.fileSaved=function(b,g,l,d,q,y,x){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;y=null!=y?y:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(y),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=l&&l()):this.sync.fileSaved(y,g,l,d,q,x)}catch(K){this.invalidChecksum=+this.inConflictState=!0;this.descriptorChanged();null!=d&&d(K);try{var D=this.getCurrentUser(),J=null!=D?D.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),J,K)}catch(L){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[g],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(K){this.descriptorChanged(),null!=d&&d(K)}};+DrawioFile.prototype.autosave=function(b,g,l,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());var q=Date.now()-this.lastAutosave<g?b:0;this.clearAutosave();var y=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==y&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",y,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var x=this.isAutosaveRevision();+x&&(this.lastAutosaveRevision=(new Date).getTime());this.save(x,mxUtils.bind(this,function(D){this.autosaveCompleted();null!=l&&l(D)}),mxUtils.bind(this,function(D){null!=d&&d(D)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=l&&l(null)}catch(D){null!=d&&d(D)}}),q);this.autosaveThread=y;EditorUi.debug("DrawioFile.autosave",[this],"thread",y,"delay",b,"maxDelay",g,"actualDelay",q,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};-DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(f){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,f){if(null!=b&&null!=f){var m=b.lastIndexOf(".");b=0<m?b.substring(m):"";m=f.lastIndexOf(".");return b===(0<m?f.substring(m):"")}return b==f};+DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(g){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,g){if(null!=b&&null!=g){var l=b.lastIndexOf(".");b=0<l?b.substring(l):"";l=g.lastIndexOf(".");return b===(0<l?g.substring(l):"")}return b==g};DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,m){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,m,d,t,y,x){DrawioFile.call(this,b,f);this.title=m;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=t;this.desc=y;this.editable=x};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.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,f,m,d,t){this.saveAs(this.title,f,m,d,t)};LocalFile.prototype.saveAs=function(b,f,m,d,t){this.saveFile(b,!1,f,m,null,d,t)};-LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?null!=f&&f({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};-LocalFile.prototype.saveFile=function(b,f,m,d,t,y,x){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;t||this.updateFileData();var C=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var K=this.getData(),M=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=m&&m()}),N=mxUtils.bind(this,function(P){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=-!0;var I=mxUtils.bind(this,function(e){this.savingFile=!1;null!=d&&d({error:e})});this.saveDraft(K);this.fileHandle.createWritable().then(mxUtils.bind(this,function(e){this.fileHandle.getFile().then(mxUtils.bind(this,function(l){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[l],"conflict",this.desc.lastModified!=l.lastModified);x||this.desc.lastModified==l.lastModified?e.write(C?this.ui.base64ToBlob(P,"image/png"):P).then(mxUtils.bind(this,function(){e.close().then(mxUtils.bind(this,-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(n){try{var p=this.desc;this.savingFile=!1;this.desc=n;this.fileSaved(K,p,M,I);this.removeDraft()}catch(u){I(u)}}),I)}),I)}),I):(this.inConflictState=!0,I())}),mxUtils.bind(this,function(l){this.invalidFileHandle=!0;I(l)}))}),I)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(P,b,C?"image/png":"text/xml",C);else if(P.length<MAX_REQUEST_SIZE){var c=b.lastIndexOf(".");c=0<c?b.substring(c+1):"xml";-(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(P)+"&filename="+encodeURIComponent(b)+(C?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(P)}));M()}});C?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(P){N(P)}),d,this.ui.getCurrentFile()!=this?K:null,f.scale,f.border)):N(K)};-LocalFile.prototype.rename=function(b,f,m){this.title=b;this.descriptorChanged();null!=f&&f()};LocalLibrary=function(b,f,m){LocalFile.call(this,b,f,m)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,f,m){this.saveFile(b,!1,f,m)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,f,m){DrawioFile.call(this,b,f);this.title=m;this.etag=this.getEtag(f)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};-StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,f){this.getLatestVersionId(b,f)};StorageFile.prototype.getLatestVersionId=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(m){b(this.getEtag(m))}),f)};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};-StorageFile.prototype.getTitle=function(){return this.title};StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,f,m){this.saveAs(this.getTitle(),f,m)};-StorageFile.prototype.saveAs=function(b,f,m){DrawioFile.prototype.save.apply(this,[!1,mxUtils.bind(this,function(){this.saveFile(this.getTitle(),!1,f,m)}),m])};StorageFile.insertFile=function(b,f,m,d,t,y){StorageFile.doInsertFile(null!=y?y:new StorageFile(b,m,f),d,t)};-StorageFile.doInsertFile=function(b,f,m){var d=b.getTitle(),t=b.getUi(),y=mxUtils.bind(this,function(x){var C=function(){b.writeFile(d,function(){f(b)},m)};x?t.confirm(mxResources.get("replaceIt",[d]),C,m):C()});StorageFile.getFileContent(t,d,function(x){y(null!=x)},function(){y(!1)})};StorageFile.getFileContent=function(b,f,m,d){b.getDatabaseItem(f,function(t){m(null!=t?t.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,m):null!=d&&d()}),"files")};-StorageFile.getFileInfo=function(b,f,m,d){b.getDatabaseItem(f,function(t){m(t)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,function(t){m(null!=t?{title:f}:null)}):null!=d&&d()}),"filesInfo")};-StorageFile.prototype.saveFile=function(b,f,m,d,t){t=null!=t?t:0;if(this.isEditable()){var y=mxUtils.bind(this,function(){this.writeFile(b,m,d)});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):this instanceof StorageLibrary?y():StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(x){this.isRenamable()&&this.getTitle()!=b&&null!=x?this.ui.confirm(mxResources.get("replaceIt",[b]),y,d):this.getLatestVersion(mxUtils.bind(this,function(C){C.getDescriptor()!=-this.getDescriptor()?(EditorUi.debug("StorageFile.saveFile",[this],"conflict",[C]),this.mergeFile(C,mxUtils.bind(this,function(){t>=this.maxRetries||this.invalidChecksum||this.inConflictState?(this.inConflictState=!0,null!=d&&d()):this.retrySave(mxUtils.bind(this,function(){this.updateFileData();this.saveFile(b,f,m,d,t+1)}))}),d)):y()}),d)}),d)}else null!=m&&m();EditorUi.debug("StorageFile.saveFile",[this],"title",b,"revision",f,"retry",t)};-StorageFile.prototype.retrySave=function(b){var f=300+300*Math.random();window.setTimeout(b,f);EditorUi.debug("StorageFile.retrySave",[this],"delay",f)};-StorageFile.prototype.writeFile=function(b,f,m){this.isRenamable()&&(this.title=b);try{var d=this.getDescriptor(),t=this.getData(),y=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.setDescriptor(this.getEtag(t));this.contentChanged();this.fileSaved(t,d,f,m)});this.setShadowModified(!1);this.ui.setDatabaseItem(null,[{title:this.title,size:t.length,lastModified:Date.now(),type:this.type},{title:this.title,data:t}],y,mxUtils.bind(this,function(){if(null==this.ui.database)try{this.ui.setLocalData(this.title,-t,y)}catch(x){null!=m&&m(x)}else null!=m&&m()}),["filesInfo","files"])}catch(x){null!=m&&m(x)}};StorageFile.prototype.rename=function(b,f,m){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(t){var y=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,f)}),m)});null!=t?this.ui.confirm(mxResources.get("replaceIt",[b]),y,m):y()}),m):f()};-StorageFile.prototype.getLatestVersion=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(m){b(new StorageFile(this.ui,m,this.title))}),f)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};-StorageFile.listLocalStorageFiles=function(b){for(var f=[],m=0;m<localStorage.length;m++){var d=localStorage.key(m),t=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<t.length){var y=(null==b||"F"==b)&&("<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12)),x=(null==b||"L"==b)&&"<mxlibrary>"===t.substring(0,11);(y||x)&&f.push({title:d,type:y?"F":"L",size:t.length,lastModified:Date.now()})}}return f};-StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var m=b.transaction(["files","filesInfo"],"readwrite");b=m.objectStore("files");m=m.objectStore("filesInfo");for(var d=0;d<f.length;d++){var t=f[d],y=localStorage.getItem(t.title);b.add({title:t.title,data:y});m.add(t)}};-StorageFile.listFiles=function(b,f,m,d){b.getDatabaseItems(function(t){var y=[];if(null!=t)for(var x=0;x<t.length;x++)"."==t[x].title.charAt(0)||null!=f&&t[x].type!=f||y.push(t[x]);m(y)},function(){null==b.database?m(StorageFile.listLocalStorageFiles(f)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,f,m,d){b.removeDatabaseItem([f,f],m,function(){null==b.database?(localStorage.removeItem(f),m()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,f,m){StorageFile.call(this,b,f,m)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,m){this.saveFile(b,!1,f,m)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};-StorageLibrary.prototype.isRenamable=function(b,f,m){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,m){DrawioFile.call(this,b,f);this.title=m;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,f,m){RemoteFile.call(this,b,f,m.title);this.libObj=m};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,f,m){};-RemoteLibrary.prototype.saveAs=function(b,f,m){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,m){StorageFile.call(this,b,f,m);b=m;f=b.lastIndexOf("/");0<=f&&(b=b.substring(f+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,f,m){return!1};UrlLibrary.prototype.saveAs=function(b,f,m){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,m){DrawioFile.call(this,b,f);this.desc=m||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,g){b([])};DrawioFile.prototype.addComment=function(b,g,l){g(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,g){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,g)};LocalFile=function(b,g,l,d,q,y,x){DrawioFile.call(this,b,g);this.title=l;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=q;this.desc=y;this.editable=x};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.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,g,l,d,q){this.saveAs(this.title,g,l,d,q)};LocalFile.prototype.saveAs=function(b,g,l,d,q){this.saveFile(b,!1,g,l,null,d,q)};+LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,g){null==this.fileHandle?null!=g&&g({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,g)};+LocalFile.prototype.saveFile=function(b,g,l,d,q,y,x){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;q||this.updateFileData();var D=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var J=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),L=mxUtils.bind(this,function(N){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=+!0;var c=mxUtils.bind(this,function(f){this.savingFile=!1;null!=d&&d({error:f})});this.saveDraft(J);this.fileHandle.createWritable().then(mxUtils.bind(this,function(f){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[p],"conflict",this.desc.lastModified!=p.lastModified);x||this.desc.lastModified==p.lastModified?f.write(D?this.ui.base64ToBlob(N,"image/png"):N).then(mxUtils.bind(this,function(){f.close().then(mxUtils.bind(this,+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(n){try{var t=this.desc;this.savingFile=!1;this.desc=n;this.fileSaved(J,t,K,c);this.removeDraft()}catch(z){c(z)}}),c)}),c)}),c):(this.inConflictState=!0,c())}),mxUtils.bind(this,function(p){this.invalidFileHandle=!0;c(p)}))}),c)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(N,b,D?"image/png":"text/xml",D);else if(N.length<MAX_REQUEST_SIZE){var e=b.lastIndexOf(".");e=0<e?b.substring(e+1):"xml";+(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(N)+"&filename="+encodeURIComponent(b)+(D?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(N)}));K()}});D?(g=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(N){L(N)}),d,this.ui.getCurrentFile()!=this?J:null,g.scale,g.border)):L(J)};+LocalFile.prototype.rename=function(b,g,l){this.title=b;this.descriptorChanged();null!=g&&g()};LocalLibrary=function(b,g,l){LocalFile.call(this,b,g,l)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,g,l){this.saveFile(b,!1,g,l)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,g,l){DrawioFile.call(this,b,g);this.title=l;this.etag=this.getEtag(g)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};+StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,g){this.getLatestVersionId(b,g)};StorageFile.prototype.getLatestVersionId=function(b,g){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(l){b(this.getEtag(l))}),g)};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};+StorageFile.prototype.getTitle=function(){return this.title};StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,g,l){this.saveAs(this.getTitle(),g,l)};+StorageFile.prototype.saveAs=function(b,g,l){DrawioFile.prototype.save.apply(this,[!1,mxUtils.bind(this,function(){this.saveFile(this.getTitle(),!1,g,l)}),l])};StorageFile.insertFile=function(b,g,l,d,q,y){StorageFile.doInsertFile(null!=y?y:new StorageFile(b,l,g),d,q)};+StorageFile.doInsertFile=function(b,g,l){var d=b.getTitle(),q=b.getUi(),y=mxUtils.bind(this,function(x){var D=function(){b.writeFile(d,function(){g(b)},l)};x?q.confirm(mxResources.get("replaceIt",[d]),D,l):D()});StorageFile.getFileContent(q,d,function(x){y(null!=x)},function(){y(!1)})};StorageFile.getFileContent=function(b,g,l,d){b.getDatabaseItem(g,function(q){l(null!=q?q.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(g,l):null!=d&&d()}),"files")};+StorageFile.getFileInfo=function(b,g,l,d){b.getDatabaseItem(g,function(q){l(q)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(g,function(q){l(null!=q?{title:g}:null)}):null!=d&&d()}),"filesInfo")};+StorageFile.prototype.saveFile=function(b,g,l,d,q){q=null!=q?q:0;if(this.isEditable()){var y=mxUtils.bind(this,function(){this.writeFile(b,l,d)});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):this instanceof StorageLibrary?y():StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(x){this.isRenamable()&&this.getTitle()!=b&&null!=x?this.ui.confirm(mxResources.get("replaceIt",[b]),y,d):this.getLatestVersion(mxUtils.bind(this,function(D){D.getDescriptor()!=+this.getDescriptor()?(EditorUi.debug("StorageFile.saveFile",[this],"conflict",[D]),this.mergeFile(D,mxUtils.bind(this,function(){q>=this.maxRetries||this.invalidChecksum||this.inConflictState?(this.inConflictState=!0,null!=d&&d()):this.retrySave(mxUtils.bind(this,function(){this.updateFileData();this.saveFile(b,g,l,d,q+1)}))}),d)):y()}),d)}),d)}else null!=l&&l();EditorUi.debug("StorageFile.saveFile",[this],"title",b,"revision",g,"retry",q)};+StorageFile.prototype.retrySave=function(b){var g=300+300*Math.random();window.setTimeout(b,g);EditorUi.debug("StorageFile.retrySave",[this],"delay",g)};+StorageFile.prototype.writeFile=function(b,g,l){this.isRenamable()&&(this.title=b);try{var d=this.getDescriptor(),q=this.getData(),y=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.setDescriptor(this.getEtag(q));this.contentChanged();this.fileSaved(q,d,g,l)});this.setShadowModified(!1);this.ui.setDatabaseItem(null,[{title:this.title,size:q.length,lastModified:Date.now(),type:this.type},{title:this.title,data:q}],y,mxUtils.bind(this,function(){if(null==this.ui.database)try{this.ui.setLocalData(this.title,+q,y)}catch(x){null!=l&&l(x)}else null!=l&&l()}),["filesInfo","files"])}catch(x){null!=l&&l(x)}};StorageFile.prototype.rename=function(b,g,l){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(q){var y=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,g)}),l)});null!=q?this.ui.confirm(mxResources.get("replaceIt",[b]),y,l):y()}),l):g()};+StorageFile.prototype.getLatestVersion=function(b,g){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(l){b(new StorageFile(this.ui,l,this.title))}),g)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};+StorageFile.listLocalStorageFiles=function(b){for(var g=[],l=0;l<localStorage.length;l++){var d=localStorage.key(l),q=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<q.length){var y=(null==b||"F"==b)&&("<mxfile "===q.substring(0,8)||"<?xml"===q.substring(0,5)||"\x3c!--[if IE]>"===q.substring(0,12)),x=(null==b||"L"==b)&&"<mxlibrary>"===q.substring(0,11);(y||x)&&g.push({title:d,type:y?"F":"L",size:q.length,lastModified:Date.now()})}}return g};+StorageFile.migrate=function(b){var g=StorageFile.listLocalStorageFiles();g.push({title:".scratchpad",type:"L"});var l=b.transaction(["files","filesInfo"],"readwrite");b=l.objectStore("files");l=l.objectStore("filesInfo");for(var d=0;d<g.length;d++){var q=g[d],y=localStorage.getItem(q.title);b.add({title:q.title,data:y});l.add(q)}};+StorageFile.listFiles=function(b,g,l,d){b.getDatabaseItems(function(q){var y=[];if(null!=q)for(var x=0;x<q.length;x++)"."==q[x].title.charAt(0)||null!=g&&q[x].type!=g||y.push(q[x]);l(y)},function(){null==b.database?l(StorageFile.listLocalStorageFiles(g)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,g,l,d){b.removeDatabaseItem([g,g],l,function(){null==b.database?(localStorage.removeItem(g),l()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,g,l){StorageFile.call(this,b,g,l)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,g,l){this.saveFile(b,!1,g,l)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};+StorageLibrary.prototype.isRenamable=function(b,g,l){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,g,l){DrawioFile.call(this,b,g);this.title=l;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,g,l){RemoteFile.call(this,b,g,l.title);this.libObj=l};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,g,l){};+RemoteLibrary.prototype.saveAs=function(b,g,l){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,g,l){StorageFile.call(this,b,g,l);b=l;g=b.lastIndexOf("/");0<=g&&(b=b.substring(g+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,g,l){return!1};UrlLibrary.prototype.saveAs=function(b,g,l){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,g,l){DrawioFile.call(this,b,g);this.desc=l||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*mxClient.IS_IOS || */-var StorageDialog=function(b,f,m){function d(P,I,c,e,l,n){function p(){mxEvent.addListener(u,"click",null!=n?n:function(){c==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(c,!0);f()})):c==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(c,!0);f()}),function(T){b.spinner.stop();b.handleError(T)}):-(b.setMode(c,!0),f())})}C++;++x>m&&(mxUtils.br(K),x=1);var u=document.createElement("a");u.style.overflow="hidden";u.style.display="inline-block";u.className="geBaseButton";u.style.boxSizing="border-box";u.style.fontSize="11px";u.style.position="relative";u.style.margin="4px";u.style.marginTop="8px";u.style.marginBottom="0px";u.style.padding="8px 10px 8px 10px";u.style.width="88px";u.style.height="100px";u.style.whiteSpace="nowrap";u.setAttribute("title",I);var B=document.createElement("div");B.style.textOverflow=-"ellipsis";B.style.overflow="hidden";B.style.position="absolute";B.style.bottom="8px";B.style.left="0px";B.style.right="0px";mxUtils.write(B,I);u.appendChild(B);if(null!=P){var D=document.createElement("img");D.setAttribute("src",P);D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.width="60px";D.style.height="60px";D.style.paddingBottom="6px";u.appendChild(D)}else B.style.paddingTop="5px",B.style.whiteSpace="normal",mxClient.IS_IOS?(u.style.padding="0px 10px 20px 10px",u.style.top=-"6px"):mxClient.IS_FF&&(B.style.paddingTop="0px",B.style.marginTop="-2px");if(null!=l)for(P=0;P<l.length;P++)mxUtils.br(B),mxUtils.write(B,l[P]);if(null!=e&&null==b[e]){D.style.visibility="hidden";mxUtils.setOpacity(B,10);var G=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});G.spin(u);var E=window.setTimeout(function(){null==b[e]&&(G.stop(),u.style.display="none")},3E4);b.addListener("clientLoaded",-mxUtils.bind(this,function(T,O){null!=b[e]&&O.getProperty("client")==b[e]&&(window.clearTimeout(E),mxUtils.setOpacity(B,100),D.style.visibility="",G.stop(),p(),"drive"==e&&null!=M.parentNode&&M.parentNode.removeChild(M))}))}else p();K.appendChild(u)}m=null!=m?m:2;var t=document.createElement("div");t.style.textAlign="center";t.style.whiteSpace="nowrap";t.style.paddingTop="0px";t.style.paddingBottom="20px";var y=document.createElement("div");y.style.border="1px solid #d3d3d3";y.style.borderWidth="1px 0px 1px 0px";-y.style.padding="10px 0px 20px 0px";var x=0,C=0,K=document.createElement("div");K.style.paddingTop="2px";y.appendChild(K);var M=document.createElement("p"),N=document.createElement("p");N.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(N,mxResources.get("saveDiagramsTo")+":");t.appendChild(N);t.appendChild(y);x=0;"function"===typeof window.DriveClient&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===+var StorageDialog=function(b,g,l){function d(N,c,e,f,p,n){function t(){mxEvent.addListener(z,"click",null!=n?n:function(){e==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);g()})):e==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);g()}),function(U){b.spinner.stop();b.handleError(U)}):+(b.setMode(e,!0),g())})}D++;++x>l&&(mxUtils.br(J),x=1);var z=document.createElement("a");z.style.overflow="hidden";z.style.display="inline-block";z.className="geBaseButton";z.style.boxSizing="border-box";z.style.fontSize="11px";z.style.position="relative";z.style.margin="4px";z.style.marginTop="8px";z.style.marginBottom="0px";z.style.padding="8px 10px 8px 10px";z.style.width="88px";z.style.height="100px";z.style.whiteSpace="nowrap";z.setAttribute("title",c);var F=document.createElement("div");F.style.textOverflow=+"ellipsis";F.style.overflow="hidden";F.style.position="absolute";F.style.bottom="8px";F.style.left="0px";F.style.right="0px";mxUtils.write(F,c);z.appendChild(F);if(null!=N){var C=document.createElement("img");C.setAttribute("src",N);C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="60px";C.style.height="60px";C.style.paddingBottom="6px";z.appendChild(C)}else F.style.paddingTop="5px",F.style.whiteSpace="normal",mxClient.IS_IOS?(z.style.padding="0px 10px 20px 10px",z.style.top=+"6px"):mxClient.IS_FF&&(F.style.paddingTop="0px",F.style.marginTop="-2px");if(null!=p)for(N=0;N<p.length;N++)mxUtils.br(F),mxUtils.write(F,p[N]);if(null!=f&&null==b[f]){C.style.visibility="hidden";mxUtils.setOpacity(F,10);var E=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});E.spin(z);var R=window.setTimeout(function(){null==b[f]&&(E.stop(),z.style.display="none")},3E4);b.addListener("clientLoaded",+mxUtils.bind(this,function(U,O){null!=b[f]&&O.getProperty("client")==b[f]&&(window.clearTimeout(R),mxUtils.setOpacity(F,100),C.style.visibility="",E.stop(),t(),"drive"==f&&null!=K.parentNode&&K.parentNode.removeChild(K))}))}else t();J.appendChild(z)}l=null!=l?l:2;var q=document.createElement("div");q.style.textAlign="center";q.style.whiteSpace="nowrap";q.style.paddingTop="0px";q.style.paddingBottom="20px";var y=document.createElement("div");y.style.border="1px solid #d3d3d3";y.style.borderWidth="1px 0px 1px 0px";+y.style.padding="10px 0px 20px 0px";var x=0,D=0,J=document.createElement("div");J.style.paddingTop="2px";y.appendChild(J);var K=document.createElement("p"),L=document.createElement("p");L.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(L,mxResources.get("saveDiagramsTo")+":");q.appendChild(L);q.appendChild(y);x=0;"function"===typeof window.DriveClient&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");y=document.createElement("span");y.style.position="absolute";y.style.cursor="pointer";y.style.bottom="27px";y.style.color="gray";y.style.userSelect="none";y.style.textAlign="center";y.style.left="50%";mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0)");mxUtils.write(y,mxResources.get("decideLater"));-t.appendChild(y);mxEvent.addListener(y,"click",function(){b.hideDialog();var P=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=P});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(M.style.padding="7px",M.style.fontSize="9pt",M.style.marginTop="-14px",M.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+-mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",t.appendChild(M))},5E3);this.container=t},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var m=b.addLanguageMenu(f,!1,"28px");null!=m&&(m.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width=-"32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var t=document.createElement("div");t.style.margin="8px 0px 0px 0px";t.style.padding="18px 0px 24px 0px";m="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",m=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+"/dropbox-logo.svg",m=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",m=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?-(d.src=IMAGE_PATH+"/github-logo.svg",m=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",m=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",m=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",m=mxResources.get("trello")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",t.style.paddingBottom="10px",t.style.paddingTop="30px",m=mxResources.get("device"));var y=document.createElement("button");-y.className="geBigButton";y.style.marginBottom="8px";y.style.fontSize="18px";y.style.padding="10px";y.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)t.style.padding="42px 0px 10px 0px",y.style.marginBottom="12px";else{t.style.border="1px solid #d3d3d3";t.style.borderWidth="1px 0px 1px 0px";var x=document.createElement("table"),C=document.createElement("tbody"),K=document.createElement("tr"),M=document.createElement("td"),N=document.createElement("td");x.setAttribute("align",-"center");M.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,m);N.style.textAlign="left";N.appendChild(d);K.appendChild(M);K.appendChild(N);C.appendChild(K);x.appendChild(C);f.appendChild(x);m=document.createElement("span");m.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,0)");mxUtils.write(m,-mxResources.get("changeStorage"));mxEvent.addListener(m,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(m)}mxUtils.write(y,mxResources.get("createNewDiagram"));mxEvent.addListener(y,"click",function(){b.hideDialog();b.actions.get("new").funct()});t.appendChild(y);mxUtils.br(t);y=document.createElement("button");y.className="geBigButton";y.style.marginBottom="22px";y.style.fontSize="18px";y.style.padding="10px";y.style.width="340px";mxUtils.write(y,-mxResources.get("openExistingDiagram"));mxEvent.addListener(y,"click",function(){b.actions.get("open").funct()});t.appendChild(y);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&-mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(m=function(c){y.style.marginBottom="24px";var e=document.createElement("a");e.style.display="inline-block";e.style.color="gray";e.style.cursor="pointer";e.style.marginTop="6px";mxUtils.write(e,mxResources.get("signOut"));y.style.marginBottom="16px";t.style.paddingBottom="18px";mxEvent.addListener(e,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){c()})});t.appendChild(e)},b.mode==App.MODE_GOOGLE&&-null!=b.drive){var P=b.drive.getUsersList();if(0<P.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");y.style.marginBottom="16px";t.style.paddingBottom="18px";t.appendChild(d);var I=document.createElement("select");I.style.marginLeft="4px";I.style.width="140px";for(m=0;m<P.length;m++)x=document.createElement("option"),mxUtils.write(x,P[m].displayName),x.value=m,I.appendChild(x),x=document.createElement("option"),x.innerHTML=" ",-mxUtils.write(x,"<"+P[m].email+">"),x.setAttribute("disabled","disabled"),I.appendChild(x);x=document.createElement("option");mxUtils.write(x,mxResources.get("addAccount"));x.value=P.length;I.appendChild(x);mxEvent.addListener(I,"change",function(){var c=I.value,e=P.length!=c;e&&b.drive.setUser(P[c]);b.drive.authorize(e,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(l){b.handleError(l,null,function(){b.hideDialog();b.showSplash()})},!0)});t.appendChild(I)}else m(function(){b.drive.logout()})}else b.mode!=-App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?m(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?m(function(){b.gitLab.logout();var c=document.createElement("form");c.setAttribute("method","post");c.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");c.setAttribute("target","_blank");document.body.appendChild(c);c.submit();c.parentNode.removeChild(c)}):b.mode==App.MODE_TRELLO&&-null!=b.trello?b.trello.isAuthorized()&&m(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&m(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):m(function(){b.oneDrive.logout()});f.appendChild(t);this.container=f},EmbedDialog=function(b,f,m,d,t,y,x,C,K){x=null!=x?x:"Check out the diagram I made using @drawio";d=document.createElement("div");var M=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=y?mxUtils.write(d,y):mxUtils.write(d,mxResources.get(5E5>-f.length?M?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);y=document.createElement("div");y.style.position="absolute";y.style.top="30px";y.style.right="30px";y.style.color="gray";mxUtils.write(y,b.formatFileSize(f.length));d.appendChild(y);var N=document.createElement("textarea");N.setAttribute("autocomplete","off");N.setAttribute("autocorrect","off");N.setAttribute("autocapitalize","off");N.setAttribute("spellcheck","false");N.style.fontFamily="monospace";N.style.wordBreak="break-all";N.style.marginTop=-"10px";N.style.resize="none";N.style.height="150px";N.style.width="440px";N.style.border="1px solid gray";N.value=mxResources.get("updatingDocument");d.appendChild(N);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>f.length?(N.value=f,N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null)):(N.setAttribute("readonly","true"),N.value=mxResources.get("tooLargeUseDownload"))},0)};y=document.createElement("div");y.style.position=-"absolute";y.style.bottom="36px";y.style.right="32px";var P=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!M||navigator.standalone||!(M||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(P=mxUtils.button(null!=C?C:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var c=5E5>f.length?N.value:f;if(null!=t)t(c);else if(M)try{var e=b.openLink(c);null!=e&&(null==m||0<m)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=e&&null!=-e.location.href&&e.location.href.substring(0,8)!=c.substring(0,8)&&(e.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(n){}}),m||500)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}else{var l=window.open();l=null!=l?l.document:null;null!=l?(l.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==f.substring(0,7)?f:mxUtils.htmlEntities(f))+"</body></html>"),-l.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),P.className="geBtn",y.appendChild(P));if(!M||7500<f.length)C=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=K?K:"embed.txt","txt",f,"text/plain")}),C.className="geBtn",y.appendChild(C);if(M&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var I=mxUtils.button("",function(){try{var c="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(N.value);-b.openLink(c)}catch(e){b.handleError({message:e.message||mxResources.get("drawingTooLarge")})}});C=document.createElement("img");C.setAttribute("src",Editor.facebookImage);C.setAttribute("width","18");C.setAttribute("height","18");C.setAttribute("border","0");I.appendChild(C);I.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");I.style.verticalAlign="bottom";I.style.paddingTop="4px";I.style.minWidth="46px";I.className="geBtn";y.appendChild(I)}7168>f.length&&(I=-mxUtils.button("",function(){try{var c="https://twitter.com/intent/tweet?text="+encodeURIComponent(x)+"&url="+encodeURIComponent(N.value);b.openLink(c)}catch(e){b.handleError({message:e.message||mxResources.get("drawingTooLarge")})}}),C=document.createElement("img"),C.setAttribute("src",Editor.tweetImage),C.setAttribute("width","18"),C.setAttribute("height","18"),C.setAttribute("border","0"),C.style.marginBottom="5px",I.appendChild(C),I.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+-" max)"),I.style.verticalAlign="bottom",I.style.paddingTop="4px",I.style.minWidth="46px",I.className="geBtn",y.appendChild(I))}!b.isOffline()&&5E5>f.length&&(I=mxUtils.button("",function(){try{var c="mailto:?subject="+encodeURIComponent(K||b.defaultFilename)+"&body="+encodeURIComponent(N.value);b.openLink(c)}catch(e){b.handleError({message:e.message||mxResources.get("drawingTooLarge")})}}),C=document.createElement("img"),C.className="geAdaptiveAsset",C.setAttribute("src",Editor.mailImage),C.setAttribute("width",-"18"),C.setAttribute("height","18"),C.setAttribute("border","0"),C.style.marginBottom="5px",I.appendChild(C),I.style.verticalAlign="bottom",I.style.paddingTop="4px",I.style.minWidth="46px",I.className="geBtn",y.appendChild(I));C=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});y.appendChild(C);I=mxUtils.button(mxResources.get("copy"),function(){N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");-b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?C.className="geBtn gePrimaryBtn":(y.appendChild(I),I.className="geBtn gePrimaryBtn",C.className="geBtn"):null!=P&&(y.appendChild(P),C.className="geBtn",P.className="geBtn gePrimaryBtn");d.appendChild(y);this.container=d};EmbedDialog.showPreviewOption=!0;-var GoogleSitesDialog=function(b,f){function m(){var T=null!=E&&null!=E.getTitle()?E.getTitle():this.defaultFilename;if(D.checked&&""!=I.value){var O="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(I.value));null!=T&&(O+="&title="+encodeURIComponent(T));0<G.length&&(O+="&s="+G);""!=c.value&&"0"!=c.value&&(O+="&border="+c.value);""!=P.value&&(O+="&height="+P.value);O+="&pan="+(e.checked?"1":"0");O+="&zoom="+(l.checked?"1":"0");O+="&fit="+(B.checked?"1":"0");-O+="&resize="+(u.checked?"1":"0");O+="&x0="+Number(N.value);O+="&y0="+K;t.mathEnabled&&(O+="&math=1");p.checked?O+="&edit=_blank":n.checked&&(O+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));M.value=O}else E.constructor==DriveFile||E.constructor==DropboxFile?(O="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=I.value?O+=encodeURIComponent(mxUtils.htmlEntities(I.value))+"&type=3":(O+=E.getHash().substring(1),O=E.constructor==DropboxFile?O+"&type=2":O+"&type=1"),null!=-T&&(O+="&title="+encodeURIComponent(T)),""!=P.value&&(T=parseInt(P.value)+parseInt(N.value),O+="&height="+T),M.value=O):M.value=""}var d=document.createElement("div"),t=b.editor.graph,y=t.getGraphBounds(),x=t.view.scale,C=Math.floor(y.x/x-t.view.translate.x),K=Math.floor(y.y/x-t.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var M=document.createElement("input");M.setAttribute("type","text");M.style.marginBottom="8px";M.style.marginTop="2px";M.style.width="410px";-d.appendChild(M);mxUtils.br(d);this.init=function(){M.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var N=document.createElement("input");N.setAttribute("type","text");N.setAttribute("size","4");N.style.marginRight="16px";N.style.marginLeft="4px";N.value=C;d.appendChild(N);mxUtils.write(d,mxResources.get("height")+":");var P=document.createElement("input");P.setAttribute("type","text");-P.setAttribute("size","4");P.style.marginLeft="4px";P.value=Math.ceil(y.height/x);d.appendChild(P);mxUtils.br(d);y=document.createElement("hr");y.setAttribute("size","1");y.style.marginBottom="16px";y.style.marginTop="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var I=document.createElement("input");I.setAttribute("type","text");I.setAttribute("size","28");I.style.marginBottom="8px";I.style.marginTop="2px";I.style.width="410px";I.value=f||"";d.appendChild(I);-mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var c=document.createElement("input");c.setAttribute("type","text");c.setAttribute("size","3");c.style.marginBottom="8px";c.style.marginLeft="4px";c.value="0";d.appendChild(c);mxUtils.br(d);var e=document.createElement("input");e.setAttribute("type","checkbox");e.setAttribute("checked","checked");e.defaultChecked=!0;e.style.marginLeft="16px";d.appendChild(e);mxUtils.write(d,mxResources.get("pan")+" ");var l=document.createElement("input");-l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;l.style.marginLeft="8px";d.appendChild(l);mxUtils.write(d,mxResources.get("zoom")+" ");var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginLeft="8px";n.setAttribute("title",window.location.href);d.appendChild(n);mxUtils.write(d,mxResources.get("edit")+" ");var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.marginLeft="8px";d.appendChild(p);mxUtils.write(d,-mxResources.get("asNew")+" ");mxUtils.br(d);var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";d.appendChild(u);mxUtils.write(d,mxResources.get("resize")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";d.appendChild(B);mxUtils.write(d,mxResources.get("fit")+" ");var D=document.createElement("input");D.setAttribute("type","checkbox");D.style.marginLeft=-"8px";d.appendChild(D);mxUtils.write(d,mxResources.get("embed")+" ");var G=b.getBasenames().join(";"),E=b.getCurrentFile();mxEvent.addListener(e,"change",m);mxEvent.addListener(l,"change",m);mxEvent.addListener(u,"change",m);mxEvent.addListener(B,"change",m);mxEvent.addListener(n,"change",m);mxEvent.addListener(p,"change",m);mxEvent.addListener(D,"change",m);mxEvent.addListener(P,"change",m);mxEvent.addListener(N,"change",m);mxEvent.addListener(c,"change",m);mxEvent.addListener(I,"change",m);m();-mxEvent.addListener(M,"click",function(){M.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";y=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});y.className="geBtn gePrimaryBtn";f.appendChild(y);d.appendChild(f);this.container=d},CreateGraphDialog=function(b,f,m){var d=document.createElement("div");d.style.textAlign="right";this.init=-function(){var t=document.createElement("div");t.style.position="relative";t.style.border="1px solid gray";t.style.boxSizing="border-box";t.style.width="100%";t.style.height="360px";t.style.overflow="hidden";t.style.marginBottom="16px";mxEvent.disableContextMenu(t);d.appendChild(t);var y=new Graph(t);y.setCellsCloneable(!0);y.setPanning(!0);y.setAllowDanglingEdges(!1);y.connectionHandler.select=!1;y.view.setTranslate(20,20);y.border=20;y.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&-null!=y.view.getDrawPane()&&(t=y.view.getDrawPane().ownerSVGElement,null!=t&&(t.style.position="absolute"));var x="curved=1;";y.cellRenderer.installCellOverlayListeners=function(e,l,n){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(n.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(p){l.fireEvent(new mxEventObject("pointerdown","event",p,"state",e))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(n.node,"touchstart",function(p){l.fireEvent(new mxEventObject("pointerdown",-"event",p,"state",e))})};y.getAllConnectionConstraints=function(){return null};y.connectionHandler.marker.highlight.keepOnTop=!1;y.connectionHandler.createEdgeState=function(e){e=y.createEdge(null,null,null,null,null,x);return new mxCellState(this.graph.view,e,this.graph.getCellStyle(e))};var C=y.getDefaultParent(),K=mxUtils.bind(this,function(e){var l=new mxCellOverlay(this.connectImage,"Add outgoing");l.cursor="hand";l.addListener(mxEvent.CLICK,function(n,p){y.connectionHandler.reset();y.clearSelection();-var u=y.getCellGeometry(e),B;P(function(){B=y.insertVertex(C,null,"Entry",u.x,u.y,80,30,"rounded=1;");K(B);y.view.refresh(B);y.insertEdge(C,null,"",e,B,x)},function(){y.scrollCellToVisible(B)})});l.addListener("pointerdown",function(n,p){n=p.getProperty("event");p=p.getProperty("state");y.popupMenuHandler.hideMenu();y.stopEditing(!1);var u=mxUtils.convertPoint(y.container,mxEvent.getClientX(n),mxEvent.getClientY(n));y.connectionHandler.start(p,u.x,u.y);y.isMouseDown=!0;y.isMouseTrigger=mxEvent.isMouseEvent(n);-mxEvent.consume(n)});y.addCellOverlay(e,l)});y.getModel().beginUpdate();try{var M=y.insertVertex(C,null,"Start",0,0,80,30,"ellipse");K(M)}finally{y.getModel().endUpdate()}if("horizontalTree"==m){var N=new mxCompactTreeLayout(y);N.edgeRouting=!1;N.levelDistance=30;N.sortEdges=!0;x="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==m?(N=new mxCompactTreeLayout(y,!1),N.edgeRouting=!1,N.levelDistance=30,N.sortEdges=!0,x="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==m?(N=new mxRadialTreeLayout(y,-!1),N.edgeRouting=!1,N.levelDistance=80):"verticalFlow"==m?N=new mxHierarchicalLayout(y,mxConstants.DIRECTION_NORTH):"horizontalFlow"==m?N=new mxHierarchicalLayout(y,mxConstants.DIRECTION_WEST):"circle"==m?N=new mxCircleLayout(y):(N=new mxFastOrganicLayout(y,!1),N.forceConstant=80);if(null!=N){var P=function(e,l){y.getModel().beginUpdate();try{null!=e&&e(),N.execute(y.getDefaultParent(),M)}catch(n){throw n;}finally{e=new mxMorphing(y),e.addListener(mxEvent.DONE,mxUtils.bind(this,function(){y.getModel().endUpdate();-null!=l&&l()})),e.startAnimation()}},I=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(e,l,n,p,u){I.apply(this,arguments);P()};y.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);P()};y.connectionHandler.addListener(mxEvent.CONNECT,function(){P()})}t=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});t.className="geBtn";b.editor.cancelFirst&&d.appendChild(t);var c=mxUtils.button(mxResources.get("insert"),-function(e){y.clearCellOverlays();var l=y.getModel().getChildren(y.getDefaultParent());e=mxEvent.isAltDown(e)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(y.getBoundingBoxFromGeometry(l,!0));l=b.editor.graph.importCells(l,e.x,e.y);e=b.editor.graph.view;var n=e.getBounds(l);null!=n&&(n.x-=e.translate.x,n.y-=e.translate.y,b.editor.graph.scrollRectToVisible(n),b.editor.graph.setSelectionCells(l));b.hideDialog()});d.appendChild(c);c.className="geBtn gePrimaryBtn";b.editor.cancelFirst||-d.appendChild(t);this.graph=y};this.container=d};+q.appendChild(y);mxEvent.addListener(y,"click",function(){b.hideDialog();var N=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=N});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(K.style.padding="7px",K.style.fontSize="9pt",K.style.marginTop="-14px",K.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'++mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",q.appendChild(K))},5E3);this.container=q},SplashDialog=function(b){var g=document.createElement("div");g.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var l=b.addLanguageMenu(g,!1,"28px");null!=l&&(l.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width=+"32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var q=document.createElement("div");q.style.margin="8px 0px 0px 0px";q.style.padding="18px 0px 24px 0px";l="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",l=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+"/dropbox-logo.svg",l=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",l=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?+(d.src=IMAGE_PATH+"/github-logo.svg",l=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",l=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",l=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",l=mxResources.get("trello")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",q.style.paddingBottom="10px",q.style.paddingTop="30px",l=mxResources.get("device"));var y=document.createElement("button");+y.className="geBigButton";y.style.marginBottom="8px";y.style.fontSize="18px";y.style.padding="10px";y.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)q.style.padding="42px 0px 10px 0px",y.style.marginBottom="12px";else{q.style.border="1px solid #d3d3d3";q.style.borderWidth="1px 0px 1px 0px";var x=document.createElement("table"),D=document.createElement("tbody"),J=document.createElement("tr"),K=document.createElement("td"),L=document.createElement("td");x.setAttribute("align",+"center");K.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,l);L.style.textAlign="left";L.appendChild(d);J.appendChild(K);J.appendChild(L);D.appendChild(J);x.appendChild(D);g.appendChild(x);l=document.createElement("span");l.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0)");mxUtils.write(l,+mxResources.get("changeStorage"));mxEvent.addListener(l,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});g.appendChild(l)}mxUtils.write(y,mxResources.get("createNewDiagram"));mxEvent.addListener(y,"click",function(){b.hideDialog();b.actions.get("new").funct()});q.appendChild(y);mxUtils.br(q);y=document.createElement("button");y.className="geBigButton";y.style.marginBottom="22px";y.style.fontSize="18px";y.style.padding="10px";y.style.width="340px";mxUtils.write(y,+mxResources.get("openExistingDiagram"));mxEvent.addListener(y,"click",function(){b.actions.get("open").funct()});q.appendChild(y);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&+mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(l=function(e){y.style.marginBottom="24px";var f=document.createElement("a");f.style.display="inline-block";f.style.color="gray";f.style.cursor="pointer";f.style.marginTop="6px";mxUtils.write(f,mxResources.get("signOut"));y.style.marginBottom="16px";q.style.paddingBottom="18px";mxEvent.addListener(f,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){e()})});q.appendChild(f)},b.mode==App.MODE_GOOGLE&&+null!=b.drive){var N=b.drive.getUsersList();if(0<N.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");y.style.marginBottom="16px";q.style.paddingBottom="18px";q.appendChild(d);var c=document.createElement("select");c.style.marginLeft="4px";c.style.width="140px";for(l=0;l<N.length;l++)x=document.createElement("option"),mxUtils.write(x,N[l].displayName),x.value=l,c.appendChild(x),x=document.createElement("option"),x.innerHTML=" ",+mxUtils.write(x,"<"+N[l].email+">"),x.setAttribute("disabled","disabled"),c.appendChild(x);x=document.createElement("option");mxUtils.write(x,mxResources.get("addAccount"));x.value=N.length;c.appendChild(x);mxEvent.addListener(c,"change",function(){var e=c.value,f=N.length!=e;f&&b.drive.setUser(N[e]);b.drive.authorize(f,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(p){b.handleError(p,null,function(){b.hideDialog();b.showSplash()})},!0)});q.appendChild(c)}else l(function(){b.drive.logout()})}else b.mode!=+App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?l(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?l(function(){b.gitLab.logout();var e=document.createElement("form");e.setAttribute("method","post");e.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");e.setAttribute("target","_blank");document.body.appendChild(e);e.submit();e.parentNode.removeChild(e)}):b.mode==App.MODE_TRELLO&&+null!=b.trello?b.trello.isAuthorized()&&l(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&l(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):l(function(){b.oneDrive.logout()});g.appendChild(q);this.container=g},EmbedDialog=function(b,g,l,d,q,y,x,D,J){x=null!=x?x:"Check out the diagram I made using @drawio";d=document.createElement("div");var K=/^https?:\/\//.test(g)||/^mailto:\/\//.test(g);null!=y?mxUtils.write(d,y):mxUtils.write(d,mxResources.get(5E5>+g.length?K?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);y=document.createElement("div");y.style.position="absolute";y.style.top="30px";y.style.right="30px";y.style.color="gray";mxUtils.write(y,b.formatFileSize(g.length));d.appendChild(y);var L=document.createElement("textarea");L.setAttribute("autocomplete","off");L.setAttribute("autocorrect","off");L.setAttribute("autocapitalize","off");L.setAttribute("spellcheck","false");L.style.fontFamily="monospace";L.style.wordBreak="break-all";L.style.marginTop=+"10px";L.style.resize="none";L.style.height="150px";L.style.width="440px";L.style.border="1px solid gray";L.value=mxResources.get("updatingDocument");d.appendChild(L);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>g.length?(L.value=g,L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)):(L.setAttribute("readonly","true"),L.value=mxResources.get("tooLargeUseDownload"))},0)};y=document.createElement("div");y.style.position=+"absolute";y.style.bottom="36px";y.style.right="32px";var N=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!K||navigator.standalone||!(K||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(N=mxUtils.button(null!=D?D:mxResources.get(5E5>g.length?"preview":"openInNewWindow"),function(){var e=5E5>g.length?L.value:g;if(null!=q)q(e);else if(K)try{var f=b.openLink(e);null!=f&&(null==l||0<l)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=f&&null!=+f.location.href&&f.location.href.substring(0,8)!=e.substring(0,8)&&(f.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(n){}}),l||500)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}else{var p=window.open();p=null!=p?p.document:null;null!=p?(p.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==g.substring(0,7)?g:mxUtils.htmlEntities(g))+"</body></html>"),+p.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),N.className="geBtn",y.appendChild(N));if(!K||7500<g.length)D=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=J?J:"embed.txt","txt",g,"text/plain")}),D.className="geBtn",y.appendChild(D);if(K&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>g.length){var c=mxUtils.button("",function(){try{var e="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(L.value);+b.openLink(e)}catch(f){b.handleError({message:f.message||mxResources.get("drawingTooLarge")})}});D=document.createElement("img");D.setAttribute("src",Editor.facebookImage);D.setAttribute("width","18");D.setAttribute("height","18");D.setAttribute("border","0");c.appendChild(D);c.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");c.style.verticalAlign="bottom";c.style.paddingTop="4px";c.style.minWidth="46px";c.className="geBtn";y.appendChild(c)}7168>g.length&&(c=+mxUtils.button("",function(){try{var e="https://twitter.com/intent/tweet?text="+encodeURIComponent(x)+"&url="+encodeURIComponent(L.value);b.openLink(e)}catch(f){b.handleError({message:f.message||mxResources.get("drawingTooLarge")})}}),D=document.createElement("img"),D.setAttribute("src",Editor.tweetImage),D.setAttribute("width","18"),D.setAttribute("height","18"),D.setAttribute("border","0"),D.style.marginBottom="5px",c.appendChild(D),c.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)++" max)"),c.style.verticalAlign="bottom",c.style.paddingTop="4px",c.style.minWidth="46px",c.className="geBtn",y.appendChild(c))}!b.isOffline()&&5E5>g.length&&(c=mxUtils.button("",function(){try{var e="mailto:?subject="+encodeURIComponent(J||b.defaultFilename)+"&body="+encodeURIComponent(L.value);b.openLink(e)}catch(f){b.handleError({message:f.message||mxResources.get("drawingTooLarge")})}}),D=document.createElement("img"),D.className="geAdaptiveAsset",D.setAttribute("src",Editor.mailImage),D.setAttribute("width",+"18"),D.setAttribute("height","18"),D.setAttribute("border","0"),D.style.marginBottom="5px",c.appendChild(D),c.style.verticalAlign="bottom",c.style.paddingTop="4px",c.style.minWidth="46px",c.className="geBtn",y.appendChild(c));D=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});y.appendChild(D);c=mxUtils.button(mxResources.get("copy"),function(){L.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");+b.alert(mxResources.get("copiedToClipboard"))});5E5>g.length?mxClient.IS_SF||null!=document.documentMode?D.className="geBtn gePrimaryBtn":(y.appendChild(c),c.className="geBtn gePrimaryBtn",D.className="geBtn"):null!=N&&(y.appendChild(N),D.className="geBtn",N.className="geBtn gePrimaryBtn");d.appendChild(y);this.container=d};EmbedDialog.showPreviewOption=!0;+var GoogleSitesDialog=function(b,g){function l(){var U=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(C.checked&&""!=c.value){var O="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(c.value));null!=U&&(O+="&title="+encodeURIComponent(U));0<E.length&&(O+="&s="+E);""!=e.value&&"0"!=e.value&&(O+="&border="+e.value);""!=N.value&&(O+="&height="+N.value);O+="&pan="+(f.checked?"1":"0");O+="&zoom="+(p.checked?"1":"0");O+="&fit="+(F.checked?"1":"0");+O+="&resize="+(z.checked?"1":"0");O+="&x0="+Number(L.value);O+="&y0="+J;q.mathEnabled&&(O+="&math=1");t.checked?O+="&edit=_blank":n.checked&&(O+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));K.value=O}else R.constructor==DriveFile||R.constructor==DropboxFile?(O="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=c.value?O+=encodeURIComponent(mxUtils.htmlEntities(c.value))+"&type=3":(O+=R.getHash().substring(1),O=R.constructor==DropboxFile?O+"&type=2":O+"&type=1"),null!=+U&&(O+="&title="+encodeURIComponent(U)),""!=N.value&&(U=parseInt(N.value)+parseInt(L.value),O+="&height="+U),K.value=O):K.value=""}var d=document.createElement("div"),q=b.editor.graph,y=q.getGraphBounds(),x=q.view.scale,D=Math.floor(y.x/x-q.view.translate.x),J=Math.floor(y.y/x-q.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var K=document.createElement("input");K.setAttribute("type","text");K.style.marginBottom="8px";K.style.marginTop="2px";K.style.width="410px";+d.appendChild(K);mxUtils.br(d);this.init=function(){K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var L=document.createElement("input");L.setAttribute("type","text");L.setAttribute("size","4");L.style.marginRight="16px";L.style.marginLeft="4px";L.value=D;d.appendChild(L);mxUtils.write(d,mxResources.get("height")+":");var N=document.createElement("input");N.setAttribute("type","text");+N.setAttribute("size","4");N.style.marginLeft="4px";N.value=Math.ceil(y.height/x);d.appendChild(N);mxUtils.br(d);y=document.createElement("hr");y.setAttribute("size","1");y.style.marginBottom="16px";y.style.marginTop="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var c=document.createElement("input");c.setAttribute("type","text");c.setAttribute("size","28");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";c.value=g||"";d.appendChild(c);+mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","3");e.style.marginBottom="8px";e.style.marginLeft="4px";e.value="0";d.appendChild(e);mxUtils.br(d);var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("checked","checked");f.defaultChecked=!0;f.style.marginLeft="16px";d.appendChild(f);mxUtils.write(d,mxResources.get("pan")+" ");var p=document.createElement("input");+p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="8px";d.appendChild(p);mxUtils.write(d,mxResources.get("zoom")+" ");var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginLeft="8px";n.setAttribute("title",window.location.href);d.appendChild(n);mxUtils.write(d,mxResources.get("edit")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";d.appendChild(t);mxUtils.write(d,+mxResources.get("asNew")+" ");mxUtils.br(d);var z=document.createElement("input");z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="16px";d.appendChild(z);mxUtils.write(d,mxResources.get("resize")+" ");var F=document.createElement("input");F.setAttribute("type","checkbox");F.style.marginLeft="8px";d.appendChild(F);mxUtils.write(d,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=+"8px";d.appendChild(C);mxUtils.write(d,mxResources.get("embed")+" ");var E=b.getBasenames().join(";"),R=b.getCurrentFile();mxEvent.addListener(f,"change",l);mxEvent.addListener(p,"change",l);mxEvent.addListener(z,"change",l);mxEvent.addListener(F,"change",l);mxEvent.addListener(n,"change",l);mxEvent.addListener(t,"change",l);mxEvent.addListener(C,"change",l);mxEvent.addListener(N,"change",l);mxEvent.addListener(L,"change",l);mxEvent.addListener(e,"change",l);mxEvent.addListener(c,"change",l);l();+mxEvent.addListener(K,"click",function(){K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";y=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});y.className="geBtn gePrimaryBtn";g.appendChild(y);d.appendChild(g);this.container=d},CreateGraphDialog=function(b,g,l){var d=document.createElement("div");d.style.textAlign="right";this.init=+function(){var q=document.createElement("div");q.style.position="relative";q.style.border="1px solid gray";q.style.boxSizing="border-box";q.style.width="100%";q.style.height="360px";q.style.overflow="hidden";q.style.marginBottom="16px";mxEvent.disableContextMenu(q);d.appendChild(q);var y=new Graph(q);y.setCellsCloneable(!0);y.setPanning(!0);y.setAllowDanglingEdges(!1);y.connectionHandler.select=!1;y.view.setTranslate(20,20);y.border=20;y.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&+null!=y.view.getDrawPane()&&(q=y.view.getDrawPane().ownerSVGElement,null!=q&&(q.style.position="absolute"));var x="curved=1;";y.cellRenderer.installCellOverlayListeners=function(f,p,n){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(n.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(t){p.fireEvent(new mxEventObject("pointerdown","event",t,"state",f))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(n.node,"touchstart",function(t){p.fireEvent(new mxEventObject("pointerdown",+"event",t,"state",f))})};y.getAllConnectionConstraints=function(){return null};y.connectionHandler.marker.highlight.keepOnTop=!1;y.connectionHandler.createEdgeState=function(f){f=y.createEdge(null,null,null,null,null,x);return new mxCellState(this.graph.view,f,this.graph.getCellStyle(f))};var D=y.getDefaultParent(),J=mxUtils.bind(this,function(f){var p=new mxCellOverlay(this.connectImage,"Add outgoing");p.cursor="hand";p.addListener(mxEvent.CLICK,function(n,t){y.connectionHandler.reset();y.clearSelection();+var z=y.getCellGeometry(f),F;N(function(){F=y.insertVertex(D,null,"Entry",z.x,z.y,80,30,"rounded=1;");J(F);y.view.refresh(F);y.insertEdge(D,null,"",f,F,x)},function(){y.scrollCellToVisible(F)})});p.addListener("pointerdown",function(n,t){n=t.getProperty("event");t=t.getProperty("state");y.popupMenuHandler.hideMenu();y.stopEditing(!1);var z=mxUtils.convertPoint(y.container,mxEvent.getClientX(n),mxEvent.getClientY(n));y.connectionHandler.start(t,z.x,z.y);y.isMouseDown=!0;y.isMouseTrigger=mxEvent.isMouseEvent(n);+mxEvent.consume(n)});y.addCellOverlay(f,p)});y.getModel().beginUpdate();try{var K=y.insertVertex(D,null,"Start",0,0,80,30,"ellipse");J(K)}finally{y.getModel().endUpdate()}if("horizontalTree"==l){var L=new mxCompactTreeLayout(y);L.edgeRouting=!1;L.levelDistance=30;L.sortEdges=!0;x="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==l?(L=new mxCompactTreeLayout(y,!1),L.edgeRouting=!1,L.levelDistance=30,L.sortEdges=!0,x="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==l?(L=new mxRadialTreeLayout(y,+!1),L.edgeRouting=!1,L.levelDistance=80):"verticalFlow"==l?L=new mxHierarchicalLayout(y,mxConstants.DIRECTION_NORTH):"horizontalFlow"==l?L=new mxHierarchicalLayout(y,mxConstants.DIRECTION_WEST):"circle"==l?L=new mxCircleLayout(y):(L=new mxFastOrganicLayout(y,!1),L.forceConstant=80);if(null!=L){var N=function(f,p){y.getModel().beginUpdate();try{null!=f&&f(),L.execute(y.getDefaultParent(),K)}catch(n){throw n;}finally{f=new mxMorphing(y),f.addListener(mxEvent.DONE,mxUtils.bind(this,function(){y.getModel().endUpdate();+null!=p&&p()})),f.startAnimation()}},c=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(f,p,n,t,z){c.apply(this,arguments);N()};y.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);N()};y.connectionHandler.addListener(mxEvent.CONNECT,function(){N()})}q=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});q.className="geBtn";b.editor.cancelFirst&&d.appendChild(q);var e=mxUtils.button(mxResources.get("insert"),+function(f){y.clearCellOverlays();var p=y.getModel().getChildren(y.getDefaultParent());f=mxEvent.isAltDown(f)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(y.getBoundingBoxFromGeometry(p,!0));p=b.editor.graph.importCells(p,f.x,f.y);f=b.editor.graph.view;var n=f.getBounds(p);null!=n&&(n.x-=f.translate.x,n.y-=f.translate.y,b.editor.graph.scrollRectToVisible(n),b.editor.graph.setSelectionCells(p));b.hideDialog()});d.appendChild(e);e.className="geBtn gePrimaryBtn";b.editor.cancelFirst||+d.appendChild(q);this.graph=y};this.container=d};CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+"/handle-connect.png",26,26);-var BackgroundImageDialog=function(b,f,m,d,t){function y(){null==k||k==mxConstants.NONE?(S.style.display="none",T.checked=!1):(S.style.backgroundColor=k,S.style.display="",T.checked=!0)}var x=b.editor.graph,C=document.createElement("div");C.style.whiteSpace="nowrap";var K=document.createElement("h2");mxUtils.write(K,mxResources.get("background"));K.style.marginTop="0px";C.appendChild(K);var M=null!=m&&null!=m.originalSrc;K=!1;var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-bottom:8px;";-N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","geBackgroundImageDialogOption");var P=document.createElement("input");P.style.cssText="margin-right:8px;margin-bottom:8px;";P.setAttribute("value","url");P.setAttribute("type","radio");P.setAttribute("name","geBackgroundImageDialogOption");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginBottom="8px";I.style.width="360px";I.value=M||null==m?"":m.src;var c=document.createElement("select");-c.style.width="360px";if(null!=b.pages)for(var e=0;e<b.pages.length;e++){var l=document.createElement("option");mxUtils.write(l,b.pages[e].getName()||mxResources.get("pageWithNumber",[e+1]));l.setAttribute("value","data:page/id,"+b.pages[e].getId());b.pages[e]==b.currentPage&&l.setAttribute("disabled","disabled");null!=m&&m.originalSrc==l.getAttribute("value")&&(l.setAttribute("selected","selected"),K=!0);c.appendChild(l)}M||null!=b.pages&&1!=b.pages.length||(N.style.display="none",P.style.display=-"none",c.style.display="none");var n=document.createElement("option"),p=!1,u=!1,B=function(z,A){p||null!=z&&u||(P.checked?null!=A&&A(n.selected?null:c.value):""==I.value||b.isOffline()?(G.value="",E.value="",null!=A&&A("")):(I.value=mxUtils.trim(I.value),b.loadImage(I.value,function(H){G.value=H.width;E.value=H.height;null!=A&&A(I.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));G.value="";E.value="";null!=A&&A(null)})))},D=mxUtils.bind(this,-function(z){b.importFiles(z,0,0,b.maxBackgroundSize,function(A,H,R,g,q,F){I.value=A;B();I.focus()},function(){},function(A){return"image/"==A.type.substring(0,6)},function(A){for(var H=0;H<A.length;H++)A[H]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){M?c.focus():I.focus();mxEvent.addListener(c,"focus",function(){N.removeAttribute("checked");P.setAttribute("checked","checked");P.checked=!0});mxEvent.addListener(I,"focus",function(){P.removeAttribute("checked");N.setAttribute("checked",-"checked");N.checked=!0});if(Graph.fileSupport){I.setAttribute("placeholder",mxResources.get("dragImagesHere"));var z=C.parentNode,A=null;mxEvent.addListener(z,"dragleave",function(H){null!=A&&(A.parentNode.removeChild(A),A=null);H.stopPropagation();H.preventDefault()});mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(H){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=b.highlightElement(z));H.stopPropagation();H.preventDefault()}));mxEvent.addListener(z,"drop",mxUtils.bind(this,-function(H){null!=A&&(A.parentNode.removeChild(A),A=null);if(0<H.dataTransfer.files.length)D(H.dataTransfer.files);else if(0<=mxUtils.indexOf(H.dataTransfer.types,"text/uri-list")){var R=H.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(R)&&(I.value=decodeURIComponent(R),B())}H.stopPropagation();H.preventDefault()}),!1)}};C.appendChild(N);C.appendChild(I);mxUtils.br(C);e=document.createElement("span");e.style.marginLeft="30px";mxUtils.write(e,mxResources.get("width")+-":");C.appendChild(e);var G=document.createElement("input");G.setAttribute("type","text");G.style.width="60px";G.style.marginLeft="8px";G.style.marginRight="16px";G.value=null==m||M?"":m.width;C.appendChild(G);mxUtils.write(C,mxResources.get("height")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.width="60px";E.style.marginLeft="8px";E.style.marginRight="16px";E.value=null==m||M?"":m.height;C.appendChild(E);mxUtils.br(C);mxUtils.br(C);mxEvent.addListener(I,"change",-B);ImageDialog.filePicked=function(z){z.action==google.picker.Action.PICKED&&null!=z.docs[0].thumbnails&&(z=z.docs[0].thumbnails[z.docs[0].thumbnails.length-1],null!=z&&(I.value=z.url,B()));I.focus()};C.appendChild(P);C.appendChild(c);mxUtils.br(C);mxUtils.br(C);M?(P.setAttribute("checked","checked"),P.checked=!0):(N.setAttribute("checked","checked"),N.checked=!0);!K&&P.checked&&(mxUtils.write(n,mxResources.get("pageNotFound")),n.setAttribute("disabled","disabled"),n.setAttribute("selected","selected"),-n.setAttribute("value","pageNotFound"),c.appendChild(n),mxEvent.addListener(c,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)}));m=document.createElement("div");m.style.display=t?"inline-flex":"none";m.style.alignItems="center";m.style.cursor="default";m.style.minWidth="40%";m.style.height="20px";var T=document.createElement("input");T.setAttribute("type","checkbox");T.style.margin="0px 10px 0px 4px";T.style.verticalAlign="bottom";T.defaultChecked=d!=mxConstants.NONE&&-null!=d;T.checked=T.defaultChecked;m.appendChild(T);mxUtils.write(m,mxResources.get("fillColor"));t=m.cloneNode(!1);var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px 10px 0px 30px";O.style.verticalAlign="bottom";O.defaultChecked=x.shadowVisible;O.checked=O.defaultChecked;t.appendChild(O);mxUtils.write(t,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||O.setAttribute("disabled","disabled");mxEvent.addListener(t,"click",function(z){mxEvent.getSource(z)!=-O&&(O.checked=!O.checked)});var S=document.createElement("button");S.style.width="36px";S.style.height="18px";S.style.cursor="pointer";S.style.marginLeft="10px";S.style.backgroundPosition="center center";S.style.backgroundRepeat="no-repeat";S.style.verticalAlign="bottom";S.className="geColorBtn";var k=d;y();mxEvent.addListener(m,"click",function(z){mxEvent.getSource(z)!=T&&(T.checked=!T.checked);k=T.checked?"#ffffff":null;y()});mxEvent.addListener(S,"click",function(z){b.pickColor(k||"none",function(A){k=-A;y()});mxEvent.consume(z)});m.appendChild(S);C.appendChild(m);C.appendChild(t);mxUtils.br(C);d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";x=mxUtils.button(mxResources.get("cancel"),function(){p=!0;b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&d.appendChild(x);t=mxUtils.button(mxResources.get("reset"),function(){I.value="";G.value="";E.value="";N.checked=!0;k=mxConstants.NONE;y();p=!1});mxEvent.addGestureListeners(t,function(){p=!0});t.className=-"geBtn";t.width="100";d.appendChild(t);if(Graph.fileSupport){var v=document.createElement("input");v.setAttribute("multiple","multiple");v.setAttribute("type","file");mxEvent.addListener(v,"change",function(z){null!=v.files&&(D(v.files),v.type="",v.type="file",v.value="")});v.style.display="none";C.appendChild(v);t=mxUtils.button(mxResources.get("open"),function(){v.click()});t.className="geBtn";d.appendChild(t)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();B(null,function(z){f(""!=-z&&null!=z?new mxImage(z,G.value,E.value):null,null==z,k,!mxClient.IS_SVG||mxClient.IS_SF?null:O.checked)})});mxEvent.addGestureListeners(applyBtn,function(){u=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(x);C.appendChild(d);this.container=C},ParseDialog=function(b,f,m){function d(c,e,l){var n=c.split("\n");if("plantUmlPng"==e||"plantUmlSvg"==e||"plantUmlTxt"==e){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var p=function(R,-g,q,F,J){y=mxEvent.isAltDown(l)?y:u.getCenterInsertPoint(new mxRectangle(0,0,F,J));var L=null;u.getModel().beginUpdate();try{L="txt"==g?b.insertAsPreText(q,y.x,y.y):u.insertVertex(null,null,null,y.x,y.y,F,J,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(q)+";"),u.setAttributeForCell(L,"plantUmlData",JSON.stringify({data:R,format:g},null,2))}finally{u.getModel().endUpdate()}null!=L&&(u.setSelectionCell(L),u.scrollCellToVisible(L))},u=b.editor.graph,B="plantUmlTxt"==-e?"txt":"plantUmlPng"==e?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==c&&"svg"==B?window.setTimeout(function(){b.spinner.stop();p(c,B,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",-295,212)},200):b.generatePlantUmlImage(c,B,function(R,g,q){b.spinner.stop();p(c,B,R,g,q)},function(R){b.handleError(R)})}}else if("mermaid"==e||"mermaid2drawio"==e){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var D=0;D<n.length&&(0==n[D].trim().length||"%%"==n[D].substring(0,2));)D++;if("---"==n[D].trim()){do D++;while(D<n.length&&"---"!=n[D].trim());D++}D=n[D].trim().toLowerCase();n=D.indexOf(" ");D=D.substring(0,0<n?n:D.length);var G="undefined"!==typeof mxMermaidToDrawio&&-"mermaid2drawio"==e&&("graph"==D||"flowchart"==D||"sequencediagram"==D||"classdiagram"==D||"statediagram-v2"==D||"statediagram"==D||"erdiagram"==D||"requirementdiagram"==D||"gitgraph"==D||"mindmap"==D||"journey"==D);u=b.editor.graph;G&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(R){b.spinner.stop();u.setSelectionCells(b.importXml(R,Math.max(y.x,20),Math.max(y.y,20),!0,null,null,!0));u.scrollCellToVisible(u.getSelectionCell())}));b.generateMermaidImage(c,null,function(R,g,q){if(!G){y=-mxEvent.isAltDown(l)?y:u.getCenterInsertPoint(new mxRectangle(0,0,g,q));b.spinner.stop();var F=null;u.getModel().beginUpdate();try{F=u.insertVertex(null,null,null,y.x,y.y,g,q,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+R+";"),u.setAttributeForCell(F,"mermaidData",JSON.stringify({data:c},null,2))}finally{u.getModel().endUpdate()}null!=F&&(u.setSelectionCell(F),u.scrollCellToVisible(F))}},function(R){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(R)})}}else if("table"==-e){e=null;var E=[],T=0,O={};for(D=0;D<n.length;D++){var S=mxUtils.trim(n[D]);if("primary key"==S.substring(0,11).toLowerCase()){var k=S.match(/\((.+)\)/);k&&k[1]&&(O[k[1]]=!0);n.splice(D,1)}else 0<S.toLowerCase().indexOf("primary key")&&(O[S.split(" ")[0]]=!0,n[D]=mxUtils.trim(S.replace(/primary key/i,"")))}for(D=0;D<n.length;D++)if(S=mxUtils.trim(n[D]),"create table"==S.substring(0,12).toLowerCase())S=mxUtils.trim(S.substring(12)),"("==S.charAt(S.length-1)&&(S=mxUtils.trim(S.substring(0,S.length--1))),e=new mxCell(S,new mxGeometry(T,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),e.vertex=!0,E.push(e),S=b.editor.graph.getPreferredSizeForCell(v),null!=S&&(e.geometry.width=S.width+10);else if(null!=e&&")"==S.charAt(0))T+=e.geometry.width+40,e=null;else if("("!=S&&null!=e){S=S.substring(0,","==S.charAt(S.length-1)?S.length-1:S.length);k=O[S.split(" ")[0]];var v=new mxCell("",new mxGeometry(0,-0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(k?"1":"0")+";");v.vertex=!0;var z=new mxCell(k?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(k?"fontStyle=1;":""));z.vertex=!0;v.insert(z);S=new mxCell(S,new mxGeometry(30,-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(k?"fontStyle=5;":""));S.vertex=!0;v.insert(S);S=b.editor.graph.getPreferredSizeForCell(S);null!=S&&e.geometry.width<S.width+30&&(e.geometry.width=Math.min(320,Math.max(e.geometry.width,S.width+30)));e.insert(v,k?0:null);e.geometry.height+=30}0<E.length&&(u=b.editor.graph,y=mxEvent.isAltDown(l)?y:u.getCenterInsertPoint(u.getBoundingBoxFromGeometry(E,-!0)),u.setSelectionCells(u.importCells(E,y.x,y.y)),u.scrollCellToVisible(u.getSelectionCell()))}else if("list"==e){if(0<n.length){u=b.editor.graph;e=null;E=[];for(D=v=0;D<n.length;D++)";"!=n[D].charAt(0)&&(0==n[D].length?e=null:null==e?(e=new mxCell(n[D],new mxGeometry(v,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),e.vertex=!0,E.push(e),S=u.getPreferredSizeForCell(e),-null!=S&&e.geometry.width<S.width+10&&(e.geometry.width=S.width+10),v+=e.geometry.width+40):"--"==n[D]?(S=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),S.vertex=!0,e.geometry.height+=S.geometry.height,e.insert(S)):0<n[D].length&&(T=new mxCell(n[D],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),-T.vertex=!0,S=u.getPreferredSizeForCell(T),null!=S&&T.geometry.width<S.width&&(T.geometry.width=S.width),e.geometry.width=Math.max(e.geometry.width,T.geometry.width),e.geometry.height+=T.geometry.height,e.insert(T)));if(0<E.length){y=mxEvent.isAltDown(l)?y:u.getCenterInsertPoint(u.getBoundingBoxFromGeometry(E,!0));u.getModel().beginUpdate();try{E=u.importCells(E,y.x,y.y);S=[];for(D=0;D<E.length;D++)S.push(E[D]),S=S.concat(E[D].children);u.fireEvent(new mxEventObject("cellsInserted","cells",S))}finally{u.getModel().endUpdate()}u.setSelectionCells(E);-u.scrollCellToVisible(u.getSelectionCell())}}}else{v=function(R){var g=A[R];null==g&&(g=new mxCell(R,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),g.vertex=!0,A[R]=g,E.push(g));return g};var A={};E=[];for(D=0;D<n.length;D++)if(";"!=n[D].charAt(0)){var H=n[D].split("->");2<=H.length&&(k=v(H[0]),z=v(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry),H.edge=!0,H.geometry.relative=!0,k.insertEdge(H,!0),z.insertEdge(H,!1),E.push(H))}if(0<E.length){n=document.createElement("div");n.style.visibility=-"hidden";document.body.appendChild(n);u=new Graph(n);u.getModel().beginUpdate();try{E=u.importCells(E);for(D=0;D<E.length;D++)u.getModel().isVertex(E[D])&&(S=u.getPreferredSizeForCell(E[D]),E[D].geometry.width=Math.max(E[D].geometry.width,S.width),E[D].geometry.height=Math.max(E[D].geometry.height,S.height));D=!0;"horizontalFlow"==e||"verticalFlow"==e?((new mxHierarchicalLayout(u,"horizontalFlow"==e?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(u.getDefaultParent(),E),D=!1):"circle"==-e?(new mxCircleLayout(u)).execute(u.getDefaultParent()):(T=new mxFastOrganicLayout(u),T.disableEdgeStyle=!1,T.forceConstant=180,T.execute(u.getDefaultParent()));D&&(O=new mxParallelEdgeLayout(u),O.spacing=30,O.execute(u.getDefaultParent()))}finally{u.getModel().endUpdate()}u.clearCellOverlays();S=[];b.editor.graph.getModel().beginUpdate();try{E=u.getModel().getChildren(u.getDefaultParent()),y=mxEvent.isAltDown(l)?y:b.editor.graph.getCenterInsertPoint(u.getBoundingBoxFromGeometry(E,!0)),S=b.editor.graph.importCells(E,-y.x,y.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",S))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(S);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());u.destroy();n.parentNode.removeChild(n)}}}function t(){return"list"==C.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==C.value||-"mermaid2drawio"==C.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==C.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==C.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":-"plantUmlSvg"==C.value||"plantUmlTxt"==C.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var y=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var x=document.createElement("textarea");x.style.boxSizing="border-box";x.style.resize=-"none";x.style.width="100%";x.style.height="354px";x.style.marginBottom="16px";var C=document.createElement("select");C.className="geBtn";if("formatSql"==m||"mermaid"==m&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())C.style.display="none";var K=document.createElement("option");K.setAttribute("value","list");mxUtils.write(K,mxResources.get("list"));"plantUml"!=m&&"mermaid"!=m&&C.appendChild(K);null!=m&&"fromText"!=m||K.setAttribute("selected","selected");K=document.createElement("option");-K.setAttribute("value","table");mxUtils.write(K,mxResources.get("formatSql"));"formatSql"==m&&(C.appendChild(K),K.setAttribute("selected","selected"));K=document.createElement("option");K.setAttribute("value","mermaid");mxUtils.write(K,mxResources.get("image"));if("mermaid"==m)if("undefined"!==typeof mxMermaidToDrawio){var M=document.createElement("option");M.setAttribute("value","mermaid2drawio");M.setAttribute("selected","selected");mxUtils.write(M,mxResources.get("diagram"));C.appendChild(M)}else C.style.display=-"none";C.appendChild(K);K=document.createElement("option");K.setAttribute("value","diagram");mxUtils.write(K,mxResources.get("diagram"));M=document.createElement("option");M.setAttribute("value","circle");mxUtils.write(M,mxResources.get("circle"));var N=document.createElement("option");N.setAttribute("value","horizontalFlow");mxUtils.write(N,mxResources.get("horizontalFlow"));var P=document.createElement("option");P.setAttribute("value","verticalFlow");mxUtils.write(P,mxResources.get("verticalFlow"));-"plantUml"!=m&&"mermaid"!=m&&(C.appendChild(K),C.appendChild(M),C.appendChild(N),C.appendChild(P));K=document.createElement("option");K.setAttribute("value","plantUmlSvg");mxUtils.write(K,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==m&&K.setAttribute("selected","selected");M=document.createElement("option");M.setAttribute("value","plantUmlPng");mxUtils.write(M,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");N=document.createElement("option");N.setAttribute("value",-"plantUmlTxt");mxUtils.write(N,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==m&&(C.appendChild(K),C.appendChild(M),C.appendChild(N));var I=t();x.value=I;f.appendChild(x);this.init=function(){x.focus()};Graph.fileSupport&&(x.addEventListener("dragover",function(c){c.stopPropagation();c.preventDefault()},!1),x.addEventListener("drop",function(c){c.stopPropagation();c.preventDefault();if(0<c.dataTransfer.files.length){c=-c.dataTransfer.files[0];var e=new FileReader;e.onload=function(l){x.value=l.target.result};e.readAsText(c)}},!1));f.appendChild(C);mxEvent.addListener(C,"change",function(){var c=t();if(0==x.value.length||x.value==I)I=c,x.value=I});b.isOffline()||"mermaid"!=m&&"plantUml"!=m||(K=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==m?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),K.className="geBtn",f.appendChild(K));K=mxUtils.button(mxResources.get("close"),-function(){x.value==I?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});K.className="geBtn";b.editor.cancelFirst&&f.appendChild(K);M=mxUtils.button(mxResources.get("insert"),function(c){try{b.hideDialog(),d(x.value,C.value,c)}catch(e){b.handleError(e)}});M.className="geBtn gePrimaryBtn";f.appendChild(M);b.editor.cancelFirst||f.appendChild(K);this.container=f},NewDialog=function(b,f,m,d,t,y,x,C,K,M,N,P,I,c,e,l,n,p){function u(ja){null!=ja&&(pa=Aa=ja?135:140);ja=!0;-if(null!=Wa)for(;g<Wa.length&&(ja||0!=mxUtils.mod(g,30));){var xa=Wa[g++];xa=k(xa.url,xa.libs,xa.title,xa.tooltip?xa.tooltip:xa.title,xa.select,xa.imgUrl,xa.info,xa.onClick,xa.preview,xa.noImg,xa.clibs,xa.type);ja&&xa.click();ja=!1}}function B(ja,xa,qa,oa,la,ya){if(null!=ja&&mxUtils.isAncestorNode(document.body,oa)){ja=mxUtils.parseXml(ja);ja=Editor.parseDiagramNode(ja.documentElement,null,!0);var Ja=new mxCodec(ja.ownerDocument),Fa=new mxGraphModel;Ja.decode(ja,Fa);b.sidebar.createTooltip(oa,Fa.root.children,-Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=la?mxResources.get(la):null,!0,new mxPoint(xa,qa),!0,function(){U=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=ya&&E(oa,null,null,ya,infoObj,clibs)},!0,!1)}}function D(){var ja=document.createElement("div");ja.style.position="absolute";ja.style.overflow="visible";-ja.style.left="8px";ja.style.right="8px";ja.style.bottom="8px";ja.style.top="8px";mxUtils.write(ja,mxResources.get("describeYourDiagram")+":");mxUtils.br(ja);var xa=document.createElement("input");xa.setAttribute("type","text");xa.setAttribute("placeholder",mxResources.get("processForHiringNewEmployee"));xa.style.width="100%";xa.style.marginTop="6px";xa.style.marginBottom="4px";xa.style.boxSizing="border-box";ja.appendChild(xa);ja.init=function(){xa.focus()};mxUtils.br(ja);var qa=document.createElement("div");-qa.style.top="86px";qa.style.left="2px";qa.style.right="2px";qa.style.bottom="2px";qa.style.position="absolute";qa.style.border="1px solid #424242";var oa=document.createElement("div");oa.style.boxSizing="border-box";oa.style.position="relative";oa.style.textAlign="center";oa.style.top="50%";mxUtils.write(oa,mxResources.get("blankDiagram"));qa.appendChild(oa);var la=document.createElement("select");la.className="geBtn";la.style.maxWidth="160px";la.style.marginLeft="0px";oa=document.createElement("option");-mxUtils.write(oa,mxResources.get("diagramType"));oa.setAttribute("value","");la.appendChild(oa);for(var ya=0;ya<EditorUi.mermaidDiagramTypes.length;ya++){oa=document.createElement("option");var Ja=EditorUi.mermaidDiagramTypes[ya],Fa=Ja;Ja==urlParams["smart-template-type"]&&oa.setAttribute("selected","selected");"erDiagram"==Fa&&(Fa="entityRelationshipDiagram");Fa=mxResources.get(Fa,null,Fa.charAt(0).toUpperCase()+Fa.substring(1).replace(/[A-Z]/g," $&"));oa.setAttribute("value",Ja);mxUtils.write(oa,-Fa);la.appendChild(oa)}var La=mxUtils.button(mxResources.get("generate"),function(){var Pa=xa.value,Ka=la.value.replace(/([A-Z])/g," $1").toLowerCase();Pa="Write the declaration code for a detailed and complex "+(""!=Ka?Ka:"graph")+' that shows "'+(""!=Pa?Pa:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Ka=""!=la.value?" ("+mxUtils.trim(mxUtils.getTextContent(la.options[la.selectedIndex]))+")":"";var Ra="gantt"==la.value||"pie"==la.value||-"timeline"==la.value||"quadrantchart"==la.value||"c4context"==la.value,Ma=xa.value+Ka;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Qa){Ra||(sa=ma=Qa,fa="Smart Template: "+Ma)}));b.spinner.spin(document.body,mxResources.get("loading"))&&b.generateOpenAiMermaidDiagram(Pa,function(Qa,Ya,Ga,eb){b.spinner.stop();qa.innerHTML="";var Ua=document.createElement("img");Ua.setAttribute("title",Ma);Ua.src="data:image/svg+xml;base64,"+Ya.substring(Ya.indexOf(",")+-1);Ua.style.cursor="pointer";Ua.style.width="100%";Ua.style.height="100%";qa.appendChild(Ua);Qa=b.createMermaidXml(Qa,EditorUi.defaultMermaidConfig,Ya,Ga,eb,Ma);var ib="<mxfile><diagram>"+Graph.compress(Qa)+"</diagram></mxfile>";if(Ra||"undefined"===typeof mxMermaidToDrawio)sa=ma=Qa;Qa=J.cloneNode(!0);qa.appendChild(Qa);Ya=function(fb){U=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ga=function(fb){U||B(ib,mxEvent.getClientX(fb),mxEvent.getClientY(fb),Ua,Ma)};mxEvent.addGestureListeners(Ua,-Ya,null,Ga);mxEvent.addGestureListeners(Qa,Ya,null,Ga)},function(Qa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Qa)})});La.setAttribute("disabled","disabled");La.className="geBtn gePrimaryBtn";oa=function(){window.setTimeout(function(){""!=xa.value?La.removeAttribute("disabled"):La.setAttribute("disabled","disabled")},0)};ya=urlParams["smart-template"];null!=ya&&"1"!=ya&&(xa.value=decodeURIComponent(ya),oa(),"1"==urlParams["smart-template-generate"]&&-window.setTimeout(function(){La.click()},0));mxEvent.addListener(xa,"change",oa);mxEvent.addListener(xa,"keydown",oa);mxEvent.addListener(xa,"cut",oa);mxEvent.addListener(xa,"paste",oa);mxEvent.addListener(xa,"keydown",function(Pa){13==Pa.keyCode&&La.click()});oa=document.createElement("div");oa.style.height="40px";oa.style.marginTop="4px";oa.style.marginBottom="4px";oa.style.whiteSpace="nowrap";oa.style.overflowX="auto";oa.style.overflowY="hidden";oa.appendChild(la);oa.appendChild(La);ja.appendChild(oa);-ja.appendChild(qa);return ja}function G(){null!=ma&&ma==sa&&EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"templateGenerated",label:fa});if(ia&&null!=c)m||b.hideDialog(),c(ia,ta,R.value);else if(d)m||b.hideDialog(),d(ma,R.value,ka,ca);else{var ja=R.value;if(null!=ja&&0<ja.length){var xa=function(oa,la,ya){b.createFile(ya,ma,null!=ca&&0<ca.length?ca:null,oa,function(){b.hideDialog()},null,la,null,null!=da&&0<da.length?da:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var qa=new SaveDialog(b,-ja,mxUtils.bind(this,function(oa,la,ya){xa(la,ya,oa.value)}),null,null,null,null,b.mode);b.showDialog(qa.container,420,150,!0,!1);qa.init()}else b.pickFolder(b.mode,function(oa){xa(b.mode,oa,ja)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function E(ja,xa,qa,oa,la,ya,Ja){return aa!=ja?(null!=aa&&(aa.style.backgroundColor="transparent",aa.style.border="2px solid transparent",0<aa.getElementsByTagName("table").length&&(aa.getElementsByTagName("table")[0].style.visibility=-"visible"),aa==na&&(na.style.backgroundImage=Ha,na.style.backgroundPosition="center center",na.style.backgroundRepeat="no-repeat",na.style.backgroundSize="contain",wa.style.visibility="hidden",Da.style.visibility="hidden",Ca.style.visibility="hidden",Ba.style.visibility="hidden",Ea.style.visibility=null!=sa?"visible":"hidden",na.getElementsByTagName("table")[0].style.visibility="visible")),""!=ja.style.backgroundImage&&0<ja.getElementsByTagName("table").length&&(ja.getElementsByTagName("table")[0].style.visibility=-"hidden"),ja==na&&(xa=sa,null!=xa?(Ea.style.visibility="visible",Ea.style.visibility=null!=sa?"visible":"hidden",Ba.style.visibility="visible"):(wa.style.visibility="visible",Da.style.visibility="visible",Ca.style.visibility="visible",Ba.style.visibility="hidden",Ea.style.visibility="hidden")),F.removeAttribute("disabled"),ma=xa,ca=qa,da=ya,aa=ja,ia=oa,ka=Ja,ta=la,aa.style.border=K,!0):!1}function T(){na.style.backgroundImage="";na.getElementsByTagName("table")[0].style.visibility="hidden";wa.style.visibility=-"visible";Da.style.visibility="visible";Ca.style.visibility="visible";Ba.style.visibility="hidden";Ea.style.visibility="hidden";wa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?wa.select():document.execCommand("selectAll",!1,null)}function O(){wa.style.visibility="hidden";Da.style.visibility="hidden";Ca.style.visibility="hidden";na.style.backgroundImage=Ha;na.style.backgroundSize="contain";Ba.style.visibility="visible";Ea.style.visibility="visible"}function S(ja){var xa=mxUtils.trim(wa.value);-if(ja||""==xa)null!=fa&&(wa.value=fa,O());else{wa.style.visibility="hidden";Da.style.visibility="hidden";Ca.style.visibility="hidden";var qa=!1;ja='Write a detailed and complex MermaidJS declaration for "'+(""!=xa?xa:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(oa){oa!=b.emptyDiagramXml&&(qa=!0,ma=oa)}));na.style.backgroundImage="url("+Editor.spinImage+-")";na.style.backgroundSize="12px 12px";b.generateOpenAiMermaidDiagram(ja,function(oa,la,ya,Ja){aa==na&&"hidden"==wa.style.visibility&&(Ha="url(data:image/svg+xml;base64,"+la.substring(la.indexOf(",")+1)+")",na.setAttribute("title",xa),sa=ma=oa=qa?ma:b.createMermaidXml(oa,EditorUi.defaultMermaidConfig,la,ya,Ja,xa),fa=xa,O())},function(oa){aa==na&&(wa.style.visibility="visible",Da.style.visibility="visible",Ca.style.visibility="visible",Ba.style.visibility="visible",Ea.style.visibility="visible",b.handleError(oa))})}}-function k(ja,xa,qa,oa,la,ya,Ja,Fa,La,Pa,Ka,Ra){function Ma(Oa,$a){null==eb?(Ua=Oa,Ua=/^https?:\/\//.test(Ua)?b.editor.isCorsEnabledForUrl(Ua)?Ua:PROXY_URL+"?url="+encodeURIComponent(Ua):TEMPLATE_PATH+"/"+Ua,mxUtils.get(Ua,mxUtils.bind(this,function(ab){200<=ab.getStatus()&&299>=ab.getStatus()&&(eb=ab.getText());$a(eb,Ua)}))):$a(eb,Ua)}function Qa(Oa,$a){if(null==ja||L||b.sidebar.currentElt==Ga)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=Q){var ab="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+-Q.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Q.naturalWidth+'" height="'+Q.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";B(ab,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),qa,ja)}else b.sidebar.currentElt=Ga,L=!0,Ma(ja,function(gb){if(L&&b.sidebar.currentElt==Ga)try{B(gb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ga,$a)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}L=!1})}function Ya(){var Oa=document.createElement("table");-Oa.setAttribute("width","100%");Oa.setAttribute("height","100%");Oa.style.background="light-dark(rgba(255,255,255,0.85), transparent)";Oa.style.lineHeight="1.3em";Oa.style.border="none";var $a=document.createElement("tbody"),ab=document.createElement("tr"),gb=document.createElement("td");gb.setAttribute("align","center");gb.setAttribute("valign","middle");var Za=document.createElement("span");Za.style.display="inline-block";Za.style.padding="2px 8px";Za.style.userSelect="none";Za.style.borderRadius=-"8px";Za.style.background="rgba(255,255,255,0.7)";Za.style.overflow="hidden";Za.style.textOverflow="ellipsis";Za.style.maxWidth=pa-34+"px";mxUtils.write(Za,mxResources.get(qa,null,qa));gb.appendChild(Za);ab.appendChild(gb);$a.appendChild(ab);Oa.appendChild($a);return Oa}var Ga=null;if("generative"!=Ra||null==na){Ga=document.createElement("div");Ga.className="geTemplate geAdaptiveAsset";Ga.style.backgroundOrigin="content-box";Ga.style.backgroundPosition="center center";Ga.style.backgroundRepeat="no-repeat";-Ga.style.backgroundSize="contain";Ga.style.boxSizing="border-box";Ga.style.borderRadius="12px";Ga.style.position="relative";Ga.style.height=pa+"px";Ga.style.width=Aa+"px";Ga.style.padding="4px";Ga.style.border="2px solid transparent";var eb=null,Ua=ja;null!=qa?Ga.setAttribute("title",mxResources.get(qa,null,qa)):null!=oa&&0<oa.length&&Ga.setAttribute("title",oa)}else Ga=na;if(null!=ya){Ga.style.display="inline-flex";Ga.style.justifyContent="center";Ga.style.alignItems="center";la=document.createElement("img");-la.setAttribute("src",ya);la.setAttribute("alt",oa);la.style.maxWidth=pa+"px";la.style.maxHeight=Aa+"px";Q=la;var ib=ya.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ga.appendChild(la);la.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){E(Ga,null,null,ja,Ja,Ka)}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){G();mxEvent.consume(Oa)})}else if(!Pa&&null!=ja&&0<ja.length){var fb=-function(Oa){q.spin(ra)&&Ma(ja,function($a,ab){q.stop();null!=$a&&(E(Ga,$a,xa,null,null,Ka,ab),Oa&&G())})};ya=La||TEMPLATE_PATH+"/"+ja.substring(0,ja.length-4)+".png";Ga.style.backgroundImage="url("+ya+")";null!=qa&&Ga.appendChild(Ya());mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){fb()}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){fb(!0);mxEvent.consume(Oa)})}else Ga.appendChild(Ya()),"generative"==Ra&&null==na&&(Ga.style.backgroundImage=Ha,Ga.style.overflow="visible",-Ga.appendChild(Ea),Ga.appendChild(Ba),Ga.appendChild(wa),Ga.appendChild(Da),Ga.appendChild(Ca),na=Ga),la&&E(Ga),null!=Fa?(mxEvent.addGestureListeners(Ga,null,null,mxUtils.bind(this,function(Oa){E(Ga,null,null,ja,Ja)})),mxEvent.addListener(Ga,"click",Fa)):(mxEvent.addListener(Ga,"click",function(Oa){E(Ga,null,null,ja,Ja)&&"generative"==Ra&&null==sa&&T()}),mxEvent.addListener(Ga,"dblclick",function(Oa){"generative"!=Ra?G():"hidden"==wa.style.visibility&&T();mxEvent.consume(Oa)}));null!=ja&&(ya=J.cloneNode(!0),-Ga.appendChild(ya),mxEvent.addGestureListeners(ya,mxUtils.bind(this,function(Oa){U=b.sidebar.currentElt==Ga}),null,null),mxEvent.addListener(ya,"click",mxUtils.bind(this,function(Oa){U||Qa(Oa,null!=qa?qa:oa);mxEvent.consume(Oa)})));ra.appendChild(Ga);return Ga}function v(){function ja(Ma,Qa){Ma=mxResources.get(Ma,null,Ma.substring(0,1).toUpperCase()+Ma.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"…");return Ma+(null!=Qa?" ("+Qa.length+")":"")}function xa(Ma,Qa,Ya){mxEvent.addListener(Qa,-"click",function(){Sa!=Qa&&(null!=Sa&&(Sa.style.backgroundColor=""),Sa=Qa,Sa.style.backgroundColor=x,ra.scrollTop=0,ra.innerText="",g=0,null!=Ia[Ma].content?(ra.appendChild(Ia[Ma].content),ma=sa,Wa=null,null!=Ia[Ma].content.init&&Ia[Ma].content.init()):(Wa=Ya?Va[Ma][Ya]:Ia[Ma],W=null,u(!1)))});null!=urlParams["smart-template"]&&"smartTemplate"==Ma&&Qa.click()}jb&&(jb=!1,mxEvent.addListener(ra,"scroll",function(Ma){ra.scrollTop+ra.clientHeight>=ra.scrollHeight&&(u(),mxEvent.consume(Ma))}));if(0<Xa){var qa=-document.createElement("div");qa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(qa,mxResources.get("custom"));ha.appendChild(qa);for(var oa in Ta){var la=document.createElement("div");qa=oa;var ya=Ta[oa];18<qa.length&&(qa=qa.substring(0,18)+"…");la.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";la.setAttribute("title",qa+" ("+-ya.length+")");mxUtils.write(la,la.getAttribute("title"));null!=M&&(la.style.padding=M);ha.appendChild(la);(function(Ma,Qa){mxEvent.addListener(la,"click",function(){Sa!=Qa&&(Sa.style.backgroundColor="",Sa=Qa,Sa.style.backgroundColor=x,ra.scrollTop=0,ra.innerText="",g=0,Wa=Ta[Ma],W=null,u(!1))})})(oa,la)}qa=document.createElement("div");qa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(qa,"draw.io");ha.appendChild(qa)}for(oa in Ia){qa=-ya=null;if(null!=Ia[oa].content)la=document.createElement(Ja?"ul":"div"),qa=ja(oa),la.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",la.setAttribute("title",qa),mxUtils.write(la,qa),ha.appendChild(la),qa=la;else{var Ja=Va[oa];qa=la=document.createElement(Ja?"ul":"div");ya=Ia[oa];var Fa=ja(oa,ya);if(null!=Ja){ya=document.createElement("li");var La=document.createElement("div");-La.className="geTempTreeCaret";La.setAttribute("title",Fa);mxUtils.write(La,Fa);qa=La;ya.appendChild(La);Fa=document.createElement("ul");Fa.className="geTempTreeNested";Fa.style.visibility="hidden";for(var Pa in Ja){var Ka=document.createElement("li"),Ra=ja(Pa,Ja[Pa]);Ka.setAttribute("title",Ra);mxUtils.write(Ka,Ra);xa(oa,Ka,Pa);Fa.appendChild(Ka)}ya.appendChild(Fa);la.className="geTempTree";la.appendChild(ya);(function(Ma,Qa){mxEvent.addListener(Qa,"click",function(){Ma.style.visibility="visible";-Ma.classList.toggle("geTempTreeActive");Ma.classList.toggle("geTempTreeNested")&&setTimeout(function(){Ma.style.visibility="hidden"},550);Qa.classList.toggle("geTempTreeCaret-down")})})(Fa,La)}else la.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",la.setAttribute("title",Fa),mxUtils.write(la,Fa);null!=M&&(la.style.padding=M);ha.appendChild(la)}xa(oa,qa);null==Sa&&qa.click()}u(!1)}-C=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);m=null!=m?m:!0;t=null!=t?t:!1;x=null!=x?x:"light-dark(#ebf2f9, "+Editor.darkColor+")";K=null!=K?K:"2px dashed light-dark(#29b6f2, #00a8ff)";N=null!=N?N:EditorUi.templateFile;var z=document.createElement("div");z.style.userSelect="none";z.style.height="100%";var A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="46px";m&&z.appendChild(A);var H=document.createElement("img");H.setAttribute("border",+var BackgroundImageDialog=function(b,g,l,d,q){function y(){null==m||m==mxConstants.NONE?(Q.style.display="none",U.checked=!1):(Q.style.backgroundColor=m,Q.style.display="",U.checked=!0)}var x=b.editor.graph,D=document.createElement("div");D.style.whiteSpace="nowrap";var J=document.createElement("h2");mxUtils.write(J,mxResources.get("background"));J.style.marginTop="0px";D.appendChild(J);var K=null!=l&&null!=l.originalSrc;J=!1;var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";+L.setAttribute("value","url");L.setAttribute("type","radio");L.setAttribute("name","geBackgroundImageDialogOption");var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.width="360px";c.value=K||null==l?"":l.src;var e=document.createElement("select");+e.style.width="360px";if(null!=b.pages)for(var f=0;f<b.pages.length;f++){var p=document.createElement("option");mxUtils.write(p,b.pages[f].getName()||mxResources.get("pageWithNumber",[f+1]));p.setAttribute("value","data:page/id,"+b.pages[f].getId());b.pages[f]==b.currentPage&&p.setAttribute("disabled","disabled");null!=l&&l.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),J=!0);e.appendChild(p)}K||null!=b.pages&&1!=b.pages.length||(L.style.display="none",N.style.display=+"none",e.style.display="none");var n=document.createElement("option"),t=!1,z=!1,F=function(A,B){t||null!=A&&z||(N.checked?null!=B&&B(n.selected?null:e.value):""==c.value||b.isOffline()?(E.value="",R.value="",null!=B&&B("")):(c.value=mxUtils.trim(c.value),b.loadImage(c.value,function(H){E.value=H.width;R.value=H.height;null!=B&&B(c.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));E.value="";R.value="";null!=B&&B(null)})))},C=mxUtils.bind(this,+function(A){b.importFiles(A,0,0,b.maxBackgroundSize,function(B,H,T,k,v,G){c.value=B;F();c.focus()},function(){},function(B){return"image/"==B.type.substring(0,6)},function(B){for(var H=0;H<B.length;H++)B[H]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){K?e.focus():c.focus();mxEvent.addListener(e,"focus",function(){L.removeAttribute("checked");N.setAttribute("checked","checked");N.checked=!0});mxEvent.addListener(c,"focus",function(){N.removeAttribute("checked");L.setAttribute("checked",+"checked");L.checked=!0});if(Graph.fileSupport){c.setAttribute("placeholder",mxResources.get("dragImagesHere"));var A=D.parentNode,B=null;mxEvent.addListener(A,"dragleave",function(H){null!=B&&(B.parentNode.removeChild(B),B=null);H.stopPropagation();H.preventDefault()});mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(H){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=b.highlightElement(A));H.stopPropagation();H.preventDefault()}));mxEvent.addListener(A,"drop",mxUtils.bind(this,+function(H){null!=B&&(B.parentNode.removeChild(B),B=null);if(0<H.dataTransfer.files.length)C(H.dataTransfer.files);else if(0<=mxUtils.indexOf(H.dataTransfer.types,"text/uri-list")){var T=H.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)&&(c.value=decodeURIComponent(T),F())}H.stopPropagation();H.preventDefault()}),!1)}};D.appendChild(L);D.appendChild(c);mxUtils.br(D);f=document.createElement("span");f.style.marginLeft="30px";mxUtils.write(f,mxResources.get("width")++":");D.appendChild(f);var E=document.createElement("input");E.setAttribute("type","text");E.style.width="60px";E.style.marginLeft="8px";E.style.marginRight="16px";E.value=null==l||K?"":l.width;D.appendChild(E);mxUtils.write(D,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==l||K?"":l.height;D.appendChild(R);mxUtils.br(D);mxUtils.br(D);mxEvent.addListener(c,"change",+F);ImageDialog.filePicked=function(A){A.action==google.picker.Action.PICKED&&null!=A.docs[0].thumbnails&&(A=A.docs[0].thumbnails[A.docs[0].thumbnails.length-1],null!=A&&(c.value=A.url,F()));c.focus()};D.appendChild(N);D.appendChild(e);mxUtils.br(D);mxUtils.br(D);K?(N.setAttribute("checked","checked"),N.checked=!0):(L.setAttribute("checked","checked"),L.checked=!0);!J&&N.checked&&(mxUtils.write(n,mxResources.get("pageNotFound")),n.setAttribute("disabled","disabled"),n.setAttribute("selected","selected"),+n.setAttribute("value","pageNotFound"),e.appendChild(n),mxEvent.addListener(e,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)}));l=document.createElement("div");l.style.display=q?"inline-flex":"none";l.style.alignItems="center";l.style.cursor="default";l.style.minWidth="40%";l.style.height="20px";var U=document.createElement("input");U.setAttribute("type","checkbox");U.style.margin="0px 10px 0px 4px";U.style.verticalAlign="bottom";U.defaultChecked=d!=mxConstants.NONE&&+null!=d;U.checked=U.defaultChecked;l.appendChild(U);mxUtils.write(l,mxResources.get("fillColor"));q=l.cloneNode(!1);var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px 10px 0px 30px";O.style.verticalAlign="bottom";O.defaultChecked=x.shadowVisible;O.checked=O.defaultChecked;q.appendChild(O);mxUtils.write(q,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||O.setAttribute("disabled","disabled");mxEvent.addListener(q,"click",function(A){mxEvent.getSource(A)!=+O&&(O.checked=!O.checked)});var Q=document.createElement("button");Q.style.width="36px";Q.style.height="18px";Q.style.cursor="pointer";Q.style.marginLeft="10px";Q.style.backgroundPosition="center center";Q.style.backgroundRepeat="no-repeat";Q.style.verticalAlign="bottom";Q.className="geColorBtn";var m=d;y();mxEvent.addListener(l,"click",function(A){mxEvent.getSource(A)!=U&&(U.checked=!U.checked);m=U.checked?"#ffffff":null;y()});mxEvent.addListener(Q,"click",function(A){b.pickColor(m||"none",function(B){m=+B;y()});mxEvent.consume(A)});l.appendChild(Q);D.appendChild(l);D.appendChild(q);mxUtils.br(D);d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";x=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&d.appendChild(x);q=mxUtils.button(mxResources.get("reset"),function(){c.value="";E.value="";R.value="";L.checked=!0;m=mxConstants.NONE;y();t=!1});mxEvent.addGestureListeners(q,function(){t=!0});q.className=+"geBtn";q.width="100";d.appendChild(q);if(Graph.fileSupport){var u=document.createElement("input");u.setAttribute("multiple","multiple");u.setAttribute("type","file");mxEvent.addListener(u,"change",function(A){null!=u.files&&(C(u.files),u.type="",u.type="file",u.value="")});u.style.display="none";D.appendChild(u);q=mxUtils.button(mxResources.get("open"),function(){u.click()});q.className="geBtn";d.appendChild(q)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();F(null,function(A){g(""!=+A&&null!=A?new mxImage(A,E.value,R.value):null,null==A,m,!mxClient.IS_SVG||mxClient.IS_SF?null:O.checked)})});mxEvent.addGestureListeners(applyBtn,function(){z=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(x);D.appendChild(d);this.container=D},ParseDialog=function(b,g,l){function d(e,f,p){var n=e.split("\n");if("plantUmlPng"==f||"plantUmlSvg"==f||"plantUmlTxt"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var t=function(T,+k,v,G,I){y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(new mxRectangle(0,0,G,I));var M=null;z.getModel().beginUpdate();try{M="txt"==k?b.insertAsPreText(v,y.x,y.y):z.insertVertex(null,null,null,y.x,y.y,G,I,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(v)+";"),z.setAttributeForCell(M,"plantUmlData",JSON.stringify({data:T,format:k},null,2))}finally{z.getModel().endUpdate()}null!=M&&(z.setSelectionCell(M),z.scrollCellToVisible(M))},z=b.editor.graph,F="plantUmlTxt"==+f?"txt":"plantUmlPng"==f?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==e&&"svg"==F?window.setTimeout(function(){b.spinner.stop();t(e,F,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",+295,212)},200):b.generatePlantUmlImage(e,F,function(T,k,v){b.spinner.stop();t(e,F,T,k,v)},function(T){b.handleError(T)})}}else if("mermaid"==f||"mermaid2drawio"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var C=0;C<n.length&&(0==n[C].trim().length||"%%"==n[C].substring(0,2));)C++;if("---"==n[C].trim()){do C++;while(C<n.length&&"---"!=n[C].trim());C++}C=n[C].trim().toLowerCase();n=C.indexOf(" ");C=C.substring(0,0<n?n:C.length);var E="undefined"!==typeof mxMermaidToDrawio&&+"mermaid2drawio"==f&&("graph"==C||"flowchart"==C||"sequencediagram"==C||"classdiagram"==C||"statediagram-v2"==C||"statediagram"==C||"erdiagram"==C||"requirementdiagram"==C||"gitgraph"==C||"mindmap"==C||"journey"==C);z=b.editor.graph;E&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(T){b.spinner.stop();z.setSelectionCells(b.importXml(T,Math.max(y.x,20),Math.max(y.y,20),!0,null,null,!0));z.scrollCellToVisible(z.getSelectionCell())}));b.generateMermaidImage(e,null,function(T,k,v){if(!E){y=+mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(new mxRectangle(0,0,k,v));b.spinner.stop();var G=null;z.getModel().beginUpdate();try{G=z.insertVertex(null,null,null,y.x,y.y,k,v,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+T+";"),z.setAttributeForCell(G,"mermaidData",JSON.stringify({data:e},null,2))}finally{z.getModel().endUpdate()}null!=G&&(z.setSelectionCell(G),z.scrollCellToVisible(G))}},function(T){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(T)})}}else if("table"==+f){f=null;var R=[],U=0,O={};for(C=0;C<n.length;C++){var Q=mxUtils.trim(n[C]);if("primary key"==Q.substring(0,11).toLowerCase()){var m=Q.match(/\((.+)\)/);m&&m[1]&&(O[m[1]]=!0);n.splice(C,1)}else 0<Q.toLowerCase().indexOf("primary key")&&(O[Q.split(" ")[0]]=!0,n[C]=mxUtils.trim(Q.replace(/primary key/i,"")))}for(C=0;C<n.length;C++)if(Q=mxUtils.trim(n[C]),"create table"==Q.substring(0,12).toLowerCase())Q=mxUtils.trim(Q.substring(12)),"("==Q.charAt(Q.length-1)&&(Q=mxUtils.trim(Q.substring(0,Q.length-+1))),f=new mxCell(Q,new mxGeometry(U,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),f.vertex=!0,R.push(f),Q=b.editor.graph.getPreferredSizeForCell(u),null!=Q&&(f.geometry.width=Q.width+10);else if(null!=f&&")"==Q.charAt(0))U+=f.geometry.width+40,f=null;else if("("!=Q&&null!=f){Q=Q.substring(0,","==Q.charAt(Q.length-1)?Q.length-1:Q.length);m=O[Q.split(" ")[0]];var u=new mxCell("",new mxGeometry(0,+0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(m?"1":"0")+";");u.vertex=!0;var A=new mxCell(m?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(m?"fontStyle=1;":""));A.vertex=!0;u.insert(A);Q=new mxCell(Q,new mxGeometry(30,+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(m?"fontStyle=5;":""));Q.vertex=!0;u.insert(Q);Q=b.editor.graph.getPreferredSizeForCell(Q);null!=Q&&f.geometry.width<Q.width+30&&(f.geometry.width=Math.min(320,Math.max(f.geometry.width,Q.width+30)));f.insert(u,m?0:null);f.geometry.height+=30}0<R.length&&(z=b.editor.graph,y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,+!0)),z.setSelectionCells(z.importCells(R,y.x,y.y)),z.scrollCellToVisible(z.getSelectionCell()))}else if("list"==f){if(0<n.length){z=b.editor.graph;f=null;R=[];for(C=u=0;C<n.length;C++)";"!=n[C].charAt(0)&&(0==n[C].length?f=null:null==f?(f=new mxCell(n[C],new mxGeometry(u,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),f.vertex=!0,R.push(f),Q=z.getPreferredSizeForCell(f),+null!=Q&&f.geometry.width<Q.width+10&&(f.geometry.width=Q.width+10),u+=f.geometry.width+40):"--"==n[C]?(Q=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),Q.vertex=!0,f.geometry.height+=Q.geometry.height,f.insert(Q)):0<n[C].length&&(U=new mxCell(n[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),+U.vertex=!0,Q=z.getPreferredSizeForCell(U),null!=Q&&U.geometry.width<Q.width&&(U.geometry.width=Q.width),f.geometry.width=Math.max(f.geometry.width,U.geometry.width),f.geometry.height+=U.geometry.height,f.insert(U)));if(0<R.length){y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,!0));z.getModel().beginUpdate();try{R=z.importCells(R,y.x,y.y);Q=[];for(C=0;C<R.length;C++)Q.push(R[C]),Q=Q.concat(R[C].children);z.fireEvent(new mxEventObject("cellsInserted","cells",Q))}finally{z.getModel().endUpdate()}z.setSelectionCells(R);+z.scrollCellToVisible(z.getSelectionCell())}}}else{u=function(T){var k=B[T];null==k&&(k=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),k.vertex=!0,B[T]=k,R.push(k));return k};var B={};R=[];for(C=0;C<n.length;C++)if(";"!=n[C].charAt(0)){var H=n[C].split("->");2<=H.length&&(m=u(H[0]),A=u(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry),H.edge=!0,H.geometry.relative=!0,m.insertEdge(H,!0),A.insertEdge(H,!1),R.push(H))}if(0<R.length){n=document.createElement("div");n.style.visibility=+"hidden";document.body.appendChild(n);z=new Graph(n);z.getModel().beginUpdate();try{R=z.importCells(R);for(C=0;C<R.length;C++)z.getModel().isVertex(R[C])&&(Q=z.getPreferredSizeForCell(R[C]),R[C].geometry.width=Math.max(R[C].geometry.width,Q.width),R[C].geometry.height=Math.max(R[C].geometry.height,Q.height));C=!0;"horizontalFlow"==f||"verticalFlow"==f?((new mxHierarchicalLayout(z,"horizontalFlow"==f?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(z.getDefaultParent(),R),C=!1):"circle"==+f?(new mxCircleLayout(z)).execute(z.getDefaultParent()):(U=new mxFastOrganicLayout(z),U.disableEdgeStyle=!1,U.forceConstant=180,U.execute(z.getDefaultParent()));C&&(O=new mxParallelEdgeLayout(z),O.spacing=30,O.execute(z.getDefaultParent()))}finally{z.getModel().endUpdate()}z.clearCellOverlays();Q=[];b.editor.graph.getModel().beginUpdate();try{R=z.getModel().getChildren(z.getDefaultParent()),y=mxEvent.isAltDown(p)?y:b.editor.graph.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,!0)),Q=b.editor.graph.importCells(R,+y.x,y.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",Q))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(Q);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());z.destroy();n.parentNode.removeChild(n)}}}function q(){return"list"==D.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==D.value||+"mermaid2drawio"==D.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==D.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==D.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":+"plantUmlSvg"==D.value||"plantUmlTxt"==D.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var y=b.editor.graph.getFreeInsertPoint();g=document.createElement("div");g.style.textAlign="right";var x=document.createElement("textarea");x.style.boxSizing="border-box";x.style.resize=+"none";x.style.width="100%";x.style.height="354px";x.style.marginBottom="16px";var D=document.createElement("select");D.className="geBtn";if("formatSql"==l||"mermaid"==l&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())D.style.display="none";var J=document.createElement("option");J.setAttribute("value","list");mxUtils.write(J,mxResources.get("list"));"plantUml"!=l&&"mermaid"!=l&&D.appendChild(J);null!=l&&"fromText"!=l||J.setAttribute("selected","selected");J=document.createElement("option");+J.setAttribute("value","table");mxUtils.write(J,mxResources.get("formatSql"));"formatSql"==l&&(D.appendChild(J),J.setAttribute("selected","selected"));J=document.createElement("option");J.setAttribute("value","mermaid");mxUtils.write(J,mxResources.get("image"));if("mermaid"==l)if("undefined"!==typeof mxMermaidToDrawio){var K=document.createElement("option");K.setAttribute("value","mermaid2drawio");K.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("diagram"));D.appendChild(K)}else D.style.display=+"none";D.appendChild(J);J=document.createElement("option");J.setAttribute("value","diagram");mxUtils.write(J,mxResources.get("diagram"));K=document.createElement("option");K.setAttribute("value","circle");mxUtils.write(K,mxResources.get("circle"));var L=document.createElement("option");L.setAttribute("value","horizontalFlow");mxUtils.write(L,mxResources.get("horizontalFlow"));var N=document.createElement("option");N.setAttribute("value","verticalFlow");mxUtils.write(N,mxResources.get("verticalFlow"));+"plantUml"!=l&&"mermaid"!=l&&(D.appendChild(J),D.appendChild(K),D.appendChild(L),D.appendChild(N));J=document.createElement("option");J.setAttribute("value","plantUmlSvg");mxUtils.write(J,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==l&&J.setAttribute("selected","selected");K=document.createElement("option");K.setAttribute("value","plantUmlPng");mxUtils.write(K,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");L=document.createElement("option");L.setAttribute("value",+"plantUmlTxt");mxUtils.write(L,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==l&&(D.appendChild(J),D.appendChild(K),D.appendChild(L));var c=q();x.value=c;g.appendChild(x);this.init=function(){x.focus()};Graph.fileSupport&&(x.addEventListener("dragover",function(e){e.stopPropagation();e.preventDefault()},!1),x.addEventListener("drop",function(e){e.stopPropagation();e.preventDefault();if(0<e.dataTransfer.files.length){e=+e.dataTransfer.files[0];var f=new FileReader;f.onload=function(p){x.value=p.target.result};f.readAsText(e)}},!1));g.appendChild(D);mxEvent.addListener(D,"change",function(){var e=q();if(0==x.value.length||x.value==c)c=e,x.value=c});b.isOffline()||"mermaid"!=l&&"plantUml"!=l||(J=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==l?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),J.className="geBtn",g.appendChild(J));J=mxUtils.button(mxResources.get("close"),+function(){x.value==c?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});J.className="geBtn";b.editor.cancelFirst&&g.appendChild(J);K=mxUtils.button(mxResources.get("insert"),function(e){try{b.hideDialog(),d(x.value,D.value,e)}catch(f){b.handleError(f)}});K.className="geBtn gePrimaryBtn";g.appendChild(K);b.editor.cancelFirst||g.appendChild(J);this.container=g},NewDialog=function(b,g,l,d,q,y,x,D,J,K,L,N,c,e,f,p,n,t){function z(ka){null!=ka&&(ma=Aa=ka?135:140);ka=!0;+if(null!=Ua)for(;k<Ua.length&&(ka||0!=mxUtils.mod(k,30));){var ta=Ua[k++];ta=m(ta.url,ta.libs,ta.title,ta.tooltip?ta.tooltip:ta.title,ta.select,ta.imgUrl,ta.info,ta.onClick,ta.preview,ta.noImg,ta.clibs,ta.type);ka&&ta.click();ka=!1}}function F(ka,ta,ra,la,qa,ya){if(null!=ka&&mxUtils.isAncestorNode(document.body,la)){ka=mxUtils.parseXml(ka);ka=Editor.parseDiagramNode(ka.documentElement,null,!0);var Ea=new mxCodec(ka.ownerDocument),Ha=new mxGraphModel;Ea.decode(ka,Ha);b.sidebar.createTooltip(la,Ha.root.children,+Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=qa?mxResources.get(qa):null,!0,new mxPoint(ta,ra),!0,function(){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=ya&&R(la,null,null,ya,infoObj,clibs)},!0,!1)}}function C(){var ka=document.createElement("div");ka.style.position="absolute";ka.style.overflow="visible";+ka.style.left="8px";ka.style.right="8px";ka.style.bottom="8px";ka.style.top="8px";mxUtils.write(ka,mxResources.get("describeYourDiagram")+":");mxUtils.br(ka);var ta=document.createElement("input");ta.setAttribute("type","text");ta.setAttribute("placeholder",mxResources.get("processForHiringNewEmployee"));ta.style.width="100%";ta.style.marginTop="6px";ta.style.marginBottom="4px";ta.style.boxSizing="border-box";ka.appendChild(ta);ka.init=function(){ta.focus()};mxUtils.br(ka);var ra=document.createElement("div");+ra.style.top="86px";ra.style.left="2px";ra.style.right="2px";ra.style.bottom="2px";ra.style.position="absolute";ra.style.border="1px solid #424242";var la=document.createElement("div");la.style.boxSizing="border-box";la.style.position="relative";la.style.textAlign="center";la.style.top="50%";mxUtils.write(la,mxResources.get("blankDiagram"));ra.appendChild(la);var qa=document.createElement("select");qa.className="geBtn";qa.style.maxWidth="160px";qa.style.marginLeft="0px";la=document.createElement("option");+mxUtils.write(la,mxResources.get("diagramType"));la.setAttribute("value","");qa.appendChild(la);for(var ya=0;ya<EditorUi.mermaidDiagramTypes.length;ya++){la=document.createElement("option");var Ea=EditorUi.mermaidDiagramTypes[ya],Ha=Ea;Ea==urlParams["smart-template-type"]&&la.setAttribute("selected","selected");"erDiagram"==Ha&&(Ha="entityRelationshipDiagram");Ha=mxResources.get(Ha,null,Ha.charAt(0).toUpperCase()+Ha.substring(1).replace(/[A-Z]/g," $&"));la.setAttribute("value",Ea);mxUtils.write(la,+Ha);qa.appendChild(la)}var Pa=mxUtils.button(mxResources.get("generate"),function(){var Ka=ta.value,Na=qa.value.replace(/([A-Z])/g," $1").toLowerCase();Ka="Write the declaration code for a detailed and complex "+(""!=Na?Na:"graph")+' that shows "'+(""!=Ka?Ka:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Na=""!=qa.value?" ("+mxUtils.trim(mxUtils.getTextContent(qa.options[qa.selectedIndex]))+")":"";var Va="gantt"==qa.value||"pie"==qa.value||+"timeline"==qa.value||"quadrantchart"==qa.value||"c4context"==qa.value,Ma=ta.value+Na;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Qa){Va||(ia=aa=Qa,wa="Smart Template: "+Ma)}));b.spinner.spin(document.body,mxResources.get("loading"))&&b.generateOpenAiMermaidDiagram(Ka,function(Qa,Ya,Ga,fb){b.spinner.stop();ra.innerHTML="";var Ta=document.createElement("img");Ta.setAttribute("title",Ma);Ta.src="data:image/svg+xml;base64,"+Ya.substring(Ya.indexOf(",")++1);Ta.style.cursor="pointer";Ta.style.width="100%";Ta.style.height="100%";ra.appendChild(Ta);Qa=b.createMermaidXml(Qa,EditorUi.defaultMermaidConfig,Ya,Ga,fb,Ma);var ib="<mxfile><diagram>"+Graph.compress(Qa)+"</diagram></mxfile>";if(Va||"undefined"===typeof mxMermaidToDrawio)ia=aa=Qa;Qa=I.cloneNode(!0);ra.appendChild(Qa);Ya=function(gb){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ga=function(gb){S||F(ib,mxEvent.getClientX(gb),mxEvent.getClientY(gb),Ta,Ma)};mxEvent.addGestureListeners(Ta,+Ya,null,Ga);mxEvent.addGestureListeners(Qa,Ya,null,Ga)},function(Qa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Qa)})});Pa.setAttribute("disabled","disabled");Pa.className="geBtn gePrimaryBtn";la=function(){window.setTimeout(function(){""!=ta.value?Pa.removeAttribute("disabled"):Pa.setAttribute("disabled","disabled")},0)};ya=urlParams["smart-template"];null!=ya&&"1"!=ya&&(ta.value=decodeURIComponent(ya),la(),"1"==urlParams["smart-template-generate"]&&+window.setTimeout(function(){Pa.click()},0));mxEvent.addListener(ta,"change",la);mxEvent.addListener(ta,"keydown",la);mxEvent.addListener(ta,"cut",la);mxEvent.addListener(ta,"paste",la);mxEvent.addListener(ta,"keydown",function(Ka){13==Ka.keyCode&&Pa.click()});la=document.createElement("div");la.style.height="40px";la.style.marginTop="4px";la.style.marginBottom="4px";la.style.whiteSpace="nowrap";la.style.overflowX="auto";la.style.overflowY="hidden";la.appendChild(qa);la.appendChild(Pa);ka.appendChild(la);+ka.appendChild(ra);return ka}function E(){null!=aa&&aa==ia&&EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"templateGenerated",label:wa});if(ha&&null!=e)l||b.hideDialog(),e(ha,na,T.value);else if(d)l||b.hideDialog(),d(aa,T.value,pa,ca);else{var ka=T.value;if(null!=ka&&0<ka.length){var ta=function(la,qa,ya){b.createFile(ya,aa,null!=ca&&0<ca.length?ca:null,la,function(){b.hideDialog()},null,qa,null,null!=fa&&0<fa.length?fa:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ra=new SaveDialog(b,+ka,mxUtils.bind(this,function(la,qa,ya){ta(qa,ya,la.value)}),null,null,null,null,b.mode);b.showDialog(ra.container,420,150,!0,!1);ra.init()}else b.pickFolder(b.mode,function(la){ta(b.mode,la,ka)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function R(ka,ta,ra,la,qa,ya,Ea){return da!=ka?(null!=da&&(da.style.backgroundColor="transparent",da.style.border="2px solid transparent",0<da.getElementsByTagName("table").length&&(da.getElementsByTagName("table")[0].style.visibility=+"visible"),da==sa&&(sa.style.backgroundImage=Ia,sa.style.backgroundPosition="center center",sa.style.backgroundRepeat="no-repeat",sa.style.backgroundSize="contain",xa.style.visibility="hidden",Ba.style.visibility="hidden",Da.style.visibility="hidden",za.style.visibility="hidden",Fa.style.visibility=null!=ia?"visible":"hidden",sa.getElementsByTagName("table")[0].style.visibility="visible")),""!=ka.style.backgroundImage&&0<ka.getElementsByTagName("table").length&&(ka.getElementsByTagName("table")[0].style.visibility=+"hidden"),ka==sa&&(ta=ia,null!=ta?(Fa.style.visibility="visible",Fa.style.visibility=null!=ia?"visible":"hidden",za.style.visibility="visible"):(xa.style.visibility="visible",Ba.style.visibility="visible",Da.style.visibility="visible",za.style.visibility="hidden",Fa.style.visibility="hidden")),G.removeAttribute("disabled"),aa=ta,ca=ra,fa=ya,da=ka,ha=la,pa=Ea,na=qa,da.style.border=J,!0):!1}function U(){sa.style.backgroundImage="";sa.getElementsByTagName("table")[0].style.visibility="hidden";xa.style.visibility=+"visible";Ba.style.visibility="visible";Da.style.visibility="visible";za.style.visibility="hidden";Fa.style.visibility="hidden";xa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?xa.select():document.execCommand("selectAll",!1,null)}function O(){xa.style.visibility="hidden";Ba.style.visibility="hidden";Da.style.visibility="hidden";sa.style.backgroundImage=Ia;sa.style.backgroundSize="contain";za.style.visibility="visible";Fa.style.visibility="visible"}function Q(ka){var ta=mxUtils.trim(xa.value);+if(ka||""==ta)null!=wa&&(xa.value=wa,O());else{xa.style.visibility="hidden";Ba.style.visibility="hidden";Da.style.visibility="hidden";var ra=!1;ka='Write a detailed and complex MermaidJS declaration for "'+(""!=ta?ta:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(la){la!=b.emptyDiagramXml&&(ra=!0,aa=la)}));sa.style.backgroundImage="url("+Editor.spinImage++")";sa.style.backgroundSize="12px 12px";b.generateOpenAiMermaidDiagram(ka,function(la,qa,ya,Ea){da==sa&&"hidden"==xa.style.visibility&&(Ia="url(data:image/svg+xml;base64,"+qa.substring(qa.indexOf(",")+1)+")",sa.setAttribute("title",ta),ia=aa=la=ra?aa:b.createMermaidXml(la,EditorUi.defaultMermaidConfig,qa,ya,Ea,ta),wa=ta,O())},function(la){da==sa&&(xa.style.visibility="visible",Ba.style.visibility="visible",Da.style.visibility="visible",za.style.visibility="visible",Fa.style.visibility="visible",b.handleError(la))})}}+function m(ka,ta,ra,la,qa,ya,Ea,Ha,Pa,Ka,Na,Va){function Ma(Oa,bb){null==fb?(Ta=Oa,Ta=/^https?:\/\//.test(Ta)?b.editor.isCorsEnabledForUrl(Ta)?Ta:PROXY_URL+"?url="+encodeURIComponent(Ta):TEMPLATE_PATH+"/"+Ta,mxUtils.get(Ta,mxUtils.bind(this,function(cb){200<=cb.getStatus()&&299>=cb.getStatus()&&(fb=cb.getText());bb(fb,Ta)}))):bb(fb,Ta)}function Qa(Oa,bb){if(null==ka||M||b.sidebar.currentElt==Ga)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=P){var cb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='++P.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+P.naturalWidth+'" height="'+P.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";F(cb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ra,ka)}else b.sidebar.currentElt=Ga,M=!0,Ma(ka,function(hb){if(M&&b.sidebar.currentElt==Ga)try{F(hb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ga,bb)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}M=!1})}function Ya(){var Oa=document.createElement("table");+Oa.setAttribute("width","100%");Oa.setAttribute("height","100%");Oa.style.background="light-dark(rgba(255,255,255,0.85), transparent)";Oa.style.lineHeight="1.3em";Oa.style.border="none";var bb=document.createElement("tbody"),cb=document.createElement("tr"),hb=document.createElement("td");hb.setAttribute("align","center");hb.setAttribute("valign","middle");var Za=document.createElement("span");Za.style.display="inline-block";Za.style.padding="2px 8px";Za.style.userSelect="none";Za.style.borderRadius=+"8px";Za.style.background="rgba(255,255,255,0.7)";Za.style.overflow="hidden";Za.style.textOverflow="ellipsis";Za.style.maxWidth=ma-34+"px";mxUtils.write(Za,mxResources.get(ra,null,ra));hb.appendChild(Za);cb.appendChild(hb);bb.appendChild(cb);Oa.appendChild(bb);return Oa}var Ga=null;if("generative"!=Va||null==sa){Ga=document.createElement("div");Ga.className="geTemplate geAdaptiveAsset";Ga.style.backgroundOrigin="content-box";Ga.style.backgroundPosition="center center";Ga.style.backgroundRepeat="no-repeat";+Ga.style.backgroundSize="contain";Ga.style.boxSizing="border-box";Ga.style.borderRadius="12px";Ga.style.position="relative";Ga.style.height=ma+"px";Ga.style.width=Aa+"px";Ga.style.padding="4px";Ga.style.border="2px solid transparent";var fb=null,Ta=ka;null!=ra?Ga.setAttribute("title",mxResources.get(ra,null,ra)):null!=la&&0<la.length&&Ga.setAttribute("title",la)}else Ga=sa;if(null!=ya){Ga.style.display="inline-flex";Ga.style.justifyContent="center";Ga.style.alignItems="center";qa=document.createElement("img");+qa.setAttribute("src",ya);qa.setAttribute("alt",la);qa.style.maxWidth=ma+"px";qa.style.maxHeight=Aa+"px";P=qa;var ib=ya.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ga.appendChild(qa);qa.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){R(Ga,null,null,ka,Ea,Na)}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){E();mxEvent.consume(Oa)})}else if(!Ka&&null!=ka&&0<ka.length){var gb=+function(Oa){v.spin(ua)&&Ma(ka,function(bb,cb){v.stop();null!=bb&&(R(Ga,bb,ta,null,null,Na,cb),Oa&&E())})};ya=Pa||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";Ga.style.backgroundImage="url("+ya+")";null!=ra&&Ga.appendChild(Ya());mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){gb()}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){gb(!0);mxEvent.consume(Oa)})}else Ga.appendChild(Ya()),"generative"==Va&&null==sa&&(Ga.style.backgroundImage=Ia,Ga.style.overflow="visible",+Ga.appendChild(Fa),Ga.appendChild(za),Ga.appendChild(xa),Ga.appendChild(Ba),Ga.appendChild(Da),sa=Ga),qa&&R(Ga),null!=Ha?(mxEvent.addGestureListeners(Ga,null,null,mxUtils.bind(this,function(Oa){R(Ga,null,null,ka,Ea)})),mxEvent.addListener(Ga,"click",Ha)):(mxEvent.addListener(Ga,"click",function(Oa){R(Ga,null,null,ka,Ea)&&"generative"==Va&&null==ia&&U()}),mxEvent.addListener(Ga,"dblclick",function(Oa){"generative"!=Va?E():"hidden"==xa.style.visibility&&U();mxEvent.consume(Oa)}));null!=ka&&(ya=I.cloneNode(!0),+Ga.appendChild(ya),mxEvent.addGestureListeners(ya,mxUtils.bind(this,function(Oa){S=b.sidebar.currentElt==Ga}),null,null),mxEvent.addListener(ya,"click",mxUtils.bind(this,function(Oa){S||Qa(Oa,null!=ra?ra:la);mxEvent.consume(Oa)})));ua.appendChild(Ga);return Ga}function u(){function ka(Ma,Qa){Ma=mxResources.get(Ma,null,Ma.substring(0,1).toUpperCase()+Ma.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"…");return Ma+(null!=Qa?" ("+Qa.length+")":"")}function ta(Ma,Qa,Ya){mxEvent.addListener(Qa,+"click",function(){Wa!=Qa&&(null!=Wa&&(Wa.style.backgroundColor=""),Wa=Qa,Wa.style.backgroundColor=x,ua.scrollTop=0,ua.innerText="",k=0,null!=Ja[Ma].content?(ua.appendChild(Ja[Ma].content),aa=ia,Ua=null,null!=Ja[Ma].content.init&&Ja[Ma].content.init()):(Ua=Ya?Ra[Ma][Ya]:Ja[Ma],W=null,z(!1)))});null!=urlParams["smart-template"]&&"smartTemplate"==Ma&&Qa.click()}db&&(db=!1,mxEvent.addListener(ua,"scroll",function(Ma){ua.scrollTop+ua.clientHeight>=ua.scrollHeight&&(z(),mxEvent.consume(Ma))}));if(0<ab){var ra=+document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,mxResources.get("custom"));oa.appendChild(ra);for(var la in Sa){var qa=document.createElement("div");ra=la;var ya=Sa[la];18<ra.length&&(ra=ra.substring(0,18)+"…");qa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";qa.setAttribute("title",ra+" ("++ya.length+")");mxUtils.write(qa,qa.getAttribute("title"));null!=K&&(qa.style.padding=K);oa.appendChild(qa);(function(Ma,Qa){mxEvent.addListener(qa,"click",function(){Wa!=Qa&&(Wa.style.backgroundColor="",Wa=Qa,Wa.style.backgroundColor=x,ua.scrollTop=0,ua.innerText="",k=0,Ua=Sa[Ma],W=null,z(!1))})})(la,qa)}ra=document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,"draw.io");oa.appendChild(ra)}for(la in Ja){ra=+ya=null;if(null!=Ja[la].content)qa=document.createElement(Ea?"ul":"div"),ra=ka(la),qa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",qa.setAttribute("title",ra),mxUtils.write(qa,ra),oa.appendChild(qa),ra=qa;else{var Ea=Ra[la];ra=qa=document.createElement(Ea?"ul":"div");ya=Ja[la];var Ha=ka(la,ya);if(null!=Ea){ya=document.createElement("li");var Pa=document.createElement("div");+Pa.className="geTempTreeCaret";Pa.setAttribute("title",Ha);mxUtils.write(Pa,Ha);ra=Pa;ya.appendChild(Pa);Ha=document.createElement("ul");Ha.className="geTempTreeNested";Ha.style.visibility="hidden";for(var Ka in Ea){var Na=document.createElement("li"),Va=ka(Ka,Ea[Ka]);Na.setAttribute("title",Va);mxUtils.write(Na,Va);ta(la,Na,Ka);Ha.appendChild(Na)}ya.appendChild(Ha);qa.className="geTempTree";qa.appendChild(ya);(function(Ma,Qa){mxEvent.addListener(Qa,"click",function(){Ma.style.visibility="visible";+Ma.classList.toggle("geTempTreeActive");Ma.classList.toggle("geTempTreeNested")&&setTimeout(function(){Ma.style.visibility="hidden"},550);Qa.classList.toggle("geTempTreeCaret-down")})})(Ha,Pa)}else qa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",qa.setAttribute("title",Ha),mxUtils.write(qa,Ha);null!=K&&(qa.style.padding=K);oa.appendChild(qa)}ta(la,ra);null==Wa&&ra.click()}z(!1)}+D=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);l=null!=l?l:!0;q=null!=q?q:!1;x=null!=x?x:"light-dark(#ebf2f9, "+Editor.darkColor+")";J=null!=J?J:"2px dashed light-dark(#29b6f2, #00a8ff)";L=null!=L?L:EditorUi.templateFile;var A=document.createElement("div");A.style.userSelect="none";A.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";l&&A.appendChild(B);var H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?-IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";f||C||!m||A.appendChild(H);m&&mxUtils.write(A,(C?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=-b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var R=document.createElement("input");R.setAttribute("value",b.defaultFilename+H);R.style.marginLeft="10px";R.style.width=f||C?"144px":"244px";this.init=function(){m&&Editor.selectFilename(R);null!=ra.parentNode&&null!=ra.parentNode.parentNode&&mxEvent.addGestureListeners(ra.parentNode.parentNode,mxUtils.bind(this,function(ja){null!=b.sidebar&&-b.sidebar.hideTooltip()}),null,null)};m&&(A.appendChild(R),p?R.style.width=f||C?"350px":"450px":null!=b.editor.diagramFileTypes&&(p=FilenameDialog.createFileTypes(b,R,b.editor.diagramFileTypes),p.style.marginLeft="6px",p.style.width=f||C?"80px":"180px",A.appendChild(p)));p=!1;var g=0,q=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),F=mxUtils.button(l||mxResources.get("create"),function(){F.setAttribute("disabled",-"disabled");G();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";var J=document.createElement("img");J.setAttribute("src",Editor.magnifyImage);J.setAttribute("title",mxResources.get("preview"));J.className="geAdaptiveAsset geActiveButton";J.style.position="absolute";J.style.borderRadius="16px";J.style.background="white";J.style.cursor="default";J.style.padding="2px";J.style.opacity="0.8";J.style.height="16px";J.style.right="2px";J.style.top="2px";var L=!1,Q=null,U=!1;if(P||I){var V=-[],W=null,X=null,Z=null,Y=function(ja){F.setAttribute("disabled","disabled");for(var xa=0;xa<V.length;xa++)V[xa].className=xa==ja?"geBtn gePrimaryBtn":"geBtn"};p=!0;l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.height="30px";z.appendChild(l);C=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ha.style.display="";ua.style.display="";ra.style.left="160px";Y(0);ra.scrollTop=0;ra.innerText="";g=0;W!=Wa&&(Wa=W,Ia=X,Xa=Z,ha.innerText="",v(),W=null)});V.push(C);-l.appendChild(C);var ba=function(ja){ha.style.display="none";ua.style.display="none";ra.style.left="30px";Y(ja?-1:1);null==W&&(W=Wa);ra.scrollTop=0;ra.innerText="";q.spin(ra);var xa=function(qa,oa,la){g=0;q.stop();Wa=qa;la=la||{};var ya=0,Ja;for(Ja in la)ya+=la[Ja].length;if(oa)ra.innerText=oa;else if(0==qa.length&&0==ya)ra.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ra.innerText="",0<ya){ha.style.display="";ra.style.left="160px";ha.innerText="";Xa=0;Ia={"draw.io":qa};-for(Ja in la)Ia[Ja]=la[Ja];v()}else u(!0)};ja?I(ea.value,xa):P(xa)};P&&(C=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ba()}),l.appendChild(C),V.push(C));if(I){C=document.createElement("span");C.style.marginLeft="10px";C.innerText=mxResources.get("search")+":";l.appendChild(C);var ea=document.createElement("input");ea.style.marginRight="10px";ea.style.marginLeft="10px";ea.style.width="220px";mxEvent.addListener(ea,"keypress",function(ja){13==ja.keyCode&&ba(!0)});l.appendChild(ea);-C=mxUtils.button(mxResources.get("search"),function(){ba(!0)});C.className="geBtn";l.appendChild(C)}Y(0)}var ca=null,da=null,ma=null,aa=null,ia=null,ka=null,ta=null,sa=null,fa=null,ra=document.createElement("div");ra.style.border="1px solid #d3d3d3";ra.style.position="absolute";ra.style.left="160px";ra.style.right="34px";l=(m?72:40)+(p?30:0);ra.style.top=l+"px";ra.style.bottom="68px";ra.style.margin="6px 0 0 -1px";ra.style.padding="6px";ra.style.overflow="auto";var ua=document.createElement("div");-ua.style.cssText="position:absolute;left:30px;width:128px;top:"+l+"px;height:22px;margin-top: 6px;white-space: nowrap;";var za=document.createElement("input");za.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";za.setAttribute("placeholder",mxResources.get("search"));za.setAttribute("type","text");ua.appendChild(za);var va=document.createElement("img");va.setAttribute("src",Editor.magnifyImage);va.setAttribute("title",mxResources.get("search"));-va.className="geAdaptiveAsset";va.style.position="relative";va.style.cursor="pointer";va.style.opacity="0.5";va.style.height="16px";va.style.left="-20px";va.style.top="4px";va.style.background="url('"+b.editor.transparentImage+"')";ua.appendChild(va);mxEvent.addListener(va,"click",function(){va.getAttribute("src")!=Editor.magnifyImage&&(va.setAttribute("src",Editor.magnifyImage),va.setAttribute("title",mxResources.get("search")),za.value="",null!=bb&&(bb.click(),bb=null));za.focus()});mxEvent.addListener(za,-"keydown",mxUtils.bind(this,function(ja){if(13==ja.keyCode){var xa=za.value;if(""==xa)null!=bb&&(bb.click(),bb=null);else{if(null==NewDialog.tagsList[N]){var qa={};for(Ka in Ia)if(null==Ia[Ka].content)for(var oa=Ia[Ka],la=0;la<oa.length;la++){var ya=oa[la];if(null!=ya.tags)for(var Ja=ya.tags.toLowerCase().split(";"),Fa=0;Fa<Ja.length;Fa++)null==qa[Ja[Fa]]&&(qa[Ja[Fa]]=[]),qa[Ja[Fa]].push(ya)}NewDialog.tagsList[N]=qa}var La=xa.toLowerCase().split(" ");qa=NewDialog.tagsList[N];if(0<Xa&&null==qa.__tagsList__){for(Ka in Ta)for(oa=-Ta[Ka],la=0;la<oa.length;la++)for(ya=oa[la],Ja=ya.title.split(" "),Ja.push(Ka),Fa=0;Fa<Ja.length;Fa++){var Pa=Ja[Fa].toLowerCase();null==qa[Pa]&&(qa[Pa]=[]);qa[Pa].push(ya)}qa.__tagsList__=!0}var Ka=[];oa={};for(la=Ja=0;la<La.length;la++)if(0<La[la].length){Pa=qa[La[la]];var Ra={};Ka=[];if(null!=Pa)for(Fa=0;Fa<Pa.length;Fa++)ya=Pa[Fa],0==Ja==(null==oa[ya.url])&&(Ra[ya.url]=!0,Ka.push(ya));oa=Ra;Ja++}ra.scrollTop=0;ra.innerText="";g=0;qa=document.createElement("div");qa.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";-mxUtils.write(qa,mxResources.get(0==Ka.length?"noResultsFor":"resultsFor",[xa]));ra.appendChild(qa);null!=Sa&&null==bb&&(Sa.style.backgroundColor="",bb=Sa,Sa=qa);Wa=Ka;W=null;u(!1)}mxEvent.consume(ja)}}));mxEvent.addListener(za,"keyup",mxUtils.bind(this,function(ja){""==za.value?(va.setAttribute("src",Editor.magnifyImage),va.setAttribute("title",mxResources.get("search"))):(va.setAttribute("src",Editor.crossImage),va.setAttribute("title",mxResources.get("reset")))}));l+=23;var ha=document.createElement("div");-ha.style.cssText="position:absolute;left:30px;width:128px;top:"+l+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ra,"scroll",function(){b.sidebar.hideTooltip()});var pa=140,Aa=pa,na=null,Ha="url("+Editor.sparklesImage+")",wa=document.createElement("textarea");wa.setAttribute("placeholder",mxResources.get("describeYourDiagram"));wa.style.position="absolute";wa.style.fontFamily="sans-serif";wa.style.outline="none";wa.style.left="0px";wa.style.right="0px";-wa.style.top="0px";wa.style.bottom="38px";wa.style.resize="none";wa.style.boxSizing="border-box";wa.style.fontSize="12px";wa.style.border="none";wa.style.margin="8px";var Da=document.createElement("button");Da.className="geBtn gePrimaryBtn";Da.style.position="absolute";Da.style.bottom="0px";Da.style.height="30px";Da.style.right="0px";Da.style.left="0px";Da.style.margin="8px";Da.style.fontSize="14px";Da.style.borderRadius="4px";Da.setAttribute("disabled","disabled");Da.setAttribute("title",mxResources.get("ok"));-mxUtils.write(Da,mxResources.get("ok"));var Ea=J.cloneNode(!0),Na=!1;mxEvent.addGestureListeners(Ea,function(ja){Na=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(ja){if(!Na&&null!=sa){var xa="<mxfile><diagram>"+Graph.compress(sa)+"</diagram></mxfile>";B(xa,mxEvent.getClientX(ja),mxEvent.getClientY(ja),na,fa)}});var Ba=J.cloneNode(!0);Ba.setAttribute("src",Editor.editImage);Ba.setAttribute("title",mxResources.get("edit"));Ba.style.right="";Ba.style.left="2px";var Ca=-J.cloneNode(!0);Ca.setAttribute("src",Editor.helpImage);Ca.setAttribute("title",mxResources.get("help"));Ca.style.opacity="1";Ca.style.right="-8px";Ca.style.top="-8px";mxEvent.addListener(Ca,"click",function(ja){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(ja)});wa.style.visibility="hidden";Da.style.visibility="hidden";Ba.style.visibility="hidden";Ca.style.visibility="hidden";Ea.style.visibility="hidden";mxEvent.addListener(Ba,"click",T);mxEvent.addListener(wa,-"input",function(){""!=wa.value?Da.removeAttribute("disabled"):Da.setAttribute("disabled","disabled")});mxEvent.addListener(Da,"click",function(){S()});mxEvent.addListener(wa,"keydown",function(ja){13!=ja.keyCode||mxEvent.isShiftDown(ja)?27==ja.keyCode&&(S(!0),mxEvent.consume(ja)):(S(),mxEvent.consume(ja))});var Ia={},Va={},Ta={},Xa=0,jb=!0,Sa=null,bb=null;Ia.basic=[{title:"blankDiagram"}];var Wa=Ia.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==-typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ia.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ia.smartTemplate={content:D()});if(!f){var cb=function(){mxUtils.get(db,function(ja){if(!hb){hb=!0;ja=ja.getXml().documentElement.firstChild;for(var xa={};null!=ja;){if("undefined"!==typeof ja.getAttribute)if("parsererror"==ja.nodeName)null!=window.console&&-console.log("Parser error in "+N+": "+ja.textContent);else if("clibs"==ja.nodeName){for(var qa=ja.getAttribute("name"),oa=ja.getElementsByTagName("add"),la=[],ya=0;ya<oa.length;ya++)la.push(encodeURIComponent(mxUtils.getTextContent(oa[ya])));null!=qa&&0<la.length&&(xa[qa]=la.join(";"))}else if(la=ja.getAttribute("url"),null!=la){oa=ja.getAttribute("section");qa=ja.getAttribute("subsection");if(null==oa&&(ya=la.indexOf("/"),oa=la.substring(0,ya),null==qa)){var Ja=la.indexOf("/",ya+1);-1<Ja&&(qa=la.substring(ya+-1,Ja))}ya=Ia[oa];null==ya&&(ya=[],Ia[oa]=ya);la=ja.getAttribute("clibs");null!=xa[la]&&(la=xa[la]);la={url:ja.getAttribute("url"),libs:ja.getAttribute("libs"),title:ja.getAttribute("title"),tooltip:ja.getAttribute("name")||ja.getAttribute("url"),preview:ja.getAttribute("preview"),clibs:la,tags:ja.getAttribute("tags")};ya.push(la);null!=qa&&(ya=Va[oa],null==ya&&(ya={},Va[oa]=ya),oa=ya[qa],null==oa&&(oa=[],ya[qa]=oa),oa.push(la))}ja=ja.nextSibling}q.stop();v()}})};z.appendChild(ua);z.appendChild(ha);-z.appendChild(ra);var hb=!1,db=N;/^https?:\/\//.test(db)&&!b.editor.isCorsEnabledForUrl(db)&&(db=PROXY_URL+"?url="+encodeURIComponent(db));q.spin(ra);null!=n?n(function(ja,xa){Ta=ja;Z=Xa=xa;cb()},cb):cb();X=Ia}mxEvent.addListener(R,"keypress",function(ja){b.dialog.container.firstChild==z&&13==ja.keyCode&&G()});n=document.createElement("div");n.style.marginTop=f?"4px":"16px";n.style.textAlign="right";n.style.position="absolute";n.style.left="40px";n.style.bottom="24px";n.style.right="40px";l=mxUtils.button(mxResources.get("cancel"),-function(){null!=y&&y();b.hideDialog(!0)});l.className="geBtn";!b.editor.cancelFirst||t&&null==y||n.appendChild(l);f||"1"==urlParams.embed||t||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ja=new FilenameDialog(b,"",mxResources.get("create"),function(xa){null!=xa&&0<xa.length&&b.editor.loadUrl(b.editor.getProxiedUrl(xa),function(qa){ma=qa;ca=null;templateRealURl=xa;b.hideDialog();G()},function(qa){b.handleError(qa)})},-mxResources.get("url"),null,null,null,!1);b.showDialog(ja.container,300,80,!0,!0);ja.init()}),f.className="geBtn",n.appendChild(f));Graph.fileSupport&&e&&(e=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ja=document.createElement("input");ja.setAttribute("multiple","multiple");ja.setAttribute("type","file");mxEvent.addListener(ja,"change",function(xa){b.openFiles(ja.files,!0);ja.value=""});ja.style.display="none";document.body.appendChild(ja);b.newDlgFileInputElt=-ja}b.newDlgFileInputElt.click()}),e.className="geBtn",n.appendChild(e));n.appendChild(F);b.editor.cancelFirst||null!=d||t&&null==y||n.appendChild(l);z.appendChild(n);this.container=z};NewDialog.tagsList={};-var SaveDialog=function(b,f,m,d,t,y,x,C){function K(z,A,H,R,g,q){var F=null;if(null==d||0>mxUtils.indexOf(d,z))if(g=null!=g?g:b.getTitleForService(z),0<=mxUtils.indexOf(T,z)||null!=b.getServiceForName(z)){F=document.createElement("option");if("pick"==q)F.innerHTML=mxUtils.htmlEntities(g)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",F.setAttribute("value","pickFolder-"+z),F.setAttribute("title",g+" - "+mxResources.get("pickFolder")+"...");else{var J=z+-(null!=H?"-"+H:""),L=k[J];null!=L&&null!=L.option&&L.option.parentNode.removeChild(L.option);L=null;if(null!=A){"/"==A.charAt(A.length-1)&&(A=A.substring(0,A.length-1));"/"==A.charAt(0)&&(A=A.substring(1));L=A;if(z!=App.MODE_GITHUB&&z==App.MODE_GITLAB){var Q=L.lastIndexOf("/");0<=Q&&(L=L.substring(Q+1))}40<L.length&&(L=L.substring(0,20)+"..."+L.substring(L.length-20))}F.innerHTML=mxUtils.htmlEntities(g)+(null!=L?" – "+mxUtils.htmlEntities(L):"");F.setAttribute("title",g+-(null!=A?" ("+A+")":"")+(null!=H&&decodeURIComponent(H)!=A?" ["+H+"]":""));F.setAttribute("value",J);k[J]={option:F,mode:z,path:A,id:H};SaveDialog.lastValue==J&&null==C?R=!0:null==R&&("root"==q?R=null==C&&b.mode==z||null!=z&&z==C:"pickFolder-"==G.value.substring(0,11)&&(R=!0));R&&F.setAttribute("selected","selected")}G.appendChild(F)}return F}function M(z){b.pickFolder(z,function(A){var H=null;z==App.MODE_GOOGLE&&null!=A.docs&&0<A.docs.length?H={mode:z,path:A.docs[0].name,id:A.docs[0].id}:z==App.MODE_ONEDRIVE&&-null!=A.value&&0<A.value.length?H={mode:z,path:A.value[0].name,id:OneDriveFile.prototype.getIdOf(A.value[0])}:(z==App.MODE_GITHUB||z==App.MODE_GITLAB)&&null!=A&&0<A.length&&(H={mode:z,path:decodeURIComponent(A),id:A});null!=H&&(E.style.display="",b.addRecent(H,"Folders",5),A=K(H.mode,H.path,H.id,!0),G.innerHTML="",k={},N(),H=G.selectedIndex,G.value=A.value,0>G.selectedIndex&&(G.selectedIndex=H))},!0,!0,!0,!0)}function N(){var z=b.getRecent("Folders"),A=0;if(null!=z&&0<z.length){for(var H=0;H<z.length;H++)null!=-K(z[H].mode,z[H].path,z[H].id)&&A++;0<A&&G.appendChild(O.cloneNode(!0))}K(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");K(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(K(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),K(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&K(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);K(App.MODE_GITHUB,null,null,null,null,"pick");K(App.MODE_GITLAB,null,-null,null,null,"pick");K(App.MODE_TRELLO);z=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&z&&K(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=d&&0<=mxUtils.indexOf(d,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&K(App.MODE_BROWSER);z&&K("download");Editor.popupsAllowed&&K("_blank",null,null,null,mxResources.get("openInNewWindow"));0<A&&(G.appendChild(O.cloneNode(!0)),A=G.value,G.appendChild(E),-G.value=A);if("pickFolder-"==G.value.substring(0,11)||"reset"==G.value)A=document.createElement("option"),A.setAttribute("value",""),A.setAttribute("selected","selected"),mxUtils.write(A,mxResources.get("pickFolder")+"..."),G.insertBefore(A,G.firstChild);S=G.value}function P(){if("reset"==G.value)b.resetRecent("Folders"),G.innerHTML="",G.value="",pickFolderOption=null,k={},N();else if("pickFolder-"==G.value.substring(0,11)){var z=G.value.substring(11);G.value=S;M(z)}else if(null!=D&&null!=k[G.value]&&-null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[D.value].extension){z=b.getExtensionForService(k[G.value].mode);var A=B.value;null!=z&&0>f.indexOf(".")&&0>A.indexOf(".")&&(B.value=A+z)}v.innerHTML="";mxUtils.write(v,mxResources.get("download"==G.value||"_blank"==G.value?"ok":"save"));""==G.value?v.setAttribute("disabled","disabled"):v.removeAttribute("disabled")}var I=document.createElement("div");I.style.display="flex";I.style.flexWrap="wrap";I.style.whiteSpace="nowrap";var c=-document.createElement("div");c.style.display="grid";c.style.gap="5px 8px";c.style.gridAutoRows="auto auto 44px";c.style.gridAutoColumns="0fr minmax(0,1fr)";c.style.width="100%";var e=null,l=null;if(null!=t&&null!=y&&"image/"==y.substring(0,6)&&("image/svg"!=y.substring(0,9)||mxClient.IS_SVG)){c.style.display="inline-grid";c.style.flexBasis="75%";e=document.createElement("div");e.style.display="inline-block";e.style.height="auto";e.style.maxWidth="25%";e.style.margin="auto";var n=document.createElement("img"),-p=x?t:btoa(unescape(encodeURIComponent(t)));n.setAttribute("src","data:"+y+";base64,"+p);n.style.boxSizing="border-box";n.style.maxHeight="50px";n.style.maxWidth="100%";n.style.paddingLeft="10px";e.appendChild(n);mxClient.IS_FF||"image/png"!=y||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(l=mxUtils.button(mxResources.get("copy"),function(){var z=b.base64ToBlob(p,"image/png");z=new ClipboardItem({"image/png":z,"text/html":new Blob(['<img src="data:'+y+";base64,"+p+'">'],{type:"text/html"})});-navigator.clipboard.write([z]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(A){b.handleError(A)}))},null,"geBtn"));Editor.popupsAllowed&&(null==d||0>mxUtils.indexOf(d,"_blank"))?(e.setAttribute("title",mxResources.get("openInNewWindow")),e.style.cursor="pointer",mxEvent.addGestureListeners(e,null,null,function(z){mxEvent.isPopupTrigger(z)||b.openInNewWindow(t,y,x)})):e.setAttribute("title",mxResources.get("preview"))}n=document.createElement("div");-n.style.display="flex";n.style.padding="1px";n.style.alignItems="center";n.style.justifyContent="flex-end";n.style.gridColumn="1";n.style.whiteSpace="nowrap";var u=document.createElement("div");u.style.display="grid";u.style.padding="1px";u.style.alignItems="center";u.style.gridColumn="2";u.style.gridAutoColumns="minmax(0,1fr) auto";u.style.gap="6px";mxUtils.write(n,mxResources.get("saveAs")+":");var B=document.createElement("input");B.setAttribute("type","text");B.setAttribute("value",f);B.style.boxSizing=-"border-box";B.style.width="100%";u.appendChild(B);c.appendChild(n);c.appendChild(u);var D=null;null!=b.editor.diagramFileTypes&&null==y&&(n=n.cloneNode(!1),u=u.cloneNode(!1),mxUtils.write(n,mxResources.get("type")+":"),D=FilenameDialog.createFileTypes(b,B,b.editor.diagramFileTypes),D.style.boxSizing="border-box",D.style.width="100%",u.appendChild(D),c.appendChild(n),c.appendChild(u));n=n.cloneNode(!1);u=u.cloneNode(!1);mxUtils.write(n,mxResources.get("where")+":");var G=document.createElement("select");-G.style.textOverflow="ellipsis";G.style.gridColumn="1";var E=document.createElement("option");mxUtils.write(E,mxResources.get("reset"));E.setAttribute("value","reset");var T=["browser","device","download","_blank"],O=document.createElement("option");O.setAttribute("disabled","disabled");O.innerHTML="-----------------";var S=null,k={},v=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=G.value;var z=k[SaveDialog.lastValue];null!=z&&m(B,z.mode,z.id)},null,"geBtn gePrimaryBtn");-mxEvent.addListener(B,"keypress",function(z){13==z.keyCode&&v.click()});mxEvent.addListener(G,"change",P);N();P();u.appendChild(G);null!=SaveDialog.lastValue&&null!=k[SaveDialog.lastValue]&&(G.value=SaveDialog.lastValue);c.appendChild(n);c.appendChild(u);I.appendChild(c);null!=e&&I.appendChild(e);c=document.createElement("div");c.style.flexBasis="100%";c.style.textAlign="right";c.style.marginTop=null!=y?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||c.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));-e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&c.appendChild(e);null!=l&&c.appendChild(l);c.appendChild(v);b.editor.cancelFirst||c.appendChild(e);I.appendChild(c);this.init=function(){Editor.selectFilename(B)};this.container=I},CreateDialog=function(b,f,m,d,t,y,x,C,K,M,N,P,I,c,e,l,n){function p(S,k,v,z){function A(){mxEvent.addListener(H,"click",function(){var J=v;if(x){var L=D.value,Q=L.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>Q){J=null!=-J?J:O.value;var U="";J==App.MODE_GOOGLE?U=b.drive.extension:J==App.MODE_GITHUB?U=b.gitHub.extension:J==App.MODE_GITLAB?U=b.gitLab.extension:J==App.MODE_TRELLO?U=b.trello.extension:J==App.MODE_DROPBOX?U=b.dropbox.extension:J==App.MODE_ONEDRIVE?U=b.oneDrive.extension:J==App.MODE_DEVICE&&(U=".drawio");0<=Q&&(L=L.substring(0,Q));D.value=L+U}}u(v)})}var H=document.createElement("a");H.style.overflow="hidden";var R=document.createElement("img");R.src=S;R.setAttribute("border","0");R.setAttribute("align",-"absmiddle");R.style.width="60px";R.style.height="60px";R.style.paddingBottom="6px";H.style.display="inline-block";H.className="geBaseButton";H.style.position="relative";H.style.margin="4px";H.style.padding="8px 8px 10px 8px";H.style.whiteSpace="nowrap";H.appendChild(R);H.style.color="gray";H.style.fontSize="11px";var g=document.createElement("div");H.appendChild(g);mxUtils.write(g,k);if(null!=z&&null==b[z]){R.style.visibility="hidden";mxUtils.setOpacity(g,10);var q=new Spinner({lines:12,length:12,-width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});q.spin(H);var F=window.setTimeout(function(){null==b[z]&&(q.stop(),H.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[z]&&(window.clearTimeout(F),mxUtils.setOpacity(g,100),R.style.visibility="",q.stop(),A())}))}else A();E.appendChild(H);++T==P&&(mxUtils.br(E),T=0)}function u(S){var k=D.value;if(null==S||null!=k&&0<k.length)n&&b.hideDialog(),-m(k,S,D)}N="1"==urlParams.noDevice?!1:N;x=null!=x?x:!0;C=null!=C?C:!0;P=null!=P?P:4;n=null!=n?n:!0;y=document.createElement("div");y.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(y);var B=document.createElement("h2");mxUtils.write(B,t||mxResources.get("create"));B.style.marginTop="0px";B.style.marginBottom="24px";y.appendChild(B);t=document.createElement("span");mxUtils.write(t,mxResources.get("filename")+":");t.style.maxWidth="106px";t.style.overflow="hidden";t.style.textOverflow="ellipsis";-t.style.display="inline-block";y.appendChild(t);var D=document.createElement("input");D.setAttribute("value",f);D.style.width="180px";D.style.marginLeft="10px";D.style.marginBottom="20px";D.style.maxWidth="70%";this.init=function(){Editor.selectFilename(D)};y.appendChild(D);null!=l&&null!=b.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),l.style.marginLeft="6px",l.style.width="90px",y.appendChild(l));l=null;if("1"!=urlParams.noDevice&&null!=I&&null!=c&&"image/"==-c.substring(0,6)&&("image/svg"!=c.substring(0,9)||mxClient.IS_SVG)){D.style.width="160px";t=document.createElement("img");var G=e?I:btoa(unescape(encodeURIComponent(I)));t.setAttribute("src","data:"+c+";base64,"+G);t.style.position="absolute";t.style.top="70px";t.style.right="100px";t.style.maxWidth="120px";t.style.maxHeight="80px";mxUtils.setPrefixedStyle(t.style,"transform","translate(50%,-50%)");y.appendChild(t);mxClient.IS_FF||"image/png"!=c||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||-(l=mxUtils.button(mxResources.get("copy"),function(S){S=b.base64ToBlob(G,"image/png");S=new ClipboardItem({"image/png":S,"text/html":new Blob(['<img src="data:'+c+";base64,"+G+'">'],{type:"text/html"})});navigator.clipboard.write([S]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(k){b.handleError(k)}))}),l.style.marginTop="6px",l.className="geBtn");K&&Editor.popupsAllowed&&(t.style.cursor="pointer",mxEvent.addGestureListeners(t,-null,null,function(S){mxEvent.isPopupTrigger(S)||u("_blank")}))}mxUtils.br(y);var E=document.createElement("div");E.style.textAlign="center";var T=0;E.style.marginTop="6px";y.appendChild(E);var O=document.createElement("select");O.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(I=document.createElement("option"),I.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(I,mxResources.get("googleDrive")),O.appendChild(I),p(IMAGE_PATH+"/google-drive-logo.svg",-mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(I=document.createElement("option"),I.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(I,mxResources.get("oneDrive")),O.appendChild(I),b.mode==App.MODE_ONEDRIVE&&I.setAttribute("selected","selected"),p(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(I=document.createElement("option"),I.setAttribute("value",App.MODE_DROPBOX),-mxUtils.write(I,mxResources.get("dropbox")),O.appendChild(I),b.mode==App.MODE_DROPBOX&&I.setAttribute("selected","selected"),p(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(I=document.createElement("option"),I.setAttribute("value",App.MODE_GITHUB),mxUtils.write(I,mxResources.get("github")),O.appendChild(I),p(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(I=document.createElement("option"),-I.setAttribute("value",App.MODE_GITLAB),mxUtils.write(I,mxResources.get("gitlab")),O.appendChild(I),p(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(I=document.createElement("option"),I.setAttribute("value",App.MODE_TRELLO),mxUtils.write(I,mxResources.get("trello")),O.appendChild(I),p(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||-null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)I=document.createElement("option"),I.setAttribute("value",App.MODE_DEVICE),mxUtils.write(I,mxResources.get("device")),O.appendChild(I),b.mode!=App.MODE_DEVICE&&C||I.setAttribute("selected","selected"),N&&p(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);C&&isLocalStorage&&"0"!=urlParams.browser&&(C=document.createElement("option"),C.setAttribute("value",App.MODE_BROWSER),mxUtils.write(C,mxResources.get("browser")),O.appendChild(C),-b.mode==App.MODE_BROWSER&&C.setAttribute("selected","selected"),p(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));C=document.createElement("div");C.style.marginTop="26px";C.style.textAlign="center";null!=M&&(N=mxUtils.button(mxResources.get("help"),function(){b.openLink(M)}),N.className="geBtn",C.appendChild(N));N=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});-N.className="geBtn";b.editor.cancelFirst&&null==d&&C.appendChild(N);null==d&&(I=mxUtils.button(mxResources.get("decideLater"),function(){u(null)}),I.className="geBtn",C.appendChild(I));K&&Editor.popupsAllowed&&(K=mxUtils.button(mxResources.get("openInNewWindow"),function(){u("_blank")}),K.className="geBtn",C.appendChild(K));CreateDialog.showDownloadButton&&(K=mxUtils.button(mxResources.get("download"),function(){u("download")}),K.className="geBtn",C.appendChild(K),null!=l&&(K.style.marginTop="6px",-C.style.marginTop="6px"));null!=l&&(mxUtils.br(C),C.appendChild(l));b.editor.cancelFirst&&null==d||C.appendChild(N);mxEvent.addListener(D,"keypress",function(S){13==S.keyCode?u(App.MODE_DEVICE):27==S.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});y.appendChild(C);this.container=y};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;-var PopupDialog=function(b,f,m,d,t){t=null!=t?t:!0;var y=document.createElement("div");y.style.textAlign="left";y.style.height="100%";mxUtils.write(y,mxResources.get("fileOpenLocation"));mxUtils.br(y);mxUtils.br(y);var x=mxUtils.button(mxResources.get("openInThisWindow"),function(){t&&b.hideDialog();null!=d&&d()});x.className="geBtn";x.style.marginBottom="8px";x.style.width="280px";y.appendChild(x);mxUtils.br(y);var C=mxUtils.button(mxResources.get("openInNewWindow"),function(){t&&b.hideDialog();-null!=m&&m();b.openLink(f,null,!0)});C.className="geBtn gePrimaryBtn";C.style.width=x.style.width;y.appendChild(C);mxUtils.br(y);mxUtils.br(y);mxUtils.write(y,mxResources.get("allowPopups"));this.container=y},ImageDialog=function(b,f,m,d,t,y,x,C){function K(){0<P.value.length?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled");"data:"!=P.value.substring(0,5)?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}y=null!=y?y:!0;var M=b.editor.graph,N=document.createElement("div");-mxUtils.write(N,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor="transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var P=document.createElement("input");P.setAttribute("value",m);P.setAttribute("type","text");P.setAttribute("spellcheck","false");P.setAttribute("autocorrect","off");P.setAttribute("autocomplete","off");P.setAttribute("autocapitalize","off");P.style.marginTop=-"6px";P.style.width=(Graph.fileSupport?460:340)-20+"px";P.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";P.style.backgroundRepeat="no-repeat";P.style.backgroundPosition="100% 50%";P.style.paddingRight="14px";m=document.createElement("div");m.setAttribute("title",mxResources.get("reset"));m.style.position="relative";m.style.left="-16px";m.style.width="12px";m.style.height="14px";m.style.cursor="pointer";m.style.display="inline-block";m.style.top="3px";m.style.background="url('"+b.editor.transparentImage+-"')";mxEvent.addListener(m,"click",function(){P.value="";P.focus()});f.appendChild(P);f.appendChild(m);N.appendChild(f);var I=C,c,e,l=function(D,G,E,T){var O="data:"==D.substring(0,5);!b.isOffline()||O&&"undefined"===typeof chrome?0<D.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(D,function(S){b.spinner.stop();b.hideDialog();var k=!1===T?1:null!=G&&null!=E?Math.max(G/S.width,E/S.height):Math.min(1,Math.min(520/S.width,520/S.height));y&&(D=b.convertDataUri(D));d(D,-Math.round(Number(S.width)*k),Math.round(Number(S.height)*k),I,c,e)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(D,null,null,I,c,e)):(D=b.convertDataUri(D),G=null==G?120:G,E=null==E?100:E,b.hideDialog(),d(D,G,E,I,c,e))},n=function(D,G){if(null!=D){var E=t?null:M.getModel().getGeometry(M.getSelectionCell());null!=E?l(D,E.width,E.height,G):l(D,null,null,G)}else b.hideDialog(),d(null)};this.init=function(){P.focus();-if(Graph.fileSupport){P.setAttribute("placeholder",mxResources.get("dragImagesHere"));var D=N.parentNode,G=null;mxEvent.addListener(D,"dragleave",function(E){null!=G&&(G.parentNode.removeChild(G),G=null);E.stopPropagation();E.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(E){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(D));E.stopPropagation();E.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(E){null!=G&&(G.parentNode.removeChild(G),-G=null);if(0<E.dataTransfer.files.length)b.importFiles(E.dataTransfer.files,0,0,b.maxImageSize,function(O,S,k,v,z,A,H,R){n(O,R)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var S=0;S<O.length;S++)O[S]()},!mxEvent.isControlDown(E),null,null,!0);else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")){var T=E.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(T)&&n(decodeURIComponent(T))}E.stopPropagation();E.preventDefault()}),-!1)}};C=document.createElement("div");C.style.marginTop="14px";C.style.textAlign="center";m=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});m.className="geBtn";b.editor.cancelFirst&&C.appendChild(m);ImageDialog.filePicked=function(D){D.action==google.picker.Action.PICKED&&null!=D.docs[0].thumbnails&&(D=D.docs[0].thumbnails[D.docs[0].thumbnails.length-1],null!=D&&(P.value=D.url));P.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var p=document.createElement("input");-p.setAttribute("multiple","multiple");p.setAttribute("type","file");mxEvent.addListener(p,"change",function(D){null!=p.files&&(b.importFiles(p.files,0,0,b.maxImageSize,function(G,E,T,O,S,k){n(G)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var E=0;E<G.length;E++)G[E]()},!0),p.type="",p.type="file",p.value="")});p.style.display="none";document.body.appendChild(p);b.imgDlgFileInputElt=p}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});-f.className="geBtn";C.appendChild(f)}mxEvent.addListener(P,"keypress",function(D){13==D.keyCode&&n(P.value)});var u=mxUtils.button(mxResources.get("crop"),function(){var D=new CropImageDialog(b,P.value,I,function(G,E,T){I=G;c=E;e=T});b.showDialog(D.container,300,390,!0,!0)});x&&(u.className="geBtn",C.appendChild(u));var B=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=P.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var D=b.editor.createImageUrlConverter().convert(P.value),-G=new Image;G.onload=function(){b.editor.convertImageToDataUri(D,function(E){b.confirmImageResize(function(T){b.resizeImage(G,E,mxUtils.bind(this,function(O,S,k){b.spinner.stop();null!=O&&O.length<b.maxImageBytes?(P.value=O,K()):b.handleError({message:mxResources.get("imageTooBig")})}),T,b.maxImageSize)},G.width>b.maxImageSize||G.height>b.maxImageSize||E.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};G.onerror=function(){b.spinner.stop();-b.handleError({message:mxResources.get("fileNotFound")})};G.src=D}});B.className="geBtn";mxEvent.addListener(P,"change",function(D){I=null;K()});K();C.appendChild(B);x=mxUtils.button(mxResources.get("apply"),function(){n(P.value)});x.className="geBtn gePrimaryBtn";C.appendChild(x);b.editor.cancelFirst||C.appendChild(m);Graph.fileSupport&&(C.style.marginTop="120px",N.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",N.style.backgroundPosition="center 65%",N.style.backgroundRepeat="no-repeat",-x=document.createElement("div"),x.style.position="absolute",x.style.width="420px",x.style.top="58%",x.style.textAlign="center",x.style.fontSize="18px",x.style.color="#a0c3ff",mxUtils.write(x,mxResources.get("dragImagesHere")),N.appendChild(x));N.appendChild(C);this.container=N},LinkDialog=function(b,f,m,d,t,y,x){function C(D,G){var E=document.createElement("option");mxUtils.write(E,mxResources.get(D));E.value=D;u.appendChild(E);B[D]=G}var K=document.createElement("div");K.style.height="100%";mxUtils.write(K,-mxResources.get("editLink")+":");var M=document.createElement("div");M.className="geTitle";M.style.backgroundColor="transparent";M.style.borderColor="transparent";M.style.whiteSpace="nowrap";M.style.textOverflow="clip";M.style.cursor="default";var N=document.createElement("input");N.setAttribute("placeholder",mxResources.get("dragUrlsHere"));N.setAttribute("type","text");N.style.marginTop="6px";N.style.width="414px";N.style.boxSizing="border-box";N.style.backgroundImage="url('"+Dialog.prototype.clearImage+-"')";N.style.backgroundRepeat="no-repeat";N.style.backgroundPosition="100% 50%";N.style.paddingRight="14px";N.style.marginBottom="4px";var P=document.createElement("div");P.setAttribute("title",mxResources.get("reset"));P.style.position="relative";P.style.left="-16px";P.style.width="12px";P.style.height="14px";P.style.cursor="pointer";P.style.display="inline-block";P.style.top="3px";P.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(P,"click",function(){N.value="";N.focus()});-var I=document.createElement("input");I.style.cssText="margin-right:8px;margin-bottom:8px;";I.setAttribute("value","url");I.setAttribute("type","radio");I.setAttribute("name","geLinkDialogOption");var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geLinkDialogOption");var e=document.createElement("select");e.style.width="414px";var l=document.createElement("input");l.setAttribute("type",-"checkbox");l.style.margin="0 6p 0 6px";null!=x&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);x=null!=x?x:"_blank";l.setAttribute("title",x);y&&(N.style.width="200px");if(t&&null!=b.pages){null!=f&&Graph.isPageLink(f)?(c.setAttribute("checked","checked"),c.defaultChecked=!0):(N.setAttribute("value",f),I.setAttribute("checked","checked"),I.defaultChecked=!0);M.appendChild(I);M.appendChild(N);M.appendChild(P);y&&(M.appendChild(l),mxUtils.write(M,mxResources.get("openInNewWindow")));mxUtils.br(M);-M.appendChild(c);t=!1;for(y=0;y<b.pages.length;y++)P=document.createElement("option"),mxUtils.write(P,b.pages[y].getName()||mxResources.get("pageWithNumber",[y+1])),P.setAttribute("value","data:page/id,"+b.pages[y].getId()),f==P.getAttribute("value")&&(P.setAttribute("selected","selected"),t=!0),e.appendChild(P);if(!t&&c.checked){var n=document.createElement("option");mxUtils.write(n,mxResources.get("pageNotFound"));n.setAttribute("disabled","disabled");n.setAttribute("selected","selected");n.setAttribute("value",-"pageNotFound");e.appendChild(n);mxEvent.addListener(e,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)})}M.appendChild(e)}else N.setAttribute("value",f),M.appendChild(N),M.appendChild(P);K.appendChild(M);var p=mxUtils.button(m,function(){b.hideDialog();d(c.checked?"pageNotFound"!==e.value?e.value:f:N.value,LinkDialog.selectedDocs,l.checked?x:null)});p.style.verticalAlign="middle";p.className="geBtn gePrimaryBtn";this.init=function(){c.checked?e.focus():(N.focus(),mxClient.IS_GC||-mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(e,"focus",function(){I.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(N,"focus",function(){c.removeAttribute("checked");I.setAttribute("checked","checked");I.checked=!0});if(Graph.fileSupport){var D=K.parentNode,G=null;mxEvent.addListener(D,"dragleave",function(E){null!=G&&(G.parentNode.removeChild(G),G=null);E.stopPropagation();E.preventDefault()});-mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(E){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(D));E.stopPropagation();E.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(E){try{null!=G&&(G.parentNode.removeChild(G),G=null),0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")&&(N.value=decodeURIComponent(E.dataTransfer.getData("text/uri-list")),I.setAttribute("checked","checked"),I.checked=!0,p.click())}catch(T){b.handleError(T)}E.stopPropagation();-E.preventDefault()}),!1)}};m=document.createElement("div");m.style.marginTop="16px";m.style.textAlign="right";b.isOffline()||m.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));M=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});M.style.verticalAlign="middle";M.className="geBtn";b.editor.cancelFirst&&m.appendChild(M);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(D){if(D.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=D.docs;-var G=D.docs[0].url;"application/mxe"==D.docs[0].mimeType||null!=D.docs[0].mimeType&&"application/vnd.jgraph."==D.docs[0].mimeType.substring(0,23)?G="https://www.draw.io/#G"+D.docs[0].id:"application/vnd.google-apps.folder"==D.docs[0].mimeType&&(G="https://drive.google.com/#folders/"+D.docs[0].id);N.value=G;N.focus()}else LinkDialog.selectedDocs=null;N.focus()};var u=document.createElement("select");u.className="geBtn";u.style.position="relative";u.style.top="1px";u.style.maxWidth="120px";var B={};-t=document.createElement("option");mxUtils.write(t,mxResources.get("select")+"...");t.value="";u.appendChild(t);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&C("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var D=b.drive.createLinkPicker();b.linkPicker=D.setCallback(function(G){LinkDialog.filePicked(G)}).build()}b.linkPicker.setVisible(!0)}))});-"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&C("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(D){N.value=D[0].link;N.focus()}})});null!=b.oneDrive&&C("oneDrive",function(){b.oneDrive.pickFile(function(D,G){null!=G&&null!=G.value&&0<G.value.length&&(N.value=G.value[0].webUrl,N.focus())},!0)});null!=b.gitHub&&C("github",function(){b.gitHub.pickFile(function(D){if(null!=D){D=D.split("/");var G=D[0],E=D[1],T=D[2];D=D.slice(3,D.length).join("/");-N.value="https://github.com/"+G+"/"+E+"/blob/"+T+"/"+D;N.focus()}})});null!=b.gitLab&&C("gitlab",function(){b.gitLab.pickFile(function(D){if(null!=D){D=D.split("/");var G=D[0],E=D[1],T=D[2];D=D.slice(3,D.length).join("/");N.value=DRAWIO_GITLAB_URL+"/"+G+"/"+E+"/blob/"+T+"/"+D;N.focus()}})});1<u.children.length&&(m.appendChild(u),mxEvent.addListener(u,"change",function(D){null!=B[u.value]&&(B[u.value](),u.value="")}));mxEvent.addListener(N,"keypress",function(D){13==D.keyCode&&p.click()});m.appendChild(p);-b.editor.cancelFirst||m.appendChild(M);K.appendChild(m);this.container=K},FeedbackDialog=function(b,f,m,d){var t=document.createElement("div"),y=document.createElement("div");mxUtils.write(y,mxResources.get("sendYourFeedback"));y.style.fontSize="18px";y.style.marginBottom="18px";t.appendChild(y);y=document.createElement("div");mxUtils.write(y,mxResources.get("yourEmailAddress")+(m?"":" ("+mxResources.get("required")+")"));t.appendChild(y);var x=document.createElement("input");x.setAttribute("type",-"text");x.style.marginTop="6px";x.style.width="600px";var C=mxUtils.button(mxResources.get("sendMessage"),function(){var P=N.value+(M.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;P.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=-FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(x.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+":\n"+P),function(I){b.spinner.stop();200<=I.getStatus()&&299>=I.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});C.className=-"geBtn gePrimaryBtn";if(!m){C.setAttribute("disabled","disabled");var K=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(x,"change",function(){0<x.value.length&&0<K.test(x.value)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")});mxEvent.addListener(x,"keyup",function(){0<x.value.length&&K.test(x.value)?C.removeAttribute("disabled"):C.setAttribute("disabled",-"disabled")})}t.appendChild(x);this.init=function(){x.focus()};var M=document.createElement("input");M.setAttribute("type","checkbox");M.setAttribute("checked","checked");M.defaultChecked=!0;m=document.createElement("p");m.style.marginTop="14px";m.appendChild(M);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("includeCopyOfMyDiagram"));m.appendChild(y);mxEvent.addListener(y,"click",function(P){M.checked=!M.checked;mxEvent.consume(P)});t.appendChild(m);y=document.createElement("div");-mxUtils.write(y,mxResources.get("feedback"));t.appendChild(y);var N=document.createElement("textarea");N.style.resize="none";N.style.width="600px";N.style.height="140px";N.style.marginTop="6px";N.setAttribute("placeholder",mxResources.get("comments"));t.appendChild(N);m=document.createElement("div");m.style.marginTop="26px";m.style.textAlign="right";y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";b.editor.cancelFirst?(m.appendChild(y),m.appendChild(C)):(m.appendChild(C),-m.appendChild(y));t.appendChild(m);this.container=t};FeedbackDialog.maxAttachmentSize=1E6;-var RevisionDialog=function(b,f,m){var d=document.createElement("div"),t=document.createElement("h3");t.style.marginTop="3px";mxUtils.write(t,mxResources.get("revisionHistory"));d.appendChild(t);t=document.createElement("div");t.style.position="absolute";t.style.overflow="auto";t.style.width="170px";t.style.height="378px";d.appendChild(t);var y=document.createElement("div");y.style.position="absolute";y.style.left="200px";y.style.width="470px";y.style.height="376px";y.style.overflow="hidden";y.style.borderWidth=-"1px";y.style.borderStyle="solid";var x=document.createElement("div");x.style.position="absolute";x.style.display="none";x.style.textAlign="center";x.style.padding="8px";x.style.borderRadius="8px";x.style.left="50%";x.style.top="50%";x.style.whiteSpace="nowrap";x.style.transform="translate(-50%, -50%)";x.style.background="inherit";x.style.border="1px solid";y.appendChild(x);mxEvent.disableContextMenu(y);d.appendChild(y);var C=new Graph(y);C.setTooltips(!1);C.setEnabled(!1);C.setPanning(!0);C.panningHandler.ignoreCell=-!0;C.panningHandler.useLeftButtonForPanning=!0;C.minFitScale=null;C.maxFitScale=null;C.centerZoom=!0;var K=0,M=null,N=0,P=C.getGlobalVariable;C.getGlobalVariable=function(X){return"page"==X&&null!=M&&null!=M[N]?M[N].getAttribute("name"):"pagenumber"==X?N+1:"pagecount"==X?null!=M?M.length:1:P.apply(this,arguments)};C.getLinkForCell=function(){return null};for(var I=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),c=b.getCurrentFile(),e=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),l={},n=0;n<e.length;n++)l[e[n].getAttribute("id")]=e[n];var p=null,u=null,B=null,D=null,G=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=B&&C.zoomIn()},20);G.setAttribute("disabled","disabled");var E=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=B&&C.zoomOut()},20);E.setAttribute("disabled",-"disabled");var T=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=B&&(1==C.view.scale?(C.maxFitScale=8,C.fit(8)):C.zoomActual(),C.center())},20);T.setAttribute("disabled","disabled");var O=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);O.setAttribute("disabled","disabled");var S=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);S.setAttribute("disabled","disabled");var k=y.cloneNode(!1);k.style.pointerEvent=-"none";y.parentNode.appendChild(k);var v=new Graph(k);v.setTooltips(!1);v.setEnabled(!1);v.setPanning(!0);v.panningHandler.ignoreCell=!0;v.panningHandler.useLeftButtonForPanning=!0;v.minFitScale=null;v.maxFitScale=null;v.centerZoom=!0;var z=document.createElement("div");z.style.textAlign="left";z.style.color="gray";z.style.backgroundColor="transparent";z.style.overflow="hidden";z.style.textOverflow="ellipsis";z.style.whiteSpace="nowrap";z.style.cursor="default";z.style.height="100%";z.style.display=-"inline-flex";z.style.alignItems="center";z.style.flexGrow="1";mxEvent.addListener(z,"click",function(){var X=mxUtils.getTextContent(z);""!=X&&b.alert(X)});var A=null;mxEvent.addGestureListeners(O,function(X){try{var Z=null!=M[K]?l[M[K].getAttribute("id")]:null;mxUtils.setOpacity(O,20);x.innerText="";if(null==Z)x.style.display="inline-block",mxUtils.write(x,mxResources.get("pageNotFound"));else{A=z.innerHTML;z.innerHTML=mxResources.get("current");y.style.display="none";k.style.display="";k.style.backgroundColor=-y.style.backgroundColor;var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,v.getModel());v.view.scaleAndTranslate(C.view.scale,C.view.translate.x,C.view.translate.y);v.mathEnabled="1"==Y.getAttribute("math");v.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&v.mathEnabled&&Editor.MathJaxRender(v.container)}}catch(ba){x.style.display="inline-block",x.innerText="",mxUtils.write(x,mxResources.get("pageNotFound")+": "+ba.message)}},null,function(){mxUtils.setOpacity(O,-60);x.style.display="none";x.innerText="";"none"==y.style.display&&(y.style.display="",z.innerHTML=A,k.style.display="none")});mxEvent.addListener(S,"click",mxUtils.bind(this,function(X){null!=B&&(X=b.getPagesForNode(B.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{c.patch(Y,null,!0,!0),b.hideDialog(),-b.hideDialog()}catch(ba){b.handleError(ba)}})}else b.hideDialog()}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close")),b.showDialog(X.container,620,460,!0,!0),X.init())}));var H=mxUtils.button(mxResources.get("restore"),function(X){null!=B&&null!=D&&b.confirm(mxResources.get("areYouSure"),function(){null!=m?m(D):b.spinner.spin(document.body,mxResources.get("restoring"))&&(H.setAttribute("disabled","disabled"),c.save(!0,function(Z){b.spinner.stop();-H.removeAttribute("disabled");b.replaceFileData(D);b.hideDialog()},function(Z){b.spinner.stop();H.removeAttribute("disabled");b.editor.setStatus("");b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");var R=document.createElement("select");R.setAttribute("disabled","disabled");R.style.userSelect="none";R.style.maxWidth="100px";R.style.marginLeft="10px";R.style.display="none";var g=null;mxEvent.addListener(R,-"change",function(X){null!=g&&(g(X),mxEvent.consume(X))});var q=mxUtils.button(mxResources.get("open"),function(){null!=B&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(B.documentElement)),b.openLink(b.getUrl(),null,!0))});q.className="geBtn";q.setAttribute("disabled","disabled");var F=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});F.className="geBtn";F.setAttribute("disabled","disabled");null!=-m&&(q.style.display="none");e=document.createElement("div");e.style.position="absolute";e.style.top="482px";e.style.right="28px";e.style.left="32px";e.style.justifyContent="end";e.style.display="flex";var J=document.createElement("div");J.className="geToolbarContainer";J.style.backgroundColor="transparent";J.style.display="flex";J.style.alignItems="center";J.style.justifyContent="stretch";J.style.left="32px";J.style.right="32px";J.style.border="none";J.style.top="440px";J.style.height="28px";var L=-null;if(null!=f&&0<f.length){y.style.cursor="move";var Q=document.createElement("table");Q.style.borderWidth="1px";Q.style.borderStyle="solid";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var U=document.createElement("tbody"),V=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(K=mxUtils.indexOf(b.pages,b.currentPage));for(n=f.length-1;0<=n;n--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){I.stop();-x.innerText="";var da=mxUtils.parseXml(ca),ma=b.editor.extractGraphModel(da.documentElement,!0);if(null!=ma){var aa=function(fa){null!=fa&&(fa=ia(Editor.parseDiagramNode(fa)));return fa},ia=function(fa){var ra=fa.getAttribute("background");if(null==ra||""==ra||ra==mxConstants.NONE)ra=C.defaultPageBackgroundColor;y.style.backgroundColor=mxUtils.getLightDarkColor(ra);(new mxCodec(fa.ownerDocument)).decode(fa,C.getModel());C.maxFitScale=1;C.fit(8);C.center();C.mathEnabled="1"==fa.getAttribute("math");-C.setAdaptiveColors(fa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&C.mathEnabled&&Editor.MathJaxRender(C.container);return fa};R.style.display="none";R.innerText="";B=da;D=ca;M=parseSelectFunction=null;N=0;if("mxfile"==ma.nodeName){da=ma.getElementsByTagName("diagram");M=[];for(ca=0;ca<da.length;ca++)M.push(da[ca]);N=Math.min(K,M.length-1);0<M.length&&aa(M[N]);if(1<M.length)for(R.removeAttribute("disabled"),R.style.display="",ca=0;ca<M.length;ca++){da=document.createElement("option");da.setAttribute("title",-ka+" ("+M[ca].getAttribute("id")+")");da.setAttribute("value",ca);var ka=M[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);ma=b.getPageById(M[ca].getAttribute("id"));var ta="";if(null!=ma){var sa=new DiagramPage(M[ca]);b.getHashValueForPages([ma])!=b.getHashValueForPages([sa])&&(ta=" (M)")}else ta=" (X)";mxUtils.write(da,ka+ta);ca==N&&da.setAttribute("selected","selected");R.appendChild(da)}g=function(){try{var fa=parseInt(R.value);N=K=fa;aa(M[fa])}catch(ra){R.value=K,b.handleError(ra)}}}else ia(ma);-ka=X.lastModifyingUserName;null!=ka&&20<ka.length&&(ka=ka.substring(0,20)+"...");z.innerText="";mxUtils.write(z,(null!=ka?ka+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());z.setAttribute("title",Y.getAttribute("title"));G.removeAttribute("disabled");E.removeAttribute("disabled");T.removeAttribute("disabled");O.removeAttribute("disabled");S.removeAttribute("disabled");null!=c&&c.isRestricted()||(b.editor.graph.isEnabled()&&H.removeAttribute("disabled"),q.removeAttribute("disabled"),F.removeAttribute("disabled"));-mxUtils.setOpacity(G,60);mxUtils.setOpacity(E,60);mxUtils.setOpacity(T,60);mxUtils.setOpacity(O,60);mxUtils.setOpacity(S,60)}else R.style.display="none",R.innerText="",z.innerText="",x.innerText="",mxUtils.write(z,mxResources.get("errorLoadingFile")),mxUtils.write(x,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding=-"6px";ea.style.whiteSpace="nowrap";X==f[f.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===V?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());Y.appendChild(ea);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ca){u!=X&&(I.stop(),-null!=p&&(p.style.backgroundColor=""),u=X,p=Y,p.style.backgroundColor="light-dark(#ebf2f9, #000000)",D=B=null,z.removeAttribute("title"),z.innerText=mxResources.get("loading")+"...",y.style.backgroundColor=C.defaultPageBackgroundColor,x.innerText="",C.getModel().clear(),H.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),q.setAttribute("disabled",-"disabled"),R.setAttribute("disabled","disabled"),mxUtils.setOpacity(G,20),mxUtils.setOpacity(E,20),mxUtils.setOpacity(T,20),mxUtils.setOpacity(O,20),mxUtils.setOpacity(S,20),I.spin(y),X.getXml(function(da){if(u==X)try{ba(da)}catch(ma){z.innerText=mxResources.get("error")+": "+ma.message}},function(da){I.stop();R.style.display="none";R.innerText="";z.innerText="";mxUtils.write(z,mxResources.get("errorLoadingFile"));mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,-"dblclick",function(ca){q.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);U.appendChild(Y)}return Y}(f[n]);null!=W&&n==f.length-1&&(L=W)}Q.appendChild(U);t.appendChild(Q)}else null==c||null==b.drive&&c.constructor==window.DriveFile||null==b.dropbox&&c.constructor==window.DropboxFile?(y.style.display="none",J.style.display="none",mxUtils.write(t,mxResources.get("notAvailable"))):(y.style.display="none",J.style.display=-"none",mxUtils.write(t,mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";J.appendChild(z);J.appendChild(O);J.appendChild(E);J.appendChild(T);J.appendChild(G);J.appendChild(R);J.appendChild(S);b.editor.cancelFirst&&e.appendChild(t);e.appendChild(q);null!=c&&c.constructor==DriveFile&&e.appendChild(F);e.appendChild(H);b.editor.cancelFirst||e.appendChild(t);d.appendChild(e);d.appendChild(J);-this.container=d},DraftDialog=function(b,f,m,d,t,y,x,C,K){var M=document.createElement("div"),N=document.createElement("div");N.style.marginTop="0px";N.style.whiteSpace="nowrap";N.style.overflow="auto";N.style.lineHeight="normal";mxUtils.write(N,f);M.appendChild(N);var P=document.createElement("select"),I=mxUtils.bind(this,function(){"-1"==P.value?(P.value=P.options[0].value,I(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this,S;return $jscomp.asyncExecutePromiseGeneratorProgram(function(k){for(S=-0;S<K.length;S++)t.apply(O,[S,mxUtils.bind(O,function(){})]);b.hideDialog(!0);k.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(u=mxUtils.parseXml(K[P.value].data),B=b.editor.extractGraphModel(u.documentElement,!0),D=0,this.init())});if(null!=K){P.style.marginLeft="4px";for(f=0;f<K.length;f++){var c=document.createElement("option");c.setAttribute("value",f);var e=new Date(K[f].created),l=new Date(K[f].modified);mxUtils.write(c,e.toLocaleDateString()+" "+e.toLocaleTimeString()+" - "+-(e.toDateString(),l.toDateString(),l.toLocaleDateString())+" "+l.toLocaleTimeString());P.appendChild(c)}c=document.createElement("option");c.setAttribute("value","-1");mxUtils.write(c,mxResources.get("deleteAll"));P.appendChild(c);N.appendChild(P);mxEvent.addListener(P,"change",I)}null==m&&(m=K[0].data);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.marginTop="10px";n.style.left="40px";n.style.right="40px";n.style.top="46px";n.style.bottom=-"74px";n.style.overflow="hidden";mxEvent.disableContextMenu(n);M.appendChild(n);var p=new Graph(n);p.setEnabled(!1);p.setPanning(!0);p.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";p.panningHandler.ignoreCell=!0;p.panningHandler.useLeftButtonForPanning=!0;p.minFitScale=null;p.maxFitScale=null;p.centerZoom=!0;var u=mxUtils.parseXml(m),B=b.editor.extractGraphModel(u.documentElement,!0),D=0,G=null,E=p.getGlobalVariable;p.getGlobalVariable=function(O){return"page"==O&&null!=G&&null!=G[D]?G[D].getAttribute("name"):-"pagenumber"==O?D+1:"pagecount"==O?null!=G?G.length:1:E.apply(this,arguments)};p.getLinkForCell=function(){return null};m=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){p.zoomIn()},20);N=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){p.zoomOut()},20);f=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==p.view.scale?(p.maxFitScale=8,p.fit(8)):p.zoomActual();p.center()},20);x=mxUtils.button(x||mxResources.get("discard"),-function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(S){t.apply(O,[P.value,mxUtils.bind(O,function(){null!=P.parentNode&&(P.options[P.selectedIndex].parentNode.removeChild(P.options[P.selectedIndex]),1<P.options.length?(P.value=P.options[0].value,I()):b.hideDialog(!0))})]);S.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});x.className="geBtn";var T=document.createElement("select");-T.style.maxWidth="80px";T.style.position="relative";T.style.top="-2px";T.style.verticalAlign="bottom";T.style.marginRight="6px";T.style.display="none";y=mxUtils.button(y||mxResources.get("edit"),function(){d.apply(this,[P.value])});y.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.position="absolute";c.style.bottom="30px";c.style.right="40px";c.style.textAlign="right";e=document.createElement("div");e.className="geToolbarContainer";e.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";-this.init=function(){function O(z){if(null!=z){var A=z.getAttribute("background");if(null==A||""==A||A==mxConstants.NONE)A="light-dark(#ffffff, transparent)";n.style.backgroundColor=A;(new mxCodec(z.ownerDocument)).decode(z,p.getModel());p.maxFitScale=1;p.fit(8);p.center()}return z}function S(z){null!=z&&(z=O(Editor.parseDiagramNode(z)));return z}mxEvent.addListener(T,"change",function(z){D=parseInt(T.value);S(G[D]);mxEvent.consume(z)});if("mxfile"==B.nodeName){var k=B.getElementsByTagName("diagram");-G=[];for(var v=0;v<k.length;v++)G.push(k[v]);0<G.length&&S(G[D]);T.innerText="";if(1<G.length)for(T.style.display="",v=0;v<G.length;v++)k=document.createElement("option"),mxUtils.write(k,G[v].getAttribute("name")||mxResources.get("pageWithNumber",[v+1])),k.setAttribute("value",v),v==D&&k.setAttribute("selected","selected"),T.appendChild(k);else T.style.display="none"}else O(B)};e.appendChild(T);e.appendChild(m);e.appendChild(N);e.appendChild(f);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});-m.className="geBtn";C=null!=C?mxUtils.button(mxResources.get("ignore"),C):null;null!=C&&(C.className="geBtn");b.editor.cancelFirst?(c.appendChild(m),null!=C&&c.appendChild(C),c.appendChild(x),c.appendChild(y)):(c.appendChild(y),c.appendChild(x),null!=C&&c.appendChild(C),c.appendChild(m));M.appendChild(c);M.appendChild(e);this.container=M},FindWindow=function(b,f,m,d,t,y){function x(g,q,F){if("object"===typeof q.value&&null!=q.value.attributes){q=q.value.attributes;for(var J=0;J<q.length;J++)if("label"!=-q[J].nodeName){var L=mxUtils.trim(q[J].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==g&&0<=L.indexOf(F)||null!=g&&g.test(L))return!0}}return!1}function C(){c?(A.removeAttribute("disabled"),H.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));D.value?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled")}function K(g,q,F){v.innerText="";var J=N.model.getDescendants(N.model.getRoot()),L=D.value.toLowerCase(),-Q=E.checked?new RegExp(L):null,U=null;l=null;P!=L&&(P=L,I=null,e=!1);var V=null==I;if(0<L.length){if(e){e=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}g=(W+1)%b.pages.length;I=null;do e=!1,J=b.pages[g],N=b.createTemporaryGraph(N.getStylesheet()),b.updatePageRoot(J),N.model.setRoot(J.root),g=(g+1)%b.pages.length;while(!K(!0,q,F)&&g!=W);I&&(I=null,F?b.editor.graph.model.execute(new SelectPage(b,J)):b.selectPage(J));e=!1;N=b.editor.graph;return K(!0,q,F)}for(X=0;X<J.length;X++){W=-N.view.getState(J[X]);q&&(V=V||W==I);if(null!=W&&null!=W.cell.value&&(V||null==U)&&(N.model.isVertex(W.cell)||N.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(O.innerHTML=N.sanitizeHtml(N.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([O])):label=N.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;q&&y&&W==I&&(label=label.substr(n),Z=n);var Y=""==G.value;if(null==Q&&(0<=label.indexOf(L)||Y&&x(Q,W.cell,L))||null!=Q&&(Q.test(label)||-Y&&x(Q,W.cell,L)))if(y&&(null!=Q?(Y=label.match(Q),null!=Y&&0<Y.length&&(l=Y[0].toLowerCase(),n=Z+Y.index+l.length)):(l=L,n=Z+label.indexOf(L)+l.length)),V){U=W;break}else null==U&&(U=W)}V=V||W==I}}if(null!=U){if(X==J.length&&T.checked)return I=null,e=!0,K(!0,q,F);I=U;N.scrollCellToVisible(I.cell);N.isEnabled()&&!N.isCellLocked(I.cell)?F||N.getSelectionCell()==I.cell&&1==N.getSelectionCount()||N.setSelectionCell(I.cell):N.highlightCell(I.cell)}else{if(!g&&T.checked)return e=!0,K(!0,q,F);N.isEnabled()&&-!F&&N.clearSelection()}c=null!=U;y&&!g&&C();return 0==L.length||null!=U}var M=b.actions.get("findReplace"),N=b.editor.graph,P=null,I=null,c=!1,e=!1,l=null,n=0,p=1,u=document.createElement("div");u.style.userSelect="none";u.style.overflow="hidden";u.style.padding="10px";u.style.height="100%";var B=y?"260px":"200px",D=document.createElement("input");D.setAttribute("placeholder",mxResources.get("find"));D.setAttribute("type","text");D.style.marginTop="4px";D.style.marginBottom="6px";D.style.width=B;-D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";u.appendChild(D);mxUtils.br(u);if(y){var G=document.createElement("input");G.setAttribute("placeholder",mxResources.get("replaceWith"));G.setAttribute("type","text");G.style.marginTop="4px";G.style.marginBottom="6px";G.style.width=B;G.style.fontSize="12px";G.style.borderRadius="4px";G.style.padding="6px";u.appendChild(G);mxUtils.br(u);mxEvent.addListener(G,"input",C)}var E=document.createElement("input");E.setAttribute("id",-"geFindWinRegExChck");E.setAttribute("type","checkbox");E.style.marginRight="4px";u.appendChild(E);B=document.createElement("label");B.setAttribute("for","geFindWinRegExChck");u.appendChild(B);mxUtils.write(B,mxResources.get("regularExpression"));u.appendChild(B);B=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");B.style.position="relative";B.style.marginLeft="6px";B.style.top="3px";u.appendChild(B);mxUtils.br(u);var T=document.createElement("input");T.setAttribute("id","geFindWinAllPagesChck");-T.setAttribute("type","checkbox");T.style.marginRight="4px";u.appendChild(T);B=document.createElement("label");B.setAttribute("for","geFindWinAllPagesChck");u.appendChild(B);mxUtils.write(B,mxResources.get("allPages"));u.appendChild(B);var O=document.createElement("div");mxUtils.br(u);B=document.createElement("div");B.style.left="0px";B.style.right="0px";B.style.marginTop="6px";B.style.padding="0 6px 0 6px";B.style.textAlign="center";u.appendChild(B);var S=mxUtils.button(mxResources.get("reset"),-function(){v.innerText="";D.value="";D.style.backgroundColor="";y&&(G.value="",C());P=I=null;e=!1;D.focus()});S.setAttribute("title",mxResources.get("reset"));S.style.float="none";S.style.width="120px";S.style.marginTop="6px";S.style.marginLeft="8px";S.style.overflow="hidden";S.style.textOverflow="ellipsis";S.className="geBtn";y||B.appendChild(S);var k=mxUtils.button(mxResources.get("find"),function(){try{D.style.backgroundColor=K()?"":"light-dark(#ffcfcf, #ff0000)"}catch(g){b.handleError(g)}});k.setAttribute("title",-mxResources.get("find")+" (Enter)");k.style.float="none";k.style.width="120px";k.style.marginTop="6px";k.style.marginLeft="8px";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.className="geBtn gePrimaryBtn";B.appendChild(k);var v=document.createElement("div");v.style.marginTop="10px";if(y){var z=function(g,q,F,J,L){if(null==L||"1"!=L.html)return J=g.toLowerCase().indexOf(q,J),0>J?g:g.substr(0,J)+F+g.substr(J+q.length);var Q=g;q=mxUtils.htmlEntities(q,!1,!1,!1);L=[];var U=-1;for(g=g.replace(/<br>/ig,-"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(U=g.indexOf("<",U+1));)L.push(U);U=g.match(/<[^>]*>/g);g=g.replace(/<[^>]*>/g,"");J=g.toLowerCase().indexOf(q,J);if(0>J)return Q;Q=J+q.length;F=mxUtils.htmlEntities(F);g=g.substr(0,J)+F+g.substr(Q);for(var V=0,W=0;W<L.length;W++){if(L[W]-V<J)g=g.substr(0,L[W])+U[W]+g.substr(L[W]);else{var X=L[W]-V<Q?J+V:L[W]+(F.length-q.length);g=g.substr(0,X)+U[W]+g.substr(X)}V+=U[W].length}return g.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,-"$1").replace(/\n/g,"<br>")},A=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=l&&null!=I){var g=I.cell,q=N.getLabel(g);N.isCellEditable(g)&&N.model.setValue(g,z(q,l,G.value,n-l.length,N.getCurrentCellStyle(g)));D.style.backgroundColor=K(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(F){b.handleError(F)}});A.setAttribute("title",mxResources.get("replFind"));A.style.float="none";A.style.width="120px";A.style.marginTop="6px";A.style.marginLeft="8px";A.style.overflow="hidden";A.style.textOverflow=-"ellipsis";A.className="geBtn gePrimaryBtn";A.setAttribute("disabled","disabled");B.appendChild(A);mxUtils.br(B);var H=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=l&&null!=I){var g=I.cell,q=N.getLabel(g);N.model.setValue(g,z(q,l,G.value,n-l.length,N.getCurrentCellStyle(g)));A.setAttribute("disabled","disabled");H.setAttribute("disabled","disabled")}}catch(F){b.handleError(F)}});H.setAttribute("title",mxResources.get("replace"));H.style.float="none";H.style.width="120px";H.style.marginTop=-"6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");B.appendChild(H);var R=mxUtils.button(mxResources.get("replaceAll"),function(){v.innerText="";P=null;var g=b.currentPage,q=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;N.getModel().beginUpdate();try{for(var F=0,J={};K(!1,!0,!0)&&100>F;){var L=I.cell,Q=N.getLabel(L),U=J[L.id];if(U&&U.replAllMrk==p&&U.replAllPos>=n)break;J[L.id]=-{replAllMrk:p,replAllPos:n};N.isCellEditable(L)&&(N.model.setValue(L,z(Q,l,G.value,n-l.length,N.getCurrentCellStyle(L))),F++)}g!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,g));mxUtils.write(v,mxResources.get("matchesRepl",[F]))}catch(V){b.handleError(V)}finally{N.getModel().endUpdate(),b.editor.graph.setSelectionCells(q),b.editor.graph.rendering=!0}p++});R.setAttribute("title",mxResources.get("replaceAll"));R.style.float="none";R.style.width="120px";R.style.marginTop="6px";R.style.marginLeft=-"8px";R.style.overflow="hidden";R.style.textOverflow="ellipsis";R.className="geBtn gePrimaryBtn";R.setAttribute("disabled","disabled");B.appendChild(R);mxUtils.br(B);B.appendChild(S);S=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));S.setAttribute("title",mxResources.get("close"));S.style.float="none";S.style.width="120px";S.style.marginTop="6px";S.style.marginLeft="8px";S.style.overflow="hidden";S.style.textOverflow="ellipsis";S.className="geBtn";-B.appendChild(S);mxUtils.br(B);B.appendChild(v)}else S.style.width="90px",k.style.width="90px";mxEvent.addListener(D,"keyup",function(g){if(91==g.keyCode||93==g.keyCode||17==g.keyCode)mxEvent.consume(g);else if(27==g.keyCode)M.funct();else if(P!=D.value.toLowerCase()||13==g.keyCode)try{D.style.backgroundColor=K()?"":"light-dark(#ffcfcf, #ff0000)"}catch(q){D.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(u,"keydown",function(g){70==g.keyCode&&b.keyHandler.isControlDown(g)&&-!mxEvent.isShiftDown(g)&&(M.funct(),mxEvent.consume(g))});this.window=new mxWindow(mxResources.get("find")+(y?"/"+mxResources.get("replace"):""),u,f,m,d,t,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null),-null!=b.pages&&1<b.pages.length?T.removeAttribute("disabled"):(T.checked=!1,T.setAttribute("disabled","disabled"))):N.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,f,m,d,t,y){var x=b.editor.graph,C=document.createElement("div");C.style.textAlign="center";C.style.userSelect="none";C.style.overflow="hidden";C.style.height="100%";if(y){var K=function(){var e=x.freehand.getStrokeColor(!0);null!=e&&e!=mxConstants.NONE&&1<e.length&&"string"===typeof e&&("default"==e?e=-mxResources.get("useBlackAndWhite"):(e="#"==e.charAt(0)?e.substring(1).toUpperCase():e,e=ColorDialog.prototype.colorNames[e]),null!=e&&P.setAttribute("title",e))},M=document.createElement("input");M.setAttribute("id","geFreehandBrush");M.setAttribute("type","checkbox");M.checked=x.freehand.isPerfectFreehandMode();M.style.margin="10px 5px 0px 10px";M.style.float="left";C.appendChild(M);x.freehand.setPerfectFreehandMode(M.checked);var N=document.createElement("label");N.setAttribute("for","geFreehandBrush");-N.style.float="left";N.style.marginTop="10px";C.appendChild(N);mxUtils.write(N,mxResources.get("brush"));C.appendChild(N);var P=document.createElement("tempDiv");P.style.display="block";P.style.width="100%";P.style.height="100%";P.style.borderRadius="2px";P.style.boxSizing="border-box";P.style.border="1px solid black";P.style.backgroundColor=x.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){P.style.backgroundColor=x.freehand.getStrokeColor()});K();N=mxUtils.button("",mxUtils.bind(this,-function(e){b.pickColor(x.freehand.getStrokeColor(!0),function(l){x.freehand.setStrokeColor(l);P.style.backgroundColor=x.freehand.getStrokeColor();K()},"default");mxEvent.consume(e)}));N.style.position="absolute";N.style.boxSizing="border-box";N.style.padding="2px";N.style.top="8px";N.style.right="8px";N.style.width="28px";N.style.height="18px";N.className="geColorBtn";N.innerText="";N.appendChild(P);C.appendChild(N);N=document.createElement("img");N.setAttribute("title",mxResources.get("settings"));-N.setAttribute("src",Editor.gearImage);N.className="geToolbarButton geAdaptiveAsset";N.style.position="absolute";N.style.boxSizing="border-box";N.style.padding="2px";N.style.top="8px";N.style.right="38px";N.style.width="18px";N.style.height="18px";N.style.opacity="0.6";C.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(e){e=x.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",e,function(l){!isNaN(l)&&0<l&&20>=l&&x.freehand.setSmoothing(parseInt(l))})}));-mxUtils.br(C);var I=document.createElement("input");I.setAttribute("type","range");I.setAttribute("min","2");I.setAttribute("max","30");I.setAttribute("value",x.freehand.getBrushSize());I.style.width="90%";I.style.visibility="hidden";C.appendChild(I);mxUtils.br(C);N=function(){x.freehand.setPerfectFreehandMode(M.checked);I.style.visibility=M.checked?"visible":"hidden"};mxEvent.addListener(M,"change",N);N();mxEvent.addListener(I,"change",function(){x.freehand.setBrushSize(parseInt(this.value))})}var c=-mxUtils.button(mxResources.get("startDrawing"),function(){x.freehand.isDrawing()?x.freehand.stopDrawing():x.freehand.startDrawing()});c.setAttribute("title",mxResources.get("startDrawing")+" (X)");c.style.margin=y?"5px 0 0 0":"10px 0 0 0";c.style.width="90%";c.style.boxSizing="border-box";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.textAlign="center";c.className="geBtn gePrimaryBtn";C.appendChild(c);this.window=new mxWindow(mxResources.get("freehand"),C,f,m,d,t,!0,!0);this.window.destroyOnClose=-!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);x.addListener("freehandStateChanged",mxUtils.bind(this,function(){c.innerText="";mxUtils.write(c,mxResources.get(x.freehand.isDrawing()?"stopDrawing":"startDrawing"));var e=document.createElement("span");e.style.opacity="0.7";e.style["float"]="right";mxUtils.write(e,"X");c.appendChild(e);c.setAttribute("title",mxResources.get(x.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");c.className="geBtn"+(x.freehand.isDrawing()?-" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){x.freehand.isDrawing()&&x.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,f,m,d,t){var y=b.editor.graph,x=document.createElement("div");x.style.userSelect="none";x.style.overflow="hidden";x.style.height="100%";var C=document.createElement("div");C.style.display="flex";C.style.alignItems="center";-C.style.justifyContent="center";C.style.paddingTop="20px";var K=document.createElement("input");K.setAttribute("type","checkbox");K.style.marginRight="4px";K.checked=!0;var M=document.createElement("input");M.setAttribute("type","checkbox");M.style.marginRight="4px";M.checked=!0;var N=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(y.isSelectionEmpty()?y.getVerticesAndEdges():y.getSelectionCells(),K.checked,M.checked)}));-N.setAttribute("title","Convert Colors");N.className="geBtn gePrimaryBtn";C.appendChild(N);x.appendChild(C);C=C.cloneNode(!1);C.appendChild(M);C.style.paddingTop="8px";mxUtils.write(C,mxResources.get("background"));x.appendChild(C);C=C.cloneNode(!1);C.appendChild(K);C.style.paddingTop="8px";mxUtils.write(C,mxResources.get("labels"));x.appendChild(C);this.window=new mxWindow(mxResources.get("adaptiveColors"),x,f,m,d,t,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);-this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,f,m,d,t){function y(){S=!0;n.value=k;P.isSelectionEmpty()?(u.setAttribute("disabled","disabled"),"selectionOnly"==n.value&&(n.value="includeCopyOfMyDiagram")):u.removeAttribute("disabled");b.isDiagramEmpty()?(p.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==n.value&&(n.value="help")):p.removeAttribute("disabled");-S=!1}function x(z,A,H){var R=document.createElement("button");R.className="geBtn gePrimaryBtn";R.style.padding="4px";R.style.height="auto";R.style.position="relative";"flex"==H?(R.style.overflow="hidden",R.style.textOverflow="ellipsis",R.style.whiteSpace="nowrap",R.style.margin="0px",R.style.flexGrow="1"):(R.style.display="block",R.style.margin="8px",R.style.left="50%",R.style.transform="translateX(-50%)");mxUtils.write(R,z);R.setAttribute("title",z);mxEvent.addListener(R,"click",A);return R}function C(z){var A=-document.createElement("div");A.style.display="block";A.style.position="relative";A.style.backgroundColor="#e0e0e0";A.style.borderRadius="4px";A.style.wordWrap="break-word";A.style.textAlign="left";A.style.padding="6px";A.style.margin="12px";A.style.left="0px";A.style.right="0px";mxUtils.write(A,z);c.appendChild(A);return A}function K(z){var A=z.indexOf("<mxGraphModel "),H=z.indexOf("</mxGraphModel>");0>A&&(A=z.indexOf("<mxGraphModel>"));if(0<=A&&H>A){var R=mxUtils,g=R.trim,q=z.substring(0,A),F=q.indexOf("```");-0<=F&&(q=q.substring(q,0,F+6));R=g.call(R,q);A=z.substring(A,H+15);g=mxUtils;q=g.trim;z=z.substring(H+15);H=z.lastIndexOf("```");0<=H&&(z=z.substring(H+3));return[R,A,q.call(g,z)]}return null}function M(z){var A=C(z);A.style.cursor="pointer";A.style.marginBottom="2px";A.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(A,"click",function(V){O.value=z;O.focus()});var H=C("");H.style.marginTop="2px";var R=b.currentPage,g=z,q=[],F=null;if("includeCopyOfMyDiagram"==n.value||"selectionOnly"==-n.value){var J=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==n.value&&(J.isObjectIgnored=function(V){return V.constructor==mxCell&&!P.model.isRoot(V)&&!P.model.isLayer(V)&&!P.isCellSelected(V)&&!P.isAncestorSelected(V)});F=J.encode(P.getModel());J.document.appendChild(F);q.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(F)})}else"create"==-n.value?(g=D.value.replace(/([A-Z])/g," $1").toLowerCase(),g="Write the declaration code for a "+(""!=g?g:"graph")+' that shows "'+(""!=z?z:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):q.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});q.push({role:"user",content:g});var L={model:Editor.gptModel,-messages:q},Q=0;for(q=0;q<L.messages.length;q++)Q+=L.messages[q].content.match(/\b\w+\b|[^\w\s]|=/g).length;var U=mxUtils.bind(this,function(){H.innerHTML="";mxUtils.write(H,mxResources.get("loading")+"...");var V=document.createElement("img");V.setAttribute("title","Processing "+Q+" tokens");V.setAttribute("src",IMAGE_PATH+"/spin.gif");V.style.marginLeft="6px";H.appendChild(V);H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=-new mxXmlRequest(Editor.gptUrl,JSON.stringify(L),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ba,ea){ba.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ba.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ba){W.clear();H.innerHTML="";mxUtils.write(H,ba.message);H.appendChild(x(mxResources.get("tryAgain"),U));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ba)}),Y=mxUtils.bind(this,function(ba){var ea=-K(ba),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){ba=document.createElement("div");ba.style.display="inline-block";ba.style.position="relative";ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var da=mxUtils.parseXml(ea[1]),ma=new mxCodec(da),aa=new mxGraphModel;ma.decode(da.documentElement,aa);var ia=null;null!=F&&(da=new mxCodec(F.ownerDocument),ia=new mxGraphModel,da.decode(F,ia));da=mxUtils.bind(this,function(ka){P.model.beginUpdate();try{if(null!=-ia&&null!=b.getPageIndex(R)){b.selectPage(R);var ta=b.diffCells(ia.root,aa.root);b.patchPage(R,ta,null,!0)}else{var sa=aa.getChildren(aa.getChildAt(aa.getRoot(),0));P.setSelectionCells(P.importCells(sa))}}finally{P.model.endUpdate()}mxEvent.consume(ka)});ma=P.getBoundingBoxFromGeometry(ca);null!=ma?(ba.style.cursor="move",ba.appendChild(b.sidebar.createVertexTemplateFromCells(ca,ma.width,ma.height,"",!0,null,!0,!0,da,160,120))):(ba.style.padding="14px",mxUtils.write(ba,mxResources.get("noPreview")));-H.innerHTML="";A=H;0<ea[0].length&&(mxUtils.write(A,ea[0]),mxUtils.br(A));A.appendChild(ba);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(x(mxResources.get("tryAgain"),U,"flex"));ca.appendChild(x(mxResources.get(null!=F?"apply":"insert"),da,"flex"));H.appendChild(ca);0<ea[2].length&&(mxUtils.br(A),mxUtils.write(A,ea[2]));A.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else H.innerHTML="",A=H,mxUtils.write(A,ba),-H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(ba){if(W.clear())try{if(200<=ba.getStatus()&&299>=ba.getStatus()){var ea=JSON.parse(ba.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",L,"response:",ea);var ca=mxUtils.trim(ea.choices[0].message.content);if("create"==n.value){var da=b.extractMermaidDeclaration(ca);null!=da?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ia){Y(ia)})),b.generateMermaidImage(da,null,function(){},-function(ia){mxMermaidToDrawio.resetListeners();Z(ia)})):(Y(ca),H.appendChild(x(mxResources.get("tryAgain"),U)))}else Y(ca)}else{var ma="Error: "+ba.getStatus();try{var aa=JSON.parse(ba.getText());null!=aa&&null!=aa.error&&null!=aa.error.message&&(ma=aa.error.message)}catch(ia){}H.innerHTML="";mxUtils.write(H,ma);H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ia){Z(ia)}}),Z)}),function(W){H.innerHTML="";mxUtils.write(H,W.message);H.appendChild(x(mxResources.get("tryAgain"),-U));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});U()}function N(){""!=mxUtils.trim(O.value)&&(M(O.value),O.value="")}var P=b.editor.graph,I=document.createElement("div");I.style.textAlign="center";I.style.overflow="hidden";I.style.height="100%";var c=document.createElement("div");c.style.position="absolute";c.style.overflow="auto";c.style.top="0px";c.style.left="0px";c.style.right="0px";c.style.bottom="104px";I.appendChild(c);var e=document.createElement("div");e.style.position=-"absolute";e.style.boxSizing="border-box";e.style.borderRadius="4px";e.style.border="1px solid lightgray";e.style.margin="8px 8px 16px 8px";e.style.padding="8px";e.style.left="0px";e.style.right="0px";e.style.bottom="0px";e.style.padding="6px";e.style.height="80px";var l=document.createElement("div");l.style.display="flex";l.style.gap="6px";l.style.marginBottom="6px";var n=document.createElement("select");n.style.textOverflow="ellipsis";n.style.flexGrow="1";n.style.padding="4px";n.style.minWidth=-"0";e.appendChild(l);var p=document.createElement("option");p.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));n.appendChild(p);var u=document.createElement("option");u.setAttribute("value","selectionOnly");mxUtils.write(u,mxResources.get("selectionOnly"));n.appendChild(u);l.appendChild(n);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var B=document.createElement("option");B.setAttribute("value","create");mxUtils.write(B,-mxResources.get("create"));n.appendChild(B)}B=document.createElement("option");B.setAttribute("value","help");mxUtils.write(B,mxResources.get("help"));n.appendChild(B);B=document.createElement("option");B.setAttribute("value","reset");mxUtils.write(B,mxResources.get("reset"));n.appendChild(B);var D=document.createElement("select");D.style.textOverflow="ellipsis";D.style.flexGrow="1";D.style.padding="4px";D.style.minWidth="0";for(B=0;B<EditorUi.mermaidDiagramTypes.length;B++){var G=document.createElement("option"),-E=EditorUi.mermaidDiagramTypes[B],T=E;"erDiagram"==T&&(T="entityRelationshipDiagram");T=mxResources.get(T,null,T.charAt(0).toUpperCase()+T.substring(1).replace(/[A-Z]/g," $&"));G.setAttribute("value",E);mxUtils.write(G,T);D.appendChild(G)}l.appendChild(D);l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";var O=document.createElement("input");O.setAttribute("type","text");O.style.width="100%";O.style.outline="none";O.style.border="none";-O.style.background="transparent";O.style.padding="8px 26px 8px 8px";O.style.boxSizing="border-box";l.appendChild(O);B=document.createElement("img");B.setAttribute("src",Editor.sendImage);B.setAttribute("title",mxResources.get("sendMessage"));B.className="geAdaptiveAsset";B.style.position="relative";B.style.cursor="pointer";B.style.opacity="0.5";B.style.height="19px";B.style.left="-24px";B.style.top="5px";B.style.background="url('"+b.editor.transparentImage+"')";l.appendChild(B);e.appendChild(l);P.isSelectionEmpty()?-b.isDiagramEmpty()?n.value="help":n.value="includeCopyOfMyDiagram":n.value="selectionOnly";var S=!1,k=n.value,v=function(){O.setAttribute("placeholder",mxResources.get("create"==n.value?"describeYourDiagram":"askMeAnything"));"create"==n.value?(n.style.width="",D.style.display=""):(n.style.width="100%",D.style.display="none")};v();mxEvent.addListener(n,"change",function(){S||("reset"==n.value?(n.value=k,c.innerHTML=""):k=n.value,v())});P.selectionModel.addListener(mxEvent.CHANGE,y);P.getModel().addListener(mxEvent.CHANGE,-y);y();mxEvent.addListener(B,"click",N);mxEvent.addListener(O,"keydown",function(z){13!=z.keyCode||mxEvent.isShiftDown(z)||N()});I.appendChild(e);this.window=new mxWindow(mxResources.get("chatWindowTitle"),I,f,m,d,t,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){P.getModel().removeListener(y)}));this.window.addListener("show",-mxUtils.bind(this,function(){this.window.fit();O.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,f,m,d,t){var y=b.editor.graph,x=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)x=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var C=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(K,M){if(y.isEnabled()){var N=new FilenameDialog(b,"",mxResources.get("add"),function(P){b.hideDialog();if(null!=P&&0<P.length){P=-P.split(" ");for(var I=[],c=[],e=0;e<P.length;e++){var l=mxUtils.trim(P[e]);""!=l&&(c.push(l),0>mxUtils.indexOf(K,l)&&I.push(l))}y.isSelectionEmpty()?M(K.concat(I)):y.addTagsForCells(y.getSelectionCells(),c)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(N.container,320,80,!0,!0);N.init()}},x);x=C.div;this.window=new mxWindow(mxResources.get("tags"),x,f,m,d,t,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;-this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){C.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,f,m,d){var t=document.createElement("div");t.style.textAlign="center";var y=document.createElement("p");y.style.fontSize="16pt";y.style.padding="0px";y.style.margin="0px";y.style.color="gray";mxUtils.write(y,mxResources.get("authorizationRequired"));var x="Unknown",-C=document.createElement("img");C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.marginRight="10px";f==b.drive?(x=mxResources.get("googleDrive"),C.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(x=mxResources.get("dropbox"),C.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(x=mxResources.get("oneDrive"),C.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(x=mxResources.get("github"),C.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(x=mxResources.get("gitlab"),-C.src=IMAGE_PATH+"/gitlab-logo.svg",C.style.width="32px"):f==b.trello&&(x=mxResources.get("trello"),C.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[x]));var K=document.createElement("input");K.setAttribute("type","checkbox");x=mxUtils.button(mxResources.get("authorize"),function(){d(K.checked)});x.insertBefore(C,x.firstChild);x.style.marginTop="6px";x.className="geBigButton";x.style.fontSize="18px";x.style.padding="14px";-t.appendChild(y);t.appendChild(b);t.appendChild(x);m&&(m=document.createElement("p"),m.style.marginTop="20px",m.appendChild(K),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberMe")),m.appendChild(y),t.appendChild(m),K.checked=!0,K.defaultChecked=!0,mxEvent.addListener(y,"click",function(M){K.checked=!K.checked;mxEvent.consume(M)}));this.container=t},MoreShapesDialog=function(b,f,m){m=null!=m?m:b.sidebar.entries;var d=document.createElement("div"),t=[];if(null!=b.sidebar.customEntries)for(var y=-0;y<b.sidebar.customEntries.length;y++){for(var x=b.sidebar.customEntries[y]||{},C={title:b.getResource(x.title),entries:[]},K=0;null!=x.entries&&K<x.entries.length;K++){var M=x.entries[K];C.entries.push({id:M.id,title:b.getResource(M.title),desc:b.getResource(M.desc),image:M.preview})}0<C.entries.length&&t.push(C)}for(y=0;y<m.length;y++)if(null==b.sidebar.enabledLibraries)t.push(m[y]);else{C={title:m[y].title,entries:[]};for(K=0;K<m[y].entries.length;K++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,-m[y].entries[K].id)&&C.entries.push(m[y].entries[K]);0<C.entries.length&&t.push(C)}m=t;if(f){y=mxUtils.bind(this,function(E){for(var T=0;T<E.length;T++)(function(O){var S=e.cloneNode(!1);S.style.fontWeight="bold";S.style.backgroundColor="light-dark(#e5e5e5, #505759)";S.style.padding="6px 0px 6px 20px";mxUtils.write(S,O.title);N.appendChild(S);for(var k=0;k<O.entries.length;k++)(function(v){var z=e.cloneNode(!1);z.style.cursor="pointer";z.style.padding="4px 0px 4px 20px";z.style.whiteSpace="nowrap";-z.style.overflow="hidden";z.style.textOverflow="ellipsis";z.setAttribute("title",v.title+" ("+v.id+")");var A=document.createElement("input");A.setAttribute("type","checkbox");A.checked=b.sidebar.isEntryVisible(v.id);A.defaultChecked=A.checked;z.appendChild(A);mxUtils.write(z," "+v.title);N.appendChild(z);var H=function(R){if(null==R||"INPUT"!=mxEvent.getSource(R).nodeName){P.style.textAlign="center";P.style.padding="0px";P.style.color="";P.innerText="";if(null!=v.desc){var g=document.createElement("pre");-g.style.boxSizing="border-box";g.style.fontFamily="inherit";g.style.margin="20px";g.style.right="0px";g.style.textAlign="left";mxUtils.write(g,v.desc);P.appendChild(g)}null!=v.imageCallback?v.imageCallback(P):null!=v.image?(g=document.createElement("img"),g.setAttribute("border","0"),g.style.maxWidth="100%",g.setAttribute("src",v.image),P.appendChild(g)):null==v.desc&&(P.style.padding="20px",P.style.color="rgb(179, 179, 179)",mxUtils.write(P,mxResources.get("noPreview")));null!=I&&(I.style.backgroundColor=-"");I=z;I.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=R&&mxEvent.consume(R)}};mxEvent.addListener(z,"click",H);mxEvent.addListener(z,"dblclick",function(R){A.checked=!A.checked;mxEvent.consume(R)});c.push(function(){return A.checked?v.id:null});0==T&&0==k&&H()})(O.entries[k])})(E[T])});K=document.createElement("div");K.className="geDialogTitle";mxUtils.write(K,mxResources.get("shapes"));K.style.position="absolute";K.style.top="0px";K.style.left="0px";K.style.lineHeight="40px";K.style.height=-"40px";K.style.right="0px";var N=document.createElement("div"),P=document.createElement("div");N.style.position="absolute";N.style.top="40px";N.style.left="0px";N.style.width="202px";N.style.bottom="60px";N.style.overflow="auto";P.style.position="absolute";P.style.left="202px";P.style.right="0px";P.style.top="40px";P.style.bottom="60px";P.style.overflow="auto";P.style.borderLeftStyle="solid";P.style.borderLeftWidth="1px";P.style.textAlign="center";var I=null,c=[],e=document.createElement("div");e.style.position=-"relative";e.style.left="0px";e.style.right="0px";y(m);d.style.padding="30px";d.appendChild(K);d.appendChild(N);d.appendChild(P);m=document.createElement("div");m.className="geDialogFooter";m.style.position="absolute";m.style.paddingRight="16px";m.style.left="0px";m.style.right="0px";m.style.bottom="0px";m.style.height="60px";m.style.lineHeight="52px";var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.position="relative";l.style.top="1px";l.checked=b.sidebar.sidebarTitles;-l.defaultChecked=l.checked;m.appendChild(l);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("labels"));y.style.paddingRight="20px";m.appendChild(y);mxEvent.addListener(y,"click",function(E){l.checked=!l.checked;mxEvent.consume(E)});var n=document.createElement("input");n.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)y=document.createElement("span"),y.style.paddingRight="20px",y.appendChild(n),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),-n.style.position="relative",n.style.top="1px",n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(y,"click",function(E){mxEvent.getSource(E)!=n&&(n.checked=!n.checked,mxEvent.consume(E))}),m.appendChild(y);y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";K=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var E=[],T=0;T<c.length;T++){var O=c[T].apply(this,arguments);null!=O&&E.push(O)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&-"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(T=mxUtils.indexOf(E,".scratchpad"),null!=b.scratchpad!=(0<=T&&0<E.splice(T,1).length)&&b.toggleScratchpad(),T=mxUtils.indexOf(E,"search"),mxSettings.settings.search=0<=T&&0<E.splice(T,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),n.checked&&mxSettings.save());b.sidebar.showEntries(E.join(";"),n.checked,!0);b.setSidebarTitles(l.checked,n.checked)});K.className="geBtn gePrimaryBtn"}else{var p=document.createElement("table");-y=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";K=document.createElement("tr");p.style.width="100%";f=document.createElement("td");t=document.createElement("td");x=document.createElement("td");var u=mxUtils.bind(this,function(E,T,O){var S=document.createElement("input");S.type="checkbox";p.appendChild(S);S.checked=b.sidebar.isEntryVisible(O);var k=document.createElement("span");mxUtils.write(k,T);T=document.createElement("div");T.style.display="block";T.appendChild(S);-T.appendChild(k);mxEvent.addListener(k,"click",function(v){S.checked=!S.checked;mxEvent.consume(v)});E.appendChild(T);return function(){return S.checked?O:null}});K.appendChild(f);K.appendChild(t);K.appendChild(x);y.appendChild(K);p.appendChild(y);c=[];var B=0;for(y=0;y<m.length;y++)for(K=0;K<m[y].entries.length;K++)B++;var D=[f,t,x],G=0;for(y=0;y<m.length;y++)(function(E){for(var T=0;T<E.entries.length;T++){var O=E.entries[T];c.push(u(D[Math.floor(G/(B/3))],O.title,O.id));G++}})(m[y]);d.appendChild(p);-m=document.createElement("div");m.style.marginTop="18px";m.style.textAlign="center";n=document.createElement("input");isLocalStorage&&(n.setAttribute("type","checkbox"),n.checked=!0,n.defaultChecked=!0,m.appendChild(n),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),m.appendChild(y),mxEvent.addListener(y,"click",function(E){n.checked=!n.checked;mxEvent.consume(E)}));d.appendChild(m);y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});-y.className="geBtn";K=mxUtils.button(mxResources.get("apply"),function(){for(var E=["search"],T=0;T<c.length;T++){var O=c[T].apply(this,arguments);null!=O&&E.push(O)}b.sidebar.showEntries(0<E.length?E.join(";"):"",n.checked);b.hideDialog()});K.className="geBtn gePrimaryBtn";m=document.createElement("div");m.style.marginTop="26px";m.style.textAlign="right"}b.editor.cancelFirst?(m.appendChild(y),m.appendChild(K)):(m.appendChild(K),m.appendChild(y));d.appendChild(m);this.container=d},PluginsDialog=function(b,-f,m,d){function t(){K=!0;if(0==C.length)x.innerText=mxResources.get("noPlugins");else{x.innerText="";for(var c=0;c<C.length;c++){var e=document.createElement("span");e.style.display="flex";e.style.alignItems="center";e.style.whiteSpace="nowrap";var l=document.createElement("img");l.src=Editor.trashImage;l.style.position="relative";l.style.cursor="pointer";l.style.marginRight="4px";l.style.display="inline-block";l.style.width="18px";l.setAttribute("title",mxResources.get("delete"));e.appendChild(l);-mxUtils.write(e,C[c]);x.appendChild(e);mxUtils.br(x);mxEvent.addListener(l,"click",function(n){return function(){b.confirm(mxResources.get("delete")+' "'+C[n]+'"?',function(){null!=m&&m(C[n]);C.splice(n,1);t()})}}(c))}}}var y=document.createElement("div"),x=document.createElement("div");x.style.height="180px";x.style.overflow="auto";var C=mxSettings.getPlugins().slice(),K=!1;y.appendChild(x);t();K=!1;var M=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(c){c&&0>mxUtils.indexOf(C,-c)&&C.push(c);t()})}:function(){var c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("builtinPlugins")+": ");c.appendChild(e);var l=document.createElement("select");l.style.width="150px";for(e=0;e<App.publicPlugin.length;e++){var n=document.createElement("option");mxUtils.write(n,App.publicPlugin[e]);n.value=App.publicPlugin[e];l.appendChild(n)}c.appendChild(l);mxUtils.br(c);mxUtils.br(c);e=mxUtils.button(mxResources.get("custom")+-"...",function(){var p=new FilenameDialog(b,"",mxResources.get("add"),function(u){b.hideDialog();if(null!=u&&0<u.length){u=u.split(";");for(var B=0;B<u.length;B++){var D=u[B],G=App.pluginRegistry[D];null!=G&&(D=G);0<D.length&&0>mxUtils.indexOf(C,D)&&C.push(D)}t()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(p.container,300,80,!0,!0);p.init()});e.className="geBtn";ALLOW_CUSTOM_PLUGINS||(e.style.display="none");c=new CustomDialog(b,c,mxUtils.bind(this,function(){var p=-App.pluginRegistry[l.value];0>mxUtils.indexOf(C,p)&&(C.push(p),t())}),null,null,null,e);b.showDialog(c.container,360,100,!0,!0)});M.className="geBtn";var N=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});N.className="geBtn";var P=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){K?(mxSettings.setPlugins(C),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});P.className="geBtn gePrimaryBtn";var I=document.createElement("div");-I.style.marginTop="14px";I.style.textAlign="right";b.isOffline()||I.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||I.appendChild(N),I.appendChild(M),I.appendChild(P)):(I.appendChild(M),I.appendChild(P),d||I.appendChild(N));y.appendChild(I);this.container=y},CropImageDialog=function(b,f,m,d){function t(){var E=n.checked,T=p.checked,O=c.geometry,S=K.width,k=K.height,v=(300-S)/2,z=(300-k)/2;O.x<v?(O.width-=v-O.x,O.x=v):O.x+O.width>v+S&&(O.width=v+S-O.x,-O.x=Math.min(O.x,v+S));O.y<z?(O.height-=z-O.y,O.y=z):O.y+O.height>z+k&&(O.height=z+k-O.y,O.y=Math.min(O.y,z+k));var A=(O.x-v)/S*100;S=100-(O.x+O.width-v)/S*100;v=(O.y-z)/k*100;O=100-(O.y+O.height-z)/k*100;return"inset("+mxUtils.format(v)+"% "+mxUtils.format(S)+"% "+mxUtils.format(O)+"% "+mxUtils.format(A)+"%"+(E?" round "+I+"%":T?" round 50%":"")+")"}function y(E){null!=N&&(!0!==E&&(N.model.setGeometry(c,P.clone()),I=5,B.value=I),N.model.setStyle(c,e+t()),N.selectAll(),u.style.visibility=n.checked?-"visible":"hidden")}var x=document.createElement("div"),C=document.createElement("div");C.style.height="300px";C.style.width="300px";C.style.display="inline-flex";C.style.justifyContent="center";C.style.alignItems="center";C.style.position="absolute";var K=document.createElement("img");K.onload=function(){function E(){N.model.setStyle(c,e+t())}N=new Graph(M);N.autoExtend=!1;N.autoScroll=!1;N.setGridEnabled(!1);N.setEnabled(!0);N.setPanning(!1);N.setConnectable(!1);N.getRubberband().setEnabled(!1);-N.graphHandler.allowLivePreview=!1;var T=N.createVertexHandler;N.createVertexHandler=function(){var Q=T.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=m)try{if("inset"==m.substring(0,5)){var O=c.geometry,S=K.width,k=K.height,v=(300-S)/2,z=(300-k)/2,A=m.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),H=parseFloat(A[0]),R=parseFloat(A[1]),g=parseFloat(A[2]),q=parseFloat(A[3]);isFinite(H)&&isFinite(R)&&isFinite(g)&&isFinite(q)?(O.x=q/100*S+v,O.y=H/100*k+z,O.width=(100-R)/100*S+v-O.x,O.height=(100--g)/100*k+z-O.y,"round"==A[4]?"50%"==A[5]?p.setAttribute("checked","checked"):(I=parseInt(A[5]),B.value=I,n.setAttribute("checked","checked"),u.style.visibility="visible"):l.setAttribute("checked","checked")):m=null}else m=null}catch(Q){}c.style=e+(m?m:t());c.vertex=!0;N.addCell(c,null,null,null,null);N.selectAll();N.addListener(mxEvent.CELLS_MOVED,E);N.addListener(mxEvent.CELLS_RESIZED,E);var F=N.graphHandler.mouseUp,J=N.graphHandler.mouseDown;N.graphHandler.mouseUp=function(){F.apply(this,arguments);-M.style.backgroundColor="#fff9"};N.graphHandler.mouseDown=function(){J.apply(this,arguments);M.style.backgroundColor=""};N.dblClick=function(){};var L=N.getSelectionModel().changeSelection;N.getSelectionModel().changeSelection=function(){L.call(this,[c],[c])}};K.onerror=function(){K.onload=null;K.src=Editor.errorImage};K.setAttribute("src",f);K.style.maxWidth="300px";K.style.maxHeight="300px";C.appendChild(K);x.appendChild(C);var M=document.createElement("div");M.style.width="300px";M.style.height=-"300px";M.style.overflow="hidden";M.style.backgroundColor="#fff9";x.appendChild(M);var N=null,P=new mxGeometry(100,100,100,100),I=5,c=new mxCell("",P.clone(),""),e="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",l=document.createElement("input");l.setAttribute("type","radio");l.setAttribute("id","croppingRect");l.setAttribute("name","croppingShape");l.setAttribute("checked","checked");l.style.margin="5px";x.appendChild(l);f=document.createElement("label");-f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));x.appendChild(f);var n=document.createElement("input");n.setAttribute("type","radio");n.setAttribute("id","croppingRounded");n.setAttribute("name","croppingShape");n.style.margin="5px";x.appendChild(n);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));x.appendChild(f);var p=document.createElement("input");p.setAttribute("type","radio");p.setAttribute("id",-"croppingEllipse");p.setAttribute("name","croppingShape");p.style.margin="5px";x.appendChild(p);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));x.appendChild(f);mxEvent.addListener(l,"change",y);mxEvent.addListener(n,"change",y);mxEvent.addListener(p,"change",y);var u=document.createElement("div");u.style.textAlign="center";u.style.visibility="hidden";var B=document.createElement("input");B.setAttribute("type","range");B.setAttribute("min",-"1");B.setAttribute("max","49");B.setAttribute("value",I);B.setAttribute("title",mxResources.get("arcSize"));u.appendChild(B);x.appendChild(u);mxEvent.addListener(B,"change",function(){I=this.value;y(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";C=mxUtils.button(mxResources.get("apply"),function(){d(t(),c.geometry.width,c.geometry.height);b.hideDialog()});C.className="geBtn gePrimaryBtn";var D=mxUtils.button(mxResources.get("reset"),function(){d(null,-K.width,K.height);b.hideDialog()});D.className="geBtn";var G=document.createElement("div");G.style.marginTop="10px";G.style.textAlign="right";b.editor.cancelFirst?(G.appendChild(f),G.appendChild(D),G.appendChild(C)):(G.appendChild(D),G.appendChild(C),G.appendChild(f));x.appendChild(G);this.container=x},EditGeometryDialog=function(b,f){var m=b.editor.graph,d=1==f.length?m.getCellGeometry(f[0]):null,t=document.createElement("div"),y=document.createElement("table"),x=document.createElement("tbody"),-C=document.createElement("tr"),K=document.createElement("td"),M=document.createElement("td");y.style.paddingLeft="6px";mxUtils.write(K,mxResources.get("relative")+":");var N=document.createElement("input");N.setAttribute("type","checkbox");null!=d&&d.relative&&(N.setAttribute("checked","checked"),N.defaultChecked=!0);this.init=function(){N.focus()};M.appendChild(N);C.appendChild(K);C.appendChild(M);x.appendChild(C);C=document.createElement("tr");K=document.createElement("td");M=document.createElement("td");-mxUtils.write(K,mxResources.get("left")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.width="100px";P.value=null!=d?d.x:"";M.appendChild(P);C.appendChild(K);C.appendChild(M);x.appendChild(C);C=document.createElement("tr");K=document.createElement("td");M=document.createElement("td");mxUtils.write(K,mxResources.get("top")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.width="100px";I.value=null!=d?d.y:"";M.appendChild(I);C.appendChild(K);-C.appendChild(M);x.appendChild(C);C=document.createElement("tr");K=document.createElement("td");M=document.createElement("td");mxUtils.write(K,mxResources.get("dx")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width="100px";c.value=null!=d&&null!=d.offset?d.offset.x:"";M.appendChild(c);C.appendChild(K);C.appendChild(M);x.appendChild(C);C=document.createElement("tr");K=document.createElement("td");M=document.createElement("td");mxUtils.write(K,mxResources.get("dy")+-":");var e=document.createElement("input");e.setAttribute("type","text");e.style.width="100px";e.value=null!=d&&null!=d.offset?d.offset.y:"";M.appendChild(e);C.appendChild(K);C.appendChild(M);x.appendChild(C);C=document.createElement("tr");K=document.createElement("td");M=document.createElement("td");mxUtils.write(K,mxResources.get("width")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=d?d.width:"";M.appendChild(l);C.appendChild(K);C.appendChild(M);-x.appendChild(C);C=document.createElement("tr");K=document.createElement("td");M=document.createElement("td");mxUtils.write(K,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=d?d.height:"";M.appendChild(n);C.appendChild(K);C.appendChild(M);x.appendChild(C);C=document.createElement("tr");K=document.createElement("td");M=document.createElement("td");mxUtils.write(K,mxResources.get("rotation")+":");var p=document.createElement("input");-p.setAttribute("type","text");p.style.width="100px";p.value=1==f.length?mxUtils.getValue(m.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";M.appendChild(p);C.appendChild(K);C.appendChild(M);x.appendChild(C);y.appendChild(x);t.appendChild(y);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var u=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();m.getModel().beginUpdate();try{for(var B=0;B<f.length;B++){var D=m.getCellGeometry(f[B]);null!=-D&&(D=D.clone(),m.isCellMovable(f[B])&&(D.relative=N.checked,0<mxUtils.trim(P.value).length&&(D.x=Number(P.value)),0<mxUtils.trim(I.value).length&&(D.y=Number(I.value)),0<mxUtils.trim(c.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.x=Number(c.value)),0<mxUtils.trim(e.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.y=Number(e.value))),m.isCellResizable(f[B])&&(0<mxUtils.trim(l.value).length&&(D.width=Number(l.value)),0<mxUtils.trim(n.value).length&&(D.height=Number(n.value))),-m.getModel().setGeometry(f[B],D));0<mxUtils.trim(p.value).length&&m.setCellStyles(mxConstants.STYLE_ROTATION,Number(p.value),[f[B]])}}finally{m.getModel().endUpdate()}});u.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",function(B){13==B.keyCode&&u.click()});y=document.createElement("div");y.style.marginTop="20px";y.style.textAlign="right";b.editor.cancelFirst?(y.appendChild(d),y.appendChild(u)):(y.appendChild(u),y.appendChild(d));t.appendChild(y);this.container=t},LibraryDialog=function(b,-f,m,d,t,y,x){function C(O){for(O=document.elementFromPoint(O.clientX,O.clientY);null!=O&&O.parentNode!=e;)O=O.parentNode;var S=null;if(null!=O){var k=e.firstChild;for(S=0;null!=k&&k!=O;)k=k.nextSibling,S++}return S}function K(O,S,k,v,z,A,H,R,g){try{if(b.spinner.stop(),null==S||"image/"==S.substring(0,6))if(null==O&&null!=H||null==n[O]){var q=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?-Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};e.style.backgroundImage="";l.style.display="none";var F=z,J=A;if(z>b.maxImageSize||A>b.maxImageSize){var L=Math.min(1,Math.min(b.maxImageSize/Math.max(1,z)),b.maxImageSize/Math.max(1,A));z*=L;A*=L}F>J?(J=Math.round(100*J/F),F=100):(F=Math.round(100*F/J),J=100);var Q=document.createElement("div");Q.setAttribute("draggable","true");Q.style.display="inline-block";Q.style.position="relative";Q.style.padding=-"0 12px";Q.style.cursor="move";mxUtils.setPrefixedStyle(Q.style,"transition","transform .1s ease-in-out");if(null!=O){var U=document.createElement("img");U.setAttribute("src",D.convert(O));U.style.width=F+"px";U.style.height=J+"px";U.style.margin="10px";U.style.paddingBottom=Math.floor((100-J)/2)+"px";U.style.paddingLeft=Math.floor((100-F)/2)+"px";Q.appendChild(U)}else if(null!=H){var V=b.stringToCells("<"==H.xml.charAt(0)?H.xml:Graph.decompress(H.xml));0<V.length&&(b.sidebar.createThumb(V,100,100,-Q,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),Q.firstChild.style.display="inline-block",Q.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(da){mxEvent.consume(da)});-(function(da,ma,aa){mxEvent.addListener(W,"click",function(ia){n[ma]=null;for(var ka=0;ka<P.length;ka++)if(null!=P[ka].data&&P[ka].data==ma||null!=P[ka].xml&&null!=aa&&P[ka].xml==aa.xml){P.splice(ka,1);break}Q.parentNode.removeChild(da);0==P.length&&(e.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.display="");mxEvent.consume(ia)});mxEvent.addListener(W,"dblclick",function(ia){mxEvent.consume(ia)})})(Q,O,H);Q.appendChild(W);Q.style.marginBottom="30px";var X=document.createElement("div");-X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign="center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=O?(Z={data:O,w:z,h:A,title:g},null!=R&&(Z.aspect=R),n[O]=U,P.push(Z)):null!=H&&(H.aspect="fixed",P.push(H),Z=H);mxEvent.addListener(X,"keydown",function(da){13==da.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(da))});-q();Q.appendChild(X);mxEvent.addListener(X,"mousedown",function(da){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(da)});V=function(da){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ma=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(aa){null!=aa&&(Z.title=aa,q())},mxResources.get("enterValue"));b.showDialog(ma.container,300,80,!0,!0);ma.init();mxEvent.consume(da)}else if("true"!=X.getAttribute("contentEditable")){null!=-B&&(B(),B=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);B=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=X.innerHTML;q()};mxEvent.consume(da)}};mxEvent.addListener(X,"click",V);mxEvent.addListener(Q,"dblclick",V);e.appendChild(Q);-mxEvent.addListener(Q,"dragstart",function(da){null==B&&(null==O&&null!=H&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=H.xml&&da.dataTransfer.setData("Text",H.xml),p=C(da),mxClient.IS_GC&&(Q.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(Q,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(Q,"dragend",function(da){"hidden"==W.style.visibility&&(W.style.visibility=-"",X.style.visibility="");p=null;mxUtils.setOpacity(Q,100);mxUtils.setPrefixedStyle(Q.style,"transform",null)})}else G||(G=!0,b.handleError({message:mxResources.get("fileExists")}));else{z=!1;try{if(F=mxUtils.parseXml(O),"mxlibrary"==F.documentElement.nodeName){J=JSON.parse(mxUtils.getTextContent(F.documentElement));if(null!=J&&0<J.length)for(var Y=0;Y<J.length;Y++)null!=J[Y].xml?K(null,null,0,0,0,0,J[Y]):K(J[Y].data,null,0,0,J[Y].w,J[Y].h,null,"fixed",J[Y].title);z=!0}else if("mxfile"==F.documentElement.nodeName){var ba=-F.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=Editor.getDiagramNodeXml(ba[Y]);V=b.stringToCells(ea);if(0<V.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(V);null!=ca&&K(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}z=!0}}catch(da){null!=window.console&&console.error("Error in library dialog: "+da)}z||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){null!=window.console&&console.log("Error in library dialog: "+-da)}return null}function M(O){O.dataTransfer.dropEffect=null!=p?"move":"copy";O.stopPropagation();O.preventDefault()}function N(O){O.stopPropagation();O.preventDefault();G=!1;u=C(O);if(null!=p)null!=u&&u<e.children.length?(P.splice(u>p?u-1:u,0,P.splice(p,1)[0]),e.insertBefore(e.children[p],e.children[u])):(P.push(P.splice(p,1)[0]),e.appendChild(e.children[p]));else if(0<O.dataTransfer.files.length)b.importFiles(O.dataTransfer.files,0,0,b.maxImageSize,E(O));else if(0<=mxUtils.indexOf(O.dataTransfer.types,-"text/uri-list")){var S=decodeURIComponent(O.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(S)||/(\.png)($|\?)/i.test(S)||/(\.gif)($|\?)/i.test(S)||/(\.svg)($|\?)/i.test(S))&&b.loadImage(S,function(k){K(S,null,0,0,k.width,k.height);e.scrollTop=e.scrollHeight})}O.stopPropagation();O.preventDefault()}var P=[];m=document.createElement("div");m.style.height="100%";var I=document.createElement("div");I.style.whiteSpace="nowrap";I.style.height="40px";m.appendChild(I);mxUtils.write(I,mxResources.get("filename")+-":");null==f&&(f=b.defaultLibraryName+".xml");var c=document.createElement("input");c.setAttribute("value",f);c.style.marginRight="20px";c.style.marginLeft="10px";c.style.width="500px";null==t||t.isRenamable()||c.setAttribute("disabled","true");this.init=function(){if(null==t||t.isRenamable())c.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)};I.appendChild(c);Editor.enableUncompressedLibraries&&(c.style.width="420px",f=document.createElement("input"),-f.setAttribute("type","checkbox"),f.style.marginRight="10px",I.appendChild(f),mxUtils.write(I,mxResources.get("compressed")));var e=document.createElement("div");e.style.borderWidth="1px 0px 1px 0px";e.style.borderColor="#d3d3d3";e.style.borderStyle="solid";e.style.marginTop="6px";e.style.overflow="auto";e.style.height="340px";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";0==P.length&&Graph.fileSupport&&(e.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");-var l=document.createElement("div");l.style.position="absolute";l.style.width="640px";l.style.top="260px";l.style.textAlign="center";l.style.fontSize="22px";l.style.color="#a0c3ff";mxUtils.write(l,mxResources.get("dragImagesHere"));m.appendChild(l);var n={},p=null,u=null,B=null;I=function(O){"true"!=mxEvent.getSource(O).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(O))};mxEvent.addListener(e,"mousedown",I);mxEvent.addListener(e,"pointerdown",I);mxEvent.addListener(e,"touchstart",-I);var D=new mxUrlConverter,G=!1;if(null!=d)for(I=0;I<d.length;I++)f=d[I],K(f.data,null,0,0,f.w,f.h,f,f.aspect,f.title);mxEvent.addListener(e,"dragleave",function(O){l.style.cursor="";for(var S=mxEvent.getSource(O);null!=S;){if(S==e||S==l){O.stopPropagation();O.preventDefault();break}S=S.parentNode}});var E=function(O){return function(S,k,v,z,A,H,R,g,q){null!=q&&EditorUi.isVisioFilename(q.name)?b.importVisio(q,mxUtils.bind(this,function(F){K(F,k,v,z,A,H,R,"fixed",mxEvent.isAltDown(O)?null:R.substring(0,-R.lastIndexOf(".")).replace(/_/g," "))})):null!=q&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(S,q.name)?b.isExternalDataComms()?b.parseFile(q,mxUtils.bind(this,function(F){4==F.readyState&&(b.spinner.stop(),200<=F.status&&299>=F.status&&(K(F.responseText,k,v,z,A,H,R,"fixed",mxEvent.isAltDown(O)?null:R.substring(0,R.lastIndexOf(".")).replace(/_/g," ")),e.scrollTop=e.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(K(S,k,v,z,A,H,R,"fixed",-mxEvent.isAltDown(O)?null:R.substring(0,R.lastIndexOf(".")).replace(/_/g," ")),e.scrollTop=e.scrollHeight)}};mxEvent.addListener(e,"dragover",M);mxEvent.addListener(e,"drop",N);mxEvent.addListener(l,"dragover",M);mxEvent.addListener(l,"drop",N);m.appendChild(e);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";I=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});I.setAttribute("id","btnCancel");I.className="geBtn";b.editor.cancelFirst&&d.appendChild(I);-"draw.io"!=b.getServiceName()||null==t||t.constructor!=DriveLibrary&&t.constructor!=GitHubLibrary||(f=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(t,function(O){if(null!=O){var S=b.getSearch("create title mode url drive splash state clibs ui".split(" "));S+=(0==S.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(O);O=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+S,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(O.container,-450,240,!0);O.init()}else t.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(t.getId(),t)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),f.className="geBtn",d.appendChild(f));f=mxUtils.button(mxResources.get("export"),function(){var O=b.createLibraryDataFromImages(P),S=c.value;/(\.xml)$/i.test(S)||-(S+=".xml");b.isLocalFileSave()?b.saveLocalFile(O,S,"text/xml",null,null,null!=x?x:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(S)+"&format=xml&xml="+encodeURIComponent(O))).simulate(document,"_blank")});f.setAttribute("id","btnDownload");f.className="geBtn";d.appendChild(f);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var T=document.createElement("input");T.setAttribute("multiple","multiple");T.setAttribute("type","file");mxEvent.addListener(T,"change",function(O){G=-!1;b.importFiles(T.files,0,0,b.maxImageSize,function(S,k,v,z,A,H,R,g,q){null!=T.files&&(E(O)(S,k,v,z,A,H,R,g,q),T.type="",T.type="file",T.value="")});e.scrollTop=e.scrollHeight});T.style.display="none";document.body.appendChild(T);b.libDlgFileInputElt=T}f=mxUtils.button(mxResources.get("import"),function(){null!=B&&(B(),B=null);b.libDlgFileInputElt.click()});f.setAttribute("id","btnAddImage");f.className="geBtn";d.appendChild(f)}f=mxUtils.button(mxResources.get("addImages"),function(){null!=B&&(B(),-B=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(O,S,k){G=!1;if(null!=O){if("data:image/"==O.substring(0,11)){var v=O.indexOf(",");0<v&&(O=O.substring(0,v)+";base64,"+O.substring(v+1))}K(O,null,0,0,S,k);e.scrollTop=e.scrollHeight}})});f.setAttribute("id","btnAddImageUrl");f.className="geBtn";d.appendChild(f);this.saveBtnClickHandler=function(O,S,k,v){b.saveLibrary(O,S,k,v)};f=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=B&&(B(),B=null);this.saveBtnClickHandler(c.value,-P,t,y)}));f.setAttribute("id","btnSave");f.className="geBtn gePrimaryBtn";d.appendChild(f);b.editor.cancelFirst||d.appendChild(I);m.appendChild(d);this.container=m},EditShapeDialog=function(b,f,m,d,t){d=null!=d?d:300;t=null!=t?t:120;var y=document.createElement("table"),x=document.createElement("tbody");y.style.cellPadding="4px";var C=document.createElement("tr");var K=document.createElement("td");K.setAttribute("colspan","2");K.style.fontSize="10pt";mxUtils.write(K,m);C.appendChild(K);x.appendChild(C);-C=document.createElement("tr");K=document.createElement("td");var M=document.createElement("textarea");M.style.outline="none";M.style.resize="none";M.style.width=d-200+"px";M.style.height=t+"px";this.textarea=M;this.init=function(){M.focus();M.scrollTop=0};K.appendChild(M);C.appendChild(K);K=document.createElement("td");m=document.createElement("div");m.style.position="relative";m.style.border="1px solid gray";m.style.top="6px";m.style.width="200px";m.style.height=t+4+"px";m.style.overflow="hidden";-m.style.marginBottom="16px";mxEvent.disableContextMenu(m);K.appendChild(m);var N=new Graph(m);N.setEnabled(!1);var P=b.editor.graph.cloneCell(f);N.addCells([P]);m=N.view.getState(P);var I="";null!=m.shape&&null!=m.shape.stencil&&(I=mxUtils.getPrettyXml(m.shape.stencil.desc));mxUtils.write(M,I||"");m=N.getGraphBounds();t=Math.min(160/m.width,(t-40)/m.height);N.view.scaleAndTranslate(t,20/t-m.x,20/t-m.y);C.appendChild(K);x.appendChild(C);C=document.createElement("tr");K=document.createElement("td");-K.setAttribute("colspan","2");K.style.paddingTop="2px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");b.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),t.className="geBtn",K.appendChild(t));t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&K.appendChild(t);var c=function(e,l,n){var p=M.value,u=mxUtils.parseXml(p);p=mxUtils.getPrettyXml(u.documentElement);-u=u.documentElement.getElementsByTagName("parsererror");if(null!=u&&0<u.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(n&&b.hideDialog(),u=!e.model.contains(l),!n||u||p!=I){p=Graph.compress(p);e.getModel().beginUpdate();try{if(u){var B=b.editor.graph.getFreeInsertPoint();l.geometry.x=B.x;l.geometry.y=B.y;e.addCell(l)}e.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+p+")",[l])}catch(D){throw D;}finally{e.getModel().endUpdate()}u&&-(e.setSelectionCell(l),e.scrollCellToVisible(l))}};m=mxUtils.button(mxResources.get("preview"),function(){c(N,P,!1)});m.className="geBtn";K.appendChild(m);m=mxUtils.button(mxResources.get("apply"),function(){c(b.editor.graph,f,!0)});m.className="geBtn gePrimaryBtn";K.appendChild(m);b.editor.cancelFirst||K.appendChild(t);C.appendChild(K);x.appendChild(C);y.appendChild(x);this.container=y},CustomDialog=function(b,f,m,d,t,y,x,C,K,M,N,P){var I=document.createElement("div");I.appendChild(f);var c=document.createElement("div");-c.style.marginTop=null!=P?P:"30px";c.style.textAlign="right";null!=x&&c.appendChild(x);b.isOffline()||null==y||c.appendChild(b.createHelpIcon(y));f=mxUtils.button(K||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";C&&(f.style.display="none");b.editor.cancelFirst&&c.appendChild(f);t=mxUtils.button(t||mxResources.get("ok"),mxUtils.bind(this,function(){M||b.hideDialog(null,null,this.container);if(null!=m){var e=m();if("string"===typeof e){b.showError(mxResources.get("error"),-e);return}}M&&b.hideDialog(null,null,this.container)}));c.appendChild(t);t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||c.appendChild(f);if(null!=N)for(C=0;C<N.length;C++)(function(e,l,n){e=mxUtils.button(e,function(p){l(p)});null!=n&&e.setAttribute("title",n);e.className="geBtn";c.appendChild(e)})(N[C][0],N[C][1],N[C][2]);I.appendChild(c);this.cancelBtn=f;this.okButton=t;this.container=I},BtnDialog=function(b,f,m,d){var t=document.createElement("div");t.style.textAlign="center";var y=document.createElement("p");-y.style.fontSize="16pt";y.style.padding="0px";y.style.margin="0px";y.style.color="gray";mxUtils.write(y,mxResources.get("done"));var x="Unknown",C=document.createElement("img");C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.marginRight="10px";f==b.drive?(x=mxResources.get("googleDrive"),C.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(x=mxResources.get("dropbox"),C.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(x=mxResources.get("oneDrive"),C.src=-IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(x=mxResources.get("github"),C.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(x=mxResources.get("gitlab"),C.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(x=mxResources.get("trello"),C.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[x],"You are now authorized in {1}"));m=mxUtils.button(m,d);m.insertBefore(C,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";-m.style.fontSize="18px";m.style.padding="14px";t.appendChild(y);t.appendChild(b);t.appendChild(m);this.container=t},FontDialog=function(b,f,m,d,t){function y(B){this.style.border="";13==B.keyCode&&u.click()}var x=document.createElement("table"),C=document.createElement("tbody");x.style.marginTop="8px";var K=document.createElement("tr");var M=document.createElement("td");M.colSpan=2;M.style.whiteSpace="nowrap";M.style.fontSize="10pt";M.style.fontWeight="bold";var N=document.createElement("input");-N.style.cssText="margin-right:8px;margin-bottom:8px;";N.setAttribute("value","sysfonts");N.setAttribute("type","radio");N.setAttribute("name","current-fontdialog");N.setAttribute("id","fontdialog-sysfonts");M.appendChild(N);var P=document.createElement("label");P.setAttribute("for","fontdialog-sysfonts");mxUtils.write(P,mxResources.get("sysFonts",null,"System Fonts"));M.appendChild(P);K.appendChild(M);C.appendChild(K);K=document.createElement("tr");M=document.createElement("td");M.style.whiteSpace=-"nowrap";M.style.fontSize="10pt";M.style.width="120px";M.style.paddingLeft="15px";mxUtils.write(M,mxResources.get("fontname",null,"Font Name")+":");K.appendChild(M);var I=document.createElement("input");"s"==d&&I.setAttribute("value",f);I.style.marginLeft="4px";I.style.width="250px";I.className="dlg_fontName_s";M=document.createElement("td");M.appendChild(I);K.appendChild(M);C.appendChild(K);K=document.createElement("tr");M=document.createElement("td");M.colSpan=2;M.style.whiteSpace="nowrap";M.style.fontSize=-"10pt";M.style.fontWeight="bold";var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","googlefonts");c.setAttribute("type","radio");c.setAttribute("name","current-fontdialog");c.setAttribute("id","fontdialog-googlefonts");M.appendChild(c);P=document.createElement("label");P.setAttribute("for","fontdialog-googlefonts");mxUtils.write(P,mxResources.get("googleFonts",null,"Google Fonts"));M.appendChild(P);if(!b.isOffline()||EditorUi.isElectronApp)P=-b.createHelpIcon("https://fonts.google.com/"),M.appendChild(P);K.appendChild(M);"0"!=urlParams.isGoogleFontsEnabled&&C.appendChild(K);K=document.createElement("tr");M=document.createElement("td");M.style.whiteSpace="nowrap";M.style.fontSize="10pt";M.style.width="120px";M.style.paddingLeft="15px";mxUtils.write(M,mxResources.get("fontname",null,"Font Name")+":");K.appendChild(M);var e=document.createElement("input");"g"==d&&e.setAttribute("value",f);e.style.marginLeft="4px";e.style.width="250px";e.className=-"dlg_fontName_g";M=document.createElement("td");M.appendChild(e);K.appendChild(M);"0"!=urlParams.isGoogleFontsEnabled&&C.appendChild(K);K=document.createElement("tr");M=document.createElement("td");M.colSpan=2;M.style.whiteSpace="nowrap";M.style.fontSize="10pt";M.style.fontWeight="bold";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","webfonts");l.setAttribute("type","radio");l.setAttribute("name","current-fontdialog");l.setAttribute("id",-"fontdialog-webfonts");M.appendChild(l);P=document.createElement("label");P.setAttribute("for","fontdialog-webfonts");mxUtils.write(P,mxResources.get("webfonts",null,"Web Fonts"));M.appendChild(P);K.appendChild(M);Editor.enableWebFonts&&C.appendChild(K);K=document.createElement("tr");M=document.createElement("td");M.style.whiteSpace="nowrap";M.style.fontSize="10pt";M.style.width="120px";M.style.paddingLeft="15px";mxUtils.write(M,mxResources.get("fontname",null,"Font Name")+":");K.appendChild(M);var n=-document.createElement("input");"w"==d&&(Editor.enableWebFonts?n.setAttribute("value",f):I.setAttribute("value",f));n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_w";M=document.createElement("td");M.appendChild(n);K.appendChild(M);Editor.enableWebFonts&&C.appendChild(K);K=document.createElement("tr");M=document.createElement("td");M.style.whiteSpace="nowrap";M.style.fontSize="10pt";M.style.width="120px";M.style.paddingLeft="15px";mxUtils.write(M,mxResources.get("fontUrl",-null,"Font URL")+":");K.appendChild(M);var p=document.createElement("input");p.setAttribute("value",m||"");p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontUrl";M=document.createElement("td");M.appendChild(p);K.appendChild(M);Editor.enableWebFonts&&C.appendChild(K);this.init=function(){var B=I;"g"==d?B=e:"w"==d&&Editor.enableWebFonts&&(B=n);B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null)};K=document.createElement("tr");-M=document.createElement("td");M.colSpan=2;M.style.paddingTop="20px";M.style.whiteSpace="nowrap";M.setAttribute("align","right");b.isOffline()||M.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();t()});f.className="geBtn";b.editor.cancelFirst&&M.appendChild(f);var u=mxUtils.button(mxResources.get("apply"),function(){if(N.checked){var B=I.value;var D="s"}else if(c.checked){B=e.value;var G=Editor.GOOGLE_FONTS+-encodeURIComponent(B).replace(/%20/g,"+");D="g"}else l.checked&&(B=n.value,G=p.value,D="w");var E=B;var T=G,O=D,S=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,k=x.querySelector(".dlg_fontName_"+O);null==k||null!=E&&0!=E.length?(k=x.querySelector(".dlg_fontUrl"),null==k||"w"!=O||S.test(T)?E=!0:(k.style.border="1px solid red",E=!1)):(k.style.border="1px solid red",E=!1);E&&(t(B,G,D),b.hideDialog())});u.className="geBtn gePrimaryBtn";mxEvent.addListener(I,"keypress",-y);mxEvent.addListener(e,"keypress",y);mxEvent.addListener(n,"keypress",y);mxEvent.addListener(p,"keypress",y);mxEvent.addListener(I,"focus",function(){N.setAttribute("checked","checked");N.checked=!0});mxEvent.addListener(e,"focus",function(){c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(n,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(p,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});M.appendChild(u);b.editor.cancelFirst||-M.appendChild(f);K.appendChild(M);C.appendChild(K);x.appendChild(C);this.container=x};-function AspectDialog(b,f,m,d,t){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:m||[]};f=document.createElement("div");var y=document.createElement("h5");y.style.margin="0 0 10px";mxUtils.write(y,mxResources.get("pages"));f.appendChild(y);m=document.createElement("div");m.className="geAspectDlgList";f.appendChild(m);y=document.createElement("h5");y.style.margin="0 0 10px";mxUtils.write(y,mxResources.get("layers"));f.appendChild(y);y=document.createElement("div");y.className="geAspectDlgList";-f.appendChild(y);this.pagesContainer=m;this.layersContainer=y;this.ui=b;m=document.createElement("div");m.style.marginTop="16px";m.style.textAlign="center";y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=t&&t()});y.className="geBtn";b.editor.cancelFirst&&m.appendChild(y);var x=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));m.appendChild(x);x.className="geBtn gePrimaryBtn";-b.editor.cancelFirst||m.appendChild(y);x.setAttribute("disabled","disabled");this.okBtn=x;f.appendChild(m);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};-AspectDialog.prototype.createViewer=function(b,f,m,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var t=new Graph(b);t.setTooltips(!1);t.setEnabled(!1);t.setPanning(!1);t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;f="mxGraphModel"==f.nodeName?f:Editor.parseDiagramNode(f);if(null!=f){var y=f.getAttribute("background");if(null==y||""==y||y==mxConstants.NONE)y=null!=d?d:"#ffffff";b.style.backgroundColor=y;d=new mxCodec(f.ownerDocument);b=t.getModel();d.decode(f,b);f=b.getChildCount(b.root);-d=null==m;for(y=0;y<f;y++){var x=b.getChildAt(b.root,y);b.setVisible(x,d||m==x.id)}t.maxFitScale=1;t.fit(0);t.center()}return t};-AspectDialog.prototype.createPageItem=function(b,f,m){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(d);var t=this.createViewer(d.childNodes[0],m);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;-this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var y=t.model;y=y.getChildCells(y.getRoot());for(var x=0;x<y.length;x++)this.createLayerItem(y[x],b,t,m)});mxEvent.addListener(d,"click",f);this.aspect.pageId==b&&f()};-AspectDialog.prototype.createLayerItem=function(b,f,m,d){f=m.convertValueToString(b)||mxResources.get("background")||"Background";var t=document.createElement("div");t.setAttribute("data-layer-id",b.id);t.className="geAspectDlgListItem";t.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(t);this.createViewer(t.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=t.className.indexOf("geAspectDlgListItemSelected")?-(t.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(t.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(t,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};-var FilePropertiesDialog=function(b,f){function m(D){var G=M;M=function(E,T){try{D(function(){G(E,T)},T)}catch(O){T(O)}}}var d=document.createElement("table"),t=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var y=b.getCurrentFile(),x=null!=y&&null!=y.getTitle()?y.getTitle():b.defaultFilename,C=/(\.png)$/i.test(x),K=/(\.svg)$/i.test(x),M=function(D,G){D()},N=null!=y?y.isLocked():!1;var P=document.createElement("tr");var I=document.createElement("td");-I.style.whiteSpace="nowrap";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.style.fontSize="10pt";mxUtils.write(I,mxResources.get("locked")+":");P.appendChild(I);var c=document.createElement("input");c.setAttribute("type","checkbox");N&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);I=document.createElement("td");I.style.whiteSpace="nowrap";I.appendChild(c);P.appendChild(I);t.appendChild(P);this.init=function(){c.focus()};m(function(D,G){null!=b.fileNode&&N!=c.checked?window.setTimeout(function(){null!=-y&&y.setLocked(c.checked);D()},0):D()});if(C||K){x=1;C=0;P=b.fileNode;null!=P&&(P.hasAttribute("scale")&&(x=parseFloat(P.getAttribute("scale"))),P.hasAttribute("border")&&(C=parseInt(P.getAttribute("border"))));P=document.createElement("tr");I=document.createElement("td");I.style.whiteSpace="nowrap";I.style.fontSize="10pt";mxUtils.write(I,mxResources.get("zoom")+":");P.appendChild(I);var e=document.createElement("input");e.setAttribute("value",100*x+"%");e.style.marginLeft="4px";e.style.width="100%";-I=document.createElement("td");I.style.whiteSpace="nowrap";I.appendChild(e);P.appendChild(I);t.appendChild(P);P=document.createElement("tr");I=document.createElement("td");I.style.whiteSpace="nowrap";I.style.fontSize="10pt";mxUtils.write(I,mxResources.get("borderWidth")+":");P.appendChild(I);var l=document.createElement("input");l.setAttribute("value",C);l.style.marginLeft="4px";l.style.width="100%";I=document.createElement("td");I.style.whiteSpace="nowrap";I.appendChild(l);P.appendChild(I);t.appendChild(P);-this.init=this.init||function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)};m(function(D,G){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(e.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(l.value))),null!=y&&y.fileChanged());D()})}else if(!/(\.html)$/i.test(x)&&!/(\.svg)$/i.test(x)){var n=null!=y?y.isCompressed():Editor.defaultCompressed;P=document.createElement("tr");I=document.createElement("td");-I.style.whiteSpace="nowrap";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.style.fontSize="10pt";mxUtils.write(I,mxResources.get("compressed")+":");P.appendChild(I);var p=document.createElement("input");p.setAttribute("type","checkbox");n&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);I=document.createElement("td");I.style.whiteSpace="nowrap";I.appendChild(p);P.appendChild(I);t.appendChild(P);this.init=this.init||function(){p.focus()};m(function(D,G){null!=b.fileNode&&n!=-p.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",p.checked?"true":"false");null!=y&&(y.compressionChanged(p.checked),y.fileChanged());D()},0):D()})}if(null!=y&&y.isRealtimeOptional()){P=document.createElement("tr");I=document.createElement("td");I.style.whiteSpace="nowrap";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.style.fontSize="10pt";mxUtils.write(I,mxResources.get("realtimeCollaboration")+":");P.appendChild(I);var u=document.createElement("input");u.setAttribute("type",-"checkbox");var B=y.isRealtimeEnabled();if(B="disabled"!=b.drive.getCustomProperty(y.desc,"collaboration"))u.setAttribute("checked","checked"),u.defaultChecked=!0;m(function(D,G){u.checked!=B?y.setRealtimeEnabled(u.checked,D,G):D()});this.init=null!=this.init?this.init:function(){u.focus()};I=document.createElement("td");I.style.whiteSpace="nowrap";I.appendChild(u);I.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));P.appendChild(I);t.appendChild(P)}null!=y&&-"draw.io"==b.getServiceName()&&0<y.getSize()&&"1"!=urlParams.embed&&(P=document.createElement("tr"),I=document.createElement("td"),I.style.whiteSpace="nowrap",I.style.overflow="hidden",I.style.textOverflow="ellipsis",I.style.fontSize="10pt",mxUtils.write(I,mxResources.get("size")+":"),P.appendChild(I),I=b.formatFileSize(y.getSize()),x=document.createElement("input"),x.setAttribute("title",I),x.setAttribute("value",I),x.setAttribute("disabled","disabled"),x.style.marginLeft="4px",x.style.width="100%",-I=document.createElement("td"),I.style.whiteSpace="nowrap",I.appendChild(x),P.appendChild(I),t.appendChild(P));null!=f&&(P=document.createElement("tr"),I=document.createElement("td"),I.style.whiteSpace="nowrap",I.style.overflow="hidden",I.style.textOverflow="ellipsis",I.style.fontSize="10pt",mxUtils.write(I,mxResources.get("publicDiagramUrl")+":"),P.appendChild(I),x=document.createElement("a"),x.setAttribute("href",f),x.setAttribute("title",f),x.style.whiteSpace="nowrap",x.style.overflow="hidden",-x.style.textOverflow="ellipsis",x.style.display="block",x.style.margin="2px 0px 2px 8px",x.style.fontSize="10pt",mxUtils.write(x,f),mxEvent.addListener(x,"click",function(D){b.openLink(f);mxEvent.consume(D)}),I=document.createElement("td"),I.appendChild(x),P.appendChild(I),t.appendChild(P));null!=y&&null!=y.fileObject&&null!=y.fileObject.path&&(P=document.createElement("tr"),I=document.createElement("td"),I.style.whiteSpace="nowrap",I.style.overflow="hidden",I.style.textOverflow="ellipsis",I.style.fontSize=-"10pt",mxUtils.write(I,mxResources.get("pathFilename")+":"),P.appendChild(I),x=document.createElement("input"),x.setAttribute("title",y.fileObject.path),x.setAttribute("value",y.fileObject.path),x.setAttribute("disabled","disabled"),x.style.marginLeft="4px",x.style.width="100%",I=document.createElement("td"),I.appendChild(x),P.appendChild(I),t.appendChild(P));this.init=null!=this.init?this.init:function(){};x=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&-M(function(){b.spinner.stop();b.hideDialog()},function(D){b.spinner.stop();b.handleError(D,mxResources.get("error"))})});x.className="geBtn gePrimaryBtn";P=document.createElement("tr");I=document.createElement("td");I.colSpan=2;I.style.paddingTop="20px";I.style.whiteSpace="nowrap";I.setAttribute("align","right");C=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});C.className="geBtn";b.editor.cancelFirst&&I.appendChild(C);I.appendChild(x);b.editor.cancelFirst||I.appendChild(C);P.appendChild(I);-t.appendChild(P);d.appendChild(t);this.container=d},ConnectionPointsDialog=function(b,f){function m(){null!=t&&t.destroy()}var d=document.createElement("div");d.style.userSelect="none";var t=null;this.init=function(){function y(z,A,H){z=new mxCell("",new mxGeometry(z,A,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");z.vertex=!0;z.cp=!0;z.constObj=H;return P.addCell(z)}function x(z){z=P.getSelectionCells();P.deleteCells(z)}-function C(){var z=parseInt(O.value)||0;z=0>z?0:100<z?100:z;O.value=z;var A=parseInt(k.value)||0;A=0>A?0:100<A?100:A;k.value=A;var H=parseInt(S.value)||0,R=parseInt(v.value)||0;H=new mxConnectionConstraint(new mxPoint(z/100,A/100),!1,null,H,R);z=P.getConnectionPoint(e,H);A=P.getSelectionCell();if(null!=A){A.constObj=H;H=A.geometry.clone();R=P.view.scale;var g=P.view.translate;H.x=(z.x-3*R)/R-g.x;H.y=(z.y-3*R)/R-g.y;P.model.setGeometry(A,H)}}function K(z){if(z.constObj)return{x:z.constObj.point.x,-y:z.constObj.point.y,dx:z.constObj.dx,dy:z.constObj.dy};var A=0,H=0,R=I.geometry,g=mxUtils.format((z.geometry.x+3-R.x)/R.width);z=mxUtils.format((z.geometry.y+3-R.y)/R.height);0>g?(A=g*R.width,g=0):1<g&&(A=(g-1)*R.width,g=1);0>z?(H=z*R.height,z=0):1<z&&(H=(z-1)*R.height,z=1);return{x:g,y:z,dx:parseInt(A),dy:parseInt(H)}}function M(z){if(1==P.getSelectionCount()){var A=P.getSelectionCell();z&&(A.constObj=null);z=K(A);O.value=100*z.x;k.value=100*z.y;S.value=z.dx;v.value=z.dy;T.style.visibility=""}else T.style.visibility=-"hidden"}var N=document.createElement("div");N.style.width="350px";N.style.height="350px";N.style.overflow="hidden";N.style.border="1px solid lightGray";N.style.boxSizing="border-box";mxEvent.disableContextMenu(N);d.appendChild(N);var P=new Graph(N);P.transparentBackground=!1;P.autoExtend=!1;P.autoScroll=!1;P.setGridEnabled(!1);P.setEnabled(!0);P.setPanning(!0);P.setConnectable(!1);P.setTooltips(!1);P.minFitScale=null;P.maxFitScale=null;P.centerZoom=!0;P.maxFitScale=2;N=f.geometry;var I=new mxCell(f.value,-new mxGeometry(0,0,N.width,N.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");I.vertex=!0;P.addCell(I);P.dblClick=function(z,A){if(null!=A&&A!=I)P.setSelectionCell(A);else{A=mxUtils.convertPoint(P.container,mxEvent.getClientX(z),mxEvent.getClientY(z));mxEvent.consume(z);z=P.view.scale;var H=P.view.translate;P.setSelectionCell(y((A.x-3*z)/z-H.x,(A.y-3*z)/z-H.y))}};t=new mxKeyHandler(P);t.bindKey(46,x);t.bindKey(8,x);P.getRubberband().isForceRubberbandEvent=-function(z){return 0==z.evt.button&&(null==z.getCell()||z.getCell()==I)};P.panningHandler.isForcePanningEvent=function(z){return 2==z.evt.button};var c=P.isCellSelectable;P.isCellSelectable=function(z){return z==I?!1:c.apply(this,arguments)};P.getLinkForCell=function(){return null};var e=P.view.getState(I);N=P.getAllConnectionConstraints(e);for(var l=0;null!=N&&l<N.length;l++){var n=P.getConnectionPoint(e,N[l]);y(n.x-3,n.y-3,N[l])}P.fit(8);P.center();l=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),-function(){P.zoomIn()},20);n=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){P.zoomOut()},20);var p=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==P.view.scale?(P.maxFitScale=8,P.fit(8)):P.zoomActual();P.center()},20),u=function(){b.prompt(mxResources.get("gridSize"),P.gridSize,function(z){!isNaN(z)&&0<z&&(P.setGridSize(z),P.setGridEnabled(!0),P.refresh())})},B=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(z){mxEvent.isShiftDown(z)?-u():(P.setGridEnabled(!P.isGridEnabled()),P.refresh())},20);mxEvent.addListener(B,"dblclick",u);var D=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),x,20);mxUtils.setOpacity(D,10);N=document.createElement("div");N.style.display="flex";N.style.alignItems="center";N.style.paddingTop="6px";N.appendChild(l);N.appendChild(n);N.appendChild(p);N.appendChild(B);N.appendChild(D);d.appendChild(N);var G=document.createElement("input");G.setAttribute("type","number");G.setAttribute("min","1");-G.setAttribute("value","1");G.style.width="45px";G.style.position="relative";G.style.margin="0 4px 0 4px";var E=document.createElement("select");E.style.position="relative";n=["left","right","top","bottom"];for(l=0;l<n.length;l++)p=n[l],B=document.createElement("option"),mxUtils.write(B,mxResources.get(p)),B.value=p,E.appendChild(B);l=mxUtils.button(mxResources.get("add"),function(){var z=parseInt(G.value);z=1>z?1:100<z?100:z;G.value=z;for(var A=E.value,H=I.geometry,R=[],g=0;g<z;g++){switch(A){case "left":var q=-H.x;var F=H.y+(g+1)*H.height/(z+1);break;case "right":q=H.x+H.width;F=H.y+(g+1)*H.height/(z+1);break;case "top":q=H.x+(g+1)*H.width/(z+1);F=H.y;break;case "bottom":q=H.x+(g+1)*H.width/(z+1),F=H.y+H.height}R.push(y(q-3,F-3))}P.setSelectionCells(R)});l.style.marginLeft="auto";N.appendChild(l);N.appendChild(G);N.appendChild(E);var T=document.createElement("div");T.style.margin="4px 0px 8px 0px";T.style.whiteSpace="nowrap";T.style.height="24px";N=document.createElement("span");mxUtils.write(N,mxResources.get("dx"));-T.appendChild(N);var O=document.createElement("input");O.setAttribute("type","number");O.setAttribute("min","0");O.setAttribute("max","100");O.style.width="45px";O.style.margin="0 4px 0 4px";T.appendChild(O);mxUtils.write(T,"%");var S=document.createElement("input");S.setAttribute("type","number");S.style.width="45px";S.style.margin="0 4px 0 4px";T.appendChild(S);mxUtils.write(T,"pt");N=document.createElement("span");mxUtils.write(N,mxResources.get("dy"));N.style.marginLeft="12px";T.appendChild(N);-var k=document.createElement("input");k.setAttribute("type","number");k.setAttribute("min","0");k.setAttribute("max","100");k.style.width="45px";k.style.margin="0 4px 0 4px";T.appendChild(k);mxUtils.write(T,"%");var v=document.createElement("input");v.setAttribute("type","number");v.style.width="45px";v.style.margin="0 4px 0 4px";T.appendChild(v);mxUtils.write(T,"pt");d.appendChild(T);M();P.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<P.getSelectionCount()?mxUtils.setOpacity(D,60):-mxUtils.setOpacity(D,10);M()});P.addListener(mxEvent.CELLS_MOVED,M);mxEvent.addListener(O,"change",C);mxEvent.addListener(k,"change",C);mxEvent.addListener(S,"change",C);mxEvent.addListener(v,"change",C);N=mxUtils.button(mxResources.get("cancel"),function(){m();b.hideDialog()});N.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){var z=P.model.cells,A=[],H=[],R;for(R in z){var g=z[R];g.cp&&H.push(K(g))}H.sort(function(q,F){return q.x!=F.x?q.x-F.x:q.y!=F.y?q.y-F.y:q.dx!=F.dx?q.dx--F.dx:q.dy-F.dy});for(z=0;z<H.length;z++)0<z&&H[z].x==H[z-1].x&&H[z].y==H[z-1].y&&H[z].dx==H[z-1].dx&&H[z].dy==H[z-1].dy||A.push("["+H[z].x+","+H[z].y+",0,"+H[z].dx+","+H[z].dy+"]");b.editor.graph.setCellStyles("points","["+A.join(",")+"]",[f]);m();b.hideDialog()});l.className="geBtn gePrimaryBtn";n=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[f]);m();b.hideDialog()});n.className="geBtn";p=document.createElement("div");p.style.marginTop="10px";p.style.textAlign=-"right";b.isOffline()||p.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&p.appendChild(N);p.appendChild(n);p.appendChild(l);b.editor.cancelFirst||p.appendChild(N);d.appendChild(p)};this.destroy=m;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=+IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";g||D||!l||B.appendChild(H);l&&mxUtils.write(B,(D?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=+b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var T=document.createElement("input");T.setAttribute("value",b.defaultFilename+H);T.style.marginLeft="10px";T.style.width=g||D?"144px":"244px";this.init=function(){l&&Editor.selectFilename(T);null!=ua.parentNode&&null!=ua.parentNode.parentNode&&mxEvent.addGestureListeners(ua.parentNode.parentNode,mxUtils.bind(this,function(ka){null!=b.sidebar&&+b.sidebar.hideTooltip()}),null,null)};l&&(B.appendChild(T),t?T.style.width=g||D?"350px":"450px":null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,T,b.editor.diagramFileTypes),t.style.marginLeft="6px",t.style.width=g||D?"80px":"180px",B.appendChild(t)));t=!1;var k=0,v=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),G=mxUtils.button(p||mxResources.get("create"),function(){G.setAttribute("disabled",+"disabled");E();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";var I=document.createElement("img");I.setAttribute("src",Editor.magnifyImage);I.setAttribute("title",mxResources.get("preview"));I.className="geAdaptiveAsset geActiveButton";I.style.position="absolute";I.style.borderRadius="16px";I.style.background="white";I.style.cursor="default";I.style.padding="2px";I.style.opacity="0.8";I.style.height="16px";I.style.right="2px";I.style.top="2px";var M=!1,P=null,S=!1;if(N||c){var V=+[],W=null,X=null,Z=null,Y=function(ka){G.setAttribute("disabled","disabled");for(var ta=0;ta<V.length;ta++)V[ta].className=ta==ka?"geBtn gePrimaryBtn":"geBtn"};t=!0;p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="30px";A.appendChild(p);D=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){oa.style.display="";va.style.display="";ua.style.left="160px";Y(0);ua.scrollTop=0;ua.innerText="";k=0;W!=Ua&&(Ua=W,Ja=X,ab=Z,oa.innerText="",u(),W=null)});V.push(D);+p.appendChild(D);var ba=function(ka){oa.style.display="none";va.style.display="none";ua.style.left="30px";Y(ka?-1:1);null==W&&(W=Ua);ua.scrollTop=0;ua.innerText="";v.spin(ua);var ta=function(ra,la,qa){k=0;v.stop();Ua=ra;qa=qa||{};var ya=0,Ea;for(Ea in qa)ya+=qa[Ea].length;if(la)ua.innerText=la;else if(0==ra.length&&0==ya)ua.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ua.innerText="",0<ya){oa.style.display="";ua.style.left="160px";oa.innerText="";ab=0;Ja={"draw.io":ra};+for(Ea in qa)Ja[Ea]=qa[Ea];u()}else z(!0)};ka?c(ea.value,ta):N(ta)};N&&(D=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ba()}),p.appendChild(D),V.push(D));if(c){D=document.createElement("span");D.style.marginLeft="10px";D.innerText=mxResources.get("search")+":";p.appendChild(D);var ea=document.createElement("input");ea.style.marginRight="10px";ea.style.marginLeft="10px";ea.style.width="220px";mxEvent.addListener(ea,"keypress",function(ka){13==ka.keyCode&&ba(!0)});p.appendChild(ea);+D=mxUtils.button(mxResources.get("search"),function(){ba(!0)});D.className="geBtn";p.appendChild(D)}Y(0)}var ca=null,fa=null,aa=null,da=null,ha=null,pa=null,na=null,ia=null,wa=null,ua=document.createElement("div");ua.style.border="1px solid #d3d3d3";ua.style.position="absolute";ua.style.left="160px";ua.style.right="34px";p=(l?72:40)+(t?30:0);ua.style.top=p+"px";ua.style.bottom="68px";ua.style.margin="6px 0 0 -1px";ua.style.padding="6px";ua.style.overflow="auto";var va=document.createElement("div");+va.style.cssText="position:absolute;left:30px;width:128px;top:"+p+"px;height:22px;margin-top: 6px;white-space: nowrap;";var Ca=document.createElement("input");Ca.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";Ca.setAttribute("placeholder",mxResources.get("search"));Ca.setAttribute("type","text");va.appendChild(Ca);var ja=document.createElement("img");ja.setAttribute("src",Editor.magnifyImage);ja.setAttribute("title",mxResources.get("search"));+ja.className="geAdaptiveAsset";ja.style.position="relative";ja.style.cursor="pointer";ja.style.opacity="0.5";ja.style.height="16px";ja.style.left="-20px";ja.style.top="4px";ja.style.background="url('"+b.editor.transparentImage+"')";va.appendChild(ja);mxEvent.addListener(ja,"click",function(){ja.getAttribute("src")!=Editor.magnifyImage&&(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search")),Ca.value="",null!=Xa&&(Xa.click(),Xa=null));Ca.focus()});mxEvent.addListener(Ca,+"keydown",mxUtils.bind(this,function(ka){if(13==ka.keyCode){var ta=Ca.value;if(""==ta)null!=Xa&&(Xa.click(),Xa=null);else{if(null==NewDialog.tagsList[L]){var ra={};for(Na in Ja)if(null==Ja[Na].content)for(var la=Ja[Na],qa=0;qa<la.length;qa++){var ya=la[qa];if(null!=ya.tags)for(var Ea=ya.tags.toLowerCase().split(";"),Ha=0;Ha<Ea.length;Ha++)null==ra[Ea[Ha]]&&(ra[Ea[Ha]]=[]),ra[Ea[Ha]].push(ya)}NewDialog.tagsList[L]=ra}var Pa=ta.toLowerCase().split(" ");ra=NewDialog.tagsList[L];if(0<ab&&null==ra.__tagsList__){for(Na in Sa)for(la=+Sa[Na],qa=0;qa<la.length;qa++)for(ya=la[qa],Ea=ya.title.split(" "),Ea.push(Na),Ha=0;Ha<Ea.length;Ha++){var Ka=Ea[Ha].toLowerCase();null==ra[Ka]&&(ra[Ka]=[]);ra[Ka].push(ya)}ra.__tagsList__=!0}var Na=[];la={};for(qa=Ea=0;qa<Pa.length;qa++)if(0<Pa[qa].length){Ka=ra[Pa[qa]];var Va={};Na=[];if(null!=Ka)for(Ha=0;Ha<Ka.length;Ha++)ya=Ka[Ha],0==Ea==(null==la[ya.url])&&(Va[ya.url]=!0,Na.push(ya));la=Va;Ea++}ua.scrollTop=0;ua.innerText="";k=0;ra=document.createElement("div");ra.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";+mxUtils.write(ra,mxResources.get(0==Na.length?"noResultsFor":"resultsFor",[ta]));ua.appendChild(ra);null!=Wa&&null==Xa&&(Wa.style.backgroundColor="",Xa=Wa,Wa=ra);Ua=Na;W=null;z(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(Ca,"keyup",mxUtils.bind(this,function(ka){""==Ca.value?(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search"))):(ja.setAttribute("src",Editor.crossImage),ja.setAttribute("title",mxResources.get("reset")))}));p+=23;var oa=document.createElement("div");+oa.style.cssText="position:absolute;left:30px;width:128px;top:"+p+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ua,"scroll",function(){b.sidebar.hideTooltip()});var ma=140,Aa=ma,sa=null,Ia="url("+Editor.sparklesImage+")",xa=document.createElement("textarea");xa.setAttribute("placeholder",mxResources.get("describeYourDiagram"));xa.style.position="absolute";xa.style.fontFamily="sans-serif";xa.style.outline="none";xa.style.left="0px";xa.style.right="0px";+xa.style.top="0px";xa.style.bottom="38px";xa.style.resize="none";xa.style.boxSizing="border-box";xa.style.fontSize="12px";xa.style.border="none";xa.style.margin="8px";var Ba=document.createElement("button");Ba.className="geBtn gePrimaryBtn";Ba.style.position="absolute";Ba.style.bottom="0px";Ba.style.height="30px";Ba.style.right="0px";Ba.style.left="0px";Ba.style.margin="8px";Ba.style.fontSize="14px";Ba.style.borderRadius="4px";Ba.setAttribute("disabled","disabled");Ba.setAttribute("title",mxResources.get("ok"));+mxUtils.write(Ba,mxResources.get("ok"));var Fa=I.cloneNode(!0),La=!1;mxEvent.addGestureListeners(Fa,function(ka){La=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(ka){if(!La&&null!=ia){var ta="<mxfile><diagram>"+Graph.compress(ia)+"</diagram></mxfile>";F(ta,mxEvent.getClientX(ka),mxEvent.getClientY(ka),sa,wa)}});var za=I.cloneNode(!0);za.setAttribute("src",Editor.editImage);za.setAttribute("title",mxResources.get("edit"));za.style.right="";za.style.left="2px";var Da=+I.cloneNode(!0);Da.setAttribute("src",Editor.helpImage);Da.setAttribute("title",mxResources.get("help"));Da.style.opacity="1";Da.style.right="-8px";Da.style.top="-8px";mxEvent.addListener(Da,"click",function(ka){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(ka)});xa.style.visibility="hidden";Ba.style.visibility="hidden";za.style.visibility="hidden";Da.style.visibility="hidden";Fa.style.visibility="hidden";mxEvent.addListener(za,"click",U);mxEvent.addListener(xa,+"input",function(){""!=xa.value?Ba.removeAttribute("disabled"):Ba.setAttribute("disabled","disabled")});mxEvent.addListener(Ba,"click",function(){Q()});mxEvent.addListener(xa,"keydown",function(ka){13!=ka.keyCode||mxEvent.isShiftDown(ka)?27==ka.keyCode&&(Q(!0),mxEvent.consume(ka)):(Q(),mxEvent.consume(ka))});var Ja={},Ra={},Sa={},ab=0,db=!0,Wa=null,Xa=null;Ja.basic=[{title:"blankDiagram"}];var Ua=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==+typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ja.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ja.smartTemplate={content:C()});if(!g){var eb=function(){mxUtils.get($a,function(ka){if(!jb){jb=!0;ka=ka.getXml().documentElement.firstChild;for(var ta={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("parsererror"==ka.nodeName)null!=window.console&&+console.log("Parser error in "+L+": "+ka.textContent);else if("clibs"==ka.nodeName){for(var ra=ka.getAttribute("name"),la=ka.getElementsByTagName("add"),qa=[],ya=0;ya<la.length;ya++)qa.push(encodeURIComponent(mxUtils.getTextContent(la[ya])));null!=ra&&0<qa.length&&(ta[ra]=qa.join(";"))}else if(qa=ka.getAttribute("url"),null!=qa){la=ka.getAttribute("section");ra=ka.getAttribute("subsection");if(null==la&&(ya=qa.indexOf("/"),la=qa.substring(0,ya),null==ra)){var Ea=qa.indexOf("/",ya+1);-1<Ea&&(ra=qa.substring(ya++1,Ea))}ya=Ja[la];null==ya&&(ya=[],Ja[la]=ya);qa=ka.getAttribute("clibs");null!=ta[qa]&&(qa=ta[qa]);qa={url:ka.getAttribute("url"),libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:qa,tags:ka.getAttribute("tags")};ya.push(qa);null!=ra&&(ya=Ra[la],null==ya&&(ya={},Ra[la]=ya),la=ya[ra],null==la&&(la=[],ya[ra]=la),la.push(qa))}ka=ka.nextSibling}v.stop();u()}})};A.appendChild(va);A.appendChild(oa);+A.appendChild(ua);var jb=!1,$a=L;/^https?:\/\//.test($a)&&!b.editor.isCorsEnabledForUrl($a)&&($a=PROXY_URL+"?url="+encodeURIComponent($a));v.spin(ua);null!=n?n(function(ka,ta){Sa=ka;Z=ab=ta;eb()},eb):eb();X=Ja}mxEvent.addListener(T,"keypress",function(ka){b.dialog.container.firstChild==A&&13==ka.keyCode&&E()});n=document.createElement("div");n.style.marginTop=g?"4px":"16px";n.style.textAlign="right";n.style.position="absolute";n.style.left="40px";n.style.bottom="24px";n.style.right="40px";p=mxUtils.button(mxResources.get("cancel"),+function(){null!=y&&y();b.hideDialog(!0)});p.className="geBtn";!b.editor.cancelFirst||q&&null==y||n.appendChild(p);g||"1"==urlParams.embed||q||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(g=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(ta){null!=ta&&0<ta.length&&b.editor.loadUrl(b.editor.getProxiedUrl(ta),function(ra){aa=ra;ca=null;templateRealURl=ta;b.hideDialog();E()},function(ra){b.handleError(ra)})},+mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),g.className="geBtn",n.appendChild(g));Graph.fileSupport&&f&&(f=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,"change",function(ta){b.openFiles(ka.files,!0);ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=+ka}b.newDlgFileInputElt.click()}),f.className="geBtn",n.appendChild(f));n.appendChild(G);b.editor.cancelFirst||null!=d||q&&null==y||n.appendChild(p);A.appendChild(n);this.container=A};NewDialog.tagsList={};+var SaveDialog=function(b,g,l,d,q,y,x,D){function J(A,B,H,T,k,v){var G=null;if(null==d||0>mxUtils.indexOf(d,A))if(k=null!=k?k:b.getTitleForService(A),0<=mxUtils.indexOf(U,A)||null!=b.getServiceForName(A)){G=document.createElement("option");if("pick"==v)G.innerHTML=mxUtils.htmlEntities(k)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",G.setAttribute("value","pickFolder-"+A),G.setAttribute("title",k+" - "+mxResources.get("pickFolder")+"...");else{var I=A++(null!=H?"-"+H:""),M=m[I];null!=M&&null!=M.option&&M.option.parentNode.removeChild(M.option);M=null;if(null!=B){"/"==B.charAt(B.length-1)&&(B=B.substring(0,B.length-1));"/"==B.charAt(0)&&(B=B.substring(1));M=B;if(A!=App.MODE_GITHUB&&A==App.MODE_GITLAB){var P=M.lastIndexOf("/");0<=P&&(M=M.substring(P+1))}40<M.length&&(M=M.substring(0,20)+"..."+M.substring(M.length-20))}G.innerHTML=mxUtils.htmlEntities(k)+(null!=M?" – "+mxUtils.htmlEntities(M):"");G.setAttribute("title",k++(null!=B?" ("+B+")":"")+(null!=H&&decodeURIComponent(H)!=B?" ["+H+"]":""));G.setAttribute("value",I);m[I]={option:G,mode:A,path:B,id:H};SaveDialog.lastValue==I&&null==D?T=!0:null==T&&("root"==v?T=null==D&&b.mode==A||null!=A&&A==D:"pickFolder-"==E.value.substring(0,11)&&(T=!0));T&&G.setAttribute("selected","selected")}E.appendChild(G)}return G}function K(A){b.pickFolder(A,function(B){var H=null;A==App.MODE_GOOGLE&&null!=B.docs&&0<B.docs.length?H={mode:A,path:B.docs[0].name,id:B.docs[0].id}:A==App.MODE_ONEDRIVE&&+null!=B.value&&0<B.value.length?H={mode:A,path:B.value[0].name,id:OneDriveFile.prototype.getIdOf(B.value[0])}:(A==App.MODE_GITHUB||A==App.MODE_GITLAB)&&null!=B&&0<B.length&&(H={mode:A,path:decodeURIComponent(B),id:B});null!=H&&(R.style.display="",b.addRecent(H,"Folders",5),B=J(H.mode,H.path,H.id,!0),E.innerHTML="",m={},L(),H=E.selectedIndex,E.value=B.value,0>E.selectedIndex&&(E.selectedIndex=H))},!0,!0,!0,!0)}function L(){var A=b.getRecent("Folders"),B=0;if(null!=A&&0<A.length){for(var H=0;H<A.length;H++)null!=+J(A[H].mode,A[H].path,A[H].id)&&B++;0<B&&E.appendChild(O.cloneNode(!0))}J(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");J(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(J(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),J(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&J(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);J(App.MODE_GITHUB,null,null,null,null,"pick");J(App.MODE_GITLAB,null,+null,null,null,"pick");J(App.MODE_TRELLO);A=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&A&&J(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=d&&0<=mxUtils.indexOf(d,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&J(App.MODE_BROWSER);A&&J("download");Editor.popupsAllowed&&J("_blank",null,null,null,mxResources.get("openInNewWindow"));0<B&&(E.appendChild(O.cloneNode(!0)),B=E.value,E.appendChild(R),+E.value=B);if("pickFolder-"==E.value.substring(0,11)||"reset"==E.value)B=document.createElement("option"),B.setAttribute("value",""),B.setAttribute("selected","selected"),mxUtils.write(B,mxResources.get("pickFolder")+"..."),E.insertBefore(B,E.firstChild);Q=E.value}function N(){if("reset"==E.value)b.resetRecent("Folders"),E.innerHTML="",E.value="",pickFolderOption=null,m={},L();else if("pickFolder-"==E.value.substring(0,11)){var A=E.value.substring(11);E.value=Q;K(A)}else if(null!=C&&null!=m[E.value]&&+null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[C.value].extension){A=b.getExtensionForService(m[E.value].mode);var B=F.value;null!=A&&0>g.indexOf(".")&&0>B.indexOf(".")&&(F.value=B+A)}u.innerHTML="";mxUtils.write(u,mxResources.get("download"==E.value||"_blank"==E.value?"ok":"save"));""==E.value?u.setAttribute("disabled","disabled"):u.removeAttribute("disabled")}var c=document.createElement("div");c.style.display="flex";c.style.flexWrap="wrap";c.style.whiteSpace="nowrap";var e=+document.createElement("div");e.style.display="grid";e.style.gap="5px 8px";e.style.gridAutoRows="auto auto 44px";e.style.gridAutoColumns="0fr minmax(0,1fr)";e.style.width="100%";var f=null,p=null;if(null!=q&&null!=y&&"image/"==y.substring(0,6)&&("image/svg"!=y.substring(0,9)||mxClient.IS_SVG)){e.style.display="inline-grid";e.style.flexBasis="75%";f=document.createElement("div");f.style.display="inline-block";f.style.height="auto";f.style.maxWidth="25%";f.style.margin="auto";var n=document.createElement("img"),+t=x?q:btoa(unescape(encodeURIComponent(q)));n.setAttribute("src","data:"+y+";base64,"+t);n.style.boxSizing="border-box";n.style.maxHeight="50px";n.style.maxWidth="100%";n.style.paddingLeft="10px";f.appendChild(n);mxClient.IS_FF||"image/png"!=y||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(p=mxUtils.button(mxResources.get("copy"),function(){var A=b.base64ToBlob(t,"image/png");A=new ClipboardItem({"image/png":A,"text/html":new Blob(['<img src="data:'+y+";base64,"+t+'">'],{type:"text/html"})});+navigator.clipboard.write([A]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(B){b.handleError(B)}))},null,"geBtn"));Editor.popupsAllowed&&(null==d||0>mxUtils.indexOf(d,"_blank"))?(f.setAttribute("title",mxResources.get("openInNewWindow")),f.style.cursor="pointer",mxEvent.addGestureListeners(f,null,null,function(A){mxEvent.isPopupTrigger(A)||b.openInNewWindow(q,y,x)})):f.setAttribute("title",mxResources.get("preview"))}n=document.createElement("div");+n.style.display="flex";n.style.padding="1px";n.style.alignItems="center";n.style.justifyContent="flex-end";n.style.gridColumn="1";n.style.whiteSpace="nowrap";var z=document.createElement("div");z.style.display="grid";z.style.padding="1px";z.style.alignItems="center";z.style.gridColumn="2";z.style.gridAutoColumns="minmax(0,1fr) auto";z.style.gap="6px";mxUtils.write(n,mxResources.get("saveAs")+":");var F=document.createElement("input");F.setAttribute("type","text");F.setAttribute("value",g);F.style.boxSizing=+"border-box";F.style.width="100%";z.appendChild(F);e.appendChild(n);e.appendChild(z);var C=null;null!=b.editor.diagramFileTypes&&null==y&&(n=n.cloneNode(!1),z=z.cloneNode(!1),mxUtils.write(n,mxResources.get("type")+":"),C=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),C.style.boxSizing="border-box",C.style.width="100%",z.appendChild(C),e.appendChild(n),e.appendChild(z));n=n.cloneNode(!1);z=z.cloneNode(!1);mxUtils.write(n,mxResources.get("where")+":");var E=document.createElement("select");+E.style.textOverflow="ellipsis";E.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var U=["browser","device","download","_blank"],O=document.createElement("option");O.setAttribute("disabled","disabled");O.innerHTML="-----------------";var Q=null,m={},u=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=E.value;var A=m[SaveDialog.lastValue];null!=A&&l(F,A.mode,A.id)},null,"geBtn gePrimaryBtn");+mxEvent.addListener(F,"keypress",function(A){13==A.keyCode&&u.click()});mxEvent.addListener(E,"change",N);L();N();z.appendChild(E);null!=SaveDialog.lastValue&&null!=m[SaveDialog.lastValue]&&(E.value=SaveDialog.lastValue);e.appendChild(n);e.appendChild(z);c.appendChild(e);null!=f&&c.appendChild(f);e=document.createElement("div");e.style.flexBasis="100%";e.style.textAlign="right";e.style.marginTop=null!=y?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||e.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));+f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&e.appendChild(f);null!=p&&e.appendChild(p);e.appendChild(u);b.editor.cancelFirst||e.appendChild(f);c.appendChild(e);this.init=function(){Editor.selectFilename(F)};this.container=c},CreateDialog=function(b,g,l,d,q,y,x,D,J,K,L,N,c,e,f,p,n){function t(Q,m,u,A){function B(){mxEvent.addListener(H,"click",function(){var I=u;if(x){var M=C.value,P=M.lastIndexOf(".");if(0>g.lastIndexOf(".")&&0>P){I=null!=+I?I:O.value;var S="";I==App.MODE_GOOGLE?S=b.drive.extension:I==App.MODE_GITHUB?S=b.gitHub.extension:I==App.MODE_GITLAB?S=b.gitLab.extension:I==App.MODE_TRELLO?S=b.trello.extension:I==App.MODE_DROPBOX?S=b.dropbox.extension:I==App.MODE_ONEDRIVE?S=b.oneDrive.extension:I==App.MODE_DEVICE&&(S=".drawio");0<=P&&(M=M.substring(0,P));C.value=M+S}}z(u)})}var H=document.createElement("a");H.style.overflow="hidden";var T=document.createElement("img");T.src=Q;T.setAttribute("border","0");T.setAttribute("align",+"absmiddle");T.style.width="60px";T.style.height="60px";T.style.paddingBottom="6px";H.style.display="inline-block";H.className="geBaseButton";H.style.position="relative";H.style.margin="4px";H.style.padding="8px 8px 10px 8px";H.style.whiteSpace="nowrap";H.appendChild(T);H.style.color="gray";H.style.fontSize="11px";var k=document.createElement("div");H.appendChild(k);mxUtils.write(k,m);if(null!=A&&null==b[A]){T.style.visibility="hidden";mxUtils.setOpacity(k,10);var v=new Spinner({lines:12,length:12,+width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(H);var G=window.setTimeout(function(){null==b[A]&&(v.stop(),H.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[A]&&(window.clearTimeout(G),mxUtils.setOpacity(k,100),T.style.visibility="",v.stop(),B())}))}else B();R.appendChild(H);++U==N&&(mxUtils.br(R),U=0)}function z(Q){var m=C.value;if(null==Q||null!=m&&0<m.length)n&&b.hideDialog(),+l(m,Q,C)}L="1"==urlParams.noDevice?!1:L;x=null!=x?x:!0;D=null!=D?D:!0;N=null!=N?N:4;n=null!=n?n:!0;y=document.createElement("div");y.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(y);var F=document.createElement("h2");mxUtils.write(F,q||mxResources.get("create"));F.style.marginTop="0px";F.style.marginBottom="24px";y.appendChild(F);q=document.createElement("span");mxUtils.write(q,mxResources.get("filename")+":");q.style.maxWidth="106px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";+q.style.display="inline-block";y.appendChild(q);var C=document.createElement("input");C.setAttribute("value",g);C.style.width="180px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){Editor.selectFilename(C)};y.appendChild(C);null!=p&&null!=b.editor.diagramFileTypes&&(p=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),p.style.marginLeft="6px",p.style.width="90px",y.appendChild(p));p=null;if("1"!=urlParams.noDevice&&null!=c&&null!=e&&"image/"==+e.substring(0,6)&&("image/svg"!=e.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";q=document.createElement("img");var E=f?c:btoa(unescape(encodeURIComponent(c)));q.setAttribute("src","data:"+e+";base64,"+E);q.style.position="absolute";q.style.top="70px";q.style.right="100px";q.style.maxWidth="120px";q.style.maxHeight="80px";mxUtils.setPrefixedStyle(q.style,"transform","translate(50%,-50%)");y.appendChild(q);mxClient.IS_FF||"image/png"!=e||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||+(p=mxUtils.button(mxResources.get("copy"),function(Q){Q=b.base64ToBlob(E,"image/png");Q=new ClipboardItem({"image/png":Q,"text/html":new Blob(['<img src="data:'+e+";base64,"+E+'">'],{type:"text/html"})});navigator.clipboard.write([Q]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(m){b.handleError(m)}))}),p.style.marginTop="6px",p.className="geBtn");J&&Editor.popupsAllowed&&(q.style.cursor="pointer",mxEvent.addGestureListeners(q,+null,null,function(Q){mxEvent.isPopupTrigger(Q)||z("_blank")}))}mxUtils.br(y);var R=document.createElement("div");R.style.textAlign="center";var U=0;R.style.marginTop="6px";y.appendChild(R);var O=document.createElement("select");O.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(c,mxResources.get("googleDrive")),O.appendChild(c),t(IMAGE_PATH+"/google-drive-logo.svg",+mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(c,mxResources.get("oneDrive")),O.appendChild(c),b.mode==App.MODE_ONEDRIVE&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_DROPBOX),+mxUtils.write(c,mxResources.get("dropbox")),O.appendChild(c),b.mode==App.MODE_DROPBOX&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GITHUB),mxUtils.write(c,mxResources.get("github")),O.appendChild(c),t(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(c=document.createElement("option"),+c.setAttribute("value",App.MODE_GITLAB),mxUtils.write(c,mxResources.get("gitlab")),O.appendChild(c),t(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_TRELLO),mxUtils.write(c,mxResources.get("trello")),O.appendChild(c),t(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||+null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)c=document.createElement("option"),c.setAttribute("value",App.MODE_DEVICE),mxUtils.write(c,mxResources.get("device")),O.appendChild(c),b.mode!=App.MODE_DEVICE&&D||c.setAttribute("selected","selected"),L&&t(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);D&&isLocalStorage&&"0"!=urlParams.browser&&(D=document.createElement("option"),D.setAttribute("value",App.MODE_BROWSER),mxUtils.write(D,mxResources.get("browser")),O.appendChild(D),+b.mode==App.MODE_BROWSER&&D.setAttribute("selected","selected"),t(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));D=document.createElement("div");D.style.marginTop="26px";D.style.textAlign="center";null!=K&&(L=mxUtils.button(mxResources.get("help"),function(){b.openLink(K)}),L.className="geBtn",D.appendChild(L));L=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});+L.className="geBtn";b.editor.cancelFirst&&null==d&&D.appendChild(L);null==d&&(c=mxUtils.button(mxResources.get("decideLater"),function(){z(null)}),c.className="geBtn",D.appendChild(c));J&&Editor.popupsAllowed&&(J=mxUtils.button(mxResources.get("openInNewWindow"),function(){z("_blank")}),J.className="geBtn",D.appendChild(J));CreateDialog.showDownloadButton&&(J=mxUtils.button(mxResources.get("download"),function(){z("download")}),J.className="geBtn",D.appendChild(J),null!=p&&(J.style.marginTop="6px",+D.style.marginTop="6px"));null!=p&&(mxUtils.br(D),D.appendChild(p));b.editor.cancelFirst&&null==d||D.appendChild(L);mxEvent.addListener(C,"keypress",function(Q){13==Q.keyCode?z(App.MODE_DEVICE):27==Q.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});y.appendChild(D);this.container=y};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;+var PopupDialog=function(b,g,l,d,q){q=null!=q?q:!0;var y=document.createElement("div");y.style.textAlign="left";y.style.height="100%";mxUtils.write(y,mxResources.get("fileOpenLocation"));mxUtils.br(y);mxUtils.br(y);var x=mxUtils.button(mxResources.get("openInThisWindow"),function(){q&&b.hideDialog();null!=d&&d()});x.className="geBtn";x.style.marginBottom="8px";x.style.width="280px";y.appendChild(x);mxUtils.br(y);var D=mxUtils.button(mxResources.get("openInNewWindow"),function(){q&&b.hideDialog();+null!=l&&l();b.openLink(g,null,!0)});D.className="geBtn gePrimaryBtn";D.style.width=x.style.width;y.appendChild(D);mxUtils.br(y);mxUtils.br(y);mxUtils.write(y,mxResources.get("allowPopups"));this.container=y},ImageDialog=function(b,g,l,d,q,y,x,D){function J(){0<N.value.length?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");"data:"!=N.value.substring(0,5)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}y=null!=y?y:!0;var K=b.editor.graph,L=document.createElement("div");+mxUtils.write(L,g);g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow="clip";g.style.cursor="default";g.style.paddingRight="20px";var N=document.createElement("input");N.setAttribute("value",l);N.setAttribute("type","text");N.setAttribute("spellcheck","false");N.setAttribute("autocorrect","off");N.setAttribute("autocomplete","off");N.setAttribute("autocapitalize","off");N.style.marginTop=+"6px";N.style.width=(Graph.fileSupport?460:340)-20+"px";N.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";N.style.backgroundRepeat="no-repeat";N.style.backgroundPosition="100% 50%";N.style.paddingRight="14px";l=document.createElement("div");l.setAttribute("title",mxResources.get("reset"));l.style.position="relative";l.style.left="-16px";l.style.width="12px";l.style.height="14px";l.style.cursor="pointer";l.style.display="inline-block";l.style.top="3px";l.style.background="url('"+b.editor.transparentImage++"')";mxEvent.addListener(l,"click",function(){N.value="";N.focus()});g.appendChild(N);g.appendChild(l);L.appendChild(g);var c=D,e,f,p=function(C,E,R,U){var O="data:"==C.substring(0,5);!b.isOffline()||O&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(Q){b.spinner.stop();b.hideDialog();var m=!1===U?1:null!=E&&null!=R?Math.max(E/Q.width,R/Q.height):Math.min(1,Math.min(520/Q.width,520/Q.height));y&&(C=b.convertDataUri(C));d(C,+Math.round(Number(Q.width)*m),Math.round(Number(Q.height)*m),c,e,f)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(C,null,null,c,e,f)):(C=b.convertDataUri(C),E=null==E?120:E,R=null==R?100:R,b.hideDialog(),d(C,E,R,c,e,f))},n=function(C,E){if(null!=C){var R=q?null:K.getModel().getGeometry(K.getSelectionCell());null!=R?p(C,R.width,R.height,E):p(C,null,null,E)}else b.hideDialog(),d(null)};this.init=function(){N.focus();+if(Graph.fileSupport){N.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=L.parentNode,E=null;mxEvent.addListener(C,"dragleave",function(R){null!=E&&(E.parentNode.removeChild(E),E=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(R){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=b.highlightElement(C));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(R){null!=E&&(E.parentNode.removeChild(E),+E=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(O,Q,m,u,A,B,H,T){n(O,T)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var Q=0;Q<O.length;Q++)O[Q]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var U=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&n(decodeURIComponent(U))}R.stopPropagation();R.preventDefault()}),+!1)}};D=document.createElement("div");D.style.marginTop="14px";D.style.textAlign="center";l=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&D.appendChild(l);ImageDialog.filePicked=function(C){C.action==google.picker.Action.PICKED&&null!=C.docs[0].thumbnails&&(C=C.docs[0].thumbnails[C.docs[0].thumbnails.length-1],null!=C&&(N.value=C.url));N.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var t=document.createElement("input");+t.setAttribute("multiple","multiple");t.setAttribute("type","file");mxEvent.addListener(t,"change",function(C){null!=t.files&&(b.importFiles(t.files,0,0,b.maxImageSize,function(E,R,U,O,Q,m){n(E)},function(){},function(E){return"image/"==E.type.substring(0,6)},function(E){for(var R=0;R<E.length;R++)E[R]()},!0),t.type="",t.type="file",t.value="")});t.style.display="none";document.body.appendChild(t);b.imgDlgFileInputElt=t}g=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});+g.className="geBtn";D.appendChild(g)}mxEvent.addListener(N,"keypress",function(C){13==C.keyCode&&n(N.value)});var z=mxUtils.button(mxResources.get("crop"),function(){var C=new CropImageDialog(b,N.value,c,function(E,R,U){c=E;e=R;f=U});b.showDialog(C.container,300,390,!0,!0)});x&&(z.className="geBtn",D.appendChild(z));var F=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=N.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var C=b.editor.createImageUrlConverter().convert(N.value),+E=new Image;E.onload=function(){b.editor.convertImageToDataUri(C,function(R){b.confirmImageResize(function(U){b.resizeImage(E,R,mxUtils.bind(this,function(O,Q,m){b.spinner.stop();null!=O&&O.length<b.maxImageBytes?(N.value=O,J()):b.handleError({message:mxResources.get("imageTooBig")})}),U,b.maxImageSize)},E.width>b.maxImageSize||E.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};E.onerror=function(){b.spinner.stop();+b.handleError({message:mxResources.get("fileNotFound")})};E.src=C}});F.className="geBtn";mxEvent.addListener(N,"change",function(C){c=null;J()});J();D.appendChild(F);x=mxUtils.button(mxResources.get("apply"),function(){n(N.value)});x.className="geBtn gePrimaryBtn";D.appendChild(x);b.editor.cancelFirst||D.appendChild(l);Graph.fileSupport&&(D.style.marginTop="120px",L.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",L.style.backgroundPosition="center 65%",L.style.backgroundRepeat="no-repeat",+x=document.createElement("div"),x.style.position="absolute",x.style.width="420px",x.style.top="58%",x.style.textAlign="center",x.style.fontSize="18px",x.style.color="#a0c3ff",mxUtils.write(x,mxResources.get("dragImagesHere")),L.appendChild(x));L.appendChild(D);this.container=L},LinkDialog=function(b,g,l,d,q,y,x){function D(C,E){var R=document.createElement("option");mxUtils.write(R,mxResources.get(C));R.value=C;z.appendChild(R);F[C]=E}var J=document.createElement("div");J.style.height="100%";mxUtils.write(J,+mxResources.get("editLink")+":");var K=document.createElement("div");K.className="geTitle";K.style.backgroundColor="transparent";K.style.borderColor="transparent";K.style.whiteSpace="nowrap";K.style.textOverflow="clip";K.style.cursor="default";var L=document.createElement("input");L.setAttribute("placeholder",mxResources.get("dragUrlsHere"));L.setAttribute("type","text");L.style.marginTop="6px";L.style.width="414px";L.style.boxSizing="border-box";L.style.backgroundImage="url('"+Dialog.prototype.clearImage++"')";L.style.backgroundRepeat="no-repeat";L.style.backgroundPosition="100% 50%";L.style.paddingRight="14px";L.style.marginBottom="4px";var N=document.createElement("div");N.setAttribute("title",mxResources.get("reset"));N.style.position="relative";N.style.left="-16px";N.style.width="12px";N.style.height="14px";N.style.cursor="pointer";N.style.display="inline-block";N.style.top="3px";N.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(N,"click",function(){L.value="";L.focus()});+var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geLinkDialogOption");var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","geLinkDialogOption");var f=document.createElement("select");f.style.width="414px";var p=document.createElement("input");p.setAttribute("type",+"checkbox");p.style.margin="0 6p 0 6px";null!=x&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);x=null!=x?x:"_blank";p.setAttribute("title",x);y&&(L.style.width="200px");if(q&&null!=b.pages){null!=g&&Graph.isPageLink(g)?(e.setAttribute("checked","checked"),e.defaultChecked=!0):(L.setAttribute("value",g),c.setAttribute("checked","checked"),c.defaultChecked=!0);K.appendChild(c);K.appendChild(L);K.appendChild(N);y&&(K.appendChild(p),mxUtils.write(K,mxResources.get("openInNewWindow")));mxUtils.br(K);+K.appendChild(e);q=!1;for(y=0;y<b.pages.length;y++)N=document.createElement("option"),mxUtils.write(N,b.pages[y].getName()||mxResources.get("pageWithNumber",[y+1])),N.setAttribute("value","data:page/id,"+b.pages[y].getId()),g==N.getAttribute("value")&&(N.setAttribute("selected","selected"),q=!0),f.appendChild(N);if(!q&&e.checked){var n=document.createElement("option");mxUtils.write(n,mxResources.get("pageNotFound"));n.setAttribute("disabled","disabled");n.setAttribute("selected","selected");n.setAttribute("value",+"pageNotFound");f.appendChild(n);mxEvent.addListener(f,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)})}K.appendChild(f)}else L.setAttribute("value",g),K.appendChild(L),K.appendChild(N);J.appendChild(K);var t=mxUtils.button(l,function(){b.hideDialog();d(e.checked?"pageNotFound"!==f.value?f.value:g:L.value,LinkDialog.selectedDocs,p.checked?x:null)});t.style.verticalAlign="middle";t.className="geBtn gePrimaryBtn";this.init=function(){e.checked?f.focus():(L.focus(),mxClient.IS_GC||+mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(f,"focus",function(){c.removeAttribute("checked");e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(L,"focus",function(){e.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});if(Graph.fileSupport){var C=J.parentNode,E=null;mxEvent.addListener(C,"dragleave",function(R){null!=E&&(E.parentNode.removeChild(E),E=null);R.stopPropagation();R.preventDefault()});+mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(R){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=b.highlightElement(C));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(R){try{null!=E&&(E.parentNode.removeChild(E),E=null),0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")&&(L.value=decodeURIComponent(R.dataTransfer.getData("text/uri-list")),c.setAttribute("checked","checked"),c.checked=!0,t.click())}catch(U){b.handleError(U)}R.stopPropagation();+R.preventDefault()}),!1)}};l=document.createElement("div");l.style.marginTop="16px";l.style.textAlign="right";b.isOffline()||l.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));K=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});K.style.verticalAlign="middle";K.className="geBtn";b.editor.cancelFirst&&l.appendChild(K);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(C){if(C.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=C.docs;+var E=C.docs[0].url;"application/mxe"==C.docs[0].mimeType||null!=C.docs[0].mimeType&&"application/vnd.jgraph."==C.docs[0].mimeType.substring(0,23)?E="https://www.draw.io/#G"+C.docs[0].id:"application/vnd.google-apps.folder"==C.docs[0].mimeType&&(E="https://drive.google.com/#folders/"+C.docs[0].id);L.value=E;L.focus()}else LinkDialog.selectedDocs=null;L.focus()};var z=document.createElement("select");z.className="geBtn";z.style.position="relative";z.style.top="1px";z.style.maxWidth="120px";var F={};+q=document.createElement("option");mxUtils.write(q,mxResources.get("select")+"...");q.value="";z.appendChild(q);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&D("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var C=b.drive.createLinkPicker();b.linkPicker=C.setCallback(function(E){LinkDialog.filePicked(E)}).build()}b.linkPicker.setVisible(!0)}))});+"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&D("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(C){L.value=C[0].link;L.focus()}})});null!=b.oneDrive&&D("oneDrive",function(){b.oneDrive.pickFile(function(C,E){null!=E&&null!=E.value&&0<E.value.length&&(L.value=E.value[0].webUrl,L.focus())},!0)});null!=b.gitHub&&D("github",function(){b.gitHub.pickFile(function(C){if(null!=C){C=C.split("/");var E=C[0],R=C[1],U=C[2];C=C.slice(3,C.length).join("/");+L.value="https://github.com/"+E+"/"+R+"/blob/"+U+"/"+C;L.focus()}})});null!=b.gitLab&&D("gitlab",function(){b.gitLab.pickFile(function(C){if(null!=C){C=C.split("/");var E=C[0],R=C[1],U=C[2];C=C.slice(3,C.length).join("/");L.value=DRAWIO_GITLAB_URL+"/"+E+"/"+R+"/blob/"+U+"/"+C;L.focus()}})});1<z.children.length&&(l.appendChild(z),mxEvent.addListener(z,"change",function(C){null!=F[z.value]&&(F[z.value](),z.value="")}));mxEvent.addListener(L,"keypress",function(C){13==C.keyCode&&t.click()});l.appendChild(t);+b.editor.cancelFirst||l.appendChild(K);J.appendChild(l);this.container=J},FeedbackDialog=function(b,g,l,d){var q=document.createElement("div"),y=document.createElement("div");mxUtils.write(y,mxResources.get("sendYourFeedback"));y.style.fontSize="18px";y.style.marginBottom="18px";q.appendChild(y);y=document.createElement("div");mxUtils.write(y,mxResources.get("yourEmailAddress")+(l?"":" ("+mxResources.get("required")+")"));q.appendChild(y);var x=document.createElement("input");x.setAttribute("type",+"text");x.style.marginTop="6px";x.style.width="600px";var D=mxUtils.button(mxResources.get("sendMessage"),function(){var N=L.value+(K.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;N.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=+FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(x.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=g?g:"Feedback")+":\n"+N),function(c){b.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});D.className=+"geBtn gePrimaryBtn";if(!l){D.setAttribute("disabled","disabled");var J=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(x,"change",function(){0<x.value.length&&0<J.test(x.value)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")});mxEvent.addListener(x,"keyup",function(){0<x.value.length&&J.test(x.value)?D.removeAttribute("disabled"):D.setAttribute("disabled",+"disabled")})}q.appendChild(x);this.init=function(){x.focus()};var K=document.createElement("input");K.setAttribute("type","checkbox");K.setAttribute("checked","checked");K.defaultChecked=!0;l=document.createElement("p");l.style.marginTop="14px";l.appendChild(K);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("includeCopyOfMyDiagram"));l.appendChild(y);mxEvent.addListener(y,"click",function(N){K.checked=!K.checked;mxEvent.consume(N)});q.appendChild(l);y=document.createElement("div");+mxUtils.write(y,mxResources.get("feedback"));q.appendChild(y);var L=document.createElement("textarea");L.style.resize="none";L.style.width="600px";L.style.height="140px";L.style.marginTop="6px";L.setAttribute("placeholder",mxResources.get("comments"));q.appendChild(L);l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right";y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";b.editor.cancelFirst?(l.appendChild(y),l.appendChild(D)):(l.appendChild(D),+l.appendChild(y));q.appendChild(l);this.container=q};FeedbackDialog.maxAttachmentSize=1E6;+var RevisionDialog=function(b,g,l){var d=document.createElement("div"),q=document.createElement("h3");q.style.marginTop="3px";mxUtils.write(q,mxResources.get("revisionHistory"));d.appendChild(q);q=document.createElement("div");q.style.position="absolute";q.style.overflow="auto";q.style.width="170px";q.style.height="378px";d.appendChild(q);var y=document.createElement("div");y.style.position="absolute";y.style.left="200px";y.style.width="470px";y.style.height="376px";y.style.overflow="hidden";y.style.borderWidth=+"1px";y.style.borderStyle="solid";var x=document.createElement("div");x.style.position="absolute";x.style.display="none";x.style.textAlign="center";x.style.padding="8px";x.style.borderRadius="8px";x.style.left="50%";x.style.top="50%";x.style.whiteSpace="nowrap";x.style.transform="translate(-50%, -50%)";x.style.background="inherit";x.style.border="1px solid";y.appendChild(x);mxEvent.disableContextMenu(y);d.appendChild(y);var D=new Graph(y);D.setTooltips(!1);D.setEnabled(!1);D.setPanning(!0);D.panningHandler.ignoreCell=+!0;D.panningHandler.useLeftButtonForPanning=!0;D.minFitScale=null;D.maxFitScale=null;D.centerZoom=!0;var J=0,K=null,L=0,N=D.getGlobalVariable;D.getGlobalVariable=function(X){return"page"==X&&null!=K&&null!=K[L]?K[L].getAttribute("name"):"pagenumber"==X?L+1:"pagecount"==X?null!=K?K.length:1:N.apply(this,arguments)};D.getLinkForCell=function(){return null};for(var c=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),e=b.getCurrentFile(),f=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),p={},n=0;n<f.length;n++)p[f[n].getAttribute("id")]=f[n];var t=null,z=null,F=null,C=null,E=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=F&&D.zoomIn()},20);E.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=F&&D.zoomOut()},20);R.setAttribute("disabled",+"disabled");var U=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=F&&(1==D.view.scale?(D.maxFitScale=8,D.fit(8)):D.zoomActual(),D.center())},20);U.setAttribute("disabled","disabled");var O=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);O.setAttribute("disabled","disabled");var Q=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);Q.setAttribute("disabled","disabled");var m=y.cloneNode(!1);m.style.pointerEvent=+"none";y.parentNode.appendChild(m);var u=new Graph(m);u.setTooltips(!1);u.setEnabled(!1);u.setPanning(!0);u.panningHandler.ignoreCell=!0;u.panningHandler.useLeftButtonForPanning=!0;u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;var A=document.createElement("div");A.style.textAlign="left";A.style.color="gray";A.style.backgroundColor="transparent";A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.style.whiteSpace="nowrap";A.style.cursor="default";A.style.height="100%";A.style.display=+"inline-flex";A.style.alignItems="center";A.style.flexGrow="1";mxEvent.addListener(A,"click",function(){var X=mxUtils.getTextContent(A);""!=X&&b.alert(X)});var B=null;mxEvent.addGestureListeners(O,function(X){try{var Z=null!=K[J]?p[K[J].getAttribute("id")]:null;mxUtils.setOpacity(O,20);x.innerText="";if(null==Z)x.style.display="inline-block",mxUtils.write(x,mxResources.get("pageNotFound"));else{B=A.innerHTML;A.innerHTML=mxResources.get("current");y.style.display="none";m.style.display="";m.style.backgroundColor=+y.style.backgroundColor;var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,u.getModel());u.view.scaleAndTranslate(D.view.scale,D.view.translate.x,D.view.translate.y);u.mathEnabled="1"==Y.getAttribute("math");u.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&u.mathEnabled&&Editor.MathJaxRender(u.container)}}catch(ba){x.style.display="inline-block",x.innerText="",mxUtils.write(x,mxResources.get("pageNotFound")+": "+ba.message)}},null,function(){mxUtils.setOpacity(O,+60);x.style.display="none";x.innerText="";"none"==y.style.display&&(y.style.display="",A.innerHTML=B,m.style.display="none")});mxEvent.addListener(Q,"click",mxUtils.bind(this,function(X){null!=F&&(X=b.getPagesForNode(F.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{e.patch(Y,null,!0,!0),b.hideDialog(),+b.hideDialog()}catch(ba){b.handleError(ba)}})}else b.hideDialog()}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close")),b.showDialog(X.container,620,460,!0,!0),X.init())}));var H=mxUtils.button(mxResources.get("restore"),function(X){null!=F&&null!=C&&b.confirm(mxResources.get("areYouSure"),function(){null!=l?l(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&(H.setAttribute("disabled","disabled"),e.save(!0,function(Z){b.spinner.stop();+H.removeAttribute("disabled");b.replaceFileData(C);b.hideDialog()},function(Z){b.spinner.stop();H.removeAttribute("disabled");b.editor.setStatus("");b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");var T=document.createElement("select");T.setAttribute("disabled","disabled");T.style.userSelect="none";T.style.maxWidth="100px";T.style.marginLeft="10px";T.style.display="none";var k=null;mxEvent.addListener(T,+"change",function(X){null!=k&&(k(X),mxEvent.consume(X))});var v=mxUtils.button(mxResources.get("open"),function(){null!=F&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(F.documentElement)),b.openLink(b.getUrl(),null,!0))});v.className="geBtn";v.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});G.className="geBtn";G.setAttribute("disabled","disabled");null!=+l&&(v.style.display="none");f=document.createElement("div");f.style.position="absolute";f.style.top="482px";f.style.right="28px";f.style.left="32px";f.style.justifyContent="end";f.style.display="flex";var I=document.createElement("div");I.className="geToolbarContainer";I.style.backgroundColor="transparent";I.style.display="flex";I.style.alignItems="center";I.style.justifyContent="stretch";I.style.left="32px";I.style.right="32px";I.style.border="none";I.style.top="440px";I.style.height="28px";var M=+null;if(null!=g&&0<g.length){y.style.cursor="move";var P=document.createElement("table");P.style.borderWidth="1px";P.style.borderStyle="solid";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";var S=document.createElement("tbody"),V=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(J=mxUtils.indexOf(b.pages,b.currentPage));for(n=g.length-1;0<=n;n--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){c.stop();+x.innerText="";var fa=mxUtils.parseXml(ca),aa=b.editor.extractGraphModel(fa.documentElement,!0);if(null!=aa){var da=function(wa){null!=wa&&(wa=ha(Editor.parseDiagramNode(wa)));return wa},ha=function(wa){var ua=wa.getAttribute("background");if(null==ua||""==ua||ua==mxConstants.NONE)ua=D.defaultPageBackgroundColor;y.style.backgroundColor=mxUtils.getLightDarkColor(ua);(new mxCodec(wa.ownerDocument)).decode(wa,D.getModel());D.maxFitScale=1;D.fit(8);D.center();D.mathEnabled="1"==wa.getAttribute("math");+D.setAdaptiveColors(wa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&D.mathEnabled&&Editor.MathJaxRender(D.container);return wa};T.style.display="none";T.innerText="";F=fa;C=ca;K=parseSelectFunction=null;L=0;if("mxfile"==aa.nodeName){fa=aa.getElementsByTagName("diagram");K=[];for(ca=0;ca<fa.length;ca++)K.push(fa[ca]);L=Math.min(J,K.length-1);0<K.length&&da(K[L]);if(1<K.length)for(T.removeAttribute("disabled"),T.style.display="",ca=0;ca<K.length;ca++){fa=document.createElement("option");fa.setAttribute("title",+pa+" ("+K[ca].getAttribute("id")+")");fa.setAttribute("value",ca);var pa=K[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);aa=b.getPageById(K[ca].getAttribute("id"));var na="";if(null!=aa){var ia=new DiagramPage(K[ca]);b.getHashValueForPages([aa])!=b.getHashValueForPages([ia])&&(na=" (M)")}else na=" (X)";mxUtils.write(fa,pa+na);ca==L&&fa.setAttribute("selected","selected");T.appendChild(fa)}k=function(){try{var wa=parseInt(T.value);L=J=wa;da(K[wa])}catch(ua){T.value=J,b.handleError(ua)}}}else ha(aa);+pa=X.lastModifyingUserName;null!=pa&&20<pa.length&&(pa=pa.substring(0,20)+"...");A.innerText="";mxUtils.write(A,(null!=pa?pa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());A.setAttribute("title",Y.getAttribute("title"));E.removeAttribute("disabled");R.removeAttribute("disabled");U.removeAttribute("disabled");O.removeAttribute("disabled");Q.removeAttribute("disabled");null!=e&&e.isRestricted()||(b.editor.graph.isEnabled()&&H.removeAttribute("disabled"),v.removeAttribute("disabled"),G.removeAttribute("disabled"));+mxUtils.setOpacity(E,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(O,60);mxUtils.setOpacity(Q,60)}else T.style.display="none",T.innerText="",A.innerText="",x.innerText="",mxUtils.write(A,mxResources.get("errorLoadingFile")),mxUtils.write(x,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding=+"6px";ea.style.whiteSpace="nowrap";X==g[g.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===V?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());Y.appendChild(ea);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ca){z!=X&&(c.stop(),+null!=t&&(t.style.backgroundColor=""),z=X,t=Y,t.style.backgroundColor="light-dark(#ebf2f9, #000000)",C=F=null,A.removeAttribute("title"),A.innerText=mxResources.get("loading")+"...",y.style.backgroundColor=D.defaultPageBackgroundColor,x.innerText="",D.getModel().clear(),H.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),v.setAttribute("disabled",+"disabled"),T.setAttribute("disabled","disabled"),mxUtils.setOpacity(E,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(O,20),mxUtils.setOpacity(Q,20),c.spin(y),X.getXml(function(fa){if(z==X)try{ba(fa)}catch(aa){A.innerText=mxResources.get("error")+": "+aa.message}},function(fa){c.stop();T.style.display="none";T.innerText="";A.innerText="";mxUtils.write(A,mxResources.get("errorLoadingFile"));mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,+"dblclick",function(ca){v.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);S.appendChild(Y)}return Y}(g[n]);null!=W&&n==g.length-1&&(M=W)}P.appendChild(S);q.appendChild(P)}else null==e||null==b.drive&&e.constructor==window.DriveFile||null==b.dropbox&&e.constructor==window.DropboxFile?(y.style.display="none",I.style.display="none",mxUtils.write(q,mxResources.get("notAvailable"))):(y.style.display="none",I.style.display=+"none",mxUtils.write(q,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";I.appendChild(A);I.appendChild(O);I.appendChild(R);I.appendChild(U);I.appendChild(E);I.appendChild(T);I.appendChild(Q);b.editor.cancelFirst&&f.appendChild(q);f.appendChild(v);null!=e&&e.constructor==DriveFile&&f.appendChild(G);f.appendChild(H);b.editor.cancelFirst||f.appendChild(q);d.appendChild(f);d.appendChild(I);+this.container=d},DraftDialog=function(b,g,l,d,q,y,x,D,J){var K=document.createElement("div"),L=document.createElement("div");L.style.marginTop="0px";L.style.whiteSpace="nowrap";L.style.overflow="auto";L.style.lineHeight="normal";mxUtils.write(L,g);K.appendChild(L);var N=document.createElement("select"),c=mxUtils.bind(this,function(){"-1"==N.value?(N.value=N.options[0].value,c(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this,Q;return $jscomp.asyncExecutePromiseGeneratorProgram(function(m){for(Q=+0;Q<J.length;Q++)q.apply(O,[Q,mxUtils.bind(O,function(){})]);b.hideDialog(!0);m.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(z=mxUtils.parseXml(J[N.value].data),F=b.editor.extractGraphModel(z.documentElement,!0),C=0,this.init())});if(null!=J){N.style.marginLeft="4px";for(g=0;g<J.length;g++){var e=document.createElement("option");e.setAttribute("value",g);var f=new Date(J[g].created),p=new Date(J[g].modified);mxUtils.write(e,f.toLocaleDateString()+" "+f.toLocaleTimeString()+" - "++(f.toDateString(),p.toDateString(),p.toLocaleDateString())+" "+p.toLocaleTimeString());N.appendChild(e)}e=document.createElement("option");e.setAttribute("value","-1");mxUtils.write(e,mxResources.get("deleteAll"));N.appendChild(e);L.appendChild(N);mxEvent.addListener(N,"change",c)}null==l&&(l=J[0].data);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.marginTop="10px";n.style.left="40px";n.style.right="40px";n.style.top="46px";n.style.bottom=+"74px";n.style.overflow="hidden";mxEvent.disableContextMenu(n);K.appendChild(n);var t=new Graph(n);t.setEnabled(!1);t.setPanning(!0);t.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";t.panningHandler.ignoreCell=!0;t.panningHandler.useLeftButtonForPanning=!0;t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;var z=mxUtils.parseXml(l),F=b.editor.extractGraphModel(z.documentElement,!0),C=0,E=null,R=t.getGlobalVariable;t.getGlobalVariable=function(O){return"page"==O&&null!=E&&null!=E[C]?E[C].getAttribute("name"):+"pagenumber"==O?C+1:"pagecount"==O?null!=E?E.length:1:R.apply(this,arguments)};t.getLinkForCell=function(){return null};l=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){t.zoomIn()},20);L=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){t.zoomOut()},20);g=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==t.view.scale?(t.maxFitScale=8,t.fit(8)):t.zoomActual();t.center()},20);x=mxUtils.button(x||mxResources.get("discard"),+function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(Q){q.apply(O,[N.value,mxUtils.bind(O,function(){null!=N.parentNode&&(N.options[N.selectedIndex].parentNode.removeChild(N.options[N.selectedIndex]),1<N.options.length?(N.value=N.options[0].value,c()):b.hideDialog(!0))})]);Q.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});x.className="geBtn";var U=document.createElement("select");+U.style.maxWidth="80px";U.style.position="relative";U.style.top="-2px";U.style.verticalAlign="bottom";U.style.marginRight="6px";U.style.display="none";y=mxUtils.button(y||mxResources.get("edit"),function(){d.apply(this,[N.value])});y.className="geBtn gePrimaryBtn";e=document.createElement("div");e.style.position="absolute";e.style.bottom="30px";e.style.right="40px";e.style.textAlign="right";f=document.createElement("div");f.className="geToolbarContainer";f.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";+this.init=function(){function O(A){if(null!=A){var B=A.getAttribute("background");if(null==B||""==B||B==mxConstants.NONE)B="light-dark(#ffffff, transparent)";n.style.backgroundColor=B;(new mxCodec(A.ownerDocument)).decode(A,t.getModel());t.maxFitScale=1;t.fit(8);t.center()}return A}function Q(A){null!=A&&(A=O(Editor.parseDiagramNode(A)));return A}mxEvent.addListener(U,"change",function(A){C=parseInt(U.value);Q(E[C]);mxEvent.consume(A)});if("mxfile"==F.nodeName){var m=F.getElementsByTagName("diagram");+E=[];for(var u=0;u<m.length;u++)E.push(m[u]);0<E.length&&Q(E[C]);U.innerText="";if(1<E.length)for(U.style.display="",u=0;u<E.length;u++)m=document.createElement("option"),mxUtils.write(m,E[u].getAttribute("name")||mxResources.get("pageWithNumber",[u+1])),m.setAttribute("value",u),u==C&&m.setAttribute("selected","selected"),U.appendChild(m);else U.style.display="none"}else O(F)};f.appendChild(U);f.appendChild(l);f.appendChild(L);f.appendChild(g);l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});+l.className="geBtn";D=null!=D?mxUtils.button(mxResources.get("ignore"),D):null;null!=D&&(D.className="geBtn");b.editor.cancelFirst?(e.appendChild(l),null!=D&&e.appendChild(D),e.appendChild(x),e.appendChild(y)):(e.appendChild(y),e.appendChild(x),null!=D&&e.appendChild(D),e.appendChild(l));K.appendChild(e);K.appendChild(f);this.container=K},FindWindow=function(b,g,l,d,q,y){function x(k,v,G){if("object"===typeof v.value&&null!=v.value.attributes){v=v.value.attributes;for(var I=0;I<v.length;I++)if("label"!=+v[I].nodeName){var M=mxUtils.trim(v[I].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==k&&0<=M.indexOf(G)||null!=k&&k.test(M))return!0}}return!1}function D(){e?(B.removeAttribute("disabled"),H.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));C.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function J(k,v,G){u.innerText="";var I=L.model.getDescendants(L.model.getRoot()),M=C.value.toLowerCase(),+P=R.checked?new RegExp(M):null,S=null;p=null;N!=M&&(N=M,c=null,f=!1);var V=null==c;if(0<M.length){if(f){f=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}k=(W+1)%b.pages.length;c=null;do f=!1,I=b.pages[k],L=b.createTemporaryGraph(L.getStylesheet()),b.updatePageRoot(I),L.model.setRoot(I.root),k=(k+1)%b.pages.length;while(!J(!0,v,G)&&k!=W);c&&(c=null,G?b.editor.graph.model.execute(new SelectPage(b,I)):b.selectPage(I));f=!1;L=b.editor.graph;return J(!0,v,G)}for(X=0;X<I.length;X++){W=+L.view.getState(I[X]);v&&(V=V||W==c);if(null!=W&&null!=W.cell.value&&(V||null==S)&&(L.model.isVertex(W.cell)||L.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(O.innerHTML=L.sanitizeHtml(L.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([O])):label=L.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;v&&y&&W==c&&(label=label.substr(n),Z=n);var Y=""==E.value;if(null==P&&(0<=label.indexOf(M)||Y&&x(P,W.cell,M))||null!=P&&(P.test(label)||+Y&&x(P,W.cell,M)))if(y&&(null!=P?(Y=label.match(P),null!=Y&&0<Y.length&&(p=Y[0].toLowerCase(),n=Z+Y.index+p.length)):(p=M,n=Z+label.indexOf(M)+p.length)),V){S=W;break}else null==S&&(S=W)}V=V||W==c}}if(null!=S){if(X==I.length&&U.checked)return c=null,f=!0,J(!0,v,G);c=S;L.scrollCellToVisible(c.cell);L.isEnabled()&&!L.isCellLocked(c.cell)?G||L.getSelectionCell()==c.cell&&1==L.getSelectionCount()||L.setSelectionCell(c.cell):L.highlightCell(c.cell)}else{if(!k&&U.checked)return f=!0,J(!0,v,G);L.isEnabled()&&+!G&&L.clearSelection()}e=null!=S;y&&!k&&D();return 0==M.length||null!=S}var K=b.actions.get("findReplace"),L=b.editor.graph,N=null,c=null,e=!1,f=!1,p=null,n=0,t=1,z=document.createElement("div");z.style.userSelect="none";z.style.overflow="hidden";z.style.padding="10px";z.style.height="100%";var F=y?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=F;+C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";z.appendChild(C);mxUtils.br(z);if(y){var E=document.createElement("input");E.setAttribute("placeholder",mxResources.get("replaceWith"));E.setAttribute("type","text");E.style.marginTop="4px";E.style.marginBottom="6px";E.style.width=F;E.style.fontSize="12px";E.style.borderRadius="4px";E.style.padding="6px";z.appendChild(E);mxUtils.br(z);mxEvent.addListener(E,"input",D)}var R=document.createElement("input");R.setAttribute("id",+"geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";z.appendChild(R);F=document.createElement("label");F.setAttribute("for","geFindWinRegExChck");z.appendChild(F);mxUtils.write(F,mxResources.get("regularExpression"));z.appendChild(F);F=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");F.style.position="relative";F.style.marginLeft="6px";F.style.top="3px";z.appendChild(F);mxUtils.br(z);var U=document.createElement("input");U.setAttribute("id","geFindWinAllPagesChck");+U.setAttribute("type","checkbox");U.style.marginRight="4px";z.appendChild(U);F=document.createElement("label");F.setAttribute("for","geFindWinAllPagesChck");z.appendChild(F);mxUtils.write(F,mxResources.get("allPages"));z.appendChild(F);var O=document.createElement("div");mxUtils.br(z);F=document.createElement("div");F.style.left="0px";F.style.right="0px";F.style.marginTop="6px";F.style.padding="0 6px 0 6px";F.style.textAlign="center";z.appendChild(F);var Q=mxUtils.button(mxResources.get("reset"),+function(){u.innerText="";C.value="";C.style.backgroundColor="";y&&(E.value="",D());N=c=null;f=!1;C.focus()});Q.setAttribute("title",mxResources.get("reset"));Q.style.float="none";Q.style.width="120px";Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow="hidden";Q.style.textOverflow="ellipsis";Q.className="geBtn";y||F.appendChild(Q);var m=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=J()?"":"light-dark(#ffcfcf, #ff0000)"}catch(k){b.handleError(k)}});m.setAttribute("title",+mxResources.get("find")+" (Enter)");m.style.float="none";m.style.width="120px";m.style.marginTop="6px";m.style.marginLeft="8px";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.className="geBtn gePrimaryBtn";F.appendChild(m);var u=document.createElement("div");u.style.marginTop="10px";if(y){var A=function(k,v,G,I,M){if(null==M||"1"!=M.html)return I=k.toLowerCase().indexOf(v,I),0>I?k:k.substr(0,I)+G+k.substr(I+v.length);var P=k;v=mxUtils.htmlEntities(v,!1,!1,!1);M=[];var S=-1;for(k=k.replace(/<br>/ig,+"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=k.indexOf("<",S+1));)M.push(S);S=k.match(/<[^>]*>/g);k=k.replace(/<[^>]*>/g,"");I=k.toLowerCase().indexOf(v,I);if(0>I)return P;P=I+v.length;G=mxUtils.htmlEntities(G);k=k.substr(0,I)+G+k.substr(P);for(var V=0,W=0;W<M.length;W++){if(M[W]-V<I)k=k.substr(0,M[W])+S[W]+k.substr(M[W]);else{var X=M[W]-V<P?I+V:M[W]+(G.length-v.length);k=k.substr(0,X)+S[W]+k.substr(X)}V+=S[W].length}return k.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,+"$1").replace(/\n/g,"<br>")},B=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=p&&null!=c){var k=c.cell,v=L.getLabel(k);L.isCellEditable(k)&&L.model.setValue(k,A(v,p,E.value,n-p.length,L.getCurrentCellStyle(k)));C.style.backgroundColor=J(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(G){b.handleError(G)}});B.setAttribute("title",mxResources.get("replFind"));B.style.float="none";B.style.width="120px";B.style.marginTop="6px";B.style.marginLeft="8px";B.style.overflow="hidden";B.style.textOverflow=+"ellipsis";B.className="geBtn gePrimaryBtn";B.setAttribute("disabled","disabled");F.appendChild(B);mxUtils.br(F);var H=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=p&&null!=c){var k=c.cell,v=L.getLabel(k);L.model.setValue(k,A(v,p,E.value,n-p.length,L.getCurrentCellStyle(k)));B.setAttribute("disabled","disabled");H.setAttribute("disabled","disabled")}}catch(G){b.handleError(G)}});H.setAttribute("title",mxResources.get("replace"));H.style.float="none";H.style.width="120px";H.style.marginTop=+"6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");F.appendChild(H);var T=mxUtils.button(mxResources.get("replaceAll"),function(){u.innerText="";N=null;var k=b.currentPage,v=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;L.getModel().beginUpdate();try{for(var G=0,I={};J(!1,!0,!0)&&100>G;){var M=c.cell,P=L.getLabel(M),S=I[M.id];if(S&&S.replAllMrk==t&&S.replAllPos>=n)break;I[M.id]=+{replAllMrk:t,replAllPos:n};L.isCellEditable(M)&&(L.model.setValue(M,A(P,p,E.value,n-p.length,L.getCurrentCellStyle(M))),G++)}k!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,k));mxUtils.write(u,mxResources.get("matchesRepl",[G]))}catch(V){b.handleError(V)}finally{L.getModel().endUpdate(),b.editor.graph.setSelectionCells(v),b.editor.graph.rendering=!0}t++});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px";T.style.marginTop="6px";T.style.marginLeft=+"8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");F.appendChild(T);mxUtils.br(F);F.appendChild(Q);Q=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));Q.setAttribute("title",mxResources.get("close"));Q.style.float="none";Q.style.width="120px";Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow="hidden";Q.style.textOverflow="ellipsis";Q.className="geBtn";+F.appendChild(Q);mxUtils.br(F);F.appendChild(u)}else Q.style.width="90px",m.style.width="90px";mxEvent.addListener(C,"keyup",function(k){if(91==k.keyCode||93==k.keyCode||17==k.keyCode)mxEvent.consume(k);else if(27==k.keyCode)K.funct();else if(N!=C.value.toLowerCase()||13==k.keyCode)try{C.style.backgroundColor=J()?"":"light-dark(#ffcfcf, #ff0000)"}catch(v){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(z,"keydown",function(k){70==k.keyCode&&b.keyHandler.isControlDown(k)&&+!mxEvent.isShiftDown(k)&&(K.funct(),mxEvent.consume(k))});this.window=new mxWindow(mxResources.get("find")+(y?"/"+mxResources.get("replace"):""),z,g,l,d,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),+null!=b.pages&&1<b.pages.length?U.removeAttribute("disabled"):(U.checked=!1,U.setAttribute("disabled","disabled"))):L.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,g,l,d,q,y){var x=b.editor.graph,D=document.createElement("div");D.style.textAlign="center";D.style.userSelect="none";D.style.overflow="hidden";D.style.height="100%";if(y){var J=function(){var f=x.freehand.getStrokeColor(!0);null!=f&&f!=mxConstants.NONE&&1<f.length&&"string"===typeof f&&("default"==f?f=+mxResources.get("useBlackAndWhite"):(f="#"==f.charAt(0)?f.substring(1).toUpperCase():f,f=ColorDialog.prototype.colorNames[f]),null!=f&&N.setAttribute("title",f))},K=document.createElement("input");K.setAttribute("id","geFreehandBrush");K.setAttribute("type","checkbox");K.checked=x.freehand.isPerfectFreehandMode();K.style.margin="10px 5px 0px 10px";K.style.float="left";D.appendChild(K);x.freehand.setPerfectFreehandMode(K.checked);var L=document.createElement("label");L.setAttribute("for","geFreehandBrush");+L.style.float="left";L.style.marginTop="10px";D.appendChild(L);mxUtils.write(L,mxResources.get("brush"));D.appendChild(L);var N=document.createElement("tempDiv");N.style.display="block";N.style.width="100%";N.style.height="100%";N.style.borderRadius="2px";N.style.boxSizing="border-box";N.style.border="1px solid black";N.style.backgroundColor=x.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){N.style.backgroundColor=x.freehand.getStrokeColor()});J();L=mxUtils.button("",mxUtils.bind(this,+function(f){b.pickColor(x.freehand.getStrokeColor(!0),function(p){x.freehand.setStrokeColor(p);N.style.backgroundColor=x.freehand.getStrokeColor();J()},"default");mxEvent.consume(f)}));L.style.position="absolute";L.style.boxSizing="border-box";L.style.padding="2px";L.style.top="8px";L.style.right="8px";L.style.width="28px";L.style.height="18px";L.className="geColorBtn";L.innerText="";L.appendChild(N);D.appendChild(L);L=document.createElement("img");L.setAttribute("title",mxResources.get("settings"));+L.setAttribute("src",Editor.gearImage);L.className="geToolbarButton geAdaptiveAsset";L.style.position="absolute";L.style.boxSizing="border-box";L.style.padding="2px";L.style.top="8px";L.style.right="38px";L.style.width="18px";L.style.height="18px";L.style.opacity="0.6";D.appendChild(L);mxEvent.addListener(L,"click",mxUtils.bind(this,function(f){f=x.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",f,function(p){!isNaN(p)&&0<p&&20>=p&&x.freehand.setSmoothing(parseInt(p))})}));+mxUtils.br(D);var c=document.createElement("input");c.setAttribute("type","range");c.setAttribute("min","2");c.setAttribute("max","30");c.setAttribute("value",x.freehand.getBrushSize());c.style.width="90%";c.style.visibility="hidden";D.appendChild(c);mxUtils.br(D);L=function(){x.freehand.setPerfectFreehandMode(K.checked);c.style.visibility=K.checked?"visible":"hidden"};mxEvent.addListener(K,"change",L);L();mxEvent.addListener(c,"change",function(){x.freehand.setBrushSize(parseInt(this.value))})}var e=+mxUtils.button(mxResources.get("startDrawing"),function(){x.freehand.isDrawing()?x.freehand.stopDrawing():x.freehand.startDrawing()});e.setAttribute("title",mxResources.get("startDrawing")+" (X)");e.style.margin=y?"5px 0 0 0":"10px 0 0 0";e.style.width="90%";e.style.boxSizing="border-box";e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.textAlign="center";e.className="geBtn gePrimaryBtn";D.appendChild(e);this.window=new mxWindow(mxResources.get("freehand"),D,g,l,d,q,!0,!0);this.window.destroyOnClose=+!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);x.addListener("freehandStateChanged",mxUtils.bind(this,function(){e.innerText="";mxUtils.write(e,mxResources.get(x.freehand.isDrawing()?"stopDrawing":"startDrawing"));var f=document.createElement("span");f.style.opacity="0.7";f.style["float"]="right";mxUtils.write(f,"X");e.appendChild(f);e.setAttribute("title",mxResources.get(x.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");e.className="geBtn"+(x.freehand.isDrawing()?+" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){x.freehand.isDrawing()&&x.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,g,l,d,q){var y=b.editor.graph,x=document.createElement("div");x.style.userSelect="none";x.style.overflow="hidden";x.style.height="100%";var D=document.createElement("div");D.style.display="flex";D.style.alignItems="center";+D.style.justifyContent="center";D.style.paddingTop="20px";var J=document.createElement("input");J.setAttribute("type","checkbox");J.style.marginRight="4px";J.checked=!0;var K=document.createElement("input");K.setAttribute("type","checkbox");K.style.marginRight="4px";K.checked=!0;var L=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(y.isSelectionEmpty()?y.getVerticesAndEdges():y.getSelectionCells(),J.checked,K.checked)}));+L.setAttribute("title","Convert Colors");L.className="geBtn gePrimaryBtn";D.appendChild(L);x.appendChild(D);D=D.cloneNode(!1);D.appendChild(K);D.style.paddingTop="8px";mxUtils.write(D,mxResources.get("background"));x.appendChild(D);D=D.cloneNode(!1);D.appendChild(J);D.style.paddingTop="8px";mxUtils.write(D,mxResources.get("labels"));x.appendChild(D);this.window=new mxWindow(mxResources.get("adaptiveColors"),x,g,l,d,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);+this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,g,l,d,q){function y(){Q=!0;n.value=m;N.isSelectionEmpty()?(z.setAttribute("disabled","disabled"),"selectionOnly"==n.value&&(n.value="includeCopyOfMyDiagram")):z.removeAttribute("disabled");b.isDiagramEmpty()?(t.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==n.value&&(n.value="help")):t.removeAttribute("disabled");+Q=!1}function x(A,B,H){var T=document.createElement("button");T.className="geBtn gePrimaryBtn";T.style.padding="4px";T.style.height="auto";T.style.position="relative";"flex"==H?(T.style.overflow="hidden",T.style.textOverflow="ellipsis",T.style.whiteSpace="nowrap",T.style.margin="0px",T.style.flexGrow="1"):(T.style.display="block",T.style.margin="8px",T.style.left="50%",T.style.transform="translateX(-50%)");mxUtils.write(T,A);T.setAttribute("title",A);mxEvent.addListener(T,"click",B);return T}function D(A){var B=+document.createElement("div");B.style.display="block";B.style.position="relative";B.style.backgroundColor="#e0e0e0";B.style.borderRadius="4px";B.style.wordWrap="break-word";B.style.textAlign="left";B.style.padding="6px";B.style.margin="12px";B.style.left="0px";B.style.right="0px";mxUtils.write(B,A);e.appendChild(B);return B}function J(A){var B=A.indexOf("<mxGraphModel "),H=A.indexOf("</mxGraphModel>");0>B&&(B=A.indexOf("<mxGraphModel>"));if(0<=B&&H>B){var T=mxUtils,k=T.trim,v=A.substring(0,B),G=v.indexOf("```");+0<=G&&(v=v.substring(v,0,G+6));T=k.call(T,v);B=A.substring(B,H+15);k=mxUtils;v=k.trim;A=A.substring(H+15);H=A.lastIndexOf("```");0<=H&&(A=A.substring(H+3));return[T,B,v.call(k,A)]}return null}function K(A){var B=D(A);B.style.cursor="pointer";B.style.marginBottom="2px";B.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(B,"click",function(V){O.value=A;O.focus()});var H=D("");H.style.marginTop="2px";var T=b.currentPage,k=A,v=[],G=null;if("includeCopyOfMyDiagram"==n.value||"selectionOnly"==+n.value){var I=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==n.value&&(I.isObjectIgnored=function(V){return V.constructor==mxCell&&!N.model.isRoot(V)&&!N.model.isLayer(V)&&!N.isCellSelected(V)&&!N.isAncestorSelected(V)});G=I.encode(N.getModel());I.document.appendChild(G);v.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(G)})}else"create"==+n.value?(k=C.value.replace(/([A-Z])/g," $1").toLowerCase(),k="Write the declaration code for a "+(""!=k?k:"graph")+' that shows "'+(""!=A?A:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):v.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});v.push({role:"user",content:k});var M={model:Editor.gptModel,+messages:v},P=0;for(v=0;v<M.messages.length;v++)P+=M.messages[v].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){H.innerHTML="";mxUtils.write(H,mxResources.get("loading")+"...");var V=document.createElement("img");V.setAttribute("title","Processing "+P+" tokens");V.setAttribute("src",IMAGE_PATH+"/spin.gif");V.style.marginLeft="6px";H.appendChild(V);H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=+new mxXmlRequest(Editor.gptUrl,JSON.stringify(M),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ba,ea){ba.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ba.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ba){W.clear();H.innerHTML="";mxUtils.write(H,ba.message);H.appendChild(x(mxResources.get("tryAgain"),S));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ba)}),Y=mxUtils.bind(this,function(ba){var ea=+J(ba),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){ba=document.createElement("div");ba.style.display="inline-block";ba.style.position="relative";ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var fa=mxUtils.parseXml(ea[1]),aa=new mxCodec(fa),da=new mxGraphModel;aa.decode(fa.documentElement,da);var ha=null;null!=G&&(fa=new mxCodec(G.ownerDocument),ha=new mxGraphModel,fa.decode(G,ha));fa=mxUtils.bind(this,function(pa){N.model.beginUpdate();try{if(null!=+ha&&null!=b.getPageIndex(T)){b.selectPage(T);var na=b.diffCells(ha.root,da.root);b.patchPage(T,na,null,!0)}else{var ia=da.getChildren(da.getChildAt(da.getRoot(),0));N.setSelectionCells(N.importCells(ia))}}finally{N.model.endUpdate()}mxEvent.consume(pa)});aa=N.getBoundingBoxFromGeometry(ca);null!=aa?(ba.style.cursor="move",ba.appendChild(b.sidebar.createVertexTemplateFromCells(ca,aa.width,aa.height,"",!0,null,!0,!0,fa,160,120))):(ba.style.padding="14px",mxUtils.write(ba,mxResources.get("noPreview")));+H.innerHTML="";B=H;0<ea[0].length&&(mxUtils.write(B,ea[0]),mxUtils.br(B));B.appendChild(ba);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(x(mxResources.get("tryAgain"),S,"flex"));ca.appendChild(x(mxResources.get(null!=G?"apply":"insert"),fa,"flex"));H.appendChild(ca);0<ea[2].length&&(mxUtils.br(B),mxUtils.write(B,ea[2]));B.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else H.innerHTML="",B=H,mxUtils.write(B,ba),+H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(ba){if(W.clear())try{if(200<=ba.getStatus()&&299>=ba.getStatus()){var ea=JSON.parse(ba.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",M,"response:",ea);var ca=mxUtils.trim(ea.choices[0].message.content);if("create"==n.value){var fa=b.extractMermaidDeclaration(ca);null!=fa?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ha){Y(ha)})),b.generateMermaidImage(fa,null,function(){},+function(ha){mxMermaidToDrawio.resetListeners();Z(ha)})):(Y(ca),H.appendChild(x(mxResources.get("tryAgain"),S)))}else Y(ca)}else{var aa="Error: "+ba.getStatus();try{var da=JSON.parse(ba.getText());null!=da&&null!=da.error&&null!=da.error.message&&(aa=da.error.message)}catch(ha){}H.innerHTML="";mxUtils.write(H,aa);H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ha){Z(ha)}}),Z)}),function(W){H.innerHTML="";mxUtils.write(H,W.message);H.appendChild(x(mxResources.get("tryAgain"),+S));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function L(){""!=mxUtils.trim(O.value)&&(K(O.value),O.value="")}var N=b.editor.graph,c=document.createElement("div");c.style.textAlign="center";c.style.overflow="hidden";c.style.height="100%";var e=document.createElement("div");e.style.position="absolute";e.style.overflow="auto";e.style.top="0px";e.style.left="0px";e.style.right="0px";e.style.bottom="104px";c.appendChild(e);var f=document.createElement("div");f.style.position=+"absolute";f.style.boxSizing="border-box";f.style.borderRadius="4px";f.style.border="1px solid lightgray";f.style.margin="8px 8px 16px 8px";f.style.padding="8px";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.padding="6px";f.style.height="80px";var p=document.createElement("div");p.style.display="flex";p.style.gap="6px";p.style.marginBottom="6px";var n=document.createElement("select");n.style.textOverflow="ellipsis";n.style.flexGrow="1";n.style.padding="4px";n.style.minWidth=+"0";f.appendChild(p);var t=document.createElement("option");t.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram"));n.appendChild(t);var z=document.createElement("option");z.setAttribute("value","selectionOnly");mxUtils.write(z,mxResources.get("selectionOnly"));n.appendChild(z);p.appendChild(n);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var F=document.createElement("option");F.setAttribute("value","create");mxUtils.write(F,+mxResources.get("create"));n.appendChild(F)}F=document.createElement("option");F.setAttribute("value","help");mxUtils.write(F,mxResources.get("help"));n.appendChild(F);F=document.createElement("option");F.setAttribute("value","reset");mxUtils.write(F,mxResources.get("reset"));n.appendChild(F);var C=document.createElement("select");C.style.textOverflow="ellipsis";C.style.flexGrow="1";C.style.padding="4px";C.style.minWidth="0";for(F=0;F<EditorUi.mermaidDiagramTypes.length;F++){var E=document.createElement("option"),+R=EditorUi.mermaidDiagramTypes[F],U=R;"erDiagram"==U&&(U="entityRelationshipDiagram");U=mxResources.get(U,null,U.charAt(0).toUpperCase()+U.substring(1).replace(/[A-Z]/g," $&"));E.setAttribute("value",R);mxUtils.write(E,U);C.appendChild(E)}p.appendChild(C);p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.textOverflow="clip";p.style.cursor="default";var O=document.createElement("input");O.setAttribute("type","text");O.style.width="100%";O.style.outline="none";O.style.border="none";+O.style.background="transparent";O.style.padding="8px 26px 8px 8px";O.style.boxSizing="border-box";p.appendChild(O);F=document.createElement("img");F.setAttribute("src",Editor.sendImage);F.setAttribute("title",mxResources.get("sendMessage"));F.className="geAdaptiveAsset";F.style.position="relative";F.style.cursor="pointer";F.style.opacity="0.5";F.style.height="19px";F.style.left="-24px";F.style.top="5px";F.style.background="url('"+b.editor.transparentImage+"')";p.appendChild(F);f.appendChild(p);N.isSelectionEmpty()?+b.isDiagramEmpty()?n.value="help":n.value="includeCopyOfMyDiagram":n.value="selectionOnly";var Q=!1,m=n.value,u=function(){O.setAttribute("placeholder",mxResources.get("create"==n.value?"describeYourDiagram":"askMeAnything"));"create"==n.value?(n.style.width="",C.style.display=""):(n.style.width="100%",C.style.display="none")};u();mxEvent.addListener(n,"change",function(){Q||("reset"==n.value?(n.value=m,e.innerHTML=""):m=n.value,u())});N.selectionModel.addListener(mxEvent.CHANGE,y);N.getModel().addListener(mxEvent.CHANGE,+y);y();mxEvent.addListener(F,"click",L);mxEvent.addListener(O,"keydown",function(A){13!=A.keyCode||mxEvent.isShiftDown(A)||L()});c.appendChild(f);this.window=new mxWindow(mxResources.get("chatWindowTitle"),c,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){N.getModel().removeListener(y)}));this.window.addListener("show",+mxUtils.bind(this,function(){this.window.fit();O.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,g,l,d,q){var y=b.editor.graph,x=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)x=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var D=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(J,K){if(y.isEnabled()){var L=new FilenameDialog(b,"",mxResources.get("add"),function(N){b.hideDialog();if(null!=N&&0<N.length){N=+N.split(" ");for(var c=[],e=[],f=0;f<N.length;f++){var p=mxUtils.trim(N[f]);""!=p&&(e.push(p),0>mxUtils.indexOf(J,p)&&c.push(p))}y.isSelectionEmpty()?K(J.concat(c)):y.addTagsForCells(y.getSelectionCells(),e)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(L.container,320,80,!0,!0);L.init()}},x);x=D.div;this.window=new mxWindow(mxResources.get("tags"),x,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;+this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){D.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,g,l,d){var q=document.createElement("div");q.style.textAlign="center";var y=document.createElement("p");y.style.fontSize="16pt";y.style.padding="0px";y.style.margin="0px";y.style.color="gray";mxUtils.write(y,mxResources.get("authorizationRequired"));var x="Unknown",+D=document.createElement("img");D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.marginRight="10px";g==b.drive?(x=mxResources.get("googleDrive"),D.src=IMAGE_PATH+"/google-drive-logo-white.svg"):g==b.dropbox?(x=mxResources.get("dropbox"),D.src=IMAGE_PATH+"/dropbox-logo-white.svg"):g==b.oneDrive?(x=mxResources.get("oneDrive"),D.src=IMAGE_PATH+"/onedrive-logo-white.svg"):g==b.gitHub?(x=mxResources.get("github"),D.src=IMAGE_PATH+"/github-logo-white.svg"):g==b.gitLab?(x=mxResources.get("gitlab"),+D.src=IMAGE_PATH+"/gitlab-logo.svg",D.style.width="32px"):g==b.trello&&(x=mxResources.get("trello"),D.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[x]));var J=document.createElement("input");J.setAttribute("type","checkbox");x=mxUtils.button(mxResources.get("authorize"),function(){d(J.checked)});x.insertBefore(D,x.firstChild);x.style.marginTop="6px";x.className="geBigButton";x.style.fontSize="18px";x.style.padding="14px";+q.appendChild(y);q.appendChild(b);q.appendChild(x);l&&(l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(J),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberMe")),l.appendChild(y),q.appendChild(l),J.checked=!0,J.defaultChecked=!0,mxEvent.addListener(y,"click",function(K){J.checked=!J.checked;mxEvent.consume(K)}));this.container=q},MoreShapesDialog=function(b,g,l){l=null!=l?l:b.sidebar.entries;var d=document.createElement("div"),q=[];if(null!=b.sidebar.customEntries)for(var y=+0;y<b.sidebar.customEntries.length;y++){for(var x=b.sidebar.customEntries[y]||{},D={title:b.getResource(x.title),entries:[]},J=0;null!=x.entries&&J<x.entries.length;J++){var K=x.entries[J];D.entries.push({id:K.id,title:b.getResource(K.title),desc:b.getResource(K.desc),image:K.preview})}0<D.entries.length&&q.push(D)}for(y=0;y<l.length;y++)if(null==b.sidebar.enabledLibraries)q.push(l[y]);else{D={title:l[y].title,entries:[]};for(J=0;J<l[y].entries.length;J++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,+l[y].entries[J].id)&&D.entries.push(l[y].entries[J]);0<D.entries.length&&q.push(D)}l=q;if(g){y=mxUtils.bind(this,function(R){for(var U=0;U<R.length;U++)(function(O){var Q=f.cloneNode(!1);Q.style.fontWeight="bold";Q.style.backgroundColor="light-dark(#e5e5e5, #505759)";Q.style.padding="6px 0px 6px 20px";mxUtils.write(Q,O.title);L.appendChild(Q);for(var m=0;m<O.entries.length;m++)(function(u){var A=f.cloneNode(!1);A.style.cursor="pointer";A.style.padding="4px 0px 4px 20px";A.style.whiteSpace="nowrap";+A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.setAttribute("title",u.title+" ("+u.id+")");var B=document.createElement("input");B.setAttribute("type","checkbox");B.checked=b.sidebar.isEntryVisible(u.id);B.defaultChecked=B.checked;A.appendChild(B);mxUtils.write(A," "+u.title);L.appendChild(A);var H=function(T){if(null==T||"INPUT"!=mxEvent.getSource(T).nodeName){N.style.textAlign="center";N.style.padding="0px";N.style.color="";N.innerText="";if(null!=u.desc){var k=document.createElement("pre");+k.style.boxSizing="border-box";k.style.fontFamily="inherit";k.style.margin="20px";k.style.right="0px";k.style.textAlign="left";mxUtils.write(k,u.desc);N.appendChild(k)}null!=u.imageCallback?u.imageCallback(N):null!=u.image?(k=document.createElement("img"),k.setAttribute("border","0"),k.style.maxWidth="100%",k.setAttribute("src",u.image),N.appendChild(k)):null==u.desc&&(N.style.padding="20px",N.style.color="rgb(179, 179, 179)",mxUtils.write(N,mxResources.get("noPreview")));null!=c&&(c.style.backgroundColor=+"");c=A;c.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(A,"click",H);mxEvent.addListener(A,"dblclick",function(T){B.checked=!B.checked;mxEvent.consume(T)});e.push(function(){return B.checked?u.id:null});0==U&&0==m&&H()})(O.entries[m])})(R[U])});J=document.createElement("div");J.className="geDialogTitle";mxUtils.write(J,mxResources.get("shapes"));J.style.position="absolute";J.style.top="0px";J.style.left="0px";J.style.lineHeight="40px";J.style.height=+"40px";J.style.right="0px";var L=document.createElement("div"),N=document.createElement("div");L.style.position="absolute";L.style.top="40px";L.style.left="0px";L.style.width="202px";L.style.bottom="60px";L.style.overflow="auto";N.style.position="absolute";N.style.left="202px";N.style.right="0px";N.style.top="40px";N.style.bottom="60px";N.style.overflow="auto";N.style.borderLeftStyle="solid";N.style.borderLeftWidth="1px";N.style.textAlign="center";var c=null,e=[],f=document.createElement("div");f.style.position=+"relative";f.style.left="0px";f.style.right="0px";y(l);d.style.padding="30px";d.appendChild(J);d.appendChild(L);d.appendChild(N);l=document.createElement("div");l.className="geDialogFooter";l.style.position="absolute";l.style.paddingRight="16px";l.style.left="0px";l.style.right="0px";l.style.bottom="0px";l.style.height="60px";l.style.lineHeight="52px";var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.position="relative";p.style.top="1px";p.checked=b.sidebar.sidebarTitles;+p.defaultChecked=p.checked;l.appendChild(p);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("labels"));y.style.paddingRight="20px";l.appendChild(y);mxEvent.addListener(y,"click",function(R){p.checked=!p.checked;mxEvent.consume(R)});var n=document.createElement("input");n.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)y=document.createElement("span"),y.style.paddingRight="20px",y.appendChild(n),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),+n.style.position="relative",n.style.top="1px",n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(y,"click",function(R){mxEvent.getSource(R)!=n&&(n.checked=!n.checked,mxEvent.consume(R))}),l.appendChild(y);y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";J=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],U=0;U<e.length;U++){var O=e[U].apply(this,arguments);null!=O&&R.push(O)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&+"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(U=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=U&&0<R.splice(U,1).length)&&b.toggleScratchpad(),U=mxUtils.indexOf(R,"search"),mxSettings.settings.search=0<=U&&0<R.splice(U,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),n.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),n.checked,!0);b.setSidebarTitles(p.checked,n.checked)});J.className="geBtn gePrimaryBtn"}else{var t=document.createElement("table");+y=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";J=document.createElement("tr");t.style.width="100%";g=document.createElement("td");q=document.createElement("td");x=document.createElement("td");var z=mxUtils.bind(this,function(R,U,O){var Q=document.createElement("input");Q.type="checkbox";t.appendChild(Q);Q.checked=b.sidebar.isEntryVisible(O);var m=document.createElement("span");mxUtils.write(m,U);U=document.createElement("div");U.style.display="block";U.appendChild(Q);+U.appendChild(m);mxEvent.addListener(m,"click",function(u){Q.checked=!Q.checked;mxEvent.consume(u)});R.appendChild(U);return function(){return Q.checked?O:null}});J.appendChild(g);J.appendChild(q);J.appendChild(x);y.appendChild(J);t.appendChild(y);e=[];var F=0;for(y=0;y<l.length;y++)for(J=0;J<l[y].entries.length;J++)F++;var C=[g,q,x],E=0;for(y=0;y<l.length;y++)(function(R){for(var U=0;U<R.entries.length;U++){var O=R.entries[U];e.push(z(C[Math.floor(E/(F/3))],O.title,O.id));E++}})(l[y]);d.appendChild(t);+l=document.createElement("div");l.style.marginTop="18px";l.style.textAlign="center";n=document.createElement("input");isLocalStorage&&(n.setAttribute("type","checkbox"),n.checked=!0,n.defaultChecked=!0,l.appendChild(n),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),l.appendChild(y),mxEvent.addListener(y,"click",function(R){n.checked=!n.checked;mxEvent.consume(R)}));d.appendChild(l);y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});+y.className="geBtn";J=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],U=0;U<e.length;U++){var O=e[U].apply(this,arguments);null!=O&&R.push(O)}b.sidebar.showEntries(0<R.length?R.join(";"):"",n.checked);b.hideDialog()});J.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right"}b.editor.cancelFirst?(l.appendChild(y),l.appendChild(J)):(l.appendChild(J),l.appendChild(y));d.appendChild(l);this.container=d},PluginsDialog=function(b,+g,l,d){function q(){J=!0;if(0==D.length)x.innerText=mxResources.get("noPlugins");else{x.innerText="";for(var e=0;e<D.length;e++){var f=document.createElement("span");f.style.display="flex";f.style.alignItems="center";f.style.whiteSpace="nowrap";var p=document.createElement("img");p.src=Editor.trashImage;p.style.position="relative";p.style.cursor="pointer";p.style.marginRight="4px";p.style.display="inline-block";p.style.width="18px";p.setAttribute("title",mxResources.get("delete"));f.appendChild(p);+mxUtils.write(f,D[e]);x.appendChild(f);mxUtils.br(x);mxEvent.addListener(p,"click",function(n){return function(){b.confirm(mxResources.get("delete")+' "'+D[n]+'"?',function(){null!=l&&l(D[n]);D.splice(n,1);q()})}}(e))}}}var y=document.createElement("div"),x=document.createElement("div");x.style.height="180px";x.style.overflow="auto";var D=mxSettings.getPlugins().slice(),J=!1;y.appendChild(x);q();J=!1;var K=mxUtils.button(mxResources.get("add"),null!=g?function(){g(function(e){e&&0>mxUtils.indexOf(D,+e)&&D.push(e);q()})}:function(){var e=document.createElement("div"),f=document.createElement("span");f.style.marginTop="6px";mxUtils.write(f,mxResources.get("builtinPlugins")+": ");e.appendChild(f);var p=document.createElement("select");p.style.width="150px";for(f=0;f<App.publicPlugin.length;f++){var n=document.createElement("option");mxUtils.write(n,App.publicPlugin[f]);n.value=App.publicPlugin[f];p.appendChild(n)}e.appendChild(p);mxUtils.br(e);mxUtils.br(e);f=mxUtils.button(mxResources.get("custom")++"...",function(){var t=new FilenameDialog(b,"",mxResources.get("add"),function(z){b.hideDialog();if(null!=z&&0<z.length){z=z.split(";");for(var F=0;F<z.length;F++){var C=z[F],E=App.pluginRegistry[C];null!=E&&(C=E);0<C.length&&0>mxUtils.indexOf(D,C)&&D.push(C)}q()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(t.container,300,80,!0,!0);t.init()});f.className="geBtn";ALLOW_CUSTOM_PLUGINS||(f.style.display="none");e=new CustomDialog(b,e,mxUtils.bind(this,function(){var t=+App.pluginRegistry[p.value];0>mxUtils.indexOf(D,t)&&(D.push(t),q())}),null,null,null,f);b.showDialog(e.container,360,100,!0,!0)});K.className="geBtn";var L=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});L.className="geBtn";var N=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){J?(mxSettings.setPlugins(D),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});N.className="geBtn gePrimaryBtn";var c=document.createElement("div");+c.style.marginTop="14px";c.style.textAlign="right";b.isOffline()||c.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||c.appendChild(L),c.appendChild(K),c.appendChild(N)):(c.appendChild(K),c.appendChild(N),d||c.appendChild(L));y.appendChild(c);this.container=y},CropImageDialog=function(b,g,l,d){function q(){var R=n.checked,U=t.checked,O=e.geometry,Q=J.width,m=J.height,u=(300-Q)/2,A=(300-m)/2;O.x<u?(O.width-=u-O.x,O.x=u):O.x+O.width>u+Q&&(O.width=u+Q-O.x,+O.x=Math.min(O.x,u+Q));O.y<A?(O.height-=A-O.y,O.y=A):O.y+O.height>A+m&&(O.height=A+m-O.y,O.y=Math.min(O.y,A+m));var B=(O.x-u)/Q*100;Q=100-(O.x+O.width-u)/Q*100;u=(O.y-A)/m*100;O=100-(O.y+O.height-A)/m*100;return"inset("+mxUtils.format(u)+"% "+mxUtils.format(Q)+"% "+mxUtils.format(O)+"% "+mxUtils.format(B)+"%"+(R?" round "+c+"%":U?" round 50%":"")+")"}function y(R){null!=L&&(!0!==R&&(L.model.setGeometry(e,N.clone()),c=5,F.value=c),L.model.setStyle(e,f+q()),L.selectAll(),z.style.visibility=n.checked?+"visible":"hidden")}var x=document.createElement("div"),D=document.createElement("div");D.style.height="300px";D.style.width="300px";D.style.display="inline-flex";D.style.justifyContent="center";D.style.alignItems="center";D.style.position="absolute";var J=document.createElement("img");J.onload=function(){function R(){L.model.setStyle(e,f+q())}L=new Graph(K);L.autoExtend=!1;L.autoScroll=!1;L.setGridEnabled(!1);L.setEnabled(!0);L.setPanning(!1);L.setConnectable(!1);L.getRubberband().setEnabled(!1);+L.graphHandler.allowLivePreview=!1;var U=L.createVertexHandler;L.createVertexHandler=function(){var P=U.apply(this,arguments);P.livePreview=!1;return P};if(null!=l)try{if("inset"==l.substring(0,5)){var O=e.geometry,Q=J.width,m=J.height,u=(300-Q)/2,A=(300-m)/2,B=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),H=parseFloat(B[0]),T=parseFloat(B[1]),k=parseFloat(B[2]),v=parseFloat(B[3]);isFinite(H)&&isFinite(T)&&isFinite(k)&&isFinite(v)?(O.x=v/100*Q+u,O.y=H/100*m+A,O.width=(100-T)/100*Q+u-O.x,O.height=(100-+k)/100*m+A-O.y,"round"==B[4]?"50%"==B[5]?t.setAttribute("checked","checked"):(c=parseInt(B[5]),F.value=c,n.setAttribute("checked","checked"),z.style.visibility="visible"):p.setAttribute("checked","checked")):l=null}else l=null}catch(P){}e.style=f+(l?l:q());e.vertex=!0;L.addCell(e,null,null,null,null);L.selectAll();L.addListener(mxEvent.CELLS_MOVED,R);L.addListener(mxEvent.CELLS_RESIZED,R);var G=L.graphHandler.mouseUp,I=L.graphHandler.mouseDown;L.graphHandler.mouseUp=function(){G.apply(this,arguments);+K.style.backgroundColor="#fff9"};L.graphHandler.mouseDown=function(){I.apply(this,arguments);K.style.backgroundColor=""};L.dblClick=function(){};var M=L.getSelectionModel().changeSelection;L.getSelectionModel().changeSelection=function(){M.call(this,[e],[e])}};J.onerror=function(){J.onload=null;J.src=Editor.errorImage};J.setAttribute("src",g);J.style.maxWidth="300px";J.style.maxHeight="300px";D.appendChild(J);x.appendChild(D);var K=document.createElement("div");K.style.width="300px";K.style.height=+"300px";K.style.overflow="hidden";K.style.backgroundColor="#fff9";x.appendChild(K);var L=null,N=new mxGeometry(100,100,100,100),c=5,e=new mxCell("",N.clone(),""),f="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+g.replace(";base64","")+";clipPath=",p=document.createElement("input");p.setAttribute("type","radio");p.setAttribute("id","croppingRect");p.setAttribute("name","croppingShape");p.setAttribute("checked","checked");p.style.margin="5px";x.appendChild(p);g=document.createElement("label");+g.setAttribute("for","croppingRect");mxUtils.write(g,mxResources.get("rectangle"));x.appendChild(g);var n=document.createElement("input");n.setAttribute("type","radio");n.setAttribute("id","croppingRounded");n.setAttribute("name","croppingShape");n.style.margin="5px";x.appendChild(n);g=document.createElement("label");g.setAttribute("for","croppingRounded");mxUtils.write(g,mxResources.get("rounded"));x.appendChild(g);var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id",+"croppingEllipse");t.setAttribute("name","croppingShape");t.style.margin="5px";x.appendChild(t);g=document.createElement("label");g.setAttribute("for","croppingEllipse");mxUtils.write(g,mxResources.get("ellipse"));x.appendChild(g);mxEvent.addListener(p,"change",y);mxEvent.addListener(n,"change",y);mxEvent.addListener(t,"change",y);var z=document.createElement("div");z.style.textAlign="center";z.style.visibility="hidden";var F=document.createElement("input");F.setAttribute("type","range");F.setAttribute("min",+"1");F.setAttribute("max","49");F.setAttribute("value",c);F.setAttribute("title",mxResources.get("arcSize"));z.appendChild(F);x.appendChild(z);mxEvent.addListener(F,"change",function(){c=this.value;y(!0)});g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";D=mxUtils.button(mxResources.get("apply"),function(){d(q(),e.geometry.width,e.geometry.height);b.hideDialog()});D.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("reset"),function(){d(null,+J.width,J.height);b.hideDialog()});C.className="geBtn";var E=document.createElement("div");E.style.marginTop="10px";E.style.textAlign="right";b.editor.cancelFirst?(E.appendChild(g),E.appendChild(C),E.appendChild(D)):(E.appendChild(C),E.appendChild(D),E.appendChild(g));x.appendChild(E);this.container=x},EditGeometryDialog=function(b,g){var l=b.editor.graph,d=1==g.length?l.getCellGeometry(g[0]):null,q=document.createElement("div"),y=document.createElement("table"),x=document.createElement("tbody"),+D=document.createElement("tr"),J=document.createElement("td"),K=document.createElement("td");y.style.paddingLeft="6px";mxUtils.write(J,mxResources.get("relative")+":");var L=document.createElement("input");L.setAttribute("type","checkbox");null!=d&&d.relative&&(L.setAttribute("checked","checked"),L.defaultChecked=!0);this.init=function(){L.focus()};K.appendChild(L);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");+mxUtils.write(J,mxResources.get("left")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.width="100px";N.value=null!=d?d.x:"";K.appendChild(N);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("top")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width="100px";c.value=null!=d?d.y:"";K.appendChild(c);D.appendChild(J);+D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("dx")+":");var e=document.createElement("input");e.setAttribute("type","text");e.style.width="100px";e.value=null!=d&&null!=d.offset?d.offset.x:"";K.appendChild(e);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("dy")++":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=d&&null!=d.offset?d.offset.y:"";K.appendChild(f);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("width")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.width:"";K.appendChild(p);D.appendChild(J);D.appendChild(K);+x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=d?d.height:"";K.appendChild(n);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("rotation")+":");var t=document.createElement("input");+t.setAttribute("type","text");t.style.width="100px";t.value=1==g.length?mxUtils.getValue(l.getCellStyle(g[0]),mxConstants.STYLE_ROTATION,0):"";K.appendChild(t);D.appendChild(J);D.appendChild(K);x.appendChild(D);y.appendChild(x);q.appendChild(y);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var z=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();l.getModel().beginUpdate();try{for(var F=0;F<g.length;F++){var C=l.getCellGeometry(g[F]);null!=+C&&(C=C.clone(),l.isCellMovable(g[F])&&(C.relative=L.checked,0<mxUtils.trim(N.value).length&&(C.x=Number(N.value)),0<mxUtils.trim(c.value).length&&(C.y=Number(c.value)),0<mxUtils.trim(e.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=Number(e.value)),0<mxUtils.trim(f.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(f.value))),l.isCellResizable(g[F])&&(0<mxUtils.trim(p.value).length&&(C.width=Number(p.value)),0<mxUtils.trim(n.value).length&&(C.height=Number(n.value))),+l.getModel().setGeometry(g[F],C));0<mxUtils.trim(t.value).length&&l.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[g[F]])}}finally{l.getModel().endUpdate()}});z.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",function(F){13==F.keyCode&&z.click()});y=document.createElement("div");y.style.marginTop="20px";y.style.textAlign="right";b.editor.cancelFirst?(y.appendChild(d),y.appendChild(z)):(y.appendChild(z),y.appendChild(d));q.appendChild(y);this.container=q},LibraryDialog=function(b,+g,l,d,q,y,x){function D(O){for(O=document.elementFromPoint(O.clientX,O.clientY);null!=O&&O.parentNode!=f;)O=O.parentNode;var Q=null;if(null!=O){var m=f.firstChild;for(Q=0;null!=m&&m!=O;)m=m.nextSibling,Q++}return Q}function J(O,Q,m,u,A,B,H,T,k){try{if(b.spinner.stop(),null==Q||"image/"==Q.substring(0,6))if(null==O&&null!=H||null==n[O]){var v=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?+Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};f.style.backgroundImage="";p.style.display="none";var G=A,I=B;if(A>b.maxImageSize||B>b.maxImageSize){var M=Math.min(1,Math.min(b.maxImageSize/Math.max(1,A)),b.maxImageSize/Math.max(1,B));A*=M;B*=M}G>I?(I=Math.round(100*I/G),G=100):(G=Math.round(100*G/I),I=100);var P=document.createElement("div");P.setAttribute("draggable","true");P.style.display="inline-block";P.style.position="relative";P.style.padding=+"0 12px";P.style.cursor="move";mxUtils.setPrefixedStyle(P.style,"transition","transform .1s ease-in-out");if(null!=O){var S=document.createElement("img");S.setAttribute("src",C.convert(O));S.style.width=G+"px";S.style.height=I+"px";S.style.margin="10px";S.style.paddingBottom=Math.floor((100-I)/2)+"px";S.style.paddingLeft=Math.floor((100-G)/2)+"px";P.appendChild(S)}else if(null!=H){var V=b.stringToCells("<"==H.xml.charAt(0)?H.xml:Graph.decompress(H.xml));0<V.length&&(b.sidebar.createThumb(V,100,100,+P,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),P.firstChild.style.display="inline-block",P.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(fa){mxEvent.consume(fa)});+(function(fa,aa,da){mxEvent.addListener(W,"click",function(ha){n[aa]=null;for(var pa=0;pa<N.length;pa++)if(null!=N[pa].data&&N[pa].data==aa||null!=N[pa].xml&&null!=da&&N[pa].xml==da.xml){N.splice(pa,1);break}P.parentNode.removeChild(fa);0==N.length&&(f.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ha)});mxEvent.addListener(W,"dblclick",function(ha){mxEvent.consume(ha)})})(P,O,H);P.appendChild(W);P.style.marginBottom="30px";var X=document.createElement("div");+X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign="center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=O?(Z={data:O,w:A,h:B,title:k},null!=T&&(Z.aspect=T),n[O]=S,N.push(Z)):null!=H&&(H.aspect="fixed",N.push(H),Z=H);mxEvent.addListener(X,"keydown",function(fa){13==fa.keyCode&&null!=F&&(F(),F=null,mxEvent.consume(fa))});+v();P.appendChild(X);mxEvent.addListener(X,"mousedown",function(fa){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(fa)});V=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var aa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(da){null!=da&&(Z.title=da,v())},mxResources.get("enterValue"));b.showDialog(aa.container,300,80,!0,!0);aa.init();mxEvent.consume(fa)}else if("true"!=X.getAttribute("contentEditable")){null!=+F&&(F(),F=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);F=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=X.innerHTML;v()};mxEvent.consume(fa)}};mxEvent.addListener(X,"click",V);mxEvent.addListener(P,"dblclick",V);f.appendChild(P);+mxEvent.addListener(P,"dragstart",function(fa){null==F&&(null==O&&null!=H&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=H.xml&&fa.dataTransfer.setData("Text",H.xml),t=D(fa),mxClient.IS_GC&&(P.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(P.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(P,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(P,"dragend",function(fa){"hidden"==W.style.visibility&&(W.style.visibility=+"",X.style.visibility="");t=null;mxUtils.setOpacity(P,100);mxUtils.setPrefixedStyle(P.style,"transform",null)})}else E||(E=!0,b.handleError({message:mxResources.get("fileExists")}));else{A=!1;try{if(G=mxUtils.parseXml(O),"mxlibrary"==G.documentElement.nodeName){I=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=I&&0<I.length)for(var Y=0;Y<I.length;Y++)null!=I[Y].xml?J(null,null,0,0,0,0,I[Y]):J(I[Y].data,null,0,0,I[Y].w,I[Y].h,null,"fixed",I[Y].title);A=!0}else if("mxfile"==G.documentElement.nodeName){var ba=+G.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=Editor.getDiagramNodeXml(ba[Y]);V=b.stringToCells(ea);if(0<V.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(V);null!=ca&&J(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}A=!0}}catch(fa){null!=window.console&&console.error("Error in library dialog: "+fa)}A||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){null!=window.console&&console.log("Error in library dialog: "++fa)}return null}function K(O){O.dataTransfer.dropEffect=null!=t?"move":"copy";O.stopPropagation();O.preventDefault()}function L(O){O.stopPropagation();O.preventDefault();E=!1;z=D(O);if(null!=t)null!=z&&z<f.children.length?(N.splice(z>t?z-1:z,0,N.splice(t,1)[0]),f.insertBefore(f.children[t],f.children[z])):(N.push(N.splice(t,1)[0]),f.appendChild(f.children[t]));else if(0<O.dataTransfer.files.length)b.importFiles(O.dataTransfer.files,0,0,b.maxImageSize,R(O));else if(0<=mxUtils.indexOf(O.dataTransfer.types,+"text/uri-list")){var Q=decodeURIComponent(O.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(Q)||/(\.png)($|\?)/i.test(Q)||/(\.gif)($|\?)/i.test(Q)||/(\.svg)($|\?)/i.test(Q))&&b.loadImage(Q,function(m){J(Q,null,0,0,m.width,m.height);f.scrollTop=f.scrollHeight})}O.stopPropagation();O.preventDefault()}var N=[];l=document.createElement("div");l.style.height="100%";var c=document.createElement("div");c.style.whiteSpace="nowrap";c.style.height="40px";l.appendChild(c);mxUtils.write(c,mxResources.get("filename")++":");null==g&&(g=b.defaultLibraryName+".xml");var e=document.createElement("input");e.setAttribute("value",g);e.style.marginRight="20px";e.style.marginLeft="10px";e.style.width="500px";null==q||q.isRenamable()||e.setAttribute("disabled","true");this.init=function(){if(null==q||q.isRenamable())e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)};c.appendChild(e);Editor.enableUncompressedLibraries&&(e.style.width="420px",g=document.createElement("input"),+g.setAttribute("type","checkbox"),g.style.marginRight="10px",c.appendChild(g),mxUtils.write(c,mxResources.get("compressed")));var f=document.createElement("div");f.style.borderWidth="1px 0px 1px 0px";f.style.borderColor="#d3d3d3";f.style.borderStyle="solid";f.style.marginTop="6px";f.style.overflow="auto";f.style.height="340px";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";0==N.length&&Graph.fileSupport&&(f.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");+var p=document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));l.appendChild(p);var n={},t=null,z=null,F=null;c=function(O){"true"!=mxEvent.getSource(O).getAttribute("contentEditable")&&null!=F&&(F(),F=null,mxEvent.consume(O))};mxEvent.addListener(f,"mousedown",c);mxEvent.addListener(f,"pointerdown",c);mxEvent.addListener(f,"touchstart",+c);var C=new mxUrlConverter,E=!1;if(null!=d)for(c=0;c<d.length;c++)g=d[c],J(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(f,"dragleave",function(O){p.style.cursor="";for(var Q=mxEvent.getSource(O);null!=Q;){if(Q==f||Q==p){O.stopPropagation();O.preventDefault();break}Q=Q.parentNode}});var R=function(O){return function(Q,m,u,A,B,H,T,k,v){null!=v&&EditorUi.isVisioFilename(v.name)?b.importVisio(v,mxUtils.bind(this,function(G){J(G,m,u,A,B,H,T,"fixed",mxEvent.isAltDown(O)?null:T.substring(0,+T.lastIndexOf(".")).replace(/_/g," "))})):null!=v&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(Q,v.name)?b.isExternalDataComms()?b.parseFile(v,mxUtils.bind(this,function(G){4==G.readyState&&(b.spinner.stop(),200<=G.status&&299>=G.status&&(J(G.responseText,m,u,A,B,H,T,"fixed",mxEvent.isAltDown(O)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),f.scrollTop=f.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(J(Q,m,u,A,B,H,T,"fixed",+mxEvent.isAltDown(O)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),f.scrollTop=f.scrollHeight)}};mxEvent.addListener(f,"dragover",K);mxEvent.addListener(f,"drop",L);mxEvent.addListener(p,"dragover",K);mxEvent.addListener(p,"drop",L);l.appendChild(f);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";b.editor.cancelFirst&&d.appendChild(c);+"draw.io"!=b.getServiceName()||null==q||q.constructor!=DriveLibrary&&q.constructor!=GitHubLibrary||(g=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(q,function(O){if(null!=O){var Q=b.getSearch("create title mode url drive splash state clibs ui".split(" "));Q+=(0==Q.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(O);O=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+Q,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(O.container,+450,240,!0);O.init()}else q.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(q.getId(),q)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),g.className="geBtn",d.appendChild(g));g=mxUtils.button(mxResources.get("export"),function(){var O=b.createLibraryDataFromImages(N),Q=e.value;/(\.xml)$/i.test(Q)||+(Q+=".xml");b.isLocalFileSave()?b.saveLocalFile(O,Q,"text/xml",null,null,null!=x?x:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Q)+"&format=xml&xml="+encodeURIComponent(O))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";d.appendChild(g);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");U.setAttribute("type","file");mxEvent.addListener(U,"change",function(O){E=+!1;b.importFiles(U.files,0,0,b.maxImageSize,function(Q,m,u,A,B,H,T,k,v){null!=U.files&&(R(O)(Q,m,u,A,B,H,T,k,v),U.type="",U.type="file",U.value="")});f.scrollTop=f.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}g=mxUtils.button(mxResources.get("import"),function(){null!=F&&(F(),F=null);b.libDlgFileInputElt.click()});g.setAttribute("id","btnAddImage");g.className="geBtn";d.appendChild(g)}g=mxUtils.button(mxResources.get("addImages"),function(){null!=F&&(F(),+F=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(O,Q,m){E=!1;if(null!=O){if("data:image/"==O.substring(0,11)){var u=O.indexOf(",");0<u&&(O=O.substring(0,u)+";base64,"+O.substring(u+1))}J(O,null,0,0,Q,m);f.scrollTop=f.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className="geBtn";d.appendChild(g);this.saveBtnClickHandler=function(O,Q,m,u){b.saveLibrary(O,Q,m,u)};g=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=F&&(F(),F=null);this.saveBtnClickHandler(e.value,+N,q,y)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";d.appendChild(g);b.editor.cancelFirst||d.appendChild(c);l.appendChild(d);this.container=l},EditShapeDialog=function(b,g,l,d,q){d=null!=d?d:300;q=null!=q?q:120;var y=document.createElement("table"),x=document.createElement("tbody");y.style.cellPadding="4px";var D=document.createElement("tr");var J=document.createElement("td");J.setAttribute("colspan","2");J.style.fontSize="10pt";mxUtils.write(J,l);D.appendChild(J);x.appendChild(D);+D=document.createElement("tr");J=document.createElement("td");var K=document.createElement("textarea");K.style.outline="none";K.style.resize="none";K.style.width=d-200+"px";K.style.height=q+"px";this.textarea=K;this.init=function(){K.focus();K.scrollTop=0};J.appendChild(K);D.appendChild(J);J=document.createElement("td");l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.top="6px";l.style.width="200px";l.style.height=q+4+"px";l.style.overflow="hidden";+l.style.marginBottom="16px";mxEvent.disableContextMenu(l);J.appendChild(l);var L=new Graph(l);L.setEnabled(!1);var N=b.editor.graph.cloneCell(g);L.addCells([N]);l=L.view.getState(N);var c="";null!=l.shape&&null!=l.shape.stencil&&(c=mxUtils.getPrettyXml(l.shape.stencil.desc));mxUtils.write(K,c||"");l=L.getGraphBounds();q=Math.min(160/l.width,(q-40)/l.height);L.view.scaleAndTranslate(q,20/q-l.x,20/q-l.y);D.appendChild(J);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");+J.setAttribute("colspan","2");J.style.paddingTop="2px";J.style.whiteSpace="nowrap";J.setAttribute("align","right");b.isOffline()||(q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),q.className="geBtn",J.appendChild(q));q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";b.editor.cancelFirst&&J.appendChild(q);var e=function(f,p,n){var t=K.value,z=mxUtils.parseXml(t);t=mxUtils.getPrettyXml(z.documentElement);+z=z.documentElement.getElementsByTagName("parsererror");if(null!=z&&0<z.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(n&&b.hideDialog(),z=!f.model.contains(p),!n||z||t!=c){t=Graph.compress(t);f.getModel().beginUpdate();try{if(z){var F=b.editor.graph.getFreeInsertPoint();p.geometry.x=F.x;p.geometry.y=F.y;f.addCell(p)}f.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+t+")",[p])}catch(C){throw C;}finally{f.getModel().endUpdate()}z&&+(f.setSelectionCell(p),f.scrollCellToVisible(p))}};l=mxUtils.button(mxResources.get("preview"),function(){e(L,N,!1)});l.className="geBtn";J.appendChild(l);l=mxUtils.button(mxResources.get("apply"),function(){e(b.editor.graph,g,!0)});l.className="geBtn gePrimaryBtn";J.appendChild(l);b.editor.cancelFirst||J.appendChild(q);D.appendChild(J);x.appendChild(D);y.appendChild(x);this.container=y},CustomDialog=function(b,g,l,d,q,y,x,D,J,K,L,N){var c=document.createElement("div");c.appendChild(g);var e=document.createElement("div");+e.style.marginTop=null!=N?N:"30px";e.style.textAlign="right";null!=x&&e.appendChild(x);b.isOffline()||null==y||e.appendChild(b.createHelpIcon(y));g=mxUtils.button(J||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});g.className="geBtn";D&&(g.style.display="none");b.editor.cancelFirst&&e.appendChild(g);q=mxUtils.button(q||mxResources.get("ok"),mxUtils.bind(this,function(){K||b.hideDialog(null,null,this.container);if(null!=l){var f=l();if("string"===typeof f){b.showError(mxResources.get("error"),+f);return}}K&&b.hideDialog(null,null,this.container)}));e.appendChild(q);q.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(g);if(null!=L)for(D=0;D<L.length;D++)(function(f,p,n){f=mxUtils.button(f,function(t){p(t)});null!=n&&f.setAttribute("title",n);f.className="geBtn";e.appendChild(f)})(L[D][0],L[D][1],L[D][2]);c.appendChild(e);this.cancelBtn=g;this.okButton=q;this.container=c},BtnDialog=function(b,g,l,d){var q=document.createElement("div");q.style.textAlign="center";var y=document.createElement("p");+y.style.fontSize="16pt";y.style.padding="0px";y.style.margin="0px";y.style.color="gray";mxUtils.write(y,mxResources.get("done"));var x="Unknown",D=document.createElement("img");D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.marginRight="10px";g==b.drive?(x=mxResources.get("googleDrive"),D.src=IMAGE_PATH+"/google-drive-logo-white.svg"):g==b.dropbox?(x=mxResources.get("dropbox"),D.src=IMAGE_PATH+"/dropbox-logo-white.svg"):g==b.oneDrive?(x=mxResources.get("oneDrive"),D.src=+IMAGE_PATH+"/onedrive-logo-white.svg"):g==b.gitHub?(x=mxResources.get("github"),D.src=IMAGE_PATH+"/github-logo-white.svg"):g==b.gitLab?(x=mxResources.get("gitlab"),D.src=IMAGE_PATH+"/gitlab-logo.svg"):g==b.trello&&(x=mxResources.get("trello"),D.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[x],"You are now authorized in {1}"));l=mxUtils.button(l,d);l.insertBefore(D,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";+l.style.fontSize="18px";l.style.padding="14px";q.appendChild(y);q.appendChild(b);q.appendChild(l);this.container=q},FontDialog=function(b,g,l,d,q){function y(F){this.style.border="";13==F.keyCode&&z.click()}var x=document.createElement("table"),D=document.createElement("tbody");x.style.marginTop="8px";var J=document.createElement("tr");var K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var L=document.createElement("input");+L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value","sysfonts");L.setAttribute("type","radio");L.setAttribute("name","current-fontdialog");L.setAttribute("id","fontdialog-sysfonts");K.appendChild(L);var N=document.createElement("label");N.setAttribute("for","fontdialog-sysfonts");mxUtils.write(N,mxResources.get("sysFonts",null,"System Fonts"));K.appendChild(N);J.appendChild(K);D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace=+"nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(K);var c=document.createElement("input");"s"==d&&c.setAttribute("value",g);c.style.marginLeft="4px";c.style.width="250px";c.className="dlg_fontName_s";K=document.createElement("td");K.appendChild(c);J.appendChild(K);D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize=+"10pt";K.style.fontWeight="bold";var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","googlefonts");e.setAttribute("type","radio");e.setAttribute("name","current-fontdialog");e.setAttribute("id","fontdialog-googlefonts");K.appendChild(e);N=document.createElement("label");N.setAttribute("for","fontdialog-googlefonts");mxUtils.write(N,mxResources.get("googleFonts",null,"Google Fonts"));K.appendChild(N);if(!b.isOffline()||EditorUi.isElectronApp)N=+b.createHelpIcon("https://fonts.google.com/"),K.appendChild(N);J.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(K);var f=document.createElement("input");"g"==d&&f.setAttribute("value",g);f.style.marginLeft="4px";f.style.width="250px";f.className=+"dlg_fontName_g";K=document.createElement("td");K.appendChild(f);J.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","webfonts");p.setAttribute("type","radio");p.setAttribute("name","current-fontdialog");p.setAttribute("id",+"fontdialog-webfonts");K.appendChild(p);N=document.createElement("label");N.setAttribute("for","fontdialog-webfonts");mxUtils.write(N,mxResources.get("webfonts",null,"Web Fonts"));K.appendChild(N);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(K);var n=+document.createElement("input");"w"==d&&(Editor.enableWebFonts?n.setAttribute("value",g):c.setAttribute("value",g));n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_w";K=document.createElement("td");K.appendChild(n);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontUrl",+null,"Font URL")+":");J.appendChild(K);var t=document.createElement("input");t.setAttribute("value",l||"");t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontUrl";K=document.createElement("td");K.appendChild(t);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);this.init=function(){var F=c;"g"==d?F=f:"w"==d&&Editor.enableWebFonts&&(F=n);F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null)};J=document.createElement("tr");+K=document.createElement("td");K.colSpan=2;K.style.paddingTop="20px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");b.isOffline()||K.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();q()});g.className="geBtn";b.editor.cancelFirst&&K.appendChild(g);var z=mxUtils.button(mxResources.get("apply"),function(){if(L.checked){var F=c.value;var C="s"}else if(e.checked){F=f.value;var E=Editor.GOOGLE_FONTS++encodeURIComponent(F).replace(/%20/g,"+");C="g"}else p.checked&&(F=n.value,E=t.value,C="w");var R=F;var U=E,O=C,Q=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,m=x.querySelector(".dlg_fontName_"+O);null==m||null!=R&&0!=R.length?(m=x.querySelector(".dlg_fontUrl"),null==m||"w"!=O||Q.test(U)?R=!0:(m.style.border="1px solid red",R=!1)):(m.style.border="1px solid red",R=!1);R&&(q(F,E,C),b.hideDialog())});z.className="geBtn gePrimaryBtn";mxEvent.addListener(c,"keypress",+y);mxEvent.addListener(f,"keypress",y);mxEvent.addListener(n,"keypress",y);mxEvent.addListener(t,"keypress",y);mxEvent.addListener(c,"focus",function(){L.setAttribute("checked","checked");L.checked=!0});mxEvent.addListener(f,"focus",function(){e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(n,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(t,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});K.appendChild(z);b.editor.cancelFirst||+K.appendChild(g);J.appendChild(K);D.appendChild(J);x.appendChild(D);this.container=x};+function AspectDialog(b,g,l,d,q){this.aspect={pageId:g||(b.pages?b.pages[0].getId():null),layerIds:l||[]};g=document.createElement("div");var y=document.createElement("h5");y.style.margin="0 0 10px";mxUtils.write(y,mxResources.get("pages"));g.appendChild(y);l=document.createElement("div");l.className="geAspectDlgList";g.appendChild(l);y=document.createElement("h5");y.style.margin="0 0 10px";mxUtils.write(y,mxResources.get("layers"));g.appendChild(y);y=document.createElement("div");y.className="geAspectDlgList";+g.appendChild(y);this.pagesContainer=l;this.layersContainer=y;this.ui=b;l=document.createElement("div");l.style.marginTop="16px";l.style.textAlign="center";y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=q&&q()});y.className="geBtn";b.editor.cancelFirst&&l.appendChild(y);var x=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));l.appendChild(x);x.className="geBtn gePrimaryBtn";+b.editor.cancelFirst||l.appendChild(y);x.setAttribute("disabled","disabled");this.okBtn=x;g.appendChild(l);this.container=g}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var g=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(g.getId(),g.getName(),g.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};+AspectDialog.prototype.createViewer=function(b,g,l,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var q=new Graph(b);q.setTooltips(!1);q.setEnabled(!1);q.setPanning(!1);q.minFitScale=null;q.maxFitScale=null;q.centerZoom=!0;g="mxGraphModel"==g.nodeName?g:Editor.parseDiagramNode(g);if(null!=g){var y=g.getAttribute("background");if(null==y||""==y||y==mxConstants.NONE)y=null!=d?d:"#ffffff";b.style.backgroundColor=y;d=new mxCodec(g.ownerDocument);b=q.getModel();d.decode(g,b);g=b.getChildCount(b.root);+d=null==l;for(y=0;y<g;y++){var x=b.getChildAt(b.root,y);b.setVisible(x,d||l==x.id)}q.maxFitScale=1;q.fit(0);q.center()}return q};+AspectDialog.prototype.createPageItem=function(b,g,l){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(g)+"</div>";this.pagesContainer.appendChild(d);var q=this.createViewer(d.childNodes[0],l);g=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;+this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var y=q.model;y=y.getChildCells(y.getRoot());for(var x=0;x<y.length;x++)this.createLayerItem(y[x],b,q,l)});mxEvent.addListener(d,"click",g);this.aspect.pageId==b&&g()};+AspectDialog.prototype.createLayerItem=function(b,g,l,d){g=l.convertValueToString(b)||mxResources.get("background")||"Background";var q=document.createElement("div");q.setAttribute("data-layer-id",b.id);q.className="geAspectDlgListItem";q.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(g)+"</div>";this.layersContainer.appendChild(q);this.createViewer(q.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=q.className.indexOf("geAspectDlgListItemSelected")?+(q.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(q.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(q,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};+var FilePropertiesDialog=function(b,g){function l(C){var E=K;K=function(R,U){try{C(function(){E(R,U)},U)}catch(O){U(O)}}}var d=document.createElement("table"),q=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var y=b.getCurrentFile(),x=null!=y&&null!=y.getTitle()?y.getTitle():b.defaultFilename,D=/(\.png)$/i.test(x),J=/(\.svg)$/i.test(x),K=function(C,E){C()},L=null!=y?y.isLocked():!1;var N=document.createElement("tr");var c=document.createElement("td");+c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("locked")+":");N.appendChild(c);var e=document.createElement("input");e.setAttribute("type","checkbox");L&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(e);N.appendChild(c);q.appendChild(N);this.init=function(){e.focus()};l(function(C,E){null!=b.fileNode&&L!=e.checked?window.setTimeout(function(){null!=+y&&y.setLocked(e.checked);C()},0):C()});if(D||J){x=1;D=0;N=b.fileNode;null!=N&&(N.hasAttribute("scale")&&(x=parseFloat(N.getAttribute("scale"))),N.hasAttribute("border")&&(D=parseInt(N.getAttribute("border"))));N=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("zoom")+":");N.appendChild(c);var f=document.createElement("input");f.setAttribute("value",100*x+"%");f.style.marginLeft="4px";f.style.width="100%";+c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(f);N.appendChild(c);q.appendChild(N);N=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("borderWidth")+":");N.appendChild(c);var p=document.createElement("input");p.setAttribute("value",D);p.style.marginLeft="4px";p.style.width="100%";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(p);N.appendChild(c);q.appendChild(N);+this.init=this.init||function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?f.select():document.execCommand("selectAll",!1,null)};l(function(C,E){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(f.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(p.value))),null!=y&&y.fileChanged());C()})}else if(!/(\.html)$/i.test(x)&&!/(\.svg)$/i.test(x)){var n=null!=y?y.isCompressed():Editor.defaultCompressed;N=document.createElement("tr");c=document.createElement("td");+c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("compressed")+":");N.appendChild(c);var t=document.createElement("input");t.setAttribute("type","checkbox");n&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(t);N.appendChild(c);q.appendChild(N);this.init=this.init||function(){t.focus()};l(function(C,E){null!=b.fileNode&&n!=+t.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",t.checked?"true":"false");null!=y&&(y.compressionChanged(t.checked),y.fileChanged());C()},0):C()})}if(null!=y&&y.isRealtimeOptional()){N=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("realtimeCollaboration")+":");N.appendChild(c);var z=document.createElement("input");z.setAttribute("type",+"checkbox");var F=y.isRealtimeEnabled();if(F="disabled"!=b.drive.getCustomProperty(y.desc,"collaboration"))z.setAttribute("checked","checked"),z.defaultChecked=!0;l(function(C,E){z.checked!=F?y.setRealtimeEnabled(z.checked,C,E):C()});this.init=null!=this.init?this.init:function(){z.focus()};c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(z);c.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));N.appendChild(c);q.appendChild(N)}null!=y&&+"draw.io"==b.getServiceName()&&0<y.getSize()&&"1"!=urlParams.embed&&(N=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize="10pt",mxUtils.write(c,mxResources.get("size")+":"),N.appendChild(c),c=b.formatFileSize(y.getSize()),x=document.createElement("input"),x.setAttribute("title",c),x.setAttribute("value",c),x.setAttribute("disabled","disabled"),x.style.marginLeft="4px",x.style.width="100%",+c=document.createElement("td"),c.style.whiteSpace="nowrap",c.appendChild(x),N.appendChild(c),q.appendChild(N));null!=g&&(N=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize="10pt",mxUtils.write(c,mxResources.get("publicDiagramUrl")+":"),N.appendChild(c),x=document.createElement("a"),x.setAttribute("href",g),x.setAttribute("title",g),x.style.whiteSpace="nowrap",x.style.overflow="hidden",+x.style.textOverflow="ellipsis",x.style.display="block",x.style.margin="2px 0px 2px 8px",x.style.fontSize="10pt",mxUtils.write(x,g),mxEvent.addListener(x,"click",function(C){b.openLink(g);mxEvent.consume(C)}),c=document.createElement("td"),c.appendChild(x),N.appendChild(c),q.appendChild(N));null!=y&&null!=y.fileObject&&null!=y.fileObject.path&&(N=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize=+"10pt",mxUtils.write(c,mxResources.get("pathFilename")+":"),N.appendChild(c),x=document.createElement("input"),x.setAttribute("title",y.fileObject.path),x.setAttribute("value",y.fileObject.path),x.setAttribute("disabled","disabled"),x.style.marginLeft="4px",x.style.width="100%",c=document.createElement("td"),c.appendChild(x),N.appendChild(c),q.appendChild(N));this.init=null!=this.init?this.init:function(){};x=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&+K(function(){b.spinner.stop();b.hideDialog()},function(C){b.spinner.stop();b.handleError(C,mxResources.get("error"))})});x.className="geBtn gePrimaryBtn";N=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&c.appendChild(D);c.appendChild(x);b.editor.cancelFirst||c.appendChild(D);N.appendChild(c);+q.appendChild(N);d.appendChild(q);this.container=d},ConnectionPointsDialog=function(b,g){function l(){null!=q&&q.destroy()}var d=document.createElement("div");d.style.userSelect="none";var q=null;this.init=function(){function y(A,B,H){A=new mxCell("",new mxGeometry(A,B,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");A.vertex=!0;A.cp=!0;A.constObj=H;return N.addCell(A)}function x(A){A=N.getSelectionCells();N.deleteCells(A)}+function D(){var A=parseInt(O.value)||0;A=0>A?0:100<A?100:A;O.value=A;var B=parseInt(m.value)||0;B=0>B?0:100<B?100:B;m.value=B;var H=parseInt(Q.value)||0,T=parseInt(u.value)||0;H=new mxConnectionConstraint(new mxPoint(A/100,B/100),!1,null,H,T);A=N.getConnectionPoint(f,H);B=N.getSelectionCell();if(null!=B){B.constObj=H;H=B.geometry.clone();T=N.view.scale;var k=N.view.translate;H.x=(A.x-3*T)/T-k.x;H.y=(A.y-3*T)/T-k.y;N.model.setGeometry(B,H)}}function J(A){if(A.constObj)return{x:A.constObj.point.x,+y:A.constObj.point.y,dx:A.constObj.dx,dy:A.constObj.dy};var B=0,H=0,T=c.geometry,k=mxUtils.format((A.geometry.x+3-T.x)/T.width);A=mxUtils.format((A.geometry.y+3-T.y)/T.height);0>k?(B=k*T.width,k=0):1<k&&(B=(k-1)*T.width,k=1);0>A?(H=A*T.height,A=0):1<A&&(H=(A-1)*T.height,A=1);return{x:k,y:A,dx:parseInt(B),dy:parseInt(H)}}function K(A){if(1==N.getSelectionCount()){var B=N.getSelectionCell();A&&(B.constObj=null);A=J(B);O.value=100*A.x;m.value=100*A.y;Q.value=A.dx;u.value=A.dy;U.style.visibility=""}else U.style.visibility=+"hidden"}var L=document.createElement("div");L.style.width="350px";L.style.height="350px";L.style.overflow="hidden";L.style.border="1px solid lightGray";L.style.boxSizing="border-box";mxEvent.disableContextMenu(L);d.appendChild(L);var N=new Graph(L);N.transparentBackground=!1;N.autoExtend=!1;N.autoScroll=!1;N.setGridEnabled(!1);N.setEnabled(!0);N.setPanning(!0);N.setConnectable(!1);N.setTooltips(!1);N.minFitScale=null;N.maxFitScale=null;N.centerZoom=!0;N.maxFitScale=2;L=g.geometry;var c=new mxCell(g.value,+new mxGeometry(0,0,L.width,L.height),g.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");c.vertex=!0;N.addCell(c);N.dblClick=function(A,B){if(null!=B&&B!=c)N.setSelectionCell(B);else{B=mxUtils.convertPoint(N.container,mxEvent.getClientX(A),mxEvent.getClientY(A));mxEvent.consume(A);A=N.view.scale;var H=N.view.translate;N.setSelectionCell(y((B.x-3*A)/A-H.x,(B.y-3*A)/A-H.y))}};q=new mxKeyHandler(N);q.bindKey(46,x);q.bindKey(8,x);N.getRubberband().isForceRubberbandEvent=+function(A){return 0==A.evt.button&&(null==A.getCell()||A.getCell()==c)};N.panningHandler.isForcePanningEvent=function(A){return 2==A.evt.button};var e=N.isCellSelectable;N.isCellSelectable=function(A){return A==c?!1:e.apply(this,arguments)};N.getLinkForCell=function(){return null};var f=N.view.getState(c);L=N.getAllConnectionConstraints(f);for(var p=0;null!=L&&p<L.length;p++){var n=N.getConnectionPoint(f,L[p]);y(n.x-3,n.y-3,L[p])}N.fit(8);N.center();p=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),+function(){N.zoomIn()},20);n=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){N.zoomOut()},20);var t=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==N.view.scale?(N.maxFitScale=8,N.fit(8)):N.zoomActual();N.center()},20),z=function(){b.prompt(mxResources.get("gridSize"),N.gridSize,function(A){!isNaN(A)&&0<A&&(N.setGridSize(A),N.setGridEnabled(!0),N.refresh())})},F=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(A){mxEvent.isShiftDown(A)?+z():(N.setGridEnabled(!N.isGridEnabled()),N.refresh())},20);mxEvent.addListener(F,"dblclick",z);var C=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),x,20);mxUtils.setOpacity(C,10);L=document.createElement("div");L.style.display="flex";L.style.alignItems="center";L.style.paddingTop="6px";L.appendChild(p);L.appendChild(n);L.appendChild(t);L.appendChild(F);L.appendChild(C);d.appendChild(L);var E=document.createElement("input");E.setAttribute("type","number");E.setAttribute("min","1");+E.setAttribute("value","1");E.style.width="45px";E.style.position="relative";E.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";n=["left","right","top","bottom"];for(p=0;p<n.length;p++)t=n[p],F=document.createElement("option"),mxUtils.write(F,mxResources.get(t)),F.value=t,R.appendChild(F);p=mxUtils.button(mxResources.get("add"),function(){var A=parseInt(E.value);A=1>A?1:100<A?100:A;E.value=A;for(var B=R.value,H=c.geometry,T=[],k=0;k<A;k++){switch(B){case "left":var v=+H.x;var G=H.y+(k+1)*H.height/(A+1);break;case "right":v=H.x+H.width;G=H.y+(k+1)*H.height/(A+1);break;case "top":v=H.x+(k+1)*H.width/(A+1);G=H.y;break;case "bottom":v=H.x+(k+1)*H.width/(A+1),G=H.y+H.height}T.push(y(v-3,G-3))}N.setSelectionCells(T)});p.style.marginLeft="auto";L.appendChild(p);L.appendChild(E);L.appendChild(R);var U=document.createElement("div");U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";L=document.createElement("span");mxUtils.write(L,mxResources.get("dx"));+U.appendChild(L);var O=document.createElement("input");O.setAttribute("type","number");O.setAttribute("min","0");O.setAttribute("max","100");O.style.width="45px";O.style.margin="0 4px 0 4px";U.appendChild(O);mxUtils.write(U,"%");var Q=document.createElement("input");Q.setAttribute("type","number");Q.style.width="45px";Q.style.margin="0 4px 0 4px";U.appendChild(Q);mxUtils.write(U,"pt");L=document.createElement("span");mxUtils.write(L,mxResources.get("dy"));L.style.marginLeft="12px";U.appendChild(L);+var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.setAttribute("max","100");m.style.width="45px";m.style.margin="0 4px 0 4px";U.appendChild(m);mxUtils.write(U,"%");var u=document.createElement("input");u.setAttribute("type","number");u.style.width="45px";u.style.margin="0 4px 0 4px";U.appendChild(u);mxUtils.write(U,"pt");d.appendChild(U);K();N.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<N.getSelectionCount()?mxUtils.setOpacity(C,60):+mxUtils.setOpacity(C,10);K()});N.addListener(mxEvent.CELLS_MOVED,K);mxEvent.addListener(O,"change",D);mxEvent.addListener(m,"change",D);mxEvent.addListener(Q,"change",D);mxEvent.addListener(u,"change",D);L=mxUtils.button(mxResources.get("cancel"),function(){l();b.hideDialog()});L.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){var A=N.model.cells,B=[],H=[],T;for(T in A){var k=A[T];k.cp&&H.push(J(k))}H.sort(function(v,G){return v.x!=G.x?v.x-G.x:v.y!=G.y?v.y-G.y:v.dx!=G.dx?v.dx-+G.dx:v.dy-G.dy});for(A=0;A<H.length;A++)0<A&&H[A].x==H[A-1].x&&H[A].y==H[A-1].y&&H[A].dx==H[A-1].dx&&H[A].dy==H[A-1].dy||B.push("["+H[A].x+","+H[A].y+",0,"+H[A].dx+","+H[A].dy+"]");b.editor.graph.setCellStyles("points","["+B.join(",")+"]",[g]);l();b.hideDialog()});p.className="geBtn gePrimaryBtn";n=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[g]);l();b.hideDialog()});n.className="geBtn";t=document.createElement("div");t.style.marginTop="10px";t.style.textAlign=+"right";b.isOffline()||t.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&t.appendChild(L);t.appendChild(n);t.appendChild(p);b.editor.cancelFirst||t.appendChild(L);d.appendChild(t)};this.destroy=l;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";Editor.thinShapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI5Ljc1IDI5Ljc1Wm0tMTMgNS40NXEuNC4wNS43NS4wNUgxOS4wNXY0LjY1cTAgLjI1LjE3NS40MjV0LjQyNS4xNzVIMzkuOXEuMjUgMCAuNDI1LS4xNzV0LjE3NS0uNDI1VjE5LjY1cTAtLjI1LS4xNzUtLjQyNXQtLjQyNS0uMTc1aC00LjY1VjE3LjVxMC0uMzUtLjA1LS43NWg0LjdxMS4xNSAwIDIgLjg3NS44NS44NzUuODUgMi4wMjVWMzkuOXEwIDEuMTUtLjg1IDItLjg1Ljg1LTIgLjg1SDE5LjY1cS0xLjE1IDAtMi4wMjUtLjg1dC0uODc1LTJabTEuNS0zLjk1cS01LjQ1IDAtOS4yMjUtMy44LTMuNzc1LTMuOC0zLjc3NS05LjIgMC01LjQ1IDMuNzc1LTkuMjI1UTEyLjggNS4yNSAxOC4yNSA1LjI1cTUuNCAwIDkuMiAzLjc3NSAzLjggMy43NzUgMy44IDkuMjI1IDAgNS40LTMuOCA5LjItMy44IDMuOC05LjIgMy44Wm0tLjA1LTIuM3E0LjQ1IDAgNy42LTMuMTI1IDMuMTUtMy4xMjUgMy4xNS03LjU3NXQtMy4xMjUtNy42UTIyLjcgNy41IDE4LjI1IDcuNXQtNy42IDMuMTI1UTcuNSAxMy43NSA3LjUgMTguMnQzLjEyNSA3LjZxMy4xMjUgMy4xNSA3LjU3NSAzLjE1Wm0uMDUtMTAuN1oiLz48L3N2Zz4=";@@ -12742,131 +12742,131 @@ Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYEditor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableUncompressedLibraries=!1;Editor.enableCustomProperties=!0;-Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(g){Editor.enableServiceWorker=!1}Editor.enableWebFonts="1"!=+Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(k){Editor.enableServiceWorker=!1}Editor.enableWebFonts="1"!=urlParams["safe-style-src"]&&!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.gptModel=null!=urlParams["gpt-model"]?decodeURIComponent(urlParams["gpt-model"]):"gpt-3.5-turbo";Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme=-"auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(g){g.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(g,q){return"1"!=mxUtils.getValue(g.style,"sketch","0")}},-{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,"comic","0")||"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,-"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,-isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"dashOffset",-dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")&&0<g.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?-"1":"0")&&0<g.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==-mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},-isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",-type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(g,q){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",+"auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(k){k.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(k,v){return"1"!=mxUtils.getValue(k.style,"sketch","0")}},+{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"comic","0")||"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,+"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,+isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"dashOffset",+dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?+"1":"0")&&0<k.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==+mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},+isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",+type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(k,v){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source 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:"targetPortConstraint",dispName:"Target 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:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(g){return"orthogonalEdgeStyle"==mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,-isVisible:function(g){return"entityRelationEdgeStyle"==mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)}},{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:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",-type:"color",defVal:null},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(g){return"1"==mxUtils.getValue(g.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(g){return"1"==mxUtils.getValue(g.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(g){return"1"==mxUtils.getValue(g.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",+{name:"targetPortConstraint",dispName:"Target 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:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(k){return"orthogonalEdgeStyle"==mxUtils.getValue(k.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,+isVisible:function(k){return"entityRelationEdgeStyle"==mxUtils.getValue(k.style,mxConstants.STYLE_EDGE,null)}},{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:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",+type:"color",defVal:null},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",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(g,q){q=q.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&q.isTableCell(g.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(g,q){q=q.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&q.isTableCell(g.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(g,q){g=q.editorUi.editor.graph.getCellStyle(1==g.vertices.length&&-0==g.edges.length?g.vertices[0]:null);return"1"==mxUtils.getValue(g,"resizeLastRow","0")},isVisible:function(g,q){q=q.editorUi.editor.graph;return 1==g.vertices.length&&0==g.edges.length&&q.isTable(g.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(g,q){g=q.editorUi.editor.graph.getCellStyle(1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null);return"1"==mxUtils.getValue(g,"resizeLast","0")},isVisible:function(g,q){q=q.editorUi.editor.graph;-return 1==g.vertices.length&&0==g.edges.length&&q.isTable(g.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:"int",min:1,defVal:1,isVisible:function(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTableCell(k.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(k,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTableCell(k.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(k,v){k=v.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,v){v=v.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&v.isTable(k.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(k,v){k=v.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,v){v=v.editorUi.editor.graph;+return 1==k.vertices.length&&0==k.edges.length&&v.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(g,q){return q.editorUi.editor.graph.isCellConnectable(0<g.vertices.length&&0==g.edges.length?g.vertices[0]:null)},isVisible:function(g,q){return 0<g.vertices.length&&0==g.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},+dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(k,v){return v.editorUi.editor.graph.isCellConnectable(0<k.vertices.length&&0==k.edges.length?k.vertices[0]:null)},isVisible:function(k,v){return 0<k.vertices.length&&0==k.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},-{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",getDefaultValue:function(g,q){g=1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null;q=q.editorUi.editor.graph;return null!=g&&q.isSwimlane(g)},isVisible:function(g,q){return 1==g.vertices.length&&-0==g.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(g,q){g=1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null;q=q.editorUi.editor.graph;return null!=g&&(q.isSwimlane(g)||0<q.model.getChildCount(g))},isVisible:function(g,q){return 1==g.vertices.length&&0==g.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(g,q){var F=1==g.vertices.length&&0==g.edges.length?g.vertices[0]:null;q=q.editorUi.editor.graph;-return null!=F&&(q.isContainer(F)&&"0"!=g.style.collapsible||!q.isContainer(F)&&"1"==g.style.collapsible)},isVisible:function(g,q){return 1==g.vertices.length&&0==g.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(g,q){return 1==g.vertices.length&&0==g.edges.length&&!q.editorUi.editor.graph.isSwimlane(g.vertices[0])&&null==mxUtils.getValue(g.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",-type:"bool",defVal:!1,isVisible:function(g,q){q=q.editorUi.editor.graph.model;return 0<g.vertices.length?q.isVertex(q.getParent(g.vertices[0])):!1}},{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:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(g,q){g=-0<g.vertices.length?q.editorUi.editor.graph.getCellGeometry(g.vertices[0]):null;return null!=g&&!g.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(g,q){return 0<g.vertices.length&&q.editorUi.editor.graph.isAutoSizeCell(g.vertices[0])}},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",+{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",getDefaultValue:function(k,v){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;return null!=k&&v.isSwimlane(k)},isVisible:function(k,v){return 1==k.vertices.length&&+0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,v){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;return null!=k&&(v.isSwimlane(k)||0<v.model.getChildCount(k))},isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,v){var G=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;v=v.editorUi.editor.graph;+return null!=G&&(v.isContainer(G)&&"0"!=k.style.collapsible||!v.isContainer(G)&&"1"==k.style.collapsible)},isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(k,v){return 1==k.vertices.length&&0==k.edges.length&&!v.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",+type:"bool",defVal:!1,isVisible:function(k,v){v=v.editorUi.editor.graph.model;return 0<k.vertices.length?v.isVertex(v.getParent(k.vertices[0])):!1}},{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:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(k,v){k=+0<k.vertices.length?v.editorUi.editor.graph.getCellGeometry(k.vertices[0]):null;return null!=k&&!k.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(k,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isAutoSizeCell(k.vertices[0])}},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",-type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(g,q){var F=mxUtils.getValue(g.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||q.editorUi.editor.graph.isSwimlane(g.vertices[0])||null==F||F==mxConstants.NONE||0==mxUtils.getValue(g.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(g.style,mxConstants.STYLE_OPACITY,100)||null!=g.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",-type:"bool",defVal:!1,isVisible:function(g,q){return 0<g.vertices.length&&q.editorUi.editor.graph.isContainer(g.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\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,,[email protected],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,[email protected],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,[email protected],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,[email protected],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(g){var q=rough.canvas({getContext:function(){return g}});q.draw=function(F){var J=F.sets||[];F=F.options||this.getDefaultOptions();for(var L=0;L<J.length;L++){var Q=J[L];switch(Q.type){case "path":null!=F.stroke&&this._drawToContext(g,Q,F);break;case "fillPath":this._drawToContext(g,Q,F);break;case "fillSketch":this.fillSketch(g,Q,F)}}};q.fillSketch=function(F,J,L){var Q=g.state.strokeColor,U=g.state.strokeWidth,V=g.state.strokeAlpha,W=g.state.dashed,X=L.fillWeight;-0>X&&(X=L.strokeWidth/2);g.setStrokeAlpha(g.state.fillAlpha);g.setStrokeColor(L.fill||"");g.setStrokeWidth(X);g.setDashed(!1);this._drawToContext(F,J,L);g.setDashed(W);g.setStrokeWidth(U);g.setStrokeColor(Q);g.setStrokeAlpha(V)};q._drawToContext=function(F,J,L){F.begin();for(var Q=0;Q<J.ops.length;Q++){var U=J.ops[Q],V=U.data;switch(U.op){case "move":F.moveTo(V[0],V[1]);break;case "bcurveTo":F.curveTo(V[0],V[1],V[2],V[3],V[4],V[5]);break;case "lineTo":F.lineTo(V[0],V[1])}}F.end();"fillPath"===J.type&&-L.filled?F.fill():F.stroke()};return q};(function(){function g(Q,U,V){this.canvas=Q;this.rc=U;this.shape=V;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,g.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,g.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,g.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=-mxUtils.bind(this,g.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,g.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,g.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,g.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,g.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,-g.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,g.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,g.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,g.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,g.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,g.prototype.fillAndStroke);-this.path=[];this.passThrough=!1}g.prototype.moveOp="M";g.prototype.lineOp="L";g.prototype.quadOp="Q";g.prototype.curveOp="C";g.prototype.closeOp="Z";g.prototype.getStyle=function(Q,U){var V=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)V=(V<<5)-V+W.charCodeAt(X)<<0}V={strokeWidth:this.canvas.state.strokeWidth,seed:V,preserveVertices:!0};W=this.rc.getDefaultOptions();V.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:-mxConstants.NONE;Q=null;(V.filled=U)?(V.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):V.fill="";V.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);V.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);V.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);V.roughness=mxUtils.getValue(this.shape.style,"jiggle",-W.roughness);V.simplification=mxUtils.getValue(this.shape.style,"simplification",W.simplification);V.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",W.disableMultiStroke);V.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",W.disableMultiStrokeFill);U=mxUtils.getValue(this.shape.style,"hachureGap",-1);V.hachureGap="auto"==U?-1:U;V.dashGap=mxUtils.getValue(this.shape.style,"dashGap",U);V.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",-U);V.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",U);U=mxUtils.getValue(this.shape.style,"fillWeight",-1);V.fillWeight="auto"==U?-1:U;U=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==U&&(U="auto");"auto"==U&&(U=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&U.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&U.push(mxUtils.hex2rgb(Editor.darkColor)),U=null!=V.fill&&(null!=Q||0<=mxUtils.indexOf(U,mxUtils.hex2rgb(V.fill)))?-"solid":W.fillStyle);V.fillStyle=U;return V};g.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};g.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};g.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};-g.prototype.lineTo=function(Q,U){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Q,U),this.lastX=Q,this.lastY=U)};g.prototype.moveTo=function(Q,U){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,U),this.lastX=Q,this.lastY=U,this.firstX=Q,this.firstY=U)};g.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};g.prototype.quadTo=function(Q,U,V,W){this.passThrough?-this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,U,V,W),this.lastX=V,this.lastY=W)};g.prototype.curveTo=function(Q,U,V,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,U,V,W,X,Z),this.lastX=X,this.lastY=Z)};g.prototype.arcTo=function(Q,U,V,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,Q,U,V,W,X,Z,Y);if(null!=ba)for(var ea=0;ea<ba.length;ea+=-6)this.curveTo(ba[ea],ba[ea+1],ba[ea+2],ba[ea+3],ba[ea+4],ba[ea+5]);this.lastX=Z;this.lastY=Y}};g.prototype.rect=function(Q,U,V,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,U,V,W,this.getStyle(!0,!0)))};g.prototype.ellipse=function(Q,U,V,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+V/2,U+W/2,V,W,this.getStyle(!0,!0)))};g.prototype.roundrect=-function(Q,U,V,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Q+X,U),this.lineTo(Q+V-X,U),this.quadTo(Q+V,U,Q+V,U+Z),this.lineTo(Q+V,U+W-Z),this.quadTo(Q+V,U+W,Q+V-X,U+W),this.lineTo(Q+X,U+W),this.quadTo(Q,U+W,Q,U+W-Z),this.lineTo(Q,U+Z),this.quadTo(Q,U,Q+X,U))};g.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(V){}this.passThrough=!1}else if(null!=this.nextShape){for(var U in Q)this.nextShape.options[U]=-Q[U];Q.stroke!=mxConstants.NONE&&null!=Q.stroke||delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};g.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};g.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};g.prototype.fillAndStroke=function(){this.passThrough?-this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};g.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;-this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new g(Q,Editor.createRoughCanvas(Q),this)};var q=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?q.apply(this,arguments):"comic"==mxUtils.getValue(this.style,-"sketchStyle","rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var F=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,U,V,W,X){null!=Q.handJiggle&&Q.handJiggle.passThrough||F.apply(this,arguments)};var J=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var U=Q.addTolerance,V=!0;null!=this.style&&(V="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==g&&!this.outline){Q.save();-var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=Q.setStrokeColor;Q.setStrokeColor=function(){};var ba=Q.setFillColor;Q.setFillColor=function(){};V||null==W||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;J.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=ba;Q.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;Q.restore();V&&null!=W&&(Q.addTolerance=function(){})}J.apply(this,arguments);Q.addTolerance=-U};var L=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,U,V,W,X,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==g?(Q.handJiggle.passThrough=!0,L.apply(this,arguments),Q.handJiggle.passThrough=!1):L.apply(this,arguments)}})();Editor.fastCompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:Graph.arrayBufferToString(pako.deflateRaw(g))};Editor.fastDecompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:pako.inflateRaw(Graph.stringToArrayBuffer(atob(g)),-{to:"string"})};Editor.extractGraphModel=function(g,q,F){if(null!=g&&"undefined"!==typeof pako){var J=g.ownerDocument.getElementsByTagName("div"),L=[];if(null!=J&&0<J.length)for(var Q=0;Q<J.length;Q++)if("mxgraph"==J[Q].getAttribute("class")){L.push(J[Q]);break}0<L.length&&(J=L[0].getAttribute("data-mxgraph"),null!=J?(L=JSON.parse(J),null!=L&&null!=L.xml&&(g=mxUtils.parseXml(L.xml),g=g.documentElement)):(L=L[0].getElementsByTagName("div"),0<L.length&&(J=mxUtils.getTextContent(L[0]),J=Graph.decompress(J,-null,F),0<J.length&&(g=mxUtils.parseXml(J),g=g.documentElement))))}if(null!=g&&"svg"==g.nodeName)if(J=g.getAttribute("content"),null!=J&&"<"!=J.charAt(0)&&"%"!=J.charAt(0)&&(J=unescape(window.atob?atob(J):Base64.decode(cont,J))),null!=J&&"%"==J.charAt(0)&&(J=decodeURIComponent(J)),null!=J&&0<J.length)g=mxUtils.parseXml(J).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==g||q||(L=null,"diagram"==g.nodeName?L=g:"mxfile"==g.nodeName&&(J=g.getElementsByTagName("diagram"),0<-J.length&&(L=J[Math.max(0,Math.min(J.length-1,urlParams.page||0))])),null!=L&&(g=Editor.parseDiagramNode(L,F)));null==g||"mxGraphModel"==g.nodeName||q&&"mxfile"==g.nodeName||(g=null);return g};Editor.parseDiagramNode=function(g,q,F){Editor.validateDiagramNode(g);var J=mxUtils.trim(mxUtils.getTextContent(g)),L=null;0<J.length?(q=Graph.decompress(J,null,q),null!=q&&0<q.length&&(L=mxUtils.parseXml(q).documentElement)):(g=mxUtils.getChildNodes(g),0<g.length&&(L=g[0],F&&(L=Editor.parseDiagramNode(L,q,-!1)),q=mxUtils.createXmlDocument(),q.appendChild(q.importNode(L,!0)),L=q.documentElement));return L};Editor.getDiagramNodeXml=function(g){Editor.validateDiagramNode(g);var q=mxUtils.getNodeValue(g),F=null;0<q.length?F=Graph.decompress(q):(g=g.getElementsByTagName("mxGraphModel"),null!=g&&0<g.length&&(F=mxUtils.getXml(g[0])));return F};Editor.validateDiagramNode=function(g){if(0==mxUtils.trim(mxUtils.getTextContent(g)).length&&0==mxUtils.getChildNodes(g).length){var q=new mxCodec,F=new mxGraphModel;-g.appendChild(q.encode(F))}return g};Editor.extractGraphModelFromPdf=function(g){var q=null;g=g.substring(g.indexOf(",")+1);g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0);if("%PDF-1.7"==g.substring(0,8)){var F=g.indexOf("EmbeddedFile");if(-1<F){var J=g.indexOf("stream",F)+9;if(0<g.substring(F,J).indexOf("application#2Fvnd.jgraph.mxfile")){var L=g.indexOf("endstream",J-1);return pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(J,L)),{to:"string"})}}for(F=g.indexOf("/ObjStm");0<F;){J=-g.indexOf("stream",F)+9;L=g.indexOf("endstream",J-1);J=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(J,L)),{to:"string"});L=J.indexOf("/Subject <");if(0<L){F=J.substring(L+14,J.indexOf(">",L));if(null!=F){q=F;F=[];for(J=0;J<q.length;J+=2)L=q.substr(J,2),"00"!=L&&F.push(String.fromCharCode(parseInt(L,16)));q=F.join("")}break}F=g.indexOf("/ObjStm",F+1)}}if(null==q&&"%PDF-1.4"==g.substring(0,8)){F="";L=J=0;for(var Q=[],U=null;L<g.length;){var V=g.charCodeAt(L);L+=1;10!=V&&(F+=String.fromCharCode(V));-V=="/Subject (%3Cmxfile".charCodeAt(J)?J++:J=0;if(19==J){var W=g.indexOf("%3C%2Fmxfile%3E",L)+15;L-=9;if(W>L){q=g.substring(L,W);break}}10==V&&("endobj"==F?U=null:"obj"==F.substring(F.length-3,F.length)||"xref"==F||"trailer"==F?(U=[],Q[F.split(" ")[0]]=U):null!=U&&U.push(F),F="")}}null==q&&null!=Q&&(q=Editor.extractGraphModelFromXref(Q));null!=q&&(q=decodeURIComponent(q.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return q};Editor.extractGraphModelFromXref=function(g){var q=g.trailer,F=null;null!=-q&&(q=/.* \/Info (\d+) (\d+) R/g.exec(q.join("\n")),null!=q&&0<q.length&&(q=g[q[1]],null!=q&&(q=/.* \/Subject (\d+) (\d+) R/g.exec(q.join("\n")),null!=q&&0<q.length&&(g=g[q[1]],null!=g&&(g=g.join("\n"),F=g.substring(1,g.length-1))))));return F};Editor.extractParserError=function(g,q){var F=null;g=null!=g?g.getElementsByTagName("parsererror"):null;null!=g&&0<g.length&&(F=q||mxResources.get("invalidChars"),q=g[0].getElementsByTagName("div"),0<q.length&&(F=mxUtils.getTextContent(q[0])));return null!=-F?mxUtils.trim(F):F};Editor.addRetryToError=function(g,q){null!=g&&(g=null!=g.error?g.error:g,null==g.retry&&(g.retry=q))};Editor.mermaidToDrawio=function(g,q,F){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(g,q,F)};Editor.configure=function(g){if(null!=g){Editor.config=g;Editor.configVersion=g.version;g.debug&&(urlParams.test="1");null!=g.defaultFonts&&(Menus.prototype.defaultFonts=g.defaultFonts);null!=g.presetColors&&(ColorDialog.prototype.presetColors=g.presetColors);null!=-g.defaultColors&&(ColorDialog.prototype.defaultColors=g.defaultColors);null!=g.colorNames&&(ColorDialog.prototype.colorNames=g.colorNames);null!=g.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=g.defaultColorSchemes);null!=g.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=g.defaultEdgeLength);null!=g.selectParentLayer&&(Graph.selectParentLayer=g.selectParentLayer);null!=g.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=g.autosaveDelay);null!=g.templateFile&&(EditorUi.templateFile=-g.templateFile);null!=g.styles&&(Array.isArray(g.styles)?Editor.styles=g.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=g.globalVars&&(Editor.globalVars=g.globalVars);null!=g.compressXml&&(Editor.defaultCompressed=g.compressXml,Editor.compressXml=g.compressXml);null!=g.includeDiagram&&(Editor.defaultIncludeDiagram=g.includeDiagram);null!=g.simpleLabels&&(Editor.simpleLabels=g.simpleLabels);null!=g.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=g.oneDriveInlinePicker);-null!=g.defaultAdaptiveColors?Graph.defaultAdaptiveColors=g.defaultAdaptiveColors:0==g.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=g.darkColor&&(Editor.darkColor=g.darkColor);null!=g.darkColorVar&&(Editor.darkColorVar=g.darkColorVar);Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor=-"light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=g.settingsName&&(Editor.configurationKey="."+g.settingsName+"-configuration",Editor.settingsKey="."+g.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=g.customFonts&&(Menus.prototype.defaultFonts=g.customFonts.concat(Menus.prototype.defaultFonts));null!=g.customPresetColors&&(ColorDialog.prototype.presetColors=g.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=g.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=-g.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=g.css){var q=document.createElement("style");q.setAttribute("type","text/css");q.appendChild(document.createTextNode(g.css));var F=document.getElementsByTagName("script")[0];F.parentNode.insertBefore(q,F)}null!=g.expandLibraries&&(Sidebar.prototype.expandLibraries=g.expandLibraries);null!=g.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=g.appendCustomLibraries);null!=g.libraries&&(Sidebar.prototype.customEntries=-g.libraries);null!=g.enabledLibraries&&(Array.isArray(g.enabledLibraries)?Sidebar.prototype.enabledLibraries=g.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=g.defaultLibraries&&(Sidebar.prototype.defaultEntries=g.defaultLibraries);null!=g.defaultCustomLibraries&&(Editor.defaultCustomLibraries=g.defaultCustomLibraries);null!=g.enableCustomLibraries&&(Editor.enableCustomLibraries=g.enableCustomLibraries);null!=g.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=-g.defaultVertexStyle);null!=g.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=g.defaultEdgeStyle);null!=g.defaultPageVisible&&(Graph.prototype.defaultPageVisible=g.defaultPageVisible);null!=g.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=g.defaultGridEnabled);null!=g.zoomWheel&&(Graph.zoomWheel=g.zoomWheel);null!=g.zoomFactor&&(q=parseFloat(g.zoomFactor),!isNaN(q)&&1<q?Graph.prototype.zoomFactor=q:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=g.defaultGridSize&&-(q=parseInt(g.defaultGridSize),!isNaN(q)&&0<q?mxGraph.prototype.gridSize=q:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=g.gridSteps&&(q=parseInt(g.gridSteps),!isNaN(q)&&0<q?mxGraphView.prototype.gridSteps=q:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=g.pageFormat&&(q=parseInt(g.pageFormat.width),F=parseInt(g.pageFormat.height),!isNaN(q)&&0<q&&!isNaN(F)&&0<F?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,q,F),mxGraph.prototype.pageFormat=-mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=g.thumbWidth&&(Sidebar.prototype.thumbWidth=g.thumbWidth);null!=g.thumbHeight&&(Sidebar.prototype.thumbHeight=g.thumbHeight);null!=g.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=g.emptyLibraryXml);null!=g.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=g.emptyDiagramXml);null!=g.sidebarWidth&&(EditorUi.prototype.hsplitPosition=g.sidebarWidth);null!=g.updateDefaultStyle&&-(EditorUi.prototype.updateDefaultStyle=g.updateDefaultStyle);null!=g.sidebarTitles&&(Sidebar.prototype.sidebarTitles=g.sidebarTitles);null!=g.sidebarTitleSize&&(q=parseInt(g.sidebarTitleSize),!isNaN(q)&&0<q?Sidebar.prototype.sidebarTitleSize=q:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=g.fontCss&&("string"===typeof g.fontCss?Editor.configureFontCss(g.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=g.autosaveDelay&&(q=parseInt(g.autosaveDelay),-!isNaN(q)&&0<q?DrawioFile.prototype.autosaveDelay=q:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=g.maxImageBytes&&(EditorUi.prototype.maxImageBytes=g.maxImageBytes);null!=g.maxImageSize&&(EditorUi.prototype.maxImageSize=g.maxImageSize);null!=g.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=g.shareCursorPosition);null!=g.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=g.showRemoteCursors);null!=g.restrictExport&&(DrawioFile.RESTRICT_EXPORT=-g.restrictExport);null!=g.replaceSvgDataUris&&(Editor.replaceSvgDataUris=g.replaceSvgDataUris);null!=g.foreignObjectImages&&(Editor.foreignObjectImages=g.foreignObjectImages);null!=g.shadowColor&&(mxConstants.SHADOW_COLOR=g.shadowColor);null!=g.shadowOpacity&&(mxConstants.SHADOW_OPACITY=g.shadowOpacity);null!=g.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=g.shadowOffsetX);null!=g.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=g.shadowOffsetY);null!=g.shadowBlur&&(mxConstants.SHADOW_BLUR=g.shadowBlur);-null!=g.enableAnimations&&(Editor.enableAnimations=g.enableAnimations);null!=g.enableChatGpt&&(Editor.enableChatGpt=g.enableChatGpt);null!=g.gptApiKey&&(Editor.gptApiKey=g.gptApiKey);null!=g.gptModel&&(Editor.gptModel=g.gptModel);null!=g.gptUrl&&(Editor.gptUrl=g.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(g){if(null!=g){Editor.prototype.fontCss=g;var q=document.getElementsByTagName("script")[0];-if(null!=q&&null!=q.parentNode){var F=document.createElement("style");F.setAttribute("type","text/css");F.appendChild(document.createTextNode(g));q.parentNode.insertBefore(F,q);g=g.split("url(");for(F=1;F<g.length;F++){var J=g[F].indexOf(")");J=Editor.trimCssUrl(g[F].substring(0,J));var L=document.createElement("link");L.setAttribute("rel","preload");L.setAttribute("href",J);L.setAttribute("as","font");L.setAttribute("crossorigin","");q.parentNode.insertBefore(L,q)}}}};Editor.trimCssUrl=function(g){return g.replace(RegExp("^[\\s\"']+",-"g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(g){g=null!=g?g:Editor.GUID_LENGTH;for(var q=[],F=0;F<g;F++)q.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return q.join("")};Editor.updateStatusInterval=+type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,v){var G=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||v.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==G||G==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",+type:"bool",defVal:!1,isVisible:function(k,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isContainer(k.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\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,,[email protected],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,[email protected],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,[email protected],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,[email protected],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 v=rough.canvas({getContext:function(){return k}});v.draw=function(G){var I=G.sets||[];G=G.options||this.getDefaultOptions();for(var M=0;M<I.length;M++){var P=I[M];switch(P.type){case "path":null!=G.stroke&&this._drawToContext(k,P,G);break;case "fillPath":this._drawToContext(k,P,G);break;case "fillSketch":this.fillSketch(k,P,G)}}};v.fillSketch=function(G,I,M){var P=k.state.strokeColor,S=k.state.strokeWidth,V=k.state.strokeAlpha,W=k.state.dashed,X=M.fillWeight;+0>X&&(X=M.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(M.fill||"");k.setStrokeWidth(X);k.setDashed(!1);this._drawToContext(G,I,M);k.setDashed(W);k.setStrokeWidth(S);k.setStrokeColor(P);k.setStrokeAlpha(V)};v._drawToContext=function(G,I,M){G.begin();for(var P=0;P<I.ops.length;P++){var S=I.ops[P],V=S.data;switch(S.op){case "move":G.moveTo(V[0],V[1]);break;case "bcurveTo":G.curveTo(V[0],V[1],V[2],V[3],V[4],V[5]);break;case "lineTo":G.lineTo(V[0],V[1])}}G.end();"fillPath"===I.type&&+M.filled?G.fill():G.stroke()};return v};(function(){function k(P,S,V){this.canvas=P;this.rc=S;this.shape=V;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=+mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,+k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,k.prototype.fillAndStroke);+this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(P,S){var V=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)V=(V<<5)-V+W.charCodeAt(X)<<0}V={strokeWidth:this.canvas.state.strokeWidth,seed:V,preserveVertices:!0};W=this.rc.getDefaultOptions();V.stroke=P?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:+mxConstants.NONE;P=null;(V.filled=S)?(V.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,P=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):V.fill="";V.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);V.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);V.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);V.roughness=mxUtils.getValue(this.shape.style,"jiggle",+W.roughness);V.simplification=mxUtils.getValue(this.shape.style,"simplification",W.simplification);V.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",W.disableMultiStroke);V.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",W.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);V.hachureGap="auto"==S?-1:S;V.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);V.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",+S);V.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);V.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==S&&(S="auto");"auto"==S&&(S=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&S.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&S.push(mxUtils.hex2rgb(Editor.darkColor)),S=null!=V.fill&&(null!=P||0<=mxUtils.indexOf(S,mxUtils.hex2rgb(V.fill)))?+"solid":W.fillStyle);V.fillStyle=S;return V};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var P=2;P<arguments.length;P+=2)this.lastX=arguments[P-1],this.lastY=arguments[P],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};+k.prototype.lineTo=function(P,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,P,S),this.lastX=P,this.lastY=S)};k.prototype.moveTo=function(P,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,P,S),this.lastX=P,this.lastY=S,this.firstX=P,this.firstY=S)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(P,S,V,W){this.passThrough?+this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,P,S,V,W),this.lastX=V,this.lastY=W)};k.prototype.curveTo=function(P,S,V,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,P,S,V,W,X,Z),this.lastX=X,this.lastY=Z)};k.prototype.arcTo=function(P,S,V,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,P,S,V,W,X,Z,Y);if(null!=ba)for(var ea=0;ea<ba.length;ea+=+6)this.curveTo(ba[ea],ba[ea+1],ba[ea+2],ba[ea+3],ba[ea+4],ba[ea+5]);this.lastX=Z;this.lastY=Y}};k.prototype.rect=function(P,S,V,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(P,S,V,W,this.getStyle(!0,!0)))};k.prototype.ellipse=function(P,S,V,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(P+V/2,S+W/2,V,W,this.getStyle(!0,!0)))};k.prototype.roundrect=+function(P,S,V,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(P+X,S),this.lineTo(P+V-X,S),this.quadTo(P+V,S,P+V,S+Z),this.lineTo(P+V,S+W-Z),this.quadTo(P+V,S+W,P+V-X,S+W),this.lineTo(P+X,S+W),this.quadTo(P,S+W,P,S+W-Z),this.lineTo(P,S+Z),this.quadTo(P,S,P+X,S))};k.prototype.drawPath=function(P){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),P)}catch(V){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in P)this.nextShape.options[S]=+P[S];P.stroke!=mxConstants.NONE&&null!=P.stroke||delete this.nextShape.options.stroke;P.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?+this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;+this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(P){return new k(P,Editor.createRoughCanvas(P),this)};var v=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(P){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?v.apply(this,arguments):"comic"==mxUtils.getValue(this.style,+"sketchStyle","rough")?this.createComicCanvas(P):this.createRoughCanvas(P)};var G=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(P,S,V,W,X){null!=P.handJiggle&&P.handJiggle.passThrough||G.apply(this,arguments)};var I=mxShape.prototype.paint;mxShape.prototype.paint=function(P){var S=P.addTolerance,V=!0;null!=this.style&&(V="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=P.handJiggle&&P.handJiggle.constructor==k&&!this.outline){P.save();+var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=P.setStrokeColor;P.setStrokeColor=function(){};var ba=P.setFillColor;P.setFillColor=function(){};V||null==W||(this.configurePointerEvents=function(){});P.handJiggle.passThrough=!0;I.apply(this,arguments);P.handJiggle.passThrough=!1;P.setFillColor=ba;P.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;P.restore();V&&null!=W&&(P.addTolerance=function(){})}I.apply(this,arguments);P.addTolerance=+S};var M=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(P,S,V,W,X,Z){null!=P.handJiggle&&P.handJiggle.constructor==k?(P.handJiggle.passThrough=!0,M.apply(this,arguments),P.handJiggle.passThrough=!1):M.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),+{to:"string"})};Editor.extractGraphModel=function(k,v,G){if(null!=k&&"undefined"!==typeof pako){var I=k.ownerDocument.getElementsByTagName("div"),M=[];if(null!=I&&0<I.length)for(var P=0;P<I.length;P++)if("mxgraph"==I[P].getAttribute("class")){M.push(I[P]);break}0<M.length&&(I=M[0].getAttribute("data-mxgraph"),null!=I?(M=JSON.parse(I),null!=M&&null!=M.xml&&(k=mxUtils.parseXml(M.xml),k=k.documentElement)):(M=M[0].getElementsByTagName("div"),0<M.length&&(I=mxUtils.getTextContent(M[0]),I=Graph.decompress(I,+null,G),0<I.length&&(k=mxUtils.parseXml(I),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(I=k.getAttribute("content"),null!=I&&"<"!=I.charAt(0)&&"%"!=I.charAt(0)&&(I=unescape(window.atob?atob(I):Base64.decode(cont,I))),null!=I&&"%"==I.charAt(0)&&(I=decodeURIComponent(I)),null!=I&&0<I.length)k=mxUtils.parseXml(I).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||v||(M=null,"diagram"==k.nodeName?M=k:"mxfile"==k.nodeName&&(I=k.getElementsByTagName("diagram"),0<+I.length&&(M=I[Math.max(0,Math.min(I.length-1,urlParams.page||0))])),null!=M&&(k=Editor.parseDiagramNode(M,G)));null==k||"mxGraphModel"==k.nodeName||v&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,v,G){Editor.validateDiagramNode(k);var I=mxUtils.trim(mxUtils.getTextContent(k)),M=null;0<I.length?(v=Graph.decompress(I,null,v),null!=v&&0<v.length&&(M=mxUtils.parseXml(v).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(M=k[0],G&&(M=Editor.parseDiagramNode(M,v,+!1)),v=mxUtils.createXmlDocument(),v.appendChild(v.importNode(M,!0)),M=v.documentElement));return M};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var v=mxUtils.getNodeValue(k),G=null;0<v.length?G=Graph.decompress(v):(k=k.getElementsByTagName("mxGraphModel"),null!=k&&0<k.length&&(G=mxUtils.getXml(k[0])));return G};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var v=new mxCodec,G=new mxGraphModel;+k.appendChild(v.encode(G))}return k};Editor.extractGraphModelFromPdf=function(k){var v=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var G=k.indexOf("EmbeddedFile");if(-1<G){var I=k.indexOf("stream",G)+9;if(0<k.substring(G,I).indexOf("application#2Fvnd.jgraph.mxfile")){var M=k.indexOf("endstream",I-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(I,M)),{to:"string"})}}for(G=k.indexOf("/ObjStm");0<G;){I=+k.indexOf("stream",G)+9;M=k.indexOf("endstream",I-1);I=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(I,M)),{to:"string"});M=I.indexOf("/Subject <");if(0<M){G=I.substring(M+14,I.indexOf(">",M));if(null!=G){v=G;G=[];for(I=0;I<v.length;I+=2)M=v.substr(I,2),"00"!=M&&G.push(String.fromCharCode(parseInt(M,16)));v=G.join("")}break}G=k.indexOf("/ObjStm",G+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){G="";M=I=0;for(var P=[],S=null;M<k.length;){var V=k.charCodeAt(M);M+=1;10!=V&&(G+=String.fromCharCode(V));+V=="/Subject (%3Cmxfile".charCodeAt(I)?I++:I=0;if(19==I){var W=k.indexOf("%3C%2Fmxfile%3E",M)+15;M-=9;if(W>M){v=k.substring(M,W);break}}10==V&&("endobj"==G?S=null:"obj"==G.substring(G.length-3,G.length)||"xref"==G||"trailer"==G?(S=[],P[G.split(" ")[0]]=S):null!=S&&S.push(G),G="")}}null==v&&null!=P&&(v=Editor.extractGraphModelFromXref(P));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=k.trailer,G=null;null!=+v&&(v=/.* \/Info (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(v=k[v[1]],null!=v&&(v=/.* \/Subject (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(k=k[v[1]],null!=k&&(k=k.join("\n"),G=k.substring(1,k.length-1))))));return G};Editor.extractParserError=function(k,v){var G=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(G=v||mxResources.get("invalidChars"),v=k[0].getElementsByTagName("div"),0<v.length&&(G=mxUtils.getTextContent(v[0])));return null!=+G?mxUtils.trim(G):G};Editor.addRetryToError=function(k,v){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=v))};Editor.mermaidToDrawio=function(k,v,G){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,v,G)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=+k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=+k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&(Editor.defaultIncludeDiagram=k.includeDiagram);null!=k.simpleLabels&&(Editor.simpleLabels=k.simpleLabels);null!=k.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=k.oneDriveInlinePicker);+null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.darkColor&&(Editor.darkColor=k.darkColor);null!=k.darkColorVar&&(Editor.darkColorVar=k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor=+"light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=+k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){var v=document.createElement("style");v.setAttribute("type","text/css");v.appendChild(document.createTextNode(k.css));var G=document.getElementsByTagName("script")[0];G.parentNode.insertBefore(v,G)}null!=k.expandLibraries&&(Sidebar.prototype.expandLibraries=k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=+k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);null!=k.defaultCustomLibraries&&(Editor.defaultCustomLibraries=k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=+k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);null!=k.zoomWheel&&(Graph.zoomWheel=k.zoomWheel);null!=k.zoomFactor&&(v=parseFloat(k.zoomFactor),!isNaN(v)&&1<v?Graph.prototype.zoomFactor=v:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&+(v=parseInt(k.defaultGridSize),!isNaN(v)&&0<v?mxGraph.prototype.gridSize=v:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(v=parseInt(k.gridSteps),!isNaN(v)&&0<v?mxGraphView.prototype.gridSteps=v:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=k.pageFormat&&(v=parseInt(k.pageFormat.width),G=parseInt(k.pageFormat.height),!isNaN(v)&&0<v&&!isNaN(G)&&0<G?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,v,G),mxGraph.prototype.pageFormat=+mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&+(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&(v=parseInt(k.sidebarTitleSize),!isNaN(v)&&0<v?Sidebar.prototype.sidebarTitleSize=v:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(v=parseInt(k.autosaveDelay),+!isNaN(v)&&0<v?DrawioFile.prototype.autosaveDelay=v:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=+k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);+null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var v=document.getElementsByTagName("script")[0];+if(null!=v&&null!=v.parentNode){var G=document.createElement("style");G.setAttribute("type","text/css");G.appendChild(document.createTextNode(k));v.parentNode.insertBefore(G,v);k=k.split("url(");for(G=1;G<k.length;G++){var I=k[G].indexOf(")");I=Editor.trimCssUrl(k[G].substring(0,I));var M=document.createElement("link");M.setAttribute("rel","preload");M.setAttribute("href",I);M.setAttribute("as","font");M.setAttribute("crossorigin","");v.parentNode.insertBefore(M,v)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+",+"g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var v=[],G=0;G<k;G++)v.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return v.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",-title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(g){g=null!=g&&"mxlibrary"!=g.nodeName?this.extractGraphModel(g):null;if(null!=g){var q=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(q)throw EditorUi.debug("Editor.setGraphXml ParserError",-[this],"node",[g],"cause",[q]),Error(mxResources.get("notADiagramFile")+" ("+q+")");if("mxGraphModel"==g.nodeName){q=g.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=q&&""!=q)q!=this.graph.currentStyle&&(F=null!=this.graph.themes?this.graph.themes[q]:mxUtils.load(STYLE_PATH+"/"+q+".xml").getDocumentElement(),null!=F&&(J=new mxCodec(F.ownerDocument),J.decode(F,this.graph.getStylesheet())));else{var F=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+-"/default-old.xml").getDocumentElement();if(null!=F){var J=new mxCodec(F.ownerDocument);J.decode(F,this.graph.getStylesheet())}}this.graph.currentStyle=q;this.graph.mathEnabled="1"==urlParams.math||"1"==g.getAttribute("math");this.graph.setAdaptiveColors(g.getAttribute("adaptiveColors"));q=g.getAttribute("backgroundImage");null!=q?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(q)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&-this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==g.getAttribute("shadow"),!1);if(q=g.getAttribute("extFonts"))try{for(q=q.split("|").map(function(L){L=L.split("^");return{name:L[0],url:L[1]}}),F=0;F<q.length;F++)this.graph.addExtFont(q[F].name,q[F].url)}catch(L){console.log("ExtFonts format error: "+L.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||-"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(g,q){g=null!=g?g:!0;var F=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&F.setAttribute("style",this.graph.currentStyle);var J=this.graph.getBackgroundImageObject(this.graph.backgroundImage,q);null!=J&&F.setAttribute("backgroundImage",JSON.stringify(J));F.setAttribute("math",this.graph.mathEnabled?"1":"0");F.setAttribute("shadow",-this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?F.setAttribute("adaptiveColors",this.graph.adaptiveColors):F.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(J=this.graph.extFonts.map(function(L){return L.name+"^"+L.url}),F.setAttribute("extFonts",J.join("|")));return F};Editor.prototype.isDataSvg=function(g){try{var q=mxUtils.parseXml(g).documentElement.getAttribute("content");if(null!=q&&(null!=q&&"<"!=q.charAt(0)&&"%"!=q.charAt(0)&&(q=-unescape(window.atob?atob(q):Base64.decode(cont,q))),null!=q&&"%"==q.charAt(0)&&(q=decodeURIComponent(q)),null!=q&&0<q.length)){var F=mxUtils.parseXml(q).documentElement;return"mxfile"==F.nodeName||"mxGraphModel"==F.nodeName}}catch(J){}return!1};Editor.prototype.extractGraphModel=function(g,q,F){return Editor.extractGraphModel.apply(this,arguments)};var m=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);-this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();m.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(g,q){if("undefined"===-typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var F=function(){J=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};g=null!=g?g:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var J=null;Editor.doMathJaxRender=function(U){try{null==J?(MathJax.typesetClear([U]),MathJax.typeset([U]),F()):J!=U&&Editor.mathJaxQueue.push(U)}catch(V){MathJax.typesetClear([U]),null!=V.retry?(J=U,V.retry.then(function(){MathJax.typesetPromise([U]).then(F)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "+-W.toString());F()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());F()})):null!=window.console&&console.log("Error in MathJax.typeset: "+V.toString())}};window.MathJax=null!=q?q:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};-Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.onMathJaxDone=function(){};var L=Editor.prototype.init;Editor.prototype.init=function(){L.apply(this,arguments);var U=mxUtils.bind(this,function(V,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};q=document.getElementsByTagName("script");-if(null!=q&&0<q.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",g);q[0].parentNode.appendChild(Q)}}};Editor.prototype.csvToArray=function(g){if(0<g.length){var q="",F=[""],J=0,L=!0,Q;g=$jscomp.makeIterator(g);for(Q=g.next();!Q.done;Q=g.next())Q=Q.value,'"'===Q?(L&&Q===q&&(F[J]+=Q),L=!L):","===Q&&L?Q=F[++J]="":F[J]+=Q,q=Q;return F}return[]};Editor.prototype.getProxiedUrl=function(g){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&-!this.isCorsEnabledForUrl(g)){var q=EditorUi.isVisioFilename(g);q=/\.png$/i.test(g)||/\.pdf$/i.test(g)||q;var F="t="+(new Date).getTime();g=PROXY_URL+"?url="+encodeURIComponent(g)+"&"+F+(q?"&base64=1":"")}return g};Editor.prototype.isCorsEnabledForUrl=function(g){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||g.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));-return null!=this.corsRegExp&&this.corsRegExp.test(g)||"https://raw.githubusercontent.com/"===g.substring(0,34)||"https://fonts.googleapis.com/"===g.substring(0,29)||"https://fonts.gstatic.com/"===g.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var g=new mxUrlConverter;g.updateBaseUrl();var q=g.convert,F=this;g.convert=function(J){null!=J&&navigator.onLine&&("http://"!=J.substring(0,7)&&"https://"!=J.substring(0,8)||J.substring(0,g.baseUrl.length)==g.baseUrl||F.crossOriginImages&&-F.isCorsEnabledForUrl(J)?"chrome-extension://"!=J.substring(0,19)&&(J=q.apply(this,arguments)):J=PROXY_URL+"?url="+encodeURIComponent(J));return J};return g};Editor.createSvgDataUri=function(g){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(g)))};Editor.prototype.convertImageToDataUri=function(g,q,F,J,L){try{var Q=!0,U=window.setTimeout(mxUtils.bind(this,function(){Q=!1;q(g)}),this.timeout),V=mxUtils.bind(this,function(){null!=J?this.convertImageToDataUri(g,q,F,J,!0):q(g)});if(/(\.svg)$/i.test(g)&&-!L)mxUtils.get(g,mxUtils.bind(this,function(X){window.clearTimeout(U);Q&&(200>X.getStatus()||299<X.getStatus()?V():q(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(U);Q&&V()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(U);if(Q)try{J=null!=J&&L?J:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(J,J);X.height=W.height*J;X.width=W.width*J;Z.drawImage(W,0,0);q(X.toDataURL())}catch(Y){q(g)}};-W.onerror=function(){window.clearTimeout(U);Q&&(null!=F?F():q(g))};W.src=g}}catch(X){null!=F?F():q(g)}};Editor.prototype.convertImages=function(g,q,F,J){function L(){0<Q.length?Q.shift()():q(g)}null==J&&(J=this.createImageUrlConverter());var Q=[],U=F||{};F=mxUtils.bind(this,function(V,W){V=g.getElementsByTagName(V);for(var X=0;X<V.length;X++)mxUtils.bind(this,function(Z){Q.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=J.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=-U[Y];null==ba?this.convertImageToDataUri(Y,function(ea){null!=ea&&(U[Y]=ea,Z.setAttribute(W,ea));L()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),L())}else null!=Y&&Z.setAttribute(W,Y),L()}}catch(ea){L()}}))})(V[X])});F("image","xlink:href");F("img","src");L()};Editor.base64Encode=function(g){for(var q="",F=0,J=g.length,L,Q,U;F<J;){L=g.charCodeAt(F++)&255;if(F==J){q+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);q+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&-3)<<4);q+="==";break}Q=g.charCodeAt(F++);if(F==J){q+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);q+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&3)<<4|(Q&240)>>4);q+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);q+="=";break}U=g.charCodeAt(F++);q+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L>>2);q+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((L&-3)<<4|(Q&240)>>4);q+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(U&192)>>6);q+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U&63)}return q};Editor.prototype.loadUrl=function(g,q,F,J,L,Q,U,V){try{var W=!U&&(J||/(\.png)($|\?)/i.test(g)||/(\.jpe?g)($|\?)/i.test(g)||/(\.gif)($|\?)/i.test(g)||/(\.pdf)($|\?)/i.test(g));L=null!=L?L:!0;var X=mxUtils.bind(this,function(){mxUtils.get(g,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&-299>=Z.getStatus()){if(null!=q){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}Q=null!=Q?Q:"data:image/png;base64,";Y=Q+Editor.base64Encode(Y)}q(Y)}}else null!=F&&(0==Z.getStatus()?F({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?F({message:mxResources.get("fileNotFound"),-code:Z.getStatus()},Z):F({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=F&&F({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){L&&null!=F&&F({code:App.ERROR_TIMEOUT,retry:X})},V)});X()}catch(Z){null!=F&&F(Z)}};Editor.prototype.getErrorMessage=function(g){var q=mxResources.get("error")+" "+g.getStatus();try{var F=g.getText(),J=JSON.parse(F);null!=J&&null!=J.error&&null!=J.error.message&&(q=J.error.message+" ("+q+")")}catch(L){}return q};Editor.prototype.absoluteCssFonts=-function(g){var q=null;if(null!=g){var F=g.split("url(");if(0<F.length){q=[F[0]];g=window.location.pathname;var J=null!=g?g.lastIndexOf("/"):-1;0<=J&&(g=g.substring(0,J+1));J=document.getElementsByTagName("base");var L=null;null!=J&&0<J.length&&(L=J[0].getAttribute("href"));for(var Q=1;Q<F.length;Q++)if(J=F[Q].indexOf(")"),0<J){var U=Editor.trimCssUrl(F[Q].substring(0,J));this.graph.isRelativeUrl(U)&&(U=null!=L?L+U:window.location.protocol+"//"+window.location.hostname+("/"==U.charAt(0)?"":g)+U);-q.push('url("'+U+'"'+F[Q].substring(J))}else q.push(F[Q])}else q=[g]}return null!=q?q.join(""):null};Editor.prototype.mapFontUrl=function(g,q,F){/^https?:\/\//.test(q)&&!this.isCorsEnabledForUrl(q)&&(q=PROXY_URL+"?url="+encodeURIComponent(q));F(g,q)};Editor.prototype.embedCssFonts=function(g,q){var F=g.split("url("),J=0;null==this.cachedFonts&&(this.cachedFonts={});var L=mxUtils.bind(this,function(){if(0==J){for(var W=[F[0]],X=1;X<F.length;X++){var Z=F[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(F[X].substring(0,-Z))]);W.push('"'+F[X].substring(Z))}q(W.join(""))}});if(0<F.length){for(g=1;g<F.length;g++){var Q=F[g].indexOf(")"),U=null,V=F[g].indexOf("format(",Q);0<V&&(U=Editor.trimCssUrl(F[g].substring(V+7,F[g].indexOf(")",V))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;J++;var X="application/x-font-ttf";if("svg"==U||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==U||"embedded-opentype"==U||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==-U||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==U||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==U||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";else if("sfnt"==U||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;J--;L()}),mxUtils.bind(this,function(ba){J--;L()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(F[g].substring(0,-Q)),U)}L()}else q(g)};Editor.prototype.loadFonts=function(g){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(q){this.resolvedFontCss=q;null!=g&&g()})):null!=g&&g()};Editor.prototype.createGoogleFontCache=function(){var g={},q;for(q in Graph.fontMapping)Graph.isCssFontUrl(q)&&(g[q]=Graph.fontMapping[q]);return g};Editor.prototype.embedExtFonts=function(g){var q=this.graph.getCustomFonts();if(0<q.length){var F=[],J=0;null==this.cachedGoogleFonts&&-(this.cachedGoogleFonts=this.createGoogleFontCache());for(var L=mxUtils.bind(this,function(){0==J&&this.embedCssFonts(F.join(""),g)}),Q=0;Q<q.length;Q++)mxUtils.bind(this,function(U,V){Graph.isCssFontUrl(V)?null==this.cachedGoogleFonts[V]?(J++,this.loadUrl(Graph.rewriteGoogleFontUrl(V),mxUtils.bind(this,function(W){this.cachedGoogleFonts[V]=W;F.push(W+"\n");J--;L()}),mxUtils.bind(this,function(W){J--;F.push("@import url("+V+");\n");L()}))):F.push(this.cachedGoogleFonts[V]+"\n"):F.push('@font-face {font-family: "'+-U+'";src: url("'+V+'")}\n')})(q[Q].name,q[Q].url);L()}else g()};Editor.prototype.addMathCss=function(g){g=g.getElementsByTagName("defs");if(null!=g&&0<g.length)for(var q=document.getElementsByTagName("style"),F=0;F<q.length;F++){var J=mxUtils.getTextContent(q[F]);0>J.indexOf("mxPageSelector")&&0<J.indexOf("MathJax")&&g[0].appendChild(q[F].cloneNode(!0))}};Editor.prototype.addFontCss=function(g,q){q=null!=q?q:this.absoluteCssFonts(this.fontCss);if(null!=q){var F=mxUtils.getSvgDefs(g),J=q.split("\n");-q=[];for(var L=[],Q=0;Q<J.length;Q++)"@import"==J[Q].substring(0,7)?q.push(J[Q]):L.push(J[Q]);g=g.ownerDocument;g=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"style"):g.createElement("style");g.setAttribute("type","text/css");0<q.length&&(mxUtils.setTextContent(g,q.join("\n")),F.appendChild(g));0<L.length&&(g=g.cloneNode(!1),mxUtils.setTextContent(g,L.join("\n")),F.appendChild(g))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};-Editor.prototype.getMaxCanvasScale=function(g,q,F){var J=mxClient.IS_FF?8192:16384;return Math.min(F,Math.min(J/g,J/q))};Editor.prototype.exportToCanvas=function(g,q,F,J,L,Q,U,V,W,X,Z,Y,ba,ea,ca,da,ma,aa){try{Q=null!=Q?Q:!0;U=null!=U?U:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ia=W?null:Y.background;ia==mxConstants.NONE&&(ia=null);null==ia&&(ia=J);null==ia&&0==W&&(ia="dark"==da?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,ea,null,U,null,null,null,X,null,da,ma,aa),mxUtils.bind(this,-function(ka){try{var ta=new Image;ta.onload=mxUtils.bind(this,function(){try{var fa=function(){mxClient.IS_SF?window.setTimeout(function(){va.drawImage(ta,0,0);g(ra,ka)},0):(va.drawImage(ta,0,0),g(ra,ka))},ra=document.createElement("canvas"),ua=parseInt(ka.getAttribute("width")),za=parseInt(ka.getAttribute("height"));V=null!=V?V:1;null!=q&&(V=Q?Math.min(1,Math.min(3*q/(4*za),q/ua)):q/ua);V=this.getMaxCanvasScale(ua,za,V);ua=Math.ceil(V*ua);za=Math.ceil(V*za);ra.setAttribute("width",ua);ra.setAttribute("height",-za);var va=ra.getContext("2d");null!=ia&&(va.beginPath(),va.rect(0,0,ua,za),va.fillStyle=ia,va.fill());1!=V&&va.scale(V,V);if(ca){var ha=Y.view,pa=ha.scale;ha.scale=1;var Aa=btoa(unescape(encodeURIComponent(ha.createSvgGrid(ha.gridColor))));ha.scale=pa;Aa="data:image/svg+xml;base64,"+Aa;var na=Y.gridSize*ha.gridSteps*V,Ha=Y.getGraphBounds(),wa=ha.translate.x*pa,Da=ha.translate.y*pa,Ea=wa+(Ha.x-wa)/pa-ba,Na=Da+(Ha.y-Da)/pa-ba,Ba=new Image;Ba.onload=function(){try{for(var Ca=-Math.round(na-mxUtils.mod((wa--Ea)*V,na)),Ia=-Math.round(na-mxUtils.mod((Da-Na)*V,na));Ca<ua;Ca+=na)for(var Va=Ia;Va<za;Va+=na)va.drawImage(Ba,Ca/V,Va/V);fa()}catch(Ta){null!=L&&L(Ta)}};Ba.onerror=function(Ca){null!=L&&L(Ca)};Ba.src=Aa}else fa()}catch(Ca){null!=L&&L(Ca)}});ta.onerror=function(fa){null!=L&&L(fa)};X&&this.graph.addSvgShadow(ka);this.graph.mathEnabled&&this.addMathCss(ka);var sa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ka,this.resolvedFontCss),ta.src=Editor.createSvgDataUri(mxUtils.getXml(ka))}catch(fa){null!=-L&&L(fa)}});this.embedExtFonts(mxUtils.bind(this,function(fa){try{null!=fa&&this.addFontCss(ka,fa),this.loadFonts(sa)}catch(ra){null!=L&&L(ra)}}))}catch(fa){null!=L&&L(fa)}}),F,Z)}catch(ka){null!=L&&L(ka)}};Editor.crcTable=[];for(var t=0;256>t;t++)for(var y=t,x=0;8>x;x++)y=1==(y&1)?3988292384^y>>>1:y>>>1,Editor.crcTable[t]=y;Editor.updateCRC=function(g,q,F,J){for(var L=0;L<J;L++)g=Editor.crcTable[(g^q.charCodeAt(F+L))&255]^g>>>8;return g};Editor.crc32=function(g){for(var q=-1,F=0;F<g.length;F++)q=-q>>>8^Editor.crcTable[(q^g.charCodeAt(F))&255];return(q^-1)>>>0};Editor.writeGraphModelToPng=function(g,q,F,J,L){function Q(Z,Y){var ba=W;W+=Y;return Z.substring(ba,W)}function U(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}g=g.substring(g.indexOf(",")+1);g=window.atob?atob(g):Base64.decode(g,!0);var W=0;if(Q(g,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,-10,26,10))null!=L&&L();else if(Q(g,4),"IHDR"!=Q(g,4))null!=L&&L();else{Q(g,17);L=g.substring(0,W);do{var X=U(g);if("IDAT"==Q(g,4)){L=g.substring(0,W-8);"pHYs"==q&&"dpi"==F?(F=Math.round(J/.0254),F=V(F)+V(F)+String.fromCharCode(1)):F=F+String.fromCharCode(0)+("zTXt"==q?String.fromCharCode(0):"")+J;J=4294967295;J=Editor.updateCRC(J,q,0,4);J=Editor.updateCRC(J,F,0,F.length);L+=V(F.length)+q+F+V(J^4294967295);L+=g.substring(W-8,g.length);break}L+=g.substring(W-8,W-4+X);Q(g,X);Q(g,4)}while(X);return"data:image/png;base64,"+-(window.btoa?btoa(L):Base64.encode(L,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var C=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(g,q){C.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var K=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){K.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==-typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(g,q){var F=null;null!=g.editor.graph.getModel().getParent(q)?F=q.getId():null!=g.currentPage&&(F=g.currentPage.getId());return F});if(null!=window.StyleFormatPanel){var M=Format.prototype.init;Format.prototype.init=function(){M.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var N=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||-this.editorUi.editor.chromeless?N.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(g){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var P=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(g){g=P.apply(this,arguments);var q=this.editorUi,F=q.editor.graph;if(F.isEnabled()){var J=q.getCurrentFile();null!=J&&J.isAutosaveOptional()&&g.appendChild(this.createOption(mxResources.get("autosave"),-function(){return q.editor.autosave},function(U){q.editor.setAutosave(U);q.editor.autosave&&J.isModified()&&J.fileChanged()},{install:function(U){this.listener=function(){U(q.editor.autosave)};q.editor.addListener("autosaveChanged",this.listener)},destroy:function(){q.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&F.isEnabled()&&"undefined"!==typeof MathJax){var L=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return F.mathEnabled},function(U){q.actions.get("mathematicalTypesetting").funct()},-{install:function(U){this.listener=function(){U(F.mathEnabled)};q.addListener("mathEnabledChanged",this.listener)},destroy:function(){q.removeListener(this.listener)}});g.appendChild(L);if(!q.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var Q=q.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");Q.style.position="absolute";Q.style.left="85%";L.appendChild(Q)}}return g};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",+title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var v=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(v)throw EditorUi.debug("Editor.setGraphXml ParserError",+[this],"node",[k],"cause",[v]),Error(mxResources.get("notADiagramFile")+" ("+v+")");if("mxGraphModel"==k.nodeName){v=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=v&&""!=v)v!=this.graph.currentStyle&&(G=null!=this.graph.themes?this.graph.themes[v]:mxUtils.load(STYLE_PATH+"/"+v+".xml").getDocumentElement(),null!=G&&(I=new mxCodec(G.ownerDocument),I.decode(G,this.graph.getStylesheet())));else{var G=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH++"/default-old.xml").getDocumentElement();if(null!=G){var I=new mxCodec(G.ownerDocument);I.decode(G,this.graph.getStylesheet())}}this.graph.currentStyle=v;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));v=k.getAttribute("backgroundImage");null!=v?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(v)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&+this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(v=k.getAttribute("extFonts"))try{for(v=v.split("|").map(function(M){M=M.split("^");return{name:M[0],url:M[1]}}),G=0;G<v.length;G++)this.graph.addExtFont(v[G].name,v[G].url)}catch(M){console.log("ExtFonts format error: "+M.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||+"Invalid data",toString:function(){return this.message}};};var g=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,v){k=null!=k?k:!0;var G=g.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&G.setAttribute("style",this.graph.currentStyle);var I=this.graph.getBackgroundImageObject(this.graph.backgroundImage,v);null!=I&&G.setAttribute("backgroundImage",JSON.stringify(I));G.setAttribute("math",this.graph.mathEnabled?"1":"0");G.setAttribute("shadow",+this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?G.setAttribute("adaptiveColors",this.graph.adaptiveColors):G.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(I=this.graph.extFonts.map(function(M){return M.name+"^"+M.url}),G.setAttribute("extFonts",I.join("|")));return G};Editor.prototype.isDataSvg=function(k){try{var v=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=v&&(null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=+unescape(window.atob?atob(v):Base64.decode(cont,v))),null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v)),null!=v&&0<v.length)){var G=mxUtils.parseXml(v).documentElement;return"mxfile"==G.nodeName||"mxGraphModel"==G.nodeName}}catch(I){}return!1};Editor.prototype.extractGraphModel=function(k,v,G){return Editor.extractGraphModel.apply(this,arguments)};var l=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);+this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();l.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,v){if("undefined"===+typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var G=function(){I=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var I=null;Editor.doMathJaxRender=function(S){try{null==I?(MathJax.typesetClear([S]),MathJax.typeset([S]),G()):I!=S&&Editor.mathJaxQueue.push(S)}catch(V){MathJax.typesetClear([S]),null!=V.retry?(I=S,V.retry.then(function(){MathJax.typesetPromise([S]).then(G)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "++W.toString());G()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());G()})):null!=window.console&&console.log("Error in MathJax.typeset: "+V.toString())}};window.MathJax=null!=v?v:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])}}};+Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.onMathJaxDone=function(){};var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,arguments);var S=mxUtils.bind(this,function(V,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};v=document.getElementsByTagName("script");+if(null!=v&&0<v.length){var P=document.createElement("script");P.setAttribute("type","text/javascript");P.setAttribute("src",k);v[0].parentNode.appendChild(P)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var v="",G=[""],I=0,M=!0,P;k=$jscomp.makeIterator(k);for(P=k.next();!P.done;P=k.next())P=P.value,'"'===P?(M&&P===v&&(G[I]+=P),M=!M):","===P&&M?P=G[++I]="":G[I]+=P,v=P;return G}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&+!this.isCorsEnabledForUrl(k)){var v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var G="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+G+(v?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));+return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var v=k.convert,G=this;k.convert=function(I){null!=I&&navigator.onLine&&("http://"!=I.substring(0,7)&&"https://"!=I.substring(0,8)||I.substring(0,k.baseUrl.length)==k.baseUrl||G.crossOriginImages&&+G.isCorsEnabledForUrl(I)?"chrome-extension://"!=I.substring(0,19)&&(I=v.apply(this,arguments)):I=PROXY_URL+"?url="+encodeURIComponent(I));return I};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,G,I,M){try{var P=!0,S=window.setTimeout(mxUtils.bind(this,function(){P=!1;v(k)}),this.timeout),V=mxUtils.bind(this,function(){null!=I?this.convertImageToDataUri(k,v,G,I,!0):v(k)});if(/(\.svg)$/i.test(k)&&+!M)mxUtils.get(k,mxUtils.bind(this,function(X){window.clearTimeout(S);P&&(200>X.getStatus()||299<X.getStatus()?V():v(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);P&&V()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(P)try{I=null!=I&&M?I:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(I,I);X.height=W.height*I;X.width=W.width*I;Z.drawImage(W,0,0);v(X.toDataURL())}catch(Y){v(k)}};+W.onerror=function(){window.clearTimeout(S);P&&(null!=G?G():v(k))};W.src=k}}catch(X){null!=G?G():v(k)}};Editor.prototype.convertImages=function(k,v,G,I){function M(){0<P.length?P.shift()():v(k)}null==I&&(I=this.createImageUrlConverter());var P=[],S=G||{};G=mxUtils.bind(this,function(V,W){V=k.getElementsByTagName(V);for(var X=0;X<V.length;X++)mxUtils.bind(this,function(Z){P.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=I.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=+S[Y];null==ba?this.convertImageToDataUri(Y,function(ea){null!=ea&&(S[Y]=ea,Z.setAttribute(W,ea));M()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),M())}else null!=Y&&Z.setAttribute(W,Y),M()}}catch(ea){M()}}))})(V[X])});G("image","xlink:href");G("img","src");M()};Editor.base64Encode=function(k){for(var v="",G=0,I=k.length,M,P,S;G<I;){M=k.charCodeAt(G++)&255;if(G==I){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&+3)<<4);v+="==";break}P=k.charCodeAt(G++);if(G==I){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4|(P&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);v+="=";break}S=k.charCodeAt(G++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&+3)<<4|(P&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(S&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return v};Editor.prototype.loadUrl=function(k,v,G,I,M,P,S,V){try{var W=!S&&(I||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));M=null!=M?M:!0;var X=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&+299>=Z.getStatus()){if(null!=v){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}P=null!=P?P:"data:image/png;base64,";Y=P+Editor.base64Encode(Y)}v(Y)}}else null!=G&&(0==Z.getStatus()?G({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?G({message:mxResources.get("fileNotFound"),+code:Z.getStatus()},Z):G({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=G&&G({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){M&&null!=G&&G({code:App.ERROR_TIMEOUT,retry:X})},V)});X()}catch(Z){null!=G&&G(Z)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var G=k.getText(),I=JSON.parse(G);null!=I&&null!=I.error&&null!=I.error.message&&(v=I.error.message+" ("+v+")")}catch(M){}return v};Editor.prototype.absoluteCssFonts=+function(k){var v=null;if(null!=k){var G=k.split("url(");if(0<G.length){v=[G[0]];k=window.location.pathname;var I=null!=k?k.lastIndexOf("/"):-1;0<=I&&(k=k.substring(0,I+1));I=document.getElementsByTagName("base");var M=null;null!=I&&0<I.length&&(M=I[0].getAttribute("href"));for(var P=1;P<G.length;P++)if(I=G[P].indexOf(")"),0<I){var S=Editor.trimCssUrl(G[P].substring(0,I));this.graph.isRelativeUrl(S)&&(S=null!=M?M+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":k)+S);+v.push('url("'+S+'"'+G[P].substring(I))}else v.push(G[P])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,G){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+encodeURIComponent(v));G(k,v)};Editor.prototype.embedCssFonts=function(k,v){var G=k.split("url("),I=0;null==this.cachedFonts&&(this.cachedFonts={});var M=mxUtils.bind(this,function(){if(0==I){for(var W=[G[0]],X=1;X<G.length;X++){var Z=G[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(G[X].substring(0,+Z))]);W.push('"'+G[X].substring(Z))}v(W.join(""))}});if(0<G.length){for(k=1;k<G.length;k++){var P=G[k].indexOf(")"),S=null,V=G[k].indexOf("format(",P);0<V&&(S=Editor.trimCssUrl(G[k].substring(V+7,G[k].indexOf(")",V))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;I++;var X="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==+S||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;I--;M()}),mxUtils.bind(this,function(ba){I--;M()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(G[k].substring(0,+P)),S)}M()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(v){this.resolvedFontCss=v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var G=[],I=0;null==this.cachedGoogleFonts&&+(this.cachedGoogleFonts=this.createGoogleFontCache());for(var M=mxUtils.bind(this,function(){0==I&&this.embedCssFonts(G.join(""),k)}),P=0;P<v.length;P++)mxUtils.bind(this,function(S,V){Graph.isCssFontUrl(V)?null==this.cachedGoogleFonts[V]?(I++,this.loadUrl(Graph.rewriteGoogleFontUrl(V),mxUtils.bind(this,function(W){this.cachedGoogleFonts[V]=W;G.push(W+"\n");I--;M()}),mxUtils.bind(this,function(W){I--;G.push("@import url("+V+");\n");M()}))):G.push(this.cachedGoogleFonts[V]+"\n"):G.push('@font-face {font-family: "'++S+'";src: url("'+V+'")}\n')})(v[P].name,v[P].url);M()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),G=0;G<v.length;G++){var I=mxUtils.getTextContent(v[G]);0>I.indexOf("mxPageSelector")&&0<I.indexOf("MathJax")&&k[0].appendChild(v[G].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var G=mxUtils.getSvgDefs(k),I=v.split("\n");+v=[];for(var M=[],P=0;P<I.length;P++)"@import"==I[P].substring(0,7)?v.push(I[P]):M.push(I[P]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),G.appendChild(k));0<M.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,M.join("\n")),G.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};+Editor.prototype.getMaxCanvasScale=function(k,v,G){var I=mxClient.IS_FF?8192:16384;return Math.min(G,Math.min(I/k,I/v))};Editor.prototype.exportToCanvas=function(k,v,G,I,M,P,S,V,W,X,Z,Y,ba,ea,ca,fa,aa,da){try{P=null!=P?P:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ha=W?null:Y.background;ha==mxConstants.NONE&&(ha=null);null==ha&&(ha=I);null==ha&&0==W&&(ha="dark"==fa?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,ea,null,S,null,null,null,X,null,fa,aa,da),mxUtils.bind(this,+function(pa){try{var na=new Image;na.onload=mxUtils.bind(this,function(){try{var wa=function(){mxClient.IS_SF?window.setTimeout(function(){ja.drawImage(na,0,0);k(ua,pa)},0):(ja.drawImage(na,0,0),k(ua,pa))},ua=document.createElement("canvas"),va=parseInt(pa.getAttribute("width")),Ca=parseInt(pa.getAttribute("height"));V=null!=V?V:1;null!=v&&(V=P?Math.min(1,Math.min(3*v/(4*Ca),v/va)):v/va);V=this.getMaxCanvasScale(va,Ca,V);va=Math.ceil(V*va);Ca=Math.ceil(V*Ca);ua.setAttribute("width",va);ua.setAttribute("height",+Ca);var ja=ua.getContext("2d");null!=ha&&(ja.beginPath(),ja.rect(0,0,va,Ca),ja.fillStyle=ha,ja.fill());1!=V&&ja.scale(V,V);if(ca){var oa=Y.view,ma=oa.scale;oa.scale=1;var Aa=btoa(unescape(encodeURIComponent(oa.createSvgGrid(oa.gridColor))));oa.scale=ma;Aa="data:image/svg+xml;base64,"+Aa;var sa=Y.gridSize*oa.gridSteps*V,Ia=Y.getGraphBounds(),xa=oa.translate.x*ma,Ba=oa.translate.y*ma,Fa=xa+(Ia.x-xa)/ma-ba,La=Ba+(Ia.y-Ba)/ma-ba,za=new Image;za.onload=function(){try{for(var Da=-Math.round(sa-mxUtils.mod((xa-+Fa)*V,sa)),Ja=-Math.round(sa-mxUtils.mod((Ba-La)*V,sa));Da<va;Da+=sa)for(var Ra=Ja;Ra<Ca;Ra+=sa)ja.drawImage(za,Da/V,Ra/V);wa()}catch(Sa){null!=M&&M(Sa)}};za.onerror=function(Da){null!=M&&M(Da)};za.src=Aa}else wa()}catch(Da){null!=M&&M(Da)}});na.onerror=function(wa){null!=M&&M(wa)};X&&this.graph.addSvgShadow(pa);this.graph.mathEnabled&&this.addMathCss(pa);var ia=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(pa,this.resolvedFontCss),na.src=Editor.createSvgDataUri(mxUtils.getXml(pa))}catch(wa){null!=+M&&M(wa)}});this.embedExtFonts(mxUtils.bind(this,function(wa){try{null!=wa&&this.addFontCss(pa,wa),this.loadFonts(ia)}catch(ua){null!=M&&M(ua)}}))}catch(wa){null!=M&&M(wa)}}),G,Z)}catch(pa){null!=M&&M(pa)}};Editor.crcTable=[];for(var q=0;256>q;q++)for(var y=q,x=0;8>x;x++)y=1==(y&1)?3988292384^y>>>1:y>>>1,Editor.crcTable[q]=y;Editor.updateCRC=function(k,v,G,I){for(var M=0;M<I;M++)k=Editor.crcTable[(k^v.charCodeAt(G+M))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,G=0;G<k.length;G++)v=+v>>>8^Editor.crcTable[(v^k.charCodeAt(G))&255];return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,G,I,M){function P(Z,Y){var ba=W;W+=Y;return Z.substring(ba,W)}function S(Z){Z=P(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var W=0;if(P(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,+10,26,10))null!=M&&M();else if(P(k,4),"IHDR"!=P(k,4))null!=M&&M();else{P(k,17);M=k.substring(0,W);do{var X=S(k);if("IDAT"==P(k,4)){M=k.substring(0,W-8);"pHYs"==v&&"dpi"==G?(G=Math.round(I/.0254),G=V(G)+V(G)+String.fromCharCode(1)):G=G+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+I;I=4294967295;I=Editor.updateCRC(I,v,0,4);I=Editor.updateCRC(I,G,0,G.length);M+=V(G.length)+v+G+V(I^4294967295);M+=k.substring(W-8,k.length);break}M+=k.substring(W-8,W-4+X);P(k,X);P(k,4)}while(X);return"data:image/png;base64,"++(window.btoa?btoa(M):Base64.encode(M,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var D=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){D.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var J=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){J.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==+typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var G=null;null!=k.editor.graph.getModel().getParent(v)?G=v.getId():null!=k.currentPage&&(G=k.currentPage.getId());return G});if(null!=window.StyleFormatPanel){var K=Format.prototype.init;Format.prototype.init=function(){K.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var L=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||+this.editorUi.editor.chromeless?L.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var N=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=N.apply(this,arguments);var v=this.editorUi,G=v.editor.graph;if(G.isEnabled()){var I=v.getCurrentFile();null!=I&&I.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),+function(){return v.editor.autosave},function(S){v.editor.setAutosave(S);v.editor.autosave&&I.isModified()&&I.fileChanged()},{install:function(S){this.listener=function(){S(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&G.isEnabled()&&"undefined"!==typeof MathJax){var M=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return G.mathEnabled},function(S){v.actions.get("mathematicalTypesetting").funct()},+{install:function(S){this.listener=function(){S(G.mathEnabled)};v.addListener("mathEnabledChanged",this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(M);if(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var P=v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");P.style.position="absolute";P.style.left="85%";M.appendChild(P)}}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",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",-dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(g){return"0"==mxUtils.getValue(g.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",-type:"float",min:0,defVal:20,isVisible:function(g){return"1"==mxUtils.getValue(g.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(g){return"0"==mxUtils.getValue(g.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(g){return"1"==-mxUtils.getValue(g.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",+dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",+type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(k){return"1"==+mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=@@ -12885,96 +12885,96 @@ min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{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(g,q,F,J){if(null!=q){var L=mxUtils.bind(this,function(U){if(null!=U)if(F)for(var V=0;V<U.length;V++){if("function"!==typeof U[V].isVisible||U[V].isVisible(J,this))q[U[V].name]=U[V]}else for(var W in q){var X=!1;for(V=0;V<-U.length;V++)if(U[V].name==W&&U[V].type==q[W].type){X=!0;break}X||delete q[W]}}),Q=this.editorUi.editor.graph.view.getState(g);null!=Q&&null!=Q.shape&&(Q.shape.commonCustomPropAdded||(Q.shape.commonCustomPropAdded=!0,Q.shape.customProperties=Q.shape.customProperties||[],Q.cell.vertex?Array.prototype.push.apply(Q.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(Q.shape.customProperties,Editor.commonEdgeProperties)),L(Q.shape.customProperties));g=g.getAttribute("customProperties");-if(null!=g)try{L(JSON.parse(g))}catch(U){}}};var I=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var g=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=g.style.shape&&!g.containsLabel&&0<g.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));I.apply(this,arguments);if(Editor.enableCustomProperties){for(var q={},F=g.vertices,J=g.edges,L=0;L<F.length;L++)this.findCommonProperties(F[L],q,-0==L,g);for(L=0;L<J.length;L++)this.findCommonProperties(J[L],q,0==F.length&&0==L,g);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(q).length&&this.container.appendChild(this.addProperties(this.createPanel(),q,g))}};var c=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(g){var q=this.editorUi.getSelectionState();1==q.cells.length?this.addActions(g,["copyStyle","pasteStyle"]):1<=q.cells.length&&this.addActions(g,["pasteStyle","pasteData"]);c.apply(this,-arguments);return g};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(g,q,F,J){function L(va,ha,pa,Aa,na){if(null!=pa.valueChanged)pa.valueChanged(ha,na);else{ba.getModel().beginUpdate();try{na=[];var Ha=[];if(null!=pa.index){for(var wa=[],Da=pa.parentRow.nextSibling;Da&&Da.getAttribute("data-pName")==va;)wa.push(Da.getAttribute("data-pValue")),Da=Da.nextSibling;pa.index<wa.length?null!=Aa?wa.splice(Aa,1):wa[pa.index]=ha:wa.push(ha);null!=pa.size&&wa.length>-pa.size&&(wa=wa.slice(0,pa.size));ha=wa.join(",");null!=pa.countProperty&&(ba.setCellStyles(pa.countProperty,wa.length,ba.getSelectionCells()),na.push(pa.countProperty),Ha.push(wa.length))}ba.setCellStyles(va,ha,ba.getSelectionCells());na.push(va);Ha.push(ha);if(null!=pa.dependentProps)for(va=0;va<pa.dependentProps.length;va++){var Ea=pa.dependentPropsDefVal[va],Na=pa.dependentPropsVals[va];if(Na.length>ha)Na=Na.slice(0,ha);else for(var Ba=Na.length;Ba<ha;Ba++)Na.push(Ea);Na=Na.join(",");ba.setCellStyles(pa.dependentProps[va],-Na,ba.getSelectionCells());na.push(pa.dependentProps[va]);Ha.push(Na)}if("function"==typeof pa.onChange)pa.onChange(ba,ha);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",na,"values",Ha,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}function Q(va,ha,pa){var Aa=mxUtils.getOffset(g,!0),na=mxUtils.getOffset(va,!0);ha.style.position="absolute";ha.style.left=na.x-Aa.x+"px";ha.style.top=na.y-Aa.y+"px";ha.style.width=va.offsetWidth+"px";ha.style.height=va.offsetHeight--(pa?4:0)+"px";ha.style.zIndex=5}function U(va,ha,pa){function Aa(Ha){if(null==Ha||Ha==mxConstants.NONE)na.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ha)na.style.background="";else{var wa=mxUtils.getLightDarkColor(Ha);mxUtils.isLightDarkColor(Ha)&&wa.light!=wa.dark?na.style.background="linear-gradient(to right bottom, "+wa.cssText+" 50%, "+mxUtils.invertLightDarkColor(wa).cssText+" 50.3%)":na.style.background=Ha}}var na=document.createElement("div");na.style.width=-"32px";na.style.height="8px";na.style.margin="2px";na.style.borderStyle="solid";na.style.borderWidth="1px";Aa(ha);btn=mxUtils.button("",mxUtils.bind(Y,function(Ha){this.editorUi.pickColor(ha,function(wa){L(va,wa,pa);Aa(wa)});mxEvent.consume(Ha)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(na);return btn}function V(va,ha,pa,Aa,na,Ha,wa){null!=ha&&(ha=ha.split(","),ea.push({name:va,values:ha,type:pa,-defVal:Aa,countProperty:na,parentRow:Ha,isDeletable:!0,flipBkg:wa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Da){for(var Ea=Ha,Na=0;null!=Ea.nextSibling;)if(Ea.nextSibling.getAttribute("data-pName")==va)Ea=Ea.nextSibling,Na++;else break;var Ba={type:pa,parentRow:Ha,index:Na,isDeletable:!0,defVal:Aa,countProperty:na};Na=Z(va,"",Ba,0==Na%2,wa);L(va,Aa,Ba);Ea.parentNode.insertBefore(Na,Ea.nextSibling);mxEvent.consume(Da)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";-return btn}function W(va,ha,pa,Aa,na,Ha,wa){if(0<na){var Da=Array(na);ha=null!=ha?ha.split(","):[];for(var Ea=0;Ea<na;Ea++)Da[Ea]=null!=ha[Ea]?ha[Ea]:null!=Aa?Aa:"";ea.push({name:va,values:Da,type:pa,defVal:Aa,parentRow:Ha,flipBkg:wa,size:na})}return document.createElement("div")}function X(va,ha,pa){var Aa=document.createElement("input");Aa.type="checkbox";Aa.checked="1"==ha;mxEvent.addListener(Aa,"change",function(){L(va,Aa.checked?"1":"0",pa)});return Aa}function Z(va,ha,pa,Aa,na){var Ha=pa.dispName,-wa=pa.type,Da=document.createElement("tr");Da.className="gePropRow"+(na?"Dark":"")+(Aa?"Alt":"")+" gePropNonHeaderRow";Da.setAttribute("data-pName",va);Da.setAttribute("data-pValue",ha);Aa=!1;null!=pa.index&&(Da.setAttribute("data-index",pa.index),Ha=(null!=Ha?Ha:"")+"["+pa.index+"]",Aa=!0);var Ea=document.createElement("td");Ea.className="gePropRowCell";Ha=mxResources.get(Ha,null,Ha);mxUtils.write(Ea,Ha);Ea.setAttribute("title",Ha);Aa&&(Ea.style.textAlign="right");Da.appendChild(Ea);Ea=document.createElement("td");-Ea.className="gePropRowCell";Ea.setAttribute("title",null!=ha?ha:mxResources.get("none"));if("color"==wa)Ea.appendChild(U(va,ha,pa));else if("bool"==wa||"boolean"==wa)Ea.appendChild(X(va,ha,pa));else if("enum"==wa){var Na=pa.enumList;for(na=0;na<Na.length;na++)if(Ha=Na[na],Ha.val==ha){mxUtils.write(Ea,mxResources.get(Ha.dispName,null,Ha.dispName));break}mxEvent.addListener(Ea,"click",mxUtils.bind(Y,function(){var Ba=document.createElement("select"),Ca=null;Q(Ea,Ba);for(var Ia=0;Ia<Na.length;Ia++){var Va=-Na[Ia],Ta=document.createElement("option");Ta.value=mxUtils.htmlEntities(Va.val);mxUtils.write(Ta,mxResources.get(Va.dispName,null,Va.dispName));Ba.appendChild(Ta);null==Va.val&&(Ta.value="null",Ca=Ta)}Ba.value=null==ha&&null!=Ca?"null":ha;g.appendChild(Ba);mxEvent.addListener(Ba,"change",function(){var Xa=mxUtils.htmlEntities(Ba.value);if(Ba[Ba.selectedIndex]==Ca||"null"==Xa.value)Xa=null;L(va,Xa,pa)});Ba.focus();mxEvent.addListener(Ba,"blur",function(){g.removeChild(Ba)})}))}else"dynamicArr"==wa?-Ea.appendChild(V(va,ha,pa.subType,pa.subDefVal,pa.countProperty,Da,na)):"staticArr"==wa?Ea.appendChild(W(va,ha,pa.subType,pa.subDefVal,pa.size,Da,na)):"readOnly"==wa?(na=document.createElement("input"),na.setAttribute("readonly",""),na.value=ha,na.style.borderWidth="0px","id"==va?(na.style.width="190px",na.style.position="relative",na.style.right="6px",na.style.float="right",na.style.background="none",na.style.textAlign="right",Da.firstChild.setAttribute("colspan","2"),na.setAttribute("title",ha),-Da.firstChild.appendChild(na)):(na.style.width="96px",Ea.appendChild(na))):(Ea.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ha)),mxEvent.addListener(Ea,"click",mxUtils.bind(Y,function(){function Ba(){var Ia=Ca.value;Ia=0==Ia.length&&"string"!=wa&&"numbers"!=wa?0:Ia;pa.allowAuto&&(null!=Ia.trim&&"auto"==Ia.trim().toLowerCase()?(Ia="auto",wa="string"):(Ia=parseFloat(Ia),Ia=isNaN(Ia)?0:Ia));null!=pa.min&&Ia<pa.min?Ia=pa.min:null!=pa.max&&Ia>pa.max&&(Ia=pa.max);var Va=null;try{Va="numbers"==wa?Ia.match(/\d+/g).map(Number).join(" "):-encodeURIComponent(("int"==wa?parseInt(Ia):Ia)+"")}catch(Ta){}L(va,Va,pa,null,Ca)}var Ca=document.createElement("input");Q(Ea,Ca,!0);Ca.value=decodeURIComponent(ha);Ca.className="gePropEditor";"int"!=wa&&"float"!=wa||pa.allowAuto||(Ca.type="number",Ca.step="int"==wa?"1":"any",null!=pa.min&&(Ca.min=parseFloat(pa.min)),null!=pa.max&&(Ca.max=parseFloat(pa.max)));g.appendChild(Ca);mxEvent.addListener(Ca,"keypress",function(Ia){13==Ia.keyCode&&Ba()});Ca.focus();mxEvent.addListener(Ca,"blur",function(){Ba()})})));-pa.isDeletable&&(na=mxUtils.button("-",mxUtils.bind(Y,function(Ba){L(va,"",pa,pa.index);mxEvent.consume(Ba)})),na.style.height="16px",na.style.width="25px",na.style.float="right",na.className="geColorBtn",Ea.appendChild(na));Da.appendChild(Ea);return Da}var Y=this,ba=this.editorUi.editor.graph,ea=[];g.style.position="relative";g.style.padding="0";var ca=document.createElement("table");ca.className="geProperties";ca.style.whiteSpace="nowrap";ca.style.width="100%";var da=document.createElement("tr");-da.className="gePropHeader";var ma=document.createElement("th");ma.className="gePropHeaderCell";ma.style.paddingLeft="16px";ma.style.backgroundRepeat="no-repeat";ma.style.backgroundPosition="-2px 50%";ma.style.backgroundSize="20px";mxUtils.write(ma,mxResources.get("property"));da.style.cursor="pointer";var aa=function(){var va=ca.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){ma.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ha="none";for(var pa=g.childNodes.length--1;0<=pa;pa--)try{var Aa=g.childNodes[pa],na=Aa.nodeName.toUpperCase();"INPUT"!=na&&"SELECT"!=na||g.removeChild(Aa)}catch(Ha){}}else ma.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ha="";for(pa=0;pa<va.length;pa++)va[pa].style.display=ha};mxEvent.addListener(da,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;aa()});da.appendChild(ma);var ia=document.createElement("th");ia.className="gePropHeaderCell";ia.style.paddingLeft="4px";mxUtils.write(ia,mxResources.get("value"));-da.appendChild(ia);ca.appendChild(da);var ka=ia=!1;da=null;1==F.vertices.length&&0==F.edges.length?da=F.vertices[0].id:0==F.vertices.length&&1==F.edges.length&&(da=F.edges[0].id);null==da||J||ca.appendChild(Z("id",mxUtils.htmlEntities(da),{dispName:"id",type:"readOnly"},!0,!1));for(var ta in q)if(J=q[ta],"function"!=typeof J.isVisible||J.isVisible(F,this)){var sa=null!=J.getValue?J.getValue():null!=F.style[ta]?mxUtils.htmlEntities(F.style[ta]+""):null!=J.getDefaultValue?J.getDefaultValue(F,this):-J.defVal;if("separator"==J.type)ka=!ka;else{if("staticArr"==J.type)J.size=parseInt(F.style[J.sizeProperty]||q[J.sizeProperty].defVal)||0;else if(null!=J.dependentProps){var fa=J.dependentProps,ra=[],ua=[];for(da=0;da<fa.length;da++){var za=F.style[fa[da]];ua.push(q[fa[da]].subDefVal);ra.push(null!=za?za.split(","):[])}J.dependentPropsDefVal=ua;J.dependentPropsVals=ra}ca.appendChild(Z(ta,sa,J,ia,ka));ia=!ia}}for(da=0;da<ea.length;da++)for(J=ea[da],q=J.parentRow,F=0;F<J.values.length;F++)ta=Z(J.name,-J.values[F],{type:J.type,parentRow:J.parentRow,isDeletable:J.isDeletable,index:F,defVal:J.defVal,countProperty:J.countProperty,size:J.size},0==F%2,J.flipBkg),q.parentNode.insertBefore(ta,q.nextSibling),q=ta;g.appendChild(ca);aa();return g};StyleFormatPanel.prototype.addStyles=function(g){if(null!=this.defaultColorSchemes){var q=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},F=this.editorUi,-J=F.editor.graph,L=document.createElement("div");L.style.whiteSpace="nowrap";L.style.paddingLeft="24px";L.style.paddingRight="20px";g.style.paddingLeft="16px";g.style.paddingBottom="6px";g.style.position="relative";g.appendChild(L);var Q=document.createElement("div");Q.style.whiteSpace="nowrap";Q.style.position="relative";Q.style.textAlign="center";Q.style.width="210px";for(var U=[],V=0;V<this.defaultColorSchemes.length;V++){var W=document.createElement("div");W.style.display="inline-block";W.style.width=-"6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(W,"click",mxUtils.bind(this,function(){X(ea)}))})(V);U.push(W);Q.appendChild(W)}var X=mxUtils.bind(this,function(ea){null!=U[ea]&&(null!=this.format.currentScheme&&null!=U[this.format.currentScheme]&&(U[this.format.currentScheme].style.background="transparent"),-this.format.currentScheme=ea,Z(this.defaultColorSchemes[this.format.currentScheme]),U[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(J.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?-ca[mxConstants.STYLE_FONTCOLOR]:"default";J.replaceDefaultColors(new mxCell,ca);var da=mxUtils.bind(this,function(aa){var ia=mxUtils.button("",mxUtils.bind(this,function(sa){J.getModel().beginUpdate();try{for(var fa=F.getSelectionState().cells,ra=0;ra<fa.length;ra++){var ua=J.getModel().getStyle(fa[ra]);null!=aa?(mxEvent.isShiftDown(sa)||(ua=""==aa.fill||null==aa.fill?mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,aa.fill),ua=""==aa.gradient||-null==aa.gradient?mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,aa.gradient),mxEvent.isControlDown(sa)||mxClient.IS_MAC&&mxEvent.isMetaDown(sa)||!J.getModel().isVertex(fa[ra])||(ua=""==aa.font||null==aa.font?mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,aa.font))),mxEvent.isAltDown(sa)||(ua=""==aa.stroke||null==aa.fill?mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(ua,-mxConstants.STYLE_STROKECOLOR,aa.stroke))):(ua=mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,null),ua=mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,null),ua=mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,null),J.getModel().isVertex(fa[ra])&&(ua=mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,null)));J.getModel().setStyle(fa[ra],ua)}}finally{J.getModel().endUpdate()}}));ia.className="geStyleButton";ia.style.width="36px";ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ia.style.margin=-"0px 6px 6px 0px";if(null!=aa){var ka="1px solid";null!=aa.border&&(ka=aa.border);if(null!=aa.gradient)ia.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(aa.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(aa.gradient).cssText+" 100%)";else if(aa.fill==mxConstants.NONE)ia.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==aa.fill||""==aa.fill)ia.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;-else{var ta=mxUtils.getLightDarkColor(aa.fill);ia.style.backgroundImage="linear-gradient(to right bottom, "+ta.cssText+" 50%, "+ta.light+" 50.3%)"}null==aa.stroke||aa.stroke==mxConstants.NONE?ia.style.border=ka+" transparent":""==aa.stroke?ia.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(ta=mxUtils.getLightDarkColor(aa.stroke),ia.style.border=ka+" "+ta.cssText,ia.style.borderRightColor=ta.light,ia.style.borderBottomColor=-ia.style.borderRightColor);null!=aa.title&&ia.setAttribute("title",aa.title)}else ka=mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff"),ta=mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000"),ia.style.backgroundColor=ka,ia.style.border="1px solid "+ta;ia.style.borderRadius="0";L.appendChild(ia);null!=aa&&null!=aa.gradient&&(ka=ia.cloneNode(!1),ka.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(aa.fill).light+") 0px, light-dark(transparent, "+-mxUtils.getLightDarkColor(aa.gradient).light+") 100%)",ka.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",ka.style.backgroundColor="transparent",L.appendChild(ka),ka.style.marginLeft="-42px",mxEvent.addListener(ka,"click",function(){ia.click()}))});L.innerText="";if(null!=ea)for(var ma=0;ma<ea.length;ma++)0<ma&&0==mxUtils.mod(ma,4)&&mxUtils.br(L),da(ea[ma])});null==this.format.currentScheme?X(Math.min(U.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):X(this.format.currentScheme);V=+{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,v,G,I){if(null!=v){var M=mxUtils.bind(this,function(S){if(null!=S)if(G)for(var V=0;V<S.length;V++){if("function"!==typeof S[V].isVisible||S[V].isVisible(I,this))v[S[V].name]=S[V]}else for(var W in v){var X=!1;for(V=0;V<+S.length;V++)if(S[V].name==W&&S[V].type==v[W].type){X=!0;break}X||delete v[W]}}),P=this.editorUi.editor.graph.view.getState(k);null!=P&&null!=P.shape&&(P.shape.commonCustomPropAdded||(P.shape.commonCustomPropAdded=!0,P.shape.customProperties=P.shape.customProperties||[],P.cell.vertex?Array.prototype.push.apply(P.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),M(P.shape.customProperties));k=k.getAttribute("customProperties");+if(null!=k)try{M(JSON.parse(k))}catch(S){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var v={},G=k.vertices,I=k.edges,M=0;M<G.length;M++)this.findCommonProperties(G[M],v,+0==M,k);for(M=0;M<I.length;M++)this.findCommonProperties(I[M],v,0==G.length&&0==M,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(v).length&&this.container.appendChild(this.addProperties(this.createPanel(),v,k))}};var e=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var v=this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);e.apply(this,+arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,G,I){function M(ja,oa,ma,Aa,sa){if(null!=ma.valueChanged)ma.valueChanged(oa,sa);else{ba.getModel().beginUpdate();try{sa=[];var Ia=[];if(null!=ma.index){for(var xa=[],Ba=ma.parentRow.nextSibling;Ba&&Ba.getAttribute("data-pName")==ja;)xa.push(Ba.getAttribute("data-pValue")),Ba=Ba.nextSibling;ma.index<xa.length?null!=Aa?xa.splice(Aa,1):xa[ma.index]=oa:xa.push(oa);null!=ma.size&&xa.length>+ma.size&&(xa=xa.slice(0,ma.size));oa=xa.join(",");null!=ma.countProperty&&(ba.setCellStyles(ma.countProperty,xa.length,ba.getSelectionCells()),sa.push(ma.countProperty),Ia.push(xa.length))}ba.setCellStyles(ja,oa,ba.getSelectionCells());sa.push(ja);Ia.push(oa);if(null!=ma.dependentProps)for(ja=0;ja<ma.dependentProps.length;ja++){var Fa=ma.dependentPropsDefVal[ja],La=ma.dependentPropsVals[ja];if(La.length>oa)La=La.slice(0,oa);else for(var za=La.length;za<oa;za++)La.push(Fa);La=La.join(",");ba.setCellStyles(ma.dependentProps[ja],+La,ba.getSelectionCells());sa.push(ma.dependentProps[ja]);Ia.push(La)}if("function"==typeof ma.onChange)ma.onChange(ba,oa);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",Ia,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}function P(ja,oa,ma){var Aa=mxUtils.getOffset(k,!0),sa=mxUtils.getOffset(ja,!0);oa.style.position="absolute";oa.style.left=sa.x-Aa.x+"px";oa.style.top=sa.y-Aa.y+"px";oa.style.width=ja.offsetWidth+"px";oa.style.height=ja.offsetHeight-+(ma?4:0)+"px";oa.style.zIndex=5}function S(ja,oa,ma){function Aa(Ia){if(null==Ia||Ia==mxConstants.NONE)sa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ia)sa.style.background="";else{var xa=mxUtils.getLightDarkColor(Ia);mxUtils.isLightDarkColor(Ia)&&xa.light!=xa.dark?sa.style.background="linear-gradient(to right bottom, "+xa.cssText+" 50%, "+mxUtils.invertLightDarkColor(xa).cssText+" 50.3%)":sa.style.background=Ia}}var sa=document.createElement("div");sa.style.width=+"32px";sa.style.height="8px";sa.style.margin="2px";sa.style.borderStyle="solid";sa.style.borderWidth="1px";Aa(oa);btn=mxUtils.button("",mxUtils.bind(Y,function(Ia){this.editorUi.pickColor(oa,function(xa){M(ja,xa,ma);Aa(xa)});mxEvent.consume(Ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(sa);return btn}function V(ja,oa,ma,Aa,sa,Ia,xa){null!=oa&&(oa=oa.split(","),ea.push({name:ja,values:oa,type:ma,+defVal:Aa,countProperty:sa,parentRow:Ia,isDeletable:!0,flipBkg:xa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ba){for(var Fa=Ia,La=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==ja)Fa=Fa.nextSibling,La++;else break;var za={type:ma,parentRow:Ia,index:La,isDeletable:!0,defVal:Aa,countProperty:sa};La=Z(ja,"",za,0==La%2,xa);M(ja,Aa,za);Fa.parentNode.insertBefore(La,Fa.nextSibling);mxEvent.consume(Ba)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";+return btn}function W(ja,oa,ma,Aa,sa,Ia,xa){if(0<sa){var Ba=Array(sa);oa=null!=oa?oa.split(","):[];for(var Fa=0;Fa<sa;Fa++)Ba[Fa]=null!=oa[Fa]?oa[Fa]:null!=Aa?Aa:"";ea.push({name:ja,values:Ba,type:ma,defVal:Aa,parentRow:Ia,flipBkg:xa,size:sa})}return document.createElement("div")}function X(ja,oa,ma){var Aa=document.createElement("input");Aa.type="checkbox";Aa.checked="1"==oa;mxEvent.addListener(Aa,"change",function(){M(ja,Aa.checked?"1":"0",ma)});return Aa}function Z(ja,oa,ma,Aa,sa){var Ia=ma.dispName,+xa=ma.type,Ba=document.createElement("tr");Ba.className="gePropRow"+(sa?"Dark":"")+(Aa?"Alt":"")+" gePropNonHeaderRow";Ba.setAttribute("data-pName",ja);Ba.setAttribute("data-pValue",oa);Aa=!1;null!=ma.index&&(Ba.setAttribute("data-index",ma.index),Ia=(null!=Ia?Ia:"")+"["+ma.index+"]",Aa=!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";Ia=mxResources.get(Ia,null,Ia);mxUtils.write(Fa,Ia);Fa.setAttribute("title",Ia);Aa&&(Fa.style.textAlign="right");Ba.appendChild(Fa);Fa=document.createElement("td");+Fa.className="gePropRowCell";Fa.setAttribute("title",null!=oa?oa:mxResources.get("none"));if("color"==xa)Fa.appendChild(S(ja,oa,ma));else if("bool"==xa||"boolean"==xa)Fa.appendChild(X(ja,oa,ma));else if("enum"==xa){var La=ma.enumList;for(sa=0;sa<La.length;sa++)if(Ia=La[sa],Ia.val==oa){mxUtils.write(Fa,mxResources.get(Ia.dispName,null,Ia.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(Y,function(){var za=document.createElement("select"),Da=null;P(Fa,za);for(var Ja=0;Ja<La.length;Ja++){var Ra=+La[Ja],Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ra.val);mxUtils.write(Sa,mxResources.get(Ra.dispName,null,Ra.dispName));za.appendChild(Sa);null==Ra.val&&(Sa.value="null",Da=Sa)}za.value=null==oa&&null!=Da?"null":oa;k.appendChild(za);mxEvent.addListener(za,"change",function(){var ab=mxUtils.htmlEntities(za.value);if(za[za.selectedIndex]==Da||"null"==ab.value)ab=null;M(ja,ab,ma)});za.focus();mxEvent.addListener(za,"blur",function(){k.removeChild(za)})}))}else"dynamicArr"==xa?+Fa.appendChild(V(ja,oa,ma.subType,ma.subDefVal,ma.countProperty,Ba,sa)):"staticArr"==xa?Fa.appendChild(W(ja,oa,ma.subType,ma.subDefVal,ma.size,Ba,sa)):"readOnly"==xa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=oa,sa.style.borderWidth="0px","id"==ja?(sa.style.width="190px",sa.style.position="relative",sa.style.right="6px",sa.style.float="right",sa.style.background="none",sa.style.textAlign="right",Ba.firstChild.setAttribute("colspan","2"),sa.setAttribute("title",oa),+Ba.firstChild.appendChild(sa)):(sa.style.width="96px",Fa.appendChild(sa))):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(oa)),mxEvent.addListener(Fa,"click",mxUtils.bind(Y,function(){function za(){var Ja=Da.value;Ja=0==Ja.length&&"string"!=xa&&"numbers"!=xa?0:Ja;ma.allowAuto&&(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",xa="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=ma.min&&Ja<ma.min?Ja=ma.min:null!=ma.max&&Ja>ma.max&&(Ja=ma.max);var Ra=null;try{Ra="numbers"==xa?Ja.match(/\d+/g).map(Number).join(" "):+encodeURIComponent(("int"==xa?parseInt(Ja):Ja)+"")}catch(Sa){}M(ja,Ra,ma,null,Da)}var Da=document.createElement("input");P(Fa,Da,!0);Da.value=decodeURIComponent(oa);Da.className="gePropEditor";"int"!=xa&&"float"!=xa||ma.allowAuto||(Da.type="number",Da.step="int"==xa?"1":"any",null!=ma.min&&(Da.min=parseFloat(ma.min)),null!=ma.max&&(Da.max=parseFloat(ma.max)));k.appendChild(Da);mxEvent.addListener(Da,"keypress",function(Ja){13==Ja.keyCode&&za()});Da.focus();mxEvent.addListener(Da,"blur",function(){za()})})));+ma.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Y,function(za){M(ja,"",ma,ma.index);mxEvent.consume(za)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",Fa.appendChild(sa));Ba.appendChild(Fa);return Ba}var Y=this,ba=this.editorUi.editor.graph,ea=[];k.style.position="relative";k.style.padding="0";var ca=document.createElement("table");ca.className="geProperties";ca.style.whiteSpace="nowrap";ca.style.width="100%";var fa=document.createElement("tr");+fa.className="gePropHeader";var aa=document.createElement("th");aa.className="gePropHeaderCell";aa.style.paddingLeft="16px";aa.style.backgroundRepeat="no-repeat";aa.style.backgroundPosition="-2px 50%";aa.style.backgroundSize="20px";mxUtils.write(aa,mxResources.get("property"));fa.style.cursor="pointer";var da=function(){var ja=ca.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){aa.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var oa="none";for(var ma=k.childNodes.length-+1;0<=ma;ma--)try{var Aa=k.childNodes[ma],sa=Aa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||k.removeChild(Aa)}catch(Ia){}}else aa.style.backgroundImage="url('"+Editor.arrowDownImage+"')",oa="";for(ma=0;ma<ja.length;ma++)ja[ma].style.display=oa};mxEvent.addListener(fa,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;da()});fa.appendChild(aa);var ha=document.createElement("th");ha.className="gePropHeaderCell";ha.style.paddingLeft="4px";mxUtils.write(ha,mxResources.get("value"));+fa.appendChild(ha);ca.appendChild(fa);var pa=ha=!1;fa=null;1==G.vertices.length&&0==G.edges.length?fa=G.vertices[0].id:0==G.vertices.length&&1==G.edges.length&&(fa=G.edges[0].id);null==fa||I||ca.appendChild(Z("id",mxUtils.htmlEntities(fa),{dispName:"id",type:"readOnly"},!0,!1));for(var na in v)if(I=v[na],"function"!=typeof I.isVisible||I.isVisible(G,this)){var ia=null!=I.getValue?I.getValue():null!=G.style[na]?mxUtils.htmlEntities(G.style[na]+""):null!=I.getDefaultValue?I.getDefaultValue(G,this):+I.defVal;if("separator"==I.type)pa=!pa;else{if("staticArr"==I.type)I.size=parseInt(G.style[I.sizeProperty]||v[I.sizeProperty].defVal)||0;else if(null!=I.dependentProps){var wa=I.dependentProps,ua=[],va=[];for(fa=0;fa<wa.length;fa++){var Ca=G.style[wa[fa]];va.push(v[wa[fa]].subDefVal);ua.push(null!=Ca?Ca.split(","):[])}I.dependentPropsDefVal=va;I.dependentPropsVals=ua}ca.appendChild(Z(na,ia,I,ha,pa));ha=!ha}}for(fa=0;fa<ea.length;fa++)for(I=ea[fa],v=I.parentRow,G=0;G<I.values.length;G++)na=Z(I.name,+I.values[G],{type:I.type,parentRow:I.parentRow,isDeletable:I.isDeletable,index:G,defVal:I.defVal,countProperty:I.countProperty,size:I.size},0==G%2,I.flipBkg),v.parentNode.insertBefore(na,v.nextSibling),v=na;k.appendChild(ca);da();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},G=this.editorUi,+I=G.editor.graph,M=document.createElement("div");M.style.whiteSpace="nowrap";M.style.paddingLeft="24px";M.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(M);var P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.position="relative";P.style.textAlign="center";P.style.width="210px";for(var S=[],V=0;V<this.defaultColorSchemes.length;V++){var W=document.createElement("div");W.style.display="inline-block";W.style.width=+"6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(W,"click",mxUtils.bind(this,function(){X(ea)}))})(V);S.push(W);P.appendChild(W)}var X=mxUtils.bind(this,function(ea){null!=S[ea]&&(null!=this.format.currentScheme&&null!=S[this.format.currentScheme]&&(S[this.format.currentScheme].style.background="transparent"),+this.format.currentScheme=ea,Z(this.defaultColorSchemes[this.format.currentScheme]),S[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(I.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?+ca[mxConstants.STYLE_FONTCOLOR]:"default";I.replaceDefaultColors(new mxCell,ca);var fa=mxUtils.bind(this,function(da){var ha=mxUtils.button("",mxUtils.bind(this,function(ia){I.getModel().beginUpdate();try{for(var wa=G.getSelectionState().cells,ua=0;ua<wa.length;ua++){var va=I.getModel().getStyle(wa[ua]);null!=da?(mxEvent.isShiftDown(ia)||(va=""==da.fill||null==da.fill?mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,da.fill),va=""==da.gradient||+null==da.gradient?mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,da.gradient),mxEvent.isControlDown(ia)||mxClient.IS_MAC&&mxEvent.isMetaDown(ia)||!I.getModel().isVertex(wa[ua])||(va=""==da.font||null==da.font?mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,da.font))),mxEvent.isAltDown(ia)||(va=""==da.stroke||null==da.fill?mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(va,+mxConstants.STYLE_STROKECOLOR,da.stroke))):(va=mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null),I.getModel().isVertex(wa[ua])&&(va=mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null)));I.getModel().setStyle(wa[ua],va)}}finally{I.getModel().endUpdate()}}));ha.className="geStyleButton";ha.style.width="36px";ha.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ha.style.margin=+"0px 6px 6px 0px";if(null!=da){var pa="1px solid";null!=da.border&&(pa=da.border);if(null!=da.gradient)ha.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(da.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(da.gradient).cssText+" 100%)";else if(da.fill==mxConstants.NONE)ha.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==da.fill||""==da.fill)ha.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;+else{var na=mxUtils.getLightDarkColor(da.fill);ha.style.backgroundImage="linear-gradient(to right bottom, "+na.cssText+" 50%, "+na.light+" 50.3%)"}null==da.stroke||da.stroke==mxConstants.NONE?ha.style.border=pa+" transparent":""==da.stroke?ha.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(na=mxUtils.getLightDarkColor(da.stroke),ha.style.border=pa+" "+na.cssText,ha.style.borderRightColor=na.light,ha.style.borderBottomColor=+ha.style.borderRightColor);null!=da.title&&ha.setAttribute("title",da.title)}else pa=mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff"),na=mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000"),ha.style.backgroundColor=pa,ha.style.border="1px solid "+na;ha.style.borderRadius="0";M.appendChild(ha);null!=da&&null!=da.gradient&&(pa=ha.cloneNode(!1),pa.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(da.fill).light+") 0px, light-dark(transparent, "++mxUtils.getLightDarkColor(da.gradient).light+") 100%)",pa.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",pa.style.backgroundColor="transparent",M.appendChild(pa),pa.style.marginLeft="-42px",mxEvent.addListener(pa,"click",function(){ha.click()}))});M.innerText="";if(null!=ea)for(var aa=0;aa<ea.length;aa++)0<aa&&0==mxUtils.mod(aa,4)&&mxUtils.br(M),fa(ea[aa])});null==this.format.currentScheme?X(Math.min(S.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):X(this.format.currentScheme);V=10>=this.defaultColorSchemes.length?28:8;var Y=document.createElement("div");Y.style.cssText="position:absolute;left:10px;top:8px;bottom:"+V+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ba=document.createElement("div");ba.style.cssText="position:absolute;left:202px;top:8px;bottom:"+V+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";-1<this.defaultColorSchemes.length&&(g.appendChild(Y),g.appendChild(ba));mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));q(Y);q(ba);Z(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&g.appendChild(Q)}return g}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};-Graph.customFontElements={};Graph.isGoogleFontUrl=function(g){return g.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||g.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(g){return Graph.isGoogleFontUrl(g)};Graph.rewriteGoogleFontUrl=function(g){null!=g&&g.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(g=Editor.GOOGLE_FONTS_CSS2+g.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return g};Graph.createFontElement=-function(g,q){var F=Graph.fontMapping[q];null==F&&Graph.isCssFontUrl(q)?(g=document.createElement("link"),g.setAttribute("rel","stylesheet"),g.setAttribute("type","text/css"),g.setAttribute("charset","UTF-8"),g.setAttribute("href",Graph.rewriteGoogleFontUrl(q))):(null==F&&(F='@font-face {\nfont-family: "'+g+'";\nsrc: url("'+q+'");\n}'),g=document.createElement("style"),mxUtils.write(g,F));return g};Graph.addRecentCustomFont=function(g,q){};Graph.addFont=function(g,q,F){if(null!=g&&0<g.length&&null!=-q&&0<q.length){var J=g.toLowerCase();if("helvetica"!=J&&"arial"!=g&&"sans-serif"!=J){var L=Graph.customFontElements[J];null!=L&&L.url!=q&&(L.elt.parentNode.removeChild(L.elt),L=null);null==L?(L=q,"http:"==q.substring(0,5)&&(L=PROXY_URL+"?url="+encodeURIComponent(q)),L={name:g,url:q,elt:Graph.createFontElement(g,L)},Graph.customFontElements[J]=L,q=document.getElementsByTagName("head")[0],null!=F&&("link"==L.elt.nodeName.toLowerCase()?(L.elt.onload=F,L.elt.onerror=F):F()),null!=q&&q.appendChild(L.elt)):-null!=F&&F()}else null!=F&&F()}else null!=F&&F();return g};Graph.getFontUrl=function(g,q){g=Graph.customFontElements[g.toLowerCase()];null!=g&&(q=g.url);return q};Graph.processFontAttributes=function(g){g=g.getElementsByTagName("*");for(var q=0;q<g.length;q++){var F=g[q].getAttribute("data-font-src");if(null!=F){var J="FONT"==g[q].nodeName?g[q].getAttribute("face"):g[q].style.fontFamily;null!=J&&Graph.addFont(J,F)}}};Graph.processFontStyle=function(g){if(null!=g){var q=mxUtils.getValue(g,"fontSource",-null);if(null!=q){var F=mxUtils.getValue(g,mxConstants.STYLE_FONTFAMILY,null);if(null!=F)try{Graph.addFont(F,decodeURIComponent(q))}catch(J){}}}return g};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=-"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var e=Graph.prototype.init;Graph.prototype.init=function(){function g(L){q=L}e.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var q=null;mxEvent.addListener(this.container,"mouseenter",g);mxEvent.addListener(this.container,"mousemove",g);mxEvent.addListener(this.container,"mouseleave",function(L){q=null});this.isMouseInsertPoint=function(){return null!=-q};var F=this.getInsertPoint;this.getInsertPoint=function(){return null!=q?this.getPointForEvent(q):F.apply(this,arguments)};var J=this.layoutManager.getLayout;this.layoutManager.getLayout=function(L){var Q=this.graph.getCellStyle(L);if(null!=Q&&"rack"==Q.childLayout){var U=new mxStackLayout(this.graph,!1);U.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;U.marginLeft=Q.marginLeft||0;U.marginRight=Q.marginRight||0;U.marginTop=-Q.marginTop||0;U.marginBottom=Q.marginBottom||0;U.allowGaps=Q.allowGaps||0;U.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");U.resizeParent=!1;U.fill=!0;return U}return J.apply(this,arguments)};this.updateGlobalUrlVariables()};var l=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(g,q){return Graph.processFontStyle(l.apply(this,arguments))};var n=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(g,q,F,J,L,Q,U,V,W,X,-Z,Y){n.apply(this,arguments);Graph.processFontAttributes(Y)};var p=mxText.prototype.redraw;mxText.prototype.redraw=function(){p.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(g,q,F,J){function L(){for(var da=V.getSelectionCells(),ma=[],aa=0;aa<da.length;aa++)V.isCellVisible(da[aa])&&ma.push(da[aa]);V.setSelectionCells(ma)}function Q(da){V.setHiddenTags(da?[]:W.slice());L();V.refresh()}function U(da,-ma){Z.innerText="";if(0<da.length){var aa=document.createElement("table");aa.setAttribute("cellpadding","2");aa.style.boxSizing="border-box";aa.style.tableLayout="fixed";aa.style.width="100%";var ia=document.createElement("tbody");if(null!=da&&0<da.length)for(var ka=0;ka<da.length;ka++)(function(ta){function sa(){var ha=V.getCellsForTags([ta],null,null,!0);V.isEnabled()?V.setSelectionCells(ha):V.highlightCells(ha,null,null,70)}var fa=0>mxUtils.indexOf(V.hiddenTags,ta),ra=document.createElement("tr"),-ua=document.createElement("td");ua.style.align="center";ua.style.width="16px";var za=document.createElement("img");za.setAttribute("src",fa?Editor.visibleImage:Editor.hiddenImage);za.setAttribute("title",mxResources.get(fa?"hideIt":"show",[ta]));mxUtils.setOpacity(za,fa?75:25);za.className="geAdaptiveAsset";za.style.verticalAlign="middle";za.style.cursor="pointer";za.style.width="16px";if(q||Editor.isDarkMode())za.style.filter="invert(100%)";ua.appendChild(za);mxEvent.addListener(za,"click",function(ha){mxEvent.isShiftDown(ha)?-Q(0<=mxUtils.indexOf(V.hiddenTags,ta)):(V.toggleHiddenTag(ta),L(),V.refresh());mxEvent.consume(ha)});ra.appendChild(ua);ua=document.createElement("td");ua.style.align="center";ua.style.width="16px";za=document.createElement("img");za.setAttribute("src",Editor.selectImage);za.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(za,fa?75:25);za.className="geAdaptiveAsset";za.style.verticalAlign="middle";za.style.cursor="pointer";za.style.width="16px";if(q||Editor.isDarkMode())za.style.filter=-"invert(100%)";mxEvent.addListener(za,"click",function(ha){Q(!0);sa();mxEvent.consume(ha)});ua.appendChild(za);ra.appendChild(ua);ua=document.createElement("td");ua.style.overflow="hidden";ua.style.whiteSpace="nowrap";ua.style.textOverflow="ellipsis";ua.style.verticalAlign="middle";ua.style.cursor="pointer";ua.setAttribute("title",ta);a=document.createElement("a");mxUtils.write(a,ta);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,fa?100:40);ua.appendChild(a);mxEvent.addListener(ua,-"click",function(ha){if(mxEvent.isShiftDown(ha))Q(!0),sa();else if(fa&&0<V.hiddenTags.length)Q(!0);else{var pa=W.slice(),Aa=mxUtils.indexOf(pa,ta);pa.splice(Aa,1);V.setHiddenTags(pa);L();V.refresh()}mxEvent.consume(ha)});ra.appendChild(ua);if(V.isEnabled()){ua=document.createElement("td");ua.style.verticalAlign="middle";ua.style.textAlign="center";ua.style.width="18px";if(null==ma){ua.style.align="center";ua.style.width="16px";za=document.createElement("img");za.setAttribute("src",Editor.trashImage);-za.setAttribute("title",mxResources.get("removeIt",[ta]));mxUtils.setOpacity(za,fa?75:25);za.className="geAdaptiveAsset";za.style.verticalAlign="middle";za.style.cursor="pointer";za.style.width="16px";if(q||Editor.isDarkMode())za.style.filter="invert(100%)";mxEvent.addListener(za,"click",function(ha){var pa=mxUtils.indexOf(W,ta);0<=pa&&W.splice(pa,1);V.removeTagsForCells(V.model.getDescendants(V.model.getRoot()),[ta]);V.refresh();mxEvent.consume(ha)});ua.appendChild(za)}else{var va=document.createElement("input");-va.setAttribute("type","checkbox");va.style.margin="0px";va.defaultChecked=null!=ma&&0<=mxUtils.indexOf(ma,ta);va.checked=va.defaultChecked;va.style.background="transparent";va.setAttribute("title",mxResources.get(va.defaultChecked?"removeIt":"add",[ta]));mxEvent.addListener(va,"change",function(ha){va.checked?V.addTagsForCells(V.getSelectionCells(),[ta]):V.removeTagsForCells(V.getSelectionCells(),[ta]);mxEvent.consume(ha)});ua.appendChild(va)}ra.appendChild(ua)}ia.appendChild(ra)})(da[ka]);aa.appendChild(ia);-Z.appendChild(aa)}}var V=this,W=V.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var Z=document.createElement("div");Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.userSelect="none";Z.style.overflow="auto";Z.style.padding="3px";Z.style.left="0px";Z.style.right="0px";Z.style.top="0px";Z.style.bottom="0px";X.appendChild(Z);V.addListener(mxEvent.ROOT,function(){W=V.hiddenTags.slice()});-var Y=mxUtils.bind(this,function(da,ma){if(g()){da=V.getAllTags();for(ma=0;ma<da.length;ma++)0>mxUtils.indexOf(W,da[ma])&&W.push(da[ma]);W.sort();V.isSelectionEmpty()?U(W):U(W,V.getCommonTagsForCells(V.getSelectionCells()))}});V.selectionModel.addListener(mxEvent.CHANGE,Y);V.model.addListener(mxEvent.CHANGE,Y);V.addListener(mxEvent.REFRESH,Y);var ba=document.createElement("div");ba.className="geToolbarContainer";ba.style.position="absolute";ba.style.display="flex";ba.style.bottom="0px";ba.style.left=+1<this.defaultColorSchemes.length&&(k.appendChild(Y),k.appendChild(ba));mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));v(Y);v(ba);Z(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(P)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};+Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=+function(k,v){var G=Graph.fontMapping[v];null==G&&Graph.isCssFontUrl(v)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(v))):(null==G&&(G='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+v+'");\n}'),k=document.createElement("style"),mxUtils.write(k,G));return k};Graph.addRecentCustomFont=function(k,v){};Graph.addFont=function(k,v,G){if(null!=k&&0<k.length&&null!=+v&&0<v.length){var I=k.toLowerCase();if("helvetica"!=I&&"arial"!=k&&"sans-serif"!=I){var M=Graph.customFontElements[I];null!=M&&M.url!=v&&(M.elt.parentNode.removeChild(M.elt),M=null);null==M?(M=v,"http:"==v.substring(0,5)&&(M=PROXY_URL+"?url="+encodeURIComponent(v)),M={name:k,url:v,elt:Graph.createFontElement(k,M)},Graph.customFontElements[I]=M,v=document.getElementsByTagName("head")[0],null!=G&&("link"==M.elt.nodeName.toLowerCase()?(M.elt.onload=G,M.elt.onerror=G):G()),null!=v&&v.appendChild(M.elt)):+null!=G&&G()}else null!=G&&G()}else null!=G&&G();return k};Graph.getFontUrl=function(k,v){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(v=k.url);return v};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var v=0;v<k.length;v++){var G=k[v].getAttribute("data-font-src");if(null!=G){var I="FONT"==k[v].nodeName?k[v].getAttribute("face"):k[v].style.fontFamily;null!=I&&Graph.addFont(I,G)}}};Graph.processFontStyle=function(k){if(null!=k){var v=mxUtils.getValue(k,"fontSource",+null);if(null!=v){var G=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=G)try{Graph.addFont(G,decodeURIComponent(v))}catch(I){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=+"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var f=Graph.prototype.init;Graph.prototype.init=function(){function k(M){v=M}f.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var v=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(M){v=null});this.isMouseInsertPoint=function(){return null!=+v};var G=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):G.apply(this,arguments)};var I=this.layoutManager.getLayout;this.layoutManager.getLayout=function(M){var P=this.graph.getCellStyle(M);if(null!=P&&"rack"==P.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=P.rackUnitSize?parseFloat(P.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=P.marginLeft||0;S.marginRight=P.marginRight||0;S.marginTop=+P.marginTop||0;S.marginBottom=P.marginBottom||0;S.allowGaps=P.allowGaps||0;S.horizontal="1"==mxUtils.getValue(P,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return I.apply(this,arguments)};this.updateGlobalUrlVariables()};var p=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(p.apply(this,arguments))};var n=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,G,I,M,P,S,V,W,X,+Z,Y){n.apply(this,arguments);Graph.processFontAttributes(Y)};var t=mxText.prototype.redraw;mxText.prototype.redraw=function(){t.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,G,I){function M(){for(var fa=V.getSelectionCells(),aa=[],da=0;da<fa.length;da++)V.isCellVisible(fa[da])&&aa.push(fa[da]);V.setSelectionCells(aa)}function P(fa){V.setHiddenTags(fa?[]:W.slice());M();V.refresh()}function S(fa,+aa){Z.innerText="";if(0<fa.length){var da=document.createElement("table");da.setAttribute("cellpadding","2");da.style.boxSizing="border-box";da.style.tableLayout="fixed";da.style.width="100%";var ha=document.createElement("tbody");if(null!=fa&&0<fa.length)for(var pa=0;pa<fa.length;pa++)(function(na){function ia(){var oa=V.getCellsForTags([na],null,null,!0);V.isEnabled()?V.setSelectionCells(oa):V.highlightCells(oa,null,null,70)}var wa=0>mxUtils.indexOf(V.hiddenTags,na),ua=document.createElement("tr"),+va=document.createElement("td");va.style.align="center";va.style.width="16px";var Ca=document.createElement("img");Ca.setAttribute("src",wa?Editor.visibleImage:Editor.hiddenImage);Ca.setAttribute("title",mxResources.get(wa?"hideIt":"show",[na]));mxUtils.setOpacity(Ca,wa?75:25);Ca.className="geAdaptiveAsset";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(v||Editor.isDarkMode())Ca.style.filter="invert(100%)";va.appendChild(Ca);mxEvent.addListener(Ca,"click",function(oa){mxEvent.isShiftDown(oa)?+P(0<=mxUtils.indexOf(V.hiddenTags,na)):(V.toggleHiddenTag(na),M(),V.refresh());mxEvent.consume(oa)});ua.appendChild(va);va=document.createElement("td");va.style.align="center";va.style.width="16px";Ca=document.createElement("img");Ca.setAttribute("src",Editor.selectImage);Ca.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ca,wa?75:25);Ca.className="geAdaptiveAsset";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(v||Editor.isDarkMode())Ca.style.filter=+"invert(100%)";mxEvent.addListener(Ca,"click",function(oa){P(!0);ia();mxEvent.consume(oa)});va.appendChild(Ca);ua.appendChild(va);va=document.createElement("td");va.style.overflow="hidden";va.style.whiteSpace="nowrap";va.style.textOverflow="ellipsis";va.style.verticalAlign="middle";va.style.cursor="pointer";va.setAttribute("title",na);a=document.createElement("a");mxUtils.write(a,na);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,wa?100:40);va.appendChild(a);mxEvent.addListener(va,+"click",function(oa){if(mxEvent.isShiftDown(oa))P(!0),ia();else if(wa&&0<V.hiddenTags.length)P(!0);else{var ma=W.slice(),Aa=mxUtils.indexOf(ma,na);ma.splice(Aa,1);V.setHiddenTags(ma);M();V.refresh()}mxEvent.consume(oa)});ua.appendChild(va);if(V.isEnabled()){va=document.createElement("td");va.style.verticalAlign="middle";va.style.textAlign="center";va.style.width="18px";if(null==aa){va.style.align="center";va.style.width="16px";Ca=document.createElement("img");Ca.setAttribute("src",Editor.trashImage);+Ca.setAttribute("title",mxResources.get("removeIt",[na]));mxUtils.setOpacity(Ca,wa?75:25);Ca.className="geAdaptiveAsset";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(v||Editor.isDarkMode())Ca.style.filter="invert(100%)";mxEvent.addListener(Ca,"click",function(oa){var ma=mxUtils.indexOf(W,na);0<=ma&&W.splice(ma,1);V.removeTagsForCells(V.model.getDescendants(V.model.getRoot()),[na]);V.refresh();mxEvent.consume(oa)});va.appendChild(Ca)}else{var ja=document.createElement("input");+ja.setAttribute("type","checkbox");ja.style.margin="0px";ja.defaultChecked=null!=aa&&0<=mxUtils.indexOf(aa,na);ja.checked=ja.defaultChecked;ja.style.background="transparent";ja.setAttribute("title",mxResources.get(ja.defaultChecked?"removeIt":"add",[na]));mxEvent.addListener(ja,"change",function(oa){ja.checked?V.addTagsForCells(V.getSelectionCells(),[na]):V.removeTagsForCells(V.getSelectionCells(),[na]);mxEvent.consume(oa)});va.appendChild(ja)}ua.appendChild(va)}ha.appendChild(ua)})(fa[pa]);da.appendChild(ha);+Z.appendChild(da)}}var V=this,W=V.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var Z=document.createElement("div");Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.userSelect="none";Z.style.overflow="auto";Z.style.padding="3px";Z.style.left="0px";Z.style.right="0px";Z.style.top="0px";Z.style.bottom="0px";X.appendChild(Z);V.addListener(mxEvent.ROOT,function(){W=V.hiddenTags.slice()});+var Y=mxUtils.bind(this,function(fa,aa){if(k()){fa=V.getAllTags();for(aa=0;aa<fa.length;aa++)0>mxUtils.indexOf(W,fa[aa])&&W.push(fa[aa]);W.sort();V.isSelectionEmpty()?S(W):S(W,V.getCommonTagsForCells(V.getSelectionCells()))}});V.selectionModel.addListener(mxEvent.CHANGE,Y);V.model.addListener(mxEvent.CHANGE,Y);V.addListener(mxEvent.REFRESH,Y);var ba=document.createElement("div");ba.className="geToolbarContainer";ba.style.position="absolute";ba.style.display="flex";ba.style.bottom="0px";ba.style.left="0px";ba.style.right="0px";ba.style.height="26px";ba.style.overflow="hidden";ba.style.padding="3px 4px 4px 4px";ba.style.borderWidth="1px 0px 0px 0px";ba.style.borderStyle="solid";ba.style.whiteSpace="nowrap";if(V.isEnabled()){Z.style.bottom="34px";var ea=document.createElement("a");ea.className="geToolbarButton geAdaptiveAsset geToggleItem";ea.style.width="16px";ea.style.height="18px";ea.style.backgroundPosition="center center";ea.style.backgroundRepeat="no-repeat";ea.style.backgroundSize="20px";-ea.style.margin="0 2px";ea.style.display="inline-block";ea.style.cursor="pointer";var ca=ea.cloneNode(!1);ca.style.backgroundImage="url("+Editor.visibleImage+")";ca.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ca,"click",function(da){V.setHiddenTags([]);mxEvent.isShiftDown(da)||(W=V.hiddenTags.slice());L();V.refresh();mxEvent.consume(da)});ba.appendChild(ca);null!=F&&(ea=ea.cloneNode(!1),ea.style.backgroundImage="url("+Editor.plusImage+")",ea.setAttribute("title",mxResources.get("add")),-mxEvent.addListener(ea,"click",function(da){F(W,function(ma){W=ma;Y()});mxEvent.consume(da)}),ba.appendChild(ea));X.appendChild(ba)}null!=J&&ba.appendChild(J);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var g=this.extFonts;g=null!=g?g.slice():[];for(var q in Graph.customFontElements){var F=Graph.customFontElements[q];g.push({name:F.name,url:F.url})}return g};Graph.prototype.setFont=function(g,q){Graph.addFont(g,q);var F=Editor.guid();document.execCommand("fontname",!1,F);for(var J=-this.cellEditor.textarea.getElementsByTagName("font"),L=!1,Q=0;Q<J.length;Q++)J[Q].getAttribute("face")==F&&(L=!0,J[Q].setAttribute("face",g),null!=q?J[Q].setAttribute("data-font-src",q):J[Q].removeAttribute("data-font-src"));L||document.execCommand("fontname",!1,g)};var u=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return u.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;-if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var g=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=g)for(var q in g)this.globalVars[q]=g[q]}catch(F){null!=window.console&&console.log("Error in vars URL parameter: "+F)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var B=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(g){var q=B.apply(this,arguments);-null==q&&null!=this.globalVars&&(q=this.globalVars[g]);return q};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var g=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(g.ownerDocument)).decode(g)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(g,q,F,J,L,Q,U,V,W,X,Z,Y,ba,ea,ca,da){var ma=D.apply(this,arguments);if(null!=Y){var aa=ma.getAttribute("style");-null==aa&&(aa="");Y="auto"==Y?"none"==this.getAdaptiveColors()?"light":"light dark":Y;ma.setAttribute("style",aa+(" color-scheme: "+Y+";"))}var ia=this.getCustomFonts();if(Z&&0<ia.length){var ka=ma.ownerDocument;aa=null!=ka.createElementNS?ka.createElementNS(mxConstants.NS_SVG,"style"):ka.createElement("style");null!=ka.setAttributeNS?aa.setAttributeNS("type","text/css"):aa.setAttribute("type","text/css");for(var ta="",sa="",fa=0;fa<ia.length;fa++){var ra=ia[fa].name,ua=ia[fa].url;Graph.isCssFontUrl(ua)?-ta+="@import url("+Graph.rewriteGoogleFontUrl(ua)+");\n":sa+='@font-face {\nfont-family: "'+ra+'";\nsrc: url("'+ua+'");\n}\n'}aa.appendChild(ka.createTextNode(ta+sa));ma.getElementsByTagName("defs")[0].appendChild(aa)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ma);this.mathEnabled&&(document.body.appendChild(ma),Editor.MathJaxRender(ma),ma.parentNode.removeChild(ma),aa=ma.ownerDocument.getElementById("MJX-SVG-styles"),null!=-aa&&ma.getElementsByTagName("defs")[0].appendChild(aa.cloneNode(!0)));return ma};var G=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(g){G.apply(this,arguments);null!=g.secondLabel&&(g.secondLabel.destroy(),g.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(g){return[g.shape,g.text,g.secondLabel,g.control]};var E=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){E.apply(this,arguments);this.enumerationState=-0};var T=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(g){null!=g.shape&&this.redrawEnumerationState(g);return T.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(g){g=decodeURIComponent(mxUtils.getValue(g.style,"enumerateValue",""));""==g&&(g=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(g)+"</div>"};mxGraphView.prototype.redrawEnumerationState=-function(g){var q="1"==mxUtils.getValue(g.style,"enumerate",0);q&&null==g.secondLabel?(g.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),g.secondLabel.size=12,g.secondLabel.state=g,g.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(g,g.secondLabel)):q||null==g.secondLabel||(g.secondLabel.destroy(),g.secondLabel=null);q=g.secondLabel;if(null!=q){var F=g.view.scale,J=this.createEnumerationValue(g);g=this.graph.model.isVertex(g.cell)?-new mxRectangle(g.x+g.width-4*F,g.y+4*F,0,0):mxRectangle.fromPoint(g.view.getPoint(g));q.bounds.equals(g)&&q.value==J&&q.scale==F||(q.bounds=g,q.value=J,q.scale=F,q.redraw())}};var O=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();O.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var S=-Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){S.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(g,q){"data:action/json,"==g.substring(0,17)&&(g=JSON.parse(g.substring(17)),null!=g.actions&&this.executeCustomActions(g.actions,null,q))};Graph.prototype.executeCustomActions=function(g,q,F){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),-null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var J=!1,L=0,Q=0,U=mxUtils.bind(this,function(){J||(J=!0,this.model.beginUpdate())}),V=mxUtils.bind(this,function(){J&&(J=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<L&&L--;0==L&&X()}),X=mxUtils.bind(this,function(){if(Q<g.length){var Z=this.stoppingCustomActions,Y=g[Q++],ba=[];if(null!=Y.open)if(V(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,-F))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;W()}),L++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),V());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(L++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,-!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(L++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,W,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(U(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){U();var ea=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),-1);this.setCellsVisible(ea,!0)}null!=Y.hide&&(U(),ea=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(U(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(U(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));ea=[];null!=-Y.select&&this.isEnabled()&&(ea=this.getCellsForAction(Y.select),this.setSelectionCells(ea));null!=Y.highlight&&(ea=this.getCellsForAction(Y.highlight),this.highlightCells(ea,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));null!=Y.scroll&&(ea=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);null!=F&&null!=Y.explore&&Graph.exploreFromCell(this,F,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ca=-Y.tags.toggle;0==ca.length&&(ca=this.getAllTags());for(ea=0;ea<ca.length;ea++)this.toggleHiddenTag(ca[ea])}ca=null;null!=Y.tags.hidden&&(null==ca&&(ca=[]),ca=ca.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ca&&(ca=[]);var da=this.getAllTags();for(ea=0;ea<da.length;ea++)0>mxUtils.indexOf(Y.tags.visible,da[ea])&&0>mxUtils.indexOf(ca,da[ea])&&ca.push(da[ea])}null!=ca&&this.setHiddenTags(ca);this.refresh()}0<ba.length&&(L++,this.executeAnimations(ba,W,Z?1:Y.steps,Z?0:Y.delay));0==L?X():V()}else this.stoppingCustomActions=-this.executingCustomActions=!1,V(),null!=q&&q()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(g,q){var F=this.getLinkForCell(q);null!=F&&"data:action/json,"==F.substring(0,17)&&this.setLinkForCell(q,this.updateCustomLink(g,F));if(this.isHtmlLabel(q)){var J=document.createElement("div");J.innerHTML=Graph.sanitizeHtml(this.getLabel(q));for(var L=J.getElementsByTagName("a"),Q=!1,U=0;U<L.length;U++)F=L[U].getAttribute("href"),null!=F&&"data:action/json,"==F.substring(0,17)&&(L[U].setAttribute("href",-this.updateCustomLink(g,F)),Q=!0);Q&&this.labelChanged(q,J.innerHTML)}};Graph.prototype.updateCustomLink=function(g,q){if("data:action/json,"==q.substring(0,17))try{var F=JSON.parse(q.substring(17));null!=F.actions&&(this.updateCustomLinkActions(g,F.actions),q="data:action/json,"+JSON.stringify(F))}catch(J){}return q};Graph.prototype.updateCustomLinkActions=function(g,q){for(var F=0;F<q.length;F++){var J=q[F],L;for(L in J)this.updateCustomLinkAction(g,J[L],"cells"),this.updateCustomLinkAction(g,J[L],-"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(g,q,F){if(null!=q&&null!=q[F]){for(var J=[],L=0;L<q[F].length;L++)if("*"==q[F][L])J.push(q[F][L]);else{var Q=g[q[F][L]];null!=Q?""!=Q&&J.push(Q):J.push(q[F][L])}q[F]=J}};Graph.prototype.getCellsForAction=function(g,q){q=this.getCellsById(g.cells).concat(this.getCellsForTags(g.tags,null,q));if(null!=g.excludeCells){for(var F=[],J=0;J<q.length;J++)0>g.excludeCells.indexOf(q[J].id)&&F.push(q[J]);q=F}return q};Graph.prototype.getCellsById=-function(g){var q=[];if(null!=g)for(var F=0;F<g.length;F++)if("*"==g[F]){var J=this.model.getRoot();q=q.concat(this.model.filterDescendants(function(Q){return Q!=J},J))}else{var L=this.model.getCell(g[F]);null!=L&&q.push(L)}return q};var k=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(g){return k.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(g))};Graph.prototype.setHiddenTags=function(g){this.hiddenTags=g;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};-Graph.prototype.toggleHiddenTag=function(g){var q=mxUtils.indexOf(this.hiddenTags,g);0>q?this.hiddenTags.push(g):0<=q&&this.hiddenTags.splice(q,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(g){if(null==g||0==g.length||0==this.hiddenTags.length)return!1;g=g.split(" ");if(g.length>this.hiddenTags.length)return!1;for(var q=0;q<g.length;q++)if(0>mxUtils.indexOf(this.hiddenTags,g[q]))return!1;return!0};Graph.prototype.getCellsForTags=function(g,q,F,-J){var L=[];if(null!=g){q=null!=q?q:this.model.getDescendants(this.model.getRoot());for(var Q=0,U={},V=0;V<g.length;V++)0<g[V].length&&(U[g[V]]=!0,Q++);for(V=0;V<q.length;V++)if(F&&this.model.getParent(q[V])==this.model.root||this.model.isVertex(q[V])||this.model.isEdge(q[V])){var W=this.getTagsForCell(q[V]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=g.length)){for(var Z=X=0;Z<W.length&&X<Q;Z++)null!=U[W[Z]]&&X++;X=X==Q}X&&(1!=J||this.isCellVisible(q[V]))&&L.push(q[V])}}return L};Graph.prototype.getAllTags=-function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(g){for(var q=null,F=[],J=0;J<g.length;J++){var L=this.getTagsForCell(g[J]);F=[];if(0<L.length){L=L.split(" ");for(var Q={},U=0;U<L.length;U++)if(null==q||null!=q[L[U]])Q[L[U]]=!0,F.push(L[U]);q=Q}else return[]}return F};Graph.prototype.getTagsForCells=function(g){for(var q=[],F={},J=0;J<g.length;J++){var L=this.getTagsForCell(g[J]);if(0<L.length){L=L.split(" ");for(var Q=-0;Q<L.length;Q++)null==F[L[Q]]&&(F[L[Q]]=!0,q.push(L[Q]))}}return q};Graph.prototype.getTagsForCell=function(g){return this.getAttributeForCell(g,"tags","")};Graph.prototype.addTagsForCells=function(g,q){if(0<g.length&&0<q.length){this.model.beginUpdate();try{for(var F=0;F<g.length;F++){for(var J=this.getTagsForCell(g[F]),L=J.split(" "),Q=!1,U=0;U<q.length;U++){var V=mxUtils.trim(q[U]);""!=V&&0>mxUtils.indexOf(L,V)&&(J=0<J.length?J+" "+V:V,Q=!0)}Q&&this.setAttributeForCell(g[F],"tags",J)}}finally{this.model.endUpdate()}}};-Graph.prototype.removeTagsForCells=function(g,q){if(0<g.length&&0<q.length){this.model.beginUpdate();try{for(var F=0;F<g.length;F++){var J=this.getTagsForCell(g[F]);if(0<J.length){for(var L=J.split(" "),Q=!1,U=0;U<q.length;U++){var V=mxUtils.indexOf(L,q[U]);0<=V&&(L.splice(V,1),Q=!0)}Q&&this.setAttributeForCell(g[F],"tags",L.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(g){this.model.beginUpdate();try{for(var q=0;q<g.length;q++)this.model.setVisible(g[q],!this.model.isVisible(g[q]))}finally{this.model.endUpdate()}};-Graph.prototype.setCellsVisible=function(g,q){this.model.beginUpdate();try{for(var F=0;F<g.length;F++)this.model.setVisible(g[F],q)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(g,q,F,J){for(var L=0;L<g.length;L++)this.highlightCell(g[L],q,F,J)};Graph.prototype.highlightCell=function(g,q,F,J,L){q=null!=q?q:mxConstants.DEFAULT_VALID_COLOR;F=null!=F?F:1E3;g=this.view.getState(g);var Q=null;null!=g&&(L=null!=L?L:4,L=Math.max(L+1,mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,-1)+L),Q=new mxCellHighlight(this,q,L,!1),null!=J&&(Q.opacity=J),Q.highlight(g),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},F));return Q};Graph.prototype.addSvgShadow=function(g,q,F,J){F=null!=F?F:!1;J=null!=J?J:!0;var L=g.ownerDocument,Q=null!=L.createElementNS?L.createElementNS(mxConstants.NS_SVG,"filter"):L.createElement("filter");Q.setAttribute("id",-this.shadowId);var U=null!=L.createElementNS?L.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):L.createElement("feGaussianBlur");U.setAttribute("in","SourceAlpha");U.setAttribute("stdDeviation",this.svgShadowBlur);U.setAttribute("result","blur");Q.appendChild(U);U=null!=L.createElementNS?L.createElementNS(mxConstants.NS_SVG,"feOffset"):L.createElement("feOffset");U.setAttribute("in","blur");U.setAttribute("dx",this.svgShadowSize);U.setAttribute("dy",this.svgShadowSize);U.setAttribute("result",-"offsetBlur");Q.appendChild(U);U=null!=L.createElementNS?L.createElementNS(mxConstants.NS_SVG,"feFlood"):L.createElement("feFlood");U.setAttribute("flood-color",this.svgShadowColor);U.setAttribute("flood-opacity",this.svgShadowOpacity);U.setAttribute("result","offsetColor");Q.appendChild(U);U=null!=L.createElementNS?L.createElementNS(mxConstants.NS_SVG,"feComposite"):L.createElement("feComposite");U.setAttribute("in","offsetColor");U.setAttribute("in2","offsetBlur");U.setAttribute("operator","in");-U.setAttribute("result","offsetBlur");Q.appendChild(U);U=null!=L.createElementNS?L.createElementNS(mxConstants.NS_SVG,"feBlend"):L.createElement("feBlend");U.setAttribute("in","SourceGraphic");U.setAttribute("in2","offsetBlur");Q.appendChild(U);U=g.getElementsByTagName("defs");0==U.length?(L=null!=L.createElementNS?L.createElementNS(mxConstants.NS_SVG,"defs"):L.createElement("defs"),null!=g.firstChild?g.insertBefore(L,g.firstChild):g.appendChild(L)):L=U[0];L.appendChild(Q);F||(q=null!=q?q:g.getElementsByTagName("g")[0],-null!=q&&(q.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(g.getAttribute("width")))&&J&&(g.setAttribute("width",parseInt(g.getAttribute("width"))+6),g.setAttribute("height",parseInt(g.getAttribute("height"))+6),q=g.getAttribute("viewBox"),null!=q&&0<q.length&&(q=q.split(" "),3<q.length&&(w=parseFloat(q[2])+6,h=parseFloat(q[3])+6,g.setAttribute("viewBox",q[0]+" "+q[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(g,q){mxClient.IS_SVG&&!mxClient.IS_SF&&(q=-null!=q?q:!0,(this.shadowVisible=g)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),q&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var g=this.model.getChildCount(this.model.root),-q=0;do var F=this.model.getChildAt(this.model.root,q);while(q++<g&&"1"==mxUtils.getValue(this.getCellStyle(F),"locked","0"));null!=F&&this.setDefaultParent(F)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH++ea.style.margin="0 2px";ea.style.display="inline-block";ea.style.cursor="pointer";var ca=ea.cloneNode(!1);ca.style.backgroundImage="url("+Editor.visibleImage+")";ca.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ca,"click",function(fa){V.setHiddenTags([]);mxEvent.isShiftDown(fa)||(W=V.hiddenTags.slice());M();V.refresh();mxEvent.consume(fa)});ba.appendChild(ca);null!=G&&(ea=ea.cloneNode(!1),ea.style.backgroundImage="url("+Editor.plusImage+")",ea.setAttribute("title",mxResources.get("add")),+mxEvent.addListener(ea,"click",function(fa){G(W,function(aa){W=aa;Y()});mxEvent.consume(fa)}),ba.appendChild(ea));X.appendChild(ba)}null!=I&&ba.appendChild(I);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var G=Graph.customFontElements[v];k.push({name:G.name,url:G.url})}return k};Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var G=Editor.guid();document.execCommand("fontname",!1,G);for(var I=+this.cellEditor.textarea.getElementsByTagName("font"),M=!1,P=0;P<I.length;P++)I[P].getAttribute("face")==G&&(M=!0,I[P].setAttribute("face",k),null!=v?I[P].setAttribute("data-font-src",v):I[P].removeAttribute("data-font-src"));M||document.execCommand("fontname",!1,k)};var z=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return z.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;+if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var v in k)this.globalVars[v]=k[v]}catch(G){null!=window.console&&console.log("Error in vars URL parameter: "+G)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var F=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var v=F.apply(this,arguments);+null==v&&null!=this.globalVars&&(v=this.globalVars[k]);return v};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,v,G,I,M,P,S,V,W,X,Z,Y,ba,ea,ca,fa){var aa=C.apply(this,arguments);if(null!=Y){var da=aa.getAttribute("style");+null==da&&(da="");Y="auto"==Y?"none"==this.getAdaptiveColors()?"light":"light dark":Y;aa.setAttribute("style",da+(" color-scheme: "+Y+";"))}var ha=this.getCustomFonts();if(Z&&0<ha.length){var pa=aa.ownerDocument;da=null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"style"):pa.createElement("style");null!=pa.setAttributeNS?da.setAttributeNS("type","text/css"):da.setAttribute("type","text/css");for(var na="",ia="",wa=0;wa<ha.length;wa++){var ua=ha[wa].name,va=ha[wa].url;Graph.isCssFontUrl(va)?+na+="@import url("+Graph.rewriteGoogleFontUrl(va)+");\n":ia+='@font-face {\nfont-family: "'+ua+'";\nsrc: url("'+va+'");\n}\n'}da.appendChild(pa.createTextNode(na+ia));aa.getElementsByTagName("defs")[0].appendChild(da)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(aa);this.mathEnabled&&(document.body.appendChild(aa),Editor.MathJaxRender(aa),aa.parentNode.removeChild(aa),da=aa.ownerDocument.getElementById("MJX-SVG-styles"),null!=+da&&aa.getElementsByTagName("defs")[0].appendChild(da.cloneNode(!0)));return aa};var E=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){E.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){R.apply(this,arguments);this.enumerationState=+0};var U=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return U.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=+function(k){var v="1"==mxUtils.getValue(k.style,"enumerate",0);v&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):v||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);v=k.secondLabel;if(null!=v){var G=k.view.scale,I=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?+new mxRectangle(k.x+k.width-4*G,k.y+4*G,0,0):mxRectangle.fromPoint(k.view.getPoint(k));v.bounds.equals(k)&&v.value==I&&v.scale==G||(v.bounds=k,v.value=I,v.scale=G,v.redraw())}};var O=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();O.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var Q=+Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){Q.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,v){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,v))};Graph.prototype.executeCustomActions=function(k,v,G){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),+null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var I=!1,M=0,P=0,S=mxUtils.bind(this,function(){I||(I=!0,this.model.beginUpdate())}),V=mxUtils.bind(this,function(){I&&(I=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<M&&M--;0==M&&X()}),X=mxUtils.bind(this,function(){if(P<k.length){var Z=this.stoppingCustomActions,Y=k[P++],ba=[];if(null!=Y.open)if(V(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,+G))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;W()}),M++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),V());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,+!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,W,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(S(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){S();var ea=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),+1);this.setCellsVisible(ea,!0)}null!=Y.hide&&(S(),ea=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(S(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(S(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));ea=[];null!=+Y.select&&this.isEnabled()&&(ea=this.getCellsForAction(Y.select),this.setSelectionCells(ea));null!=Y.highlight&&(ea=this.getCellsForAction(Y.highlight),this.highlightCells(ea,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));null!=Y.scroll&&(ea=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);null!=G&&null!=Y.explore&&Graph.exploreFromCell(this,G,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ca=+Y.tags.toggle;0==ca.length&&(ca=this.getAllTags());for(ea=0;ea<ca.length;ea++)this.toggleHiddenTag(ca[ea])}ca=null;null!=Y.tags.hidden&&(null==ca&&(ca=[]),ca=ca.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ca&&(ca=[]);var fa=this.getAllTags();for(ea=0;ea<fa.length;ea++)0>mxUtils.indexOf(Y.tags.visible,fa[ea])&&0>mxUtils.indexOf(ca,fa[ea])&&ca.push(fa[ea])}null!=ca&&this.setHiddenTags(ca);this.refresh()}0<ba.length&&(M++,this.executeAnimations(ba,W,Z?1:Y.steps,Z?0:Y.delay));0==M?X():V()}else this.stoppingCustomActions=+this.executingCustomActions=!1,V(),null!=v&&v()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var G=this.getLinkForCell(v);null!=G&&"data:action/json,"==G.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,G));if(this.isHtmlLabel(v)){var I=document.createElement("div");I.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var M=I.getElementsByTagName("a"),P=!1,S=0;S<M.length;S++)G=M[S].getAttribute("href"),null!=G&&"data:action/json,"==G.substring(0,17)&&(M[S].setAttribute("href",+this.updateCustomLink(k,G)),P=!0);P&&this.labelChanged(v,I.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==v.substring(0,17))try{var G=JSON.parse(v.substring(17));null!=G.actions&&(this.updateCustomLinkActions(k,G.actions),v="data:action/json,"+JSON.stringify(G))}catch(I){}return v};Graph.prototype.updateCustomLinkActions=function(k,v){for(var G=0;G<v.length;G++){var I=v[G],M;for(M in I)this.updateCustomLinkAction(k,I[M],"cells"),this.updateCustomLinkAction(k,I[M],+"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,G){if(null!=v&&null!=v[G]){for(var I=[],M=0;M<v[G].length;M++)if("*"==v[G][M])I.push(v[G][M]);else{var P=k[v[G][M]];null!=P?""!=P&&I.push(P):I.push(v[G][M])}v[G]=I}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,v));if(null!=k.excludeCells){for(var G=[],I=0;I<v.length;I++)0>k.excludeCells.indexOf(v[I].id)&&G.push(v[I]);v=G}return v};Graph.prototype.getCellsById=+function(k){var v=[];if(null!=k)for(var G=0;G<k.length;G++)if("*"==k[G]){var I=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(P){return P!=I},I))}else{var M=this.model.getCell(k[G]);null!=M&&v.push(M)}return v};var m=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return m.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};+Graph.prototype.toggleHiddenTag=function(k){var v=mxUtils.indexOf(this.hiddenTags,k);0>v?this.hiddenTags.push(k):0<=v&&this.hiddenTags.splice(v,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var v=0;v<k.length;v++)if(0>mxUtils.indexOf(this.hiddenTags,k[v]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,v,G,+I){var M=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var P=0,S={},V=0;V<k.length;V++)0<k[V].length&&(S[k[V]]=!0,P++);for(V=0;V<v.length;V++)if(G&&this.model.getParent(v[V])==this.model.root||this.model.isVertex(v[V])||this.model.isEdge(v[V])){var W=this.getTagsForCell(v[V]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=k.length)){for(var Z=X=0;Z<W.length&&X<P;Z++)null!=S[W[Z]]&&X++;X=X==P}X&&(1!=I||this.isCellVisible(v[V]))&&M.push(v[V])}}return M};Graph.prototype.getAllTags=+function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,G=[],I=0;I<k.length;I++){var M=this.getTagsForCell(k[I]);G=[];if(0<M.length){M=M.split(" ");for(var P={},S=0;S<M.length;S++)if(null==v||null!=v[M[S]])P[M[S]]=!0,G.push(M[S]);v=P}else return[]}return G};Graph.prototype.getTagsForCells=function(k){for(var v=[],G={},I=0;I<k.length;I++){var M=this.getTagsForCell(k[I]);if(0<M.length){M=M.split(" ");for(var P=+0;P<M.length;P++)null==G[M[P]]&&(G[M[P]]=!0,v.push(M[P]))}}return v};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var G=0;G<k.length;G++){for(var I=this.getTagsForCell(k[G]),M=I.split(" "),P=!1,S=0;S<v.length;S++){var V=mxUtils.trim(v[S]);""!=V&&0>mxUtils.indexOf(M,V)&&(I=0<I.length?I+" "+V:V,P=!0)}P&&this.setAttributeForCell(k[G],"tags",I)}}finally{this.model.endUpdate()}}};+Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var G=0;G<k.length;G++){var I=this.getTagsForCell(k[G]);if(0<I.length){for(var M=I.split(" "),P=!1,S=0;S<v.length;S++){var V=mxUtils.indexOf(M,v[S]);0<=V&&(M.splice(V,1),P=!0)}P&&this.setAttributeForCell(k[G],"tags",M.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var v=0;v<k.length;v++)this.model.setVisible(k[v],!this.model.isVisible(k[v]))}finally{this.model.endUpdate()}};+Graph.prototype.setCellsVisible=function(k,v){this.model.beginUpdate();try{for(var G=0;G<k.length;G++)this.model.setVisible(k[G],v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,G,I){for(var M=0;M<k.length;M++)this.highlightCell(k[M],v,G,I)};Graph.prototype.highlightCell=function(k,v,G,I,M){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;G=null!=G?G:1E3;k=this.view.getState(k);var P=null;null!=k&&(M=null!=M?M:4,M=Math.max(M+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,+1)+M),P=new mxCellHighlight(this,v,M,!1),null!=I&&(P.opacity=I),P.highlight(k),window.setTimeout(function(){null!=P.shape&&(mxUtils.setPrefixedStyle(P.shape.node.style,"transition","all 1200ms ease-in-out"),P.shape.node.style.opacity=0);window.setTimeout(function(){P.destroy()},1200)},G));return P};Graph.prototype.addSvgShadow=function(k,v,G,I){G=null!=G?G:!1;I=null!=I?I:!0;var M=k.ownerDocument,P=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"filter"):M.createElement("filter");P.setAttribute("id",+this.shadowId);var S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):M.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");P.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feOffset"):M.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",+"offsetBlur");P.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feFlood"):M.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");P.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feComposite"):M.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");+S.setAttribute("result","offsetBlur");P.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feBlend"):M.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");P.appendChild(S);S=k.getElementsByTagName("defs");0==S.length?(M=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"defs"):M.createElement("defs"),null!=k.firstChild?k.insertBefore(M,k.firstChild):k.appendChild(M)):M=S[0];M.appendChild(P);G||(v=null!=v?v:k.getElementsByTagName("g")[0],+null!=v&&(v.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&I&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+6,h=parseFloat(v[3])+6,k.setAttribute("viewBox",v[0]+" "+v[1]+" "+w+" "+h))))));return P};Graph.prototype.setShadowVisible=function(k,v){mxClient.IS_SVG&&!mxClient.IS_SF&&(v=+null!=v?v:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),v&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),+v=0;do var G=this.model.getChildAt(this.model.root,v);while(v++<k&&"1"==mxUtils.getValue(this.getCellStyle(G),"locked","0"));null!=G&&this.setDefaultParent(G)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml",STENCIL_PATH+"/kubernetes2.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",@@ -12986,364 +12986,364 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[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.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=-[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(g){var q=null;null!=g&&0<g.length&&("ER"==g.substring(0,2)?q="mxgraph.er":"sysML"==g.substring(0,5)&&(q="mxgraph.sysml"));return q};var v=mxMarker.createMarker;mxMarker.createMarker=function(g,q,F,J,L,Q,U,V,W,X){if(null!=F&&null==mxMarker.markers[F]){var Z=this.getPackageForType(F);null!=Z&&mxStencilRegistry.getStencil(Z)}return v.apply(this,arguments)};var z=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(g,-q,F,J,L,Q){"1"==mxUtils.getValue(q.style,"lineShape",null)&&g.setFillColor(mxUtils.getValue(q.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return z.apply(this,arguments)};PrintDialog.prototype.create=function(g,q,F){function J(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),parseInt(ba.value))))}function L(Ba){g.lastPrintPagesRadioChecked=Y.checked;g.lastPrintSelectionOnlyChecked=da.checked;g.lastPrintCropRadioChecked=-aa.checked;g.lastPrintFitRadioChecked=ia.checked;Y.checked&&ba.value<ea.value?(g.lastPrintPagesFromInput=ba.value,g.lastPrintPagesToInput=ea.value):(g.lastPrintPagesFromInput=null,g.lastPrintPagesToInput=null);na.value=Math.max(1,Math.min(1600,parseInt(na.value)))+"%";g.lastPrintZoom=na.value;g.lastPrintBorder=Aa.value;g.lastPrintGrid=Ha.checked;g.lastPrintTransparent=wa.checked;g.lastPrintInclude=Da.checked;g.lastPrintSheetsAcross=ha.value;g.lastPrintSheetsDown=pa.value;var Ca={};Ca.border=parseInt(Aa.value);-Ca.scale=parseInt(na.value)/100;Ca.grid=Ha.checked;Ca.transparent=wa.checked;Ca.includeCopy=Da.checked;Ca.sheetsAcross=parseInt(ha.value);Ca.sheetsDown=parseInt(pa.value);Ca.pagesFrom=parseInt(ba.value);Ca.pagesTo=parseInt(ea.value);Ca.allPages=Z.checked;Ca.selection=da.checked;Ca.pageView=ma.checked;Ca.crop=aa.checked;Ca.fit=ia.checked;return null!=F?F(!Ba,Ca):g.print(!Ba,Ca)}var Q=g.editor.graph,U=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign=-"center";V.style.marginTop="0px";mxUtils.write(V,q||mxResources.get("print"));U.appendChild(V);var W=1,X=1;V=document.createElement("div");V.style.whiteSpace="nowrap";var Z=document.createElement("input");Z.style.marginRight="8px";Z.style.marginBottom="8px";Z.setAttribute("type","radio");Z.setAttribute("name","pages-printdialog");V.appendChild(Z);q=document.createElement("span");mxUtils.write(q,mxResources.get("allPages"));mxEvent.addListener(q,"click",function(){Z.checked=!0});V.appendChild(q);mxUtils.br(V);-var Y=Z.cloneNode(!0);V.appendChild(Y);q=document.createElement("span");mxUtils.write(q,mxResources.get("pages")+":");V.appendChild(q);mxEvent.addListener(q,"click",function(){Y.checked=!0});var ba=document.createElement("input");ba.style.margin="0 4px";ba.setAttribute("value","1");ba.setAttribute("type","number");ba.setAttribute("min","1");ba.style.width="40px";V.appendChild(ba);q=document.createElement("span");mxUtils.write(q,mxResources.get("to"));V.appendChild(q);var ea=ba.cloneNode(!0);V.appendChild(ea);-mxEvent.addListener(ba,"focus",function(){Y.checked=!0});mxEvent.addListener(ea,"focus",function(){Y.checked=!0});mxEvent.addListener(ba,"change",J);mxEvent.addListener(ea,"change",J);if(null!=g.pages&&(X=g.pages.length,null!=g.currentPage))for(var ca=0;ca<X;ca++)if(g.currentPage==g.pages[ca]){W=ca+1;break}null!=g.lastPrintPagesFromInput&&null!=g.lastPrintPagesToInput?(ba.value=Math.min(X,Math.max(1,g.lastPrintPagesFromInput)),ea.value=Math.min(X,Math.max(1,g.lastPrintPagesToInput))):(ba.value=W,-ea.value=W);ba.setAttribute("max",X);ea.setAttribute("max",X);ca=mxUtils.button(mxResources.get("currentPage"),function(Ba){ba.value=W;ea.value=W;Y.checked=!0});ca.setAttribute("title",mxResources.get("currentPage"));ca.style.marginLeft="4px";ca.style.maxWidth="100px";ca.style.overflow="hidden";ca.style.textOverflow="ellipsis";ca.style.whiteSpace="nowrap";V.appendChild(ca);1<X&&U.appendChild(V);V=document.createElement("div");V.style.borderBottom="1px solid lightGray";V.style.paddingBottom="12px";-V.style.marginBottom="12px";V.style.whiteSpace="nowrap";var da=document.createElement("input");da.setAttribute("name","pages-printdialog");da.setAttribute("type",1==X?"checkbox":"radio");da.style.marginRight="8px";Q.isSelectionEmpty()&&da.setAttribute("disabled","disabled");Q.isEnabled()&&(V.appendChild(da),q=document.createElement("span"),mxUtils.write(q,mxResources.get("selectionOnly")),V.appendChild(q));(Q.isEnabled()||1<X)&&U.appendChild(V);!g.isPagesEnabled()||g.lastPrintPagesRadioChecked?Y.checked=-!0:!Q.isSelectionEmpty()&&g.lastPrintSelectionOnlyChecked?da.checked=!0:Z.checked=!0;Q.isSelectionEmpty()||mxEvent.addListener(q,"click",function(){da.checked=!da.checked});Q=document.createElement("div");Q.style.whiteSpace="nowrap";var ma=document.createElement("input");ma.style.marginBottom="8px";ma.style.marginRight="8px";ma.setAttribute("type","radio");ma.setAttribute("name","printSize");Q.appendChild(ma);q=document.createElement("span");mxUtils.write(q,mxResources.get("pageView"));Q.appendChild(q);-mxEvent.addListener(Q,"click",function(){ma.checked=!0});U.appendChild(Q);Q=document.createElement("div");Q.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.style.marginBottom="8px";aa.style.marginRight="8px";aa.setAttribute("type","radio");aa.setAttribute("name","printSize");Q.appendChild(aa);q=document.createElement("span");mxUtils.write(q,mxResources.get("crop"));Q.appendChild(q);mxEvent.addListener(Q,"click",function(){aa.checked=!0});U.appendChild(Q);Q=document.createElement("div");-Q.style.whiteSpace="nowrap";var ia=document.createElement("input");ia.style.marginBottom="8px";ia.style.marginRight="8px";ia.setAttribute("type","radio");ia.setAttribute("name","printSize");q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.paddingTop="2px";q.appendChild(ia);Q.appendChild(q);V=document.createElement("table");V.style.display="inline-block";V.style.borderSpacing="0";ca=document.createElement("tbody");var ka=document.createElement("tr"),-ta=ka.cloneNode(!0),sa=document.createElement("td"),fa=sa.cloneNode(!0),ra=sa.cloneNode(!0),ua=sa.cloneNode(!0),za=sa.cloneNode(!0),va=sa.cloneNode(!0);sa.style.textAlign="right";ua.style.textAlign="right";mxUtils.write(sa,mxResources.get("fitTo"));mxEvent.addListener(Q,"click",function(Ba){mxEvent.getSource(Ba)!=ia&&(ia.checked=!ia.checked)});var ha=document.createElement("input");ha.style.margin="0 2px";ha.style.boxSizing="border-box";ha.setAttribute("value",g.lastPrintSheetsAcross||"1");ha.setAttribute("min",-"1");ha.setAttribute("type","number");ha.style.width="40px";fa.appendChild(ha);q=document.createElement("span");mxUtils.write(q,mxResources.get("fitToSheetsAcross"));ra.appendChild(q);mxUtils.write(ua,mxResources.get("fitToBy"));var pa=ha.cloneNode(!0);pa.setAttribute("value",g.lastPrintSheetsDown||"1");za.appendChild(pa);mxEvent.addListener(ha,"click",function(Ba){ia.checked=!0;mxEvent.consume(Ba)});mxEvent.addListener(pa,"click",function(Ba){ia.checked=!0;mxEvent.consume(Ba)});g.lastPrintCropRadioChecked?-aa.checked=!0:g.lastPrintFitRadioChecked?ia.checked=!0:ma.checked=!0;q=document.createElement("span");mxUtils.write(q,mxResources.get("fitToSheetsDown"));va.appendChild(q);ka.appendChild(sa);ka.appendChild(fa);ka.appendChild(ra);ta.appendChild(ua);ta.appendChild(za);ta.appendChild(va);ca.appendChild(ka);ca.appendChild(ta);V.appendChild(ca);Q.appendChild(V);U.appendChild(Q);Q=document.createElement("div");Q.style.borderTop="1px solid lightGray";Q.style.whiteSpace="nowrap";Q.style.paddingTop="12px";-Q.style.marginTop="12px";Q.style.paddingLeft="8px";mxUtils.write(Q,mxResources.get("borderWidth")+":");var Aa=document.createElement("input");Aa.setAttribute("type","number");Aa.setAttribute("min","0");Aa.style.width="40px";Aa.style.marginLeft="4px";Aa.value=null!=g.lastPrintBorder?g.lastPrintBorder:mxPrintPreview.prototype.pageMargin;Q.appendChild(Aa);q=document.createElement("span");q.style.marginLeft="8px";mxUtils.write(q,mxResources.get("zoom")+":");Q.appendChild(q);var na=document.createElement("input");-na.style.width="60px";na.style.marginLeft="4px";na.value=null!=g.lastPrintZoom?g.lastPrintZoom:"100%";Q.appendChild(na);mxUtils.br(Q);var Ha=document.createElement("input");Ha.setAttribute("type","checkbox");Ha.style.marginTop="12px";Ha.checked=null!=g.lastPrintGrid?g.lastPrintGrid:!1;Q.appendChild(Ha);q=document.createElement("span");q.style.marginLeft="4px";q.style.marginRight="8px";mxUtils.write(q,mxResources.get("grid"));Q.appendChild(q);mxEvent.addListener(q,"click",function(Ba){Ha.checked=!0;-mxEvent.consume(Ba)});var wa=document.createElement("input");wa.setAttribute("type","checkbox");wa.style.marginTop="10px";wa.checked=null!=g.lastPrintTransparent?g.lastPrintTransparent:!1;null!=F&&(Q.appendChild(wa),q=document.createElement("span"),q.style.marginLeft="4px",mxUtils.write(q,mxResources.get("transparentBackground")),Q.appendChild(q),mxEvent.addListener(q,"click",function(Ba){wa.checked=!0;mxEvent.consume(Ba)}));var Da=document.createElement("input");Da.setAttribute("type","checkbox");-Da.style.marginTop="10px";Da.checked=null!=g.lastPrintInclude?g.lastPrintInclude:Editor.defaultIncludeDiagram;null==F||mxClient.IS_CHROMEAPP||"draw.io"!=g.getServiceName()||(mxUtils.br(Q),Q.appendChild(Da),q=document.createElement("span"),q.style.marginLeft="4px",mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram")),Q.appendChild(q),mxEvent.addListener(q,"click",function(Ba){Da.checked=!0;mxEvent.consume(Ba)}));U.appendChild(Q);q=document.createElement("div");q.style.marginTop="40px";q.style.textAlign=-"right";q.style.whiteSpace="nowrap";g.isOffline()||null!=F||q.appendChild(g.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));Q=mxUtils.button(mxResources.get("cancel"),function(){g.hideDialog()});Q.className="geBtn";g.editor.cancelFirst&&q.appendChild(Q);PrintDialog.previewEnabled&&null==F&&(V=mxUtils.button(mxResources.get("preview"),function(){try{g.hideDialog(),L(!1)}catch(Ba){g.handleError(Ba)}}),V.className="geBtn",q.appendChild(V));V=mxUtils.button(mxResources.get(null!=F?"export":-PrintDialog.previewEnabled?"print":"ok"),function(){try{g.hideDialog(),L(!0)}catch(Ba){g.handleError(Ba)}});V.className="geBtn gePrimaryBtn";q.appendChild(V);g.editor.cancelFirst||q.appendChild(Q);U.appendChild(q);if(g.editor.isChromelessView()){var Ea=function(){Editor.isDarkMode()?(U.classList.add("geDarkMode"),U.style.colorScheme="dark"):(U.classList.remove("geDarkMode"),U.style.colorScheme="light")};g.addListener("darkModeChanged",Ea);Ea();var Na=function(Ba,Ca){Ba=Ca.getProperty("dialog");U.parentNode==-Ba.container&&(g.editor.removeListener(Na),g.removeListener(Ea))};g.editor.addListener("hideDialog",Na)}this.container=U};var A=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var g=this.image;null!=g&&null!=g.src&&Graph.isPageLink(g.src)&&(g={originalSrc:g.src});this.page.viewState.backgroundImage=-g}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else A.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&-this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(g=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=g?g:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var H=document.createElement("canvas"),R=new Image;R.onload=function(){try{H.getContext("2d").drawImage(R,-0,0);var g=H.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=g&&6<g.length}catch(q){}};R.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(g){}Editor.prototype.useCanvasForExport=!1})();-(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,m,d){d.ui=f.ui;return m};b.afterDecode=function(f,m,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousAdaptiveColors=d.adaptiveColors;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})();-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,m,d){d.ui=f.ui;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.7";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var u=mxMarker.createMarker;mxMarker.createMarker=function(k,v,G,I,M,P,S,V,W,X){if(null!=G&&null==mxMarker.markers[G]){var Z=this.getPackageForType(G);null!=Z&&mxStencilRegistry.getStencil(Z)}return u.apply(this,arguments)};var A=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,+v,G,I,M,P){"1"==mxUtils.getValue(v.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return A.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,G){function I(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),parseInt(ba.value))))}function M(za){k.lastPrintPagesRadioChecked=Y.checked;k.lastPrintSelectionOnlyChecked=fa.checked;k.lastPrintCropRadioChecked=+da.checked;k.lastPrintFitRadioChecked=ha.checked;Y.checked&&ba.value<ea.value?(k.lastPrintPagesFromInput=ba.value,k.lastPrintPagesToInput=ea.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);sa.value=Math.max(1,Math.min(1600,parseInt(sa.value)))+"%";k.lastPrintZoom=sa.value;k.lastPrintBorder=Aa.value;k.lastPrintGrid=Ia.checked;k.lastPrintTransparent=xa.checked;k.lastPrintInclude=Ba.checked;k.lastPrintSheetsAcross=oa.value;k.lastPrintSheetsDown=ma.value;var Da={};Da.border=parseInt(Aa.value);+Da.scale=parseInt(sa.value)/100;Da.grid=Ia.checked;Da.transparent=xa.checked;Da.includeCopy=Ba.checked;Da.sheetsAcross=parseInt(oa.value);Da.sheetsDown=parseInt(ma.value);Da.pagesFrom=parseInt(ba.value);Da.pagesTo=parseInt(ea.value);Da.allPages=Z.checked;Da.selection=fa.checked;Da.pageView=aa.checked;Da.crop=da.checked;Da.fit=ha.checked;return null!=G?G(!za,Da):k.print(!za,Da)}var P=k.editor.graph,S=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign=+"center";V.style.marginTop="0px";mxUtils.write(V,v||mxResources.get("print"));S.appendChild(V);var W=1,X=1;V=document.createElement("div");V.style.whiteSpace="nowrap";var Z=document.createElement("input");Z.style.marginRight="8px";Z.style.marginBottom="8px";Z.setAttribute("type","radio");Z.setAttribute("name","pages-printdialog");V.appendChild(Z);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){Z.checked=!0});V.appendChild(v);mxUtils.br(V);+var Y=Z.cloneNode(!0);V.appendChild(Y);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");V.appendChild(v);mxEvent.addListener(v,"click",function(){Y.checked=!0});var ba=document.createElement("input");ba.style.margin="0 4px";ba.setAttribute("value","1");ba.setAttribute("type","number");ba.setAttribute("min","1");ba.style.width="40px";V.appendChild(ba);v=document.createElement("span");mxUtils.write(v,mxResources.get("to"));V.appendChild(v);var ea=ba.cloneNode(!0);V.appendChild(ea);+mxEvent.addListener(ba,"focus",function(){Y.checked=!0});mxEvent.addListener(ea,"focus",function(){Y.checked=!0});mxEvent.addListener(ba,"change",I);mxEvent.addListener(ea,"change",I);if(null!=k.pages&&(X=k.pages.length,null!=k.currentPage))for(var ca=0;ca<X;ca++)if(k.currentPage==k.pages[ca]){W=ca+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(ba.value=Math.min(X,Math.max(1,k.lastPrintPagesFromInput)),ea.value=Math.min(X,Math.max(1,k.lastPrintPagesToInput))):(ba.value=W,+ea.value=W);ba.setAttribute("max",X);ea.setAttribute("max",X);ca=mxUtils.button(mxResources.get("currentPage"),function(za){ba.value=W;ea.value=W;Y.checked=!0});ca.setAttribute("title",mxResources.get("currentPage"));ca.style.marginLeft="4px";ca.style.maxWidth="100px";ca.style.overflow="hidden";ca.style.textOverflow="ellipsis";ca.style.whiteSpace="nowrap";V.appendChild(ca);1<X&&S.appendChild(V);V=document.createElement("div");V.style.borderBottom="1px solid lightGray";V.style.paddingBottom="12px";+V.style.marginBottom="12px";V.style.whiteSpace="nowrap";var fa=document.createElement("input");fa.setAttribute("name","pages-printdialog");fa.setAttribute("type",1==X?"checkbox":"radio");fa.style.marginRight="8px";P.isSelectionEmpty()&&fa.setAttribute("disabled","disabled");P.isEnabled()&&(V.appendChild(fa),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),V.appendChild(v));(P.isEnabled()||1<X)&&S.appendChild(V);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?Y.checked=+!0:!P.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?fa.checked=!0:Z.checked=!0;P.isSelectionEmpty()||mxEvent.addListener(v,"click",function(){fa.checked=!fa.checked});P=document.createElement("div");P.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.style.marginBottom="8px";aa.style.marginRight="8px";aa.setAttribute("type","radio");aa.setAttribute("name","printSize");P.appendChild(aa);v=document.createElement("span");mxUtils.write(v,mxResources.get("pageView"));P.appendChild(v);+mxEvent.addListener(P,"click",function(){aa.checked=!0});S.appendChild(P);P=document.createElement("div");P.style.whiteSpace="nowrap";var da=document.createElement("input");da.style.marginBottom="8px";da.style.marginRight="8px";da.setAttribute("type","radio");da.setAttribute("name","printSize");P.appendChild(da);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));P.appendChild(v);mxEvent.addListener(P,"click",function(){da.checked=!0});S.appendChild(P);P=document.createElement("div");+P.style.whiteSpace="nowrap";var ha=document.createElement("input");ha.style.marginBottom="8px";ha.style.marginRight="8px";ha.setAttribute("type","radio");ha.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(ha);P.appendChild(v);V=document.createElement("table");V.style.display="inline-block";V.style.borderSpacing="0";ca=document.createElement("tbody");var pa=document.createElement("tr"),+na=pa.cloneNode(!0),ia=document.createElement("td"),wa=ia.cloneNode(!0),ua=ia.cloneNode(!0),va=ia.cloneNode(!0),Ca=ia.cloneNode(!0),ja=ia.cloneNode(!0);ia.style.textAlign="right";va.style.textAlign="right";mxUtils.write(ia,mxResources.get("fitTo"));mxEvent.addListener(P,"click",function(za){mxEvent.getSource(za)!=ha&&(ha.checked=!ha.checked)});var oa=document.createElement("input");oa.style.margin="0 2px";oa.style.boxSizing="border-box";oa.setAttribute("value",k.lastPrintSheetsAcross||"1");oa.setAttribute("min",+"1");oa.setAttribute("type","number");oa.style.width="40px";wa.appendChild(oa);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));ua.appendChild(v);mxUtils.write(va,mxResources.get("fitToBy"));var ma=oa.cloneNode(!0);ma.setAttribute("value",k.lastPrintSheetsDown||"1");Ca.appendChild(ma);mxEvent.addListener(oa,"click",function(za){ha.checked=!0;mxEvent.consume(za)});mxEvent.addListener(ma,"click",function(za){ha.checked=!0;mxEvent.consume(za)});k.lastPrintCropRadioChecked?+da.checked=!0:k.lastPrintFitRadioChecked?ha.checked=!0:aa.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));ja.appendChild(v);pa.appendChild(ia);pa.appendChild(wa);pa.appendChild(ua);na.appendChild(va);na.appendChild(Ca);na.appendChild(ja);ca.appendChild(pa);ca.appendChild(na);V.appendChild(ca);P.appendChild(V);S.appendChild(P);P=document.createElement("div");P.style.borderTop="1px solid lightGray";P.style.whiteSpace="nowrap";P.style.paddingTop="12px";+P.style.marginTop="12px";P.style.paddingLeft="8px";mxUtils.write(P,mxResources.get("borderWidth")+":");var Aa=document.createElement("input");Aa.setAttribute("type","number");Aa.setAttribute("min","0");Aa.style.width="40px";Aa.style.marginLeft="4px";Aa.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;P.appendChild(Aa);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,mxResources.get("zoom")+":");P.appendChild(v);var sa=document.createElement("input");+sa.style.width="60px";sa.style.marginLeft="4px";sa.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";P.appendChild(sa);mxUtils.br(P);var Ia=document.createElement("input");Ia.setAttribute("type","checkbox");Ia.style.marginTop="12px";Ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;P.appendChild(Ia);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));P.appendChild(v);mxEvent.addListener(v,"click",function(za){Ia.checked=!0;+mxEvent.consume(za)});var xa=document.createElement("input");xa.setAttribute("type","checkbox");xa.style.marginTop="10px";xa.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=G&&(P.appendChild(xa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),P.appendChild(v),mxEvent.addListener(v,"click",function(za){xa.checked=!0;mxEvent.consume(za)}));var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");+Ba.style.marginTop="10px";Ba.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==G||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(P),P.appendChild(Ba),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),P.appendChild(v),mxEvent.addListener(v,"click",function(za){Ba.checked=!0;mxEvent.consume(za)}));S.appendChild(P);v=document.createElement("div");v.style.marginTop="40px";v.style.textAlign=+"right";v.style.whiteSpace="nowrap";k.isOffline()||null!=G||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));P=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});P.className="geBtn";k.editor.cancelFirst&&v.appendChild(P);PrintDialog.previewEnabled&&null==G&&(V=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),M(!1)}catch(za){k.handleError(za)}}),V.className="geBtn",v.appendChild(V));V=mxUtils.button(mxResources.get(null!=G?"export":+PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),M(!0)}catch(za){k.handleError(za)}});V.className="geBtn gePrimaryBtn";v.appendChild(V);k.editor.cancelFirst||v.appendChild(P);S.appendChild(v);if(k.editor.isChromelessView()){var Fa=function(){Editor.isDarkMode()?(S.classList.add("geDarkMode"),S.style.colorScheme="dark"):(S.classList.remove("geDarkMode"),S.style.colorScheme="light")};k.addListener("darkModeChanged",Fa);Fa();var La=function(za,Da){za=Da.getProperty("dialog");S.parentNode==+za.container&&(k.editor.removeListener(La),k.removeListener(Fa))};k.editor.addListener("hideDialog",La)}this.container=S};var B=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=+k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else B.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&+this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var H=document.createElement("canvas"),T=new Image;T.onload=function(){try{H.getContext("2d").drawImage(T,+0,0);var k=H.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(v){}};T.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(k){}Editor.prototype.useCanvasForExport=!1})();+(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};b.afterDecode=function(g,l,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousAdaptiveColors=d.adaptiveColors;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})();+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.9";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};-EditorUi.logError=function(c,e,l,n,p,u,B){if(null!=c){p=null!=p?p:Error(c);p.stack=null!=p.stack?p.stack:"";u=null!=u?u:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>p.stack.indexOf("extension:")&&0>p.stack.indexOf("<anonymous>:")&&-0>p.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+u+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=n?":colno:"+encodeURIComponent(n):"")+(""!=p.stack?"&stack="+encodeURIComponent(p.stack):""))}catch(D){}try{B||null==window.console||console.error(u,c,e,l,n,p)}catch(D){}}};EditorUi.logEvent=-function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(l){}};EditorUi.sendReport=function(c,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,c.length>e&&(c=c.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email",-"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],e=0;e<arguments.length;e++)c.push(arguments[e]);console.log.apply(console,c)}}catch(l){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");-for(var e=[],l=0;l<c.length;l++)e.push(c[l]);for(l=0;l<e.length;l++)EditorUi.replaceSvgImage(e[l])};EditorUi.replaceSvgImage=function(c){try{var e=null;e=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(e);if(null!=l&&"svg"==l.nodeName){l.setAttribute("x",c.getAttribute("x"));l.setAttribute("y",c.getAttribute("y"));l.setAttribute("width",c.getAttribute("width"));l.setAttribute("height",c.getAttribute("height"));l.style.fontFamily=-"initial";var n=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");n.appendChild(l);c.hasAttribute("transform")&&n.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(n,c)}}catch(p){}};EditorUi.getSvgSubtree=function(c){var e=Graph.getSvgFromDataUri(c);c=null;if(null!=e){c=Graph.sanitizeNode(mxUtils.parseXml(e).documentElement);e=c.getElementsByTagName("style");if(0<e.length){var l="svg-image-"+Editor.guid();c.setAttribute("id",l);for(var n=document.implementation.createHTMLDocument(""),-p=document.createElement("style"),u=0;u<e.length;u++){p.textContent=e[u].textContent;n.body.appendChild(p);for(var B="",D=0;D<p.sheet.cssRules.length;D++){var G=p.sheet.cssRules[D];if(null!=G.selectorText){for(var E=G.selectorText.split(","),T=0;T<E.length;T++)E[T]="#"+l+" "+E[T];G.selectorText=E.join(",")}B+=G.cssText+"\n"}e[u].textContent=B}}e=c.getElementsByTagName("*");for(l=0;l<e.length;l++)e[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';+EditorUi.logError=function(c,e,f,p,n,t,z){if(null!=c){n=null!=n?n:Error(c);n.stack=null!=n.stack?n.stack:"";t=null!=t?t:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>n.stack.indexOf("extension:")&&0>n.stack.indexOf("<anonymous>:")&&+0>n.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+t+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(f)+(null!=p?":colno:"+encodeURIComponent(p):"")+(""!=n.stack?"&stack="+encodeURIComponent(n.stack):""))}catch(F){}try{z||null==window.console||console.error(t,c,e,f,p,n)}catch(F){}}};EditorUi.logEvent=+function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(f){}};EditorUi.sendReport=function(c,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,c.length>e&&(c=c.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email",+"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(f){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],e=0;e<arguments.length;e++)c.push(arguments[e]);console.log.apply(console,c)}}catch(f){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");+for(var e=[],f=0;f<c.length;f++)e.push(c[f]);for(f=0;f<e.length;f++)EditorUi.replaceSvgImage(e[f])};EditorUi.replaceSvgImage=function(c){try{var e=null;e=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var f=EditorUi.getSvgSubtree(e);if(null!=f&&"svg"==f.nodeName){f.setAttribute("x",c.getAttribute("x"));f.setAttribute("y",c.getAttribute("y"));f.setAttribute("width",c.getAttribute("width"));f.setAttribute("height",c.getAttribute("height"));f.style.fontFamily=+"initial";var p=mxUtils.createElementNs(f.ownerDocument,mxConstants.NS_SVG,"g");p.appendChild(f);c.hasAttribute("transform")&&p.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(p,c)}}catch(n){}};EditorUi.getSvgSubtree=function(c){var e=Graph.getSvgFromDataUri(c);c=null;if(null!=e){c=Graph.sanitizeNode(mxUtils.parseXml(e).documentElement);e=c.getElementsByTagName("style");if(0<e.length){var f="svg-image-"+Editor.guid();c.setAttribute("id",f);for(var p=document.implementation.createHTMLDocument(""),+n=document.createElement("style"),t=0;t<e.length;t++){n.textContent=e[t].textContent;p.body.appendChild(n);for(var z="",F=0;F<n.sheet.cssRules.length;F++){var C=n.sheet.cssRules[F];if(null!=C.selectorText){for(var E=C.selectorText.split(","),R=0;R<E.length;R++)E[R]="#"+f+" "+E[R];C.selectorText=E.join(",")}z+=C.cssText+"\n"}e[t].textContent=z}}e=c.getElementsByTagName("*");for(f=0;f<e.length;f++)e[f].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=-!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(p){}try{var e=document.createElement("canvas"),-l=new Image;l.onload=function(){try{e.getContext("2d").drawImage(l,0,0);var p=e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=p&&6<p.length}catch(u){}};l.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{e=-document.createElement("canvas");e.width=e.height=1;var n=e.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==n.match("image/jpeg");n=e.toDataURL("image/webp");EditorUi.prototype.webpSupported=null!==n.match("image/webp")}catch(p){}})();EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";c.style.overflow="1"==urlParams.embed?"hidden":"";return c};EditorUi.prototype.openLink=function(c,e,l){return this.editor.graph.openLink(c,-e,l)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,e){e(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,e,l){localStorage.setItem(c,e);null!=l&&l()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,e){localStorage.removeItem(c);e()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(n){}try{var e=document.createElement("canvas"),+f=new Image;f.onload=function(){try{e.getContext("2d").drawImage(f,0,0);var n=e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=n&&6<n.length}catch(t){}};f.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{e=+document.createElement("canvas");e.width=e.height=1;var p=e.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==p.match("image/jpeg");p=e.toDataURL("image/webp");EditorUi.prototype.webpSupported=null!==p.match("image/webp")}catch(n){}})();EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";c.style.overflow="1"==urlParams.embed?"hidden":"";return c};EditorUi.prototype.openLink=function(c,e,f){return this.editor.graph.openLink(c,+e,f)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,e){e(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,e,f){localStorage.setItem(c,e);null!=f&&f()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,e){localStorage.removeItem(c);e()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var e=this.editor.graph;e.mathEnabled=c;null!=e.view.backgroundImage&&(e.view.backgroundImage.destroy(),e.view.backgroundImage=null);this.editor.updateGraphComponents();e.refresh();e.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=-function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,e,l){var n=null==c||null==e;l=null!=l?l:24;var p=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),u=this.timeout,B=p.spin,D=null,G=null,E=mxUtils.bind(this,function(O){null!=O&&O()});p.spin=function(O,S,k,v){v=null!=v?v:u;var z=!1;if(!this.active){var A=Date.now();null!=k&&(D=window.setTimeout(function(){p.stop();D=null;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:G})},v));B.call(this,O);this.active=!0;null!=S&&(n&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/-2-2),z=document.createElement("div"),z.className="geSpinnerStatus",z.style.position="absolute",z.style.whiteSpace="nowrap",z.style.background="#4B4243",z.style.color="white",z.style.fontFamily=Editor.defaultHtmlFont,z.style.fontSize="9pt",z.style.padding="6px",z.style.paddingLeft="10px",z.style.paddingRight="10px",z.style.zIndex=2E9,z.style.left=Math.max(0,c)+"px",z.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(z.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(z.style,"transform",-"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(z.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=S.substring(S.length-3,S.length)&&"!"!=S.charAt(S.length-1)&&(S+="..."),z.innerHTML=mxUtils.htmlEntities(S),O.appendChild(z),p.status=z);this.pause=mxUtils.bind(this,function(){var H=E;this.active&&(v=Math.max(0,v-(Date.now()-A)),H=mxUtils.bind(this,function(R){this.spin(O,S,k,v);if(null!=R)try{R(),G=mxUtils.bind(this,function(){this.spin(O,S,k,v);try{R()}catch(g){null!=k&&k(g)}})}catch(g){null!=-k&&k(g)}}));this.stop();return H});z=!0}return z};var T=p.stop;p.stop=function(){T.call(this);this.active&&(this.active=!1,null!=D&&(window.clearTimeout(D),D=null),null!=p.status&&null!=p.status.parentNode&&p.status.parentNode.removeChild(p.status),p.status=null)};p.pause=function(){return E};return p};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),l=this.editor.extractGraphModel(e.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}catch(n){}return!1};+function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,e,f){var p=null==c||null==e;f=null!=f?f:24;var n=new Spinner({lines:12,length:f,width:Math.round(f/3),radius:Math.round(f/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=this.timeout,z=n.spin,F=null,C=null,E=mxUtils.bind(this,function(U){null!=U&&U()});n.spin=function(U,O,Q,m){m=null!=m?m:t;var u=!1;if(!this.active){var A=Date.now();null!=Q&&(F=window.setTimeout(function(){n.stop();F=null;Q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:C})},m));z.call(this,U);this.active=!0;null!=O&&(p&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/+2-2),u=document.createElement("div"),u.className="geSpinnerStatus",u.style.position="absolute",u.style.whiteSpace="nowrap",u.style.background="#4B4243",u.style.color="white",u.style.fontFamily=Editor.defaultHtmlFont,u.style.fontSize="9pt",u.style.padding="6px",u.style.paddingLeft="10px",u.style.paddingRight="10px",u.style.zIndex=2E9,u.style.left=Math.max(0,c)+"px",u.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(u.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(u.style,"transform",+"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(u.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=O.substring(O.length-3,O.length)&&"!"!=O.charAt(O.length-1)&&(O+="..."),u.innerHTML=mxUtils.htmlEntities(O),U.appendChild(u),n.status=u);this.pause=mxUtils.bind(this,function(){var B=E;this.active&&(m=Math.max(0,m-(Date.now()-A)),B=mxUtils.bind(this,function(H){this.spin(U,O,Q,m);if(null!=H)try{H(),C=mxUtils.bind(this,function(){this.spin(U,O,Q,m);try{H()}catch(T){null!=Q&&Q(T)}})}catch(T){null!=+Q&&Q(T)}}));this.stop();return B});u=!0}return u};var R=n.stop;n.stop=function(){R.call(this);this.active&&(this.active=!1,null!=F&&(window.clearTimeout(F),F=null),null!=n.status&&null!=n.status.parentNode&&n.status.parentNode.removeChild(n.status),n.status=null)};n.pause=function(){return E};return n};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),f=this.editor.extractGraphModel(e.documentElement,!0);return null!=f&&0==f.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};-EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=-e.getFunction,n=this.editor.graph,p=this;e.getFunction=function(u){if(n.isSelectionEmpty()&&null!=p.pages&&0<p.pages.length){var B=p.getSelectedPageIndex();if(mxEvent.isShiftDown(u)){if(37==u.keyCode)return function(){0<B&&p.movePage(B,B-1)};if(38==u.keyCode)return function(){0<B&&p.movePage(B,0)};if(39==u.keyCode)return function(){B<p.pages.length-1&&p.movePage(B,B+1)};if(40==u.keyCode)return function(){B<p.pages.length-1&&p.movePage(B,p.pages.length-1)}}else if(mxEvent.isControlDown(u)||mxClient.IS_MAC&&-mxEvent.isMetaDown(u)){if(37==u.keyCode)return function(){0<B&&p.selectNextPage(!1)};if(38==u.keyCode)return function(){0<B&&p.selectPage(p.pages[0])};if(39==u.keyCode)return function(){B<p.pages.length-1&&p.selectNextPage(!0)};if(40==u.keyCode)return function(){B<p.pages.length-1&&p.selectPage(p.pages[p.pages.length-1])}}}return!(65<=u.keyCode&&90>=u.keyCode)||n.isSelectionEmpty()||mxEvent.isAltDown(u)||mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||mxClient.IS_MAC&&mxEvent.isMetaDown(u)?l.apply(this,-arguments):null}}return e};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var e=f.apply(this,arguments);if(null==e)try{var l=c.indexOf("<mxfile ");if(0<=l){var n=c.lastIndexOf("</mxfile>");n>l&&(e=c.substring(l,n+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var p=mxUtils.parseXml(c),u=this.editor.extractGraphModel(p.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);-e=null!=u?mxUtils.getXml(u):""}}catch(B){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,e){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",e);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,-!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();try{var n=null!=this.pages?this.pages.slice():null,p=c.getElementsByTagName("diagram");if(1<p.length||1==p.length&&p[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var u=p.length-1;0<=u;u--){var B=this.updatePageRoot(new DiagramPage(p[u]));null==B.getName()&&B.setName(mxResources.get("pageWithNumber",[u+1]));l.model.execute(new ChangePage(this,B,0==u?B:null,0))}}else null==this.fileNode&&-(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(u=0;u<n.length;u++)l.model.execute(new ChangePage(this,-n[u],null));var D=this.getCurrentFile();null!=D&&D.fileReplaced(e)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,l,n,p,u,B,D,G,E,T,O,S){e=null!=e?e:this.editor.graph;p=null!=p?p:!1;G=null!=G?G:!0;T=null!=T?T:!Editor.defaultCompressed;var k=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var v="_blank";else k=v=n;if(null==c)return"";var z=c;if("mxfile"!=z.nodeName.toLowerCase()){if(T){var A=c.ownerDocument.createElement("diagram");A.setAttribute("name",-mxResources.get("pageWithNumber",[1]));A.setAttribute("id",Editor.guid());A.appendChild(c)}else{A=Graph.zapGremlins(mxUtils.getXml(c));z=Graph.compress(A);if(Graph.decompress(z)!=A)return A;A=c.ownerDocument.createElement("diagram");A.setAttribute("name",mxResources.get("pageWithNumber",[1]));A.setAttribute("id",Editor.guid());mxUtils.setTextContent(A,z)}z=c.ownerDocument.createElement("mxfile");z.appendChild(A)}E?(z=z.cloneNode(!0),z.removeAttribute("modified"),z.removeAttribute("host"),z.removeAttribute("agent"),-z.removeAttribute("etag"),z.removeAttribute("userAgent"),z.removeAttribute("version"),z.removeAttribute("editor"),z.removeAttribute("type")):(z.removeAttribute("userAgent"),z.removeAttribute("modified"),z.removeAttribute("version"),z.removeAttribute("editor"),z.removeAttribute("pages"),z.removeAttribute("type"),z.removeAttribute("etag"),mxClient.IS_CHROMEAPP?z.setAttribute("host","Chrome"):EditorUi.isElectronApp?z.setAttribute("host","Electron"):z.setAttribute("host",window.location.hostname),z.setAttribute("agent",-null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),z.setAttribute("version",EditorUi.VERSION),1<z.getElementsByTagName("diagram").length&&null!=this.pages&&z.setAttribute("pages",this.pages.length));null!=O&&(z=z.cloneNode(!0),z.setAttribute("scale",O));null!=S&&(z=z.cloneNode(!0),z.setAttribute("border",S));c=T?mxUtils.getPrettyXml(z):mxUtils.getXml(z);if(!u&&!p&&(B||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(z),e,null!=l?l.getTitle():null,v,k);else if(u||-!p&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(n=null),l=this.getSvgFileProperties(z),c=this.getEmbeddedSvg(c,e,n,null,D,G,k,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,e,l,n){c=null!=c?c:!0;e=null!=e?e:!1;l=null!=l?l:!Editor.defaultCompressed;var p=this.editor.getGraphXml(c,n);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(G){var E=G.getElementsByTagName("mxGraphModel"),-T=0<E.length?E[0]:null;E=G;null==T&&l?(T=mxUtils.getNodeValue(G),0<T.length&&(T=Graph.decompress(T),null!=T&&0<T.length&&(E=G.cloneNode(!1),E.appendChild(mxUtils.parseXml(T).documentElement)))):null==T||l?E=G.cloneNode(!0):(E=G.cloneNode(!1),mxUtils.setTextContent(E,Graph.compressNode(T)));p.appendChild(E)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(p),p=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var u=this.pages[e],-B=u.node;if(u!=this.currentPage)if(u.needsUpdate){var D=new mxCodec(mxUtils.createXmlDocument());D=D.encode(new mxGraphModel(u.root));this.editor.graph.saveViewState(u.viewState,D,null,n);EditorUi.removeChildNodes(B);B.appendChild(D);delete u.needsUpdate}else n&&(this.updatePageRoot(u),null!=u.viewState.backgroundImage&&(null!=u.viewState.backgroundImage.originalSrc?u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.originalSrc,u):Graph.isPageLink(u.viewState.backgroundImage.src)&&-(u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.src,u))),null!=u.viewState.backgroundImage&&null!=u.viewState.backgroundImage.originalSrc&&(D=new mxCodec(mxUtils.createXmlDocument()),D=D.encode(new mxGraphModel(u.root)),this.editor.graph.saveViewState(u.viewState,D,null,n),B=B.cloneNode(!1),B.appendChild(D)));c(B)}return p};EditorUi.prototype.anonymizeString=function(c,e){for(var l=[],n=0;n<c.length;n++){var p=c.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(p)?-l.push(p):isNaN(parseInt(p))?p.toLowerCase()!=p?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):p.toUpperCase()!=p?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(p)?l.push(" "):l.push("?"):l.push(e?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var l=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);-null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(l)}catch(u){c[EditorUi.DIFF_INSERT][e].data=u.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var n in c[EditorUi.DIFF_UPDATE]){var p=c[EditorUi.DIFF_UPDATE][n];null!=p.name&&(p.name=this.anonymizeString(p.name));null!=p.cells&&(e=mxUtils.bind(this,function(u){var B=p.cells[u];if(null!=B){for(var D in B)null!=B[D].value&&(B[D].value="["+B[D].value.length+"]"),-null!=B[D].xmlValue&&(B[D].xmlValue="["+B[D].xmlValue.length+"]"),null!=B[D].style&&(B[D].style="["+B[D].style.length+"]"),mxUtils.isEmptyObject(B[D])&&delete B[D];mxUtils.isEmptyObject(B)&&delete p.cells[u]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(p.cells)&&delete p.cells);mxUtils.isEmptyObject(p)&&delete c[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,-e){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,e));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");for(var l=0;l<e.length;l++)null!=e[l].getAttribute("value")&&e[l].setAttribute("value","["+e[l].getAttribute("value").length+"]"),null!=e[l].getAttribute("xmlValue")&&-e[l].setAttribute("xmlValue","["+e[l].getAttribute("xmlValue").length+"]"),null!=e[l].getAttribute("style")&&e[l].setAttribute("style","["+e[l].getAttribute("style").length+"]"),null!=e[l].parentNode&&"root"!=e[l].parentNode.nodeName&&null!=e[l].parentNode.parentNode&&(e[l].setAttribute("id",e[l].parentNode.getAttribute("id")),e[l].parentNode.parentNode.replaceChild(e[l],e[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?-this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();e.handleFileError(l,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),-mxUtils.bind(this,function(l){e.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,e,l,n,p,u,B,D,G,E,T,O,S){p=null!=p?p:!0;u=null!=u?u:!1;E=null!=E?E:!Editor.defaultCompressed;var k=this.editor.graph;if((e||!c&&null!=G&&/(\.svg)$/i.test(G.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var v=k.getGlobalVariable;k=this.createTemporaryGraph(k.getStylesheet());k.setBackgroundImage=this.editor.graph.setBackgroundImage;k.background=this.editor.graph.background;var z=-null!=this.pages?this.pages[0]:null;null==z||this.currentPage==z?k.setBackgroundImage(this.editor.graph.backgroundImage):null!=z.viewState&&null!=z.viewState&&k.setBackgroundImage(z.viewState.backgroundImage);k.getGlobalVariable=function(A){return"page"==A&&null!=z?z.getName():"pagenumber"==A?1:v.apply(this,arguments)};document.body.appendChild(k.container);null!=z&&k.model.setRoot(z.root)}B=null!=B?B:this.getXmlFileData(p,u,E,T);G=null!=G?G:this.getCurrentFile();c=this.createFileData(B,k,G,window.location.href,-c,e,l,n,p,D,E,O,S);k!=this.editor.graph&&k.container.parentNode.removeChild(k.container);return c};EditorUi.prototype.getHtml=function(c,e,l,n,p,u){u=null!=u?u:!0;var B=null,D=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){B=u?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var G=e.view.scale;u=Math.floor(B.x/G-e.view.translate.x);G=Math.floor(B.y/G-e.view.translate.y);B=e.background;null==p&&(e=this.getBasenames().join(";"),0<e.length&&(D=EditorUi.drawHost+"/embed.js?s="+e));-c.setAttribute("x0",u);c.setAttribute("y0",G)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=n&&c.setAttribute("edit",n));null!=p&&(p=p.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";n=Graph.compress(c);Graph.decompress(n)!=c&&(n=encodeURIComponent(c));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':-"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+"</head>\n<body"+(null==p&&null!=B&&B!=mxConstants.NONE?' style="background-color:'+B+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+-(null==p?'<script type="text/javascript" src="'+D+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,l,n,p){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=p&&(p=p.replace(/&/g,"&"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,-xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+-p+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>\n'+(null==p?'<script type="text/javascript" src="'+e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=-function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,l=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[e],"cause",[l]),Error(mxResources.get("notADiagramFile")+" ("+l+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),-l={},0<c.length)){var n=this.getHashObject(),p=null;this.fileNode=e;this.pages=[];for(var u=0;u<c.length;u++){null==c[u].getAttribute("id")&&c[u].setAttribute("id",u);e=new DiagramPage(c[u]);null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[u+1]));this.pages.push(e);if(null==n.pageId&&null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]||null!=n.pageId&&e.getId()==n.pageId)p=e;if(null==l[e.getId()])l[e.getId()]=e;else throw Error(e.getId()+": Duplicate page ID");}this.currentPage=-null!=p?p:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),-this.scrollToPage());if(null!=urlParams["layer-ids"])try{var B=decodeURIComponent(urlParams["layer-ids"]).split(" ");e={};for(u=0;u<B.length;u++)e[B[u]]=!0;var D=this.editor.graph.getModel(),G=D.getChildren(D.root);for(u=0;u<G.length;u++){var E=G[u];D.setVisible(E,e[E.id]||!1)}}catch(T){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=-e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,l,n,p,u,B,D,G,E,T,O,S,k,v,z){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var A=this.getBaseFilename(!p),H=A+("xml"==c||"pdf"==c&&T?".drawio":"")+"."+c;-if("xml"==c){var R=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,p,null,null,null,e);this.saveData(H,c,R,"text/xml")}else if("html"==c)R=this.getHtml2(this.getFileData(!0),this.editor.graph,A),this.saveData(H,c,R,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?H=A+".png":"jpeg"==c&&(H=A+".jpg"),this.saveRequest(H,c,mxUtils.bind(this,function(L,Q){try{return this.createDownloadRequest(L,c,n,Q,B,p,D,G,E,T,O,void 0,-void 0,!u,S,k,v,z)}catch(U){this.handleError(U)}}));else{var g=null,q=mxUtils.bind(this,function(L){L.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(g)}))});if("svg"==c){var F=this.editor.graph.background;if(B||F==mxConstants.NONE)F=null;var J=this.editor.graph.getSvg(F,null,null,null,null,n);l&&this.editor.graph.addSvgShadow(J);this.editor.convertImages(J,-mxUtils.bind(this,mxUtils.bind(this,function(L){this.spinner.stop();q(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(L))})))}else H=A+".svg",g=this.getFileData(!1,!0,null,mxUtils.bind(this,function(L){this.spinner.stop();q(L)}),n)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(c,e,l,n,p,u,B,D,G,E,T,O,S,k,v,z,A,H){c=this.downloadRequestBuilder(c,e,l,n,p,u,B,D,G,E,T,O,S,k,v,z,A,H);e="";for(var R in c)l=c[R],null!=l&&(e+=R+"="+encodeURIComponent(l)+-"&");return new mxXmlRequest(EXPORT_URL,e)};EditorUi.prototype.downloadRequestBuilder=function(c,e,l,n,p,u,B,D,G,E,T,O,S,k,v,z,A,H){var R=this.editor.graph,g=R.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==u?!1:"xmlpng"!=e,null,null,null,!Editor.defaultCompressed,"pdf"==e);var q=null,F=null,J=null;if(!EditorUi.isElectronApp&&(g.width*g.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};E=E?"1":"0";"pdf"==e&&(null!=T?(q=T.from,F=T.to):0==u&&(J=-"1"));"xmlpng"==e&&(E="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(u=0;u<this.pages.length;u++)if(this.pages[u]==this.currentPage){q=u;break}u=R.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!p?p||null!=u&&u!=mxConstants.NONE||(u="#ffffff"):u=mxConstants.NONE;p={globalVars:R.getExportVariables()};G&&(p.grid={size:R.gridSize,steps:R.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==e?mxGraphView.prototype.defaultGridColor:R.view.gridColor});Graph.translateDiagram&&-(p.diagramLanguage=Graph.diagramLanguage);return{format:e,from:q,to:F,allPages:J,bg:null!=u?u:mxConstants.NONE,base64:n,embedXml:E,xml:l,filename:null!=c?c:"",extras:JSON.stringify(p),scale:B,border:D,pageMargin:v,w:O&&isFinite(O)?O:null,h:S&&isFinite(S)?S:null,crop:null!=k&&k?"1":"0",fit:null!=z&&z?"1":"0",sheetsAcross:A,sheetsDown:H}};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));-if(null!=c&&1<c.length){var e=c.indexOf("#");0<=e&&(c=c.substring(0,e))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,e={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{e=JSON.parse(c)}catch(n){}}}return e};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};-EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var e=window.location.hash;if(null==e||""==e)e="#";var l=e.lastIndexOf("#");0<l&&(e=e.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||(e=e+"#"+encodeURIComponent(JSON.stringify(c)))}catch(n){}0<l&&0<e.lastIndexOf("#")?window.location.hash=e:window.location.replace(e)}};EditorUi.prototype.loadDescriptor=function(c,e,l){var n=window.location.hash,p=mxUtils.bind(this,function(B){var D=null!=c.data?c.data:"";null!=B&&0<B.length&&-(0<D.length&&(D+="\n"),D+=B);B=new LocalFile(this,"csv"!=c.format&&0<D.length?D:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);B.getHash=function(){return n};this.fileLoaded(B);"csv"==c.format&&this.importCsv(D,mxUtils.bind(this,function(S){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var G=null!=c.interval?parseInt(c.interval):6E4,E=null,T=mxUtils.bind(this,function(){var S=this.currentPage;-mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(k){S===this.currentPage&&(200<=k.getStatus()&&300>=k.getStatus()?(this.updateDiagram(k.getText()),O()):this.handleError({message:mxResources.get("error")+" "+k.getStatus()}))}),mxUtils.bind(this,function(k){this.handleError(k)}))}),O=mxUtils.bind(this,function(){window.clearTimeout(E);E=window.setTimeout(T,G)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){O();-T()}));O();T()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var u=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(u,mxUtils.bind(this,function(B){p(B)}),mxUtils.bind(this,function(B){null!=l&&l(B)}))}else p("")};EditorUi.prototype.updateDiagram=function(c){function e(g){var q=new mxCellOverlay(g.image||p.warningImage,g.tooltip,g.align,g.valign,g.offset);q.addListener(mxEvent.CLICK,function(F,J){n.alert(g.tooltip)});return q}var l=null,n=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=-null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var p=this.editor.graph,u=p.getModel();u.beginUpdate();var B=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var D=u.getCell(c.getAttribute("id"));if(null!=D){try{var G=c.getAttribute("value");if(null!=G){var E=mxUtils.parseXml(G).documentElement;if(null!=E)if("1"==E.getAttribute("replace-value"))u.setValue(D,E);else for(var T=E.attributes,O=0;O<T.length;O++)p.setAttributeForCell(D,T[O].nodeName,0<T[O].nodeValue.length?-T[O].nodeValue:null)}}catch(g){null!=window.console&&console.log("Error in value for "+D.id+": "+g)}try{var S=c.getAttribute("style");null!=S&&p.model.setStyle(D,S)}catch(g){null!=window.console&&console.log("Error in style for "+D.id+": "+g)}try{var k=c.getAttribute("icon");if(null!=k){var v=0<k.length?JSON.parse(k):null;null!=v&&v.append||p.removeCellOverlays(D);null!=v&&p.addCellOverlay(D,e(v))}}catch(g){null!=window.console&&console.log("Error in icon for "+D.id+": "+g)}try{var z=c.getAttribute("geometry");-if(null!=z){z=JSON.parse(z);var A=p.getCellGeometry(D);if(null!=A){A=A.clone();for(key in z){var H=parseFloat(z[key]);"dx"==key?A.x+=H:"dy"==key?A.y+=H:"dw"==key?A.width+=H:"dh"==key?A.height+=H:A[key]=parseFloat(z[key])}p.model.setGeometry(D,A)}}}catch(g){null!=window.console&&console.log("Error in icon for "+D.id+": "+g)}}}else if("model"==c.nodeName){for(var R=c.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(new mxCodec(c.firstChild)).decode(R,u)}else if("view"==-c.nodeName){if(c.hasAttribute("scale")&&(p.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))p.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(B=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{u.endUpdate()}null!=B&&this.chromelessResize&&this.chromelessResize(!0,B)}return l};EditorUi.prototype.getCopyFilename=function(c,e){var l=null!=-c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var n=l.lastIndexOf(".");0<=n&&(c=l.substring(n),l=l.substring(0,n));if(e){e=l;var p=new Date;l=p.getFullYear();n=p.getMonth()+1;var u=p.getDate(),B=p.getHours(),D=p.getMinutes();p=p.getSeconds();l=e+(" "+(l+"-"+n+"-"+u+"-"+B+"-"+D+"-"+p))}return l=mxResources.get("copyOf",[l])+c};EditorUi.prototype.logIfModified=function(c,e){try{null!=c&&e&&EditorUi.debug("File.closed",[c])}catch(l){}};EditorUi.prototype.fileLoaded=function(c,e,l){var n=-this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var p=!1;this.hideDialog();null!=n&&(n.removeListener(this.descriptorChangedListener),this.logIfModified(n,!0),n.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var u=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=n&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!e&&null!=+EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var f=+e.getFunction,p=this.editor.graph,n=this;e.getFunction=function(t){if(p.isSelectionEmpty()&&null!=n.pages&&0<n.pages.length){var z=n.getSelectedPageIndex();if(mxEvent.isShiftDown(t)){if(37==t.keyCode)return function(){0<z&&n.movePage(z,z-1)};if(38==t.keyCode)return function(){0<z&&n.movePage(z,0)};if(39==t.keyCode)return function(){z<n.pages.length-1&&n.movePage(z,z+1)};if(40==t.keyCode)return function(){z<n.pages.length-1&&n.movePage(z,n.pages.length-1)}}else if(mxEvent.isControlDown(t)||mxClient.IS_MAC&&+mxEvent.isMetaDown(t)){if(37==t.keyCode)return function(){0<z&&n.selectNextPage(!1)};if(38==t.keyCode)return function(){0<z&&n.selectPage(n.pages[0])};if(39==t.keyCode)return function(){z<n.pages.length-1&&n.selectNextPage(!0)};if(40==t.keyCode)return function(){z<n.pages.length-1&&n.selectPage(n.pages[n.pages.length-1])}}}return!(65<=t.keyCode&&90>=t.keyCode)||p.isSelectionEmpty()||mxEvent.isAltDown(t)||mxEvent.isShiftDown(t)||mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)?f.apply(this,+arguments):null}}return e};var g=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var e=g.apply(this,arguments);if(null==e)try{var f=c.indexOf("<mxfile ");if(0<=f){var p=c.lastIndexOf("</mxfile>");p>f&&(e=c.substring(f,p+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var n=mxUtils.parseXml(c),t=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);+e=null!=t?mxUtils.getXml(t):""}}catch(z){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,e){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",e);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var f=null!=c?this.editor.extractGraphModel(c,+!0):null;null!=f&&(c=f);if(null!=c){f=this.editor.graph;f.model.beginUpdate();try{var p=null!=this.pages?this.pages.slice():null,n=c.getElementsByTagName("diagram");if(1<n.length||1==n.length&&n[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var t=n.length-1;0<=t;t--){var z=this.updatePageRoot(new DiagramPage(n[t]));null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[t+1]));f.model.execute(new ChangePage(this,z,0==t?z:null,0))}}else null==this.fileNode&&+(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=p)for(t=0;t<p.length;t++)f.model.execute(new ChangePage(this,+p[t],null));var F=this.getCurrentFile();null!=F&&F.fileReplaced(e)}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,f,p,n,t,z,F,C,E,R,U,O){e=null!=e?e:this.editor.graph;n=null!=n?n:!1;C=null!=C?C:!0;R=null!=R?R:!Editor.defaultCompressed;var Q=null;if(null==f||f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER)var m="_blank";else Q=m=p;if(null==c)return"";var u=c;if("mxfile"!=u.nodeName.toLowerCase()){if(R){var A=c.ownerDocument.createElement("diagram");A.setAttribute("name",+mxResources.get("pageWithNumber",[1]));A.setAttribute("id",Editor.guid());A.appendChild(c)}else{A=Graph.zapGremlins(mxUtils.getXml(c));u=Graph.compress(A);if(Graph.decompress(u)!=A)return A;A=c.ownerDocument.createElement("diagram");A.setAttribute("name",mxResources.get("pageWithNumber",[1]));A.setAttribute("id",Editor.guid());mxUtils.setTextContent(A,u)}u=c.ownerDocument.createElement("mxfile");u.appendChild(A)}E?(u=u.cloneNode(!0),u.removeAttribute("modified"),u.removeAttribute("host"),u.removeAttribute("agent"),+u.removeAttribute("etag"),u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("type")):(u.removeAttribute("userAgent"),u.removeAttribute("modified"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("pages"),u.removeAttribute("type"),u.removeAttribute("etag"),mxClient.IS_CHROMEAPP?u.setAttribute("host","Chrome"):EditorUi.isElectronApp?u.setAttribute("host","Electron"):u.setAttribute("host",window.location.hostname),u.setAttribute("agent",+null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));null!=U&&(u=u.cloneNode(!0),u.setAttribute("scale",U));null!=O&&(u=u.cloneNode(!0),u.setAttribute("border",O));c=R?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!t&&!n&&(z||null!=f&&/(\.html)$/i.test(f.getTitle())))c=this.getHtml2(mxUtils.getXml(u),e,null!=f?f.getTitle():null,m,Q);else if(t||+!n&&null!=f&&/(\.svg)$/i.test(f.getTitle()))null==f||f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER||(p=null),f=this.getSvgFileProperties(u),c=this.getEmbeddedSvg(c,e,p,null,F,C,Q,null,null,f.scale,f.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,e,f,p){c=null!=c?c:!0;e=null!=e?e:!1;f=null!=f?f:!Editor.defaultCompressed;var n=this.editor.getGraphXml(c,p);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(C){var E=C.getElementsByTagName("mxGraphModel"),+R=0<E.length?E[0]:null;E=C;null==R&&f?(R=mxUtils.getNodeValue(C),0<R.length&&(R=Graph.decompress(R),null!=R&&0<R.length&&(E=C.cloneNode(!1),E.appendChild(mxUtils.parseXml(R).documentElement)))):null==R||f?E=C.cloneNode(!0):(E=C.cloneNode(!1),mxUtils.setTextContent(E,Graph.compressNode(R)));n.appendChild(E)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(n),n=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var t=this.pages[e],+z=t.node;if(t!=this.currentPage)if(t.needsUpdate){var F=new mxCodec(mxUtils.createXmlDocument());F=F.encode(new mxGraphModel(t.root));this.editor.graph.saveViewState(t.viewState,F,null,p);EditorUi.removeChildNodes(z);z.appendChild(F);delete t.needsUpdate}else p&&(this.updatePageRoot(t),null!=t.viewState.backgroundImage&&(null!=t.viewState.backgroundImage.originalSrc?t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.originalSrc,t):Graph.isPageLink(t.viewState.backgroundImage.src)&&+(t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.src,t))),null!=t.viewState.backgroundImage&&null!=t.viewState.backgroundImage.originalSrc&&(F=new mxCodec(mxUtils.createXmlDocument()),F=F.encode(new mxGraphModel(t.root)),this.editor.graph.saveViewState(t.viewState,F,null,p),z=z.cloneNode(!1),z.appendChild(F)));c(z)}return n};EditorUi.prototype.anonymizeString=function(c,e){for(var f=[],p=0;p<c.length;p++){var n=c.charAt(p);0<=EditorUi.ignoredAnonymizedChars.indexOf(n)?+f.push(n):isNaN(parseInt(n))?n.toLowerCase()!=n?f.push(String.fromCharCode(65+Math.round(25*Math.random()))):n.toUpperCase()!=n?f.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(n)?f.push(" "):f.push("?"):f.push(e?"0":Math.round(9*Math.random()))}return f.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var f=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);+null!=f.getAttribute("name")&&f.setAttribute("name",this.anonymizeString(f.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(f)}catch(t){c[EditorUi.DIFF_INSERT][e].data=t.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var p in c[EditorUi.DIFF_UPDATE]){var n=c[EditorUi.DIFF_UPDATE][p];null!=n.name&&(n.name=this.anonymizeString(n.name));null!=n.cells&&(e=mxUtils.bind(this,function(t){var z=n.cells[t];if(null!=z){for(var F in z)null!=z[F].value&&(z[F].value="["+z[F].value.length+"]"),+null!=z[F].xmlValue&&(z[F].xmlValue="["+z[F].xmlValue.length+"]"),null!=z[F].style&&(z[F].style="["+z[F].style.length+"]"),mxUtils.isEmptyObject(z[F])&&delete z[F];mxUtils.isEmptyObject(z)&&delete n.cells[t]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(n.cells)&&delete n.cells);mxUtils.isEmptyObject(n)&&delete c[EditorUi.DIFF_UPDATE][p]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,+e){if(null!=c.attributes)for(var f=0;f<c.attributes.length;f++)"as"!=c.attributes[f].name&&c.setAttribute(c.attributes[f].name,this.anonymizeString(c.attributes[f].value,e));if(null!=c.childNodes)for(f=0;f<c.childNodes.length;f++)this.anonymizeAttributes(c.childNodes[f],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");for(var f=0;f<e.length;f++)null!=e[f].getAttribute("value")&&e[f].setAttribute("value","["+e[f].getAttribute("value").length+"]"),null!=e[f].getAttribute("xmlValue")&&+e[f].setAttribute("xmlValue","["+e[f].getAttribute("xmlValue").length+"]"),null!=e[f].getAttribute("style")&&e[f].setAttribute("style","["+e[f].getAttribute("style").length+"]"),null!=e[f].parentNode&&"root"!=e[f].parentNode.nodeName&&null!=e[f].parentNode.parentNode&&(e[f].setAttribute("id",e[f].parentNode.getAttribute("id")),e[f].parentNode.parentNode.replaceChild(e[f],e[f].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?+this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(f){this.spinner.stop();e.handleFileError(f,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),+mxUtils.bind(this,function(f){e.handleFileError(f,!0)}))))};EditorUi.prototype.getFileData=function(c,e,f,p,n,t,z,F,C,E,R,U,O){n=null!=n?n:!0;t=null!=t?t:!1;E=null!=E?E:!Editor.defaultCompressed;var Q=this.editor.graph;if((e||!c&&null!=C&&/(\.svg)$/i.test(C.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var m=Q.getGlobalVariable;Q=this.createTemporaryGraph(Q.getStylesheet());Q.setBackgroundImage=this.editor.graph.setBackgroundImage;Q.background=this.editor.graph.background;var u=+null!=this.pages?this.pages[0]:null;null==u||this.currentPage==u?Q.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&Q.setBackgroundImage(u.viewState.backgroundImage);Q.getGlobalVariable=function(A){return"page"==A&&null!=u?u.getName():"pagenumber"==A?1:m.apply(this,arguments)};document.body.appendChild(Q.container);null!=u&&Q.model.setRoot(u.root)}z=null!=z?z:this.getXmlFileData(n,t,E,R);C=null!=C?C:this.getCurrentFile();c=this.createFileData(z,Q,C,window.location.href,+c,e,f,p,n,F,E,U,O);Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);return c};EditorUi.prototype.getHtml=function(c,e,f,p,n,t){t=null!=t?t:!0;var z=null,F=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){z=t?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var C=e.view.scale;t=Math.floor(z.x/C-e.view.translate.x);C=Math.floor(z.y/C-e.view.translate.y);z=e.background;null==n&&(e=this.getBasenames().join(";"),0<e.length&&(F=EditorUi.drawHost+"/embed.js?s="+e));+c.setAttribute("x0",t);c.setAttribute("y0",C)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=p&&c.setAttribute("edit",p));null!=n&&(n=n.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";p=Graph.compress(c);Graph.decompress(p)!=c&&(p=encodeURIComponent(c));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':+"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=f?"<title>"+mxUtils.htmlEntities(f)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=z&&z!=mxConstants.NONE?' style="background-color:'+z+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+p+"</div>\n</div>\n"++(null==n?'<script type="text/javascript" src="'+F+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,f,p,n){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=n&&(n=n.replace(/&/g,"&"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,+xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=f?"<title>"+mxUtils.htmlEntities(f)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''++n+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>\n'+(null==n?'<script type="text/javascript" src="'+e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=+function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,f=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(f)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[e],"cause",[f]),Error(mxResources.get("notADiagramFile")+" ("+f+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),+f={},0<c.length)){var p=this.getHashObject(),n=null;this.fileNode=e;this.pages=[];for(var t=0;t<c.length;t++){null==c[t].getAttribute("id")&&c[t].setAttribute("id",t);e=new DiagramPage(c[t]);null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[t+1]));this.pages.push(e);if(null==p.pageId&&null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]||null!=p.pageId&&e.getId()==p.pageId)n=e;if(null==f[e.getId()])f[e.getId()]=e;else throw Error(e.getId()+": Duplicate page ID");}this.currentPage=+null!=n?n:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),+this.scrollToPage());if(null!=urlParams["layer-ids"])try{var z=decodeURIComponent(urlParams["layer-ids"]).split(" ");e={};for(t=0;t<z.length;t++)e[z[t]]=!0;var F=this.editor.graph.getModel(),C=F.getChildren(F.root);for(t=0;t<C.length;t++){var E=C[t];F.setVisible(E,e[E.id]||!1)}}catch(R){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=+e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,f,p,n,t,z,F,C,E,R,U,O,Q,m,u){try{p=null!=p?p:this.editor.graph.isSelectionEmpty();var A=this.getBaseFilename(!n),B=A+("xml"==c||"pdf"==c&&R?".drawio":"")+"."+c;+if("xml"==c){var H=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,p,n,null,null,null,e);this.saveData(B,c,H,"text/xml")}else if("html"==c)H=this.getHtml2(this.getFileData(!0),this.editor.graph,A),this.saveData(B,c,H,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?B=A+".png":"jpeg"==c&&(B=A+".jpg"),this.saveRequest(B,c,mxUtils.bind(this,function(I,M){try{return this.createDownloadRequest(I,c,p,M,z,n,F,C,E,R,U,void 0,+void 0,!t,O,Q,m,u)}catch(P){this.handleError(P)}}));else{var T=null,k=mxUtils.bind(this,function(I){I.length<=MAX_REQUEST_SIZE?this.saveData(B,"svg",I,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==c){var v=this.editor.graph.background;if(z||v==mxConstants.NONE)v=null;var G=this.editor.graph.getSvg(v,null,null,null,null,p);f&&this.editor.graph.addSvgShadow(G);this.editor.convertImages(G,+mxUtils.bind(this,mxUtils.bind(this,function(I){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(I))})))}else B=A+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(I){this.spinner.stop();k(I)}),p)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(c,e,f,p,n,t,z,F,C,E,R,U,O,Q,m,u,A,B){c=this.downloadRequestBuilder(c,e,f,p,n,t,z,F,C,E,R,U,O,Q,m,u,A,B);e="";for(var H in c)f=c[H],null!=f&&(e+=H+"="+encodeURIComponent(f)++"&");return new mxXmlRequest(EXPORT_URL,e)};EditorUi.prototype.downloadRequestBuilder=function(c,e,f,p,n,t,z,F,C,E,R,U,O,Q,m,u,A,B){var H=this.editor.graph,T=H.getGraphBounds();f=this.getFileData(!0,null,null,null,f,0==t?!1:"xmlpng"!=e,null,null,null,!Editor.defaultCompressed,"pdf"==e);var k=null,v=null,G=null;if(!EditorUi.isElectronApp&&(T.width*T.height>MAX_AREA||f.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};E=E?"1":"0";"pdf"==e&&(null!=R?(k=R.from,v=R.to):0==t&&(G=+"1"));"xmlpng"==e&&(E="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){k=t;break}t=H.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!n?n||null!=t&&t!=mxConstants.NONE||(t="#ffffff"):t=mxConstants.NONE;n={globalVars:H.getExportVariables()};C&&(n.grid={size:H.gridSize,steps:H.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==e?mxGraphView.prototype.defaultGridColor:H.view.gridColor});Graph.translateDiagram&&+(n.diagramLanguage=Graph.diagramLanguage);return{format:e,from:k,to:v,allPages:G,bg:null!=t?t:mxConstants.NONE,base64:p,embedXml:E,xml:f,filename:null!=c?c:"",extras:JSON.stringify(n),scale:z,border:F,pageMargin:m,w:U&&isFinite(U)?U:null,h:O&&isFinite(O)?O:null,crop:null!=Q&&Q?"1":"0",fit:null!=u&&u?"1":"0",sheetsAcross:A,sheetsDown:B}};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));+if(null!=c&&1<c.length){var e=c.indexOf("#");0<=e&&(c=c.substring(0,e))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,e={};if(null!=c&&0<c.length){var f=c.lastIndexOf("#");if(0<f){c=decodeURIComponent(c.substring(f+1));try{e=JSON.parse(c)}catch(p){}}}return e};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};+EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var e=window.location.hash;if(null==e||""==e)e="#";var f=e.lastIndexOf("#");0<f&&(e=e.substring(0,f));try{null==c||mxUtils.isEmptyObject(c)||(e=e+"#"+encodeURIComponent(JSON.stringify(c)))}catch(p){}0<f&&0<e.lastIndexOf("#")?window.location.hash=e:window.location.replace(e)}};EditorUi.prototype.loadDescriptor=function(c,e,f){var p=window.location.hash,n=mxUtils.bind(this,function(z){var F=null!=c.data?c.data:"";null!=z&&0<z.length&&+(0<F.length&&(F+="\n"),F+=z);z=new LocalFile(this,"csv"!=c.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return p};this.fileLoaded(z);"csv"==c.format&&this.importCsv(F,mxUtils.bind(this,function(O){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var C=null!=c.interval?parseInt(c.interval):6E4,E=null,R=mxUtils.bind(this,function(){var O=this.currentPage;+mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(Q){O===this.currentPage&&(200<=Q.getStatus()&&300>=Q.getStatus()?(this.updateDiagram(Q.getText()),U()):this.handleError({message:mxResources.get("error")+" "+Q.getStatus()}))}),mxUtils.bind(this,function(Q){this.handleError(Q)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(E);E=window.setTimeout(R,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();+R()}));U();R()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var t=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(t,mxUtils.bind(this,function(z){n(z)}),mxUtils.bind(this,function(z){null!=f&&f(z)}))}else n("")};EditorUi.prototype.updateDiagram=function(c){function e(T){var k=new mxCellOverlay(T.image||n.warningImage,T.tooltip,T.align,T.valign,T.offset);k.addListener(mxEvent.CLICK,function(v,G){p.alert(T.tooltip)});return k}var f=null,p=this;if(null!=c&&0<c.length&&(f=mxUtils.parseXml(c),c=+null!=f?f.documentElement:null,null!=c&&"updates"==c.nodeName)){var n=this.editor.graph,t=n.getModel();t.beginUpdate();var z=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var F=t.getCell(c.getAttribute("id"));if(null!=F){try{var C=c.getAttribute("value");if(null!=C){var E=mxUtils.parseXml(C).documentElement;if(null!=E)if("1"==E.getAttribute("replace-value"))t.setValue(F,E);else for(var R=E.attributes,U=0;U<R.length;U++)n.setAttributeForCell(F,R[U].nodeName,0<R[U].nodeValue.length?+R[U].nodeValue:null)}}catch(T){null!=window.console&&console.log("Error in value for "+F.id+": "+T)}try{var O=c.getAttribute("style");null!=O&&n.model.setStyle(F,O)}catch(T){null!=window.console&&console.log("Error in style for "+F.id+": "+T)}try{var Q=c.getAttribute("icon");if(null!=Q){var m=0<Q.length?JSON.parse(Q):null;null!=m&&m.append||n.removeCellOverlays(F);null!=m&&n.addCellOverlay(F,e(m))}}catch(T){null!=window.console&&console.log("Error in icon for "+F.id+": "+T)}try{var u=c.getAttribute("geometry");+if(null!=u){u=JSON.parse(u);var A=n.getCellGeometry(F);if(null!=A){A=A.clone();for(key in u){var B=parseFloat(u[key]);"dx"==key?A.x+=B:"dy"==key?A.y+=B:"dw"==key?A.width+=B:"dh"==key?A.height+=B:A[key]=parseFloat(u[key])}n.model.setGeometry(F,A)}}}catch(T){null!=window.console&&console.log("Error in icon for "+F.id+": "+T)}}}else if("model"==c.nodeName){for(var H=c.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(c.firstChild)).decode(H,t)}else if("view"==+c.nodeName){if(c.hasAttribute("scale")&&(n.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))n.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(z=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{t.endUpdate()}null!=z&&this.chromelessResize&&this.chromelessResize(!0,z)}return f};EditorUi.prototype.getCopyFilename=function(c,e){var f=null!=+c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var p=f.lastIndexOf(".");0<=p&&(c=f.substring(p),f=f.substring(0,p));if(e){e=f;var n=new Date;f=n.getFullYear();p=n.getMonth()+1;var t=n.getDate(),z=n.getHours(),F=n.getMinutes();n=n.getSeconds();f=e+(" "+(f+"-"+p+"-"+t+"-"+z+"-"+F+"-"+n))}return f=mxResources.get("copyOf",[f])+c};EditorUi.prototype.logIfModified=function(c,e){try{null!=c&&e&&EditorUi.debug("File.closed",[c])}catch(f){}};EditorUi.prototype.fileLoaded=function(c,e,f){var p=+this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var n=!1;this.hideDialog();null!=p&&(p.removeListener(this.descriptorChangedListener),this.logIfModified(p,!0),p.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var t=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=p&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!e&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();e||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.editor.setStatus(""):this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>");!this.editor.isChromelessView()||-this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=l&&l();this.editor.fireEvent(new mxEventObject("fileLoaded"));p=!0;if(!this.isOffline()&&null!=c.getMode()){var B="1"==urlParams.sketch?"sketch":uiTheme;if(null==B)B="default";else if("sketch"==B||"min"==B)B+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",-[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(D){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(D){}}catch(D){this.fileLoadedError=D;if(null!=c)try{c.close()}catch(G){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,-mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=n?this.fileLoaded(n)||u():u()});e?c():(null!=D.fallbackFileData&&(D.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var G=new LocalFile(this,D.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(G)})}),this.handleError(D,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else u();return p};EditorUi.prototype.getHashValueForPages=function(c,e){var l=-0,n=new mxGraphModel,p=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var u=0;u<c.length;u++){this.updatePageRoot(c[u]);var B=c[u].node.cloneNode(!1);B.removeAttribute("name");n.root=c[u].root;var D=p.encode(n);this.editor.graph.saveViewState(c[u].viewState,D,!0);D.removeAttribute("pageWidth");D.removeAttribute("pageHeight");B.appendChild(D);null!=e&&(e.eltCount+=B.getElementsByTagName("*").length,e.nodeCount+=B.getElementsByTagName("mxCell").length);l=(l<<5)-l+-this.hashValue(B,function(G,E,T,O){return!O||"mxGeometry"!=G.nodeName&&"mxPoint"!=G.nodeName||"x"!=E&&"y"!=E&&"width"!=E&&"height"!=E?O&&"mxCell"==G.nodeName&&"previous"==E?null:T:Math.round(T)},e)<<0}return l};EditorUi.prototype.hashValue=function(c,e,l){var n=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(n^=this.hashValue(c.nodeName,e,l));if(null!=c.attributes){null!=l&&(l.attrCount+=c.attributes.length);-for(var p=0;p<c.attributes.length;p++){var u=c.attributes[p].name,B=null!=e?e(c,u,c.attributes[p].value,!0):c.attributes[p].value;null!=B&&(n^=this.hashValue(u,e,l)+this.hashValue(B,e,l))}}if(null!=c.childNodes)for(p=0;p<c.childNodes.length;p++)n=(n<<5)-n+this.hashValue(c.childNodes[p],e,l)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=l&&(l.byteCount+=c.length);for(p=0;p<c.length;p++)e=(e<<5)-e+c.charCodeAt(p)<<0;n^=e}return n};EditorUi.prototype.descriptorChanged=function(){};-EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,l,n,p,u,B){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};-EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var e=0;e<c.length;e++)null!=c[e].xml&&"<"!=c[e].xml.charAt(0)&&(c[e].xml=mxUtils.trim(Graph.decompress(c[e].xml)));e=mxUtils.createXmlDocument();var l=e.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(c,null,2));e.appendChild(l);return mxUtils.getXml(e,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),-".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var l=0;l<e.length;l++)e[l].parentNode.removeChild(e[l]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,e){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!e){null==c&&(e=this.sidebar.palettes["L.scratchpad"],null==e&&(e=this.sidebar.palettes.search),null!=e&&(c=e[e.length-1].nextSibling));-c=null!=c?c:l.firstChild.nextSibling.nextSibling;e=l.lastChild;var n=e.previousSibling;l.insertBefore(e,c);l.insertBefore(n,e)}};EditorUi.prototype.loadLibrary=function(c,e){var l=mxUtils.parseXml(c.getData());if("mxlibrary"==l.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(c,n,l.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=-function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,e,l,n){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var p=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var u=0;u<this.openLibraries.length;u++)if(this.openLibraries[u].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[u],-this.openLibraries);break}p={file:c,images:e,title:l,expand:n};this.openLibraries.push(p)}else this.scratchpad=c;u=this.sidebar.palettes[c.getHash()];u=null!=u?u[u.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var B=null,D=mxUtils.bind(this,function(H,R){0==H.length&&c.isEditable()?(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),R.appendChild(B)):this.addLibraryEntries(H,R)});null!=this.sidebar&&null!=-e&&this.sidebar.addEntries(e);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var G=this.sidebar.addPalette(c.getHash(),l,null!=n?n:!0,mxUtils.bind(this,function(H){D(e,H)}));null!=p&&(p.div=G);this.repositionLibrary(u,"L.scratchpad"!=c.getHash());n=G.parentNode.previousSibling;l=n.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&n.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var E=document.createElement("div");E.style.backgroundColor=-"inherit";n.style.position="relative";var T=document.createElement("img");T.className="geAdaptiveAsset";T.setAttribute("src",Editor.crossImage);T.setAttribute("title",mxResources.get("close"));T.setAttribute("valign","absmiddle");T.setAttribute("border","0");T.style.position="relative";T.style.top="2px";T.style.width="14px";T.style.cursor="pointer";T.style.margin="0 3px";var O=null;if(".scratchpad"!=c.title||this.closableScratchpad)E.appendChild(T),mxEvent.addListener(T,"click",mxUtils.bind(this,-function(H){if(!mxEvent.isConsumed(H)){var R=mxUtils.bind(this,function(){null!=p&&mxUtils.remove(p,this.openLibraries);this.closeLibrary(c)});null!=O?this.confirm(mxResources.get("allChangesLost"),null,R,mxResources.get("cancel"),mxResources.get("discardChanges")):R();mxEvent.consume(H)}}));if(c.isEditable()){var S=this.editor.graph,k=null;l=mxUtils.bind(this,function(H){this.showLibraryDialog(c.getTitle(),G,e,c,c.getMode());mxEvent.consume(H)});var v=mxUtils.bind(this,function(H){c.setModified(!0);-c.isAutosave()?(null!=k&&null!=k.parentNode&&k.parentNode.removeChild(k),k=T.cloneNode(!1),k.setAttribute("src",Editor.spinImage),k.setAttribute("title",mxResources.get("saving")),k.style.cursor="default",k.style.marginRight="2px",k.style.marginTop="-2px",E.insertBefore(k,E.firstChild),this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=k&&null!=k.parentNode&&k.parentNode.removeChild(k)})):null==O&&(O=T.cloneNode(!1),O.setAttribute("src",Editor.saveImage),O.setAttribute("title",mxResources.get("save")),-E.insertBefore(O,E.firstChild),mxEvent.addListener(O,"click",mxUtils.bind(this,function(R){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==O||c.isModified()||(O.parentNode.removeChild(O),O=null)});mxEvent.consume(R)})))}),z=mxUtils.bind(this,function(H,R,g,q){H=S.cloneCells(mxUtils.sortCells(S.model.getTopmostCells(H)));for(var F=0;F<H.length;F++){var J=S.getCellGeometry(H[F]);null!=J&&J.translate(-R.x,-R.y)}G.appendChild(this.sidebar.createVertexTemplateFromCells(H,-R.width,R.height,q||"",!0,null,!1));H=mxUtils.getXml(this.editor.graph.encodeCells(H));Editor.defaultCompressed&&(H=Graph.compress(H));R={xml:H,w:R.width,h:R.height};null!=q&&(R.title=q);e.push(R);v(g);null!=B&&null!=B.parentNode&&0<e.length&&(B.parentNode.removeChild(B),B=null)}),A=mxUtils.bind(this,function(H){if(S.isSelectionEmpty())S.getRubberband().isActive()?(S.getRubberband().execute(H),S.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),-mxResources.get("ok"));else{var R=S.getSelectionCells(),g=S.view.getBounds(R);if(null!=g&&0<g.width&&0<g.height){var q=S.view.scale;g.x/=q;g.y/=q;g.width/=q;g.height/=q;g.x-=S.view.translate.x;g.y-=S.view.translate.y;z(R,g)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(H)});mxEvent.addGestureListeners(G,function(){},mxUtils.bind(this,function(H){S.isMouseDown&&null!=S.panningManager&&null!=S.graphHandler.first&&(S.graphHandler.suspend(),-null!=S.graphHandler.hint&&(S.graphHandler.hint.style.visibility="hidden"),G.style.backgroundColor="light-dark(#fefefe, #000000)",G.style.cursor="copy",S.panningManager.stop(),S.autoScroll=!1,mxEvent.consume(H))}),mxUtils.bind(this,function(H){S.isMouseDown&&null!=S.panningManager&&null!=S.graphHandler&&(G.style.backgroundColor="",G.style.cursor="default",this.sidebar.showTooltips=!0,S.panningManager.stop(),S.graphHandler.reset(),S.isMouseDown=!1,S.autoScroll=!0,A(H),mxEvent.consume(H))}));mxEvent.addListener(G,-"mouseleave",mxUtils.bind(this,function(H){S.isMouseDown&&null!=S.graphHandler.first&&(S.graphHandler.resume(),null!=S.graphHandler.hint&&(S.graphHandler.hint.style.visibility="visible"),G.style.backgroundColor="",G.style.cursor="",S.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(H){G.style.backgroundColor="light-dark(#fefefe, #000000)";H.dataTransfer.dropEffect="copy";G.style.cursor="copy";this.sidebar.hideTooltip();H.stopPropagation();H.preventDefault()})),-mxEvent.addListener(G,"drop",mxUtils.bind(this,function(H){G.style.cursor="";G.style.backgroundColor="";0<H.dataTransfer.files.length&&this.importFiles(H.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(R,g,q,F,J,L,Q,U,V){if(null!=R&&"image/"==g.substring(0,6))R="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(R),R=[new mxCell("",new mxGeometry(0,0,J,L),R)],R[0].vertex=!0,z(R,new mxRectangle(0,0,J,L),H,mxEvent.isAltDown(H)?-null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<e.length&&(B.parentNode.removeChild(B),B=null);else{var W=!1,X=mxUtils.bind(this,function(Z,Y){null!=Z&&"application/pdf"==Y&&(Y=Editor.extractGraphModelFromPdf(Z),null!=Y&&0<Y.length&&(Z=Y));if(null!=Z)if(Z=mxUtils.parseXml(Z),"mxlibrary"==Z.documentElement.nodeName)try{var ba=JSON.parse(mxUtils.getTextContent(Z.documentElement));D(ba,G);e=e.concat(ba);v(H);this.spinner.stop();W=!0}catch(ma){}else if("mxfile"==-Z.documentElement.nodeName)try{var ea=Z.documentElement.getElementsByTagName("diagram");for(ba=0;ba<ea.length;ba++){var ca=this.stringToCells(Editor.getDiagramNodeXml(ea[ba])),da=this.editor.graph.getBoundingBoxFromGeometry(ca);null!=da&&z(ca,new mxRectangle(0,0,da.width,da.height),H)}W=!0}catch(ma){null!=window.console&&console.log("error in drop handler:",ma)}W||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<e.length&&(B.parentNode.removeChild(B),-B=null)});null!=V&&null!=Q&&EditorUi.isVisioFilename(Q)?this.importVisio(V,function(Z){X(Z,"text/xml")},null,Q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(R,Q)&&null!=V?this.isExternalDataComms()?this.parseFile(V,mxUtils.bind(this,function(Z){4==Z.readyState&&(this.spinner.stop(),200<=Z.status&&299>=Z.status?X(Z.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Z.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),-this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):X(R,g)}}));H.stopPropagation();H.preventDefault()})),mxEvent.addListener(G,"dragleave",function(H){G.style.cursor="";G.style.backgroundColor="";H.stopPropagation();H.preventDefault()}));T=T.cloneNode(!1);T.setAttribute("src",Editor.editImage);T.setAttribute("title",mxResources.get("edit"));E.insertBefore(T,E.firstChild);mxEvent.addListener(T,"click",l);l=T.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",-mxResources.get("add"));E.insertBefore(l,E.firstChild);mxEvent.addListener(l,"click",A);".scratchpad"==c.title&&(this.addSelectionToScratchpad=A);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink),u=l.getElementsByTagName("img")[0],l.style.marginRight="1px",u.style.marginTop="-2px",u.style.opacity="",E.insertBefore(l,E.firstChild))}n.appendChild(E);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=-function(c,e){for(var l=0;l<c.length;l++)try{var n=c[l],p=n.data;if(null!=p){p="data:"==p.substring(0,5)?this.convertDataUri(p):p;var u="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(u+="aspect=fixed;");u=u+"image="+p+";";null!=n.style&&(u+=n.style);e.appendChild(this.sidebar.createVertexTemplate(u,n.w,n.h,"",n.title||"",!1,null,!0))}else if(null!=n.xml){var B=this.stringToCells("<"==n.xml.charAt(0)?n.xml:Graph.decompress(n.xml)),D=0==B.length?mxResources.get("drawingEmpty"):-null!=n.title?n.title:"";e.appendChild(this.sidebar.createVertexTemplateFromCells(B,n.w,n.h,D,!0,null,!0))}}catch(G){D=null!=G.message?mxResources.get("error")+": "+G.message:String(G),u=this.sidebar.createVertexTemplateFromCells(null,n.w,n.h,D,!0,null,!0),e.appendChild(u)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=+this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=f&&f();this.editor.fireEvent(new mxEventObject("fileLoaded"));n=!0;if(!this.isOffline()&&null!=c.getMode()){var z="1"==urlParams.sketch?"sketch":uiTheme;if(null==z)z="default";else if("sketch"==z||"min"==z)z+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",+[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(F){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(F){}}catch(F){this.fileLoadedError=F;if(null!=c)try{c.close()}catch(C){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,+mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=p?this.fileLoaded(p)||t():t()});e?c():(null!=F.fallbackFileData&&(F.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var C=new LocalFile(this,F.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(C)})}),this.handleError(F,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else t();return n};EditorUi.prototype.getHashValueForPages=function(c,e){var f=+0,p=new mxGraphModel,n=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var t=0;t<c.length;t++){this.updatePageRoot(c[t]);var z=c[t].node.cloneNode(!1);z.removeAttribute("name");p.root=c[t].root;var F=n.encode(p);this.editor.graph.saveViewState(c[t].viewState,F,!0);F.removeAttribute("pageWidth");F.removeAttribute("pageHeight");z.appendChild(F);null!=e&&(e.eltCount+=z.getElementsByTagName("*").length,e.nodeCount+=z.getElementsByTagName("mxCell").length);f=(f<<5)-f++this.hashValue(z,function(C,E,R,U){return!U||"mxGeometry"!=C.nodeName&&"mxPoint"!=C.nodeName||"x"!=E&&"y"!=E&&"width"!=E&&"height"!=E?U&&"mxCell"==C.nodeName&&"previous"==E?null:R:Math.round(R)},e)<<0}return f};EditorUi.prototype.hashValue=function(c,e,f){var p=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(p^=this.hashValue(c.nodeName,e,f));if(null!=c.attributes){null!=f&&(f.attrCount+=c.attributes.length);+for(var n=0;n<c.attributes.length;n++){var t=c.attributes[n].name,z=null!=e?e(c,t,c.attributes[n].value,!0):c.attributes[n].value;null!=z&&(p^=this.hashValue(t,e,f)+this.hashValue(z,e,f))}}if(null!=c.childNodes)for(n=0;n<c.childNodes.length;n++)p=(p<<5)-p+this.hashValue(c.childNodes[n],e,f)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=f&&(f.byteCount+=c.length);for(n=0;n<c.length;n++)e=(e<<5)-e+c.charCodeAt(n)<<0;p^=e}return p};EditorUi.prototype.descriptorChanged=function(){};+EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,f,p,n,t,z){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};+EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var e=0;e<c.length;e++)null!=c[e].xml&&"<"!=c[e].xml.charAt(0)&&(c[e].xml=mxUtils.trim(Graph.decompress(c[e].xml)));e=mxUtils.createXmlDocument();var f=e.createElement("mxlibrary");mxUtils.setTextContent(f,JSON.stringify(c,null,2));e.appendChild(f);return mxUtils.getXml(e,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),+".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var f=0;f<e.length;f++)e[f].parentNode.removeChild(e[f]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,e){var f=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!e){null==c&&(e=this.sidebar.palettes["L.scratchpad"],null==e&&(e=this.sidebar.palettes.search),null!=e&&(c=e[e.length-1].nextSibling));+c=null!=c?c:f.firstChild.nextSibling.nextSibling;e=f.lastChild;var p=e.previousSibling;f.insertBefore(e,c);f.insertBefore(p,e)}};EditorUi.prototype.loadLibrary=function(c,e){var f=mxUtils.parseXml(c.getData());if("mxlibrary"==f.documentElement.nodeName){var p=JSON.parse(mxUtils.getTextContent(f.documentElement));this.libraryLoaded(c,p,f.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=+function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,e,f,p){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var n=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var t=0;t<this.openLibraries.length;t++)if(this.openLibraries[t].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[t],+this.openLibraries);break}n={file:c,images:e,title:f,expand:p};this.openLibraries.push(n)}else this.scratchpad=c;t=this.sidebar.palettes[c.getHash()];t=null!=t?t[t.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var z=null,F=mxUtils.bind(this,function(B,H){0==B.length&&c.isEditable()?(null==z&&(z=document.createElement("div"),z.className="geDropTarget",mxUtils.write(z,mxResources.get("dragElementsHere"))),H.appendChild(z)):this.addLibraryEntries(B,H)});null!=this.sidebar&&null!=+e&&this.sidebar.addEntries(e);null==f&&(f=c.getTitle(),null!=f&&/(\.xml)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf("."))));var C=this.sidebar.addPalette(c.getHash(),f,null!=p?p:!0,mxUtils.bind(this,function(B){F(e,B)}));null!=n&&(n.div=C);this.repositionLibrary(t,"L.scratchpad"!=c.getHash());p=C.parentNode.previousSibling;f=p.getAttribute("title");null!=f&&0<f.length&&".scratchpad"!=c.title&&p.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+f);var E=document.createElement("div");E.style.backgroundColor=+"inherit";p.style.position="relative";var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.crossImage);R.setAttribute("title",mxResources.get("close"));R.setAttribute("valign","absmiddle");R.setAttribute("border","0");R.style.position="relative";R.style.top="2px";R.style.width="14px";R.style.cursor="pointer";R.style.margin="0 3px";var U=null;if(".scratchpad"!=c.title||this.closableScratchpad)E.appendChild(R),mxEvent.addListener(R,"click",mxUtils.bind(this,+function(B){if(!mxEvent.isConsumed(B)){var H=mxUtils.bind(this,function(){null!=n&&mxUtils.remove(n,this.openLibraries);this.closeLibrary(c)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(B)}}));if(c.isEditable()){var O=this.editor.graph,Q=null;f=mxUtils.bind(this,function(B){this.showLibraryDialog(c.getTitle(),C,e,c,c.getMode());mxEvent.consume(B)});var m=mxUtils.bind(this,function(B){c.setModified(!0);+c.isAutosave()?(null!=Q&&null!=Q.parentNode&&Q.parentNode.removeChild(Q),Q=R.cloneNode(!1),Q.setAttribute("src",Editor.spinImage),Q.setAttribute("title",mxResources.get("saving")),Q.style.cursor="default",Q.style.marginRight="2px",Q.style.marginTop="-2px",E.insertBefore(Q,E.firstChild),this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=Q&&null!=Q.parentNode&&Q.parentNode.removeChild(Q)})):null==U&&(U=R.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),+E.insertBefore(U,E.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==U||c.isModified()||(U.parentNode.removeChild(U),U=null)});mxEvent.consume(H)})))}),u=mxUtils.bind(this,function(B,H,T,k){B=O.cloneCells(mxUtils.sortCells(O.model.getTopmostCells(B)));for(var v=0;v<B.length;v++){var G=O.getCellGeometry(B[v]);null!=G&&G.translate(-H.x,-H.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(B,+H.width,H.height,k||"",!0,null,!1));B=mxUtils.getXml(this.editor.graph.encodeCells(B));Editor.defaultCompressed&&(B=Graph.compress(B));H={xml:B,w:H.width,h:H.height};null!=k&&(H.title=k);e.push(H);m(T);null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null)}),A=mxUtils.bind(this,function(B){if(O.isSelectionEmpty())O.getRubberband().isActive()?(O.getRubberband().execute(B),O.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),+mxResources.get("ok"));else{var H=O.getSelectionCells(),T=O.view.getBounds(H);if(null!=T&&0<T.width&&0<T.height){var k=O.view.scale;T.x/=k;T.y/=k;T.width/=k;T.height/=k;T.x-=O.view.translate.x;T.y-=O.view.translate.y;u(H,T)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(B)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(B){O.isMouseDown&&null!=O.panningManager&&null!=O.graphHandler.first&&(O.graphHandler.suspend(),+null!=O.graphHandler.hint&&(O.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="light-dark(#fefefe, #000000)",C.style.cursor="copy",O.panningManager.stop(),O.autoScroll=!1,mxEvent.consume(B))}),mxUtils.bind(this,function(B){O.isMouseDown&&null!=O.panningManager&&null!=O.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,O.panningManager.stop(),O.graphHandler.reset(),O.isMouseDown=!1,O.autoScroll=!0,A(B),mxEvent.consume(B))}));mxEvent.addListener(C,+"mouseleave",mxUtils.bind(this,function(B){O.isMouseDown&&null!=O.graphHandler.first&&(O.graphHandler.resume(),null!=O.graphHandler.hint&&(O.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",O.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(B){C.style.backgroundColor="light-dark(#fefefe, #000000)";B.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();B.stopPropagation();B.preventDefault()})),+mxEvent.addListener(C,"drop",mxUtils.bind(this,function(B){C.style.cursor="";C.style.backgroundColor="";0<B.dataTransfer.files.length&&this.importFiles(B.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,T,k,v,G,I,M,P,S){if(null!=H&&"image/"==T.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,G,I),H)],H[0].vertex=!0,u(H,new mxRectangle(0,0,G,I),B,mxEvent.isAltDown(B)?+null:M.substring(0,M.lastIndexOf(".")).replace(/_/g," ")),null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null);else{var V=!1,W=mxUtils.bind(this,function(X,Z){null!=X&&"application/pdf"==Z&&(Z=Editor.extractGraphModelFromPdf(X),null!=Z&&0<Z.length&&(X=Z));if(null!=X)if(X=mxUtils.parseXml(X),"mxlibrary"==X.documentElement.nodeName)try{var Y=JSON.parse(mxUtils.getTextContent(X.documentElement));F(Y,C);e=e.concat(Y);m(B);this.spinner.stop();V=!0}catch(fa){}else if("mxfile"==+X.documentElement.nodeName)try{var ba=X.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=this.stringToCells(Editor.getDiagramNodeXml(ba[Y])),ca=this.editor.graph.getBoundingBoxFromGeometry(ea);null!=ca&&u(ea,new mxRectangle(0,0,ca.width,ca.height),B)}V=!0}catch(fa){null!=window.console&&console.log("error in drop handler:",fa)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),+z=null)});null!=S&&null!=M&&EditorUi.isVisioFilename(M)?this.importVisio(S,function(X){W(X,"text/xml")},null,M):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,M)&&null!=S?this.isExternalDataComms()?this.parseFile(S,mxUtils.bind(this,function(X){4==X.readyState&&(this.spinner.stop(),200<=X.status&&299>=X.status?W(X.responseText,"text/xml"):this.handleError({message:mxResources.get(413==X.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),+this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):W(H,T)}}));B.stopPropagation();B.preventDefault()})),mxEvent.addListener(C,"dragleave",function(B){C.style.cursor="";C.style.backgroundColor="";B.stopPropagation();B.preventDefault()}));R=R.cloneNode(!1);R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("edit"));E.insertBefore(R,E.firstChild);mxEvent.addListener(R,"click",f);f=R.cloneNode(!1);f.setAttribute("src",Editor.plusImage);f.setAttribute("title",+mxResources.get("add"));E.insertBefore(f,E.firstChild);mxEvent.addListener(f,"click",A);".scratchpad"==c.title&&(this.addSelectionToScratchpad=A);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(f=this.createHelpIcon(EditorUi.scratchpadHelpLink),t=f.getElementsByTagName("img")[0],f.style.marginRight="1px",t.style.marginTop="-2px",t.style.opacity="",E.insertBefore(f,E.firstChild))}p.appendChild(E);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=+function(c,e){for(var f=0;f<c.length;f++)try{var p=c[f],n=p.data;if(null!=n){n="data:"==n.substring(0,5)?this.convertDataUri(n):n;var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==p.aspect&&(t+="aspect=fixed;");t=t+"image="+n+";";null!=p.style&&(t+=p.style);e.appendChild(this.sidebar.createVertexTemplate(t,p.w,p.h,"",p.title||"",!1,null,!0))}else if(null!=p.xml){var z=this.stringToCells("<"==p.xml.charAt(0)?p.xml:Graph.decompress(p.xml)),F=0==z.length?mxResources.get("drawingEmpty"):+null!=p.title?p.title:"";e.appendChild(this.sidebar.createVertexTemplateFromCells(z,p.w,p.h,F,!0,null,!0))}}catch(C){F=null!=C.message?mxResources.get("error")+": "+C.message:String(C),t=this.sidebar.createVertexTemplateFromCells(null,p.w,p.h,F,!0,null,!0),e.appendChild(t)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38);"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=-".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,l,n,p,u,B){c=new ImageDialog(this,c,e,l,n,p,u,B);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,e,l,n,p,u){var B=localStorage.getItem(e);c=new TextareaDialog(this,c,null!=B?JSON.stringify(JSON.parse(B),null,2):"",mxUtils.bind(this,function(D){if(null!=D)try{if(null!=u&&-u(D),D==B)this.hideDialog();else{if(0<D.length){var G=JSON.parse(D);localStorage.setItem(e,JSON.stringify(G))}else localStorage.removeItem(e);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(E){this.handleError(E)}}),null,mxResources.get("close"),null,null,null,!0,null,null,p,l,n);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e,l,n){c=null!=c?c:mxUtils.bind(this,function(p,u,B,D){u||(p=new ChangePageSetup(this,-n?B:null,p),p.ignoreColor=!n,null!=D&&n&&(p.shadowVisible=D),this.editor.graph.model.execute(p))});c=new BackgroundImageDialog(this,c,e,l,n);this.showDialog(c.container,400,n?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,l,n,p){c=new LibraryDialog(this,c,e,l,n,p);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(u){u&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var m=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=-function(c){var e=m.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.handleError=function(c,e,l,n,p,u,B){var D=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},G=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{B||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,-c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!B||null==window.console||console.error("EditorUi.handleError:",c)}catch(S){}if(null!=G||null!=e){B=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var E=mxResources.get("ok"),T=null;e=null!=e?e:mxResources.get("error");if(null!=G){null!=G.retry&&(E=mxResources.get("cancel"),T=function(){D();G.retry()});if(404==G.code||404==G.status||403==G.code){B=403==G.code?null!=G.message?mxUtils.htmlEntities(G.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),-!1):null!=p?p:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var O=null!=p?null:null!=u?u:window.location.hash;if(null!=O&&("#G"==O.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==O.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||-404==G.code||404==G.status)){O="#U"==O.substring(0,2)?O.substring(45,O.lastIndexOf("%26ex")):O.substring(2);this.showError(e,B,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+O);null!=n&&n()}),T,mxResources.get("changeUser"),mxUtils.bind(this,function(){function S(){A.innerText="";for(var H=0;H<k.length;H++){var R=document.createElement("option");mxUtils.write(R,k[H].displayName);R.value=H;A.appendChild(R);R=document.createElement("option");-R.innerHTML=" ";mxUtils.write(R,"<"+k[H].email+">");R.setAttribute("disabled","disabled");A.appendChild(R)}R=document.createElement("option");mxUtils.write(R,mxResources.get("addAccount"));R.value=k.length;A.appendChild(R)}var k=this.drive.getUsersList(),v=document.createElement("div"),z=document.createElement("div");z.style.marginBottom="6px";mxUtils.write(z,mxResources.get("changeUser")+": ");v.appendChild(z);var A=document.createElement("select");A.style.width="100%";S();mxEvent.addListener(A,-"change",mxUtils.bind(this,function(){var H=A.value,R=k.length!=H;R&&this.drive.setUser(k[H]);this.drive.authorize(R,mxUtils.bind(this,function(){R||(k=this.drive.getUsersList(),S())}),mxUtils.bind(this,function(g){this.handleError(g)}),!0)}));v.appendChild(A);v=new CustomDialog(this,v,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(v.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),-520,150);return}}null!=G.message?B=""==G.message&&null!=G.name?mxUtils.htmlEntities(G.name,!1):mxUtils.htmlEntities(G.message,!1):null!=G.response&&null!=G.response.error?B=mxUtils.htmlEntities(G.response.error,!1):"undefined"!==typeof window.App&&(G.code==App.ERROR_TIMEOUT?B=mxUtils.htmlEntities(mxResources.get("timeout"),!1):G.code==App.ERROR_BUSY?B=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof G&&0<G.length&&(B=mxUtils.htmlEntities(G,!1)))}p=c=null;null!=G&&null!=G.helpLink?-(c=mxResources.get("help"),p=mxUtils.bind(this,function(){return this.editor.graph.openLink(G.helpLink)})):null!=G&&null!=G.ownerEmail?(c=mxResources.get("contactOwner"),B+=mxUtils.htmlEntities(" ("+c+": "+G.ownerEmail+")",!1),p=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(G.ownerEmail))})):null!=G&&null!=G.alternateAction&&(c=G.alternateAction.label,p=G.alternateAction.funct);this.showError(e,B,E,l,T,null,null,c,p,null,null,null,n?l:null)}else null!=l&&l()};EditorUi.prototype.alert=-function(c,e,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,l,n,p,u){c=null!=c?c:"";var B=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){B();null!=e&&e()},function(){B();null!=l&&l()},n,p,null,null,null,null,D);this.showDialog(c.container,340,46+D,!0,u);c.init()};EditorUi.prototype.showBanner=-function(c,e,l,n,p,u,B,D,G){var E=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){u=null!=u?u:"bottom:10px;left:50%;";B=null!=B?B:"translate(-50%,120%)";D=null!=D?D:"translate(-50%,0%)";var T=p?500:1E3;E=p?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var O=document.createElement("div");O.style.cssText="position:absolute;"+-u+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+E;mxUtils.setPrefixedStyle(O.style,"transform",B);mxUtils.setPrefixedStyle(O.style,"transition","all "+T+"ms ease");O.className="geBtn gePrimaryBtn"+(p?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(O.style,"box-shadow","1px 1px 2px 0px #ddd");null!=G&&mxUtils.setPrefixedStyle(O.style,"transform-origin",G);if(!p){var S=document.createElement("img");S.setAttribute("src",IMAGE_PATH+"/logo.png");-S.setAttribute("border","0");S.setAttribute("align","absmiddle");S.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";O.appendChild(S);S=document.createElement("img");S.setAttribute("src",Dialog.prototype.closeImage);S.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));S.setAttribute("border","0");S.style.cssText=(p?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";O.appendChild(S)}mxUtils.write(O,-e);document.body.appendChild(O);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("id","geDoNotShowAgainCheckbox");k.style.marginRight="6px";if(!n){e.appendChild(k);var v=document.createElement("label");v.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(v,-mxResources.get("doNotShowAgain"));e.appendChild(v);O.style.paddingBottom=p?"16px":"30px";O.appendChild(e)}var z=mxUtils.bind(this,function(){null!=O.parentNode&&(O.parentNode.removeChild(O),this.bannerShowing=!1,k.checked||n)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=S&&mxEvent.addListener(S,"click",mxUtils.bind(this,function(H){mxEvent.consume(H);z()}));var A=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(O.style,-"transform",B);window.setTimeout(mxUtils.bind(this,function(){z()}),T)});mxEvent.addListener(O,"click",mxUtils.bind(this,function(H){var R=mxEvent.getSource(H);R!=k&&R!=v?(null!=l&&l(),z(),mxEvent.consume(H)):A()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(O.style,"transform",D)}),T/2);window.setTimeout(A,p?4E3:3E4);E=!0}return E};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};-EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,l,n){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(e))),0<n&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,l,n,p){var u="jpeg"==l?"jpg":l;n=this.getBaseFilename(n)+(null!=e?".drawio":-"")+"."+u;c=this.createImageDataUri(c,e,l,p);this.saveData(n,u,c.substring(c.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));-this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,l,n,p,u){"text/xml"!=l||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=u?u:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=n?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==-l?mxUtils.popup(c,!0):(l.document.write(c),l.document.close(),l.document.execCommand("SaveAs",!0,e),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,l,n);else{var B=document.createElement("a");u=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof B.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var D=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);-u=65==(D?parseInt(D[2],10):!1)?!1:u}if(u||this.isOffline()){B.href=URL.createObjectURL(n?this.base64ToBlob(c,l):new Blob([c],{type:l}));u?B.download=e:B.setAttribute("target","_blank");document.body.appendChild(B);try{window.setTimeout(function(){URL.revokeObjectURL(B.href)},2E4),B.click(),B.parentNode.removeChild(B)}catch(G){}}else this.createEchoRequest(c,e,l,n,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,l,n,p,u){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,-c+(null!=l?"&mime="+l:"")+(null!=p?"&format="+p:"")+(null!=u?"&base64="+u:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(n?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,e,l,n,p,u,B,D){u=null!=u?u:!1;B=null!=B?B:"vsdx"!=p&&(!mxClient.IS_IOS||!navigator.standalone);var G=mxUtils.bind(this,function(T,O,S,k){try{if("_blank"==O)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,n);else if(null!=l&&"text/html"==l.substring(0,9)){var v=new EmbedDialog(this,c);this.showDialog(v.container,-450,240,!0,!0);v.init()}else{var z=window.open("about:blank");null==z?mxUtils.popup(c,!0):(z.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),z.document.close())}else if(O==App.MODE_DEVICE||"download"==O)this.doSaveLocalFile(c,T,l,n,null,D);else if(null!=T&&0<T.length){var A=mxUtils.bind(this,function(H){try{this.exportFile(c,T,l,n,O,H)}catch(R){this.handleError(R)}});null!=k?A(k):this.pickFolder(O,A)}}catch(H){this.handleError(H)}});p=[];u||p.push(App.MODE_BROWSER);B||p.push("_blank");-var E=new SaveDialog(this,e,mxUtils.bind(this,function(T,O,S){G(T.value,O,T,S);this.hideDialog(null,null,E.container)}),p,c,l,n);this.showDialog(E.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));E.init()};EditorUi.prototype.openInNewWindow=function(c,e,l){var n=window.open("about:blank");if(null==n||null==n.document)mxUtils.popup(c,!0);else{var p="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==e){var u=mxUtils.parseXml(c).documentElement.style.backgroundColor;-""!=u&&(p="background: "+u+";")}p='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+p+'">';"image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||l?(u=l?c:btoa(unescape(encodeURIComponent(c))),n.document.write(p+'<img style="max-width:100%;" src="data:'+e+";base64,"+u+'"/></body></html>')):n.document.write(p+c+"</body></html>"):n.document.write(p+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");n.document.close()}};var d=EditorUi.prototype.addChromelessToolbarItems;-EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var e=c(mxUtils.bind(this,function(n){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),+".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,f,p,n,t,z){c=new ImageDialog(this,c,e,f,p,n,t,z);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,e,f,p,n,t){var z=localStorage.getItem(e);c=new TextareaDialog(this,c,null!=z?JSON.stringify(JSON.parse(z),null,2):"",mxUtils.bind(this,function(F){if(null!=F)try{if(null!=t&&+t(F),F==z)this.hideDialog();else{if(0<F.length){var C=JSON.parse(F);localStorage.setItem(e,JSON.stringify(C))}else localStorage.removeItem(e);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(E){this.handleError(E)}}),null,mxResources.get("close"),null,null,null,!0,null,null,n,f,p);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e,f,p){c=null!=c?c:mxUtils.bind(this,function(n,t,z,F){t||(n=new ChangePageSetup(this,+p?z:null,n),n.ignoreColor=!p,null!=F&&p&&(n.shadowVisible=F),this.editor.graph.model.execute(n))});c=new BackgroundImageDialog(this,c,e,f,p);this.showDialog(c.container,400,p?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,f,p,n){c=new LibraryDialog(this,c,e,f,p,n);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(t){t&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=+function(c){var e=l.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(f){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.handleError=function(c,e,f,p,n,t,z){var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{z||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,+c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!z||null==window.console||console.error("EditorUi.handleError:",c)}catch(O){}if(null!=C||null!=e){z=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var E=mxResources.get("ok"),R=null;e=null!=e?e:mxResources.get("error");if(null!=C){null!=C.retry&&(E=mxResources.get("cancel"),R=function(){F();C.retry()});if(404==C.code||404==C.status||403==C.code){z=403==C.code?null!=C.message?mxUtils.htmlEntities(C.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),+!1):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var U=null!=n?null:null!=t?t:window.location.hash;if(null!=U&&("#G"==U.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==U.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||+404==C.code||404==C.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(e,z,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);null!=p&&p()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function O(){A.innerText="";for(var B=0;B<Q.length;B++){var H=document.createElement("option");mxUtils.write(H,Q[B].displayName);H.value=B;A.appendChild(H);H=document.createElement("option");+H.innerHTML=" ";mxUtils.write(H,"<"+Q[B].email+">");H.setAttribute("disabled","disabled");A.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=Q.length;A.appendChild(H)}var Q=this.drive.getUsersList(),m=document.createElement("div"),u=document.createElement("div");u.style.marginBottom="6px";mxUtils.write(u,mxResources.get("changeUser")+": ");m.appendChild(u);var A=document.createElement("select");A.style.width="100%";O();mxEvent.addListener(A,+"change",mxUtils.bind(this,function(){var B=A.value,H=Q.length!=B;H&&this.drive.setUser(Q[B]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(Q=this.drive.getUsersList(),O())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));m.appendChild(A);m=new CustomDialog(this,m,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(m.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=f&&f()}),+520,150);return}}null!=C.message?z=""==C.message&&null!=C.name?mxUtils.htmlEntities(C.name,!1):mxUtils.htmlEntities(C.message,!1):null!=C.response&&null!=C.response.error?z=mxUtils.htmlEntities(C.response.error,!1):"undefined"!==typeof window.App&&(C.code==App.ERROR_TIMEOUT?z=mxUtils.htmlEntities(mxResources.get("timeout"),!1):C.code==App.ERROR_BUSY?z=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof C&&0<C.length&&(z=mxUtils.htmlEntities(C,!1)))}n=c=null;null!=C&&null!=C.helpLink?+(c=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(C.helpLink)})):null!=C&&null!=C.ownerEmail?(c=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+c+": "+C.ownerEmail+")",!1),n=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(C.ownerEmail))})):null!=C&&null!=C.alternateAction&&(c=C.alternateAction.label,n=C.alternateAction.funct);this.showError(e,z,E,f,R,null,null,c,n,null,null,null,p?f:null)}else null!=f&&f()};EditorUi.prototype.alert=+function(c,e,f){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,f||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,f,p,n,t){c=null!=c?c:"";var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},F=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){z();null!=e&&e()},function(){z();null!=f&&f()},p,n,null,null,null,null,F);this.showDialog(c.container,340,46+F,!0,t);c.init()};EditorUi.prototype.showBanner=+function(c,e,f,p,n,t,z,F,C){var E=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){t=null!=t?t:"bottom:10px;left:50%;";z=null!=z?z:"translate(-50%,120%)";F=null!=F?F:"translate(-50%,0%)";var R=n?500:1E3;E=n?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var U=document.createElement("div");U.style.cssText="position:absolute;"++t+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+E;mxUtils.setPrefixedStyle(U.style,"transform",z);mxUtils.setPrefixedStyle(U.style,"transition","all "+R+"ms ease");U.className="geBtn gePrimaryBtn"+(n?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(U.style,"box-shadow","1px 1px 2px 0px #ddd");null!=C&&mxUtils.setPrefixedStyle(U.style,"transform-origin",C);if(!n){var O=document.createElement("img");O.setAttribute("src",IMAGE_PATH+"/logo.png");+O.setAttribute("border","0");O.setAttribute("align","absmiddle");O.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";U.appendChild(O);O=document.createElement("img");O.setAttribute("src",Dialog.prototype.closeImage);O.setAttribute("title",mxResources.get(p?"doNotShowAgain":"close"));O.setAttribute("border","0");O.style.cssText=(n?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";U.appendChild(O)}mxUtils.write(U,+e);document.body.appendChild(U);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.setAttribute("id","geDoNotShowAgainCheckbox");Q.style.marginRight="6px";if(!p){e.appendChild(Q);var m=document.createElement("label");m.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(m,+mxResources.get("doNotShowAgain"));e.appendChild(m);U.style.paddingBottom=n?"16px":"30px";U.appendChild(e)}var u=mxUtils.bind(this,function(){null!=U.parentNode&&(U.parentNode.removeChild(U),this.bannerShowing=!1,Q.checked||p)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=O&&mxEvent.addListener(O,"click",mxUtils.bind(this,function(B){mxEvent.consume(B);u()}));var A=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,+"transform",z);window.setTimeout(mxUtils.bind(this,function(){u()}),R)});mxEvent.addListener(U,"click",mxUtils.bind(this,function(B){var H=mxEvent.getSource(B);H!=Q&&H!=m?(null!=f&&f(),u(),mxEvent.consume(B)):A()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,"transform",F)}),R/2);window.setTimeout(A,n?4E3:3E4);E=!0}return E};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};+EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,f,p){c=c.toDataURL("image/"+f);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(e))),0<p&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",p));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,f,p,n){var t="jpeg"==f?"jpg":f;p=this.getBaseFilename(p)+(null!=e?".drawio":+"")+"."+t;c=this.createImageDataUri(c,e,f,n);this.saveData(p,t,c.substring(c.lastIndexOf(",")+1),"image/"+f,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));+this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,f,p,n,t){"text/xml"!=f||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=t?t:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=p?this.base64ToBlob(c,f):new Blob([c],{type:f}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)f=window.open("about:blank","_blank"),null==+f?mxUtils.popup(c,!0):(f.document.write(c),f.document.close(),f.document.execCommand("SaveAs",!0,e),f.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==f||"image/"!=f.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,f,p);else{var z=document.createElement("a");t=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof z.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var F=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);+t=65==(F?parseInt(F[2],10):!1)?!1:t}if(t||this.isOffline()){z.href=URL.createObjectURL(p?this.base64ToBlob(c,f):new Blob([c],{type:f}));t?z.download=e:z.setAttribute("target","_blank");document.body.appendChild(z);try{window.setTimeout(function(){URL.revokeObjectURL(z.href)},2E4),z.click(),z.parentNode.removeChild(z)}catch(C){}}else this.createEchoRequest(c,e,f,p,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,f,p,n,t){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,+c+(null!=f?"&mime="+f:"")+(null!=n?"&format="+n:"")+(null!=t?"&base64="+t:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(p?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,e,f,p,n,t,z,F){t=null!=t?t:!1;z=null!=z?z:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);var C=mxUtils.bind(this,function(R,U,O,Q){try{if("_blank"==U)if(null!=f&&"image/"==f.substring(0,6))this.openInNewWindow(c,f,p);else if(null!=f&&"text/html"==f.substring(0,9)){var m=new EmbedDialog(this,c);this.showDialog(m.container,+450,240,!0,!0);m.init()}else{var u=window.open("about:blank");null==u?mxUtils.popup(c,!0):(u.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),u.document.close())}else if(U==App.MODE_DEVICE||"download"==U)this.doSaveLocalFile(c,R,f,p,null,F);else if(null!=R&&0<R.length){var A=mxUtils.bind(this,function(B){try{this.exportFile(c,R,f,p,U,B)}catch(H){this.handleError(H)}});null!=Q?A(Q):this.pickFolder(U,A)}}catch(B){this.handleError(B)}});n=[];t||n.push(App.MODE_BROWSER);z||n.push("_blank");+var E=new SaveDialog(this,e,mxUtils.bind(this,function(R,U,O){C(R.value,U,R,O);this.hideDialog(null,null,E.container)}),n,c,f,p);this.showDialog(E.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));E.init()};EditorUi.prototype.openInNewWindow=function(c,e,f){var p=window.open("about:blank");if(null==p||null==p.document)mxUtils.popup(c,!0);else{var n="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==e){var t=mxUtils.parseXml(c).documentElement.style.backgroundColor;+""!=t&&(n="background: "+t+";")}n='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+n+'">';"image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||f?(t=f?c:btoa(unescape(encodeURIComponent(c))),p.document.write(n+'<img style="max-width:100%;" src="data:'+e+";base64,"+t+'"/></body></html>')):p.document.write(n+c+"</body></html>"):p.document.write(n+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");p.document.close()}};var d=EditorUi.prototype.addChromelessToolbarItems;+EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var e=c(mxUtils.bind(this,function(p){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;-mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var p=e.getBoundingClientRect();this.tagsDialog.style.left=p.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";p=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=p.zIndex;document.body.appendChild(this.tagsDialog);-this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(n)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var n=this.editor.graph.getAllTags();e.style.display=0<n.length?"":"none"}))}d.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=+mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var n=e.getBoundingClientRect();this.tagsDialog.style.left=n.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";n=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=n.zIndex;document.body.appendChild(this.tagsDialog);+this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(p)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var p=this.editor.graph.getAllTags();e.style.display=0<p.length?"":"none"}))}d.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,-"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var l=c(mxUtils.bind(this,function(n){var p=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",p);null!=this.exportDialog&&-(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)p.apply(this);else{this.exportDialog=document.createElement("div");var u=l.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=-"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=u.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=u.zIndex;var B=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",-speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});B.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",p);this.editor.exportToCanvas(mxUtils.bind(this,function(D){B.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var G=this.createImageDataUri(D,null,"png");D=document.createElement("img");D.style.maxWidth="140px";D.style.maxHeight="140px";-D.style.cursor="pointer";D.style.backgroundColor="white";D.setAttribute("title",mxResources.get("openInNewWindow"));D.setAttribute("border","0");D.setAttribute("src",G);this.exportDialog.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.openInNewWindow(G.substring(G.indexOf(",")+1),"image/png",!0);p.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){B.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),-this.exportDialog=null);this.handleError(D)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,l,n,p){this.isLocalFileSave()?this.saveLocalFile(l,c,n,p,e):this.saveRequest(c,e,mxUtils.bind(this,function(u,B){return this.createEchoRequest(l,u,n,p,e,B)}),l,p,n)};EditorUi.prototype.saveRequest=function(c,e,l,n,p,u,B){B=null!=B?B:!mxClient.IS_IOS||!navigator.standalone;var D=mxUtils.bind(this,-function(E,T,O,S){if("_blank"==T||null!=E&&0<E.length){var k=l("_blank"==T?null:E,T==App.MODE_DEVICE||"download"==T||null==T||"_blank"==T?"0":"1");null!=k&&(T==App.MODE_DEVICE||"download"==T||"_blank"==T?k.simulate(document,"_blank"):(O=mxUtils.bind(this,function(v){u=null!=u?u:"pdf"==e?"application/pdf":"image/"+e;if(null!=n)try{this.exportFile(n,E,u,!0,T,v)}catch(z){this.handleError(z)}else this.spinner.spin(document.body,mxResources.get("saving"))&&k.send(mxUtils.bind(this,function(){this.spinner.stop();-if(200<=k.getStatus()&&299>=k.getStatus())try{this.exportFile(k.getText(),E,u,!0,T,v)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}))}),null!=S?O(S):this.pickFolder(T,O)))}});p=[App.MODE_BROWSER];B||p.push("_blank");var G=new SaveDialog(this,c,mxUtils.bind(this,function(E,T,O){D(E.value,T,E,O);this.hideDialog(null,null,G.container)}),p,null,"application/pdf");this.showDialog(G.container,-420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));G.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,l,n,p,u){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,e,l){e(null)};EditorUi.prototype.exportSvg=function(c,e,l,n,p,u,-B,D,G,E,T,O,S,k){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(L){Editor.addRetryToError(L,mxUtils.bind(this,function(){this.exportSvg(c,e,l,n,p,u,B,D,G,E,T,O,S,k)}));this.handleError(L)})))try{var v=this.editor.graph.isSelectionEmpty();l=null!=l?l:v;var z=e?null:this.editor.graph.background;z==mxConstants.NONE&&(z=null);null==z&&0==e&&(z=this.editor.graph.shapeBackgroundColor);var A=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&-(this.editor.graph.addForeignObjectWarning=function(){});var H=this.editor.graph.createSvgImageExport(p),R=this.editor.graph.getSvg(z,c,B,D,null,l,null,H,"blank"==E?"_blank":"self"==E?"_top":null,null,!S,T,O);this.editor.graph.addForeignObjectWarning=A;n&&this.editor.graph.addSvgShadow(R);var g=this.getBaseFilename()+(p?".drawio":"")+".svg";k=null!=k?k:mxUtils.bind(this,function(L){this.isLocalFileSave()||L.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(L)}))});var q=mxUtils.bind(this,function(L){this.spinner.stop();p&&L.setAttribute("content",this.getFileData(!0,null,null,null,l,G,null,null,null,null,null,c,B));k(Graph.xmlDeclaration+"\n"+(p?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(L))});this.editor.graph.mathEnabled&&this.editor.addMathCss(R);var F=mxUtils.bind(this,function(L){Editor.replaceSvgDataUris&&u&&EditorUi.embedSvgImages(L);Editor.foreignObjectImages&&-S?this.replaceAlternateContent(L,T,q):q(L)}),J=mxUtils.bind(this,function(L){u&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(L,F,this.thumbImageCache)):F(L)});S?this.embedFonts(R,J):(this.editor.addFontCss(R),J(R))}catch(L){this.handleError(L)}};EditorUi.prototype.replaceAlternateContent=function(c,e,l){function n(O,S,k,v,z){var A=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");A.setAttribute("x",S);A.setAttribute("y",-k+.5);A.setAttribute("width",v.width);A.setAttribute("height",v.height);null==A.setAttributeNS?A.setAttribute("xlink:href",z):A.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",z);O.replaceChild(A,O.lastChild);D()}function p(){if(B<T.length)T[B++](p)}var u="";e=c.getElementsByTagName("style");for(var B=0;B<e.length;B++)u+=e[B].innerHTML;e=c.getElementsByTagName("switch");counter=e.length;var D=mxUtils.bind(this,function(){counter--;0==counter&&l(c)}),G={},E={},T=[];for(B=0;B<e.length;B++)mxUtils.bind(this,-function(O){var S=O.getElementsByTagName("div");if(0<S.length)try{var k=S[0].cloneNode(!0),v=parseInt(k.style.marginLeft),z=parseInt(k.style.paddingTop),A=k.getElementsByTagName("div")[1],H=S=!1,R=k.style.alignItems,g=k.style.justifyContent;if(null!=k.style.writingMode){var q=k.style.writingMode;H="vertical-"==q.substring(0,9);S="-rl"==q.substring(q.length-3)}var F=!H&&"1px"==k.style.width||H&&"1px"==k.style.height;if(!H&&"1px"==k.style.height||H&&"1px"==k.style.width)k.style.alignItems=H&&S?"unsafe flex-end":-"unsafe flex-start";F&&(k.style.justifyContent="unsafe flex-start");k.style.paddingTop="";k.style.marginLeft="";var J=k.outerHTML,L=G[J];null==L&&(k.style.position="absolute",k.style.visibility="hidden",document.body.appendChild(k),q=1,q="1px"==k.style.width?A.offsetWidth:parseInt(k.style.width),F=1,F="1px"==k.style.height?A.offsetHeight:parseInt(k.style.height),document.body.removeChild(k),L=new mxRectangle(v,z,q,F),G[J]=L);"1px"==k.style.height&&("unsafe center"==R?z-=L.height/2:"unsafe flex-end"==-R&&(z-=L.height));if("1px"==k.style.width)if(!H&&"unsafe center"==g||H&&"unsafe center"==R)v-=L.width/2;else if(!H&&"unsafe flex-end"==g||H&&(!S&&"unsafe flex-end"==R||S&&"unsafe flex-start"==R))v-=L.width;L=new mxRectangle(v,z,L.width,L.height+parseInt(A.style.fontSize)/4);T.push(mxUtils.bind(this,function(Q){var U=E[J];null==U?Graph.htmlToPng(J,L.width,L.height,mxUtils.bind(this,function(V){n(O,v,z,L,V);E[J]=V;Q()}),u):(n(O,v,z,L,U),Q())}))}catch(Q){D()}else D()})(e[B]);0==counter&&l(c);B=0;p()};-EditorUi.prototype.addRadiobox=function(c,e,l,n,p,u,B){return this.addCheckbox(c,l,n,p,u,B,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,l,n,p,u,B,D){u=null!=u?u:!0;var G=document.createElement("input");G.style.marginRight="8px";G.style.marginTop="16px";G.setAttribute("type",B?"radio":"checkbox");B="geCheckbox-"+Editor.guid();G.id=B;null!=D&&G.setAttribute("name",D);l&&(G.setAttribute("checked","checked"),G.defaultChecked=!0);n&&G.setAttribute("disabled","disabled");u&&(c.appendChild(G),l=document.createElement("label"),-mxUtils.write(l,e),l.setAttribute("for",B),c.appendChild(l),p||mxUtils.br(c));return G};EditorUi.prototype.addEditButton=function(c,e){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var n=this.getCurrentFile(),p="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(p=window.location.href);var u=document.createElement("select");u.style.maxWidth="200px";u.style.width="auto";u.style.marginLeft="8px";u.style.marginRight="10px";u.className=-"geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));u.appendChild(n);var B=document.createElement("option");B.setAttribute("value","custom");mxUtils.write(B,mxResources.get("custom")+"...");u.appendChild(B);c.appendChild(u);mxEvent.addListener(u,"change",mxUtils.bind(this,function(){if("custom"==u.value){var D=new FilenameDialog(this,p,mxResources.get("ok"),function(G){null!=G?(p=G,B.setAttribute("title",G)):(u.value="blank",B.removeAttribute("title"))},-mxResources.get("url"),null,null,null,null,function(){u.value="blank"});this.showDialog(D.container,300,80,!0,!1);D.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==e||e.checked)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?"blank"===u.value?"_blank":p:null},getEditInput:function(){return l},getEditSelect:function(){return u}}};EditorUi.prototype.addLinkSection=function(c,e){function l(){var D=-document.createElement("div");D.style.width="100%";D.style.height="100%";D.style.boxSizing="border-box";null!=u&&u!=mxConstants.NONE?(D.style.border="1px solid black",D.style.backgroundColor=u):(D.style.backgroundPosition="center center",D.style.backgroundRepeat="no-repeat",D.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");B.innerText="";B.appendChild(D)}mxUtils.write(c,mxResources.get("links")+":");var n=document.createElement("select");n.style.width="100px";n.style.padding="0px";-n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var p=document.createElement("option");p.setAttribute("value","auto");mxUtils.write(p,mxResources.get("automatic"));n.appendChild(p);p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("openInNewWindow"));n.appendChild(p);p=document.createElement("option");p.setAttribute("value","self");mxUtils.write(p,mxResources.get("openInThisWindow"));n.appendChild(p);e&&(e=document.createElement("option"),-e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(e));c.appendChild(n);mxUtils.write(c,mxResources.get("borderColor")+":");var u="#0000ff",B=null;B=mxUtils.button("",mxUtils.bind(this,function(D){this.pickColor(u||"none",function(G){u=G;l()});mxEvent.consume(D)}));l();B.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";B.style.marginLeft="4px";B.style.height="22px";B.style.width="22px";B.style.position="relative";-B.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";B.className="geColorBtn";c.appendChild(B);mxUtils.br(c);return{getColor:function(){return u},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,l,n,p,u){u=null!=u?u:[];l&&(u.push("lightbox=1"),"auto"!=c&&u.push("target="+c),null!=e&&e!=mxConstants.NONE&&u.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=n&&0<n.length&&u.push("edit="+encodeURIComponent(n)),-p&&u.push("layers=1"),this.editor.graph.foldingEnabled&&u.push("nav=1"));return u};EditorUi.prototype.createLink=function(c,e,l,n,p,u,B,D,G,E,T){var O=this.getCurrentFile();G=this.createUrlParameters(c,e,n,p,u,G);c=!0;null!=B?l="#U"+encodeURIComponent(B):D||null==O||""==O.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+O.getHash(),c=!1);c&&null!=O&&null!=O.getTitle()&&O.getTitle()!=-this.defaultFilename&&G.push("title="+encodeURIComponent(O.getTitle()));E&&1<l.length&&(G.push("open="+l.substring(1)),l="");T&&null!=this.currentPage&&G.push("page-id="+this.currentPage.getId());return(n&&(null!=B||null!=O&&O.getMode()!=App.MODE_GITHUB&&O.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<G.length?"?"+G.join("&"):"")+l};EditorUi.prototype.createHtml=-function(c,e,l,n,p,u,B,D,G,E,T,O,S){this.getBasenames();var k={};""!=p&&p!=mxConstants.NONE&&(k.highlight=p);"auto"!==n&&(k.target=n);E||(k.lightbox=!1);k.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(k.zoom=l/100);l=[];B&&(l.push("pages"),k.resize=!0,null!=this.pages&&null!=this.currentPage&&(k.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(l.push("zoom"),k.resize=!0);D&&l.push("layers");G&&l.push("tags");null!=S&&(k["dark-mode"]=S);0<l.length&&(E&&l.push("lightbox"),-k.toolbar=l.join(" "));null!=T&&0<T.length&&(k.edit=T);null!=c?k.url=c:k.xml=this.getFileData(!0,null,null,null,null,!B);e='<div class="mxgraph" style="'+(u?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(k))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";O(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?-"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,l,n){var p=document.createElement("div");p.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,mxResources.get("html"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";p.appendChild(u);var B=document.createElement("div");B.style.cssText=-"border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","type-embedhtmldialog");u=D.cloneNode(!0);u.setAttribute("value","copy");B.appendChild(u);var G=document.createElement("span");mxUtils.write(G,mxResources.get("includeCopyOfMyDiagram"));B.appendChild(G);mxUtils.br(B);B.appendChild(D);G=-document.createElement("span");mxUtils.write(G,mxResources.get("publicDiagramUrl"));B.appendChild(G);var E=this.getCurrentFile();null==l&&null!=E&&E.constructor==window.DriveFile&&(G=document.createElement("a"),G.style.paddingLeft="12px",G.style.color="gray",G.style.cursor="pointer",mxUtils.write(G,mxResources.get("share")),B.appendChild(G),mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(E.getId(),E)})));u.setAttribute("checked","checked");null==-l&&D.setAttribute("disabled","disabled");p.appendChild(B);B=380;var T=this.addLinkSection(p),O=document.createElement("select");O.style.maxWidth="260px";O.style.marginLeft="8px";O.style.marginTop="16px";G=document.createElement("option");G.setAttribute("value","light");mxUtils.write(G,mxResources.get("light"));O.appendChild(G);G=document.createElement("option");G.setAttribute("value","dark");mxUtils.write(G,mxResources.get("dark"));O.appendChild(G);G=document.createElement("option");G.setAttribute("value",-"auto");mxUtils.write(G,mxResources.get("automatic"));G.setAttribute("selected","selected");O.appendChild(G);G.setAttribute("selected","selected");mxUtils.write(p,mxResources.get("appearance")+":");p.appendChild(O);mxUtils.br(p);B+=26;var S=this.addCheckbox(p,mxResources.get("zoom"),!0,null,!0);mxUtils.write(p,":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="12px";k.value="100%";p.appendChild(k);-var v=this.addCheckbox(p,mxResources.get("fit"),!0);G=null!=this.pages&&1<this.pages.length;var z=z=this.addCheckbox(p,mxResources.get("allPages"),G,!G),A=this.addCheckbox(p,mxResources.get("layers"),!0),H=this.addCheckbox(p,mxResources.get("tags"),!0),R=this.addCheckbox(p,mxResources.get("lightbox"),!0),g=null;if(EditorUi.enableHtmlEditOption){g=this.addEditButton(p,R);var q=g.getEditInput();q.style.marginBottom="16px";B+=50;mxEvent.addListener(R,"change",function(){R.checked?q.removeAttribute("disabled"):-q.setAttribute("disabled","disabled");q.checked&&R.checked?g.getEditSelect().removeAttribute("disabled"):g.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,p,mxUtils.bind(this,function(){n(D.checked?l:null,S.checked,k.value,T.getTarget(),T.getColor(),v.checked,z.checked,A.checked,H.checked,R.checked,null!=g?g.getLink():null,null!=O?O.value:null)}),null,c,e);this.showDialog(c.container,340,B,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,l,n,p,-u,B,D,G){var E=document.createElement("div");E.style.whiteSpace="nowrap";var T=document.createElement("h3");mxUtils.write(T,c||mxResources.get("publish"));T.style.width="100%";T.style.textAlign="center";T.style.marginTop="2px";T.style.marginBottom="20px";E.appendChild(T);var O=document.createElement("select");c=30;O.className="geBtn";O.style.marginBottom="8px";O.style.marginLeft="0px";O.style.width="100%";O.style.boxSizing="border-box";if(null==D||""==D.getHash())p=null!=p?p:"https://www.drawio.com/doc/faq/publish-diagram-as-link",-T=document.createElement("option"),mxUtils.write(T,mxResources.get("makeCopy")),T.setAttribute("value","copy"),O.appendChild(T);T=document.createElement("option");mxUtils.write(T,mxResources.get("authorizationRequired"));T.setAttribute("value","auth");O.appendChild(T);null!=D&&""!=D.getHash()||T.setAttribute("disabled","disabled");D=document.createElement("option");D.setAttribute("value","public");O.appendChild(D);null!=B?(mxUtils.write(D,mxResources.get("publicDiagramUrl")),D.setAttribute("title",-B),O.value="public"):(mxUtils.write(D,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),D.setAttribute("disabled","disabled"));E.appendChild(O);mxUtils.br(E);O.focus();var S=null,k=null;if(null!=e||null!=l)c+=30,mxUtils.write(E,mxResources.get("width")+":"),S=document.createElement("input"),S.setAttribute("type","text"),S.style.marginRight="16px",S.style.width="50px",S.style.marginLeft="6px",S.style.marginRight="16px",S.style.marginBottom="10px",S.value="100%",E.appendChild(S),-mxUtils.write(E,mxResources.get("height")+":"),k=document.createElement("input"),k.setAttribute("type","text"),k.style.width="50px",k.style.marginLeft="6px",k.style.marginBottom="10px",k.value=l+"px",E.appendChild(k),mxUtils.br(E);var v=this.addLinkSection(E,n),z=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,e=null!=this.currentPage?this.currentPage.getName():"",16<e.length&&(e=e.substring(0,16)+"..."),z=this.addCheckbox(E,mxResources.get("selectedPage")+-": "+e));var A=this.addCheckbox(E,mxResources.get("lightbox"),!0,null,null,!n),H=this.addEditButton(E,A),R=H.getEditInput();n&&(R.style.marginLeft=A.style.marginLeft,A.style.display="none",c-=20);var g=this.addCheckbox(E,mxResources.get("layers"),!0);g.style.marginLeft=R.style.marginLeft;g.style.marginTop="8px";var q=this.addCheckbox(E,mxResources.get("tags"),!0);q.style.marginLeft=R.style.marginLeft;q.style.marginBottom="16px";q.style.marginTop="16px";mxEvent.addListener(A,"change",function(){A.checked?-(g.removeAttribute("disabled"),R.removeAttribute("disabled"),q.removeAttribute("disabled")):(g.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));R.checked&&A.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,E,mxUtils.bind(this,function(){G(v.getTarget(),v.getColor(),null==z?!1:z.checked,A.checked,H.getLink(),g.checked,null!=S?S.value:null,null!=k?k.value:-null,q.checked,O.value)}),null,mxResources.get("create"),p,u);this.showDialog(n.container,340,296+c,!0,!0);null!=S?(S.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?S.select():document.execCommand("selectAll",!1,null)):null==O.parentNode;v.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,l,n,p){var u=document.createElement("div");u.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("image"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+-(p?"10":"4")+"px";u.appendChild(B);if(p){mxUtils.write(u,mxResources.get("zoom")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value=this.lastExportZoom||"100%";u.appendChild(D);mxUtils.write(u,mxResources.get("borderWidth")+":");var G=document.createElement("input");G.setAttribute("type","text");G.style.marginRight="16px";G.style.width="60px";G.style.marginLeft="4px";G.value=-this.lastExportBorder||"0";u.appendChild(G);mxUtils.br(u)}var E=this.addCheckbox(u,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),T=n?null:this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);B=this.editor.graph;var O=n?null:this.addCheckbox(u,mxResources.get("transparentBackground"),B.background==mxConstants.NONE||null==B.background);null!=O&&(O.style.marginBottom="16px");c=new CustomDialog(this,u,mxUtils.bind(this,function(){var S=-parseInt(D.value)/100||1,k=parseInt(G.value)||0;l(!E.checked,null!=T?T.checked:!1,null!=O?O.checked:!1,S,k)}),null,c,e);this.showDialog(c.container,300,(p?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,l,n,p,u,B,D,G){B=null!=B?B:Editor.defaultIncludeDiagram;var E=document.createElement("div");E.style.whiteSpace="nowrap";var T=this.editor.graph,O="jpeg"==D||"webp"==D?220:320,S=document.createElement("h3");mxUtils.write(S,c);S.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";-E.appendChild(S);mxUtils.write(E,mxResources.get("zoom")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="12px";k.value=this.lastExportZoom||"100%";E.appendChild(k);mxUtils.write(E,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||-"0";E.appendChild(v);mxUtils.br(E);var z=this.addCheckbox(E,mxResources.get("selectionOnly"),!1,T.isSelectionEmpty()),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.style.marginLeft="24px";A.setAttribute("disabled","disabled");A.setAttribute("type","checkbox");var H=document.createElement("select");H.style.marginTop="16px";H.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(S=0;S<c.length;S++)if(!T.isSelectionEmpty()||"selectionOnly"!=c[S]){var R=-document.createElement("option");mxUtils.write(R,mxResources.get(c[S]));R.setAttribute("value",c[S]);H.appendChild(R)}G?(mxUtils.write(E,mxResources.get("size")+":"),E.appendChild(H),mxUtils.br(E),O+=26,mxEvent.addListener(H,"change",function(){"selectionOnly"==H.value&&(z.checked=!0)})):u&&(E.appendChild(A),mxUtils.write(E,mxResources.get("crop")),mxUtils.br(E),O+=30,mxEvent.addListener(z,"change",function(){z.checked?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}));T.isSelectionEmpty()?-G&&(z.style.display="none",z.nextSibling.style.display="none",z.nextSibling.nextSibling.style.display="none",O-=30):(H.value="diagram",A.setAttribute("checked","checked"),A.defaultChecked=!0,mxEvent.addListener(z,"change",function(){H.value=z.checked?"selectionOnly":"diagram"}));var g=this.addCheckbox(E,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=D&&"webp"!=D),q=document.createElement("select");q.style.maxWidth="260px";q.style.marginLeft="8px";q.style.marginTop="16px";u=document.createElement("option");-u.setAttribute("value","light");mxUtils.write(u,mxResources.get("light"));q.appendChild(u);G=document.createElement("option");G.setAttribute("value","dark");mxUtils.write(G,mxResources.get("dark"));q.appendChild(G);"svg"==D?(u=document.createElement("option"),u.setAttribute("value","auto"),mxUtils.write(u,mxResources.get("automatic")),u.setAttribute("selected","selected"),q.appendChild(u)):Editor.isDarkMode()?G.setAttribute("selected","selected"):u.setAttribute("selected","selected");mxUtils.write(E,-mxResources.get("appearance")+":");E.appendChild(q);mxUtils.br(E);O+=26;var F=this.addCheckbox(E,mxResources.get("shadow"),T.shadowVisible),J=null;if("png"==D||"jpeg"==D||"webp"==D)J=this.addCheckbox(E,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),O+=30;var L=this.addCheckbox(E,mxResources.get("includeCopyOfMyDiagram")+":",B,null,null,"jpeg"!=D&&"webp"!=D),Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="28px";"png"==D||"svg"==D?(B=function(){L.checked?-Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled")},T=document.createElement("option"),T.setAttribute("value","allPages"),mxUtils.write(T,mxResources.get("allPages")),Q.appendChild(T),T=document.createElement("option"),T.setAttribute("value","currentPage"),mxUtils.write(T,mxResources.get("currentPage")),Q.appendChild(T),L.style.marginBottom="12px",Q.style.marginBottom="16px",E.appendChild(Q),mxUtils.br(E),O+=20,null!=this.lastEmbedInclude&&(Q.value=this.lastEmbedInclude),mxEvent.addListener(L,-"change",B),B()):L.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");var V=document.createElement("input");V.style.marginBottom="16px";V.style.marginRight="8px";V.setAttribute("type","checkbox");e&&(U.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,E.appendChild(U),mxUtils.write(E,mxResources.get("embedImages")),mxUtils.br(E),V.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,-E.appendChild(V),mxUtils.write(E,mxResources.get("embedFonts")),mxUtils.br(E),O+=50);var W=document.createElement("select");W.style.maxWidth="260px";W.style.marginLeft="8px";u=document.createElement("option");u.setAttribute("value","auto");mxUtils.write(u,mxResources.get("automatic"));W.appendChild(u);B=document.createElement("option");B.setAttribute("value","blank");mxUtils.write(B,mxResources.get("openInNewWindow"));W.appendChild(B);B=document.createElement("option");B.setAttribute("value","self");-mxUtils.write(B,mxResources.get("openInThisWindow"));W.appendChild(B);B=document.createElement("div");mxUtils.write(B,mxResources.get("LinksLost"));B.style.margin="7px";B.style.display="none";"svg"==D&&(mxUtils.write(E,mxResources.get("links")+":"),E.appendChild(W),E.appendChild(B),mxUtils.br(E),mxUtils.br(E),O+=50);l=new CustomDialog(this,E,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=k.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=V.checked;this.lastEmbedInclude=-Q.value;p(k.value,g.checked,!z.checked,F.checked,L.checked,U.checked&&e,v.value,A.checked,("png"==D||"svg"==D)&&"currentPage"==Q.value,W.value,null!=J?J.checked:null,null!=q?q.value:null,H.value,V.checked)}),null,l,n);this.showDialog(l.container,340,O,!0,!0,null,null,null,null,!0);k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,l,n,p){var u=document.createElement("div");u.style.whiteSpace=-"nowrap";var B=this.editor.graph;if(null!=e){var D=document.createElement("h3");mxUtils.write(D,e);D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(D)}var G=this.addCheckbox(u,mxResources.get("fit"),!0),E=this.addCheckbox(u,mxResources.get("shadow"),B.shadowVisible&&n,!n),T=this.addCheckbox(u,l),O=this.addCheckbox(u,mxResources.get("lightbox"),!0),S=this.addEditButton(u,O),k=S.getEditInput(),v=1<B.model.getChildCount(B.model.getRoot()),z=this.addCheckbox(u,-mxResources.get("layers"),v,!v);z.style.marginLeft=k.style.marginLeft;z.style.marginBottom="12px";z.style.marginTop="8px";mxEvent.addListener(O,"change",function(){O.checked?(v&&z.removeAttribute("disabled"),k.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),k.setAttribute("disabled","disabled"));k.checked&&O.checked?S.getEditSelect().removeAttribute("disabled"):S.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,u,mxUtils.bind(this,function(){c(G.checked,-E.checked,T.checked,O.checked,S.getLink(),z.checked)}),null,mxResources.get("embed"),p);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,l,n,p,u,B,D){function G(k){var v=" ",z="";n&&(v=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+-EditorUi.lightboxHost+"/?client=1"+(null!=T?"&page="+T:"")+(p?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",z+="cursor:pointer;");c&&(z+="max-width:100%;");var A="";l&&(A=' width="'+Math.round(E.width)+'" height="'+Math.round(E.height)+'"');B('<img src="'+k+'"'+A+(""!=z?' style="'+z+'"':"")+v+"/>")}var E=this.editor.graph.getGraphBounds(),T=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(k){var v=n?this.getFileData(!0):null;k=-this.createImageDataUri(k,v,"png");G(k)}),null,null,null,mxUtils.bind(this,function(k){D({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),E.width*E.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var O="";l&&(O="&w="+Math.round(2*E.width)+"&h="+Math.round(2*E.height));var S=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+O+"&xml="+encodeURIComponent(e));S.send(mxUtils.bind(this,function(){200<=S.getStatus()&&-299>=S.getStatus()?G("data:image/png;base64,"+S.getText()):D({message:mxResources.get("unknownError")})}))}else D({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,l,n,p,u,B){var D=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),G=D.getElementsByTagName("a");if(null!=G)for(var E=0;E<G.length;E++){var T=G[E].getAttribute("href");null!=T&&"#"==T.charAt(0)&&"_blank"==G[E].getAttribute("target")&&G[E].removeAttribute("target")}n&&-D.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(D);if(l){var O=" ",S="";n&&(O="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(p?"&edit=_blank":"")+(u?"&layers=1":-"")+"');}})(this);\"",S+="cursor:pointer;");c&&(S+="max-width:100%;");this.editor.convertImages(D,mxUtils.bind(this,function(k){B('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(k))+'"'+(""!=S?' style="'+S+'"':"")+O+"/>")}))}else S="",n&&(e=this.getSelectedPageIndex(),D.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+-EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(p?"&edit=_blank":"")+(u?"&layers=1":"")+"');}}})(this);"),S+="cursor:pointer;"),c&&(c=parseInt(D.getAttribute("width")),p=parseInt(D.getAttribute("height")),D.setAttribute("viewBox","-0.5 -0.5 "+c+" "+p),S+="max-width:100%;max-height:"+p+"px;",D.removeAttribute("height")),""!=S&&D.setAttribute("style",S),this.editor.addFontCss(D),this.editor.graph.mathEnabled&&this.editor.addMathCss(D),B(mxUtils.getXml(D))};EditorUi.prototype.timeSince=function(c){c=-Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var l=null;if("diagram"==c.nodeName)l=-c;else if("mxfile"==c.nodeName){var n=c.getElementsByTagName("diagram");if(0<n.length){l=n[0];var p=e.getGlobalVariable;e.getGlobalVariable=function(u){return"page"==u?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==u?1:p.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}n=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(u){}finally{this.editor.graph=n}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};-EditorUi.prototype.getPngFileProperties=function(c){var e=1,l=0;if(null!=c){if(c.hasAttribute("scale")){var n=parseFloat(c.getAttribute("scale"));!isNaN(n)&&0<n&&(e=n)}c.hasAttribute("border")&&(n=parseInt(c.getAttribute("border")),!isNaN(n)&&0<n&&(l=n))}return{scale:e,border:l}};EditorUi.prototype.getEmbeddedPng=function(c,e,l,n,p){try{var u=this.editor.graph,B=null;if(null!=l&&0<l.length)u=this.createTemporaryGraph(u.getStylesheet()),document.body.appendChild(u.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,-!0),u),B=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){u=this.createTemporaryGraph(u.getStylesheet());var D=u.getGlobalVariable;u.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?u.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&u.setBackgroundImage(G.viewState.backgroundImage);u.getGlobalVariable=function(E){return"page"==E?G.getName():"pagenumber"==E?1:D.apply(this,arguments)};document.body.appendChild(u.container);-u.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(E){try{null==B&&(B=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var T=E.toDataURL("image/png");T=Editor.writeGraphModelToPng(T,"tEXt","mxfile",encodeURIComponent(B));c(T.substring(T.lastIndexOf(",")+1));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container)}catch(O){null!=e&&e(O)}}),null,null,null,mxUtils.bind(this,function(E){null!=e&&e(E)}),null,null,n,null,u.shadowVisible,null,u,p,null,-null,null,"diagram",null)}catch(E){null!=e&&e(E)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,l,n,p,u,B,D,G,E,T,O,S){D=null!=D?D:!0;T=null!=T?T:0;B=null!=G?G:e.background;B==mxConstants.NONE&&(B=null);null==B&&"none"==e.getAdaptiveColors()&&(B="#ffffff");G=this.editor.graph.createSvgImageExport(null!=c);u=e.getSvg(B,E,T,null,null,u,null,G,null,e.shadowVisible||O,null,S,"diagram");(e.shadowVisible||O)&&e.addSvgShadow(u,null,null,0==T);null!=c&&u.setAttribute("content",c);null!=l&&u.setAttribute("resource",-l);var k=mxUtils.bind(this,function(v){v=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(v);null!=p&&p(v);return v});e.mathEnabled&&this.editor.addMathCss(u);if(null!=p)this.embedFonts(u,mxUtils.bind(this,function(v){D?this.editor.convertImages(v,mxUtils.bind(this,function(z){k(z)})):k(v)}));else return k(u)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),e(c)}catch(n){e(c)}}))}catch(l){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,l,n,p,u,B,D,G,E,T,O,S){G=null!=G?G:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(v){Editor.addRetryToError(v,mxUtils.bind(this,function(){this.exportImage(c,e,l,n,p,u,B,D,G,E,T,O,S)}));this.handleError(v)}))){var k=this.editor.graph.isSelectionEmpty();-l=null!=l?l:k;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(v){this.spinner.stop();try{this.saveCanvas(v,p?this.getFileData(!0,null,null,null,l,D,null,null,null,null,null,c,u):null,G,null==this.pages||0==this.pages.length,T)}catch(z){this.handleError(z)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),null,l,c||1,e,n,null,null,u,B,E,O,S)}catch(v){this.spinner.stop(),this.handleError(v)}}};-EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)c[this.pages[e].getId()]=this.pages[e].getId();return c};EditorUi.prototype.importXml=function(c,e,l,n,p,u,B){e=null!=e?e:0;l=null!=l?l:0;var D=[];try{var G=this.editor.graph;if(null!=c&&0<c.length){G.model.beginUpdate();try{var E=mxUtils.parseXml(c);c={};var T=this.editor.extractGraphModel(E.documentElement,-null!=this.pages);if(null!=T&&"mxfile"==T.nodeName&&null!=this.pages){var O=T.getElementsByTagName("diagram");if(1==O.length&&!u){if(T=Editor.parseDiagramNode(O[0]),null!=this.currentPage&&(c[O[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var S=O[0].getAttribute("name");null!=S&&""!=S&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,S))}}else if(0<O.length){u=[];var k=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[O[0].getAttribute("id")]=-this.pages[0].getId(),S=O[0].getAttribute("name"),null!=S&&""!=S&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],S)),T=Editor.parseDiagramNode(O[0]),n=!1,k=1);for(;k<O.length;k++){var v=O[k].getAttribute("id");O[k].removeAttribute("id");var z=this.updatePageRoot(new DiagramPage(O[k]));c[v]=O[k].getAttribute("id");var A=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[A+1]));G.model.execute(new ChangePage(this,z,z,A,!0));u.push(z)}this.updatePageLinks(c,-u)}}if(null!=T&&"mxGraphModel"===T.nodeName){D=G.importGraphModel(T,e,l,n);if(null!=D)for(this.addLocalPagesToMapping(c),k=0;k<D.length;k++)this.updatePageLinksForCell(c,D[k]);var H=G.parseBackgroundImage(T.getAttribute("backgroundImage"));if(null!=H&&null!=H.originalSrc){this.updateBackgroundPageLink(c,H);var R=new ChangePageSetup(this,null,H);R.ignoreColor=!0;G.model.execute(R)}}B&&G.pasteCellStyles(G.includeDescendants(D),G.defaultVertexStyle,G.defaultEdgeStyle)}finally{G.model.endUpdate()}}}catch(g){if(p)throw g;-this.handleError(g)}return D};EditorUi.prototype.updatePageLinks=function(c,e){for(var l=0;l<e.length;l++)this.updatePageLinksForCell(c,e[l].root),null!=e[l].viewState&&this.updateBackgroundPageLink(c,e[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var l=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=l&&(e.originalSrc="data:page/id,"+l)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=-function(c,e){var l=document.createElement("div"),n=this.editor.graph,p=n.getLinkForCell(e);null!=p&&n.setLinkForCell(e,this.updatePageLink(c,p));if(n.isHtmlLabel(e)){l.innerHTML=Graph.sanitizeHtml(n.getLabel(e));for(var u=l.getElementsByTagName("a"),B=!1,D=0;D<u.length;D++)p=u[D].getAttribute("href"),null!=p&&(u[D].setAttribute("href",this.updatePageLink(c,p)),B=!0);B&&n.labelChanged(e,l.innerHTML)}for(D=0;D<n.model.getChildCount(e);D++)this.updatePageLinksForCell(c,n.model.getChildAt(e,D))};EditorUi.prototype.updatePageLink=-function(c,e){if(Graph.isPageLink(e)){var l=c[e.substring(e.indexOf(",")+1)];e=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==e.substring(0,17))try{var n=JSON.parse(e.substring(17));if(null!=n.actions){for(var p=0;p<n.actions.length;p++){var u=n.actions[p];if(null!=u.open&&Graph.isPageLink(u.open)){var B=u.open.substring(u.open.indexOf(",")+1);l=c[B];null!=l?u.open="data:page/id,"+l:null==this.getPageById(B)&&delete u.open}}e="data:action/json,"+JSON.stringify(n)}}catch(D){}return e};-EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,l,n,p){var u=mxUtils.bind(this,function(B){this.loadingExtensions=!1;null!=l?l(B):this.handleError(B)});this.createTimeout(null,mxUtils.bind(this,function(B){n=null!=n?n:c.name;var D=mxUtils.bind(this,function(E){B.clear()&&u(E)}),G=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var E=this.isRemoteVisioFormat(n);-try{var T=n.lastIndexOf(".");if(0<=T&&T<n.length)n.substring(T+1).toUpperCase();else{var O=n.lastIndexOf("/");0<=O&&O<n.length&&(n=n.substring(O+1))}}catch(k){}if(E)if(null==VSD_CONVERT_URL||this.isOffline())D({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{E=new FormData;E.append("file1",c,n);var S=new XMLHttpRequest;S.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));S.responseType="blob";this.addRemoteServiceSecurityCheck(S);-null!=p&&S.setRequestHeader("x-convert-custom",p);S.onreadystatechange=mxUtils.bind(this,function(){if(4==S.readyState&&B.clear())if(200<=S.status&&299>=S.status)try{var k=S.response;if("text/xml"==k.type){var v=new FileReader;v.onload=mxUtils.bind(this,function(z){try{e(z.target.result)}catch(A){D({message:mxResources.get("errorLoadingFile")})}});v.readAsText(k)}else this.doImportVisio(k,e,D,n)}catch(z){D(z)}else try{""==S.responseType||"text"==S.responseType?D({message:S.responseText}):(v=new FileReader,-v.onload=function(){try{D({message:JSON.parse(v.result).Message})}catch(z){D(z)}},v.readAsText(S.response))}catch(z){D({})}});S.send(E)}else if(B.clear())try{this.doImportVisio(c,e,D,n)}catch(k){D(k)}}else D({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?G():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",G,null,null,null,D))}),u)};EditorUi.prototype.importGraphML=function(c,e,l){var n=-mxUtils.bind(this,function(p){this.loadingExtensions=!1;null!=l?l(p):this.handleError(p)});this.createTimeout(null,mxUtils.bind(this,function(p){var u=mxUtils.bind(this,function(D){p.clear()&&n(D)}),B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(p.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,e,n)}catch(D){u(D)}else u({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?B():(this.loadingExtensions=!0,-mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,u))}),n)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var e=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.createTimeout(null,mxUtils.bind(this,function(l){var n=mxUtils.bind(this,function(u){l.clear()&&e(u)}),p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),-(new VsdxExport(this)).exportCurrentDiagrams(c)||n({message:mxResources.get("unknownError")})}catch(u){n(u)}else n({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(p,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",p,null,null,null,n))}),e)}};EditorUi.prototype.convertLucidChart=function(c,e,l){var n=mxUtils.bind(this,function(p){this.loadingExtensions=!1;-null!=l?l(p):this.handleError(p)});this.createTimeout(null,mxUtils.bind(this,function(p){var u=mxUtils.bind(this,function(D){p.clear()&&n(D)}),B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(p.clear())if("undefined"!==typeof window.LucidImporter)try{var D=JSON.parse(c);e(LucidImporter.importState(D));try{if(null!=window.console&&"1"==urlParams.test){var G=[(new Date).toISOString(),"convertLucidChart",D];null!=D.state&&G.push(JSON.parse(D.state));if(null!=D.svgThumbs)for(var E=0;E<D.svgThumbs.length;E++)G.push(Editor.createSvgDataUri(D.svgThumbs[E]));-null!=D.thumb&&G.push(D.thumb);console.log.apply(console,G)}}catch(T){}}catch(T){null!=window.console&&console.error(T),u(T)}else u({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(B,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",-function(){mxscript("js/orgchart/mxOrgChartLayout.js",B,null,null,null,u)},null,null,null,u)},null,null,null,u)},null,null,null,u)},null,null,null,u):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,u))}),n)};EditorUi.prototype.createMermaidXml=function(c,e,l,n,p,u){var B=new Graph(document.createElement("div"));l=B.insertVertex(null,null,null,0,0,n,p,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");B.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,-config:e},null,2));null!=u&&B.setAttributeForCell(l,"templatePrompt",u);c=(new mxCodec).encode(B.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,e,l){var n=0,p=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(u){var B=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),D=mxUtils.bind(this,function(G){u.clear()&&l(G)});B.send(mxUtils.bind(this,function(G){if(u.isAlive())if(200<=G.getStatus()&&299>=G.getStatus())this.tryAndHandle(mxUtils.bind(this,-function(){var T=mxUtils.trim(G.getText());this.generateMermaidImage(T,null,mxUtils.bind(this,function(O,S,k){this.tryAndHandle(mxUtils.bind(this,function(){u.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",T),e(T,O,S,k))}),D)}),D,mxUtils.bind(this,function(O){3>n++?u.clear()&&p():D(O)}))}),D);else{var E={message:mxResources.get("error")+" "+G.getStatus()};try{E=JSON.parse(G.getText()),E=E.error}catch(T){}D(E)}}),D)}),l)});p()};EditorUi.prototype.extractMermaidDeclaration=-function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var e=c.split("```");e=1<e.length?e:c.split("<pre>");e=1<e.length?e:c.split("~~~");e=1<e.length?e:c.split("%%");e=1<e.length?e:c.split("(Begins)");c=mxUtils.trim(1>=e.length?c:e[1]);e=c.split("\n");var l=1<e.length?e[1]:null;if(null!=l){var n=l.indexOf("-");0<n&&(l=l.substring(0,n))}if(0<e.length&&"mermaid"==mxUtils.trim(e[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))e.shift(),c=mxUtils.trim(e.join("\n")),-e=c.split("\n");l=e[0].split(" ")[0].replace(/:$/,"");n=l.indexOf("-");0<n&&(l=l.substring(0,n));try{"mindmap"==l&&2<e.length&&(c=extractMermaidMindmap(e))}catch(p){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,e,l,n,p){var u=mxUtils.bind(this,function(D){this.loadingMermaid=!1;null!=n?n(D):this.handleError(D)}),B=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig);-e.securityLevel="strict";e.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&e.flowchart&&0<=c.indexOf("$$")&&(e.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(e.theme="dark");var D=mxUtils.bind(this,function(G){try{if(mxClient.IS_IE||mxClient.IS_IE11)G=G.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var E=mxUtils.parseXml(G).getElementsByTagName("svg");if(0<E.length&&"error"!=-E[0].getAttribute("aria-roledescription")){var T=parseFloat(E[0].getAttribute("width")),O=parseFloat(E[0].getAttribute("height"));if(isNaN(T)||isNaN(O))try{var S=E[0].getAttribute("viewBox").split(/\s+/);T=parseFloat(S[2]);O=parseFloat(S[3])}catch(k){T=T||100,O=O||100}l(this.convertDataUri(Editor.createSvgDataUri(G)),T,O)}else null!=p?p():n({message:mxResources.get("invalidInput")})}catch(k){n(k)}});mermaid.mermaidAPI.initialize(e);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),-c).then(function(G){D(G.svg)}).catch(function(G){null!=p?p(G):n(G)})}catch(G){n(G)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(B,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(D){this.importXml(D,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",B,null,null,null,u)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",B,null,null,null,u))};-EditorUi.prototype.generatePlantUmlImage=function(c,e,l,n){function p(D,G,E){c1=D>>2;c2=(D&3)<<4|G>>4;c3=(G&15)<<2|E>>6;c4=E&63;r="";r+=u(c1&63);r+=u(c2&63);r+=u(c3&63);return r+=u(c4&63)}function u(D){if(10>D)return String.fromCharCode(48+D);D-=10;if(26>D)return String.fromCharCode(65+D);D-=26;if(26>D)return String.fromCharCode(97+D);D-=26;return 0==D?"-":1==D?"_":"?"}var B=new XMLHttpRequest;B.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(D){r="";-for(i=0;i<D.length;i+=3)r=i+2==D.length?r+p(D.charCodeAt(i),D.charCodeAt(i+1),0):i+1==D.length?r+p(D.charCodeAt(i),0,0):r+p(D.charCodeAt(i),D.charCodeAt(i+1),D.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(B.responseType="blob");B.onload=function(D){if(200<=this.status&&300>this.status)if("txt"==e)l(this.response);else{var G=new FileReader;G.readAsDataURL(this.response);G.onloadend=function(E){var T=new Image;T.onload=function(){try{var O=T.width,S=T.height;-if(0==O&&0==S){var k=G.result,v=k.indexOf(","),z=decodeURIComponent(escape(atob(k.substring(v+1)))),A=mxUtils.parseXml(z).getElementsByTagName("svg");0<A.length&&(O=parseFloat(A[0].getAttribute("width")),S=parseFloat(A[0].getAttribute("height")))}l(G.result,O,S)}catch(H){n(H)}};T.src=G.result};G.onerror=function(E){n(E)}}else n(D)};B.onerror=function(D){n(D)};B.send()};EditorUi.prototype.insertAsPreText=function(c,e,l){var n=this.editor.graph,p=null;n.getModel().beginUpdate();try{p=n.insertVertex(null,-null,"<pre>"+c+"</pre>",e,l,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(p,!0)}finally{n.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(c,e,l,n,p,u,B,D){u=null!=u?u:!0;B=null!=B?B:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(S){4==S.readyState&&200<=-S.status&&299>=S.status&&this.editor.graph.setSelectionCells(this.insertTextAt(S.responseText,e,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(p||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var G=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var E=Editor.extractGraphModelFromPdf(c);if(null!=E&&0<E.length)return this.importXml(E,e,l,u,!0,D)}if(Editor.isPngDataUrl(c)&&(E=Editor.extractGraphModelFromPng(c),null!=E&&0<E.length))return this.importXml(E,e,l,u,-!0,D);if("data:image/svg+xml;"==c.substring(0,19))try{E=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(E=c.substring(c.indexOf(",")+1),E=window.atob&&!mxClient.IS_SF?atob(E):Base64.decode(E,!0)):E=decodeURIComponent(c.substring(c.indexOf(",")+1));var T=this.importXml(E,e,l,u,!0,D);if(0<T.length)return T}catch(S){}this.loadImage(c,mxUtils.bind(this,function(S){if("data:"==c.substring(0,5))this.resizeImage(S,c,mxUtils.bind(this,function(z,A,H){G.setSelectionCell(G.insertVertex(null,null,"",G.snap(e),-G.snap(l),A,H,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(z)+";"))}),B,this.maxImageSize);else{var k=Math.min(1,Math.min(this.maxImageSize/S.width,this.maxImageSize/S.height)),v=Math.round(S.width*k);S=Math.round(S.height*k);G.setSelectionCell(G.insertVertex(null,null,"",G.snap(e),G.snap(l),v,S,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+-c+";"))}}),mxUtils.bind(this,function(){var S=null;G.getModel().beginUpdate();try{S=G.insertVertex(G.getDefaultParent(),null,c,G.snap(e),G.snap(l),1,1,"text;"+(n?"html=1;":"")),G.updateCellSize(S),G.fireEvent(new mxEventObject("textInserted","cells",[S]))}finally{G.getModel().endUpdate()}G.setSelectionCell(S)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,l,u,null,D);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,-function(S){this.editor.graph.setSelectionCells(this.importXml(S,e,l,u,null,D))}),mxUtils.bind(this,function(S){this.handleError(S)}));else{G=this.editor.graph;p=null;G.getModel().beginUpdate();try{p=G.insertVertex(G.getDefaultParent(),null,"",G.snap(e),G.snap(l),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));G.fireEvent(new mxEventObject("textInserted","cells",[p]));n&&(c=G.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");p.value=c;G.updateCellSize(p);if(0<this.maxTextWidth&&-p.geometry.width>this.maxTextWidth){var O=G.getPreferredSizeForCell(p,this.maxTextWidth);p.geometry.width=O.width;p.geometry.height=O.height}Graph.isLink(p.value)&&G.setLinkForCell(p,p.value);p.geometry.width+=G.gridSize;p.geometry.height+=G.gridSize}finally{G.getModel().endUpdate()}return[p]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};EditorUi.prototype.convertDataUri=-function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=-document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(B,D){StorageFile.listFiles(this,"F",B,D)});window.openBrowserFile=-mxUtils.bind(this,function(B,D,G){StorageFile.getFileContent(this,B,D,G)});window.deleteBrowserFile=mxUtils.bind(this,function(B,D,G){StorageFile.deleteFile(this,B,D,G)});if(!e){var n=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(B){this.hideDialog(B)}));window.openFile.setConsumer(mxUtils.bind(this,function(B,D){null!=D&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(D)?(B=new Blob([B],{type:"application/octet-stream"}),this.importVisio(B,-mxUtils.bind(this,function(G){this.importXml(G,0,0,!0)}),null,D)):this.editor.graph.setSelectionCells(this.importXml(B,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var p=this.dialog,u=p.close;this.dialog.close=mxUtils.bind(this,function(B){Editor.useLocalStorage=n;u.apply(p,arguments);B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=-function(c,e,l){var n=this,p=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(u){if(mxUtils.isEmptyObject(u.files))l();else{var B=0,D,G=!1;u.forEach(function(E,T){E=T.name.toLowerCase();"diagram/diagram.xml"==E?(G=!0,T.async("string").then(function(O){0==O.indexOf("<mxfile ")?e(O):l()})):0==E.indexOf("versions/")&&(E=parseInt(E.substr(9)),E>B&&(B=E,D=T))});0<B?D.async("string").then(function(E){(new XMLHttpRequest).upload&&n.isRemoteFileFormat(E,-c.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):n.parseFileData(E,mxUtils.bind(this,function(T){4==T.readyState&&(200<=T.status&&299>=T.status?e(T.responseText):l())}),c.name):l()}):G||l()}},function(u){l(u)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",p,null,null,null,l))};EditorUi.prototype.importFile=function(c,e,l,n,p,u,B,-D,G,E,T,O){E=null!=E?E:!0;var S=!1,k=null,v=mxUtils.bind(this,function(z){var A=null;null!=z&&"<mxlibrary"==z.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,z,B)),this.showSidebar()):A=this.importXml(z,l,n,E,null,null!=O?mxEvent.isControlDown(O):null);null!=D&&D(A)});"image"==e.substring(0,5)?(G=!1,"image/png"==e.substring(0,9)&&(T=T?null:this.extractGraphModelFromPng(c),null!=T&&0<T.length&&(k=this.importXml(T,l,n,E,null,null!=O?mxEvent.isControlDown(O):null),G=!0)),G||(G=this.editor.graph,-T=c.indexOf(";"),0<T&&(c=c.substring(0,T)+c.substring(c.indexOf(",",T+1))),E&&G.isGridEnabled()&&(l=G.snap(l),n=G.snap(n)),T="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==e.substring(0,9)&&(T+="editableCssRules=.*;"),k=[G.insertVertex(null,null,"",l,n,p,u,T+"image="+c+";")])):/(\.*<graphml )/.test(c)?(S=!0,this.importGraphML(c,v)):null!=G&&null!=B&&EditorUi.isVisioFilename(B)?(S=!0,this.importVisio(G,v)):(new XMLHttpRequest).upload&&-this.isRemoteFileFormat(c,B)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(S=!0,e=mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?v(z.responseText):null!=D&&(D(null),this.showError(mxResources.get("error"),413==z.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,e,B):this.parseFile(G,e,B)):0==c.indexOf("PK")&&null!=G?(S=!0,this.importZipFile(G,v,mxUtils.bind(this,function(){k=-this.insertTextAt(this.validateFileData(c),l,n,!0,null,E);D(k)}))):/(\.v(sd|dx))($|\?)/i.test(B)||/(\.vs(s|x))($|\?)/i.test(B)||(k=this.insertTextAt(this.validateFileData(c),l,n,!0,null,E,null,null!=O?mxEvent.isControlDown(O):null));S||null==D||D(k);return k};EditorUi.prototype.importFiles=function(c,e,l,n,p,u,B,D,G,E,T,O,S){n=null!=n?n:this.maxImageSize;E=null!=E?E:this.maxImageBytes;var k=null!=e&&null!=l,v=!0;e=null!=e?e:0;l=null!=l?l:0;var z=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var A=T||-this.resampleThreshold,H=0;H<c.length;H++)if("image/svg"!==c[H].type.substring(0,9)&&"image/"===c[H].type.substring(0,6)&&c[H].size>A){z=!0;break}var R=mxUtils.bind(this,function(){var g=this.editor.graph,q=g.gridSize;p=null!=p?p:mxUtils.bind(this,function(V,W,X,Z,Y,ba,ea,ca,da){try{if(null!=V&&"<mxlibrary"==V.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,V,ea)),this.showSidebar(),null;this.isCompatibleString(V)&&1==c.length&&null!=S&&"drop"==S.type&&this.isBlankFile()&&-!this.canUndo()&&(k=!1,Z=X=0);return this.importFile(V,W,X,Z,Y,ba,ea,ca,da,k,O,S)}catch(ma){return this.handleError(ma),null}});u=null!=u?u:mxUtils.bind(this,function(V){g.setSelectionCells(V)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var F=c.length,J=F,L=[],Q=mxUtils.bind(this,function(V,W){L[V]=W;if(0==--J){this.spinner.stop();if(null!=D)D(L);else{var X=[];g.getModel().beginUpdate();try{for(V=0;V<L.length;V++){var Z=L[V]();null!=Z&&(X=X.concat(Z))}}finally{g.getModel().endUpdate()}}u(X)}}),-U=0;U<F;U++)mxUtils.bind(this,function(V){var W=c[V];if(null!=W){var X=new FileReader;X.onload=mxUtils.bind(this,function(Z){if(null==B||B(W))try{if("image/"==W.type.substring(0,6))if("image/svg"==W.type.substring(0,9)){var Y=Graph.clipSvgDataUri(Z.target.result),ba=Y.indexOf(","),ea=decodeURIComponent(escape(atob(Y.substring(ba+1)))),ca=mxUtils.parseXml(ea),da=ca.getElementsByTagName("svg");if(0<da.length){var ma=da[0],aa=O?null:ma.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&-(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,14)?Q(V,mxUtils.bind(this,function(){try{if(null!=ca){var ta=ca.getElementsByTagName("svg");if(0<ta.length){var sa=ta[0],fa=sa.getAttribute("width"),ra=sa.getAttribute("height");fa=null!=fa&&"%"!=fa.charAt(fa.length-1)?parseFloat(fa):NaN;ra=null!=ra&&"%"!=ra.charAt(ra.length-1)?parseFloat(ra):NaN;var ua=sa.getAttribute("viewBox");-if(null==ua||0==ua.length)sa.setAttribute("viewBox","0 0 "+fa+" "+ra);else if(isNaN(fa)||isNaN(ra)){var za=ua.split(" ");3<za.length&&(fa=parseFloat(za[2]),ra=parseFloat(za[3]))}Y=Editor.createSvgDataUri(mxUtils.getXml(sa));var va=Math.min(1,Math.min(n/Math.max(1,fa)),n/Math.max(1,ra)),ha=p(Y,W.type,e+V*q,l+V*q,Math.max(1,Math.round(fa*va)),Math.max(1,Math.round(ra*va)),W.name);if(null!=ha&&(isNaN(fa)||isNaN(ra))){var pa=new Image;pa.onload=mxUtils.bind(this,function(){fa=Math.max(1,pa.width);ra=-Math.max(1,pa.height);ha[0].geometry.width=fa;ha[0].geometry.height=ra;sa.setAttribute("viewBox","0 0 "+fa+" "+ra);Y=Editor.createSvgDataUri(mxUtils.getXml(sa));var Aa=Y.indexOf(";");0<Aa&&(Y=Y.substring(0,Aa)+Y.substring(Y.indexOf(",",Aa+1)));g.setCellStyles("image",Y,[ha[0]])});pa.src=Editor.createSvgDataUri(mxUtils.getXml(sa))}return ha}}}catch(Aa){}return null})):Q(V,mxUtils.bind(this,function(){return p(aa,"text/xml",e+V*q,l+V*q,0,0,W.name)}))}else Q(V,mxUtils.bind(this,function(){return null}))}else{ba=-!1;if("image/png"==W.type){var ia=O?null:this.extractGraphModelFromPng(Z.target.result);if(null!=ia&&0<ia.length){var ka=new Image;ka.src=Z.target.result;Q(V,mxUtils.bind(this,function(){return p(ia,"text/xml",e+V*q,l+V*q,ka.width,ka.height,W.name)}));ba=!0}}ba||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):-this.loadImage(Z.target.result,mxUtils.bind(this,function(ta){this.resizeImage(ta,Z.target.result,mxUtils.bind(this,function(sa,fa,ra){Q(V,mxUtils.bind(this,function(){if(null!=sa&&sa.length<E){var ua=v&&this.isResampleImageSize(W.size,T)?Math.min(1,Math.min(n/fa,n/ra)):1;return p(sa,W.type,e+V*q,l+V*q,Math.round(fa*ua),Math.round(ra*ua),W.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),v,n,T,W.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Y=-Z.target.result,p(Y,W.type,e+V*q,l+V*q,240,160,W.name,function(ta){Q(V,function(){return ta})},W)}catch(ta){Q(V,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(ta,W)}else Q(V,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(W.name)?p(null,W.type,e+V*q,l+V*q,240,160,W.name,function(Z){Q(V,function(){return Z})},W):"image"==W.type.substring(0,5)||"application/pdf"==W.type?X.readAsDataURL(W):X.readAsText(W)}})(U)});if(z){z=[];for(H=0;H<c.length;H++)z.push(c[H]);-c=z;this.confirmImageResize(function(g){v=g;R()},G)}else R()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,p=function(u,B){if(u||e)mxSettings.setResizeImages(u?-B:null),mxSettings.save();l();c(B)};null==n||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(u){p(u,!0)},function(u){p(u,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):p(!1,n)};EditorUi.prototype.parseFile=function(c,e,-l){l=null!=l?l:c.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,e,l)});n.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,l){var n=new XMLHttpRequest;n.open("POST",OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){e(n)};n.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(p){}};-EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,l,n,p,u,B){p=null!=p?p:this.maxImageSize;var D=Math.max(1,c.width),G=Math.max(1,c.height),E=e;if(n&&this.isResampleImageSize(null!=B?B:e.length,u))try{var T=Math.max(D/p,G/p);if(1<T){var O=Math.round(D/T),S=Math.round(G/T),k=document.createElement("canvas");k.width=O;k.height=S;k.getContext("2d").drawImage(c,0,0,O,S);var v=k.toDataURL();if(v.length<e.length){var z=-document.createElement("canvas");z.width=O;z.height=S;var A=z.toDataURL();v!==A&&(e=v,D=O,G=S)}}}catch(H){}n&&E!=e&&p>this.maxImageSize/2&&e.length>this.maxImageBytes?this.resizeImage(c,e,l,n,p/1.5,u,B):l(e,D,G)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,l){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;e(n)};null!=l&&(n.onerror=l);n.src=c}catch(p){if(null!=-l)l(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var t=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());t.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&-null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var y=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,e=this.editor.graph,l=e.isEnabled;e.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(q){var F=q.getEvent();return null==q.getState()&&!mxEvent.isMouseEvent(F)&&-!e.freehand.isDrawing()||mxEvent.isPopupTrigger(F)&&(null==q.getState()||mxEvent.isControlDown(F)||mxEvent.isShiftDown(F))});e.cellEditor.editPlantUmlData=function(q,F,J){var L=JSON.parse(J);F=new TextareaDialog(c,mxResources.get("plantUml")+":",L.data,function(Q){null!=Q&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(Q,L.format,function(U,V,W){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==L.format)e.labelChanged(q,"<pre>"+U+"</pre>"),e.updateCellSize(q,-!0);else{e.setCellStyles("image",c.convertDataUri(U),[q]);var X=e.model.getGeometry(q);null!=X&&(X=X.clone(),X.width=V,X.height=W,e.cellsResized([q],[X],!1))}e.setAttributeForCell(q,"plantUmlData",JSON.stringify({data:Q,format:L.format}))}finally{e.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(F.container,420,300,!0,!0);F.init()};e.cellEditor.editMermaidData=function(q,F,J){var L=JSON.parse(J);F=new TextareaDialog(c,mxResources.get("mermaid")+":",L.data,-function(Q){null!=Q&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(Q,L.config,function(U,V,W){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",U,[q]);var X=e.model.getGeometry(q);null!=X&&(X=X.clone(),X.width=Math.max(X.width,V),X.height=Math.max(X.height,W),e.cellsResized([q],[X],!1));e.setAttributeForCell(q,"mermaidData",JSON.stringify({data:Q,config:L.config},null,2))}finally{e.getModel().endUpdate()}},function(U){c.handleError(U)})},-null,null,400,220);c.showDialog(F.container,420,300,!0,!0);F.init()};var n=e.cellEditor.startEditing;e.cellEditor.startEditing=function(q,F){try{var J=this.graph.getAttributeForCell(q,"plantUmlData");if(null!=J)this.editPlantUmlData(q,F,J);else if(J=this.graph.getAttributeForCell(q,"mermaidData"),null!=J&&window.isMermaidEnabled)this.editMermaidData(q,F,J);else{var L=e.getCellStyle(q);"1"==mxUtils.getValue(L,"metaEdit","0")?c.showDataDialog(q):n.apply(this,arguments)}}catch(Q){c.handleError(Q)}};-e.getLinkTitle=function(q){return c.getLinkTitle(q)};e.customLinkClicked=function(q,F){var J=!1;try{var L=this.getGraphBounds();c.handleCustomLink(q,F);J=!0;c.chromelessResize&&!L.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(F))}catch(Q){c.handleError(Q)}return J};var p=e.parseBackgroundImage;e.parseBackgroundImage=function(q){var F=p.apply(this,arguments);null!=F&&null!=F.src&&Graph.isPageLink(F.src)&&(F={originalSrc:F.src});return F};var u=e.setBackgroundImage;e.setBackgroundImage=-function(q){null!=q&&null!=q.originalSrc&&(q=c.createImageForPageLink(q.originalSrc,c.currentPage,this));u.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(q,F){q=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=q){var J=q.indexOf(",");if(0<J)for(q=q.substring(J+-1),F=F.getProperty("patches"),J=0;J<F.length;J++)if(null!=F[J][EditorUi.DIFF_UPDATE]&&null!=F[J][EditorUi.DIFF_UPDATE][q]||null!=F[J][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(F[J][EditorUi.DIFF_REMOVE],q)){e.refreshBackgroundImage();break}}}));var B=e.getBackgroundImageObject;e.getBackgroundImageObject=function(q,F){var J=B.apply(this,arguments);null!=J&&null!=J.originalSrc&&(J=F?c.createImageForPageLink(J.originalSrc,null,null,!0):{src:J.originalSrc});return J};this.isOffline()||"undefined"===typeof window.EditDataDialog||-(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var D=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(q){q=null!=q?q:"";"1"==urlParams.dev&&(q+=(0<q.length?"&":"?")+"dev=1");return D.apply(this,arguments)};var G=e.addClickHandler;e.addClickHandler=function(q,F,J){var L=F;F=-function(Q,U,V){if(null==U){var W=mxEvent.getSource(Q);"a"==W.nodeName.toLowerCase()&&(U=W.getAttribute("href"))}null!=U&&e.isCustomLink(U)&&(mxEvent.isTouchEvent(Q)||!mxEvent.isPopupTrigger(Q))&&e.customLinkClicked(U,V)&&mxEvent.consume(Q);null!=L&&L(Q,U,V)};G.call(this,q,F,J)};y.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var E=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(q,F,J){e.isSelectionEmpty()&&-"simple"==Editor.currentTheme&&this.addMenuItems(q,["zoomIn","zoomOut","-"],null,J);E.apply(this,arguments);e.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(q,["-","addToScratchpad"],null,J);e.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(q,["-","exitGroup","home"],null,J)};var T=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(q,F,J){if(c.editor.graph.isSelectionEmpty())T.apply(this,arguments),c.menus.addMenuItems(q,["copyAsImage"],-null,J);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(q,F,J):this.addPopupMenuArrangeItems(q,F,J),this.addMenuItems(q,"- cut copy copyAsImage duplicate -".split(" "),null,J),this.isShowCellEditItems()||this.addPopupDeleteItem(q,F,J),this.addMenuItems(q,["lockUnlock","-"],null,J),!this.isShowStyleItems()){if(1==e.getSelectionCount()&&!e.isCellLocked(F)&&e.isCellEditable(F)&&(this.addSubmenu("editCell",q,null,mxResources.get("edit")),q.addSeparator(),e.getModel().isEdge(F))){this.addSubmenu("line",-q);var L=e.getModel().getGeometry(F);null!=L&&null!=L.points&&0<L.points.length&&this.addMenuItems(q,["clearWaypoints"],null,J)}1==e.getSelectionCount()&&this.addMenuItems(q,["enterGroup"],null,J);L=c.getSelectionState();null!=L.mergeCell?this.addMenuItem(q,"mergeCells"):(1<L.style.colspan||1<L.style.rowspan)&&this.addMenuItem(q,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=-function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var O=e.getExportVariables;e.getExportVariables=function(){var q=O.apply(this,arguments),F=c.getCurrentFile();null!=F&&(q.filename=F.getTitle());q.pagecount=null!=c.pages?c.pages.length:1;q.page=null!=c.currentPage?c.currentPage.getName():"";q.pagenumber=null!=c.pages&&null!=c.currentPage?-mxUtils.indexOf(c.pages,c.currentPage)+1:1;return q};var S=e.getGlobalVariable;e.getGlobalVariable=function(q){var F=c.getCurrentFile();return"filename"==q&&null!=F?F.getTitle():"page"==q&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==q?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==q?null!=c.pages?c.pages.length:1:S.apply(this,arguments)};var k=null,v=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var q=this.getCurrentFile(),-F=null!=q&&null!=q.getTitle()?q.getTitle():this.defaultFilename;k!=F&&q==v&&(e.invalidateDescendantsWithPlaceholders(e.model.getRoot()),e.view.validate());k=F;v=q}));var z=e.labelLinkClicked;e.labelLinkClicked=function(q,F,J){var L=F.getAttribute("href");if(null==L||!e.isCustomLink(L)||!mxEvent.isTouchEvent(J)&&mxEvent.isPopupTrigger(J))z.apply(this,arguments);else{if(!e.isEnabled()||null!=q&&e.isCellLocked(q.cell))e.customLinkClicked(L),e.getRubberband().reset();mxEvent.consume(J)}};this.editor.getOrCreateFilename=-function(){var q=c.defaultFilename,F=c.getCurrentFile();null!=F&&(q=null!=F.getTitle()?F.getTitle():q);return q};var A=this.actions.get("print");A.setEnabled(!mxClient.IS_IOS||!navigator.standalone);A.visible=A.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var f=c(mxUtils.bind(this,function(p){var n=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",n);null!=this.exportDialog&&+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)n.apply(this);else{this.exportDialog=document.createElement("div");var t=f.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=+"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=t.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=t.zIndex;var z=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});z.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",n);this.editor.exportToCanvas(mxUtils.bind(this,function(F){z.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var C=this.createImageDataUri(F,null,"png");F=document.createElement("img");F.style.maxWidth="140px";F.style.maxHeight="140px";+F.style.cursor="pointer";F.style.backgroundColor="white";F.setAttribute("title",mxResources.get("openInNewWindow"));F.setAttribute("border","0");F.setAttribute("src",C);this.exportDialog.appendChild(F);mxEvent.addListener(F,"click",mxUtils.bind(this,function(){this.openInNewWindow(C.substring(C.indexOf(",")+1),"image/png",!0);n.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(F){z.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),+this.exportDialog=null);this.handleError(F)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(p)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,f,p,n){this.isLocalFileSave()?this.saveLocalFile(f,c,p,n,e):this.saveRequest(c,e,mxUtils.bind(this,function(t,z){return this.createEchoRequest(f,t,p,n,e,z)}),f,n,p)};EditorUi.prototype.saveRequest=function(c,e,f,p,n,t,z){z=null!=z?z:!mxClient.IS_IOS||!navigator.standalone;var F=mxUtils.bind(this,+function(E,R,U,O){if("_blank"==R||null!=E&&0<E.length){var Q=f("_blank"==R?null:E,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=Q&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?Q.simulate(document,"_blank"):(U=mxUtils.bind(this,function(m){t=null!=t?t:"pdf"==e?"application/pdf":"image/"+e;if(null!=p)try{this.exportFile(p,E,t,!0,R,m)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&Q.send(mxUtils.bind(this,function(){this.spinner.stop();+if(200<=Q.getStatus()&&299>=Q.getStatus())try{this.exportFile(Q.getText(),E,t,!0,R,m)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))}),null!=O?U(O):this.pickFolder(R,U)))}});n=[App.MODE_BROWSER];z||n.push("_blank");var C=new SaveDialog(this,c,mxUtils.bind(this,function(E,R,U){F(E.value,R,E,U);this.hideDialog(null,null,C.container)}),n,null,"application/pdf");this.showDialog(C.container,+420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));C.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,f,p,n,t){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,e,f){e(null)};EditorUi.prototype.exportSvg=function(c,e,f,p,n,t,+z,F,C,E,R,U,O,Q){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(I){Editor.addRetryToError(I,mxUtils.bind(this,function(){this.exportSvg(c,e,f,p,n,t,z,F,C,E,R,U,O,Q)}));this.handleError(I)})))try{var m=this.editor.graph.isSelectionEmpty();f=null!=f?f:m;var u=e?null:this.editor.graph.background;u==mxConstants.NONE&&(u=null);null==u&&0==e&&(u=this.editor.graph.shapeBackgroundColor);var A=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&+(this.editor.graph.addForeignObjectWarning=function(){});var B=this.editor.graph.createSvgImageExport(n),H=this.editor.graph.getSvg(u,c,z,F,null,f,null,B,"blank"==E?"_blank":"self"==E?"_top":null,null,!O,R,U);this.editor.graph.addForeignObjectWarning=A;p&&this.editor.graph.addSvgShadow(H);var T=this.getBaseFilename()+(n?".drawio":"")+".svg";Q=null!=Q?Q:mxUtils.bind(this,function(I){this.isLocalFileSave()||I.length<=MAX_REQUEST_SIZE?this.saveData(T,"svg",I,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(I)}))});var k=mxUtils.bind(this,function(I){this.spinner.stop();n&&I.setAttribute("content",this.getFileData(!0,null,null,null,f,C,null,null,null,null,null,c,z));Q(Graph.xmlDeclaration+"\n"+(n?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(I))});this.editor.graph.mathEnabled&&this.editor.addMathCss(H);var v=mxUtils.bind(this,function(I){Editor.replaceSvgDataUris&&t&&EditorUi.embedSvgImages(I);Editor.foreignObjectImages&&+O?this.replaceAlternateContent(I,R,k):k(I)}),G=mxUtils.bind(this,function(I){t&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(I,v,this.thumbImageCache)):v(I)});O?this.embedFonts(H,G):(this.editor.addFontCss(H),G(H))}catch(I){this.handleError(I)}};EditorUi.prototype.replaceAlternateContent=function(c,e,f){function p(U,O,Q,m,u){var A=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");A.setAttribute("x",O);A.setAttribute("y",+Q+.5);A.setAttribute("width",m.width);A.setAttribute("height",m.height);null==A.setAttributeNS?A.setAttribute("xlink:href",u):A.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",u);U.replaceChild(A,U.lastChild);F()}function n(){if(z<R.length)R[z++](n)}var t="";e=c.getElementsByTagName("style");for(var z=0;z<e.length;z++)t+=e[z].innerHTML;e=c.getElementsByTagName("switch");counter=e.length;var F=mxUtils.bind(this,function(){counter--;0==counter&&f(c)}),C={},E={},R=[];for(z=0;z<e.length;z++)mxUtils.bind(this,+function(U){var O=U.getElementsByTagName("div");if(0<O.length)try{var Q=O[0].cloneNode(!0),m=parseInt(Q.style.marginLeft),u=parseInt(Q.style.paddingTop),A=Q.getElementsByTagName("div")[1],B=O=!1,H=Q.style.alignItems,T=Q.style.justifyContent;if(null!=Q.style.writingMode){var k=Q.style.writingMode;B="vertical-"==k.substring(0,9);O="-rl"==k.substring(k.length-3)}var v=!B&&"1px"==Q.style.width||B&&"1px"==Q.style.height;if(!B&&"1px"==Q.style.height||B&&"1px"==Q.style.width)Q.style.alignItems=B&&O?"unsafe flex-end":+"unsafe flex-start";v&&(Q.style.justifyContent="unsafe flex-start");Q.style.paddingTop="";Q.style.marginLeft="";var G=Q.outerHTML,I=C[G];null==I&&(Q.style.position="absolute",Q.style.visibility="hidden",document.body.appendChild(Q),k=1,k="1px"==Q.style.width?A.offsetWidth:parseInt(Q.style.width),v=1,v="1px"==Q.style.height?A.offsetHeight:parseInt(Q.style.height),document.body.removeChild(Q),I=new mxRectangle(m,u,k,v),C[G]=I);"1px"==Q.style.height&&("unsafe center"==H?u-=I.height/2:"unsafe flex-end"==+H&&(u-=I.height));if("1px"==Q.style.width)if(!B&&"unsafe center"==T||B&&"unsafe center"==H)m-=I.width/2;else if(!B&&"unsafe flex-end"==T||B&&(!O&&"unsafe flex-end"==H||O&&"unsafe flex-start"==H))m-=I.width;I=new mxRectangle(m,u,I.width,I.height+parseInt(A.style.fontSize)/4);R.push(mxUtils.bind(this,function(M){var P=E[G];null==P?Graph.htmlToPng(G,I.width,I.height,mxUtils.bind(this,function(S){p(U,m,u,I,S);E[G]=S;M()}),t):(p(U,m,u,I,P),M())}))}catch(M){F()}else F()})(e[z]);0==counter&&f(c);z=0;n()};+EditorUi.prototype.addRadiobox=function(c,e,f,p,n,t,z){return this.addCheckbox(c,f,p,n,t,z,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,f,p,n,t,z,F){t=null!=t?t:!0;var C=document.createElement("input");C.style.marginRight="8px";C.style.marginTop="16px";C.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();C.id=z;null!=F&&C.setAttribute("name",F);f&&(C.setAttribute("checked","checked"),C.defaultChecked=!0);p&&C.setAttribute("disabled","disabled");t&&(c.appendChild(C),f=document.createElement("label"),+mxUtils.write(f,e),f.setAttribute("for",z),c.appendChild(f),n||mxUtils.br(c));return C};EditorUi.prototype.addEditButton=function(c,e){var f=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);f.style.marginLeft="24px";var p=this.getCurrentFile(),n="";null!=p&&p.getMode()!=App.MODE_DEVICE&&p.getMode()!=App.MODE_BROWSER&&(n=window.location.href);var t=document.createElement("select");t.style.maxWidth="200px";t.style.width="auto";t.style.marginLeft="8px";t.style.marginRight="10px";t.className=+"geBtn";p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("makeCopy"));t.appendChild(p);var z=document.createElement("option");z.setAttribute("value","custom");mxUtils.write(z,mxResources.get("custom")+"...");t.appendChild(z);c.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==t.value){var F=new FilenameDialog(this,n,mxResources.get("ok"),function(C){null!=C?(n=C,z.setAttribute("title",C)):(t.value="blank",z.removeAttribute("title"))},+mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(f,"change",mxUtils.bind(this,function(){f.checked&&(null==e||e.checked)?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return f.checked?"blank"===t.value?"_blank":n:null},getEditInput:function(){return f},getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(c,e){function f(){var F=+document.createElement("div");F.style.width="100%";F.style.height="100%";F.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(F.style.border="1px solid black",F.style.backgroundColor=t):(F.style.backgroundPosition="center center",F.style.backgroundRepeat="no-repeat",F.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(F)}mxUtils.write(c,mxResources.get("links")+":");var p=document.createElement("select");p.style.width="100px";p.style.padding="0px";+p.style.marginLeft="8px";p.style.marginRight="10px";p.className="geBtn";var n=document.createElement("option");n.setAttribute("value","auto");mxUtils.write(n,mxResources.get("automatic"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("openInNewWindow"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","self");mxUtils.write(n,mxResources.get("openInThisWindow"));p.appendChild(n);e&&(e=document.createElement("option"),+e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),p.appendChild(e));c.appendChild(p);mxUtils.write(c,mxResources.get("borderColor")+":");var t="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(F){this.pickColor(t||"none",function(C){t=C;f()});mxEvent.consume(F)}));f();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height="22px";z.style.width="22px";z.style.position="relative";+z.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";z.className="geColorBtn";c.appendChild(z);mxUtils.br(c);return{getColor:function(){return t},getTarget:function(){return p.value},focus:function(){p.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,f,p,n,t){t=null!=t?t:[];f&&(t.push("lightbox=1"),"auto"!=c&&t.push("target="+c),null!=e&&e!=mxConstants.NONE&&t.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=p&&0<p.length&&t.push("edit="+encodeURIComponent(p)),+n&&t.push("layers=1"),this.editor.graph.foldingEnabled&&t.push("nav=1"));return t};EditorUi.prototype.createLink=function(c,e,f,p,n,t,z,F,C,E,R){var U=this.getCurrentFile();C=this.createUrlParameters(c,e,p,n,t,C);c=!0;null!=z?f="#U"+encodeURIComponent(z):F||null==U||""==U.getHash()?f="#R"+encodeURIComponent(f?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(f="#"+U.getHash(),c=!1);c&&null!=U&&null!=U.getTitle()&&U.getTitle()!=+this.defaultFilename&&C.push("title="+encodeURIComponent(U.getTitle()));E&&1<f.length&&(C.push("open="+f.substring(1)),f="");R&&null!=this.currentPage&&C.push("page-id="+this.currentPage.getId());return(p&&(null!=z||null!=U&&U.getMode()!=App.MODE_GITHUB&&U.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<C.length?"?"+C.join("&"):"")+f};EditorUi.prototype.createHtml=+function(c,e,f,p,n,t,z,F,C,E,R,U,O){this.getBasenames();var Q={};""!=n&&n!=mxConstants.NONE&&(Q.highlight=n);"auto"!==p&&(Q.target=p);E||(Q.lightbox=!1);Q.nav=this.editor.graph.foldingEnabled;f=parseInt(f);isNaN(f)||100==f||(Q.zoom=f/100);f=[];z&&(f.push("pages"),Q.resize=!0,null!=this.pages&&null!=this.currentPage&&(Q.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(f.push("zoom"),Q.resize=!0);F&&f.push("layers");C&&f.push("tags");null!=O&&(Q["dark-mode"]=O);0<f.length&&(E&&f.push("lightbox"),+Q.toolbar=f.join(" "));null!=R&&0<R.length&&(Q.edit=R);null!=c?Q.url=c:Q.xml=this.getFileData(!0,null,null,null,null,!z);e='<div class="mxgraph" style="'+(t?"max-width:100%;":"")+(""!=f?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Q))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";U(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?+"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,f,p){var n=document.createElement("div");n.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxResources.get("html"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(t);var z=document.createElement("div");z.style.cssText=+"border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var F=document.createElement("input");F.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";F.setAttribute("value","url");F.setAttribute("type","radio");F.setAttribute("name","type-embedhtmldialog");t=F.cloneNode(!0);t.setAttribute("value","copy");z.appendChild(t);var C=document.createElement("span");mxUtils.write(C,mxResources.get("includeCopyOfMyDiagram"));z.appendChild(C);mxUtils.br(z);z.appendChild(F);C=+document.createElement("span");mxUtils.write(C,mxResources.get("publicDiagramUrl"));z.appendChild(C);var E=this.getCurrentFile();null==f&&null!=E&&E.constructor==window.DriveFile&&(C=document.createElement("a"),C.style.paddingLeft="12px",C.style.color="gray",C.style.cursor="pointer",mxUtils.write(C,mxResources.get("share")),z.appendChild(C),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(E.getId(),E)})));t.setAttribute("checked","checked");null==+f&&F.setAttribute("disabled","disabled");n.appendChild(z);z=380;var R=this.addLinkSection(n),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","dark");mxUtils.write(C,mxResources.get("dark"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value",+"auto");mxUtils.write(C,mxResources.get("automatic"));C.setAttribute("selected","selected");U.appendChild(C);C.setAttribute("selected","selected");mxUtils.write(n,mxResources.get("appearance")+":");n.appendChild(U);mxUtils.br(n);z+=26;var O=this.addCheckbox(n,mxResources.get("zoom"),!0,null,!0);mxUtils.write(n,":");var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.marginRight="16px";Q.style.width="60px";Q.style.marginLeft="4px";Q.style.marginRight="12px";Q.value="100%";n.appendChild(Q);+var m=this.addCheckbox(n,mxResources.get("fit"),!0);C=null!=this.pages&&1<this.pages.length;var u=u=this.addCheckbox(n,mxResources.get("allPages"),C,!C),A=this.addCheckbox(n,mxResources.get("layers"),!0),B=this.addCheckbox(n,mxResources.get("tags"),!0),H=this.addCheckbox(n,mxResources.get("lightbox"),!0),T=null;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(n,H);var k=T.getEditInput();k.style.marginBottom="16px";z+=50;mxEvent.addListener(H,"change",function(){H.checked?k.removeAttribute("disabled"):+k.setAttribute("disabled","disabled");k.checked&&H.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,n,mxUtils.bind(this,function(){p(F.checked?f:null,O.checked,Q.value,R.getTarget(),R.getColor(),m.checked,u.checked,A.checked,B.checked,H.checked,null!=T?T.getLink():null,null!=U?U.value:null)}),null,c,e);this.showDialog(c.container,340,z,!0,!0);t.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,f,p,n,+t,z,F,C){var E=document.createElement("div");E.style.whiteSpace="nowrap";var R=document.createElement("h3");mxUtils.write(R,c||mxResources.get("publish"));R.style.width="100%";R.style.textAlign="center";R.style.marginTop="2px";R.style.marginBottom="20px";E.appendChild(R);var U=document.createElement("select");c=30;U.className="geBtn";U.style.marginBottom="8px";U.style.marginLeft="0px";U.style.width="100%";U.style.boxSizing="border-box";if(null==F||""==F.getHash())n=null!=n?n:"https://www.drawio.com/doc/faq/publish-diagram-as-link",+R=document.createElement("option"),mxUtils.write(R,mxResources.get("makeCopy")),R.setAttribute("value","copy"),U.appendChild(R);R=document.createElement("option");mxUtils.write(R,mxResources.get("authorizationRequired"));R.setAttribute("value","auth");U.appendChild(R);null!=F&&""!=F.getHash()||R.setAttribute("disabled","disabled");F=document.createElement("option");F.setAttribute("value","public");U.appendChild(F);null!=z?(mxUtils.write(F,mxResources.get("publicDiagramUrl")),F.setAttribute("title",+z),U.value="public"):(mxUtils.write(F,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),F.setAttribute("disabled","disabled"));E.appendChild(U);mxUtils.br(E);U.focus();var O=null,Q=null;if(null!=e||null!=f)c+=30,mxUtils.write(E,mxResources.get("width")+":"),O=document.createElement("input"),O.setAttribute("type","text"),O.style.marginRight="16px",O.style.width="50px",O.style.marginLeft="6px",O.style.marginRight="16px",O.style.marginBottom="10px",O.value="100%",E.appendChild(O),+mxUtils.write(E,mxResources.get("height")+":"),Q=document.createElement("input"),Q.setAttribute("type","text"),Q.style.width="50px",Q.style.marginLeft="6px",Q.style.marginBottom="10px",Q.value=f+"px",E.appendChild(Q),mxUtils.br(E);var m=this.addLinkSection(E,p),u=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,e=null!=this.currentPage?this.currentPage.getName():"",16<e.length&&(e=e.substring(0,16)+"..."),u=this.addCheckbox(E,mxResources.get("selectedPage")++": "+e));var A=this.addCheckbox(E,mxResources.get("lightbox"),!0,null,null,!p),B=this.addEditButton(E,A),H=B.getEditInput();p&&(H.style.marginLeft=A.style.marginLeft,A.style.display="none",c-=20);var T=this.addCheckbox(E,mxResources.get("layers"),!0);T.style.marginLeft=H.style.marginLeft;T.style.marginTop="8px";var k=this.addCheckbox(E,mxResources.get("tags"),!0);k.style.marginLeft=H.style.marginLeft;k.style.marginBottom="16px";k.style.marginTop="16px";mxEvent.addListener(A,"change",function(){A.checked?+(T.removeAttribute("disabled"),H.removeAttribute("disabled"),k.removeAttribute("disabled")):(T.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),k.setAttribute("disabled","disabled"));H.checked&&A.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});p=new CustomDialog(this,E,mxUtils.bind(this,function(){C(m.getTarget(),m.getColor(),null==u?!1:u.checked,A.checked,B.getLink(),T.checked,null!=O?O.value:null,null!=Q?Q.value:+null,k.checked,U.value)}),null,mxResources.get("create"),n,t);this.showDialog(p.container,340,296+c,!0,!0);null!=O?(O.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null)):null==U.parentNode;m.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,f,p,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"++(n?"10":"4")+"px";t.appendChild(z);if(n){mxUtils.write(t,mxResources.get("zoom")+":");var F=document.createElement("input");F.setAttribute("type","text");F.style.marginRight="16px";F.style.width="60px";F.style.marginLeft="4px";F.style.marginRight="12px";F.value=this.lastExportZoom||"100%";t.appendChild(F);mxUtils.write(t,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.value=+this.lastExportBorder||"0";t.appendChild(C);mxUtils.br(t)}var E=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=p?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);z=this.editor.graph;var U=p?null:this.addCheckbox(t,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=U&&(U.style.marginBottom="16px");c=new CustomDialog(this,t,mxUtils.bind(this,function(){var O=+parseInt(F.value)/100||1,Q=parseInt(C.value)||0;f(!E.checked,null!=R?R.checked:!1,null!=U?U.checked:!1,O,Q)}),null,c,e);this.showDialog(c.container,300,(n?25:0)+(p?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,f,p,n,t,z,F,C){z=null!=z?z:Editor.defaultIncludeDiagram;var E=document.createElement("div");E.style.whiteSpace="nowrap";var R=this.editor.graph,U="jpeg"==F||"webp"==F?220:320,O=document.createElement("h3");mxUtils.write(O,c);O.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";+E.appendChild(O);mxUtils.write(E,mxResources.get("zoom")+":");var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.marginRight="16px";Q.style.width="60px";Q.style.marginLeft="4px";Q.style.marginRight="12px";Q.value=this.lastExportZoom||"100%";E.appendChild(Q);mxUtils.write(E,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||+"0";E.appendChild(m);mxUtils.br(E);var u=this.addCheckbox(E,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.style.marginLeft="24px";A.setAttribute("disabled","disabled");A.setAttribute("type","checkbox");var B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(O=0;O<c.length;O++)if(!R.isSelectionEmpty()||"selectionOnly"!=c[O]){var H=+document.createElement("option");mxUtils.write(H,mxResources.get(c[O]));H.setAttribute("value",c[O]);B.appendChild(H)}C?(mxUtils.write(E,mxResources.get("size")+":"),E.appendChild(B),mxUtils.br(E),U+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):t&&(E.appendChild(A),mxUtils.write(E,mxResources.get("crop")),mxUtils.br(E),U+=30,mxEvent.addListener(u,"change",function(){u.checked?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?+C&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",U-=30):(B.value="diagram",A.setAttribute("checked","checked"),A.defaultChecked=!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(E,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=F&&"webp"!=F),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";t=document.createElement("option");+t.setAttribute("value","light");mxUtils.write(t,mxResources.get("light"));k.appendChild(t);C=document.createElement("option");C.setAttribute("value","dark");mxUtils.write(C,mxResources.get("dark"));k.appendChild(C);"svg"==F?(t=document.createElement("option"),t.setAttribute("value","auto"),mxUtils.write(t,mxResources.get("automatic")),t.setAttribute("selected","selected"),k.appendChild(t)):Editor.isDarkMode()?C.setAttribute("selected","selected"):t.setAttribute("selected","selected");mxUtils.write(E,+mxResources.get("appearance")+":");E.appendChild(k);mxUtils.br(E);U+=26;var v=this.addCheckbox(E,mxResources.get("shadow"),R.shadowVisible),G=null;if("png"==F||"jpeg"==F||"webp"==F)G=this.addCheckbox(E,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),U+=30;var I=this.addCheckbox(E,mxResources.get("includeCopyOfMyDiagram")+":",z,null,null,"jpeg"!=F&&"webp"!=F),M=document.createElement("select");M.style.maxWidth="260px";M.style.marginLeft="28px";"png"==F||"svg"==F?(z=function(){I.checked?+M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")},R=document.createElement("option"),R.setAttribute("value","allPages"),mxUtils.write(R,mxResources.get("allPages")),M.appendChild(R),R=document.createElement("option"),R.setAttribute("value","currentPage"),mxUtils.write(R,mxResources.get("currentPage")),M.appendChild(R),I.style.marginBottom="12px",M.style.marginBottom="16px",E.appendChild(M),mxUtils.br(E),U+=20,null!=this.lastEmbedInclude&&(M.value=this.lastEmbedInclude),mxEvent.addListener(I,+"change",z),z()):I.style.marginBottom="16px";var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");e&&(P.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,E.appendChild(P),mxUtils.write(E,mxResources.get("embedImages")),mxUtils.br(E),S.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,+E.appendChild(S),mxUtils.write(E,mxResources.get("embedFonts")),mxUtils.br(E),U+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));V.appendChild(t);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));V.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");+mxUtils.write(z,mxResources.get("openInThisWindow"));V.appendChild(z);z=document.createElement("div");mxUtils.write(z,mxResources.get("LinksLost"));z.style.margin="7px";z.style.display="none";"svg"==F&&(mxUtils.write(E,mxResources.get("links")+":"),E.appendChild(V),E.appendChild(z),mxUtils.br(E),mxUtils.br(E),U+=50);f=new CustomDialog(this,E,mxUtils.bind(this,function(){this.lastExportBorder=m.value;this.lastExportZoom=Q.value;this.lastEmbedImages=P.checked;this.lastEmbedFonts=S.checked;this.lastEmbedInclude=+M.value;n(Q.value,T.checked,!u.checked,v.checked,I.checked,P.checked&&e,m.value,A.checked,("png"==F||"svg"==F)&&"currentPage"==M.value,V.value,null!=G?G.checked:null,null!=k?k.value:null,B.value,S.checked)}),null,f,p);this.showDialog(f.container,340,U,!0,!0,null,null,null,null,!0);Q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,f,p,n){var t=document.createElement("div");t.style.whiteSpace=+"nowrap";var z=this.editor.graph;if(null!=e){var F=document.createElement("h3");mxUtils.write(F,e);F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(F)}var C=this.addCheckbox(t,mxResources.get("fit"),!0),E=this.addCheckbox(t,mxResources.get("shadow"),z.shadowVisible&&p,!p),R=this.addCheckbox(t,f),U=this.addCheckbox(t,mxResources.get("lightbox"),!0),O=this.addEditButton(t,U),Q=O.getEditInput(),m=1<z.model.getChildCount(z.model.getRoot()),u=this.addCheckbox(t,+mxResources.get("layers"),m,!m);u.style.marginLeft=Q.style.marginLeft;u.style.marginBottom="12px";u.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?(m&&u.removeAttribute("disabled"),Q.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"));Q.checked&&U.checked?O.getEditSelect().removeAttribute("disabled"):O.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,t,mxUtils.bind(this,function(){c(C.checked,+E.checked,R.checked,U.checked,O.getLink(),u.checked)}),null,mxResources.get("embed"),n);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,f,p,n,t,z,F){function C(Q){var m=" ",u="";p&&(m=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"++EditorUi.lightboxHost+"/?client=1"+(null!=R?"&page="+R:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",u+="cursor:pointer;");c&&(u+="max-width:100%;");var A="";f&&(A=' width="'+Math.round(E.width)+'" height="'+Math.round(E.height)+'"');z('<img src="'+Q+'"'+A+(""!=u?' style="'+u+'"':"")+m+"/>")}var E=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Q){var m=p?this.getFileData(!0):null;Q=+this.createImageDataUri(Q,m,"png");C(Q)}),null,null,null,mxUtils.bind(this,function(Q){F({message:mxResources.get("unknownError")})}),null,!0,f?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),E.width*E.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var U="";f&&(U="&w="+Math.round(2*E.width)+"&h="+Math.round(2*E.height));var O=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(p?"1":"0")+U+"&xml="+encodeURIComponent(e));O.send(mxUtils.bind(this,function(){200<=O.getStatus()&&+299>=O.getStatus()?C("data:image/png;base64,"+O.getText()):F({message:mxResources.get("unknownError")})}))}else F({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,f,p,n,t,z){var F=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!f,"auto"),C=F.getElementsByTagName("a");if(null!=C)for(var E=0;E<C.length;E++){var R=C[E].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==C[E].getAttribute("target")&&C[E].removeAttribute("target")}p&&+F.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(F);if(f){var U=" ",O="";p&&(U="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(n?"&edit=_blank":"")+(t?"&layers=1":+"")+"');}})(this);\"",O+="cursor:pointer;");c&&(O+="max-width:100%;");this.editor.convertImages(F,mxUtils.bind(this,function(Q){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Q))+'"'+(""!=O?' style="'+O+'"':"")+U+"/>")}))}else O="",p&&(e=this.getSelectedPageIndex(),F.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"++EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),O+="cursor:pointer;"),c&&(c=parseInt(F.getAttribute("width")),n=parseInt(F.getAttribute("height")),F.setAttribute("viewBox","-0.5 -0.5 "+c+" "+n),O+="max-width:100%;max-height:"+n+"px;",F.removeAttribute("height")),""!=O&&F.setAttribute("style",O),this.editor.addFontCss(F),this.editor.graph.mathEnabled&&this.editor.addMathCss(F),z(mxUtils.getXml(F))};EditorUi.prototype.timeSince=function(c){c=+Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var f=null;if("diagram"==c.nodeName)f=+c;else if("mxfile"==c.nodeName){var p=c.getElementsByTagName("diagram");if(0<p.length){f=p[0];var n=e.getGlobalVariable;e.getGlobalVariable=function(t){return"page"==t?f.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==t?1:n.apply(this,arguments)}}}null!=f&&(c=Editor.parseDiagramNode(f))}p=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(t){}finally{this.editor.graph=p}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};+EditorUi.prototype.getPngFileProperties=function(c){var e=1,f=0;if(null!=c){if(c.hasAttribute("scale")){var p=parseFloat(c.getAttribute("scale"));!isNaN(p)&&0<p&&(e=p)}c.hasAttribute("border")&&(p=parseInt(c.getAttribute("border")),!isNaN(p)&&0<p&&(f=p))}return{scale:e,border:f}};EditorUi.prototype.getEmbeddedPng=function(c,e,f,p,n){try{var t=this.editor.graph,z=null;if(null!=f&&0<f.length)t=this.createTemporaryGraph(t.getStylesheet()),document.body.appendChild(t.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,+!0),t),z=f;else if(null!=this.pages&&this.currentPage!=this.pages[0]){t=this.createTemporaryGraph(t.getStylesheet());var F=t.getGlobalVariable;t.setBackgroundImage=this.editor.graph.setBackgroundImage;var C=this.pages[0];this.currentPage==C?t.setBackgroundImage(this.editor.graph.backgroundImage):null!=C.viewState&&null!=C.viewState&&t.setBackgroundImage(C.viewState.backgroundImage);t.getGlobalVariable=function(E){return"page"==E?C.getName():"pagenumber"==E?1:F.apply(this,arguments)};document.body.appendChild(t.container);+t.model.setRoot(C.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(E){try{null==z&&(z=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var R=E.toDataURL("image/png");R=Editor.writeGraphModelToPng(R,"tEXt","mxfile",encodeURIComponent(z));c(R.substring(R.lastIndexOf(",")+1));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container)}catch(U){null!=e&&e(U)}}),null,null,null,mxUtils.bind(this,function(E){null!=e&&e(E)}),null,null,p,null,t.shadowVisible,null,t,n,null,+null,null,"diagram",null)}catch(E){null!=e&&e(E)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,f,p,n,t,z,F,C,E,R,U,O){F=null!=F?F:!0;R=null!=R?R:0;z=null!=C?C:e.background;z==mxConstants.NONE&&(z=null);null==z&&"none"==e.getAdaptiveColors()&&(z="#ffffff");C=this.editor.graph.createSvgImageExport(null!=c);t=e.getSvg(z,E,R,null,null,t,null,C,null,e.shadowVisible||U,null,O,"diagram");(e.shadowVisible||U)&&e.addSvgShadow(t,null,null,0==R);null!=c&&t.setAttribute("content",c);null!=f&&t.setAttribute("resource",+f);var Q=mxUtils.bind(this,function(m){m=(p?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(m);null!=n&&n(m);return m});e.mathEnabled&&this.editor.addMathCss(t);if(null!=n)this.embedFonts(t,mxUtils.bind(this,function(m){F?this.editor.convertImages(m,mxUtils.bind(this,function(u){Q(u)})):Q(m)}));else return Q(t)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(f){try{null!=f&&this.editor.addFontCss(c,f),e(c)}catch(p){e(c)}}))}catch(f){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,f,p,n,t,z,F,C,E,R,U,O){C=null!=C?C:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(m){Editor.addRetryToError(m,mxUtils.bind(this,function(){this.exportImage(c,e,f,p,n,t,z,F,C,E,R,U,O)}));this.handleError(m)}))){var Q=this.editor.graph.isSelectionEmpty();+f=null!=f?f:Q;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(m){this.spinner.stop();try{this.saveCanvas(m,n?this.getFileData(!0,null,null,null,f,F,null,null,null,null,null,c,t):null,C,null==this.pages||0==this.pages.length,R)}catch(u){this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,f,c||1,e,p,null,null,t,z,E,U,O)}catch(m){this.spinner.stop(),this.handleError(m)}}};+EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)c[this.pages[e].getId()]=this.pages[e].getId();return c};EditorUi.prototype.importXml=function(c,e,f,p,n,t,z){e=null!=e?e:0;f=null!=f?f:0;var F=[];try{var C=this.editor.graph;if(null!=c&&0<c.length){C.model.beginUpdate();try{var E=mxUtils.parseXml(c);c={};var R=this.editor.extractGraphModel(E.documentElement,+null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var U=R.getElementsByTagName("diagram");if(1==U.length&&!t){if(R=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(c[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var O=U[0].getAttribute("name");null!=O&&""!=O&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,O))}}else if(0<U.length){t=[];var Q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[U[0].getAttribute("id")]=+this.pages[0].getId(),O=U[0].getAttribute("name"),null!=O&&""!=O&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],O)),R=Editor.parseDiagramNode(U[0]),p=!1,Q=1);for(;Q<U.length;Q++){var m=U[Q].getAttribute("id");U[Q].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(U[Q]));c[m]=U[Q].getAttribute("id");var A=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[A+1]));C.model.execute(new ChangePage(this,u,u,A,!0));t.push(u)}this.updatePageLinks(c,+t)}}if(null!=R&&"mxGraphModel"===R.nodeName){F=C.importGraphModel(R,e,f,p);if(null!=F)for(this.addLocalPagesToMapping(c),Q=0;Q<F.length;Q++)this.updatePageLinksForCell(c,F[Q]);var B=C.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=B&&null!=B.originalSrc){this.updateBackgroundPageLink(c,B);var H=new ChangePageSetup(this,null,B);H.ignoreColor=!0;C.model.execute(H)}}z&&C.pasteCellStyles(C.includeDescendants(F),C.defaultVertexStyle,C.defaultEdgeStyle)}finally{C.model.endUpdate()}}}catch(T){if(n)throw T;+this.handleError(T)}return F};EditorUi.prototype.updatePageLinks=function(c,e){for(var f=0;f<e.length;f++)this.updatePageLinksForCell(c,e[f].root),null!=e[f].viewState&&this.updateBackgroundPageLink(c,e[f].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var f=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=f&&(e.originalSrc="data:page/id,"+f)}}catch(p){}};EditorUi.prototype.updatePageLinksForCell=+function(c,e){var f=document.createElement("div"),p=this.editor.graph,n=p.getLinkForCell(e);null!=n&&p.setLinkForCell(e,this.updatePageLink(c,n));if(p.isHtmlLabel(e)){f.innerHTML=Graph.sanitizeHtml(p.getLabel(e));for(var t=f.getElementsByTagName("a"),z=!1,F=0;F<t.length;F++)n=t[F].getAttribute("href"),null!=n&&(t[F].setAttribute("href",this.updatePageLink(c,n)),z=!0);z&&p.labelChanged(e,f.innerHTML)}for(F=0;F<p.model.getChildCount(e);F++)this.updatePageLinksForCell(c,p.model.getChildAt(e,F))};EditorUi.prototype.updatePageLink=+function(c,e){if(Graph.isPageLink(e)){var f=c[e.substring(e.indexOf(",")+1)];e=null!=f?"data:page/id,"+f:null}else if("data:action/json,"==e.substring(0,17))try{var p=JSON.parse(e.substring(17));if(null!=p.actions){for(var n=0;n<p.actions.length;n++){var t=p.actions[n];if(null!=t.open&&Graph.isPageLink(t.open)){var z=t.open.substring(t.open.indexOf(",")+1);f=c[z];null!=f?t.open="data:page/id,"+f:null==this.getPageById(z)&&delete t.open}}e="data:action/json,"+JSON.stringify(p)}}catch(F){}return e};+EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,f,p,n){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=f?f(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){p=null!=p?p:c.name;var F=mxUtils.bind(this,function(E){z.clear()&&t(E)}),C=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var E=this.isRemoteVisioFormat(p);+try{var R=p.lastIndexOf(".");if(0<=R&&R<p.length)p.substring(R+1).toUpperCase();else{var U=p.lastIndexOf("/");0<=U&&U<p.length&&(p=p.substring(U+1))}}catch(Q){}if(E)if(null==VSD_CONVERT_URL||this.isOffline())F({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{E=new FormData;E.append("file1",c,p);var O=new XMLHttpRequest;O.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(p)?"?stencil=1":""));O.responseType="blob";this.addRemoteServiceSecurityCheck(O);+null!=n&&O.setRequestHeader("x-convert-custom",n);O.onreadystatechange=mxUtils.bind(this,function(){if(4==O.readyState&&z.clear())if(200<=O.status&&299>=O.status)try{var Q=O.response;if("text/xml"==Q.type){var m=new FileReader;m.onload=mxUtils.bind(this,function(u){try{e(u.target.result)}catch(A){F({message:mxResources.get("errorLoadingFile")})}});m.readAsText(Q)}else this.doImportVisio(Q,e,F,p)}catch(u){F(u)}else try{""==O.responseType||"text"==O.responseType?F({message:O.responseText}):(m=new FileReader,+m.onload=function(){try{F({message:JSON.parse(m.result).Message})}catch(u){F(u)}},m.readAsText(O.response))}catch(u){F({})}});O.send(E)}else if(z.clear())try{this.doImportVisio(c,e,F,p)}catch(Q){F(Q)}}else F({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?C():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",C,null,null,null,F))}),t)};EditorUi.prototype.importGraphML=function(c,e,f){var p=+mxUtils.bind(this,function(n){this.loadingExtensions=!1;null!=f?f(n):this.handleError(n)});this.createTimeout(null,mxUtils.bind(this,function(n){var t=mxUtils.bind(this,function(F){n.clear()&&p(F)}),z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(n.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,e,p)}catch(F){t(F)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,+mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),p)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var e=mxUtils.bind(this,function(f){this.loadingExtensions=!1;this.handleError(f)});this.createTimeout(null,mxUtils.bind(this,function(f){var p=mxUtils.bind(this,function(t){f.clear()&&e(t)}),n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(f.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),+(new VsdxExport(this)).exportCurrentDiagrams(c)||p({message:mxResources.get("unknownError")})}catch(t){p(t)}else p({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(n,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",n,null,null,null,p))}),e)}};EditorUi.prototype.convertLucidChart=function(c,e,f){var p=mxUtils.bind(this,function(n){this.loadingExtensions=!1;+null!=f?f(n):this.handleError(n)});this.createTimeout(null,mxUtils.bind(this,function(n){var t=mxUtils.bind(this,function(F){n.clear()&&p(F)}),z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(n.clear())if("undefined"!==typeof window.LucidImporter)try{var F=JSON.parse(c);e(LucidImporter.importState(F));try{if(null!=window.console&&"1"==urlParams.test){var C=[(new Date).toISOString(),"convertLucidChart",F];null!=F.state&&C.push(JSON.parse(F.state));if(null!=F.svgThumbs)for(var E=0;E<F.svgThumbs.length;E++)C.push(Editor.createSvgDataUri(F.svgThumbs[E]));+null!=F.thumb&&C.push(F.thumb);console.log.apply(console,C)}}catch(R){}}catch(R){null!=window.console&&console.error(R),t(R)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",+function(){mxscript("js/orgchart/mxOrgChartLayout.js",z,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),p)};EditorUi.prototype.createMermaidXml=function(c,e,f,p,n,t){var z=new Graph(document.createElement("div"));f=z.insertVertex(null,null,null,0,0,p,n,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+f+";");z.setAttributeForCell(f,"mermaidData",JSON.stringify({data:c,+config:e},null,2));null!=t&&z.setAttributeForCell(f,"templatePrompt",t);c=(new mxCodec).encode(z.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,e,f){var p=0,n=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(t){var z=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),F=mxUtils.bind(this,function(C){t.clear()&&f(C)});z.send(mxUtils.bind(this,function(C){if(t.isAlive())if(200<=C.getStatus()&&299>=C.getStatus())this.tryAndHandle(mxUtils.bind(this,+function(){var R=mxUtils.trim(C.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(U,O,Q){this.tryAndHandle(mxUtils.bind(this,function(){t.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",R),e(R,U,O,Q))}),F)}),F,mxUtils.bind(this,function(U){3>p++?t.clear()&&n():F(U)}))}),F);else{var E={message:mxResources.get("error")+" "+C.getStatus()};try{E=JSON.parse(C.getText()),E=E.error}catch(R){}F(E)}}),F)}),f)});n()};EditorUi.prototype.extractMermaidDeclaration=+function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var e=c.split("```");e=1<e.length?e:c.split("<pre>");e=1<e.length?e:c.split("~~~");e=1<e.length?e:c.split("%%");e=1<e.length?e:c.split("(Begins)");c=mxUtils.trim(1>=e.length?c:e[1]);e=c.split("\n");var f=1<e.length?e[1]:null;if(null!=f){var p=f.indexOf("-");0<p&&(f=f.substring(0,p))}if(0<e.length&&"mermaid"==mxUtils.trim(e[0])||null!=f&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,f))e.shift(),c=mxUtils.trim(e.join("\n")),+e=c.split("\n");f=e[0].split(" ")[0].replace(/:$/,"");p=f.indexOf("-");0<p&&(f=f.substring(0,p));try{"mindmap"==f&&2<e.length&&(c=extractMermaidMindmap(e))}catch(n){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,f)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,e,f,p,n){var t=mxUtils.bind(this,function(F){this.loadingMermaid=!1;null!=p?p(F):this.handleError(F)}),z=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig);+e.securityLevel="strict";e.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&e.flowchart&&0<=c.indexOf("$$")&&(e.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(e.theme="dark");var F=mxUtils.bind(this,function(C){try{if(mxClient.IS_IE||mxClient.IS_IE11)C=C.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var E=mxUtils.parseXml(C).getElementsByTagName("svg");if(0<E.length&&"error"!=+E[0].getAttribute("aria-roledescription")){var R=parseFloat(E[0].getAttribute("width")),U=parseFloat(E[0].getAttribute("height"));if(isNaN(R)||isNaN(U))try{var O=E[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(O[2]);U=parseFloat(O[3])}catch(Q){R=R||100,U=U||100}f(this.convertDataUri(Editor.createSvgDataUri(C)),R,U)}else null!=n?n():p({message:mxResources.get("invalidInput")})}catch(Q){p(Q)}});mermaid.mermaidAPI.initialize(e);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),+c).then(function(C){F(C.svg)}).catch(function(C){null!=n?n(C):p(C)})}catch(C){p(C)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(F){this.importXml(F,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",z,null,null,null,t)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))};+EditorUi.prototype.generatePlantUmlImage=function(c,e,f,p){function n(F,C,E){c1=F>>2;c2=(F&3)<<4|C>>4;c3=(C&15)<<2|E>>6;c4=E&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(F){if(10>F)return String.fromCharCode(48+F);F-=10;if(26>F)return String.fromCharCode(65+F);F-=26;if(26>F)return String.fromCharCode(97+F);F-=26;return 0==F?"-":1==F?"_":"?"}var z=new XMLHttpRequest;z.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(F){r="";+for(i=0;i<F.length;i+=3)r=i+2==F.length?r+n(F.charCodeAt(i),F.charCodeAt(i+1),0):i+1==F.length?r+n(F.charCodeAt(i),0,0):r+n(F.charCodeAt(i),F.charCodeAt(i+1),F.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(z.responseType="blob");z.onload=function(F){if(200<=this.status&&300>this.status)if("txt"==e)f(this.response);else{var C=new FileReader;C.readAsDataURL(this.response);C.onloadend=function(E){var R=new Image;R.onload=function(){try{var U=R.width,O=R.height;+if(0==U&&0==O){var Q=C.result,m=Q.indexOf(","),u=decodeURIComponent(escape(atob(Q.substring(m+1)))),A=mxUtils.parseXml(u).getElementsByTagName("svg");0<A.length&&(U=parseFloat(A[0].getAttribute("width")),O=parseFloat(A[0].getAttribute("height")))}f(C.result,U,O)}catch(B){p(B)}};R.src=C.result};C.onerror=function(E){p(E)}}else p(F)};z.onerror=function(F){p(F)};z.send()};EditorUi.prototype.insertAsPreText=function(c,e,f){var p=this.editor.graph,n=null;p.getModel().beginUpdate();try{n=p.insertVertex(null,+null,"<pre>"+c+"</pre>",e,f,1,1,"text;html=1;align=left;verticalAlign=top;"),p.updateCellSize(n,!0)}finally{p.getModel().endUpdate()}return n};EditorUi.prototype.insertTextAt=function(c,e,f,p,n,t,z,F){t=null!=t?t:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(O){4==O.readyState&&200<=+O.status&&299>=O.status&&this.editor.graph.setSelectionCells(this.insertTextAt(O.responseText,e,f,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(n||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var C=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var E=Editor.extractGraphModelFromPdf(c);if(null!=E&&0<E.length)return this.importXml(E,e,f,t,!0,F)}if(Editor.isPngDataUrl(c)&&(E=Editor.extractGraphModelFromPng(c),null!=E&&0<E.length))return this.importXml(E,e,f,t,+!0,F);if("data:image/svg+xml;"==c.substring(0,19))try{E=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(E=c.substring(c.indexOf(",")+1),E=window.atob&&!mxClient.IS_SF?atob(E):Base64.decode(E,!0)):E=decodeURIComponent(c.substring(c.indexOf(",")+1));var R=this.importXml(E,e,f,t,!0,F);if(0<R.length)return R}catch(O){}this.loadImage(c,mxUtils.bind(this,function(O){if("data:"==c.substring(0,5))this.resizeImage(O,c,mxUtils.bind(this,function(u,A,B){C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),+C.snap(f),A,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(u)+";"))}),z,this.maxImageSize);else{var Q=Math.min(1,Math.min(this.maxImageSize/O.width,this.maxImageSize/O.height)),m=Math.round(O.width*Q);O=Math.round(O.height*Q);C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),C.snap(f),m,O,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="++c+";"))}}),mxUtils.bind(this,function(){var O=null;C.getModel().beginUpdate();try{O=C.insertVertex(C.getDefaultParent(),null,c,C.snap(e),C.snap(f),1,1,"text;"+(p?"html=1;":"")),C.updateCellSize(O),C.fireEvent(new mxEventObject("textInserted","cells",[O]))}finally{C.getModel().endUpdate()}C.setSelectionCell(O)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,f,t,null,F);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,+function(O){this.editor.graph.setSelectionCells(this.importXml(O,e,f,t,null,F))}),mxUtils.bind(this,function(O){this.handleError(O)}));else{C=this.editor.graph;n=null;C.getModel().beginUpdate();try{n=C.insertVertex(C.getDefaultParent(),null,"",C.snap(e),C.snap(f),1,1,"text;whiteSpace=wrap;"+(p?"html=1;":""));C.fireEvent(new mxEventObject("textInserted","cells",[n]));p&&(c=C.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");n.value=c;C.updateCellSize(n);if(0<this.maxTextWidth&&+n.geometry.width>this.maxTextWidth){var U=C.getPreferredSizeForCell(n,this.maxTextWidth);n.geometry.width=U.width;n.geometry.height=U.height}Graph.isLink(n.value)&&C.setLinkForCell(n,n.value);n.geometry.width+=C.gridSize;n.geometry.height+=C.gridSize}finally{C.getModel().endUpdate()}return[n]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};EditorUi.prototype.convertDataUri=+function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var f=+document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.importFiles(f.files,null,null,this.maxImageSize),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.importFileInputElt=f}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(z,F){StorageFile.listFiles(this,"F",z,F)});window.openBrowserFile=+mxUtils.bind(this,function(z,F,C){StorageFile.getFileContent(this,z,F,C)});window.deleteBrowserFile=mxUtils.bind(this,function(z,F,C){StorageFile.deleteFile(this,z,F,C)});if(!e){var p=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(z){this.hideDialog(z)}));window.openFile.setConsumer(mxUtils.bind(this,function(z,F){null!=F&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(F)?(z=new Blob([z],{type:"application/octet-stream"}),this.importVisio(z,+mxUtils.bind(this,function(C){this.importXml(C,0,0,!0)}),null,F)):this.editor.graph.setSelectionCells(this.importXml(z,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var n=this.dialog,t=n.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=p;t.apply(n,arguments);z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=+function(c,e,f){var p=this,n=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(t){if(mxUtils.isEmptyObject(t.files))f();else{var z=0,F,C=!1;t.forEach(function(E,R){E=R.name.toLowerCase();"diagram/diagram.xml"==E?(C=!0,R.async("string").then(function(U){0==U.indexOf("<mxfile ")?e(U):f()})):0==E.indexOf("versions/")&&(E=parseInt(E.substr(9)),E>z&&(z=E,F=R))});0<z?F.async("string").then(function(E){(new XMLHttpRequest).upload&&p.isRemoteFileFormat(E,+c.name)?p.isOffline()?p.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f):p.parseFileData(E,mxUtils.bind(this,function(R){4==R.readyState&&(200<=R.status&&299>=R.status?e(R.responseText):f())}),c.name):f()}):C||f()}},function(t){f(t)}):f()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",n,null,null,null,f))};EditorUi.prototype.importFile=function(c,e,f,p,n,t,z,+F,C,E,R,U){E=null!=E?E:!0;var O=!1,Q=null,m=mxUtils.bind(this,function(u){var A=null;null!=u&&"<mxlibrary"==u.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,u,z)),this.showSidebar()):A=this.importXml(u,f,p,E,null,null!=U?mxEvent.isControlDown(U):null);null!=F&&F(A)});"image"==e.substring(0,5)?(C=!1,"image/png"==e.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(c),null!=R&&0<R.length&&(Q=this.importXml(R,f,p,E,null,null!=U?mxEvent.isControlDown(U):null),C=!0)),C||(C=this.editor.graph,+R=c.indexOf(";"),0<R&&(c=c.substring(0,R)+c.substring(c.indexOf(",",R+1))),E&&C.isGridEnabled()&&(f=C.snap(f),p=C.snap(p)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==e.substring(0,9)&&(R+="editableCssRules=.*;"),Q=[C.insertVertex(null,null,"",f,p,n,t,R+"image="+c+";")])):/(\.*<graphml )/.test(c)?(O=!0,this.importGraphML(c,m)):null!=C&&null!=z&&EditorUi.isVisioFilename(z)?(O=!0,this.importVisio(C,m)):(new XMLHttpRequest).upload&&+this.isRemoteFileFormat(c,z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(O=!0,e=mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?m(u.responseText):null!=F&&(F(null),this.showError(mxResources.get("error"),413==u.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,e,z):this.parseFile(C,e,z)):0==c.indexOf("PK")&&null!=C?(O=!0,this.importZipFile(C,m,mxUtils.bind(this,function(){Q=+this.insertTextAt(this.validateFileData(c),f,p,!0,null,E);F(Q)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(Q=this.insertTextAt(this.validateFileData(c),f,p,!0,null,E,null,null!=U?mxEvent.isControlDown(U):null));O||null==F||F(Q);return Q};EditorUi.prototype.importFiles=function(c,e,f,p,n,t,z,F,C,E,R,U,O){p=null!=p?p:this.maxImageSize;E=null!=E?E:this.maxImageBytes;var Q=null!=e&&null!=f,m=!0;e=null!=e?e:0;f=null!=f?f:0;var u=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var A=R||+this.resampleThreshold,B=0;B<c.length;B++)if("image/svg"!==c[B].type.substring(0,9)&&"image/"===c[B].type.substring(0,6)&&c[B].size>A){u=!0;break}var H=mxUtils.bind(this,function(){var T=this.editor.graph,k=T.gridSize;n=null!=n?n:mxUtils.bind(this,function(S,V,W,X,Z,Y,ba,ea,ca){try{if(null!=S&&"<mxlibrary"==S.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,S,ba)),this.showSidebar(),null;this.isCompatibleString(S)&&1==c.length&&null!=O&&"drop"==O.type&&this.isBlankFile()&&+!this.canUndo()&&(Q=!1,X=W=0);return this.importFile(S,V,W,X,Z,Y,ba,ea,ca,Q,U,O)}catch(fa){return this.handleError(fa),null}});t=null!=t?t:mxUtils.bind(this,function(S){T.setSelectionCells(S)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var v=c.length,G=v,I=[],M=mxUtils.bind(this,function(S,V){I[S]=V;if(0==--G){this.spinner.stop();if(null!=F)F(I);else{var W=[];T.getModel().beginUpdate();try{for(S=0;S<I.length;S++){var X=I[S]();null!=X&&(W=W.concat(X))}}finally{T.getModel().endUpdate()}}t(W)}}),+P=0;P<v;P++)mxUtils.bind(this,function(S){var V=c[S];if(null!=V){var W=new FileReader;W.onload=mxUtils.bind(this,function(X){if(null==z||z(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Z=Graph.clipSvgDataUri(X.target.result),Y=Z.indexOf(","),ba=decodeURIComponent(escape(atob(Z.substring(Y+1)))),ea=mxUtils.parseXml(ba),ca=ea.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],aa=U?null:fa.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&+(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,14)?M(S,mxUtils.bind(this,function(){try{if(null!=ea){var pa=ea.getElementsByTagName("svg");if(0<pa.length){var na=pa[0],ia=na.getAttribute("width"),wa=na.getAttribute("height");ia=null!=ia&&"%"!=ia.charAt(ia.length-1)?parseFloat(ia):NaN;wa=null!=wa&&"%"!=wa.charAt(wa.length-1)?parseFloat(wa):NaN;var ua=na.getAttribute("viewBox");+if(null==ua||0==ua.length)na.setAttribute("viewBox","0 0 "+ia+" "+wa);else if(isNaN(ia)||isNaN(wa)){var va=ua.split(" ");3<va.length&&(ia=parseFloat(va[2]),wa=parseFloat(va[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(na));var Ca=Math.min(1,Math.min(p/Math.max(1,ia)),p/Math.max(1,wa)),ja=n(Z,V.type,e+S*k,f+S*k,Math.max(1,Math.round(ia*Ca)),Math.max(1,Math.round(wa*Ca)),V.name);if(null!=ja&&(isNaN(ia)||isNaN(wa))){var oa=new Image;oa.onload=mxUtils.bind(this,function(){ia=Math.max(1,oa.width);wa=+Math.max(1,oa.height);ja[0].geometry.width=ia;ja[0].geometry.height=wa;na.setAttribute("viewBox","0 0 "+ia+" "+wa);Z=Editor.createSvgDataUri(mxUtils.getXml(na));var ma=Z.indexOf(";");0<ma&&(Z=Z.substring(0,ma)+Z.substring(Z.indexOf(",",ma+1)));T.setCellStyles("image",Z,[ja[0]])});oa.src=Editor.createSvgDataUri(mxUtils.getXml(na))}return ja}}}catch(ma){}return null})):M(S,mxUtils.bind(this,function(){return n(aa,"text/xml",e+S*k,f+S*k,0,0,V.name)}))}else M(S,mxUtils.bind(this,function(){return null}))}else{Y=+!1;if("image/png"==V.type){var da=U?null:this.extractGraphModelFromPng(X.target.result);if(null!=da&&0<da.length){var ha=new Image;ha.src=X.target.result;M(S,mxUtils.bind(this,function(){return n(da,"text/xml",e+S*k,f+S*k,ha.width,ha.height,V.name)}));Y=!0}}Y||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):+this.loadImage(X.target.result,mxUtils.bind(this,function(pa){this.resizeImage(pa,X.target.result,mxUtils.bind(this,function(na,ia,wa){M(S,mxUtils.bind(this,function(){if(null!=na&&na.length<E){var ua=m&&this.isResampleImageSize(V.size,R)?Math.min(1,Math.min(p/ia,p/wa)):1;return n(na,V.type,e+S*k,f+S*k,Math.round(ia*ua),Math.round(wa*ua),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),m,p,R,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=+X.target.result,n(Z,V.type,e+S*k,f+S*k,240,160,V.name,function(pa){M(S,function(){return pa})},V)}catch(pa){M(S,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(pa,V)}else M(S,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?n(null,V.type,e+S*k,f+S*k,240,160,V.name,function(X){M(S,function(){return X})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?W.readAsDataURL(V):W.readAsText(V)}})(P)});if(u){u=[];for(B=0;B<c.length;B++)u.push(c[B]);+c=u;this.confirmImageResize(function(T){m=T;H()},C)}else H()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},p=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,n=function(t,z){if(t||e)mxSettings.setResizeImages(t?+z:null),mxSettings.save();f();c(z)};null==p||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(t){n(t,!0)},function(t){n(t,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):n(!1,p)};EditorUi.prototype.parseFile=function(c,e,+f){f=null!=f?f:c.name;var p=new FileReader;p.onload=mxUtils.bind(this,function(){this.parseFileData(p.result,e,f)});p.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,f){var p=new XMLHttpRequest;p.open("POST",OPEN_URL);p.setRequestHeader("Content-Type","application/x-www-form-urlencoded");p.onreadystatechange=function(){e(p)};p.send("format=xml&filename="+encodeURIComponent(f)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(n){}};+EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,f,p,n,t,z){n=null!=n?n:this.maxImageSize;var F=Math.max(1,c.width),C=Math.max(1,c.height),E=e;if(p&&this.isResampleImageSize(null!=z?z:e.length,t))try{var R=Math.max(F/n,C/n);if(1<R){var U=Math.round(F/R),O=Math.round(C/R),Q=document.createElement("canvas");Q.width=U;Q.height=O;Q.getContext("2d").drawImage(c,0,0,U,O);var m=Q.toDataURL();if(m.length<e.length){var u=+document.createElement("canvas");u.width=U;u.height=O;var A=u.toDataURL();m!==A&&(e=m,F=U,C=O)}}}catch(B){}p&&E!=e&&n>this.maxImageSize/2&&e.length>this.maxImageBytes?this.resizeImage(c,e,f,p,n/1.5,t,z):f(e,F,C)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,f){try{var p=new Image;p.onload=function(){p.width=0<p.width?p.width:120;p.height=0<p.height?p.height:120;e(p)};null!=f&&(p.onerror=f);p.src=c}catch(n){if(null!=+f)f(n);else throw n;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var q=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());q.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&+null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var y=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,e=this.editor.graph,f=e.isEnabled;e.isEnabled=function(){return f.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(k){var v=k.getEvent();return null==k.getState()&&!mxEvent.isMouseEvent(v)&&+!e.freehand.isDrawing()||mxEvent.isPopupTrigger(v)&&(null==k.getState()||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v))});e.cellEditor.editPlantUmlData=function(k,v,G){var I=JSON.parse(G);v=new TextareaDialog(c,mxResources.get("plantUml")+":",I.data,function(M){null!=M&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(M,I.format,function(P,S,V){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==I.format)e.labelChanged(k,"<pre>"+P+"</pre>"),e.updateCellSize(k,+!0);else{e.setCellStyles("image",c.convertDataUri(P),[k]);var W=e.model.getGeometry(k);null!=W&&(W=W.clone(),W.width=S,W.height=V,e.cellsResized([k],[W],!1))}e.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:M,format:I.format}))}finally{e.getModel().endUpdate()}},function(P){c.handleError(P)})},null,null,400,220);c.showDialog(v.container,420,300,!0,!0);v.init()};e.cellEditor.editMermaidData=function(k,v,G){var I=JSON.parse(G);v=new TextareaDialog(c,mxResources.get("mermaid")+":",I.data,+function(M){null!=M&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(M,I.config,function(P,S,V){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",P,[k]);var W=e.model.getGeometry(k);null!=W&&(W=W.clone(),W.width=Math.max(W.width,S),W.height=Math.max(W.height,V),e.cellsResized([k],[W],!1));e.setAttributeForCell(k,"mermaidData",JSON.stringify({data:M,config:I.config},null,2))}finally{e.getModel().endUpdate()}},function(P){c.handleError(P)})},+null,null,400,220);c.showDialog(v.container,420,300,!0,!0);v.init()};var p=e.cellEditor.startEditing;e.cellEditor.startEditing=function(k,v){try{var G=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=G)this.editPlantUmlData(k,v,G);else if(G=this.graph.getAttributeForCell(k,"mermaidData"),null!=G&&window.isMermaidEnabled)this.editMermaidData(k,v,G);else{var I=e.getCellStyle(k);"1"==mxUtils.getValue(I,"metaEdit","0")?c.showDataDialog(k):p.apply(this,arguments)}}catch(M){c.handleError(M)}};+e.getLinkTitle=function(k){return c.getLinkTitle(k)};e.customLinkClicked=function(k,v){var G=!1;try{var I=this.getGraphBounds();c.handleCustomLink(k,v);G=!0;c.chromelessResize&&!I.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(v))}catch(M){c.handleError(M)}return G};var n=e.parseBackgroundImage;e.parseBackgroundImage=function(k){var v=n.apply(this,arguments);null!=v&&null!=v.src&&Graph.isPageLink(v.src)&&(v={originalSrc:v.src});return v};var t=e.setBackgroundImage;e.setBackgroundImage=+function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));t.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,v){k=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=k){var G=k.indexOf(",");if(0<G)for(k=k.substring(G++1),v=v.getProperty("patches"),G=0;G<v.length;G++)if(null!=v[G][EditorUi.DIFF_UPDATE]&&null!=v[G][EditorUi.DIFF_UPDATE][k]||null!=v[G][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(v[G][EditorUi.DIFF_REMOVE],k)){e.refreshBackgroundImage();break}}}));var z=e.getBackgroundImageObject;e.getBackgroundImageObject=function(k,v){var G=z.apply(this,arguments);null!=G&&null!=G.originalSrc&&(G=v?c.createImageForPageLink(G.originalSrc,null,null,!0):{src:G.originalSrc});return G};this.isOffline()||"undefined"===typeof window.EditDataDialog||+(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var F=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return F.apply(this,arguments)};var C=e.addClickHandler;e.addClickHandler=function(k,v,G){var I=v;v=+function(M,P,S){if(null==P){var V=mxEvent.getSource(M);"a"==V.nodeName.toLowerCase()&&(P=V.getAttribute("href"))}null!=P&&e.isCustomLink(P)&&(mxEvent.isTouchEvent(M)||!mxEvent.isPopupTrigger(M))&&e.customLinkClicked(P,S)&&mxEvent.consume(M);null!=I&&I(M,P,S)};C.call(this,k,v,G)};y.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var E=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,v,G){e.isSelectionEmpty()&&+"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,G);E.apply(this,arguments);e.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,G);e.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,G)};var R=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,v,G){if(c.editor.graph.isSelectionEmpty())R.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],+null,G);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,v,G):this.addPopupMenuArrangeItems(k,v,G),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,G),this.isShowCellEditItems()||this.addPopupDeleteItem(k,v,G),this.addMenuItems(k,["lockUnlock","-"],null,G),!this.isShowStyleItems()){if(1==e.getSelectionCount()&&!e.isCellLocked(v)&&e.isCellEditable(v)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),e.getModel().isEdge(v))){this.addSubmenu("line",+k);var I=e.getModel().getGeometry(v);null!=I&&null!=I.points&&0<I.points.length&&this.addMenuItems(k,["clearWaypoints"],null,G)}1==e.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,G);I=c.getSelectionState();null!=I.mergeCell?this.addMenuItem(k,"mergeCells"):(1<I.style.colspan||1<I.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=+function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var U=e.getExportVariables;e.getExportVariables=function(){var k=U.apply(this,arguments),v=c.getCurrentFile();null!=v&&(k.filename=v.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?+mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var O=e.getGlobalVariable;e.getGlobalVariable=function(k){var v=c.getCurrentFile();return"filename"==k&&null!=v?v.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:O.apply(this,arguments)};var Q=null,m=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),+v=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;Q!=v&&k==m&&(e.invalidateDescendantsWithPlaceholders(e.model.getRoot()),e.view.validate());Q=v;m=k}));var u=e.labelLinkClicked;e.labelLinkClicked=function(k,v,G){var I=v.getAttribute("href");if(null==I||!e.isCustomLink(I)||!mxEvent.isTouchEvent(G)&&mxEvent.isPopupTrigger(G))u.apply(this,arguments);else{if(!e.isEnabled()||null!=k&&e.isCellLocked(k.cell))e.customLinkClicked(I),e.getRubberband().reset();mxEvent.consume(G)}};this.editor.getOrCreateFilename=+function(){var k=c.defaultFilename,v=c.getCurrentFile();null!=v&&(k=null!=v.getTitle()?v.getTitle():k);return k};var A=this.actions.get("print");A.setEnabled(!mxClient.IS_IOS||!navigator.standalone);A.visible=A.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]=-"synchronize","1"==urlParams.embedInline&&e.addListener(mxEvent.ESCAPE,function(q,F){null!=F&&e.isEnabled()&&!e.isEditing()&&null!=F.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(q){var F=e.cellEditor.text2,-J=null;null!=F&&(mxEvent.addListener(F,"dragleave",function(L){null!=J&&(J.parentNode.removeChild(J),J=null);L.stopPropagation();L.preventDefault()}),mxEvent.addListener(F,"dragover",mxUtils.bind(this,function(L){null==J&&(!mxClient.IS_IE||10<document.documentMode)&&(J=this.highlightElement(F));L.stopPropagation();L.preventDefault()})),mxEvent.addListener(F,"drop",mxUtils.bind(this,function(L){null!=J&&(J.parentNode.removeChild(J),J=null);if(0<L.dataTransfer.files.length)this.importFiles(L.dataTransfer.files,-0,0,this.maxImageSize,function(U,V,W,X,Z,Y){e.insertImage(U,Z,Y)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var V=0;V<U.length;V++)U[V]()},mxEvent.isControlDown(L));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var Q=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Q)?this.loadImage(decodeURIComponent(Q),mxUtils.bind(this,function(U){var V=Math.max(1,U.width);U=Math.max(1,U.height);var W=this.maxImageSize;W=Math.min(1,-Math.min(W/Math.max(1,V)),W/Math.max(1,U));e.insertImage(decodeURIComponent(Q),V*W,U*W)})):document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"));L.stopPropagation();L.preventDefault()})))}));if(Editor.isSettingsEnabled()){A=-this.editor.graph.view;var H=mxSettings.getUnit();A.setUnit(H);Editor.pageSizeUnit=H==mxConstants.METERS?mxConstants.MILLIMETERS:H;A.addListener("unitChanged",function(q,F){q=F.getProperty("unit");mxSettings.setUnit(q);mxSettings.save();Editor.pageSizeUnit=q==mxConstants.METERS?mxConstants.MILLIMETERS:q});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,A.unit);+"synchronize","1"==urlParams.embedInline&&e.addListener(mxEvent.ESCAPE,function(k,v){null!=v&&e.isEnabled()&&!e.isEditing()&&null!=v.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var v=e.cellEditor.text2,+G=null;null!=v&&(mxEvent.addListener(v,"dragleave",function(I){null!=G&&(G.parentNode.removeChild(G),G=null);I.stopPropagation();I.preventDefault()}),mxEvent.addListener(v,"dragover",mxUtils.bind(this,function(I){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=this.highlightElement(v));I.stopPropagation();I.preventDefault()})),mxEvent.addListener(v,"drop",mxUtils.bind(this,function(I){null!=G&&(G.parentNode.removeChild(G),G=null);if(0<I.dataTransfer.files.length)this.importFiles(I.dataTransfer.files,+0,0,this.maxImageSize,function(P,S,V,W,X,Z){e.insertImage(P,X,Z)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var S=0;S<P.length;S++)P[S]()},mxEvent.isControlDown(I));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")){var M=I.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(M)?this.loadImage(decodeURIComponent(M),mxUtils.bind(this,function(P){var S=Math.max(1,P.width);P=Math.max(1,P.height);var V=this.maxImageSize;V=Math.min(1,+Math.min(V/Math.max(1,S)),V/Math.max(1,P));e.insertImage(decodeURIComponent(M),S*V,P*V)})):document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(I.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(I.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"));I.stopPropagation();I.preventDefault()})))}));if(Editor.isSettingsEnabled()){A=+this.editor.graph.view;var B=mxSettings.getUnit();A.setUnit(B);Editor.pageSizeUnit=B==mxConstants.METERS?mxConstants.MILLIMETERS:B;A.addListener("unitChanged",function(k,v){k=v.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,A.unit);this.refresh()}if("1"==urlParams.styledev){A=document.getElementById("geFooter");null!=A&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),-this.styleInput.value)})),A.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(q,F){0<this.editor.graph.getSelectionCount()?(q=this.editor.graph.getSelectionCell(),q=this.editor.graph.getModel().getStyle(q),this.styleInput.value=q||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var R=this.isSelectionAllowed;this.isSelectionAllowed=function(q){return mxEvent.getSource(q)==this.styleInput?-!0:R.apply(this,arguments)}}A=document.getElementById("geInfo");null!=A&&A.parentNode.removeChild(A);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var g=null;mxEvent.addListener(e.container,"dragleave",function(q){e.isEnabled()&&(null!=g&&(g.parentNode.removeChild(g),g=null),q.stopPropagation(),q.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(q){null==g&&(!mxClient.IS_IE||10<document.documentMode)&&(g=this.highlightElement(e.container));-null!=this.sidebar&&this.sidebar.hideTooltip();q.stopPropagation();q.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(q){null!=g&&(g.parentNode.removeChild(g),g=null);if(e.isEnabled()){var F=mxUtils.convertPoint(e.container,mxEvent.getClientX(q),mxEvent.getClientY(q)),J=q.dataTransfer.files,L=e.view.translate,Q=e.view.scale,U=F.x/Q-L.x,V=F.y/Q-L.y;if(0<J.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(q)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&-this.fileLoaded(null),this.openFiles(J,!0)):(mxEvent.isAltDown(q)&&(V=U=null),this.importFiles(J,U,V,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(q),null,null,mxEvent.isShiftDown(q),q));else{mxEvent.isAltDown(q)&&(V=U=0);var W=0<=mxUtils.indexOf(q.dataTransfer.types,"text/uri-list")?q.dataTransfer.getData("text/uri-list"):null;F=this.extractGraphModelFromEvent(q,null!=this.pages);if(null!=F)e.setSelectionCells(this.importXml(F,U,V,!0));else if(0<=mxUtils.indexOf(q.dataTransfer.types,-"text/html")){var X=q.dataTransfer.getData("text/html");F=document.createElement("div");F.innerHTML=Graph.sanitizeHtml(X);var Z=null;J=F.getElementsByTagName("img");null!=J&&1==J.length?(X=J[0].getAttribute("src"),null==X&&(X=J[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||(Z=!0)):(J=F.getElementsByTagName("a"),null!=J&&1==J.length?X=J[0].getAttribute("href"):(F=F.getElementsByTagName("pre"),null!=F&&1==F.length&&(X=mxUtils.getTextContent(F[0]))));var Y=!0,ba=mxUtils.bind(this,-function(){e.setSelectionCells(this.insertTextAt(X,U,V,!0,Z,null,Y,mxEvent.isControlDown(q)))});Z&&null!=X&&X.length>this.resampleThreshold?this.confirmImageResize(function(ea){Y=ea;ba()},mxEvent.isControlDown(q)):ba()}else null!=W&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(ea){var ca=Math.max(1,ea.width);ea=Math.max(1,ea.height);var da=this.maxImageSize;da=Math.min(1,Math.min(da/Math.max(1,ca)),da/Math.max(1,ea));e.setSelectionCell(e.insertVertex(null,-null,"",U,V,ca*da,ea*da,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+W+";"))}),mxUtils.bind(this,function(ea){e.setSelectionCells(this.insertTextAt(W,U,V,!0))})):0<=mxUtils.indexOf(q.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(q.dataTransfer.getData("text/plain"),U,V,!0))}}q.stopPropagation();q.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",-mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&e.view.validateBackground()});e.addListener("enabledChanged",mxUtils.bind(this,function(){e.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var q=parseInt(this.div.offsetLeft),F=-parseInt(this.div.offsetWidth),J=c.embedViewport.x+c.embedViewport.width,L=parseInt(this.div.offsetTop),Q=parseInt(this.div.offsetHeight),U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(q,J-F))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(L,U-Q))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};-if(!this.editor.chromeless||this.editor.editable)if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme)A=Editor.currentTheme,Editor.currentTheme="",this.doSetCurrentTheme(A,mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}));A=!1;null!=urlParams.dark?A=urlParams.dark:-(A="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||A&&"auto"!=mxSettings.settings.darkMode||(A=mxSettings.settings.darkMode));"auto"==A&&this.isAutoDarkModeSupported()&&(A=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof A?"1"==A:A);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(q){this.isAutoDarkMode()&&this.setDarkMode(q.matches)}))}catch(q){this.actions.get("autoMode").setEnabled(!1)}"1"==-urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(q,F){e.enableFlowAnimation=Editor.enableAnimations;e.refresh()}));e.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&+this.styleInput.value)})),A.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(k,v){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var H=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?+!0:H.apply(this,arguments)}}A=document.getElementById("geInfo");null!=A&&A.parentNode.removeChild(A);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var T=null;mxEvent.addListener(e.container,"dragleave",function(k){e.isEnabled()&&(null!=T&&(T.parentNode.removeChild(T),T=null),k.stopPropagation(),k.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(k){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=this.highlightElement(e.container));+null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(k){null!=T&&(T.parentNode.removeChild(T),T=null);if(e.isEnabled()){var v=mxUtils.convertPoint(e.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),G=k.dataTransfer.files,I=e.view.translate,M=e.view.scale,P=v.x/M-I.x,S=v.y/M-I.y;if(0<G.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&+this.fileLoaded(null),this.openFiles(G,!0)):(mxEvent.isAltDown(k)&&(S=P=null),this.importFiles(G,P,S,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(S=P=0);var V=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;v=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=v)e.setSelectionCells(this.importXml(v,P,S,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,+"text/html")){var W=k.dataTransfer.getData("text/html");v=document.createElement("div");v.innerHTML=Graph.sanitizeHtml(W);var X=null;G=v.getElementsByTagName("img");null!=G&&1==G.length?(W=G[0].getAttribute("src"),null==W&&(W=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)||(X=!0)):(G=v.getElementsByTagName("a"),null!=G&&1==G.length?W=G[0].getAttribute("href"):(v=v.getElementsByTagName("pre"),null!=v&&1==v.length&&(W=mxUtils.getTextContent(v[0]))));var Z=!0,Y=mxUtils.bind(this,+function(){e.setSelectionCells(this.insertTextAt(W,P,S,!0,X,null,Z,mxEvent.isControlDown(k)))});X&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(ba){Z=ba;Y()},mxEvent.isControlDown(k)):Y()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(ba){var ea=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ca=this.maxImageSize;ca=Math.min(1,Math.min(ca/Math.max(1,ea)),ca/Math.max(1,ba));e.setSelectionCell(e.insertVertex(null,+null,"",P,S,ea*ca,ba*ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(ba){e.setSelectionCells(this.insertTextAt(V,P,S,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),P,S,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",+mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&e.view.validateBackground()});e.addListener("enabledChanged",mxUtils.bind(this,function(){e.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),v=+parseInt(this.div.offsetWidth),G=c.embedViewport.x+c.embedViewport.width,I=parseInt(this.div.offsetTop),M=parseInt(this.div.offsetHeight),P=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,G-v))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(I,P-M))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};+if(!this.editor.chromeless||this.editor.editable)if(A=Editor.currentTheme,"simple"==A||"sketch"==A)Editor.currentTheme="",this.doSetCurrentTheme(A,mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);A=!1;null!=urlParams.dark?A=urlParams.dark:(A="dark"==Editor.currentTheme,+!Editor.isSettingsEnabled()||"1"==urlParams.embed||A&&"auto"!=mxSettings.settings.darkMode||(A=mxSettings.settings.darkMode));"auto"==A&&this.isAutoDarkModeSupported()&&(A=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof A?"1"==A:A);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==+urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(k,v){e.enableFlowAnimation=Editor.enableAnimations;e.refresh()}));e.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts()};var x=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,e=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=e&&c<e?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<e&&c>=e&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=-c}x.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,e=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,n=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(E){mxEvent.getSource(E)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(E),mxEvent.getClientY(E)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var p=-document.createElement("div");p.style.position="absolute";p.style.width="10px";p.style.height="10px";p.style.borderRadius="5px";p.style.border="1px solid gray";p.style.background="#ffffff";p.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(p);this.bottomResizer=p;var u=null,B=null,D=null,G=null;mxEvent.addGestureListeners(p,mxUtils.bind(this,function(E){G=parseInt(this.diagramContainer.style.height);B=mxEvent.getClientY(E);n.popupMenuHandler.hideMenu();mxEvent.consume(E)}));-p=p.cloneNode(!1);p.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(p);this.rightResizer=p;mxEvent.addGestureListeners(p,mxUtils.bind(this,function(E){D=parseInt(this.diagramContainer.style.width);u=mxEvent.getClientX(E);n.popupMenuHandler.hideMenu();mxEvent.consume(E)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(E){var T=!1;null!=u&&(this.diagramContainer.style.width=Math.max(20,D+mxEvent.getClientX(E)-u)+"px",T=!0);null!=B&&(this.diagramContainer.style.height=-Math.max(20,G+mxEvent.getClientY(E)-B)+"px",T=!0);T&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(E){null==u&&null==B||mxEvent.consume(E);B=u=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=-"hidden";this.sketchMenubarElt.style.display="none";e.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(E){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(E){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=-"hidden";e.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var l=e.clipboardData||e.originalEvent.clipboardData,n=!1,p=0;p<l.types.length;p++)if("text/"===l.types[p].substring(0,5)){n=!0;break}if(!n){var u=-l.items;for(index in u){var B=u[index];if("file"===B.kind){if(c.isEditing())this.importFiles([B.getAsFile()],0,0,this.maxImageSize,function(G,E,T,O,S,k){c.insertImage(G,S,k)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var E=0;E<G.length;E++)G[E]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([B.getAsFile()],D.x,D.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(G){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML=-" ";l.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow=-"hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML=" ";var n=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(u){var B=mxEvent.getSource(u);null==e.container||!e.isEnabled()||e.isMouseDown||-e.isEditing()||null!=this.dialog||"INPUT"==B.nodeName||"TEXTAREA"==B.nodeName||"true"==B.contentEditable||224!=u.keyCode&&(mxClient.IS_MAC||17!=u.keyCode)&&(!mxClient.IS_MAC||91!=u.keyCode&&93!=u.keyCode)||n||(l.style.left=e.container.scrollLeft+10+"px",l.style.top=e.container.scrollTop+10+"px",u=e.container.scrollLeft,B=e.container.scrollTop,e.container.appendChild(l),n=!0,l.focus(),document.execCommand("selectAll",!1,null),e.container.scrollLeft=u,e.container.scrollTop=B)}));mxEvent.addListener(document,-"keyup",mxUtils.bind(this,function(u){var B=u.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=B&&17!=B&&91!=B&&93!=B||(n=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(u){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(l),c()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(u){if(e.isEnabled())try{mxClipboard.copy(e),-this.copyCells(l,!0),c()}catch(B){this.handleError(B)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(u){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent()))try{if(l.innerHTML=" ",l.focus(),null!=u.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(u,l,!0,!0)),!mxEvent.isConsumed(u)){var B=e.container.scrollLeft,D=e.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{e.container.scrollLeft=B,e.container.scrollTop=D,Graph.removePasteFormatting(l.firstChild),-this.pasteCells(u,l,!1,!0)}catch(G){this.handleError(G)}}),0)}}catch(G){this.handleError(G)}}),!0);var p=this.isSelectionAllowed;this.isSelectionAllowed=function(u){return mxEvent.getSource(u)==l?!0:p.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,e){mxSettings.setUi(c);(e=this.doSetCurrentTheme(c)||e)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=-function(c,e){function l(D){return"simple"==D||"sketch"==D}var n=Editor.currentTheme,p=l(n)&&this.isDefaultTheme(c)||this.isDefaultTheme(n)&&l(c),u=p&&"sketch"!=c&&"sketch"!=n;if(p&&!this.themeSwitching){var B=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=c;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,function(){l(n)&&this.isDefaultTheme(c)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="block",-this.tabContainer.style.display="flex",this.hsplit.style.display="block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(n)&&l(c)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=c?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display="flex");this.switchTheme(c);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));-this.editor.graph.refresh();this.restoreScrollState(B);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&l(c)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=e&&e()}),0)}return u};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate,e=this.diagramContainer.scrollLeft,l=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(e-=this.embedViewport.x,l-=this.embedViewport.y):-(e+=this.embedViewport.x,l+=this.embedViewport.y));return{x:e,y:l,tx:c.x,ty:c.y}};EditorUi.prototype.restoreScrollState=function(c){var e=this.editor.graph.view.scale,l=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*e;this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*e};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var e=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&-""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||e||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var n=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;e=null!=n&&null!=n.getAttribute("class");if(!e&&null!=n){n=-n.getAttribute("title");var p=this.getCurrentFile();p=null!=p?p.savingStatusKey:DrawioFile.prototype.savingStatusKey;n==mxResources.get(p)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(p))+'..."src="'+Editor.tailSpin+'"></div>',e=!0)}this.statusContainer.style.display="none";n=32>=c.clientWidth;c.style.visibility=n&&""==this.editor.getStatus()?"hidden":"";if(n||e)this.statusContainer.style.display="inline-flex",e=!0}else"simple"==Editor.currentTheme?-(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=+c}x.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,e=this.sketchMainMenuElt,f=this.sketchPickerMenuElt,p=this.editor.graph;f.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(E){mxEvent.getSource(E)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(E),mxEvent.getClientY(E)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var n=+document.createElement("div");n.style.position="absolute";n.style.width="10px";n.style.height="10px";n.style.borderRadius="5px";n.style.border="1px solid gray";n.style.background="#ffffff";n.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(n);this.bottomResizer=n;var t=null,z=null,F=null,C=null;mxEvent.addGestureListeners(n,mxUtils.bind(this,function(E){C=parseInt(this.diagramContainer.style.height);z=mxEvent.getClientY(E);p.popupMenuHandler.hideMenu();mxEvent.consume(E)}));+n=n.cloneNode(!1);n.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(n);this.rightResizer=n;mxEvent.addGestureListeners(n,mxUtils.bind(this,function(E){F=parseInt(this.diagramContainer.style.width);t=mxEvent.getClientX(E);p.popupMenuHandler.hideMenu();mxEvent.consume(E)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(E){var R=!1;null!=t&&(this.diagramContainer.style.width=Math.max(20,F+mxEvent.getClientX(E)-t)+"px",R=!0);null!=z&&(this.diagramContainer.style.height=+Math.max(20,C+mxEvent.getClientY(E)-z)+"px",R=!0);R&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(E){null==t&&null==z||mxEvent.consume(E);z=t=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=+"hidden";this.sketchMenubarElt.style.display="none";e.style.visibility="hidden";c.style.visibility="hidden";f.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(E){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(E){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=+"hidden";e.style.visibility="hidden";c.style.visibility="hidden";f.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var f=e.clipboardData||e.originalEvent.clipboardData,p=!1,n=0;n<f.types.length;n++)if("text/"===f.types[n].substring(0,5)){p=!0;break}if(!p){var t=+f.items;for(index in t){var z=t[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,function(C,E,R,U,O,Q){c.insertImage(C,O,Q)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var E=0;E<C.length;E++)C[E]()});else{var F=this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],F.x,F.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){f.innerHTML=+" ";f.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,f=document.createElement("div");f.setAttribute("autocomplete","off");f.setAttribute("autocorrect","off");f.setAttribute("autocapitalize","off");f.setAttribute("spellcheck","false");f.style.textRendering="optimizeSpeed";f.style.fontFamily="monospace";f.style.wordBreak="break-all";f.style.background="transparent";f.style.color="transparent";f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow=+"hidden";f.style.display="block";f.style.fontSize="1";f.style.zIndex="-1";f.style.resize="none";f.style.outline="none";f.style.width="1px";f.style.height="1px";mxUtils.setOpacity(f,0);f.contentEditable=!0;f.innerHTML=" ";var p=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(t){var z=mxEvent.getSource(t);null==e.container||!e.isEnabled()||e.isMouseDown||+e.isEditing()||null!=this.dialog||"INPUT"==z.nodeName||"TEXTAREA"==z.nodeName||"true"==z.contentEditable||224!=t.keyCode&&(mxClient.IS_MAC||17!=t.keyCode)&&(!mxClient.IS_MAC||91!=t.keyCode&&93!=t.keyCode)||p||(f.style.left=e.container.scrollLeft+10+"px",f.style.top=e.container.scrollTop+10+"px",t=e.container.scrollLeft,z=e.container.scrollTop,e.container.appendChild(f),p=!0,f.focus(),document.execCommand("selectAll",!1,null),e.container.scrollLeft=t,e.container.scrollTop=z)}));mxEvent.addListener(document,+"keyup",mxUtils.bind(this,function(t){var z=t.keyCode;window.setTimeout(mxUtils.bind(this,function(){!p||224!=z&&17!=z&&91!=z&&93!=z||(p=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),f.parentNode.removeChild(f),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(t){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(f),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(t){if(e.isEnabled())try{mxClipboard.copy(e),+this.copyCells(f,!0),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(t){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent()))try{if(f.innerHTML=" ",f.focus(),null!=t.clipboardData&&(Graph.removePasteFormatting(f.firstChild),this.pasteCells(t,f,!0,!0)),!mxEvent.isConsumed(t)){var z=e.container.scrollLeft,F=e.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{e.container.scrollLeft=z,e.container.scrollTop=F,Graph.removePasteFormatting(f.firstChild),+this.pasteCells(t,f,!1,!0)}catch(C){this.handleError(C)}}),0)}}catch(C){this.handleError(C)}}),!0);var n=this.isSelectionAllowed;this.isSelectionAllowed=function(t){return mxEvent.getSource(t)==f?!0:n.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,e){mxSettings.setUi(c);(e=this.doSetCurrentTheme(c)||e)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=+function(c,e,f){function p(F){return"simple"==F||"sketch"==F}var n=Editor.currentTheme,t="simple"==n&&this.isDefaultTheme(c)||this.isDefaultTheme(n)&&"simple"==c;if((t||f)&&!this.themeSwitching){var z=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=c;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,function(){p(n)&&this.isDefaultTheme(c)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="",this.tabContainer.style.display=+"",this.hsplit.style.display="block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(n)&&p(c)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=c?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display="");this.switchTheme(c);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));+this.editor.graph.refresh();this.restoreScrollState(z);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&p(c)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=e&&e()}),0)}return t};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate,e=this.diagramContainer.scrollLeft,f=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(e-=this.embedViewport.x,f-=this.embedViewport.y):+(e+=this.embedViewport.x,f+=this.embedViewport.y));return{x:e,y:f,tx:c.x,ty:c.y}};EditorUi.prototype.restoreScrollState=function(c){var e=this.editor.graph.view.scale,f=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=c.x+(f.x-c.tx)*e;this.diagramContainer.scrollTop=c.y+(f.y-c.ty)*e};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var e=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&+""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||e||(this.statusContainer.style.display="none")}));var f=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var p=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;e=null!=p&&null!=p.getAttribute("class");if(!e&&null!=p){p=+p.getAttribute("title");var n=this.getCurrentFile();n=null!=n?n.savingStatusKey:DrawioFile.prototype.savingStatusKey;p==mxResources.get(n)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(n))+'..."src="'+Editor.tailSpin+'"></div>',e=!0)}this.statusContainer.style.display="none";p=32>=c.clientWidth;c.style.visibility=p&&""==this.editor.getStatus()?"hidden":"";if(p||e)this.statusContainer.style.display="inline-flex",e=!0}else"simple"==Editor.currentTheme?+(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",f);f()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);this.sidebarContainer.style.display="";if("sketch"==c){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var e=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);this.createShapesWindow();this.sidebarContainer.className="";this.sidebarContainer.style.position="absolute";this.sidebarContainer.style.left="0px";this.sidebarContainer.style.top="0px";this.sidebarContainer.style.bottom=e?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(c=this.isDefaultTheme(c)||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));@@ -13355,33 +13355,33 @@ EditorUi.prototype.createWrapperForTheme=function(c){null!=this.sketchWrapperEltfunction(c){};EditorUi.prototype.createPickerMenuForTheme=function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var e=this.getCurrentFile();null!=e&&(e.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==e.sync||e.sync.enabled&&e.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==e.sync||e.sync.isConnected()?e.isRealtimeEnabled()&&e.isRealtimeSupported()&&1<e.getRealtimeState()&&(c=e.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="",this.menubar.container.appendChild(this.statusContainer));null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);c=this.menubar.langIcon;null!=c&&(c.style.position="absolute",c.style.height="18px",c.style.width="18px",c.style.flexShrink="",c.style.opacity="",this.menubarContainer.parentNode.insertBefore(c,this.menubarContainer));null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};-EditorUi.prototype.createMenu=function(c,e,l,n){l=null!=l?l:"geToolbarButton";var p=this.menus.get(c);n=this.menubar.addMenu(mxResources.get(c),p.funct,null,n);n.className=l;n.style.display="inline-block";n.style.cursor="pointer";n.style.height="24px";n.setAttribute("title",mxResources.get(c));this.menus.menuCreated(p,n,l);null!=e&&(n.style.backgroundImage="url("+e+")",n.style.backgroundPosition="center center",n.style.backgroundRepeat="no-repeat",n.style.backgroundSize="100% 100%",n.style.width=-"24px",n.innerText="");return n};EditorUi.prototype.createToolbarButton=function(c,e,l,n){n=null!=n?n:24;var p=document.createElement("a");p.className="geToolbarButton geAdaptiveAsset";p.setAttribute("title",e);p.style.backgroundImage="url("+c+")";p.style.backgroundPosition="center center";p.style.backgroundRepeat="no-repeat";p.style.backgroundSize="100% 100%";p.style.display="inline-block";p.style.cursor="pointer";p.style.marginLeft="6px";p.style.width=n+"px";p.style.height=n+"px";p.style.flexShrink=-"0";p.style.flexGrow="0";null!=l&&(mxEvent.addListener(p,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(u){u.preventDefault()})),mxEvent.addListener(p,"click",function(u){"disabled"!=p.getAttribute("disabled")&&l(u);mxEvent.consume(u)}));return p};EditorUi.prototype.createMenuItem=function(c,e,l){var n=this.actions.get(c),p=null!=n?n.funct:null,u=this.createToolbarButton(e,mxResources.get(c)+(null!=n&&null!=n.shortcut?" ("+n.shortcut+")":""),p);null==n||l||(c=function(){n.isEnabled()?-(u.removeAttribute("disabled"),u.style.cursor="pointer"):(u.setAttribute("disabled","disabled"),u.style.cursor="default");u.style.opacity=n.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),n.addListener("stateChanged",c),c());return u};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),e="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight--10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,e,mxUtils.bind(this,function(p){p.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var l=this.formatWindow.window.toggleMinimized,n=240;this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);this.minimized?(n=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",-this.div.style.left=parseInt(this.div.style.left)+n-140+"px"):(this.div.style.width=n+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-n+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(p){mxEvent.getSource(p)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?-(c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>c)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var C=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var e=this.formatWindow;null!=e?e.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):C.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=-function(c){if(this.isShapesPanelVisible()!=c){var e=EditorUi.prototype.hsplitPosition;0==e&&(e=this.defaultSidebarWidth);var l=this.hsplitPosition,n=mxUtils.bind(this,function(){this.hsplitPosition=p;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),p=c?e:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==p?"translateX(0)":"translateX(-100%)");0!=p&&n();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",-0==p?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==p&&n()}),-300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var K=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():K.apply(this,arguments)};var M=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=null!=c?c:!0;if("1"!=urlParams.embedInline){var e=this.container.clientWidth;this.container==-document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth);var l=this.getDiagramContainerOffset();var n=l.x;var p=l.y;"simple"==Editor.currentTheme&&(p+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=p+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,e=Math.max(0,-Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,e-this.splitSize-40))),this.sidebarContainer.style.width=e+"px",this.diagramContainer.style.left=e+n+"px",this.tabContainer.style.left=e+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=e+"px",this.diagramContainer.style.right=this.formatWidth+"px",-this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=l.x+"px",this.diagramContainer.style.right="0")}c&&this.editor.graph.sizeDidChange()}else M.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var e=mxUtils.bind(this,function(n){n=this.createMenu(n,null,"geTitle");n.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";-c.appendChild(n);return n});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))e=document.createElement("div"),e.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;",e.className="geTitle",mxUtils.write(e,mxResources.get("newLibrary")),c.appendChild(e),mxEvent.addListener(e,-"click",this.actions.get("newLibrary").funct),e=e.cloneNode(!1),e.style.left="50%",e.style.borderLeftStyle="solid",mxUtils.write(e,mxResources.get("openLibrary")),c.appendChild(e),mxEvent.addListener(e,"click",this.actions.get("openLibrary").funct);else{var l=e("newLibrary");l.style.fontSize="11px";l.style.left="0";l=e("openLibraryFrom");l.style.borderLeftStyle="solid";l.style.fontSize="11px";l.style.left="50%"}c.appendChild(this.sidebarContainer);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=-function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),e="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-e)/2):56,c-6,e-6,mxUtils.bind(this,function(n){this.createShapesPanel(n)}));+EditorUi.prototype.createMenu=function(c,e,f,p){f=null!=f?f:"geToolbarButton";var n=this.menus.get(c);p=this.menubar.addMenu(mxResources.get(c),n.funct,null,p);p.className=f;p.style.display="inline-block";p.style.cursor="pointer";p.style.height="24px";p.setAttribute("title",mxResources.get(c));this.menus.menuCreated(n,p,f);null!=e&&(p.style.backgroundImage="url("+e+")",p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="100% 100%",p.style.width=+"24px",p.innerText="");return p};EditorUi.prototype.createToolbarButton=function(c,e,f,p){p=null!=p?p:24;var n=document.createElement("a");n.className="geToolbarButton geAdaptiveAsset";n.setAttribute("title",e);n.style.backgroundImage="url("+c+")";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";n.style.backgroundSize="100% 100%";n.style.display="inline-block";n.style.cursor="pointer";n.style.marginLeft="6px";n.style.width=p+"px";n.style.height=p+"px";n.style.flexShrink=+"0";n.style.flexGrow="0";null!=f&&(mxEvent.addListener(n,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(n,"click",function(t){"disabled"!=n.getAttribute("disabled")&&f(t);mxEvent.consume(t)}));return n};EditorUi.prototype.createMenuItem=function(c,e,f){var p=this.actions.get(c),n=null!=p?p.funct:null,t=this.createToolbarButton(e,mxResources.get(c)+(null!=p&&null!=p.shortcut?" ("+p.shortcut+")":""),n);null==p||f||(c=function(){p.isEnabled()?+(t.removeAttribute("disabled"),t.style.cursor="pointer"):(t.setAttribute("disabled","disabled"),t.style.cursor="default");t.style.opacity=p.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),p.addListener("stateChanged",c),c());return t};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),e="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-+10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,e,mxUtils.bind(this,function(n){n.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var f=this.formatWindow.window.toggleMinimized,p=240;this.formatWindow.window.toggleMinimized=function(){f.apply(this,arguments);this.minimized?(p=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",+this.div.style.left=parseInt(this.div.style.left)+p-140+"px"):(this.div.style.width=p+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-p+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(n){mxEvent.getSource(n)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?+(c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>c)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var D=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var e=this.formatWindow;null!=e?e.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):D.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=+function(c){if(this.isShapesPanelVisible()!=c){var e=EditorUi.prototype.hsplitPosition;0==e&&(e=this.defaultSidebarWidth);var f=this.hsplitPosition,p=mxUtils.bind(this,function(){this.hsplitPosition=n;this.refresh();this.diagramContainer.scrollLeft-=f-this.hsplitPosition}),n=c?e:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==n?"translateX(0)":"translateX(-100%)");0!=n&&p();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",+0==n?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==n&&p()}),+300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var J=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():J.apply(this,arguments)};var K=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=null!=c?c:!0;if("1"!=urlParams.embedInline){var e=this.container.clientWidth;this.container==+document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth);var f=this.getDiagramContainerOffset();var p=f.x;var n=f.y;"simple"==Editor.currentTheme&&(n+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=n+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,e=Math.max(0,+Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,e-this.splitSize-40))),this.sidebarContainer.style.width=e+"px",this.diagramContainer.style.left=e+p+"px",this.tabContainer.style.left=e+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=e+"px",this.diagramContainer.style.right=this.formatWidth+"px",+this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=f.x+"px",this.diagramContainer.style.right="0")}c&&this.editor.graph.sizeDidChange()}else K.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var e=mxUtils.bind(this,function(p){p=this.createMenu(p,null,"geTitle");p.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";+c.appendChild(p);return p});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))e=document.createElement("div"),e.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;",e.className="geTitle",mxUtils.write(e,mxResources.get("newLibrary")),c.appendChild(e),mxEvent.addListener(e,+"click",this.actions.get("newLibrary").funct),e=e.cloneNode(!1),e.style.left="50%",e.style.borderLeftStyle="solid",mxUtils.write(e,mxResources.get("openLibrary")),c.appendChild(e),mxEvent.addListener(e,"click",this.actions.get("openLibrary").funct);else{var f=e("newLibrary");f.style.fontSize="11px";f.style.left="0";f=e("openLibraryFrom");f.style.borderLeftStyle="solid";f.style.fontSize="11px";f.style.left="50%"}c.appendChild(this.sidebarContainer);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=+function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),e="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),f="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),f&&"1"!=urlParams.embedInline?66:10,f&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-e)/2):56,c-6,e-6,mxUtils.bind(this,function(p){this.createShapesPanel(p)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setAndPersistDarkMode=function(c){var e=c;"auto"==c&&(e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(e);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(c){mxSettings.setLanguage(c);mxSettings.save();mxClient.language=c;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var e=document.getElementById("high-contrast-stylesheet");-if(null!=e&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,n=e.getAttribute("media");(n="all"==n||"not all"!=n&&l)&&!c?e.setAttribute("media",l?"not all":"(forced-colors: active)"):!n&&c&&e.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var e=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&+if(null!=e&&window.matchMedia){var f=window.matchMedia("(forced-colors: active)").matches,p=e.getAttribute("media");(p="all"==p||"not all"!=p&&f)&&!c?e.setAttribute("media",f?"not all":"(forced-colors: active)"):!p&&c&&e.setAttribute("media",f?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var e=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.refresh();this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-e.x;this.diagramContainer.scrollTop+=c.x-e.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){Editor.darkMode=c;c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff";null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),c.style.colorScheme="light"));null!=this.ruler&&this.ruler.updateStyle();this.fireEvent(new mxEventObject("darkModeChanged"))};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,e){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),Editor.isSettingsEnabled()&&e&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=-function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,e=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,n=this.editor.graph;if(Editor.inlineFullscreen)e.style.left="10px",e.style.top="10px",l.style.left=-"10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width=-"",this.diagramContainer.style.height="");else{var p=this.diagramContainer.getAttribute("data-bounds");if(null!=p){this.diagramContainer.removeAttribute("data-bounds");n.getGraphBounds();var u=p.split(" ");n=mxUtils.getDocumentSize();this.diagramContainer.style.top=u[0];this.diagramContainer.style.left=u[1];p=parseInt(u[2]);u=parseInt(u[3]);p=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,p):p,n.width-80);u=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,u):u,n.height--80);this.diagramContainer.style.width=p+"px";this.diagramContainer.style.height=u+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}e.style.left=this.diagramContainer.offsetLeft+"px";e.style.top=this.diagramContainer.offsetTop-e.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=+function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,e=this.sketchMainMenuElt,f=this.sketchPickerMenuElt,p=this.editor.graph;if(Editor.inlineFullscreen)e.style.left="10px",e.style.top="10px",f.style.left=+"10px",f.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width=+"",this.diagramContainer.style.height="");else{var n=this.diagramContainer.getAttribute("data-bounds");if(null!=n){this.diagramContainer.removeAttribute("data-bounds");p.getGraphBounds();var t=n.split(" ");p=mxUtils.getDocumentSize();this.diagramContainer.style.top=t[0];this.diagramContainer.style.left=t[1];n=parseInt(t[2]);t=parseInt(t[3]);n=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,n):n,p.width-80);t=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,t):t,p.height-+80);this.diagramContainer.style.width=n+"px";this.diagramContainer.style.height=t+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}e.style.left=this.diagramContainer.offsetLeft+"px";e.style.top=this.diagramContainer.offsetTop-e.offsetHeight-4+"px";f.style.display="";f.style.left=this.diagramContainer.offsetLeft-f.offsetWidth-4+"px";f.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=e.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;e.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-@@ -13389,225 +13389,224 @@ EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defa"1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var e=Graph.prototype.getLinkTitle.apply(this,-arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(e=this.getPageById(c.substring(l+1)),e=null!=e?e.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(e=this.getCustomLinkTitle(c));return e};EditorUi.prototype.getCustomLinkTitle=function(c){var e=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));null!=l&&null!=l.title&&(e=l.title)}catch(n){}return e};EditorUi.prototype.handleCustomLink=function(c,e){if(Graph.isPageLink(c))if(e=+arguments);if(Graph.isPageLink(c)){var f=c.indexOf(",");0<f&&(e=this.getPageById(c.substring(f+1)),e=null!=e?e.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(e=this.getCustomLinkTitle(c));return e};EditorUi.prototype.getCustomLinkTitle=function(c){var e=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var f=JSON.parse(c.substring(17));null!=f&&null!=f.title&&(e=f.title)}catch(p){}return e};EditorUi.prototype.handleCustomLink=function(c,e){if(Graph.isPageLink(c))if(e=c.indexOf(","),c=this.getPageById(c.substring(e+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,e)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(e){e.key==mxSettings.key&&-(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(e){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(e,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));-this.addListener("copyConnectChanged",mxUtils.bind(this,function(e,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(e,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+-c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(e,l){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(e,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||-this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(e,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",-mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,-function(n,p){try{this.spinner.stop();var u=this.createImageDataUri(n,e,"png"),B=parseInt(p.getAttribute("width")),D=parseInt(p.getAttribute("height"));this.writeImageToClipboard(u,B,D,mxUtils.bind(this,function(G){this.handleError(G)}))}catch(G){this.handleError(G)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?-c:null)}catch(n){this.handleError(n)}};EditorUi.prototype.copyCells=function(c,e){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText="";else{var n=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),p=mxUtils.getXml(l.encodeCells(n));mxUtils.setTextContent(c,encodeURIComponent(p));e?(l.removeCells(n,!1),l.lastPasteXml=null):(l.lastPasteXml=p,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=-this.editor.graph;e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,l,n,p){p=null!=p?p:!0;var u=this.editor.graph,B=null;u.lastPasteXml==c?u.pasteCounter++:(u.lastPasteXml=c,u.pasteCounter=0);var D=u.pasteCounter*u.gridSize;if(l||this.isCompatibleString(c))B=this.importXml(c,D,D),u.setSelectionCells(B);else if(e&&1==-u.getSelectionCount()){p=u.getStartEditingCell(u.getSelectionCell(),n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==u.getCurrentCellStyle(p)[mxConstants.STYLE_SHAPE])u.setCellStyles(mxConstants.STYLE_IMAGE,c,[p]);else{u.model.beginUpdate();try{u.labelChanged(p,c),Graph.isLink(c)&&u.setLinkForCell(p,c)}finally{u.model.endUpdate()}}u.setSelectionCell(p)}else B=u.getInsertPoint(),u.isMouseInsertPoint()&&(D=0,u.lastPasteXml==c&&0<u.pasteCounter&&u.pasteCounter--),B=this.insertTextAt(c,B.x+D,-B.y+D,p),u.setSelectionCells(B);u.isSelectionEmpty()||(u.scrollCellToVisible(u.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(u.view.getState(u.getSelectionCell())));return B};EditorUi.prototype.pasteCells=function(c,e,l,n){if(!mxEvent.isConsumed(c)){var p=e,u=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var B=c.clipboardData.getData("text/plain"),D=!1;if(null!=B&&0<B.length&&"%3CmxGraphModel%3E"==B.substring(0,18))try{var G=decodeURIComponent(B);this.isCompatibleString(G)&&-(D=!0,B=G)}catch(v){}D=D?null:c.clipboardData.getData("text/html");null!=D&&0<D.length?(p=this.parseHtmlData(D),u="text/plain"!=p.getAttribute("data-type")):null!=B&&0<B.length&&(p=document.createElement("div"),mxUtils.setTextContent(p,D))}B=p.getElementsByTagName("span");if(null!=B&&0<B.length&&"application/vnd.lucid.chart.objects"===B[0].getAttribute("data-lucid-type"))l=B[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(v){var z=this.editor.graph;-z.lastPasteXml==v?z.pasteCounter++:(z.lastPasteXml=v,z.pasteCounter=0);var A=z.pasteCounter*z.gridSize;z.setSelectionCells(this.importXml(v,A,A));z.scrollCellToVisible(z.getSelectionCell())}),mxUtils.bind(this,function(v){this.handleError(v)})),mxEvent.consume(c));else{var E=!1,T="";T=u?null!=p.textContent&&"<mxfile"==p.textContent.substring(0,7)&&"</mxfile>"==p.textContent.substring(p.textContent.length-9)||"<mxGraphModel"==p.textContent.substring(0,13)&&"</mxGraphModel>"==p.textContent.substring(p.textContent.length--15)?p.textContent.replace(/\u00a0/g," "):p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var O=T.lastIndexOf("%3E");0<=O&&O<T.length-3&&(T=T.substring(0,O+3))}catch(v){}try{B=p.getElementsByTagName("span"),(G=null!=B&&0<B.length?mxUtils.trim(decodeURIComponent(B[0].textContent)):decodeURIComponent(T))&&(this.isCompatibleString(G)||0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(E=!0,T=G)}catch(v){}try{if(null!=T&&0<T.length){if(0==T.substring(0,-20).replace(/\s/g,"").indexOf('{"isProtected":')){var S=mxUtils.bind(this,function(){try{T=(new MiroImporter).importMiroJson(JSON.parse(T)),this.pasteXml(T,n,E,c)}catch(v){console.log("Miro import error:",v)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",S):S()}else this.pasteXml(T,n,E,c,u);try{mxEvent.consume(c)}catch(v){}}else if(!l){var k=this.editor.graph;k.lastPasteXml=null;k.pasteCounter=0}}catch(v){this.handleError(v)}}}e.innerHTML=" "};EditorUi.prototype.showPrintDialog=-function(c,e){var l=320;this.editor.graph.isEnabled()&&(l+=40);null!=this.pages&&1<this.pages.length&&(l+=40,this.editor.graph.isEnabled()||(l+=10));null==e||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(l+=20);this.showDialog((new PrintDialog(this,c,e)).container,320,l,!0,!0)};EditorUi.prototype.print=function(c,e){var l=this.editor,n=l.graph,p=this.getPageIndex(this.currentPage),u=null!=p?p+1:1,B=mxUtils.bind(this,function(A,H,R,g){var q=A.useCssTransforms,F=A.currentTranslate,J=A.currentScale,-L=A.view.translate,Q=A.view.scale;A.useCssTransforms&&(A.useCssTransforms=!1,A.currentTranslate=new mxPoint(0,0),A.currentScale=1,A.view.translate=new mxPoint(0,0),A.view.scale=1);var U=A.getGraphBounds(),V=0,W=0,X=mxRectangle.fromRectangle(A.pageFormat),Z=e.fit||e.crop||!A.pageVisible,Y=e.scale;X.width=Math.ceil(X.width*A.pageScale);X.height=Math.ceil(X.height*A.pageScale);var ba=1;if(e.fit){ba=e.sheetsAcross;var ea=e.sheetsDown;isNaN(Y)||(X.width=Math.ceil(X.width*Y),X.height=Math.ceil(X.height*-Y));ba=Math.min(X.height*ea/(U.height/A.view.scale),X.width*ba/(U.width/A.view.scale))}else ba=isNaN(Y)?1:Y;ba*=1;!Z&&A.pageVisible?(Y=A.getPageLayout(),V-=Y.x*X.width,W-=Y.y*X.height):Z=!0;e.crop&&(e.selection&&(U=n.getBoundingBox(n.getSelectionCells())),X.width=(U.width+1)*ba/A.view.scale,X.height=(U.height+1)*ba/A.view.scale);X.width=Math.ceil(1*X.width);X.height=Math.ceil(1*X.height);g=null!=g?"page/id,"+g:null;if(null==H){H=PrintDialog.createPrintPreview(A,ba,null,0,V,W,Z);H.title=this.getBaseFilename(!0);-H.pageSelector=!1;H.mathEnabled=!1;V=e.border;isNaN(V)||(H.pageMargin=V);e.selection&&(H.isCellVisible=function(aa){return A.isCellSelected(aa)});var ca=H.writeHead;H.writeHead=function(aa){ca.apply(this,arguments);mxClient.IS_GC&&(aa.writeln('<style type="text/css">'),aa.writeln("@media print {"),aa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),aa.writeln("}"),aa.writeln("</style>"));null!=l.fontCss&&(aa.writeln('<style type="text/css">'),aa.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,-!1)),aa.writeln("</style>"));for(var ia=A.getCustomFonts(),ka=0;ka<ia.length;ka++){var ta=ia[ka].name,sa=ia[ka].url;Graph.isCssFontUrl(sa)?aa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(sa))+'" charset="UTF-8" type="text/css">'):(aa.writeln('<style type="text/css">'),aa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(ta)+'";\nsrc: url("'+mxUtils.htmlEntities(sa)+'");\n}'),aa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var da=H.drawBackgroundImage;-H.drawBackgroundImage=function(aa){da.apply(this,arguments);null!=aa.node&&(EditorUi.embedSvgImages(aa.node),n.disableSvgLinks(aa.node,function(ia){ia.setAttribute("href","javascript:void(0)")}))}}var ma=H.addGraphFragment;H.addGraphFragment=function(aa,ia,ka,ta,sa,fa){ma.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:sa.classList.add("geDisableMathJax")};e.grid&&(H.gridSize=A.gridSize,H.gridSteps=A.view.gridSteps,H.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:-A.view.gridColor);H.open(null,null,R,!0,g,X,e.selection?A.getSelectionCells():null)}else{U=A.background;if(null==U||""==U||U==mxConstants.NONE)U="#ffffff";H.backgroundColor=U;H.autoOrigin=Z;e.grid&&(H.gridSize=A.gridSize,H.gridSteps=A.view.gridSteps,H.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:A.view.gridColor);H.appendGraph(A,ba,V,W,R,!0,g,X,e.selection?A.getSelectionCells():null);R=A.getCustomFonts();if(null!=H.wnd)for(X=0;X<R.length;X++)V=R[X].name,W=R[X].url,Graph.isCssFontUrl(W)?-H.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(W)+'" charset="UTF-8" type="text/css">'):(H.wnd.document.writeln('<style type="text/css">'),H.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(V)+'";\nsrc: url("'+mxUtils.htmlEntities(W)+'");\n}'),H.wnd.document.writeln("</style>"))}q&&(A.useCssTransforms=q,A.currentTranslate=F,A.currentScale=J,A.view.translate=L,A.view.scale=Q);return H}),D=e.pagesFrom,G=e.pagesTo,E=!e.allPages;p=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,-e);else{E&&(E=e.selection||D==u&&G==u);if(!E&&null!=this.pages&&this.pages.length){E=0;u=this.pages.length-1;e.allPages||(E=parseInt(D)-1,u=parseInt(G)-1);for(var T=E;T<=u;T++){var O=this.pages[T];D=O==this.currentPage?n:null;if(null==D){D=this.createTemporaryGraph(n.stylesheet);D.shapeForegroundColor=n.shapeForegroundColor;D.shapeBackgroundColor=n.shapeBackgroundColor;G=!0;E=!1;var S=null,k=null;null==O.viewState&&null==O.root&&this.updatePageRoot(O);null!=O.viewState&&(G=O.viewState.pageVisible,-E=O.viewState.mathEnabled,S=O.viewState.background,k=O.viewState.backgroundImage,D.pageFormat=O.viewState.pageFormat,D.gridSize=O.viewState.gridSize);null!=k&&null!=k.originalSrc&&(k=this.createImageForPageLink(k.originalSrc,O));D.background=S;D.backgroundImage=null!=k?new mxImage(k.src,k.width,k.height,k.x,k.y):null;D.pageVisible=G;D.mathEnabled=E;var v=D.getGraphBounds;D.getGraphBounds=function(){var A=v.apply(this,arguments),H=this.backgroundImage;if(null!=H&&null!=H.width&&null!=H.height){var R=-this.view.translate,g=this.view.scale;A=mxRectangle.fromRectangle(A);A.add(new mxRectangle((R.x+H.x)*g,(R.y+H.y)*g,H.width*g,H.height*g))}return A};var z=D.getGlobalVariable;D.getGlobalVariable=function(A){return"page"==A?O.getName():"pagenumber"==A?T+1:"pagecount"==A?null!=this.pages?this.pages.length:1:z.apply(this,arguments)};document.body.appendChild(D.container);this.updatePageRoot(O);D.model.setRoot(O.root)}p=B(D,p,T!=u,O.getId());D!=n&&D.container.parentNode.removeChild(D.container)}}else p=-B(n);null==p||null==p.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(p.mathEnabled&&(B=p.wnd.document,c||(p.wnd.IMMEDIATE_PRINT=!0),B.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),p.closeDocument(),Graph.rewritePageLinks(p.wnd.document,!0),p.mathEnabled||c||PrintDialog.printPreview(p));return p}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(n){null!=-e&&(e.parentNode.removeChild(e),e=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(n){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<-n.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(n.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(n)&&!mxEvent.isShiftDown(n)):this.openFiles(n.dataTransfer.files,!0);else{var p=this.extractGraphModelFromEvent(n);if(null==p){var u=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=u&&(10==document.documentMode||11==document.documentMode?p=u.getData("Text"):(p=null,p=0<=mxUtils.indexOf(u.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):-0<=mxUtils.indexOf(u.types,"text/html")?u.getData("text/html"):null,null!=p&&0<p.length?(u=document.createElement("div"),u.innerHTML=Graph.sanitizeHtml(p),u=u.getElementsByTagName("img"),0<u.length&&(p=u[0].getAttribute("src"))):0<=mxUtils.indexOf(u.types,"text/plain")&&(p=u.getData("text/plain"))),null!=p&&(Editor.isPngDataUrl(p)?(p=Editor.extractGraphModelFromPng(p),null!=p&&0<p.length&&this.openLocalFile(p,null,!0)):this.isRemoteFileFormat(p)?this.isOffline()?this.showError(mxResources.get("error"),-mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(p))).send(mxUtils.bind(this,function(B){200<=B.getStatus()&&299>=B.getStatus()?this.openLocalFile(B.getText(),null,!0):this.showError(mxResources.get("error"),413==B.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(p)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(p):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+-"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(p)))))}else this.openLocalFile(p,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,l=0;if(null==c){var n=document.body;var p=document.documentElement;var u=(n.clientWidth||p.clientWidth)-3;n=Math.max(n.clientHeight||0,p.clientHeight)-3}else e=c.offsetTop,l=c.offsetLeft,u=c.clientWidth,n=c.clientHeight;p=document.createElement("div");p.style.zIndex=mxPopupMenu.prototype.zIndex+-2;p.style.border="3px dotted rgb(254, 137, 12)";p.style.pointerEvents="none";p.style.position="absolute";p.style.top=e+"px";p.style.left=l+"px";p.style.width=Math.max(0,u-3)+"px";p.style.height=Math.max(0,n-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(p):document.body.appendChild(p);return p};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var l=new mxCodec(e.ownerDocument),-n=new mxGraphModel;l.decode(e,n);e=n.getChildAt(n.getRoot(),0);for(l=0;l<n.getChildCount(e);l++)c.push(n.getChildAt(e,l))}return c};EditorUi.prototype.openFileHandle=function(c,e,l,n,p,u){if(null!=e&&0<e.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(e)||/(\.pdf)$/i.test(e))e=e.substring(0,e.length-4),/(\.drawio)$/i.test(e)||(e+=".drawio");var B=mxUtils.bind(this,function(G){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==G.substring(0,10)){null==-this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,G,e)),this.showSidebar()}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(G,e,n)});if(EditorUi.isVisioFilename(e))this.importVisio(l,mxUtils.bind(this,function(G){this.spinner.stop();B(G)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(G){this.spinner.stop();B(G)}));else if(Graph.fileSupport&&-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(G){4==G.readyState&&(this.spinner.stop(),200<=G.status&&299>=G.status?B(G.responseText):this.handleError({message:mxResources.get(413==G.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,-e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(G){this.spinner.stop();this.openLocalFile(G,e,n)}),mxUtils.bind(this,function(G){this.spinner.stop();this.handleError(G)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}}else if(0==-c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(G){this.spinner.stop();B(G)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,n)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==l.type){var D=Editor.extractGraphModelFromPdf(c);null!=D&&(p=null,n=!0,c=D)}this.spinner.stop();this.openLocalFile(c,e,n,p,null!=p?l:null,u)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=-0;l<c.length;l++)mxUtils.bind(this,function(n){var p=new FileReader;p.onload=mxUtils.bind(this,function(u){try{this.openFileHandle(u.target.result,n.name,n,e)}catch(B){this.handleError(B)}});p.onerror=mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u);window.openFile=null});"image"!==n.type.substring(0,5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?p.readAsText(n):p.readAsDataURL(n)})(c[l])};EditorUi.prototype.openLocalFile=function(c,e,l,n,p,u){var B=this.getCurrentFile(),-D=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var G=mxUtils.parseXml(c);null!=G&&(this.editor.setGraphXml(G.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,l,n,p,u))});if(null!=c&&0<c.length)null==B||!B.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?D():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),-null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=-0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var l in c)e.push(l);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function l(B){if(null!=B){var D=B.lastIndexOf(".");0<D&&(B=B.substring(D+1,B.length));null==e[B]&&(e[B]=!0)}}var n=this.editor.graph,p=n.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(p[mxConstants.STYLE_SHAPE]));n.model.isEdge(c)&&-(l(mxMarker.getPackageForType(p[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(p[mxConstants.STYLE_ENDARROW])));p=n.model.getChildCount(c);for(var u=0;u<p;u++)this.addBasenamesForCell(n.model.getChildAt(c,u),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?+(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(e){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(e,f){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));+this.addListener("copyConnectChanged",mxUtils.bind(this,function(e,f){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(e,f){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("++c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(e,f){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(e,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||+this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(e,f){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",+mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,f){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,+function(p,n){try{this.spinner.stop();var t=this.createImageDataUri(p,e,"png"),z=parseInt(n.getAttribute("width")),F=parseInt(n.getAttribute("height"));this.writeImageToClipboard(t,z,F,mxUtils.bind(this,function(C){this.handleError(C)}))}catch(C){this.handleError(C)}}),null,null,null,mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),null,null,null!=f?f:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?+c:null)}catch(p){this.handleError(p)}};EditorUi.prototype.copyCells=function(c,e){var f=this.editor.graph;if(f.isSelectionEmpty())c.innerText="";else{var p=mxUtils.sortCells(f.model.getTopmostCells(f.getSelectionCells())),n=mxUtils.getXml(f.encodeCells(p));mxUtils.setTextContent(c,encodeURIComponent(n));e?(f.removeCells(p,!1),f.lastPasteXml=null):(f.lastPasteXml=n,f.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=+this.editor.graph;e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,f,p,n){n=null!=n?n:!0;var t=this.editor.graph,z=null;t.lastPasteXml==c?t.pasteCounter++:(t.lastPasteXml=c,t.pasteCounter=0);var F=t.pasteCounter*t.gridSize;if(f||this.isCompatibleString(c))z=this.importXml(c,F,F),t.setSelectionCells(z);else if(e&&1==+t.getSelectionCount()){n=t.getStartEditingCell(t.getSelectionCell(),p);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==t.getCurrentCellStyle(n)[mxConstants.STYLE_SHAPE])t.setCellStyles(mxConstants.STYLE_IMAGE,c,[n]);else{t.model.beginUpdate();try{t.labelChanged(n,c),Graph.isLink(c)&&t.setLinkForCell(n,c)}finally{t.model.endUpdate()}}t.setSelectionCell(n)}else z=t.getInsertPoint(),t.isMouseInsertPoint()&&(F=0,t.lastPasteXml==c&&0<t.pasteCounter&&t.pasteCounter--),z=this.insertTextAt(c,z.x+F,+z.y+F,n),t.setSelectionCells(z);t.isSelectionEmpty()||(t.scrollCellToVisible(t.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(t.view.getState(t.getSelectionCell())));return z};EditorUi.prototype.pasteCells=function(c,e,f,p){if(!mxEvent.isConsumed(c)){var n=e,t=!1;if(f&&null!=c.clipboardData&&c.clipboardData.getData){var z=c.clipboardData.getData("text/plain"),F=!1;if(null!=z&&0<z.length&&"%3CmxGraphModel%3E"==z.substring(0,18))try{var C=decodeURIComponent(z);this.isCompatibleString(C)&&+(F=!0,z=C)}catch(m){}F=F?null:c.clipboardData.getData("text/html");null!=F&&0<F.length?(n=this.parseHtmlData(F),t="text/plain"!=n.getAttribute("data-type")):null!=z&&0<z.length&&(n=document.createElement("div"),mxUtils.setTextContent(n,F))}z=n.getElementsByTagName("span");if(null!=z&&0<z.length&&"application/vnd.lucid.chart.objects"===z[0].getAttribute("data-lucid-type"))f=z[0].getAttribute("data-lucid-content"),null!=f&&0<f.length&&(this.convertLucidChart(f,mxUtils.bind(this,function(m){var u=this.editor.graph;+u.lastPasteXml==m?u.pasteCounter++:(u.lastPasteXml=m,u.pasteCounter=0);var A=u.pasteCounter*u.gridSize;u.setSelectionCells(this.importXml(m,A,A));u.scrollCellToVisible(u.getSelectionCell())}),mxUtils.bind(this,function(m){this.handleError(m)})),mxEvent.consume(c));else{var E=!1,R="";R=t?null!=n.textContent&&"<mxfile"==n.textContent.substring(0,7)&&"</mxfile>"==n.textContent.substring(n.textContent.length-9)||"<mxGraphModel"==n.textContent.substring(0,13)&&"</mxGraphModel>"==n.textContent.substring(n.textContent.length-+15)?n.textContent.replace(/\u00a0/g," "):n.innerHTML:mxUtils.trim(null==n.innerText?mxUtils.getTextContent(n):n.innerText);try{var U=R.lastIndexOf("%3E");0<=U&&U<R.length-3&&(R=R.substring(0,U+3))}catch(m){}try{z=n.getElementsByTagName("span"),(C=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(R))&&(this.isCompatibleString(C)||0==C.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(E=!0,R=C)}catch(m){}try{if(null!=R&&0<R.length){if(0==R.substring(0,+20).replace(/\s/g,"").indexOf('{"isProtected":')){var O=mxUtils.bind(this,function(){try{R=(new MiroImporter).importMiroJson(JSON.parse(R)),this.pasteXml(R,p,E,c)}catch(m){console.log("Miro import error:",m)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",O):O()}else this.pasteXml(R,p,E,c,t);try{mxEvent.consume(c)}catch(m){}}else if(!f){var Q=this.editor.graph;Q.lastPasteXml=null;Q.pasteCounter=0}}catch(m){this.handleError(m)}}}e.innerHTML=" "};EditorUi.prototype.showPrintDialog=+function(c,e){var f=320;this.editor.graph.isEnabled()&&(f+=40);null!=this.pages&&1<this.pages.length&&(f+=40,this.editor.graph.isEnabled()||(f+=10));null==e||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(f+=20);this.showDialog((new PrintDialog(this,c,e)).container,320,f,!0,!0)};EditorUi.prototype.print=function(c,e){var f=this.editor,p=f.graph,n=this.getPageIndex(this.currentPage),t=null!=n?n+1:1,z=mxUtils.bind(this,function(A,B,H,T){var k=A.useCssTransforms,v=A.currentTranslate,G=A.currentScale,+I=A.view.translate,M=A.view.scale;A.useCssTransforms&&(A.useCssTransforms=!1,A.currentTranslate=new mxPoint(0,0),A.currentScale=1,A.view.translate=new mxPoint(0,0),A.view.scale=1);var P=A.getGraphBounds(),S=0,V=0,W=mxRectangle.fromRectangle(A.pageFormat),X=e.fit||e.crop||!A.pageVisible,Z=e.scale;W.width=Math.ceil(W.width*A.pageScale);W.height=Math.ceil(W.height*A.pageScale);var Y=1;if(e.fit){Y=e.sheetsAcross;var ba=e.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));+Y=Math.min(W.height*ba/(P.height/A.view.scale),W.width*Y/(P.width/A.view.scale))}else Y=isNaN(Z)?1:Z;Y*=1;!X&&A.pageVisible?(Z=A.getPageLayout(),S-=Z.x*W.width,V-=Z.y*W.height):X=!0;e.crop&&(e.selection&&(P=p.getBoundingBox(p.getSelectionCells())),W.width=(P.width+1)*Y/A.view.scale,W.height=(P.height+1)*Y/A.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);T=null!=T?"page/id,"+T:null;if(null==B){B=PrintDialog.createPrintPreview(A,Y,null,0,S,V,X);B.title=this.getBaseFilename(!0);+B.pageSelector=!1;B.mathEnabled=!1;S=e.border;isNaN(S)||(B.pageMargin=S);e.selection&&(B.isCellVisible=function(aa){return A.isCellSelected(aa)});var ea=B.writeHead;B.writeHead=function(aa){ea.apply(this,arguments);mxClient.IS_GC&&(aa.writeln('<style type="text/css">'),aa.writeln("@media print {"),aa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),aa.writeln("}"),aa.writeln("</style>"));null!=f.fontCss&&(aa.writeln('<style type="text/css">'),aa.writeln(mxUtils.htmlEntities(f.fontCss,!1,!1,+!1)),aa.writeln("</style>"));for(var da=A.getCustomFonts(),ha=0;ha<da.length;ha++){var pa=da[ha].name,na=da[ha].url;Graph.isCssFontUrl(na)?aa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(na))+'" charset="UTF-8" type="text/css">'):(aa.writeln('<style type="text/css">'),aa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(pa)+'";\nsrc: url("'+mxUtils.htmlEntities(na)+'");\n}'),aa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=B.drawBackgroundImage;+B.drawBackgroundImage=function(aa){ca.apply(this,arguments);null!=aa.node&&(EditorUi.embedSvgImages(aa.node),p.disableSvgLinks(aa.node,function(da){da.setAttribute("href","javascript:void(0)")}))}}var fa=B.addGraphFragment;B.addGraphFragment=function(aa,da,ha,pa,na,ia){fa.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:na.classList.add("geDisableMathJax")};e.grid&&(B.gridSize=A.gridSize,B.gridSteps=A.view.gridSteps,B.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:+A.view.gridColor);B.open(null,null,H,!0,T,W,e.selection?A.getSelectionCells():null)}else{P=A.background;if(null==P||""==P||P==mxConstants.NONE)P="#ffffff";B.backgroundColor=P;B.autoOrigin=X;e.grid&&(B.gridSize=A.gridSize,B.gridSteps=A.view.gridSteps,B.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:A.view.gridColor);B.appendGraph(A,Y,S,V,H,!0,T,W,e.selection?A.getSelectionCells():null);H=A.getCustomFonts();if(null!=B.wnd)for(W=0;W<H.length;W++)S=H[W].name,V=H[W].url,Graph.isCssFontUrl(V)?+B.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(V)+'" charset="UTF-8" type="text/css">'):(B.wnd.document.writeln('<style type="text/css">'),B.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(S)+'";\nsrc: url("'+mxUtils.htmlEntities(V)+'");\n}'),B.wnd.document.writeln("</style>"))}k&&(A.useCssTransforms=k,A.currentTranslate=v,A.currentScale=G,A.view.translate=I,A.view.scale=M);return B}),F=e.pagesFrom,C=e.pagesTo,E=!e.allPages;n=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,+e);else{E&&(E=e.selection||F==t&&C==t);if(!E&&null!=this.pages&&this.pages.length){E=0;t=this.pages.length-1;e.allPages||(E=parseInt(F)-1,t=parseInt(C)-1);for(var R=E;R<=t;R++){var U=this.pages[R];F=U==this.currentPage?p:null;if(null==F){F=this.createTemporaryGraph(p.stylesheet);F.shapeForegroundColor=p.shapeForegroundColor;F.shapeBackgroundColor=p.shapeBackgroundColor;C=!0;E=!1;var O=null,Q=null;null==U.viewState&&null==U.root&&this.updatePageRoot(U);null!=U.viewState&&(C=U.viewState.pageVisible,+E=U.viewState.mathEnabled,O=U.viewState.background,Q=U.viewState.backgroundImage,F.pageFormat=U.viewState.pageFormat,F.gridSize=U.viewState.gridSize);null!=Q&&null!=Q.originalSrc&&(Q=this.createImageForPageLink(Q.originalSrc,U));F.background=O;F.backgroundImage=null!=Q?new mxImage(Q.src,Q.width,Q.height,Q.x,Q.y):null;F.pageVisible=C;F.mathEnabled=E;var m=F.getGraphBounds;F.getGraphBounds=function(){var A=m.apply(this,arguments),B=this.backgroundImage;if(null!=B&&null!=B.width&&null!=B.height){var H=+this.view.translate,T=this.view.scale;A=mxRectangle.fromRectangle(A);A.add(new mxRectangle((H.x+B.x)*T,(H.y+B.y)*T,B.width*T,B.height*T))}return A};var u=F.getGlobalVariable;F.getGlobalVariable=function(A){return"page"==A?U.getName():"pagenumber"==A?R+1:"pagecount"==A?null!=this.pages?this.pages.length:1:u.apply(this,arguments)};document.body.appendChild(F.container);this.updatePageRoot(U);F.model.setRoot(U.root)}n=z(F,n,R!=t,U.getId());F!=p&&F.container.parentNode.removeChild(F.container)}}else n=+z(p);null==n||null==n.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(n.mathEnabled&&(z=n.wnd.document,c||(n.wnd.IMMEDIATE_PRINT=!0),z.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),n.closeDocument(),Graph.rewritePageLinks(n.wnd.document,!0),n.mathEnabled||c||PrintDialog.printPreview(n));return n}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,f=0;f<c.length;f++)mxEvent.addListener(c[f],"dragleave",function(p){null!=+e&&(e.parentNode.removeChild(e),e=null);p.stopPropagation();p.preventDefault()}),mxEvent.addListener(c[f],"dragover",mxUtils.bind(this,function(p){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());p.stopPropagation();p.preventDefault()})),mxEvent.addListener(c[f],"drop",mxUtils.bind(this,function(p){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<+p.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(p.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(p)&&!mxEvent.isShiftDown(p)):this.openFiles(p.dataTransfer.files,!0);else{var n=this.extractGraphModelFromEvent(p);if(null==n){var t=null!=p.dataTransfer?p.dataTransfer:p.clipboardData;null!=t&&(10==document.documentMode||11==document.documentMode?n=t.getData("Text"):(n=null,n=0<=mxUtils.indexOf(t.types,"text/uri-list")?p.dataTransfer.getData("text/uri-list"):+0<=mxUtils.indexOf(t.types,"text/html")?t.getData("text/html"):null,null!=n&&0<n.length?(t=document.createElement("div"),t.innerHTML=Graph.sanitizeHtml(n),t=t.getElementsByTagName("img"),0<t.length&&(n=t[0].getAttribute("src"))):0<=mxUtils.indexOf(t.types,"text/plain")&&(n=t.getData("text/plain"))),null!=n&&(Editor.isPngDataUrl(n)?(n=Editor.extractGraphModelFromPng(n),null!=n&&0<n.length&&this.openLocalFile(n,null,!0)):this.isRemoteFileFormat(n)?this.isOffline()?this.showError(mxResources.get("error"),+mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(n))).send(mxUtils.bind(this,function(z){200<=z.getStatus()&&299>=z.getStatus()?this.openLocalFile(z.getText(),null,!0):this.showError(mxResources.get("error"),413==z.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(n)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(n):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost++"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(n)))))}else this.openLocalFile(n,null,!0)}p.stopPropagation();p.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,f=0;if(null==c){var p=document.body;var n=document.documentElement;var t=(p.clientWidth||n.clientWidth)-3;p=Math.max(p.clientHeight||0,n.clientHeight)-3}else e=c.offsetTop,f=c.offsetLeft,t=c.clientWidth,p=c.clientHeight;n=document.createElement("div");n.style.zIndex=mxPopupMenu.prototype.zIndex++2;n.style.border="3px dotted rgb(254, 137, 12)";n.style.pointerEvents="none";n.style.position="absolute";n.style.top=e+"px";n.style.left=f+"px";n.style.width=Math.max(0,t-3)+"px";n.style.height=Math.max(0,p-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(n):document.body.appendChild(n);return n};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var f=new mxCodec(e.ownerDocument),+p=new mxGraphModel;f.decode(e,p);e=p.getChildAt(p.getRoot(),0);for(f=0;f<p.getChildCount(e);f++)c.push(p.getChildAt(e,f))}return c};EditorUi.prototype.openFileHandle=function(c,e,f,p,n,t){if(null!=e&&0<e.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(e)||/(\.pdf)$/i.test(e))e=e.substring(0,e.length-4),/(\.drawio)$/i.test(e)||(e+=".drawio");var z=mxUtils.bind(this,function(C){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==C.substring(0,10)){null==+this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,p);try{this.loadLibrary(new LocalLibrary(this,C,e)),this.showSidebar()}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,e,p)});if(EditorUi.isVisioFilename(e))this.importVisio(f,mxUtils.bind(this,function(C){this.spinner.stop();z(C)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(C){this.spinner.stop();z(C)}));else if(Graph.fileSupport&&+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(f,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?z(C.responseText):this.handleError({message:mxResources.get(413==C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,+e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,e,p)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,p);try{this.loadLibrary(new LocalLibrary(this,c,f.name)),this.showSidebar()}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==+c.indexOf("PK"))this.importZipFile(f,mxUtils.bind(this,function(C){this.spinner.stop();z(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,p)}));else{if("image/png"==f.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==f.type){var F=Editor.extractGraphModelFromPdf(c);null!=F&&(n=null,p=!0,c=F)}this.spinner.stop();this.openLocalFile(c,e,p,n,null!=n?f:null,t)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var f=+0;f<c.length;f++)mxUtils.bind(this,function(p){var n=new FileReader;n.onload=mxUtils.bind(this,function(t){try{this.openFileHandle(t.target.result,p.name,p,e)}catch(z){this.handleError(z)}});n.onerror=mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t);window.openFile=null});"image"!==p.type.substring(0,5)&&"application/pdf"!==p.type||"image/svg"===p.type.substring(0,9)?n.readAsText(p):n.readAsDataURL(p)})(c[f])};EditorUi.prototype.openLocalFile=function(c,e,f,p,n,t){var z=this.getCurrentFile(),+F=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(c);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,f,p,n,t))});if(null!=c&&0<c.length)null==z||!z.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=p)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=p)&&null!=z&&z.isModified()?this.confirm(mxResources.get("allChangesLost"),+null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=z&&z.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=+0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var f in c)e.push(f);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function f(z){if(null!=z){var F=z.lastIndexOf(".");0<F&&(z=z.substring(F+1,z.length));null==e[z]&&(e[z]=!0)}}var p=this.editor.graph,n=p.getCellStyle(c);f(mxStencilRegistry.getBasenameForStencil(n[mxConstants.STYLE_SHAPE]));p.model.isEdge(c)&&+(f(mxMarker.getPackageForType(n[mxConstants.STYLE_STARTARROW])),f(mxMarker.getPackageForType(n[mxConstants.STYLE_ENDARROW])));n=p.model.getChildCount(c);for(var t=0;t<n;t++)this.addBasenamesForCell(p.model.getChildAt(c,t),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?"":"none";this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=c&&0<parseInt(this.tabContainer.style.height)?"":"hidden");null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=c?"":"hidden");c||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=-!1;this.installMessageHandler(mxUtils.bind(this,function(e,l,n,p){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(p)try{var u=this.editor.graph;u.setGridEnabled(!1);u.pageVisible=!1;var B=u.model.cells,D;for(D in B){var G=B[D];null!=G&&null!=G.style&&(G.style+=";sketch=1;"+(-1==G.style.indexOf("fontFamily=")||-1<G.style.indexOf("fontFamily=Helvetica;")?-"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(E){console.log(E)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=n?n:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=-function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,e){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();e(l)})):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,-translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var e=this.editor.graph;e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var n=e.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,-null,null,!1),e,null,!0,mxUtils.bind(this,function(p){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(p)}),"*")}),null,null,!0,n,1,this.embedExportBorder,null,this.embedExportTheme)}else c||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=-!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(p){c||this.handleError(p)}};EditorUi.prototype.installMessageHandler=function(c){var e=null,l=!1,n=!1,p=null,u=mxUtils.bind(this,function(G,E){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,u);mxEvent.addListener(window,"message",mxUtils.bind(this,-function(G){if(G.source==(window.opener||window.parent)){var E=G.data,T=null,O=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(ia){}return aa});-if("json"==urlParams.proto){var S=!1;try{E=JSON.parse(E),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[G],"data",[E])}catch(aa){E=null}try{if(null==E)return;if("dialog"==E.action){this.showError(null!=E.titleKey?mxResources.get(E.titleKey):E.title,null!=E.messageKey?mxResources.get(E.messageKey):mxUtils.htmlEntities(E.message),null!=E.buttonKey?mxResources.get(E.buttonKey):E.button);null!=E.modified&&(this.editor.modified=E.modified);return}if("layout"==E.action){this.executeLayouts(this.editor.graph.createLayouts(E.layouts));-return}if("prompt"==E.action){this.spinner.stop();var k=new FilenameDialog(this,E.defaultValue||"",null!=E.okKey?mxResources.get(E.okKey):E.ok,function(aa){null!=aa?B.postMessage(JSON.stringify({event:"prompt",value:aa,message:E}),"*"):B.postMessage(JSON.stringify({event:"prompt-cancel",message:E}),"*")},null!=E.titleKey?mxResources.get(E.titleKey):E.title,null,null,null,null,function(){B.postMessage(JSON.stringify({event:"prompt-cancel",message:E}),"*")});this.showDialog(k.container,300,80,!0,!1);-k.init();return}if("draft"==E.action){var v=O(E.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[E.name||this.defaultFilename]),v,mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"edit",message:E}),"*")}),mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"discard",message:E}),"*")}),E.editKey?mxResources.get(E.editKey):null,E.discardKey?mxResources.get(E.discardKey):null,E.ignore?-mxUtils.bind(this,function(){this.hideDialog();B.postMessage(JSON.stringify({event:"draft",result:"ignore",message:E}),"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{k.init()}catch(aa){B.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:E}),"*")}return}if("template"==E.action){this.spinner.stop();var z=1==E.enableRecent,A=1==E.enableSearch,H=1==E.enableCustomTemp;k=new NewDialog(this,!1,E.templatesOnly?-!1:null!=E.callback,mxUtils.bind(this,function(aa,ia,ka,ta){aa=aa||this.emptyDiagramXml;null!=E.callback?B.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:ia,tempUrl:ka,libs:ta,builtIn:!0,message:E}),"*"):(c(aa,G,aa!=this.emptyDiagramXml,E.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,z?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):-null,A?mxUtils.bind(this,function(aa,ia){this.remoteInvoke("searchDiagrams",[aa,null],null,ia,function(){ia(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,ia,ka){B.postMessage(JSON.stringify({event:"template",docUrl:aa,info:ia,name:ka}),"*")}),null,null,H?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==E.withoutType);this.showDialog(k.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();-aa&&this.actions.get("exit").funct()}));k.init();return}if("textContent"==E.action){var R=this.getDiagramTextContent();B.postMessage(JSON.stringify({event:"textContent",data:R,message:E}),"*");return}if("status"==E.action){null!=E.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(E.messageKey))):null!=E.message&&this.editor.setStatus(mxUtils.htmlEntities(E.message));null!=E.modified&&(this.editor.modified=E.modified);return}if("spinner"==E.action){var g=null!=E.messageKey?mxResources.get(E.messageKey):-E.message;null==E.show||E.show?this.spinner.spin(document.body,g):this.spinner.stop();return}if("exit"==E.action){this.actions.get("exit").funct();return}if("viewport"==E.action){null!=E.viewport&&(this.embedViewport=E.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==E.action){k=null;try{var q=this.diagramContainer.getAttribute("data-scrollState");null!=q&&(this.diagramContainer.removeAttribute("data-scrollState"),k=JSON.parse(q))}catch(aa){}Editor.inlineFullscreen=-E.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=k&&this.restoreScrollState(k);return}if("snapshot"==E.action){this.sendEmbeddedSvgExport(!0);return}if("export"==E.action){if("png"==E.format||"xmlpng"==E.format){if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?mxResources.get(E.spinKey):E.spin)){var F=null!=E.xml?E.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var J=this.editor.graph,L=mxUtils.bind(this,function(aa,ia){if(E.withSvg)E.withSvg=-!1,this.getEmbeddedSvg(F,this.editor.graph,null,!0,function(ta){L(aa,ta)},null,null,E.embedImages,this.editor.graph.background,E.scale,E.border,E.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ka=this.createLoadMessage("export");ka.format=E.format;ka.message=E;ka.data=aa;ka.svg=ia;ka.xml=F;B.postMessage(JSON.stringify(ka),"*")}}),Q=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==E.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(F)));-J!=this.editor.graph&&J.container.parentNode.removeChild(J.container);L(aa)}),U=E.pageId||(null!=this.pages?E.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var V=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var aa=J.getGlobalVariable;J=this.createTemporaryGraph(J.getStylesheet());for(var ia,ka=0;ka<this.pages.length;ka++)if(this.pages[ka].getId()==U){ia=this.updatePageRoot(this.pages[ka]);break}null==ia&&(ia=this.currentPage);-J.getGlobalVariable=function(ra){return"page"==ra?ia.getName():"pagenumber"==ra?1:aa.apply(this,arguments)};document.body.appendChild(J.container);J.model.setRoot(ia.root)}if(null!=E.layerIds){var ta=J.model,sa=ta.getChildCells(ta.getRoot()),fa={};for(ka=0;ka<E.layerIds.length;ka++)fa[E.layerIds[ka]]=!0;for(ka=0;ka<sa.length;ka++)ta.setVisible(sa[ka],fa[sa[ka].id]||!1)}ka=null;E.keepTheme&&(ka=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(ra){Q(ra.toDataURL("image/png"))}),-E.width,null,E.background,mxUtils.bind(this,function(){Q(null)}),null,null,E.scale,E.transparent,E.shadow,null,J,E.border,null,E.grid,ka)});null!=E.xml&&0<E.xml.length&&(l=!0,this.setFileData(F),l=!1);V()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==E.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=E.layerIds&&0<E.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:E.layerIds})):"")+(null!=E.scale?"&scale="+E.scale:"")+"&base64=1&xml="+encodeURIComponent(F))).send(mxUtils.bind(this,-function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?L("data:image/png;base64,"+aa.getText()):Q(null)}),mxUtils.bind(this,function(){Q(null)}))}}else if(V=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=E;if("html2"==E.format||"html"==E.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ia=this.getXmlFileData();aa.xml=mxUtils.getXml(ia);aa.data=this.getFileData(null,null,!0,null,null,null,ia);aa.format=E.format}else if("html"==E.format)ia=this.editor.getGraphXml(),-aa.data=this.getHtml(ia,this.editor.graph),aa.xml=mxUtils.getXml(ia),aa.format=E.format;else{mxSvgCanvas2D.prototype.foAltText=null;ia=null!=E.background?E.background:this.editor.graph.background;ia==mxConstants.NONE&&(ia=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var ka=mxUtils.bind(this,function(sa){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=Editor.createSvgDataUri(sa);B.postMessage(JSON.stringify(aa),"*")}),ta="auto";E.keepTheme&&-(ta=Editor.isDarkMode()?"dark":"light");null!=E.theme&&(ta=E.theme);if("xmlsvg"==E.format){if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?mxResources.get(E.spinKey):E.spin)){ta=null;if(this.isAutoDarkMode()||Editor.isDarkMode())ta="auto";null!=E.theme&&(ta=E.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,ka,null,null,E.embedImages,ia,E.scale,E.border,E.shadow,ta)}}else if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?-mxResources.get(E.spinKey):E.spin))this.editor.graph.setEnabled(!1),ia=this.editor.graph.getSvg(ia,E.scale,E.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||E.shadow,null,ta),(this.editor.graph.shadowVisible||E.shadow)&&this.editor.graph.addSvgShadow(ia),this.embedFonts(ia,mxUtils.bind(this,function(sa){E.embedImages||null==E.embedImages?this.editor.convertImages(sa,mxUtils.bind(this,function(fa){ka(mxUtils.getXml(fa))})):ka(mxUtils.getXml(sa))}));return}B.postMessage(JSON.stringify(aa),-"*")}),null!=E.xml&&0<E.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);V()}}l=!0;this.setFileData(E.xml);l=!1;this.editor.graph.mathEnabled||V()}else V();return}if("load"==E.action){S=E.toSketch;n=1==E.autosave;this.hideDialog();null!=E.modified&&null==urlParams.modified&&(urlParams.modified=E.modified);null!=E.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=E.saveAndExit);if("1"==urlParams.saveAndExit||-"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=E.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=E.noSaveBtn);if(null!=E.rough){var X=Editor.sketchMode;this.doSetSketchMode(E.rough);X!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=-E.dark&&this.setDarkMode(E.dark);null!=E.border&&(this.embedExportBorder=E.border);null!=E.theme&&(this.embedExportTheme=E.theme);null!=E.background&&(this.embedExportBackground=E.background);null!=E.viewport&&(this.embedViewport=E.viewport);this.embedExitPoint=null;if(null!=E.rect){var Z=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,E.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,E.rect.top)+"px";this.minInlineWidth=E.minWidth;this.minInlineHeight=E.minHeight;-this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Y=E.maxFitScale,ba=E.rect.width+2*Z,ea=E.rect.height+2*Z;T=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();ba=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,ba):ba,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ea):ea,aa.height-80);this.diagramContainer.style.width=ba+"px";this.diagramContainer.style.height=-aa+"px";var ia=this.editor.graph;aa=ia.maxFitScale;ia.maxFitScale=Y;ia.fit(2*Z,null,null,null,null,null,ea);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ia.getGraphBounds().width<this.minInlineWidth){var ka=ia.container.scrollTop;this.resetScrollbars();ia.container.scrollTop=ka}ia.maxFitScale=aa;ia.container.scrollTop-=Z;ia.container.scrollLeft-=Z;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[E]));ia.container.focus();null!=this.formatWindow&&-null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=ia.container.style.top);var ta=ia.getGraphBounds();ia.container.clientWidth>ta.width+2*Z&&(ia.container.scrollLeft=ta.x+(ta.width+Z-ia.container.clientWidth)/2)}),10)})}null!=E.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=E.noExitBtn);null!=E.title&&null!=this.buttonContainer&&(v=this.createStatusDiv(""),mxUtils.write(v,E.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),-this.buttonContainer.appendChild(v),this.embedFilenameSpan=v);try{E.libs&&this.sidebar.showEntries(E.libs)}catch(aa){}E=null!=E.xmlpng?this.extractGraphModelFromPng(E.xmlpng):null!=E.descriptor?E.descriptor:E.xml}else{if("merge"==E.action){var ca=this.getCurrentFile();null!=ca&&(v=O(E.xml),null!=v&&""!=v&&ca.mergeFile(new LocalFile(this,v),function(){B.postMessage(JSON.stringify({event:"merge",message:E}),"*")},function(aa){B.postMessage(JSON.stringify({event:"merge",message:E,error:aa}),"*")}))}else"remoteInvokeReady"==-E.action?this.handleRemoteInvokeReady(B):"remoteInvoke"==E.action?this.handleRemoteInvoke(E,G.origin):"remoteInvokeResponse"==E.action?this.handleRemoteInvokeResponse(E):B.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(E)}),"*");return}}catch(aa){this.handleError(aa)}}var da=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ma=mxUtils.bind(this,function(aa,ia){l=!0;-try{c(aa,ia,null,S)}catch(ka){this.handleError(ka)}l=!1;null!=urlParams.modified&&this.editor.setStatus("");p=da();n&&null==e&&(e=mxUtils.bind(this,function(ka,ta){ka=da();ka==p||l||(ta=this.createLoadMessage("autosave"),ta.xml=ka,(window.opener||window.parent).postMessage(JSON.stringify(ta),"*"));p=ka}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",-e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ia=this.createLoadMessage("load"),ia.xml=aa,B.postMessage(JSON.stringify(ia),"*");null!=T&&T()});null!=E&&-"function"===typeof E.substring&&"data:application/vnd.visio;base64,"==E.substring(0,34)?(O="0M8R4KGxGuE"==E.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(E.substring(E.indexOf(",")+1)),function(aa){ma(aa,G)},mxUtils.bind(this,function(aa){this.handleError(aa)}),O)):null!=E&&"function"===typeof E.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(E,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(E,-mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?ma(aa.responseText,G):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=E&&"function"===typeof E.substring&&this.isLucidChartData(E)?this.convertLucidChart(E,mxUtils.bind(this,function(aa){ma(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==E||"object"!==typeof E||null==E.format||-null==E.data&&null==E.url?(E=O(E),ma(E,G)):this.loadDescriptor(E,mxUtils.bind(this,function(aa){ma(da(),G)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var B=window.opener||window.parent;u="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";B.postMessage(u,"*");if("json"==urlParams.proto){var D=this.editor.graph.openLink;this.editor.graph.openLink=function(G,E,T){D.apply(this,arguments);B.postMessage(JSON.stringify({event:"openLink",-href:G,target:E,allowOpener:T}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,e,l,n){var p="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,u=document.createElement("button");u.setAttribute("title",c+(null!=l?" ("+l+")":""));u.style.marginLeft="6px";mxUtils.write(u,c);p?(u.className=n?"gePrimaryBtn":"",u.style.marginLeft="8px",u.style.padding="6px"):u.className="geBigButton"+(n?"":" geBigStandardButton");mxEvent.addListener(u,"click",e);return u};+!1;this.installMessageHandler(mxUtils.bind(this,function(e,f,p,n){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(n)try{var t=this.editor.graph;t.setGridEnabled(!1);t.pageVisible=!1;var z=t.model.cells,F;for(F in z){var C=z[F];null!=C&&null!=C.style&&(C.style+=";sketch=1;"+(-1==C.style.indexOf("fontFamily=")||-1<C.style.indexOf("fontFamily=Helvetica;")?+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(E){console.log(E)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=p?p:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=+function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,e){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(f){this.spinner.stop();e(f)})):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,+translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var e=this.editor.graph;e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var f=window.opener||window.parent;if(this.editor.modified){var p=e.background;if(null==p||p==mxConstants.NONE)p=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,+null,null,!1),e,null,!0,mxUtils.bind(this,function(n){f.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(n)}),"*")}),null,null,!0,p,1,this.embedExportBorder,null,this.embedExportTheme)}else c||f.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(n){c||this.handleError(n)}};EditorUi.prototype.installMessageHandler=function(c){var e=null,f=!1,p=!1,n=null,t=mxUtils.bind(this,function(C,E){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,t);mxEvent.addListener(window,"message",mxUtils.bind(this,+function(C){if(C.source==(window.opener||window.parent)){var E=C.data,R=null,U=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(da){}return aa});+if("json"==urlParams.proto){var O=!1;try{E=JSON.parse(E),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[C],"data",[E])}catch(aa){E=null}try{if(null==E)return;if("dialog"==E.action){this.showError(null!=E.titleKey?mxResources.get(E.titleKey):E.title,null!=E.messageKey?mxResources.get(E.messageKey):mxUtils.htmlEntities(E.message),null!=E.buttonKey?mxResources.get(E.buttonKey):E.button);null!=E.modified&&(this.editor.modified=E.modified);return}if("layout"==E.action){this.executeLayouts(this.editor.graph.createLayouts(E.layouts));+return}if("prompt"==E.action){this.spinner.stop();var Q=new FilenameDialog(this,E.defaultValue||"",null!=E.okKey?mxResources.get(E.okKey):E.ok,function(aa){null!=aa?z.postMessage(JSON.stringify({event:"prompt",value:aa,message:E}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:E}),"*")},null!=E.titleKey?mxResources.get(E.titleKey):E.title,null,null,null,null,function(){z.postMessage(JSON.stringify({event:"prompt-cancel",message:E}),"*")});this.showDialog(Q.container,300,80,!0,!1);+Q.init();return}if("draft"==E.action){var m=U(E.xml);this.spinner.stop();Q=new DraftDialog(this,mxResources.get("draftFound",[E.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"edit",message:E}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:E}),"*")}),E.editKey?mxResources.get(E.editKey):null,E.discardKey?mxResources.get(E.discardKey):null,E.ignore?+mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:E}),"*")}):null);this.showDialog(Q.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{Q.init()}catch(aa){z.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:E}),"*")}return}if("template"==E.action){this.spinner.stop();var u=1==E.enableRecent,A=1==E.enableSearch,B=1==E.enableCustomTemp;Q=new NewDialog(this,!1,E.templatesOnly?+!1:null!=E.callback,mxUtils.bind(this,function(aa,da,ha,pa){aa=aa||this.emptyDiagramXml;null!=E.callback?z.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:da,tempUrl:ha,libs:pa,builtIn:!0,message:E}),"*"):(c(aa,C,aa!=this.emptyDiagramXml,E.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,u?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):+null,A?mxUtils.bind(this,function(aa,da){this.remoteInvoke("searchDiagrams",[aa,null],null,da,function(){da(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,da,ha){z.postMessage(JSON.stringify({event:"template",docUrl:aa,info:da,name:ha}),"*")}),null,null,B?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==E.withoutType);this.showDialog(Q.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();+aa&&this.actions.get("exit").funct()}));Q.init();return}if("textContent"==E.action){var H=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:H,message:E}),"*");return}if("status"==E.action){null!=E.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(E.messageKey))):null!=E.message&&this.editor.setStatus(mxUtils.htmlEntities(E.message));null!=E.modified&&(this.editor.modified=E.modified);return}if("spinner"==E.action){var T=null!=E.messageKey?mxResources.get(E.messageKey):+E.message;null==E.show||E.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==E.action){this.actions.get("exit").funct();return}if("viewport"==E.action){null!=E.viewport&&(this.embedViewport=E.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==E.action){Q=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),Q=JSON.parse(k))}catch(aa){}Editor.inlineFullscreen=+E.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=Q&&this.restoreScrollState(Q);return}if("snapshot"==E.action){this.sendEmbeddedSvgExport(!0);return}if("export"==E.action){if("png"==E.format||"xmlpng"==E.format){if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?mxResources.get(E.spinKey):E.spin)){var v=null!=E.xml?E.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var G=this.editor.graph,I=mxUtils.bind(this,function(aa,da){if(E.withSvg)E.withSvg=+!1,this.getEmbeddedSvg(v,this.editor.graph,null,!0,function(pa){I(aa,pa)},null,null,E.embedImages,this.editor.graph.background,E.scale,E.border,E.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ha=this.createLoadMessage("export");ha.format=E.format;ha.message=E;ha.data=aa;ha.svg=da;ha.xml=v;z.postMessage(JSON.stringify(ha),"*")}}),M=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==E.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(v)));+G!=this.editor.graph&&G.container.parentNode.removeChild(G.container);I(aa)}),P=E.pageId||(null!=this.pages?E.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var S=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=P){var aa=G.getGlobalVariable;G=this.createTemporaryGraph(G.getStylesheet());for(var da,ha=0;ha<this.pages.length;ha++)if(this.pages[ha].getId()==P){da=this.updatePageRoot(this.pages[ha]);break}null==da&&(da=this.currentPage);+G.getGlobalVariable=function(wa){return"page"==wa?da.getName():"pagenumber"==wa?1:aa.apply(this,arguments)};document.body.appendChild(G.container);G.model.setRoot(da.root)}if(null!=E.layerIds){var pa=G.model,na=pa.getChildCells(pa.getRoot()),ia={};for(ha=0;ha<E.layerIds.length;ha++)ia[E.layerIds[ha]]=!0;for(ha=0;ha<na.length;ha++)pa.setVisible(na[ha],ia[na[ha].id]||!1)}ha=null;E.keepTheme&&(ha=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(wa){M(wa.toDataURL("image/png"))}),+E.width,null,E.background,mxUtils.bind(this,function(){M(null)}),null,null,E.scale,E.transparent,E.shadow,null,G,E.border,null,E.grid,ha)});null!=E.xml&&0<E.xml.length&&(f=!0,this.setFileData(v),f=!1);S()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==E.format?"1":"0")+(null!=P?"&pageId="+P:"")+(null!=E.layerIds&&0<E.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:E.layerIds})):"")+(null!=E.scale?"&scale="+E.scale:"")+"&base64=1&xml="+encodeURIComponent(v))).send(mxUtils.bind(this,+function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?I("data:image/png;base64,"+aa.getText()):M(null)}),mxUtils.bind(this,function(){M(null)}))}}else if(S=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=E;if("html2"==E.format||"html"==E.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var da=this.getXmlFileData();aa.xml=mxUtils.getXml(da);aa.data=this.getFileData(null,null,!0,null,null,null,da);aa.format=E.format}else if("html"==E.format)da=this.editor.getGraphXml(),+aa.data=this.getHtml(da,this.editor.graph),aa.xml=mxUtils.getXml(da),aa.format=E.format;else{mxSvgCanvas2D.prototype.foAltText=null;da=null!=E.background?E.background:this.editor.graph.background;da==mxConstants.NONE&&(da=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var ha=mxUtils.bind(this,function(na){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=Editor.createSvgDataUri(na);z.postMessage(JSON.stringify(aa),"*")}),pa="auto";E.keepTheme&&+(pa=Editor.isDarkMode()?"dark":"light");null!=E.theme&&(pa=E.theme);if("xmlsvg"==E.format){if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?mxResources.get(E.spinKey):E.spin)){pa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())pa="auto";null!=E.theme&&(pa=E.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,ha,null,null,E.embedImages,da,E.scale,E.border,E.shadow,pa)}}else if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?+mxResources.get(E.spinKey):E.spin))this.editor.graph.setEnabled(!1),da=this.editor.graph.getSvg(da,E.scale,E.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||E.shadow,null,pa),(this.editor.graph.shadowVisible||E.shadow)&&this.editor.graph.addSvgShadow(da),this.embedFonts(da,mxUtils.bind(this,function(na){E.embedImages||null==E.embedImages?this.editor.convertImages(na,mxUtils.bind(this,function(ia){ha(mxUtils.getXml(ia))})):ha(mxUtils.getXml(na))}));return}z.postMessage(JSON.stringify(aa),+"*")}),null!=E.xml&&0<E.xml.length){if(this.editor.graph.mathEnabled){var V=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){V.apply(this,arguments);S()}}f=!0;this.setFileData(E.xml);f=!1;this.editor.graph.mathEnabled||S()}else S();return}if("load"==E.action){O=E.toSketch;p=1==E.autosave;this.hideDialog();null!=E.modified&&null==urlParams.modified&&(urlParams.modified=E.modified);null!=E.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=E.saveAndExit);if("1"==urlParams.saveAndExit||+"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=E.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=E.noSaveBtn);if(null!=E.rough){var W=Editor.sketchMode;this.doSetSketchMode(E.rough);W!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=+E.dark&&this.setDarkMode(E.dark);null!=E.border&&(this.embedExportBorder=E.border);null!=E.theme&&(this.embedExportTheme=E.theme);null!=E.background&&(this.embedExportBackground=E.background);null!=E.viewport&&(this.embedViewport=E.viewport);this.embedExitPoint=null;if(null!=E.rect){var X=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,E.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,E.rect.top)+"px";this.minInlineWidth=E.minWidth;this.minInlineHeight=E.minHeight;+this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Z=E.maxFitScale,Y=E.rect.width+2*X,ba=E.rect.height+2*X;R=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();Y=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Y):Y,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ba):ba,aa.height-80);this.diagramContainer.style.width=Y+"px";this.diagramContainer.style.height=+aa+"px";var da=this.editor.graph;aa=da.maxFitScale;da.maxFitScale=Z;da.fit(2*X,null,null,null,null,null,ba);this.setPageVisible(!1);if(null!=this.minInlineWidth&&da.getGraphBounds().width<this.minInlineWidth){var ha=da.container.scrollTop;this.resetScrollbars();da.container.scrollTop=ha}da.maxFitScale=aa;da.container.scrollTop-=X;da.container.scrollLeft-=X;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[E]));da.container.focus();null!=this.formatWindow&&+null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=da.container.style.top);var pa=da.getGraphBounds();da.container.clientWidth>pa.width+2*X&&(da.container.scrollLeft=pa.x+(pa.width+X-da.container.clientWidth)/2)}),10)})}null!=E.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=E.noExitBtn);null!=E.title&&null!=this.buttonContainer&&(m=this.createStatusDiv(""),mxUtils.write(m,E.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),+this.buttonContainer.appendChild(m),this.embedFilenameSpan=m);try{E.libs&&this.sidebar.showEntries(E.libs)}catch(aa){}E=null!=E.xmlpng?this.extractGraphModelFromPng(E.xmlpng):null!=E.descriptor?E.descriptor:E.xml}else{if("merge"==E.action){var ea=this.getCurrentFile();null!=ea&&(m=U(E.xml),null!=m&&""!=m&&ea.mergeFile(new LocalFile(this,m),function(){z.postMessage(JSON.stringify({event:"merge",message:E}),"*")},function(aa){z.postMessage(JSON.stringify({event:"merge",message:E,error:aa}),"*")}))}else"remoteInvokeReady"==+E.action?this.handleRemoteInvokeReady(z):"remoteInvoke"==E.action?this.handleRemoteInvoke(E,C.origin):"remoteInvokeResponse"==E.action?this.handleRemoteInvokeResponse(E):z.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(E)}),"*");return}}catch(aa){this.handleError(aa)}}var ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(aa,da){f=!0;+try{c(aa,da,null,O)}catch(ha){this.handleError(ha)}f=!1;null!=urlParams.modified&&this.editor.setStatus("");n=ca();p&&null==e&&(e=mxUtils.bind(this,function(ha,pa){ha=ca();ha==n||f||(pa=this.createLoadMessage("autosave"),pa.xml=ha,(window.opener||window.parent).postMessage(JSON.stringify(pa),"*"));n=ha}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",+e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)da=this.createLoadMessage("load"),da.xml=aa,z.postMessage(JSON.stringify(da),"*");null!=R&&R()});null!=E&&+"function"===typeof E.substring&&"data:application/vnd.visio;base64,"==E.substring(0,34)?(U="0M8R4KGxGuE"==E.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(E.substring(E.indexOf(",")+1)),function(aa){fa(aa,C)},mxUtils.bind(this,function(aa){this.handleError(aa)}),U)):null!=E&&"function"===typeof E.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(E,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(E,+mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?fa(aa.responseText,C):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=E&&"function"===typeof E.substring&&this.isLucidChartData(E)?this.convertLucidChart(E,mxUtils.bind(this,function(aa){fa(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==E||"object"!==typeof E||null==E.format||+null==E.data&&null==E.url?(E=U(E),fa(E,C)):this.loadDescriptor(E,mxUtils.bind(this,function(aa){fa(ca(),C)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var z=window.opener||window.parent;t="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";z.postMessage(t,"*");if("json"==urlParams.proto){var F=this.editor.graph.openLink;this.editor.graph.openLink=function(C,E,R){F.apply(this,arguments);z.postMessage(JSON.stringify({event:"openLink",+href:C,target:E,allowOpener:R}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,e,f,p){var n="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,t=document.createElement("button");t.setAttribute("title",c+(null!=f?" ("+f+")":""));t.style.marginLeft="6px";mxUtils.write(t,c);n?(t.className=p?"gePrimaryBtn":"",t.style.marginLeft="8px",t.style.padding="6px"):t.className="geBigButton"+(p?"":" geBigStandardButton");mxEvent.addListener(t,"click",e);return t};EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(c.style.marginRight="66px",c.style["float"]="right","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c)):(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,-function(){var e=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var n=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(n));this.customLayoutConfig=n;this.hideDialog()}catch(p){this.handleError(p)}}),null,null,null,null,mxUtils.bind(this,function(l,n){var p=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var u=n.value;n.value=JSON.stringify(JSON.parse(u));n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?-n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));n.value=u}catch(B){this.handleError(B)}}));p.setAttribute("title","copy");p.className="geBtn";l.appendChild(p)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(e.container,620,460,!0,!0);e.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(e){var l=mxUtils.bind(this,function(){this.loadingOrgChart=-!1;e.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),n=mxUtils.bind(this,function(p){this.loadingOrgChart=!1;e.clear()&&this.handleError(p)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",-function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var l=c.split("\n"),n=[],p=[],u=[],B={};if(0<l.length){var D={},G=this.editor.graph,E=null,T=null,O=null,S=null,-k=null,v=null,z=null,A="whiteSpace=wrap;html=1;",H=null,R=null,g="",q="auto",F="auto",J=!1,L=null,Q=null,U=40,V=40,W=100,X=0,Z=mxUtils.bind(this,function(){null!=e?e(Ca):(G.setSelectionCells(Ca),G.scrollCellToVisible(G.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Y=G.getFreeInsertPoint(),ba=Y.x,ea=Y.y;Y=ea;var ca=null,da="auto";R=null;for(var ma=[],aa=null,ia=null,ka=0;ka<l.length&&"#"==l[ka].charAt(0);){c=l[ka].replace(/\r$/,-"");for(ka++;ka<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[ka].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[ka].substring(1)),ka++;if("#"!=c.charAt(1)){var ta=c.indexOf(":");if(0<ta){var sa=mxUtils.trim(c.substring(1,ta)),fa=mxUtils.trim(c.substring(ta+1));"label"==sa?ca=Graph.sanitizeHtml(fa):"labelname"==sa&&0<fa.length&&"-"!=fa?k=fa:"labels"==sa&&0<fa.length&&"-"!=fa?z=JSON.parse(fa):"style"==sa?T=fa:"parentstyle"==sa?A=fa:"unknownStyle"==sa&&"-"!=fa?v=fa:"stylename"==sa&&0<fa.length&&-"-"!=fa?S=fa:"styles"==sa&&0<fa.length&&"-"!=fa?O=JSON.parse(fa):"vars"==sa&&0<fa.length&&"-"!=fa?E=JSON.parse(fa):"identity"==sa&&0<fa.length&&"-"!=fa?H=fa:"parent"==sa&&0<fa.length&&"-"!=fa?R=fa:"namespace"==sa&&0<fa.length&&"-"!=fa?g=fa:"width"==sa?q=fa:"height"==sa?F=fa:"collapsed"==sa&&"-"!=fa?J="true"==fa:"left"==sa&&0<fa.length?L=fa:"top"==sa&&0<fa.length?Q=fa:"ignore"==sa?ia=fa.split(","):"connect"==sa?ma.push(JSON.parse(fa)):"link"==sa?aa=fa:"padding"==sa?X=parseFloat(fa):"edgespacing"==-sa?U=parseFloat(fa):"nodespacing"==sa?V=parseFloat(fa):"levelspacing"==sa?W=parseFloat(fa):"layout"==sa&&(da=fa)}}}if(null==l[ka])throw Error(mxResources.get("invalidOrMissingFile"));var ra=this.editor.csvToArray(l[ka].replace(/\r$/,""));ta=c=null;sa=[];for(fa=0;fa<ra.length;fa++)H==ra[fa]&&(c=fa),R==ra[fa]&&(ta=fa),sa.push(mxUtils.trim(ra[fa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ca&&(ca="%"+sa[0]+"%");if(null!=ma)for(var ua=0;ua<ma.length;ua++)null==D[ma[ua].to]&&-(D[ma[ua].to]={});H=[];for(fa=ka+1;fa<l.length;fa++){var za=this.editor.csvToArray(l[fa].replace(/\r$/,""));if(null==za){var va=40<l[fa].length?l[fa].substring(0,40)+"...":l[fa];throw Error(va+" ("+fa+"):\n"+mxResources.get("containsValidationErrors"));}0<za.length&&H.push(za)}G.model.beginUpdate();try{for(fa=0;fa<H.length;fa++){za=H[fa];var ha=null,pa=null!=c?g+za[c]:null;l=!1;null!=pa&&(ha=G.model.getCell(pa),l=null==ha||0<=mxUtils.indexOf(n,ha));var Aa=new mxCell(ca,new mxGeometry(ba,Y,0,0),T||-"whiteSpace=wrap;html=1;");Aa.collapsed=J;Aa.vertex=!0;Aa.id=pa;null==ha||l||G.model.setCollapsed(ha,J);for(var na=0;na<za.length;na++)G.setAttributeForCell(Aa,sa[na],za[na]),null==ha||l||G.setAttributeForCell(ha,sa[na],za[na]);if(null!=k&&null!=z){var Ha=z[Aa.getAttribute(k)];null!=Ha&&(G.labelChanged(Aa,Ha),null==ha||l||G.cellLabelChanged(ha,Ha))}if(null!=S&&null!=O){var wa=O[Aa.getAttribute(S)];null!=wa&&(Aa.style=wa)}G.setAttributeForCell(Aa,"placeholders","1");Aa.style=G.replacePlaceholders(Aa,-Aa.style,E);null==ha||l?G.fireEvent(new mxEventObject("cellsInserted","cells",[Aa])):(G.model.setStyle(ha,Aa.style),0>mxUtils.indexOf(u,ha)&&u.push(ha),G.fireEvent(new mxEventObject("cellsInserted","cells",[ha])));l=null!=ha;ha=Aa;if(!l)for(ua=0;ua<ma.length;ua++)D[ma[ua].to][ha.getAttribute(ma[ua].to)]=ha;null!=aa&&"link"!=aa&&(G.setLinkForCell(ha,ha.getAttribute(aa)),G.setAttributeForCell(ha,aa,null));var Da=this.editor.graph.getPreferredSizeForCell(ha);R=null!=ta?G.model.getCell(g+za[ta]):null;-if(ha.vertex){va=null!=R?0:ba;ka=null!=R?0:ea;null!=L&&null!=ha.getAttribute(L)&&(ha.geometry.x=va+parseFloat(ha.getAttribute(L)));null!=Q&&null!=ha.getAttribute(Q)&&(ha.geometry.y=ka+parseFloat(ha.getAttribute(Q)));var Ea="@"==q.charAt(0)?ha.getAttribute(q.substring(1)):null;ha.geometry.width=null!=Ea&&"auto"!=Ea?parseFloat(ha.getAttribute(q.substring(1))):"auto"==q||"auto"==Ea?Da.width+X:parseFloat(q);var Na="@"==F.charAt(0)?ha.getAttribute(F.substring(1)):null;ha.geometry.height=null!=Na&&"auto"!=-Na&&"width"!=F?parseFloat(Na):"auto"==F||"auto"==Na?Da.height+X:"width"==F?ha.geometry.width:parseFloat(F);Y+=ha.geometry.height+V}l?(null==B[pa]&&(B[pa]=[]),B[pa].push(ha)):(n.push(ha),null!=R?(R.style=G.replacePlaceholders(R,A,E),G.addCell(ha,R),p.push(R)):u.push(G.addCell(ha)))}for(fa=0;fa<p.length;fa++)Ea="@"==q.charAt(0)?p[fa].getAttribute(q.substring(1)):null,Na="@"==F.charAt(0)?p[fa].getAttribute(F.substring(1)):null,"auto"!=q&&"auto"!=Ea||"auto"!=F&&"auto"!=Na||G.updateGroupBounds([p[fa]],-X,!0);var Ba=u.slice(),Ca=u.slice();for(ua=0;ua<ma.length;ua++){var Ia=ma[ua];for(fa=0;fa<n.length;fa++){ha=n[fa];var Va=mxUtils.bind(this,function(qa,oa,la){var ya=oa.getAttribute(la.from);if(null!=ya&&""!=ya){ya=ya.split(",");for(var Ja=0;Ja<ya.length;Ja++){var Fa=D[la.to][ya[Ja]];if(null==Fa&&null!=v){Fa=new mxCell(ya[Ja],new mxGeometry(ba,ea,0,0),v);Fa.style=G.replacePlaceholders(oa,Fa.style,E);var La=this.editor.graph.getPreferredSizeForCell(Fa);Fa.geometry.width=La.width+X;Fa.geometry.height=-La.height+X;D[la.to][ya[Ja]]=Fa;Fa.vertex=!0;Fa.id=ya[Ja];u.push(G.addCell(Fa))}if(null!=Fa){La=la.label;null!=la.fromlabel&&(La=(oa.getAttribute(la.fromlabel)||"")+(La||""));null!=la.sourcelabel&&(La=G.replacePlaceholders(oa,la.sourcelabel,E)+(La||""));null!=la.tolabel&&(La=(La||"")+(Fa.getAttribute(la.tolabel)||""));null!=la.targetlabel&&(La=(La||"")+G.replacePlaceholders(Fa,la.targetlabel,E));var Pa="target"==la.placeholders==!la.invert?Fa:qa;Pa=null!=la.style?G.replacePlaceholders(Pa,la.style,-E):G.createCurrentEdgeStyle();La=G.insertEdge(null,null,La||"",la.invert?Fa:qa,la.invert?qa:Fa,Pa);if(null!=la.labels)for(Pa=0;Pa<la.labels.length;Pa++){var Ka=la.labels[Pa],Ra=new mxCell(Ka.label||Pa,new mxGeometry(null!=Ka.x?Ka.x:0,null!=Ka.y?Ka.y:0,0,0),"resizable=0;html=1;");Ra.vertex=!0;Ra.connectable=!1;Ra.geometry.relative=!0;null!=Ka.placeholders&&(Ra.value=G.replacePlaceholders("target"==Ka.placeholders==!la.invert?Fa:qa,Ra.value,E));if(null!=Ka.dx||null!=Ka.dy)Ra.geometry.offset=new mxPoint(null!=-Ka.dx?Ka.dx:0,null!=Ka.dy?Ka.dy:0);La.insert(Ra)}if(null!=la.data)for(var Ma in la.data)G.setAttributeForCell(La,Ma,la.data[Ma]);Ca.push(La);mxUtils.remove(la.invert?qa:Fa,Ba)}}}});Va(ha,ha,Ia);if(null!=B[ha.id])for(na=0;na<B[ha.id].length;na++)Va(ha,B[ha.id][na],Ia)}}if(null!=ia)for(fa=0;fa<n.length;fa++)for(ha=n[fa],na=0;na<ia.length;na++)G.setAttributeForCell(ha,mxUtils.trim(ia[na]),null);if(0<u.length){var Ta=new mxParallelEdgeLayout(G);Ta.spacing=U;Ta.checkOverlap=!0;var Xa=function(){0<Ta.spacing&&-Ta.execute(G.getDefaultParent());for(var qa=0;qa<u.length;qa++){var oa=G.getCellGeometry(u[qa]);oa.x=Math.round(G.snap(oa.x));oa.y=Math.round(G.snap(oa.y));"auto"==q&&(oa.width=Math.round(G.snap(oa.width)));"auto"==F&&(oa.height=Math.round(G.snap(oa.height)))}};if("["==da.charAt(0)){var jb=Z;G.view.validate();this.executeLayouts(G.createLayouts(JSON.parse(da)),function(){Xa();jb()});Z=null}else if("circle"==da){var Sa=new mxCircleLayout(G);Sa.disableEdgeStyle=!1;Sa.resetEdges=!1;var bb=Sa.isVertexIgnored;-Sa.isVertexIgnored=function(qa){return bb.apply(this,arguments)||0>mxUtils.indexOf(u,qa)};this.executeLayout(function(){Sa.execute(G.getDefaultParent());Xa()},!0,Z);Z=null}else if("horizontaltree"==da||"verticaltree"==da||"auto"==da&&Ca.length==2*u.length-1&&1==Ba.length){G.view.validate();var Wa=new mxCompactTreeLayout(G,"horizontaltree"==da);Wa.levelDistance=V;Wa.edgeRouting=!1;Wa.resetEdges=!1;Wa.sortEdges=!0;this.executeLayout(function(){Wa.execute(G.getDefaultParent(),0<Ba.length?Ba[0]:null)},-!0,Z);Z=null}else if("horizontalflow"==da||"verticalflow"==da||"auto"==da&&1==Ba.length){G.view.validate();var cb=new mxHierarchicalLayout(G,"horizontalflow"==da?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);cb.intraCellSpacing=V;cb.parallelEdgeSpacing=U;cb.interRankCellSpacing=W;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(G.getDefaultParent(),Ca);G.moveCells(Ca,ba,ea)},!0,Z);Z=null}else if("orgchart"==da){G.view.validate();var hb=new mxOrgChartLayout(G,2,W,V),db=hb.isVertexIgnored;-hb.isVertexIgnored=function(qa){return db.apply(this,arguments)||0>mxUtils.indexOf(u,qa)};this.executeLayout(function(){hb.execute(G.getDefaultParent());Xa()},!0,Z);Z=null}else if("organic"==da||"auto"==da&&Ca.length>u.length){G.view.validate();var ja=new mxFastOrganicLayout(G);ja.forceConstant=3*V;ja.disableEdgeStyle=!1;ja.resetEdges=!1;var xa=ja.isVertexIgnored;ja.isVertexIgnored=function(qa){return xa.apply(this,arguments)||0>mxUtils.indexOf(u,qa)};this.executeLayout(function(){ja.execute(G.getDefaultParent());-Xa()},!0,Z);Z=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=Z&&Z()}}catch(qa){this.handleError(qa)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(e+=l+n+"="+urlParams[n],l="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;-if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),n;for(n in urlParams)0>mxUtils.indexOf(l,n)&&(c=0==e?c+"?":c+"&",null!=urlParams[n]&&(c+=n+"="+urlParams[n],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,l,n,p){c=new LinkDialog(this,c,e,l,!0,n,p);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&+function(){var e=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(f){if(0<f.length)try{var p=JSON.parse(f);this.executeLayouts(this.editor.graph.createLayouts(p));this.customLayoutConfig=p;this.hideDialog()}catch(n){this.handleError(n)}}),null,null,null,null,mxUtils.bind(this,function(f,p){var n=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var t=p.value;p.value=JSON.stringify(JSON.parse(t));p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?+p.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));p.value=t}catch(z){this.handleError(z)}}));n.setAttribute("title","copy");n.className="geBtn";f.appendChild(n)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(e.container,620,460,!0,!0);e.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(e){var f=mxUtils.bind(this,function(){this.loadingOrgChart=+!1;e.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),p=mxUtils.bind(this,function(n){this.loadingOrgChart=!1;e.clear()&&this.handleError(n)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",+function(){mxscript("js/orgchart/mxOrgChartLayout.js",f,null,null,null,p)},null,null,null,p)},null,null,null,p)},null,null,null,p):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",f,null,null,null,p))}),onerror)};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var f=c.split("\n"),p=[],n=[],t=[],z={};if(0<f.length){var F={},C=this.editor.graph,E=null,R=null,U=null,O=null,+Q=null,m=null,u=null,A="whiteSpace=wrap;html=1;",B=null,H=null,T="",k="auto",v="auto",G=!1,I=null,M=null,P=40,S=40,V=100,W=0,X=mxUtils.bind(this,function(){null!=e?e(za):(C.setSelectionCells(za),C.scrollCellToVisible(C.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=C.getFreeInsertPoint(),Y=Z.x,ba=Z.y;Z=ba;var ea=null,ca="auto";H=null;for(var fa=[],aa=null,da=null,ha=0;ha<f.length&&"#"==f[ha].charAt(0);){c=f[ha].replace(/\r$/,+"");for(ha++;ha<f.length&&"\\"==c.charAt(c.length-1)&&"#"==f[ha].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(f[ha].substring(1)),ha++;if("#"!=c.charAt(1)){var pa=c.indexOf(":");if(0<pa){var na=mxUtils.trim(c.substring(1,pa)),ia=mxUtils.trim(c.substring(pa+1));"label"==na?ea=Graph.sanitizeHtml(ia):"labelname"==na&&0<ia.length&&"-"!=ia?Q=ia:"labels"==na&&0<ia.length&&"-"!=ia?u=JSON.parse(ia):"style"==na?R=ia:"parentstyle"==na?A=ia:"unknownStyle"==na&&"-"!=ia?m=ia:"stylename"==na&&0<ia.length&&+"-"!=ia?O=ia:"styles"==na&&0<ia.length&&"-"!=ia?U=JSON.parse(ia):"vars"==na&&0<ia.length&&"-"!=ia?E=JSON.parse(ia):"identity"==na&&0<ia.length&&"-"!=ia?B=ia:"parent"==na&&0<ia.length&&"-"!=ia?H=ia:"namespace"==na&&0<ia.length&&"-"!=ia?T=ia:"width"==na?k=ia:"height"==na?v=ia:"collapsed"==na&&"-"!=ia?G="true"==ia:"left"==na&&0<ia.length?I=ia:"top"==na&&0<ia.length?M=ia:"ignore"==na?da=ia.split(","):"connect"==na?fa.push(JSON.parse(ia)):"link"==na?aa=ia:"padding"==na?W=parseFloat(ia):"edgespacing"==+na?P=parseFloat(ia):"nodespacing"==na?S=parseFloat(ia):"levelspacing"==na?V=parseFloat(ia):"layout"==na&&(ca=ia)}}}if(null==f[ha])throw Error(mxResources.get("invalidOrMissingFile"));var wa=this.editor.csvToArray(f[ha].replace(/\r$/,""));pa=c=null;na=[];for(ia=0;ia<wa.length;ia++)B==wa[ia]&&(c=ia),H==wa[ia]&&(pa=ia),na.push(mxUtils.trim(wa[ia]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+na[0]+"%");if(null!=fa)for(var ua=0;ua<fa.length;ua++)null==F[fa[ua].to]&&+(F[fa[ua].to]={});B=[];for(ia=ha+1;ia<f.length;ia++){var va=this.editor.csvToArray(f[ia].replace(/\r$/,""));if(null==va){var Ca=40<f[ia].length?f[ia].substring(0,40)+"...":f[ia];throw Error(Ca+" ("+ia+"):\n"+mxResources.get("containsValidationErrors"));}0<va.length&&B.push(va)}C.model.beginUpdate();try{for(ia=0;ia<B.length;ia++){va=B[ia];var ja=null,oa=null!=c?T+va[c]:null;f=!1;null!=oa&&(ja=C.model.getCell(oa),f=null==ja||0<=mxUtils.indexOf(p,ja));var ma=new mxCell(ea,new mxGeometry(Y,Z,0,0),R||+"whiteSpace=wrap;html=1;");ma.collapsed=G;ma.vertex=!0;ma.id=oa;null==ja||f||C.model.setCollapsed(ja,G);for(var Aa=0;Aa<va.length;Aa++)C.setAttributeForCell(ma,na[Aa],va[Aa]),null==ja||f||C.setAttributeForCell(ja,na[Aa],va[Aa]);if(null!=Q&&null!=u){var sa=u[ma.getAttribute(Q)];null!=sa&&(C.labelChanged(ma,sa),null==ja||f||C.cellLabelChanged(ja,sa))}if(null!=O&&null!=U){var Ia=U[ma.getAttribute(O)];null!=Ia&&(ma.style=Ia)}C.setAttributeForCell(ma,"placeholders","1");ma.style=C.replacePlaceholders(ma,+ma.style,E);null==ja||f?C.fireEvent(new mxEventObject("cellsInserted","cells",[ma])):(C.model.setStyle(ja,ma.style),0>mxUtils.indexOf(t,ja)&&t.push(ja),C.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));f=null!=ja;ja=ma;if(!f)for(ua=0;ua<fa.length;ua++)F[fa[ua].to][ja.getAttribute(fa[ua].to)]=ja;null!=aa&&"link"!=aa&&(C.setLinkForCell(ja,ja.getAttribute(aa)),C.setAttributeForCell(ja,aa,null));var xa=this.editor.graph.getPreferredSizeForCell(ja);H=null!=pa?C.model.getCell(T+va[pa]):null;+if(ja.vertex){Ca=null!=H?0:Y;ha=null!=H?0:ba;null!=I&&null!=ja.getAttribute(I)&&(ja.geometry.x=Ca+parseFloat(ja.getAttribute(I)));null!=M&&null!=ja.getAttribute(M)&&(ja.geometry.y=ha+parseFloat(ja.getAttribute(M)));var Ba="@"==k.charAt(0)?ja.getAttribute(k.substring(1)):null;ja.geometry.width=null!=Ba&&"auto"!=Ba?parseFloat(ja.getAttribute(k.substring(1))):"auto"==k||"auto"==Ba?xa.width+W:parseFloat(k);var Fa="@"==v.charAt(0)?ja.getAttribute(v.substring(1)):null;ja.geometry.height=null!=Fa&&"auto"!=+Fa&&"width"!=v?parseFloat(Fa):"auto"==v||"auto"==Fa?xa.height+W:"width"==v?ja.geometry.width:parseFloat(v);Z+=ja.geometry.height+S}f?(null==z[oa]&&(z[oa]=[]),z[oa].push(ja)):(p.push(ja),null!=H?(H.style=C.replacePlaceholders(H,A,E),C.addCell(ja,H),n.push(H)):t.push(C.addCell(ja)))}for(ia=0;ia<n.length;ia++)Ba="@"==k.charAt(0)?n[ia].getAttribute(k.substring(1)):null,Fa="@"==v.charAt(0)?n[ia].getAttribute(v.substring(1)):null,"auto"!=k&&"auto"!=Ba||"auto"!=v&&"auto"!=Fa||C.updateGroupBounds([n[ia]],+W,!0);var La=t.slice(),za=t.slice();for(ua=0;ua<fa.length;ua++){var Da=fa[ua];for(ia=0;ia<p.length;ia++){ja=p[ia];var Ja=mxUtils.bind(this,function(ta,ra,la){var qa=ra.getAttribute(la.from);if(null!=qa&&""!=qa){qa=qa.split(",");for(var ya=0;ya<qa.length;ya++){var Ea=F[la.to][qa[ya]];if(null==Ea&&null!=m){Ea=new mxCell(qa[ya],new mxGeometry(Y,ba,0,0),m);Ea.style=C.replacePlaceholders(ra,Ea.style,E);var Ha=this.editor.graph.getPreferredSizeForCell(Ea);Ea.geometry.width=Ha.width+W;Ea.geometry.height=+Ha.height+W;F[la.to][qa[ya]]=Ea;Ea.vertex=!0;Ea.id=qa[ya];t.push(C.addCell(Ea))}if(null!=Ea){Ha=la.label;null!=la.fromlabel&&(Ha=(ra.getAttribute(la.fromlabel)||"")+(Ha||""));null!=la.sourcelabel&&(Ha=C.replacePlaceholders(ra,la.sourcelabel,E)+(Ha||""));null!=la.tolabel&&(Ha=(Ha||"")+(Ea.getAttribute(la.tolabel)||""));null!=la.targetlabel&&(Ha=(Ha||"")+C.replacePlaceholders(Ea,la.targetlabel,E));var Pa="target"==la.placeholders==!la.invert?Ea:ta;Pa=null!=la.style?C.replacePlaceholders(Pa,la.style,+E):C.createCurrentEdgeStyle();Ha=C.insertEdge(null,null,Ha||"",la.invert?Ea:ta,la.invert?ta:Ea,Pa);if(null!=la.labels)for(Pa=0;Pa<la.labels.length;Pa++){var Ka=la.labels[Pa],Na=new mxCell(Ka.label||Pa,new mxGeometry(null!=Ka.x?Ka.x:0,null!=Ka.y?Ka.y:0,0,0),"resizable=0;html=1;");Na.vertex=!0;Na.connectable=!1;Na.geometry.relative=!0;null!=Ka.placeholders&&(Na.value=C.replacePlaceholders("target"==Ka.placeholders==!la.invert?Ea:ta,Na.value,E));if(null!=Ka.dx||null!=Ka.dy)Na.geometry.offset=new mxPoint(null!=+Ka.dx?Ka.dx:0,null!=Ka.dy?Ka.dy:0);Ha.insert(Na)}if(null!=la.data)for(var Va in la.data)C.setAttributeForCell(Ha,Va,la.data[Va]);za.push(Ha);mxUtils.remove(la.invert?ta:Ea,La)}}}});Ja(ja,ja,Da);if(null!=z[ja.id])for(Aa=0;Aa<z[ja.id].length;Aa++)Ja(ja,z[ja.id][Aa],Da)}}if(null!=da)for(ia=0;ia<p.length;ia++)for(ja=p[ia],Aa=0;Aa<da.length;Aa++)C.setAttributeForCell(ja,mxUtils.trim(da[Aa]),null);if(0<t.length){var Ra=new mxParallelEdgeLayout(C);Ra.spacing=P;Ra.checkOverlap=!0;var Sa=function(){0<Ra.spacing&&+Ra.execute(C.getDefaultParent());for(var ta=0;ta<t.length;ta++){var ra=C.getCellGeometry(t[ta]);ra.x=Math.round(C.snap(ra.x));ra.y=Math.round(C.snap(ra.y));"auto"==k&&(ra.width=Math.round(C.snap(ra.width)));"auto"==v&&(ra.height=Math.round(C.snap(ra.height)))}};if("["==ca.charAt(0)){var ab=X;C.view.validate();this.executeLayouts(C.createLayouts(JSON.parse(ca)),function(){Sa();ab()});X=null}else if("circle"==ca){var db=new mxCircleLayout(C);db.disableEdgeStyle=!1;db.resetEdges=!1;var Wa=db.isVertexIgnored;+db.isVertexIgnored=function(ta){return Wa.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){db.execute(C.getDefaultParent());Sa()},!0,X);X=null}else if("horizontaltree"==ca||"verticaltree"==ca||"auto"==ca&&za.length==2*t.length-1&&1==La.length){C.view.validate();var Xa=new mxCompactTreeLayout(C,"horizontaltree"==ca);Xa.levelDistance=S;Xa.edgeRouting=!1;Xa.resetEdges=!1;Xa.sortEdges=!0;this.executeLayout(function(){Xa.execute(C.getDefaultParent(),0<La.length?La[0]:null)},+!0,X);X=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==La.length){C.view.validate();var Ua=new mxHierarchicalLayout(C,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=S;Ua.parallelEdgeSpacing=P;Ua.interRankCellSpacing=V;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(C.getDefaultParent(),za);C.moveCells(za,Y,ba)},!0,X);X=null}else if("orgchart"==ca){C.view.validate();var eb=new mxOrgChartLayout(C,2,V,S),jb=eb.isVertexIgnored;+eb.isVertexIgnored=function(ta){return jb.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){eb.execute(C.getDefaultParent());Sa()},!0,X);X=null}else if("organic"==ca||"auto"==ca&&za.length>t.length){C.view.validate();var $a=new mxFastOrganicLayout(C);$a.forceConstant=3*S;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var ka=$a.isVertexIgnored;$a.isVertexIgnored=function(ta){return ka.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){$a.execute(C.getDefaultParent());+Sa()},!0,X);X=null}}this.hideDialog()}finally{C.model.endUpdate()}null!=X&&X()}}catch(ta){this.handleError(ta)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var f="?",p;for(p in urlParams)0>mxUtils.indexOf(c,p)&&null!=urlParams[p]&&(e+=f+p+"="+urlParams[p],f="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;+if("1"==urlParams.offline)c+=window.location.search;else{var f="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),p;for(p in urlParams)0>mxUtils.indexOf(f,p)&&(c=0==e?c+"?":c+"&",null!=urlParams[p]&&(c+=p+"="+urlParams[p],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,f,p,n){c=new LinkDialog(this,c,e,f,!0,p,n);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||e++;null!=this.gitHub&&e++;null!=this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);-this.menus.get("viewZoom").setEnabled(e);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));-c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(e);this.actions.get("zoomIn").setEnabled(e);this.actions.get("zoomOut").setEnabled(e);this.actions.get("smartFit").setEnabled(e);this.actions.get("resetView").setEnabled(e);this.actions.get("darkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("lightMode").setEnabled("atlas"!=Editor.currentTheme);l=this.actions.get("autoMode");l.setEnabled(l.isEnabled()&&"atlas"!=Editor.currentTheme);+this.menus.get("viewZoom").setEnabled(e);var f=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!f);this.actions.get("print").setEnabled(!f);this.menus.get("exportAs").setEnabled(!f);this.menus.get("embed").setEnabled(!f);f="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(f);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(f),this.menus.get("newLibrary").setEnabled(f));+c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(e);this.actions.get("zoomIn").setEnabled(e);this.actions.get("zoomOut").setEnabled(e);this.actions.get("smartFit").setEnabled(e);this.actions.get("resetView").setEnabled(e);this.actions.get("darkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("lightMode").setEnabled("atlas"!=Editor.currentTheme);f=this.actions.get("autoMode");f.setEnabled(f.isEnabled()&&"atlas"!=Editor.currentTheme);this.menus.get("edit").setEnabled(e);this.menus.get("view").setEnabled(e);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};-EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var N=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(c){var e=N.apply(this,arguments),l=mxUtils.bind(this,function(){e.refresh();this.restoreOpenLibraries()});this.addListener("sketchModeChanged",l);this.addListener("currentThemeChanged",l);return e};EditorUi.prototype.restoreOpenLibraries=-function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var e=0;e<c.length;e++)this.libraryLoaded(c[e].file,c[e].images,c[e].title,null!=c[e].div?"none"!=c[e].div.style.display:c[e].expand)};var P=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){P.apply(this,arguments);var c=this.editor.graph,e=this.getCurrentFile(),l=this.getSelectionState(),n=this.isDiagramActive(),p="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=e&&e.isEditable();-this.actions.get("undo").setEnabled(this.canUndo()&&p);this.actions.get("redo").setEnabled(this.canRedo()&&p);this.actions.get("autosave").setEnabled(null!=e&&e.isEditable()&&e.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("editConnectionPoints").setEnabled(n&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(n&&l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(n&&-l.image&&0<l.cells.length);this.actions.get("pageSetup").setEnabled(n);this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);this.actions.get("copyStyle").setEnabled(n&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&n&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("createShape").setEnabled(n);this.actions.get("createRevision").setEnabled(n);-this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);-this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.actions.get("properties").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):-"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var I=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);I.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,l,n,p,u,B,D){var G=c.editor.graph;-if("xml"==l)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(G.getSvg(n,p,u)),"image/svg+xml");else{var E=c.getFileData(!0,null,null,null,null,!0),T=G.getGraphBounds(),O=Math.floor(T.width*p/G.view.scale),S=Math.floor(T.height*p/G.view.scale);if(E.length<=MAX_REQUEST_SIZE&&O*S<MAX_AREA)if(c.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var k={globalVars:G.getExportVariables()};-D&&(k.grid={size:G.gridSize,steps:G.view.gridSteps,color:G.view.gridColor});c.saveRequest(e,l,function(v,z){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(z||"0")+(null!=v?"&filename="+encodeURIComponent(v):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+(0<B?"&dpi="+B:"")+"&bg="+(null!=n?n:"none")+"&w="+O+"&h="+S+"&border="+u+"&xml="+encodeURIComponent(E))})}else"png"==l?c.exportImage(p,null==n||"none"==n,!0,!1,!1,u,!0,!1,null,D,B):c.exportImage(p,!1,!0,!1,!1,u,!0,!1,"jpeg",D);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});-EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var n=c;this.currentPage!=this.pages[l]&&(n=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[l]),n.model.setRoot(this.pages[l].root));e+=this.pages[l].getName()+" "+n.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=-function(c){var e={},l=document.createElement("div");l.style.whiteSpace="nowrap";var n=document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(c));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(n);var p=document.createElement("div");p.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";p.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var u={};try{var B=mxSettings.getCustomLibraries();-for(c=0;c<B.length;c++){var D=B[c];if("R"==D.substring(0,1)){var G=JSON.parse(decodeURIComponent(D.substring(1)));u[G[0]]={id:G[0],title:G[1],downloadUrl:G[2]}}}}catch(E){}this.remoteInvoke("getCustomLibraries",null,null,function(E){p.innerText="";if(0==E.length)p.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var T=0;T<E.length;T++){var O=E[T];u[O.id]&&(e[O.id]=O);var S=this.addCheckbox(p,O.title,u[O.id]);-(function(k,v){mxEvent.addListener(v,"change",function(){this.checked?e[k.id]=k:delete e[k.id]})})(O,S)}},mxUtils.bind(this,function(E){p.innerText="";var T=document.createElement("div");T.style.padding="8px";T.style.textAlign="center";mxUtils.write(T,mxResources.get("error")+": ");mxUtils.write(T,null!=E&&null!=E.message?E.message:mxResources.get("unknownError"));p.appendChild(T)}));l.appendChild(p);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));-var E=0,T;for(T in e)null==u[T]&&(E++,mxUtils.bind(this,function(O){this.remoteInvoke("getFileContent",[O.downloadUrl],null,mxUtils.bind(this,function(S){E--;0==E&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,S,O)),this.showSidebar()}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){E--;0==E&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[T]));for(T in u)e[T]||this.closeLibrary(new RemoteLibrary(this,-null,u[T]));0==E&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=-[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,l=this.remoteInvokeCallbacks[e.callbackId];if(null==l)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):l.callback&&l.callback.apply(this,-c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,l,n,p){var u=!0,B=window.setTimeout(mxUtils.bind(this,function(){u=!1;p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),D=mxUtils.bind(this,function(){window.clearTimeout(B);u&&n.apply(this,arguments)}),G=mxUtils.bind(this,function(){window.clearTimeout(B);u&&p.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:D,-error:G});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var l=mxUtils.bind(this,function(E,T){var O={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=T?O.error={errResp:T}:null!=E&&(O.resp=E);this.remoteWin.postMessage(JSON.stringify(O),"*")});try{var n=c.funtionName,p=this.remoteInvokableFns[n];if(null!=p&&"function"===-typeof this[n]){if(p.allowedDomains){for(var u=!1,B=0;B<p.allowedDomains.length;B++)if(e=="https://"+p.allowedDomains[B]){u=!0;break}if(!u){l(null,"Invalid Call: "+n+" is not allowed.");return}}var D=c.functionArgs;Array.isArray(D)||(D=[]);if(p.isAsync)D.push(function(){l(Array.prototype.slice.apply(arguments))}),D.push(function(E){l(null,E||"Unkown Error")}),this[n].apply(this,D);else{var G=this[n].apply(this,D);l([G])}}else l(null,"Invalid Call: "+n+" is not found.")}catch(E){l(null,"Invalid Call: An error occurred, "+-E.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var n=l.open("database",2);n.onupgradeneeded=function(p){try{var u=n.result;1>p.oldVersion&&u.createObjectStore("objects",{keyPath:"key"});2>p.oldVersion&&(u.createObjectStore("files",{keyPath:"title"}),u.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(B){null!=e&&e(B)}};n.onsuccess=-mxUtils.bind(this,function(p){try{var u=n.result;this.database=u;EditorUi.migrateStorageFiles&&(StorageFile.migrate(u),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(B){if(!B||"1"==urlParams.forceMigration){var D=document.createElement("iframe");D.style.display="none";D.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);-document.body.appendChild(D);var G=!0,E=!1,T,O=0,S=mxUtils.bind(this,function(){E=!0;this.setDatabaseItem(".drawioMigrated3",!0);D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){O++;v()}),v=mxUtils.bind(this,function(){try{if(O>=T.length)S();else{var A=T[O];StorageFile.getFileContent(this,A,mxUtils.bind(this,function(H){null==H||".scratchpad"==A&&H==this.emptyLibraryXml?D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",-funtionName:"getLocalStorageFile",functionArgs:[A]}),"*"):k()}),k)}}catch(H){console.log(H)}}),z=mxUtils.bind(this,function(A){try{this.setDatabaseItem(null,[{title:A.title,size:A.data.length,lastModified:Date.now(),type:A.isLib?"L":"F"},{title:A.title,data:A.data}],k,k,["filesInfo","files"])}catch(H){console.log(H)}});B=mxUtils.bind(this,function(A){try{if(A.source==D.contentWindow){var H={};try{H=JSON.parse(A.data)}catch(R){}"init"==H.event?(D.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),-"*"),D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=H.event||E||(G?null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?(T=H.resp[0],G=!1,v()):S():null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?z(H.resp[0]):k())}}catch(R){console.log(R)}});window.addEventListener("message",B)}})));c(u);u.onversionchange=function(){u.close()}}catch(B){null!=e?e(B):null!=window.console&&console.warn(B)}});n.onerror=e;n.onblocked=function(){}}catch(p){null!=-e?e(p):null!=window.console&&console.error(p)}else null!=e&&e(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,l,n,p){this.openDatabase(mxUtils.bind(this,function(u){try{p=p||"objects";Array.isArray(p)||(p=[p],c=[c],e=[e]);var B=u.transaction(p,"readwrite");B.oncomplete=l;B.onerror=n;for(u=0;u<p.length;u++)B.objectStore(p[u]).put(null!=c&&null!=c[u]?{key:c[u],data:e[u]}:e[u])}catch(D){null!=n&&n(D)}}),n)};EditorUi.prototype.removeDatabaseItem=-function(c,e,l,n){this.openDatabase(mxUtils.bind(this,function(p){try{n=n||"objects";Array.isArray(n)||(n=[n],c=[c]);var u=p.transaction(n,"readwrite");u.oncomplete=e;u.onerror=l;for(p=0;p<n.length;p++)u.objectStore(n[p]).delete(c[p])}catch(B){null!=l&&l(B)}}),l)};EditorUi.prototype.getDatabaseItem=function(c,e,l,n){this.openDatabase(mxUtils.bind(this,function(p){try{n=n||"objects";var u=p.transaction([n],"readonly").objectStore(n).get(c);u.onsuccess=function(){e(u.result)};u.onerror=l}catch(B){null!=-l&&l(B)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,e,l){this.openDatabase(mxUtils.bind(this,function(n){try{l=l||"objects";var p=n.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),u=[];p.onsuccess=function(B){null==B.target.result?c(u):(u.push(B.target.result.value),B.target.result.continue())};p.onerror=e}catch(B){null!=e&&e(B)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,l){this.openDatabase(mxUtils.bind(this,function(n){try{l=l||"objects";-var p=n.transaction([l],"readonly").objectStore(l).getAllKeys();p.onsuccess=function(){c(p.result)};p.onerror=e}catch(u){null!=e&&e(u)}}),e)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};-EditorUi.prototype.getComments=function(c,e){var l=this.getCurrentFile();null!=l?l.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,l){var n=this.getCurrentFile();null!=n?n.addComment(c,e,l):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var l=this.getCurrentFile();-return null!=l?l.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var l=this.getCurrentFile();null!=l&&l.getRevisions?l.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==-DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,l,n,p,u,B,D){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,l,n,p,u,B,D)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};-EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,l,n,p,u,B,D,G,E,T,O,S,k,v,z){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");-return this.editor.exportToCanvas(c,e,l,n,p,u,B,D,G,E,T,O,S,k,v,z)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,l,n)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");-return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,l,n)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,l,n,p){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");-return Editor.writeGraphModelToPng(c,e,l,n,p)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var l=localStorage.key(e),n=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<n.length){var p="<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(p||-n)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();-var CommentsWindow=function(b,f,m,d,t,y){function x(){for(var k=u.getElementsByTagName("div"),v=0,z=0;z<k.length;z++)"none"!=k[z].style.display&&k[z].parentNode==u&&v++;B.style.display=0==v?"block":"none"}function C(k,v,z,A){function H(){v.removeChild(q);v.removeChild(F);g.style.display="block";R.style.display="block"}l={div:v,comment:k,saveCallback:z,deleteOnCancel:A};var R=v.querySelector(".geCommentTxt"),g=v.querySelector(".geCommentActionsList"),q=document.createElement("textarea");q.className=-"geCommentEditTxtArea";q.style.minHeight=R.offsetHeight+"px";q.value=k.content;v.insertBefore(q,R);var F=document.createElement("div");F.className="geCommentEditBtns";var J=mxUtils.button(mxResources.get("cancel"),function(){A?(v.parentNode.removeChild(v),x()):H();l=null});J.className="geCommentEditBtn";F.appendChild(J);var L=mxUtils.button(mxResources.get("save"),function(){R.innerText="";k.content=q.value;mxUtils.write(R,k.content);H();z(k);l=null});mxEvent.addListener(q,"keydown",mxUtils.bind(this,-function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(L.click(),mxEvent.consume(Q)):27==Q.keyCode&&(J.click(),mxEvent.consume(Q)))}));L.focus();L.className="geCommentEditBtn gePrimaryBtn";F.appendChild(L);v.insertBefore(F,R);g.style.display="none";R.style.display="none";q.focus()}function K(k,v){v.innerText="";k=new Date(k.modifiedDate);var z=b.timeSince(k);null==z&&(z=mxResources.get("lessThanAMinute"));mxUtils.write(v,mxResources.get("timeAgo",-[z],"{1} ago"));v.setAttribute("title",k.toLocaleDateString()+" "+k.toLocaleTimeString())}function M(k){var v=document.createElement("img");v.className="geCommentBusyImg";v.src=IMAGE_PATH+"/spin.gif";k.appendChild(v);k.busyImg=v}function N(k){k.style.border="1px solid red";k.busyImg.parentNode==k&&k.removeChild(k.busyImg)}function P(k){k.style.border="";k.busyImg.parentNode==k&&k.removeChild(k.busyImg)}function I(k,v,z,A,H){function R(V,W,X){var Z=document.createElement("li");Z.className="geCommentAction";-var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,V);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){W(ba,k);ba.preventDefault();mxEvent.consume(ba)});U.appendChild(Z);X&&(Z.style.display="none")}function g(){function V(Z){W.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,V(Z.replies[Y])}var W=[],X=F;V(k);return{pdiv:X,replies:W}}function q(V,W,X,Z,Y){function ba(){M(ma);k.addReply(da,function(aa){da.id=aa;k.replies.push(da);-P(ma);X&&X()},function(aa){ea();N(ma);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function ea(){C(da,ma,function(aa){ba()},!0)}var ca=g().pdiv,da=b.newComment(V,b.getCurrentUser());da.pCommentId=k.id;null==k.replies&&(k.replies=[]);var ma=I(da,k.replies,ca,A+1);W?ea():ba()}if(H||!k.isResolved){B.style.display="none";var F=document.createElement("div");F.className="geCommentContainer";F.setAttribute("data-commentId",k.id);F.style.marginLeft=20*A+5+-"px";k.isResolved&&(n.style.opacity="0.7");var J=document.createElement("div");J.className="geCommentHeader";var L=document.createElement("img");L.className="geCommentUserImg";L.src=null!=k.user&&null!=k.user.pictureUrl?k.user.pictureUrl:Editor.userImage;J.appendChild(L);L=document.createElement("div");L.className="geCommentHeaderTxt";J.appendChild(L);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,null!=k.user?k.user.displayName:mxResources.get("unknownUser"));-L.appendChild(Q);Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",k.id);K(k,Q);L.appendChild(Q);F.appendChild(J);J=document.createElement("div");J.className="geCommentTxt";mxUtils.write(J,k.content||"");F.appendChild(J);k.isLocked&&(F.style.opacity="0.5");J=document.createElement("div");J.className="geCommentActions";var U=document.createElement("ul");U.className="geCommentActionsList";J.appendChild(U);c||k.isLocked||0!=A&&!e||R(mxResources.get("reply"),-function(){q("",!0)},k.isResolved);L=b.getCurrentUser();null==L||null==k.user||L.id!=k.user.id||c||k.isLocked||(R(mxResources.get("edit"),function(){function V(){C(k,F,function(){M(F);k.editComment(k.content,function(){P(F)},function(W){N(F);V();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}V()},k.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){M(F);k.deleteComment(function(V){if(!0===V){V=F.querySelector(".geCommentTxt");-V.innerText="";mxUtils.write(V,mxResources.get("msgDeleted"));var W=F.querySelectorAll(".geCommentAction");for(V=0;V<W.length;V++)W[V].parentNode.removeChild(W[V]);P(F);F.style.opacity="0.5"}else{W=g(k).replies;for(V=0;V<W.length;V++)u.removeChild(W[V]);for(V=0;V<v.length;V++)if(v[V]==k){v.splice(V,1);break}B.style.display=0==u.getElementsByTagName("div").length?"block":"none"}},function(V){N(F);b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},k.isResolved));-c||k.isLocked||0!=A||R(k.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(V){function W(){var X=V.target;X.innerText="";k.isResolved=!k.isResolved;mxUtils.write(X,k.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=k.isResolved?"none":"",Y=g(k).replies,ba="light-dark("+(k.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<Y.length;ea++){Y[ea].style.backgroundColor=ba;for(var ca=Y[ea].querySelectorAll(".geCommentAction"),da=0;da<ca.length;da++)ca[da]!=-X.parentNode&&(ca[da].style.display=Z);T||(Y[ea].style.display="none")}x()}k.isResolved?q(mxResources.get("reOpened")+": ",!0,W,!1,!0):q(mxResources.get("markedAsResolved"),!1,W,!0)});F.appendChild(J);null!=z?u.insertBefore(F,z.nextSibling):u.appendChild(F);for(z=0;null!=k.replies&&z<k.replies.length;z++)J=k.replies[z],J.isResolved=k.isResolved,I(J,k.replies,null,A+1,H);null!=l&&(l.comment.id==k.id?(H=k.content,k.content=l.comment.content,C(k,F,l.saveCallback,l.deleteOnCancel),k.content=H):null==-l.comment.id&&l.comment.pCommentId==k.id&&(u.appendChild(l.div),C(l.comment,l.div,l.saveCallback,l.deleteOnCancel)));return F}}var c=!b.canComment(),e=b.canReplyToReplies(),l=null,n=document.createElement("div");n.className="geCommentsWin";n.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var p=EditorUi.compactUi?"26px":"30px",u=document.createElement("div");u.className="geCommentsList";u.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";u.style.bottom=parseInt(p)+-7+"px";n.appendChild(u);var B=document.createElement("span");B.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(B,mxResources.get("noCommentsFound"));var D=document.createElement("div");D.className="geToolbarContainer geCommentsToolbar";D.style.height=p;D.style.padding="3px 4px 4px 4px";p=document.createElement("a");p.className="geToolbarButton geAdaptiveAsset geToggleItem";p.style.width="16px";p.style.height="18px";p.style.backgroundPosition="center center";p.style.backgroundRepeat=-"no-repeat";p.style.backgroundSize="20px";p.style.margin="0 2px";p.style.display="inline-block";p.style.cursor="pointer";if(!c){var G=p.cloneNode();G.style.backgroundImage="url("+Editor.plusImage+")";G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(k){function v(){C(z,A,function(H){M(A);b.addComment(H,function(R){H.id=R;O.push(H);P(A)},function(R){N(A);v();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var z=-b.newComment("",b.getCurrentUser()),A=I(z,O,null,0);v();k.preventDefault();mxEvent.consume(k)});D.appendChild(G)}var E=p.cloneNode();E.classList.add("geToggleItem");E.style.backgroundImage="url("+Editor.checkImage+")";E.setAttribute("title",mxResources.get("showResolved"));var T=!1;mxEvent.addListener(E,"click",function(k){(T=!T)?E.classList.add("geActiveItem"):E.classList.remove("geActiveItem");S();k.preventDefault();mxEvent.consume(k)});D.appendChild(E);b.commentsRefreshNeeded()&&(G=p.cloneNode(),-G.style.backgroundImage="url("+Editor.refreshImage+")",G.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(G,"click",function(k){S();k.preventDefault();mxEvent.consume(k)}),D.appendChild(G));b.commentsSaveNeeded()&&(p=p.cloneNode(),p.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',p.setAttribute("title",mxResources.get("save")),p.className="geButton geAdaptiveAsset",mxEvent.addListener(p,"click",function(k){y();k.preventDefault();mxEvent.consume(k)}),-D.appendChild(p));n.appendChild(D);var O=[],S=mxUtils.bind(this,function(){this.hasError=!1;if(null!=l)try{l.div=l.div.cloneNode(!0);var k=l.div.querySelector(".geCommentEditTxtArea"),v=l.div.querySelector(".geCommentEditBtns");l.comment.content=k.value;k.parentNode.removeChild(k);v.parentNode.removeChild(v)}catch(z){b.handleError(z)}u.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+-"...</div>";e=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(z){function A(H){if(null!=H){H.sort(function(g,q){return new Date(g.modifiedDate)-new Date(q.modifiedDate)});for(var R=0;R<H.length;R++)A(H[R].replies)}}z.sort(function(H,R){return new Date(H.modifiedDate)-new Date(R.modifiedDate)});u.innerText="";u.appendChild(B);B.style.display="block";O=z;for(z=0;z<O.length;z++)A(O[z].replies),I(O[z],O,null,0,T);null!=l&&null==l.comment.id&&null==l.comment.pCommentId&&(u.appendChild(l.div),-C(l.comment,l.div,l.saveCallback,l.deleteOnCancel))},mxUtils.bind(this,function(z){u.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(z&&z.message?": "+z.message:""));this.hasError=!0})):u.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});S();this.refreshComments=S;D=mxUtils.bind(this,function(){function k(R){var g=z[R.id];if(null!=g)for(K(R,g),g=0;null!=R.replies&&g<R.replies.length;g++)k(R.replies[g])}if(this.window.isVisible()){for(var v=u.querySelectorAll(".geCommentDate"),z=-{},A=0;A<v.length;A++){var H=v[A];z[H.getAttribute("data-commentId")]=H}for(A=0;A<O.length;A++)k(O[A])}});setInterval(D,6E4);this.refreshCommentsTime=D;this.window=new mxWindow(mxResources.get("comments"),n,f,m,d,t,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));-b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,m,d,t,y,x,C,K,M,N){var P=document.createElement("div");P.style.textAlign="center";N=null!=N?N:44;var I=document.createElement("div");I.style.padding="6px";I.style.overflow="auto";I.style.maxHeight=N+"px";I.style.lineHeight="1.2em";mxUtils.write(I,f);P.appendChild(I);null!=M&&(I=document.createElement("div"),I.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",M),I.appendChild(f),P.appendChild(I));M=document.createElement("div");-M.style.textAlign="center";M.style.whiteSpace="nowrap";var c=document.createElement("input");c.setAttribute("type","checkbox");y=mxUtils.button(y||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(c.checked)});y.className="geBtn";null!=C&&(y.innerHTML=C+"<br>"+y.innerHTML,y.style.paddingBottom="8px",y.style.paddingTop="8px",y.style.height="auto",y.style.width="40%");b.editor.cancelFirst&&M.appendChild(y);var e=mxUtils.button(t||mxResources.get("ok"),function(){b.hideDialog();null!=m&&-m(c.checked)});M.appendChild(e);null!=x?(e.innerHTML=x+"<br>"+e.innerHTML+"<br>",e.style.paddingBottom="8px",e.style.paddingTop="8px",e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";b.editor.cancelFirst||M.appendChild(y);P.appendChild(M);K?(M.style.marginTop="10px",I=document.createElement("p"),I.style.marginTop="20px",I.style.marginBottom="0px",I.appendChild(c),t=document.createElement("span"),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),-I.appendChild(t),P.appendChild(I),mxEvent.addListener(t,"click",function(l){c.checked=!c.checked;mxEvent.consume(l)})):M.style.marginTop="12px";this.init=function(){e.focus()};this.container=P},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};+EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var e=0;e<c.length;e++)this.libraryLoaded(c[e].file,c[e].images,c[e].title,null!=c[e].div?"none"!=c[e].div.style.display:c[e].expand)};var L=EditorUi.prototype.updateActionStates;+EditorUi.prototype.updateActionStates=function(){L.apply(this,arguments);var c=this.editor.graph,e=this.getCurrentFile(),f=this.getSelectionState(),p=this.isDiagramActive(),n="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=e&&e.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&n);this.actions.get("redo").setEnabled(this.canRedo()&&n);this.actions.get("autosave").setEnabled(null!=e&&e.isEditable()&&e.isAutosaveOptional());this.actions.get("guides").setEnabled(p);this.actions.get("editData").setEnabled(c.isEnabled());+this.actions.get("editConnectionPoints").setEnabled(p&&0==f.edges.length&&1==f.vertices.length);this.actions.get("editImage").setEnabled(p&&f.image&&0<f.cells.length);this.actions.get("crop").setEnabled(p&&f.image&&0<f.cells.length);this.actions.get("pageSetup").setEnabled(p);this.actions.get("shadowVisible").setEnabled(p);this.actions.get("connectionArrows").setEnabled(p);this.actions.get("connectionPoints").setEnabled(p);this.actions.get("copyStyle").setEnabled(p&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=+this.copiedStyle&&p&&0<f.cells.length);this.actions.get("editGeometry").setEnabled(0<f.vertices.length);this.actions.get("createShape").setEnabled(p);this.actions.get("createRevision").setEnabled(p);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(p&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&+!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.actions.get("properties").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=+e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(p&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var N=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=+null);N.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,f,p,n,t,z,F){var C=c.editor.graph;if("xml"==f)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==f)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(C.getSvg(p,n,t)),"image/svg+xml");else{var E=c.getFileData(!0,null,null,null,null,!0),R=C.getGraphBounds(),U=Math.floor(R.width*n/C.view.scale),O=Math.floor(R.height*+n/C.view.scale);if(E.length<=MAX_REQUEST_SIZE&&U*O<MAX_AREA)if(c.hideDialog(),"png"!=f&&"jpg"!=f&&"jpeg"!=f||!c.isExportToCanvas()){var Q={globalVars:C.getExportVariables()};F&&(Q.grid={size:C.gridSize,steps:C.view.gridSteps,color:C.view.gridColor});c.saveRequest(e,f,function(m,u){return new mxXmlRequest(EXPORT_URL,"format="+f+"&base64="+(u||"0")+(null!=m?"&filename="+encodeURIComponent(m):"")+"&extras="+encodeURIComponent(JSON.stringify(Q))+(0<z?"&dpi="+z:"")+"&bg="+(null!=p?p:"none")+"&w="+U+"&h="++O+"&border="+t+"&xml="+encodeURIComponent(E))})}else"png"==f?c.exportImage(n,null==p||"none"==p,!0,!1,!1,t,!0,!1,null,F,z):c.exportImage(n,!1,!0,!1,!1,t,!0,!1,"jpeg",F);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var f=0;f<this.pages.length;f++){var p=c;this.currentPage!=this.pages[f]&&(p=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[f]),+p.model.setRoot(this.pages[f].root));e+=this.pages[f].getName()+" "+p.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},f=document.createElement("div");f.style.whiteSpace="nowrap";var p=document.createElement("h3");mxUtils.write(p,mxUtils.htmlEntities(c));p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(p);var n=document.createElement("div");n.style.cssText=+"border:1px solid lightGray;overflow: auto;height:300px";n.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var t={};try{var z=mxSettings.getCustomLibraries();for(c=0;c<z.length;c++){var F=z[c];if("R"==F.substring(0,1)){var C=JSON.parse(decodeURIComponent(F.substring(1)));t[C[0]]={id:C[0],title:C[1],downloadUrl:C[2]}}}}catch(E){}this.remoteInvoke("getCustomLibraries",null,null,function(E){n.innerText="";if(0==E.length)n.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'++mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<E.length;R++){var U=E[R];t[U.id]&&(e[U.id]=U);var O=this.addCheckbox(n,U.title,t[U.id]);(function(Q,m){mxEvent.addListener(m,"change",function(){this.checked?e[Q.id]=Q:delete e[Q.id]})})(U,O)}},mxUtils.bind(this,function(E){n.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=E&&null!=E.message?E.message:+mxResources.get("unknownError"));n.appendChild(R)}));f.appendChild(n);f=new CustomDialog(this,f,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var E=0,R;for(R in e)null==t[R]&&(E++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],null,mxUtils.bind(this,function(O){E--;0==E&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,O,U)),this.showSidebar()}catch(Q){this.handleError(Q,mxResources.get("errorLoadingFile"))}}),+mxUtils.bind(this,function(){E--;0==E&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[R]));for(R in t)e[R]||this.closeLibrary(new RemoteLibrary(this,null,t[R]));0==E&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(f.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},+getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,f=this.remoteInvokeCallbacks[e.callbackId];+if(null==f)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?f.error&&f.error(c.error.errResp):f.callback&&f.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,f,p,n){var t=!0,z=window.setTimeout(mxUtils.bind(this,function(){t=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),F=mxUtils.bind(this,function(){window.clearTimeout(z);t&&p.apply(this,arguments)}),C=mxUtils.bind(this,+function(){window.clearTimeout(z);t&&n.apply(this,arguments)});f=f||{};f.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:F,error:C});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:f});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var f=mxUtils.bind(this,function(E,R){var U={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=R?+U.error={errResp:R}:null!=E&&(U.resp=E);this.remoteWin.postMessage(JSON.stringify(U),"*")});try{var p=c.funtionName,n=this.remoteInvokableFns[p];if(null!=n&&"function"===typeof this[p]){if(n.allowedDomains){for(var t=!1,z=0;z<n.allowedDomains.length;z++)if(e=="https://"+n.allowedDomains[z]){t=!0;break}if(!t){f(null,"Invalid Call: "+p+" is not allowed.");return}}var F=c.functionArgs;Array.isArray(F)||(F=[]);if(n.isAsync)F.push(function(){f(Array.prototype.slice.apply(arguments))}),F.push(function(E){f(null,+E||"Unkown Error")}),this[p].apply(this,F);else{var C=this[p].apply(this,F);f([C])}}else f(null,"Invalid Call: "+p+" is not found.")}catch(E){f(null,"Invalid Call: An error occurred, "+E.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var f=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=f)try{var p=f.open("database",2);p.onupgradeneeded=function(n){try{var t=p.result;1>n.oldVersion&&t.createObjectStore("objects",{keyPath:"key"});2>n.oldVersion&&+(t.createObjectStore("files",{keyPath:"title"}),t.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(z){null!=e&&e(z)}};p.onsuccess=mxUtils.bind(this,function(n){try{var t=p.result;this.database=t;EditorUi.migrateStorageFiles&&(StorageFile.migrate(t),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(z){if(!z||+"1"==urlParams.forceMigration){var F=document.createElement("iframe");F.style.display="none";F.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(F);var C=!0,E=!1,R,U=0,O=mxUtils.bind(this,function(){E=!0;this.setDatabaseItem(".drawioMigrated3",!0);F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Q=mxUtils.bind(this,function(){U++;m()}),m=mxUtils.bind(this,function(){try{if(U>=+R.length)O();else{var A=R[U];StorageFile.getFileContent(this,A,mxUtils.bind(this,function(B){null==B||".scratchpad"==A&&B==this.emptyLibraryXml?F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[A]}),"*"):Q()}),Q)}}catch(B){console.log(B)}}),u=mxUtils.bind(this,function(A){try{this.setDatabaseItem(null,[{title:A.title,size:A.data.length,lastModified:Date.now(),type:A.isLib?"L":"F"},{title:A.title,data:A.data}],Q,Q,["filesInfo","files"])}catch(B){console.log(B)}});+z=mxUtils.bind(this,function(A){try{if(A.source==F.contentWindow){var B={};try{B=JSON.parse(A.data)}catch(H){}"init"==B.event?(F.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=B.event||E||(C?null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?(R=B.resp[0],C=!1,m()):O():null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?u(B.resp[0]):Q())}}catch(H){console.log(H)}});+window.addEventListener("message",z)}})));c(t);t.onversionchange=function(){t.close()}}catch(z){null!=e?e(z):null!=window.console&&console.warn(z)}});p.onerror=e;p.onblocked=function(){}}catch(n){null!=e?e(n):null!=window.console&&console.error(n)}else null!=e&&e(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,f,p,n){this.openDatabase(mxUtils.bind(this,function(t){try{n=n||"objects";Array.isArray(n)||(n=[n],c=[c],e=[e]);var z=t.transaction(n,+"readwrite");z.oncomplete=f;z.onerror=p;for(t=0;t<n.length;t++)z.objectStore(n[t]).put(null!=c&&null!=c[t]?{key:c[t],data:e[t]}:e[t])}catch(F){null!=p&&p(F)}}),p)};EditorUi.prototype.removeDatabaseItem=function(c,e,f,p){this.openDatabase(mxUtils.bind(this,function(n){try{p=p||"objects";Array.isArray(p)||(p=[p],c=[c]);var t=n.transaction(p,"readwrite");t.oncomplete=e;t.onerror=f;for(n=0;n<p.length;n++)t.objectStore(p[n]).delete(c[n])}catch(z){null!=f&&f(z)}}),f)};EditorUi.prototype.getDatabaseItem=+function(c,e,f,p){this.openDatabase(mxUtils.bind(this,function(n){try{p=p||"objects";var t=n.transaction([p],"readonly").objectStore(p).get(c);t.onsuccess=function(){e(t.result)};t.onerror=f}catch(z){null!=f&&f(z)}}),f)};EditorUi.prototype.getDatabaseItems=function(c,e,f){this.openDatabase(mxUtils.bind(this,function(p){try{f=f||"objects";var n=p.transaction([f],"readonly").objectStore(f).openCursor(IDBKeyRange.lowerBound(0)),t=[];n.onsuccess=function(z){null==z.target.result?c(t):(t.push(z.target.result.value),+z.target.result.continue())};n.onerror=e}catch(z){null!=e&&e(z)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,f){this.openDatabase(mxUtils.bind(this,function(p){try{f=f||"objects";var n=p.transaction([f],"readonly").objectStore(f).getAllKeys();n.onsuccess=function(){c(n.result)};n.onerror=e}catch(t){null!=e&&e(t)}}),e)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=+this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,e){var f=this.getCurrentFile();null!=f?f.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,f){var p=this.getCurrentFile();null!=p?p.addComment(c,e,f):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?+c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var f=this.getCurrentFile();return null!=f?f.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var f=this.getCurrentFile();null!=+f&&f.getRevisions?f.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,f,p,n,t,z,F){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");+return this.editor.loadUrl(c,e,f,p,n,t,z,F)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");+return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,f,p,n,t,z,F,C,E,R,U,O,Q,m,u){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,f,p,n,t,z,F,C,E,R,U,O,Q,m,u)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,f,p){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");+return this.editor.convertImages(c,e,f,p)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,f,p){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,f,p)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");+return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,f,p,n){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,e,f,p,n)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var f=localStorage.key(e),p=localStorage.getItem(f);if(0<f.length&&(".scratchpad"==f||"."!=f.charAt(0))&&0<p.length){var n=+"<mxfile "===p.substring(0,8)||"<?xml"===p.substring(0,5)||"\x3c!--[if IE]>"===p.substring(0,12);p="<mxlibrary>"===p.substring(0,11);(n||p)&&c.push(f)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();+var CommentsWindow=function(b,g,l,d,q,y){function x(){for(var m=z.getElementsByTagName("div"),u=0,A=0;A<m.length;A++)"none"!=m[A].style.display&&m[A].parentNode==z&&u++;F.style.display=0==u?"block":"none"}function D(m,u,A,B){function H(){u.removeChild(v);u.removeChild(G);k.style.display="block";T.style.display="block"}p={div:u,comment:m,saveCallback:A,deleteOnCancel:B};var T=u.querySelector(".geCommentTxt"),k=u.querySelector(".geCommentActionsList"),v=document.createElement("textarea");v.className=+"geCommentEditTxtArea";v.style.minHeight=T.offsetHeight+"px";v.value=m.content;u.insertBefore(v,T);var G=document.createElement("div");G.className="geCommentEditBtns";var I=mxUtils.button(mxResources.get("cancel"),function(){B?(u.parentNode.removeChild(u),x()):H();p=null});I.className="geCommentEditBtn";G.appendChild(I);var M=mxUtils.button(mxResources.get("save"),function(){T.innerText="";m.content=v.value;mxUtils.write(T,m.content);H();A(m);p=null});mxEvent.addListener(v,"keydown",mxUtils.bind(this,+function(P){mxEvent.isConsumed(P)||((mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P))&&13==P.keyCode?(M.click(),mxEvent.consume(P)):27==P.keyCode&&(I.click(),mxEvent.consume(P)))}));M.focus();M.className="geCommentEditBtn gePrimaryBtn";G.appendChild(M);u.insertBefore(G,T);k.style.display="none";T.style.display="none";v.focus()}function J(m,u){u.innerText="";m=new Date(m.modifiedDate);var A=b.timeSince(m);null==A&&(A=mxResources.get("lessThanAMinute"));mxUtils.write(u,mxResources.get("timeAgo",+[A],"{1} ago"));u.setAttribute("title",m.toLocaleDateString()+" "+m.toLocaleTimeString())}function K(m){var u=document.createElement("img");u.className="geCommentBusyImg";u.src=IMAGE_PATH+"/spin.gif";m.appendChild(u);m.busyImg=u}function L(m){m.style.border="1px solid red";m.busyImg.parentNode==m&&m.removeChild(m.busyImg)}function N(m){m.style.border="";m.busyImg.parentNode==m&&m.removeChild(m.busyImg)}function c(m,u,A,B,H){function T(V,W,X){var Z=document.createElement("li");Z.className="geCommentAction";+var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,V);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){W(ba,m);ba.preventDefault();mxEvent.consume(ba)});S.appendChild(Z);X&&(Z.style.display="none")}function k(){function V(Z){W.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,V(Z.replies[Y])}var W=[],X=G;V(m);return{pdiv:X,replies:W}}function v(V,W,X,Z,Y){function ba(){K(aa);m.addReply(fa,function(da){fa.id=da;m.replies.push(fa);+N(aa);X&&X()},function(da){ea();L(aa);b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function ea(){D(fa,aa,function(da){ba()},!0)}var ca=k().pdiv,fa=b.newComment(V,b.getCurrentUser());fa.pCommentId=m.id;null==m.replies&&(m.replies=[]);var aa=c(fa,m.replies,ca,B+1);W?ea():ba()}if(H||!m.isResolved){F.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",m.id);G.style.marginLeft=20*B+5++"px";m.isResolved&&(n.style.opacity="0.7");var I=document.createElement("div");I.className="geCommentHeader";var M=document.createElement("img");M.className="geCommentUserImg";M.src=null!=m.user&&null!=m.user.pictureUrl?m.user.pictureUrl:Editor.userImage;I.appendChild(M);M=document.createElement("div");M.className="geCommentHeaderTxt";I.appendChild(M);var P=document.createElement("div");P.className="geCommentUsername";mxUtils.write(P,null!=m.user?m.user.displayName:mxResources.get("unknownUser"));+M.appendChild(P);P=document.createElement("div");P.className="geCommentDate";P.setAttribute("data-commentId",m.id);J(m,P);M.appendChild(P);G.appendChild(I);I=document.createElement("div");I.className="geCommentTxt";mxUtils.write(I,m.content||"");G.appendChild(I);m.isLocked&&(G.style.opacity="0.5");I=document.createElement("div");I.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";I.appendChild(S);e||m.isLocked||0!=B&&!f||T(mxResources.get("reply"),+function(){v("",!0)},m.isResolved);M=b.getCurrentUser();null==M||null==m.user||M.id!=m.user.id||e||m.isLocked||(T(mxResources.get("edit"),function(){function V(){D(m,G,function(){K(G);m.editComment(m.content,function(){N(G)},function(W){L(G);V();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}V()},m.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){K(G);m.deleteComment(function(V){if(!0===V){V=G.querySelector(".geCommentTxt");+V.innerText="";mxUtils.write(V,mxResources.get("msgDeleted"));var W=G.querySelectorAll(".geCommentAction");for(V=0;V<W.length;V++)W[V].parentNode.removeChild(W[V]);N(G);G.style.opacity="0.5"}else{W=k(m).replies;for(V=0;V<W.length;V++)z.removeChild(W[V]);for(V=0;V<u.length;V++)if(u[V]==m){u.splice(V,1);break}F.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(V){L(G);b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},m.isResolved));+e||m.isLocked||0!=B||T(m.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(V){function W(){var X=V.target;X.innerText="";m.isResolved=!m.isResolved;mxUtils.write(X,m.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=m.isResolved?"none":"",Y=k(m).replies,ba="light-dark("+(m.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<Y.length;ea++){Y[ea].style.backgroundColor=ba;for(var ca=Y[ea].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=+X.parentNode&&(ca[fa].style.display=Z);U||(Y[ea].style.display="none")}x()}m.isResolved?v(mxResources.get("reOpened")+": ",!0,W,!1,!0):v(mxResources.get("markedAsResolved"),!1,W,!0)});G.appendChild(I);null!=A?z.insertBefore(G,A.nextSibling):z.appendChild(G);for(A=0;null!=m.replies&&A<m.replies.length;A++)I=m.replies[A],I.isResolved=m.isResolved,c(I,m.replies,null,B+1,H);null!=p&&(p.comment.id==m.id?(H=m.content,m.content=p.comment.content,D(m,G,p.saveCallback,p.deleteOnCancel),m.content=H):null==+p.comment.id&&p.comment.pCommentId==m.id&&(z.appendChild(p.div),D(p.comment,p.div,p.saveCallback,p.deleteOnCancel)));return G}}var e=!b.canComment(),f=b.canReplyToReplies(),p=null,n=document.createElement("div");n.className="geCommentsWin";n.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var t=EditorUi.compactUi?"26px":"30px",z=document.createElement("div");z.className="geCommentsList";z.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";z.style.bottom=parseInt(t)++7+"px";n.appendChild(z);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(F,mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=t;C.style.padding="3px 4px 4px 4px";t=document.createElement("a");t.className="geToolbarButton geAdaptiveAsset geToggleItem";t.style.width="16px";t.style.height="18px";t.style.backgroundPosition="center center";t.style.backgroundRepeat=+"no-repeat";t.style.backgroundSize="20px";t.style.margin="0 2px";t.style.display="inline-block";t.style.cursor="pointer";if(!e){var E=t.cloneNode();E.style.backgroundImage="url("+Editor.plusImage+")";E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(m){function u(){D(A,B,function(H){K(B);b.addComment(H,function(T){H.id=T;O.push(H);N(B)},function(T){L(B);u();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var A=+b.newComment("",b.getCurrentUser()),B=c(A,O,null,0);u();m.preventDefault();mxEvent.consume(m)});C.appendChild(E)}var R=t.cloneNode();R.classList.add("geToggleItem");R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var U=!1;mxEvent.addListener(R,"click",function(m){(U=!U)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");Q();m.preventDefault();mxEvent.consume(m)});C.appendChild(R);b.commentsRefreshNeeded()&&(E=t.cloneNode(),+E.style.backgroundImage="url("+Editor.refreshImage+")",E.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(E,"click",function(m){Q();m.preventDefault();mxEvent.consume(m)}),C.appendChild(E));b.commentsSaveNeeded()&&(t=t.cloneNode(),t.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',t.setAttribute("title",mxResources.get("save")),t.className="geButton geAdaptiveAsset",mxEvent.addListener(t,"click",function(m){y();m.preventDefault();mxEvent.consume(m)}),+C.appendChild(t));n.appendChild(C);var O=[],Q=mxUtils.bind(this,function(){this.hasError=!1;if(null!=p)try{p.div=p.div.cloneNode(!0);var m=p.div.querySelector(".geCommentEditTxtArea"),u=p.div.querySelector(".geCommentEditBtns");p.comment.content=m.value;m.parentNode.removeChild(m);u.parentNode.removeChild(u)}catch(A){b.handleError(A)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))++"...</div>";f=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(A){function B(H){if(null!=H){H.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});for(var T=0;T<H.length;T++)B(H[T].replies)}}A.sort(function(H,T){return new Date(H.modifiedDate)-new Date(T.modifiedDate)});z.innerText="";z.appendChild(F);F.style.display="block";O=A;for(A=0;A<O.length;A++)B(O[A].replies),c(O[A],O,null,0,U);null!=p&&null==p.comment.id&&null==p.comment.pCommentId&&(z.appendChild(p.div),+D(p.comment,p.div,p.saveCallback,p.deleteOnCancel))},mxUtils.bind(this,function(A){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(A&&A.message?": "+A.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});Q();this.refreshComments=Q;C=mxUtils.bind(this,function(){function m(T){var k=A[T.id];if(null!=k)for(J(T,k),k=0;null!=T.replies&&k<T.replies.length;k++)m(T.replies[k])}if(this.window.isVisible()){for(var u=z.querySelectorAll(".geCommentDate"),A=+{},B=0;B<u.length;B++){var H=u[B];A[H.getAttribute("data-commentId")]=H}for(B=0;B<O.length;B++)m(O[B])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),n,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));+b.installResizeHandler(this,!0)},ConfirmDialog=function(b,g,l,d,q,y,x,D,J,K,L){var N=document.createElement("div");N.style.textAlign="center";L=null!=L?L:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=L+"px";c.style.lineHeight="1.2em";mxUtils.write(c,g);N.appendChild(c);null!=K&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",g=document.createElement("img"),g.setAttribute("src",K),c.appendChild(g),N.appendChild(c));K=document.createElement("div");+K.style.textAlign="center";K.style.whiteSpace="nowrap";var e=document.createElement("input");e.setAttribute("type","checkbox");y=mxUtils.button(y||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(e.checked)});y.className="geBtn";null!=D&&(y.innerHTML=D+"<br>"+y.innerHTML,y.style.paddingBottom="8px",y.style.paddingTop="8px",y.style.height="auto",y.style.width="40%");b.editor.cancelFirst&&K.appendChild(y);var f=mxUtils.button(q||mxResources.get("ok"),function(){b.hideDialog();null!=l&&+l(e.checked)});K.appendChild(f);null!=x?(f.innerHTML=x+"<br>"+f.innerHTML+"<br>",f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.className="geBtn",f.style.width="40%"):f.className="geBtn gePrimaryBtn";b.editor.cancelFirst||K.appendChild(y);N.appendChild(K);J?(K.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(e),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),+c.appendChild(q),N.appendChild(c),mxEvent.addListener(q,"click",function(p){e.checked=!e.checked;mxEvent.consume(p)})):K.style.marginTop="12px";this.init=function(){f.focus()};this.container=N},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};-EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,m,d,t){if(null!=f)for(var y=0;y<f.length;y++)null!=f[y]&&(b=this.patchPages(b,f[y],m,d,t));return b};-EditorUi.prototype.patchPages=function(b,f,m,d,t){var y={},x=[],C={},K={},M={},N={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var P in d[EditorUi.DIFF_UPDATE])y[P]=d[EditorUi.DIFF_UPDATE][P];if(null!=f[EditorUi.DIFF_REMOVE])for(d=0;d<f[EditorUi.DIFF_REMOVE].length;d++)K[f[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(d=0;d<f[EditorUi.DIFF_INSERT].length;d++)C[f[EditorUi.DIFF_INSERT][d].previous]=f[EditorUi.DIFF_INSERT][d];if(null!=f[EditorUi.DIFF_UPDATE])for(P in f[EditorUi.DIFF_UPDATE])d=-f[EditorUi.DIFF_UPDATE][P],null!=d.previous&&(N[d.previous]=P);if(null!=b){var I="";for(d=0;d<b.length;d++){var c=b[d].getId();M[c]=b[d];null!=N[I]||K[c]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][c]&&null!=f[EditorUi.DIFF_UPDATE][c].previous||(N[I]=c);I=c}}var e={},l=mxUtils.bind(this,function(p){var u=null!=p?p.getId():"";if(null!=p&&!e[u]){e[u]=!0;x.push(p);var B=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][u]:null;null!=B&&(this.updatePageRoot(p),null!=B.name&&p.setName(B.name),-null!=B.view&&this.patchViewState(p,B.view),null!=B.cells&&this.patchPage(p,B.cells,y[p.getId()],t),!m||null==B.cells&&null==B.view||(p.needsUpdate=!0))}p=N[u];null!=p&&(delete N[u],l(M[p]));p=C[u];null!=p&&(delete C[u],n(p))}),n=mxUtils.bind(this,function(p){p=mxUtils.parseXml(p.data).documentElement;p=new DiagramPage(p);this.updatePageRoot(p);var u=M[p.getId()];null==u?l(p):(this.patchPage(u,this.diffPages([u],[p]),y[u.getId()],t),m&&(u.needsUpdate=!0))});l();for(P in N)l(M[N[P]]),delete N[P];for(P in C)n(C[P]),-delete C[P];return x};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var m in f)try{this.patchViewStateProperty(b,f,m)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,m){b.viewState[m]=JSON.parse(f[m])};-EditorUi.prototype.createParentLookup=function(b,f){function m(M){var N=d[M];null==N&&(N={inserted:[],moved:{}},d[M]=N);return N}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var t=0;t<f[EditorUi.DIFF_INSERT].length;t++){var y=f[EditorUi.DIFF_INSERT][t],x=null!=y.parent?y.parent:"",C=null!=y.previous?y.previous:"";m(x).inserted[C]=y}if(null!=f[EditorUi.DIFF_UPDATE])for(var K in f[EditorUi.DIFF_UPDATE])y=f[EditorUi.DIFF_UPDATE][K],null!=y.previous&&(x=y.parent,null==x&&(t=b.getCell(K),null!=t&&(t=-b.getParent(t),null!=t&&(x=t.getId()))),null!=x&&(m(x).moved[y.previous]=K));return d};-EditorUi.prototype.patchPage=function(b,f,m,d){var t=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),y=this.createParentLookup(t,f);t.beginUpdate();try{var x=t.updateEdgeParent,C=new mxDictionary,K=[];t.updateEdgeParent=function(n,p){!C.get(n)&&d&&(C.put(n,!0),K.push(n))};var M=y[""],N=null!=M&&null!=M.inserted?M.inserted[""]:null,P=null;null!=N&&(P=this.getCellForJson(N));if(null==P){var I=null!=M&&null!=M.moved?M.moved[""]:null;null!=I&&(P=t.getCell(I))}null!=P&&(t.setRoot(P),-b.root=P,EditorUi.debug("EditorUi.patchPage: Root changed",P.id));this.patchCellRecursive(b,t,t.root,y,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var c=0;c<f[EditorUi.DIFF_REMOVE].length;c++){I=f[EditorUi.DIFF_REMOVE][c];var e=t.getCell(I);null!=e&&t.remove(e)}if(null!=f[EditorUi.DIFF_UPDATE]){var l=null!=m&&null!=m.cells?m.cells[EditorUi.DIFF_UPDATE]:null;for(I in f[EditorUi.DIFF_UPDATE])e=t.getCell(I),null!=e?this.patchCell(t,e,f[EditorUi.DIFF_UPDATE][I],null!=l?l[I]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",-I,"diff",[f[EditorUi.DIFF_UPDATE][I]])}if(null!=f[EditorUi.DIFF_INSERT])for(c=0;c<f[EditorUi.DIFF_INSERT].length;c++)N=f[EditorUi.DIFF_INSERT][c],e=t.getCell(N.id),null!=e&&(t.setTerminal(e,t.getCell(N.source),!0),t.setTerminal(e,t.getCell(N.target),!1));t.updateEdgeParent=x;if(d&&0<K.length)for(c=0;c<K.length;c++)t.contains(K[c])&&t.updateEdgeParent(K[c])}finally{t.endUpdate()}};-EditorUi.prototype.patchCellRecursive=function(b,f,m,d,t){if(null!=m){var y=d[m.getId()],x=null!=y&&null!=y.inserted?y.inserted:{};y=null!=y&&null!=y.moved?y.moved:{};for(var C=0,K=f.getChildCount(m),M="",N=0;N<K;N++){var P=f.getChildAt(m,N).getId();null==y[M]&&(null==t[EditorUi.DIFF_UPDATE]||null==t[EditorUi.DIFF_UPDATE][P]||null==t[EditorUi.DIFF_UPDATE][P].previous&&null==t[EditorUi.DIFF_UPDATE][P].parent)&&(y[M]=P);M=P}K=mxUtils.bind(this,function(I,c){var e=null!=I?I.getId():"";null==e&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",-"cell",I);null!=I&&c&&(c=f.getCell(e),null!=c&&c!=I&&(I=null));null!=I&&(f.getChildAt(m,C)!=I&&f.add(m,I,C),this.patchCellRecursive(b,f,I,d,t),C++);return e});for(M=[null];0<M.length;)if(N=M.shift(),N=K(null!=N?N.child:null,null!=N?N.insert:!1),P=y[N],null!=P&&(delete y[N],M.push({child:f.getCell(P)})),P=x[N],null!=P&&(delete x[N],M.push({child:this.getCellForJson(P),insert:!0})),0==M.length){for(N in y)M.push({child:f.getCell(y[N])}),delete y[N];for(N in x)M.push({child:this.getCellForJson(x[N]),-insert:!0}),delete x[N]}}};-EditorUi.prototype.patchCell=function(b,f,m,d){if(null!=f&&null!=m){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in m?b.setValue(f,m.value):null!=m.xmlValue&&b.setValue(f,mxUtils.parseXml(m.xmlValue).documentElement);null!=d&&null!=d.style||null==m.style||b.setStyle(f,m.style);null!=m.visible&&b.setVisible(f,1==m.visible);null!=m.collapsed&&b.setCollapsed(f,1==m.collapsed);null!=m.vertex&&(f.vertex=1==m.vertex);null!=m.edge&&(f.edge=1==m.edge);null!=m.connectable&&(f.connectable=-1==m.connectable);null!=m.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(m.geometry).documentElement));null!=m.source&&b.setTerminal(f,b.getCell(m.source),!0);null!=m.target&&b.setTerminal(f,b.getCell(m.target),!1);for(var t in m)this.cellProperties[t]||(f[t]=m[t])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f};-EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var m=0;m<b.length;m++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[m].root));this.editor.graph.saveViewState(b[m].viewState,d);var t=b[m].node.cloneNode(!1);t.appendChild(d);f.appendChild(t)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};-EditorUi.prototype.getPagesForNode=function(b,f){var m=this.editor.extractGraphModel(b,!0,!0);null!=m&&(b=m);f=b.getElementsByTagName(f||"diagram");m=[];if(0<f.length)for(b=0;b<f.length;b++){var d=new DiagramPage(f[b]);this.updatePageRoot(d,!0);m.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),d.node.appendChild(b.cloneNode(!0)),m.push(d));return m};-EditorUi.prototype.diffPages=function(b,f){var m=[],d=[],t={},y={},x={},C=null;if(null!=b&&null!=f){for(var K=0;K<f.length;K++)y[f[K].getId()]={page:f[K],prev:C},C=f[K];C=null;for(K=0;K<b.length;K++){var M=b[K].getId();f=y[M];if(null==f)d.push(M);else{this.updatePageRoot(b[K]);this.updatePageRoot(f.page);var N=this.diffCells(b[K].root,f.page.root),P={};mxUtils.isEmptyObject(N)||(P.cells=N);N=this.diffViewState(b[K],f.page);mxUtils.isEmptyObject(N)||(P.view=N);if((null!=f.prev?null==C:null!=C)||null!=-C&&null!=f.prev&&C.getId()!=f.prev.getId())P.previous=null!=f.prev?f.prev.getId():"";null!=f.page.getName()&&b[K].getName()!=f.page.getName()&&(P.name=f.page.getName());mxUtils.isEmptyObject(P)||(x[M]=P)}delete y[b[K].getId()];C=b[K]}for(M in y)f=y[M],m.push({id:f.page.getId(),data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(x)||(t[EditorUi.DIFF_UPDATE]=x);0<d.length&&(t[EditorUi.DIFF_REMOVE]=d);0<m.length&&(t[EditorUi.DIFF_INSERT]=m)}return t};-EditorUi.prototype.createCellLookup=function(b,f,m){m=null!=m?m:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):m[b.getId()]={cell:b,prev:f};var d=b.getChildCount();f=null;for(var t=0;t<d;t++){var y=b.getChildAt(t);this.createCellLookup(y,f,m);f=y}return m};-EditorUi.prototype.diffCellRecursive=function(b,f,m,d,t){d=null!=d?d:{};var y=m[b.getId()];delete m[b.getId()];if(null==y)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):t.push(b.getId());else{var x=this.diffCell(b,y.cell);if(null!=x.parent||(null!=y.prev?null==f:null!=f)||null!=f&&null!=y.prev&&f.getId()!=y.prev.getId())x.previous=null!=y.prev?y.prev.getId():"";mxUtils.isEmptyObject(x)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",-b,"diff",x):d[b.getId()]=x)}y=b.getChildCount();f=null;for(x=0;x<y;x++){var C=b.getChildAt(x);this.diffCellRecursive(C,f,m,d,t);f=C}return d};-EditorUi.prototype.diffCells=function(b,f){var m={},d=[],t=this.createCellLookup(f);f.id==b.id?(f=[],b=this.diffCellRecursive(b,null,t,null,f),mxUtils.isEmptyObject(b)||(m[EditorUi.DIFF_UPDATE]=b),0<f.length&&(m[EditorUi.DIFF_REMOVE]=f)):EditorUi.debug("EditorUi.diffCells: Root changed",f.id);for(var y in t)b=t[y],d.push(this.getJsonForCell(b.cell,b.prev));0<d.length&&(m[EditorUi.DIFF_INSERT]=d);return m};-EditorUi.prototype.diffViewState=function(b,f){var m=b.viewState,d=f.viewState,t={};b==this.currentPage&&(m=this.editor.graph.getViewState());f==this.currentPage&&(d=this.editor.graph.getViewState());if(null!=m&&null!=d)for(var y in this.viewStateProperties)this.diffViewStateProperty(m,d,y,t);return t};EditorUi.prototype.diffViewStateProperty=function(b,f,m,d){b=JSON.stringify(this.getViewStateProperty(b,m));f=JSON.stringify(this.getViewStateProperty(f,m));b!=f&&(d[m]=f)};-EditorUi.prototype.getViewStateProperty=function(b,f){b=b[f];"backgroundImage"==f&&null!=b&&null!=b.originalSrc?b={originalSrc:b.originalSrc}:"extFonts"==f&&null==b&&(b=[]);return b};-EditorUi.prototype.getCellForJson=function(b){var f=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,m=b.value;null!=b.xmlValue&&(m=mxUtils.parseXml(b.xmlValue).documentElement);f=new mxCell(m,f,b.style);f.connectable=0!=b.connectable;f.collapsed=1==b.collapsed;f.visible=0!=b.visible;f.vertex=1==b.vertex;f.edge=1==b.edge;f.id=b.id;for(var d in b)this.cellProperties[d]||(f[d]=b[d]);return f};-EditorUi.prototype.getJsonForCell=function(b,f){var m={id:b.getId()};b.vertex&&(m.vertex=1);b.edge&&(m.edge=1);b.connectable||(m.connectable=0);null!=b.parent&&(m.parent=b.parent.getId());null!=f&&(m.previous=f.getId());null!=b.source&&(m.source=b.source.getId());null!=b.target&&(m.target=b.target.getId());null!=b.style&&(m.style=b.style);null!=b.geometry&&(m.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(m.collapsed=1);b.visible||(m.visible=0);null!=b.value&&("object"===typeof b.value&&-"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?m.xmlValue=mxUtils.getXml(b.value):m.value=b.value);for(var d in b)this.cellProperties[d]||"function"===typeof b[d]||(m[d]=b[d]);return m};-EditorUi.prototype.diffCell=function(b,f){function m(x){return null!=x&&"object"===typeof x&&"number"===typeof x.nodeType&&"string"===typeof x.nodeName&&"function"===typeof x.getAttribute}var d={};b.vertex!=f.vertex&&(d.vertex=f.vertex?1:0);b.edge!=f.edge&&(d.edge=f.edge?1:0);b.connectable!=f.connectable&&(d.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())d.parent=null!=f.parent?f.parent.getId():"";-if((null!=b.source?null==f.source:null!=f.source)||null!=b.source&&null!=f.source&&b.source.getId()!=f.source.getId())d.source=null!=f.source?f.source.getId():"";if((null!=b.target?null==f.target:null!=f.target)||null!=b.target&&null!=f.target&&b.target.getId()!=f.target.getId())d.target=null!=f.target?f.target.getId():"";m(b.value)&&m(f.value)?b.value.isEqualNode(f.value)||(d.xmlValue=mxUtils.getXml(f.value)):b.value!=f.value&&(m(f.value)?d.xmlValue=mxUtils.getXml(f.value):d.value=null!=f.value?-f.value:null);b.style!=f.style&&(d.style=f.style);b.visible!=f.visible&&(d.visible=f.visible?1:0);b.collapsed!=f.collapsed&&(d.collapsed=f.collapsed?1:0);if(!this.isObjectEqual(b.geometry,f.geometry,new mxGeometry)){var t=this.codec.encode(f.geometry);null!=t&&(d.geometry=mxUtils.getXml(t))}for(var y in b)this.cellProperties[y]||"function"===typeof b[y]||"function"===typeof f[y]||b[y]==f[y]||(d[y]=void 0===f[y]?null:f[y]);for(y in f)y in b||this.cellProperties[y]||"function"===typeof b[y]||"function"===-typeof f[y]||b[y]==f[y]||(d[y]=void 0===f[y]?null:f[y]);return d};EditorUi.prototype.resolveCrossReferences=function(b,f){var m={};mxUtils.isEmptyObject(f)||(this.adoptTheirPages(b,f,m),this.adoptTheirCells(b,f,m));EditorUi.debug("EditorUi.resolveCrossReferences",[this],"ownDiff",b,"theirDiff",f,"resolve",m);return m};-EditorUi.prototype.adoptTheirPages=function(b,f,m){var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var t=0;t<f[EditorUi.DIFF_INSERT].length;t++)d[f[EditorUi.DIFF_INSERT][t].id]=f[EditorUi.DIFF_INSERT][t];for(var y in b[EditorUi.DIFF_UPDATE])null!=d[y]&&(null==m[EditorUi.DIFF_INSERT]&&(m[EditorUi.DIFF_INSERT]=[]),null==m[EditorUi.DIFF_UPDATE]&&(m[EditorUi.DIFF_UPDATE]={}),m[EditorUi.DIFF_INSERT].push(d[y]),m[EditorUi.DIFF_UPDATE][y]=b[EditorUi.DIFF_UPDATE][y],delete b[EditorUi.DIFF_UPDATE][y])};-EditorUi.prototype.adoptTheirCells=function(b,f,m){for(var d in b[EditorUi.DIFF_UPDATE]){var t=b[EditorUi.DIFF_UPDATE][d];null!=t.cells&&this.adoptTheirCellsFromPage(t,f,d,m)}};-EditorUi.prototype.adoptTheirCellsFromPage=function(b,f,m,d){var t=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][m]:null;if(null!=t&&null!=t.cells&&null!=t.cells[EditorUi.DIFF_INSERT]){f=t.cells[EditorUi.DIFF_UPDATE];for(var y={},x=0;x<t.cells[EditorUi.DIFF_INSERT].length;x++){var C=t.cells[EditorUi.DIFF_INSERT][x];y[C.id]=C}t={cells:{}};t.cells[EditorUi.DIFF_INSERT]=[];t.cells[EditorUi.DIFF_UPDATE]={};t.inserted={};this.resolveOwnInsertedCells(b.cells[EditorUi.DIFF_INSERT],y,t);this.resolveOwnUpdatedCells(b.cells[EditorUi.DIFF_UPDATE],-y,f,t);null==d[EditorUi.DIFF_UPDATE]&&(d[EditorUi.DIFF_UPDATE]={});delete t.inserted;d[EditorUi.DIFF_UPDATE][m]=t}};EditorUi.prototype.resolveOwnInsertedCells=function(b,f,m){if(null!=b)for(var d=0;d<b.length;d++){var t=b[d];null!=t&&(this.adoptParentCell(t.id,null,f,m),this.adoptTerminalCell(t.id,t,f,!0,m),this.adoptTerminalCell(t.id,t,f,!1,m))}};-EditorUi.prototype.resolveOwnUpdatedCells=function(b,f,m,d){if(null!=b)for(var t in b){var y=f[t];null!=y?(d.inserted[t]||(d.cells[EditorUi.DIFF_INSERT].push(y),d.inserted[t]=!0),d.cells[EditorUi.DIFF_UPDATE][t]=b[t]):null!=m&&(y=m[t],null!=y&&(this.adoptParentCell(t,y,f,d),this.adoptTerminalCell(t,y,f,!0,d,t),this.adoptTerminalCell(t,y,f,!1,d,t)))}};-EditorUi.prototype.adoptParentCell=function(b,f,m,d){var t=m[b],y=null!=f?f.parent:null!=t?t.parent:null;null!=y&&this.adoptParentCell(y,null,m,d);null!=t?d.inserted[b]||(d.cells[EditorUi.DIFF_INSERT].push(t),d.inserted[b]=!0):null!=f&&(null==d.cells[EditorUi.DIFF_UPDATE][b]&&(d.cells[EditorUi.DIFF_UPDATE][b]={}),d.cells[EditorUi.DIFF_UPDATE][b]=f)};-EditorUi.prototype.adoptTerminalCell=function(b,f,m,d,t){f=d?f.source:f.target;m=m[f];null!=m&&(t.inserted[f]||(t.cells[EditorUi.DIFF_INSERT].push(m),t.inserted[f]=!0),null==t.cells[EditorUi.DIFF_UPDATE][b]&&(t.cells[EditorUi.DIFF_UPDATE][b]={}),t.cells[EditorUi.DIFF_UPDATE][b][d?"source":"target"]=f)};-EditorUi.prototype.isObjectEqual=function(b,f,m){if(null==b&&null==f)return!0;if(null!=b?null==f:null!=f)return!1;var d=function(t,y){return null==m||m[t]!=y?!0===y?1:y:void 0};return JSON.stringify(b,d)==JSON.stringify(f,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?-mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings())mxSettings.settings.ui=b,mxSettings.save();else{var f=mxSettings.getMainSettings();f.ui=b;localStorage.setItem(".drawio-config",JSON.stringify(f))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b?mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,-f){f?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=b},setCustomFonts:function(b){mxSettings.settings.customFonts=-b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],f=0;f<b.length;f++)"string"===typeof b[f]&&(b[f]={name:b[f],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,b)&&("L.scratchpad"===b?mxSettings.settings.customLibraries.splice(0,+EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,g,l,d,q){if(null!=g)for(var y=0;y<g.length;y++)null!=g[y]&&(b=this.patchPages(b,g[y],l,d,q));return b};+EditorUi.prototype.patchPages=function(b,g,l,d,q){var y={},x=[],D={},J={},K={},L={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var N in d[EditorUi.DIFF_UPDATE])y[N]=d[EditorUi.DIFF_UPDATE][N];if(null!=g[EditorUi.DIFF_REMOVE])for(d=0;d<g[EditorUi.DIFF_REMOVE].length;d++)J[g[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=g[EditorUi.DIFF_INSERT])for(d=0;d<g[EditorUi.DIFF_INSERT].length;d++)D[g[EditorUi.DIFF_INSERT][d].previous]=g[EditorUi.DIFF_INSERT][d];if(null!=g[EditorUi.DIFF_UPDATE])for(N in g[EditorUi.DIFF_UPDATE])d=+g[EditorUi.DIFF_UPDATE][N],null!=d.previous&&(L[d.previous]=N);if(null!=b){var c="";for(d=0;d<b.length;d++){var e=b[d].getId();K[e]=b[d];null!=L[c]||J[e]||null!=g[EditorUi.DIFF_UPDATE]&&null!=g[EditorUi.DIFF_UPDATE][e]&&null!=g[EditorUi.DIFF_UPDATE][e].previous||(L[c]=e);c=e}}var f={},p=mxUtils.bind(this,function(t){var z=null!=t?t.getId():"";if(null!=t&&!f[z]){f[z]=!0;x.push(t);var F=null!=g[EditorUi.DIFF_UPDATE]?g[EditorUi.DIFF_UPDATE][z]:null;null!=F&&(this.updatePageRoot(t),null!=F.name&&t.setName(F.name),+null!=F.view&&this.patchViewState(t,F.view),null!=F.cells&&this.patchPage(t,F.cells,y[t.getId()],q),!l||null==F.cells&&null==F.view||(t.needsUpdate=!0))}t=L[z];null!=t&&(delete L[z],p(K[t]));t=D[z];null!=t&&(delete D[z],n(t))}),n=mxUtils.bind(this,function(t){t=mxUtils.parseXml(t.data).documentElement;t=new DiagramPage(t);this.updatePageRoot(t);var z=K[t.getId()];null==z?p(t):(this.patchPage(z,this.diffPages([z],[t]),y[z.getId()],q),l&&(z.needsUpdate=!0))});p();for(N in L)p(K[L[N]]),delete L[N];for(N in D)n(D[N]),+delete D[N];return x};EditorUi.prototype.patchViewState=function(b,g){if(null!=b.viewState&&null!=g){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var l in g)try{this.patchViewStateProperty(b,g,l)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,g,l){b.viewState[l]=JSON.parse(g[l])};+EditorUi.prototype.createParentLookup=function(b,g){function l(K){var L=d[K];null==L&&(L={inserted:[],moved:{}},d[K]=L);return L}var d={};if(null!=g[EditorUi.DIFF_INSERT])for(var q=0;q<g[EditorUi.DIFF_INSERT].length;q++){var y=g[EditorUi.DIFF_INSERT][q],x=null!=y.parent?y.parent:"",D=null!=y.previous?y.previous:"";l(x).inserted[D]=y}if(null!=g[EditorUi.DIFF_UPDATE])for(var J in g[EditorUi.DIFF_UPDATE])y=g[EditorUi.DIFF_UPDATE][J],null!=y.previous&&(x=y.parent,null==x&&(q=b.getCell(J),null!=q&&(q=+b.getParent(q),null!=q&&(x=q.getId()))),null!=x&&(l(x).moved[y.previous]=J));return d};+EditorUi.prototype.patchPage=function(b,g,l,d){var q=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),y=this.createParentLookup(q,g);q.beginUpdate();try{var x=q.updateEdgeParent,D=new mxDictionary,J=[];q.updateEdgeParent=function(n,t){!D.get(n)&&d&&(D.put(n,!0),J.push(n))};var K=y[""],L=null!=K&&null!=K.inserted?K.inserted[""]:null,N=null;null!=L&&(N=this.getCellForJson(L));if(null==N){var c=null!=K&&null!=K.moved?K.moved[""]:null;null!=c&&(N=q.getCell(c))}null!=N&&(q.setRoot(N),+b.root=N,EditorUi.debug("EditorUi.patchPage: Root changed",N.id));this.patchCellRecursive(b,q,q.root,y,g);if(null!=g[EditorUi.DIFF_REMOVE])for(var e=0;e<g[EditorUi.DIFF_REMOVE].length;e++){c=g[EditorUi.DIFF_REMOVE][e];var f=q.getCell(c);null!=f&&q.remove(f)}if(null!=g[EditorUi.DIFF_UPDATE]){var p=null!=l&&null!=l.cells?l.cells[EditorUi.DIFF_UPDATE]:null;for(c in g[EditorUi.DIFF_UPDATE])f=q.getCell(c),null!=f?this.patchCell(q,f,g[EditorUi.DIFF_UPDATE][c],null!=p?p[c]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",+c,"diff",[g[EditorUi.DIFF_UPDATE][c]])}if(null!=g[EditorUi.DIFF_INSERT])for(e=0;e<g[EditorUi.DIFF_INSERT].length;e++)L=g[EditorUi.DIFF_INSERT][e],f=q.getCell(L.id),null!=f&&(q.setTerminal(f,q.getCell(L.source),!0),q.setTerminal(f,q.getCell(L.target),!1));q.updateEdgeParent=x;if(d&&0<J.length)for(e=0;e<J.length;e++)q.contains(J[e])&&q.updateEdgeParent(J[e])}finally{q.endUpdate()}};+EditorUi.prototype.patchCellRecursive=function(b,g,l,d,q){if(null!=l){var y=d[l.getId()],x=null!=y&&null!=y.inserted?y.inserted:{};y=null!=y&&null!=y.moved?y.moved:{};for(var D=0,J=g.getChildCount(l),K="",L=0;L<J;L++){var N=g.getChildAt(l,L).getId();null==y[K]&&(null==q[EditorUi.DIFF_UPDATE]||null==q[EditorUi.DIFF_UPDATE][N]||null==q[EditorUi.DIFF_UPDATE][N].previous&&null==q[EditorUi.DIFF_UPDATE][N].parent)&&(y[K]=N);K=N}J=mxUtils.bind(this,function(c,e){var f=null!=c?c.getId():"";null==f&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",+"cell",c);null!=c&&e&&(e=g.getCell(f),null!=e&&e!=c&&(c=null));null!=c&&(g.getChildAt(l,D)!=c&&g.add(l,c,D),this.patchCellRecursive(b,g,c,d,q),D++);return f});for(K=[null];0<K.length;)if(L=K.shift(),L=J(null!=L?L.child:null,null!=L?L.insert:!1),N=y[L],null!=N&&(delete y[L],K.push({child:g.getCell(N)})),N=x[L],null!=N&&(delete x[L],K.push({child:this.getCellForJson(N),insert:!0})),0==K.length){for(L in y)K.push({child:g.getCell(y[L])}),delete y[L];for(L in x)K.push({child:this.getCellForJson(x[L]),+insert:!0}),delete x[L]}}};+EditorUi.prototype.patchCell=function(b,g,l,d){if(null!=g&&null!=l){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in l?b.setValue(g,l.value):null!=l.xmlValue&&b.setValue(g,mxUtils.parseXml(l.xmlValue).documentElement);null!=d&&null!=d.style||null==l.style||b.setStyle(g,l.style);null!=l.visible&&b.setVisible(g,1==l.visible);null!=l.collapsed&&b.setCollapsed(g,1==l.collapsed);null!=l.vertex&&(g.vertex=1==l.vertex);null!=l.edge&&(g.edge=1==l.edge);null!=l.connectable&&(g.connectable=+1==l.connectable);null!=l.geometry&&b.setGeometry(g,this.codec.decode(mxUtils.parseXml(l.geometry).documentElement));null!=l.source&&b.setTerminal(g,b.getCell(l.source),!0);null!=l.target&&b.setTerminal(g,b.getCell(l.target),!1);for(var q in l)this.cellProperties[q]||(g[q]=l[q])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var g=null;null!=b&&(g=mxUtils.getXml(b));return g};+EditorUi.prototype.getNodeForPages=function(b){var g=null;if(null!=this.fileNode&&null!=b){g=this.fileNode.cloneNode(!1);for(var l=0;l<b.length;l++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[l].root));this.editor.graph.saveViewState(b[l].viewState,d);var q=b[l].node.cloneNode(!1);q.appendChild(d);g.appendChild(q)}}return g};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};+EditorUi.prototype.getPagesForNode=function(b,g){var l=this.editor.extractGraphModel(b,!0,!0);null!=l&&(b=l);g=b.getElementsByTagName(g||"diagram");l=[];if(0<g.length)for(b=0;b<g.length;b++){var d=new DiagramPage(g[b]);this.updatePageRoot(d,!0);l.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),d.node.appendChild(b.cloneNode(!0)),l.push(d));return l};+EditorUi.prototype.diffPages=function(b,g){var l=[],d=[],q={},y={},x={},D=null;if(null!=b&&null!=g){for(var J=0;J<g.length;J++)y[g[J].getId()]={page:g[J],prev:D},D=g[J];D=null;for(J=0;J<b.length;J++){var K=b[J].getId();g=y[K];if(null==g)d.push(K);else{this.updatePageRoot(b[J]);this.updatePageRoot(g.page);var L=this.diffCells(b[J].root,g.page.root),N={};mxUtils.isEmptyObject(L)||(N.cells=L);L=this.diffViewState(b[J],g.page);mxUtils.isEmptyObject(L)||(N.view=L);if((null!=g.prev?null==D:null!=D)||null!=+D&&null!=g.prev&&D.getId()!=g.prev.getId())N.previous=null!=g.prev?g.prev.getId():"";null!=g.page.getName()&&b[J].getName()!=g.page.getName()&&(N.name=g.page.getName());mxUtils.isEmptyObject(N)||(x[K]=N)}delete y[b[J].getId()];D=b[J]}for(K in y)g=y[K],l.push({id:g.page.getId(),data:mxUtils.getXml(g.page.node),previous:null!=g.prev?g.prev.getId():""});mxUtils.isEmptyObject(x)||(q[EditorUi.DIFF_UPDATE]=x);0<d.length&&(q[EditorUi.DIFF_REMOVE]=d);0<l.length&&(q[EditorUi.DIFF_INSERT]=l)}return q};+EditorUi.prototype.createCellLookup=function(b,g,l){l=null!=l?l:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):l[b.getId()]={cell:b,prev:g};var d=b.getChildCount();g=null;for(var q=0;q<d;q++){var y=b.getChildAt(q);this.createCellLookup(y,g,l);g=y}return l};+EditorUi.prototype.diffCellRecursive=function(b,g,l,d,q){d=null!=d?d:{};var y=l[b.getId()];delete l[b.getId()];if(null==y)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):q.push(b.getId());else{var x=this.diffCell(b,y.cell);if(null!=x.parent||(null!=y.prev?null==g:null!=g)||null!=g&&null!=y.prev&&g.getId()!=y.prev.getId())x.previous=null!=y.prev?y.prev.getId():"";mxUtils.isEmptyObject(x)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",+b,"diff",x):d[b.getId()]=x)}y=b.getChildCount();g=null;for(x=0;x<y;x++){var D=b.getChildAt(x);this.diffCellRecursive(D,g,l,d,q);g=D}return d};+EditorUi.prototype.diffCells=function(b,g){var l={},d=[],q=this.createCellLookup(g);g.id==b.id?(g=[],b=this.diffCellRecursive(b,null,q,null,g),mxUtils.isEmptyObject(b)||(l[EditorUi.DIFF_UPDATE]=b),0<g.length&&(l[EditorUi.DIFF_REMOVE]=g)):EditorUi.debug("EditorUi.diffCells: Root changed",g.id);for(var y in q)b=q[y],d.push(this.getJsonForCell(b.cell,b.prev));0<d.length&&(l[EditorUi.DIFF_INSERT]=d);return l};+EditorUi.prototype.diffViewState=function(b,g){var l=b.viewState,d=g.viewState,q={};b==this.currentPage&&(l=this.editor.graph.getViewState());g==this.currentPage&&(d=this.editor.graph.getViewState());if(null!=l&&null!=d)for(var y in this.viewStateProperties)this.diffViewStateProperty(l,d,y,q);return q};EditorUi.prototype.diffViewStateProperty=function(b,g,l,d){b=JSON.stringify(this.getViewStateProperty(b,l));g=JSON.stringify(this.getViewStateProperty(g,l));b!=g&&(d[l]=g)};+EditorUi.prototype.getViewStateProperty=function(b,g){b=b[g];"backgroundImage"==g&&null!=b&&null!=b.originalSrc?b={originalSrc:b.originalSrc}:"extFonts"==g&&null==b&&(b=[]);return b};+EditorUi.prototype.getCellForJson=function(b){var g=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,l=b.value;null!=b.xmlValue&&(l=mxUtils.parseXml(b.xmlValue).documentElement);g=new mxCell(l,g,b.style);g.connectable=0!=b.connectable;g.collapsed=1==b.collapsed;g.visible=0!=b.visible;g.vertex=1==b.vertex;g.edge=1==b.edge;g.id=b.id;for(var d in b)this.cellProperties[d]||(g[d]=b[d]);return g};+EditorUi.prototype.getJsonForCell=function(b,g){var l={id:b.getId()};b.vertex&&(l.vertex=1);b.edge&&(l.edge=1);b.connectable||(l.connectable=0);null!=b.parent&&(l.parent=b.parent.getId());null!=g&&(l.previous=g.getId());null!=b.source&&(l.source=b.source.getId());null!=b.target&&(l.target=b.target.getId());null!=b.style&&(l.style=b.style);null!=b.geometry&&(l.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(l.collapsed=1);b.visible||(l.visible=0);null!=b.value&&("object"===typeof b.value&&+"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?l.xmlValue=mxUtils.getXml(b.value):l.value=b.value);for(var d in b)this.cellProperties[d]||"function"===typeof b[d]||(l[d]=b[d]);return l};+EditorUi.prototype.diffCell=function(b,g){function l(x){return null!=x&&"object"===typeof x&&"number"===typeof x.nodeType&&"string"===typeof x.nodeName&&"function"===typeof x.getAttribute}var d={};b.vertex!=g.vertex&&(d.vertex=g.vertex?1:0);b.edge!=g.edge&&(d.edge=g.edge?1:0);b.connectable!=g.connectable&&(d.connectable=g.connectable?1:0);if((null!=b.parent?null==g.parent:null!=g.parent)||null!=b.parent&&null!=g.parent&&b.parent.getId()!=g.parent.getId())d.parent=null!=g.parent?g.parent.getId():"";+if((null!=b.source?null==g.source:null!=g.source)||null!=b.source&&null!=g.source&&b.source.getId()!=g.source.getId())d.source=null!=g.source?g.source.getId():"";if((null!=b.target?null==g.target:null!=g.target)||null!=b.target&&null!=g.target&&b.target.getId()!=g.target.getId())d.target=null!=g.target?g.target.getId():"";l(b.value)&&l(g.value)?b.value.isEqualNode(g.value)||(d.xmlValue=mxUtils.getXml(g.value)):b.value!=g.value&&(l(g.value)?d.xmlValue=mxUtils.getXml(g.value):d.value=null!=g.value?+g.value:null);b.style!=g.style&&(d.style=g.style);b.visible!=g.visible&&(d.visible=g.visible?1:0);b.collapsed!=g.collapsed&&(d.collapsed=g.collapsed?1:0);if(!this.isObjectEqual(b.geometry,g.geometry,new mxGeometry)){var q=this.codec.encode(g.geometry);null!=q&&(d.geometry=mxUtils.getXml(q))}for(var y in b)this.cellProperties[y]||"function"===typeof b[y]||"function"===typeof g[y]||b[y]==g[y]||(d[y]=void 0===g[y]?null:g[y]);for(y in g)y in b||this.cellProperties[y]||"function"===typeof b[y]||"function"===+typeof g[y]||b[y]==g[y]||(d[y]=void 0===g[y]?null:g[y]);return d};EditorUi.prototype.resolveCrossReferences=function(b,g){var l={};mxUtils.isEmptyObject(g)||(this.adoptTheirPages(b,g,l),this.adoptTheirCells(b,g,l));EditorUi.debug("EditorUi.resolveCrossReferences",[this],"ownDiff",b,"theirDiff",g,"resolve",l);return l};+EditorUi.prototype.adoptTheirPages=function(b,g,l){var d={};if(null!=g[EditorUi.DIFF_INSERT])for(var q=0;q<g[EditorUi.DIFF_INSERT].length;q++)d[g[EditorUi.DIFF_INSERT][q].id]=g[EditorUi.DIFF_INSERT][q];for(var y in b[EditorUi.DIFF_UPDATE])null!=d[y]&&(null==l[EditorUi.DIFF_INSERT]&&(l[EditorUi.DIFF_INSERT]=[]),null==l[EditorUi.DIFF_UPDATE]&&(l[EditorUi.DIFF_UPDATE]={}),l[EditorUi.DIFF_INSERT].push(d[y]),l[EditorUi.DIFF_UPDATE][y]=b[EditorUi.DIFF_UPDATE][y],delete b[EditorUi.DIFF_UPDATE][y])};+EditorUi.prototype.adoptTheirCells=function(b,g,l){for(var d in b[EditorUi.DIFF_UPDATE]){var q=b[EditorUi.DIFF_UPDATE][d];null!=q.cells&&this.adoptTheirCellsFromPage(q,g,d,l)}};+EditorUi.prototype.adoptTheirCellsFromPage=function(b,g,l,d){var q=null!=g[EditorUi.DIFF_UPDATE]?g[EditorUi.DIFF_UPDATE][l]:null;if(null!=q&&null!=q.cells&&null!=q.cells[EditorUi.DIFF_INSERT]){g=q.cells[EditorUi.DIFF_UPDATE];for(var y={},x=0;x<q.cells[EditorUi.DIFF_INSERT].length;x++){var D=q.cells[EditorUi.DIFF_INSERT][x];y[D.id]=D}q={cells:{}};q.cells[EditorUi.DIFF_INSERT]=[];q.cells[EditorUi.DIFF_UPDATE]={};q.inserted={};this.resolveOwnInsertedCells(b.cells[EditorUi.DIFF_INSERT],y,q);this.resolveOwnUpdatedCells(b.cells[EditorUi.DIFF_UPDATE],+y,g,q);null==d[EditorUi.DIFF_UPDATE]&&(d[EditorUi.DIFF_UPDATE]={});delete q.inserted;d[EditorUi.DIFF_UPDATE][l]=q}};EditorUi.prototype.resolveOwnInsertedCells=function(b,g,l){if(null!=b)for(var d=0;d<b.length;d++){var q=b[d];null!=q&&(this.adoptParentCell(q.id,null,g,l),this.adoptTerminalCell(q.id,q,g,!0,l),this.adoptTerminalCell(q.id,q,g,!1,l))}};+EditorUi.prototype.resolveOwnUpdatedCells=function(b,g,l,d){if(null!=b)for(var q in b){var y=g[q];null!=y?(d.inserted[q]||(d.cells[EditorUi.DIFF_INSERT].push(y),d.inserted[q]=!0),d.cells[EditorUi.DIFF_UPDATE][q]=b[q]):null!=l&&(y=l[q],null!=y&&(this.adoptParentCell(q,y,g,d),this.adoptTerminalCell(q,y,g,!0,d,q),this.adoptTerminalCell(q,y,g,!1,d,q)))}};+EditorUi.prototype.adoptParentCell=function(b,g,l,d){var q=l[b],y=null!=g?g.parent:null!=q?q.parent:null;null!=y&&this.adoptParentCell(y,null,l,d);null!=q?d.inserted[b]||(d.cells[EditorUi.DIFF_INSERT].push(q),d.inserted[b]=!0):null!=g&&(null==d.cells[EditorUi.DIFF_UPDATE][b]&&(d.cells[EditorUi.DIFF_UPDATE][b]={}),d.cells[EditorUi.DIFF_UPDATE][b]=g)};+EditorUi.prototype.adoptTerminalCell=function(b,g,l,d,q){g=d?g.source:g.target;l=l[g];null!=l&&(q.inserted[g]||(q.cells[EditorUi.DIFF_INSERT].push(l),q.inserted[g]=!0),null==q.cells[EditorUi.DIFF_UPDATE][b]&&(q.cells[EditorUi.DIFF_UPDATE][b]={}),q.cells[EditorUi.DIFF_UPDATE][b][d?"source":"target"]=g)};+EditorUi.prototype.isObjectEqual=function(b,g,l){if(null==b&&null==g)return!0;if(null!=b?null==g:null!=g)return!1;var d=function(q,y){return null==l||l[q]!=y?!0===y?1:y:void 0};return JSON.stringify(b,d)==JSON.stringify(g,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?+mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings())mxSettings.settings.ui=b,mxSettings.save();else{var g=mxSettings.getMainSettings();g.ui=b;localStorage.setItem(".drawio-config",JSON.stringify(g))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b?mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,+g){g?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=b},setCustomFonts:function(b){mxSettings.settings.customFonts=+b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],g=0;g<b.length;g++)"string"===typeof b[g]&&(b[g]={name:b[g],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,b)&&("L.scratchpad"===b?mxSettings.settings.customLibraries.splice(0,0,b):mxSettings.settings.customLibraries.push(b));mxSettings.save()},removeCustomLibrary:function(b){mxSettings.load();mxUtils.remove(b,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(b){mxSettings.settings.plugins=b},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(b){mxSettings.settings.recentColors=b},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(b){mxSettings.settings.formatWidth=b},isCreateTarget:function(){return mxSettings.settings.createTarget},setCreateTarget:function(b){mxSettings.settings.createTarget=b},getPageFormat:function(){return mxSettings.settings.pageFormat},setPageFormat:function(b){mxSettings.settings.pageFormat=b},getUnit:function(){return mxSettings.settings.unit||mxConstants.POINTS},setUnit:function(b){mxSettings.settings.unit=b},isRulerOn:function(){return mxSettings.settings.isRulerOn},setRulerOn:function(b){mxSettings.settings.isRulerOn=b},getDraftSaveDelay:function(){return mxSettings.settings.draftSaveDelay},setDraftSaveDelay:function(b){mxSettings.settings.draftSaveDelay=b},getDefaults:function(){return{language:"",configVersion:Editor.configVersion,customFonts:[],libraries:Sidebar.prototype.defaultEntries,customLibraries:Editor.defaultCustomLibraries,plugins:[],recentColors:[],formatWidth:mxSettings.defaultFormatWidth,@@ -13616,261 +13615,261 @@ mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSetEditor.config.override?(mxSettings.settings=null,mxSettings.init()):(mxSettings.settings=b,null==mxSettings.settings.plugins&&(mxSettings.settings.plugins=[]),null==mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.customFonts&&(mxSettings.settings.customFonts=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=mxGraph.prototype.pageFormat),null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&(mxSettings.settings.showStartScreen=!0),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.defaultGridColor),null==mxSettings.settings.darkGridColor&&(mxSettings.settings.darkGridColor=mxGraphView.prototype.defaultDarkGridColor),null==mxSettings.settings.autosave?mxSettings.settings.autosave=!EditorUi.isElectronApp:EditorUi.isElectronApp&&null==localStorage.getItem("._autoSaveTrans_")&&(localStorage.setItem("._autoSaveTrans_","1"),mxSettings.settings.autosave=-!1,mxSettings.save()),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFilePolling=function(b,f){this.file=b;this.sync=f};DrawioFilePolling.prototype.maxRetries=2;DrawioFilePolling.prototype.minPollDelay=2E3;-DrawioFilePolling.prototype.start=function(b){if(!this.isConnected()){this.delay=this.maxDelay=b;var f=mxUtils.bind(this,function(){this.poll(0,m)}),m=mxUtils.bind(this,function(){this.thread=setTimeout(f,this.delay);this.delay=Math.min(this.maxDelay,this.delay+2E3)});m();EditorUi.debug("DrawioFilePolling.start",[this],"thread",this.thread,"delay",b,"rev",this.file.getCurrentRevisionId())}};+!1,mxSettings.save()),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFilePolling=function(b,g){this.file=b;this.sync=g};DrawioFilePolling.prototype.maxRetries=2;DrawioFilePolling.prototype.minPollDelay=2E3;+DrawioFilePolling.prototype.start=function(b){if(!this.isConnected()){this.delay=this.maxDelay=b;var g=mxUtils.bind(this,function(){this.poll(0,l)}),l=mxUtils.bind(this,function(){this.thread=setTimeout(g,this.delay);this.delay=Math.min(this.maxDelay,this.delay+2E3)});l();EditorUi.debug("DrawioFilePolling.start",[this],"thread",this.thread,"delay",b,"rev",this.file.getCurrentRevisionId())}};DrawioFilePolling.prototype.updateStatus=function(){this.hasOtherWriters()&&(this.sync.lastMessage=mxResources.get("otherUsersEditing"));this.sync.lastModified=this.file.getLastModifiedDate();this.sync.updateStatus()};-DrawioFilePolling.prototype.poll=function(b,f){b=null!=b?b:0;var m=mxUtils.bind(this,function(d){b<this.maxRetries?this.retryPoll(mxUtils.bind(this,function(){this.poll(b+1,f)})):f()});this.file.getLatestVersionId(mxUtils.bind(this,function(d){if(-1!=d){var t=this.file.getCurrentRevisionId();d!=t?this.file.getLatestVersion(mxUtils.bind(this,function(y){this.file.mergeFile(y,mxUtils.bind(this,function(){this.delay=this.minPollDelay;this.lastOtherWriter=Date.now();this.updateStatus();f()}),m)}),m):-(this.updateStatus(),f())}else f()}),m)};DrawioFilePolling.prototype.retryPoll=function(b){var f=300+300*Math.random();window.setTimeout(b,f);EditorUi.debug("StorageFile.retryPoll",[this],"delay",f)};DrawioFilePolling.prototype.stop=function(){EditorUi.debug("DrawioFilePolling.stop",[this],"thread",this.thread);clearTimeout(this.thread);this.thread=null};DrawioFilePolling.prototype.isConnected=function(){return null!=this.thread};+DrawioFilePolling.prototype.poll=function(b,g){b=null!=b?b:0;var l=mxUtils.bind(this,function(d){b<this.maxRetries?this.retryPoll(mxUtils.bind(this,function(){this.poll(b+1,g)})):g()});this.file.getLatestVersionId(mxUtils.bind(this,function(d){if(-1!=d){var q=this.file.getCurrentRevisionId();d!=q?this.file.getLatestVersion(mxUtils.bind(this,function(y){this.file.mergeFile(y,mxUtils.bind(this,function(){this.delay=this.minPollDelay;this.lastOtherWriter=Date.now();this.updateStatus();g()}),l)}),l):+(this.updateStatus(),g())}else g()}),l)};DrawioFilePolling.prototype.retryPoll=function(b){var g=300+300*Math.random();window.setTimeout(b,g);EditorUi.debug("StorageFile.retryPoll",[this],"delay",g)};DrawioFilePolling.prototype.stop=function(){EditorUi.debug("DrawioFilePolling.stop",[this],"thread",this.thread);clearTimeout(this.thread);this.thread=null};DrawioFilePolling.prototype.isConnected=function(){return null!=this.thread};DrawioFilePolling.prototype.hasOtherWriters=function(){return null!=this.lastOtherWriter&&6E4>Date.now()-this.lastOtherWriter};DrawioFileSync=function(b){mxEventSource.call(this);this.lastActivity=Date.now();this.clientId=Editor.guid();this.ui=b.ui;this.file=b;this.onlineListener=mxUtils.bind(this,function(){this.updateOnlineState();this.isConnected()&&!this.ui.isOffline(!0)?this.fileChangedNotify():this.updateStatus()});mxEvent.addListener(window,"offline",this.onlineListener);mxEvent.addListener(window,"online",this.onlineListener);this.realtimeListener=mxUtils.bind(this,function(){this.updateOnlineState()});this.file.addListener("realtimeStateChanged",-this.realtimeListener);this.autosaveListener=mxUtils.bind(this,function(){this.updateRealtime()});this.ui.editor.addListener("autosaveChanged",this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(f){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?-"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.file.addListener("realtimeMessage",this.activityListener);this.pusherErrorListener=mxUtils.bind(this,function(f){null!=f.error&&null!=f.error.data&&4004===-f.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();this.isConnected()&&(this.announced||!Editor.enableRealtimeCache||Editor.p2pSyncNotify?this.announced&&this.fileChangedNotify(null,!0):this.sendJoinMessage())});this.changeListener=mxUtils.bind(this,function(f){this.file.stats.msgReceived++;this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var m=-this.stringToObject(f);null!=m&&(EditorUi.debug("DrawioFileSync.message",[this],m,f.length,"bytes"),m.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):m.v===DrawioFileSync.PROTOCOL&&null!=m.d&&this.handleMessageData(m.d))}catch(d){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;+this.realtimeListener);this.autosaveListener=mxUtils.bind(this,function(){this.updateRealtime()});this.ui.editor.addListener("autosaveChanged",this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(g){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?+"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.file.addListener("realtimeMessage",this.activityListener);this.pusherErrorListener=mxUtils.bind(this,function(g){null!=g.error&&null!=g.error.data&&4004===+g.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();this.isConnected()&&(this.announced||!Editor.enableRealtimeCache||Editor.p2pSyncNotify?this.announced&&this.fileChangedNotify(null,!0):this.sendJoinMessage())});this.changeListener=mxUtils.bind(this,function(g){this.file.stats.msgReceived++;this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var l=+this.stringToObject(g);null!=l&&(EditorUi.debug("DrawioFileSync.message",[this],l,g.length,"bytes"),l.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):l.v===DrawioFileSync.PROTOCOL&&null!=l.d&&this.handleMessageData(l.d))}catch(d){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.maxSyncMessageSize=9E3;DrawioFileSync.prototype.syncSendMessageDelay=300;DrawioFileSync.prototype.syncReceiveMessageDelay=50;DrawioFileSync.prototype.cleanupDelay=15E3;DrawioFileSync.prototype.syncChangeCounter=0;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;DrawioFileSync.prototype.catchupRetryCount=0;DrawioFileSync.prototype.maxCatchupRetries=15;DrawioFileSync.prototype.maxCacheReadyRetries=1;DrawioFileSync.prototype.cacheReadyDelay=700;DrawioFileSync.prototype.maxOptimisticRetries=6;DrawioFileSync.prototype.inactivityTimeoutSeconds=1800;DrawioFileSync.prototype.lastActivity=null;DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=this.file.getChannelId());null==this.key&&(this.key=this.file.getChannelKey());var b=!1;if(this.file.isPolling())"hidden"!=document.visibilityState&&(null==this.polling&&(this.polling=new DrawioFilePolling(this.file,this)),this.polling.start(this.file.getPollingInterval()),b=!0);else if(null==this.pusher&&null!=this.channelId&&"hidden"!=document.visibilityState){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{null!=-this.pusher.connection&&this.pusher.connection.bind("error",this.pusherErrorListener)}catch(f){}try{this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("DrawioFileSync.start",[this],"version",DrawioFileSync.PROTOCOL,"rev",this.file.getCurrentRevisionId())}catch(f){}this.installListeners()}b=!0}b&&window.setTimeout(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.lastActivity=Date.now();this.resetUpdateStatusThread();this.updateOnlineState();+this.pusher.connection&&this.pusher.connection.bind("error",this.pusherErrorListener)}catch(g){}try{this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("DrawioFileSync.start",[this],"version",DrawioFileSync.PROTOCOL,"rev",this.file.getCurrentRevisionId())}catch(g){}this.installListeners()}b=!0}b&&window.setTimeout(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.lastActivity=Date.now();this.resetUpdateStatusThread();this.updateOnlineState();this.updateStatus()},0));this.updateRealtime()};DrawioFileSync.prototype.updateRealtime=function(){this.isValidState()&&(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()&&this.isRealtimeActive()?this.file.isRealtime()||this.initRealtime():this.file.isRealtime()&&this.resetRealtime(),DrawioFileSync.ENABLE_SOCKETS&&this.file.isRealtime()&&null==this.p2pCollab&&null!=this.channelId?(this.p2pCollab=new P2PCollab(this.ui,this,this.channelId),this.p2pCollab.joinFile()):this.file.isRealtime()||null==this.p2pCollab||(this.p2pCollab.destroy(),this.p2pCollab=null))};DrawioFileSync.prototype.initRealtime=function(){this.file.theirPages=this.ui.clonePages(this.ui.pages);this.file.ownPages=this.ui.clonePages(this.ui.pages);this.snapshot=this.file.ownPages};DrawioFileSync.prototype.resetRealtime=function(){var b=this.file.getShadowPages();null!=b&&(b=this.ui.diffPages(b,this.file.ownPages),this.file.patch([b]));this.sendLocalChanges();this.cleanup();this.file.theirPages=null;this.snapshot=this.file.ownPages=null};DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:null!=this.polling?this.polling.isConnected():!1};DrawioFileSync.prototype.updateOnlineState=function(){"1"!=urlParams.embedRT&&(null!=this.ui.toolbarContainer&&null==this.collaboratorsElement&&(this.collaboratorsElement=this.createCollaboratorsElement(),this.ui.toolbarContainer.appendChild(this.collaboratorsElement)),this.updateCollaboratorsElement())};DrawioFileSync.prototype.updateCollaboratorsElement=function(){if(null!=this.collaboratorsElement){var b=this.ui.getNetworkStatus();null!=b?(this.collaboratorsElement.style.backgroundImage="url("+Editor.syncProblemImage+")",this.collaboratorsElement.style.display="inline-block",this.collaboratorsElement.setAttribute("title",b)):this.collaboratorsElement.style.display="none"}};DrawioFileSync.prototype.createCollaboratorsElement=function(){var b=document.createElement("a");b.className="geButton geAdaptiveAsset";b.style.position="absolute";b.style.display="inline-block";b.style.verticalAlign="bottom";b.style.color="#666";b.style.top="6px";b.style.right="atlas"!=Editor.currentTheme?"70px":"50px";b.style.padding="2px";b.style.fontSize="8pt";b.style.verticalAlign="middle";b.style.textDecoration="none";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";-b.style.backgroundSize="16px 16px";b.style.width="16px";b.style.height="16px";b.style.opacity="0.6";mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()?(f=this.ui.getNetworkStatus(),this.ui.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(null!=f?f:mxResources.get("online")))):(this.enabled=+b.style.backgroundSize="16px 16px";b.style.width="16px";b.style.height="16px";b.style.opacity="0.6";mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){g.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()?(g=this.ui.getNetworkStatus(),this.ui.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(null!=g?g:mxResources.get("online")))):(this.enabled=!this.enabled,this.ui.updateButtonContainer(),this.resetUpdateStatusThread(),this.updateOnlineState(),this.updateStatus(),!this.file.inConflictState&&this.enabled&&this.fileChangedNotify())}));return b};-DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));var f=this.lastMessage;this.lastMessage=-null;null!=f&&40<f.length&&(f=f.substring(0,40)+"...");var m=this.ui.getNetworkStatus();b=mxResources.get("lastChange",[b]);var d=this.file.isRevisionHistorySupported()?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+d+'title="'+mxUtils.htmlEntities(b)+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?this.file.isLocked()?' <img class="geToolbarButton geAdaptiveAsset" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+Editor.lockedImage+'"/>':"":-'<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(null!=m?'<div class="geStatusBox" title="'+mxUtils.htmlEntities(m)+'">'+mxUtils.htmlEntities(m)+"</div>":"")+(null!=f?' <div class="geStatusBox" data-effect="fade" title="'+mxUtils.htmlEntities(f)+'">'+mxUtils.htmlEntities(f)+"</div>":""));this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()};+DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));var g=this.lastMessage;this.lastMessage=+null;null!=g&&40<g.length&&(g=g.substring(0,40)+"...");var l=this.ui.getNetworkStatus();b=mxResources.get("lastChange",[b]);var d=this.file.isRevisionHistorySupported()?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+d+'title="'+mxUtils.htmlEntities(b)+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?this.file.isLocked()?' <img class="geToolbarButton geAdaptiveAsset" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+Editor.lockedImage+'"/>':"":+'<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(null!=l?'<div class="geStatusBox" title="'+mxUtils.htmlEntities(l)+'">'+mxUtils.htmlEntities(l)+"</div>":"")+(null!=g?' <div class="geStatusBox" data-effect="fade" title="'+mxUtils.htmlEntities(g)+'">'+mxUtils.htmlEntities(g)+"</div>":""));this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()};DrawioFileSync.prototype.resetUpdateStatusThread=function(){null!=this.updateStatusThread&&window.clearInterval(this.updateStatusThread);null!=this.channel&&(this.updateStatusThread=window.setInterval(mxUtils.bind(this,function(){this.updateStatus()}),Editor.updateStatusInterval))};DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&null!=this.pusher.connection&&this.pusher.connection.bind("state_change",this.connectionListener);null!=this.channel&&this.channel.bind("changed",this.changeListener)};DrawioFileSync.prototype.notify=function(b){this.file.stats.msgSent++;null==this.polling&&(Editor.enableRealtimeCache&&!Editor.p2pSyncNotify?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(b))):null!=this.p2pCollab&&this.p2pCollab.sendNotification(b));EditorUi.debug("DrawioFileSync.notify",[this],"enableRealtimeCache",Editor.enableRealtimeCache,"p2pSyncNotify",Editor.p2pSyncNotify,"msg",b)};-DrawioFileSync.prototype.sendJoinMessage=function(){if(!this.announced){var b=this.file.getCurrentUser(),f={a:"join"};null!=b&&(f.name=encodeURIComponent(b.displayName),f.uid=b.id);this.notify(this.createMessage(f));this.announced=!0}};+DrawioFileSync.prototype.sendJoinMessage=function(){if(!this.announced){var b=this.file.getCurrentUser(),g={a:"join"};null!=b&&(g.name=encodeURIComponent(b.displayName),g.uid=b.id);this.notify(this.createMessage(g));this.announced=!0}};DrawioFileSync.prototype.handleMessageData=function(b){"desc"==b.a?this.file.savingFile||this.reloadDescriptor():"join"==b.a||"leave"==b.a?("join"==b.a&&this.file.stats.joined++,null!=b.name&&(this.lastMessage=mxResources.get("join"==b.a?"userJoined":"userLeft",[decodeURIComponent(b.name)]),this.resetUpdateStatusThread(),this.updateStatus())):"change"==b.a?this.receiveRemoteChanges(b):null!=b.m&&(b=new Date(b.m),null==this.lastMessageModified||this.lastMessageModified<b)&&(this.lastMessageModified=b,this.fileChangedNotify())};DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile()==this.file&&this.file.sync==this&&!this.file.invalidChecksum&&!this.file.redirectDialogShowing};-DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries,"remoteFileChanged",this.remoteFileChanged);this.remoteFileChanged=!1;this.file.getLatestVersion(mxUtils.bind(this,function(f){this.reloadThread=null;if(null!=f){var m=this.file.getCurrentRevisionId(),d=f.getCurrentRevisionId();-m==d?this.optimisticSync(b+1):this.file.mergeFile(f,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)))};-DrawioFileSync.prototype.fileChangedNotify=function(b,f){if(this.isValidState())if(EditorUi.debug("DrawioFileSync.fileChangedNotify",[this],"data",[b],"immediate",f,"saving",this.file.savingFile),this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var m=this.fileChanged(mxUtils.bind(this,function(d){this.updateStatus()}),mxUtils.bind(this,function(d){this.file.handleFileError(d)}),mxUtils.bind(this,function(){return!this.file.savingFile&&-this.notifyThread!=m}),!0,f)};DrawioFileSync.prototype.localFileChanged=function(){this.file.isRealtime()&&(window.clearTimeout(this.triggerSendThread),this.localFileWasChanged=!0,this.scheduleCleanup(!0),this.triggerSendThread=window.setTimeout(mxUtils.bind(this,function(){this.sendLocalChanges()}),Math.min(this.file.autosaveDelay,this.syncSendMessageDelay-20)))};-DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var f=this.clientId+"."+this.syncChangeCounter++,m=this.createMessage({a:"change",c:b,id:f,t:Date.now()});f=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(m):"1"==urlParams.dev?(m=encodeURIComponent(this.objectToString(m)),0==this.maxSyncMessageSize||m.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+m):f=!0):f=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],-"changes",b,f?"(skipped)":"")}};-DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(t,y){return t.id<y.id?-1:t.id>y.id?1:0});for(var f=null,m=0;m<this.receivedData.length;m++){var d=JSON.stringify(this.receivedData[m].c);d!=f&&this.doReceiveRemoteChanges(this.receivedData[m].c);-f=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};-DrawioFileSync.prototype.scheduleCleanup=function(b){var f=Math.min(15,Math.floor(this.file.getSize()/5E6));f=0==b?0:this.cleanupDelay+1E3*f;var m=this.cleanupThread;if(1!=b||null!=this.cleanupThread)window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanup(null,mxUtils.bind(this,function(d){this.file.handleFileError(d)}))}),f);EditorUi.debug("DrawioFileSync.scheduleCleanup",[this],"lazy",b,"delay",f,"prev",m,"thread",this.cleanupThread)};-DrawioFileSync.prototype.cleanup=function(b,f,m){var d=this.cleanupThread;window.clearTimeout(this.cleanupThread);this.cleanupThread=null;if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var t=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.cleanup",[this],"thread",d,"patches",t,"checkFile",m,"checksum",this.ui.getHashValueForPages(this.ui.pages));-this.file.ignorePatches(t)||this.file.patch(t);m?this.file.getLatestVersion(mxUtils.bind(this,function(y){try{if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()){var x=y.getShadowPages();t=[this.ui.diffPages(this.ui.pages,x),this.ui.diffPages(x,this.file.ownPages)];this.file.ignorePatches(t)||this.file.patch(t);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",y,"patches",t)}null!=b&&b()}catch(C){null!=f&&f(C)}}),f):(document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||-this.testChecksum(),null!=b&&b())}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",m,"modified",this.file.isModified()))};-DrawioFileSync.prototype.testChecksum=function(){var b=this.ui.getHashValueForPages(this.ui.pages),f=this.file.getCurrentRevisionId();this.file.getLatestVersion(mxUtils.bind(this,function(m){if(!document.hidden){var d=this.ui.getHashValueForPages(m.getShadowPages()),t=m.getDescriptorChecksum(m.getDescriptor()),y=m.getCurrentRevisionId();EditorUi.debug("DrawioFileSync.testChecksum","local",[this.file],"modified",this.file.isModified(),"inConflictState",this.file.inConflictState,"autosaveThread",this.file.autosaveThread,-"savingFile",this.file.savingFile,"localFileWasChanged",this.localFileWasChanged,"remoteFileChanged",this.remoteFileChanged,"cleanup",this.cleanupThread,"checksum",b);EditorUi.debug("DrawioFileSync.testChecksum","remote",[m],"rev",y==f,"desc",t==d,"checksum",d);d!=b?(EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums do not match"),this.ui.alert("Checksums do not match")):EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums match")}}),mxUtils.bind(this,function(m){EditorUi.debug("DrawioFileSync.testChecksum",-[this],"checksum test error",m)}))};DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};-DrawioFileSync.prototype.extractRemove=function(b){var f={};null!=b[EditorUi.DIFF_REMOVE]&&(f[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var m in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][m];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={});f[EditorUi.DIFF_UPDATE][m]={};var t=f[EditorUi.DIFF_UPDATE][m];t.cells={};t.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return f};-DrawioFileSync.prototype.patchRealtime=function(b,f,m,d){var t=null;if(this.file.isRealtime()){t=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var y=this.extractRemove(this.extractLocal(t)),x=(null==m?b:b.concat(m)).concat([y]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,x,!0,f);mxUtils.isEmptyObject(y)?this.scheduleCleanup(null!=d?!1:null):this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",f,"own",m,-"all",t,"local",y,"applied",x,"immediate",d)}return t};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};-DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),f=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.snapshot=b;var m=this.ui.resolveCrossReferences(f,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,m,!0);this.isRealtimeActive()&&this.doSendLocalChanges([m,f])}this.localFileWasChanged=+DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries,"remoteFileChanged",this.remoteFileChanged);this.remoteFileChanged=!1;this.file.getLatestVersion(mxUtils.bind(this,function(g){this.reloadThread=null;if(null!=g){var l=this.file.getCurrentRevisionId(),d=g.getCurrentRevisionId();+l==d?this.optimisticSync(b+1):this.file.mergeFile(g,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)))};+DrawioFileSync.prototype.fileChangedNotify=function(b,g){if(this.isValidState())if(EditorUi.debug("DrawioFileSync.fileChangedNotify",[this],"data",[b],"immediate",g,"saving",this.file.savingFile),this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var l=this.fileChanged(mxUtils.bind(this,function(d){this.updateStatus()}),mxUtils.bind(this,function(d){this.file.handleFileError(d)}),mxUtils.bind(this,function(){return!this.file.savingFile&&+this.notifyThread!=l}),!0,g)};DrawioFileSync.prototype.localFileChanged=function(){this.file.isRealtime()&&(window.clearTimeout(this.triggerSendThread),this.localFileWasChanged=!0,this.scheduleCleanup(!0),this.triggerSendThread=window.setTimeout(mxUtils.bind(this,function(){this.sendLocalChanges()}),Math.min(this.file.autosaveDelay,this.syncSendMessageDelay-20)))};+DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var g=this.clientId+"."+this.syncChangeCounter++,l=this.createMessage({a:"change",c:b,id:g,t:Date.now()});g=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(l):"1"==urlParams.dev?(l=encodeURIComponent(this.objectToString(l)),0==this.maxSyncMessageSize||l.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+l):g=!0):g=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],+"changes",b,g?"(skipped)":"")}};+DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(q,y){return q.id<y.id?-1:q.id>y.id?1:0});for(var g=null,l=0;l<this.receivedData.length;l++){var d=JSON.stringify(this.receivedData[l].c);d!=g&&this.doReceiveRemoteChanges(this.receivedData[l].c);+g=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};+DrawioFileSync.prototype.scheduleCleanup=function(b){var g=Math.min(15,Math.floor(this.file.getSize()/5E6));g=0==b?0:this.cleanupDelay+1E3*g;var l=this.cleanupThread;if(1!=b||null!=this.cleanupThread)window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanup(null,mxUtils.bind(this,function(d){this.file.handleFileError(d)}))}),g);EditorUi.debug("DrawioFileSync.scheduleCleanup",[this],"lazy",b,"delay",g,"prev",l,"thread",this.cleanupThread)};+DrawioFileSync.prototype.cleanup=function(b,g,l){var d=this.cleanupThread;window.clearTimeout(this.cleanupThread);this.cleanupThread=null;if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var q=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.cleanup",[this],"thread",d,"patches",q,"checkFile",l,"checksum",this.ui.getHashValueForPages(this.ui.pages));+this.file.ignorePatches(q)||this.file.patch(q);l?this.file.getLatestVersion(mxUtils.bind(this,function(y){try{if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()){var x=y.getShadowPages();q=[this.ui.diffPages(this.ui.pages,x),this.ui.diffPages(x,this.file.ownPages)];this.file.ignorePatches(q)||this.file.patch(q);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",y,"patches",q)}null!=b&&b()}catch(D){null!=g&&g(D)}}),g):(document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||+this.testChecksum(),null!=b&&b())}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",l,"modified",this.file.isModified()))};+DrawioFileSync.prototype.testChecksum=function(){var b=this.ui.getHashValueForPages(this.ui.pages),g=this.file.getCurrentRevisionId();this.file.getLatestVersion(mxUtils.bind(this,function(l){if(!document.hidden){var d=this.ui.getHashValueForPages(l.getShadowPages()),q=l.getDescriptorChecksum(l.getDescriptor()),y=l.getCurrentRevisionId();EditorUi.debug("DrawioFileSync.testChecksum","local",[this.file],"modified",this.file.isModified(),"inConflictState",this.file.inConflictState,"autosaveThread",this.file.autosaveThread,+"savingFile",this.file.savingFile,"localFileWasChanged",this.localFileWasChanged,"remoteFileChanged",this.remoteFileChanged,"cleanup",this.cleanupThread,"checksum",b);EditorUi.debug("DrawioFileSync.testChecksum","remote",[l],"rev",y==g,"desc",q==d,"checksum",d);d!=b?(EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums do not match"),this.ui.alert("Checksums do not match")):EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums match")}}),mxUtils.bind(this,function(l){EditorUi.debug("DrawioFileSync.testChecksum",+[this],"checksum test error",l)}))};DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};+DrawioFileSync.prototype.extractRemove=function(b){var g={};null!=b[EditorUi.DIFF_REMOVE]&&(g[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var l in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][l];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==g[EditorUi.DIFF_UPDATE]&&(g[EditorUi.DIFF_UPDATE]={});g[EditorUi.DIFF_UPDATE][l]={};var q=g[EditorUi.DIFF_UPDATE][l];q.cells={};q.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return g};+DrawioFileSync.prototype.patchRealtime=function(b,g,l,d){var q=null;if(this.file.isRealtime()){q=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var y=this.extractRemove(this.extractLocal(q)),x=(null==l?b:b.concat(l)).concat([y]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,x,!0,g);mxUtils.isEmptyObject(y)?this.scheduleCleanup(null!=d?!1:null):this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",g,"own",l,+"all",q,"local",y,"applied",x,"immediate",d)}return q};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};+DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),g=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,g,!0);this.snapshot=b;var l=this.ui.resolveCrossReferences(g,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,l,!0);this.isRealtimeActive()&&this.doSendLocalChanges([l,g])}this.localFileWasChanged=!1}catch(d){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),b,d)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};-DrawioFileSync.prototype.merge=function(b,f,m,d,t,y,x){try{this.file.stats.merged++;this.lastModified=new Date;var C=this.file.getDescriptorRevisionId(m);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var K=this.ui.clonePages(this.file.getShadowPages()),M=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(K,this.ui.pages):null,N=this.file.isRealtime()?this.ui.diffPages(K,this.file.ownPages):null;K=this.ui.applyPatches(K,b);var P=null==f?null:this.ui.getHashValueForPages(K);-EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",M,"pending",N,"checksum",f,"current",P,"valid",f==P,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",C,"etag",this.file.getDescriptorEtag(m),"immediate",x);if(null!=f&&f!=P){this.reload(mxUtils.bind(this,function(){null!=d&&d()}),mxUtils.bind(this,function(){null!=t&&t()}),y,null,x);return}this.file.setShadowPages(K);null==this.patchRealtime(b,null,N,x)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?-M:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),m);null!=d&&d(!0)}catch(e){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=t&&t(e);try{var I=this.file.getCurrentUser(),c=null!=I?I.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),c,e)}catch(l){}}};-DrawioFileSync.prototype.fileChanged=function(b,f,m,d,t){var y=window.setTimeout(mxUtils.bind(this,function(){null!=m&&m()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"immediate",t,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(x){null!=m&&m()||(this.isValidState()?this.catchup(x,b,f,m,t):null!=f&&f())}),f)):null!=f&&f())}),d?this.cacheReadyDelay:0);return this.notifyThread=+DrawioFileSync.prototype.merge=function(b,g,l,d,q,y,x){try{this.file.stats.merged++;this.lastModified=new Date;var D=this.file.getDescriptorRevisionId(l);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var J=this.ui.clonePages(this.file.getShadowPages()),K=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(J,this.ui.pages):null,L=this.file.isRealtime()?this.ui.diffPages(J,this.file.ownPages):null;J=this.ui.applyPatches(J,b);var N=null==g?null:this.ui.getHashValueForPages(J);+EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",K,"pending",L,"checksum",g,"current",N,"valid",g==N,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",D,"etag",this.file.getDescriptorEtag(l),"immediate",x);if(null!=g&&g!=N){this.reload(mxUtils.bind(this,function(){null!=d&&d()}),mxUtils.bind(this,function(){null!=q&&q()}),y,null,x);return}this.file.setShadowPages(J);null==this.patchRealtime(b,null,L,x)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?+K:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),l);null!=d&&d(!0)}catch(f){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=q&&q(f);try{var c=this.file.getCurrentUser(),e=null!=c?c.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),e,f)}catch(p){}}};+DrawioFileSync.prototype.fileChanged=function(b,g,l,d,q){var y=window.setTimeout(mxUtils.bind(this,function(){null!=l&&l()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"immediate",q,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(x){null!=l&&l()||(this.isValidState()?this.catchup(x,b,g,l,q):null!=g&&g())}),g)):null!=g&&g())}),d?this.cacheReadyDelay:0);return this.notifyThread=y};-DrawioFileSync.prototype.fastForward=function(b){this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.setShadowPages(this.ui.clonePages(this.ui.pages));this.file.theirPages=this.ui.clonePages(this.ui.pages);var f=this.file.ownPages;this.file.ownPages=this.ui.clonePages(this.ui.pages);for(var m=0;m<this.file.ownPages.length;m++)null!=f[m]&&this.ui.getHashValueForPages([this.file.ownPages[m]])!=this.ui.getHashValueForPages([f[m]])&&(this.file.ownPages[m].needsUpdate=!0);f=this.cleanupThread;window.clearTimeout(this.cleanupThread);-this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fastForward",[this],"desc",[b],"cleanup",f,"checksum",this.ui.getHashValueForPages(this.ui.pages));document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum()};+DrawioFileSync.prototype.fastForward=function(b){this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.setShadowPages(this.ui.clonePages(this.ui.pages));this.file.theirPages=this.ui.clonePages(this.ui.pages);var g=this.file.ownPages;this.file.ownPages=this.ui.clonePages(this.ui.pages);for(var l=0;l<this.file.ownPages.length;l++)null!=g[l]&&this.ui.getHashValueForPages([this.file.ownPages[l]])!=this.ui.getHashValueForPages([g[l]])&&(this.file.ownPages[l].needsUpdate=!0);g=this.cleanupThread;window.clearTimeout(this.cleanupThread);+this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fastForward",[this],"desc",[b],"cleanup",g,"checksum",this.ui.getHashValueForPages(this.ui.pages));document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum()};DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};-DrawioFileSync.prototype.catchup=function(b,f,m,d,t){if(null!=b&&(null==d||!d())){var y=this.file.getCurrentRevisionId(),x=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",y,"to",x,"immediate",t,"valid",this.isValidState());if(y==x)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),-document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=f&&f(!0);else if(this.isValidState()){var C=this.file.getDescriptorChecksum(b),K=this.file.getDescriptorSecret(b);if(null!=C&&C==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=f&&f(!0);else if(Editor.enableRealtimeCache&&null!=K&&"1"!=urlParams.lockdown){var M=0,N=!1,P=mxUtils.bind(this,function(){if(null==d||!d())if(y!=this.file.getCurrentRevisionId())null!=f&&-f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var I=!0,c=window.setTimeout(mxUtils.bind(this,function(){I=!1;this.reload(f,m,d,null,t)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(y)+"&to="+encodeURIComponent(x)+(null!=K?"&secret="+encodeURIComponent(K):""),mxUtils.bind(this,function(e){this.file.stats.bytesReceived+=e.getText().length;window.clearTimeout(c);if(I&&(null==d||!d()))if(y!=this.file.getCurrentRevisionId())null!=-f&&f(!0);else if(this.isValidState()){var l=null,n=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[e],"status",e.getStatus(),"cacheReadyRetryCount",M,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=e.getStatus()&&299>=e.getStatus()&&0<e.getText().length)try{var p=JSON.parse(e.getText());if(null!=p&&0<p.length)for(var u=0;u<p.length;u++){var B=this.stringToObject(p[u]);if(B.v>DrawioFileSync.PROTOCOL){N=!0;n=[];break}else if(B.v===DrawioFileSync.PROTOCOL&&null!=B.d)l=B.d.checksum,-n.push(B.d.patch);else{N=!0;n=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[p],"status",N?"failed":"ok","temp",n,"checksum",l)}catch(D){n=[],null!=window.console&&"1"==urlParams.test&&console.log(D)}try{0<n.length?(this.file.stats.cacheHits++,this.merge(n,l,b,f,m,d,t)):M<=this.maxCacheReadyRetries-1&&!N&&401!=e.getStatus()&&503!=e.getStatus()&&410!=e.getStatus()?(M++,this.file.stats.cacheMiss++,window.setTimeout(P,(M+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,-this.reload(f,m,d,null,t))}catch(D){null!=m&&m(D)}}else null!=m&&m()}),m)}else null!=m&&m()});window.setTimeout(P,this.cacheReadyDelay)}else this.reload(f,m,d,null,t)}else null!=m&&m()}};DrawioFileSync.prototype.reload=function(b,f,m,d,t){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",t);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(y){null!=f&&f(y)}),m,d,t)};-DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),m=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(m)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;-EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",m)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};-DrawioFileSync.prototype.createToken=function(b,f,m){var d=!0,t=window.setTimeout(mxUtils.bind(this,function(){d=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(y){window.clearTimeout(t);d&&(200<=y.getStatus()&&299>=y.getStatus()?f(y.getText()):m({code:y.getStatus(),message:"Token Error "+y.getStatus()}))}),m)};+DrawioFileSync.prototype.catchup=function(b,g,l,d,q){if(null!=b&&(null==d||!d())){var y=this.file.getCurrentRevisionId(),x=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",y,"to",x,"immediate",q,"valid",this.isValidState());if(y==x)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),+document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=g&&g(!0);else if(this.isValidState()){var D=this.file.getDescriptorChecksum(b),J=this.file.getDescriptorSecret(b);if(null!=D&&D==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=g&&g(!0);else if(Editor.enableRealtimeCache&&null!=J&&"1"!=urlParams.lockdown){var K=0,L=!1,N=mxUtils.bind(this,function(){if(null==d||!d())if(y!=this.file.getCurrentRevisionId())null!=g&&+g(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;this.reload(g,l,d,null,q)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(y)+"&to="+encodeURIComponent(x)+(null!=J?"&secret="+encodeURIComponent(J):""),mxUtils.bind(this,function(f){this.file.stats.bytesReceived+=f.getText().length;window.clearTimeout(e);if(c&&(null==d||!d()))if(y!=this.file.getCurrentRevisionId())null!=+g&&g(!0);else if(this.isValidState()){var p=null,n=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[f],"status",f.getStatus(),"cacheReadyRetryCount",K,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=f.getStatus()&&299>=f.getStatus()&&0<f.getText().length)try{var t=JSON.parse(f.getText());if(null!=t&&0<t.length)for(var z=0;z<t.length;z++){var F=this.stringToObject(t[z]);if(F.v>DrawioFileSync.PROTOCOL){L=!0;n=[];break}else if(F.v===DrawioFileSync.PROTOCOL&&null!=F.d)p=F.d.checksum,+n.push(F.d.patch);else{L=!0;n=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[t],"status",L?"failed":"ok","temp",n,"checksum",p)}catch(C){n=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<n.length?(this.file.stats.cacheHits++,this.merge(n,p,b,g,l,d,q)):K<=this.maxCacheReadyRetries-1&&!L&&401!=f.getStatus()&&503!=f.getStatus()&&410!=f.getStatus()?(K++,this.file.stats.cacheMiss++,window.setTimeout(N,(K+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,+this.reload(g,l,d,null,q))}catch(C){null!=l&&l(C)}}else null!=l&&l()}),l)}else null!=l&&l()});window.setTimeout(N,this.cacheReadyDelay)}else this.reload(g,l,d,null,q)}else null!=l&&l()}};DrawioFileSync.prototype.reload=function(b,g,l,d,q){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",q);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(y){null!=g&&g(y)}),l,d,q)};+DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var g=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),l=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(l)+"&msg="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;+EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",l)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};+DrawioFileSync.prototype.createToken=function(b,g,l){var d=!0,q=window.setTimeout(mxUtils.bind(this,function(){d=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(y){window.clearTimeout(q);d&&(200<=y.getStatus()&&299>=y.getStatus()?g(y.getText()):l({code:y.getStatus(),message:"Token Error "+y.getStatus()}))}),l)};DrawioFileSync.prototype.fileSaving=function(){this.file.isOptimisticSync()&&this.notify(this.createMessage({m:Date.now(),type:"optimistic"}));EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};-DrawioFileSync.prototype.fileSaved=function(b,f,m,d,t,y){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var x=this.file.getDescriptorSecret(this.file.getDescriptor()),C=this.createMessage({m:this.lastModified.getTime()}),K=this.file.getDescriptorRevisionId(f),M=this.file.getCurrentRevisionId();if(null!=x&&null!=t&&-"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var N=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);y=null!=y?y:this.ui.getHashValueForPages(b);var P=this.objectToString(this.createMessage({patch:N,checksum:y}));this.file.stats.bytesSent+=P.length;this.file.stats.msgSent++;var I=!0,c=window.setTimeout(mxUtils.bind(this,function(){I=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+-"&from="+encodeURIComponent(K)+"&to="+encodeURIComponent(M)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(C)))+(null!=x?"&secret="+encodeURIComponent(x):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(P.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(P):"")+(null!=t?"&token="+encodeURIComponent(t):""),mxUtils.bind(this,function(e){window.clearTimeout(c);I&&(200<=e.getStatus()&&299>=e.getStatus()?(Editor.p2pSyncNotify&&this.notify(C),null!=m&&m()):d({message:mxResources.get("realtimeCollaboration")+-(0!=e.getStatus()?": "+e.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",K,"to",M,"etag",this.file.getCurrentEtag(),"diff",N,P.length,"bytes","checksum",y)}else this.notify(C),null!=m&&m(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",K,"to",M,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};+DrawioFileSync.prototype.fileSaved=function(b,g,l,d,q,y){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var x=this.file.getDescriptorSecret(this.file.getDescriptor()),D=this.createMessage({m:this.lastModified.getTime()}),J=this.file.getDescriptorRevisionId(g),K=this.file.getCurrentRevisionId();if(null!=x&&null!=q&&+"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var L=this.ui.diffPages(this.file.getShadowPages(),b);g=this.file.getDescriptorSecret(g);y=null!=y?y:this.ui.getHashValueForPages(b);var N=this.objectToString(this.createMessage({patch:L,checksum:y}));this.file.stats.bytesSent+=N.length;this.file.stats.msgSent++;var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()++"&from="+encodeURIComponent(J)+"&to="+encodeURIComponent(K)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(D)))+(null!=x?"&secret="+encodeURIComponent(x):"")+(null!=g?"&last-secret="+encodeURIComponent(g):"")+(N.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(N):"")+(null!=q?"&token="+encodeURIComponent(q):""),mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(200<=f.getStatus()&&299>=f.getStatus()?(Editor.p2pSyncNotify&&this.notify(D),null!=l&&l()):d({message:mxResources.get("realtimeCollaboration")++(0!=f.getStatus()?": "+f.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",J,"to",K,"etag",this.file.getCurrentEtag(),"diff",L,N.length,"bytes","checksum",y)}else this.notify(D),null!=l&&l(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",J,"to",K,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};-DrawioFileSync.prototype.fileConflict=function(b,f,m){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,f,m):this.fileChanged(f,m)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=m&&m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};+DrawioFileSync.prototype.fileConflict=function(b,g,l){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,g,l):this.fileChanged(g,l)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};DrawioFileSync.prototype.stop=function(){null!=this.pusher?(null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null),EditorUi.debug("DrawioFileSync.stop",[this])):null!=this.polling&&(this.polling.stop(),this.polling=null);this.updateOnlineState();this.updateStatus()};-DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),f={a:"leave"};null!=b&&(f.name=encodeURIComponent(b.displayName),f.uid=b.id);this.notify(this.createMessage(f))}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"offline",this.onlineListener),mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.addListener("autosaveChanged",this.autosaveListener),this.autosaveListener=+DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),g={a:"leave"};null!=b&&(g.name=encodeURIComponent(b.displayName),g.uid=b.id);this.notify(this.createMessage(g))}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"offline",this.onlineListener),mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.addListener("autosaveChanged",this.autosaveListener),this.autosaveListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,"touchstart",this.activityListener),-mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&null!=this.collaboratorsElement.parentNode&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,f,m){EditorUi.call(this,b,f,null!=m?m:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&d.isModified()&&(d.getHash(),d.savingFile&&null!=d.savingFileTime&&(Date.now(),d.savingFileTime.getTime()),null!=d.ageStart&&(Date.now(),d.ageStart.getTime()),d.isAutosave(),null!=d.opened&&(Date.now(),d.opened.getTime()),null!=d.lastSaved&&(Date.now(),d.lastSaved.getTime()),+mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&null!=this.collaboratorsElement.parentNode&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,g,l){EditorUi.call(this,b,g,null!=l?l:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&d.isModified()&&(d.getHash(),d.savingFile&&null!=d.savingFileTime&&(Date.now(),d.savingFileTime.getTime()),null!=d.ageStart&&(Date.now(),d.ageStart.getTime()),d.isAutosave(),null!=d.opened&&(Date.now(),d.opened.getTime()),null!=d.lastSaved&&(Date.now(),d.lastSaved.getTime()),null!=d.lastChanged&&(Date.now(),d.lastChanged.getTime()),Date.now(),App.startTime.getTime(),d.constructor==DriveFile&&null!=d.desc&&null!=this.drive&&d.getSize())}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+d.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":-(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(d,t,y){if("1"==urlParams.openInSameWin||navigator.standalone)null!=y&&y();else{var x=null;try{x=window.open(d)}catch(C){}null==x||void 0===x?this.showDialog((new PopupDialog(this,d,t,y)).container,320,160,!0,!0):null!=t&&t()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&+(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(d,q,y){if("1"==urlParams.openInSameWin||navigator.standalone)null!=y&&y();else{var x=null;try{x=window.open(d)}catch(D){}null==x||void 0===x?this.showDialog((new PopupDialog(this,d,q,y)).container,320,160,!0,!0):null!=q&&q()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(d){try{d(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":"js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="js/jquery/jquery-3.6.0.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL="js/simplepeer/simplepeer9.10.0.min.js";App.GOOGLE_APIS="drive-share";App.startTime=new Date;App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",nxtcld:"plugins/nextcloud.js",monday:"plugins/monday.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js","import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex tips svgdata number sql props text anim update trees replay anon webcola tags".split(" ");-App.loadScripts=function(b,f,m){for(var d=b.length,t=!1,y=0;y<b.length;y++)mxscript(b[y],function(){0!=--d||t||null==f||f()},null,null,null,function(x){t=!0;null!=m&&m(Error(x))})};-App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage)try{for(var f=document.cookie.split(";"),m=0;m<f.length;m++){var d=mxUtils.trim(f[m]);if("MODE="==d.substring(0,5)){b=d.substring(5);break}}if(null!=b&&isLocalStorage){var t=new Date;t.setYear(t.getFullYear()-1);document.cookie="MODE=; expires="+t.toUTCString();localStorage.setItem(".mode",b)}}catch(y){}return b};+App.loadScripts=function(b,g,l){for(var d=b.length,q=!1,y=0;y<b.length;y++)mxscript(b[y],function(){0!=--d||q||null==g||g()},null,null,null,function(x){q=!0;null!=l&&l(Error(x))})};+App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage)try{for(var g=document.cookie.split(";"),l=0;l<g.length;l++){var d=mxUtils.trim(g[l]);if("MODE="==d.substring(0,5)){b=d.substring(5);break}}if(null!=b&&isLocalStorage){var q=new Date;q.setYear(q.getFullYear()-1);document.cookie="MODE=; expires="+q.toUTCString();localStorage.setItem(".mode",b)}}catch(y){}return b};(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode),null==App.mode&&"1"!=urlParams.embed&&(App.mode=App.getStoredMode()),null!=window.mxscript&&"1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();-App.clearServiceWorker=function(b,f){navigator.serviceWorker.getRegistrations().then(function(m){if(null!=m&&0<m.length){for(var d=0;d<m.length;d++)m[d].unregister();null!=b&&b()}})["catch"](function(){null!=f&&f()})};App.isSameDomain=function(b){var f=document.createElement("a");f.href=b;return f.protocol===window.location.protocol||f.host===window.location.host};App.isBuiltInPlugin=function(b){for(var f in App.pluginRegistry)if(App.pluginRegistry[f]==b)return!0;return!1};-App.main=function(b,f){try{var m=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var c=parseInt(mxSettings.settings.autosaveDelay);!isNaN(c)&&0<c?(DrawioFile.prototype.autosaveDelay=c,EditorUi.debug("Setting autosaveDelay",c)):EditorUi.debug("Invalid autosaveDelay",c)}null!=mxSettings.settings.defaultEdgeLength&&(c=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(c)&&0<c?(Graph.prototype.defaultEdgeLength=c,EditorUi.debug("Using defaultEdgeLength",c)):-EditorUi.debug("Invalid defaultEdgeLength",c))}}catch(l){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(l.stack)):console.error(l)}try{if(null!=Menus.prototype.defaultFonts)for(c=0;c<Menus.prototype.defaultFonts.length;c++){var e=Menus.prototype.defaultFonts[c];"string"!==typeof e&&null!=e.fontFamily&&null!=e.fontUrl&&Graph.addFont(e.fontFamily,e.fontUrl)}mxResources.loadDefaultBundle=!1;d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,-mxLanguage))}catch(l){document.body.innerHTML="",e=document.createElement("pre"),mxUtils.write(e,l.stack),document.body.appendChild(e)}},d=function(c){mxUtils.getAll("1"!=urlParams.dev?[c]:[c,STYLE_PATH+"/default.xml"],function(e){function l(){try{""!=Editor.currentTheme&&"kennedy"!=Editor.currentTheme&&"dark"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");var D=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,+App.clearServiceWorker=function(b,g){navigator.serviceWorker.getRegistrations().then(function(l){if(null!=l&&0<l.length){for(var d=0;d<l.length;d++)l[d].unregister();null!=b&&b()}})["catch"](function(){null!=g&&g()})};App.isSameDomain=function(b){var g=document.createElement("a");g.href=b;return g.protocol===window.location.protocol||g.host===window.location.host};App.isBuiltInPlugin=function(b){for(var g in App.pluginRegistry)if(App.pluginRegistry[g]==b)return!0;return!1};+App.main=function(b,g){try{var l=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var e=parseInt(mxSettings.settings.autosaveDelay);!isNaN(e)&&0<e?(DrawioFile.prototype.autosaveDelay=e,EditorUi.debug("Setting autosaveDelay",e)):EditorUi.debug("Invalid autosaveDelay",e)}null!=mxSettings.settings.defaultEdgeLength&&(e=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(e)&&0<e?(Graph.prototype.defaultEdgeLength=e,EditorUi.debug("Using defaultEdgeLength",e)):+EditorUi.debug("Invalid defaultEdgeLength",e))}}catch(p){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(p.stack)):console.error(p)}try{if(null!=Menus.prototype.defaultFonts)for(e=0;e<Menus.prototype.defaultFonts.length;e++){var f=Menus.prototype.defaultFonts[e];"string"!==typeof f&&null!=f.fontFamily&&null!=f.fontUrl&&Graph.addFont(f.fontFamily,f.fontUrl)}mxResources.loadDefaultBundle=!1;d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,+mxLanguage))}catch(p){document.body.innerHTML="",f=document.createElement("pre"),mxUtils.write(f,p.stack),document.body.appendChild(f)}},d=function(e){mxUtils.getAll("1"!=urlParams.dev?[e]:[e,STYLE_PATH+"/default.xml"],function(f){function p(){try{""!=Editor.currentTheme&&"kennedy"!=Editor.currentTheme&&"dark"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");var C=null!=g?g():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)}):"undefined"===typeof window.Dropbox&&(window.DropboxClient=null),"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null),"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===-typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(D);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,D,(new Date).getTime()-t0.getTime()+"ms"]),null!=-urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(G){EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(G.stack)):(EditorUi.logError(G.message,null,null,null,G),window.setTimeout(function(){alert(G.message)},1))}}mxResources.parse(e[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var n=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=n){EditorUi.debug("Setting configuration",-JSON.stringify(n));if(null!=n.merge){var p=localStorage.getItem(Editor.configurationKey);if(null!=p)try{var u=JSON.parse(p),B;for(B in n.merge)u[B]=n.merge[B];n=u}catch(D){window.location.hash="",alert(D)}else n=n.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(n)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(D){window.location.hash="",alert(D)}1<e.length&&-(Graph.prototype.defaultThemes["default-style2"]=e[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=e[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?l():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],l,function(D){document.body.innerHTML="";var G=document.createElement("pre");mxUtils.write(G,D.stack);document.body.appendChild(G)}))},function(e){e=document.getElementById("geStatus");null!=e&&-(e.innerHTML="Error loading page. <a>Please try refreshing.</a>",e.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';-else if(App.isMainCalled=!0,window.onerror=function(c,e,l,n,p){EditorUi.logError("Global: "+(null!=c?c:""),e,l,n,p,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",c,"\nURL:",e,"\nLine:",l,"\nColumn:",n,"\nError:",p)):console.error("Message:",c,"\nURL:",e,"\nLine:",l,"\nColumn:",n,"\nError:",p);window.setTimeout(function(){alert("Error: "+(null!=c?c:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&-"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var t=document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){var y=document.getElementById("geBootstrap");-if(null!=y){var x=mxUtils.getTextContent(y);"ff68e9badc5b6bcb8f482e0c64b103a7"!=CryptoJS.MD5(x).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}var C=document.getElementById("geMain");null!=C&&(x=mxUtils.getTextContent(C),"69c25556b6237c57cdb7d017147af34b"!=CryptoJS.MD5(x).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&-("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(c){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||-"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var K=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var M=JSON.parse(localStorage.getItem(mxSettings.key));null!=M&&(K=M.plugins)}catch(c){}M=urlParams.p;App.initPluginCallback();null!=M&&App.loadPlugins(M.split(";"));if(null!=K&&0<-K.length&&"0"!=urlParams.plugins)for(t=0;t<K.length;t++)try{("/"==K[t].charAt(0)&&(K[t]=PLUGINS_BASE_PATH+K[t]),App.isSameDomain(K[t]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(K[t])?null==App.pluginsLoaded[K[t]]&&(App.pluginsLoaded[K[t]]=!0,App.embedModePluginsCount++,mxscript(K[t])):null!=window.console&&console.log("Unknown plugin:",K[t]):null!=window.console&&console.log("Blocked plugin:",K[t])}catch(c){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&-"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var N=window.opener||window.parent,P=function(c){if(c.source==N)try{var e=JSON.parse(c.data);null!=e&&"configure"==-e.action&&(mxEvent.removeListener(window,"message",P),Editor.configure(e.config),mxSettings.load(),null!=e.config.darkColor&&document.body.style.setProperty("--dark-color",e.config.darkColor),e.colorSchemeMeta&&mxmeta("color-scheme","dark light"),m())}catch(l){null!=window.console&&console.log("Error in configure message: "+l,c.data)}};mxEvent.addListener(window,"message",P);N.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",-window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(c){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(c.stack)):console.error(c)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var I=localStorage.getItem(Editor.configurationKey);if(null!=I)try{I=JSON.parse(I),null!=I&&(EditorUi.debug("Using local configuration",I),Editor.configure(I),mxSettings.load())}catch(c){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(c.stack)):-console.error(c)}}}m()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(c){document.body.innerHTML="",K=document.createElement("pre"),mxUtils.write(K,c.stack),document.body.appendChild(K)}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;+typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(C);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,C,(new Date).getTime()-t0.getTime()+"ms"]),null!=+urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(E){EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(E.stack)):(EditorUi.logError(E.message,null,null,null,E),window.setTimeout(function(){alert(E.message)},1))}}mxResources.parse(f[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var n=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=n){EditorUi.debug("Setting configuration",+JSON.stringify(n));if(null!=n.merge){var t=localStorage.getItem(Editor.configurationKey);if(null!=t)try{var z=JSON.parse(t),F;for(F in n.merge)z[F]=n.merge[F];n=z}catch(C){window.location.hash="",alert(C)}else n=n.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(n)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(C){window.location.hash="",alert(C)}1<f.length&&+(Graph.prototype.defaultThemes["default-style2"]=f[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=f[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?p():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],p,function(C){document.body.innerHTML="";var E=document.createElement("pre");mxUtils.write(E,C.stack);document.body.appendChild(E)}))},function(f){f=document.getElementById("geStatus");null!=f&&+(f.innerHTML="Error loading page. <a>Please try refreshing.</a>",f.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';+else if(App.isMainCalled=!0,window.onerror=function(e,f,p,n,t){EditorUi.logError("Global: "+(null!=e?e:""),f,p,n,t,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",e,"\nURL:",f,"\nLine:",p,"\nColumn:",n,"\nError:",t)):console.error("Message:",e,"\nURL:",f,"\nLine:",p,"\nColumn:",n,"\nError:",t);window.setTimeout(function(){alert("Error: "+(null!=e?e:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&+"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var q=document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){var y=document.getElementById("geBootstrap");+if(null!=y){var x=mxUtils.getTextContent(y);"ff68e9badc5b6bcb8f482e0c64b103a7"!=CryptoJS.MD5(x).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}var D=document.getElementById("geMain");null!=D&&(x=mxUtils.getTextContent(D),"69c25556b6237c57cdb7d017147af34b"!=CryptoJS.MD5(x).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&+("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(e){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||+"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var J=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var K=JSON.parse(localStorage.getItem(mxSettings.key));null!=K&&(J=K.plugins)}catch(e){}K=urlParams.p;App.initPluginCallback();null!=K&&App.loadPlugins(K.split(";"));if(null!=J&&0<+J.length&&"0"!=urlParams.plugins)for(q=0;q<J.length;q++)try{("/"==J[q].charAt(0)&&(J[q]=PLUGINS_BASE_PATH+J[q]),App.isSameDomain(J[q]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(J[q])?null==App.pluginsLoaded[J[q]]&&(App.pluginsLoaded[J[q]]=!0,App.embedModePluginsCount++,mxscript(J[q])):null!=window.console&&console.log("Unknown plugin:",J[q]):null!=window.console&&console.log("Blocked plugin:",J[q])}catch(e){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&+"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var L=window.opener||window.parent,N=function(e){if(e.source==L)try{var f=JSON.parse(e.data);null!=f&&"configure"==+f.action&&(mxEvent.removeListener(window,"message",N),Editor.configure(f.config),mxSettings.load(),null!=f.config.darkColor&&document.body.style.setProperty("--dark-color",f.config.darkColor),f.colorSchemeMeta&&mxmeta("color-scheme","dark light"),l())}catch(p){null!=window.console&&console.log("Error in configure message: "+p,e.data)}};mxEvent.addListener(window,"message",N);L.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",+window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(e){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(e.stack)):console.error(e)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var c=localStorage.getItem(Editor.configurationKey);if(null!=c)try{c=JSON.parse(c),null!=c&&(EditorUi.debug("Using local configuration",c),Editor.configure(c),mxSettings.load())}catch(e){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(e.stack)):+console.error(e)}}}l()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(e){document.body.innerHTML="",J=document.createElement("pre"),mxUtils.write(J,e.stack),document.body.appendChild(J)}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;-App.loadPlugins=function(b,f){EditorUi.debug("Loading plugins",b);for(var m=0;m<b.length;m++)if(null!=b[m]&&0<b[m].length)try{if(null!=App.pluginRegistry[b[m]]){var d=PLUGINS_BASE_PATH+App.pluginRegistry[b[m]];null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?f?mxinclude(d):mxscript(d):f?mxinclude(d):mxscript(drawDevUrl+d))}else null!=window.console&&console.log("Unknown plugin:",b[m])}catch(t){null!=window.console&&console.log("Error loading plugin:",-b[m],t)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};+App.loadPlugins=function(b,g){EditorUi.debug("Loading plugins",b);for(var l=0;l<b.length;l++)if(null!=b[l]&&0<b[l].length)try{if(null!=App.pluginRegistry[b[l]]){var d=PLUGINS_BASE_PATH+App.pluginRegistry[b[l]];null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?g?mxinclude(d):mxscript(d):g?mxinclude(d):mxscript(drawDevUrl+d))}else null!=window.console&&console.log("Unknown plugin:",b[l])}catch(q){null!=window.console&&console.log("Error loading plugin:",+b[l],q)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};App.prototype.init=function(){if(!App.blockedAncestorFrames()){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.toggleCompactMode(!0)}));try{this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this),null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}))}catch(y){null!=window.console&&console.log("GitHubClient disabled: "+y.message)}try{this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this),null!=this.gitLab&&this.gitLab.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}))}catch(y){null!=window.console&&console.log("GitLabClient disabled: "+y.message)}if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){if("undefined"!==typeof OneDrive)try{this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded",-"client",this.oneDrive))}catch(y){null!=window.console&&console.log("OneDriveClient disabled: "+y.message)}else null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var f=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded",-"client",this.trello))}catch(y){null!=window.console&&console.log("TrelloClient disabled: "+y.message)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var m=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var y=mxUtils.bind(this,function(){try{this.drive=new DriveClient(this),this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()})),-this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))}catch(x){null!=window.console&&console.log("DriveClient disabled: "+x.message)}});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,y),window.DrawGapiClientCallback=null):y()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=m)});m()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){if("function"===typeof Dropbox){window.DrawDropboxClientCallback=+"client",this.oneDrive))}catch(y){null!=window.console&&console.log("OneDriveClient disabled: "+y.message)}else null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var g=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded",+"client",this.trello))}catch(y){null!=window.console&&console.log("TrelloClient disabled: "+y.message)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=g)});g()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var l=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var y=mxUtils.bind(this,function(){try{this.drive=new DriveClient(this),this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()})),+this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))}catch(x){null!=window.console&&console.log("DriveClient disabled: "+x.message)}});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,y),window.DrawGapiClientCallback=null):y()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=l)});l()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){if("function"===typeof Dropbox){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(y){null!=window.console&&console.log("DropboxClient disabled: "+y.message)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=d)});d()}if("1"!=urlParams.embed){if(this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(y){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){y.prompt()})})),!this.isOwnDomain()||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var y=this.getCurrentFile();y=null!=y?y.getMode():null;mxClient.IS_CHROMEAPP||mxClient.IS_ANDROID||mxClient.IS_IOS||EditorUi.isElectronApp||this.isOffline()||null!=urlParams.open||"1"==urlParams.extAuth||y!=App.MODE_DEVICE&&y!=App.MODE_BROWSER||this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||!Editor.enableRealtimeCache||this.editor.chromeless&&-!this.editor.editable)){var t=window.setTimeout(mxUtils.bind(this,function(){Editor.enableRealtimeCache=!1}),Editor.cacheTimeout);mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(y){Editor.enableRealtimeCache=200<=y.getStatus()&&299>=y.getStatus();window.clearTimeout(t)}),function(){Editor.enableRealtimeCache=!1;window.clearTimeout(t)})}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=this.createButtonContainer(),+!this.editor.editable)){var q=window.setTimeout(mxUtils.bind(this,function(){Editor.enableRealtimeCache=!1}),Editor.cacheTimeout);mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(y){Editor.enableRealtimeCache=200<=y.getStatus()&&299>=y.getStatus();window.clearTimeout(q)}),function(){Editor.enableRealtimeCache=!1;window.clearTimeout(q)})}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=this.createButtonContainer(),this.menubar.container.appendChild(this.buttonContainer),"atlas"==Editor.currentTheme&&this.toggleCompactMode(!1),"atlas"==Editor.currentTheme||"1"==urlParams.atlas)&&(this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="1"==urlParams.atlas?"7px":"6px","1"!=urlParams.embed&&(this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(y){this.appIconClicked(y)}))),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild));this.editor.graph.isViewer()&&this.initializeViewerMode()}};-App.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&b.substring(0,b.length-1);b="";for(var f=0;f<window.location.ancestorOrigins.length;f++)if(b+=" -> "+window.location.ancestorOrigins[f],b.endsWith("dan6v7pm1f1a1.cloudfront.net")||b.endsWith("confluence-cloud-excalidraw-ll3likebca-uc.a.run.app"))return!0}}catch(m){}return!1};+App.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&b.substring(0,b.length-1);b="";for(var g=0;g<window.location.ancestorOrigins.length;g++)if(b+=" -> "+window.location.ancestorOrigins[g],b.endsWith("dan6v7pm1f1a1.cloudfront.net")||b.endsWith("confluence-cloud-excalidraw-ll3likebca-uc.a.run.app"))return!0}}catch(l){}return!1};App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};-App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){b.getHash();b.savingFile&&null!=b.savingFileTime&&(Date.now(),b.savingFileTime.getTime());null!=b.ageStart&&(Date.now(),b.ageStart.getTime());b.isAutosave();null!=b.opened&&(Date.now(),b.opened.getTime());null!=b.lastSaved&&(Date.now(),b.lastSaved.getTime());null!=b.lastChanged&&(Date.now(),b.lastChanged.getTime());Date.now();App.startTime.getTime();var f=null!=b.sync?"client_"+-b.sync.clientId:"nosync";b.constructor==DriveFile&&null!=b.desc&&null!=this.drive&&(f+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType);f=mxResources.get("ensureDataSaved");null!=b.lastSaved&&(f=this.timeSince(b.lastSaved),null==f&&(f=mxResources.get("lessThanAMinute")),f=mxResources.get("lastSaved",[f]));this.spinner.stop();this.showError(mxResources.get("unsavedChanges"),f,mxResources.get("ignore"),+App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){b.getHash();b.savingFile&&null!=b.savingFileTime&&(Date.now(),b.savingFileTime.getTime());null!=b.ageStart&&(Date.now(),b.ageStart.getTime());b.isAutosave();null!=b.opened&&(Date.now(),b.opened.getTime());null!=b.lastSaved&&(Date.now(),b.lastSaved.getTime());null!=b.lastChanged&&(Date.now(),b.lastChanged.getTime());Date.now();App.startTime.getTime();var g=null!=b.sync?"client_"++b.sync.clientId:"nosync";b.constructor==DriveFile&&null!=b.desc&&null!=this.drive&&(g+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType);g=mxResources.get("ensureDataSaved");null!=b.lastSaved&&(g=this.timeSince(b.lastSaved),null==g&&(g=mxResources.get("lessThanAMinute")),g=mxResources.get("lastSaved",[g]));this.spinner.stop();this.showError(mxResources.get("unsavedChanges"),g,mxResources.get("ignore"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("save"),mxUtils.bind(this,function(){this.stopSanityCheck();this.actions.get(null!=this.mode&&b.isEditable()?"save":"saveAs").funct()}),null,null,360,140,null,mxUtils.bind(this,function(){this.scheduleSanityCheck()}))}};App.prototype.isOwnDomain=function(){return"test.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"preprod.diagrams.net"==window.location.hostname||"app.diagrams.net"==window.location.hostname};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&this.isOwnDomain()};App.prototype.getPusher=function(){null==this.pusher&&"function"===typeof window.Pusher&&(this.pusher=new Pusher(App.PUSHER_KEY,{cluster:App.PUSHER_CLUSTER,encrypted:!0}));return this.pusher};App.prototype.showNameConfBanner=function(){this.showBanner("ConfFooter","Try draw.io for Confluence",mxUtils.bind(this,function(){this.openLink("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence")}),!0)};App.prototype.showDownloadDesktopBanner=function(){this.showBanner("DesktopFooter",mxResources.get("downloadDesktop"),mxUtils.bind(this,function(){this.openLink("https://get.diagrams.net/")}))};App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBannerratingFooter||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeratingFooter)){var b=document.createElement("div");b.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(b.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(b.style,-"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get("close"));f.setAttribute("border","0");f.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(f);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var m=document.createElement("img");-m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.setAttribute("title","1 star");m.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");m.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");-b.appendChild(m);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.setAttribute("title","2 star");d.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");d.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");-b.appendChild(d);var t=document.createElement("img");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.setAttribute("title","3 star");t.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");t.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");-b.appendChild(t);var y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.setAttribute("title","4 star");y.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");y.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");-b.appendChild(y);this.bannerShowing=!0;var x=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(C){mxEvent.consume(C);x()}));mxEvent.addListener(m,"click",mxUtils.bind(this,function(C){mxEvent.consume(C);x()}));mxEvent.addListener(d,"click",mxUtils.bind(this,-function(C){mxEvent.consume(C);x()}));mxEvent.addListener(t,"click",mxUtils.bind(this,function(C){mxEvent.consume(C);x()}));mxEvent.addListener(y,"click",mxUtils.bind(this,function(C){mxEvent.consume(C);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");x()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){x()}),1E3)});window.setTimeout(mxUtils.bind(this,-function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(f,6E4)}};-App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var m=f.lastIndexOf("@"),d=0<=m?f.substring(m+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(t){try{if(200<=t.getStatus()&&299>=t.getStatus()){var y=t.getText();if(0<y.length){var x=JSON.parse(y);null!=x&&this.handleLicense(x,-d)}}}catch(C){}}))}};App.prototype.handleLicense=function(b,f){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};-App.prototype.addRecent=function(b,f,m){if(isLocalStorage&&null!=localStorage){f=null!=f?f:"";var d=this.getRecent(f);if(null==d)d=[];else for(var t=0;t<d.length;t++)d[t].mode==b.mode&&d[t].id==b.id&&d.splice(t,1);null!=d&&(m=null!=m?m:10,d.unshift(b),d=d.slice(0,m),localStorage.setItem(".recent"+f,JSON.stringify(d)))}};App.prototype.getRecent=function(b){if(isLocalStorage&&null!=localStorage){try{var f=localStorage.getItem(".recent"+(null!=b?b:""));if(null!=f)return JSON.parse(f)}catch(m){}return null}};-App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(f){}};+"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var g=document.createElement("img");g.setAttribute("src",Dialog.prototype.closeImage);g.setAttribute("title",mxResources.get("close"));g.setAttribute("border","0");g.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(g);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var l=document.createElement("img");+l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.setAttribute("title","1 star");l.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");l.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");+b.appendChild(l);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.setAttribute("title","2 star");d.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");d.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");+b.appendChild(d);var q=document.createElement("img");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.setAttribute("title","3 star");q.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");q.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");+b.appendChild(q);var y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.setAttribute("title","4 star");y.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");y.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");+b.appendChild(y);this.bannerShowing=!0;var x=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(g,"click",mxUtils.bind(this,function(D){mxEvent.consume(D);x()}));mxEvent.addListener(l,"click",mxUtils.bind(this,function(D){mxEvent.consume(D);x()}));mxEvent.addListener(d,"click",mxUtils.bind(this,+function(D){mxEvent.consume(D);x()}));mxEvent.addListener(q,"click",mxUtils.bind(this,function(D){mxEvent.consume(D);x()}));mxEvent.addListener(y,"click",mxUtils.bind(this,function(D){mxEvent.consume(D);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");x()}));g=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){x()}),1E3)});window.setTimeout(mxUtils.bind(this,+function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(g,6E4)}};+App.prototype.checkLicense=function(){var b=this.drive.getUser(),g=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=g&&null!=b.id){var l=g.lastIndexOf("@"),d=0<=l?g.substring(l+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(q){try{if(200<=q.getStatus()&&299>=q.getStatus()){var y=q.getText();if(0<y.length){var x=JSON.parse(y);null!=x&&this.handleLicense(x,+d)}}}catch(D){}}))}};App.prototype.handleLicense=function(b,g){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};+App.prototype.addRecent=function(b,g,l){if(isLocalStorage&&null!=localStorage){g=null!=g?g:"";var d=this.getRecent(g);if(null==d)d=[];else for(var q=0;q<d.length;q++)d[q].mode==b.mode&&d[q].id==b.id&&d.splice(q,1);null!=d&&(l=null!=l?l:10,d.unshift(b),d=d.slice(0,l),localStorage.setItem(".recent"+g,JSON.stringify(d)))}};App.prototype.getRecent=function(b){if(isLocalStorage&&null!=localStorage){try{var g=localStorage.getItem(".recent"+(null!=b?b:""));if(null!=g)return JSON.parse(g)}catch(l){}return null}};+App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(g){}};App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return this.logIfModified(b),mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};-App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,f=this.getCurrentFile();null==f||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=f&&(b=(null!=f.getTitle()?f.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};-App.prototype.getThumbnail=function(b,f,m){m=null!=m?m:0;var d=!1;try{var t=!0,y=window.setTimeout(mxUtils.bind(this,function(){t=!1;f(null)}),this.timeout),x=mxUtils.bind(this,function(O){window.clearTimeout(y);t&&f(O)});null==this.thumbImageCache&&(this.thumbImageCache={});var C=this.editor.graph,K=C.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var M=C.getGlobalVariable;C=this.createTemporaryGraph(C.getStylesheet());C.setBackgroundImage=this.editor.graph.setBackgroundImage;-var N=this.pages[0];this.currentPage==N?C.setBackgroundImage(K):null!=N.viewState&&null!=N.viewState&&(K=N.viewState.backgroundImage,C.setBackgroundImage(K));C.getGlobalVariable=function(O){return"page"==O?N.getName():"pagenumber"==O?1:M.apply(this,arguments)};C.getGlobalVariable=M;document.body.appendChild(C.container);C.model.setRoot(N.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(O){try{C!=this.editor.graph&&null!=C.container.parentNode&&-C.container.parentNode.removeChild(C.container)}catch(S){O=null}x(O)}),b,this.thumbImageCache,"#ffffff",function(){x()},null,null,null,null,null,null,C,m,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var P=document.createElement("canvas"),I=C.getGraphBounds(),c=C.view.translate,e=C.view.scale;null!=K&&(I=mxRectangle.fromRectangle(I),I.add(new mxRectangle((c.x+K.x)*e,(c.y+K.y)*e,K.width*e,K.height*e)));var l=b/I.width;l=Math.min(1,Math.min(3*b/(4*I.height),-l));var n=Math.floor(I.x),p=Math.floor(I.y);P.setAttribute("width",Math.ceil(l*(I.width+4)));P.setAttribute("height",Math.ceil(l*(I.height+4)));var u=P.getContext("2d");u.scale(l,l);u.translate(-n,-p);var B=C.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";u.save();u.fillStyle=B;u.fillRect(n,p,Math.ceil(I.width+4),Math.ceil(I.height+4));u.restore();if(null!=K){var D=new Image;D.src=K.src;u.drawImage(D,K.x*l,K.y*l,K.width*l,K.height*l)}var G=new mxJsCanvas(P),E=new mxAsyncCanvas(this.thumbImageCache);-G.images=this.thumbImageCache.images;var T=new mxImageExport;T.drawShape=function(O,S){O.shape instanceof mxShape&&O.shape.checkBounds()&&(S.save(),S.translate(.5,.5),O.shape.paint(S),S.translate(-.5,-.5),S.restore())};T.drawText=function(O,S){};T.drawState(C.getView().getState(C.model.root),E);E.finish(mxUtils.bind(this,function(){try{T.drawState(C.getView().getState(C.model.root),G),C!=this.editor.graph&&null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}catch(O){P=null}x(P)}));-d=!0}}catch(O){d=!1,null!=C&&C!=this.editor.graph&&null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}d||window.clearTimeout(y);return d};-(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(f,m){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();f=null!=d?d.getMode():f;f==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):f==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),-this.appIcon.style.cursor="pointer"):f==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=f==App.MODE_DEVICE?"pointer":"default")}if(m)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var t=new Date;t.setYear(t.getFullYear()+1);document.cookie="MODE="+f+"; expires="+t.toUTCString()}}catch(y){}}})();-App.prototype.appIconClicked=function(b){var f=this.getCurrentFile(),m=null!=f?f.getMode():null;f=null!=f?mxEvent.isAltDown(b)?f.getFolderUrl():f.getFileUrl():null;null!=f?this.openLink(f):m==App.MODE_GOOGLE?this.openLink("https://drive.google.com/?authuser=0"):m==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):m==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):m==App.MODE_GITHUB?this.openLink("https://github.com/"):m==App.MODE_GITLAB?this.openLink(DRAWIO_GITLAB_URL):m==App.MODE_TRELLO?-this.openLink("https://trello.com/"):m==App.MODE_DEVICE?this.openLink("https://get.draw.io/"):this.openLink("https://www.drawio.com/");mxEvent.consume(b)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};-App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var f=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(f.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(m,d,t){this.spinner.stop();null==d&&(d=urlParams.title,t=!0,d=null!=d?decodeURIComponent(d):this.defaultFilename);0<(this.useCanvasForExport?--1:".png"==d.substring(d.length-4))&&(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,m,d):new LocalFile(this,m,d,t))}))}}catch(m){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};+App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,g=this.getCurrentFile();null==g||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=g&&(b=(null!=g.getTitle()?g.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};+App.prototype.getThumbnail=function(b,g,l){l=null!=l?l:0;var d=!1;try{var q=!0,y=window.setTimeout(mxUtils.bind(this,function(){q=!1;g(null)}),this.timeout),x=mxUtils.bind(this,function(O){window.clearTimeout(y);q&&g(O)});null==this.thumbImageCache&&(this.thumbImageCache={});var D=this.editor.graph,J=D.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var K=D.getGlobalVariable;D=this.createTemporaryGraph(D.getStylesheet());D.setBackgroundImage=this.editor.graph.setBackgroundImage;+var L=this.pages[0];this.currentPage==L?D.setBackgroundImage(J):null!=L.viewState&&null!=L.viewState&&(J=L.viewState.backgroundImage,D.setBackgroundImage(J));D.getGlobalVariable=function(O){return"page"==O?L.getName():"pagenumber"==O?1:K.apply(this,arguments)};D.getGlobalVariable=K;document.body.appendChild(D.container);D.model.setRoot(L.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(O){try{D!=this.editor.graph&&null!=D.container.parentNode&&+D.container.parentNode.removeChild(D.container)}catch(Q){O=null}x(O)}),b,this.thumbImageCache,"#ffffff",function(){x()},null,null,null,null,null,null,D,l,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var N=document.createElement("canvas"),c=D.getGraphBounds(),e=D.view.translate,f=D.view.scale;null!=J&&(c=mxRectangle.fromRectangle(c),c.add(new mxRectangle((e.x+J.x)*f,(e.y+J.y)*f,J.width*f,J.height*f)));var p=b/c.width;p=Math.min(1,Math.min(3*b/(4*c.height),+p));var n=Math.floor(c.x),t=Math.floor(c.y);N.setAttribute("width",Math.ceil(p*(c.width+4)));N.setAttribute("height",Math.ceil(p*(c.height+4)));var z=N.getContext("2d");z.scale(p,p);z.translate(-n,-t);var F=D.background;if(null==F||""==F||F==mxConstants.NONE)F="#ffffff";z.save();z.fillStyle=F;z.fillRect(n,t,Math.ceil(c.width+4),Math.ceil(c.height+4));z.restore();if(null!=J){var C=new Image;C.src=J.src;z.drawImage(C,J.x*p,J.y*p,J.width*p,J.height*p)}var E=new mxJsCanvas(N),R=new mxAsyncCanvas(this.thumbImageCache);+E.images=this.thumbImageCache.images;var U=new mxImageExport;U.drawShape=function(O,Q){O.shape instanceof mxShape&&O.shape.checkBounds()&&(Q.save(),Q.translate(.5,.5),O.shape.paint(Q),Q.translate(-.5,-.5),Q.restore())};U.drawText=function(O,Q){};U.drawState(D.getView().getState(D.model.root),R);R.finish(mxUtils.bind(this,function(){try{U.drawState(D.getView().getState(D.model.root),E),D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(O){N=null}x(N)}));+d=!0}}catch(O){d=!1,null!=D&&D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}d||window.clearTimeout(y);return d};+(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(g,l){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();g=null!=d?d.getMode():g;g==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):g==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),+this.appIcon.style.cursor="pointer"):g==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=g==App.MODE_DEVICE?"pointer":"default")}if(l)try{if(isLocalStorage)localStorage.setItem(".mode",g);else if("undefined"!=typeof Storage){var q=new Date;q.setYear(q.getFullYear()+1);document.cookie="MODE="+g+"; expires="+q.toUTCString()}}catch(y){}}})();+App.prototype.appIconClicked=function(b){var g=this.getCurrentFile(),l=null!=g?g.getMode():null;g=null!=g?mxEvent.isAltDown(b)?g.getFolderUrl():g.getFileUrl():null;null!=g?this.openLink(g):l==App.MODE_GOOGLE?this.openLink("https://drive.google.com/?authuser=0"):l==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):l==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):l==App.MODE_GITHUB?this.openLink("https://github.com/"):l==App.MODE_GITLAB?this.openLink(DRAWIO_GITLAB_URL):l==App.MODE_TRELLO?+this.openLink("https://trello.com/"):l==App.MODE_DEVICE?this.openLink("https://get.draw.io/"):this.openLink("https://www.drawio.com/");mxEvent.consume(b)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};+App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var g=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(g.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(l,d,q){this.spinner.stop();null==d&&(d=urlParams.title,q=!0,d=null!=d?decodeURIComponent(d):this.defaultFilename);0<(this.useCanvasForExport?+-1:".png"==d.substring(d.length-4))&&(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,l,d):new LocalFile(this,l,d,q))}))}}catch(l){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};App.prototype.load=function(){try{if("1"!=urlParams.embed)try{if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(b){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash="G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}catch(b){this.handleError(b)}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})}catch(b){EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(b.stack)):(EditorUi.logError(b.message,null,null,null,b),alert(b.message))}};-App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),f||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var m=this.getCurrentFile();null!=m&&m.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&+App.prototype.showRefreshDialog=function(b,g){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),g||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var l=this.getCurrentFile();null!=l&&l.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&(b=this.createRealtimeNotice(),b.style.left="0",b.style.right="0",b.style.borderRadius="0",b.style.borderLeftStyle="none",b.style.borderRightStyle="none",b.style.marginBottom="26px",b.style.padding="8px 0 8px 0",this.dialog.container.appendChild(b)))};-App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var f=document.createElement("div");f.className="geAlert";f.style.zIndex=2E9;f.style.left="50%";f.style.top="-100%";f.style.maxWidth="80%";f.style.width="max-content";f.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";-b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");f.appendChild(b);mxEvent.addListener(b,"click",function(m){null!=f.parentNode&&(f.parentNode.removeChild(f),mxEvent.consume(m))});document.body.appendChild(f);window.setTimeout(function(){f.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(f.style,"transition","all 2s ease");f.style.opacity="0";window.setTimeout(function(){null!=f.parentNode&&f.parentNode.removeChild(f)},+App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var g=document.createElement("div");g.className="geAlert";g.style.zIndex=2E9;g.style.left="50%";g.style.top="-100%";g.style.maxWidth="80%";g.style.width="max-content";g.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(g.style,"transition","all 1s ease");g.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";+b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");g.appendChild(b);mxEvent.addListener(b,"click",function(l){null!=g.parentNode&&(g.parentNode.removeChild(g),mxEvent.consume(l))});document.body.appendChild(g);window.setTimeout(function(){g.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(g.style,"transition","all 2s ease");g.style.opacity="0";window.setTimeout(function(){null!=g.parentNode&&g.parentNode.removeChild(g)},2E3)},15E3)}};-App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(x,C,K,M,N){"ResizeObserver loop limit exceeded"!=x&&(EditorUi.logError("Uncaught: "+(null!=x?x:""),C,K,M,N,null,!0),b.handleError({message:x},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(x){var C=this.getCurrentFile();EditorUi.debug("storage event",[x],-[C]);null!=C&&".draft-alive-check"==x.key&&null!=x.newValue&&null!=C.draftId&&(this.draftAliveCheck=x.newValue,C.saveDraft())}))}catch(x){}var f=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(x){try{var C=this.getDiagramId();if(C!=f){f=C;var K=this.getCurrentFile();null!=K&&K.getHash()==C||this.loadFile(C,!0)}else{var M=this.getHashObject();if(null!=M&&null!=M.pageId&&null!=this.currentPage&&M.pageId!=this.currentPage.getId()){var N=this.getPageById(M.pageId);-null!=N&&this.selectPage(N)}}}catch(P){null!=document.body&&this.handleError(P,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var I=this.getCurrentFile();window.location.hash=null!=I?I.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"))}))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else if((null==-window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var m=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var x=mxUtils.bind(this,function(M){Editor.isPngDataUrl(M)&&(M=Editor.extractGraphModelFromPng(M));var N=urlParams.title;N=null!=N?decodeURIComponent(N):this.defaultFilename;M=new LocalFile(this,-M,N,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(M.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(M);this.editor.chromeless||(M.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),C=window.opener||window.parent;if(C!=window){var K=urlParams.create;null!=K?x(C[decodeURIComponent(K)]):(K=urlParams.data,null!=K?x(decodeURIComponent(K)):this.installMessageHandler(mxUtils.bind(this,function(M,-N){N.source==C&&x(M)})))}}else if(null==this.dialog)if("1"==urlParams.demo)K=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=K;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),this.actions.get("insertTemplate").funct();else{K=!1;try{K=null!=window.opener&&null!=window.opener.openFile}catch(M){}K?this.spinner.spin(document.body,mxResources.get("loading")):(K=this.getDiagramId(),-!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=K&&0!=K.length||this.editor.isChromelessView()?null!=K&&0<K.length?this.loadFile(K,null,null,mxUtils.bind(this,function(){var M=decodeURIComponent(urlParams.viewbox||"");if(""!=M)try{var N=JSON.parse(M);this.editor.graph.fitWindow(N,N.border)}catch(P){console.error(P)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,-null,null,null,null,!0):this.checkDrafts())}}),d=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&0<d.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var t=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),y=mxUtils.bind(this,function(x){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,-x,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var C=urlParams.title;C=null!=C?decodeURIComponent(C):this.defaultFilename;x=this.getServiceCount(!0);isLocalStorage&&x++;var K=4>=x?2:6<x?4:3;C=new CreateDialog(this,C,mxUtils.bind(this,function(M,N){if(null==N){this.hideDialog();var P=Editor.useLocalStorage;this.createFile(0<M.length?M:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=P}else this.pickFolder(N,mxUtils.bind(this,function(I){this.createFile(M,-this.getFileData(!0),null,N,null,!0,I)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,K,null,null,null,this.editor.fileExtensions);this.showDialog(C.container,420,x>K?390:280,!0,!1,mxUtils.bind(this,function(M){M&&null==this.getCurrentFile()&&this.showSplash()}));C.init()}});if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))if("{"==d.charAt(0))this.spinner.stop(),d=JSON.parse(d),window.isMermaidEnabled&&"mermaid"==d.type?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(x){x!=-this.emptyDiagramXml&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"])),this.createFile(null!=x.filename?x.filename:this.defaultFilename,x,null,null,null,!0,null,!0),this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct())})),this.generateMermaidImage(d.data,null,function(){},mxUtils.bind(this,function(x){for(var C=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),K=0;K<C.length;K++)C[K].parentNode.removeChild(C[K]);mxMermaidToDrawio.resetListeners();-this.handleError(x)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"));else try{null!=window.opener&&null!=window.opener[d]?y(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(x){y(x)},mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"),t)}))}else(null==window.location.hash||1>=+App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(x,D,J,K,L){"ResizeObserver loop limit exceeded"!=x&&(EditorUi.logError("Uncaught: "+(null!=x?x:""),D,J,K,L,null,!0),b.handleError({message:x},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(x){var D=this.getCurrentFile();EditorUi.debug("storage event",[x],+[D]);null!=D&&".draft-alive-check"==x.key&&null!=x.newValue&&null!=D.draftId&&(this.draftAliveCheck=x.newValue,D.saveDraft())}))}catch(x){}var g=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(x){try{var D=this.getDiagramId();if(D!=g){g=D;var J=this.getCurrentFile();null!=J&&J.getHash()==D||this.loadFile(D,!0)}else{var K=this.getHashObject();if(null!=K&&null!=K.pageId&&null!=this.currentPage&&K.pageId!=this.currentPage.getId()){var L=this.getPageById(K.pageId);+null!=L&&this.selectPage(L)}}}catch(N){null!=document.body&&this.handleError(N,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var c=this.getCurrentFile();window.location.hash=null!=c?c.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"))}))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else if((null==+window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var l=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var x=mxUtils.bind(this,function(K){Editor.isPngDataUrl(K)&&(K=Editor.extractGraphModelFromPng(K));var L=urlParams.title;L=null!=L?decodeURIComponent(L):this.defaultFilename;K=new LocalFile(this,+K,L,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(K.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(K);this.editor.chromeless||(K.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),D=window.opener||window.parent;if(D!=window){var J=urlParams.create;null!=J?x(D[decodeURIComponent(J)]):(J=urlParams.data,null!=J?x(decodeURIComponent(J)):this.installMessageHandler(mxUtils.bind(this,function(K,+L){L.source==D&&x(K)})))}}else if(null==this.dialog)if("1"==urlParams.demo)J=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=J;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),this.actions.get("insertTemplate").funct();else{J=!1;try{J=null!=window.opener&&null!=window.opener.openFile}catch(K){}J?this.spinner.spin(document.body,mxResources.get("loading")):(J=this.getDiagramId(),+!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=J&&0!=J.length||this.editor.isChromelessView()?null!=J&&0<J.length?this.loadFile(J,null,null,mxUtils.bind(this,function(){var K=decodeURIComponent(urlParams.viewbox||"");if(""!=K)try{var L=JSON.parse(K);this.editor.graph.fitWindow(L,L.border)}catch(N){console.error(N)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,+null,null,null,null,!0):this.checkDrafts())}}),d=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&0<d.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var q=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),y=mxUtils.bind(this,function(x){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,+x,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var D=urlParams.title;D=null!=D?decodeURIComponent(D):this.defaultFilename;x=this.getServiceCount(!0);isLocalStorage&&x++;var J=4>=x?2:6<x?4:3;D=new CreateDialog(this,D,mxUtils.bind(this,function(K,L){if(null==L){this.hideDialog();var N=Editor.useLocalStorage;this.createFile(0<K.length?K:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=N}else this.pickFolder(L,mxUtils.bind(this,function(c){this.createFile(K,+this.getFileData(!0),null,L,null,!0,c)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,J,null,null,null,this.editor.fileExtensions);this.showDialog(D.container,420,x>J?390:280,!0,!1,mxUtils.bind(this,function(K){K&&null==this.getCurrentFile()&&this.showSplash()}));D.init()}});if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))if("{"==d.charAt(0))this.spinner.stop(),d=JSON.parse(d),window.isMermaidEnabled&&"mermaid"==d.type?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(x){x!=+this.emptyDiagramXml&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"])),this.createFile(null!=x.filename?x.filename:this.defaultFilename,x,null,null,null,!0,null,!0),this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct())})),this.generateMermaidImage(d.data,null,function(){},mxUtils.bind(this,function(x){for(var D=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),J=0;J<D.length;J++)D[J].parentNode.removeChild(D[J]);mxMermaidToDrawio.resetListeners();+this.handleError(x)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"));else try{null!=window.opener&&null!=window.opener[d]?y(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(x){y(x)},mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"),q)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,-null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),m())}}catch(x){this.handleError(x)}};-App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var m=this.getCurrentFile();null!=m&&(m.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};-App.prototype.filterDrafts=function(b,f,m){function d(){m(t)}var t=[];try{this.getDatabaseItems(mxUtils.bind(this,function(y){EditorUi.debug("App.filterDrafts",[this],"items",y);for(var x=0;x<y.length;x++)try{var C=y[x].key;if(null!=C&&".draft_"==C.substring(0,7)){var K=JSON.parse(y[x].data);null!=K&&"draft"==K.type&&K.aliveCheck!=f&&(null==b&&null==K.fileObject||null!=K.fileObject&&K.fileObject.path==b)&&(K.key=C,t.push(K))}}catch(M){}d()}),d)}catch(y){d()}};-App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(f){if(1==f.length)this.loadDraft(f[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[0].key)}));else if(1<f.length){var m=new Date(f[0].modified);m=new DraftDialog(this,1<f.length?mxResources.get("selectDraft"):mxResources.get("draftFound",-[m.toLocaleDateString()+" "+m.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d?d:0;this.loadDraft(f[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key)}))}),mxUtils.bind(this,function(d,t){this.removeDatabaseItem(f[""!=d?d:0].key);null!=t&&t()}),null,null,null,1<f.length?f:null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(d){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,-this.getFileData(),null,null,null,null,null,!0)}));m.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(f){}};-App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var f=this.getServiceCount(!0),m=mxUtils.bind(this,function(){var t=new SplashDialog(this);this.showDialog(t.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(y,x){!y&&!x||mxClient.IS_CHROMEAPP||(y=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=y)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&m();else{b=4==f?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();m()}),b);this.showDialog(d.container,3>b?200:300,3<f?320:210,!0,!1)}}};-App.prototype.addLanguageMenu=function(b,f,m){var d=null;null!=this.menus.get("language")&&(d=document.createElement("div"),d.setAttribute("title",mxResources.get("language")),d.className="geIcon geAdaptiveAsset",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="right center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="19px 19px",d.style.width="19px",d.style.height="19px",mxUtils.setOpacity(d,40),d.style.position="absolute",d.style.cursor="pointer",-d.style.bottom="20px",d.style.right=null!=m?m:"22px",f&&(d.style.direction="rtl",d.style.textAlign="right",d.style.right=null!=m?m:"24px",f=document.createElement("span"),f.style.display="inline-block",f.style.fontSize="12px",f.style.margin="2px 24px 0 0",f.style.userSelect="none",mxUtils.write(f,mxResources.get("language")),d.appendChild(f),f.className="geAdaptiveAsset"),mxEvent.addListener(d,"click",mxUtils.bind(this,function(t){this.editor.graph.popupMenuHandler.hideMenu();var y=new mxPopupMenu(this.menus.get("language").funct);-y.div.className+=" geMenubarMenu";y.smartSeparators=!0;y.showDisabled=!0;y.autoExpand=!0;y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(y,arguments);y.destroy()});var x=mxUtils.getOffset(d);y.popup(x.x,x.y+d.offsetHeight,null,t);this.setCurrentMenu(y)})),b.appendChild(d));return d};-App.prototype.loadFileSystemEntry=function(b,f,m){m=null!=m?m:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var t=new FileReader;t.onload=mxUtils.bind(this,function(y){var x=mxUtils.bind(this,function(C){try{if(null!=f){var K=y.target.result;"image/png"==d.type&&(K=this.extractGraphModelFromPng(K));f(new LocalFile(this,K,d.name,null,b,d,C))}else this.openFileHandle(y.target.result,d.name,d,!1,b,C)}catch(M){m(M)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,-function(C){x("denied"!==C)})):b.createWritable().then(mxUtils.bind(this,function(){x(!0)}),mxUtils.bind(this,function(C){x(!1)}))});t.onerror=m;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||"image/svg"===d.type.substring(0,9)?t.readAsText(d):t.readAsDataURL(d)}),m)}catch(d){m(d)}};-App.prototype.createFileSystemOptions=function(b){var f=[],m=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(m=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var t={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};t.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==m?f.splice(0,0,-t):this.editor.diagramFileTypes[d].extension==m?f.splice(0,0,t):f.push(t)}return{types:f,suggestedName:b}};App.prototype.showSaveFilePicker=function(b,f,m){f=null!=f?f:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});m=null!=m?m:this.createFileSystemOptions();window.showSaveFilePicker(m).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(t){b(d,t)}),f)}),f)};-App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getServiceForName(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(x){null!=x&&0<x.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(x[0])}),-mxUtils.bind(this,function(x){"AbortError"!=x.name&&this.handleError(x)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var m=document.createElement("input");m.setAttribute("type","file");mxEvent.addListener(m,"change",mxUtils.bind(this,function(){null!=m.files&&(this.openFiles(m.files),m.type="",m.type="file",m.value="")}));m.style.display="none";document.body.appendChild(m);this.openFileInputElt=m}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(x,C){StorageFile.listFiles(this,"F",x,C)});window.openBrowserFile=mxUtils.bind(this,function(x,C,K){StorageFile.getFileContent(this,x,C,K)});window.deleteBrowserFile=mxUtils.bind(this,function(x,C,K){StorageFile.deleteFile(this,x,C,K)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,-function(x,C){var K=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=C.substring(C.length-4)||(C=C.substring(0,C.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,x,C):new LocalFile(this,x,C))}),M=this.getCurrentFile();null!=M&&M.isModified()?this.confirm(mxResources.get("allChangesLost"),null,K,mxResources.get("cancel"),mxResources.get("discardChanges")):K()}));var t=this.dialog,y=t.close;this.dialog.close=mxUtils.bind(this,function(x){Editor.useLocalStorage=-d;y.apply(t,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(x){this.handleError(x)}};-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var f=mxUtils.bind(this,function(y){try{this.loadLibrary(y);this.showSidebar();try{this.sidebar.palettes[y.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(x){}}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var m=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?-this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=m&&m.pickLibrary(mxUtils.bind(this,function(y,x){null!=x?f(x):this.spinner.spin(document.body,mxResources.get("loading"))&&m.getLibrary(y,mxUtils.bind(this,function(C){this.spinner.stop();f(C)}),mxUtils.bind(this,function(C){this.handleError(C,null!=C?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var d=document.createElement("input");-d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files){for(var y=0;y<d.files.length;y++)mxUtils.bind(this,function(x){var C=new FileReader;C.onload=mxUtils.bind(this,function(K){f(new LocalLibrary(this,K.target.result,x.name))});C.readAsText(x)})(d.files[y]);d.type="";d.type="file";d.value=""}}));d.style.display="none";document.body.appendChild(d);this.libFileInputElt=d}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=-mxUtils.bind(this,function(y,x){StorageFile.listFiles(this,"L",y,x)});window.openBrowserFile=mxUtils.bind(this,function(y,x,C){StorageFile.getFileContent(this,y,x,C)});window.deleteBrowserFile=mxUtils.bind(this,function(y,x,C){StorageFile.deleteFile(this,y,x,C)});var t=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(y){this.hideDialog(y)}));window.openFile.setConsumer(mxUtils.bind(this,function(y,x){f(b==App.MODE_BROWSER?new StorageLibrary(this,-y,x):new LocalLibrary(this,y,x))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=t;window.openFile=null})}};-App.prototype.saveLibrary=function(b,f,m,d,t,y,x){try{d=null!=d?d:this.mode;t=null!=t?t:!1;y=null!=y?y:!1;var C=this.createLibraryDataFromImages(f),K=mxUtils.bind(this,function(P){this.spinner.stop();null!=x&&x();this.handleError(P,null!=P?mxResources.get("errorSavingFile"):null)});null==m&&d==App.MODE_DEVICE&&(m=new LocalLibrary(this,C,b));if(null==m)this.pickFolder(d,mxUtils.bind(this,function(P){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?-this.drive.insertFile(b,C,P,mxUtils.bind(this,function(I){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(I,f)}),K,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,C,mxUtils.bind(this,function(I){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(I,f)}),K,P):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,-C,mxUtils.bind(this,function(I){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(I,f)}),K,P):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,C,mxUtils.bind(this,function(I){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(I,f)}),K,P):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,C,mxUtils.bind(this,function(I){this.spinner.stop();-this.hideDialog(!0);this.libraryLoaded(I,f)}),K,P):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,C,mxUtils.bind(this,function(I){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(I,f)}),K,P):d==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,C,b),mxUtils.bind(this,function(I){this.hideDialog(!0);this.libraryLoaded(I,f)}),K):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));-else if(t||this.spinner.spin(document.body,mxResources.get("saving"))){m.setData(C);var M=mxUtils.bind(this,function(){m.save(!0,mxUtils.bind(this,function(P){this.spinner.stop();this.hideDialog(!0);y||this.libraryLoaded(m,f);null!=x&&x()}),K)});if(b!=m.getTitle()){var N=m.getHash();m.rename(b,mxUtils.bind(this,function(P){m.constructor!=LocalLibrary&&N!=m.getHash()&&(mxSettings.removeCustomLibrary(N),mxSettings.addCustomLibrary(m.getHash()));this.removeLibrarySidebar(N);M()}),K)}else M()}}catch(P){this.handleError(P)}};-App.prototype.saveFile=function(b,f){var m=this.getCurrentFile(),d=this.mode;if(null!=m){var t=mxUtils.bind(this,function(){EditorUi.enableDrafts&&m.removeDraft();this.getCurrentFile()==m||m.isModified()||(m.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=f&&f()});if(b||null==m.getTitle()||null!=m.invalidFileHandle||null==this.mode)if(null!=m&&m.constructor==LocalFile&&null!=m.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,-function(C,K){m.invalidFileHandle=null;m.fileHandle=C;m.title=K.name;m.desc=K;m.editable=null;this.save(K.name,t)}),null,this.createFileSystemOptions(m.getTitle()));else{b=null!=m.getTitle()?m.getTitle():this.defaultFilename;var y=mxUtils.bind(this,function(C,K,M,N){if(null!=C&&0<C.length)if(/(\.pdf)$/i.test(C))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){M.value=C.split(".").slice(0,--1).join(".");M.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==d&&K==App.MODE_DEVICE)null!=m&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(I,c){m.fileHandle=I;m.mode=App.MODE_DEVICE;m.title=c.name;m.desc=c;this.setMode(App.MODE_DEVICE);this.save(c.name,t)}),mxUtils.bind(this,function(I){"AbortError"!=I.name&&this.handleError(I)}),-this.createFileSystemOptions(C)):(this.setMode(App.MODE_DEVICE),this.save(C,t));else if("download"==K)(new LocalFile(this,null,C)).save();else if("_blank"==K)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(d!=K){var P=mxUtils.bind(this,function(I){var c=this.editor.graph,e=c.getSelectionCells(),l=c.getViewState(),n=this.currentPage;this.createFile(C,this.getFileData(/(\.xml)$/i.test(C)||-0>C.indexOf(".")||/(\.drawio)$/i.test(C),/(\.svg)$/i.test(C),/(\.html)$/i.test(C)),null,K,t,null==this.mode,I,null,null,mxUtils.bind(this,function(){this.restoreViewState(n,l,e)}))});null!=N?P(N):this.pickFolder(K,P)}else null!=K&&this.save(C,t)}),x=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(C,K,M){y(C.value,K,C,M);this.hideDialog()}),x?null:["_blank"]);this.showDialog(b.container,420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(m.getTitle(),-t)}};-App.prototype.loadTemplate=function(b,f,m,d,t){var y=!1,x=b,C=null!=d?d:b;d=/\.png$/i.test(C)||/\.pdf$/i.test(C);var K=EditorUi.isVisioFilename(C);this.editor.isCorsEnabledForUrl(x)||(y=d||K,x="t="+(new Date).getTime(),x=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+x+(y?"&base64=1":""));this.editor.loadUrl(x,mxUtils.bind(this,function(M){try{var N=y?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(M):atob(M):M;if(K||this.isVisioData(N))K||(C=t?this.isRemoteVisioData(N)?"raw.vss":"raw.vssx":this.isRemoteVisioData(N)?-"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(M.substring(M.indexOf(",")+1)),function(P){f(P)},m,C);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(N,C))this.isExternalDataComms()?this.parseFileData(N,mxUtils.bind(this,function(P){4==P.readyState&&200<=P.status&&299>=P.status&&"<mxGraphModel"==P.responseText.substring(0,13)&&f(P.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,m);else if(this.isLucidChartData(N))this.convertLucidChart(N,-mxUtils.bind(this,function(P){f(P)}),mxUtils.bind(this,function(P){m(P)}));else{if(/(\.png)($|\?)/i.test(C)||Editor.isPngData(N))N=Editor.extractGraphModelFromPng(M);f(N)}}catch(P){m(P)}}),m,/(\.png)($|\?)/i.test(C)||K,null,null,y)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};+null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),l())}}catch(x){this.handleError(x)}};+App.prototype.loadDraft=function(b,g){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var l=this.getCurrentFile();null!=l&&(l.fileChanged(),null!=g&&g())}),0)}),null,null,!0)};+App.prototype.filterDrafts=function(b,g,l){function d(){l(q)}var q=[];try{this.getDatabaseItems(mxUtils.bind(this,function(y){EditorUi.debug("App.filterDrafts",[this],"items",y);for(var x=0;x<y.length;x++)try{var D=y[x].key;if(null!=D&&".draft_"==D.substring(0,7)){var J=JSON.parse(y[x].data);null!=J&&"draft"==J.type&&J.aliveCheck!=g&&(null==b&&null==J.fileObject||null!=J.fileObject&&J.fileObject.path==b)&&(J.key=D,q.push(J))}}catch(K){}d()}),d)}catch(y){d()}};+App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(g){if(1==g.length)this.loadDraft(g[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(g[0].key)}));else if(1<g.length){var l=new Date(g[0].modified);l=new DraftDialog(this,1<g.length?mxResources.get("selectDraft"):mxResources.get("draftFound",+[l.toLocaleDateString()+" "+l.toLocaleTimeString()]),1<g.length?null:g[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d?d:0;this.loadDraft(g[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(g[d].key)}))}),mxUtils.bind(this,function(d,q){this.removeDatabaseItem(g[""!=d?d:0].key);null!=q&&q()}),null,null,null,1<g.length?g:null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(d){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,+this.getFileData(),null,null,null,null,null,!0)}));l.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(g){}};+App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var g=this.getServiceCount(!0),l=mxUtils.bind(this,function(){var q=new SplashDialog(this);this.showDialog(q.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(y,x){!y&&!x||mxClient.IS_CHROMEAPP||(y=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=y)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&l();else{b=4==g?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();l()}),b);this.showDialog(d.container,3>b?200:300,3<g?320:210,!0,!1)}}};+App.prototype.addLanguageMenu=function(b,g,l){var d=null;null!=this.menus.get("language")&&(d=document.createElement("div"),d.setAttribute("title",mxResources.get("language")),d.className="geIcon geAdaptiveAsset",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="right center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="19px 19px",d.style.width="19px",d.style.height="19px",mxUtils.setOpacity(d,40),d.style.position="absolute",d.style.cursor="pointer",+d.style.bottom="20px",d.style.right=null!=l?l:"22px",g&&(d.style.direction="rtl",d.style.textAlign="right",d.style.right=null!=l?l:"24px",g=document.createElement("span"),g.style.display="inline-block",g.style.fontSize="12px",g.style.margin="2px 24px 0 0",g.style.userSelect="none",mxUtils.write(g,mxResources.get("language")),d.appendChild(g),g.className="geAdaptiveAsset"),mxEvent.addListener(d,"click",mxUtils.bind(this,function(q){this.editor.graph.popupMenuHandler.hideMenu();var y=new mxPopupMenu(this.menus.get("language").funct);+y.div.className+=" geMenubarMenu";y.smartSeparators=!0;y.showDisabled=!0;y.autoExpand=!0;y.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(y,arguments);y.destroy()});var x=mxUtils.getOffset(d);y.popup(x.x,x.y+d.offsetHeight,null,q);this.setCurrentMenu(y)})),b.appendChild(d));return d};+App.prototype.loadFileSystemEntry=function(b,g,l){l=null!=l?l:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){var x=mxUtils.bind(this,function(D){try{if(null!=g){var J=y.target.result;"image/png"==d.type&&(J=this.extractGraphModelFromPng(J));g(new LocalFile(this,J,d.name,null,b,d,D))}else this.openFileHandle(y.target.result,d.name,d,!1,b,D)}catch(K){l(K)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,+function(D){x("denied"!==D)})):b.createWritable().then(mxUtils.bind(this,function(){x(!0)}),mxUtils.bind(this,function(D){x(!1)}))});q.onerror=l;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||"image/svg"===d.type.substring(0,9)?q.readAsText(d):q.readAsDataURL(d)}),l)}catch(d){l(d)}};+App.prototype.createFileSystemOptions=function(b){var g=[],l=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(l=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var q={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};q.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==l?g.splice(0,0,+q):this.editor.diagramFileTypes[d].extension==l?g.splice(0,0,q):g.push(q)}return{types:g,suggestedName:b}};App.prototype.showSaveFilePicker=function(b,g,l){g=null!=g?g:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});l=null!=l?l:this.createFileSystemOptions();window.showSaveFilePicker(l).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(q){b(d,q)}),g)}),g)};+App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var g=this.getServiceForName(b);if(null!=g)g.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(x){null!=x&&0<x.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(x[0])}),+mxUtils.bind(this,function(x){"AbortError"!=x.name&&this.handleError(x)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.openFiles(l.files),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.openFileInputElt=l}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(x,D){StorageFile.listFiles(this,"F",x,D)});window.openBrowserFile=mxUtils.bind(this,function(x,D,J){StorageFile.getFileContent(this,x,D,J)});window.deleteBrowserFile=mxUtils.bind(this,function(x,D,J){StorageFile.deleteFile(this,x,D,J)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,+function(x,D){var J=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=D.substring(D.length-4)||(D=D.substring(0,D.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,x,D):new LocalFile(this,x,D))}),K=this.getCurrentFile();null!=K&&K.isModified()?this.confirm(mxResources.get("allChangesLost"),null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):J()}));var q=this.dialog,y=q.close;this.dialog.close=mxUtils.bind(this,function(x){Editor.useLocalStorage=+d;y.apply(q,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(x){this.handleError(x)}};+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var g=mxUtils.bind(this,function(y){try{this.loadLibrary(y);this.showSidebar();try{this.sidebar.palettes[y.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(x){}}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var l=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?+this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=l&&l.pickLibrary(mxUtils.bind(this,function(y,x){null!=x?g(x):this.spinner.spin(document.body,mxResources.get("loading"))&&l.getLibrary(y,mxUtils.bind(this,function(D){this.spinner.stop();g(D)}),mxUtils.bind(this,function(D){this.handleError(D,null!=D?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var d=document.createElement("input");+d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files){for(var y=0;y<d.files.length;y++)mxUtils.bind(this,function(x){var D=new FileReader;D.onload=mxUtils.bind(this,function(J){g(new LocalLibrary(this,J.target.result,x.name))});D.readAsText(x)})(d.files[y]);d.type="";d.type="file";d.value=""}}));d.style.display="none";document.body.appendChild(d);this.libFileInputElt=d}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=+mxUtils.bind(this,function(y,x){StorageFile.listFiles(this,"L",y,x)});window.openBrowserFile=mxUtils.bind(this,function(y,x,D){StorageFile.getFileContent(this,y,x,D)});window.deleteBrowserFile=mxUtils.bind(this,function(y,x,D){StorageFile.deleteFile(this,y,x,D)});var q=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(y){this.hideDialog(y)}));window.openFile.setConsumer(mxUtils.bind(this,function(y,x){g(b==App.MODE_BROWSER?new StorageLibrary(this,+y,x):new LocalLibrary(this,y,x))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=q;window.openFile=null})}};+App.prototype.saveLibrary=function(b,g,l,d,q,y,x){try{d=null!=d?d:this.mode;q=null!=q?q:!1;y=null!=y?y:!1;var D=this.createLibraryDataFromImages(g),J=mxUtils.bind(this,function(N){this.spinner.stop();null!=x&&x();this.handleError(N,null!=N?mxResources.get("errorSavingFile"):null)});null==l&&d==App.MODE_DEVICE&&(l=new LocalLibrary(this,D,b));if(null==l)this.pickFolder(d,mxUtils.bind(this,function(N){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?+this.drive.insertFile(b,D,N,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,N):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,+D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,N):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,N):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();+this.hideDialog(!0);this.libraryLoaded(c,g)}),J,N):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,N):d==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,D,b),mxUtils.bind(this,function(c){this.hideDialog(!0);this.libraryLoaded(c,g)}),J):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));+else if(q||this.spinner.spin(document.body,mxResources.get("saving"))){l.setData(D);var K=mxUtils.bind(this,function(){l.save(!0,mxUtils.bind(this,function(N){this.spinner.stop();this.hideDialog(!0);y||this.libraryLoaded(l,g);null!=x&&x()}),J)});if(b!=l.getTitle()){var L=l.getHash();l.rename(b,mxUtils.bind(this,function(N){l.constructor!=LocalLibrary&&L!=l.getHash()&&(mxSettings.removeCustomLibrary(L),mxSettings.addCustomLibrary(l.getHash()));this.removeLibrarySidebar(L);K()}),J)}else K()}}catch(N){this.handleError(N)}};+App.prototype.saveFile=function(b,g){var l=this.getCurrentFile(),d=this.mode;if(null!=l){var q=mxUtils.bind(this,function(){EditorUi.enableDrafts&&l.removeDraft();this.getCurrentFile()==l||l.isModified()||(l.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=g&&g()});if(b||null==l.getTitle()||null!=l.invalidFileHandle||null==this.mode)if(null!=l&&l.constructor==LocalFile&&null!=l.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,+function(D,J){l.invalidFileHandle=null;l.fileHandle=D;l.title=J.name;l.desc=J;l.editable=null;this.save(J.name,q)}),null,this.createFileSystemOptions(l.getTitle()));else{b=null!=l.getTitle()?l.getTitle():this.defaultFilename;var y=mxUtils.bind(this,function(D,J,K,L){if(null!=D&&0<D.length)if(/(\.pdf)$/i.test(D))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){K.value=D.split(".").slice(0,+-1).join(".");K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==d&&J==App.MODE_DEVICE)null!=l&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(c,e){l.fileHandle=c;l.mode=App.MODE_DEVICE;l.title=e.name;l.desc=e;this.setMode(App.MODE_DEVICE);this.save(e.name,q)}),mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)}),+this.createFileSystemOptions(D)):(this.setMode(App.MODE_DEVICE),this.save(D,q));else if("download"==J)(new LocalFile(this,null,D)).save();else if("_blank"==J)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(d!=J){var N=mxUtils.bind(this,function(c){var e=this.editor.graph,f=e.getSelectionCells(),p=e.getViewState(),n=this.currentPage;this.createFile(D,this.getFileData(/(\.xml)$/i.test(D)||+0>D.indexOf(".")||/(\.drawio)$/i.test(D),/(\.svg)$/i.test(D),/(\.html)$/i.test(D)),null,J,q,null==this.mode,c,null,null,mxUtils.bind(this,function(){this.restoreViewState(n,p,f)}))});null!=L?N(L):this.pickFolder(J,N)}else null!=J&&this.save(D,q)}),x=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(D,J,K){y(D.value,J,D,K);this.hideDialog()}),x?null:["_blank"]);this.showDialog(b.container,420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(l.getTitle(),+q)}};+App.prototype.loadTemplate=function(b,g,l,d,q){var y=!1,x=b,D=null!=d?d:b;d=/\.png$/i.test(D)||/\.pdf$/i.test(D);var J=EditorUi.isVisioFilename(D);this.editor.isCorsEnabledForUrl(x)||(y=d||J,x="t="+(new Date).getTime(),x=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+x+(y?"&base64=1":""));this.editor.loadUrl(x,mxUtils.bind(this,function(K){try{var L=y?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(K):atob(K):K;if(J||this.isVisioData(L))J||(D=q?this.isRemoteVisioData(L)?"raw.vss":"raw.vssx":this.isRemoteVisioData(L)?+"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(N){g(N)},l,D);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(L,D))this.isExternalDataComms()?this.parseFileData(L,mxUtils.bind(this,function(N){4==N.readyState&&200<=N.status&&299>=N.status&&"<mxGraphModel"==N.responseText.substring(0,13)&&g(N.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l);else if(this.isLucidChartData(L))this.convertLucidChart(L,+mxUtils.bind(this,function(N){g(N)}),mxUtils.bind(this,function(N){l(N)}));else{if(/(\.png)($|\?)/i.test(D)||Editor.isPngData(L))L=Editor.extractGraphModelFromPng(K);g(L)}}catch(N){l(N)}}),l,/(\.png)($|\?)/i.test(D)||J,null,null,y)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};App.prototype.isModeEnabled=function(b){return b==App.MODE_GOOGLE?"function"===typeof window.DriveClient&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode):b==App.MODE_GITHUB?null!=this.gitHub:b==App.MODE_GITLAB?null!=this.gitLab:b==App.MODE_DROPBOX?"function"===typeof window.DropboxClient&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):b==App.MODE_ONEDRIVE?"function"===typeof window.OneDriveClient&&("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode):b==App.MODE_TRELLO?"function"===typeof window.TrelloClient&&"1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):!1};App.prototype.isModeReady=function(b){return null!=this.getServiceForName(b)&&(b!=App.MODE_DROPBOX||"undefined"!==typeof Dropbox.choose)};-App.prototype.uncompressPages=function(b){if(null!=b)try{var f=mxUtils.parseXml(b);if("mxfile"==f.documentElement.nodeName){for(var m=f.documentElement.getElementsByTagName("diagram"),d=0;d<m.length;d++){var t=Editor.parseDiagramNode(m[d],!0);null!=t&&(mxUtils.setTextContent(m[d],""),m[d].appendChild(t))}b=mxUtils.getPrettyXml(f.documentElement)}}catch(y){}return b};-App.prototype.createFile=function(b,f,m,d,t,y,x,C,K,M){d=C?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;null==f||Editor.defaultCompressed||(f=this.uncompressPages(f));var N=mxUtils.bind(this,function(){this.spinner.stop()}),P=mxUtils.bind(this,function(c){N();null==c&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=c&&this.handleError(c)});try{var I=mxUtils.bind(this,function(c){N();this.fileCreated(c,-m,y,t,K,M)});d==App.MODE_GOOGLE&&null!=this.drive?(null==x&&null!=this.stateArg&&null!=this.stateArg.folderId&&(x=this.stateArg.folderId),this.drive.insertFile(b,f,x,I,P)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,I,P,!1,x):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,I,P,!1,x):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,I,P,!1,x):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,I,P):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?-this.oneDrive.insertFile(b,f,I,P,!1,x):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,I,P):!C&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(N(),this.showSaveFilePicker(mxUtils.bind(this,function(c,e){var l=new LocalFile(this,f,e.name,null,c,e);l.saveFile(e.name,!1,mxUtils.bind(this,function(){this.fileCreated(l,m,y,t,K,M)}),P,!0)}),mxUtils.bind(this,function(c){"AbortError"!=c.name&&P(c)}),this.createFileSystemOptions(b))):(N(),this.fileCreated(new LocalFile(this,f,b,null==d),m,y,t,K,M))}catch(c){N(),-this.handleError(c)}}};-App.prototype.fileCreated=function(b,f,m,d,t,y){var x=window.location.pathname;null!=f&&0<f.length&&(x+="?libs="+f);null!=t&&0<t.length&&(x+="?clibs="+t);x=this.getUrl(x);b.getMode()!=App.MODE_DEVICE&&(x+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var C=b.getData();C=0<C.length?this.editor.extractGraphModel(mxUtils.parseXml(C).documentElement,!0):null;var K=window.location.protocol+"//"+window.location.hostname+x,M=C,N=null;null!=C&&/\.svg$/i.test(b.getTitle())&&(N=-this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(N.container),M=this.decodeNodeIntoGraph(M,N));b.setData(this.createFileData(C,N,b,K));null!=N&&N.container.parentNode.removeChild(N.container);var P=mxUtils.bind(this,function(){this.spinner.stop()}),I=mxUtils.bind(this,function(){P();var c=this.getCurrentFile();null==m&&null!=c&&(m=!c.isModified()&&null==c.getMode());var e=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,y);m&&b.addAllSavedStatus();-null!=f&&this.sidebar.showEntries(f);if(null!=t){for(var n=[],p=t.split(";"),u=0;u<p.length;u++)n.push(decodeURIComponent(p[u]));this.loadLibraries(n)}null!=d&&d()}),l=mxUtils.bind(this,function(){m||null==c||!c.isModified()?e():this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==m||m?l():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),-null==b.getMode())),window.geOpenWindow(x,null,l))});b.constructor==LocalFile?I():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){I()}),mxUtils.bind(this,function(c){P();null!=c&&"AbortError"==c.name||this.handleError(c)}))}};-App.prototype.loadFile=function(b,f,m,d,t){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var y=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var K=mxUtils.bind(this,function(c){this.handleError(c,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var e=this.getCurrentFile();-window.location.hash=null!=e?e.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(c){null!=c?(this.fileLoaded(new StorageFile(this,c,b)),null!=d&&d()):K({message:mxResources.get("fileNotFound")})}),K)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var c=this.getCurrentFile();window.location.hash=null!=c?c.getHash():""}));else if(null!=m)this.spinner.stop(),-this.fileLoaded(m),null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var M=decodeURIComponent(b.substring(1));"<"!=M.charAt(0)&&(M=Graph.decompress(M));M=new LocalFile(this,M,null!=urlParams.title?decodeURIComponent(urlParams.title):-this.defaultFilename,!0);M.getHash=function(){return b};this.fileLoaded(M);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(c,e){this.spinner.stop();this.fileLoaded(new EmbedFile(this,c,e));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var N=decodeURIComponent(b.substring(1)),P=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=N.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var c=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var e=N.substring(31,N.lastIndexOf("&ex"));this.loadFile("G"+e,f,null,mxUtils.bind(this,function(){var l=this.getCurrentFile();null!=l&&this.editor.chromeless&&-!this.editor.editable&&(l.getHash=function(){return"G"+e},window.location.hash="#"+l.getHash());null!=d&&d()}));return!0}return!1});!c()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",c);return!0});this.loadTemplate(N,mxUtils.bind(this,function(c){this.spinner.stop();if(null!=c&&0<c.length){var e=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var l=N,n=N.lastIndexOf("."),p=l.lastIndexOf("/");n>p&&0<p&&(l=l.substring(p+1,n),n=N.substring(n),-this.useCanvasForExport||".png"!=n||(n=".drawio"),".svg"===n||".xml"===n||".html"===n||".png"===n||".drawio"===n)&&(e=l+n)}c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title):e,!0);c.getHash=function(){return b};this.fileLoaded(c,!0)?null!=d&&d():P()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else P()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,-function(){P()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var I=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var c=this.getServiceForName(I);if(null==c)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var l=this.getCurrentFile();-window.location.hash=null!=l?l.getHash():""}));else{var e=b.charAt(0);b=decodeURIComponent(b.substring(1));c.getFile(b,mxUtils.bind(this,function(l){this.spinner.stop();this.fileLoaded(l);var n=this.getCurrentFile();if(null==n)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){n.getHash=function(){return e+b};l="#"+n.getHash();try{var p=this.getHashObject();null==p||mxUtils.isEmptyObject(p)||(l=l+"#"+encodeURIComponent(JSON.stringify(p)))}catch(u){}window.location.replace(l)}else l==-n&&null==l.getMode()&&(p=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+p+'" class="geStatusAlert">'+p+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(l){null!=window.console&&null!=l&&console.log("error in loadFile:",b,l);var n=mxUtils.bind(this,function(){var p=this.getCurrentFile();null==p?(window.location.hash="",this.showSplash()):window.location.hash="#"+p.getHash()});null==l||"AbortError"!=l.name?this.handleError(l,null!=l?mxResources.get("errorLoadingFile"):null,-n,null,null,"#"+e+b):n()}))}})()}}),x=this.getCurrentFile(),C=mxUtils.bind(this,function(){t||null==x||!x.isModified()?y():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=x&&(window.location.hash=x.getHash())}),y,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?C():null==x||f?C():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,C)).container,320,160,!0,!0)};-App.prototype.getLibraryStorageHint=function(b){var f=b.getTitle();b.constructor!=LocalLibrary&&(f+="\n"+b.getHash());b.constructor==DriveLibrary?f+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?f+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?f+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?f+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?f+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?f+=" ("+-mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(m){for(var d=0;d<m.length;d++)""!=m[d]&&0>mxUtils.indexOf(f,m[d])&&f.push(m[d])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)};-App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var m=mxUtils.bind(this,function(M,N){N||mxSettings.removeCustomLibrary(M);delete this.loadedLibraries[M]}),d=0,t=[],y=0<b.length&&"L.scratchpad"==b[0]?1:0,x=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var M=b.length-1;0<=M;M--)null!=t[M]&&this.loadLibrary(t[M],M<=y);null!=f&&f()}});if(null!=b)for(var C=0;C<b.length;C++){var K=encodeURIComponent(decodeURIComponent(b[C]));-mxUtils.bind(this,function(M,N){if(null!=M&&0<M.length&&null==this.loadedLibraries[M]&&null==this.sidebar.palettes[M]){this.loadedLibraries[M]=!0;d++;var P=mxUtils.bind(this,function(p){t[N]=p;d--;x()}),I=mxUtils.bind(this,function(p){m(M,p);d--;x()}),c=M.substring(0,1);if("L"==c)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var p=decodeURIComponent(M.substring(1));StorageFile.getFileContent(this,p,mxUtils.bind(this,function(u){".scratchpad"==p&&null==-u&&(u=this.emptyLibraryXml);null!=u?P(new StorageLibrary(this,u,p)):I()}),I)}catch(u){I()}}),0);else if("U"==c){var e=decodeURIComponent(M.substring(1));this.isOffline()?I(!0):this.loadTemplate(e,mxUtils.bind(this,function(p){null!=p&&0<p.length?P(new UrlLibrary(this,p,e)):I()}),function(){I()},null,!0)}else if("R"==c){c=decodeURIComponent(M.substring(1));try{c=JSON.parse(c);var l={id:c[0],title:c[1],downloadUrl:c[2]};this.remoteInvoke("getFileContent",[l.downloadUrl],null,mxUtils.bind(this,function(p){try{P(new RemoteLibrary(this,-p,l))}catch(u){I()}}),function(){I()})}catch(p){I()}}else if("S"==c&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(M.substring(1)),function(p){P(p)},I)}catch(p){I()}else{var n=null;"G"==c?null!=this.drive&&null!=this.drive.user&&(n=this.drive):"H"==c?null!=this.gitHub&&null!=this.gitHub.getUser()&&(n=this.gitHub):"T"==c?null!=this.trello&&this.trello.isAuthorized()&&(n=this.trello):"D"==c?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==c&&null!=this.oneDrive&&-null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n?n.getLibrary(decodeURIComponent(M.substring(1)),mxUtils.bind(this,function(p){try{P(p)}catch(u){I()}}),function(p){I()}):I(!0)}}})(K,C)}x()}};+App.prototype.uncompressPages=function(b){if(null!=b)try{var g=mxUtils.parseXml(b);if("mxfile"==g.documentElement.nodeName){for(var l=g.documentElement.getElementsByTagName("diagram"),d=0;d<l.length;d++){var q=Editor.parseDiagramNode(l[d],!0);null!=q&&(mxUtils.setTextContent(l[d],""),l[d].appendChild(q))}b=mxUtils.getPrettyXml(g.documentElement)}}catch(y){}return b};+App.prototype.createFile=function(b,g,l,d,q,y,x,D,J,K){d=D?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){g=null!=g?g:this.emptyDiagramXml;null==g||Editor.defaultCompressed||(g=this.uncompressPages(g));var L=mxUtils.bind(this,function(){this.spinner.stop()}),N=mxUtils.bind(this,function(e){L();null==e&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=e&&this.handleError(e)});try{var c=mxUtils.bind(this,function(e){L();this.fileCreated(e,+l,y,q,J,K)});d==App.MODE_GOOGLE&&null!=this.drive?(null==x&&null!=this.stateArg&&null!=this.stateArg.folderId&&(x=this.stateArg.folderId),this.drive.insertFile(b,g,x,c,N)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,g,c,N,!1,x):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,g,c,N,!1,x):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,g,c,N,!1,x):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,g,c,N):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?+this.oneDrive.insertFile(b,g,c,N,!1,x):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,g,c,N):!D&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(L(),this.showSaveFilePicker(mxUtils.bind(this,function(e,f){var p=new LocalFile(this,g,f.name,null,e,f);p.saveFile(f.name,!1,mxUtils.bind(this,function(){this.fileCreated(p,l,y,q,J,K)}),N,!0)}),mxUtils.bind(this,function(e){"AbortError"!=e.name&&N(e)}),this.createFileSystemOptions(b))):(L(),this.fileCreated(new LocalFile(this,g,b,null==d),l,y,q,J,K))}catch(e){L(),+this.handleError(e)}}};+App.prototype.fileCreated=function(b,g,l,d,q,y){var x=window.location.pathname;null!=g&&0<g.length&&(x+="?libs="+g);null!=q&&0<q.length&&(x+="?clibs="+q);x=this.getUrl(x);b.getMode()!=App.MODE_DEVICE&&(x+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var D=b.getData();D=0<D.length?this.editor.extractGraphModel(mxUtils.parseXml(D).documentElement,!0):null;var J=window.location.protocol+"//"+window.location.hostname+x,K=D,L=null;null!=D&&/\.svg$/i.test(b.getTitle())&&(L=+this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(L.container),K=this.decodeNodeIntoGraph(K,L));b.setData(this.createFileData(D,L,b,J));null!=L&&L.container.parentNode.removeChild(L.container);var N=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(){N();var e=this.getCurrentFile();null==l&&null!=e&&(l=!e.isModified()&&null==e.getMode());var f=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,y);l&&b.addAllSavedStatus();+null!=g&&this.sidebar.showEntries(g);if(null!=q){for(var n=[],t=q.split(";"),z=0;z<t.length;z++)n.push(decodeURIComponent(t[z]));this.loadLibraries(n)}null!=d&&d()}),p=mxUtils.bind(this,function(){l||null==e||!e.isModified()?f():this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==l||l?p():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),+null==b.getMode())),window.geOpenWindow(x,null,p))});b.constructor==LocalFile?c():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){c()}),mxUtils.bind(this,function(e){N();null!=e&&"AbortError"==e.name||this.handleError(e)}))}};+App.prototype.loadFile=function(b,g,l,d,q){if("1"==urlParams.openInSameWin||navigator.standalone)g=!0;this.hideDialog();var y=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var J=mxUtils.bind(this,function(e){this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var f=this.getCurrentFile();+window.location.hash=null!=f?f.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(e){null!=e?(this.fileLoaded(new StorageFile(this,e,b)),null!=d&&d()):J({message:mxResources.get("fileNotFound")})}),J)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var e=this.getCurrentFile();window.location.hash=null!=e?e.getHash():""}));else if(null!=l)this.spinner.stop(),+this.fileLoaded(l),null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var K=decodeURIComponent(b.substring(1));"<"!=K.charAt(0)&&(K=Graph.decompress(K));K=new LocalFile(this,K,null!=urlParams.title?decodeURIComponent(urlParams.title):+this.defaultFilename,!0);K.getHash=function(){return b};this.fileLoaded(K);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(e,f){this.spinner.stop();this.fileLoaded(new EmbedFile(this,e,f));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var L=decodeURIComponent(b.substring(1)),N=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=L.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var e=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var f=L.substring(31,L.lastIndexOf("&ex"));this.loadFile("G"+f,g,null,mxUtils.bind(this,function(){var p=this.getCurrentFile();null!=p&&this.editor.chromeless&&+!this.editor.editable&&(p.getHash=function(){return"G"+f},window.location.hash="#"+p.getHash());null!=d&&d()}));return!0}return!1});!e()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",e);return!0});this.loadTemplate(L,mxUtils.bind(this,function(e){this.spinner.stop();if(null!=e&&0<e.length){var f=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var p=L,n=L.lastIndexOf("."),t=p.lastIndexOf("/");n>t&&0<t&&(p=p.substring(t+1,n),n=L.substring(n),+this.useCanvasForExport||".png"!=n||(n=".drawio"),".svg"===n||".xml"===n||".html"===n||".png"===n||".drawio"===n)&&(f=p+n)}e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):f,!0);e.getHash=function(){return b};this.fileLoaded(e,!0)?null!=d&&d():N()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else N()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,+function(){N()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var c=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var e=this.getServiceForName(c);if(null==e)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();+window.location.hash=null!=p?p.getHash():""}));else{var f=b.charAt(0);b=decodeURIComponent(b.substring(1));e.getFile(b,mxUtils.bind(this,function(p){this.spinner.stop();this.fileLoaded(p);var n=this.getCurrentFile();if(null==n)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){n.getHash=function(){return f+b};p="#"+n.getHash();try{var t=this.getHashObject();null==t||mxUtils.isEmptyObject(t)||(p=p+"#"+encodeURIComponent(JSON.stringify(t)))}catch(z){}window.location.replace(p)}else p==+n&&null==p.getMode()&&(t=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+t+'" class="geStatusAlert">'+t+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(p){null!=window.console&&null!=p&&console.log("error in loadFile:",b,p);var n=mxUtils.bind(this,function(){var t=this.getCurrentFile();null==t?(window.location.hash="",this.showSplash()):window.location.hash="#"+t.getHash()});null==p||"AbortError"!=p.name?this.handleError(p,null!=p?mxResources.get("errorLoadingFile"):null,+n,null,null,"#"+f+b):n()}))}})()}}),x=this.getCurrentFile(),D=mxUtils.bind(this,function(){q||null==x||!x.isModified()?y():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=x&&(window.location.hash=x.getHash())}),y,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?D():null==x||g?D():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,D)).container,320,160,!0,!0)};+App.prototype.getLibraryStorageHint=function(b){var g=b.getTitle();b.constructor!=LocalLibrary&&(g+="\n"+b.getHash());b.constructor==DriveLibrary?g+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?g+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?g+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?g+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?g+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?g+=" ("++mxResources.get("browser")+")":b.constructor==LocalLibrary&&(g+=" ("+mxResources.get("device")+")");return g};App.prototype.restoreLibraries=function(){function b(l){for(var d=0;d<l.length;d++)""!=l[d]&&0>mxUtils.indexOf(g,l[d])&&g.push(l[d])}var g=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(g)};+App.prototype.loadLibraries=function(b,g){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var l=mxUtils.bind(this,function(K,L){L||mxSettings.removeCustomLibrary(K);delete this.loadedLibraries[K]}),d=0,q=[],y=0<b.length&&"L.scratchpad"==b[0]?1:0,x=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var K=b.length-1;0<=K;K--)null!=q[K]&&this.loadLibrary(q[K],K<=y);null!=g&&g()}});if(null!=b)for(var D=0;D<b.length;D++){var J=encodeURIComponent(decodeURIComponent(b[D]));+mxUtils.bind(this,function(K,L){if(null!=K&&0<K.length&&null==this.loadedLibraries[K]&&null==this.sidebar.palettes[K]){this.loadedLibraries[K]=!0;d++;var N=mxUtils.bind(this,function(t){q[L]=t;d--;x()}),c=mxUtils.bind(this,function(t){l(K,t);d--;x()}),e=K.substring(0,1);if("L"==e)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var t=decodeURIComponent(K.substring(1));StorageFile.getFileContent(this,t,mxUtils.bind(this,function(z){".scratchpad"==t&&null==+z&&(z=this.emptyLibraryXml);null!=z?N(new StorageLibrary(this,z,t)):c()}),c)}catch(z){c()}}),0);else if("U"==e){var f=decodeURIComponent(K.substring(1));this.isOffline()?c(!0):this.loadTemplate(f,mxUtils.bind(this,function(t){null!=t&&0<t.length?N(new UrlLibrary(this,t,f)):c()}),function(){c()},null,!0)}else if("R"==e){e=decodeURIComponent(K.substring(1));try{e=JSON.parse(e);var p={id:e[0],title:e[1],downloadUrl:e[2]};this.remoteInvoke("getFileContent",[p.downloadUrl],null,mxUtils.bind(this,function(t){try{N(new RemoteLibrary(this,+t,p))}catch(z){c()}}),function(){c()})}catch(t){c()}}else if("S"==e&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(K.substring(1)),function(t){N(t)},c)}catch(t){c()}else{var n=null;"G"==e?null!=this.drive&&null!=this.drive.user&&(n=this.drive):"H"==e?null!=this.gitHub&&null!=this.gitHub.getUser()&&(n=this.gitHub):"T"==e?null!=this.trello&&this.trello.isAuthorized()&&(n=this.trello):"D"==e?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==e&&null!=this.oneDrive&&+null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n?n.getLibrary(decodeURIComponent(K.substring(1)),mxUtils.bind(this,function(t){try{N(t)}catch(z){c()}}),function(t){c()}):c(!0)}}})(J,D)}x()}};App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&(this.buttonContainer.style.paddingRight="1"==urlParams.atlas?"32px":"8px");this.commentsSupported()&&"simple"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton geAdaptiveAsset",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;width:24px;height:24px;background-size:24px 24px;background-position:center center;cursor:pointer;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),null!=this.userElement&&this.userElement.parentNode==this.buttonContainer?this.buttonContainer.insertBefore(this.commentButton,this.userElement):null!=this.shareButton&&this.shareButton.parentNode==this.buttonContainer?this.buttonContainer.insertBefore(this.commentButton,this.shareButton):this.buttonContainer.appendChild(this.commentButton)):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);if("draw.io"!=this.getServiceName()||"1"==urlParams.embed||this.isStandaloneApp())null!=urlParams.notif&&@@ -13879,48 +13878,48 @@ this.fetchAndShowNotification(urlParams.notif),!this.isStandaloneApp()||"simple"null!=this.shareButton&&(this.shareButton.style.display="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme?"none":"inline-flex","simple"==Editor.currentTheme||"sketch"==Editor.currentTheme))this.shareButton.parentNode.style.display=0==this.shareButton.parentNode.clientWidth?"none":""}else null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null);"1"!=urlParams.extAuth&&"atlas"!=Editor.currentTheme&&this.fetchAndShowNotification("online",this.mode)}null!=this.commentButton&&(this.commentButton.style.marginRight="",this.commentButton.style.top="","simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&"1"!=urlParams.embed?this.commentButton.style.top="-6px":"1"==urlParams.embed&&(this.commentButton.style.marginRight="4px"));null!=this.notificationBtn&&("simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&"1"!=urlParams.embed?(this.notificationBtn.style.marginRight="4px",this.notificationBtn.style.marginTop="-12px"):(this.notificationBtn.style.marginRight="",this.notificationBtn.style.marginTop=""))}};-App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif){b=b||"online";var m=null,d=mxUtils.bind(this,function(t){t=t.filter(function(K){return!K.targets||-1<K.targets.indexOf(b)||null!=f&&-1<K.targets.indexOf(f)});for(var y=b+"NotifReadTS",x=isLocalStorage?parseInt(localStorage.getItem(y)):!0,C=0;C<t.length;C++)t[C].isNew=!x||t[C].timestamp>x;this.showNotification(t,y)});try{isLocalStorage&&(m=JSON.parse(localStorage.getItem(".notifCache")))}catch(t){}null==m||m.ts+864E5<Date.now()?-(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(t){if(200<=t.getStatus()&&299>=t.getStatus())try{var y=JSON.parse(t.getText());y.sort(function(x,C){return C.timestamp-x.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:y}));this.fetchingNotif=!1;d(y)}catch(x){}}))):d(m.notifs)}};-App.prototype.showNotification=function(b,f){function m(M){var N=document.querySelector(".geNotification-count");null!=N&&(N.innerHTML=M,N.style.display=0==M?"none":"",N=document.querySelector(".geNotification-bell"),N.style.animation=0==M?"none":"",N.className="geNotification-bell"+(0==M?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==M?"none":"")}var d=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var t=d=0;t<b.length;t++)b[t].isNew&&-d++;if(0==d)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var y=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var M=this.notificationWin.querySelectorAll(".circle.active"),N=0;N<M.length;N++)M[N].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=-"geNotification-box";d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);this.notifCount=d;d=document.createElement("div");d.className="geNotification-bell";t=document.createElement("span");t.className="geBell-top";d.appendChild(t);t=document.createElement("span");t.className="geBell-middle";d.appendChild(t);t=document.createElement("span");t.className="geBell-bottom";d.appendChild(t);t=document.createElement("span");t.className="geBell-rad";d.appendChild(t);-this.notificationBtn.appendChild(d);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);t=document.createElement("div");t.className="header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");t.appendChild(d);d=document.createElement("span");-d.className="closeBtn";d.textContent="x";t.appendChild(d);this.notificationWin.appendChild(t);t=document.createElement("div");t.className="notifications clearfix";var x=document.createElement("div");x.setAttribute("id","geNotifList");x.style.position="relative";t.appendChild(x);this.notificationWin.appendChild(t);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=-0;var M=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=M.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=M.right-this.notificationWin.clientWidth+"px";m(0)}else y()}));mxEvent.addListener(d,"click",y)}else this.notificationBtn.style.display="";var C=0,K=document.getElementById("geNotifList");if(null!=K){K.innerHTML='<div class="line"></div>';for(t=0;t<b.length;t++)(function(M,N){N.isNew&&C++;var P=document.createElement("div");P.className="notification";-M=M.timeSince(new Date(N.timestamp));null==M&&(M=mxResources.get("lessThanAMinute"));P.innerHTML='<div class="circle'+(N.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[M],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(N.content)+"</p>";N.link&&mxEvent.addListener(P,"click",function(){window.open(N.link,"notifWin")});K.appendChild(P)})(this,b[t]);m(C)}}};-App.prototype.save=function(b,f){var m=this.getCurrentFile(),d=!0,t=mxUtils.bind(this,function(){d&&(d=!1,m.handleFileSuccess(!0),null!=f&&f())}),y=mxUtils.bind(this,function(x){if(d){d=!1;Editor.addRetryToError(x,mxUtils.bind(this,function(){this.save(b,f)}));if(null!=x&&null!=x.retry){var C=x.retry;x.retry=function(){d=!0;try{m.isModified()?C():t()}catch(K){y(K)}}}m.handleFileError(x,null==x||"AbortError"!=x.name)}});if(null!=m&&this.spinner.spin(document.body,mxResources.get("saving"),y,3*this.timeout))try{this.editor.setStatus(""),-this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==m.getTitle()?m.save(!0,t,y):m.saveAs(b,t,y)}catch(x){y(x)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};+App.prototype.fetchAndShowNotification=function(b,g){if(!this.fetchingNotif){b=b||"online";var l=null,d=mxUtils.bind(this,function(q){q=q.filter(function(J){return!J.targets||-1<J.targets.indexOf(b)||null!=g&&-1<J.targets.indexOf(g)});for(var y=b+"NotifReadTS",x=isLocalStorage?parseInt(localStorage.getItem(y)):!0,D=0;D<q.length;D++)q[D].isNew=!x||q[D].timestamp>x;this.showNotification(q,y)});try{isLocalStorage&&(l=JSON.parse(localStorage.getItem(".notifCache")))}catch(q){}null==l||l.ts+864E5<Date.now()?+(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(q){if(200<=q.getStatus()&&299>=q.getStatus())try{var y=JSON.parse(q.getText());y.sort(function(x,D){return D.timestamp-x.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:y}));this.fetchingNotif=!1;d(y)}catch(x){}}))):d(l.notifs)}};+App.prototype.showNotification=function(b,g){function l(K){var L=document.querySelector(".geNotification-count");null!=L&&(L.innerHTML=K,L.style.display=0==K?"none":"",L=document.querySelector(".geNotification-bell"),L.style.animation=0==K?"none":"",L.className="geNotification-bell"+(0==K?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==K?"none":"")}var d=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var q=d=0;q<b.length;q++)b[q].isNew&&+d++;if(0==d)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var y=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var K=this.notificationWin.querySelectorAll(".circle.active"),L=0;L<K.length;L++)K[L].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(g,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=+"geNotification-box";d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);this.notifCount=d;d=document.createElement("div");d.className="geNotification-bell";q=document.createElement("span");q.className="geBell-top";d.appendChild(q);q=document.createElement("span");q.className="geBell-middle";d.appendChild(q);q=document.createElement("span");q.className="geBell-bottom";d.appendChild(q);q=document.createElement("span");q.className="geBell-rad";d.appendChild(q);+this.notificationBtn.appendChild(d);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);q=document.createElement("div");q.className="header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");q.appendChild(d);d=document.createElement("span");+d.className="closeBtn";d.textContent="x";q.appendChild(d);this.notificationWin.appendChild(q);q=document.createElement("div");q.className="notifications clearfix";var x=document.createElement("div");x.setAttribute("id","geNotifList");x.style.position="relative";q.appendChild(x);this.notificationWin.appendChild(q);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=+0;var K=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=K.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=K.right-this.notificationWin.clientWidth+"px";l(0)}else y()}));mxEvent.addListener(d,"click",y)}else this.notificationBtn.style.display="";var D=0,J=document.getElementById("geNotifList");if(null!=J){J.innerHTML='<div class="line"></div>';for(q=0;q<b.length;q++)(function(K,L){L.isNew&&D++;var N=document.createElement("div");N.className="notification";+K=K.timeSince(new Date(L.timestamp));null==K&&(K=mxResources.get("lessThanAMinute"));N.innerHTML='<div class="circle'+(L.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[K],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(L.content)+"</p>";L.link&&mxEvent.addListener(N,"click",function(){window.open(L.link,"notifWin")});J.appendChild(N)})(this,b[q]);l(D)}}};+App.prototype.save=function(b,g){var l=this.getCurrentFile(),d=!0,q=mxUtils.bind(this,function(){d&&(d=!1,l.handleFileSuccess(!0),null!=g&&g())}),y=mxUtils.bind(this,function(x){if(d){d=!1;Editor.addRetryToError(x,mxUtils.bind(this,function(){this.save(b,g)}));if(null!=x&&null!=x.retry){var D=x.retry;x.retry=function(){d=!0;try{l.isModified()?D():q()}catch(J){y(J)}}}l.handleFileError(x,null==x||"AbortError"!=x.name)}});if(null!=l&&this.spinner.spin(document.body,mxResources.get("saving"),y,3*this.timeout))try{this.editor.setStatus(""),+this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==l.getTitle()?l.save(!0,q,y):l.saveAs(b,q,y)}catch(x){y(x)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};App.prototype.getTitleForService=function(b){return b==App.MODE_GOOGLE?mxResources.get("googleDrive"):b==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):EditorUi.prototype.getTitleForService.apply(this,arguments)};-App.prototype.pickFolder=function(b,f,m,d,t,y){m=null!=m?m:!0;var x=this.spinner.pause();m&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(C){x();if(C.action==google.picker.Action.PICKED){var K=null;null!=C.docs&&0<C.docs.length&&"folder"==C.docs[0].type&&(K=C.docs[0].id);f(y?C:K)}}),t):m&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(C){x();if(null!=C&&null!=C.value&&0<C.value.length){var K=OneDriveFile.prototype.getIdOf(C.value[0]);-f(y?C:K)}}),d):m&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(C){x();f(C)})):m&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(C){x();f(C)})):m&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(C){x();f(C)})):EditorUi.prototype.pickFolder.apply(this,arguments)};-App.prototype.exportFile=function(b,f,m,d,t,y){t==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,d?this.base64ToBlob(b,m):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)})):t==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,y,mxUtils.bind(this,function(x){this.spinner.stop()}),-mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),m,d):t==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,d?this.base64ToBlob(b,m):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),!1,y):t==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,-function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),!0,y,d):t==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),!0,y,d):t==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,d?this.base64ToBlob(b,-m):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),!1,y):t==App.MODE_BROWSER&&(null!=window.StorageFile&&!d&&this.spinner.spin(document.body,mxResources.get("saving"))?(m="<mxlibrary"==b.substring(0,10)?new StorageLibrary(this,b,f):new StorageFile(this,b,f),StorageFile.doInsertFile(m,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}))):(m=mxUtils.bind(this,-function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?m():this.confirm(mxResources.get("replaceIt",[f]),m)))};-App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var f=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,f);this.fname.setAttribute("title",f+" - "+mxResources.get("rename"))}f=this.editor.graph;var m=b.isEditable();f.isEnabled()&&!m&&f.reset();f.setEnabled(m);null==urlParams.rev&&(this.updateDocumentTitle(),f=b.getHash(),0<f.length?(f!=this.getDiagramId()&&-(window.location.hash=f),this.updateHashObject()):0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};-App.prototype.showAuthDialog=function(b,f,m,d){var t=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(y){try{null!=m&&m(y,mxUtils.bind(this,function(){this.hideDialog();t()}))}catch(x){this.editor.setStatus(mxUtils.htmlEntities(x.message))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(y){null!=d&&d(y);y&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};-App.prototype.convertFile=function(b,f,m,d,t,y,x,C){var K=f;/\.svg$/i.test(K)||(K=K.substring(0,f.lastIndexOf("."))+d);var M=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(M=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var N=new XMLHttpRequest;N.open("GET",b,!0);M||(N.responseType="blob");if(C)for(var P in C)N.setRequestHeader(P,C[P]);N.onload=mxUtils.bind(this,function(){if(200<=-N.status&&299>=N.status){var c=null;M?(c=JSON.parse(N.responseText),c=this.base64ToBlob(c.content,"application/octet-stream")):c=new Blob([N.response],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(e){t(new LocalFile(this,e,K,!0))}),y,f)}else null!=y&&y({message:mxResources.get("errorLoadingFile")})});N.onerror=y;N.send()}else{var I=mxUtils.bind(this,function(c){try{if(/\.pdf$/i.test(f)){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&t(new LocalFile(this,-e,K,!0))}else/\.png$/i.test(f)?(e=this.extractGraphModelFromPng(c),null!=e?t(new LocalFile(this,e,K,!0)):t(new LocalFile(this,c,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,b)?this.parseFileData(c,mxUtils.bind(this,function(l){4==l.readyState&&(200<=l.status&&299>=l.status?t(new LocalFile(this,l.responseText,K,!0)):null!=y&&y({message:mxResources.get("errorLoadingFile")}))}),f):t(new LocalFile(this,c,K,!0))}catch(l){null!=y&&y(l)}});m=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||-/\.pdf$/i.test(f)||null!=m&&"image/"==m.substring(0,6);M?mxUtils.get(b,mxUtils.bind(this,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){if(null!=t){c=JSON.parse(c.getText());var e=c.content;"base64"===c.encoding&&(e=/\.png$/i.test(f)?"data:image/png;base64,"+e:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+e:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(e):atob(e));I(e)}}else null!=y&&y({code:App.ERROR_UNKNOWN})}),function(){null!=y&&y({code:App.ERROR_UNKNOWN})},!1,this.timeout,-function(){null!=y&&y({code:App.ERROR_TIMEOUT,retry:fn})},C):null!=x?x(b,I,y,m):this.editor.loadUrl(b,I,y,m,null,null,null,C)}};+App.prototype.pickFolder=function(b,g,l,d,q,y){l=null!=l?l:!0;var x=this.spinner.pause();l&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(D){x();if(D.action==google.picker.Action.PICKED){var J=null;null!=D.docs&&0<D.docs.length&&"folder"==D.docs[0].type&&(J=D.docs[0].id);g(y?D:J)}}),q):l&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(D){x();if(null!=D&&null!=D.value&&0<D.value.length){var J=OneDriveFile.prototype.getIdOf(D.value[0]);+g(y?D:J)}}),d):l&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(D){x();g(D)})):l&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(D){x();g(D)})):l&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(D){x();g(D)})):EditorUi.prototype.pickFolder.apply(this,arguments)};+App.prototype.exportFile=function(b,g,l,d,q,y){q==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(g,d?this.base64ToBlob(b,l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)})):q==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(g,b,y,mxUtils.bind(this,function(x){this.spinner.stop()}),+mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),l,d):q==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(g,d?this.base64ToBlob(b,l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),!1,y):q==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(g,b,mxUtils.bind(this,+function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),!0,y,d):q==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(g,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),!0,y,d):q==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(g,d?this.base64ToBlob(b,+l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),!1,y):q==App.MODE_BROWSER&&(null!=window.StorageFile&&!d&&this.spinner.spin(document.body,mxResources.get("saving"))?(l="<mxlibrary"==b.substring(0,10)?new StorageLibrary(this,b,g):new StorageFile(this,b,g),StorageFile.doInsertFile(l,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}))):(l=mxUtils.bind(this,+function(){localStorage.setItem(g,b)}),null==localStorage.getItem(g)?l():this.confirm(mxResources.get("replaceIt",[g]),l)))};+App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var g=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,g);this.fname.setAttribute("title",g+" - "+mxResources.get("rename"))}g=this.editor.graph;var l=b.isEditable();g.isEnabled()&&!l&&g.reset();g.setEnabled(l);null==urlParams.rev&&(this.updateDocumentTitle(),g=b.getHash(),0<g.length?(g!=this.getDiagramId()&&+(window.location.hash=g),this.updateHashObject()):0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};+App.prototype.showAuthDialog=function(b,g,l,d){var q=this.spinner.pause();this.showDialog((new AuthDialog(this,b,g,mxUtils.bind(this,function(y){try{null!=l&&l(y,mxUtils.bind(this,function(){this.hideDialog();q()}))}catch(x){this.editor.setStatus(mxUtils.htmlEntities(x.message))}}))).container,300,g?180:140,!0,!0,mxUtils.bind(this,function(y){null!=d&&d(y);y&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};+App.prototype.convertFile=function(b,g,l,d,q,y,x,D){var J=g;/\.svg$/i.test(J)||(J=J.substring(0,g.lastIndexOf("."))+d);var K=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(K=!0);if(/\.v(dx|sdx?)$/i.test(g)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var L=new XMLHttpRequest;L.open("GET",b,!0);K||(L.responseType="blob");if(D)for(var N in D)L.setRequestHeader(N,D[N]);L.onload=mxUtils.bind(this,function(){if(200<=+L.status&&299>=L.status){var e=null;K?(e=JSON.parse(L.responseText),e=this.base64ToBlob(e.content,"application/octet-stream")):e=new Blob([L.response],{type:"application/octet-stream"});this.importVisio(e,mxUtils.bind(this,function(f){q(new LocalFile(this,f,J,!0))}),y,g)}else null!=y&&y({message:mxResources.get("errorLoadingFile")})});L.onerror=y;L.send()}else{var c=mxUtils.bind(this,function(e){try{if(/\.pdf$/i.test(g)){var f=Editor.extractGraphModelFromPdf(e);null!=f&&0<f.length&&q(new LocalFile(this,+f,J,!0))}else/\.png$/i.test(g)?(f=this.extractGraphModelFromPng(e),null!=f?q(new LocalFile(this,f,J,!0)):q(new LocalFile(this,e,g,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,b)?this.parseFileData(e,mxUtils.bind(this,function(p){4==p.readyState&&(200<=p.status&&299>=p.status?q(new LocalFile(this,p.responseText,J,!0)):null!=y&&y({message:mxResources.get("errorLoadingFile")}))}),g):q(new LocalFile(this,e,J,!0))}catch(p){null!=y&&y(p)}});l=/\.png$/i.test(g)||/\.jpe?g$/i.test(g)||+/\.pdf$/i.test(g)||null!=l&&"image/"==l.substring(0,6);K?mxUtils.get(b,mxUtils.bind(this,function(e){if(200<=e.getStatus()&&299>=e.getStatus()){if(null!=q){e=JSON.parse(e.getText());var f=e.content;"base64"===e.encoding&&(f=/\.png$/i.test(g)?"data:image/png;base64,"+f:/\.pdf$/i.test(g)?"data:application/pdf;base64,"+f:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(f):atob(f));c(f)}}else null!=y&&y({code:App.ERROR_UNKNOWN})}),function(){null!=y&&y({code:App.ERROR_UNKNOWN})},!1,this.timeout,+function(){null!=y&&y({code:App.ERROR_TIMEOUT,retry:fn})},D):null!=x?x(b,c,y,l):this.editor.loadUrl(b,c,y,l,null,null,null,D)}};App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.backgroundColor="light-dark(#f08705, transparent)";this.appIcon.style.margin="8px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundSize="100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(d){this.appIconClicked(d)}));mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&(d=d.getMode(),d==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):d==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):d==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):d==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):d==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="100% 100%"):d==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70% 70%"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundSize="90% 90%"}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);this.fnameWrapper=document.createElement("div");this.fnameWrapper.style.position="absolute";this.fnameWrapper.style.right="120px";this.fnameWrapper.style.left="60px";this.fnameWrapper.style.top="9px";this.fnameWrapper.style.height="26px";this.fnameWrapper.style.display="none";this.fnameWrapper.style.overflow="hidden";this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",-mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(d){var t=this.getCurrentFile();null!=t&&t.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),-this.actions.get("rename").funct());mxEvent.consume(d)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box",this.menubar.container.style.top="34px");var f="atlas"!=Editor.currentTheme&&"1"!=urlParams.embed?30:10;this.toggleFormatElement=-document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("format")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="atlas"==Editor.currentTheme?"8px":"6px";this.toggleFormatElement.style.right=f+"px";this.toggleFormatElement.style.padding="2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="geButton geAdaptiveAsset";-this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundSize="16px 16px";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);f+=20;mxEvent.addListener(this.toggleFormatElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,-"click",mxUtils.bind(this,function(d){this.actions.get("format").funct();mxEvent.consume(d)}));var m=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+Editor.rightPanelCloseImage+"')":"url('"+Editor.rightPanelOpenImage+"')"});this.addListener("formatWidthChanged",m);m();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage=-"url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=f+"px";this.toolbarContainer.appendChild(this.fullscreenElement);f+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()}));mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(d){var t=this.fullscreenMode;"atlas"!=Editor.currentTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(t);this.toggleShapesPanel(t);this.toggleFormatPanel(t);-this.fullscreenMode=!t;this.fullscreenElement.style.backgroundImage="url('"+(this.fullscreenMode?Editor.fullscreenExitImage:Editor.fullscreenImage)+"')";mxEvent.consume(d)}));"atlas"==Editor.currentTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));"1"!=urlParams.embed&&"atlas"!=Editor.currentTheme&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className=-"geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display="inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",this.toggleElement.style.top="6px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+Editor.chevronUpImage+-"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat="no-repeat",this.toggleElement.style.backgroundSize="16px 16px",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(d){this.toggleCompactMode();mxEvent.consume(d)})),"atlas"!=Editor.currentTheme&&this.toolbarContainer.appendChild(this.toggleElement),-!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,function(){this.toggleElement.click()}),0))}};+mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(d){var q=this.getCurrentFile();null!=q&&q.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),+this.actions.get("rename").funct());mxEvent.consume(d)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box",this.menubar.container.style.top="34px");var g="atlas"!=Editor.currentTheme&&"1"!=urlParams.embed?30:10;this.toggleFormatElement=+document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("format")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.right=g+"px";this.toggleFormatElement.style.padding="2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="geButton geAdaptiveAsset";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height=+"16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundSize="16px 16px";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);g+=20;mxEvent.addListener(this.toggleFormatElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(d){this.actions.get("format").funct();+mxEvent.consume(d)}));var l=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+Editor.rightPanelCloseImage+"')":"url('"+Editor.rightPanelOpenImage+"')"});this.addListener("formatWidthChanged",l);l();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=+g+"px";this.toolbarContainer.appendChild(this.fullscreenElement);g+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()}));mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(d){var q=this.fullscreenMode;"atlas"!=Editor.currentTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(q);this.toggleShapesPanel(q);this.toggleFormatPanel(q);this.fullscreenMode=!q;this.fullscreenElement.style.backgroundImage=+"url('"+(this.fullscreenMode?Editor.fullscreenExitImage:Editor.fullscreenImage)+"')";mxEvent.consume(d)}));"atlas"==Editor.currentTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));"1"!=urlParams.embed&&"atlas"!=Editor.currentTheme&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",+this.toggleElement.style.display="inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+Editor.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat="no-repeat",+this.toggleElement.style.backgroundSize="16px 16px",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(d){this.toggleCompactMode();mxEvent.consume(d)})),"atlas"!=Editor.currentTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,+function(){this.toggleElement.click()}),0))}};App.prototype.toggleCompactMode=function(b){(b=null!=b?b:this.compactMode)?(this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.menubar.container.style.paddingTop="",this.menubar.container.style.paddingBottom="",this.menubar.container.style.top="34px",this.toolbar.container.style.paddingLeft="16px",this.buttonContainer.style.visibility="visible",this.appIcon.style.display="block",this.fnameWrapper.style.display="block",this.fnameWrapper.style.visibility="visible",this.menubarHeight=App.prototype.menubarHeight):(this.menubar.container.style.position="relative",this.menubar.container.style.paddingLeft="4px",this.menubar.container.style.paddingTop="0px",this.menubar.container.style.paddingBottom="0px",this.menubar.container.style.top="0px",this.toolbar.container.style.paddingLeft="8px",this.appIcon.style.display="none",this.fnameWrapper.style.display="none",this.fnameWrapper.style.visibility="hidden",this.menubarHeight=EditorUi.prototype.menubarHeight,"atlas"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&(this.buttonContainer.style.visibility="hidden"));null!=this.toggleElement&&(this.toggleElement.style.backgroundImage="url('"+(b?Editor.chevronUpImage:Editor.chevronDownImage)+"')");this.refresh();this.compactMode=!b};@@ -13928,743 +13927,743 @@ App.prototype.getMainUser=function(){var b=null;null!=this.drive&&null!=this.driApp.prototype.updateUserElement=function(){null==this.userElement&&(this.userElement=this.createUserElement(),this.menubarContainer.appendChild(this.userElement));this.updateUserElementStyle();this.updateUserElementIcon()};App.prototype.updateUserElementStyle=function(){var b=this.userElement;null!=b&&("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme?(b.className="geUser geToolbarButton",b.style.backgroundImage="url("+Editor.userImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="100% 100%",b.style.position="relative",b.style.margin="0px",b.style.padding="0px",b.style.height="24px",b.style.width="24px",b.style.right=""):(b.className="geUser geItem",b.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",b.style.backgroundPosition="100% 70%",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="",b.style.position="absolute",b.style.margin="4px",b.style.padding="2px",b.style.paddingRight="16px",b.style.width="",b.style.height="",b.style.right="atlas"==Editor.currentTheme||null!=this.darkModeElement?"12px":"26px",b.style.top="atlas"==Editor.currentTheme?"8px":"2px"))};-App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=b){var f=this.getCurrentFile(),m=this.getMainUser();if("1"==urlParams.embed||null==f||null==m)b.style.display="none";else{var d=mxResources.get("changeUser");EditorUi.removeChildNodes(b);b.style.display="";b.innerText="";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?mxUtils.write(b,m.displayName):d=m.displayName;if(f.isRealtimeEnabled()&&f.isRealtimeSupported()){m=document.createElement("img");-m.setAttribute("border","0");m.style.position="absolute";m.style.left="16px";m.style.width="12px";m.style.height="12px";m.className="geAdaptiveAsset";var t=f.getRealtimeError();f=f.getRealtimeState();d+=" (";1==f?(m.src=Editor.syncImage,d+=mxResources.get("online")):(m.src=Editor.syncProblemImage,d=null!=t&&null!=t.message?d+t.message:d+mxResources.get("disconnected"));d+=")";"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme?(b.appendChild(m),"min"==Editor.currentTheme&&-(b.style.marginRight="4px")):m.style.top="2px"}b.setAttribute("title",d)}}};App.prototype.hideUserPanel=function(){null!=this.userPanel&&null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)};-App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog";b.style.position="absolute";b.style.zIndex=5;b.style.padding="0px";b.style.cursor="default";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(x){mxEvent.isConsumed(x)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var f=!1;this.userPanel.innerText=-"";b=document.createElement("img");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.className="geDialogClose";b.style.top="8px";b.style.right="8px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var m=this.drive.getUsersList();if(0<m.length){var d=mxUtils.bind(this,function(x,C){var K=this.getCurrentFile();null!=K&&K.constructor==DriveFile?(this.spinner.spin(document.body,-C),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();x()}),2E3)):x()});b=mxUtils.bind(this,function(x){var C=document.createElement("tr"),K=document.createElement("td");K.setAttribute("valig","middle");K.style.height="59px";K.style.width="66px";var M=document.createElement("img");M.setAttribute("width","50");M.setAttribute("height","50");M.setAttribute("border","0");M.setAttribute("src",null!=x.pictureUrl?x.pictureUrl:this.defaultUserPicture);M.style.borderRadius=-"50%";M.style.margin="4px 8px 0 8px";K.appendChild(M);C.appendChild(K);K=document.createElement("td");K.setAttribute("valign","middle");K.style.whiteSpace="nowrap";K.style.paddingTop="4px";K.style.maxWidth="0";K.style.overflow="hidden";K.style.textOverflow="ellipsis";mxUtils.write(K,x.displayName+(x.isCurrent&&1<m.length?" ("+mxResources.get("default")+")":""));null!=x.email&&(mxUtils.br(K),M=document.createElement("small"),M.style.color="gray",mxUtils.write(M,x.email),K.appendChild(M));M=document.createElement("div");-M.style.marginTop="4px";var N=document.createElement("i");mxUtils.write(N,mxResources.get("googleDrive"));M.appendChild(N);K.appendChild(M);C.appendChild(K);x.isCurrent?C.setAttribute("title","User ID: "+x.id):(C.setAttribute("title",mxResources.get("login")+" (User ID: "+x.id+")"),C.style.cursor="pointer",C.style.opacity="0.3",mxEvent.addListener(C,"mouseenter",mxUtils.bind(this,function(){C.style.opacity="1"})),mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(){C.style.opacity="0.3"})),-mxEvent.addListener(C,"click",mxUtils.bind(this,function(P){this.hideUserPanel();d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(x);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(I){this.handleError(I)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(P)})));return C});f=!0;var t=document.createElement("table");t.style.borderSpacing="0";t.style.fontSize="10pt";t.style.width=-"100%";t.style.padding="10px";for(var y=0;y<m.length;y++)t.appendChild(b(m[y]));this.userPanel.appendChild(t);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";t=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);-this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));t.className="geBtn";t.style.float="right";b.appendChild(t);t=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var x=this.drive.createAuthWin();x.blur();window.focus();d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(C){this.handleError(C)}),!0,x)}),mxResources.get("closingFile")+-"...")}));t.className="geBtn";t.style.margin="0px";b.appendChild(t);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(x,C,K,M){if(null!=x){f&&this.userPanel.appendChild(document.createElement("hr"));f=!0;var N=document.createElement("table");N.style.borderSpacing="0";N.style.fontSize="10pt";N.style.width="100%";N.style.padding="10px";var P=document.createElement("tbody"),I=document.createElement("tr"),c=document.createElement("td");c.setAttribute("valig","top");c.style.width="40px";if(null!=-C){var e=document.createElement("img");e.setAttribute("width","40");e.setAttribute("height","40");e.setAttribute("border","0");e.setAttribute("src",C);e.style.marginRight="6px";c.appendChild(e)}I.appendChild(c);c=document.createElement("td");c.setAttribute("valign","middle");c.style.whiteSpace="nowrap";c.style.maxWidth="0";c.style.overflow="hidden";c.style.textOverflow="ellipsis";mxUtils.write(c,x.displayName);null!=x.email&&(mxUtils.br(c),C=document.createElement("small"),C.style.color="gray",mxUtils.write(C,-x.email),c.appendChild(C));null!=M&&(x=document.createElement("div"),x.style.marginTop="4px",C=document.createElement("i"),mxUtils.write(C,M),x.appendChild(C),c.appendChild(x));I.appendChild(c);P.appendChild(I);N.appendChild(P);this.userPanel.appendChild(N);x=document.createElement("div");x.style.textAlign="center";x.style.padding="10px";x.style.whiteSpace="nowrap";null!=K&&(K=mxUtils.button(mxResources.get("signOut"),K),K.className="geBtn",x.appendChild(K));this.userPanel.appendChild(x)}});null!=-this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==DropboxFile){var C=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,C,mxResources.get("cancel"),mxResources.get("discardChanges")):C()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",-this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==OneDriveFile){var C=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,C,mxResources.get("cancel"),mxResources.get("discardChanges")):C()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var x=-this.getCurrentFile();if(null!=x&&x.constructor==GitHubFile){var C=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,C,mxResources.get("cancel"),mxResources.get("discardChanges")):C()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==GitLabFile){var C=-mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,C,mxResources.get("cancel"),mxResources.get("discardChanges")):C()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==TrelloFile){var C=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=-""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,C,mxResources.get("cancel"),mxResources.get("discardChanges")):C()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(t=this.getCurrentFile(),null!=t&&t.isRealtimeEnabled()&&t.isRealtimeSupported()&&(b=document.createElement("div"),b.style.padding="10px",b.style.whiteSpace="nowrap",b.style.borderTop="1px solid rgb(224, 224, 224)",b.style.marginTop="4px",b.style.textAlign="center",b.style.padding="10px",b.style.fontSize=-"9pt",y=t.getRealtimeError(),1!=t.getRealtimeState()&&(mxUtils.write(b,mxResources.get("realtimeCollaboration")+": "+(null!=y&&null!=y.message?y.message:mxResources.get("disconnected"))),this.userPanel.appendChild(b))));document.body.appendChild(this.userPanel)}};-App.prototype.createUserElement=function(){var b=document.createElement("a");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){this.toggleUserPanel();this.userPanel.style.top=b.clientTop+b.clientHeight+6+"px";this.userPanel.style.right="36px";this.userPanel.style.left="";mxEvent.consume(f)}));return b};+App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=b){var g=this.getCurrentFile(),l=this.getMainUser();if("1"==urlParams.embed||null==g||null==l)b.style.display="none";else{var d=mxResources.get("changeUser");EditorUi.removeChildNodes(b);b.style.display="";b.innerText="";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?mxUtils.write(b,l.displayName):d=l.displayName;if(g.isRealtimeEnabled()&&g.isRealtimeSupported()){l=document.createElement("img");+l.setAttribute("border","0");l.style.position="absolute";l.style.left="16px";l.style.width="12px";l.style.height="12px";l.className="geAdaptiveAsset";var q=g.getRealtimeError();g=g.getRealtimeState();d+=" (";1==g?(l.src=Editor.syncImage,d+=mxResources.get("online")):(l.src=Editor.syncProblemImage,d=null!=q&&null!=q.message?d+q.message:d+mxResources.get("disconnected"));d+=")";"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme?(b.appendChild(l),"min"==Editor.currentTheme&&+(b.style.marginRight="4px")):l.style.top="2px"}b.setAttribute("title",d)}}};App.prototype.hideUserPanel=function(){null!=this.userPanel&&null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)};+App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog";b.style.position="absolute";b.style.zIndex=5;b.style.padding="0px";b.style.cursor="default";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(x){mxEvent.isConsumed(x)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var g=!1;this.userPanel.innerText=+"";b=document.createElement("img");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.className="geDialogClose";b.style.top="8px";b.style.right="8px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var l=this.drive.getUsersList();if(0<l.length){var d=mxUtils.bind(this,function(x,D){var J=this.getCurrentFile();null!=J&&J.constructor==DriveFile?(this.spinner.spin(document.body,+D),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();x()}),2E3)):x()});b=mxUtils.bind(this,function(x){var D=document.createElement("tr"),J=document.createElement("td");J.setAttribute("valig","middle");J.style.height="59px";J.style.width="66px";var K=document.createElement("img");K.setAttribute("width","50");K.setAttribute("height","50");K.setAttribute("border","0");K.setAttribute("src",null!=x.pictureUrl?x.pictureUrl:this.defaultUserPicture);K.style.borderRadius=+"50%";K.style.margin="4px 8px 0 8px";J.appendChild(K);D.appendChild(J);J=document.createElement("td");J.setAttribute("valign","middle");J.style.whiteSpace="nowrap";J.style.paddingTop="4px";J.style.maxWidth="0";J.style.overflow="hidden";J.style.textOverflow="ellipsis";mxUtils.write(J,x.displayName+(x.isCurrent&&1<l.length?" ("+mxResources.get("default")+")":""));null!=x.email&&(mxUtils.br(J),K=document.createElement("small"),K.style.color="gray",mxUtils.write(K,x.email),J.appendChild(K));K=document.createElement("div");+K.style.marginTop="4px";var L=document.createElement("i");mxUtils.write(L,mxResources.get("googleDrive"));K.appendChild(L);J.appendChild(K);D.appendChild(J);x.isCurrent?D.setAttribute("title","User ID: "+x.id):(D.setAttribute("title",mxResources.get("login")+" (User ID: "+x.id+")"),D.style.cursor="pointer",D.style.opacity="0.3",mxEvent.addListener(D,"mouseenter",mxUtils.bind(this,function(){D.style.opacity="1"})),mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(){D.style.opacity="0.3"})),+mxEvent.addListener(D,"click",mxUtils.bind(this,function(N){this.hideUserPanel();d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(x);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(c){this.handleError(c)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(N)})));return D});g=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width=+"100%";q.style.padding="10px";for(var y=0;y<l.length;y++)q.appendChild(b(l[y]));this.userPanel.appendChild(q);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";q=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);+this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));q.className="geBtn";q.style.float="right";b.appendChild(q);q=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var x=this.drive.createAuthWin();x.blur();window.focus();d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(D){this.handleError(D)}),!0,x)}),mxResources.get("closingFile")++"...")}));q.className="geBtn";q.style.margin="0px";b.appendChild(q);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(x,D,J,K){if(null!=x){g&&this.userPanel.appendChild(document.createElement("hr"));g=!0;var L=document.createElement("table");L.style.borderSpacing="0";L.style.fontSize="10pt";L.style.width="100%";L.style.padding="10px";var N=document.createElement("tbody"),c=document.createElement("tr"),e=document.createElement("td");e.setAttribute("valig","top");e.style.width="40px";if(null!=+D){var f=document.createElement("img");f.setAttribute("width","40");f.setAttribute("height","40");f.setAttribute("border","0");f.setAttribute("src",D);f.style.marginRight="6px";e.appendChild(f)}c.appendChild(e);e=document.createElement("td");e.setAttribute("valign","middle");e.style.whiteSpace="nowrap";e.style.maxWidth="0";e.style.overflow="hidden";e.style.textOverflow="ellipsis";mxUtils.write(e,x.displayName);null!=x.email&&(mxUtils.br(e),D=document.createElement("small"),D.style.color="gray",mxUtils.write(D,+x.email),e.appendChild(D));null!=K&&(x=document.createElement("div"),x.style.marginTop="4px",D=document.createElement("i"),mxUtils.write(D,K),x.appendChild(D),e.appendChild(x));c.appendChild(e);N.appendChild(c);L.appendChild(N);this.userPanel.appendChild(L);x=document.createElement("div");x.style.textAlign="center";x.style.padding="10px";x.style.whiteSpace="nowrap";null!=J&&(J=mxUtils.button(mxResources.get("signOut"),J),J.className="geBtn",x.appendChild(J));this.userPanel.appendChild(x)}});null!=+this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==DropboxFile){var D=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",+this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==OneDriveFile){var D=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var x=+this.getCurrentFile();if(null!=x&&x.constructor==GitHubFile){var D=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==GitLabFile){var D=+mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==TrelloFile){var D=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=+""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(q=this.getCurrentFile(),null!=q&&q.isRealtimeEnabled()&&q.isRealtimeSupported()&&(b=document.createElement("div"),b.style.padding="10px",b.style.whiteSpace="nowrap",b.style.borderTop="1px solid rgb(224, 224, 224)",b.style.marginTop="4px",b.style.textAlign="center",b.style.padding="10px",b.style.fontSize=+"9pt",y=q.getRealtimeError(),1!=q.getRealtimeState()&&(mxUtils.write(b,mxResources.get("realtimeCollaboration")+": "+(null!=y&&null!=y.message?y.message:mxResources.get("disconnected"))),this.userPanel.appendChild(b))));document.body.appendChild(this.userPanel)}};+App.prototype.createUserElement=function(){var b=document.createElement("a");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){g.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){this.toggleUserPanel();this.userPanel.style.top=b.clientTop+b.clientHeight+6+"px";this.userPanel.style.right="36px";this.userPanel.style.left="";mxEvent.consume(g)}));return b};App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;-Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(m){var d=document.createElement("div");d.setAttribute("title",mxResources.get("help"));d.style.display="inline-flex";d.style.alignItems="center";-d.style.marginLeft="4px";d.style.cursor="help";d.style.color="blue";var t=document.createElement("img");t.setAttribute("src",Editor.helpImage);t.setAttribute("valign","bottom");t.setAttribute("border","0");t.className="geAdaptiveAsset";mxUtils.setOpacity(t,60);t.style.height="16px";t.style.width="16px";d.appendChild(t);mxEvent.addGestureListeners(d,mxUtils.bind(this,function(y){this.editorUi.hideCurrentMenu();this.editorUi.openLink(m);mxEvent.consume(y)}));return d};Menus.prototype.addLinkToItem=-function(m,d){null!=m&&(d=this.createHelpLink(d),d.style.display="inline",d.style.marginLeft="8px",m.firstChild.nextSibling.appendChild(d))};Menus.prototype.removeCustomFont=function(m,d){for(var t=0;t<this.customFonts.length;t++)if(this.customFonts[t].name==m&&this.customFonts[t].url==d){this.customFonts.splice(t,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(m,d){for(var t=0;t<this.customFonts.length;t++)if(this.customFonts[t].name==-m&&this.customFonts[t].url==d)return!0;for(t=0;t<this.defaultFonts.length;t++){var y=this.defaultFonts[t];if("string"!==typeof y&&y.fontFamily==m&&y.fontUrl==d||"string"===typeof y&&y==m&&null==d)return!0}return!1};Menus.prototype.addCustomFont=function(m,d){null==m||this.containsFont(m,d)||(this.customFonts.push({name:m,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var f=Menus.prototype.init;Menus.prototype.init=function(){function m(k,-v,z){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(A,H,R,g,q,F,J,L,Q,U,V,W,X){var Z=parseInt(A);!isNaN(Z)&&0<Z&&(d.exportImage(Z/100,H&&"png"==k,R,g,q&&"png"==k,J,!L,Q,k,V,null,W,X),null!=z&&z(A,H,R,g,q,F,J,L,Q,U,V,W,X))}),!0,v,k,!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(A,H,R,g,-q){d.downloadFile(H&&"png"==k?"xmlpng":k,null,null,A,null,null,R,g,q)}),!1,!0)}f.apply(this,arguments);var d=this.editorUi,t=d.editor.graph,y=mxUtils.bind(t,t.isEnabled);mxClient.IS_SVG||d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(k){return"file"!=k}));d.actions.addAction("new...",function(){var k=d.isOffline(),v=new NewDialog(d,k,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(v.container,-k?350:620,k?70:460,!0,!0,function(z){d.sidebar.hideTooltip();z&&null==d.getCurrentFile()&&d.showSplash()});v.init()});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var k=new NewDialog(d,null,!1,function(v){d.hideDialog();if(null!=v){var z=d.editor.graph.getFreeInsertPoint();t.setSelectionCells(d.importXml(v,Math.max(z.x,20),Math.max(z.y,20),!0,null,null,!0));t.scrollCellToVisible(t.getSelectionCell())}},-null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(k.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});k.init()}})).isEnabled=y;var x=d.actions.addAction("shareCursor",function(){d.setShareCursorPosition(!d.isShareCursorPosition())});x.setToggleAction(!0);x.setSelectedCallback(function(){return d.isShareCursorPosition()});x=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});x.setToggleAction(!0);+Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(l){var d=document.createElement("div");d.setAttribute("title",mxResources.get("help"));d.style.display="inline-flex";d.style.alignItems="center";+d.style.marginLeft="4px";d.style.cursor="help";d.style.color="blue";var q=document.createElement("img");q.setAttribute("src",Editor.helpImage);q.setAttribute("valign","bottom");q.setAttribute("border","0");q.className="geAdaptiveAsset";mxUtils.setOpacity(q,60);q.style.height="16px";q.style.width="16px";d.appendChild(q);mxEvent.addGestureListeners(d,mxUtils.bind(this,function(y){this.editorUi.hideCurrentMenu();this.editorUi.openLink(l);mxEvent.consume(y)}));return d};Menus.prototype.addLinkToItem=+function(l,d){null!=l&&(d=this.createHelpLink(d),d.style.display="inline",d.style.marginLeft="8px",l.firstChild.nextSibling.appendChild(d))};Menus.prototype.removeCustomFont=function(l,d){for(var q=0;q<this.customFonts.length;q++)if(this.customFonts[q].name==l&&this.customFonts[q].url==d){this.customFonts.splice(q,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(l,d){for(var q=0;q<this.customFonts.length;q++)if(this.customFonts[q].name==+l&&this.customFonts[q].url==d)return!0;for(q=0;q<this.defaultFonts.length;q++){var y=this.defaultFonts[q];if("string"!==typeof y&&y.fontFamily==l&&y.fontUrl==d||"string"===typeof y&&y==l&&null==d)return!0}return!1};Menus.prototype.addCustomFont=function(l,d){null==l||this.containsFont(l,d)||(this.customFonts.push({name:l,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var g=Menus.prototype.init;Menus.prototype.init=function(){function l(m,+u,A){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(B,H,T,k,v,G,I,M,P,S,V,W,X){var Z=parseInt(B);!isNaN(Z)&&0<Z&&(d.exportImage(Z/100,H&&"png"==m,T,k,v&&"png"==m,I,!M,P,m,V,null,W,X),null!=A&&A(B,H,T,k,v,G,I,M,P,S,V,W,X))}),!0,u,m,!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(B,H,T,k,+v){d.downloadFile(H&&"png"==m?"xmlpng":m,null,null,B,null,null,T,k,v)}),!1,!0)}g.apply(this,arguments);var d=this.editorUi,q=d.editor.graph,y=mxUtils.bind(q,q.isEnabled);mxClient.IS_SVG||d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(m){return"file"!=m}));d.actions.addAction("new...",function(){var m=d.isOffline(),u=new NewDialog(d,m,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(u.container,+m?350:620,m?70:460,!0,!0,function(A){d.sidebar.hideTooltip();A&&null==d.getCurrentFile()&&d.showSplash()});u.init()});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var m=new NewDialog(d,null,!1,function(u){d.hideDialog();if(null!=u){var A=d.editor.graph.getFreeInsertPoint();q.setSelectionCells(d.importXml(u,Math.max(A.x,20),Math.max(A.y,20),!0,null,null,!0));q.scrollCellToVisible(q.getSelectionCell())}},+null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(m.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});m.init()}})).isEnabled=y;var x=d.actions.addAction("shareCursor",function(){d.setShareCursorPosition(!d.isShareCursorPosition())});x.setToggleAction(!0);x.setSelectedCallback(function(){return d.isShareCursorPosition()});x=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});x.setToggleAction(!0);x.setSelectedCallback(function(){return d.isShowRemoteCursors()});x=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});x.setToggleAction(!0);x.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.POINTS});x=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});x.setToggleAction(!0);x.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.INCHES});x=d.actions.addAction("millimeters",-function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});x.setToggleAction(!0);x.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});x=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)});x.setToggleAction(!0);x.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(k,v){this.addMenuItems(k,["points","inches","millimeters","meters"],-v);"min"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme||d.menus.addMenuItems(k,["-","pageScale"],v)})));x=d.actions.addAction("pageTabs",function(){d.setTabContainerVisible(!d.isTabContainerVisible())});x.setToggleAction(!0);x.setSelectedCallback(function(){return d.isTabContainerVisible()});x=d.actions.addAction("ruler",function(){d.setRulerVisible(!d.isRulerVisible())});x.setEnabled(d.canvasSupported&&9!=document.documentMode);x.setToggleAction(!0);x.setSelectedCallback(function(){return d.isRulerVisible()});+function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});x.setToggleAction(!0);x.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});x=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)});x.setToggleAction(!0);x.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,["points","inches","millimeters","meters"],+u);"min"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme||d.menus.addMenuItems(m,["-","pageScale"],u)})));x=d.actions.addAction("pageTabs",function(){d.setTabContainerVisible(!d.isTabContainerVisible())});x.setToggleAction(!0);x.setSelectedCallback(function(){return d.isTabContainerVisible()});x=d.actions.addAction("ruler",function(){d.setRulerVisible(!d.isRulerVisible())});x.setEnabled(d.canvasSupported&&9!=document.documentMode);x.setToggleAction(!0);x.setSelectedCallback(function(){return d.isRulerVisible()});x=d.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?d.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});x.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;x.setToggleAction(!0);x.setSelectedCallback(function(){return"1"==urlParams.embedInline?Editor.inlineFullscreen:null!=document.fullscreenElement});x=d.actions.put("lightMode",-new Action(mxResources.get("light"),function(k){d.setAndPersistDarkMode(!1)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return!d.isAutoDarkMode(!0)&&!Editor.isDarkMode()});x=d.actions.put("darkMode",new Action(mxResources.get("dark"),function(k){d.setAndPersistDarkMode(!0)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return!d.isAutoDarkMode(!0)&&Editor.isDarkMode()});x=d.actions.put("autoMode",new Action(mxResources.get("automatic"),function(k){d.setAndPersistDarkMode("auto")}));-x.setToggleAction(!0);x.setSelectedCallback(function(){return d.isAutoDarkMode(!0)});0<=mxUtils.indexOf(Editor.themes,"simple")&&(x=d.actions.put("toggleSimpleMode",new Action(mxResources.get("simple"),function(k){d.setCurrentTheme("simple"==Editor.currentTheme?Editor.isDarkMode()?"dark":"kennedy":"simple")})),x.setToggleAction(!0),x.visible="min"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme,x.setSelectedCallback(function(){return"simple"==Editor.currentTheme}));-x=d.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(k){d.setSketchMode(!Editor.sketchMode)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return Editor.sketchMode});d.actions.addAction("properties...",function(){d.getPublicUrl(d.getCurrentFile(),function(k){k=new FilePropertiesDialog(d,k);d.showDialog(k.container,340,200,!0,!0);k.init()})}).isEnabled=y;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(t.isEnabled()){if(null==-d.freehandWindow){var k=!mxClient.IS_IE&&!mxClient.IS_IE11;d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,k?126:90,k)}t.freehand.isDrawing()?t.freehand.stopDrawing():t.freehand.startDrawing();d.freehandWindow.window.setVisible(t.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return y()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var k=document.createElement("div");k.style.whiteSpace="nowrap";var v=-null==d.pages||1>=d.pages.length,z=document.createElement("h3");mxUtils.write(z,mxResources.get("formatXml"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";k.appendChild(z);var A=d.addCheckbox(k,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),H=d.addCheckbox(k,mxResources.get("compressed"),Editor.defaultCompressed),R=d.addCheckbox(k,mxResources.get("allPages"),!v,v);R.style.marginBottom="16px";mxEvent.addListener(A,"change",function(){A.checked?R.setAttribute("disabled",-"disabled"):R.removeAttribute("disabled")});k=new CustomDialog(d,k,mxUtils.bind(this,function(){d.downloadFile("xml",!H.checked,null,!A.checked,v||!R.checked)}),null,mxResources.get("export"));d.showDialog(k.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(k,v,z,A,H,R,g,q,F){g=[];A&&F&&g.push("tags=%7B%7D");k=new EmbedDialog(d,d.createLink(k,-v,!0,A,H,R,null,!0,g,null,z));d.showDialog(k.container,450,240,!0,!0);k.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(k){d.showHtmlDialog(mxResources.get("export"),null,k,function(v,z,A,H,R,g,q,F,J,L,Q,U){d.createHtml(v,z,A,H,R,g,q,F,J,L,Q,mxUtils.bind(this,function(V,W){var X=d.getBaseFilename(q);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+-mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+W+"\n</body>\n</html>";d.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),U)})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport?d.showPrintDialog(mxResources.get("formatPdf"),mxUtils.bind(this,function(k,v){k=null!=d.pages?d.pages.length:1;var z=null==d.pages||1>=d.pages.length,-A=d.getPageIndex(d.currentPage);A=null!=A?A+1:1;d.downloadFile("pdf",null,null,!v.selection,z||!v.allPages&&v.pagesFrom==A&&v.pagesTo==A,!v.crop,v.transparent,v.scale,null,v.grid,v.includeCopy,v.allPages||v.pagesFrom==A&&v.pagesTo==A?null:{from:Math.max(0,Math.min(k-1,v.pagesFrom-1)),to:Math.max(0,Math.min(k-1,v.pagesTo-1))},v.border,v.fit,v.sheetsAcross,v.sheetsDown)})):d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,320,null!=d.pages&&1<d.pages.length&&(d.editor.editable||-"1"!=urlParams["hide-pages"])?350:280,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function k(){null!=v&&v.removeDraft();d.fileLoaded(null)}var v=d.getCurrentFile();null!=v&&v.isModified()?d.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges")):k()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){t.getSelectionCells();if(1==t.getSelectionCount()){var k=t.getSelectionCell(),-v=t.view.getState(k);null!=v&&null!=v.shape&&null!=v.shape.stencil&&(k=new EditShapeDialog(d,k,mxResources.get("editShape")+":",630,400),d.showDialog(k.container,640,480,!0,!1),k.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(k,v){d.spinner.stop();k=new RevisionDialog(d,k,v);d.showDialog(k.container,640,480,!0,!0);k.init()}),mxUtils.bind(this,function(k){d.handleError(null!=-k?k:mxResources.get("notAvailable"))})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");x=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(x.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var k=d.getCurrentFile();null!=-k&&(window.drawdata=d.getFileData(),k=null!=k.getTitle()?k.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(k),null,!0))});"undefined"!==typeof MathJax&&(x=d.actions.addAction("mathematicalTypesetting",function(){var k=new ChangePageSetup(d);k.ignoreColor=!0;k.ignoreImage=!0;k.mathEnabled=!d.isMathEnabled();t.model.execute(k)}),x.setToggleAction(!0),x.setSelectedCallback(function(){return d.isMathEnabled()}),-x.isEnabled=y);x=d.actions.put("defaultAdaptiveColors",new Action(mxResources.get("default")+" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")",function(){var k=new ChangePageSetup(d);k.ignoreColor=!0;k.ignoreImage=!0;k.adaptiveColors="default";t.model.execute(k)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return null==t.adaptiveColors});x=d.actions.put("automaticAdaptiveColors",new Action(mxResources.get("automatic"),function(){var k=new ChangePageSetup(d);k.ignoreColor=-!0;k.ignoreImage=!0;k.adaptiveColors="auto";t.model.execute(k)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return"auto"==t.adaptiveColors});x=d.actions.put("simpleAdaptiveColors",new Action(mxResources.get("simple"),function(){var k=new ChangePageSetup(d);k.ignoreColor=!0;k.ignoreImage=!0;k.adaptiveColors="simple";t.model.execute(k)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return"simple"==t.adaptiveColors});x=d.actions.put("noAdaptiveColors",new Action(mxResources.get("none"),-function(){var k=new ChangePageSetup(d);k.ignoreColor=!0;k.ignoreImage=!0;k.adaptiveColors="none";t.model.execute(k)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return"none"==t.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(k,v){this.addMenuItems(k,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],v)})));isLocalStorage&&(x=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());-mxSettings.save()}),x.setToggleAction(!0),x.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var C=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});C.setToggleAction(!0);C.setSelectedCallback(function(){return C.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var k=t.getSelectionCells(),v=[],z=0;z<k.length;z++)t.getModel().isVertex(k[z])&&v.push(k[z]);0<v.length&&(k=new EditGeometryDialog(d,v),d.showDialog(k.container,-200,270,!0,!0),k.init())},null,null,Editor.ctrlKey+"+Shift+M");d.actions.addAction("copyStyle",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var k=t.getSelectionCell(),v=t.getCellStyle(k,!1);d.copiedStyle={};var z=[],A=[],H;for(H in v)z.push(v[H]),A.push(H);t.copyCellStyles([k],A,z,d.copiedStyle,d.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");d.actions.addAction("pasteStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&null!=d.copiedStyle&&t.pasteCellStyles(t.includeDescendants(t.getSelectionCells()),-d.copiedStyle,d.copiedStyle,!0)},null,null,"Alt+V");d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(k,v,z,A,H,R,g,q,F,J,L,Q,U,V){k=parseInt(k);d.lastExportSvgEditable=H;!isNaN(k)&&0<k&&d.exportSvg(k/100,v,z,A,H,R,g,!q,F,J,Q,U,V)}),!0,d.lastExportSvgEditable,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+-"...",function(){m("png",d.lastExportPngEditable,function(k,v,z,A,H){d.lastExportPngEditable=H})}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){m("jpeg")}));d.actions.put("exportWebp",new Action(mxResources.get("formatWebp")+"...",function(){m("webp")}));x=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var k=mxUtils.sortCells(t.model.getTopmostCells(t.getSelectionCells())),v=mxUtils.getXml(0==k.length?d.editor.getGraphXml():t.encodeCells(k));-d.copyImage(k,v)}),null,null,"Ctrl+Alt+X");x.visible=Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;x=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){t.setShadowVisible(!t.shadowVisible)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return t.shadowVisible});d.actions.put("about",new Action("v"+EditorUi.VERSION,function(k,v){}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):+new Action(mxResources.get("light"),function(m){d.setAndPersistDarkMode(!1)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return!d.isAutoDarkMode(!0)&&!Editor.isDarkMode()});x=d.actions.put("darkMode",new Action(mxResources.get("dark"),function(m){d.setAndPersistDarkMode(!0)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return!d.isAutoDarkMode(!0)&&Editor.isDarkMode()});x=d.actions.put("autoMode",new Action(mxResources.get("automatic"),function(m){d.setAndPersistDarkMode("auto")}));+x.setToggleAction(!0);x.setSelectedCallback(function(){return d.isAutoDarkMode(!0)});0<=mxUtils.indexOf(Editor.themes,"simple")&&(x=d.actions.put("toggleSimpleMode",new Action(mxResources.get("simple"),function(m){d.setCurrentTheme("simple"==Editor.currentTheme?Editor.isDarkMode()?"dark":"kennedy":"simple")})),x.setToggleAction(!0),x.visible="min"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme,x.setSelectedCallback(function(){return"simple"==Editor.currentTheme}));+x=d.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(m){d.setSketchMode(!Editor.sketchMode)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return Editor.sketchMode});d.actions.addAction("properties...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){m=new FilePropertiesDialog(d,m);d.showDialog(m.container,340,200,!0,!0);m.init()})}).isEnabled=y;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(q.isEnabled()){if(null==+d.freehandWindow){var m=!mxClient.IS_IE&&!mxClient.IS_IE11;d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,m?126:90,m)}q.freehand.isDrawing()?q.freehand.stopDrawing():q.freehand.startDrawing();d.freehandWindow.window.setVisible(q.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return y()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var m=document.createElement("div");m.style.whiteSpace="nowrap";var u=+null==d.pages||1>=d.pages.length,A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatXml"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";m.appendChild(A);var B=d.addCheckbox(m,mxResources.get("selectionOnly"),!1,q.isSelectionEmpty()),H=d.addCheckbox(m,mxResources.get("compressed"),Editor.defaultCompressed),T=d.addCheckbox(m,mxResources.get("allPages"),!u,u);T.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?T.setAttribute("disabled",+"disabled"):T.removeAttribute("disabled")});m=new CustomDialog(d,m,mxUtils.bind(this,function(){d.downloadFile("xml",!H.checked,null,!B.checked,u||!T.checked)}),null,mxResources.get("export"));d.showDialog(m.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(m,u,A,B,H,T,k,v,G){k=[];B&&G&&k.push("tags=%7B%7D");m=new EmbedDialog(d,d.createLink(m,+u,!0,B,H,T,null,!0,k,null,A));d.showDialog(m.container,450,240,!0,!0);m.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showHtmlDialog(mxResources.get("export"),null,m,function(u,A,B,H,T,k,v,G,I,M,P,S){d.createHtml(u,A,B,H,T,k,v,G,I,M,P,mxUtils.bind(this,function(V,W){var X=d.getBaseFilename(v);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'++mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+W+"\n</body>\n</html>";d.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),S)})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport?d.showPrintDialog(mxResources.get("formatPdf"),mxUtils.bind(this,function(m,u){m=null!=d.pages?d.pages.length:1;var A=null==d.pages||1>=d.pages.length,+B=d.getPageIndex(d.currentPage);B=null!=B?B+1:1;d.downloadFile("pdf",null,null,!u.selection,A||!u.allPages&&u.pagesFrom==B&&u.pagesTo==B,!u.crop,u.transparent,u.scale,null,u.grid,u.includeCopy,u.allPages||u.pagesFrom==B&&u.pagesTo==B?null:{from:Math.max(0,Math.min(m-1,u.pagesFrom-1)),to:Math.max(0,Math.min(m-1,u.pagesTo-1))},u.border,u.fit,u.sheetsAcross,u.sheetsDown)})):d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,320,null!=d.pages&&1<d.pages.length&&(d.editor.editable||+"1"!=urlParams["hide-pages"])?350:280,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function m(){null!=u&&u.removeDraft();d.fileLoaded(null)}var u=d.getCurrentFile();null!=u&&u.isModified()?d.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges")):m()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){q.getSelectionCells();if(1==q.getSelectionCount()){var m=q.getSelectionCell(),+u=q.view.getState(m);null!=u&&null!=u.shape&&null!=u.shape.stencil&&(m=new EditShapeDialog(d,m,mxResources.get("editShape")+":",630,400),d.showDialog(m.container,640,480,!0,!1),m.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(m,u){d.spinner.stop();m=new RevisionDialog(d,m,u);d.showDialog(m.container,640,480,!0,!0);m.init()}),mxUtils.bind(this,function(m){d.handleError(null!=+m?m:mxResources.get("notAvailable"))})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");x=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(x.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var m=d.getCurrentFile();null!=+m&&(window.drawdata=d.getFileData(),m=null!=m.getTitle()?m.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(m),null,!0))});"undefined"!==typeof MathJax&&(x=d.actions.addAction("mathematicalTypesetting",function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.mathEnabled=!d.isMathEnabled();q.model.execute(m)}),x.setToggleAction(!0),x.setSelectedCallback(function(){return d.isMathEnabled()}),+x.isEnabled=y);x=d.actions.put("defaultAdaptiveColors",new Action(mxResources.get("default")+" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")",function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.adaptiveColors="default";q.model.execute(m)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return null==q.adaptiveColors});x=d.actions.put("automaticAdaptiveColors",new Action(mxResources.get("automatic"),function(){var m=new ChangePageSetup(d);m.ignoreColor=+!0;m.ignoreImage=!0;m.adaptiveColors="auto";q.model.execute(m)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return"auto"==q.adaptiveColors});x=d.actions.put("simpleAdaptiveColors",new Action(mxResources.get("simple"),function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.adaptiveColors="simple";q.model.execute(m)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return"simple"==q.adaptiveColors});x=d.actions.put("noAdaptiveColors",new Action(mxResources.get("none"),+function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.adaptiveColors="none";q.model.execute(m)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return"none"==q.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],u)})));isLocalStorage&&(x=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());+mxSettings.save()}),x.setToggleAction(!0),x.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var D=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});D.setToggleAction(!0);D.setSelectedCallback(function(){return D.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var m=q.getSelectionCells(),u=[],A=0;A<m.length;A++)q.getModel().isVertex(m[A])&&u.push(m[A]);0<u.length&&(m=new EditGeometryDialog(d,u),d.showDialog(m.container,+200,270,!0,!0),m.init())},null,null,Editor.ctrlKey+"+Shift+M");d.actions.addAction("copyStyle",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var m=q.getSelectionCell(),u=q.getCellStyle(m,!1);d.copiedStyle={};var A=[],B=[],H;for(H in u)A.push(u[H]),B.push(H);q.copyCellStyles([m],B,A,d.copiedStyle,d.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");d.actions.addAction("pasteStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&null!=d.copiedStyle&&q.pasteCellStyles(q.includeDescendants(q.getSelectionCells()),+d.copiedStyle,d.copiedStyle,!0)},null,null,"Alt+V");d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(m,u,A,B,H,T,k,v,G,I,M,P,S,V){m=parseInt(m);d.lastExportSvgEditable=H;!isNaN(m)&&0<m&&d.exportSvg(m/100,u,A,B,H,T,k,!v,G,I,P,S,V)}),!0,d.lastExportSvgEditable,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")++"...",function(){l("png",d.lastExportPngEditable,function(m,u,A,B,H){d.lastExportPngEditable=H})}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){l("jpeg")}));d.actions.put("exportWebp",new Action(mxResources.get("formatWebp")+"...",function(){l("webp")}));x=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var m=mxUtils.sortCells(q.model.getTopmostCells(q.getSelectionCells())),u=mxUtils.getXml(0==m.length?d.editor.getGraphXml():q.encodeCells(m));+d.copyImage(m,u)}),null,null,"Ctrl+Alt+X");x.visible=Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;x=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){q.setShadowVisible(!q.shadowVisible)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return q.shadowVisible});d.actions.put("about",new Action("v"+EditorUi.VERSION,function(m,u){}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",-function(){var k=new FeedbackDialog(d);d.showDialog(k.container,610,360,!0,!1);k.init()});d.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?d.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});x=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,+function(){var m=new FeedbackDialog(d);d.showDialog(m.container,610,360,!0,!1);m.init()});d.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?d.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});x=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");x.setToggleAction(!0);x.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModel||null==Editor.gptUrl||d.isOffline()||EditorUi.isElectronApp||(x=d.actions.addAction("chatWindowTitle",mxUtils.bind(this,function(){null==this.chatWindow?(this.chatWindow=new ChatWindow(d,220,document.body.offsetHeight-380,250,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("chat"))})),this.chatWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("chat"))):-this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),x.setToggleAction(!0),x.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));x=d.actions.addAction("findReplace",mxUtils.bind(this,function(k,v){var z=(k=t.isEnabled()&&(null==v||!mxEvent.isShiftDown(v)))?"findReplace":"find";v=z+"Window";if(null==this[v]){var A="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,H=k?A?330:-300:240;this[v]=new FindWindow(d,document.body.offsetWidth-(H+20),100,H,k?A?304:288:170,k);this[v].window.addListener("show",function(){d.fireEvent(new mxEventObject(z))});this[v].window.addListener("hide",function(){d.fireEvent(new mxEventObject(z))});this[v].window.setVisible(!0)}else this[v].window.setVisible(!this[v].window.isVisible())}),null,null,Editor.ctrlKey+"+F");x.setToggleAction(!0);x.setSelectedCallback(mxUtils.bind(this,function(){var k=t.isEnabled()?"findReplaceWindow":"findWindow";-return null!=this[k]&&this[k].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var k=null==d.pages||1>=d.pages.length;if(k)d.exportVisio();else{var v=document.createElement("div");v.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("formatVsdx"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(z);var A=d.addCheckbox(v,mxResources.get("allPages"),-!k,k);A.style.marginBottom="16px";k=new CustomDialog(d,v,mxUtils.bind(this,function(){d.exportVisio(!A.checked)}),null,mxResources.get("export"));d.showDialog(k.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",function(){var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.marginRight="8px";k.checked=mxSettings.getShowStartScreen();k.defaultChecked=k.checked;if(Editor.isSettingsEnabled()&&("sketch"==-Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var v=document.createElement("span");v.style.display="flex";v.style.alignItems="center";v.style["float"]="right";v.style.cursor="pointer";v.style.userSelect="none";v.style.marginTop="-3px";v.appendChild(k);mxUtils.write(v,mxResources.get("showStartScreen"));mxEvent.addListener(v,"click",function(A){mxEvent.getSource(A)!=k&&(k.checked=!k.checked)});header=v}v=[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),-function(){try{localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(A){d.handleError(A)}})}]];if(!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS){var z=d.actions.get("plugins");null==z||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||v.push([mxResources.get("plugins"),z.funct])}EditorUi.isElectronApp||v.push([mxResources.get("link"),function(A,H){if(0<H.value.length)try{var R=-JSON.parse(H.value),g=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(R)),q=new EmbedDialog(d,g);d.showDialog(q.container,450,240,!0);q.init()}catch(F){d.handleError(F)}else d.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=d.getServiceName()&&"1"!=urlParams.embed&&v.push([mxResources.get("preferences"),function(){d.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),-function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(A){d.handleError(A)}})}]])}]);d.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,v,k.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=k.parentNode&&(mxSettings.setShowStartScreen(k.checked),mxSettings.save())})});-if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(k,v){var z=mxLanguage;null==urlParams.lang&&isLocalStorage&&(z=mxSettings.settings.language);var A=mxUtils.bind(this,function(R){var g=""==R?mxResources.get("automatic"):mxLanguageMap[R],q=null;""!=g&&(q=k.addItem(g,null,mxUtils.bind(this,function(){d.setAndPersistLanguage(R);d.alert(mxResources.get("restartForChangeRequired"))}),v),(R==z||""==R&&null==z)&&k.addCheckmark(q,Editor.checkmarkImage));return q});-A("");k.addSeparator(v);for(var H in mxLanguageMap)A(H)})));var K=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(k){var v=K.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=v&&Editor.enableSimpleTheme&&"atlassian"!=d.getServiceName()){var z=this.get("dynamicAppearance");if(null!=z){var A=v.addMenu("",z.funct);A.setAttribute("title",mxResources.get("appearance"));A.className="geToolbarButton geAdaptiveAsset";A.style.backgroundPosition="center center";-A.style.backgroundRepeat="no-repeat";A.style.backgroundSize="100% 100%";A.style.display="inline-block";A.style.cursor="pointer";A.style.zIndex="1";A.style.position="absolute";A.style.height="18px";A.style.width="18px";"atlas"==Editor.currentTheme?(A.style.filter="invert(100%)",A.style.right="11px",A.style.top="10px"):(A.style.right="10px",A.style.top="5px");document.body.appendChild(A);v.langIcon=A;z=mxUtils.bind(this,function(){var H=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;-A.style.display="atlas"==Editor.currentTheme||"min"==Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";A.style.backgroundImage="simple"==Editor.currentTheme?750>H?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()?Editor.thinDarkImage:Editor.thinLightImage)+")":"url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",z);this.editorUi.addListener("darkModeChanged",z);mxEvent.addListener(window,"resize",-z);z()}}return v}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){d.showCustomLayoutDialog(JSON.stringify(d.customLayoutConfig,null,2))});d.actions.put("adaptiveColors",new Action("adaptiveColors",function(k){null==d.adaptiveColorsWindow&&(d.adaptiveColorsWindow=new AdaptiveColorsWindow(d,document.body.offsetWidth-520,80,200,160));-d.adaptiveColorsWindow.window.setVisible(!0)}));x=this.get("viewZoom");var M=x.funct;x.funct=mxUtils.bind(this,function(k,v){M.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(k,["-","outline","fullscreen"],v)});x=this.get("layout");var N=x.funct;x.funct=function(k,v){N.apply(this,arguments);k.addItem(mxResources.get("orgChart"),null,function(){var z=null,A=20,H=20,R=function(){"undefined"!==typeof mxOrgChartLayout&&null!=z&&d.tryAndHandle(mxUtils.bind(this,-function(){var V=d.editor.graph,W=new mxOrgChartLayout(V,z,A,H),X=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(X=V.getSelectionCell());W.execute(X)}))},g=document.createElement("div"),q=document.createElement("div");q.style.marginTop="6px";q.style.display="inline-block";q.style.width="180px";mxUtils.write(q,mxResources.get("orgChartType")+": ");g.appendChild(q);var F=document.createElement("select");F.style.width="160px";F.style.boxSizing="border-box";q=[mxResources.get("linear"),-mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var J=0;J<q.length;J++){var L=document.createElement("option");mxUtils.write(L,q[J]);L.value=J;2==J&&L.setAttribute("selected","selected");F.appendChild(L)}mxEvent.addListener(F,"change",function(){z=F.value});g.appendChild(F);q=document.createElement("div");q.style.marginTop="6px";q.style.display=-"inline-block";q.style.width="180px";mxUtils.write(q,mxResources.get("parentChildSpacing")+": ");g.appendChild(q);var Q=document.createElement("input");Q.type="number";Q.value=A;Q.style.width="160px";Q.style.boxSizing="border-box";g.appendChild(Q);mxEvent.addListener(Q,"change",function(){A=Q.value});q=document.createElement("div");q.style.marginTop="6px";q.style.display="inline-block";q.style.width="180px";mxUtils.write(q,mxResources.get("siblingSpacing")+": ");g.appendChild(q);var U=document.createElement("input");-U.type="number";U.value=H;U.style.width="160px";U.style.boxSizing="border-box";g.appendChild(U);mxEvent.addListener(U,"change",function(){H=U.value});q=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(F.value),parentChildSpacing:parseInt(Q.value),siblingSpacing:parseInt(U.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(V,null,2))});q.className="geBtn";g=new CustomDialog(d,g,function(){null==z&&(z=2);d.loadOrgChartLayouts(R)},-null,null,null,q);d.showDialog(g.container,355,140,!0,!0)},v,null,y());k.addSeparator(v);k.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){d.tryAndHandle(mxUtils.bind(this,function(){var z=new mxParallelEdgeLayout(t);z.checkOverlap=!0;d.prompt(mxResources.get("spacing"),z.spacing,mxUtils.bind(this,function(A){d.tryAndHandle(mxUtils.bind(this,function(){z.spacing=A;d.executeLayout(function(){z.execute(t.getDefaultParent(),t.isSelectionEmpty()?null:t.getSelectionCells())},!1)}))}))}))}),-v);k.addSeparator(v);d.menus.addMenuItem(k,"runLayout",v,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(k,v){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(k,["keyboardShortcuts","-","about"],v);else{var z=k.addItem("Search:",null,null,v,null,null,!1);z.style.cursor="default";var A=document.createElement("input");A.setAttribute("type","text");A.setAttribute("size","25");A.style.borderWidth="1px";A.style.marginLeft="8px";mxEvent.addListener(A,-"keydown",mxUtils.bind(this,function(H){var R=mxUtils.trim(A.value);13==H.keyCode&&0<R.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(R)),A.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:R}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==H.keyCode&&(A.value="")}));z.firstChild.nextSibling.appendChild(A);mxEvent.addGestureListeners(A,-function(H){document.activeElement!=A&&A.focus();mxEvent.consume(H)},function(H){mxEvent.consume(H)},function(H){mxEvent.consume(H)});window.setTimeout(function(){A.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.drawio.com")}),d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),d.actions.put("desktopZoomIn",new Action(mxResources.get("zoomIn"),function(){d.desktopZoomIn()})),d.actions.put("desktopZoomOut",new Action(mxResources.get("zoomOut"),-function(){d.desktopZoomOut()})),d.actions.put("desktopResetZoom",new Action(mxResources.get("actualSize"),function(){d.desktopResetZoom()})),this.addMenuItems(k,"- keyboardShortcuts quickStart website support -".split(" "),v),"1"!=urlParams.disableUpdate&&this.addMenuItems(k,["check4Updates","-"],v),this.addMenuItems(k,"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),v)):this.addMenuItems(k,"- keyboardShortcuts quickStart support - about".split(" "),v)}"1"==urlParams.test&&-(k.addSeparator(v),this.addSubmenu("testDevelop",k,v))})));d.actions.addAction("languageCode...",function(){var k=new FilenameDialog(d,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(v){null!=v&&(Graph.diagramLanguage=0<v.length?v:null,Graph.translateDiagram=!0,t.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");d.showDialog(k.container,340,80,!0,!0);k.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(k,-v){this.addMenuItems(k,["languageCode","-"],v);v=k.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;t.refresh()},v);Graph.translateDiagram||k.addCheckmark(v,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");-mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!t.isSelectionEmpty()){var k=t.cloneCells(t.getSelectionCells()),v=t.getBoundingBoxFromGeometry(k,-!0);k=t.moveCells(k,-v.x,-v.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+v.width+", "+v.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(t.encodeCells(k)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function k(g){return null==g||null==g.boundingBox||!isNaN(g.boundingBox.x)&&!isNaN(g.boundingBox.y)&&!isNaN(g.boundingBox.width)&&!isNaN(g.boundingBox.height)}var v=t.getGraphBounds(),z=t.view.translate,A=t.view.scale;t.insertVertex(t.getDefaultParent(),-null,"",v.x/A-z.x,v.y/A-z.y,v.width/A,v.height/A,"fillColor=none;strokeColor=red;");var H=0,R=0;t.view.states.visit(function(g,q){g=!0;k(q.shape)||(console.log("invalid shape",q.cell.id,q.shape),g=!1);k(q.text)||(console.log("invalid text",q.cell.id,q.text),g=!1);g||H++;R++});console.log("states checked",R,"invalid",H)}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var k=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";k=new TextareaDialog(d,-"Paste Data:",k,function(v){if(0<v.length)try{var z=function(q){function F(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=Q[ba]){for(;0<Q[ba].length;){var ea=Q[ba].pop();F(ea)}delete Q[ba]}}else mxLog.debug(J+": Visited: "+ba)}var J=q.parentNode.id,L=q.childNodes;q={};for(var Q={},U=null,V={},W=0;W<L.length;W++){var X=L[W];if(null!=X.id&&0<X.id.length)if(null==q[X.id]){q[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=U?mxLog.debug(J+": Multiple roots: "+X.id):U=X.id:(null==Q[Z]&&(Q[Z]=[]),Q[Z].push(X.id))}else V[X.id]=-X.id}L=Object.keys(V);0<L.length?(L=J+": "+L.length+" Duplicates: "+L.join(", "),mxLog.debug(L+" (see console)")):mxLog.debug(J+": Checked");var Y={};null==U?mxLog.debug(J+": No root"):(F(U),Object.keys(Y).length!=Object.keys(q).length&&(mxLog.debug(J+": Invalid tree: (see console)"),console.log(J+": Invalid tree",Q)))};"<"!=v.charAt(0)&&(v=Graph.decompress(v),mxLog.debug("See console for uncompressed XML"),console.log("xml",v));var A=mxUtils.parseXml(v),H=d.getPagesForNode(A.documentElement,"mxGraphModel");-if(null!=H&&0<H.length)try{var R=d.getHashValueForPages(H);mxLog.debug("Checksum: ",R)}catch(q){mxLog.debug("Error: ",q.message)}else mxLog.debug("No pages found for checksum");var g=A.getElementsByTagName("root");for(v=0;v<g.length;v++)z(g[v]);mxLog.show()}catch(q){d.handleError(q),null!=window.console&&console.error(q)}});d.showDialog(k.container,620,460,!0,!0);k.init()}));var P=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var k=new TextareaDialog(d,"Diff/Sync:",-"",function(v){var z=d.getCurrentFile();if(0<v.length&&null!=z)try{var A=JSON.parse(v);z.patch([A],null,!0,!0);d.hideDialog()}catch(H){d.handleError(H)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(v,z){P=d.getPagesForXml(d.getFileData(!0));k.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(P)}],["Diff",function(v,z){try{k.textarea.value=JSON.stringify(d.diffPages(P,d.pages),null,2)}catch(A){d.handleError(A)}}]]);null==P?-(P=d.getPagesForXml(d.getFileData(!0)),k.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(P)):k.textarea.value=JSON.stringify(d.diffPages(P,d.pages),null,2);d.showDialog(k.container,620,460,!0,!0);k.init()}else d.alert("No pages")}));d.actions.addAction("testChecksum",mxUtils.bind(this,function(){var k=d.getCurrentFile();null!=d.pages&&null!=k?d.spinner.spin(document.body,mxResources.get("loading"))&&k.getLatestVersion(function(v){d.spinner.stop();-var z=d.getHashValueForPages(d.pages),A=k.getCurrentRevisionId(),H=d.getHashValueForPages(v.getShadowPages()),R=v.getDescriptorChecksum(v.getDescriptor()),g=v.getCurrentRevisionId();console.log("Local File",[k],"modified",k.isModified(),"checksum",z);console.log("Remote File",[v],"rev",g==A,"desc",R==H,"checksum",H);d.alert("Checksums "+(H==z?"match":"no not match"))},function(v){console.log("Error getLatestVersion",v);d.handleError(v)}):console.log("Checksum: no file or pages")}));d.actions.addAction("testCheckPages",-mxUtils.bind(this,function(){var k=d.getCurrentFile();console.log("editorUi",d,"file",k);if(null!=k&&k.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(k.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(k.theirPages));console.log("diff ownPages/theirPages",d.diffPages(k.ownPages,k.theirPages));var v=k.getShadowPages();null!=v&&(console.log("Checksum shadowPages",d.getHashValueForPages(v)),console.log("diff shadowPages/ownPages",d.diffPages(v,k.ownPages)),console.log("diff ownPages/shadowPages",-d.diffPages(k.ownPages,v)),console.log("diff theirPages/shadowPages",d.diffPages(k.theirPages,v)));null!=k.sync&&null!=k.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(k.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(k.ownPages,k.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(k.theirPages,k.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(k.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",-d.diffPages(k.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(k.theirPages,d.pages)))}null!=k&&console.log("Shadow pages",[d.getXmlForPages(k.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var k=d.getCurrentFile();null!=k&&k.isRealtime()&&null!=k.shadowPages&&(console.log("patching actualPages to shadowPages",k.patch([d.diffPages(k.shadowPages,-d.pages)])),k.ownPages=d.clonePages(d.pages),k.theirPages=d.clonePages(d.pages),k.shadowPages=d.clonePages(d.pages),null!=k.sync&&(k.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){t.model.beginUpdate();try{var k=t.model.cells,v=0,z=[],A=[],H;for(H in k){var R=k[H],g=t.getCurrentCellStyle(R)[mxConstants.STYLE_IMAGE];null!=g&&"data:"==g.substring(0,5)&&(null==z[g]&&(z[g]=(z[g]||0)+1,v++),A.push(R))}t.setCellStyles(mxConstants.STYLE_IMAGE,null,-A);console.log("Removed",v,"image(s) from",A.length,"cell(s): ",[A,z])}finally{t.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,t.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var k=new mxImageExport,v=t.getGraphBounds(),z=t.view.scale,A=mxUtils.createXmlDocument(),H=A.createElement("output");A.appendChild(H);A=new mxXmlCanvas2D(H);A.translate(Math.floor((1-v.x)/z),Math.floor((1-v.y)/z));A.scale(1/z);var R=-0,g=A.save;A.save=function(){R++;g.apply(this,arguments)};var q=A.restore;A.restore=function(){R--;q.apply(this,arguments)};var F=k.drawShape;k.drawShape=function(J){mxLog.debug("entering shape",J,R);F.apply(this,arguments);mxLog.debug("leaving shape",J,R)};k.drawState(t.getView().getState(t.model.root),A);mxLog.show();mxLog.debug(mxUtils.getXml(H));mxLog.debug("stateCounter",R)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=-mxPopupMenu.prototype.zIndex-2});var I=null,c=null,e=null,l=null,n=null,p=null,u=null,B=null;d.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=I?(t.view.revalidate=I,I=null):(I=t.view.revalidate,t.view.revalidate=function(){var k=Date.now(),v=I.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-k+" ms","args",arguments);return v});null!=c?(d.selectPage=c,c=null):(c=d.selectPage,d.selectPage=function(){var k=Date.now(),v=c.apply(this,-arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-k+" ms","args",arguments);return v});null!=e?(d.diffPages=e,e=null):(e=d.diffPages,d.diffPages=function(){var k=Date.now(),v=e.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-k+" ms","args",arguments);return v});null!=l?(d.patchPages=l,l=null):(l=d.patchPages,d.patchPages=function(){var k=Date.now(),v=l.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",-[this],"time",Date.now()-k+" ms","args",arguments);return v});null!=n?(d.clonePages=n,n=null):(n=d.clonePages,d.clonePages=function(){var k=Date.now(),v=n.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-k+" ms","args",arguments);return v});null!=u?(d.getHashValueForPages=u,u=null):(u=d.getHashValueForPages,d.getHashValueForPages=function(){var k=Date.now(),v=u.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],-"time",Date.now()-k+" ms","args",arguments);return v});null!=B?(d.resolveCrossReferences=B,B=null):(B=d.resolveCrossReferences,d.resolveCrossReferences=function(){var k=Date.now(),v=B.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-k+" ms","args",arguments);return v});null!=p?(d.getFileData=p,p=null):(p=d.getFileData,d.getFileData=function(){var k=Date.now(),v=p.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",-[this],"time",Date.now()-k+" ms","args",arguments);return v});EditorUi.debug("[Performance]",null!=I?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(k,v){this.addMenuItems(k,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),v);var z=k.addItem(mxResources.get("testPerformance"),null,function(){d.actions.get("testPerformance").funct()},v);null!=I&&k.addCheckmark(z,-Editor.checkmarkImage);this.addMenuItems(k,["-","testShowConsole"],v)})))}d.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(k){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)}));d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(k){t.isEnabled()&&-(k=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),k.vertex=!0,k=new EditShapeDialog(d,k,mxResources.get("editShape")+":",630,400),d.showDialog(k.container,640,480,!0,!1),k.init())})).isEnabled=y;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(k){d.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",k,function(v,z,A,H,R,g,q,F,J,L,Q,U){d.createHtml(v,z,A,H,R,g,q,F,-J,L,Q,mxUtils.bind(this,function(V,W){var X=new EmbedDialog(d,"\x3c!-- "+d.editor.appName+" diagram --\x3e\n"+V+"\n"+W+"\n",null,null,function(){var Z=window.open(),Y=Z.document;if(null!=Y){"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(V);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Y.writeln(W);+this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),x.setToggleAction(!0),x.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));x=d.actions.addAction("findReplace",mxUtils.bind(this,function(m,u){var A=(m=q.isEnabled()&&(null==u||!mxEvent.isShiftDown(u)))?"findReplace":"find";u=A+"Window";if(null==this[u]){var B="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,H=m?B?330:+300:240;this[u]=new FindWindow(d,document.body.offsetWidth-(H+20),100,H,m?B?304:288:170,m);this[u].window.addListener("show",function(){d.fireEvent(new mxEventObject(A))});this[u].window.addListener("hide",function(){d.fireEvent(new mxEventObject(A))});this[u].window.setVisible(!0)}else this[u].window.setVisible(!this[u].window.isVisible())}),null,null,Editor.ctrlKey+"+F");x.setToggleAction(!0);x.setSelectedCallback(mxUtils.bind(this,function(){var m=q.isEnabled()?"findReplaceWindow":"findWindow";+return null!=this[m]&&this[m].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var m=null==d.pages||1>=d.pages.length;if(m)d.exportVisio();else{var u=document.createElement("div");u.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatVsdx"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(A);var B=d.addCheckbox(u,mxResources.get("allPages"),+!m,m);B.style.marginBottom="16px";m=new CustomDialog(d,u,mxUtils.bind(this,function(){d.exportVisio(!B.checked)}),null,mxResources.get("export"));d.showDialog(m.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",function(){var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.marginRight="8px";m.checked=mxSettings.getShowStartScreen();m.defaultChecked=m.checked;if(Editor.isSettingsEnabled()&&("sketch"==+Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var u=document.createElement("span");u.style.display="flex";u.style.alignItems="center";u.style["float"]="right";u.style.cursor="pointer";u.style.userSelect="none";u.style.marginTop="-3px";u.appendChild(m);mxUtils.write(u,mxResources.get("showStartScreen"));mxEvent.addListener(u,"click",function(B){mxEvent.getSource(B)!=m&&(m.checked=!m.checked)});header=u}u=[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),+function(){try{localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(B){d.handleError(B)}})}]];if(!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS){var A=d.actions.get("plugins");null==A||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||u.push([mxResources.get("plugins"),A.funct])}EditorUi.isElectronApp||u.push([mxResources.get("link"),function(B,H){if(0<H.value.length)try{var T=+JSON.parse(H.value),k=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(T)),v=new EmbedDialog(d,k);d.showDialog(v.container,450,240,!0);v.init()}catch(G){d.handleError(G)}else d.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=d.getServiceName()&&"1"!=urlParams.embed&&u.push([mxResources.get("preferences"),function(){d.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),+function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(B){d.handleError(B)}})}]])}]);d.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,u,m.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=m.parentNode&&(mxSettings.setShowStartScreen(m.checked),mxSettings.save())})});+if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(m,u){var A=mxLanguage;null==urlParams.lang&&isLocalStorage&&(A=mxSettings.settings.language);var B=mxUtils.bind(this,function(T){var k=""==T?mxResources.get("automatic"):mxLanguageMap[T],v=null;""!=k&&(v=m.addItem(k,null,mxUtils.bind(this,function(){d.setAndPersistLanguage(T);d.alert(mxResources.get("restartForChangeRequired"))}),u),(T==A||""==T&&null==A)&&m.addCheckmark(v,Editor.checkmarkImage));return v});+B("");m.addSeparator(u);for(var H in mxLanguageMap)B(H)})));var J=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(m){var u=J.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=u&&Editor.enableSimpleTheme&&"atlassian"!=d.getServiceName()){var A=this.get("dynamicAppearance");if(null!=A){var B=u.addMenu("",A.funct);B.setAttribute("title",mxResources.get("appearance"));B.className="geToolbarButton geAdaptiveAsset";B.style.backgroundPosition="center center";+B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="100% 100%";B.style.display="inline-block";B.style.cursor="pointer";B.style.zIndex="1";B.style.position="absolute";B.style.height="18px";B.style.width="18px";"atlas"==Editor.currentTheme?(B.style.filter="invert(100%)",B.style.right="11px",B.style.top="10px"):(B.style.right="10px",B.style.top="5px");document.body.appendChild(B);u.langIcon=B;A=mxUtils.bind(this,function(){var H=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;+B.style.display="atlas"==Editor.currentTheme||"min"==Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";B.style.backgroundImage="simple"==Editor.currentTheme?750>H?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()?Editor.thinDarkImage:Editor.thinLightImage)+")":"url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",A);this.editorUi.addListener("darkModeChanged",A);mxEvent.addListener(window,"resize",+A);A()}}return u}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){d.showCustomLayoutDialog(JSON.stringify(d.customLayoutConfig,null,2))});d.actions.put("adaptiveColors",new Action("adaptiveColors",function(m){null==d.adaptiveColorsWindow&&(d.adaptiveColorsWindow=new AdaptiveColorsWindow(d,document.body.offsetWidth-520,80,200,160));+d.adaptiveColorsWindow.window.setVisible(!0)}));x=this.get("viewZoom");var K=x.funct;x.funct=mxUtils.bind(this,function(m,u){K.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(m,["-","outline","fullscreen"],u)});x=this.get("layout");var L=x.funct;x.funct=function(m,u){L.apply(this,arguments);m.addItem(mxResources.get("orgChart"),null,function(){var A=null,B=20,H=20,T=function(){"undefined"!==typeof mxOrgChartLayout&&null!=A&&d.tryAndHandle(mxUtils.bind(this,+function(){var V=d.editor.graph,W=new mxOrgChartLayout(V,A,B,H),X=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(X=V.getSelectionCell());W.execute(X)}))},k=document.createElement("div"),v=document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("orgChartType")+": ");k.appendChild(v);var G=document.createElement("select");G.style.width="160px";G.style.boxSizing="border-box";v=[mxResources.get("linear"),+mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var I=0;I<v.length;I++){var M=document.createElement("option");mxUtils.write(M,v[I]);M.value=I;2==I&&M.setAttribute("selected","selected");G.appendChild(M)}mxEvent.addListener(G,"change",function(){A=G.value});k.appendChild(G);v=document.createElement("div");v.style.marginTop="6px";v.style.display=+"inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("parentChildSpacing")+": ");k.appendChild(v);var P=document.createElement("input");P.type="number";P.value=B;P.style.width="160px";P.style.boxSizing="border-box";k.appendChild(P);mxEvent.addListener(P,"change",function(){B=P.value});v=document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("siblingSpacing")+": ");k.appendChild(v);var S=document.createElement("input");+S.type="number";S.value=H;S.style.width="160px";S.style.boxSizing="border-box";k.appendChild(S);mxEvent.addListener(S,"change",function(){H=S.value});v=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(G.value),parentChildSpacing:parseInt(P.value),siblingSpacing:parseInt(S.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(V,null,2))});v.className="geBtn";k=new CustomDialog(d,k,function(){null==A&&(A=2);d.loadOrgChartLayouts(T)},+null,null,null,v);d.showDialog(k.container,355,140,!0,!0)},u,null,y());m.addSeparator(u);m.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){d.tryAndHandle(mxUtils.bind(this,function(){var A=new mxParallelEdgeLayout(q);A.checkOverlap=!0;d.prompt(mxResources.get("spacing"),A.spacing,mxUtils.bind(this,function(B){d.tryAndHandle(mxUtils.bind(this,function(){A.spacing=B;d.executeLayout(function(){A.execute(q.getDefaultParent(),q.isSelectionEmpty()?null:q.getSelectionCells())},!1)}))}))}))}),+u);m.addSeparator(u);d.menus.addMenuItem(m,"runLayout",u,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(m,u){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(m,["keyboardShortcuts","-","about"],u);else{var A=m.addItem("Search:",null,null,u,null,null,!1);A.style.cursor="default";var B=document.createElement("input");B.setAttribute("type","text");B.setAttribute("size","25");B.style.borderWidth="1px";B.style.marginLeft="8px";mxEvent.addListener(B,+"keydown",mxUtils.bind(this,function(H){var T=mxUtils.trim(B.value);13==H.keyCode&&0<T.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(T)),B.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:T}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==H.keyCode&&(B.value="")}));A.firstChild.nextSibling.appendChild(B);mxEvent.addGestureListeners(B,+function(H){document.activeElement!=B&&B.focus();mxEvent.consume(H)},function(H){mxEvent.consume(H)},function(H){mxEvent.consume(H)});window.setTimeout(function(){B.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.drawio.com")}),d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),d.actions.put("desktopZoomIn",new Action(mxResources.get("zoomIn"),function(){d.desktopZoomIn()})),d.actions.put("desktopZoomOut",new Action(mxResources.get("zoomOut"),+function(){d.desktopZoomOut()})),d.actions.put("desktopResetZoom",new Action(mxResources.get("actualSize"),function(){d.desktopResetZoom()})),this.addMenuItems(m,"- keyboardShortcuts quickStart website support -".split(" "),u),"1"!=urlParams.disableUpdate&&this.addMenuItems(m,["check4Updates","-"],u),this.addMenuItems(m,"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),u)):this.addMenuItems(m,"- keyboardShortcuts quickStart support - about".split(" "),u)}"1"==urlParams.test&&+(m.addSeparator(u),this.addSubmenu("testDevelop",m,u))})));d.actions.addAction("languageCode...",function(){var m=new FilenameDialog(d,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(u){null!=u&&(Graph.diagramLanguage=0<u.length?u:null,Graph.translateDiagram=!0,q.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");d.showDialog(m.container,340,80,!0,!0);m.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(m,+u){this.addMenuItems(m,["languageCode","-"],u);u=m.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;q.refresh()},u);Graph.translateDiagram||m.addCheckmark(u,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");+mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var m=q.cloneCells(q.getSelectionCells()),u=q.getBoundingBoxFromGeometry(m,+!0);m=q.moveCells(m,-u.x,-u.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(q.encodeCells(m)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function m(k){return null==k||null==k.boundingBox||!isNaN(k.boundingBox.x)&&!isNaN(k.boundingBox.y)&&!isNaN(k.boundingBox.width)&&!isNaN(k.boundingBox.height)}var u=q.getGraphBounds(),A=q.view.translate,B=q.view.scale;q.insertVertex(q.getDefaultParent(),+null,"",u.x/B-A.x,u.y/B-A.y,u.width/B,u.height/B,"fillColor=none;strokeColor=red;");var H=0,T=0;q.view.states.visit(function(k,v){k=!0;m(v.shape)||(console.log("invalid shape",v.cell.id,v.shape),k=!1);m(v.text)||(console.log("invalid text",v.cell.id,v.text),k=!1);k||H++;T++});console.log("states checked",T,"invalid",H)}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var m=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";m=new TextareaDialog(d,+"Paste Data:",m,function(u){if(0<u.length)try{var A=function(v){function G(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=P[ba]){for(;0<P[ba].length;){var ea=P[ba].pop();G(ea)}delete P[ba]}}else mxLog.debug(I+": Visited: "+ba)}var I=v.parentNode.id,M=v.childNodes;v={};for(var P={},S=null,V={},W=0;W<M.length;W++){var X=M[W];if(null!=X.id&&0<X.id.length)if(null==v[X.id]){v[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?mxLog.debug(I+": Multiple roots: "+X.id):S=X.id:(null==P[Z]&&(P[Z]=[]),P[Z].push(X.id))}else V[X.id]=+X.id}M=Object.keys(V);0<M.length?(M=I+": "+M.length+" Duplicates: "+M.join(", "),mxLog.debug(M+" (see console)")):mxLog.debug(I+": Checked");var Y={};null==S?mxLog.debug(I+": No root"):(G(S),Object.keys(Y).length!=Object.keys(v).length&&(mxLog.debug(I+": Invalid tree: (see console)"),console.log(I+": Invalid tree",P)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var B=mxUtils.parseXml(u),H=d.getPagesForNode(B.documentElement,"mxGraphModel");+if(null!=H&&0<H.length)try{var T=d.getHashValueForPages(H);mxLog.debug("Checksum: ",T)}catch(v){mxLog.debug("Error: ",v.message)}else mxLog.debug("No pages found for checksum");var k=B.getElementsByTagName("root");for(u=0;u<k.length;u++)A(k[u]);mxLog.show()}catch(v){d.handleError(v),null!=window.console&&console.error(v)}});d.showDialog(m.container,620,460,!0,!0);m.init()}));var N=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var m=new TextareaDialog(d,"Diff/Sync:",+"",function(u){var A=d.getCurrentFile();if(0<u.length&&null!=A)try{var B=JSON.parse(u);A.patch([B],null,!0,!0);d.hideDialog()}catch(H){d.handleError(H)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,A){N=d.getPagesForXml(d.getFileData(!0));m.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(N)}],["Diff",function(u,A){try{m.textarea.value=JSON.stringify(d.diffPages(N,d.pages),null,2)}catch(B){d.handleError(B)}}]]);null==N?+(N=d.getPagesForXml(d.getFileData(!0)),m.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(N)):m.textarea.value=JSON.stringify(d.diffPages(N,d.pages),null,2);d.showDialog(m.container,620,460,!0,!0);m.init()}else d.alert("No pages")}));d.actions.addAction("testChecksum",mxUtils.bind(this,function(){var m=d.getCurrentFile();null!=d.pages&&null!=m?d.spinner.spin(document.body,mxResources.get("loading"))&&m.getLatestVersion(function(u){d.spinner.stop();+var A=d.getHashValueForPages(d.pages),B=m.getCurrentRevisionId(),H=d.getHashValueForPages(u.getShadowPages()),T=u.getDescriptorChecksum(u.getDescriptor()),k=u.getCurrentRevisionId();console.log("Local File",[m],"modified",m.isModified(),"checksum",A);console.log("Remote File",[u],"rev",k==B,"desc",T==H,"checksum",H);d.alert("Checksums "+(H==A?"match":"no not match"))},function(u){console.log("Error getLatestVersion",u);d.handleError(u)}):console.log("Checksum: no file or pages")}));d.actions.addAction("testCheckPages",+mxUtils.bind(this,function(){var m=d.getCurrentFile();console.log("editorUi",d,"file",m);if(null!=m&&m.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(m.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(m.theirPages));console.log("diff ownPages/theirPages",d.diffPages(m.ownPages,m.theirPages));var u=m.getShadowPages();null!=u&&(console.log("Checksum shadowPages",d.getHashValueForPages(u)),console.log("diff shadowPages/ownPages",d.diffPages(u,m.ownPages)),console.log("diff ownPages/shadowPages",+d.diffPages(m.ownPages,u)),console.log("diff theirPages/shadowPages",d.diffPages(m.theirPages,u)));null!=m.sync&&null!=m.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(m.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(m.ownPages,m.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(m.theirPages,m.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(m.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",+d.diffPages(m.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(m.theirPages,d.pages)))}null!=m&&console.log("Shadow pages",[d.getXmlForPages(m.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var m=d.getCurrentFile();null!=m&&m.isRealtime()&&null!=m.shadowPages&&(console.log("patching actualPages to shadowPages",m.patch([d.diffPages(m.shadowPages,+d.pages)])),m.ownPages=d.clonePages(d.pages),m.theirPages=d.clonePages(d.pages),m.shadowPages=d.clonePages(d.pages),null!=m.sync&&(m.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){q.model.beginUpdate();try{var m=q.model.cells,u=0,A=[],B=[],H;for(H in m){var T=m[H],k=q.getCurrentCellStyle(T)[mxConstants.STYLE_IMAGE];null!=k&&"data:"==k.substring(0,5)&&(null==A[k]&&(A[k]=(A[k]||0)+1,u++),B.push(T))}q.setCellStyles(mxConstants.STYLE_IMAGE,null,+B);console.log("Removed",u,"image(s) from",B.length,"cell(s): ",[B,A])}finally{q.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,q.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var m=new mxImageExport,u=q.getGraphBounds(),A=q.view.scale,B=mxUtils.createXmlDocument(),H=B.createElement("output");B.appendChild(H);B=new mxXmlCanvas2D(H);B.translate(Math.floor((1-u.x)/A),Math.floor((1-u.y)/A));B.scale(1/A);var T=+0,k=B.save;B.save=function(){T++;k.apply(this,arguments)};var v=B.restore;B.restore=function(){T--;v.apply(this,arguments)};var G=m.drawShape;m.drawShape=function(I){mxLog.debug("entering shape",I,T);G.apply(this,arguments);mxLog.debug("leaving shape",I,T)};m.drawState(q.getView().getState(q.model.root),B);mxLog.show();mxLog.debug(mxUtils.getXml(H));mxLog.debug("stateCounter",T)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=+mxPopupMenu.prototype.zIndex-2});var c=null,e=null,f=null,p=null,n=null,t=null,z=null,F=null;d.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=c?(q.view.revalidate=c,c=null):(c=q.view.revalidate,q.view.revalidate=function(){var m=Date.now(),u=c.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=e?(d.selectPage=e,e=null):(e=d.selectPage,d.selectPage=function(){var m=Date.now(),u=e.apply(this,+arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=f?(d.diffPages=f,f=null):(f=d.diffPages,d.diffPages=function(){var m=Date.now(),u=f.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=p?(d.patchPages=p,p=null):(p=d.patchPages,d.patchPages=function(){var m=Date.now(),u=p.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",+[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=n?(d.clonePages=n,n=null):(n=d.clonePages,d.clonePages=function(){var m=Date.now(),u=n.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=z?(d.getHashValueForPages=z,z=null):(z=d.getHashValueForPages,d.getHashValueForPages=function(){var m=Date.now(),u=z.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],+"time",Date.now()-m+" ms","args",arguments);return u});null!=F?(d.resolveCrossReferences=F,F=null):(F=d.resolveCrossReferences,d.resolveCrossReferences=function(){var m=Date.now(),u=F.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=t?(d.getFileData=t,t=null):(t=d.getFileData,d.getFileData=function(){var m=Date.now(),u=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",+[this],"time",Date.now()-m+" ms","args",arguments);return u});EditorUi.debug("[Performance]",null!=c?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),u);var A=m.addItem(mxResources.get("testPerformance"),null,function(){d.actions.get("testPerformance").funct()},u);null!=c&&m.addCheckmark(A,+Editor.checkmarkImage);this.addMenuItems(m,["-","testShowConsole"],u)})))}d.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(m){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)}));d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(m){q.isEnabled()&&+(m=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),m.vertex=!0,m=new EditShapeDialog(d,m,mxResources.get("editShape")+":",630,400),d.showDialog(m.container,640,480,!0,!1),m.init())})).isEnabled=y;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",m,function(u,A,B,H,T,k,v,G,I,M,P,S){d.createHtml(u,A,B,H,T,k,v,G,+I,M,P,mxUtils.bind(this,function(V,W){var X=new EmbedDialog(d,"\x3c!-- "+d.editor.appName+" diagram --\x3e\n"+V+"\n"+W+"\n",null,null,function(){var Z=window.open(),Y=Z.document;if(null!=Y){"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(V);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Y.writeln(W);Y.writeln("</body>");Y.writeln("</html>");Y.close();if(!ba){var ea=Z.document.createElement("div");ea.marginLeft="26px";ea.marginTop="26px";mxUtils.write(ea,mxResources.get("updatingDocument"));ba=Z.document.createElement("img");ba.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ba.style.marginLeft="6px";ea.appendChild(ba);Z.document.body.insertBefore(ea,Z.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");-ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(W)[1];Y.body.appendChild(ca);ea.parentNode.removeChild(ea)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(X.container,450,240,!0,!0);X.init()}),U)})})}));d.actions.put("liveImage",new Action("Live image...",function(){var k=d.getCurrentFile();null!=k&&d.getPublicUrl(k,function(v){null!=v?(v=new EmbedDialog(d,'<img src="'+(k.constructor!=DriveFile?v:"https://drive.google.com/uc?id="+k.getId())+-'"/>'),d.showDialog(v.container,450,240,!0,!0),v.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(k,v,z,A,H,R){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(k,v,z,A,H,R,function(g){d.spinner.stop();g=new EmbedDialog(d,g);d.showDialog(g.container,450,240,!0,!0);g.init()},function(g){d.spinner.stop();d.handleError(g)})},mxResources.get("image"),-mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(k,v,z,A,H,R){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(k,v,z,A,H,R,function(g){d.spinner.stop();g=new EmbedDialog(d,g);d.showDialog(g.container,450,240,!0,!0);g.init()},function(g){d.spinner.stop();d.handleError(g)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));-d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(k){var v=t.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,v.height/t.view.scale))+2,null,null,null,k,d.getCurrentFile(),function(z,A,H,R,g,q,F,J,L,Q){var U=[];L&&U.push("tags=%7B%7D");z=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+F+";height:"+J+';" src="'+d.createLink(z,A,!0,R,g,q,"public"==Q?k:null,null,U,null,-H)+'"></iframe>');d.showDialog(z.container,450,240,!0,!0);z.init()},!0)})}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.textAlign="center";k.style.width="100%";k.style.left="0px";var v=document.createElement("a");v.setAttribute("href","javascript:void(0);");v.setAttribute("target","_blank");v.style.cursor="pointer";mxUtils.write(v,mxResources.get("getNotionChromeExtension"));-k.appendChild(v);mxUtils.setPrefixedStyle(v.style,"transition","all 1s ease");mxUtils.setOpacity(v,0);window.setTimeout(function(){mxUtils.setOpacity(v,100)},300);mxEvent.addListener(v,"click",function(z){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(z)});d.getPublicUrl(d.getCurrentFile(),function(z){d.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",k,z,d.getCurrentFile(),-function(A,H,R,g,q,F,J,L,Q,U){J=["border=0"];Q&&J.push("tags=%7B%7D");A=new EmbedDialog(d,d.createLink(A,H,!0,g,q,F,"public"==U?z:null,null,J,null,R));d.showDialog(A.container,450,240,!0,!0);A.init()})})}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(k){d.showPublishLinkDialog(null,null,null,null,null,null,k,d.getCurrentFile(),function(v,z,A,H,R,g,q,F,J,L){q=[];H&&J&&q.push("tags=%7B%7D");v=new EmbedDialog(d,d.createLink(v,-z,!0,H,R,g,"public"==L?k:null,null,q,null,A));d.showDialog(v.container,450,240,!0,!0);v.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",-function(){d.getPublicUrl(d.getCurrentFile(),function(k){k=new GoogleSitesDialog(d,k);d.showDialog(k.container,420,256,!0,!0);k.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)x=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),x.setToggleAction(!0),x.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&-(x=d.actions.addAction("highContrast",function(){d.setAndPersistHighContrast(!d.isHighContrast())}),x.setToggleAction(!0),x.setSelectedCallback(function(){return d.isHighContrast()}));x=d.actions.addAction("search",function(){if(null!=d.sidebar){var k=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!k);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!k,mxSettings.save())}});x.label=mxResources.get("searchShapes");x.setToggleAction(!0);x.setSelectedCallback(function(){return null!=-d.sidebar&&d.sidebar.isEntryVisible("search")});d.actions.get("clearDefaultStyle").funct=function(k){t.isEnabled()&&(d.clearDefaultStyle(),Editor.sketchMode&&d.setSketchMode(!1))};"1"==urlParams.embed&&(d.actions.get("saveAs").setEnabled(!1),d.actions.get("save").funct=function(k){t.isEditing()&&t.stopEditing();var v="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var z=d.createLoadMessage("save");z.xml=v;!0!==-k||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(z.exit=!0);v=JSON.stringify(z)}(window.opener||window.parent).postMessage(v,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));k=d.getCurrentFile();null==k||k.constructor==EmbedFile||k.constructor==LocalFile&&null==k.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+-"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var k=function(){d.editor.modified=!1;var v="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):"";(window.opener||window.parent).postMessage(v,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges")):-k()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(k,v){d.isExportToCanvas()?(this.addMenuItems(k,["exportPng"],v),d.jpgSupported&&this.addMenuItems(k,["exportJpg"],v),d.webpSupported&&this.addMenuItems(k,["exportWebp"],v)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(k,["exportPng","exportJpg"],v);this.addMenuItems(k,["exportSvg","-"],v);d.isOffline()||d.printPdfExport?this.addMenuItems(k,["exportPdf"],v):-d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(k,["exportPdf"],v);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(k,["exportVsdx"],v);this.addMenuItems(k,["-","exportHtml","exportXml","exportUrl"],v);d.isOffline()||(k.addSeparator(v),this.addMenuItem(k,"export",v).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||this.addMenuItems(k,["publishLink"],-v);d.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(k.addSeparator(v),d.menus.addSubmenu("embed",k,v))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(k,v){function z(R){R.pickFile(function(g){d.spinner.spin(document.body,mxResources.get("loading"))&&R.getFile(g,function(q){var F="data:image/"==q.getData().substring(0,11)?H(q.getTitle()):"text/xml";/\.svg$/i.test(q.getTitle())&&!d.editor.isDataSvg(q.getData())&&-(q.setData(Editor.createSvgDataUri(q.getData())),F="image/svg+xml");A(q.getData(),F,q.getTitle())},function(q){d.handleError(q,null!=q?mxResources.get("errorLoadingFile"):null)},R==d.drive)},!0)}var A=mxUtils.bind(this,function(R,g,q){var F=t.view,J=t.getGraphBounds(),L=t.snap(Math.ceil(Math.max(0,J.x/F.scale-F.translate.x)+4*t.gridSize)),Q=t.snap(Math.ceil(Math.max(0,(J.y+J.height)/F.scale-F.translate.y)+4*t.gridSize));"data:image/"==R.substring(0,11)?d.loadImage(R,mxUtils.bind(this,function(U){var V=-!0,W=mxUtils.bind(this,function(){d.resizeImage(U,R,mxUtils.bind(this,function(X,Z,Y){X=V?Math.min(1,Math.min(d.maxImageSize/Z,d.maxImageSize/Y)):1;d.importFile(R,g,L,Q,Math.round(Z*X),Math.round(Y*X),q,function(ba){d.spinner.stop();t.setSelectionCells(ba);t.scrollCellToVisible(t.getSelectionCell())})}),V)});R.length>d.resampleThreshold?d.confirmImageResize(function(X){V=X;W()}):W()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(R,g,L,Q,0,-0,q,function(U){d.spinner.stop();t.setSelectionCells(U);t.scrollCellToVisible(t.getSelectionCell())})}),H=mxUtils.bind(this,function(R){var g="text/xml";/\.png$/i.test(R)?g="image/png":/\.jpe?g$/i.test(R)?g="image/jpg":/\.gif$/i.test(R)?g="image/gif":/\.pdf$/i.test(R)&&(g="application/pdf");return g});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?k.addItem(mxResources.get("googleDrive")+"...",null,function(){z(d.drive)},v):d.isModeEnabled(App.MODE_GOOGLE)&&k.addItem(mxResources.get("googleDrive")+-" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?k.addItem(mxResources.get("oneDrive")+"...",null,function(){z(d.oneDrive)},v):d.isModeEnabled(App.MODE_ONEDRIVE)&&k.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);d.isModeReady(App.MODE_DROPBOX)?k.addItem(mxResources.get("dropbox")+"...",null,function(){z(d.dropbox)},v):d.isModeEnabled(App.MODE_DROPBOX)&&k.addItem(mxResources.get("dropbox")+-" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);k.addSeparator(v);d.isModeReady(App.MODE_GITHUB)&&k.addItem(mxResources.get("github")+"...",null,function(){z(d.gitHub)},v);d.isModeReady(App.MODE_GITLAB)&&k.addItem(mxResources.get("gitlab")+"...",null,function(){z(d.gitLab)},v);d.isModeReady(App.MODE_TRELLO)?k.addItem(mxResources.get("trello")+"...",null,function(){z(d.trello)},v):d.isModeEnabled(App.MODE_TRELLO)&&k.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+-"...)",null,function(){},v,null,!1);k.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&k.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},v);"1"!=urlParams.noDevice&&k.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},v);d.isOffline()||(k.addSeparator(v),k.addItem(mxResources.get("url")+"...",null,function(){var R=new FilenameDialog(d,"",mxResources.get("import"),function(g){if(null!=g&&0<g.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var q=-/(\.png)($|\?)/i.test(g)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(g),function(F){A(F,q,g)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==q)}},mxResources.get("url"));d.showDialog(R.container,300,80,!0,!0);R.init()},v))}))).isEnabled=y;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(k,v){var z=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&-(750>z&&this.addSubmenu("viewZoom",k,v,mxResources.get("zoom")),460>z&&d.isPageMenuVisible()&&this.addSubmenu("pages",k,v),320>z&&this.addSubmenu("insert",k,v),360>z&&"1"!=urlParams.embed&&"draw.io"==d.getServiceName()&&this.addSubmenu("share",k,v));this.addMenuItems(k,["-","lightMode","darkMode"],v);d.isAutoDarkModeSupported()&&(z=d.menus.addMenuItem(k,"autoMode",v),null!=z&&z.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")"));"1"!=urlParams.embed&&-this.addMenuItems(k,["-","toggleSimpleMode"],v)})));this.put("appearance",new Menu(mxUtils.bind(this,function(k,v){this.addMenuItems(k,["-","lightMode","darkMode"],v);if(d.isAutoDarkModeSupported()){var z=d.menus.addMenuItem(k,"autoMode",v);null!=z&&z.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}k.addSeparator(v);z=d.menus.addMenuItem(k,"highContrast",v);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(z,-"https://github.com/jgraph/drawio/issues/4296")})));d.actions.addAction("addToScratchpad",function(k){t.isSelectionEmpty()||null==d.addSelectionToScratchpad||d.addSelectionToScratchpad(k)});d.actions.addAction("accounts...",function(){d.toggleUserPanel();d.userPanel.style.right="10px";d.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(k,v){var z="1"==urlParams.sketch?"sketch":mxSettings.getUi(),A=k.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},-v),H=k.addItem(mxResources.get("classic"),null,function(){d.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy")},v),R=!1;if("kennedy"==z||"dark"==z)k.addCheckmark(H,Editor.checkmarkImage),R=!0;for(var g=0;g<Editor.themes.length;g++)mxUtils.bind(this,function(q){H=k.addItem(mxResources.get("min"==q?"minimal":q),null,function(){d.setCurrentTheme(q)},v);z==q&&(k.addCheckmark(H,Editor.checkmarkImage),R=!0)})(Editor.themes[g]);R||k.addCheckmark(A,Editor.checkmarkImage)})));x=this.editorUi.actions.addAction("rename...",-mxUtils.bind(this,function(){var k=this.editorUi.getCurrentFile();if(null!=k)if(k.constructor==LocalFile&&null!=k.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(z,A){k.invalidFileHandle=null;k.fileHandle=z;k.title=A.name;k.desc=A;d.save(A.name)}),null,d.createFileSystemOptions(k.getTitle()));else{var v=null!=k.getTitle()?k.getTitle():this.editorUi.defaultFilename;v=new FilenameDialog(this.editorUi,v,mxResources.get("rename"),mxUtils.bind(this,function(z){null!=z&&0<z.length&&null!=k&&z!=-k.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&k.rename(z,mxUtils.bind(this,function(A){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(A){this.editorUi.handleError(A,null!=A?mxResources.get("errorRenamingFile"):null)}))}),k.constructor==DriveFile||k.constructor==StorageFile?mxResources.get("diagramName"):null,function(z){if(null!=z&&0<z.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},-null,FilenameDialog.filenameHelpLink,null,null,d.editor.fileExtensions);this.editorUi.showDialog(v.container,340,96,!0,!0);v.init()}}));x.isEnabled=function(){return this.enabled&&y.apply(this,arguments)};x.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var k=d.getCurrentFile();if(null!=k){var v=d.getCopyFilename(k);k.constructor==DriveFile?(v=new CreateDialog(d,v,mxUtils.bind(this,function(z,A){"_blank"==A?d.editor.editAsNew(d.getFileData(),z):("download"==-A&&(A=App.MODE_GOOGLE),null!=z&&0<z.length&&(A==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&k.saveAs(z,mxUtils.bind(this,function(H){k.desc=H;k.save(!1,mxUtils.bind(this,function(){d.spinner.stop();k.setModified(!1);k.addAllSavedStatus()}),mxUtils.bind(this,function(R){d.handleError(R)}))}),mxUtils.bind(this,function(H){d.handleError(H)})):d.createFile(z,d.getFileData(!0),null,A)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),-null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(v.container,420,380,!0,!0),v.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),v)}}));d.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(k,v){k=d.getCurrentFile();null!=k&&d.openLink(k.getFolderUrl())}));d.actions.addAction("openFile...",mxUtils.bind(this,function(){var k=d.getCurrentFile();null!=k&&d.openLink(k.getFileUrl())}));d.actions.addAction("moveToFolder...",-mxUtils.bind(this,function(){var k=d.getCurrentFile();if(k.getMode()==App.MODE_GOOGLE||k.getMode()==App.MODE_ONEDRIVE){var v=!1;if(k.getMode()==App.MODE_GOOGLE&&null!=k.desc.parents)for(var z=0;z<k.desc.parents.length;z++)if(k.desc.parents[z].isRoot){v=!0;break}d.pickFolder(k.getMode(),mxUtils.bind(this,function(A){d.spinner.spin(document.body,mxResources.get("moving"))&&k.move(A,mxUtils.bind(this,function(H){d.spinner.stop()}),mxUtils.bind(this,function(H){d.handleError(H)}))}),null,!0,v)}}));this.put("publish",-new Menu(mxUtils.bind(this,function(k,v){this.addMenuItems(k,["publishLink"],v)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var k=d.getCurrentFile();null!=k&&k.share()}catch(v){d.handleError(v)}})).isEnabled=y;this.put("embed",new Menu(mxUtils.bind(this,function(k,v){var z=d.getCurrentFile();null==z||z.getMode()!=App.MODE_GOOGLE&&z.getMode()!=-App.MODE_GITHUB||!/(\.png)$/i.test(z.getTitle())||this.addMenuItems(k,["liveImage","-"],v);this.addMenuItems(k,["embedImage","embedSvg","-","embedHtml"],v);navigator.standalone||d.isOffline()||this.addMenuItems(k,["embedIframe"],v);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(k,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),v)})));d.addInsertItem=function(k,v,z,A){("plantUml"!=A||EditorUi.enablePlantUml&&!d.isOffline())&&k.addItem(z,null,mxUtils.bind(this,-function(){if("fromText"==A||"formatSql"==A||"plantUml"==A||"mermaid"==A){var H=new ParseDialog(d,z,A);d.showDialog(H.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else H=new CreateGraphDialog(d,z,A),d.showDialog(H.container,620,420,!0,!1,function(R,g){if(g)return d.confirm(mxResources.get("areYouSure"),function(){d.hideDialog()}),!1;null!=H.graph&&(null!=H.graph.container.parentNode&&H.graph.container.parentNode.removeChild(H.graph.container),H.graph.destroy(),H.graph=null)});-H.init()}),v,null,y())};var D=function(k){t.getModel().beginUpdate();try{k=t.addCell(k),t.fireEvent(new mxEventObject("cellsInserted","cells",[k])),t.model.isVertex(k)&&t.isAutoSizeCell(k)&&t.updateCellSize(k)}finally{t.getModel().endUpdate()}t.scrollCellToVisible(k);t.setSelectionCell(k);t.container.focus();t.editAfterInsert&&t.startEditing(k);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(t.view.getState(k))},0);return k},G=function(k,v,z,A,H){k=new mxCell(k,new mxGeometry(0,-0,v,z),A);k.vertex=!0;null==H&&(H=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([k],!0)));k.geometry.x=H.x;k.geometry.y=H.y;return D(k)};d.actions.put("insertText",new Action(mxResources.get("text"),function(k){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&t.startEditingAtCell(G("Text",60,30,t.appendFontSize("text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",t.vertexFontSize),null==k||mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)||-!t.isMouseInsertPoint()?null:t.getInsertPoint()))},null,null,"A")).isEnabled=y;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(k){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&G("",120,60,"whiteSpace=wrap;html=1;",null==k||mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)||!t.isMouseInsertPoint()?null:t.getInsertPoint())},null,null,"D")).isEnabled=y;d.actions.put("insertNote",new Action(mxResources.get("note"),function(k){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&-G("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==k||mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)||!t.isMouseInsertPoint()?null:t.getInsertPoint())},null,null,"S")).isEnabled=y;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(k){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&-G("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==k||mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)||!t.isMouseInsertPoint()?null:t.getInsertPoint())},null,null,"F")).isEnabled=y;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(k){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&G("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==k||mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)||!t.isMouseInsertPoint()?null:t.getInsertPoint())},null,null,"R")).isEnabled=y;d.actions.put("insertEdge",-new Action(mxResources.get("line"),function(k){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var v=t.defaultEdgeLength;k=null==k||mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)||!t.isMouseInsertPoint()?null:t.getInsertPoint();null==k&&(k=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([z],!0)));var z=new mxCell("",new mxGeometry(0,0,v,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");z.geometry.setTerminalPoint(k,!0);z.geometry.setTerminalPoint(new mxPoint(k.x+z.geometry.width,-k.y),!1);z.geometry.points=[];z.geometry.relative=!0;z.edge=!0;D(z)}},null,null,"C")).isEnabled=y;x=d.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=d.sidebarWindow?d.sidebarWindow.window.setVisible(!d.sidebarWindow.window.isVisible()):d.toggleShapesPanel(!d.isShapesPanelVisible())},null,null,Editor.ctrlKey+"+Shift+K"));x.setToggleAction(!0);x.setSelectedCallback(mxUtils.bind(this,function(){return null!=d.sidebarWindow&&d.sidebarWindow.window.isVisible()||null==-d.sidebarWindow&&0<d.hsplitPosition}));d.addInsertMenuItems=mxUtils.bind(this,function(k,v,z){for(var A=0;A<z.length;A++)"-"==z[A]?k.addSeparator(v):d.addInsertItem(k,v,mxResources.get(z[A])+"...",z[A])});this.put("insert",new Menu(mxUtils.bind(this,function(k,v){"sketch"==Editor.currentTheme?(d.menus.addMenuItems(k,["toggleShapes"],v),d.menus.addSubmenu("table",k,v),k.addSeparator(v),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(k,["insertTemplate"],v),d.menus.addMenuItems(k,["insertImage",-"insertLink","-"],v),d.menus.addSubmenu("insertAdvanced",k,v,mxResources.get("advanced")),d.menus.addSubmenu("layout",k,v)):(this.addMenuItems(k,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),v),d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(k,["insertTemplate"],v),k.addSeparator(v),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("layout",k,v),this.addSubmenu("insertLayout",-k,v,mxResources.get("insert")),k.addSeparator(v),this.addSubmenu("table",k,v)):this.addSubmenu("insertLayout",k,v,mxResources.get("layout")),this.addSubmenu("insertAdvanced",k,v,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,function(k,v){d.menus.addInsertTableCellItem(k,v)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(k,v){d.addInsertMenuItems(k,v,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));-this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(k,v){var z=["fromText","plantUml"].concat(window.isMermaidEnabled?["mermaid"]:[]).concat(["-","formatSql"]);d.addInsertMenuItems(k,v,z);k.addItem(mxResources.get("csv")+"...",null,function(){t.popupMenuHandler.hideMenu();d.showImportCsvDialog()},v,null,y());"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(k,["-","createShape","editDiagram"],v)})));this.put("openRecent",new Menu(function(k,v){var z=d.getRecent();-if(null!=z){for(var A=0;A<z.length;A++)(function(H){var R=H.mode;R==App.MODE_GOOGLE?R="googleDrive":R==App.MODE_ONEDRIVE&&(R="oneDrive");k.addItem(H.title+" ("+mxResources.get(R)+")",null,function(){d.loadFile(H.id)},v)})(z[A]);k.addSeparator(v)}k.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},v)}));this.put("openFrom",new Menu(function(k,v){null!=d.drive?k.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},v):d.isModeEnabled(App.MODE_GOOGLE)&&-k.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);d.isModeReady(App.MODE_ONEDRIVE)?k.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},v):d.isModeEnabled(App.MODE_ONEDRIVE)&&k.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);d.isModeReady(App.MODE_DROPBOX)?k.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},v):-d.isModeEnabled(App.MODE_DROPBOX)&&k.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);k.addSeparator(v);d.isModeReady(App.MODE_GITHUB)&&k.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},v);d.isModeReady(App.MODE_GITLAB)&&k.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},v);d.isModeReady(App.MODE_TRELLO)?k.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},-v):d.isModeEnabled(App.MODE_TRELLO)&&k.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);k.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&k.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},v);"1"!=urlParams.noDevice&&k.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},v);d.isOffline()||(k.addSeparator(v),k.addItem(mxResources.get("url")+"...",null,function(){var z=-new FilenameDialog(d,"",mxResources.get("open"),function(A){null!=A&&0<A.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(A):window.geOpenWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(A)))},mxResources.get("url"));d.showDialog(z.container,300,80,!0,!0);z.init()},v))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(k,v){"undefined"!=typeof google&&"undefined"!=-typeof google.picker&&(null!=d.drive?k.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},v):d.isModeEnabled(App.MODE_GOOGLE)&&k.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?k.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},v):d.isModeEnabled(App.MODE_ONEDRIVE)&&k.addItem(mxResources.get("oneDrive")+-" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);d.isModeReady(App.MODE_DROPBOX)?k.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},v):d.isModeEnabled(App.MODE_DROPBOX)&&k.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);k.addSeparator(v);d.isModeReady(App.MODE_GITHUB)&&k.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,-null,App.MODE_GITHUB)},v);d.isModeReady(App.MODE_GITLAB)&&k.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},v);d.isModeReady(App.MODE_TRELLO)?k.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},v):d.isModeEnabled(App.MODE_TRELLO)&&k.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);k.addSeparator(v);isLocalStorage&&"0"!=-urlParams.browser&&k.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},v);"1"!=urlParams.noDevice&&k.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},v);"1"==urlParams.confLib&&k.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showLibraryDialog(null,null,null,null,"CONF_LIB")},v)})),this.put("openLibraryFrom",new Menu(function(k,v){"undefined"!=typeof google&&-"undefined"!=typeof google.picker&&(null!=d.drive?k.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},v):d.isModeEnabled(App.MODE_GOOGLE)&&k.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?k.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},v):d.isModeEnabled(App.MODE_ONEDRIVE)&&k.addItem(mxResources.get("oneDrive")+" ("+-mxResources.get("loading")+"...)",null,function(){},v,null,!1);d.isModeReady(App.MODE_DROPBOX)?k.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},v):d.isModeEnabled(App.MODE_DROPBOX)&&k.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);k.addSeparator(v);d.isModeReady(App.MODE_GITHUB)&&k.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},v);d.isModeReady(App.MODE_GITLAB)&&-k.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},v);d.isModeReady(App.MODE_TRELLO)?k.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},v):d.isModeEnabled(App.MODE_TRELLO)&&k.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);k.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&k.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},-v);"1"!=urlParams.noDevice&&k.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},v);d.isOffline()||(k.addSeparator(v),k.addItem(mxResources.get("url")+"...",null,function(){var z=new FilenameDialog(d,"",mxResources.get("open"),function(A){if(null!=A&&0<A.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var H=A;d.editor.isCorsEnabledForUrl(A)||(H=PROXY_URL+"?url="+encodeURIComponent(A));mxUtils.get(H,function(R){if(200<=R.getStatus()&&299>=R.getStatus()){d.spinner.stop();-try{d.loadLibrary(new UrlLibrary(d,R.getText(),A)),d.showSidebar()}catch(g){d.handleError(g,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(z.container,300,80,!0,!0);z.init()},v));"1"==urlParams.confLib&&(k.addSeparator(v),k.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},-v))})));this.put("edit",new Menu(mxUtils.bind(this,function(k,v){this.addMenuItems(k,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));x=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",-function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var k=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(k);this.commentsWindow.refreshCommentsTime();k&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));x.setToggleAction(!0);x.setSelectedCallback(mxUtils.bind(this,-function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(k,v){var z=d.getCurrentFile();d.menus.addMenuItems(k,"toggleShapes format ruler - findReplace layers tags chatWindowTitle outline -".split(" "),v);d.commentsSupported()&&d.menus.addMenuItems(k,["comments"],v);null!=z&&z.isRealtimeEnabled()&&-z.isRealtimeSupported()&&d.menus.addMenuItems(k,["showRemoteCursors"],v);d.menus.addMenuItems(k,["-","fullscreen"],v)};this.put("view",new Menu(mxUtils.bind(this,function(k,v){if("simple"==Editor.currentTheme){var z=d.getCurrentFile();d.menus.addMenuItems(k,["toggleShapes","format"],v);d.isPageMenuVisible()&&d.menus.addMenuItems(k,["pageTabs"],v);d.menus.addMenuItems(k,["ruler","-","search"],v);if(isLocalStorage||mxClient.IS_CHROMEAPP){var A=d.menus.addMenuItem(k,"scratchpad",v);(!d.isOffline()||-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(A,"https://www.drawio.com/doc/faq/scratchpad")}d.menus.addMenuItems(k,"- findReplace layers tags chatWindowTitle outline -".split(" "),v);d.commentsSupported()&&d.menus.addMenuItems(k,["comments"],v);null!=z&&z.isRealtimeEnabled()&&z.isRealtimeSupported()&&this.addMenuItems(k,["showRemoteCursors"],v);this.addMenuItems(k,["-","fullscreen"],v)}else{this.addMenuItems(k,["format","outline","layers","tags","chatWindowTitle"].concat(d.commentsSupported()?-["comments","-"]:["-"]));this.addMenuItems(k,["-","search"],v);if(isLocalStorage||mxClient.IS_CHROMEAPP)A=this.addMenuItem(k,"scratchpad",v),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(A,"https://www.drawio.com/doc/faq/scratchpad");this.addMenuItems(k,["toggleShapes","-","pageView","pageScale"]);this.addSubmenu("units",k,v);k.addSeparator(v);d.isPageMenuVisible()&&d.menus.addMenuItems(k,["pageTabs"],v);this.addMenuItems(k,"ruler - tooltips animations - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),-v);"1"!=urlParams.sketch&&this.addMenuItems(k,["-","fullscreen"],v)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(k,v){this.addMenuItems(k,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),v)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(k,v){var z=d.currentPage;null!=z&&(k.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){d.renamePage(z,z.getName())}),-v),k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){d.removePage(z)}),v),1<d.pages.length&&(d.menus.addSubmenu("movePage",k,v,mxResources.get("move")),k.addSeparator(v)),k.addSeparator(v),k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){d.duplicatePage(z,mxResources.get("copyOf",[z.getName()]))}),v),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,-function(){d.editor.editAsNew(d.getFileData(!0,null,null,null,!0,!0))}),v)))})));this.put("pages",new Menu(mxUtils.bind(this,function(k,v){var z=d.currentPage;d.editor.graph.isLightboxView()||(k.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{d.insertPage()}catch(H){d.handleError(H)}}),v,null,d.editor.graph.isEnabled()),k.addSeparator(v));if(null!=d.pages)for(var A=0;A<d.pages.length;A++)mxUtils.bind(this,function(H){var R=null;R=d.pages[H]!=z||d.editor.graph.isLightboxView()?-k.addItem(d.getShortPageName(d.pages[H]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[H])}),v):d.menus.addSubmenu("currentPage",k,v,d.getShortPageName(z));var g=d.pages[H].getId();R.setAttribute("title",d.pages[H].getName()+" ("+(H+1)+"/"+d.pages.length+")"+(null!=g?" ["+g+"]":""));d.pages[H]==z&&k.addCheckmark(R,Editor.checkmarkImage)})(A)})));if(EditorUi.isElectronApp){var E="1"==urlParams.enableSpellCheck;x=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();E=!E;d.alert(mxResources.get("restartForChangeRequired"))});-x.setToggleAction(!0);x.setSelectedCallback(function(){return E});var T="1"==urlParams.enableStoreBkp;x=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();T=!T});x.setToggleAction(!0);x.setSelectedCallback(function(){return T});var O="1"==urlParams.isGoogleFontsEnabled;x=d.actions.addAction("googleFonts",function(){d.toggleGoogleFonts();O=!O;d.alert(mxResources.get("restartForChangeRequired"))});x.setToggleAction(!0);x.setSelectedCallback(function(){return O});d.actions.addAction("openDevTools",-function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var k=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(v){v=parseInt(v);0<=v&&(EditorUi.draftSaveDelay=1E3*v,EditorUi.enableDrafts=0<v,mxSettings.setDraftSaveDelay(v),mxSettings.save())}),mxResources.get("draftSaveInt"));d.showDialog(k.container,320,80,!0,!0);k.init()})}var S=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(k,v){if("simple"==Editor.currentTheme||-"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||d.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",k,v);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",k,v);k.addSeparator(v);null==S||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",k,v);d.menus.addSubmenu("units",-k,v);d.menus.addMenuItems(k,"- copyConnect collapseExpand - tooltips animations -".split(" "),v);var z=d.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=z&&z.isRealtimeEnabled()&&z.isRealtimeSupported()&&this.addMenuItems(k,["showRemoteCursors"],v),d.menus.addMenuItems(k,["ruler","-"],v));EditorUi.isElectronApp&&d.menus.addMenuItems(k,"- googleFonts spellCheck autoBkp drafts -".split(" "),v);this.addSubmenu("diagramLanguage",k,v);k.addSeparator(v);d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(k,-"configuration",v);k.addSeparator(v)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",k,v),"1"==urlParams.embed&&"1"!=urlParams.atlas||"atlas"==Editor.currentTheme||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",k,v),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",k,v),k.addSeparator(v),z=this.addSubmenu("adaptiveColors",k,v),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&-d.menus.addLinkToItem(z,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(z=this.addMenuItem(k,"mathematicalTypesetting",v),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(z,"https://www.drawio.com/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(k,["googleFonts","spellCheck","autoBkp","drafts","-"],v),this.addMenuItems(k,["copyConnect","collapseExpand","-"],v),"1"!=urlParams.embed&&(z=d.getCurrentFile(),null!=-z&&z.isRealtimeEnabled()&&z.isRealtimeSupported()&&this.addMenuItems(k,["showRemoteCursors","shareCursor"],v),this.addMenuItems(k,["autosave"],v)),k.addSeparator(v),!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(k,"plugins",v),k.addSeparator(v),this.addSubmenu("diagramLanguage",k,v),this.addMenuItem(k,"editDiagram",v),k.addSeparator(v),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(k,["showStartScreen"],v),this.addMenuItems(k,["configuration"],v)})));this.put("movePage",-new Menu(mxUtils.bind(this,function(k,v){var z=d.currentPage,A=d.getPageIndex(z);if(null!=d.pages)for(var H=0;H<d.pages.length;H++)H!=A&&function(R){k.addItem(d.getShortPageName(d.pages[R]),null,function(){d.movePage(A,R);d.scrollToPage(z,!0)},v)}(H)})));this.put("share",new Menu(mxUtils.bind(this,function(k,v){if(!d.isStandaloneApp()){var z=d.isOffline(!0)?mxResources.get("offline"):d.getNetworkStatus();null!=z&&(k.addItem(z,null,null,v,null,!1),k.addSeparator(v));d.menus.addMenuItems(k,["share"],-v)}this.addMenuItem(k,"publishLink",v,null,null,mxResources.get("publish")+"...");null!=d.getMainUser()&&this.addMenuItems(k,["accounts"],v)})));this.put("diagram",new Menu(mxUtils.bind(this,function(k,v){var z=d.getCurrentFile();"simple"!=Editor.currentTheme&&(d.menus.addSubmenu("extras",k,v,mxResources.get("settings")),k.addSeparator(v));var A="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)d.menus.addMenuItems(k,"new open - synchronize properties - save saveAs -".split(" "),-v);else if(d.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(k,["-","save"],v);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||d.mode==App.MODE_ATLAS)d.menus.addMenuItems(k,["saveAndExit"],v),null!=z&&z.isRevisionHistorySupported()&&d.menus.addMenuItems(k,["revisionHistory"],v);k.addSeparator(v)}else d.mode==App.MODE_ATLAS?d.menus.addMenuItems(k,["save","synchronize","-"],v):"1"!=urlParams.noFileMenu&&(d.menus.addSubmenu("file",-k,v),k.addSeparator(v),"min"==Editor.currentTheme&&(d.menus.addMenuItems(k,"toggleShapes format layers tags chatWindowTitle - findReplace".split(" "),v),d.commentsSupported()&&d.menus.addMenuItems(k,["comments"],v),k.addSeparator(v)));d.menus.addSubmenu("exportAs",k,v);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"atlassian"==d.getServiceName()?d.menus.addMenuItems(k,["import"],v):"1"!=urlParams.noFileMenu&&d.menus.addSubmenu("importFrom",k,v);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?-(d.menus.addMenuItems(k,["-","findReplace"],v),d.commentsSupported()&&d.menus.addMenuItems(k,["comments","-"],v),d.menus.addMenuItems(k,"toggleShapes format layers tags chatWindowTitle -".split(" "),v),d.menus.addMenuItems(k,["pageSetup"],v)):"min"!=Editor.currentTheme&&(this.addMenuItems(k,["-"],v),this.addSubmenu("newLibrary",k,v),this.addSubmenu("openLibraryFrom",k,v));k.addSeparator(v);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(k,["print"],v);A||"min"==-Editor.currentTheme||null==z||null==d.fileNode||"1"==urlParams.embedInline||(A=null!=z.getTitle()?z.getTitle():d.defaultFilename,/(\.html)$/i.test(A)||this.addMenuItems(k,["-","properties"]));k.addSeparator(v);"simple"==Editor.currentTheme&&(d.menus.addSubmenu("extras",k,v,mxResources.get("settings")),k.addSeparator(v));d.menus.addSubmenu("help",k,v);k.addSeparator(v);"1"==urlParams.embed&&("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(k,["save"],v),"1"==urlParams.saveAndExit||-"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(d.menus.addMenuItems(k,["saveAndExit"],v),null!=z&&z.isRevisionHistorySupported()&&d.menus.addMenuItems(k,["revisionHistory"],v));"1"!=urlParams.embed&&d.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&d.mode!=App.MODE_ATLAS||d.menus.addMenuItems(k,["exit"],v);"1"!=urlParams.embed&&null!=z&&"undefined"==typeof AtlasFile&&d.menus.addMenuItems(k,["-","close"],v)})));this.put("save",new Menu(mxUtils.bind(this,function(k,v){var z=d.getCurrentFile();-null==z||z.constructor!=DriveFile&&z.constructor!=OneDriveFile?(d.menus.addMenuItems(k,["save","saveAs","-","rename"],v),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(k,["upload"],v):d.menus.addMenuItems(k,["makeCopy"],v)):d.menus.addMenuItems(k,["save","makeCopy","-","rename","moveToFolder"],v);d.menus.addMenuItems(k,["-","autosave"],v);null!=z&&z.isRevisionHistorySupported()&&d.menus.addMenuItems(k,["-","revisionHistory"],v)})));this.put("file",-new Menu(mxUtils.bind(this,function(k,v){var z="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",k,v),this.addSubmenu("exportAs",k,v),this.addSubmenu("embed",k,v),"1"==urlParams.libraries&&(this.addMenuItems(k,["-"],v),this.addSubmenu("newLibrary",k,v),this.addSubmenu("openLibraryFrom",k,v)),d.isRevisionHistorySupported()&&this.addMenuItems(k,["-","revisionHistory"],v),this.addMenuItems(k,["-","pageSetup",-"print","-","rename"],v),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(k,["saveAndExit"],v):(this.addMenuItems(k,["save"],v),"1"==urlParams.saveAndExit&&this.addMenuItems(k,["saveAndExit"],v))),"1"!=urlParams.noExitBtn&&this.addMenuItems(k,["exit"],v);else if(z){z=d.getCurrentFile();d.menus.addMenuItems(k,["new"],v);d.menus.addSubmenu("openFrom",k,v);isLocalStorage&&this.addSubmenu("openRecent",k,v);k.addSeparator(v);d.menus.addMenuItems(k,["-",-"save"],v);null!=z&&z.constructor==DriveFile||d.menus.addMenuItems(k,["saveAs"],v);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==z||z.constructor==LocalFile&&null==z.fileHandle||d.menus.addMenuItems(k,["synchronize"],v);k.addSeparator(v);null!=z&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"sketch"!=Editor.currentTheme||this.addMenuItem(k,"publishLink",v,null,null,mxResources.get("publish")+"..."),"simple"==Editor.currentTheme||z.constructor!=DriveFile&&z.constructor!=GitHubFile&&z.constructor!=-OneDriveFile||d.menus.addMenuItems(k,["share"],v));k.addSeparator(v);null!=z&&z.isRenamable()&&this.addMenuItems(k,["rename"],v);d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(k,["upload"],v):(d.menus.addMenuItems(k,["makeCopy"],v),null!=z&&(z.constructor!=OneDriveFile&&z.constructor!=DriveFile||d.menus.addMenuItems(k,["moveToFolder"],v),k.addSeparator(v),null!=z.getFolderUrl()&&d.menus.addMenuItems(k,["openFolder"],v),null!=z.getFileUrl()&&d.menus.addMenuItems(k,-["openFile"],v)));k.addSeparator(v);null!=z&&z.isRevisionHistorySupported()&&d.menus.addMenuItems(k,["revisionHistory"],v);if(null!=z&&null!=d.fileNode&&"1"!=urlParams.embedInline){var A=null!=z.getTitle()?z.getTitle():d.defaultFilename;(z.constructor==DriveFile&&null!=z.sync&&z.sync.isConnected()||!/(\.html)$/i.test(A))&&this.addMenuItems(k,["properties"],v)}"simple"==Editor.currentTheme&&d.menus.addMenuItems(k,["-","autosave"],v)}else z=this.editorUi.getCurrentFile(),null!=z&&z.constructor==DriveFile?-(z.isRestricted()&&this.addMenuItems(k,["exportOptionsDisabled"],v),this.addMenuItems(k,["save","-","share"],v),A=this.addMenuItem(k,"synchronize",v),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(A,"https://www.drawio.com/doc/faq/synchronize"),k.addSeparator(v)):this.addMenuItems(k,["new"],v),this.addSubmenu("openFrom",k,v),isLocalStorage&&this.addSubmenu("openRecent",k,v),null!=z&&z.constructor==DriveFile?this.addMenuItems(k,"new - rename makeCopy openFolder moveToFolder".split(" "),-v):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==z||z.constructor==LocalFile&&null==z.fileHandle||(k.addSeparator(v),A=this.addMenuItem(k,"synchronize",v),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(A,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(k,["-","save","saveAs","-"],v),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==z||this.addMenuItems(k,["share","-"],v),null!=z&&z.isRenamable()&&-this.addMenuItems(k,["rename"],v),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(k,["upload"],v):(this.addMenuItems(k,["makeCopy"],v),null!=z&&(z.constructor==OneDriveFile&&this.addMenuItems(k,["moveToFolder"],v),null!=z.getFolderUrl()&&d.menus.addMenuItems(k,["openFolder"],v)))),k.addSeparator(v),this.addSubmenu("importFrom",k,v),this.addSubmenu("exportAs",k,v),k.addSeparator(v),this.addSubmenu("embed",k,v),this.addSubmenu("publish",k,v),k.addSeparator(v),-this.addSubmenu("newLibrary",k,v),this.addSubmenu("openLibraryFrom",k,v),d.isRevisionHistorySupported()&&this.addMenuItems(k,["-","revisionHistory"],v),null!=z&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(A=null!=z.getTitle()?z.getTitle():d.defaultFilename,(z.constructor==DriveFile&&null!=z.sync&&z.sync.isConnected()||!/(\.html)$/i.test(A))&&this.addMenuItems(k,["-","properties"])),this.addMenuItems(k,["-","pageSetup"],v),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(k,["print"],v),-this.addMenuItems(k,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(k,v){function z(L){var Q=encodeURIComponent(L.name)+(null==L.url?"":"@"+encodeURIComponent(L.url));if(!H[Q]){for(var U=L.name,V=0;null!=F[U.toLowerCase()];)U=L.name+" ("+ ++V+")";null==q[Q]&&(J.push({name:L.name,url:L.url,label:U,title:L.url}),F[U.toLowerCase()]=L,q[Q]=L)}}for(var A=mxUtils.bind(this,function(L,Q,U,V,W){var X=d.editor.graph,Z=this.styleChange(k,null!=V?V:L,[mxConstants.STYLE_FONTFAMILY,-"fontSource","FType"],[L,null!=Q?encodeURIComponent(Q):null,null],null,v,function(){X.setFont(L,Q);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[L,null!=Q?encodeURIComponent(Q):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});U&&(U=document.createElement("img"),-U.className="geAdaptiveAsset",U.setAttribute("src",Editor.crossImage),U.setAttribute("title",mxResources.get("delete")),U.setAttribute("valign","absmiddle"),U.setAttribute("border","0"),U.style.position="relative",U.style.top="2px",U.style.width="14px",U.style.cursor="default",U.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(U),mxEvent.addListener(U,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(L,Q);this.editorUi.hideCurrentMenu();-mxEvent.consume(Y)})));Graph.addFont(L,Q);Z.firstChild.nextSibling.style.fontFamily=L;W=null!=V?V:L;null!=Q&&(W+=" ("+Q+")");Z.setAttribute("title",W)}),H={},R=0;R<this.defaultFonts.length;R++){var g=this.defaultFonts[R];"string"===typeof g?A(g):null!=g.fontFamily&&null!=g.fontUrl&&(H[encodeURIComponent(g.fontFamily)+"@"+encodeURIComponent(g.fontUrl)]=!0,A(g.fontFamily,g.fontUrl))}k.addSeparator(v);var q={},F={},J=[];for(R=0;R<this.customFonts.length;R++)z(this.customFonts[R]);J.sort(function(L,Q){return L.label<-Q.label?-1:L.label>Q.label?1:0});if(0<J.length){for(R=0;R<J.length;R++)A(J[R].name,J[R].url,!0,J[R].label);k.addSeparator(v)}k.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),v);k.addSeparator(v);k.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var L=this.editorUi.editor.graph,Q=L.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],U="s",V=null;if(L.isEditing()){var W=-L.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){Q=mxUtils.getCssFontFamily(X.fontFamily);X=L.getView().getState(L.cellEditor.getEditingCell());V=null!=X?X.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=W&&W!=L.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){V=W.getAttribute("data-font-src");break}else if(W.getAttribute("face")==Q){V=null;break}W=W.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?-(V=null,U="g"):U="w")}}}else X=L.getView().getState(L.getSelectionCell()),null!=X&&(Q=X.style[mxConstants.STYLE_FONTFAMILY]||Q,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?U="g":(U="w",V=W)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==L.cellEditor.textarea&&(Z=L.cellEditor.saveSelection());Q=new FontDialog(this.editorUi,Q,V,U,mxUtils.bind(this,function(Y,ba,-ea){null!=Z&&(L.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),L.isEditing())L.setFont(Y,ba);else{L.getModel().beginUpdate();try{L.stopEditing(!1),L.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),L.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),L.setCellStyles("FType",null)}finally{L.getModel().endUpdate()}}}));this.editorUi.showDialog(Q.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);Q.init()}),-v,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};-DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,f,m){this.ui=b;this.page=f;this.previous=this.name=m}-RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,f,m){this.ui=b;this.oldIndex=f;this.newIndex=m}-MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(b,f,m){this.ui=b;this.previousPage=this.page=f;null!=f&&(this.ui.updatePageRoot(f),null!=m&&(f.viewState=m))}-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var f=this.ui.editor,m=f.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(f.getGraphXml(!0)));b.viewState=m.getViewState();b.root=m.model.root;null!=b.model&&b.model.rootChanged(b.root);m.view.clear(b.root,!0);m.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;-m.model.prefix=Editor.guid()+"-";m.model.rootChanged(b.root);m.setViewState(b.viewState);m.gridEnabled=m.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);f.graph.fireEvent(new mxEventObject(mxEvent.ROOT));f.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,f,m,d,t){SelectPage.call(this,b,m);this.relatedPage=f;this.index=d;this.previousIndex=null;this.noSelect=t}mxUtils.extend(ChangePage,SelectPage);-ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};function ReplaceDiagram(b,f){this.ui=b;this.data=f}-ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,f=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var m=new mxCodec(this.data.ownerDocument),d=new mxGraphModel;m.decode(this.data,d);this.data=f;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=d.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,+ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(W)[1];Y.body.appendChild(ca);ea.parentNode.removeChild(ea)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(X.container,450,240,!0,!0);X.init()}),S)})})}));d.actions.put("liveImage",new Action("Live image...",function(){var m=d.getCurrentFile();null!=m&&d.getPublicUrl(m,function(u){null!=u?(u=new EmbedDialog(d,'<img src="'+(m.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+m.getId())++'"/>'),d.showDialog(u.container,450,240,!0,!0),u.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(m,u,A,B,H,T){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(m,u,A,B,H,T,function(k){d.spinner.stop();k=new EmbedDialog(d,k);d.showDialog(k.container,450,240,!0,!0);k.init()},function(k){d.spinner.stop();d.handleError(k)})},mxResources.get("image"),+mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(m,u,A,B,H,T){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(m,u,A,B,H,T,function(k){d.spinner.stop();k=new EmbedDialog(d,k);d.showDialog(k.container,450,240,!0,!0);k.init()},function(k){d.spinner.stop();d.handleError(k)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));+d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){var u=q.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,u.height/q.view.scale))+2,null,null,null,m,d.getCurrentFile(),function(A,B,H,T,k,v,G,I,M,P){var S=[];M&&S.push("tags=%7B%7D");A=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+G+";height:"+I+';" src="'+d.createLink(A,B,!0,T,k,v,"public"==P?m:null,null,S,null,+H)+'"></iframe>');d.showDialog(A.container,450,240,!0,!0);A.init()},!0)})}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var m=document.createElement("div");m.style.position="absolute";m.style.bottom="30px";m.style.textAlign="center";m.style.width="100%";m.style.left="0px";var u=document.createElement("a");u.setAttribute("href","javascript:void(0);");u.setAttribute("target","_blank");u.style.cursor="pointer";mxUtils.write(u,mxResources.get("getNotionChromeExtension"));+m.appendChild(u);mxUtils.setPrefixedStyle(u.style,"transition","all 1s ease");mxUtils.setOpacity(u,0);window.setTimeout(function(){mxUtils.setOpacity(u,100)},300);mxEvent.addListener(u,"click",function(A){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(A)});d.getPublicUrl(d.getCurrentFile(),function(A){d.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",m,A,d.getCurrentFile(),+function(B,H,T,k,v,G,I,M,P,S){I=["border=0"];P&&I.push("tags=%7B%7D");B=new EmbedDialog(d,d.createLink(B,H,!0,k,v,G,"public"==S?A:null,null,I,null,T));d.showDialog(B.container,450,240,!0,!0);B.init()})})}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showPublishLinkDialog(null,null,null,null,null,null,m,d.getCurrentFile(),function(u,A,B,H,T,k,v,G,I,M){v=[];H&&I&&v.push("tags=%7B%7D");u=new EmbedDialog(d,d.createLink(u,+A,!0,H,T,k,"public"==M?m:null,null,v,null,B));d.showDialog(u.container,450,240,!0,!0);u.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",+function(){d.getPublicUrl(d.getCurrentFile(),function(m){m=new GoogleSitesDialog(d,m);d.showDialog(m.container,420,256,!0,!0);m.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)x=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),x.setToggleAction(!0),x.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&+(x=d.actions.addAction("highContrast",function(){d.setAndPersistHighContrast(!d.isHighContrast())}),x.setToggleAction(!0),x.setSelectedCallback(function(){return d.isHighContrast()}));x=d.actions.addAction("search",function(){if(null!=d.sidebar){var m=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!m);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!m,mxSettings.save())}});x.label=mxResources.get("searchShapes");x.setToggleAction(!0);x.setSelectedCallback(function(){return null!=+d.sidebar&&d.sidebar.isEntryVisible("search")});d.actions.get("clearDefaultStyle").funct=function(m){q.isEnabled()&&(d.clearDefaultStyle(),Editor.sketchMode&&d.setSketchMode(!1))};"1"==urlParams.embed&&(d.actions.get("saveAs").setEnabled(!1),d.actions.get("save").funct=function(m){q.isEditing()&&q.stopEditing();var u="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var A=d.createLoadMessage("save");A.xml=u;!0!==+m||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(A.exit=!0);u=JSON.stringify(A)}(window.opener||window.parent).postMessage(u,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));m=d.getCurrentFile();null==m||m.constructor==EmbedFile||m.constructor==LocalFile&&null==m.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)},null,null,Editor.ctrlKey++"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var m=function(){d.editor.modified=!1;var u="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):"";(window.opener||window.parent).postMessage(u,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges")):+m()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(m,u){d.isExportToCanvas()?(this.addMenuItems(m,["exportPng"],u),d.jpgSupported&&this.addMenuItems(m,["exportJpg"],u),d.webpSupported&&this.addMenuItems(m,["exportWebp"],u)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(m,["exportPng","exportJpg"],u);this.addMenuItems(m,["exportSvg","-"],u);d.isOffline()||d.printPdfExport?this.addMenuItems(m,["exportPdf"],u):+d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(m,["exportPdf"],u);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(m,["exportVsdx"],u);this.addMenuItems(m,["-","exportHtml","exportXml","exportUrl"],u);d.isOffline()||(m.addSeparator(u),this.addMenuItem(m,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||this.addMenuItems(m,["publishLink"],+u);d.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(m.addSeparator(u),d.menus.addSubmenu("embed",m,u))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(m,u){function A(T){T.pickFile(function(k){d.spinner.spin(document.body,mxResources.get("loading"))&&T.getFile(k,function(v){var G="data:image/"==v.getData().substring(0,11)?H(v.getTitle()):"text/xml";/\.svg$/i.test(v.getTitle())&&!d.editor.isDataSvg(v.getData())&&+(v.setData(Editor.createSvgDataUri(v.getData())),G="image/svg+xml");B(v.getData(),G,v.getTitle())},function(v){d.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null)},T==d.drive)},!0)}var B=mxUtils.bind(this,function(T,k,v){var G=q.view,I=q.getGraphBounds(),M=q.snap(Math.ceil(Math.max(0,I.x/G.scale-G.translate.x)+4*q.gridSize)),P=q.snap(Math.ceil(Math.max(0,(I.y+I.height)/G.scale-G.translate.y)+4*q.gridSize));"data:image/"==T.substring(0,11)?d.loadImage(T,mxUtils.bind(this,function(S){var V=+!0,W=mxUtils.bind(this,function(){d.resizeImage(S,T,mxUtils.bind(this,function(X,Z,Y){X=V?Math.min(1,Math.min(d.maxImageSize/Z,d.maxImageSize/Y)):1;d.importFile(T,k,M,P,Math.round(Z*X),Math.round(Y*X),v,function(ba){d.spinner.stop();q.setSelectionCells(ba);q.scrollCellToVisible(q.getSelectionCell())})}),V)});T.length>d.resampleThreshold?d.confirmImageResize(function(X){V=X;W()}):W()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(T,k,M,P,0,+0,v,function(S){d.spinner.stop();q.setSelectionCells(S);q.scrollCellToVisible(q.getSelectionCell())})}),H=mxUtils.bind(this,function(T){var k="text/xml";/\.png$/i.test(T)?k="image/png":/\.jpe?g$/i.test(T)?k="image/jpg":/\.gif$/i.test(T)?k="image/gif":/\.pdf$/i.test(T)&&(k="application/pdf");return k});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?m.addItem(mxResources.get("googleDrive")+"...",null,function(){A(d.drive)},u):d.isModeEnabled(App.MODE_GOOGLE)&&m.addItem(mxResources.get("googleDrive")++" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?m.addItem(mxResources.get("oneDrive")+"...",null,function(){A(d.oneDrive)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&m.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?m.addItem(mxResources.get("dropbox")+"...",null,function(){A(d.dropbox)},u):d.isModeEnabled(App.MODE_DROPBOX)&&m.addItem(mxResources.get("dropbox")++" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);m.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&m.addItem(mxResources.get("github")+"...",null,function(){A(d.gitHub)},u);d.isModeReady(App.MODE_GITLAB)&&m.addItem(mxResources.get("gitlab")+"...",null,function(){A(d.gitLab)},u);d.isModeReady(App.MODE_TRELLO)?m.addItem(mxResources.get("trello")+"...",null,function(){A(d.trello)},u):d.isModeEnabled(App.MODE_TRELLO)&&m.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")++"...)",null,function(){},u,null,!1);m.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&m.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&m.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},u);d.isOffline()||(m.addSeparator(u),m.addItem(mxResources.get("url")+"...",null,function(){var T=new FilenameDialog(d,"",mxResources.get("import"),function(k){if(null!=k&&0<k.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var v=+/(\.png)($|\?)/i.test(k)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(k),function(G){B(G,v,k)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==v)}},mxResources.get("url"));d.showDialog(T.container,300,80,!0,!0);T.init()},u))}))).isEnabled=y;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(m,u){var A=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&+(750>A&&this.addSubmenu("viewZoom",m,u,mxResources.get("zoom")),460>A&&d.isPageMenuVisible()&&this.addSubmenu("pages",m,u),320>A&&this.addSubmenu("insert",m,u),360>A&&"1"!=urlParams.embed&&"draw.io"==d.getServiceName()&&this.addSubmenu("share",m,u));this.addMenuItems(m,["-","lightMode","darkMode"],u);d.isAutoDarkModeSupported()&&(A=d.menus.addMenuItem(m,"autoMode",u),null!=A&&A.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")"));"1"!=urlParams.embed&&+this.addMenuItems(m,["-","toggleSimpleMode"],u)})));this.put("appearance",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,["-","lightMode","darkMode"],u);if(d.isAutoDarkModeSupported()){var A=d.menus.addMenuItem(m,"autoMode",u);null!=A&&A.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}m.addSeparator(u);A=d.menus.addMenuItem(m,"highContrast",u);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(A,+"https://github.com/jgraph/drawio/issues/4296")})));d.actions.addAction("addToScratchpad",function(m){q.isSelectionEmpty()||null==d.addSelectionToScratchpad||d.addSelectionToScratchpad(m)});d.actions.addAction("accounts...",function(){d.toggleUserPanel();d.userPanel.style.right="10px";d.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(m,u){var A="1"==urlParams.sketch?"sketch":mxSettings.getUi(),B=m.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},+u),H=m.addItem(mxResources.get("classic"),null,function(){d.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy")},u),T=!1;if("kennedy"==A||"dark"==A)m.addCheckmark(H,Editor.checkmarkImage),T=!0;for(var k=0;k<Editor.themes.length;k++)mxUtils.bind(this,function(v){H=m.addItem(mxResources.get("min"==v?"minimal":v),null,function(){d.setCurrentTheme(v)},u);A==v&&(m.addCheckmark(H,Editor.checkmarkImage),T=!0)})(Editor.themes[k]);T||m.addCheckmark(B,Editor.checkmarkImage)})));x=this.editorUi.actions.addAction("rename...",+mxUtils.bind(this,function(){var m=this.editorUi.getCurrentFile();if(null!=m)if(m.constructor==LocalFile&&null!=m.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(A,B){m.invalidFileHandle=null;m.fileHandle=A;m.title=B.name;m.desc=B;d.save(B.name)}),null,d.createFileSystemOptions(m.getTitle()));else{var u=null!=m.getTitle()?m.getTitle():this.editorUi.defaultFilename;u=new FilenameDialog(this.editorUi,u,mxResources.get("rename"),mxUtils.bind(this,function(A){null!=A&&0<A.length&&null!=m&&A!=+m.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&m.rename(A,mxUtils.bind(this,function(B){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(B){this.editorUi.handleError(B,null!=B?mxResources.get("errorRenamingFile"):null)}))}),m.constructor==DriveFile||m.constructor==StorageFile?mxResources.get("diagramName"):null,function(A){if(null!=A&&0<A.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},+null,FilenameDialog.filenameHelpLink,null,null,d.editor.fileExtensions);this.editorUi.showDialog(u.container,340,96,!0,!0);u.init()}}));x.isEnabled=function(){return this.enabled&&y.apply(this,arguments)};x.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var m=d.getCurrentFile();if(null!=m){var u=d.getCopyFilename(m);m.constructor==DriveFile?(u=new CreateDialog(d,u,mxUtils.bind(this,function(A,B){"_blank"==B?d.editor.editAsNew(d.getFileData(),A):("download"==+B&&(B=App.MODE_GOOGLE),null!=A&&0<A.length&&(B==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&m.saveAs(A,mxUtils.bind(this,function(H){m.desc=H;m.save(!1,mxUtils.bind(this,function(){d.spinner.stop();m.setModified(!1);m.addAllSavedStatus()}),mxUtils.bind(this,function(T){d.handleError(T)}))}),mxUtils.bind(this,function(H){d.handleError(H)})):d.createFile(A,d.getFileData(!0),null,B)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),+null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(u.container,420,380,!0,!0),u.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),u)}}));d.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(m,u){m=d.getCurrentFile();null!=m&&d.openLink(m.getFolderUrl())}));d.actions.addAction("openFile...",mxUtils.bind(this,function(){var m=d.getCurrentFile();null!=m&&d.openLink(m.getFileUrl())}));d.actions.addAction("moveToFolder...",+mxUtils.bind(this,function(){var m=d.getCurrentFile();if(m.getMode()==App.MODE_GOOGLE||m.getMode()==App.MODE_ONEDRIVE){var u=!1;if(m.getMode()==App.MODE_GOOGLE&&null!=m.desc.parents)for(var A=0;A<m.desc.parents.length;A++)if(m.desc.parents[A].isRoot){u=!0;break}d.pickFolder(m.getMode(),mxUtils.bind(this,function(B){d.spinner.spin(document.body,mxResources.get("moving"))&&m.move(B,mxUtils.bind(this,function(H){d.spinner.stop()}),mxUtils.bind(this,function(H){d.handleError(H)}))}),null,!0,u)}}));this.put("publish",+new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,["publishLink"],u)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var m=d.getCurrentFile();null!=m&&m.share()}catch(u){d.handleError(u)}})).isEnabled=y;this.put("embed",new Menu(mxUtils.bind(this,function(m,u){var A=d.getCurrentFile();null==A||A.getMode()!=App.MODE_GOOGLE&&A.getMode()!=+App.MODE_GITHUB||!/(\.png)$/i.test(A.getTitle())||this.addMenuItems(m,["liveImage","-"],u);this.addMenuItems(m,["embedImage","embedSvg","-","embedHtml"],u);navigator.standalone||d.isOffline()||this.addMenuItems(m,["embedIframe"],u);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(m,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),u)})));d.addInsertItem=function(m,u,A,B){("plantUml"!=B||EditorUi.enablePlantUml&&!d.isOffline())&&m.addItem(A,null,mxUtils.bind(this,+function(){if("fromText"==B||"formatSql"==B||"plantUml"==B||"mermaid"==B){var H=new ParseDialog(d,A,B);d.showDialog(H.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else H=new CreateGraphDialog(d,A,B),d.showDialog(H.container,620,420,!0,!1,function(T,k){if(k)return d.confirm(mxResources.get("areYouSure"),function(){d.hideDialog()}),!1;null!=H.graph&&(null!=H.graph.container.parentNode&&H.graph.container.parentNode.removeChild(H.graph.container),H.graph.destroy(),H.graph=null)});+H.init()}),u,null,y())};var C=function(m){q.getModel().beginUpdate();try{m=q.addCell(m),q.fireEvent(new mxEventObject("cellsInserted","cells",[m])),q.model.isVertex(m)&&q.isAutoSizeCell(m)&&q.updateCellSize(m)}finally{q.getModel().endUpdate()}q.scrollCellToVisible(m);q.setSelectionCell(m);q.container.focus();q.editAfterInsert&&q.startEditing(m);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(q.view.getState(m))},0);return m},E=function(m,u,A,B,H){m=new mxCell(m,new mxGeometry(0,+0,u,A),B);m.vertex=!0;null==H&&(H=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([m],!0)));m.geometry.x=H.x;m.geometry.y=H.y;return C(m)};d.actions.put("insertText",new Action(mxResources.get("text"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&q.startEditingAtCell(E("Text",60,30,q.appendFontSize("text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",q.vertexFontSize),null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||+!q.isMouseInsertPoint()?null:q.getInsertPoint()))},null,null,"A")).isEnabled=y;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&E("",120,60,"whiteSpace=wrap;html=1;",null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"D")).isEnabled=y;d.actions.put("insertNote",new Action(mxResources.get("note"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&+E("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"S")).isEnabled=y;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&+E("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"F")).isEnabled=y;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&E("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"R")).isEnabled=y;d.actions.put("insertEdge",+new Action(mxResources.get("line"),function(m){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var u=q.defaultEdgeLength;m=null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||!q.isMouseInsertPoint()?null:q.getInsertPoint();null==m&&(m=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([A],!0)));var A=new mxCell("",new mxGeometry(0,0,u,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");A.geometry.setTerminalPoint(m,!0);A.geometry.setTerminalPoint(new mxPoint(m.x+A.geometry.width,+m.y),!1);A.geometry.points=[];A.geometry.relative=!0;A.edge=!0;C(A)}},null,null,"C")).isEnabled=y;x=d.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=d.sidebarWindow?d.sidebarWindow.window.setVisible(!d.sidebarWindow.window.isVisible()):d.toggleShapesPanel(!d.isShapesPanelVisible())},null,null,Editor.ctrlKey+"+Shift+K"));x.setToggleAction(!0);x.setSelectedCallback(mxUtils.bind(this,function(){return null!=d.sidebarWindow&&d.sidebarWindow.window.isVisible()||null==+d.sidebarWindow&&0<d.hsplitPosition}));d.addInsertMenuItems=mxUtils.bind(this,function(m,u,A){for(var B=0;B<A.length;B++)"-"==A[B]?m.addSeparator(u):d.addInsertItem(m,u,mxResources.get(A[B])+"...",A[B])});this.put("insert",new Menu(mxUtils.bind(this,function(m,u){"sketch"==Editor.currentTheme?(d.menus.addMenuItems(m,["toggleShapes"],u),d.menus.addSubmenu("table",m,u),m.addSeparator(u),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(m,["insertTemplate"],u),d.menus.addMenuItems(m,["insertImage",+"insertLink","-"],u),d.menus.addSubmenu("insertAdvanced",m,u,mxResources.get("advanced")),d.menus.addSubmenu("layout",m,u)):(this.addMenuItems(m,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),u),d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(m,["insertTemplate"],u),m.addSeparator(u),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("layout",m,u),this.addSubmenu("insertLayout",+m,u,mxResources.get("insert")),m.addSeparator(u),this.addSubmenu("table",m,u)):this.addSubmenu("insertLayout",m,u,mxResources.get("layout")),this.addSubmenu("insertAdvanced",m,u,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,function(m,u){d.menus.addInsertTableCellItem(m,u)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(m,u){d.addInsertMenuItems(m,u,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));+this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(m,u){var A=["fromText","plantUml"].concat(window.isMermaidEnabled?["mermaid"]:[]).concat(["-","formatSql"]);d.addInsertMenuItems(m,u,A);m.addItem(mxResources.get("csv")+"...",null,function(){q.popupMenuHandler.hideMenu();d.showImportCsvDialog()},u,null,y());"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(m,["-","createShape","editDiagram"],u)})));this.put("openRecent",new Menu(function(m,u){var A=d.getRecent();+if(null!=A){for(var B=0;B<A.length;B++)(function(H){var T=H.mode;T==App.MODE_GOOGLE?T="googleDrive":T==App.MODE_ONEDRIVE&&(T="oneDrive");m.addItem(H.title+" ("+mxResources.get(T)+")",null,function(){d.loadFile(H.id)},u)})(A[B]);m.addSeparator(u)}m.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},u)}));this.put("openFrom",new Menu(function(m,u){null!=d.drive?m.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},u):d.isModeEnabled(App.MODE_GOOGLE)&&+m.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_ONEDRIVE)?m.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&m.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?m.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},u):+d.isModeEnabled(App.MODE_DROPBOX)&&m.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);m.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&m.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},u);d.isModeReady(App.MODE_GITLAB)&&m.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},u);d.isModeReady(App.MODE_TRELLO)?m.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},+u):d.isModeEnabled(App.MODE_TRELLO)&&m.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);m.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&m.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&m.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},u);d.isOffline()||(m.addSeparator(u),m.addItem(mxResources.get("url")+"...",null,function(){var A=+new FilenameDialog(d,"",mxResources.get("open"),function(B){null!=B&&0<B.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(B):window.geOpenWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(B)))},mxResources.get("url"));d.showDialog(A.container,300,80,!0,!0);A.init()},u))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(m,u){"undefined"!=typeof google&&"undefined"!=+typeof google.picker&&(null!=d.drive?m.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},u):d.isModeEnabled(App.MODE_GOOGLE)&&m.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?m.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&m.addItem(mxResources.get("oneDrive")++" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?m.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},u):d.isModeEnabled(App.MODE_DROPBOX)&&m.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);m.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&m.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,+null,App.MODE_GITHUB)},u);d.isModeReady(App.MODE_GITLAB)&&m.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},u);d.isModeReady(App.MODE_TRELLO)?m.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},u):d.isModeEnabled(App.MODE_TRELLO)&&m.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);m.addSeparator(u);isLocalStorage&&"0"!=+urlParams.browser&&m.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&m.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},u);"1"==urlParams.confLib&&m.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showLibraryDialog(null,null,null,null,"CONF_LIB")},u)})),this.put("openLibraryFrom",new Menu(function(m,u){"undefined"!=typeof google&&+"undefined"!=typeof google.picker&&(null!=d.drive?m.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},u):d.isModeEnabled(App.MODE_GOOGLE)&&m.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?m.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&m.addItem(mxResources.get("oneDrive")+" ("++mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?m.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},u):d.isModeEnabled(App.MODE_DROPBOX)&&m.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);m.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&m.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},u);d.isModeReady(App.MODE_GITLAB)&&+m.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},u);d.isModeReady(App.MODE_TRELLO)?m.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},u):d.isModeEnabled(App.MODE_TRELLO)&&m.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);m.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&m.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},+u);"1"!=urlParams.noDevice&&m.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},u);d.isOffline()||(m.addSeparator(u),m.addItem(mxResources.get("url")+"...",null,function(){var A=new FilenameDialog(d,"",mxResources.get("open"),function(B){if(null!=B&&0<B.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var H=B;d.editor.isCorsEnabledForUrl(B)||(H=PROXY_URL+"?url="+encodeURIComponent(B));mxUtils.get(H,function(T){if(200<=T.getStatus()&&299>=T.getStatus()){d.spinner.stop();+try{d.loadLibrary(new UrlLibrary(d,T.getText(),B)),d.showSidebar()}catch(k){d.handleError(k,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(A.container,300,80,!0,!0);A.init()},u));"1"==urlParams.confLib&&(m.addSeparator(u),m.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},+u))})));this.put("edit",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));x=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",+function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var m=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(m);this.commentsWindow.refreshCommentsTime();m&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));x.setToggleAction(!0);x.setSelectedCallback(mxUtils.bind(this,+function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(m,u){var A=d.getCurrentFile();d.menus.addMenuItems(m,"toggleShapes format ruler - findReplace layers tags chatWindowTitle outline -".split(" "),u);d.commentsSupported()&&d.menus.addMenuItems(m,["comments"],u);null!=A&&A.isRealtimeEnabled()&&+A.isRealtimeSupported()&&d.menus.addMenuItems(m,["showRemoteCursors"],u);d.menus.addMenuItems(m,["-","fullscreen"],u)};this.put("view",new Menu(mxUtils.bind(this,function(m,u){if("simple"==Editor.currentTheme){var A=d.getCurrentFile();d.menus.addMenuItems(m,["toggleShapes","format"],u);d.isPageMenuVisible()&&d.menus.addMenuItems(m,["pageTabs"],u);d.menus.addMenuItems(m,["ruler","-","search"],u);if(isLocalStorage||mxClient.IS_CHROMEAPP){var B=d.menus.addMenuItem(m,"scratchpad",u);(!d.isOffline()||+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(B,"https://www.drawio.com/doc/faq/scratchpad")}d.menus.addMenuItems(m,"- findReplace layers tags chatWindowTitle outline -".split(" "),u);d.commentsSupported()&&d.menus.addMenuItems(m,["comments"],u);null!=A&&A.isRealtimeEnabled()&&A.isRealtimeSupported()&&this.addMenuItems(m,["showRemoteCursors"],u);this.addMenuItems(m,["-","fullscreen"],u)}else{this.addMenuItems(m,["format","outline","layers","tags","chatWindowTitle"].concat(d.commentsSupported()?+["comments","-"]:["-"]));this.addMenuItems(m,["-","search"],u);if(isLocalStorage||mxClient.IS_CHROMEAPP)B=this.addMenuItem(m,"scratchpad",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.drawio.com/doc/faq/scratchpad");this.addMenuItems(m,["toggleShapes","-","pageView","pageScale"]);this.addSubmenu("units",m,u);m.addSeparator(u);d.isPageMenuVisible()&&d.menus.addMenuItems(m,["pageTabs"],u);this.addMenuItems(m,"ruler - tooltips animations - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),+u);"1"!=urlParams.sketch&&this.addMenuItems(m,["-","fullscreen"],u)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),u)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(m,u){var A=d.currentPage;null!=A&&(m.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){d.renamePage(A,A.getName())}),+u),m.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){d.removePage(A)}),u),1<d.pages.length&&(d.menus.addSubmenu("movePage",m,u,mxResources.get("move")),m.addSeparator(u)),m.addSeparator(u),m.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){d.duplicatePage(A,mxResources.get("copyOf",[A.getName()]))}),u),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||m.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,+function(){d.editor.editAsNew(d.getFileData(!0,null,null,null,!0,!0))}),u)))})));this.put("pages",new Menu(mxUtils.bind(this,function(m,u){var A=d.currentPage;d.editor.graph.isLightboxView()||(m.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{d.insertPage()}catch(H){d.handleError(H)}}),u,null,d.editor.graph.isEnabled()),m.addSeparator(u));if(null!=d.pages)for(var B=0;B<d.pages.length;B++)mxUtils.bind(this,function(H){var T=null;T=d.pages[H]!=A||d.editor.graph.isLightboxView()?+m.addItem(d.getShortPageName(d.pages[H]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[H])}),u):d.menus.addSubmenu("currentPage",m,u,d.getShortPageName(A));var k=d.pages[H].getId();T.setAttribute("title",d.pages[H].getName()+" ("+(H+1)+"/"+d.pages.length+")"+(null!=k?" ["+k+"]":""));d.pages[H]==A&&m.addCheckmark(T,Editor.checkmarkImage)})(B)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;x=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();R=!R;d.alert(mxResources.get("restartForChangeRequired"))});+x.setToggleAction(!0);x.setSelectedCallback(function(){return R});var U="1"==urlParams.enableStoreBkp;x=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();U=!U});x.setToggleAction(!0);x.setSelectedCallback(function(){return U});var O="1"==urlParams.isGoogleFontsEnabled;x=d.actions.addAction("googleFonts",function(){d.toggleGoogleFonts();O=!O;d.alert(mxResources.get("restartForChangeRequired"))});x.setToggleAction(!0);x.setSelectedCallback(function(){return O});d.actions.addAction("openDevTools",+function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var m=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"));d.showDialog(m.container,320,80,!0,!0);m.init()})}var Q=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(m,u){if("simple"==Editor.currentTheme||+"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||d.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",m,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",m,u);m.addSeparator(u);null==Q||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",m,u);d.menus.addSubmenu("units",+m,u);d.menus.addMenuItems(m,"- copyConnect collapseExpand - tooltips animations -".split(" "),u);var A=d.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=A&&A.isRealtimeEnabled()&&A.isRealtimeSupported()&&this.addMenuItems(m,["showRemoteCursors"],u),d.menus.addMenuItems(m,["ruler","-"],u));EditorUi.isElectronApp&&d.menus.addMenuItems(m,"- googleFonts spellCheck autoBkp drafts -".split(" "),u);this.addSubmenu("diagramLanguage",m,u);m.addSeparator(u);d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(m,+"configuration",u);m.addSeparator(u)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",m,u),"1"==urlParams.embed&&"1"!=urlParams.atlas||"atlas"==Editor.currentTheme||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",m,u),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",m,u),m.addSeparator(u),A=this.addSubmenu("adaptiveColors",m,u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&+d.menus.addLinkToItem(A,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(A=this.addMenuItem(m,"mathematicalTypesetting",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(A,"https://www.drawio.com/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(m,["googleFonts","spellCheck","autoBkp","drafts","-"],u),this.addMenuItems(m,["copyConnect","collapseExpand","-"],u),"1"!=urlParams.embed&&(A=d.getCurrentFile(),null!=+A&&A.isRealtimeEnabled()&&A.isRealtimeSupported()&&this.addMenuItems(m,["showRemoteCursors","shareCursor"],u),this.addMenuItems(m,["autosave"],u)),m.addSeparator(u),!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(m,"plugins",u),m.addSeparator(u),this.addSubmenu("diagramLanguage",m,u),this.addMenuItem(m,"editDiagram",u),m.addSeparator(u),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(m,["showStartScreen"],u),this.addMenuItems(m,["configuration"],u)})));this.put("movePage",+new Menu(mxUtils.bind(this,function(m,u){var A=d.currentPage,B=d.getPageIndex(A);if(null!=d.pages)for(var H=0;H<d.pages.length;H++)H!=B&&function(T){m.addItem(d.getShortPageName(d.pages[T]),null,function(){d.movePage(B,T);d.scrollToPage(A,!0)},u)}(H)})));this.put("share",new Menu(mxUtils.bind(this,function(m,u){if(!d.isStandaloneApp()){var A=d.isOffline(!0)?mxResources.get("offline"):d.getNetworkStatus();null!=A&&(m.addItem(A,null,null,u,null,!1),m.addSeparator(u));d.menus.addMenuItems(m,["share"],+u)}this.addMenuItem(m,"publishLink",u,null,null,mxResources.get("publish")+"...");null!=d.getMainUser()&&this.addMenuItems(m,["accounts"],u)})));this.put("diagram",new Menu(mxUtils.bind(this,function(m,u){var A=d.getCurrentFile();"simple"!=Editor.currentTheme&&(d.menus.addSubmenu("extras",m,u,mxResources.get("settings")),m.addSeparator(u));var B="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)d.menus.addMenuItems(m,"new open - synchronize properties - save saveAs -".split(" "),+u);else if(d.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(m,["-","save"],u);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||d.mode==App.MODE_ATLAS)d.menus.addMenuItems(m,["saveAndExit"],u),null!=A&&A.isRevisionHistorySupported()&&d.menus.addMenuItems(m,["revisionHistory"],u);m.addSeparator(u)}else d.mode==App.MODE_ATLAS?d.menus.addMenuItems(m,["save","synchronize","-"],u):"1"!=urlParams.noFileMenu&&(d.menus.addSubmenu("file",+m,u),m.addSeparator(u),"min"==Editor.currentTheme&&(d.menus.addMenuItems(m,"toggleShapes format layers tags chatWindowTitle - findReplace".split(" "),u),d.commentsSupported()&&d.menus.addMenuItems(m,["comments"],u),m.addSeparator(u)));d.menus.addSubmenu("exportAs",m,u);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"atlassian"==d.getServiceName()?d.menus.addMenuItems(m,["import"],u):"1"!=urlParams.noFileMenu&&d.menus.addSubmenu("importFrom",m,u);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?+(d.menus.addMenuItems(m,["-","findReplace"],u),d.commentsSupported()&&d.menus.addMenuItems(m,["comments","-"],u),d.menus.addMenuItems(m,"toggleShapes format layers tags chatWindowTitle -".split(" "),u),d.menus.addMenuItems(m,["pageSetup"],u)):"min"!=Editor.currentTheme&&(this.addMenuItems(m,["-"],u),this.addSubmenu("newLibrary",m,u),this.addSubmenu("openLibraryFrom",m,u));m.addSeparator(u);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(m,["print"],u);B||"min"==+Editor.currentTheme||null==A||null==d.fileNode||"1"==urlParams.embedInline||(B=null!=A.getTitle()?A.getTitle():d.defaultFilename,/(\.html)$/i.test(B)||this.addMenuItems(m,["-","properties"]));m.addSeparator(u);"simple"==Editor.currentTheme&&(d.menus.addSubmenu("extras",m,u,mxResources.get("settings")),m.addSeparator(u));d.menus.addSubmenu("help",m,u);m.addSeparator(u);"1"==urlParams.embed&&("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(m,["save"],u),"1"==urlParams.saveAndExit||+"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(d.menus.addMenuItems(m,["saveAndExit"],u),null!=A&&A.isRevisionHistorySupported()&&d.menus.addMenuItems(m,["revisionHistory"],u));"1"!=urlParams.embed&&d.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&d.mode!=App.MODE_ATLAS||d.menus.addMenuItems(m,["exit"],u);"1"!=urlParams.embed&&null!=A&&"undefined"==typeof AtlasFile&&d.menus.addMenuItems(m,["-","close"],u)})));this.put("save",new Menu(mxUtils.bind(this,function(m,u){var A=d.getCurrentFile();+null==A||A.constructor!=DriveFile&&A.constructor!=OneDriveFile?(d.menus.addMenuItems(m,["save","saveAs","-","rename"],u),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(m,["upload"],u):d.menus.addMenuItems(m,["makeCopy"],u)):d.menus.addMenuItems(m,["save","makeCopy","-","rename","moveToFolder"],u);d.menus.addMenuItems(m,["-","autosave"],u);null!=A&&A.isRevisionHistorySupported()&&d.menus.addMenuItems(m,["-","revisionHistory"],u)})));this.put("file",+new Menu(mxUtils.bind(this,function(m,u){var A="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",m,u),this.addSubmenu("exportAs",m,u),this.addSubmenu("embed",m,u),"1"==urlParams.libraries&&(this.addMenuItems(m,["-"],u),this.addSubmenu("newLibrary",m,u),this.addSubmenu("openLibraryFrom",m,u)),d.isRevisionHistorySupported()&&this.addMenuItems(m,["-","revisionHistory"],u),this.addMenuItems(m,["-","pageSetup",+"print","-","rename"],u),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(m,["saveAndExit"],u):(this.addMenuItems(m,["save"],u),"1"==urlParams.saveAndExit&&this.addMenuItems(m,["saveAndExit"],u))),"1"!=urlParams.noExitBtn&&this.addMenuItems(m,["exit"],u);else if(A){A=d.getCurrentFile();d.menus.addMenuItems(m,["new"],u);d.menus.addSubmenu("openFrom",m,u);isLocalStorage&&this.addSubmenu("openRecent",m,u);m.addSeparator(u);d.menus.addMenuItems(m,["-",+"save"],u);null!=A&&A.constructor==DriveFile||d.menus.addMenuItems(m,["saveAs"],u);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==A||A.constructor==LocalFile&&null==A.fileHandle||d.menus.addMenuItems(m,["synchronize"],u);m.addSeparator(u);null!=A&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"sketch"!=Editor.currentTheme||this.addMenuItem(m,"publishLink",u,null,null,mxResources.get("publish")+"..."),"simple"==Editor.currentTheme||A.constructor!=DriveFile&&A.constructor!=GitHubFile&&A.constructor!=+OneDriveFile||d.menus.addMenuItems(m,["share"],u));m.addSeparator(u);null!=A&&A.isRenamable()&&this.addMenuItems(m,["rename"],u);d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(m,["upload"],u):(d.menus.addMenuItems(m,["makeCopy"],u),null!=A&&(A.constructor!=OneDriveFile&&A.constructor!=DriveFile||d.menus.addMenuItems(m,["moveToFolder"],u),m.addSeparator(u),null!=A.getFolderUrl()&&d.menus.addMenuItems(m,["openFolder"],u),null!=A.getFileUrl()&&d.menus.addMenuItems(m,+["openFile"],u)));m.addSeparator(u);null!=A&&A.isRevisionHistorySupported()&&d.menus.addMenuItems(m,["revisionHistory"],u);if(null!=A&&null!=d.fileNode&&"1"!=urlParams.embedInline){var B=null!=A.getTitle()?A.getTitle():d.defaultFilename;(A.constructor==DriveFile&&null!=A.sync&&A.sync.isConnected()||!/(\.html)$/i.test(B))&&this.addMenuItems(m,["properties"],u)}"simple"==Editor.currentTheme&&d.menus.addMenuItems(m,["-","autosave"],u)}else A=this.editorUi.getCurrentFile(),null!=A&&A.constructor==DriveFile?+(A.isRestricted()&&this.addMenuItems(m,["exportOptionsDisabled"],u),this.addMenuItems(m,["save","-","share"],u),B=this.addMenuItem(m,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.drawio.com/doc/faq/synchronize"),m.addSeparator(u)):this.addMenuItems(m,["new"],u),this.addSubmenu("openFrom",m,u),isLocalStorage&&this.addSubmenu("openRecent",m,u),null!=A&&A.constructor==DriveFile?this.addMenuItems(m,"new - rename makeCopy openFolder moveToFolder".split(" "),+u):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==A||A.constructor==LocalFile&&null==A.fileHandle||(m.addSeparator(u),B=this.addMenuItem(m,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(m,["-","save","saveAs","-"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==A||this.addMenuItems(m,["share","-"],u),null!=A&&A.isRenamable()&&+this.addMenuItems(m,["rename"],u),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(m,["upload"],u):(this.addMenuItems(m,["makeCopy"],u),null!=A&&(A.constructor==OneDriveFile&&this.addMenuItems(m,["moveToFolder"],u),null!=A.getFolderUrl()&&d.menus.addMenuItems(m,["openFolder"],u)))),m.addSeparator(u),this.addSubmenu("importFrom",m,u),this.addSubmenu("exportAs",m,u),m.addSeparator(u),this.addSubmenu("embed",m,u),this.addSubmenu("publish",m,u),m.addSeparator(u),+this.addSubmenu("newLibrary",m,u),this.addSubmenu("openLibraryFrom",m,u),d.isRevisionHistorySupported()&&this.addMenuItems(m,["-","revisionHistory"],u),null!=A&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(B=null!=A.getTitle()?A.getTitle():d.defaultFilename,(A.constructor==DriveFile&&null!=A.sync&&A.sync.isConnected()||!/(\.html)$/i.test(B))&&this.addMenuItems(m,["-","properties"])),this.addMenuItems(m,["-","pageSetup"],u),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(m,["print"],u),+this.addMenuItems(m,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(m,u){function A(M){var P=encodeURIComponent(M.name)+(null==M.url?"":"@"+encodeURIComponent(M.url));if(!H[P]){for(var S=M.name,V=0;null!=G[S.toLowerCase()];)S=M.name+" ("+ ++V+")";null==v[P]&&(I.push({name:M.name,url:M.url,label:S,title:M.url}),G[S.toLowerCase()]=M,v[P]=M)}}for(var B=mxUtils.bind(this,function(M,P,S,V,W){var X=d.editor.graph,Z=this.styleChange(m,null!=V?V:M,[mxConstants.STYLE_FONTFAMILY,+"fontSource","FType"],[M,null!=P?encodeURIComponent(P):null,null],null,u,function(){X.setFont(M,P);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[M,null!=P?encodeURIComponent(P):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});S&&(S=document.createElement("img"),+S.className="geAdaptiveAsset",S.setAttribute("src",Editor.crossImage),S.setAttribute("title",mxResources.get("delete")),S.setAttribute("valign","absmiddle"),S.setAttribute("border","0"),S.style.position="relative",S.style.top="2px",S.style.width="14px",S.style.cursor="default",S.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(S),mxEvent.addListener(S,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(M,P);this.editorUi.hideCurrentMenu();+mxEvent.consume(Y)})));Graph.addFont(M,P);Z.firstChild.nextSibling.style.fontFamily=M;W=null!=V?V:M;null!=P&&(W+=" ("+P+")");Z.setAttribute("title",W)}),H={},T=0;T<this.defaultFonts.length;T++){var k=this.defaultFonts[T];"string"===typeof k?B(k):null!=k.fontFamily&&null!=k.fontUrl&&(H[encodeURIComponent(k.fontFamily)+"@"+encodeURIComponent(k.fontUrl)]=!0,B(k.fontFamily,k.fontUrl))}m.addSeparator(u);var v={},G={},I=[];for(T=0;T<this.customFonts.length;T++)A(this.customFonts[T]);I.sort(function(M,P){return M.label<+P.label?-1:M.label>P.label?1:0});if(0<I.length){for(T=0;T<I.length;T++)B(I[T].name,I[T].url,!0,I[T].label);m.addSeparator(u)}m.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),u);m.addSeparator(u);m.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var M=this.editorUi.editor.graph,P=M.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",V=null;if(M.isEditing()){var W=+M.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){P=mxUtils.getCssFontFamily(X.fontFamily);X=M.getView().getState(M.cellEditor.getEditingCell());V=null!=X?X.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=W&&W!=M.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){V=W.getAttribute("data-font-src");break}else if(W.getAttribute("face")==P){V=null;break}W=W.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?+(V=null,S="g"):S="w")}}}else X=M.getView().getState(M.getSelectionCell()),null!=X&&(P=X.style[mxConstants.STYLE_FONTFAMILY]||P,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?S="g":(S="w",V=W)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==M.cellEditor.textarea&&(Z=M.cellEditor.saveSelection());P=new FontDialog(this.editorUi,P,V,S,mxUtils.bind(this,function(Y,ba,+ea){null!=Z&&(M.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),M.isEditing())M.setFont(Y,ba);else{M.getModel().beginUpdate();try{M.stopEditing(!1),M.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),M.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),M.setCellStyles("FType",null)}finally{M.getModel().endUpdate()}}}));this.editorUi.showDialog(P.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);P.init()}),+u,null,!0)})))}})();function DiagramPage(b,g){this.node=b;null!=g?this.node.setAttribute("id",g):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};+DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,g,l){this.ui=b;this.page=g;this.previous=this.name=l}+RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,g,l){this.ui=b;this.oldIndex=g;this.newIndex=l}+MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(b,g,l){this.ui=b;this.previousPage=this.page=g;null!=g&&(this.ui.updatePageRoot(g),null!=l&&(g.viewState=l))}+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var g=this.ui.editor,l=g.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(g.getGraphXml(!0)));b.viewState=l.getViewState();b.root=l.model.root;null!=b.model&&b.model.rootChanged(b.root);l.view.clear(b.root,!0);l.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;+l.model.prefix=Editor.guid()+"-";l.model.rootChanged(b.root);l.setViewState(b.viewState);l.gridEnabled=l.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);g.graph.fireEvent(new mxEventObject(mxEvent.ROOT));g.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,g,l,d,q){SelectPage.call(this,b,l);this.relatedPage=g;this.index=d;this.previousIndex=null;this.noSelect=q}mxUtils.extend(ChangePage,SelectPage);+ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};function ReplaceDiagram(b,g){this.ui=b;this.data=g}+ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,g=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var l=new mxCodec(this.data.ownerDocument),d=new mxGraphModel;l.decode(this.data,d);this.data=g;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=d.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,!0);b.model.rootChanged(d.root);b.fireEvent(new mxEventObject(mxEvent.ROOT))};EditorUi.prototype.tabContainerHeight=36;EditorUi.prototype.setTabContainerVisible=function(b){this.tabContainerHeight=b?EditorUi.prototype.tabContainerHeight:0;isLocalStorage&&(mxSettings.settings.pages=0<this.tabContainerHeight,mxSettings.save());this.editor.updateGraphComponents();this.refresh()};EditorUi.prototype.isTabContainerVisible=function(){return 0<this.tabContainerHeight};-EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&null!=b)for(var m=0;m<this.pages.length;m++)if(this.pages[m]==b){f=m;break}return f};EditorUi.prototype.getPageById=function(b,f){f=null!=f?f:this.pages;if(null!=f)for(var m=0;m<f.length;m++)if(f[m].getId()==b)return f[m];return null};-EditorUi.prototype.createImageForPageLink=function(b,f,m,d){var t=b.indexOf(","),y=null;0<t&&(t=this.getPageById(b.substring(t+1)),null!=t&&t!=f&&(y=this.getImageForPage(t,f,m,d),y.originalSrc=b));null==y&&(y={originalSrc:b});return y};-EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,f=this.currentPage;null!=f&&(b.tooltipHandler.hide(),null==f.viewState||null==f.viewState.scrollTop||null==f.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(f.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};-EditorUi.prototype.getImageForPage=function(b,f,m,d){m=null!=m?m:this.editor.graph;var t=m.getGlobalVariable;m=this.createTemporaryGraph(m.getStylesheet());var y=this.getPageIndex(null!=f?f:this.currentPage);m.getGlobalVariable=function(C){return"pagenumber"==C?y+1:"page"==C&&null!=f?f.getName():t.apply(this,arguments)};document.body.appendChild(m.container);this.updatePageRoot(b);m.setAdaptiveColors(b.viewState.adaptiveColors);m.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=-"";d=m.getSvg(null,null,null,null,null,null,null,null,null,null,d,null,null,null,!0,!0);var x=m.getGraphBounds();document.body.removeChild(m.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(d)),x.width,x.height,x.x,x.y)};-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,f=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var x=-this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";this.tabContainer.style.visibility=0==parseInt(this.tabContainer.style.height)?"hidden":"";x!=this.tabContainer.style.height&&this.refresh(!1)}f.apply(b.view,arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,-function(x,C){x=C.getProperty("edit").changes;for(C=0;C<x.length;C++)if(x[C]instanceof RenamePage||x[C]instanceof ChangePage||x[C]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==x.length&&x[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var m=b.sizeDidChange,d=null,t=this;b.sizeDidChange=function(){var x=m.apply(this,arguments);null!=t.currentPage&&d!=t.currentPage&&(d=t.currentPage,t.pageSelected());return x};b.addListener(mxEvent.ROOT,mxUtils.bind(this,-function(){b.checkDefaultParent()}));var y=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",y);this.editor.addListener("pagesPatched",y);this.editor.addListener("pageRenamed",y);this.editor.addListener("pageMoved",y);this.editor.addListener("fileLoaded",y);this.editor.addListener("pageSelected",mxUtils.bind(this,function(x,C){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle();null!=-this.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(x,C){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};-EditorUi.prototype.scrollToPage=function(b,f){var m=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),d=null!=b?b:this.currentPage;null!=m&&null!=this.tabScroller&&this.tabScroller.children.length>m&&null!=this.tabScroller.children[m]&&(d!=this.lastScrollPage||f)&&(this.tabScroller.children[m].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[m].className="geTab gePageTab geActivePage",this.lastScrollPage=d)};-EditorUi.prototype.restoreViewState=function(b,f,m){b=null!=b?this.getPageById(b.getId()):null;var d=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(d.setViewState(f),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+f.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+f.scrollTop,d.restoreSelection(m))};-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),m=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),t=parseFloat(b.getAttribute("pageHeight")),y=b.getAttribute("background"),x=this.parseBackgroundImage(b.getAttribute("backgroundImage")),C=b.getAttribute("extFonts");if(C)try{C=C.split("|").map(function(K){K=K.split("^");return{name:K[0],url:K[1]}})}catch(K){console.log("ExtFonts format error: "+K.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=y&&0<y.length?y:null,backgroundImage:x,pageScale:isNaN(m)?mxGraph.prototype.pageScale:m,pageFormat:isNaN(d)||isNaN(t)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:-mxSettings.getPageFormat():new mxRectangle(0,0,d,t),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:C||[]}};-Graph.prototype.saveViewState=function(b,f,m,d){m||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),f.setAttribute("fold",-null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);m=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=m&&(f.setAttribute("pageWidth",m.width),f.setAttribute("pageHeight",m.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,d),null!=d&&f.setAttribute("backgroundImage",-JSON.stringify(d)));f.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");f.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?f.removeAttribute("adaptiveColors"):f.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&f.setAttribute("extFonts",b.extFonts.map(function(t){return t.name+"^"+t.url}).join("|"))};+EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};EditorUi.prototype.getPageIndex=function(b){var g=null;if(null!=this.pages&&null!=b)for(var l=0;l<this.pages.length;l++)if(this.pages[l]==b){g=l;break}return g};EditorUi.prototype.getPageById=function(b,g){g=null!=g?g:this.pages;if(null!=g)for(var l=0;l<g.length;l++)if(g[l].getId()==b)return g[l];return null};+EditorUi.prototype.createImageForPageLink=function(b,g,l,d){var q=b.indexOf(","),y=null;0<q&&(q=this.getPageById(b.substring(q+1)),null!=q&&q!=g&&(y=this.getImageForPage(q,g,l,d),y.originalSrc=b));null==y&&(y={originalSrc:b});return y};+EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,g=this.currentPage;null!=g&&(b.tooltipHandler.hide(),null==g.viewState||null==g.viewState.scrollTop||null==g.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(g.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};+EditorUi.prototype.getImageForPage=function(b,g,l,d){l=null!=l?l:this.editor.graph;var q=l.getGlobalVariable;l=this.createTemporaryGraph(l.getStylesheet());var y=this.getPageIndex(null!=g?g:this.currentPage);l.getGlobalVariable=function(D){return"pagenumber"==D?y+1:"page"==D&&null!=g?g.getName():q.apply(this,arguments)};document.body.appendChild(l.container);this.updatePageRoot(b);l.setAdaptiveColors(b.viewState.adaptiveColors);l.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=+"";d=l.getSvg(null,null,null,null,null,null,null,null,null,null,d,null,null,null,!0,!0);var x=l.getGraphBounds();document.body.removeChild(l.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(d)),x.width,x.height,x.x,x.y)};+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,g=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var x=+this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";this.tabContainer.style.visibility=0==parseInt(this.tabContainer.style.height)?"hidden":"";x!=this.tabContainer.style.height&&this.refresh(!1)}g.apply(b.view,arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,+function(x,D){x=D.getProperty("edit").changes;for(D=0;D<x.length;D++)if(x[D]instanceof RenamePage||x[D]instanceof ChangePage||x[D]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==x.length&&x[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var l=b.sizeDidChange,d=null,q=this;b.sizeDidChange=function(){var x=l.apply(this,arguments);null!=q.currentPage&&d!=q.currentPage&&(d=q.currentPage,q.pageSelected());return x};b.addListener(mxEvent.ROOT,mxUtils.bind(this,+function(){b.checkDefaultParent()}));var y=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",y);this.editor.addListener("pagesPatched",y);this.editor.addListener("pageRenamed",y);this.editor.addListener("pageMoved",y);this.editor.addListener("fileLoaded",y);this.editor.addListener("pageSelected",mxUtils.bind(this,function(x,D){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle();null!=+this.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(x,D){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};+EditorUi.prototype.scrollToPage=function(b,g){var l=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),d=null!=b?b:this.currentPage;null!=l&&null!=this.tabScroller&&this.tabScroller.children.length>l&&null!=this.tabScroller.children[l]&&(d!=this.lastScrollPage||g)&&(this.tabScroller.children[l].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[l].className="geTab gePageTab geActivePage",this.lastScrollPage=d)};+EditorUi.prototype.restoreViewState=function(b,g,l){b=null!=b?this.getPageById(b.getId()):null;var d=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,g):(d.setViewState(g),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+g.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+g.scrollTop,d.restoreSelection(l))};+Graph.prototype.createViewState=function(b){var g=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),q=parseFloat(b.getAttribute("pageHeight")),y=b.getAttribute("background"),x=this.parseBackgroundImage(b.getAttribute("backgroundImage")),D=b.getAttribute("extFonts");if(D)try{D=D.split("|").map(function(J){J=J.split("^");return{name:J[0],url:J[1]}})}catch(J){console.log("ExtFonts format error: "+J.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=g?"0"!=g:this.defaultPageVisible,background:null!=y&&0<y.length?y:null,backgroundImage:x,pageScale:isNaN(l)?mxGraph.prototype.pageScale:l,pageFormat:isNaN(d)||isNaN(q)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:+mxSettings.getPageFormat():new mxRectangle(0,0,d,q),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:D||[]}};+Graph.prototype.saveViewState=function(b,g,l,d){l||(g.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),g.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),g.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),g.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),g.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),g.setAttribute("connect",null==b||b.connect?"1":"0"),g.setAttribute("arrows",null==b||b.arrows?"1":"0"),g.setAttribute("fold",+null==b||b.foldingEnabled?"1":"0"));g.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);l=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=l&&(g.setAttribute("pageWidth",l.width),g.setAttribute("pageHeight",l.height));null!=b&&(null!=b.background&&g.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,d),null!=d&&g.setAttribute("backgroundImage",+JSON.stringify(d)));g.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");g.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?g.removeAttribute("adaptiveColors"):g.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&g.setAttribute("extFonts",b.extFonts.map(function(q){return q.name+"^"+q.url}).join("|"))};Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,adaptiveColors:this.adaptiveColors,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};-Graph.prototype.setViewState=function(b,f){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.adaptiveColors=b.adaptiveColors;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;-this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var m=this.extFonts;this.extFonts=b.extFonts||[];if(f&&null!=m)for(f=0;f<m.length;f++){var d=document.getElementById("extFont_"+m[f].name);null!=d&&d.parentNode.removeChild(d)}for(f=0;f<this.extFonts.length;f++)this.addExtFont(this.extFonts[f].name,-this.extFonts[f].url,!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,+Graph.prototype.setViewState=function(b,g){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.adaptiveColors=b.adaptiveColors;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;+this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var l=this.extFonts;this.extFonts=b.extFonts||[];if(g&&null!=l)for(g=0;g<l.length;g++){var d=document.getElementById("extFont_"+l[g].name);null!=d&&d.parentNode.removeChild(d)}for(g=0;g<this.extFonts.length;g++)this.addExtFont(this.extFonts[g].name,+this.extFonts[g].url,!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat="undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.adaptiveColors=-null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,f,m){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=f*this.view.scale+b.scrollLeft,this.container.scrollTop=m*this.view.scale+b.scrollTop)};-Graph.prototype.addExtFont=function(b,f,m){if(b&&f){var d="extFont_"+b;if(null==document.getElementById(d))if(0==f.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",f,null,d);else{document.getElementsByTagName("head");var t=document.createElement("style");t.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+f+'");\n}'));t.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(t)}if(!m){null==this.extFonts&&(this.extFonts=[]);m=this.extFonts;-d=!0;for(t=0;t<m.length;t++)if(m[t].name==b){d=!1;break}d&&this.extFonts.push({name:b,url:f})}}};-EditorUi.prototype.updatePageRoot=function(b,f){if(null==b.root){f=this.editor.extractGraphModel(b.node,null,f);var m=Editor.extractParserError(f);if(m)throw Error(m);null!=f?(b.graphModelNode=f,b.viewState=this.editor.graph.createViewState(f),m=new mxCodec(f.ownerDocument),b.root=m.decode(f).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){f=this.editor.extractGraphModel(b.node);-if(m=Editor.extractParserError(f))throw Error(m);null!=f&&(b.graphModelNode=f)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)f=new mxCell,f.setId("1"),b.root.insert(f),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};-EditorUi.prototype.updateDiagramData=function(b,f){if(null==this.getPageIndex(b.page))this.insertPage(null,null,f);else{var m=new mxCodec(b.node.ownerDocument),d=new mxGraphModel;m.decode(b.node,d);m=new mxCodec(f.ownerDocument);var t=new mxGraphModel;m.decode(f,t);this.selectPage(b.page);f=this.diffCells(d.root,t.root);this.patchPage(b.page,f,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};-EditorUi.prototype.selectPage=function(b,f,m){try{if(b!=this.currentPage){var d=this.editor.graph;d.isEditing()&&d.stopEditing(!1);f=null!=f?f:!1;d.isMouseDown=!1;d.reset();var t=d.model.createUndoableEdit();t.ignoreEdit=!0;var y=new SelectPage(this,b,m);y.execute();t.add(y);t.notify();f||d.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",t))}}catch(x){this.handleError(x)}};-EditorUi.prototype.selectNextPage=function(b){var f=this.currentPage;null!=f&&null!=this.pages&&(f=mxUtils.indexOf(this.pages,f),b?this.selectPage(this.pages[mxUtils.mod(f+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(f-1,this.pages.length)]))};-EditorUi.prototype.insertPage=function(b,f,m){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),m),f=null!=f?f:this.pages.length,f=new ChangePage(this,b,b,f),this.editor.graph.model.execute(f));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};-EditorUi.prototype.createPage=function(b,f,m){f=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f,m);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var m=this.pages[f].getName();null!=m&&0<m.length&&(b[m]=m)}f=this.pages.length;do m=mxResources.get("pageWithNumber",[++f]);while(null!=b[m]);return m};-EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,m=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=m){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(m==this.pages.length-1?m--:m++,d=this.pages[m]):1>=this.pages.length&&(d=this.insertPage(),f.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,d))}finally{f.model.endUpdate()}}}catch(t){this.handleError(t)}return b};-EditorUi.prototype.duplicatePage=function(b,f){var m=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var t=b.node.cloneNode(!1);t.removeAttribute("id");var y={},x=d.createCellLookup([d.model.root]);m=new DiagramPage(t);m.root=d.cloneCell(d.model.root,null,y);var C=new mxGraphModel;C.prefix=Editor.guid()+"-";C.setRoot(m.root);d.updateCustomLinks(d.createCellMapping(y,x),[m.root]);m.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(m);-m.viewState.scale=1;delete m.viewState.scrollLeft;delete m.viewState.scrollTop;delete m.viewState.currentRoot;delete m.viewState.defaultParent;m.setName(f);m=this.insertPage(m,mxUtils.indexOf(this.pages,b)+1)}}catch(K){this.handleError(K)}return m};EditorUi.prototype.initDiagramNode=function(b,f){null==f&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,f);EditorUi.removeChildNodes(b.node);b.node.appendChild(f)};-EditorUi.prototype.clonePages=function(b){for(var f=[],m=[],d=0;d<b.length;d++)try{m.push(this.clonePage(b[d]))}catch(t){f.push(mxResources.get("pageWithNumber",[d+1])+": "+t.toString())}if(0<f.length){b=Error(f.join("\n"));try{0<m.length&&(b.fallbackFileData=this.getXmlForPages(m))}catch(t){}throw b;}return m};-EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),m=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(m,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);f.diagramModified=b.diagramModified;return f};-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(m){null!=m&&0<m.length&&this.editor.graph.model.execute(new RenamePage(this,b,m))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};+null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,g,l){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=g*this.view.scale+b.scrollLeft,this.container.scrollTop=l*this.view.scale+b.scrollTop)};+Graph.prototype.addExtFont=function(b,g,l){if(b&&g){var d="extFont_"+b;if(null==document.getElementById(d))if(0==g.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",g,null,d);else{document.getElementsByTagName("head");var q=document.createElement("style");q.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+g+'");\n}'));q.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(q)}if(!l){null==this.extFonts&&(this.extFonts=[]);l=this.extFonts;+d=!0;for(q=0;q<l.length;q++)if(l[q].name==b){d=!1;break}d&&this.extFonts.push({name:b,url:g})}}};+EditorUi.prototype.updatePageRoot=function(b,g){if(null==b.root){g=this.editor.extractGraphModel(b.node,null,g);var l=Editor.extractParserError(g);if(l)throw Error(l);null!=g?(b.graphModelNode=g,b.viewState=this.editor.graph.createViewState(g),l=new mxCodec(g.ownerDocument),b.root=l.decode(g).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){g=this.editor.extractGraphModel(b.node);+if(l=Editor.extractParserError(g))throw Error(l);null!=g&&(b.graphModelNode=g)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)g=new mxCell,g.setId("1"),b.root.insert(g),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};+EditorUi.prototype.updateDiagramData=function(b,g){if(null==this.getPageIndex(b.page))this.insertPage(null,null,g);else{var l=new mxCodec(b.node.ownerDocument),d=new mxGraphModel;l.decode(b.node,d);l=new mxCodec(g.ownerDocument);var q=new mxGraphModel;l.decode(g,q);this.selectPage(b.page);g=this.diffCells(d.root,q.root);this.patchPage(b.page,g,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};+EditorUi.prototype.selectPage=function(b,g,l){try{if(b!=this.currentPage){var d=this.editor.graph;d.isEditing()&&d.stopEditing(!1);g=null!=g?g:!1;d.isMouseDown=!1;d.reset();var q=d.model.createUndoableEdit();q.ignoreEdit=!0;var y=new SelectPage(this,b,l);y.execute();q.add(y);q.notify();g||d.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",q))}}catch(x){this.handleError(x)}};+EditorUi.prototype.selectNextPage=function(b){var g=this.currentPage;null!=g&&null!=this.pages&&(g=mxUtils.indexOf(this.pages,g),b?this.selectPage(this.pages[mxUtils.mod(g+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(g-1,this.pages.length)]))};+EditorUi.prototype.insertPage=function(b,g,l){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),l),g=null!=g?g:this.pages.length,g=new ChangePage(this,b,b,g),this.editor.graph.model.execute(g));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};+EditorUi.prototype.createPage=function(b,g,l){g=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),g);g.setName(null!=b?b:this.createPageName());this.initDiagramNode(g,l);return g};EditorUi.prototype.createPageName=function(){for(var b={},g=0;g<this.pages.length;g++){var l=this.pages[g].getName();null!=l&&0<l.length&&(b[l]=l)}g=this.pages.length;do l=mxResources.get("pageWithNumber",[++g]);while(null!=b[l]);return l};+EditorUi.prototype.removePage=function(b){try{var g=this.editor.graph,l=mxUtils.indexOf(this.pages,b);if(g.isEnabled()&&0<=l){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);g.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(l==this.pages.length-1?l--:l++,d=this.pages[l]):1>=this.pages.length&&(d=this.insertPage(),g.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));g.model.execute(new ChangePage(this,b,d))}finally{g.model.endUpdate()}}}catch(q){this.handleError(q)}return b};+EditorUi.prototype.duplicatePage=function(b,g){var l=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var q=b.node.cloneNode(!1);q.removeAttribute("id");var y={},x=d.createCellLookup([d.model.root]);l=new DiagramPage(q);l.root=d.cloneCell(d.model.root,null,y);var D=new mxGraphModel;D.prefix=Editor.guid()+"-";D.setRoot(l.root);d.updateCustomLinks(d.createCellMapping(y,x),[l.root]);l.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(l);+l.viewState.scale=1;delete l.viewState.scrollLeft;delete l.viewState.scrollTop;delete l.viewState.currentRoot;delete l.viewState.defaultParent;l.setName(g);l=this.insertPage(l,mxUtils.indexOf(this.pages,b)+1)}}catch(J){this.handleError(J)}return l};EditorUi.prototype.initDiagramNode=function(b,g){null==g&&(g=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,g);EditorUi.removeChildNodes(b.node);b.node.appendChild(g)};+EditorUi.prototype.clonePages=function(b){for(var g=[],l=[],d=0;d<b.length;d++)try{l.push(this.clonePage(b[d]))}catch(q){g.push(mxResources.get("pageWithNumber",[d+1])+": "+q.toString())}if(0<g.length){b=Error(g.join("\n"));try{0<l.length&&(b.fallbackFileData=this.getXmlForPages(l))}catch(q){}throw b;}return l};+EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var g=new DiagramPage(b.node.cloneNode(!0)),l=b==this.currentPage?this.editor.graph.getViewState():b.viewState;g.viewState=mxUtils.clone(l,EditorUi.transientViewStateProperties);g.root=this.editor.graph.model.cloneCell(b.root,null,!0);g.diagramModified=b.diagramModified;return g};+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var g=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(l){null!=l&&0<l.length&&this.editor.graph.model.execute(new RenamePage(this,b,l))}),mxResources.get("rename"));this.showDialog(g.container,300,80,!0,!0);g.init()}return b};EditorUi.prototype.movePage=function(b,g){this.editor.graph.model.execute(new MovePage(this,b,g))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer geTabItem";return b};-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,f=document.createElement("div");f.className="geTabScroller";for(var m=null,d=0;d<this.pages.length;d++)mxUtils.bind(this,function(t,y){y.className=this.pages[t]==this.currentPage?"geTab gePageTab geActivePage":"geTab gePageTab geInactivePage";y.setAttribute("draggable","true");mxEvent.addListener(y,"dragstart",mxUtils.bind(this,function(x){b.isEnabled()?(mxClient.IS_FF&&x.dataTransfer.setData("Text",-"<diagram/>"),m=t):mxEvent.consume(x)}));mxEvent.addListener(y,"dragend",mxUtils.bind(this,function(x){m=null;x.stopPropagation();x.preventDefault()}));mxEvent.addListener(y,"dragover",mxUtils.bind(this,function(x){null!=m&&(x.dataTransfer.dropEffect="move");x.stopPropagation();x.preventDefault()}));mxEvent.addListener(y,"drop",mxUtils.bind(this,function(x){null!=m&&t!=m&&this.movePage(m,t);x.stopPropagation();x.preventDefault()}));f.appendChild(y)})(d,this.createTabForPage(this.pages[d],d+1));d=-null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(f);this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());this.leftScrollTab=this.createLeftScrollTab();this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);-this.tabScroller=f;this.tabScroller.scrollLeft=d;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(t){this.checkTabScrollerOverflow()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.leftScrollTab.style,"transition","all 0.2s linear");mxUtils.setPrefixedStyle(this.rightScrollTab.style,"transition","all 0.2s linear")}),0)}};+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,g=document.createElement("div");g.className="geTabScroller";for(var l=null,d=0;d<this.pages.length;d++)mxUtils.bind(this,function(q,y){y.className=this.pages[q]==this.currentPage?"geTab gePageTab geActivePage":"geTab gePageTab geInactivePage";y.setAttribute("draggable","true");mxEvent.addListener(y,"dragstart",mxUtils.bind(this,function(x){b.isEnabled()?(mxClient.IS_FF&&x.dataTransfer.setData("Text",+"<diagram/>"),l=q):mxEvent.consume(x)}));mxEvent.addListener(y,"dragend",mxUtils.bind(this,function(x){l=null;x.stopPropagation();x.preventDefault()}));mxEvent.addListener(y,"dragover",mxUtils.bind(this,function(x){null!=l&&(x.dataTransfer.dropEffect="move");x.stopPropagation();x.preventDefault()}));mxEvent.addListener(y,"drop",mxUtils.bind(this,function(x){null!=l&&q!=l&&this.movePage(l,q);x.stopPropagation();x.preventDefault()}));g.appendChild(y)})(d,this.createTabForPage(this.pages[d],d+1));d=+null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(g);this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());this.leftScrollTab=this.createLeftScrollTab();this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);+this.tabScroller=g;this.tabScroller.scrollLeft=d;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(q){this.checkTabScrollerOverflow()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.leftScrollTab.style,"transition","all 0.2s linear");mxUtils.setPrefixedStyle(this.rightScrollTab.style,"transition","all 0.2s linear")}),0)}};EditorUi.prototype.checkTabScrollerOverflow=function(){null!=this.tabScroller&&null!=this.tabContainer&&2<this.tabContainer.children.length&&(this.tabScroller.scrollWidth>this.tabScroller.offsetWidth?(this.leftScrollTab.style.display="",this.rightScrollTab.style.display="",0==this.tabScroller.scrollLeft?this.leftScrollTab.classList.add("geDisabledControlTab"):this.leftScrollTab.classList.remove("geDisabledControlTab"),Math.ceil(this.tabScroller.scrollLeft)+this.tabScroller.offsetWidth>=this.tabScroller.scrollWidth?this.rightScrollTab.classList.add("geDisabledControlTab"):this.rightScrollTab.classList.remove("geDisabledControlTab")):(this.leftScrollTab.style.display="none",this.rightScrollTab.style.display="none"))};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};EditorUi.prototype.createTab=function(){var b=document.createElement("div");b.className="geTab";return b};-EditorUi.prototype.getShortPageName=function(b){var f=null;null!=b&&(f=b.getName(),null!=f&&36<f.length&&(f=f.substring(0,34)+"..."));return f};-EditorUi.prototype.createControlTab=function(b,f,m){var d=this.createTab();d.className="geTab geControlTab";d.style.width="30px";null!=b&&d.setAttribute("title",b);b=document.createElement("div");b.className="geAdaptiveAsset";b.style.backgroundImage="url("+f+")";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition="center";b.style.backgroundSize="24px";b.style.position="relative";b.style.width="100%";b.style.height="100%";d.appendChild(b);mxEvent.addListener(d,"click",m);return d};-EditorUi.prototype.createPageInsertTab=function(){return this.createControlTab(mxResources.get("insertPage"),Editor.plusImage,mxUtils.bind(this,function(b){try{this.insertPage()}catch(f){this.handleError(f)}mxEvent.consume(b)}))};-EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(null,Editor.thinArrowLeftImage,mxUtils.bind(this,function(b){var f=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:-f,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft-=f;mxEvent.consume(b)}))};-EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.thinArrowRightImage,mxUtils.bind(this,function(b){var f=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:f,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=f;mxEvent.consume(b)}))};-EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.verticalDotsImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(mxUtils.bind(this,function(t,y){this.menus.get("pages").funct(t,y)}));f.div.className+=" geMenubarMenu";f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});var m=mxEvent.getClientX(b),-d=mxEvent.getClientY(b);f.popup(m,d,null,b);this.setCurrentMenu(f);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,f){var m=this.createTab(),d=b.getName()||mxResources.get("untitled"),t=b.getId();m.setAttribute("title",d+(null!=t?" ("+t+")":"")+" ["+f+"]");f=document.createElement("span");f.style.maxWidth="160px";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,d);m.appendChild(f);this.addTabListeners(b,m);return m};-EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var m=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(K){this.renamePage(b);mxEvent.consume(K)}));var d=document.createElement("div");d.className="geTabMenuButton";d.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="10px";f.appendChild(d);var t=!1,y=!1,x=mxUtils.bind(this,-function(K){t=null!=this.currentMenu;y=b==this.currentPage;this.scrollToPage(b);m.isMouseDown||y||this.selectPage(b)}),C=mxUtils.bind(this,function(K){if(m.isEnabled()&&!m.isMouseDown&&(y&&(mxEvent.isTouchEvent(K)||mxEvent.getSource(K)==d)||mxEvent.isPopupTrigger(K))&&(m.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(K)||!t)){var M=new mxPopupMenu(this.createPageMenu(b));M.div.className+=" geMenubarMenu";M.smartSeparators=!0;M.showDisabled=!0;M.autoExpand=!0;M.hideMenu=mxUtils.bind(this,-function(){mxPopupMenu.prototype.hideMenu.apply(M,arguments);this.resetCurrentMenu();M.destroy()});var N=mxEvent.getClientX(K),P=mxEvent.getClientY(K);M.popup(N,P,null,K);this.setCurrentMenu(M,f)}mxEvent.consume(K)});mxEvent.addGestureListeners(d,x,null,C);mxEvent.addGestureListeners(f,x,null,C)};-EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(m,d){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||m.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),d));m.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),d);m.addSeparator(d);this.currentPage==-b&&1<this.pages.length&&this.menus.addSubmenu("movePage",m,d,mxResources.get("move"));m.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d);m.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),d)})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();-(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(f,m,d){d.ui=f.ui;return m};b.afterDecode=function(f,m,d){f=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=f;return d};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(f,m,d){d.ui=f.ui;return m};b.afterDecode=function(f,m,d){f=d.previous;d.previous=d.name;d.name=f;return d};mxCodecRegistry.register(b)})();-(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(f,m,d){d.setAttribute("relatedPage",m.relatedPage.getId());null==m.index&&(d.setAttribute("name",m.relatedPage.getName()),null!=m.relatedPage.viewState&&d.setAttribute("viewState",JSON.stringify(m.relatedPage.viewState,function(t,y){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,t)?y:void 0})),null!=m.relatedPage.root&&f.encodeCell(m.relatedPage.root,d));return d};-b.beforeDecode=function(f,m,d){d.ui=f.ui;d.relatedPage=d.ui.getPageById(m.getAttribute("relatedPage"));if(null==d.relatedPage){var t=m.ownerDocument.createElement("diagram");t.setAttribute("id",m.getAttribute("relatedPage"));t.setAttribute("name",m.getAttribute("name"));d.relatedPage=new DiagramPage(t);t=m.getAttribute("viewState");null!=t&&(d.relatedPage.viewState=JSON.parse(t),m.removeAttribute("viewState"));m=m.cloneNode(!0);t=m.firstChild;if(null!=t)for(d.relatedPage.root=f.decodeCell(t,!1),d=-t.nextSibling,t.parentNode.removeChild(t),t=d;null!=t;){d=t.nextSibling;if(t.nodeType==mxConstants.NODETYPE_ELEMENT){var y=t.getAttribute("id");null==f.lookup(y)&&f.decodeCell(t)}t.parentNode.removeChild(t);t=d}}return m};b.afterDecode=function(f,m,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,t,y,x,C){t=null!=t?t:!1;null==y&&(y=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var K=y.slice(),M=0;M<y.length;M++)"1"==mxUtils.getValue(this.getCurrentCellStyle(y[M]),"treeFolding","0")&&this.foldTreeCell(d,y[M]);y=K;y=b.apply(this,arguments)}finally{this.model.endUpdate()}return y};Graph.prototype.foldTreeCell=function(d,t){this.model.beginUpdate();try{var y=-[];this.traverse(t,!0,mxUtils.bind(this,function(C,K){var M=null!=K&&this.isTreeEdge(K);M&&y.push(K);C==t||null!=K&&!M||y.push(C);return(null==K||M)&&(C==t||!this.model.isCollapsed(C))}));this.model.setCollapsed(t,d);for(var x=0;x<y.length;x++)this.model.setVisible(y[x],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,t,y,x,C,K){return this.model.filterCells(this.getEdges(d,t,y,x,C,K),mxUtils.bind(this,-function(M){return this.isTreeEdge(M)}))};Graph.prototype.getIncomingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(A){return l.isVertex(A)&&y(A)}function t(A){var H=!1;null!=A&&(H="1"==-e.getCurrentCellStyle(A).treeMoving);return H}function y(A){var H=!1;null!=A&&(A=l.getParent(A),H=e.view.getState(A),H="tree"==(null!=H?H.style:e.getCellStyle(A)).containerType);return H}function x(A){var H=!1;null!=A&&(A=l.getParent(A),H=e.view.getState(A),e.view.getState(A),H=null!=(null!=H?H.style:e.getCellStyle(A)).childLayout);return H}function C(A){A=e.view.getState(A);if(null!=A){var H=e.getIncomingTreeEdges(A.cell);if(0<H.length&&(H=e.view.getState(H[0]),null!=H&&(H=H.absolutePoints,null!=-H&&0<H.length&&(H=H[H.length-1],null!=H)))){if(H.y==A.y&&Math.abs(H.x-A.getCenterX())<A.width/2)return mxConstants.DIRECTION_SOUTH;if(H.y==A.y+A.height&&Math.abs(H.x-A.getCenterX())<A.width/2)return mxConstants.DIRECTION_NORTH;if(H.x>A.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function K(A,H){H=null!=H?H:!0;e.model.beginUpdate();try{var R=e.model.getParent(A),g=e.getIncomingTreeEdges(A),q=e.cloneCells([g[0],A]);e.model.setTerminal(q[0],e.model.getTerminal(g[0],-!0),!0);var F=C(A),J=R.geometry;F==mxConstants.DIRECTION_SOUTH||F==mxConstants.DIRECTION_NORTH?q[1].geometry.x+=H?A.geometry.width+10:-q[1].geometry.width-10:q[1].geometry.y+=H?A.geometry.height+10:-q[1].geometry.height-10;e.view.currentRoot!=R&&(q[1].geometry.x-=J.x,q[1].geometry.y-=J.y);var L=e.view.getState(A),Q=e.view.scale;if(null!=L){var U=mxRectangle.fromRectangle(L);F==mxConstants.DIRECTION_SOUTH||F==mxConstants.DIRECTION_NORTH?U.x+=(H?A.geometry.width+10:-q[1].geometry.width-10)*Q:U.y+=(H?-A.geometry.height+10:-q[1].geometry.height-10)*Q;var V=e.getOutgoingTreeEdges(e.model.getTerminal(g[0],!0));if(null!=V){for(var W=F==mxConstants.DIRECTION_SOUTH||F==mxConstants.DIRECTION_NORTH,X=J=g=0;X<V.length;X++){var Z=e.model.getTerminal(V[X],!1);if(F==C(Z)){var Y=e.view.getState(Z);Z!=A&&null!=Y&&(W&&H!=Y.getCenterX()<L.getCenterX()||!W&&H!=Y.getCenterY()<L.getCenterY())&&mxUtils.intersects(U,Y)&&(g=10+Math.max(g,(Math.min(U.x+U.width,Y.x+Y.width)-Math.max(U.x,Y.x))/Q),J=10+Math.max(J,(Math.min(U.y+-U.height,Y.y+Y.height)-Math.max(U.y,Y.y))/Q))}}W?J=0:g=0;for(X=0;X<V.length;X++)if(Z=e.model.getTerminal(V[X],!1),F==C(Z)&&(Y=e.view.getState(Z),Z!=A&&null!=Y&&(W&&H!=Y.getCenterX()<L.getCenterX()||!W&&H!=Y.getCenterY()<L.getCenterY()))){var ba=[];e.traverse(Y.cell,!0,function(ea,ca){var da=null!=ca&&e.isTreeEdge(ca);da&&ba.push(ca);(null==ca||da)&&ba.push(ea);return null==ca||da});e.moveCells(ba,(H?1:-1)*g,(H?1:-1)*J)}}}return e.addCells(q,R)}finally{e.model.endUpdate()}}function M(A){e.model.beginUpdate();-try{var H=C(A),R=e.getIncomingTreeEdges(A),g=e.cloneCells([R[0],A]);e.model.setTerminal(R[0],g[1],!1);e.model.setTerminal(g[0],g[1],!0);e.model.setTerminal(g[0],A,!1);var q=e.model.getParent(A),F=q.geometry,J=[];e.view.currentRoot!=q&&(g[1].geometry.x-=F.x,g[1].geometry.y-=F.y);e.traverse(A,!0,function(U,V){var W=null!=V&&e.isTreeEdge(V);W&&J.push(V);(null==V||W)&&J.push(U);return null==V||W});var L=A.geometry.width+40,Q=A.geometry.height+40;H==mxConstants.DIRECTION_SOUTH?L=0:H==mxConstants.DIRECTION_NORTH?-(L=0,Q=-Q):H==mxConstants.DIRECTION_WEST?(L=-L,Q=0):H==mxConstants.DIRECTION_EAST&&(Q=0);e.moveCells(J,L,Q);return e.addCells(g,q)}finally{e.model.endUpdate()}}function N(A,H){e.model.beginUpdate();try{var R=e.model.getParent(A),g=e.getIncomingTreeEdges(A),q=C(A);0==g.length&&(g=[e.createEdge(R,null,"",null,null,e.createCurrentEdgeStyle())],q=H);var F=e.cloneCells([g[0],A]);e.model.setTerminal(F[0],A,!0);null==e.model.getTerminal(F[0],!1)&&(e.model.setTerminal(F[0],F[1],!1),e.applyNewEdgeStyle(F[1],-[F[0]],q));g=e.getOutgoingTreeEdges(A);var J=R.geometry;H=[];e.view.currentRoot==R&&(J=new mxRectangle);for(var L=0;L<g.length;L++){var Q=e.model.getTerminal(g[L],!1);null!=Q&&H.push(Q)}var U=e.view.getBounds(H),V=e.view.translate,W=e.view.scale;q==mxConstants.DIRECTION_SOUTH?(F[1].geometry.x=null==U?A.geometry.x+(A.geometry.width-F[1].geometry.width)/2:(U.x+U.width)/W-V.x-J.x+10,F[1].geometry.y+=F[1].geometry.height-J.y+40):q==mxConstants.DIRECTION_NORTH?(F[1].geometry.x=null==U?A.geometry.x+(A.geometry.width--F[1].geometry.width)/2:(U.x+U.width)/W-V.x+-J.x+10,F[1].geometry.y-=F[1].geometry.height+J.y+40):(F[1].geometry.x=q==mxConstants.DIRECTION_WEST?F[1].geometry.x-(F[1].geometry.width+J.x+40):F[1].geometry.x+(F[1].geometry.width-J.x+40),F[1].geometry.y=null==U?A.geometry.y+(A.geometry.height-F[1].geometry.height)/2:(U.y+U.height)/W-V.y+-J.y+10);return e.addCells(F,R)}finally{e.model.endUpdate()}}function P(A,H,R){A=e.getOutgoingTreeEdges(A);R=e.view.getState(R);var g=[];if(null!=R&&null!=A){for(var q=-0;q<A.length;q++){var F=e.view.getState(e.model.getTerminal(A[q],!1));null!=F&&(!H&&Math.min(F.x+F.width,R.x+R.width)>=Math.max(F.x,R.x)||H&&Math.min(F.y+F.height,R.y+R.height)>=Math.max(F.y,R.y))&&g.push(F)}g.sort(function(J,L){return H?J.x+J.width-L.x-L.width:J.y+J.height-L.y-L.height})}return g}function I(A,H){var R=C(A),g=H==mxConstants.DIRECTION_EAST||H==mxConstants.DIRECTION_WEST;(R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST)==g&&R!=H?c.actions.get("selectParent").funct():R==-H?(H=e.getOutgoingTreeEdges(A),null!=H&&0<H.length&&e.setSelectionCell(e.model.getTerminal(H[0],!1))):(R=e.getIncomingTreeEdges(A),null!=R&&0<R.length&&(g=P(e.model.getTerminal(R[0],!0),g,A),A=e.view.getState(A),null!=A&&(A=mxUtils.indexOf(g,A),0<=A&&(A+=H==mxConstants.DIRECTION_NORTH||H==mxConstants.DIRECTION_WEST?-1:1,0<=A&&A<=g.length-1&&e.setSelectionCell(g[A].cell)))))}var c=this,e=c.editor.graph,l=e.getModel(),n=c.menus.createPopupMenu;c.menus.createPopupMenu=function(A,H,R){n.apply(this,arguments);-if(1==e.getSelectionCount()){H=e.getSelectionCell();var g=e.getOutgoingTreeEdges(H);A.addSeparator();0<g.length&&(d(e.getSelectionCell())&&this.addMenuItems(A,["selectChildren"],null,R),this.addMenuItems(A,["selectDescendants"],null,R));d(e.getSelectionCell())?(A.addSeparator(),0<e.getIncomingTreeEdges(H).length&&this.addMenuItems(A,["selectSiblings","selectParent"],null,R)):0<e.model.getEdgeCount(H)&&this.addMenuItems(A,["selectConnections"],null,R)}};c.actions.addAction("selectChildren",function(A){if(e.isEnabled()&&-1==e.getSelectionCount()){var H=e.getSelectionCell();A=mxEvent.isControlDown(A)?null:e.getOutgoingTreeEdges(H);if(null!=A&&0<A.length){H=[];for(var R=0;R<A.length;R++)H.push(e.model.getTerminal(A[R],!1));e.setSelectionCells(H)}else e.setSelectionCells(e.model.getChildren(H))}},null,null,"Alt+Shift+C");c.actions.addAction("selectDescendants",function(A){var H=e.getSelectionCell();if(e.isEnabled()&&null!=H){var R=[];mxEvent.isControlDown(A)||e.traverse(H,!0,function(g,q){var F=null!=q&&e.isTreeEdge(q);-F&&mxEvent.isControlDown(A)&&R.push(q);(null==q||F)&&R.push(g);return null==q||F});if(0==R.length||1==R.length&&R[0]==H)R=e.model.getDescendants(H);e.setSelectionCells(R)}},null,null,"Alt+Shift+X");c.actions.addAction("selectParent",function(A){var H=e.getSelectionCell();e.isEnabled()&&null!=H&&(A=mxEvent.isControlDown(A)?null:e.getIncomingTreeEdges(H),null!=A&&0<A.length?e.setSelectionCell(e.model.getTerminal(A[0],!0)):e.selectParentCell())},null,null,"Alt+Shift+P");c.actions.addAction("selectSiblings",-function(A){if(e.isEnabled()&&1==e.getSelectionCount()){var H=e.getSelectionCell(),R=mxEvent.isControlDown(A)?null:e.getIncomingTreeEdges(H);A=[];if(null!=R&&0<R.length&&(R=e.getOutgoingTreeEdges(e.model.getTerminal(R[0],!0)),null!=R))for(var g=0;g<R.length;g++)A.push(e.model.getTerminal(R[g],!1));0==A.length&&(A=e.model.getChildren(e.model.getParent(H)));e.setSelectionCells(A)}},null,null,"Alt+Shift+S");var p=e.removeCells;e.removeCells=function(A,H){H=null!=H?H:!0;null==A&&(A=this.getDeletableCells(this.getSelectionCells()));-H&&(A=this.getDeletableCells(this.addAllEdges(A)));for(var R=[],g=0;g<A.length;g++){var q=A[g];l.isEdge(q)&&y(q)&&(R.push(q),q=l.getTerminal(q,!1));if(d(q)){var F=[];e.traverse(q,!0,function(J,L){var Q=null!=L&&e.isTreeEdge(L);Q&&F.push(L);(null==L||Q)&&F.push(J);return null==L||Q});0<F.length&&(R=R.concat(F),q=e.getIncomingTreeEdges(A[g]),A=A.concat(q))}else null!=q&&R.push(A[g])}A=R;return p.apply(this,arguments)};c.hoverIcons.getStateAt=function(A,H,R){return d(A.cell)?null:this.graph.view.getState(this.graph.getCellAt(H,-R))};var u=e.duplicateCells;e.duplicateCells=function(A,H){A=null!=A?A:this.getSelectionCells();for(var R=A.slice(0),g=0;g<R.length;g++){var q=e.view.getState(R[g]);if(null!=q&&d(q.cell)){var F=e.getIncomingTreeEdges(q.cell);for(q=0;q<F.length;q++)mxUtils.remove(F[q],A)}}this.model.beginUpdate();try{var J=u.call(this,A,H);if(J.length==A.length)for(g=0;g<A.length;g++)if(d(A[g])){var L=e.getIncomingTreeEdges(J[g]);F=e.getIncomingTreeEdges(A[g]);if(0==L.length&&0<F.length){var Q=this.cloneCell(F[0]);-this.addEdge(Q,e.getDefaultParent(),this.model.getTerminal(F[0],!0),J[g])}}}finally{this.model.endUpdate()}return J};var B=e.moveCells;e.moveCells=function(A,H,R,g,q,F,J){for(var L=null,Q=[],U=0;U<A.length;U++)(t(A[U])||d(A[U]))&&!x(A[U])&&this.isCellCollapsed(A[U])?Q=Q.concat(this.getSubtree(A[U])):Q.push(A[U]);A=mxUtils.removeDuplicates(Q);this.model.beginUpdate();try{Q=q;var V=this.getCurrentCellStyle(q);if(null!=A&&d(q)&&"1"==mxUtils.getValue(V,"treeFolding","0")){for(U=0;U<A.length;U++)if(d(A[U])||-e.model.isEdge(A[U])&&null==e.model.getTerminal(A[U],!0)){q=e.model.getParent(A[U]);break}if(null!=Q&&q!=Q&&null!=this.view.getState(A[0])){var W=e.getIncomingTreeEdges(A[0]);if(0<W.length){var X=e.view.getState(e.model.getTerminal(W[0],!0));if(null!=X){var Z=e.view.getState(Q);null!=Z&&(H=(Z.getCenterX()-X.getCenterX())/e.view.scale,R=(Z.getCenterY()-X.getCenterY())/e.view.scale)}}}}L=B.apply(this,arguments);if(null!=L&&null!=A&&L.length==A.length)for(U=0;U<L.length;U++)if(this.model.isEdge(L[U]))d(Q)&&-0>mxUtils.indexOf(L,this.model.getTerminal(L[U],!0))&&this.model.setTerminal(L[U],Q,!0);else if(d(A[U])&&(W=e.getIncomingTreeEdges(A[U]),0<W.length))if(!g)d(Q)&&0>mxUtils.indexOf(A,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],Q,!0);else if(0==e.getIncomingTreeEdges(L[U]).length){V=Q;if(null==V||V==e.model.getParent(A[U]))V=e.model.getTerminal(W[0],!0);g=this.cloneCell(W[0]);this.addEdge(g,e.getDefaultParent(),V,L[U])}}finally{this.model.endUpdate()}return L};if(null!=c.sidebar){var D=-c.sidebar.dropAndConnect;c.sidebar.dropAndConnect=function(A,H,R,g){var q=e.model,F=null;q.beginUpdate();try{if(F=D.apply(this,arguments),d(A))for(var J=0;J<F.length;J++)if(q.isEdge(F[J])&&null==q.getTerminal(F[J],!0)){q.setTerminal(F[J],A,!0);var L=e.getCellGeometry(F[J]);L.points=null;null!=L.getTerminalPoint(!0)&&L.setTerminalPoint(null,!0)}}finally{q.endUpdate()}return F}}var G={67:c.actions.get("selectChildren"),88:c.actions.get("selectDescendants"),80:c.actions.get("selectParent"),83:c.actions.get("selectSiblings")},-E={67:c.actions.get("copyStyle"),86:c.actions.get("pasteStyle")},T=c.onKeyDown;c.onKeyDown=function(A){try{var H=e.getSelectionCell();if(e.isEnabled()&&!e.isEditing()&&null!=H){var R=mxEvent.isAltDown(A)&&mxEvent.isShiftDown(A)?G[A.keyCode]:mxEvent.isAltDown(A)?E[A.keyCode]:null;null!=R?(R.funct(A),mxEvent.consume(A)):d(H)&&(R=null,0<e.getIncomingTreeEdges(H).length&&(9==A.which?R=mxEvent.isShiftDown(A)?M(H):N(H):13==A.which&&(R=K(H,!mxEvent.isShiftDown(A)))),null!=R&&0<R.length?(1==R.length&&e.model.isEdge(R[0])?-e.setSelectionCell(e.model.getTerminal(R[0],!1)):e.setSelectionCell(R[R.length-1]),null!=c.hoverIcons&&c.hoverIcons.update(e.view.getState(H)),e.startEditingAtCell(H),mxEvent.consume(A)):37==A.keyCode?(I(H,mxConstants.DIRECTION_WEST),mxEvent.consume(A)):38==A.keyCode?(I(H,mxConstants.DIRECTION_NORTH),mxEvent.consume(A)):39==A.keyCode?(I(H,mxConstants.DIRECTION_EAST),mxEvent.consume(A)):40==A.keyCode&&(I(H,mxConstants.DIRECTION_SOUTH),mxEvent.consume(A)))}}catch(g){c.handleError(g)}mxEvent.isConsumed(A)||-T.apply(this,arguments)};var O=e.connectVertex;e.connectVertex=function(A,H,R,g,q,F,J){var L=e.getIncomingTreeEdges(A);if(d(A)){var Q=C(A),U=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,V=H==mxConstants.DIRECTION_EAST||H==mxConstants.DIRECTION_WEST;return Q==H||0==L.length?N(A,H):U==V?M(A):K(A,H!=mxConstants.DIRECTION_NORTH&&H!=mxConstants.DIRECTION_WEST)}return O.apply(this,arguments)};e.getSubtree=function(A){var H=[A];!t(A)&&!d(A)||x(A)||e.traverse(A,!0,function(R,g){var q=null!=-g&&e.isTreeEdge(g);q&&0>mxUtils.indexOf(H,g)&&H.push(g);(null==g||q)&&0>mxUtils.indexOf(H,R)&&H.push(R);return null==g||q});return H};var S=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){S.apply(this,arguments);(t(this.state.cell)||d(this.state.cell))&&!x(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",-"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(A){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(A),mxEvent.getClientY(A),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=-mxEvent.isMouseEvent(A);this.graph.isMouseDown=!0;c.hoverIcons.reset();mxEvent.consume(A)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var k=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){k.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:-0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var v=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(A){v.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=A?"":"none")};var z=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(A,H){z.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=-null)}};if("undefined"!==typeof Sidebar){var m=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=m.apply(this,arguments),t=this.graph,y=this;return d.concat([this.addEntry("tree container",function(){var x=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");x.vertex=!0;var C=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');-C.vertex=!0;var K=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');K.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");M.geometry.relative=!0;M.edge=!0;C.insertEdge(M,!0);K.insertEdge(M,!1);x.insert(M);x.insert(C);x.insert(K);-return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var x=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");x.vertex=!0;var C=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-C.vertex=!0;var K=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');K.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");-M.geometry.relative=!0;M.edge=!0;C.insertEdge(M,!0);K.insertEdge(M,!1);var N=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-N.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),M.style);P.geometry.relative=!0;P.edge=!0;C.insertEdge(P,!0);N.insertEdge(P,!1);var I=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-I.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),M.style);c.geometry.relative=!0;c.edge=!0;C.insertEdge(c,!0);I.insertEdge(c,!1);var e=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-e.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),M.style);l.geometry.relative=!0;l.edge=!0;C.insertEdge(l,!0);e.insertEdge(l,!1);x.insert(M);x.insert(P);x.insert(c);x.insert(l);x.insert(C);x.insert(K);x.insert(N);x.insert(I);x.insert(e);return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var x=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');+EditorUi.prototype.getShortPageName=function(b){var g=null;null!=b&&(g=b.getName(),null!=g&&36<g.length&&(g=g.substring(0,34)+"..."));return g};+EditorUi.prototype.createControlTab=function(b,g,l){var d=this.createTab();d.className="geTab geControlTab";d.style.width="30px";null!=b&&d.setAttribute("title",b);b=document.createElement("div");b.className="geAdaptiveAsset";b.style.backgroundImage="url("+g+")";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition="center";b.style.backgroundSize="24px";b.style.position="relative";b.style.width="100%";b.style.height="100%";d.appendChild(b);mxEvent.addListener(d,"click",l);return d};+EditorUi.prototype.createPageInsertTab=function(){return this.createControlTab(mxResources.get("insertPage"),Editor.plusImage,mxUtils.bind(this,function(b){try{this.insertPage()}catch(g){this.handleError(g)}mxEvent.consume(b)}))};+EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(null,Editor.thinArrowLeftImage,mxUtils.bind(this,function(b){var g=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:-g,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft-=g;mxEvent.consume(b)}))};+EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.thinArrowRightImage,mxUtils.bind(this,function(b){var g=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:g,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=g;mxEvent.consume(b)}))};+EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.verticalDotsImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(mxUtils.bind(this,function(q,y){this.menus.get("pages").funct(q,y)}));g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});var l=mxEvent.getClientX(b),+d=mxEvent.getClientY(b);g.popup(l,d,null,b);this.setCurrentMenu(g);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,g){var l=this.createTab(),d=b.getName()||mxResources.get("untitled"),q=b.getId();l.setAttribute("title",d+(null!=q?" ("+q+")":"")+" ["+g+"]");g=document.createElement("span");g.style.maxWidth="160px";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,d);l.appendChild(g);this.addTabListeners(b,l);return l};+EditorUi.prototype.addTabListeners=function(b,g){mxEvent.disableContextMenu(g);var l=this.editor.graph;mxEvent.addListener(g,"dblclick",mxUtils.bind(this,function(J){this.renamePage(b);mxEvent.consume(J)}));var d=document.createElement("div");d.className="geTabMenuButton";d.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="10px";g.appendChild(d);var q=!1,y=!1,x=mxUtils.bind(this,+function(J){q=null!=this.currentMenu;y=b==this.currentPage;this.scrollToPage(b);l.isMouseDown||y||this.selectPage(b)}),D=mxUtils.bind(this,function(J){if(l.isEnabled()&&!l.isMouseDown&&(y&&(mxEvent.isTouchEvent(J)||mxEvent.getSource(J)==d)||mxEvent.isPopupTrigger(J))&&(l.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(J)||!q)){var K=new mxPopupMenu(this.createPageMenu(b));K.div.className+=" geMenubarMenu";K.smartSeparators=!0;K.showDisabled=!0;K.autoExpand=!0;K.hideMenu=mxUtils.bind(this,+function(){mxPopupMenu.prototype.hideMenu.apply(K,arguments);this.resetCurrentMenu();K.destroy()});var L=mxEvent.getClientX(J),N=mxEvent.getClientY(J);K.popup(L,N,null,J);this.setCurrentMenu(K,g)}mxEvent.consume(J)});mxEvent.addGestureListeners(d,x,null,D);mxEvent.addGestureListeners(g,x,null,D)};+EditorUi.prototype.createPageMenu=function(b,g){return mxUtils.bind(this,function(l,d){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||l.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),d));l.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),d);l.addSeparator(d);this.currentPage==+b&&1<this.pages.length&&this.menus.addSubmenu("movePage",l,d,mxResources.get("move"));l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d);l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,g)}),d)})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();+(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};b.afterDecode=function(g,l,d){g=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=g;return d};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};b.afterDecode=function(g,l,d){g=d.previous;d.previous=d.name;d.name=g;return d};mxCodecRegistry.register(b)})();+(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(g,l,d){d.setAttribute("relatedPage",l.relatedPage.getId());null==l.index&&(d.setAttribute("name",l.relatedPage.getName()),null!=l.relatedPage.viewState&&d.setAttribute("viewState",JSON.stringify(l.relatedPage.viewState,function(q,y){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,q)?y:void 0})),null!=l.relatedPage.root&&g.encodeCell(l.relatedPage.root,d));return d};+b.beforeDecode=function(g,l,d){d.ui=g.ui;d.relatedPage=d.ui.getPageById(l.getAttribute("relatedPage"));if(null==d.relatedPage){var q=l.ownerDocument.createElement("diagram");q.setAttribute("id",l.getAttribute("relatedPage"));q.setAttribute("name",l.getAttribute("name"));d.relatedPage=new DiagramPage(q);q=l.getAttribute("viewState");null!=q&&(d.relatedPage.viewState=JSON.parse(q),l.removeAttribute("viewState"));l=l.cloneNode(!0);q=l.firstChild;if(null!=q)for(d.relatedPage.root=g.decodeCell(q,!1),d=+q.nextSibling,q.parentNode.removeChild(q),q=d;null!=q;){d=q.nextSibling;if(q.nodeType==mxConstants.NODETYPE_ELEMENT){var y=q.getAttribute("id");null==g.lookup(y)&&g.decodeCell(q)}q.parentNode.removeChild(q);q=d}}return l};b.afterDecode=function(g,l,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,q,y,x,D){q=null!=q?q:!1;null==y&&(y=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var J=y.slice(),K=0;K<y.length;K++)"1"==mxUtils.getValue(this.getCurrentCellStyle(y[K]),"treeFolding","0")&&this.foldTreeCell(d,y[K]);y=J;y=b.apply(this,arguments)}finally{this.model.endUpdate()}return y};Graph.prototype.foldTreeCell=function(d,q){this.model.beginUpdate();try{var y=+[];this.traverse(q,!0,mxUtils.bind(this,function(D,J){var K=null!=J&&this.isTreeEdge(J);K&&y.push(J);D==q||null!=J&&!K||y.push(D);return(null==J||K)&&(D==q||!this.model.isCollapsed(D))}));this.model.setCollapsed(q,d);for(var x=0;x<y.length;x++)this.model.setVisible(y[x],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,q,y,x,D,J){return this.model.filterCells(this.getEdges(d,q,y,x,D,J),mxUtils.bind(this,+function(K){return this.isTreeEdge(K)}))};Graph.prototype.getIncomingTreeEdges=function(d,q){return this.getTreeEdges(d,q,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,q){return this.getTreeEdges(d,q,!1,!0,!1)};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){g.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(B){return p.isVertex(B)&&y(B)}function q(B){var H=!1;null!=B&&(H="1"==+f.getCurrentCellStyle(B).treeMoving);return H}function y(B){var H=!1;null!=B&&(B=p.getParent(B),H=f.view.getState(B),H="tree"==(null!=H?H.style:f.getCellStyle(B)).containerType);return H}function x(B){var H=!1;null!=B&&(B=p.getParent(B),H=f.view.getState(B),f.view.getState(B),H=null!=(null!=H?H.style:f.getCellStyle(B)).childLayout);return H}function D(B){B=f.view.getState(B);if(null!=B){var H=f.getIncomingTreeEdges(B.cell);if(0<H.length&&(H=f.view.getState(H[0]),null!=H&&(H=H.absolutePoints,null!=+H&&0<H.length&&(H=H[H.length-1],null!=H)))){if(H.y==B.y&&Math.abs(H.x-B.getCenterX())<B.width/2)return mxConstants.DIRECTION_SOUTH;if(H.y==B.y+B.height&&Math.abs(H.x-B.getCenterX())<B.width/2)return mxConstants.DIRECTION_NORTH;if(H.x>B.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function J(B,H){H=null!=H?H:!0;f.model.beginUpdate();try{var T=f.model.getParent(B),k=f.getIncomingTreeEdges(B),v=f.cloneCells([k[0],B]);f.model.setTerminal(v[0],f.model.getTerminal(k[0],+!0),!0);var G=D(B),I=T.geometry;G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?v[1].geometry.x+=H?B.geometry.width+10:-v[1].geometry.width-10:v[1].geometry.y+=H?B.geometry.height+10:-v[1].geometry.height-10;f.view.currentRoot!=T&&(v[1].geometry.x-=I.x,v[1].geometry.y-=I.y);var M=f.view.getState(B),P=f.view.scale;if(null!=M){var S=mxRectangle.fromRectangle(M);G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?S.x+=(H?B.geometry.width+10:-v[1].geometry.width-10)*P:S.y+=(H?+B.geometry.height+10:-v[1].geometry.height-10)*P;var V=f.getOutgoingTreeEdges(f.model.getTerminal(k[0],!0));if(null!=V){for(var W=G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH,X=I=k=0;X<V.length;X++){var Z=f.model.getTerminal(V[X],!1);if(G==D(Z)){var Y=f.view.getState(Z);Z!=B&&null!=Y&&(W&&H!=Y.getCenterX()<M.getCenterX()||!W&&H!=Y.getCenterY()<M.getCenterY())&&mxUtils.intersects(S,Y)&&(k=10+Math.max(k,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/P),I=10+Math.max(I,(Math.min(S.y++S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/P))}}W?I=0:k=0;for(X=0;X<V.length;X++)if(Z=f.model.getTerminal(V[X],!1),G==D(Z)&&(Y=f.view.getState(Z),Z!=B&&null!=Y&&(W&&H!=Y.getCenterX()<M.getCenterX()||!W&&H!=Y.getCenterY()<M.getCenterY()))){var ba=[];f.traverse(Y.cell,!0,function(ea,ca){var fa=null!=ca&&f.isTreeEdge(ca);fa&&ba.push(ca);(null==ca||fa)&&ba.push(ea);return null==ca||fa});f.moveCells(ba,(H?1:-1)*k,(H?1:-1)*I)}}}return f.addCells(v,T)}finally{f.model.endUpdate()}}function K(B){f.model.beginUpdate();+try{var H=D(B),T=f.getIncomingTreeEdges(B),k=f.cloneCells([T[0],B]);f.model.setTerminal(T[0],k[1],!1);f.model.setTerminal(k[0],k[1],!0);f.model.setTerminal(k[0],B,!1);var v=f.model.getParent(B),G=v.geometry,I=[];f.view.currentRoot!=v&&(k[1].geometry.x-=G.x,k[1].geometry.y-=G.y);f.traverse(B,!0,function(S,V){var W=null!=V&&f.isTreeEdge(V);W&&I.push(V);(null==V||W)&&I.push(S);return null==V||W});var M=B.geometry.width+40,P=B.geometry.height+40;H==mxConstants.DIRECTION_SOUTH?M=0:H==mxConstants.DIRECTION_NORTH?+(M=0,P=-P):H==mxConstants.DIRECTION_WEST?(M=-M,P=0):H==mxConstants.DIRECTION_EAST&&(P=0);f.moveCells(I,M,P);return f.addCells(k,v)}finally{f.model.endUpdate()}}function L(B,H){f.model.beginUpdate();try{var T=f.model.getParent(B),k=f.getIncomingTreeEdges(B),v=D(B);0==k.length&&(k=[f.createEdge(T,null,"",null,null,f.createCurrentEdgeStyle())],v=H);var G=f.cloneCells([k[0],B]);f.model.setTerminal(G[0],B,!0);null==f.model.getTerminal(G[0],!1)&&(f.model.setTerminal(G[0],G[1],!1),f.applyNewEdgeStyle(G[1],+[G[0]],v));k=f.getOutgoingTreeEdges(B);var I=T.geometry;H=[];f.view.currentRoot==T&&(I=new mxRectangle);for(var M=0;M<k.length;M++){var P=f.model.getTerminal(k[M],!1);null!=P&&H.push(P)}var S=f.view.getBounds(H),V=f.view.translate,W=f.view.scale;v==mxConstants.DIRECTION_SOUTH?(G[1].geometry.x=null==S?B.geometry.x+(B.geometry.width-G[1].geometry.width)/2:(S.x+S.width)/W-V.x-I.x+10,G[1].geometry.y+=G[1].geometry.height-I.y+40):v==mxConstants.DIRECTION_NORTH?(G[1].geometry.x=null==S?B.geometry.x+(B.geometry.width-+G[1].geometry.width)/2:(S.x+S.width)/W-V.x+-I.x+10,G[1].geometry.y-=G[1].geometry.height+I.y+40):(G[1].geometry.x=v==mxConstants.DIRECTION_WEST?G[1].geometry.x-(G[1].geometry.width+I.x+40):G[1].geometry.x+(G[1].geometry.width-I.x+40),G[1].geometry.y=null==S?B.geometry.y+(B.geometry.height-G[1].geometry.height)/2:(S.y+S.height)/W-V.y+-I.y+10);return f.addCells(G,T)}finally{f.model.endUpdate()}}function N(B,H,T){B=f.getOutgoingTreeEdges(B);T=f.view.getState(T);var k=[];if(null!=T&&null!=B){for(var v=+0;v<B.length;v++){var G=f.view.getState(f.model.getTerminal(B[v],!1));null!=G&&(!H&&Math.min(G.x+G.width,T.x+T.width)>=Math.max(G.x,T.x)||H&&Math.min(G.y+G.height,T.y+T.height)>=Math.max(G.y,T.y))&&k.push(G)}k.sort(function(I,M){return H?I.x+I.width-M.x-M.width:I.y+I.height-M.y-M.height})}return k}function c(B,H){var T=D(B),k=H==mxConstants.DIRECTION_EAST||H==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==k&&T!=H?e.actions.get("selectParent").funct():T==+H?(H=f.getOutgoingTreeEdges(B),null!=H&&0<H.length&&f.setSelectionCell(f.model.getTerminal(H[0],!1))):(T=f.getIncomingTreeEdges(B),null!=T&&0<T.length&&(k=N(f.model.getTerminal(T[0],!0),k,B),B=f.view.getState(B),null!=B&&(B=mxUtils.indexOf(k,B),0<=B&&(B+=H==mxConstants.DIRECTION_NORTH||H==mxConstants.DIRECTION_WEST?-1:1,0<=B&&B<=k.length-1&&f.setSelectionCell(k[B].cell)))))}var e=this,f=e.editor.graph,p=f.getModel(),n=e.menus.createPopupMenu;e.menus.createPopupMenu=function(B,H,T){n.apply(this,arguments);+if(1==f.getSelectionCount()){H=f.getSelectionCell();var k=f.getOutgoingTreeEdges(H);B.addSeparator();0<k.length&&(d(f.getSelectionCell())&&this.addMenuItems(B,["selectChildren"],null,T),this.addMenuItems(B,["selectDescendants"],null,T));d(f.getSelectionCell())?(B.addSeparator(),0<f.getIncomingTreeEdges(H).length&&this.addMenuItems(B,["selectSiblings","selectParent"],null,T)):0<f.model.getEdgeCount(H)&&this.addMenuItems(B,["selectConnections"],null,T)}};e.actions.addAction("selectChildren",function(B){if(f.isEnabled()&&+1==f.getSelectionCount()){var H=f.getSelectionCell();B=mxEvent.isControlDown(B)?null:f.getOutgoingTreeEdges(H);if(null!=B&&0<B.length){H=[];for(var T=0;T<B.length;T++)H.push(f.model.getTerminal(B[T],!1));f.setSelectionCells(H)}else f.setSelectionCells(f.model.getChildren(H))}},null,null,"Alt+Shift+C");e.actions.addAction("selectDescendants",function(B){var H=f.getSelectionCell();if(f.isEnabled()&&null!=H){var T=[];mxEvent.isControlDown(B)||f.traverse(H,!0,function(k,v){var G=null!=v&&f.isTreeEdge(v);+G&&mxEvent.isControlDown(B)&&T.push(v);(null==v||G)&&T.push(k);return null==v||G});if(0==T.length||1==T.length&&T[0]==H)T=f.model.getDescendants(H);f.setSelectionCells(T)}},null,null,"Alt+Shift+X");e.actions.addAction("selectParent",function(B){var H=f.getSelectionCell();f.isEnabled()&&null!=H&&(B=mxEvent.isControlDown(B)?null:f.getIncomingTreeEdges(H),null!=B&&0<B.length?f.setSelectionCell(f.model.getTerminal(B[0],!0)):f.selectParentCell())},null,null,"Alt+Shift+P");e.actions.addAction("selectSiblings",+function(B){if(f.isEnabled()&&1==f.getSelectionCount()){var H=f.getSelectionCell(),T=mxEvent.isControlDown(B)?null:f.getIncomingTreeEdges(H);B=[];if(null!=T&&0<T.length&&(T=f.getOutgoingTreeEdges(f.model.getTerminal(T[0],!0)),null!=T))for(var k=0;k<T.length;k++)B.push(f.model.getTerminal(T[k],!1));0==B.length&&(B=f.model.getChildren(f.model.getParent(H)));f.setSelectionCells(B)}},null,null,"Alt+Shift+S");var t=f.removeCells;f.removeCells=function(B,H){H=null!=H?H:!0;null==B&&(B=this.getDeletableCells(this.getSelectionCells()));+H&&(B=this.getDeletableCells(this.addAllEdges(B)));for(var T=[],k=0;k<B.length;k++){var v=B[k];p.isEdge(v)&&y(v)&&(T.push(v),v=p.getTerminal(v,!1));if(d(v)){var G=[];f.traverse(v,!0,function(I,M){var P=null!=M&&f.isTreeEdge(M);P&&G.push(M);(null==M||P)&&G.push(I);return null==M||P});0<G.length&&(T=T.concat(G),v=f.getIncomingTreeEdges(B[k]),B=B.concat(v))}else null!=v&&T.push(B[k])}B=T;return t.apply(this,arguments)};e.hoverIcons.getStateAt=function(B,H,T){return d(B.cell)?null:this.graph.view.getState(this.graph.getCellAt(H,+T))};var z=f.duplicateCells;f.duplicateCells=function(B,H){B=null!=B?B:this.getSelectionCells();for(var T=B.slice(0),k=0;k<T.length;k++){var v=f.view.getState(T[k]);if(null!=v&&d(v.cell)){var G=f.getIncomingTreeEdges(v.cell);for(v=0;v<G.length;v++)mxUtils.remove(G[v],B)}}this.model.beginUpdate();try{var I=z.call(this,B,H);if(I.length==B.length)for(k=0;k<B.length;k++)if(d(B[k])){var M=f.getIncomingTreeEdges(I[k]);G=f.getIncomingTreeEdges(B[k]);if(0==M.length&&0<G.length){var P=this.cloneCell(G[0]);+this.addEdge(P,f.getDefaultParent(),this.model.getTerminal(G[0],!0),I[k])}}}finally{this.model.endUpdate()}return I};var F=f.moveCells;f.moveCells=function(B,H,T,k,v,G,I){for(var M=null,P=[],S=0;S<B.length;S++)(q(B[S])||d(B[S]))&&!x(B[S])&&this.isCellCollapsed(B[S])?P=P.concat(this.getSubtree(B[S])):P.push(B[S]);B=mxUtils.removeDuplicates(P);this.model.beginUpdate();try{P=v;var V=this.getCurrentCellStyle(v);if(null!=B&&d(v)&&"1"==mxUtils.getValue(V,"treeFolding","0")){for(S=0;S<B.length;S++)if(d(B[S])||+f.model.isEdge(B[S])&&null==f.model.getTerminal(B[S],!0)){v=f.model.getParent(B[S]);break}if(null!=P&&v!=P&&null!=this.view.getState(B[0])){var W=f.getIncomingTreeEdges(B[0]);if(0<W.length){var X=f.view.getState(f.model.getTerminal(W[0],!0));if(null!=X){var Z=f.view.getState(P);null!=Z&&(H=(Z.getCenterX()-X.getCenterX())/f.view.scale,T=(Z.getCenterY()-X.getCenterY())/f.view.scale)}}}}M=F.apply(this,arguments);if(null!=M&&null!=B&&M.length==B.length)for(S=0;S<M.length;S++)if(this.model.isEdge(M[S]))d(P)&&+0>mxUtils.indexOf(M,this.model.getTerminal(M[S],!0))&&this.model.setTerminal(M[S],P,!0);else if(d(B[S])&&(W=f.getIncomingTreeEdges(B[S]),0<W.length))if(!k)d(P)&&0>mxUtils.indexOf(B,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],P,!0);else if(0==f.getIncomingTreeEdges(M[S]).length){V=P;if(null==V||V==f.model.getParent(B[S]))V=f.model.getTerminal(W[0],!0);k=this.cloneCell(W[0]);this.addEdge(k,f.getDefaultParent(),V,M[S])}}finally{this.model.endUpdate()}return M};if(null!=e.sidebar){var C=+e.sidebar.dropAndConnect;e.sidebar.dropAndConnect=function(B,H,T,k){var v=f.model,G=null;v.beginUpdate();try{if(G=C.apply(this,arguments),d(B))for(var I=0;I<G.length;I++)if(v.isEdge(G[I])&&null==v.getTerminal(G[I],!0)){v.setTerminal(G[I],B,!0);var M=f.getCellGeometry(G[I]);M.points=null;null!=M.getTerminalPoint(!0)&&M.setTerminalPoint(null,!0)}}finally{v.endUpdate()}return G}}var E={67:e.actions.get("selectChildren"),88:e.actions.get("selectDescendants"),80:e.actions.get("selectParent"),83:e.actions.get("selectSiblings")},+R={67:e.actions.get("copyStyle"),86:e.actions.get("pasteStyle")},U=e.onKeyDown;e.onKeyDown=function(B){try{var H=f.getSelectionCell();if(f.isEnabled()&&!f.isEditing()&&null!=H){var T=mxEvent.isAltDown(B)&&mxEvent.isShiftDown(B)?E[B.keyCode]:mxEvent.isAltDown(B)?R[B.keyCode]:null;null!=T?(T.funct(B),mxEvent.consume(B)):d(H)&&(T=null,0<f.getIncomingTreeEdges(H).length&&(9==B.which?T=mxEvent.isShiftDown(B)?K(H):L(H):13==B.which&&(T=J(H,!mxEvent.isShiftDown(B)))),null!=T&&0<T.length?(1==T.length&&f.model.isEdge(T[0])?+f.setSelectionCell(f.model.getTerminal(T[0],!1)):f.setSelectionCell(T[T.length-1]),null!=e.hoverIcons&&e.hoverIcons.update(f.view.getState(H)),f.startEditingAtCell(H),mxEvent.consume(B)):37==B.keyCode?(c(H,mxConstants.DIRECTION_WEST),mxEvent.consume(B)):38==B.keyCode?(c(H,mxConstants.DIRECTION_NORTH),mxEvent.consume(B)):39==B.keyCode?(c(H,mxConstants.DIRECTION_EAST),mxEvent.consume(B)):40==B.keyCode&&(c(H,mxConstants.DIRECTION_SOUTH),mxEvent.consume(B)))}}catch(k){e.handleError(k)}mxEvent.isConsumed(B)||+U.apply(this,arguments)};var O=f.connectVertex;f.connectVertex=function(B,H,T,k,v,G,I){var M=f.getIncomingTreeEdges(B);if(d(B)){var P=D(B),S=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST,V=H==mxConstants.DIRECTION_EAST||H==mxConstants.DIRECTION_WEST;return P==H||0==M.length?L(B,H):S==V?K(B):J(B,H!=mxConstants.DIRECTION_NORTH&&H!=mxConstants.DIRECTION_WEST)}return O.apply(this,arguments)};f.getSubtree=function(B){var H=[B];!q(B)&&!d(B)||x(B)||f.traverse(B,!0,function(T,k){var v=null!=+k&&f.isTreeEdge(k);v&&0>mxUtils.indexOf(H,k)&&H.push(k);(null==k||v)&&0>mxUtils.indexOf(H,T)&&H.push(T);return null==k||v});return H};var Q=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){Q.apply(this,arguments);(q(this.state.cell)||d(this.state.cell))&&!x(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",+"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(B){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(B),mxEvent.getClientY(B),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=+mxEvent.isMouseEvent(B);this.graph.isMouseDown=!0;e.hoverIcons.reset();mxEvent.consume(B)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var m=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){m.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:+0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var u=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(B){u.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=B?"":"none")};var A=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(B,H){A.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=+null)}};if("undefined"!==typeof Sidebar){var l=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=l.apply(this,arguments),q=this.graph,y=this;return d.concat([this.addEntry("tree container",function(){var x=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");x.vertex=!0;var D=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');+D.vertex=!0;var J=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');J.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");K.geometry.relative=!0;K.edge=!0;D.insertEdge(K,!0);J.insertEdge(K,!1);x.insert(K);x.insert(D);x.insert(J);+return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var x=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");x.vertex=!0;var D=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+D.vertex=!0;var J=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');J.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");+K.geometry.relative=!0;K.edge=!0;D.insertEdge(K,!0);J.insertEdge(K,!1);var L=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+L.vertex=!0;var N=new mxCell("",new mxGeometry(0,0,0,0),K.style);N.geometry.relative=!0;N.edge=!0;D.insertEdge(N,!0);L.insertEdge(N,!1);var c=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),K.style);e.geometry.relative=!0;e.edge=!0;D.insertEdge(e,!0);c.insertEdge(e,!1);var f=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+f.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),K.style);p.geometry.relative=!0;p.edge=!0;D.insertEdge(p,!0);f.insertEdge(p,!1);x.insert(K);x.insert(N);x.insert(e);x.insert(p);x.insert(D);x.insert(J);x.insert(L);x.insert(c);x.insert(f);return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var x=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');x.vertex=!0;return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var x=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-x.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");C.geometry.setTerminalPoint(new mxPoint(-40,40),!0);C.geometry.relative=!0;C.edge=!0;x.insertEdge(C,!1);return y.createVertexTemplateFromCells([x,C],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var x=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),-'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');x.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");-C.geometry.setTerminalPoint(new mxPoint(-40,40),!0);C.geometry.relative=!0;C.edge=!0;x.insertEdge(C,!1);return y.createVertexTemplateFromCells([x,C],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree orgchart organization division",function(){var x=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var C=new mxCell("Organization",new mxGeometry(80,-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;var K=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');K.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-M.geometry.relative=!0;M.edge=!0;C.insertEdge(M,!0);K.insertEdge(M,!1);var N=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');N.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");P.geometry.relative=-!0;P.edge=!0;C.insertEdge(P,!0);N.insertEdge(P,!1);x.insert(M);x.insert(P);x.insert(C);x.insert(K);x.insert(N);return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree root",function(){var x=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.setAttributeForCell(x,"treeRoot","1");x.vertex=!0;return y.createVertexTemplateFromCells([x],-x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree division",function(){var x=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-C.geometry.setTerminalPoint(new mxPoint(0,0),!0);C.geometry.relative=!0;C.edge=!0;x.insertEdge(C,!1);return y.createVertexTemplateFromCells([x,C],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree sub sections",function(){var x=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");x.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");-C.geometry.setTerminalPoint(new mxPoint(110,-40),!0);C.geometry.relative=!0;C.edge=!0;x.insertEdge(C,!1);var K=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");K.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),C.style);M.geometry.setTerminalPoint(new mxPoint(110,-40),!0);M.geometry.relative=!0;M.edge=!0;K.insertEdge(M,!1);return y.createVertexTemplateFromCells([C,M,x,K],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;-EditorUi.initMinimalTheme=function(){function b(I,c){if(EditorUi.windowed){var e=I.editor.graph;e.popupMenuHandler.hideMenu();null==I.formatWindow?(c=Math.max(10,I.diagramContainer.clientWidth-248),e=Math.min(566,e.container.clientHeight-10),I.formatWindow=new WrapperWindow(I,mxResources.get("format"),c,60,240,e,function(l){I.createFormat(l).init()}),I.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){I.formatWindow.window.fit()})),I.formatWindow.window.minimumSize=new mxRectangle(0,-0,240,80)):I.formatWindow.window.setVisible(null!=c?c:!I.formatWindow.window.isVisible())}else null==I.formatElt&&(I.formatElt=I.createSidebarContainer(),I.createFormat(I.formatElt).init(),I.formatElt.style.border="none",I.formatElt.style.width="240px",I.formatElt.style.borderLeftWidth="1px",I.formatElt.style.borderLeftStyle="solid",I.formatElt.style.right="0px"),e=I.diagramContainer.parentNode,null!=I.formatElt.parentNode?(I.formatElt.parentNode.removeChild(I.formatElt),e.style.right="0px"):(e.parentNode.appendChild(I.formatElt),-e.style.right=I.formatElt.style.width)}function f(I,c){function e(p,u){var B=I.menus.get(p);p=l.addMenu(u,mxUtils.bind(this,function(){B.funct.apply(this,arguments)}));p.setAttribute("title",u);p.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";p.className="geTitle";c.appendChild(p);return p}var l=new Menubar(I,c);if(Editor.enableCustomLibraries&&-("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=I.actions.get("newLibrary")){var n=document.createElement("div");n.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";n.className="geTitle";mxUtils.write(n,mxResources.get("newLibrary"));c.appendChild(n);mxEvent.addListener(n,"click",this.actions.get("newLibrary").funct);-n=n.cloneNode(!1);n.style.left="50%";n.style.borderLeftStyle="solid";mxUtils.write(n,mxResources.get("openLibrary"));c.appendChild(n);mxEvent.addListener(n,"click",this.actions.get("openLibrary").funct)}else n=e("newLibrary",mxResources.get("newLibrary")),n.style.display="block",n.style.fontSize="11px",n.style.left="0",n=e("openLibraryFrom",mxResources.get("openLibraryFrom")),n.style.borderLeftStyle="solid",n.style.display="block",n.style.fontSize="11px",n.style.left="50%";c.appendChild(I.sidebar.container);-c.style.overflow="hidden"}function m(I,c){if(EditorUi.windowed){var e=I.editor.graph;e.popupMenuHandler.hideMenu();null==I.sidebarWindow?(c=Math.min(e.container.clientWidth-10,218),e=Math.min(e.container.clientHeight-40,650),I.sidebarWindow=new WrapperWindow(I,mxResources.get("shapes"),10,56,c-6,e-6,function(l){f(I,l)}),I.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){I.sidebarWindow.window.fit()})),I.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),I.sidebarWindow.window.setVisible(!0),-isLocalStorage&&I.getLocalData("sidebar",function(l){I.sidebar.showEntries(l,null,!0)}),I.restoreLibraries()):I.sidebarWindow.window.setVisible(null!=c?c:!I.sidebarWindow.window.isVisible())}else null==I.sidebarElt&&(I.sidebarElt=I.createSidebarContainer(),f(I,I.sidebarElt),I.sidebarElt.style.border="none",I.sidebarElt.style.width="210px",I.sidebarElt.style.borderRight="1px solid gray"),e=I.diagramContainer.parentNode,null!=I.sidebarElt.parentNode?(I.sidebarElt.parentNode.removeChild(I.sidebarElt),-e.style.left="0px"):(e.parentNode.appendChild(I.sidebarElt),e.style.left=I.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(I){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');+x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");D.geometry.setTerminalPoint(new mxPoint(-40,40),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);return y.createVertexTemplateFromCells([x,D],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var x=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),+'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");+D.geometry.setTerminalPoint(new mxPoint(-40,40),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);return y.createVertexTemplateFromCells([x,D],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree orgchart organization division",function(){var x=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var D=new mxCell("Organization",new mxGeometry(80,+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.setAttributeForCell(D,"treeRoot","1");D.vertex=!0;var J=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');J.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");+K.geometry.relative=!0;K.edge=!0;D.insertEdge(K,!0);J.insertEdge(K,!1);var L=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var N=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");N.geometry.relative=+!0;N.edge=!0;D.insertEdge(N,!0);L.insertEdge(N,!1);x.insert(K);x.insert(N);x.insert(D);x.insert(J);x.insert(L);return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree root",function(){var x=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.setAttributeForCell(x,"treeRoot","1");x.vertex=!0;return y.createVertexTemplateFromCells([x],+x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree division",function(){var x=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");+D.geometry.setTerminalPoint(new mxPoint(0,0),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);return y.createVertexTemplateFromCells([x,D],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree sub sections",function(){var x=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");+D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);var J=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");J.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),D.style);K.geometry.setTerminalPoint(new mxPoint(110,-40),!0);K.geometry.relative=!0;K.edge=!0;J.insertEdge(K,!1);return y.createVertexTemplateFromCells([D,K,x,J],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;+EditorUi.initMinimalTheme=function(){function b(c,e){if(EditorUi.windowed){var f=c.editor.graph;f.popupMenuHandler.hideMenu();null==c.formatWindow?(e=Math.max(10,c.diagramContainer.clientWidth-248),f=Math.min(566,f.container.clientHeight-10),c.formatWindow=new WrapperWindow(c,mxResources.get("format"),e,60,240,f,function(p){c.createFormat(p).init()}),c.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){c.formatWindow.window.fit()})),c.formatWindow.window.minimumSize=new mxRectangle(0,+0,240,80)):c.formatWindow.window.setVisible(null!=e?e:!c.formatWindow.window.isVisible())}else null==c.formatElt&&(c.formatElt=c.createSidebarContainer(),c.createFormat(c.formatElt).init(),c.formatElt.style.border="none",c.formatElt.style.width="240px",c.formatElt.style.borderLeftWidth="1px",c.formatElt.style.borderLeftStyle="solid",c.formatElt.style.right="0px"),f=c.diagramContainer.parentNode,null!=c.formatElt.parentNode?(c.formatElt.parentNode.removeChild(c.formatElt),f.style.right="0px"):(f.parentNode.appendChild(c.formatElt),+f.style.right=c.formatElt.style.width)}function g(c,e){function f(t,z){var F=c.menus.get(t);t=p.addMenu(z,mxUtils.bind(this,function(){F.funct.apply(this,arguments)}));t.setAttribute("title",z);t.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";t.className="geTitle";e.appendChild(t);return t}var p=new Menubar(c,e);if(Editor.enableCustomLibraries&&+("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=c.actions.get("newLibrary")){var n=document.createElement("div");n.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";n.className="geTitle";mxUtils.write(n,mxResources.get("newLibrary"));e.appendChild(n);mxEvent.addListener(n,"click",this.actions.get("newLibrary").funct);+n=n.cloneNode(!1);n.style.left="50%";n.style.borderLeftStyle="solid";mxUtils.write(n,mxResources.get("openLibrary"));e.appendChild(n);mxEvent.addListener(n,"click",this.actions.get("openLibrary").funct)}else n=f("newLibrary",mxResources.get("newLibrary")),n.style.display="block",n.style.fontSize="11px",n.style.left="0",n=f("openLibraryFrom",mxResources.get("openLibraryFrom")),n.style.borderLeftStyle="solid",n.style.display="block",n.style.fontSize="11px",n.style.left="50%";e.appendChild(c.sidebar.container);+e.style.overflow="hidden"}function l(c,e){if(EditorUi.windowed){var f=c.editor.graph;f.popupMenuHandler.hideMenu();null==c.sidebarWindow?(e=Math.min(f.container.clientWidth-10,218),f=Math.min(f.container.clientHeight-40,650),c.sidebarWindow=new WrapperWindow(c,mxResources.get("shapes"),10,56,e-6,f-6,function(p){g(c,p)}),c.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){c.sidebarWindow.window.fit()})),c.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),c.sidebarWindow.window.setVisible(!0),+isLocalStorage&&c.getLocalData("sidebar",function(p){c.sidebar.showEntries(p,null,!0)}),c.restoreLibraries()):c.sidebarWindow.window.setVisible(null!=e?e:!c.sidebarWindow.window.isVisible())}else null==c.sidebarElt&&(c.sidebarElt=c.createSidebarContainer(),g(c,c.sidebarElt),c.sidebarElt.style.border="none",c.sidebarElt.style.width="210px",c.sidebarElt.style.borderRight="1px solid gray"),f=c.diagramContainer.parentNode,null!=c.sidebarElt.parentNode?(c.sidebarElt.parentNode.removeChild(c.sidebarElt),+f.style.left="0px"):(f.parentNode.appendChild(c.sidebarElt),f.style.left=c.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(c){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur=-"1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var t=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(I){t.apply(this,arguments);-null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};var y=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){y.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var x=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(I,c){null!=c.shortcut&&900>d&&!mxClient.IS_IOS?I.firstChild.nextSibling.setAttribute("title",c.shortcut):-x.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(I){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=I?I:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var C=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();C.apply(this,arguments)};var K=EditorUi.prototype.setGraphEnabled;-EditorUi.prototype.setGraphEnabled=function(I){K.apply(this,arguments);if(I){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=c&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};-var M=Menus.prototype.init;Menus.prototype.init=function(){M.apply(this,arguments);var I=this.editorUi;EditorUi.enablePlantUml&&!I.isOffline()&&I.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var l=new ParseDialog(I,mxResources.get("plantUml")+"...","plantUml");I.showDialog(l.container,620,420,!0,!1);l.init()}));I.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var l=new ParseDialog(I,mxResources.get("mermaid")+"...","mermaid");I.showDialog(l.container,-620,420,!0,!1);l.init()}));var c="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),e=function(l,n,p,u){l.addItem(p,null,mxUtils.bind(this,function(){var B=new CreateGraphDialog(I,p,u);I.showDialog(B.container,620,420,!0,!1);B.init()}),n)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(l,n){for(var p=0;p<c.length;p++)"-"==c[p]?l.addSeparator(n):e(l,n,mxResources.get(c[p])+"...",c[p])})))};EditorUi.prototype.installFormatToolbar=function(I){var c=-this.editor.graph,e=document.createElement("div");e.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(l,n){0<c.getSelectionCount()?(I.appendChild(e),e.innerHTML="Selected: "+c.getSelectionCount()):null!=e.parentNode&&e.parentNode.removeChild(e)}))};var N=!1;EditorUi.prototype.initFormatWindow=-function(){if(!N&&null!=this.formatWindow){N=!0;var I=this.formatWindow.window.toggleMinimized,c=240;this.formatWindow.window.toggleMinimized=function(){I.apply(this,arguments);this.minimized?(c=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+c-140+"px"):(this.div.style.width=c+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-c+140)+"px");this.fit()};-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(e){mxEvent.getSource(e)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var P=EditorUi.prototype.init;EditorUi.prototype.init=function(){function I(W,X,Z){var Y=u.menus.get(W),ba=E.addMenu(mxResources.get(W),mxUtils.bind(this,function(){ba.classList.contains("mxDisabled")||Y.funct.apply(this,arguments)}),G);ba.className="geMenuItem";ba.style.display="inline-block";ba.style.boxSizing=-"border-box";ba.style.top="6px";ba.style.marginRight="6px";ba.style.height="30px";ba.style.paddingTop="6px";ba.style.paddingBottom="6px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(W));u.menus.menuCreated(Y,ba,"geMenuItem");null!=Z?(ba.style.backgroundImage="url("+Z+")",ba.style.backgroundPosition="center center",ba.style.backgroundRepeat="no-repeat",ba.style.backgroundSize="24px 24px",ba.style.width="34px",ba.innerText=""):X||(ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+-")",ba.style.backgroundPosition="right 6px center",ba.style.backgroundRepeat="no-repeat",ba.style.paddingRight="22px");return ba}function c(W,X,Z,Y,ba,ea){var ca=document.createElement("a");ca.className="geMenuItem";ca.style.display="inline-block";ca.style.boxSizing="border-box";ca.style.height="30px";ca.style.padding="6px";ca.style.position="relative";ca.style.verticalAlign="top";ca.style.top="0px";null!=u.statusContainer?D.insertBefore(ca,u.statusContainer):D.appendChild(ca);null!=ea?(ca.style.backgroundImage=-"url("+ea+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.width="34px"):mxUtils.write(ca,W);mxEvent.addListener(ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(da){da.preventDefault()}));mxEvent.addListener(ca,"click",function(da){"disabled"!=ca.getAttribute("disabled")&&X(da);mxEvent.consume(da)});null==Z&&(ca.style.marginRight="4px");null!=Y&&ca.setAttribute("title",Y);null!=ba&&(W=function(){ba.isEnabled()?-(ca.removeAttribute("disabled"),ca.style.cursor="pointer"):(ca.setAttribute("disabled","disabled"),ca.style.cursor="default")},ba.addListener("stateChanged",W),B.addListener("enabledChanged",W),W());return ca}function e(W,X,Z){Z=document.createElement("div");Z.className="geMenuItem";Z.style.display="inline-block";Z.style.verticalAlign="top";Z.style.marginRight="6px";Z.style.padding="0 4px 0 4px";Z.style.height="30px";Z.style.position="relative";Z.style.top="0px";for(var Y=0;Y<W.length;Y++)null!=W[Y]&&-(W[Y].style.margin="0px",W[Y].style.boxShadow="none",Z.appendChild(W[Y]));null!=X&&mxUtils.setOpacity(Z,X);null!=u.statusContainer?D.insertBefore(Z,u.statusContainer):D.appendChild(Z);return Z}function l(){for(var W=D.firstChild;null!=W;){var X=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=X}G=D.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;W=1E3>d;var Z=null;W||(Z=I("diagram"));X=W?I("diagram",null,-Editor.menuImage):null;null!=X&&(Z=X);e([Z,c(mxResources.get("shapes"),u.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),u.actions.get("image"),W?Editor.shapesImage:null),c(mxResources.get("format"),u.actions.get("format").funct,null,mxResources.get("format")+" ("+u.actions.get("format").shortcut+")",u.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=I("insert",!0,W?S:null);e([X,c(mxResources.get("delete"),u.actions.get("delete").funct,null,mxResources.get("delete"),-u.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);B.isEnabled()||X.classList.add("mxDisabled");411<=d&&(e([J,L],60),520<=d&&e([Q,640<=d?c("",H.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",H,Editor.zoomInImage):null,640<=d?c("",R.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",R,Editor.zoomOutImage):null],60))}P.apply(this,arguments);var n=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=n&&(n.classList.add("geSimple"),-n.classList.add("geMinimal"));n=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var p=document.createElement("div");p.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";p.style.bottom=n?"32px":"0px";this.sidebar=this.createSidebar(p);if(1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])m(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),-this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=d&&(b(this,!0),this.formatWindow.window.setVisible(!0));var u=this,B=u.editor.graph;u.toolbar=this.createToolbar(u.createDiv("geToolbar"));u.defaultLibraryName=mxResources.get("untitledLibrary");var D=document.createElement("div");D.className="geMenubarContainer";var G=null,E=new Menubar(u,D);u.statusContainer=u.createStatusContainer();u.statusContainer.style.position="relative";u.statusContainer.style.maxWidth="";u.statusContainer.style.cursor=-"default";var T=u.hideCurrentMenu;u.hideCurrentMenu=function(){T.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var O=u.descriptorChanged;u.descriptorChanged=function(){O.apply(this,arguments);var W=u.getCurrentFile();if(null!=W&&null!=W.getTitle()){var X=W.getMode();"google"==X?X="googleDrive":"github"==X?X="gitHub":"gitlab"==X?X="gitLab":"onedrive"==X&&(X="oneDrive");X=mxResources.get(X);D.setAttribute("title",W.getTitle()+(null!=X?" ("+X+")":""))}else D.removeAttribute("title")};-u.setStatusText(u.editor.getStatus());D.appendChild(u.statusContainer);u.buttonContainer=document.createElement("div");u.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";D.appendChild(u.buttonContainer);u.menubarContainer=u.buttonContainer;u.tabContainer=document.createElement("div");u.tabContainer.className="geTabContainer geTabItem";u.tabContainer.style.cssText=-"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";n=u.diagramContainer.parentNode;p=document.createElement("div");p.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";u.diagramContainer.style.top="47px";var S=Editor.addBoxImage;if(null!=u.hoverIcons){var k=u.hoverIcons.update;u.hoverIcons.update=function(){B.freehand.isDrawing()||k.apply(this,arguments)}}if(null!=B.freehand){var v=B.freehand.createStyle;B.freehand.createStyle=-function(W){return v.apply(this,arguments)+"sketch=0;"}}u.editor.addListener("statusChanged",mxUtils.bind(this,function(){u.setStatusText(u.editor.getStatus())}));u.setStatusText(u.editor.getStatus());var z=u.menus.get("viewZoom");if(null!=z){var A=function(W){if(mxEvent.isAltDown(W))u.hideCurrentMenu(),u.actions.get("customZoom").funct(),mxEvent.consume(W);else if("geMenuItem"==mxEvent.getSource(W).className||mxEvent.isShiftDown(W))u.hideCurrentMenu(),u.actions.get("smartFit").funct(),mxEvent.consume(W)},-H=u.actions.get("zoomIn"),R=u.actions.get("zoomOut"),g=u.actions.get("resetView"),q=u.actions.get("undo"),F=u.actions.get("redo"),J=c("",q.funct,null,mxResources.get("undo")+" ("+q.shortcut+")",q,Editor.undoImage),L=c("",F.funct,null,mxResources.get("redo")+" ("+F.shortcut+")",F,Editor.redoImage),Q=c("",A,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,Editor.zoomFitImage);D.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";-this.tabContainer.style.right="70px";var U=E.addMenu("100%",z.funct);U.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");U.className="geTabItem";U.style.height=u.tabContainerHeight+"px";U.style.position="absolute";U.style.display="0"!=urlParams.pages?"flex":"none";U.style.alignItems="center";U.style.justifyContent="center";U.style.paddingRight="11px";U.style.whiteSpace="nowrap";U.style.overflow="hidden";U.style.fontSize="11px";U.style.width="51px";U.style.right="0px";U.style.bottom=-"0px";U.style.boxSizing="content-box";U.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";U.style.backgroundPosition="right 6px top 15px";U.style.backgroundRepeat="no-repeat";U.style.backgroundSize="10px";U.style.zIndex="1";p.appendChild(U);(function(W){mxEvent.addListener(W,"click",A);var X=mxUtils.bind(this,function(Z,Y,ba){W.innerText="";mxUtils.write(W,Math.round(100*u.editor.graph.view.scale*(null!=ba?ba:1))+"%")});u.editor.graph.view.addListener(mxEvent.EVENT_SCALE,X);u.editor.addListener("resetGraphView",-X);u.editor.addListener("pageSelected",X);u.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(Z,Y){X(Z,Y,Y.getProperty("factor"))}))})(U);var V=u.setGraphEnabled;u.setGraphEnabled=function(){V.apply(this,arguments);null!=this.tabContainer&&(U.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}p.appendChild(D);p.appendChild(u.diagramContainer);-n.appendChild(p);u.updateTabContainer();!EditorUi.windowed&&1E3<=d&&b(this,!0);p.appendChild(u.tabContainer);l();u.addListener("lockedChanged",l);mxEvent.addListener(window,"resize",function(){l();null!=u.sidebarWindow&&u.sidebarWindow.window.fit();null!=u.formatWindow&&u.formatWindow.window.fit();null!=u.actions.outlineWindow&&u.actions.outlineWindow.window.fit();null!=u.actions.layersWindow&&u.actions.layersWindow.window.fit();null!=u.menus.chatWindow&&u.menus.chatWindow.window.fit();null!=u.menus.tagsWindow&&-u.menus.tagsWindow.window.fit();null!=u.menus.findWindow&&u.menus.findWindow.window.fit();null!=u.menus.findReplaceWindow&&u.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,t,y,x){var C=t.y,K=t.x,M=!1,N=!1;if(null!=this.states&&null!=d&&null!=t){var P=this,I=new mxCellState,c=this.graph.getView().scale,e=Math.max(2,this.getGuideTolerance()/2);I.x=d.x+K;I.y=d.y+C;I.width=d.width;I.height=d.height;for(var l=[],n=[],p=0;p<this.states.length;p++){var u=this.states[p];u instanceof mxCellState&&(x||!this.graph.isCellSelected(u.cell))&&((I.x>=u.x&&I.x<=u.x+u.width||u.x>=I.x&&u.x<=I.x+I.width)&&(I.y>-u.y+u.height+4||I.y+I.height+4<u.y)?l.push(u):(I.y>=u.y&&I.y<=u.y+u.height||u.y>=I.y&&u.y<=I.y+I.height)&&(I.x>u.x+u.width+4||I.x+I.width+4<u.x)&&n.push(u))}var B=0,D=0,G=u=0,E=0,T=0,O=0,S=0,k=5*c;if(1<l.length){l.push(I);l.sort(function(H,R){return H.y-R.y});var v=!1;p=I==l[0];c=I==l[l.length-1];if(!p&&!c)for(p=1;p<l.length-1;p++)if(I==l[p]){c=l[p-1];p=l[p+1];u=D=G=(p.y-c.y-c.height-I.height)/2;break}for(p=0;p<l.length-1;p++){c=l[p];var z=l[p+1],A=I==c||I==z;z=z.y-c.y-c.height;v|=I==c;if(0==D&&0==-B)D=z,B=1;else if(Math.abs(D-z)<=(A||1==p&&v?e:0))B+=1;else if(1<B&&v){l=l.slice(0,p+1);break}else if(3<=l.length-p&&!v)B=0,u=D=0!=G?G:0,l.splice(0,0==p?1:p),p=-1;else break;0!=u||A||(D=u=z)}3==l.length&&l[1]==I&&(u=0)}if(1<n.length){n.push(I);n.sort(function(H,R){return H.x-R.x});v=!1;p=I==n[0];c=I==n[n.length-1];if(!p&&!c)for(p=1;p<n.length-1;p++)if(I==n[p]){c=n[p-1];p=n[p+1];O=T=S=(p.x-c.x-c.width-I.width)/2;break}for(p=0;p<n.length-1;p++){c=n[p];z=n[p+1];A=I==c||I==z;z=z.x-c.x-c.width;v|=I==c;-if(0==T&&0==E)T=z,E=1;else if(Math.abs(T-z)<=(A||1==p&&v?e:0))E+=1;else if(1<E&&v){n=n.slice(0,p+1);break}else if(3<=n.length-p&&!v)E=0,O=T=0!=S?S:0,n.splice(0,0==p?1:p),p=-1;else break;0!=O||A||(T=O=z)}3==n.length&&n[1]==I&&(O=0)}e=function(H,R,g,q){var F=[];if(q){q=k;var J=0}else q=0,J=k;F.push(new mxPoint(H.x-q,H.y-J));F.push(new mxPoint(H.x+q,H.y+J));F.push(H);F.push(R);F.push(new mxPoint(R.x-q,R.y-J));F.push(new mxPoint(R.x+q,R.y+J));if(null!=g)return g.points=F,g;H=new mxPolyline(F,mxConstants.GUIDE_COLOR,-mxConstants.GUIDE_STROKEWIDTH);H.dialect=mxConstants.DIALECT_SVG;H.pointerEvents=!1;H.init(P.graph.getView().getOverlayPane());return H};T=function(H,R){if(H&&null!=P.guidesArrHor)for(H=0;H<P.guidesArrHor.length;H++)P.guidesArrHor[H].node.style.visibility="hidden";if(R&&null!=P.guidesArrVer)for(H=0;H<P.guidesArrVer.length;H++)P.guidesArrVer[H].node.style.visibility="hidden"};if(1<E&&E==n.length-1){E=[];S=P.guidesArrHor;M=[];K=0;p=n[0]==I?1:0;v=n[p].y+n[p].height;if(0<O)for(p=0;p<n.length-1;p++)c=-n[p],z=n[p+1],I==c?(K=z.x-c.width-O,M.push(new mxPoint(K+c.width+k,v)),M.push(new mxPoint(z.x-k,v))):I==z?(M.push(new mxPoint(c.x+c.width+k,v)),K=c.x+c.width+O,M.push(new mxPoint(K-k,v))):(M.push(new mxPoint(c.x+c.width+k,v)),M.push(new mxPoint(z.x-k,v)));else c=n[0],p=n[2],K=c.x+c.width+(p.x-c.x-c.width-I.width)/2,M.push(new mxPoint(c.x+c.width+k,v)),M.push(new mxPoint(K-k,v)),M.push(new mxPoint(K+I.width+k,v)),M.push(new mxPoint(p.x-k,v));for(p=0;p<M.length;p+=2)n=M[p],O=M[p+1],n=e(n,O,null!=S?-S[p/2]:null),n.node.style.visibility="visible",n.redraw(),E.push(n);for(p=M.length/2;null!=S&&p<S.length;p++)S[p].destroy();P.guidesArrHor=E;K-=d.x;M=!0}else T(!0);if(1<B&&B==l.length-1){E=[];S=P.guidesArrVer;N=[];C=0;p=l[0]==I?1:0;B=l[p].x+l[p].width;if(0<u)for(p=0;p<l.length-1;p++)c=l[p],z=l[p+1],I==c?(C=z.y-c.height-u,N.push(new mxPoint(B,C+c.height+k)),N.push(new mxPoint(B,z.y-k))):I==z?(N.push(new mxPoint(B,c.y+c.height+k)),C=c.y+c.height+u,N.push(new mxPoint(B,C-k))):(N.push(new mxPoint(B,c.y+-c.height+k)),N.push(new mxPoint(B,z.y-k)));else c=l[0],p=l[2],C=c.y+c.height+(p.y-c.y-c.height-I.height)/2,N.push(new mxPoint(B,c.y+c.height+k)),N.push(new mxPoint(B,C-k)),N.push(new mxPoint(B,C+I.height+k)),N.push(new mxPoint(B,p.y-k));for(p=0;p<N.length;p+=2)n=N[p],O=N[p+1],n=e(n,O,null!=S?S[p/2]:null,!0),n.node.style.visibility="visible",n.redraw(),E.push(n);for(p=N.length/2;null!=S&&p<S.length;p++)S[p].destroy();P.guidesArrVer=E;C-=d.y;N=!0}else T(!1,!0)}if(M||N)return I=new mxPoint(K,C),l=b.call(this,-d,I,y,x),M&&!N?I.y=l.y:N&&!M&&(I.x=l.x),l.y!=I.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),l.x!=I.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),I;T(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var t=this.guidesArrVer,y=this.guidesArrHor;if(null!=t)for(var x=0;x<t.length;x++)t[x].node.style.visibility=d?"visible":"hidden";if(null!=-y)for(x=0;x<y.length;x++)y[x].node.style.visibility=d?"visible":"hidden"};var m=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){m.call(this);var d=this.guidesArrVer,t=this.guidesArrHor;if(null!=d){for(var y=0;y<d.length;y++)d[y].destroy();this.guidesArrVer=null}if(null!=t){for(y=0;y<t.length;y++)t[y].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,m,d){function t(){var B=b.diagramContainer;P.style.top=B.offsetTop-K+"px";P.style.left=B.offsetLeft-K+"px";P.style.width=(m?0:B.offsetWidth)+K+"px";P.style.height=(m?B.offsetHeight:0)+K+"px"}function y(B,D,G){if(null!=x)return B;var E;return function(){var T=this,O=arguments,S=G&&!E;clearTimeout(E);E=setTimeout(function(){E=null;G||B.apply(T,O)},D);S&&B.apply(T,O)}}var x=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,-C=window.cancelAnimationFrame||window.mozCancelAnimationFrame,K=this.RULER_THICKNESS,M=this;this.unit=f;var N=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},P=document.createElement("div");P.className="geRuler";P.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){N=-Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};P.style[m?"borderRight":"borderBottom"]="0.5px solid "+N.strokeClr;P.style.borderLeft="0.5px solid "+N.strokeClr});this.updateStyle();b.diagramContainer.appendChild(P);mxEvent.disableContextMenu(P);this.editorUiRefresh=b.refresh;b.refresh=function(B){M.editorUiRefresh.apply(b,-arguments);t()};t();var I=document.createElement("canvas");I.width=P.offsetWidth;I.height=P.offsetHeight;P.style.overflow="hidden";I.style.position="relative";P.appendChild(I);var c=I.getContext("2d");this.ui=b;var e=b.editor.graph;this.graph=e;this.container=P;this.canvas=I;var l=function(B,D,G,E,T){B=Math.round(B);D=Math.round(D);G=Math.round(G);E=Math.round(E);c.beginPath();c.moveTo(B+.5,D+.5);c.lineTo(G+.5,E+.5);c.stroke();T&&(m?(c.save(),c.translate(B,D),c.rotate(-Math.PI/2),c.fillText(T,0,0),-c.restore()):c.fillText(T,B,D))},n=function(){c.clearRect(0,0,I.width,I.height);c.beginPath();c.lineWidth=.7;c.strokeStyle=N.strokeClr;c.setLineDash([]);c.font="9px Arial";c.textAlign="center";var B=e.view.scale,D=e.view.getBackgroundPageBounds(),G=e.view.translate,E=e.pageVisible;G=E?K+(m?D.y-e.container.scrollTop:D.x-e.container.scrollLeft):K+(m?G.y*B-e.container.scrollTop:G.x*B-e.container.scrollLeft);var T=0;E&&(T=e.getPageLayout(),T=m?T.y*e.pageFormat.height:T.x*e.pageFormat.width);var O;switch(M.unit){case mxConstants.POINTS:var S=-O=10;var k=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:O=10;S=mxConstants.PIXELS_PER_MM;k=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:O=20;S=mxConstants.PIXELS_PER_MM;k=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:O=.5>=B||4<=B?8:16,S=mxConstants.PIXELS_PER_INCH/O,k=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var v=S;2<=B?v=S/(2*Math.floor(B/2)):.5>=B&&(v=S*Math.floor(1/B/2)*(M.unit==mxConstants.MILLIMETERS?2:1));S=null;D=E?Math.min(G+(m?D.height:D.width),m?-I.height:I.width):m?I.height:I.width;if(E)if(c.fillStyle=N.outBkgClr,m){var z=G-K;0<z&&c.fillRect(0,K,K,z);D<I.height&&c.fillRect(0,D,K,I.height)}else z=G-K,0<z&&c.fillRect(K,0,z,K),D<I.width&&c.fillRect(D,0,I.width,K);c.fillStyle=N.fontClr;for(E=E?G:G%(v*B);E<=D;E+=v*B)if(z=Math.round((E-G)/B/v),!(E<K||z==S)){S=z;var A=null;0==z%O&&(A=M.formatText(T+z*v)+"");m?l(K-k[Math.abs(z)%O],E,K,E,A):l(E,K-k[Math.abs(z)%O],E,K,A)}c.lineWidth=1;l(m?0:K,m?K:0,K,K);c.fillStyle=N.cornerClr;c.fillRect(0,0,K,K)},-p=-1,u=function(){null!=x?(null!=C&&C(p),p=x(n)):n()};this.drawRuler=u;this.sizeListener=f=y(function(){var B=e.container;m?(B=B.offsetHeight+K,I.height!=B&&(I.height=B,P.style.height=B+"px",u())):(B=B.offsetWidth+K,I.width!=B&&(I.width=B,P.style.width=B+"px",u()))},10);this.pageListener=function(){u()};this.scrollListener=d=y(function(){var B=m?e.container.scrollTop:e.container.scrollLeft;M.lastScroll!=B&&(M.lastScroll=B,u())},10);this.unitListener=function(B,D){M.setUnit(D.getProperty("unit"))};-e.addListener(mxEvent.SIZE,f);e.container.addEventListener("scroll",d);e.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(B){N=B;P.style.background=N.bkgClr;n()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(B,D,G,E){if(m&&4<B.height||!m&&4<B.width){if(null!=M.guidePart)try{c.putImageData(M.guidePart.imgData1,-M.guidePart.x1,M.guidePart.y1),c.putImageData(M.guidePart.imgData2,M.guidePart.x2,M.guidePart.y2),c.putImageData(M.guidePart.imgData3,M.guidePart.x3,M.guidePart.y3)}catch(q){}var T=M.origGuideMove.apply(this,arguments);try{c.lineWidth=.5;c.strokeStyle=N.guideClr;c.setLineDash([2]);if(m){var O=B.y+T.y+K-this.graph.container.scrollTop;var S=0;var k=O+B.height/2;var v=K/2;var z=O+B.height;var A=0;var H=c.getImageData(S,O-1,K,3);l(S,O,K,O);O--;var R=c.getImageData(v,k-1,K,3);l(v,k,K,k);k--;var g=c.getImageData(A,-z-1,K,3);l(A,z,K,z);z--}else O=0,S=B.x+T.x+K-this.graph.container.scrollLeft,k=K/2,v=S+B.width/2,z=0,A=S+B.width,H=c.getImageData(S-1,O,3,K),l(S,O,S,K),S--,R=c.getImageData(v-1,k,3,K),l(v,k,v,K),v--,g=c.getImageData(A-1,z,3,K),l(A,z,A,K),A--;if(null==M.guidePart||M.guidePart.x1!=S||M.guidePart.y1!=O)M.guidePart={imgData1:H,x1:S,y1:O,imgData2:R,x2:v,y2:k,imgData3:g,x3:A,y3:z}}catch(q){}}else T=M.origGuideMove.apply(this,arguments);return T};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=-function(){var B=M.origGuideDestroy.apply(this,arguments);if(null!=M.guidePart)try{c.putImageData(M.guidePart.imgData1,M.guidePart.x1,M.guidePart.y1),c.putImageData(M.guidePart.imgData2,M.guidePart.x2,M.guidePart.y2),c.putImageData(M.guidePart.imgData3,M.guidePart.x3,M.guidePart.y3),M.guidePart=null}catch(D){}return B}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};+"1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var q=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){q.apply(this,arguments);+null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};var y=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){y.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var x=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(c,e){null!=e.shortcut&&900>d&&!mxClient.IS_IOS?c.firstChild.nextSibling.setAttribute("title",e.shortcut):+x.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var D=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();D.apply(this,arguments)};var J=EditorUi.prototype.setGraphEnabled;+EditorUi.prototype.setGraphEnabled=function(c){J.apply(this,arguments);if(c){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=e&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=e&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};+var K=Menus.prototype.init;Menus.prototype.init=function(){K.apply(this,arguments);var c=this.editorUi;EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var p=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(p.container,620,420,!0,!1);p.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var p=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");c.showDialog(p.container,+620,420,!0,!1);p.init()}));var e="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),f=function(p,n,t,z){p.addItem(t,null,mxUtils.bind(this,function(){var F=new CreateGraphDialog(c,t,z);c.showDialog(F.container,620,420,!0,!1);F.init()}),n)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(p,n){for(var t=0;t<e.length;t++)"-"==e[t]?p.addSeparator(n):f(p,n,mxResources.get(e[t])+"...",e[t])})))};EditorUi.prototype.installFormatToolbar=function(c){var e=+this.editor.graph,f=document.createElement("div");f.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";e.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(p,n){0<e.getSelectionCount()?(c.appendChild(f),f.innerHTML="Selected: "+e.getSelectionCount()):null!=f.parentNode&&f.parentNode.removeChild(f)}))};var L=!1;EditorUi.prototype.initFormatWindow=+function(){if(!L&&null!=this.formatWindow){L=!0;var c=this.formatWindow.window.toggleMinimized,e=240;this.formatWindow.window.toggleMinimized=function(){c.apply(this,arguments);this.minimized?(e=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+e-140+"px"):(this.div.style.width=e+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-e+140)+"px");this.fit()};+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(f){mxEvent.getSource(f)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var N=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(W,X,Z){var Y=z.menus.get(W),ba=R.addMenu(mxResources.get(W),mxUtils.bind(this,function(){ba.classList.contains("mxDisabled")||Y.funct.apply(this,arguments)}),E);ba.className="geMenuItem";ba.style.display="inline-block";ba.style.boxSizing=+"border-box";ba.style.top="6px";ba.style.marginRight="6px";ba.style.height="30px";ba.style.paddingTop="6px";ba.style.paddingBottom="6px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(W));z.menus.menuCreated(Y,ba,"geMenuItem");null!=Z?(ba.style.backgroundImage="url("+Z+")",ba.style.backgroundPosition="center center",ba.style.backgroundRepeat="no-repeat",ba.style.backgroundSize="24px 24px",ba.style.width="34px",ba.innerText=""):X||(ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage++")",ba.style.backgroundPosition="right 6px center",ba.style.backgroundRepeat="no-repeat",ba.style.paddingRight="22px");return ba}function e(W,X,Z,Y,ba,ea){var ca=document.createElement("a");ca.className="geMenuItem";ca.style.display="inline-block";ca.style.boxSizing="border-box";ca.style.height="30px";ca.style.padding="6px";ca.style.position="relative";ca.style.verticalAlign="top";ca.style.top="0px";null!=z.statusContainer?C.insertBefore(ca,z.statusContainer):C.appendChild(ca);null!=ea?(ca.style.backgroundImage=+"url("+ea+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.width="34px"):mxUtils.write(ca,W);mxEvent.addListener(ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fa){fa.preventDefault()}));mxEvent.addListener(ca,"click",function(fa){"disabled"!=ca.getAttribute("disabled")&&X(fa);mxEvent.consume(fa)});null==Z&&(ca.style.marginRight="4px");null!=Y&&ca.setAttribute("title",Y);null!=ba&&(W=function(){ba.isEnabled()?+(ca.removeAttribute("disabled"),ca.style.cursor="pointer"):(ca.setAttribute("disabled","disabled"),ca.style.cursor="default")},ba.addListener("stateChanged",W),F.addListener("enabledChanged",W),W());return ca}function f(W,X,Z){Z=document.createElement("div");Z.className="geMenuItem";Z.style.display="inline-block";Z.style.verticalAlign="top";Z.style.marginRight="6px";Z.style.padding="0 4px 0 4px";Z.style.height="30px";Z.style.position="relative";Z.style.top="0px";for(var Y=0;Y<W.length;Y++)null!=W[Y]&&+(W[Y].style.margin="0px",W[Y].style.boxShadow="none",Z.appendChild(W[Y]));null!=X&&mxUtils.setOpacity(Z,X);null!=z.statusContainer?C.insertBefore(Z,z.statusContainer):C.appendChild(Z);return Z}function p(){for(var W=C.firstChild;null!=W;){var X=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=X}E=C.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;W=1E3>d;var Z=null;W||(Z=c("diagram"));X=W?c("diagram",null,+Editor.menuImage):null;null!=X&&(Z=X);f([Z,e(mxResources.get("shapes"),z.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),z.actions.get("image"),W?Editor.shapesImage:null),e(mxResources.get("format"),z.actions.get("format").funct,null,mxResources.get("format")+" ("+z.actions.get("format").shortcut+")",z.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=c("insert",!0,W?Q:null);f([X,e(mxResources.get("delete"),z.actions.get("delete").funct,null,mxResources.get("delete"),+z.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);F.isEnabled()||X.classList.add("mxDisabled");411<=d&&(f([I,M],60),520<=d&&f([P,640<=d?e("",H.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",H,Editor.zoomInImage):null,640<=d?e("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,Editor.zoomOutImage):null],60))}N.apply(this,arguments);var n=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=n&&(n.classList.add("geSimple"),+n.classList.add("geMinimal"));n=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var t=document.createElement("div");t.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";t.style.bottom=n?"32px":"0px";this.sidebar=this.createSidebar(t);if(1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])l(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),+this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=d&&(b(this,!0),this.formatWindow.window.setVisible(!0));var z=this,F=z.editor.graph;z.toolbar=this.createToolbar(z.createDiv("geToolbar"));z.defaultLibraryName=mxResources.get("untitledLibrary");var C=document.createElement("div");C.className="geMenubarContainer";var E=null,R=new Menubar(z,C);z.statusContainer=z.createStatusContainer();z.statusContainer.style.position="relative";z.statusContainer.style.maxWidth="";z.statusContainer.style.cursor=+"default";var U=z.hideCurrentMenu;z.hideCurrentMenu=function(){U.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var O=z.descriptorChanged;z.descriptorChanged=function(){O.apply(this,arguments);var W=z.getCurrentFile();if(null!=W&&null!=W.getTitle()){var X=W.getMode();"google"==X?X="googleDrive":"github"==X?X="gitHub":"gitlab"==X?X="gitLab":"onedrive"==X&&(X="oneDrive");X=mxResources.get(X);C.setAttribute("title",W.getTitle()+(null!=X?" ("+X+")":""))}else C.removeAttribute("title")};+z.setStatusText(z.editor.getStatus());C.appendChild(z.statusContainer);z.buttonContainer=document.createElement("div");z.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";C.appendChild(z.buttonContainer);z.menubarContainer=z.buttonContainer;z.tabContainer=document.createElement("div");z.tabContainer.className="geTabContainer geTabItem";z.tabContainer.style.cssText=+"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";n=z.diagramContainer.parentNode;t=document.createElement("div");t.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";z.diagramContainer.style.top="47px";var Q=Editor.addBoxImage;if(null!=z.hoverIcons){var m=z.hoverIcons.update;z.hoverIcons.update=function(){F.freehand.isDrawing()||m.apply(this,arguments)}}if(null!=F.freehand){var u=F.freehand.createStyle;F.freehand.createStyle=+function(W){return u.apply(this,arguments)+"sketch=0;"}}z.editor.addListener("statusChanged",mxUtils.bind(this,function(){z.setStatusText(z.editor.getStatus())}));z.setStatusText(z.editor.getStatus());var A=z.menus.get("viewZoom");if(null!=A){var B=function(W){if(mxEvent.isAltDown(W))z.hideCurrentMenu(),z.actions.get("customZoom").funct(),mxEvent.consume(W);else if("geMenuItem"==mxEvent.getSource(W).className||mxEvent.isShiftDown(W))z.hideCurrentMenu(),z.actions.get("smartFit").funct(),mxEvent.consume(W)},+H=z.actions.get("zoomIn"),T=z.actions.get("zoomOut"),k=z.actions.get("resetView"),v=z.actions.get("undo"),G=z.actions.get("redo"),I=e("",v.funct,null,mxResources.get("undo")+" ("+v.shortcut+")",v,Editor.undoImage),M=e("",G.funct,null,mxResources.get("redo")+" ("+G.shortcut+")",G,Editor.redoImage),P=e("",B,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);C.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";+this.tabContainer.style.right="70px";var S=R.addMenu("100%",A.funct);S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");S.className="geTabItem";S.style.height=z.tabContainerHeight+"px";S.style.position="absolute";S.style.display="0"!=urlParams.pages?"flex":"none";S.style.alignItems="center";S.style.justifyContent="center";S.style.paddingRight="11px";S.style.whiteSpace="nowrap";S.style.overflow="hidden";S.style.fontSize="11px";S.style.width="51px";S.style.right="0px";S.style.bottom=+"0px";S.style.boxSizing="content-box";S.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";S.style.backgroundPosition="right 6px top 15px";S.style.backgroundRepeat="no-repeat";S.style.backgroundSize="10px";S.style.zIndex="1";t.appendChild(S);(function(W){mxEvent.addListener(W,"click",B);var X=mxUtils.bind(this,function(Z,Y,ba){W.innerText="";mxUtils.write(W,Math.round(100*z.editor.graph.view.scale*(null!=ba?ba:1))+"%")});z.editor.graph.view.addListener(mxEvent.EVENT_SCALE,X);z.editor.addListener("resetGraphView",+X);z.editor.addListener("pageSelected",X);z.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(Z,Y){X(Z,Y,Y.getProperty("factor"))}))})(S);var V=z.setGraphEnabled;z.setGraphEnabled=function(){V.apply(this,arguments);null!=this.tabContainer&&(S.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}t.appendChild(C);t.appendChild(z.diagramContainer);+n.appendChild(t);z.updateTabContainer();!EditorUi.windowed&&1E3<=d&&b(this,!0);t.appendChild(z.tabContainer);p();z.addListener("lockedChanged",p);mxEvent.addListener(window,"resize",function(){p();null!=z.sidebarWindow&&z.sidebarWindow.window.fit();null!=z.formatWindow&&z.formatWindow.window.fit();null!=z.actions.outlineWindow&&z.actions.outlineWindow.window.fit();null!=z.actions.layersWindow&&z.actions.layersWindow.window.fit();null!=z.menus.chatWindow&&z.menus.chatWindow.window.fit();null!=z.menus.tagsWindow&&+z.menus.tagsWindow.window.fit();null!=z.menus.findWindow&&z.menus.findWindow.window.fit();null!=z.menus.findReplaceWindow&&z.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var g=EditorUi.initTheme;EditorUi.initTheme=function(){g.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,q,y,x){var D=q.y,J=q.x,K=!1,L=!1;if(null!=this.states&&null!=d&&null!=q){var N=this,c=new mxCellState,e=this.graph.getView().scale,f=Math.max(2,this.getGuideTolerance()/2);c.x=d.x+J;c.y=d.y+D;c.width=d.width;c.height=d.height;for(var p=[],n=[],t=0;t<this.states.length;t++){var z=this.states[t];z instanceof mxCellState&&(x||!this.graph.isCellSelected(z.cell))&&((c.x>=z.x&&c.x<=z.x+z.width||z.x>=c.x&&z.x<=c.x+c.width)&&(c.y>+z.y+z.height+4||c.y+c.height+4<z.y)?p.push(z):(c.y>=z.y&&c.y<=z.y+z.height||z.y>=c.y&&z.y<=c.y+c.height)&&(c.x>z.x+z.width+4||c.x+c.width+4<z.x)&&n.push(z))}var F=0,C=0,E=z=0,R=0,U=0,O=0,Q=0,m=5*e;if(1<p.length){p.push(c);p.sort(function(H,T){return H.y-T.y});var u=!1;t=c==p[0];e=c==p[p.length-1];if(!t&&!e)for(t=1;t<p.length-1;t++)if(c==p[t]){e=p[t-1];t=p[t+1];z=C=E=(t.y-e.y-e.height-c.height)/2;break}for(t=0;t<p.length-1;t++){e=p[t];var A=p[t+1],B=c==e||c==A;A=A.y-e.y-e.height;u|=c==e;if(0==C&&0==+F)C=A,F=1;else if(Math.abs(C-A)<=(B||1==t&&u?f:0))F+=1;else if(1<F&&u){p=p.slice(0,t+1);break}else if(3<=p.length-t&&!u)F=0,z=C=0!=E?E:0,p.splice(0,0==t?1:t),t=-1;else break;0!=z||B||(C=z=A)}3==p.length&&p[1]==c&&(z=0)}if(1<n.length){n.push(c);n.sort(function(H,T){return H.x-T.x});u=!1;t=c==n[0];e=c==n[n.length-1];if(!t&&!e)for(t=1;t<n.length-1;t++)if(c==n[t]){e=n[t-1];t=n[t+1];O=U=Q=(t.x-e.x-e.width-c.width)/2;break}for(t=0;t<n.length-1;t++){e=n[t];A=n[t+1];B=c==e||c==A;A=A.x-e.x-e.width;u|=c==e;+if(0==U&&0==R)U=A,R=1;else if(Math.abs(U-A)<=(B||1==t&&u?f:0))R+=1;else if(1<R&&u){n=n.slice(0,t+1);break}else if(3<=n.length-t&&!u)R=0,O=U=0!=Q?Q:0,n.splice(0,0==t?1:t),t=-1;else break;0!=O||B||(U=O=A)}3==n.length&&n[1]==c&&(O=0)}f=function(H,T,k,v){var G=[];if(v){v=m;var I=0}else v=0,I=m;G.push(new mxPoint(H.x-v,H.y-I));G.push(new mxPoint(H.x+v,H.y+I));G.push(H);G.push(T);G.push(new mxPoint(T.x-v,T.y-I));G.push(new mxPoint(T.x+v,T.y+I));if(null!=k)return k.points=G,k;H=new mxPolyline(G,mxConstants.GUIDE_COLOR,+mxConstants.GUIDE_STROKEWIDTH);H.dialect=mxConstants.DIALECT_SVG;H.pointerEvents=!1;H.init(N.graph.getView().getOverlayPane());return H};U=function(H,T){if(H&&null!=N.guidesArrHor)for(H=0;H<N.guidesArrHor.length;H++)N.guidesArrHor[H].node.style.visibility="hidden";if(T&&null!=N.guidesArrVer)for(H=0;H<N.guidesArrVer.length;H++)N.guidesArrVer[H].node.style.visibility="hidden"};if(1<R&&R==n.length-1){R=[];Q=N.guidesArrHor;K=[];J=0;t=n[0]==c?1:0;u=n[t].y+n[t].height;if(0<O)for(t=0;t<n.length-1;t++)e=+n[t],A=n[t+1],c==e?(J=A.x-e.width-O,K.push(new mxPoint(J+e.width+m,u)),K.push(new mxPoint(A.x-m,u))):c==A?(K.push(new mxPoint(e.x+e.width+m,u)),J=e.x+e.width+O,K.push(new mxPoint(J-m,u))):(K.push(new mxPoint(e.x+e.width+m,u)),K.push(new mxPoint(A.x-m,u)));else e=n[0],t=n[2],J=e.x+e.width+(t.x-e.x-e.width-c.width)/2,K.push(new mxPoint(e.x+e.width+m,u)),K.push(new mxPoint(J-m,u)),K.push(new mxPoint(J+c.width+m,u)),K.push(new mxPoint(t.x-m,u));for(t=0;t<K.length;t+=2)n=K[t],O=K[t+1],n=f(n,O,null!=Q?+Q[t/2]:null),n.node.style.visibility="visible",n.redraw(),R.push(n);for(t=K.length/2;null!=Q&&t<Q.length;t++)Q[t].destroy();N.guidesArrHor=R;J-=d.x;K=!0}else U(!0);if(1<F&&F==p.length-1){R=[];Q=N.guidesArrVer;L=[];D=0;t=p[0]==c?1:0;F=p[t].x+p[t].width;if(0<z)for(t=0;t<p.length-1;t++)e=p[t],A=p[t+1],c==e?(D=A.y-e.height-z,L.push(new mxPoint(F,D+e.height+m)),L.push(new mxPoint(F,A.y-m))):c==A?(L.push(new mxPoint(F,e.y+e.height+m)),D=e.y+e.height+z,L.push(new mxPoint(F,D-m))):(L.push(new mxPoint(F,e.y++e.height+m)),L.push(new mxPoint(F,A.y-m)));else e=p[0],t=p[2],D=e.y+e.height+(t.y-e.y-e.height-c.height)/2,L.push(new mxPoint(F,e.y+e.height+m)),L.push(new mxPoint(F,D-m)),L.push(new mxPoint(F,D+c.height+m)),L.push(new mxPoint(F,t.y-m));for(t=0;t<L.length;t+=2)n=L[t],O=L[t+1],n=f(n,O,null!=Q?Q[t/2]:null,!0),n.node.style.visibility="visible",n.redraw(),R.push(n);for(t=L.length/2;null!=Q&&t<Q.length;t++)Q[t].destroy();N.guidesArrVer=R;D-=d.y;L=!0}else U(!1,!0)}if(K||L)return c=new mxPoint(J,D),p=b.call(this,+d,c,y,x),K&&!L?c.y=p.y:L&&!K&&(c.x=p.x),p.y!=c.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),p.x!=c.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),c;U(!0,!0);return b.apply(this,arguments)};var g=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){g.call(this,d);var q=this.guidesArrVer,y=this.guidesArrHor;if(null!=q)for(var x=0;x<q.length;x++)q[x].node.style.visibility=d?"visible":"hidden";if(null!=+y)for(x=0;x<y.length;x++)y[x].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,q=this.guidesArrHor;if(null!=d){for(var y=0;y<d.length;y++)d[y].destroy();this.guidesArrVer=null}if(null!=q){for(y=0;y<q.length;y++)q[y].destroy();this.guidesArrHor=null}}})();function mxRuler(b,g,l,d){function q(){var F=b.diagramContainer;N.style.top=F.offsetTop-J+"px";N.style.left=F.offsetLeft-J+"px";N.style.width=(l?0:F.offsetWidth)+J+"px";N.style.height=(l?F.offsetHeight:0)+J+"px"}function y(F,C,E){if(null!=x)return F;var R;return function(){var U=this,O=arguments,Q=E&&!R;clearTimeout(R);R=setTimeout(function(){R=null;E||F.apply(U,O)},C);Q&&F.apply(U,O)}}var x=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,+D=window.cancelAnimationFrame||window.mozCancelAnimationFrame,J=this.RULER_THICKNESS,K=this;this.unit=g;var L=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},N=document.createElement("div");N.className="geRuler";N.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){L=+Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};N.style[l?"borderRight":"borderBottom"]="0.5px solid "+L.strokeClr;N.style.borderLeft="0.5px solid "+L.strokeClr});this.updateStyle();b.diagramContainer.appendChild(N);mxEvent.disableContextMenu(N);this.editorUiRefresh=b.refresh;b.refresh=function(F){K.editorUiRefresh.apply(b,+arguments);q()};q();var c=document.createElement("canvas");c.width=N.offsetWidth;c.height=N.offsetHeight;N.style.overflow="hidden";c.style.position="relative";N.appendChild(c);var e=c.getContext("2d");this.ui=b;var f=b.editor.graph;this.graph=f;this.container=N;this.canvas=c;var p=function(F,C,E,R,U){F=Math.round(F);C=Math.round(C);E=Math.round(E);R=Math.round(R);e.beginPath();e.moveTo(F+.5,C+.5);e.lineTo(E+.5,R+.5);e.stroke();U&&(l?(e.save(),e.translate(F,C),e.rotate(-Math.PI/2),e.fillText(U,0,0),+e.restore()):e.fillText(U,F,C))},n=function(){e.clearRect(0,0,c.width,c.height);e.beginPath();e.lineWidth=.7;e.strokeStyle=L.strokeClr;e.setLineDash([]);e.font="9px Arial";e.textAlign="center";var F=f.view.scale,C=f.view.getBackgroundPageBounds(),E=f.view.translate,R=f.pageVisible;E=R?J+(l?C.y-f.container.scrollTop:C.x-f.container.scrollLeft):J+(l?E.y*F-f.container.scrollTop:E.x*F-f.container.scrollLeft);var U=0;R&&(U=f.getPageLayout(),U=l?U.y*f.pageFormat.height:U.x*f.pageFormat.width);var O;switch(K.unit){case mxConstants.POINTS:var Q=+O=10;var m=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:O=10;Q=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:O=20;Q=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:O=.5>=F||4<=F?8:16,Q=mxConstants.PIXELS_PER_INCH/O,m=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var u=Q;2<=F?u=Q/(2*Math.floor(F/2)):.5>=F&&(u=Q*Math.floor(1/F/2)*(K.unit==mxConstants.MILLIMETERS?2:1));Q=null;C=R?Math.min(E+(l?C.height:C.width),l?+c.height:c.width):l?c.height:c.width;if(R)if(e.fillStyle=L.outBkgClr,l){var A=E-J;0<A&&e.fillRect(0,J,J,A);C<c.height&&e.fillRect(0,C,J,c.height)}else A=E-J,0<A&&e.fillRect(J,0,A,J),C<c.width&&e.fillRect(C,0,c.width,J);e.fillStyle=L.fontClr;for(R=R?E:E%(u*F);R<=C;R+=u*F)if(A=Math.round((R-E)/F/u),!(R<J||A==Q)){Q=A;var B=null;0==A%O&&(B=K.formatText(U+A*u)+"");l?p(J-m[Math.abs(A)%O],R,J,R,B):p(R,J-m[Math.abs(A)%O],R,J,B)}e.lineWidth=1;p(l?0:J,l?J:0,J,J);e.fillStyle=L.cornerClr;e.fillRect(0,0,J,J)},+t=-1,z=function(){null!=x?(null!=D&&D(t),t=x(n)):n()};this.drawRuler=z;this.sizeListener=g=y(function(){var F=f.container;l?(F=F.offsetHeight+J,c.height!=F&&(c.height=F,N.style.height=F+"px",z())):(F=F.offsetWidth+J,c.width!=F&&(c.width=F,N.style.width=F+"px",z()))},10);this.pageListener=function(){z()};this.scrollListener=d=y(function(){var F=l?f.container.scrollTop:f.container.scrollLeft;K.lastScroll!=F&&(K.lastScroll=F,z())},10);this.unitListener=function(F,C){K.setUnit(C.getProperty("unit"))};+f.addListener(mxEvent.SIZE,g);f.container.addEventListener("scroll",d);f.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(F){L=F;N.style.background=L.bkgClr;n()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(F,C,E,R){if(l&&4<F.height||!l&&4<F.width){if(null!=K.guidePart)try{e.putImageData(K.guidePart.imgData1,+K.guidePart.x1,K.guidePart.y1),e.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),e.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3)}catch(v){}var U=K.origGuideMove.apply(this,arguments);try{e.lineWidth=.5;e.strokeStyle=L.guideClr;e.setLineDash([2]);if(l){var O=F.y+U.y+J-this.graph.container.scrollTop;var Q=0;var m=O+F.height/2;var u=J/2;var A=O+F.height;var B=0;var H=e.getImageData(Q,O-1,J,3);p(Q,O,J,O);O--;var T=e.getImageData(u,m-1,J,3);p(u,m,J,m);m--;var k=e.getImageData(B,+A-1,J,3);p(B,A,J,A);A--}else O=0,Q=F.x+U.x+J-this.graph.container.scrollLeft,m=J/2,u=Q+F.width/2,A=0,B=Q+F.width,H=e.getImageData(Q-1,O,3,J),p(Q,O,Q,J),Q--,T=e.getImageData(u-1,m,3,J),p(u,m,u,J),u--,k=e.getImageData(B-1,A,3,J),p(B,A,B,J),B--;if(null==K.guidePart||K.guidePart.x1!=Q||K.guidePart.y1!=O)K.guidePart={imgData1:H,x1:Q,y1:O,imgData2:T,x2:u,y2:m,imgData3:k,x3:B,y3:A}}catch(v){}}else U=K.origGuideMove.apply(this,arguments);return U};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=+function(){var F=K.origGuideDestroy.apply(this,arguments);if(null!=K.guidePart)try{e.putImageData(K.guidePart.imgData1,K.guidePart.x1,K.guidePart.y1),e.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),e.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3),K.guidePart=null}catch(C){}return F}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};-function mxDualRuler(b,f){var m=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return m};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(d){var t=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,-function(y){t=null!=b.currentMenu;mxEvent.consume(y)}),null,mxUtils.bind(this,function(y){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(y)||mxEvent.isPopupTrigger(y))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(y)||!t){var x=new mxPopupMenu(mxUtils.bind(this,function(M,N){b.menus.addMenuItems(M,["points","inches","millimeters","meters"],N)}));x.div.className+=" geMenubarMenu";x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=-!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);b.resetCurrentMenu();x.destroy()});var C=mxEvent.getClientX(y),K=mxEvent.getClientY(y);x.popup(C,K,null,y);b.setCurrentMenu(x,d)}mxEvent.consume(y)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var m=mxFreehand.prototype.MILD_SMOOTHING,d=null,t=[],y,x=[],C,K=!1,M=!0,N=!0,P=!0,I=!0,c=[],e=!1,l=!1,n=!1,p="default",u={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},B=!0;this.setClosedPath=function(k){K=k};this.setAutoClose=function(k){M=k};this.setAutoInsert=-function(k){N=k};this.setAutoScroll=function(k){P=k};this.setOpenFill=function(k){I=k};this.setStopClickEnabled=function(k){l=k};this.setSelectInserted=function(k){n=k};this.setSmoothing=function(k){m=k};this.getSmoothing=function(){return m};this.setPerfectFreehandMode=function(k){B=k};this.isPerfectFreehandMode=function(){return B};this.setBrushSize=function(k){u.size=k};this.getBrushSize=function(){return u.size};var D=function(k){e=k;b.getRubberband().setEnabled(!k);b.graphHandler.setSelectEnabled(!k);-b.graphHandler.setMoveEnabled(!k);b.container.style.cursor=k?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){D(!0)};this.isDrawing=function(){return e};var G=mxUtils.bind(this,function(k){if(d){var v=C.length,z=l&&0<x.length&&null!=C&&2>C.length;z||x.push.apply(x,C);C=[];x.push(null);t.push(d);d=null;(z||N)&&this.stopDrawing();N&&(!z||2<=v)&&this.startDrawing();mxEvent.consume(k)}}),E=new mxCell;E.edge=!0;this.getStrokeColor=function(k){var v=null!=-p?p:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(E),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=v||k||(v=b.shapeForegroundColor);return v};this.setStrokeColor=function(k){p=k};this.createStyle=function(k){var v=";fillColor=none;";B&&(v=";lineShape=1;");v+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+k+v};this.stopDrawing=function(){if(0<t.length){if(B){for(var k=[],v=0;v<x.length;v++)null!=x[v]&&k.push([x[v].x,-x[v].y]);k=PerfectFreehand.getStroke(k,u);x=[];for(v=0;v<k.length;v++)x.push({x:k[v][0],y:k[v][1]});x.push(null)}k=x[0].x;var z=x[0].x,A=x[0].y,H=x[0].y;for(v=1;v<x.length;v++)null!=x[v]&&(k=Math.max(k,x[v].x),z=Math.min(z,x[v].x),A=Math.max(A,x[v].y),H=Math.min(H,x[v].y));k-=z;A-=H;if(0<k&&0<A){var R=100/k,g=100/A;x.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-z)*R;Q.y=(Q.y-H)*g;return Q});var q='<shape strokewidth="inherit"><foreground>',F=0;for(v=0;v<x.length;v++){var J=x[v];if(null==J){J=!1;F=-x[F];var L=x[v-1];!K&&M&&(J=F.x-L.x,L=F.y-L.y,J=Math.sqrt(J*J+L*L)<=b.tolerance);if(K||J)q+='<line x="'+F.x.toFixed(2)+'" y="'+F.y.toFixed(2)+'"/>';q+="</path>"+(I||K||J?"<fillstroke/>":"<stroke/>");F=v+1}else q=v==F?q+('<path><move x="'+J.x.toFixed(2)+'" y="'+J.y.toFixed(2)+'"/>'):q+('<line x="'+J.x.toFixed(2)+'" y="'+J.y.toFixed(2)+'"/>')}q+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){v=this.createStyle("stencil("+Graph.compress(q)+")");q=b.view.scale;F=b.view.translate;-v=new mxCell("",new mxGeometry(z/q-F.x,H/q-F.y,k/q,A/q),v);v.vertex=1;b.model.beginUpdate();try{v=b.addCell(v),b.fireEvent(new mxEventObject("cellsInserted","cells",[v])),b.fireEvent(new mxEventObject("freehandInserted","cell",v))}finally{b.model.endUpdate()}n&&b.setSelectionCells([v])}}for(v=0;v<t.length;v++)t[v].parentNode.removeChild(t[v]);d=null;t=[];x=[]}D(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(k,v){k=v.getProperty("eventName");v=v.getProperty("event");k==mxEvent.MOUSE_MOVE&&-e&&(null!=v.sourceState&&v.sourceState.setCursor("crosshair"),v.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(k,v){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(k=v.getEvent(),e&&!mxEvent.isPopupTrigger(k)&&!mxEvent.isMiddleMouseButton(k)&&!mxEvent.isMultiTouchEvent(k))){var z=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);z=Math.max(1,z*b.view.scale);var A=this.getStrokeColor();d=document.createElementNS("http://www.w3.org/2000/svg","path");-d.setAttribute("fill",B?A:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",A);d.setAttribute("stroke-width",z);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(A=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",A=A.split(" ").map(function(H){return parseFloat(H)*z}).join(" "),d.setAttribute("stroke-dasharray",A));c=[];k=T(k);O(k);y="M"+k.x+" "+k.y;x.push(k);C=[];d.setAttribute("d",B?PerfectFreehand.getSvgPathFromStroke([[k.x,k.y]],u):y);f.appendChild(d);v.consume()}}),-mouseMove:mxUtils.bind(this,function(k,v){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){k=v.getEvent();k=T(k);O(k);var z=S(0);if(z)if(x.push(z),B){var A=[];for(z=0;z<x.length;z++)A.push([x[z].x,x[z].y]);C=[];for(var H=2;H<c.length;H+=2)z=S(H),A.push([z.x,z.y]),C.push(z);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(A,u))}else{y+=" L"+z.x+" "+z.y;A="";C=[];for(H=2;H<c.length;H+=2)z=S(H),A+=" L"+z.x+" "+z.y,C.push(z);d.setAttribute("d",y+A)}P&&(z=b.view.translate,b.scrollRectToVisible((new mxRectangle(k.x--z.x,k.y-z.y)).grow(20)));v.consume()}}),mouseUp:mxUtils.bind(this,function(k,v){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(G(v.getEvent()),v.consume())})});var T=function(k){return mxUtils.convertPoint(b.container,mxEvent.getClientX(k),mxEvent.getClientY(k))},O=function(k){for(c.push(k);c.length>m;)c.shift()},S=function(k){var v=c.length;if(1===v%2||v>=m){var z=0,A=0,H,R=0;for(H=k;H<v;H++)R++,k=c[H],z+=k.x,A+=k.y;return{x:z/R,y:A/R}}return null}}}-mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,f,m,d,t){this.id=b;this.email=f;this.displayName=m;this.pictureUrl=d;this.locale=t};DrawioComment=function(b,f,m,d,t,y,x){this.file=b;this.id=f;this.content=m;this.modifiedDate=d;this.createdDate=t;this.isResolved=y;this.user=x;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,m,d,t){f()};DrawioComment.prototype.editComment=function(b,f,m){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;+function mxDualRuler(b,g){var l=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return l};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,g,!0);this.hRuler=new mxRuler(b,g,!1,!0);g=mxUtils.bind(this,function(d){var q=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,+function(y){q=null!=b.currentMenu;mxEvent.consume(y)}),null,mxUtils.bind(this,function(y){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(y)||mxEvent.isPopupTrigger(y))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(y)||!q){var x=new mxPopupMenu(mxUtils.bind(this,function(K,L){b.menus.addMenuItems(K,["points","inches","millimeters","meters"],L)}));x.div.className+=" geMenubarMenu";x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=+!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);b.resetCurrentMenu();x.destroy()});var D=mxEvent.getClientX(y),J=mxEvent.getClientY(y);x.popup(D,J,null,y);b.setCurrentMenu(x,d)}mxEvent.consume(y)}}))});g(this.hRuler.container);g(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var g=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=g){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.MILD_SMOOTHING,d=null,q=[],y,x=[],D,J=!1,K=!0,L=!0,N=!0,c=!0,e=[],f=!1,p=!1,n=!1,t="default",z={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},F=!0;this.setClosedPath=function(m){J=m};this.setAutoClose=function(m){K=m};this.setAutoInsert=+function(m){L=m};this.setAutoScroll=function(m){N=m};this.setOpenFill=function(m){c=m};this.setStopClickEnabled=function(m){p=m};this.setSelectInserted=function(m){n=m};this.setSmoothing=function(m){l=m};this.getSmoothing=function(){return l};this.setPerfectFreehandMode=function(m){F=m};this.isPerfectFreehandMode=function(){return F};this.setBrushSize=function(m){z.size=m};this.getBrushSize=function(){return z.size};var C=function(m){f=m;b.getRubberband().setEnabled(!m);b.graphHandler.setSelectEnabled(!m);+b.graphHandler.setMoveEnabled(!m);b.container.style.cursor=m?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){C(!0)};this.isDrawing=function(){return f};var E=mxUtils.bind(this,function(m){if(d){var u=D.length,A=p&&0<x.length&&null!=D&&2>D.length;A||x.push.apply(x,D);D=[];x.push(null);q.push(d);d=null;(A||L)&&this.stopDrawing();L&&(!A||2<=u)&&this.startDrawing();mxEvent.consume(m)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(m){var u=null!=+t?t:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=u||m||(u=b.shapeForegroundColor);return u};this.setStrokeColor=function(m){t=m};this.createStyle=function(m){var u=";fillColor=none;";F&&(u=";lineShape=1;");u+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+m+u};this.stopDrawing=function(){if(0<q.length){if(F){for(var m=[],u=0;u<x.length;u++)null!=x[u]&&m.push([x[u].x,+x[u].y]);m=PerfectFreehand.getStroke(m,z);x=[];for(u=0;u<m.length;u++)x.push({x:m[u][0],y:m[u][1]});x.push(null)}m=x[0].x;var A=x[0].x,B=x[0].y,H=x[0].y;for(u=1;u<x.length;u++)null!=x[u]&&(m=Math.max(m,x[u].x),A=Math.min(A,x[u].x),B=Math.max(B,x[u].y),H=Math.min(H,x[u].y));m-=A;B-=H;if(0<m&&0<B){var T=100/m,k=100/B;x.map(function(P){if(null==P)return P;P.x=(P.x-A)*T;P.y=(P.y-H)*k;return P});var v='<shape strokewidth="inherit"><foreground>',G=0;for(u=0;u<x.length;u++){var I=x[u];if(null==I){I=!1;G=+x[G];var M=x[u-1];!J&&K&&(I=G.x-M.x,M=G.y-M.y,I=Math.sqrt(I*I+M*M)<=b.tolerance);if(J||I)v+='<line x="'+G.x.toFixed(2)+'" y="'+G.y.toFixed(2)+'"/>';v+="</path>"+(c||J||I?"<fillstroke/>":"<stroke/>");G=u+1}else v=u==G?v+('<path><move x="'+I.x.toFixed(2)+'" y="'+I.y.toFixed(2)+'"/>'):v+('<line x="'+I.x.toFixed(2)+'" y="'+I.y.toFixed(2)+'"/>')}v+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){u=this.createStyle("stencil("+Graph.compress(v)+")");v=b.view.scale;G=b.view.translate;+u=new mxCell("",new mxGeometry(A/v-G.x,H/v-G.y,m/v,B/v),u);u.vertex=1;b.model.beginUpdate();try{u=b.addCell(u),b.fireEvent(new mxEventObject("cellsInserted","cells",[u])),b.fireEvent(new mxEventObject("freehandInserted","cell",u))}finally{b.model.endUpdate()}n&&b.setSelectionCells([u])}}for(u=0;u<q.length;u++)q[u].parentNode.removeChild(q[u]);d=null;q=[];x=[]}C(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(m,u){m=u.getProperty("eventName");u=u.getProperty("event");m==mxEvent.MOUSE_MOVE&&+f&&(null!=u.sourceState&&u.sourceState.setCursor("crosshair"),u.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(m,u){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(m=u.getEvent(),f&&!mxEvent.isPopupTrigger(m)&&!mxEvent.isMiddleMouseButton(m)&&!mxEvent.isMultiTouchEvent(m))){var A=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);A=Math.max(1,A*b.view.scale);var B=this.getStrokeColor();d=document.createElementNS("http://www.w3.org/2000/svg","path");+d.setAttribute("fill",F?B:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",B);d.setAttribute("stroke-width",A);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(B=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",B=B.split(" ").map(function(H){return parseFloat(H)*A}).join(" "),d.setAttribute("stroke-dasharray",B));e=[];m=U(m);O(m);y="M"+m.x+" "+m.y;x.push(m);D=[];d.setAttribute("d",F?PerfectFreehand.getSvgPathFromStroke([[m.x,m.y]],z):y);g.appendChild(d);u.consume()}}),+mouseMove:mxUtils.bind(this,function(m,u){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){m=u.getEvent();m=U(m);O(m);var A=Q(0);if(A)if(x.push(A),F){var B=[];for(A=0;A<x.length;A++)B.push([x[A].x,x[A].y]);D=[];for(var H=2;H<e.length;H+=2)A=Q(H),B.push([A.x,A.y]),D.push(A);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(B,z))}else{y+=" L"+A.x+" "+A.y;B="";D=[];for(H=2;H<e.length;H+=2)A=Q(H),B+=" L"+A.x+" "+A.y,D.push(A);d.setAttribute("d",y+B)}N&&(A=b.view.translate,b.scrollRectToVisible((new mxRectangle(m.x-+A.x,m.y-A.y)).grow(20)));u.consume()}}),mouseUp:mxUtils.bind(this,function(m,u){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(E(u.getEvent()),u.consume())})});var U=function(m){return mxUtils.convertPoint(b.container,mxEvent.getClientX(m),mxEvent.getClientY(m))},O=function(m){for(e.push(m);e.length>l;)e.shift()},Q=function(m){var u=e.length;if(1===u%2||u>=l){var A=0,B=0,H,T=0;for(H=m;H<u;H++)T++,m=e[H],A+=m.x,B+=m.y;return{x:A/T,y:B/T}}return null}}}+mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,g,l,d,q){this.id=b;this.email=g;this.displayName=l;this.pictureUrl=d;this.locale=q};DrawioComment=function(b,g,l,d,q,y,x){this.file=b;this.id=g;this.content=l;this.modifiedDate=d;this.createdDate=q;this.isResolved=y;this.user=x;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,g,l,d,q){g()};DrawioComment.prototype.editComment=function(b,g,l){g()};DrawioComment.prototype.deleteComment=function(b,g){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];LucidImporter={};-(function(){function g(u){if(u&&null!=LucidImporter.imgSrcRepl){var F=LucidImporter.imgSrcRepl.attMap;if(F[u])u=F[u];else{F=LucidImporter.imgSrcRepl.imgRepl;for(var D=0;D<F.length;D++){var t=F[D];u=u.replace(t.searchVal,t.replVal)}LucidImporter.hasExtImgs=!0}}return u}function y(u){lb="";try{if(u){var F=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(F=LucidImporter.advImpConfig.fontMapping[u]);if(F){for(var D in F)lb+=D+"="+F[D]+";";return F.fontFamily?"font-family: "+F.fontFamily:-""}if("Liberation Sans"!=u)return lb="fontFamily="+u+";","font-family: "+u+";"}}catch(t){}return""}function z(u){return Math.round(10*u)/10}function B(u,F,D){function t(la,Ma){var ya="",za=la.t,Pb=la.l||{v:za&&"ul"==za.v?"auto":"decimal"};if(null==za||0!=Na&&Na==za.v&&Ka==Pb.v)null==za&&(Na&&(ya+=P(!0),Na=!1),ya+='<div style="',Ca.push("div"));else{Na&&(ya+=P(!0));Na=za.v;Ka=Pb.v;"ul"==za.v?(ya+="<ul ",Ca.push("ul")):(ya+="<ol ",Ca.push("ol"));ya+='style="margin: 0px; padding-left: 10px;list-style-position: inside; list-style-type:';+(function(){function g(w){if(w&&null!=LucidImporter.imgSrcRepl){var F=LucidImporter.imgSrcRepl.attMap;if(F[w])w=F[w];else{F=LucidImporter.imgSrcRepl.imgRepl;for(var D=0;D<F.length;D++){var u=F[D];w=w.replace(u.searchVal,u.replVal)}LucidImporter.hasExtImgs=!0}}return w}function y(w){lb="";try{if(w){var F=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(F=LucidImporter.advImpConfig.fontMapping[w]);if(F){for(var D in F)lb+=D+"="+F[D]+";";return F.fontFamily?"font-family: "+F.fontFamily:+""}if("Liberation Sans"!=w)return lb="fontFamily="+w+";","font-family: "+w+";"}}catch(u){}return""}function z(w){return Math.round(10*w)/10}function B(w,F,D){function u(la,Ma){var ya="",za=la.t,Pb=la.l||{v:za&&"ul"==za.v?"auto":"decimal"};if(null==za||0!=Na&&Na==za.v&&Ka==Pb.v)null==za&&(Na&&(ya+=P(!0),Na=!1),ya+='<div style="',Ca.push("div"));else{Na&&(ya+=P(!0));Na=za.v;Ka=Pb.v;"ul"==za.v?(ya+="<ul ",Ca.push("ul")):(ya+="<ol ",Ca.push("ol"));ya+='style="margin: 0px; padding-left: 10px;list-style-position: inside; list-style-type:';if("hl"==za.v)ya+="upper-roman";else switch(Pb.v){case "auto":ya+="disc";break;case "inv":ya+="circle";break;case "disc":ya+="circle";break;case "trib":ya+="square";break;case "square":ya+="square";break;case "dash":ya+="square";break;case "heart":ya+="disc";break;default:ya+="decimal"}ya+='">'}if(null!=za){ya+='<li style="text-align:'+(la.a?la.a.v:D.TextAlign||"center")+";";if(null!=Ma){if(Ma.c)var fa=Ma.c.v;if(Ma.s)var xb=Ma.s.v}try{var Va=aa[ja],rc=ra[Aa];Ma=ja;if(Va&&rc&&Va.s<rc.e)for(var vc=Va.s;null!=Va&&Va.s==vc;)"s"==Va.n?xb=Va.v:"c"==Va.n&&(fa=Va.v),Va=aa[++Ma]}catch(Fb){console.log(Fb)}fa=R(fa);null!=fa&&(fa=fa.substring(0,7),ya+="color:"+fa+";");xb&&(ya+="font-size:"+z(.75*xb)+"px;");ya+='">';Ca.push("li");ya+='<span style="';Ca.push("span")}Na||(xb=fa=la.a?la.a.v:D.TextAlign||"center","left"==fa?xb="flex-start":"right"==fa&&(xb="flex-end"),ya+="display: flex; justify-content: "+xb+"; text-align: "+fa+"; align-items: baseline; font-size: 0; line-height: 1.25;");la.il&&(ya+="margin-left: "+Math.max(0,z(.75*la.il.v-(Na?28:0)))+"px;");la.ir&&(ya+="margin-right: "+z(.75*la.ir.v)+"px;");la.mt&&(ya+="margin-top: "+z(.75*la.mt.v)+"px;");la.mb&&(ya+="margin-bottom: "+z(.75*la.mb.v)+"px;");ya+='margin-top: -2px;">';Na||(ya+="<span>",Ca.push("span"));return ya}function e(la){if(mxUtils.isEmptyObject(la))return"";var Ma="",ya=0;if(la.lk){var za=la.lk;null!=za.v&&0<za.v.length&&(Ma+='<a href="'+n(za.v[0])+'">',Ba.push("a"),ya++)}Ma+='<span style="';Ba.push("span");ya++;Ma+="font-size:"+(la.s&&la.s.v?z(.75*la.s.v):"13")+"px;";la.c&&(za=R(la.c.v),null!=za&&(za=za.substring(0,7),Ma+="color:"+za+";"));if(la.b&&la.b.v||la.fc&&la.fc.v&&0==la.fc.v.indexOf("Bold"))Ma+="font-weight: bold;";la.i&&la.i.v&&(Ma+="font-style: italic;");la.ac&&la.ac.v&&(Ma+="text-transform: uppercase;");za=null;la.f?za=la.f.v:D.Font&&(za=D.Font);Ma+=y(za);za=[];la.u&&la.u.v&&za.push("underline");la.k&&la.k.v&&za.push("line-through");0<za.length&&(Ma+="text-decoration: "+za.join(" ")+";");Ma+='">';Pa.push(ya);return Ma}-function P(la){var Ma="";do{var ya=Ca.pop();if(!la&&Na&&("ul"==ya||"ol"==ya)){Ca.push(ya);break}Ma+="</"+ya+">"}while(0<Ca.length);return Ma}function r(la,Ma,ya,za){la=la?la.substring(Ma,ya):"";Na&&(la=la.trim());0==Ba.length&&0<la.length&&(la=e({dummy:1})+la);la=la.replace(/</g,"<").replace(/>/g,">");do for(Ma=Pa.pop(),ya=0;ya<Ma;ya++){var Pb=Ba.pop();la+="</"+Pb+">"}while(za&&0<Ba.length);return la}var q={a:!0,il:!0,ir:!0,mt:!0,mb:!0,p:!0,t:!0,l:!0},Z={lk:!0,s:!0,c:!0,b:!0,fc:!0,i:!0,u:!0,-k:!0,f:!0,ac:!0};F.sort(function(la,Ma){return la.s-Ma.s});var aa=F.filter(function(la){return Z[la.n]});aa[0]&&0!=aa[0].s&&aa.unshift({s:0,n:"dummy",v:"",e:aa[0].s});F=F.filter(function(la){return q[la.n]});for(var V=[0],wa=0;0<(wa=u.indexOf("\n",wa));)wa++,V.push(wa);for(var ja=wa=0;ja<F.length;ja++){if(F[ja].s>V[wa])F.splice(ja,0,{s:V[wa],n:"a",v:D.TextAlign||"center"});else{for(var na=0;ja+na<F.length&&F[ja+na].s==V[wa];)na++;1<na&&(ja+=na-1)}wa++}null!=V[wa]&&F.push({s:V[wa],n:"a",v:D.TextAlign||-"center"});V="";var ra=aa.slice();ra.sort(function(la,Ma){return la.e-Ma.e});var Aa=ja=0;wa=0;na={};for(var ma={},Ba=[],Pa=[],Ca=[],ua=!1,Na=!1,Ka,La=0,l=0,Ia=u.length,bb=!0;wa<F.length||bb;){bb=!1;if(wa<F.length){var Ea=F[wa],Ra=F[wa].s;ua&&(ma={},V+=r(u,La,Ia,!0),l=La=Ia,V+=P());for(;null!=Ea&&Ea.s==Ra;)ma[Ea.n]=Ea,Ea=F[++wa];Ia=null!=Ea?Ea.s:u.length;V+=t(ma,na);ua&&(V+=e(na));ua=!0}for(;ja>=Aa&&(ja<aa.length||Aa<ra.length);)if(Ea=aa[ja],Ra=ra[Aa],Ea&&Ra&&Ea.s<Ra.e){if(Ea.s>=Ia)break;La=Ea.s;0<-La-l&&(V+=e(na)+r(u,l,La),l=La);for(;null!=Ea&&Ea.s==La;)na[Ea.n]=Ea,Ea=aa[++ja];V+=e(na)}else if(Ra){if(Ra.e>Ia)break;l=Ra.e;do delete na[Ra.n],Ra=ra[++Aa];while(null!=Ra&&Ra.e==l);V+=r(u,La,l);La=l;0!=Pa.length||null!=Ea&&Ea.s==l||(aa.splice(ja,0,{s:l,n:"dummy",v:""}),ra.splice(Aa,0,{e:Ea?Ea.s:Ia,n:"dummy",v:""}))}else break}V+=r(null,null,null,!0);ua&&(l!=Ia&&(V+=e({dummy:1})+r(u,l,Ia)),V+=P(!0));return V}function m(u,F){G=!1;var D=null!=u.Text&&u.Text.t?u.Text:null!=u.Value&&u.Value.t?u.Value:-null!=u.Lane_0&&u.Lane_0.t?u.Lane_0:null;null==D&&null!=u.State?u.State.t&&(D=u.State):null==D&&null!=u.Note?u.Note.t&&(D=u.Note):null==D&&null!=u.Title?u.Title.t&&(D=u.Title):u.t&&(D=u);null==D&&null!=u.TextAreas?null!=u.TextAreas.Text&&null!=u.TextAreas.Text.Value&&u.TextAreas.Text.Value.t&&(D=u.TextAreas.Text.Value):null==D&&null!=u.t0&&u.t0.t&&(D=u.t0);if(null!=D){if(null!=D.t){var t=D.t;t=t.replace(/\u2028/g,"\n");D=D.m;try{/ /.test(t)&&(LucidImporter.hasUnknownShapes=!0);for(var e=0;e<D.length;e++)if(0<-D[e].s||null!=D[e].e&&D[e].e<t.length||"t"==D[e].n||"ac"==D[e].n||"lk"==D[e].n){G=!0;break}if(G=G||F)return B(t,D,u)}catch(P){console.log(P)}t=t.replace(/</g,"<");return t=t.replace(/>/g,">")}if(null!=D.Value&&null!=D.Value.t)return D.Value.t=D.Value.t.replace(/</g,"<"),D.Value.t=D.Value.t.replace(/>/g,">"),D.Value.t}return""}function h(u){return null!=u.Action?u.Action:u}function c(u){if(null!=u.Text){if(null!=u.Text.m)return u.Text.m}else if(null!=u.TextAreas){if(null!=u.TextAreas.Text&&-null!=u.TextAreas.Text.Value&&null!=u.TextAreas.Text.Value.m)return u.TextAreas.Text.Value.m}else{if(null!=u.m)return u.m;if(null!=u.Title){if(null!=u.Title.m)return u.Title.m}else if(null!=u.State){if(null!=u.State.m)return u.State.m}else if(null!=u.Note&&null!=u.Note.m)return u.Note.m}return null}function a(u,F){u="whiteSpace=wrap;"+(F?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+lb:f(u)+k(u)+p(u)+x(u)+C(u)+J(u)+M(u)+L(u)+Q(u))+U(u)+H(u)+Zb(mxConstants.STYLE_ALIGN,u.TextAlign,"center");lb=-"";return u}function b(u,F,D,t,e,P){P=null==P?!1:P;var r="",q=!1,Z=!1;if(null!=u)if(P){P=u.split(";");u="";for(var aa=0;aa<P.length;aa++)"fillColor=none"==P[aa]?Z=!0:"strokeColor=none"==P[aa]?q=!0:""!=P[aa]&&(u+=P[aa]+";")}else""!=u&&";"!=u.charAt(u.length-1)&&(r=";");r+=(Xc(u,"whiteSpace")?"":"whiteSpace=wrap;")+(e?(Xc(u,"overflow")?"":"overflow=block;blockSpacing=1;")+(Xc(u,"html")?"":"html=1;")+"fontSize=13;"+lb:d(mxConstants.STYLE_FONTSIZE,u,F,D,t)+d(mxConstants.STYLE_FONTFAMILY,u,F,D,t)+d(mxConstants.STYLE_FONTCOLOR,-u,F,D,t)+d(mxConstants.STYLE_FONTSTYLE,u,F,D,t)+d(mxConstants.STYLE_ALIGN,u,F,D,t)+d(mxConstants.STYLE_SPACING_LEFT,u,F,D,t)+d(mxConstants.STYLE_SPACING_RIGHT,u,F,D,t)+d(mxConstants.STYLE_SPACING_TOP,u,F,D,t)+d(mxConstants.STYLE_SPACING_BOTTOM,u,F,D,t))+d(mxConstants.STYLE_ALIGN+"Global",u,F,D,t)+d(mxConstants.STYLE_SPACING,u,F,D,t)+d(mxConstants.STYLE_VERTICAL_ALIGN,u,F,D,t)+d(mxConstants.STYLE_STROKECOLOR,u,F,D,t)+d(mxConstants.STYLE_OPACITY,u,F,D,t)+d(mxConstants.STYLE_ROUNDED,u,F,D,t)+d(mxConstants.STYLE_ROTATION,-u,F,D,t)+d(mxConstants.STYLE_FLIPH,u,F,D,t)+d(mxConstants.STYLE_FLIPV,u,F,D,t)+d(mxConstants.STYLE_SHADOW,u,F,D,t)+d(mxConstants.STYLE_FILLCOLOR,u,F,D,t)+d(mxConstants.STYLE_DASHED,u,F,D,t)+d(mxConstants.STYLE_STROKEWIDTH,u,F,D,t)+d(mxConstants.STYLE_IMAGE,u,F,D,t)+d(mxConstants.STYLE_POINTER_EVENTS,u,F,D,t);Z&&!Xc(r,mxConstants.STYLE_FILLCOLOR)&&(r+="fillColor=none;");q&&!Xc(r,mxConstants.STYLE_STROKECOLOR)&&(r+="strokeColor=none;");lb="";return r}function d(u,F,D,t,e){if(!Xc(F,u))switch(u){case mxConstants.STYLE_FONTSIZE:return f(D);-case mxConstants.STYLE_FONTFAMILY:return k(D);case mxConstants.STYLE_FONTCOLOR:return p(D);case mxConstants.STYLE_FONTSTYLE:return x(D);case mxConstants.STYLE_ALIGN:return C(D);case mxConstants.STYLE_ALIGN+"Global":return Zb(mxConstants.STYLE_ALIGN,D.TextAlign,"center");case mxConstants.STYLE_SPACING_LEFT:return J(D);case mxConstants.STYLE_SPACING_RIGHT:return M(D);case mxConstants.STYLE_SPACING_TOP:return L(D);case mxConstants.STYLE_SPACING_BOTTOM:return Q(D);case mxConstants.STYLE_SPACING:return U(D);-case mxConstants.STYLE_VERTICAL_ALIGN:return H(D);case mxConstants.STYLE_STROKECOLOR:return I(D,t);case mxConstants.STYLE_OPACITY:return O(D,t,e);case mxConstants.STYLE_ROUNDED:return u=!e.edge&&!e.style.includes("rounded")&&null!=D.Rounding&&0<D.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+z(.75*D.Rounding)+";":"",u;case mxConstants.STYLE_ROTATION:return ba(D,t,e);case mxConstants.STYLE_FLIPH:return u=D.FlipX?"flipH=1;":"",u;case mxConstants.STYLE_FLIPV:return u=D.FlipY?"flipV=1;":"",u;case mxConstants.STYLE_SHADOW:return W(D);-case mxConstants.STYLE_FILLCOLOR:return ca(D,t);case mxConstants.STYLE_DASHED:return qa(D);case mxConstants.STYLE_STROKEWIDTH:return sa(D);case mxConstants.STYLE_IMAGE:return Fa(D,t);case mxConstants.STYLE_POINTER_EVENTS:return D.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("s"==D.n&&D.v)return"fontSize="+z(.75*D.v)+";";F++}return"fontSize=13;"}function k(u){var F=c(u);if(null!=F)for(var D=-0;D<F.length;D++)if("f"==F[D].n&&F[D].v){var t=F[D].v;break}!t&&u.Font&&(t=u.Font);y(t);return lb}function n(u){return"ext"==u.tp?u.url:"ml"==u.tp?"mailto:"+u.eml:"pg"==u.tp?"data:page/id,"+(LucidImporter.pageIdsMap[u.id]||0):"c"==u.tp?"data:confluence/id,"+u.ccid:null}function p(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("c"==D.n&&null!=D.v)return u=R(D.v).substring(0,7),"#000000"==u&&(u="default"),mxConstants.STYLE_FONTCOLOR+"="+u+";";F++}return""}function x(u){return A(c(u))}function A(u){if(null!=-u){var F=0,D=!1;if(null!=u)for(var t=0;!D&&t<u.length;){var e=u[t];"b"==e.n?null!=e.v&&e.v&&(D=!0,F+=1):"fc"==e.n&&"Bold"==e.v&&(D=!0,F+=1);t++}D=!1;if(null!=u)for(t=0;!D&&t<u.length;)e=u[t],"i"==e.n&&null!=e.v&&e.v&&(D=!0,F+=2),t++;D=!1;if(null!=u)for(t=0;!D&&t<u.length;)e=u[t],"u"==e.n&&null!=e.v&&e.v&&(D=!0,F+=4),t++;if(0<F)return"fontStyle="+F+";"}return""}function C(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("a"==D.n&&null!=D.v)return"align="+D.v+";";F++}return""}function J(u){u=-c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if(null!=D.v&&"il"==D.n)return"spacingLeft="+z(.75*D.v)+";";F++}return""}function M(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("ir"==D.n&&null!=D.v)return"spacingRight="+z(.75*D.v)+";";F++}return""}function L(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("mt"==D.n&&null!=D.v)return"spacingTop="+z(.75*D.v)+";";F++}return""}function Q(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("mb"==D.n&&null!=D.v)return"spacingBottom="+-z(.75*D.v)+";";F++}return""}function U(u){return"number"===typeof u.InsetMargin?"spacing="+Math.max(0,z(.75*u.InsetMargin))+";":""}function H(u){return null!=u.Text_VAlign&&"string"===typeof u.Text_VAlign?"verticalAlign="+u.Text_VAlign+";":null!=u.Title_VAlign&&"string"===typeof u.Title_VAlign?"verticalAlign="+u.Title_VAlign+";":Zb(mxConstants.STYLE_VERTICAL_ALIGN,u.TextVAlign,"middle")}function I(u,F){return 0==u.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":Zb(mxConstants.STYLE_STROKECOLOR,S(u.LineColor),-"#000000")}function N(u){return null!=u?mxConstants.STYLE_FILLCOLOR+"="+S(u)+";":""}function K(u){return null!=u?"swimlaneFillColor="+S(u)+";":""}function O(u,F,D){F="";if("string"===typeof u.LineColor&&(u.LineColor=R(u.LineColor),7<u.LineColor.length)){var t="0x"+u.LineColor.substring(u.LineColor.length-2,u.LineColor.length);D.style.includes("strokeOpacity")||(F+="strokeOpacity="+Math.round(parseInt(t)/2.55)+";")}"string"===typeof u.FillColor&&(u.FillColor=R(u.FillColor),7<u.FillColor.length&&(u=-"0x"+u.FillColor.substring(u.FillColor.length-2,u.FillColor.length),D.style.includes("fillOpacity")||(F+="fillOpacity="+Math.round(parseInt(u)/2.55)+";")));return F}function ba(u,F,D){var t="";if(null!=u.Rotation){u=mxUtils.toDegree(parseFloat(u.Rotation));var e=!0;0!=u&&F.Class&&("UMLSwimLaneBlockV2"==F.Class||(0<=F.Class.indexOf("Rotated")||-90==u||270==u)&&(0<=F.Class.indexOf("Pool")||0<=F.Class.indexOf("SwimLane")))?(u+=90,D.geometry.rotate90(),D.geometry.isRotated=!0,e=!1):0<=mxUtils.indexOf(vf,-F.Class)?(u-=90,D.geometry.rotate90()):0<=mxUtils.indexOf(wf,F.Class)&&(u+=180);0!=u&&(t+="rotation="+u+";");e||(t+="horizontal=0;")}return t}function W(u){return null!=u.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function R(u){if(u){if("object"===typeof u)try{u=u.cs[0].c}catch(F){console.log(F),u="#ffffff"}"rgb"==u.substring(0,3)?u="#"+u.match(/\d+/g).map(function(F){F=parseInt(F).toString(16);return(1==F.length?"0":"")+F}).join(""):"#"!=u.charAt(0)&&(u="#"+u)}return u}function S(u){return(u=R(u))?-u.substring(0,7):null}function ka(u,F){return(u=R(u))&&7<u.length?F+"="+Math.round(parseInt("0x"+u.substr(7))/2.55)+";":""}function ca(u,F){if(null!=u.FillColor)if("object"===typeof u.FillColor){if(null!=u.FillColor.cs&&1<u.FillColor.cs.length)return Zb(mxConstants.STYLE_FILLCOLOR,S(u.FillColor.cs[0].c))+Zb(mxConstants.STYLE_GRADIENTCOLOR,S(u.FillColor.cs[1].c))}else return"string"===typeof u.FillColor?Zb(mxConstants.STYLE_FILLCOLOR,S(u.FillColor),"#FFFFFF"):Zb(mxConstants.STYLE_FILLCOLOR,"none");-return""}function qa(u){return"dotted"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=1 4;":"dashdot"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 5 1 5;":"dashdotdot"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 5 1 5 1 5;":"dotdotdot"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=1 2;":"longdash"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=16 6;":"dashlongdash"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 6 16 6;":"dashed24"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=3 8;":-"dashed32"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=6 5;":"dashed44"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=8 8;":null!=u.StrokeStyle&&"dashed"==u.StrokeStyle.substring(0,6)?"dashed=1;fixDash=1;":""}function sa(u){return null!=u.LineWidth?Zb(mxConstants.STYLE_STROKEWIDTH,z(.75*parseFloat(u.LineWidth)),"1"):""}function Fa(u,F,D){var t="";u.FillColor&&u.FillColor.url?(D=u.FillColor.url,"fill"==u.FillColor.pos&&(t="imageAspect=0;")):"ImageSearchBlock2"==F.Class?D=u.URL:"UserImage2Block"==-F.Class&&null!=u.ImageFillProps&&null!=u.ImageFillProps.url&&(D=u.ImageFillProps.url);return null!=D?"image="+g(D)+";"+t:""}function pa(u,F,D){null!=F.Link&&0<F.Link.length&&D.setAttributeForCell(u,"link",n(F.Link[0]));null!=F.NoteHint&&F.NoteHint.t&&D.setAttributeForCell(u,"Notes",F.NoteHint.t);var t=[],e=D.convertValueToString(u),P=!1;if(null!=e){for(var r=0;match=xf.exec(e);){var q=match[0];P=!0;if(2<q.length){var Z=q.substring(2,q.length-2);"documentName"==Z?Z="filename":"pageName"==Z?Z="page":-"totalPages"==Z?Z="pagecount":"page"==Z?Z="pagenumber":"date:"==Z.substring(0,5)?Z="date{"+Z.substring(5).replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy")+"}":"lastModifiedTime"==Z.substring(0,16)?Z=Z.replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy"):"i18nDate:"==Z.substring(0,9)&&(Z="date{"+Z.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");Z="%"+Z+"%";t.push(e.substring(r,match.index)+(null!=Z?Z:q));r=-match.index+q.length}}P&&(t.push(e.substring(r)),D.setAttributeForCell(u,"label",t.join("")),D.setAttributeForCell(u,"placeholders","1"))}for(var aa in F)if(F.hasOwnProperty(aa)&&aa.toString().startsWith("ShapeData_"))try{var V=F[aa],wa=mxUtils.trim(V.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Za(u,wa,V.Value,D)}catch(ja){window.console&&console.log("Ignored "+aa+":",ja)}}function Za(u,F,D,t){for(var e=F,P=0;null!=t.getAttributeForCell(u,e);)P++,e=F+"_"+P;t.setAttributeForCell(u,-e,null!=D?D:"")}function Qb(u,F,D,t,e,P){var r=h(F);if(null!=r){var q=Od[r.Class];null!=q?(u.style+=q,";"!=u.style.charAt(u.style.length-1)&&(u.style+=";")):u.edge||(console.log("No mapping found for: "+r.Class),LucidImporter.hasUnknownShapes=!0);q=null!=r.Properties?r.Properties:r;if(null!=q&&(u.value=P?"":m(q),u.style+=b(u.style,q,r,u,G,!0),u.style.includes("strokeColor")||(u.style+=I(q,r)),pa(u,q,D),q.Title&&q.Title.t&&q.Text&&q.Text.t&&"ExtShape"!=r.Class.substr(0,8)&&(D=u.geometry,D=new mxCell(m(q.Title),-new mxGeometry(0,D.height,D.width,10),"strokeColor=none;fillColor=none;"),D.vertex=!0,u.insert(D),D.style+=a(q.Title,G)),u.edge)){u.style=null!=q.Rounding&&"diagonal"!=q.Shape?u.style+("rounded=1;arcSize="+q.Rounding+";"):u.style+"rounded=0;";if(D="curve"==q.Shape)u.style+="curved=1;";else if("diagonal"!=q.Shape)if(null!=q.ElbowPoints&&0<q.ElbowPoints.length)for(u.geometry.points=[],r=0;r<q.ElbowPoints.length;r++)u.geometry.points.push(new mxPoint(Math.round(.75*q.ElbowPoints[r].x+wc),Math.round(.75*-q.ElbowPoints[r].y+xc)));else if("elbow"==q.Shape||null!=q.Endpoint1.Block&&null!=q.Endpoint2.Block)u.style+="edgeStyle=orthogonalEdgeStyle;";if(q.LineJumps||LucidImporter.globalProps.LineJumps)u.style+="jumpStyle=arc;";null!=q.Endpoint1.Style&&(P=Ee[q.Endpoint1.Style],null!=P?(P=P.replace(/xyz/g,"start"),u.style+="startArrow="+P+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+q.Endpoint1.Style)));null!=q.Endpoint2.Style&&(P=Ee[q.Endpoint2.Style],null!=-P?(P=P.replace(/xyz/g,"end"),u.style+="endArrow="+P+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+q.Endpoint2.Style)));P=null!=q.ElbowControlPoints&&0<q.ElbowControlPoints.length?q.ElbowControlPoints:q.Joints;if(D&&null!=q.BezierJoints&&0<q.BezierJoints.length){P=[];D=q.BezierJoints[q.BezierJoints.length-1];D.p.x=q.Endpoint2.x;D.p.y=q.Endpoint2.y;for(r=0;r<q.BezierJoints.length;r++)D=q.BezierJoints[r],P.push({x:D.p.x+D.nt.x*D.lcps*.75,y:D.p.y+D.nt.y*-D.lcps*.75}),P.push({x:D.p.x+D.nt.x*D.rcps*.75,y:D.p.y+D.nt.y*D.rcps*.75});P=P.slice(1,P.length-1)}else D&&(P=[],P.push({x:q.Endpoint1.x+(.1>q.Endpoint1.LinkX?-250:.9<q.Endpoint1.LinkX?250:0),y:q.Endpoint1.y+(.1>q.Endpoint1.LinkY?-250:.9<q.Endpoint1.LinkY?250:0)}),P.push({x:q.Endpoint2.x+(.1>q.Endpoint2.LinkX?-250:.9<q.Endpoint2.LinkX?250:0),y:q.Endpoint2.y+(.1>q.Endpoint2.LinkY?-250:.9<q.Endpoint2.LinkY?250:0)}));if(null!=P)for(u.geometry.points=[],r=0;r<P.length;r++)D=P[r].p?P[r].p:P[r],u.geometry.points.push(new mxPoint(Math.round(.75*-D.x+wc),Math.round(.75*D.y+xc)));D=!1;if((null==u.geometry.points||0==u.geometry.points.length)&&null!=q.Endpoint1.Block&&q.Endpoint1.Block==q.Endpoint2.Block&&null!=t&&null!=e){D=new mxPoint(Math.round(t.geometry.x+t.geometry.width*q.Endpoint1.LinkX),Math.round(t.geometry.y+t.geometry.height*q.Endpoint1.LinkY));P=new mxPoint(Math.round(e.geometry.x+e.geometry.width*q.Endpoint2.LinkX),Math.round(e.geometry.y+e.geometry.height*q.Endpoint2.LinkY));wc=D.x==P.x?Math.abs(D.x-t.geometry.x)<t.geometry.width/-2?-20:20:0;xc=D.y==P.y?Math.abs(D.y-t.geometry.y)<t.geometry.height/2?-20:20:0;var Z=new mxPoint(D.x+wc,D.y+xc),aa=new mxPoint(P.x+wc,P.y+xc);Z.generated=!0;aa.generated=!0;u.geometry.points=[Z,aa];D=D.x==P.x}null!=t&&t.geometry.isRotated||(Z=Fe(u,q.Endpoint1,!0,D,null,t));null!=t&&null!=Z&&(null==t.stylePoints&&(t.stylePoints=[]),t.stylePoints.push(Z),LucidImporter.stylePointsSet.add(t));null!=e&&e.geometry.isRotated||(aa=Fe(u,q.Endpoint2,!1,D,null,e));null!=e&&null!=aa&&(null==e.stylePoints&&(e.stylePoints=-[]),e.stylePoints.push(aa),LucidImporter.stylePointsSet.add(e))}}null!=F.id&&(u.style+=";lucidId="+F.id+";");u.lucidchartObject=F}function vb(u,F){var D=h(u).Properties,t=D.BoundingBox;null==u.Class||"AWS"!==u.Class.substring(0,3)&&"Amazon"!==u.Class.substring(0,6)||u.Class.includes("AWS19")||(t.h-=20);v=new mxCell("",new mxGeometry(Math.round(.75*t.x+wc),Math.round(.75*t.y+xc),Math.round(.75*t.w),Math.round(.75*t.h)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;Qb(v,u,F);-v.zOrder=D.ZOrder;Ge(v,D);D.Hidden&&(v.visible=!1);return v}function yf(u,F,D,t){var e=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");e.geometry.relative=!0;e.edge=!0;Qb(e,u,F,D,t,!0);var P=h(u).Properties,r=null!=P?P.TextAreas:u.TextAreas;if(null!=r){for(var q=0;void 0!==r["t"+q];){var Z=r["t"+q];null!=Z&&(e=Pd(Z,e,u,D,t,F));q++}for(q=0;void 0!==r["m"+q]||1>q;)Z=r["m"+q],null!=Z&&(e=Pd(Z,e,u,D,t,F)),q++;null!=r.Text&&(e=Pd(r.Text,e,u,D,t,F));r=null!=P?P.TextAreas:u.TextAreas;null!=-r.Message&&(e=Pd(r.Message,e,u,D,t,F))}u.Hidden&&(e.visible=!1);return e}function Pd(u,F,D,t,e,P){var r=2*(parseFloat(u.Location)-.5);isNaN(r)&&null!=u.Text&&null!=u.Text.Location&&(r=2*(parseFloat(u.Text.Location)-.5));P=m(u);var q=mxCell;r=new mxGeometry(isNaN(r)?0:r,0,0,0);var Z=ge;var aa=D;if(G)aa=lb;else{var V="13",wa="";if(null!=u&&null!=u.Value&&null!=u.Value.m){wa=A(u.Value.m);for(var ja=0;ja<u.Value.m.length;ja++)if("s"==u.Value.m[ja].n&&u.Value.m[ja].v)V=z(.75*parseFloat(u.Value.m[ja].v));-else if("c"==u.Value.m[ja].n){var na=R(u.Value.m[ja].v);null!=na&&(na=na.substring(0,7));"#000000"==na&&(na="default");wa+="fontColor="+na+";"}wa+=k(aa);lb=""}aa=wa+";fontSize="+V+";"}q=new q(P,r,Z+aa);q.geometry.relative=!0;q.vertex=!0;if(u.Side)try{D.Action&&D.Action.Properties&&(D=D.Action.Properties);if(null!=t&&null!=e){var ra=t.geometry,Aa=e.geometry;var ma=Math.abs(ra.x+ra.width*D.Endpoint1.LinkX-(Aa.x+Aa.width*D.Endpoint2.LinkX));var Ba=Math.abs(ra.y+ra.height*D.Endpoint1.LinkY-(Aa.y+Aa.height*-D.Endpoint2.LinkY))}else ma=Math.abs(D.Endpoint1.x-D.Endpoint2.x),Ba=Math.abs(D.Endpoint1.y-D.Endpoint2.y);var Pa=mxUtils.getSizeForString(P.replace(/\n/g,"<br>"));q.geometry.offset=0==ma||ma<Ba?new mxPoint(Math.sign(D.Endpoint1.y-D.Endpoint2.y)*u.Side*(Pa.width/2+5+ma),0):new mxPoint(0,Math.sign(D.Endpoint2.x-D.Endpoint1.x)*u.Side*(Pa.height/2+5+Ba))}catch(Ca){console.log(Ca)}q.lucidchartObject=u;F.insert(q);return F}function Zb(u,F,D,t){null!=F&&null!=t&&(F=t(F));return null!=F&&F!=D?u+"="+F+";":-""}function Fe(u,F,D,t,e,P){if(null!=F&&null!=F.LinkX&&null!=F.LinkY&&(F.LinkX=Math.round(1E3*F.LinkX)/1E3,F.LinkY=Math.round(1E3*F.LinkY)/1E3,null!=P&&P.style&&-1<P.style.indexOf("flipH=1")&&(F.LinkX=1-F.LinkX),null!=P&&P.style&&-1<P.style.indexOf("flipV=1")&&(F.LinkY=1-F.LinkY),u.style+=(t?"":(D?"exitX":"entryX")+"="+F.LinkX+";")+(e?"":(D?"exitY":"entryY")+"="+F.LinkY+";")+(D?"exitPerimeter":"entryPerimeter")+"=0;",F.Inside))return"["+F.LinkX+","+F.LinkY+",0]"}function He(u,F,D,t,e){try{var P=function(ma,-Ba){if(null!=ma)if(Array.isArray(ma))for(var Pa=0;Pa<ma.length;Pa++)P(ma[Pa].p?ma[Pa].p:ma[Pa],Ba);else Ba=Ba?.75:1,q=Math.min(q,ma.x*Ba),Z=Math.min(Z,ma.y*Ba),aa=Math.max(aa,(ma.x+(ma.width?ma.width:0))*Ba),V=Math.max(V,(ma.y+(ma.height?ma.height:0))*Ba)};null!=u.Action&&null!=u.Action.Properties&&(u=u.Action.Properties);var r=new mxCell("",new mxGeometry,"group;dropTarget=0;pointerEvents=0;");r.vertex=!0;r.zOrder=u.ZOrder;var q=Infinity,Z=Infinity,aa=-Infinity,V=-Infinity,wa=u.Members;e=[];for(var ja in wa){var na=-F[ja];null!=na?e.push(na):null!=t[ja]&&(e.push(t[ja]),D[ja]=r)}e.sort(function(ma,Ba){ma=ma.zOrder||ma.ZOrder;Ba=Ba.zOrder||Ba.ZOrder;return null!=ma&&null!=Ba?ma>Ba?1:ma<Ba?-1:0:0});for(D=F=0;D<e.length;D++)if(na=e[D],na.vertex)P(na.geometry),na.parent=r,r.insert(na,F++);else{var ra=null!=na.Action&&na.Action.Properties?na.Action.Properties:na;P(ra.Endpoint1,!0);P(ra.Endpoint2,!0);P(ra.ElbowPoints,!0);P(ra.ElbowControlPoints,!0);P(ra.BezierJoints,!0);P(ra.Joints,!0)}r.geometry.x=q;r.geometry.y=Z;-r.geometry.width=aa-q;r.geometry.height=V-Z;if(null!=r.children)for(D=0;D<r.children.length;D++){var Aa=r.children[D].geometry;Aa.x-=q;Aa.y-=Z}u.IsState?(r.lucidLayerInfo={name:u.Name,visible:!u.Hidden,locked:u.Restrictions.b&&u.Restrictions.p&&u.Restrictions.c},r.style+="container=1;collapsible=0;recursiveResize=0;"):u.Hidden&&(r.visible=!1);r.lucidchartObject=u;return r}catch(ma){console.log(ma)}}function zf(u,F,D){LucidImporter.hasMath=!1;LucidImporter.stylePointsSet=new Set;u.getModel().beginUpdate();-try{var t=function(Ca,ua){function Na(Ra,la,Ma){null==Ra||Ra.generated||(Ra.x-=la,Ra.y-=Ma)}var Ka=null!=ua.Endpoint1.Block?P[ua.Endpoint1.Block]:null,La=null!=ua.Endpoint2.Block?P[ua.Endpoint2.Block]:null,l=yf(Ca,u,Ka,La);if(ua.Endpoint1&&ua.Endpoint1.Line||ua.Endpoint2&&ua.Endpoint2.Line)console.log("Edge to Edge case"),LucidImporter.hasUnknownShapes=!0;null==Ka&&null!=ua.Endpoint1&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.75*ua.Endpoint1.x),Math.round(.75*ua.Endpoint1.y)),!0);null==-La&&null!=ua.Endpoint2&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.75*ua.Endpoint2.x),Math.round(.75*ua.Endpoint2.y)),!1);Ca=r[Ca.id];if(null!=Ca){for(var Ia=l.geometry,bb=ua=0,Ea=Ca;null!=Ea&&null!=Ea.geometry;)ua+=Ea.geometry.x,bb+=Ea.geometry.y,Ea=Ea.parent;Na(Ia.sourcePoint,ua,bb);Na(Ia.targetPoint,ua,bb);Na(Ia.offset,ua,bb);Ia=Ia.points;if(null!=Ia)for(Ea=0;Ea<Ia.length;Ea++)Na(Ia[Ea],ua,bb)}e.push(u.addCell(l,Ca,null,Ka,La))},e=[],P={},r={},q={},Z=[];null!=F.Lines&&(q=F.Lines);if(null!=-F.Blocks){Object.assign(q,F.Blocks);for(var aa in F.Blocks){var V=F.Blocks[aa];V.id=aa;var wa=!1;null!=Od[V.Class]&&"mxCompositeShape"==Od[V.Class]&&(P[V.id]=Ie(V,e,u),Z.push(V),wa=!0);wa||(P[V.id]=vb(V,u),Z.push(V))}if(null!=F.Generators)for(aa in F.Generators)"OrgChart2018"==F.Generators[aa].ClassName?(LucidImporter.hasUnknownShapes=!0,Je(aa,F.Generators[aa],F.Data,u,P)):LucidImporter.hasUnknownShapes=!0}else{for(var ja=0;ja<F.Objects.length;ja++)V=F.Objects[ja],q[V.id]=V,null!=V.Action&&"mxCompositeShape"==-Od[V.Action.Class]?P[V.id]=Ie(V,e,u):V.IsBlock&&null!=V.Action&&null!=V.Action.Properties?P[V.id]=vb(V,u):V.IsGenerator&&V.GeneratorData&&V.GeneratorData.p&&("OrgChart2018"==V.GeneratorData.p.ClassName?(LucidImporter.hasUnknownShapes=!0,Je(V.GeneratorData.id,V.GeneratorData.p,V.GeneratorData.gs,u,P)):LucidImporter.hasUnknownShapes=!0),Z.push(V);for(ja=0;ja<F.Objects.length;ja++)if(V=F.Objects[ja],V.IsGroup){var na=He(V,P,r,q,u);na&&(P[V.id]=na,Z.push(V))}}if(null!=F.Groups)try{for(aa in F.Groups)if(V=-F.Groups[aa],V.id=aa,na=He(V,P,r,q,u))P[V.id]=na,Z.push(V)}catch(Ca){console.log(Ca)}if(null!=F.Lines)for(aa in F.Lines)V=F.Lines[aa],V.id=aa,Z.push(V);Z.sort(function(Ca,ua){Ca=h(Ca);ua=h(ua);Ca=null!=Ca.Properties?Ca.Properties.ZOrder:Ca.ZOrder;ua=null!=ua.Properties?ua.Properties.ZOrder:ua.ZOrder;return null!=Ca&&null!=ua?Ca>ua?1:Ca<ua?-1:0:0});for(ja=0;ja<Z.length;ja++){V=Z[ja];var ra=P[V.id];if(null!=ra){if(null==ra.parent)if(ra.lucidLayerInfo){var Aa=new mxCell;u.addCell(Aa,u.model.root);Aa.setVisible(ra.lucidLayerInfo.visible);-ra.lucidLayerInfo.locked&&Aa.setStyle("locked=1;");Aa.setValue(ra.lucidLayerInfo.name);delete ra.lucidLayerInfo;u.addCell(ra,Aa)}else e.push(u.addCell(ra))}else V.IsLine&&null!=V.Action&&null!=V.Action.Properties?t(V,V.Action.Properties):null!=V.StrokeStyle&&t(V,V)}LucidImporter.stylePointsSet.forEach(function(Ca){Ca.style="points=["+Ca.stylePoints.join(",")+"];"+Ca.style;delete Ca.stylePoints});try{var ma=u.getModel().cells;u.view.validate();for(var Ba in ma){var Pa=ma[Ba];null!=Pa&&(Af(u,Pa),Bf(u,-Pa),Cf(u,Pa),"1"==urlParams.lucidchartObject&&null!=Pa.lucidchartObject&&Za(Pa,"lucidchartObject",JSON.stringify(Pa.lucidchartObject,null,2),u),delete Pa.lucidchartObject,delete Pa.zOrder)}}catch(Ca){console.log(Ca)}D||u.setSelectionCells(e)}finally{u.getModel().endUpdate()}}function Cf(u,F){if(u.model.contains(F)&&F.edge){var D=u.view.getState(F);if(null!=D&&null!=F.children){var t=mxRectangle.fromRectangle(D.paintBounds);t.grow(5);for(var e=0;e<F.children.length;e++){var P=u.view.getState(F.children[e]);-null==P||mxUtils.contains(t,P.paintBounds.x,P.paintBounds.y)||(P.cell.geometry.offset=new mxPoint(0,0))}}u=F.lucidchartObject;null!=u&&"elbow"==u.Shape&&null==u.ElbowControlPoints&&null==u.ElbowPoints&&null!=D.style.exitX&&null!=D.style.exitY&&null!=D.style.entryX&&null!=D.style.entryY&&(F.style=mxUtils.setStyle(F.style,"exitX",Math.round(20*D.style.exitX)/20),F.style=mxUtils.setStyle(F.style,"exitY",Math.round(20*D.style.exitY)/20),F.style=mxUtils.setStyle(F.style,"entryX",Math.round(20*D.style.entryX)/-20),F.style=mxUtils.setStyle(F.style,"entryY",Math.round(20*D.style.entryY)/20))}}function Bf(u,F){if(u.model.contains(F)&&null!=F.style&&""!=F.style){u=F.style.split(";");for(var D={},t=[],e=u.length-1;0<=e;e--){var P=u[e].split("=");if(2!=P.length||null==D[P[0]])D[P[0]]=P[1],""!=u[e]&&t.push(u[e])}F.style=t.reverse().join(";")+";"}}function Af(u,F){if(u.model.contains(F)&&null!=F.children&&null!=F.geometry&&F.vertex&&"group;dropTarget=0;pointerEvents=0;"==F.style){for(var D=null,t=0;t<F.children.length;t++)if(F.children[t].vertex){var e=-F.children[t].geometry;if(null!=e&&0==e.x&&0==e.y&&e.width==F.geometry.width&&e.height==F.geometry.height){if(null!=D)return;D=F.children[t]}}F=D;if(null!=F&&(D=F.parent,""==u.convertValueToString(D))){if(null!=F.edges)for(t=0;t<F.edges.length;t++)F.edges[t].source==F&&F.edges[t].setTerminal(F.parent,!0),F.edges[t].target==F&&F.edges[t].setTerminal(F.parent,!1);if(null!=F.children&&0<F.children.length)for(e=F.children.slice(),t=0;t<e.length;t++)D.insert(e[t]);u.cellLabelChanged(D,u.convertValueToString(F));-D.style=mxUtils.setStyle(mxUtils.setStyle(F.style,"container","1"),"collapsible","0");F.removeFromParent()}}}function Df(){var u=new Graph;u.setExtendParents(!1);u.setExtendParentsOnAdd(!1);u.setConstrainChildren(!1);u.setHtmlLabels(!0);u.getModel().maintainEdgeParent=!1;return u}function Qd(u,F,D,t,e,P,r,q){this.nurbsValues=[1,3,0,0,100*(u+D),100-100*(1-(F+t)),0,1,100*(e+r),100-100*(1-(P+q)),0,1]}function Ke(u,F){try{for(var D=[],t=F.BoundingBox.w,e=F.BoundingBox.h,P=0;P<F.Shapes.length;P++){var r=-F.Shapes[P],q=r.FillColor,Z=r.StrokeColor,aa=r.LineWidth,V=r.Points,wa=r.Lines,ja=['<shape strokewidth="inherit"><foreground>'];ja.push("<path>");for(var na=null,ra=0;ra<wa.length;ra++){var Aa=wa[ra];if(na!=Aa.p1){var ma=V[Aa.p1].x,Ba=V[Aa.p1].y;ma=100*ma/t;Ba=100*Ba/e;ma=Math.round(100*ma)/100;Ba=Math.round(100*Ba)/100;ja.push('<move x="'+ma+'" y="'+Ba+'"/>')}if(null!=Aa.n1){var Pa=V[Aa.p2].x,Ca=V[Aa.p2].y,ua=t,Na=e,Ka=new Qd(V[Aa.p1].x/t,V[Aa.p1].y/e,Aa.n1.x/t,Aa.n1.y/e,V[Aa.p2].x/t,V[Aa.p2].y/-e,Aa.n2.x/t,Aa.n2.y/e);if(2<=Ka.getSize()){Ka.getX(0);Ka.getY(0);Ka.getX(1);Ka.getY(1);Pa=Math.round(100*Pa/ua*100)/100;Ca=Math.round(100*Ca/Na*100)/100;ua=[];Na=[];for(var La=[],l=Ka.getSize(),Ia=0;Ia<l-1;Ia+=3)ua.push(new mxPoint(Ka.getX(Ia),Ka.getY(Ia))),Na.push(new mxPoint(Ka.getX(Ia+1),Ka.getY(Ia+1))),Ia<l-2?La.push(new mxPoint(Ka.getX(Ia+2),Ka.getY(Ia+2))):La.push(new mxPoint(Pa,Ca));var bb="";for(Ia=0;Ia<ua.length;Ia++)bb+='<curve x1="'+ua[Ia].x+'" y1="'+ua[Ia].y+'" x2="'+Na[Ia].x+'" y2="'+-Na[Ia].y+'" x3="'+La[Ia].x+'" y3="'+La[Ia].y+'"/>';var Ea=bb}else Ea=void 0;ja.push(Ea)}else ma=V[Aa.p2].x,Ba=V[Aa.p2].y,ma=100*ma/t,Ba=100*Ba/e,ma=Math.round(100*ma)/100,Ba=Math.round(100*Ba)/100,ja.push('<line x="'+ma+'" y="'+Ba+'"/>');na=Aa.p2}ja.push("</path>");ja.push("<fillstroke/>");ja.push("</foreground></shape>");D.push({shapeStencil:"stencil("+Graph.compress(ja.join(""))+")",FillColor:q,LineColor:Z,LineWidth:aa})}LucidImporter.stencilsMap[u]={text:F.Text,w:t,h:e,x:F.BoundingBox.x,y:F.BoundingBox.y,-stencils:D}}catch(Ra){console.log("Stencil parsing error:",Ra)}}function sc(u,F,D,t,e,P,r,q){u=new mxCell("",new mxGeometry(u,F,0,0),"strokeColor=none;fillColor=none;");u.vertex=!0;r.insert(u);P=[u];D=D.clone();q.insertEdge(D,!1);u.insertEdge(D,!0);P.push(D);t.push(e.addCell(D,null,null,null,null))}function fb(u,F,D,t,e,P,r,q,Z){u=new mxCell("",new mxGeometry(u,F,0,0),"strokeColor=none;fillColor=none;");u.vertex=!0;Z.insert(u);D=new mxCell("",new mxGeometry(D,t,0,0),"strokeColor=none;fillColor=none;");-D.vertex=!0;Z.insert(D);q=[D];e=e.clone();u.insertEdge(e,!0);D.insertEdge(e,!1);q.push(e);P.push(r.addCell(e,null,null,null,null))}function Sa(u,F,D,t,e,P){t.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";t.style+=b(t.style,e,P,t);F=m(e);t.vertex=!0;u=new mxCell(F,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+u+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");-u.style+=b(u.style,e,P,u,G);u.geometry.relative=!0;u.geometry.offset=new mxPoint(5,-12);u.vertex=!0;t.insert(u)}function Wa(u,F,D,t,e,P,r,q){e="transparent"!=u?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";P.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";P.style+=b(P.style,r,q,P);P.value=m(r);P.vertex=!0;u=new mxCell(null,new mxGeometry(.5,0,.7*t*F,.7*t*D),e+u+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");-u.geometry.relative=!0;u.geometry.offset=new mxPoint(-F*t*.35,10+(1-D)*t*.35);u.vertex=!0;u.style+=b(u.style,r,q,u,G);P.insert(u)}function Xc(u,F){return null!=u&&null!=F&&(F==mxConstants.STYLE_ALIGN+"Global"&&(F=mxConstants.STYLE_ALIGN),u.includes(";"+F+"=")||u.substring(0,F.length+1)==F+"=")?!0:!1}function Rd(u,F){function D(t){t=Math.round(parseInt("0x"+t)*F).toString(16);return 1==t.length?"0"+t:t}return"#"+D(u.substr(1,2))+D(u.substr(3,2))+D(u.substr(5,2))}function Ie(u,F,D){var t=h(u),e=t.Properties,-P=e.BoundingBox,r=Math.round(.75*P.w),q=Math.round(.75*P.h),Z=Math.round(.75*P.x+wc),aa=Math.round(.75*P.y+xc);null==u.Class||"GCPInputDatabase"!==u.Class&&"GCPInputRecord"!==u.Class&&"GCPInputPayment"!==u.Class&&"GCPInputGateway"!==u.Class&&"GCPInputLocalCompute"!==u.Class&&"GCPInputBeacon"!==u.Class&&"GCPInputStorage"!==u.Class&&"GCPInputList"!==u.Class&&"GCPInputStream"!==u.Class&&"GCPInputMobileDevices"!==u.Class&&"GCPInputCircuitBoard"!==u.Class&&"GCPInputLive"!==u.Class&&"GCPInputUsers"!==u.Class&&-"GCPInputLaptop"!==u.Class&&"GCPInputApplication"!==u.Class&&"GCPInputLightbulb"!==u.Class&&"GCPInputGame"!==u.Class&&"GCPInputDesktop"!==u.Class&&"GCPInputDesktopAndMobile"!==u.Class&&"GCPInputWebcam"!==u.Class&&"GCPInputSpeaker"!==u.Class&&"GCPInputRetail"!==u.Class&&"GCPInputReport"!==u.Class&&"GCPInputPhone"!==u.Class&&"GCPInputBlank"!==u.Class||(q+=20);v=new mxCell("",new mxGeometry(Z,aa,r,q),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;v.zOrder=e.ZOrder;var V=null!=u.Class?-u.Class:null!=t?t.Class:null;switch(V){case "BraceNoteBlock":case "UI2BraceNoteBlock":var wa=!1;null!=e.BraceDirection&&"Right"==e.BraceDirection&&(wa=!0);var ja=null,na=null,ra=m(e),Aa=e.Rotation?mxUtils.getSizeForString(ra.replace(/\n/g,"<br>"),null,null,Math.abs(r-.125*q)):{width:0,height:0};wa?(ja=new mxCell("",new mxGeometry(r-.125*q,0,.125*q,q),"shape=curlyBracket;rounded=1;"),na=new mxCell("",new mxGeometry(Aa.height,-2*Aa.width,r-.125*q,q),"strokeColor=none;fillColor=none;")):(ja=new mxCell("",-new mxGeometry(0,0,.125*q,q),"shape=curlyBracket;rounded=1;flipH=1;"),na=new mxCell("",new mxGeometry(.125*q-Aa.height,Aa.width,r-.125*q,q),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);ja.vertex=!0;v.insert(ja);ja.style+=b(ja.style,e,t,ja);na.vertex=!0;na.value=ra;v.insert(na);na.style+=b(na.style,e,t,na,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var ma=-"MainText",Ba=null,Pa="HeaderFill_",Ca="BodyFill_",ua=25,Na=25,Ka=0;if(null!=e.Lanes)Ka=e.Lanes.length;else if(null!=e.PrimaryLane){var La=function(gb){if(gb)32>gb?gb=32:208<gb&&(gb=208);else return 0;return.75*gb};Ka=e.PrimaryLane.length;for(var l=q=r=0;l<Ka;l++)r+=e.PrimaryLane[l];for(l=0;l<e.SecondaryLane.length;l++)q+=e.SecondaryLane[l];ua=La(e.PrimaryPoolTitleHeight);Na=La(e.PrimaryLaneTitleHeight);r*=.75;q=.75*q+ua+Na;v.geometry.width=r;v.geometry.height=q;ma="poolPrimaryTitleKey";Pa="PrimaryLaneHeaderFill_";+function P(la){var Ma="";do{var ya=Ca.pop();if(!la&&Na&&("ul"==ya||"ol"==ya)){Ca.push(ya);break}Ma+="</"+ya+">"}while(0<Ca.length);return Ma}function r(la,Ma,ya,za){la=la?la.substring(Ma,ya):"";Na&&(la=la.trim());0==Ba.length&&0<la.length&&(la=e({dummy:1})+la);la=la.replace(/</g,"<").replace(/>/g,">");do for(Ma=Pa.pop(),ya=0;ya<Ma;ya++){var Pb=Ba.pop();la+="</"+Pb+">"}while(za&&0<Ba.length);return la}var p={a:!0,il:!0,ir:!0,mt:!0,mb:!0,p:!0,t:!0,l:!0},Z={lk:!0,s:!0,c:!0,b:!0,fc:!0,i:!0,u:!0,+k:!0,f:!0,ac:!0};F.sort(function(la,Ma){return la.s-Ma.s});var aa=F.filter(function(la){return Z[la.n]});aa[0]&&0!=aa[0].s&&aa.unshift({s:0,n:"dummy",v:"",e:aa[0].s});F=F.filter(function(la){return p[la.n]});for(var V=[0],wa=0;0<(wa=w.indexOf("\n",wa));)wa++,V.push(wa);for(var ja=wa=0;ja<F.length;ja++){if(F[ja].s>V[wa])F.splice(ja,0,{s:V[wa],n:"a",v:D.TextAlign||"center"});else{for(var na=0;ja+na<F.length&&F[ja+na].s==V[wa];)na++;1<na&&(ja+=na-1)}wa++}null!=V[wa]&&F.push({s:V[wa],n:"a",v:D.TextAlign||+"center"});V="";var ra=aa.slice();ra.sort(function(la,Ma){return la.e-Ma.e});var Aa=ja=0;wa=0;na={};for(var ma={},Ba=[],Pa=[],Ca=[],ua=!1,Na=!1,Ka,La=0,l=0,Ia=w.length,bb=!0;wa<F.length||bb;){bb=!1;if(wa<F.length){var Ea=F[wa],Ra=F[wa].s;ua&&(ma={},V+=r(w,La,Ia,!0),l=La=Ia,V+=P());for(;null!=Ea&&Ea.s==Ra;)ma[Ea.n]=Ea,Ea=F[++wa];Ia=null!=Ea?Ea.s:w.length;V+=u(ma,na);ua&&(V+=e(na));ua=!0}for(;ja>=Aa&&(ja<aa.length||Aa<ra.length);)if(Ea=aa[ja],Ra=ra[Aa],Ea&&Ra&&Ea.s<Ra.e){if(Ea.s>=Ia)break;La=Ea.s;0<+La-l&&(V+=e(na)+r(w,l,La),l=La);for(;null!=Ea&&Ea.s==La;)na[Ea.n]=Ea,Ea=aa[++ja];V+=e(na)}else if(Ra){if(Ra.e>Ia)break;l=Ra.e;do delete na[Ra.n],Ra=ra[++Aa];while(null!=Ra&&Ra.e==l);V+=r(w,La,l);La=l;0!=Pa.length||null!=Ea&&Ea.s==l||(aa.splice(ja,0,{s:l,n:"dummy",v:""}),ra.splice(Aa,0,{e:Ea?Ea.s:Ia,n:"dummy",v:""}))}else break}V+=r(null,null,null,!0);ua&&(l!=Ia&&(V+=e({dummy:1})+r(w,l,Ia)),V+=P(!0));return V}function m(w,F){G=!1;var D=null!=w.Text&&w.Text.t?w.Text:null!=w.Value&&w.Value.t?w.Value:+null!=w.Lane_0&&w.Lane_0.t?w.Lane_0:null;null==D&&null!=w.State?w.State.t&&(D=w.State):null==D&&null!=w.Note?w.Note.t&&(D=w.Note):null==D&&null!=w.Title?w.Title.t&&(D=w.Title):w.t&&(D=w);null==D&&null!=w.TextAreas?null!=w.TextAreas.Text&&null!=w.TextAreas.Text.Value&&w.TextAreas.Text.Value.t&&(D=w.TextAreas.Text.Value):null==D&&null!=w.t0&&w.t0.t&&(D=w.t0);if(null!=D){if(null!=D.t){var u=D.t;u=u.replace(/\u2028/g,"\n");D=D.m;try{/ /.test(u)&&(LucidImporter.hasUnknownShapes=!0);for(var e=0;e<D.length;e++)if(0<+D[e].s||null!=D[e].e&&D[e].e<u.length||"t"==D[e].n||"ac"==D[e].n||"lk"==D[e].n){G=!0;break}if(G=G||F)return B(u,D,w)}catch(P){console.log(P)}u=u.replace(/</g,"<");return u=u.replace(/>/g,">")}if(null!=D.Value&&null!=D.Value.t)return D.Value.t=D.Value.t.replace(/</g,"<"),D.Value.t=D.Value.t.replace(/>/g,">"),D.Value.t}return""}function h(w){return null!=w.Action?w.Action:w}function c(w){if(null!=w.Text){if(null!=w.Text.m)return w.Text.m}else if(null!=w.TextAreas){if(null!=w.TextAreas.Text&&+null!=w.TextAreas.Text.Value&&null!=w.TextAreas.Text.Value.m)return w.TextAreas.Text.Value.m}else{if(null!=w.m)return w.m;if(null!=w.Title){if(null!=w.Title.m)return w.Title.m}else if(null!=w.State){if(null!=w.State.m)return w.State.m}else if(null!=w.Note&&null!=w.Note.m)return w.Note.m}return null}function a(w,F){w="whiteSpace=wrap;"+(F?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+lb:f(w)+k(w)+q(w)+t(w)+C(w)+I(w)+M(w)+K(w)+Q(w))+S(w)+H(w)+Zb(mxConstants.STYLE_ALIGN,w.TextAlign,"center");lb=+"";return w}function b(w,F,D,u,e,P){P=null==P?!1:P;var r="",p=!1,Z=!1;if(null!=w)if(P){P=w.split(";");w="";for(var aa=0;aa<P.length;aa++)"fillColor=none"==P[aa]?Z=!0:"strokeColor=none"==P[aa]?p=!0:""!=P[aa]&&(w+=P[aa]+";")}else""!=w&&";"!=w.charAt(w.length-1)&&(r=";");r+=(Xc(w,"whiteSpace")?"":"whiteSpace=wrap;")+(e?(Xc(w,"overflow")?"":"overflow=block;blockSpacing=1;")+(Xc(w,"html")?"":"html=1;")+"fontSize=13;"+lb:d(mxConstants.STYLE_FONTSIZE,w,F,D,u)+d(mxConstants.STYLE_FONTFAMILY,w,F,D,u)+d(mxConstants.STYLE_FONTCOLOR,+w,F,D,u)+d(mxConstants.STYLE_FONTSTYLE,w,F,D,u)+d(mxConstants.STYLE_ALIGN,w,F,D,u)+d(mxConstants.STYLE_SPACING_LEFT,w,F,D,u)+d(mxConstants.STYLE_SPACING_RIGHT,w,F,D,u)+d(mxConstants.STYLE_SPACING_TOP,w,F,D,u)+d(mxConstants.STYLE_SPACING_BOTTOM,w,F,D,u))+d(mxConstants.STYLE_ALIGN+"Global",w,F,D,u)+d(mxConstants.STYLE_SPACING,w,F,D,u)+d(mxConstants.STYLE_VERTICAL_ALIGN,w,F,D,u)+d(mxConstants.STYLE_STROKECOLOR,w,F,D,u)+d(mxConstants.STYLE_OPACITY,w,F,D,u)+d(mxConstants.STYLE_ROUNDED,w,F,D,u)+d(mxConstants.STYLE_ROTATION,+w,F,D,u)+d(mxConstants.STYLE_FLIPH,w,F,D,u)+d(mxConstants.STYLE_FLIPV,w,F,D,u)+d(mxConstants.STYLE_SHADOW,w,F,D,u)+d(mxConstants.STYLE_FILLCOLOR,w,F,D,u)+d(mxConstants.STYLE_DASHED,w,F,D,u)+d(mxConstants.STYLE_STROKEWIDTH,w,F,D,u)+d(mxConstants.STYLE_IMAGE,w,F,D,u)+d(mxConstants.STYLE_POINTER_EVENTS,w,F,D,u);Z&&!Xc(r,mxConstants.STYLE_FILLCOLOR)&&(r+="fillColor=none;");p&&!Xc(r,mxConstants.STYLE_STROKECOLOR)&&(r+="strokeColor=none;");lb="";return r}function d(w,F,D,u,e){if(!Xc(F,w))switch(w){case mxConstants.STYLE_FONTSIZE:return f(D);+case mxConstants.STYLE_FONTFAMILY:return k(D);case mxConstants.STYLE_FONTCOLOR:return q(D);case mxConstants.STYLE_FONTSTYLE:return t(D);case mxConstants.STYLE_ALIGN:return C(D);case mxConstants.STYLE_ALIGN+"Global":return Zb(mxConstants.STYLE_ALIGN,D.TextAlign,"center");case mxConstants.STYLE_SPACING_LEFT:return I(D);case mxConstants.STYLE_SPACING_RIGHT:return M(D);case mxConstants.STYLE_SPACING_TOP:return K(D);case mxConstants.STYLE_SPACING_BOTTOM:return Q(D);case mxConstants.STYLE_SPACING:return S(D);+case mxConstants.STYLE_VERTICAL_ALIGN:return H(D);case mxConstants.STYLE_STROKECOLOR:return J(D,u);case mxConstants.STYLE_OPACITY:return O(D,u,e);case mxConstants.STYLE_ROUNDED:return w=!e.edge&&!e.style.includes("rounded")&&null!=D.Rounding&&0<D.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+z(.75*D.Rounding)+";":"",w;case mxConstants.STYLE_ROTATION:return ba(D,u,e);case mxConstants.STYLE_FLIPH:return w=D.FlipX?"flipH=1;":"",w;case mxConstants.STYLE_FLIPV:return w=D.FlipY?"flipV=1;":"",w;case mxConstants.STYLE_SHADOW:return W(D);+case mxConstants.STYLE_FILLCOLOR:return ca(D,u);case mxConstants.STYLE_DASHED:return qa(D);case mxConstants.STYLE_STROKEWIDTH:return sa(D);case mxConstants.STYLE_IMAGE:return Fa(D,u);case mxConstants.STYLE_POINTER_EVENTS:return D.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("s"==D.n&&D.v)return"fontSize="+z(.75*D.v)+";";F++}return"fontSize=13;"}function k(w){var F=c(w);if(null!=F)for(var D=+0;D<F.length;D++)if("f"==F[D].n&&F[D].v){var u=F[D].v;break}!u&&w.Font&&(u=w.Font);y(u);return lb}function n(w){return"ext"==w.tp?w.url:"ml"==w.tp?"mailto:"+w.eml:"pg"==w.tp?"data:page/id,"+(LucidImporter.pageIdsMap[w.id]||0):"c"==w.tp?"data:confluence/id,"+w.ccid:null}function q(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("c"==D.n&&null!=D.v)return w=R(D.v).substring(0,7),"#000000"==w&&(w="default"),mxConstants.STYLE_FONTCOLOR+"="+w+";";F++}return""}function t(w){return A(c(w))}function A(w){if(null!=+w){var F=0,D=!1;if(null!=w)for(var u=0;!D&&u<w.length;){var e=w[u];"b"==e.n?null!=e.v&&e.v&&(D=!0,F+=1):"fc"==e.n&&"Bold"==e.v&&(D=!0,F+=1);u++}D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"i"==e.n&&null!=e.v&&e.v&&(D=!0,F+=2),u++;D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"u"==e.n&&null!=e.v&&e.v&&(D=!0,F+=4),u++;if(0<F)return"fontStyle="+F+";"}return""}function C(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("a"==D.n&&null!=D.v)return"align="+D.v+";";F++}return""}function I(w){w=+c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if(null!=D.v&&"il"==D.n)return"spacingLeft="+z(.75*D.v)+";";F++}return""}function M(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("ir"==D.n&&null!=D.v)return"spacingRight="+z(.75*D.v)+";";F++}return""}function K(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mt"==D.n&&null!=D.v)return"spacingTop="+z(.75*D.v)+";";F++}return""}function Q(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mb"==D.n&&null!=D.v)return"spacingBottom="++z(.75*D.v)+";";F++}return""}function S(w){return"number"===typeof w.InsetMargin?"spacing="+Math.max(0,z(.75*w.InsetMargin))+";":""}function H(w){return null!=w.Text_VAlign&&"string"===typeof w.Text_VAlign?"verticalAlign="+w.Text_VAlign+";":null!=w.Title_VAlign&&"string"===typeof w.Title_VAlign?"verticalAlign="+w.Title_VAlign+";":Zb(mxConstants.STYLE_VERTICAL_ALIGN,w.TextVAlign,"middle")}function J(w,F){return 0==w.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":Zb(mxConstants.STYLE_STROKECOLOR,T(w.LineColor),+"#000000")}function N(w){return null!=w?mxConstants.STYLE_FILLCOLOR+"="+T(w)+";":""}function L(w){return null!=w?"swimlaneFillColor="+T(w)+";":""}function O(w,F,D){F="";if("string"===typeof w.LineColor&&(w.LineColor=R(w.LineColor),7<w.LineColor.length)){var u="0x"+w.LineColor.substring(w.LineColor.length-2,w.LineColor.length);D.style.includes("strokeOpacity")||(F+="strokeOpacity="+Math.round(parseInt(u)/2.55)+";")}"string"===typeof w.FillColor&&(w.FillColor=R(w.FillColor),7<w.FillColor.length&&(w=+"0x"+w.FillColor.substring(w.FillColor.length-2,w.FillColor.length),D.style.includes("fillOpacity")||(F+="fillOpacity="+Math.round(parseInt(w)/2.55)+";")));return F}function ba(w,F,D){var u="";if(null!=w.Rotation){w=mxUtils.toDegree(parseFloat(w.Rotation));var e=!0;0!=w&&F.Class&&("UMLSwimLaneBlockV2"==F.Class||(0<=F.Class.indexOf("Rotated")||-90==w||270==w)&&(0<=F.Class.indexOf("Pool")||0<=F.Class.indexOf("SwimLane")))?(w+=90,D.geometry.rotate90(),D.geometry.isRotated=!0,e=!1):0<=mxUtils.indexOf(vf,+F.Class)?(w-=90,D.geometry.rotate90()):0<=mxUtils.indexOf(wf,F.Class)&&(w+=180);0!=w&&(u+="rotation="+w+";");e||(u+="horizontal=0;")}return u}function W(w){return null!=w.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function R(w){if(w){if("object"===typeof w)try{w=w.cs[0].c}catch(F){console.log(F),w="#ffffff"}"rgb"==w.substring(0,3)?w="#"+w.match(/\d+/g).map(function(F){F=parseInt(F).toString(16);return(1==F.length?"0":"")+F}).join(""):"#"!=w.charAt(0)&&(w="#"+w)}return w}function T(w){return(w=R(w))?+w.substring(0,7):null}function ka(w,F){return(w=R(w))&&7<w.length?F+"="+Math.round(parseInt("0x"+w.substr(7))/2.55)+";":""}function ca(w,F){if(null!=w.FillColor)if("object"===typeof w.FillColor){if(null!=w.FillColor.cs&&1<w.FillColor.cs.length)return Zb(mxConstants.STYLE_FILLCOLOR,T(w.FillColor.cs[0].c))+Zb(mxConstants.STYLE_GRADIENTCOLOR,T(w.FillColor.cs[1].c))}else return"string"===typeof w.FillColor?Zb(mxConstants.STYLE_FILLCOLOR,T(w.FillColor),"#FFFFFF"):Zb(mxConstants.STYLE_FILLCOLOR,"none");+return""}function qa(w){return"dotted"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=1 4;":"dashdot"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 5 1 5;":"dashdotdot"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 5 1 5 1 5;":"dotdotdot"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=1 2;":"longdash"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=16 6;":"dashlongdash"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 6 16 6;":"dashed24"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=3 8;":+"dashed32"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=6 5;":"dashed44"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=8 8;":null!=w.StrokeStyle&&"dashed"==w.StrokeStyle.substring(0,6)?"dashed=1;fixDash=1;":""}function sa(w){return null!=w.LineWidth?Zb(mxConstants.STYLE_STROKEWIDTH,z(.75*parseFloat(w.LineWidth)),"1"):""}function Fa(w,F,D){var u="";w.FillColor&&w.FillColor.url?(D=w.FillColor.url,"fill"==w.FillColor.pos&&(u="imageAspect=0;")):"ImageSearchBlock2"==F.Class?D=w.URL:"UserImage2Block"==+F.Class&&null!=w.ImageFillProps&&null!=w.ImageFillProps.url&&(D=w.ImageFillProps.url);return null!=D?"image="+g(D)+";"+u:""}function pa(w,F,D){null!=F.Link&&0<F.Link.length&&D.setAttributeForCell(w,"link",n(F.Link[0]));null!=F.NoteHint&&F.NoteHint.t&&D.setAttributeForCell(w,"Notes",F.NoteHint.t);var u=[],e=D.convertValueToString(w),P=!1;if(null!=e){for(var r=0;match=xf.exec(e);){var p=match[0];P=!0;if(2<p.length){var Z=p.substring(2,p.length-2);"documentName"==Z?Z="filename":"pageName"==Z?Z="page":+"totalPages"==Z?Z="pagecount":"page"==Z?Z="pagenumber":"date:"==Z.substring(0,5)?Z="date{"+Z.substring(5).replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy")+"}":"lastModifiedTime"==Z.substring(0,16)?Z=Z.replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy"):"i18nDate:"==Z.substring(0,9)&&(Z="date{"+Z.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");Z="%"+Z+"%";u.push(e.substring(r,match.index)+(null!=Z?Z:p));r=+match.index+p.length}}P&&(u.push(e.substring(r)),D.setAttributeForCell(w,"label",u.join("")),D.setAttributeForCell(w,"placeholders","1"))}for(var aa in F)if(F.hasOwnProperty(aa)&&aa.toString().startsWith("ShapeData_"))try{var V=F[aa],wa=mxUtils.trim(V.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Za(w,wa,V.Value,D)}catch(ja){window.console&&console.log("Ignored "+aa+":",ja)}}function Za(w,F,D,u){for(var e=F,P=0;null!=u.getAttributeForCell(w,e);)P++,e=F+"_"+P;u.setAttributeForCell(w,+e,null!=D?D:"")}function Qb(w,F,D,u,e,P){var r=h(F);if(null!=r){var p=Od[r.Class];null!=p?(w.style+=p,";"!=w.style.charAt(w.style.length-1)&&(w.style+=";")):w.edge||(console.log("No mapping found for: "+r.Class),LucidImporter.hasUnknownShapes=!0);p=null!=r.Properties?r.Properties:r;if(null!=p&&(w.value=P?"":m(p),w.style+=b(w.style,p,r,w,G,!0),w.style.includes("strokeColor")||(w.style+=J(p,r)),pa(w,p,D),p.Title&&p.Title.t&&p.Text&&p.Text.t&&"ExtShape"!=r.Class.substr(0,8)&&(D=w.geometry,D=new mxCell(m(p.Title),+new mxGeometry(0,D.height,D.width,10),"strokeColor=none;fillColor=none;"),D.vertex=!0,w.insert(D),D.style+=a(p.Title,G)),w.edge)){w.style=null!=p.Rounding&&"diagonal"!=p.Shape?w.style+("rounded=1;arcSize="+p.Rounding+";"):w.style+"rounded=0;";if(D="curve"==p.Shape)w.style+="curved=1;";else if("diagonal"!=p.Shape)if(null!=p.ElbowPoints&&0<p.ElbowPoints.length)for(w.geometry.points=[],r=0;r<p.ElbowPoints.length;r++)w.geometry.points.push(new mxPoint(Math.round(.75*p.ElbowPoints[r].x+wc),Math.round(.75*+p.ElbowPoints[r].y+xc)));else if("elbow"==p.Shape||null!=p.Endpoint1.Block&&null!=p.Endpoint2.Block)w.style+="edgeStyle=orthogonalEdgeStyle;";if(p.LineJumps||LucidImporter.globalProps.LineJumps)w.style+="jumpStyle=arc;";null!=p.Endpoint1.Style&&(P=Ee[p.Endpoint1.Style],null!=P?(P=P.replace(/xyz/g,"start"),w.style+="startArrow="+P+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+p.Endpoint1.Style)));null!=p.Endpoint2.Style&&(P=Ee[p.Endpoint2.Style],null!=+P?(P=P.replace(/xyz/g,"end"),w.style+="endArrow="+P+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+p.Endpoint2.Style)));P=null!=p.ElbowControlPoints&&0<p.ElbowControlPoints.length?p.ElbowControlPoints:p.Joints;if(D&&null!=p.BezierJoints&&0<p.BezierJoints.length){P=[];D=p.BezierJoints[p.BezierJoints.length-1];D.p.x=p.Endpoint2.x;D.p.y=p.Endpoint2.y;for(r=0;r<p.BezierJoints.length;r++)D=p.BezierJoints[r],P.push({x:D.p.x+D.nt.x*D.lcps*.75,y:D.p.y+D.nt.y*+D.lcps*.75}),P.push({x:D.p.x+D.nt.x*D.rcps*.75,y:D.p.y+D.nt.y*D.rcps*.75});P=P.slice(1,P.length-1)}else D&&(P=[],P.push({x:p.Endpoint1.x+(.1>p.Endpoint1.LinkX?-250:.9<p.Endpoint1.LinkX?250:0),y:p.Endpoint1.y+(.1>p.Endpoint1.LinkY?-250:.9<p.Endpoint1.LinkY?250:0)}),P.push({x:p.Endpoint2.x+(.1>p.Endpoint2.LinkX?-250:.9<p.Endpoint2.LinkX?250:0),y:p.Endpoint2.y+(.1>p.Endpoint2.LinkY?-250:.9<p.Endpoint2.LinkY?250:0)}));if(null!=P)for(w.geometry.points=[],r=0;r<P.length;r++)D=P[r].p?P[r].p:P[r],w.geometry.points.push(new mxPoint(Math.round(.75*+D.x+wc),Math.round(.75*D.y+xc)));D=!1;if((null==w.geometry.points||0==w.geometry.points.length)&&null!=p.Endpoint1.Block&&p.Endpoint1.Block==p.Endpoint2.Block&&null!=u&&null!=e){D=new mxPoint(Math.round(u.geometry.x+u.geometry.width*p.Endpoint1.LinkX),Math.round(u.geometry.y+u.geometry.height*p.Endpoint1.LinkY));P=new mxPoint(Math.round(e.geometry.x+e.geometry.width*p.Endpoint2.LinkX),Math.round(e.geometry.y+e.geometry.height*p.Endpoint2.LinkY));wc=D.x==P.x?Math.abs(D.x-u.geometry.x)<u.geometry.width/+2?-20:20:0;xc=D.y==P.y?Math.abs(D.y-u.geometry.y)<u.geometry.height/2?-20:20:0;var Z=new mxPoint(D.x+wc,D.y+xc),aa=new mxPoint(P.x+wc,P.y+xc);Z.generated=!0;aa.generated=!0;w.geometry.points=[Z,aa];D=D.x==P.x}null!=u&&u.geometry.isRotated||(Z=Fe(w,p.Endpoint1,!0,D,null,u));null!=u&&null!=Z&&(null==u.stylePoints&&(u.stylePoints=[]),u.stylePoints.push(Z),LucidImporter.stylePointsSet.add(u));null!=e&&e.geometry.isRotated||(aa=Fe(w,p.Endpoint2,!1,D,null,e));null!=e&&null!=aa&&(null==e.stylePoints&&(e.stylePoints=+[]),e.stylePoints.push(aa),LucidImporter.stylePointsSet.add(e))}}null!=F.id&&(w.style+=";lucidId="+F.id+";");w.lucidchartObject=F}function vb(w,F){var D=h(w).Properties,u=D.BoundingBox;null==w.Class||"AWS"!==w.Class.substring(0,3)&&"Amazon"!==w.Class.substring(0,6)||w.Class.includes("AWS19")||(u.h-=20);v=new mxCell("",new mxGeometry(Math.round(.75*u.x+wc),Math.round(.75*u.y+xc),Math.round(.75*u.w),Math.round(.75*u.h)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;Qb(v,w,F);+v.zOrder=D.ZOrder;Ge(v,D);D.Hidden&&(v.visible=!1);return v}function yf(w,F,D,u){var e=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");e.geometry.relative=!0;e.edge=!0;Qb(e,w,F,D,u,!0);var P=h(w).Properties,r=null!=P?P.TextAreas:w.TextAreas;if(null!=r){for(var p=0;void 0!==r["t"+p];){var Z=r["t"+p];null!=Z&&(e=Pd(Z,e,w,D,u,F));p++}for(p=0;void 0!==r["m"+p]||1>p;)Z=r["m"+p],null!=Z&&(e=Pd(Z,e,w,D,u,F)),p++;null!=r.Text&&(e=Pd(r.Text,e,w,D,u,F));r=null!=P?P.TextAreas:w.TextAreas;null!=+r.Message&&(e=Pd(r.Message,e,w,D,u,F))}w.Hidden&&(e.visible=!1);return e}function Pd(w,F,D,u,e,P){var r=2*(parseFloat(w.Location)-.5);isNaN(r)&&null!=w.Text&&null!=w.Text.Location&&(r=2*(parseFloat(w.Text.Location)-.5));P=m(w);var p=mxCell;r=new mxGeometry(isNaN(r)?0:r,0,0,0);var Z=ge;var aa=D;if(G)aa=lb;else{var V="13",wa="";if(null!=w&&null!=w.Value&&null!=w.Value.m){wa=A(w.Value.m);for(var ja=0;ja<w.Value.m.length;ja++)if("s"==w.Value.m[ja].n&&w.Value.m[ja].v)V=z(.75*parseFloat(w.Value.m[ja].v));+else if("c"==w.Value.m[ja].n){var na=R(w.Value.m[ja].v);null!=na&&(na=na.substring(0,7));"#000000"==na&&(na="default");wa+="fontColor="+na+";"}wa+=k(aa);lb=""}aa=wa+";fontSize="+V+";"}p=new p(P,r,Z+aa);p.geometry.relative=!0;p.vertex=!0;if(w.Side)try{D.Action&&D.Action.Properties&&(D=D.Action.Properties);if(null!=u&&null!=e){var ra=u.geometry,Aa=e.geometry;var ma=Math.abs(ra.x+ra.width*D.Endpoint1.LinkX-(Aa.x+Aa.width*D.Endpoint2.LinkX));var Ba=Math.abs(ra.y+ra.height*D.Endpoint1.LinkY-(Aa.y+Aa.height*+D.Endpoint2.LinkY))}else ma=Math.abs(D.Endpoint1.x-D.Endpoint2.x),Ba=Math.abs(D.Endpoint1.y-D.Endpoint2.y);var Pa=mxUtils.getSizeForString(P.replace(/\n/g,"<br>"));p.geometry.offset=0==ma||ma<Ba?new mxPoint(Math.sign(D.Endpoint1.y-D.Endpoint2.y)*w.Side*(Pa.width/2+5+ma),0):new mxPoint(0,Math.sign(D.Endpoint2.x-D.Endpoint1.x)*w.Side*(Pa.height/2+5+Ba))}catch(Ca){console.log(Ca)}p.lucidchartObject=w;F.insert(p);return F}function Zb(w,F,D,u){null!=F&&null!=u&&(F=u(F));return null!=F&&F!=D?w+"="+F+";":+""}function Fe(w,F,D,u,e,P){if(null!=F&&null!=F.LinkX&&null!=F.LinkY&&(F.LinkX=Math.round(1E3*F.LinkX)/1E3,F.LinkY=Math.round(1E3*F.LinkY)/1E3,null!=P&&P.style&&-1<P.style.indexOf("flipH=1")&&(F.LinkX=1-F.LinkX),null!=P&&P.style&&-1<P.style.indexOf("flipV=1")&&(F.LinkY=1-F.LinkY),w.style+=(u?"":(D?"exitX":"entryX")+"="+F.LinkX+";")+(e?"":(D?"exitY":"entryY")+"="+F.LinkY+";")+(D?"exitPerimeter":"entryPerimeter")+"=0;",F.Inside))return"["+F.LinkX+","+F.LinkY+",0]"}function He(w,F,D,u,e){try{var P=function(ma,+Ba){if(null!=ma)if(Array.isArray(ma))for(var Pa=0;Pa<ma.length;Pa++)P(ma[Pa].p?ma[Pa].p:ma[Pa],Ba);else Ba=Ba?.75:1,p=Math.min(p,ma.x*Ba),Z=Math.min(Z,ma.y*Ba),aa=Math.max(aa,(ma.x+(ma.width?ma.width:0))*Ba),V=Math.max(V,(ma.y+(ma.height?ma.height:0))*Ba)};null!=w.Action&&null!=w.Action.Properties&&(w=w.Action.Properties);var r=new mxCell("",new mxGeometry,"group;dropTarget=0;pointerEvents=0;");r.vertex=!0;r.zOrder=w.ZOrder;var p=Infinity,Z=Infinity,aa=-Infinity,V=-Infinity,wa=w.Members;e=[];for(var ja in wa){var na=+F[ja];null!=na?e.push(na):null!=u[ja]&&(e.push(u[ja]),D[ja]=r)}e.sort(function(ma,Ba){ma=ma.zOrder||ma.ZOrder;Ba=Ba.zOrder||Ba.ZOrder;return null!=ma&&null!=Ba?ma>Ba?1:ma<Ba?-1:0:0});for(D=F=0;D<e.length;D++)if(na=e[D],na.vertex)P(na.geometry),na.parent=r,r.insert(na,F++);else{var ra=null!=na.Action&&na.Action.Properties?na.Action.Properties:na;P(ra.Endpoint1,!0);P(ra.Endpoint2,!0);P(ra.ElbowPoints,!0);P(ra.ElbowControlPoints,!0);P(ra.BezierJoints,!0);P(ra.Joints,!0)}r.geometry.x=p;r.geometry.y=Z;+r.geometry.width=aa-p;r.geometry.height=V-Z;if(null!=r.children)for(D=0;D<r.children.length;D++){var Aa=r.children[D].geometry;Aa.x-=p;Aa.y-=Z}w.IsState?(r.lucidLayerInfo={name:w.Name,visible:!w.Hidden,locked:w.Restrictions.b&&w.Restrictions.p&&w.Restrictions.c},r.style+="container=1;collapsible=0;recursiveResize=0;"):w.Hidden&&(r.visible=!1);r.lucidchartObject=w;return r}catch(ma){console.log(ma)}}function zf(w,F,D){LucidImporter.hasMath=!1;LucidImporter.stylePointsSet=new Set;w.getModel().beginUpdate();+try{var u=function(Ca,ua){function Na(Ra,la,Ma){null==Ra||Ra.generated||(Ra.x-=la,Ra.y-=Ma)}var Ka=null!=ua.Endpoint1.Block?P[ua.Endpoint1.Block]:null,La=null!=ua.Endpoint2.Block?P[ua.Endpoint2.Block]:null,l=yf(Ca,w,Ka,La);if(ua.Endpoint1&&ua.Endpoint1.Line||ua.Endpoint2&&ua.Endpoint2.Line)console.log("Edge to Edge case"),LucidImporter.hasUnknownShapes=!0;null==Ka&&null!=ua.Endpoint1&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.75*ua.Endpoint1.x),Math.round(.75*ua.Endpoint1.y)),!0);null==+La&&null!=ua.Endpoint2&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.75*ua.Endpoint2.x),Math.round(.75*ua.Endpoint2.y)),!1);Ca=r[Ca.id];if(null!=Ca){for(var Ia=l.geometry,bb=ua=0,Ea=Ca;null!=Ea&&null!=Ea.geometry;)ua+=Ea.geometry.x,bb+=Ea.geometry.y,Ea=Ea.parent;Na(Ia.sourcePoint,ua,bb);Na(Ia.targetPoint,ua,bb);Na(Ia.offset,ua,bb);Ia=Ia.points;if(null!=Ia)for(Ea=0;Ea<Ia.length;Ea++)Na(Ia[Ea],ua,bb)}e.push(w.addCell(l,Ca,null,Ka,La))},e=[],P={},r={},p={},Z=[];null!=F.Lines&&(p=F.Lines);if(null!=+F.Blocks){Object.assign(p,F.Blocks);for(var aa in F.Blocks){var V=F.Blocks[aa];V.id=aa;var wa=!1;null!=Od[V.Class]&&"mxCompositeShape"==Od[V.Class]&&(P[V.id]=Ie(V,e,w),Z.push(V),wa=!0);wa||(P[V.id]=vb(V,w),Z.push(V))}if(null!=F.Generators)for(aa in F.Generators)"OrgChart2018"==F.Generators[aa].ClassName?(LucidImporter.hasUnknownShapes=!0,Je(aa,F.Generators[aa],F.Data,w,P)):LucidImporter.hasUnknownShapes=!0}else{for(var ja=0;ja<F.Objects.length;ja++)V=F.Objects[ja],p[V.id]=V,null!=V.Action&&"mxCompositeShape"==+Od[V.Action.Class]?P[V.id]=Ie(V,e,w):V.IsBlock&&null!=V.Action&&null!=V.Action.Properties?P[V.id]=vb(V,w):V.IsGenerator&&V.GeneratorData&&V.GeneratorData.p&&("OrgChart2018"==V.GeneratorData.p.ClassName?(LucidImporter.hasUnknownShapes=!0,Je(V.GeneratorData.id,V.GeneratorData.p,V.GeneratorData.gs,w,P)):LucidImporter.hasUnknownShapes=!0),Z.push(V);for(ja=0;ja<F.Objects.length;ja++)if(V=F.Objects[ja],V.IsGroup){var na=He(V,P,r,p,w);na&&(P[V.id]=na,Z.push(V))}}if(null!=F.Groups)try{for(aa in F.Groups)if(V=+F.Groups[aa],V.id=aa,na=He(V,P,r,p,w))P[V.id]=na,Z.push(V)}catch(Ca){console.log(Ca)}if(null!=F.Lines)for(aa in F.Lines)V=F.Lines[aa],V.id=aa,Z.push(V);Z.sort(function(Ca,ua){Ca=h(Ca);ua=h(ua);Ca=null!=Ca.Properties?Ca.Properties.ZOrder:Ca.ZOrder;ua=null!=ua.Properties?ua.Properties.ZOrder:ua.ZOrder;return null!=Ca&&null!=ua?Ca>ua?1:Ca<ua?-1:0:0});for(ja=0;ja<Z.length;ja++){V=Z[ja];var ra=P[V.id];if(null!=ra){if(null==ra.parent)if(ra.lucidLayerInfo){var Aa=new mxCell;w.addCell(Aa,w.model.root);Aa.setVisible(ra.lucidLayerInfo.visible);+ra.lucidLayerInfo.locked&&Aa.setStyle("locked=1;");Aa.setValue(ra.lucidLayerInfo.name);delete ra.lucidLayerInfo;w.addCell(ra,Aa)}else e.push(w.addCell(ra))}else V.IsLine&&null!=V.Action&&null!=V.Action.Properties?u(V,V.Action.Properties):null!=V.StrokeStyle&&u(V,V)}LucidImporter.stylePointsSet.forEach(function(Ca){Ca.style="points=["+Ca.stylePoints.join(",")+"];"+Ca.style;delete Ca.stylePoints});try{var ma=w.getModel().cells;w.view.validate();for(var Ba in ma){var Pa=ma[Ba];null!=Pa&&(Af(w,Pa),Bf(w,+Pa),Cf(w,Pa),"1"==urlParams.lucidchartObject&&null!=Pa.lucidchartObject&&Za(Pa,"lucidchartObject",JSON.stringify(Pa.lucidchartObject,null,2),w),delete Pa.lucidchartObject,delete Pa.zOrder)}}catch(Ca){console.log(Ca)}D||w.setSelectionCells(e)}finally{w.getModel().endUpdate()}}function Cf(w,F){if(w.model.contains(F)&&F.edge){var D=w.view.getState(F);if(null!=D&&null!=F.children){var u=mxRectangle.fromRectangle(D.paintBounds);u.grow(5);for(var e=0;e<F.children.length;e++){var P=w.view.getState(F.children[e]);+null==P||mxUtils.contains(u,P.paintBounds.x,P.paintBounds.y)||(P.cell.geometry.offset=new mxPoint(0,0))}}w=F.lucidchartObject;null!=w&&"elbow"==w.Shape&&null==w.ElbowControlPoints&&null==w.ElbowPoints&&null!=D.style.exitX&&null!=D.style.exitY&&null!=D.style.entryX&&null!=D.style.entryY&&(F.style=mxUtils.setStyle(F.style,"exitX",Math.round(20*D.style.exitX)/20),F.style=mxUtils.setStyle(F.style,"exitY",Math.round(20*D.style.exitY)/20),F.style=mxUtils.setStyle(F.style,"entryX",Math.round(20*D.style.entryX)/+20),F.style=mxUtils.setStyle(F.style,"entryY",Math.round(20*D.style.entryY)/20))}}function Bf(w,F){if(w.model.contains(F)&&null!=F.style&&""!=F.style){w=F.style.split(";");for(var D={},u=[],e=w.length-1;0<=e;e--){var P=w[e].split("=");if(2!=P.length||null==D[P[0]])D[P[0]]=P[1],""!=w[e]&&u.push(w[e])}F.style=u.reverse().join(";")+";"}}function Af(w,F){if(w.model.contains(F)&&null!=F.children&&null!=F.geometry&&F.vertex&&"group;dropTarget=0;pointerEvents=0;"==F.style){for(var D=null,u=0;u<F.children.length;u++)if(F.children[u].vertex){var e=+F.children[u].geometry;if(null!=e&&0==e.x&&0==e.y&&e.width==F.geometry.width&&e.height==F.geometry.height){if(null!=D)return;D=F.children[u]}}F=D;if(null!=F&&(D=F.parent,""==w.convertValueToString(D))){if(null!=F.edges)for(u=0;u<F.edges.length;u++)F.edges[u].source==F&&F.edges[u].setTerminal(F.parent,!0),F.edges[u].target==F&&F.edges[u].setTerminal(F.parent,!1);if(null!=F.children&&0<F.children.length)for(e=F.children.slice(),u=0;u<e.length;u++)D.insert(e[u]);w.cellLabelChanged(D,w.convertValueToString(F));+D.style=mxUtils.setStyle(mxUtils.setStyle(F.style,"container","1"),"collapsible","0");F.removeFromParent()}}}function Df(){var w=new Graph;w.setExtendParents(!1);w.setExtendParentsOnAdd(!1);w.setConstrainChildren(!1);w.setHtmlLabels(!0);w.getModel().maintainEdgeParent=!1;return w}function Qd(w,F,D,u,e,P,r,p){this.nurbsValues=[1,3,0,0,100*(w+D),100-100*(1-(F+u)),0,1,100*(e+r),100-100*(1-(P+p)),0,1]}function Ke(w,F){try{for(var D=[],u=F.BoundingBox.w,e=F.BoundingBox.h,P=0;P<F.Shapes.length;P++){var r=+F.Shapes[P],p=r.FillColor,Z=r.StrokeColor,aa=r.LineWidth,V=r.Points,wa=r.Lines,ja=['<shape strokewidth="inherit"><foreground>'];ja.push("<path>");for(var na=null,ra=0;ra<wa.length;ra++){var Aa=wa[ra];if(na!=Aa.p1){var ma=V[Aa.p1].x,Ba=V[Aa.p1].y;ma=100*ma/u;Ba=100*Ba/e;ma=Math.round(100*ma)/100;Ba=Math.round(100*Ba)/100;ja.push('<move x="'+ma+'" y="'+Ba+'"/>')}if(null!=Aa.n1){var Pa=V[Aa.p2].x,Ca=V[Aa.p2].y,ua=u,Na=e,Ka=new Qd(V[Aa.p1].x/u,V[Aa.p1].y/e,Aa.n1.x/u,Aa.n1.y/e,V[Aa.p2].x/u,V[Aa.p2].y/+e,Aa.n2.x/u,Aa.n2.y/e);if(2<=Ka.getSize()){Ka.getX(0);Ka.getY(0);Ka.getX(1);Ka.getY(1);Pa=Math.round(100*Pa/ua*100)/100;Ca=Math.round(100*Ca/Na*100)/100;ua=[];Na=[];for(var La=[],l=Ka.getSize(),Ia=0;Ia<l-1;Ia+=3)ua.push(new mxPoint(Ka.getX(Ia),Ka.getY(Ia))),Na.push(new mxPoint(Ka.getX(Ia+1),Ka.getY(Ia+1))),Ia<l-2?La.push(new mxPoint(Ka.getX(Ia+2),Ka.getY(Ia+2))):La.push(new mxPoint(Pa,Ca));var bb="";for(Ia=0;Ia<ua.length;Ia++)bb+='<curve x1="'+ua[Ia].x+'" y1="'+ua[Ia].y+'" x2="'+Na[Ia].x+'" y2="'++Na[Ia].y+'" x3="'+La[Ia].x+'" y3="'+La[Ia].y+'"/>';var Ea=bb}else Ea=void 0;ja.push(Ea)}else ma=V[Aa.p2].x,Ba=V[Aa.p2].y,ma=100*ma/u,Ba=100*Ba/e,ma=Math.round(100*ma)/100,Ba=Math.round(100*Ba)/100,ja.push('<line x="'+ma+'" y="'+Ba+'"/>');na=Aa.p2}ja.push("</path>");ja.push("<fillstroke/>");ja.push("</foreground></shape>");D.push({shapeStencil:"stencil("+Graph.compress(ja.join(""))+")",FillColor:p,LineColor:Z,LineWidth:aa})}LucidImporter.stencilsMap[w]={text:F.Text,w:u,h:e,x:F.BoundingBox.x,y:F.BoundingBox.y,+stencils:D}}catch(Ra){console.log("Stencil parsing error:",Ra)}}function sc(w,F,D,u,e,P,r,p){w=new mxCell("",new mxGeometry(w,F,0,0),"strokeColor=none;fillColor=none;");w.vertex=!0;r.insert(w);P=[w];D=D.clone();p.insertEdge(D,!1);w.insertEdge(D,!0);P.push(D);u.push(e.addCell(D,null,null,null,null))}function fb(w,F,D,u,e,P,r,p,Z){w=new mxCell("",new mxGeometry(w,F,0,0),"strokeColor=none;fillColor=none;");w.vertex=!0;Z.insert(w);D=new mxCell("",new mxGeometry(D,u,0,0),"strokeColor=none;fillColor=none;");+D.vertex=!0;Z.insert(D);p=[D];e=e.clone();w.insertEdge(e,!0);D.insertEdge(e,!1);p.push(e);P.push(r.addCell(e,null,null,null,null))}function Sa(w,F,D,u,e,P){u.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";u.style+=b(u.style,e,P,u);F=m(e);u.vertex=!0;w=new mxCell(F,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+w+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");+w.style+=b(w.style,e,P,w,G);w.geometry.relative=!0;w.geometry.offset=new mxPoint(5,-12);w.vertex=!0;u.insert(w)}function Wa(w,F,D,u,e,P,r,p){e="transparent"!=w?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";P.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";P.style+=b(P.style,r,p,P);P.value=m(r);P.vertex=!0;w=new mxCell(null,new mxGeometry(.5,0,.7*u*F,.7*u*D),e+w+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");+w.geometry.relative=!0;w.geometry.offset=new mxPoint(-F*u*.35,10+(1-D)*u*.35);w.vertex=!0;w.style+=b(w.style,r,p,w,G);P.insert(w)}function Xc(w,F){return null!=w&&null!=F&&(F==mxConstants.STYLE_ALIGN+"Global"&&(F=mxConstants.STYLE_ALIGN),w.includes(";"+F+"=")||w.substring(0,F.length+1)==F+"=")?!0:!1}function Rd(w,F){function D(u){u=Math.round(parseInt("0x"+u)*F).toString(16);return 1==u.length?"0"+u:u}return"#"+D(w.substr(1,2))+D(w.substr(3,2))+D(w.substr(5,2))}function Ie(w,F,D){var u=h(w),e=u.Properties,+P=e.BoundingBox,r=Math.round(.75*P.w),p=Math.round(.75*P.h),Z=Math.round(.75*P.x+wc),aa=Math.round(.75*P.y+xc);null==w.Class||"GCPInputDatabase"!==w.Class&&"GCPInputRecord"!==w.Class&&"GCPInputPayment"!==w.Class&&"GCPInputGateway"!==w.Class&&"GCPInputLocalCompute"!==w.Class&&"GCPInputBeacon"!==w.Class&&"GCPInputStorage"!==w.Class&&"GCPInputList"!==w.Class&&"GCPInputStream"!==w.Class&&"GCPInputMobileDevices"!==w.Class&&"GCPInputCircuitBoard"!==w.Class&&"GCPInputLive"!==w.Class&&"GCPInputUsers"!==w.Class&&+"GCPInputLaptop"!==w.Class&&"GCPInputApplication"!==w.Class&&"GCPInputLightbulb"!==w.Class&&"GCPInputGame"!==w.Class&&"GCPInputDesktop"!==w.Class&&"GCPInputDesktopAndMobile"!==w.Class&&"GCPInputWebcam"!==w.Class&&"GCPInputSpeaker"!==w.Class&&"GCPInputRetail"!==w.Class&&"GCPInputReport"!==w.Class&&"GCPInputPhone"!==w.Class&&"GCPInputBlank"!==w.Class||(p+=20);v=new mxCell("",new mxGeometry(Z,aa,r,p),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;v.zOrder=e.ZOrder;var V=null!=w.Class?+w.Class:null!=u?u.Class:null;switch(V){case "BraceNoteBlock":case "UI2BraceNoteBlock":var wa=!1;null!=e.BraceDirection&&"Right"==e.BraceDirection&&(wa=!0);var ja=null,na=null,ra=m(e),Aa=e.Rotation?mxUtils.getSizeForString(ra.replace(/\n/g,"<br>"),null,null,Math.abs(r-.125*p)):{width:0,height:0};wa?(ja=new mxCell("",new mxGeometry(r-.125*p,0,.125*p,p),"shape=curlyBracket;rounded=1;"),na=new mxCell("",new mxGeometry(Aa.height,-2*Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;")):(ja=new mxCell("",+new mxGeometry(0,0,.125*p,p),"shape=curlyBracket;rounded=1;flipH=1;"),na=new mxCell("",new mxGeometry(.125*p-Aa.height,Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);ja.vertex=!0;v.insert(ja);ja.style+=b(ja.style,e,u,ja);na.vertex=!0;na.value=ra;v.insert(na);na.style+=b(na.style,e,u,na,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var ma=+"MainText",Ba=null,Pa="HeaderFill_",Ca="BodyFill_",ua=25,Na=25,Ka=0;if(null!=e.Lanes)Ka=e.Lanes.length;else if(null!=e.PrimaryLane){var La=function(gb){if(gb)32>gb?gb=32:208<gb&&(gb=208);else return 0;return.75*gb};Ka=e.PrimaryLane.length;for(var l=p=r=0;l<Ka;l++)r+=e.PrimaryLane[l];for(l=0;l<e.SecondaryLane.length;l++)p+=e.SecondaryLane[l];ua=La(e.PrimaryPoolTitleHeight);Na=La(e.PrimaryLaneTitleHeight);r*=.75;p=.75*p+ua+Na;v.geometry.width=r;v.geometry.height=p;ma="poolPrimaryTitleKey";Pa="PrimaryLaneHeaderFill_";Ca="CellFill_0,";Ba=e.PrimaryLaneTextAreaIds;if(null==Ba)for(Ba=[],l=0;l<Ka;l++)Ba.push("Primary_"+l)}if(0==e.IsPrimaryLaneVertical){e.Rotation=-1.5707963267948966;var Ia=v.geometry.x,bb=v.geometry.y}var Ea=0!=e.Rotation,Ra=0<V.indexOf("Pool"),la=0==V.indexOf("BPMN"),Ma=null!=e[ma];v.style=(Ra?"swimlane;startSize="+ua+";":"fillColor=none;strokeColor=none;pointerEvents=0;fontStyle=0;")+"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;"+(Ea?"horizontalStack=0;":-"");v.style+=b(v.style,e,t,v);Ma&&(v.value=m(e[ma]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+lb:f(e[ma])+p(e[ma])+k(e[ma])+x(e[ma])+C(e[ma],v)+J(e[ma])+M(e[ma])+L(e[ma])+Q(e[ma]))+U(e[ma])+H(e[ma]));for(var ya=0,za=[],Pb="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;fontStyle=0;startSize="+Na+";dropTarget=0;rounded=0;"+(Ea?"horizontal=0;":"")+(la?"swimlaneLine=0;fillColor=none;":""),fa=e.Rotation=0;fa<Ka;fa++){if(null==Ba){var xb=parseFloat(e.Lanes[fa].p);-l=parseInt(e.Lanes[fa].tid)||fa;var Va="Lane_"+l}else xb=.75*e.PrimaryLane[fa]/r,l=fa,Va=Ba[fa];var rc=r*ya,vc=Ra?ua:0;za.push(new mxCell("",Ea?new mxGeometry(vc,rc,q-vc,r*xb):new mxGeometry(rc,vc,r*xb,q-vc),Pb));za[fa].vertex=!0;v.insert(za[fa]);za[fa].value=m(e[Va]);za[fa].style+=b(za[fa].style,e,t,za[fa],G)+(G?"fontSize=13;":f(e[Va])+p(e[Va])+x(e[Va])+C(e[Va],za[fa])+J(e[Va])+M(e[Va])+L(e[Va])+Q(e[Va]))+U(e[Va])+H(e[Va])+N(e[Pa+l])+K(e[Ca+l]);ya+=xb}null!=Ia&&(v.geometry.x=Ia,v.geometry.y=bb);-break;case "UMLMultidimensionalSwimlane":var Fb=0,Rb=0,Kb=null,$b=null;if(null!=e.Rows&&null!=e.Columns){Fb=e.Rows.length;Rb=e.Columns.length;var Xa=.75*e.TitleHeight||25,pb=.75*e.TitleWidth||25}else if(null!=e.PrimaryLane&&null!=e.SecondaryLane){Fb=e.SecondaryLane.length;Rb=e.PrimaryLane.length;pb=.75*e.SecondaryLaneTitleHeight||25;Xa=.75*e.PrimaryLaneTitleHeight||25;for(l=q=r=0;l<Fb;l++)q+=e.SecondaryLane[l];for(l=0;l<Rb;l++)r+=e.PrimaryLane[l];r=.75*r+pb;q=.75*q+Xa;v.geometry.width=r;v.geometry.height=-q;Kb=e.SecondaryLaneTextAreaIds;$b=e.PrimaryLaneTextAreaIds}v.style="group;";var Nc=new mxCell("",new mxGeometry(0,Xa,r,q-Xa),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;horizontalStack=0;");Nc.vertex=!0;var Fc=new mxCell("",new mxGeometry(pb,0,r-pb,q),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;");Fc.vertex=!0;v.insert(Nc);-v.insert(Fc);aa=0;var Gc="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;horizontal=0;fontStyle=0;startSize="+pb+";";for(fa=0;fa<Fb;fa++){if(null==Kb){var Sd=.75*parseInt(e.Rows[fa].height);l=parseInt(e.Rows[fa].id)||fa;var Sb="Row_"+l}else Sd=.75*e.SecondaryLane[fa],Sb=Kb[fa];var Hc=new mxCell("",new mxGeometry(0,aa,r,Sd),Gc);aa+=Sd;Hc.vertex=!0;Nc.insert(Hc);Hc.value=m(e[Sb]);Hc.style+=b(Hc.style,e,t,Hc,G)+(G?"fontSize=13;":f(e[Sb])+p(e[Sb])+x(e[Sb])+C(e[Sb],-Hc)+J(e[Sb])+M(e[Sb])+L(e[Sb])+Q(e[Sb]))+U(e[Sb])+H(e[Sb])}var Ef="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;fontStyle=0;startSize="+Xa+";";for(fa=Z=0;fa<Rb;fa++){if(null==$b){var Yc=.75*parseInt(e.Columns[fa].width);l=parseInt(e.Columns[fa].id)||fa;var Tb="Column_"+l}else Yc=.75*e.PrimaryLane[fa],Tb=$b[fa];var Ic=new mxCell("",new mxGeometry(Z,0,Yc,q),Ef);Z+=Yc;Ic.vertex=!0;Fc.insert(Ic);Ic.value=m(e[Tb]);Ic.style+=b(Ic.style,e,t,Ic,G)+(G?"fontSize=13;":-f(e[Tb])+p(e[Tb])+x(e[Tb])+C(e[Tb],Ic)+J(e[Tb])+M(e[Tb])+L(e[Tb])+Q(e[Tb]))+U(e[Tb])+H(e[Tb])}break;case "UMLStateBlock":if(0==e.Composite)v.style="rounded=1;arcSize=20",v.value=m(e.State,!0),v.style+=b(v.style,e,t,v,G);else{v.style="swimlane;startSize=25;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;rounded=1;arcSize=20;fontStyle=0;";v.value=m(e.State,!0);v.style+=b(v.style,e,t,v,G);v.style+=ca(e,t).replace("fillColor","swimlaneFillColor");var yb=-new mxCell("",new mxGeometry(0,25,r,q-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");yb.value=m(e.Action,!0);yb.style+=b(yb.style,e,t,yb,G);yb.vertex=!0;v.insert(yb)}break;case "GSDFDProcessBlock":var he=Math.round(.75*e.nameHeight);v.style="shape=swimlane;html=1;rounded=1;arcSize=10;collapsible=0;fontStyle=0;startSize="+he;v.value=m(e.Number,!0);v.style+=b(v.style,e,t,v,G);v.style+=ca(e,t).replace("fillColor","swimlaneFillColor");yb=new mxCell("",new mxGeometry(0,he,r,q-he),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");-yb.value=m(e.Text,!0);yb.style+=b(yb.style,e,t,yb,G);yb.vertex=!0;v.insert(yb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var mb=ba(e,t,v);v.style="fillColor=#000000;strokeColor=#000000;";var yc=null,Zc=null,$c=null;if("Tablet"==e.AndroidDeviceName||"Mini Tablet"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Tablet"==e.CustomDeviceType)v.style+="shape=mxgraph.android.tab2;",yc=new mxCell("",new mxGeometry(.112,.077,.77*r,.85*q),mb),e.KeyboardShown&&(Zc=new mxCell("",new mxGeometry(.112,-.727,.77*r,.2*q),"shape=mxgraph.android.keyboard;"+mb)),e.FullScreen||($c=new mxCell("",new mxGeometry(.112,.077,.77*r,.03*q),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*q+";"+mb));else if("Large Phone"==e.AndroidDeviceName||"Phone"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Phone"==e.CustomDeviceType)v.style+="shape=mxgraph.android.phone2;",yc=new mxCell("",new mxGeometry(.04,.092,.92*r,.816*q),mb),e.KeyboardShown&&(Zc=new mxCell("",-new mxGeometry(.04,.708,.92*r,.2*q),"shape=mxgraph.android.keyboard;"+mb)),e.FullScreen||($c=new mxCell("",new mxGeometry(.04,.092,.92*r,.03*q),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*q+";"+mb));yc.vertex=!0;yc.geometry.relative=!0;v.insert(yc);"Dark"==e.Scheme?yc.style+="fillColor=#111111;":"Light"==e.Scheme&&(yc.style+="fillColor=#ffffff;");null!=Zc&&(Zc.vertex=!0,Zc.geometry.relative=!0,v.insert(Zc));null!=$c&&($c.vertex=!0,$c.geometry.relative=-!0,v.insert($c))}v.style+=b(v.style,e,t,v);break;case "AndroidAlertDialog":var ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);var Qa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);var qd=new mxCell("",new mxGeometry(0,30,r,q-30),"strokeColor=none;fillColor=none;verticalAlign=top;");qd.vertex=!0;v.insert(qd);var ib=new mxCell("",new mxGeometry(0,q-25,.5*r,25),"fillColor=none;");-ib.vertex=!0;v.insert(ib);var jb=new mxCell("",new mxGeometry(.5*r,q-25,.5*r,25),"fillColor=none;");jb.vertex=!0;v.insert(jb);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);qd.value=m(e.DialogText);qd.style+=a(e.DialogText,G);ib.value=m(e.Button_0);ib.style+=a(e.Button_0,G);jb.value=m(e.Button_1);jb.style+=a(e.Button_1,G);"Dark"==e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",ib.style+="strokeColor=#353535;",jb.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",-ib.style+="strokeColor=#E2E2E2;",jb.style+="strokeColor=#E2E2E2;");v.style+=b(v.style,e,t,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);Qa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);ib=new mxCell("",new mxGeometry(0,q-25,.5*r,25),"fillColor=none;");ib.vertex=-!0;v.insert(ib);ib.value=m(e.Button_0);ib.style+=a(e.Button_0,G);jb=new mxCell("",new mxGeometry(.5*r,q-25,.5*r,25),"fillColor=none;");jb.vertex=!0;v.insert(jb);jb.value=m(e.Button_1);jb.style+=a(e.Button_1,G);var ad=new mxCell("",new mxGeometry(.5*r-4,41,8,4),"shape=triangle;direction=north;");ad.vertex=!0;v.insert(ad);var bd=new mxCell("",new mxGeometry(.25*r-4,41,8,4),"shape=triangle;direction=north;");bd.vertex=!0;v.insert(bd);var cd=new mxCell("",new mxGeometry(.75*r-4,41,8,4),"shape=triangle;direction=north;");-cd.vertex=!0;v.insert(cd);var rd=new mxCell("",new mxGeometry(.375*r,50,.2*r,15),"strokeColor=none;fillColor=none;");rd.vertex=!0;v.insert(rd);rd.value=m(e.Label_1);rd.style+=a(e.Label_1,G);var sd=new mxCell("",new mxGeometry(.125*r,50,.2*r,15),"strokeColor=none;fillColor=none;");sd.vertex=!0;v.insert(sd);sd.value=m(e.Label_0);sd.style+=a(e.Label_0,G);var dd=null;"AndroidDateDialog"==u.Class&&(dd=new mxCell("",new mxGeometry(.625*r,50,.2*r,15),"strokeColor=none;fillColor=none;"),dd.vertex=!0,v.insert(dd),+"");v.style+=b(v.style,e,u,v);Ma&&(v.value=m(e[ma]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+lb:f(e[ma])+q(e[ma])+k(e[ma])+t(e[ma])+C(e[ma],v)+I(e[ma])+M(e[ma])+K(e[ma])+Q(e[ma]))+S(e[ma])+H(e[ma]));for(var ya=0,za=[],Pb="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;fontStyle=0;startSize="+Na+";dropTarget=0;rounded=0;"+(Ea?"horizontal=0;":"")+(la?"swimlaneLine=0;fillColor=none;":""),fa=e.Rotation=0;fa<Ka;fa++){if(null==Ba){var xb=parseFloat(e.Lanes[fa].p);+l=parseInt(e.Lanes[fa].tid)||fa;var Va="Lane_"+l}else xb=.75*e.PrimaryLane[fa]/r,l=fa,Va=Ba[fa];var rc=r*ya,vc=Ra?ua:0;za.push(new mxCell("",Ea?new mxGeometry(vc,rc,p-vc,r*xb):new mxGeometry(rc,vc,r*xb,p-vc),Pb));za[fa].vertex=!0;v.insert(za[fa]);za[fa].value=m(e[Va]);za[fa].style+=b(za[fa].style,e,u,za[fa],G)+(G?"fontSize=13;":f(e[Va])+q(e[Va])+t(e[Va])+C(e[Va],za[fa])+I(e[Va])+M(e[Va])+K(e[Va])+Q(e[Va]))+S(e[Va])+H(e[Va])+N(e[Pa+l])+L(e[Ca+l]);ya+=xb}null!=Ia&&(v.geometry.x=Ia,v.geometry.y=bb);+break;case "UMLMultidimensionalSwimlane":var Fb=0,Rb=0,Kb=null,$b=null;if(null!=e.Rows&&null!=e.Columns){Fb=e.Rows.length;Rb=e.Columns.length;var Xa=.75*e.TitleHeight||25,pb=.75*e.TitleWidth||25}else if(null!=e.PrimaryLane&&null!=e.SecondaryLane){Fb=e.SecondaryLane.length;Rb=e.PrimaryLane.length;pb=.75*e.SecondaryLaneTitleHeight||25;Xa=.75*e.PrimaryLaneTitleHeight||25;for(l=p=r=0;l<Fb;l++)p+=e.SecondaryLane[l];for(l=0;l<Rb;l++)r+=e.PrimaryLane[l];r=.75*r+pb;p=.75*p+Xa;v.geometry.width=r;v.geometry.height=+p;Kb=e.SecondaryLaneTextAreaIds;$b=e.PrimaryLaneTextAreaIds}v.style="group;";var Nc=new mxCell("",new mxGeometry(0,Xa,r,p-Xa),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;horizontalStack=0;");Nc.vertex=!0;var Fc=new mxCell("",new mxGeometry(pb,0,r-pb,p),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;");Fc.vertex=!0;v.insert(Nc);+v.insert(Fc);aa=0;var Gc="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;horizontal=0;fontStyle=0;startSize="+pb+";";for(fa=0;fa<Fb;fa++){if(null==Kb){var Sd=.75*parseInt(e.Rows[fa].height);l=parseInt(e.Rows[fa].id)||fa;var Sb="Row_"+l}else Sd=.75*e.SecondaryLane[fa],Sb=Kb[fa];var Hc=new mxCell("",new mxGeometry(0,aa,r,Sd),Gc);aa+=Sd;Hc.vertex=!0;Nc.insert(Hc);Hc.value=m(e[Sb]);Hc.style+=b(Hc.style,e,u,Hc,G)+(G?"fontSize=13;":f(e[Sb])+q(e[Sb])+t(e[Sb])+C(e[Sb],+Hc)+I(e[Sb])+M(e[Sb])+K(e[Sb])+Q(e[Sb]))+S(e[Sb])+H(e[Sb])}var Ef="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;fontStyle=0;startSize="+Xa+";";for(fa=Z=0;fa<Rb;fa++){if(null==$b){var Yc=.75*parseInt(e.Columns[fa].width);l=parseInt(e.Columns[fa].id)||fa;var Tb="Column_"+l}else Yc=.75*e.PrimaryLane[fa],Tb=$b[fa];var Ic=new mxCell("",new mxGeometry(Z,0,Yc,p),Ef);Z+=Yc;Ic.vertex=!0;Fc.insert(Ic);Ic.value=m(e[Tb]);Ic.style+=b(Ic.style,e,u,Ic,G)+(G?"fontSize=13;":+f(e[Tb])+q(e[Tb])+t(e[Tb])+C(e[Tb],Ic)+I(e[Tb])+M(e[Tb])+K(e[Tb])+Q(e[Tb]))+S(e[Tb])+H(e[Tb])}break;case "UMLStateBlock":if(0==e.Composite)v.style="rounded=1;arcSize=20",v.value=m(e.State,!0),v.style+=b(v.style,e,u,v,G);else{v.style="swimlane;startSize=25;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;rounded=1;arcSize=20;fontStyle=0;";v.value=m(e.State,!0);v.style+=b(v.style,e,u,v,G);v.style+=ca(e,u).replace("fillColor","swimlaneFillColor");var yb=+new mxCell("",new mxGeometry(0,25,r,p-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");yb.value=m(e.Action,!0);yb.style+=b(yb.style,e,u,yb,G);yb.vertex=!0;v.insert(yb)}break;case "GSDFDProcessBlock":var he=Math.round(.75*e.nameHeight);v.style="shape=swimlane;html=1;rounded=1;arcSize=10;collapsible=0;fontStyle=0;startSize="+he;v.value=m(e.Number,!0);v.style+=b(v.style,e,u,v,G);v.style+=ca(e,u).replace("fillColor","swimlaneFillColor");yb=new mxCell("",new mxGeometry(0,he,r,p-he),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");+yb.value=m(e.Text,!0);yb.style+=b(yb.style,e,u,yb,G);yb.vertex=!0;v.insert(yb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var mb=ba(e,u,v);v.style="fillColor=#000000;strokeColor=#000000;";var yc=null,Zc=null,$c=null;if("Tablet"==e.AndroidDeviceName||"Mini Tablet"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Tablet"==e.CustomDeviceType)v.style+="shape=mxgraph.android.tab2;",yc=new mxCell("",new mxGeometry(.112,.077,.77*r,.85*p),mb),e.KeyboardShown&&(Zc=new mxCell("",new mxGeometry(.112,+.727,.77*r,.2*p),"shape=mxgraph.android.keyboard;"+mb)),e.FullScreen||($c=new mxCell("",new mxGeometry(.112,.077,.77*r,.03*p),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*p+";"+mb));else if("Large Phone"==e.AndroidDeviceName||"Phone"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Phone"==e.CustomDeviceType)v.style+="shape=mxgraph.android.phone2;",yc=new mxCell("",new mxGeometry(.04,.092,.92*r,.816*p),mb),e.KeyboardShown&&(Zc=new mxCell("",+new mxGeometry(.04,.708,.92*r,.2*p),"shape=mxgraph.android.keyboard;"+mb)),e.FullScreen||($c=new mxCell("",new mxGeometry(.04,.092,.92*r,.03*p),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*p+";"+mb));yc.vertex=!0;yc.geometry.relative=!0;v.insert(yc);"Dark"==e.Scheme?yc.style+="fillColor=#111111;":"Light"==e.Scheme&&(yc.style+="fillColor=#ffffff;");null!=Zc&&(Zc.vertex=!0,Zc.geometry.relative=!0,v.insert(Zc));null!=$c&&($c.vertex=!0,$c.geometry.relative=+!0,v.insert($c))}v.style+=b(v.style,e,u,v);break;case "AndroidAlertDialog":var ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);var Qa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);var qd=new mxCell("",new mxGeometry(0,30,r,p-30),"strokeColor=none;fillColor=none;verticalAlign=top;");qd.vertex=!0;v.insert(qd);var ib=new mxCell("",new mxGeometry(0,p-25,.5*r,25),"fillColor=none;");+ib.vertex=!0;v.insert(ib);var jb=new mxCell("",new mxGeometry(.5*r,p-25,.5*r,25),"fillColor=none;");jb.vertex=!0;v.insert(jb);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);qd.value=m(e.DialogText);qd.style+=a(e.DialogText,G);ib.value=m(e.Button_0);ib.style+=a(e.Button_0,G);jb.value=m(e.Button_1);jb.style+=a(e.Button_1,G);"Dark"==e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",ib.style+="strokeColor=#353535;",jb.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",+ib.style+="strokeColor=#E2E2E2;",jb.style+="strokeColor=#E2E2E2;");v.style+=b(v.style,e,u,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);Qa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);ib=new mxCell("",new mxGeometry(0,p-25,.5*r,25),"fillColor=none;");ib.vertex=+!0;v.insert(ib);ib.value=m(e.Button_0);ib.style+=a(e.Button_0,G);jb=new mxCell("",new mxGeometry(.5*r,p-25,.5*r,25),"fillColor=none;");jb.vertex=!0;v.insert(jb);jb.value=m(e.Button_1);jb.style+=a(e.Button_1,G);var ad=new mxCell("",new mxGeometry(.5*r-4,41,8,4),"shape=triangle;direction=north;");ad.vertex=!0;v.insert(ad);var bd=new mxCell("",new mxGeometry(.25*r-4,41,8,4),"shape=triangle;direction=north;");bd.vertex=!0;v.insert(bd);var cd=new mxCell("",new mxGeometry(.75*r-4,41,8,4),"shape=triangle;direction=north;");+cd.vertex=!0;v.insert(cd);var rd=new mxCell("",new mxGeometry(.375*r,50,.2*r,15),"strokeColor=none;fillColor=none;");rd.vertex=!0;v.insert(rd);rd.value=m(e.Label_1);rd.style+=a(e.Label_1,G);var sd=new mxCell("",new mxGeometry(.125*r,50,.2*r,15),"strokeColor=none;fillColor=none;");sd.vertex=!0;v.insert(sd);sd.value=m(e.Label_0);sd.style+=a(e.Label_0,G);var dd=null;"AndroidDateDialog"==w.Class&&(dd=new mxCell("",new mxGeometry(.625*r,50,.2*r,15),"strokeColor=none;fillColor=none;"),dd.vertex=!0,v.insert(dd),dd.value=m(e.Label_2),dd.style+=a(e.Label_2,G));var zb=new mxCell("",new mxGeometry(.43*r,60,.14*r,10),"shape=line;strokeColor=#33B5E5;");zb.vertex=!0;v.insert(zb);var Ab=new mxCell("",new mxGeometry(.18*r,60,.14*r,10),"shape=line;strokeColor=#33B5E5;");Ab.vertex=!0;v.insert(Ab);var Le=new mxCell("",new mxGeometry(.68*r,60,.14*r,10),"shape=line;strokeColor=#33B5E5;");Le.vertex=!0;v.insert(Le);var td=new mxCell("",new mxGeometry(.375*r,65,.2*r,15),"strokeColor=none;fillColor=none;");td.vertex=!0;v.insert(td);-td.value=m(e.Label_4);td.style+=a(e.Label_4,G);var ed=null;"AndroidTimeDialog"==u.Class&&(ed=new mxCell("",new mxGeometry(.3*r,65,.1*r,15),"strokeColor=none;fillColor=none;"),ed.vertex=!0,v.insert(ed),ed.value=m(e.Label_Colon),ed.style+=a(e.Label_Colon,G));var ud=new mxCell("",new mxGeometry(.125*r,65,.2*r,15),"strokeColor=none;fillColor=none;");ud.vertex=!0;v.insert(ud);ud.value=m(e.Label_3);ud.style+=a(e.Label_3,G);var vd=new mxCell("",new mxGeometry(.625*r,65,.2*r,15),"strokeColor=none;fillColor=none;");+td.value=m(e.Label_4);td.style+=a(e.Label_4,G);var ed=null;"AndroidTimeDialog"==w.Class&&(ed=new mxCell("",new mxGeometry(.3*r,65,.1*r,15),"strokeColor=none;fillColor=none;"),ed.vertex=!0,v.insert(ed),ed.value=m(e.Label_Colon),ed.style+=a(e.Label_Colon,G));var ud=new mxCell("",new mxGeometry(.125*r,65,.2*r,15),"strokeColor=none;fillColor=none;");ud.vertex=!0;v.insert(ud);ud.value=m(e.Label_3);ud.style+=a(e.Label_3,G);var vd=new mxCell("",new mxGeometry(.625*r,65,.2*r,15),"strokeColor=none;fillColor=none;");vd.vertex=!0;v.insert(vd);vd.value=m(e.Label_5);vd.style+=a(e.Label_5,G);var Me=new mxCell("",new mxGeometry(.43*r,75,.14*r,10),"shape=line;strokeColor=#33B5E5;");Me.vertex=!0;v.insert(Me);var Ne=new mxCell("",new mxGeometry(.18*r,75,.14*r,10),"shape=line;strokeColor=#33B5E5;");Ne.vertex=!0;v.insert(Ne);var Oe=new mxCell("",new mxGeometry(.68*r,75,.14*r,10),"shape=line;strokeColor=#33B5E5;");Oe.vertex=!0;v.insert(Oe);var wd=new mxCell("",new mxGeometry(.375*r,80,.2*r,15),"strokeColor=none;fillColor=none;");wd.vertex=!0;v.insert(wd);wd.value=m(e.Label_7);wd.style+=a(e.Label_7,G);var xd=new mxCell("",new mxGeometry(.125*r,80,.2*r,15),"strokeColor=none;fillColor=none;");xd.vertex=!0;v.insert(xd);xd.value=m(e.Label_6);xd.style+=a(e.Label_6,G);var yd=new mxCell("",new mxGeometry(.625*r,80,.2*r,15),"strokeColor=none;fillColor=none;");yd.vertex=!0;v.insert(yd);yd.value=m(e.Label_8);yd.style+=a(e.Label_8,G);var fd=new mxCell("",new mxGeometry(.5*r-4,99,8,4),"shape=triangle;direction=south;");fd.vertex=!0;v.insert(fd);var gd=new mxCell("",new mxGeometry(.25*r-4,99,8,4),"shape=triangle;direction=south;");gd.vertex=!0;v.insert(gd);var hd=new mxCell("",new mxGeometry(.75*r-4,99,8,4),"shape=triangle;direction=south;");hd.vertex=!0;v.insert(hd);"Dark"==e.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",ib.style+="strokeColor=#353535;",jb.style+="strokeColor=#353535;",ad.style+="strokeColor=none;fillColor=#7E7E7E;",bd.style+="strokeColor=none;fillColor=#7E7E7E;",cd.style+="strokeColor=none;fillColor=#7E7E7E;",fd.style+="strokeColor=none;fillColor=#7E7E7E;",gd.style+="strokeColor=none;fillColor=#7E7E7E;",hd.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",ib.style+="strokeColor=#E2E2E2;",jb.style+="strokeColor=#E2E2E2;",ad.style+="strokeColor=none;fillColor=#939393;",bd.style+="strokeColor=none;fillColor=#939393;",cd.style+="strokeColor=none;fillColor=#939393;",fd.style+="strokeColor=none;fillColor=#939393;",gd.style+="strokeColor=none;fillColor=#939393;",-hd.style+="strokeColor=none;fillColor=#939393;");v.style+=b(v.style,e,t,v);break;case "AndroidListItems":var Bb=q,zc=0;if(e.ShowHeader){zc=8;var Oc=new mxCell("",new mxGeometry(0,0,r,zc),"strokeColor=none;fillColor=none;");Oc.vertex=!0;v.insert(Oc);Oc.value=m(e.Header);Oc.style+=a(e.Header,G);Bb-=zc;var Pe=new mxCell("",new mxGeometry(0,zc-2,r,4),"shape=line;strokeColor=#999999;");Pe.vertex=!0;v.insert(Pe)}var bc=parseInt(e.Items);0<bc&&(Bb/=bc);var X=[];Qa=[];for(l=0;l<bc;l++)X[l]=new mxCell("",-new mxGeometry(0,zc+l*Bb,r,Bb),"strokeColor=none;fillColor=none;"),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["Item_"+l]),X[l].style+=a(e["Item_"+l],G),0<l&&(Qa[l]=new mxCell("",new mxGeometry(0,zc+l*Bb-2,r,4),"shape=line;"),Qa[l].vertex=!0,v.insert(Qa[l]),Qa[l].style="Dark"==e.Scheme?Qa[l].style+"strokeColor=#ffffff;":Qa[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=b(v.style,e,t,v);-break;case "AndroidTabs":var cc=parseInt(e.Tabs),Gb=r;0<cc&&(Gb/=cc);var Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,q),"strokeColor=none;fillColor=none;"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=a(e["Tab_"+l],G),0<l&&(Qa[l]=new mxCell("",new mxGeometry(l*Gb-2,.2*q,4,.6*q),"shape=line;direction=north;"),Qa[l].vertex=!0,v.insert(Qa[l]),Qa[l].style="Dark"==e.Scheme?Qa[l].style+"strokeColor=#484848;":Qa[l].style+"strokeColor=#CCCCCC;");var Qe=-new mxCell("",new mxGeometry(e.Selected*Gb+2,q-3,Gb-4,3),"strokeColor=none;fillColor=#33B5E5;");Qe.vertex=!0;v.insert(Qe);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=b(v.style,e,t,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*q),Math.round(r),Math.round(.5*q)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;var zd=new mxCell("",new mxGeometry(0,-0,r*e.BarPosition,Math.round(.5*q)),"strokeColor=none;fillColor=#33B5E5;");zd.vertex=!0;v.insert(zd);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=b(v.style,e,t,v);break;case "AndroidImageBlock":v.style="Dark"==e.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";v.style+=b(v.style,e,-t,v);break;case "AndroidTextBlock":v.style="Dark"==e.Scheme?e.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":e.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=m(e.Label);v.style+=a(e.Label,G);v.style+=b(v.style,e,t,v,G);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(e.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";-break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(e.HighlightShow){var Ac=null;Ac=e.HighlightTop?new mxCell("",new mxGeometry(0,0,r,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,q-2,r,2),"strokeColor=none;");Ac.vertex=!0;v.insert(Ac);switch(e.HighlightColor){case "Blue":Ac.style+="fillColor=#33B5E5;";break;case "Dark Gray":Ac.style+="fillColor=#B0B0B0;";break;case "White":Ac.style+="fillColor=#ffffff;"}}if(e.VlignShow){var id=new mxCell("",-new mxGeometry(20,5,2,q-10),"shape=line;direction=north;");id.vertex=!0;v.insert(id);switch(e.VlignColor){case "Blue":id.style+="strokeColor=#244C5A;";break;case "White":id.style+="strokeColor=#ffffff;"}}v.style+=b(v.style,e,t,v);break;case "AndroidButton":v.value=m(e.Label);v.style+=a(e.Label,G)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==e.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=b(v.style,e,t,v);-break;case "AndroidTextBox":v.value=m(e.Label);v.style+=a(e.Label,G);var Ad=new mxCell("",new mxGeometry(2,q-6,r-4,4),"shape=partialRectangle;top=0;fillColor=none;");Ad.vertex=!0;v.insert(Ad);v.style="Dark"==e.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Ad.style=e.TextFocused?Ad.style+"strokeColor=#33B5E5;":Ad.style+"strokeColor=#A9A9A9;";v.style+=b(v.style,e,t,v);break;case "AndroidRadioButton":var Pc=null;e.Checked&&(Pc=new mxCell("",new mxGeometry(.15*-r,.15*q,.7*r,.7*q),"ellipse;fillColor=#33B5E5;strokeWidth=1;"),Pc.vertex=!0,v.insert(Pc));"Dark"==e.Scheme?(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;strokeColor=#272727;",e.Checked?(Pc.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;fillColor=#ffffff;strokeColor=#5C5C5C;",e.Checked&&(Pc.style+="strokeColor=#999999;"));v.style+=b(v.style,e,t,v);break;case "AndroidCheckBox":var ie=-null;e.Checked&&(ie=new mxCell("",new mxGeometry(.25*r,.05*-q,r,.8*q),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),ie.vertex=!0,v.insert(ie));v.style="Dark"==e.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=b(v.style,e,t,v);break;case "AndroidToggle":v.style="Dark"==e.Scheme?e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":-e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=b(v.style,e,t,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";v.style+=b(v.style,e,t,v);break;case "iOSSegmentedControl":cc=parseInt(e.Tabs);Gb=r;v.style+="strokeColor=none;fillColor=none;";0<cc&&(Gb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,q),-"strokeColor="+e.FillColor+";"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=a(e["Tab_"+l],G),Ta[l].style=e.Selected==l?Ta[l].style+ca(e,t):Ta[l].style+"fillColor=none;";v.style+=b(v.style,e,t,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";v.style+=b(v.style,e,t,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*q),Math.round(r),-Math.round(.5*q)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;zd=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*q)),"strokeColor=none;"+ca(e,t));zd.vertex=!0;v.insert(zd);v.style+=b(v.style,e,t,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=b(v.style,e,t,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var Da=new mxCell(m(e.Text),-new mxGeometry(.35*r,0,.3*r,q),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.Text,G);var Cb=new mxCell(m(e.Carrier),new mxGeometry(.09*r,0,.2*r,q),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.style+=a(e.Carrier,G);v.style+=b(v.style,e,t,v);break;case "iOSSearchBar":v.value=m(e.Search);v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v,G)+a(e.Search,G);var Ja=new mxCell("",new mxGeometry(.3*r,.3*q,.4*q,.4*q),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");-Ja.vertex=!0;v.insert(Ja);break;case "iOSNavBar":v.value=m(e.Title);v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;"+a(e.Title,G);v.style+=b(v.style,e,t,v,G);Da=new mxCell(m(e.LeftText),new mxGeometry(.03*r,0,.3*r,q),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.LeftText,G);Cb=new mxCell(m(e.RightText),new mxGeometry(.65*r,0,.3*r,q),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.style+=a(e.RightText,G);Ja=new mxCell("",new mxGeometry(.02*-r,.2*q,.3*q,.5*q),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Ja.vertex=!0;v.insert(Ja);break;case "iOSTabs":cc=parseInt(e.Tabs);Gb=r;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=b(v.style,e,t,v);0<cc&&(Gb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,q),"strokeColor=none;"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=G?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+-lb:f(e["Tab_"+l])+k(e["Tab_"+l])+p(e["Tab_"+l])+x(e["Tab_"+l])+C(e["Tab_"+l])+J(e["Tab_"+l])+M(e["Tab_"+l])+L(e["Tab_"+l])+Q(e["Tab_"+l])+U(e["Tab_"+l]),Ta[l].style+="verticalAlign=bottom;",Ta[l].style=e.Selected==l?Ta[l].style+"fillColor=#BBBBBB;":Ta[l].style+"fillColor=none;";break;case "iOSDatePicker":var dc=new mxCell("",new mxGeometry(0,0,.5*r,.2*q),"strokeColor=none;fillColor=none;");dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);var ec=new mxCell("",new mxGeometry(.5*-r,0,.15*r,.2*q),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=m(e.Option21);ec.style+=a(e.Option21,G);var fc=new mxCell("",new mxGeometry(.65*r,0,.15*r,.2*q),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);var gc=new mxCell("",new mxGeometry(0,.2*q,.5*r,.2*q),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=m(e.Option12);gc.style+=a(e.Option12,G);var hc=new mxCell("",new mxGeometry(.5*r,.2*-q,.15*r,.2*q),"strokeColor=none;fillColor=none;");hc.vertex=!0;v.insert(hc);hc.value=m(e.Option22);hc.style+=a(e.Option22,G);var ic=new mxCell("",new mxGeometry(.65*r,.2*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);var qb=new mxCell("",new mxGeometry(0,.4*q,.5*r,.2*q),"strokeColor=none;fillColor=none;");qb.vertex=!0;v.insert(qb);qb.value=m(e.Option13);qb.style+=a(e.Option13,G);var rb=new mxCell("",new mxGeometry(.5*r,-.4*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option23);rb.style+=a(e.Option23,G);var jc=new mxCell("",new mxGeometry(.65*r,.4*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=m(e.Option33);jc.style+=a(e.Option33,G);var sb=new mxCell("",new mxGeometry(.8*r,.4*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option43);sb.style+=a(e.Option43,G);var tb=new mxCell("",new mxGeometry(0,-.6*q,.5*r,.2*q),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option14);tb.style+=a(e.Option14,G);var kc=new mxCell("",new mxGeometry(.5*r,.6*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");kc.vertex=!0;v.insert(kc);kc.value=m(e.Option24);kc.style+=a(e.Option24,G);var lc=new mxCell("",new mxGeometry(.65*r,.6*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");lc.vertex=!0;v.insert(lc);lc.value=m(e.Option34);lc.style+=a(e.Option34,G);var mc=new mxCell("",new mxGeometry(.8*-r,.6*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");mc.vertex=!0;v.insert(mc);mc.value=m(e.Option44);mc.style+=a(e.Option44,G);var ub=new mxCell("",new mxGeometry(0,.8*q,.5*r,.2*q),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option15);ub.style+=a(e.Option15,G);var nc=new mxCell("",new mxGeometry(.5*r,.8*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");nc.vertex=!0;v.insert(nc);nc.value=m(e.Option25);nc.style+=a(e.Option25,G);var oc=new mxCell("",new mxGeometry(.65*-r,.8*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);zb=new mxCell("",new mxGeometry(0,.4*q-2,r,4),"shape=line;strokeColor=#888888;");zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(0,.6*q-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);break;case "iOSTimePicker":dc=new mxCell("",new mxGeometry(0,0,.25*r,.2*q),"strokeColor=none;fillColor=none;");-dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);ec=new mxCell("",new mxGeometry(.25*r,0,.3*r,.2*q),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=m(e.Option21);ec.style+=a(e.Option21,G);gc=new mxCell("",new mxGeometry(0,.2*q,.25*r,.2*q),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=m(e.Option12);gc.style+=a(e.Option12,G);hc=new mxCell("",new mxGeometry(.25*r,.2*q,.3*r,.2*q),"strokeColor=none;fillColor=none;");hc.vertex=!0;-v.insert(hc);hc.value=m(e.Option22);hc.style+=a(e.Option22,G);qb=new mxCell("",new mxGeometry(0,.4*q,.25*r,.2*q),"strokeColor=none;fillColor=none;");qb.vertex=!0;v.insert(qb);qb.value=m(e.Option13);qb.style+=a(e.Option13,G);rb=new mxCell("",new mxGeometry(.25*r,.4*q,.3*r,.2*q),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option23);rb.style+=a(e.Option23,G);sb=new mxCell("",new mxGeometry(.7*r,.4*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);-sb.value=m(e.Option33);sb.style+=a(e.Option33,G);tb=new mxCell("",new mxGeometry(0,.6*q,.25*r,.2*q),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option14);tb.style+=a(e.Option14,G);kc=new mxCell("",new mxGeometry(.25*r,.6*q,.3*r,.2*q),"strokeColor=none;fillColor=none;");kc.vertex=!0;v.insert(kc);kc.value=m(e.Option24);kc.style+=a(e.Option24,G);mc=new mxCell("",new mxGeometry(.7*r,.6*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");mc.vertex=!0;v.insert(mc);mc.value=-m(e.Option34);mc.style+=a(e.Option34,G);ub=new mxCell("",new mxGeometry(0,.8*q,.25*r,.2*q),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option15);ub.style+=a(e.Option15,G);nc=new mxCell("",new mxGeometry(.25*r,.8*q,.3*r,.2*q),"strokeColor=none;fillColor=none;");nc.vertex=!0;v.insert(nc);nc.value=m(e.Option25);nc.style+=a(e.Option25,G);zb=new mxCell("",new mxGeometry(0,.4*q-2,r,4),"shape=line;strokeColor=#888888;");zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(0,-.6*q-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);break;case "iOSCountdownPicker":fc=new mxCell("",new mxGeometry(.45*r,0,.2*r,.2*q),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);ic=new mxCell("",new mxGeometry(.45*r,.2*q,.2*r,.2*q),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);qb=new mxCell("",-new mxGeometry(0,.4*q,.25*r,.2*q),"strokeColor=none;fillColor=none;");qb.vertex=!0;v.insert(qb);qb.value=m(e.Option13);qb.style+=a(e.Option13,G);rb=new mxCell("",new mxGeometry(.2*r,.4*q,.25*r,.2*q),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option23);rb.style+=a(e.Option23,G);jc=new mxCell("",new mxGeometry(.45*r,.4*q,.2*r,.2*q),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=m(e.Option33);jc.style+=a(e.Option33,G);sb=new mxCell("",new mxGeometry(.6*-r,.4*q,.2*r,.2*q),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option43);sb.style+=a(e.Option43,G);tb=new mxCell("",new mxGeometry(0,.6*q,.25*r,.2*q),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option14);tb.style+=a(e.Option14,G);lc=new mxCell("",new mxGeometry(.45*r,.6*q,.2*r,.2*q),"strokeColor=none;fillColor=none;");lc.vertex=!0;v.insert(lc);lc.value=m(e.Option34);lc.style+=a(e.Option34,G);ub=new mxCell("",new mxGeometry(0,.8*q,.25*r,-.2*q),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option15);ub.style+=a(e.Option15,G);oc=new mxCell("",new mxGeometry(.45*r,.8*q,.2*r,.2*q),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);zb=new mxCell("",new mxGeometry(0,.4*q-2,r,4),"shape=line;strokeColor=#888888;");zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(0,.6*q-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);v.style+=-"strokeColor=none;";v.style+=b(v.style,e,t,v);break;case "iOSBasicCell":v.value=m(e.text);v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.75*e.SeparatorInset+";";v.style+=(G?"fontSize=13;":f(e.text)+p(e.text)+x(e.text))+H(e.text);v.style+=b(v.style,e,t,v,G);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=-!0;v.insert(Ja);break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);var $a=new mxCell("",new mxGeometry(.79*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=-!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+p(e.subtext)+x(e.subtext);v.style+=b(v.style,e,t,v,G);-var cb=new mxCell("",new mxGeometry(0,.4*q,r,.6*q),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.75*e.SeparatorInset+";");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+p(e.text)+x(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=-new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",-new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+p(e.subtext)+x(e.subtext);v.style+=b(v.style,e,t,v,G);cb=null;switch(e.AccessoryIndicatorType){case "Disclosure":Ja=-new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);cb=new mxCell("",new mxGeometry(.55*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");-$a.vertex=!0;v.insert($a);cb=new mxCell("",new mxGeometry(.45*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);cb=new mxCell("",new mxGeometry(.52*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;");-Ja.vertex=!0;v.insert(Ja);cb=new mxCell("",new mxGeometry(.55*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:cb=new mxCell("",new mxGeometry(.65*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;")}cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+p(e.text)+x(e.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=-b(v.style,e,t,v);var Ub=new mxCell("",new mxGeometry(0,0,.25*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ub.vertex=!0;v.insert(Ub);Ub.value=m(e.subtext);Ub.style+=G?"html=1;fontSize=13;"+lb:f(e.subtext)+k(e.subtext)+p(e.subtext)+x(e.subtext);cb=new mxCell("",new mxGeometry(.25*r,0,.5*r,q),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+-lb:f(e.text)+k(e.text)+p(e.text)+x(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");-$a.vertex=!0;v.insert($a);break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";-Da=new mxCell("",new mxGeometry(0,0,r,.4*q),"fillColor=none;strokeColor=none;spacing=10;align=left;");Da.vertex=!0;v.insert(Da);Da.value=m(e.text);Da.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+p(e.text)+x(e.text);Cb=new mxCell("",new mxGeometry(0,.6*q,r,.4*q),"fillColor=none;strokeColor=none;spacing=10;align=left;");Cb.vertex=!0;v.insert(Cb);Cb.value=m(e["bottom-text"]);Cb.style+=G?"html=1;fontSize=13;"+lb:f(e["bottom-text"])+k(e["bottom-text"])+p(e["bottom-text"])+x(e["bottom-text"]);-break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=m(e.text);v.style+=G?"fontSize=13;":f(e.text)+p(e.text)+x(e.text);v.style+=b(v.style,e,t,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var w=new mxCell("",new mxGeometry(0,0,.9*r,.9*q),"rounded=1;arcSize=3;part=1;");w.vertex=!0;v.insert(w);w.style+=I(e,t)+ca(e,t)+O(e,t,w)+W(e)+sa(e);var E=new mxCell("",new mxGeometry(.1*r,.1*q,.9*r,.9*-q),"rounded=1;arcSize=3;part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=I(e,t)+ca(e,t)+O(e,t,E)+W(e)+sa(e)+a(e,G);e.Future&&(w.style+="dashed=1;fixDash=1;",E.style+="dashed=1;fixDash=1;")}else v.style+="rounded=1;arcSize=3;",e.Future&&(v.style+="dashed=1;fixDash=1;"),v.value=m(e.Text),v.style+=I(e,t)+ca(e,t)+O(e,t,v)+W(e)+sa(e)+a(e,G);v.style+=b(v.style,e,t,v,G);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":w=-null;switch(u.Class){case "SMHome":w=new mxCell("",new mxGeometry(.5*r-.4*q,.1*q,.8*q,.8*q),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMPrint":w=new mxCell("",new mxGeometry(.5*r-.4*q,.19*q,.8*q,.62*q),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":w=new mxCell("",new mxGeometry(.5*r-.4*q,.1*q,.8*q,.8*q),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");-break;case "SMSettings":w=new mxCell("",new mxGeometry(.5*r-.35*q,.15*q,.7*q,.7*q),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSitemap":w=new mxCell("",new mxGeometry(.5*r-.35*q,.2*q,.7*q,.6*q),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":w=new mxCell("",new mxGeometry(.5*r-.3*q,.25*q,.6*q,.5*q),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;");-break;case "SMVideo":w=new mxCell("",new mxGeometry(.5*r-.4*q,.2*q,.8*q,.6*q),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMAudio":w=new mxCell("",new mxGeometry(.5*r-.3*q,.2*q,.6*q,.6*q),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":w=new mxCell("",new mxGeometry(.5*r-.4*q,.15*q,.8*q,.7*q),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");-break;case "SMChart":var Y=ca(e,t);Y=""==Y?"#ffffff;":Y.replace("fillColor=","");w=new mxCell("",new mxGeometry(.5*r-.35*q,.15*q,.7*q,.7*q),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+Y);break;case "SMCloud":w=new mxCell("",new mxGeometry(.5*r-.4*q,.27*q,.8*q,.46*q),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":w=new mxCell("",new mxGeometry(.5*r-.25*q,.15*q,.5*q,.7*q),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");-break;case "SMForm":w=new mxCell("",new mxGeometry(.5*r-.4*q,.15*q,.8*q,.7*q),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMGame":w=new mxCell("",new mxGeometry(.5*r-.4*q,.2*q,.8*q,.6*q),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":w=new mxCell("",new mxGeometry(.5*r-.4*q,.2*q,.8*q,.6*q),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}w.vertex=-!0;v.insert(w);w.value=m(e.Text);w.style+=a(e,G);v.style+=b(v.style,e,t,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";w=new mxCell("",new mxGeometry(.1*r,0,.9*r,.9*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(0,.1*q,.9*r,.9*q),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,t,E,G);break;case "UMLConstraintBlock":var Bc=new mxCell("",new mxGeometry(0,0,.25*q,q),"shape=curlyBracket;rounded=1;");-Bc.vertex=!0;v.insert(Bc);var Cc=new mxCell("",new mxGeometry(r-.25*q,0,.25*q,q),"shape=curlyBracket;rounded=1;flipH=1;");Cc.vertex=!0;v.insert(Cc);na=new mxCell("",new mxGeometry(.25*q,0,r-.5*q,q),"strokeColor=none;fillColor=none;");na.vertex=!0;na.value=m(e);v.insert(na);v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);Bc.style+=O(e,t,Bc);Cc.style+=O(e,t,Cc);na.style+=p(e,na);Bc.style+=b(Bc.style,e,t,Bc);Cc.style+=b(Cc.style,e,t,Cc);na.style+=b(na.style,e,t,na,G);break;case "UMLTextBlock":v.value=-m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=b(v.style,e,t,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":mb=ba(e,t,v);e.Rotatio=null;var Vb=b(v.style,e,t,v,G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+mb;var Td=.8*r,Ff=r-Td,Qc=new mxCell("",new mxGeometry(.2,0,Td,q),"shape=ellipse;"+Vb);Qc.vertex=!0;Qc.geometry.relative=!0;v.insert(Qc);Qa=new mxCell("",new mxGeometry(0,-.5,Ff,1),"line;"+Vb);Qa.geometry.relative=!0;Qa.vertex=!0;v.insert(Qa);break;case "UMLComponentBoxBlock":case "UMLComponentBoxBlockV2":v.value=m(e);v.style="html=1;dropTarget=0;"+b(v.style,e,t,v,G);var nb=new mxCell("",new mxGeometry(1,0,15,15),"shape=component;jettyWidth=8;jettyHeight=4;");nb.geometry.relative=!0;nb.geometry.offset=new mxPoint(-20,5);nb.vertex=!0;v.insert(nb);break;case "UMLAssemblyConnectorBlock":case "UMLAssemblyConnectorBlockV2":mb=ba(e,t,v);e.Rotatio=null;Vb=b(v.style,e,t,v,-G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+mb;var Re=.225*r,Se=.1*r;Td=r-Re-Se;Qc=new mxCell("",new mxGeometry(.225,0,Td,q),"shape=providedRequiredInterface;verticalLabelPosition=bottom;"+Vb);Qc.vertex=!0;Qc.geometry.relative=!0;v.insert(Qc);zb=new mxCell("",new mxGeometry(0,.5,Re,1),"line;"+Vb);zb.geometry.relative=!0;zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(.9,.5,Se,1),"line;"+Vb);Ab.geometry.relative=-!0;Ab.vertex=!0;v.insert(Ab);break;case "BPMNActivity":v.value=m(e.Text);switch(e.bpmnActivityType){case 1:v.style+=a(e.Text,G);break;case 2:v.style+="shape=ext;double=1;"+a(e.Text,G);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 5;"+a(e.Text,G);break;case 4:v.style+="shape=ext;strokeWidth=2;"+a(e.Text,G)}if(0!=e.bpmnTaskType){switch(e.bpmnTaskType){case 1:w=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");w.geometry.offset=new mxPoint(4,7);break;case 2:w=new mxCell("",new mxGeometry(0,-0,19,12),"shape=message;");w.geometry.offset=new mxPoint(4,7);break;case 3:w=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");w.geometry.offset=new mxPoint(4,5);break;case 4:w=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");w.geometry.offset=new mxPoint(4,7);break;case 5:w=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");w.geometry.offset=new mxPoint(4,7);break;case 6:w=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");-w.geometry.offset=new mxPoint(4,5);break;case 7:w=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),w.geometry.offset=new mxPoint(4,5)}if(1==e.bpmnTaskType){var Rc=ca(e,t);Y=I(e,t);Y=Y.replace("strokeColor","fillColor");Rc=Rc.replace("fillColor","strokeColor");""==Y&&(Y="fillColor=#000000;");""==Rc&&(Rc="strokeColor=#ffffff;");w.style+=Rc+Y+"part=1;"}else w.style+=ca(e,t)+I(e,t)+"part=1;";w.geometry.relative=!0;w.vertex=!0;v.insert(w)}var Bd=0;0!=e.bpmnActivityMarker1&&Bd++;-0!=e.bpmnActivityMarker2&&Bd++;var Db=0;1==Bd?Db=-7.5:2==Bd&&(Db=-19);if(0!=e.bpmnActivityMarker1){switch(e.bpmnActivityMarker1){case 1:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");w.geometry.offset=new mxPoint(Db,-20);w.style+=ca(e,t)+I(e,t);break;case 2:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");w.geometry.offset=new mxPoint(Db,-20);w.style+=ca(e,t)+I(e,t);break;case 3:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");-w.geometry.offset=new mxPoint(Db,-20);w.style+=ca(e,t)+I(e,t);break;case 4:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");w.geometry.offset=new mxPoint(Db,-20);w.style+=ca(e,t)+I(e,t);break;case 5:w=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");w.geometry.offset=new mxPoint(Db,-17);Y=I(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");w.style+=Y;break;case 6:w=new mxCell("",-new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),w.geometry.offset=new mxPoint(Db,-18),w.style+=ca(e,t)+I(e,t)}w.geometry.relative=!0;w.vertex=!0;v.insert(w)}2==Bd&&(Db=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");w.geometry.offset=new mxPoint(Db,-20);w.style+=ca(e,t)+I(e,t);break;case 2:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");w.geometry.offset=new mxPoint(Db,--20);w.style+=ca(e,t)+I(e,t);break;case 3:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");w.geometry.offset=new mxPoint(Db,-20);w.style+=ca(e,t)+I(e,t);break;case 4:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");w.geometry.offset=new mxPoint(Db,-20);w.style+=ca(e,t)+I(e,t);break;case 5:w=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");w.geometry.offset=new mxPoint(Db,-17);-Y=I(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");w.style+=Y;break;case 6:w=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),w.geometry.offset=new mxPoint(Db,-18),w.style+=ca(e,t)+I(e,t)}w.geometry.relative=!0;w.vertex=!0;v.insert(w)}v.style+=b(v.style,e,t,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);if(1==e.bpmnDashed)switch(e.bpmnEventGroup){case 0:v.style+=+hd.style+="strokeColor=none;fillColor=#939393;");v.style+=b(v.style,e,u,v);break;case "AndroidListItems":var Bb=p,zc=0;if(e.ShowHeader){zc=8;var Oc=new mxCell("",new mxGeometry(0,0,r,zc),"strokeColor=none;fillColor=none;");Oc.vertex=!0;v.insert(Oc);Oc.value=m(e.Header);Oc.style+=a(e.Header,G);Bb-=zc;var Pe=new mxCell("",new mxGeometry(0,zc-2,r,4),"shape=line;strokeColor=#999999;");Pe.vertex=!0;v.insert(Pe)}var bc=parseInt(e.Items);0<bc&&(Bb/=bc);var X=[];Qa=[];for(l=0;l<bc;l++)X[l]=new mxCell("",+new mxGeometry(0,zc+l*Bb,r,Bb),"strokeColor=none;fillColor=none;"),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["Item_"+l]),X[l].style+=a(e["Item_"+l],G),0<l&&(Qa[l]=new mxCell("",new mxGeometry(0,zc+l*Bb-2,r,4),"shape=line;"),Qa[l].vertex=!0,v.insert(Qa[l]),Qa[l].style="Dark"==e.Scheme?Qa[l].style+"strokeColor=#ffffff;":Qa[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=b(v.style,e,u,v);+break;case "AndroidTabs":var cc=parseInt(e.Tabs),Gb=r;0<cc&&(Gb/=cc);var Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,p),"strokeColor=none;fillColor=none;"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=a(e["Tab_"+l],G),0<l&&(Qa[l]=new mxCell("",new mxGeometry(l*Gb-2,.2*p,4,.6*p),"shape=line;direction=north;"),Qa[l].vertex=!0,v.insert(Qa[l]),Qa[l].style="Dark"==e.Scheme?Qa[l].style+"strokeColor=#484848;":Qa[l].style+"strokeColor=#CCCCCC;");var Qe=+new mxCell("",new mxGeometry(e.Selected*Gb+2,p-3,Gb-4,3),"strokeColor=none;fillColor=#33B5E5;");Qe.vertex=!0;v.insert(Qe);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=b(v.style,e,u,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*p),Math.round(r),Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;var zd=new mxCell("",new mxGeometry(0,+0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;fillColor=#33B5E5;");zd.vertex=!0;v.insert(zd);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=b(v.style,e,u,v);break;case "AndroidImageBlock":v.style="Dark"==e.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";v.style+=b(v.style,e,+u,v);break;case "AndroidTextBlock":v.style="Dark"==e.Scheme?e.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":e.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=m(e.Label);v.style+=a(e.Label,G);v.style+=b(v.style,e,u,v,G);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(e.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";+break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(e.HighlightShow){var Ac=null;Ac=e.HighlightTop?new mxCell("",new mxGeometry(0,0,r,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,p-2,r,2),"strokeColor=none;");Ac.vertex=!0;v.insert(Ac);switch(e.HighlightColor){case "Blue":Ac.style+="fillColor=#33B5E5;";break;case "Dark Gray":Ac.style+="fillColor=#B0B0B0;";break;case "White":Ac.style+="fillColor=#ffffff;"}}if(e.VlignShow){var id=new mxCell("",+new mxGeometry(20,5,2,p-10),"shape=line;direction=north;");id.vertex=!0;v.insert(id);switch(e.VlignColor){case "Blue":id.style+="strokeColor=#244C5A;";break;case "White":id.style+="strokeColor=#ffffff;"}}v.style+=b(v.style,e,u,v);break;case "AndroidButton":v.value=m(e.Label);v.style+=a(e.Label,G)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==e.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=b(v.style,e,u,v);+break;case "AndroidTextBox":v.value=m(e.Label);v.style+=a(e.Label,G);var Ad=new mxCell("",new mxGeometry(2,p-6,r-4,4),"shape=partialRectangle;top=0;fillColor=none;");Ad.vertex=!0;v.insert(Ad);v.style="Dark"==e.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Ad.style=e.TextFocused?Ad.style+"strokeColor=#33B5E5;":Ad.style+"strokeColor=#A9A9A9;";v.style+=b(v.style,e,u,v);break;case "AndroidRadioButton":var Pc=null;e.Checked&&(Pc=new mxCell("",new mxGeometry(.15*+r,.15*p,.7*r,.7*p),"ellipse;fillColor=#33B5E5;strokeWidth=1;"),Pc.vertex=!0,v.insert(Pc));"Dark"==e.Scheme?(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;strokeColor=#272727;",e.Checked?(Pc.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;fillColor=#ffffff;strokeColor=#5C5C5C;",e.Checked&&(Pc.style+="strokeColor=#999999;"));v.style+=b(v.style,e,u,v);break;case "AndroidCheckBox":var ie=+null;e.Checked&&(ie=new mxCell("",new mxGeometry(.25*r,.05*-p,r,.8*p),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),ie.vertex=!0,v.insert(ie));v.style="Dark"==e.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=b(v.style,e,u,v);break;case "AndroidToggle":v.style="Dark"==e.Scheme?e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":+e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=b(v.style,e,u,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";v.style+=b(v.style,e,u,v);break;case "iOSSegmentedControl":cc=parseInt(e.Tabs);Gb=r;v.style+="strokeColor=none;fillColor=none;";0<cc&&(Gb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,p),+"strokeColor="+e.FillColor+";"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=a(e["Tab_"+l],G),Ta[l].style=e.Selected==l?Ta[l].style+ca(e,u):Ta[l].style+"fillColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";v.style+=b(v.style,e,u,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*p),Math.round(r),+Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;zd=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;"+ca(e,u));zd.vertex=!0;v.insert(zd);v.style+=b(v.style,e,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=b(v.style,e,u,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var Da=new mxCell(m(e.Text),+new mxGeometry(.35*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.Text,G);var Cb=new mxCell(m(e.Carrier),new mxGeometry(.09*r,0,.2*r,p),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.style+=a(e.Carrier,G);v.style+=b(v.style,e,u,v);break;case "iOSSearchBar":v.value=m(e.Search);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v,G)+a(e.Search,G);var Ja=new mxCell("",new mxGeometry(.3*r,.3*p,.4*p,.4*p),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");+Ja.vertex=!0;v.insert(Ja);break;case "iOSNavBar":v.value=m(e.Title);v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;"+a(e.Title,G);v.style+=b(v.style,e,u,v,G);Da=new mxCell(m(e.LeftText),new mxGeometry(.03*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.LeftText,G);Cb=new mxCell(m(e.RightText),new mxGeometry(.65*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.style+=a(e.RightText,G);Ja=new mxCell("",new mxGeometry(.02*+r,.2*p,.3*p,.5*p),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Ja.vertex=!0;v.insert(Ja);break;case "iOSTabs":cc=parseInt(e.Tabs);Gb=r;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=b(v.style,e,u,v);0<cc&&(Gb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,p),"strokeColor=none;"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=G?"overflow=block;blockSpacing=1;html=1;fontSize=13;"++lb:f(e["Tab_"+l])+k(e["Tab_"+l])+q(e["Tab_"+l])+t(e["Tab_"+l])+C(e["Tab_"+l])+I(e["Tab_"+l])+M(e["Tab_"+l])+K(e["Tab_"+l])+Q(e["Tab_"+l])+S(e["Tab_"+l]),Ta[l].style+="verticalAlign=bottom;",Ta[l].style=e.Selected==l?Ta[l].style+"fillColor=#BBBBBB;":Ta[l].style+"fillColor=none;";break;case "iOSDatePicker":var dc=new mxCell("",new mxGeometry(0,0,.5*r,.2*p),"strokeColor=none;fillColor=none;");dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);var ec=new mxCell("",new mxGeometry(.5*+r,0,.15*r,.2*p),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=m(e.Option21);ec.style+=a(e.Option21,G);var fc=new mxCell("",new mxGeometry(.65*r,0,.15*r,.2*p),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);var gc=new mxCell("",new mxGeometry(0,.2*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=m(e.Option12);gc.style+=a(e.Option12,G);var hc=new mxCell("",new mxGeometry(.5*r,.2*+p,.15*r,.2*p),"strokeColor=none;fillColor=none;");hc.vertex=!0;v.insert(hc);hc.value=m(e.Option22);hc.style+=a(e.Option22,G);var ic=new mxCell("",new mxGeometry(.65*r,.2*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);var qb=new mxCell("",new mxGeometry(0,.4*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");qb.vertex=!0;v.insert(qb);qb.value=m(e.Option13);qb.style+=a(e.Option13,G);var rb=new mxCell("",new mxGeometry(.5*r,+.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option23);rb.style+=a(e.Option23,G);var jc=new mxCell("",new mxGeometry(.65*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=m(e.Option33);jc.style+=a(e.Option33,G);var sb=new mxCell("",new mxGeometry(.8*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option43);sb.style+=a(e.Option43,G);var tb=new mxCell("",new mxGeometry(0,+.6*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option14);tb.style+=a(e.Option14,G);var kc=new mxCell("",new mxGeometry(.5*r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");kc.vertex=!0;v.insert(kc);kc.value=m(e.Option24);kc.style+=a(e.Option24,G);var lc=new mxCell("",new mxGeometry(.65*r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");lc.vertex=!0;v.insert(lc);lc.value=m(e.Option34);lc.style+=a(e.Option34,G);var mc=new mxCell("",new mxGeometry(.8*+r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");mc.vertex=!0;v.insert(mc);mc.value=m(e.Option44);mc.style+=a(e.Option44,G);var ub=new mxCell("",new mxGeometry(0,.8*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option15);ub.style+=a(e.Option15,G);var nc=new mxCell("",new mxGeometry(.5*r,.8*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");nc.vertex=!0;v.insert(nc);nc.value=m(e.Option25);nc.style+=a(e.Option25,G);var oc=new mxCell("",new mxGeometry(.65*+r,.8*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);zb=new mxCell("",new mxGeometry(0,.4*p-2,r,4),"shape=line;strokeColor=#888888;");zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(0,.6*p-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSTimePicker":dc=new mxCell("",new mxGeometry(0,0,.25*r,.2*p),"strokeColor=none;fillColor=none;");+dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);ec=new mxCell("",new mxGeometry(.25*r,0,.3*r,.2*p),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=m(e.Option21);ec.style+=a(e.Option21,G);gc=new mxCell("",new mxGeometry(0,.2*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=m(e.Option12);gc.style+=a(e.Option12,G);hc=new mxCell("",new mxGeometry(.25*r,.2*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");hc.vertex=!0;+v.insert(hc);hc.value=m(e.Option22);hc.style+=a(e.Option22,G);qb=new mxCell("",new mxGeometry(0,.4*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");qb.vertex=!0;v.insert(qb);qb.value=m(e.Option13);qb.style+=a(e.Option13,G);rb=new mxCell("",new mxGeometry(.25*r,.4*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option23);rb.style+=a(e.Option23,G);sb=new mxCell("",new mxGeometry(.7*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);+sb.value=m(e.Option33);sb.style+=a(e.Option33,G);tb=new mxCell("",new mxGeometry(0,.6*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option14);tb.style+=a(e.Option14,G);kc=new mxCell("",new mxGeometry(.25*r,.6*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");kc.vertex=!0;v.insert(kc);kc.value=m(e.Option24);kc.style+=a(e.Option24,G);mc=new mxCell("",new mxGeometry(.7*r,.6*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");mc.vertex=!0;v.insert(mc);mc.value=+m(e.Option34);mc.style+=a(e.Option34,G);ub=new mxCell("",new mxGeometry(0,.8*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option15);ub.style+=a(e.Option15,G);nc=new mxCell("",new mxGeometry(.25*r,.8*p,.3*r,.2*p),"strokeColor=none;fillColor=none;");nc.vertex=!0;v.insert(nc);nc.value=m(e.Option25);nc.style+=a(e.Option25,G);zb=new mxCell("",new mxGeometry(0,.4*p-2,r,4),"shape=line;strokeColor=#888888;");zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(0,+.6*p-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSCountdownPicker":fc=new mxCell("",new mxGeometry(.45*r,0,.2*r,.2*p),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);ic=new mxCell("",new mxGeometry(.45*r,.2*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);qb=new mxCell("",+new mxGeometry(0,.4*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");qb.vertex=!0;v.insert(qb);qb.value=m(e.Option13);qb.style+=a(e.Option13,G);rb=new mxCell("",new mxGeometry(.2*r,.4*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option23);rb.style+=a(e.Option23,G);jc=new mxCell("",new mxGeometry(.45*r,.4*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=m(e.Option33);jc.style+=a(e.Option33,G);sb=new mxCell("",new mxGeometry(.6*+r,.4*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option43);sb.style+=a(e.Option43,G);tb=new mxCell("",new mxGeometry(0,.6*p,.25*r,.2*p),"strokeColor=none;fillColor=none;");tb.vertex=!0;v.insert(tb);tb.value=m(e.Option14);tb.style+=a(e.Option14,G);lc=new mxCell("",new mxGeometry(.45*r,.6*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");lc.vertex=!0;v.insert(lc);lc.value=m(e.Option34);lc.style+=a(e.Option34,G);ub=new mxCell("",new mxGeometry(0,.8*p,.25*r,+.2*p),"strokeColor=none;fillColor=none;");ub.vertex=!0;v.insert(ub);ub.value=m(e.Option15);ub.style+=a(e.Option15,G);oc=new mxCell("",new mxGeometry(.45*r,.8*p,.2*r,.2*p),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);zb=new mxCell("",new mxGeometry(0,.4*p-2,r,4),"shape=line;strokeColor=#888888;");zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(0,.6*p-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);v.style+=+"strokeColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSBasicCell":v.value=m(e.text);v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.75*e.SeparatorInset+";";v.style+=(G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text))+H(e.text);v.style+=b(v.style,e,u,v,G);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=+!0;v.insert(Ja);break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);var $a=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=+!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+q(e.subtext)+t(e.subtext);v.style+=b(v.style,e,u,v,G);+var cb=new mxCell("",new mxGeometry(0,.4*p,r,.6*p),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.75*e.SeparatorInset+";");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+q(e.text)+t(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=+new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",+new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+q(e.subtext)+t(e.subtext);v.style+=b(v.style,e,u,v,G);cb=null;switch(e.AccessoryIndicatorType){case "Disclosure":Ja=+new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);cb=new mxCell("",new mxGeometry(.55*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");+$a.vertex=!0;v.insert($a);cb=new mxCell("",new mxGeometry(.45*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);cb=new mxCell("",new mxGeometry(.52*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;");+Ja.vertex=!0;v.insert(Ja);cb=new mxCell("",new mxGeometry(.55*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:cb=new mxCell("",new mxGeometry(.65*r,0,.3*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;")}cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+q(e.text)+t(e.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=+b(v.style,e,u,v);var Ub=new mxCell("",new mxGeometry(0,0,.25*r,p),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ub.vertex=!0;v.insert(Ub);Ub.value=m(e.subtext);Ub.style+=G?"html=1;fontSize=13;"+lb:f(e.subtext)+k(e.subtext)+q(e.subtext)+t(e.subtext);cb=new mxCell("",new mxGeometry(.25*r,0,.5*r,p),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"++lb:f(e.text)+k(e.text)+q(e.text)+t(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");+$a.vertex=!0;v.insert($a);break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";+Da=new mxCell("",new mxGeometry(0,0,r,.4*p),"fillColor=none;strokeColor=none;spacing=10;align=left;");Da.vertex=!0;v.insert(Da);Da.value=m(e.text);Da.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+q(e.text)+t(e.text);Cb=new mxCell("",new mxGeometry(0,.6*p,r,.4*p),"fillColor=none;strokeColor=none;spacing=10;align=left;");Cb.vertex=!0;v.insert(Cb);Cb.value=m(e["bottom-text"]);Cb.style+=G?"html=1;fontSize=13;"+lb:f(e["bottom-text"])+k(e["bottom-text"])+q(e["bottom-text"])+t(e["bottom-text"]);+break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=m(e.text);v.style+=G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text);v.style+=b(v.style,e,u,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var x=new mxCell("",new mxGeometry(0,0,.9*r,.9*p),"rounded=1;arcSize=3;part=1;");x.vertex=!0;v.insert(x);x.style+=J(e,u)+ca(e,u)+O(e,u,x)+W(e)+sa(e);var E=new mxCell("",new mxGeometry(.1*r,.1*p,.9*r,.9*+p),"rounded=1;arcSize=3;part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=J(e,u)+ca(e,u)+O(e,u,E)+W(e)+sa(e)+a(e,G);e.Future&&(x.style+="dashed=1;fixDash=1;",E.style+="dashed=1;fixDash=1;")}else v.style+="rounded=1;arcSize=3;",e.Future&&(v.style+="dashed=1;fixDash=1;"),v.value=m(e.Text),v.style+=J(e,u)+ca(e,u)+O(e,u,v)+W(e)+sa(e)+a(e,G);v.style+=b(v.style,e,u,v,G);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":x=+null;switch(w.Class){case "SMHome":x=new mxCell("",new mxGeometry(.5*r-.4*p,.1*p,.8*p,.8*p),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMPrint":x=new mxCell("",new mxGeometry(.5*r-.4*p,.19*p,.8*p,.62*p),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":x=new mxCell("",new mxGeometry(.5*r-.4*p,.1*p,.8*p,.8*p),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");+break;case "SMSettings":x=new mxCell("",new mxGeometry(.5*r-.35*p,.15*p,.7*p,.7*p),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSitemap":x=new mxCell("",new mxGeometry(.5*r-.35*p,.2*p,.7*p,.6*p),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":x=new mxCell("",new mxGeometry(.5*r-.3*p,.25*p,.6*p,.5*p),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;");+break;case "SMVideo":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMAudio":x=new mxCell("",new mxGeometry(.5*r-.3*p,.2*p,.6*p,.6*p),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":x=new mxCell("",new mxGeometry(.5*r-.4*p,.15*p,.8*p,.7*p),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");+break;case "SMChart":var Y=ca(e,u);Y=""==Y?"#ffffff;":Y.replace("fillColor=","");x=new mxCell("",new mxGeometry(.5*r-.35*p,.15*p,.7*p,.7*p),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+Y);break;case "SMCloud":x=new mxCell("",new mxGeometry(.5*r-.4*p,.27*p,.8*p,.46*p),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":x=new mxCell("",new mxGeometry(.5*r-.25*p,.15*p,.5*p,.7*p),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");+break;case "SMForm":x=new mxCell("",new mxGeometry(.5*r-.4*p,.15*p,.8*p,.7*p),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMGame":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}x.vertex=+!0;v.insert(x);x.value=m(e.Text);x.style+=a(e,G);v.style+=b(v.style,e,u,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.9*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(0,.1*p,.9*r,.9*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,u,E,G);break;case "UMLConstraintBlock":var Bc=new mxCell("",new mxGeometry(0,0,.25*p,p),"shape=curlyBracket;rounded=1;");+Bc.vertex=!0;v.insert(Bc);var Cc=new mxCell("",new mxGeometry(r-.25*p,0,.25*p,p),"shape=curlyBracket;rounded=1;flipH=1;");Cc.vertex=!0;v.insert(Cc);na=new mxCell("",new mxGeometry(.25*p,0,r-.5*p,p),"strokeColor=none;fillColor=none;");na.vertex=!0;na.value=m(e);v.insert(na);v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Bc.style+=O(e,u,Bc);Cc.style+=O(e,u,Cc);na.style+=q(e,na);Bc.style+=b(Bc.style,e,u,Bc);Cc.style+=b(Cc.style,e,u,Cc);na.style+=b(na.style,e,u,na,G);break;case "UMLTextBlock":v.value=+m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=b(v.style,e,u,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":mb=ba(e,u,v);e.Rotatio=null;var Vb=b(v.style,e,u,v,G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+mb;var Td=.8*r,Ff=r-Td,Qc=new mxCell("",new mxGeometry(.2,0,Td,p),"shape=ellipse;"+Vb);Qc.vertex=!0;Qc.geometry.relative=!0;v.insert(Qc);Qa=new mxCell("",new mxGeometry(0,+.5,Ff,1),"line;"+Vb);Qa.geometry.relative=!0;Qa.vertex=!0;v.insert(Qa);break;case "UMLComponentBoxBlock":case "UMLComponentBoxBlockV2":v.value=m(e);v.style="html=1;dropTarget=0;"+b(v.style,e,u,v,G);var nb=new mxCell("",new mxGeometry(1,0,15,15),"shape=component;jettyWidth=8;jettyHeight=4;");nb.geometry.relative=!0;nb.geometry.offset=new mxPoint(-20,5);nb.vertex=!0;v.insert(nb);break;case "UMLAssemblyConnectorBlock":case "UMLAssemblyConnectorBlockV2":mb=ba(e,u,v);e.Rotatio=null;Vb=b(v.style,e,u,v,+G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+mb;var Re=.225*r,Se=.1*r;Td=r-Re-Se;Qc=new mxCell("",new mxGeometry(.225,0,Td,p),"shape=providedRequiredInterface;verticalLabelPosition=bottom;"+Vb);Qc.vertex=!0;Qc.geometry.relative=!0;v.insert(Qc);zb=new mxCell("",new mxGeometry(0,.5,Re,1),"line;"+Vb);zb.geometry.relative=!0;zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(.9,.5,Se,1),"line;"+Vb);Ab.geometry.relative=+!0;Ab.vertex=!0;v.insert(Ab);break;case "BPMNActivity":v.value=m(e.Text);switch(e.bpmnActivityType){case 1:v.style+=a(e.Text,G);break;case 2:v.style+="shape=ext;double=1;"+a(e.Text,G);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 5;"+a(e.Text,G);break;case 4:v.style+="shape=ext;strokeWidth=2;"+a(e.Text,G)}if(0!=e.bpmnTaskType){switch(e.bpmnTaskType){case 1:x=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");x.geometry.offset=new mxPoint(4,7);break;case 2:x=new mxCell("",new mxGeometry(0,+0,19,12),"shape=message;");x.geometry.offset=new mxPoint(4,7);break;case 3:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");x.geometry.offset=new mxPoint(4,5);break;case 4:x=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");x.geometry.offset=new mxPoint(4,7);break;case 5:x=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");x.geometry.offset=new mxPoint(4,7);break;case 6:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");+x.geometry.offset=new mxPoint(4,5);break;case 7:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),x.geometry.offset=new mxPoint(4,5)}if(1==e.bpmnTaskType){var Rc=ca(e,u);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");Rc=Rc.replace("fillColor","strokeColor");""==Y&&(Y="fillColor=#000000;");""==Rc&&(Rc="strokeColor=#ffffff;");x.style+=Rc+Y+"part=1;"}else x.style+=ca(e,u)+J(e,u)+"part=1;";x.geometry.relative=!0;x.vertex=!0;v.insert(x)}var Bd=0;0!=e.bpmnActivityMarker1&&Bd++;+0!=e.bpmnActivityMarker2&&Bd++;var Db=0;1==Bd?Db=-7.5:2==Bd&&(Db=-19);if(0!=e.bpmnActivityMarker1){switch(e.bpmnActivityMarker1){case 1:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 2:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 3:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");+x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Db,-17);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");x.style+=Y;break;case 6:x=new mxCell("",+new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Db,-18),x.style+=ca(e,u)+J(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}2==Bd&&(Db=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 2:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");x.geometry.offset=new mxPoint(Db,+-20);x.style+=ca(e,u)+J(e,u);break;case 3:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Db,-17);+Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");x.style+=Y;break;case 6:x=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Db,-18),x.style+=ca(e,u)+J(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}v.style+=b(v.style,e,u,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);if(1==e.bpmnDashed)switch(e.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break;case 2:v.style+="outline=end;"}else switch(e.bpmnEventGroup){case 0:v.style+="outline=standard;";break;case 1:v.style+="outline=throwing;";break;case 2:v.style+="outline=end;"}switch(e.bpmnEventType){case 1:v.style+="symbol=message;";break;case 2:v.style+="symbol=timer;";break;case 3:v.style+="symbol=escalation;";break;case 4:v.style+="symbol=conditional;";break;case 5:v.style+="symbol=link;";break;case 6:v.style+="symbol=error;";-break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=b(v.style,e,t,v,G);break;case "BPMNChoreography":try{var ia=S(e.FillColor),je=Rd(ia,.75),Jc=f(e.Name).match(/\d+/),db=Math.max(mxUtils.getSizeForString(e.Name.t,Jc?Jc[0]:"13",null,r-10).height,24);ia="swimlaneFillColor="+je+";";v.value=-m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ia+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Name,G);v.style+=b(v.style,e,t,v,G);var Wb=db;Jc=f(e.TaskName).match(/\d+/);var pc=e.TaskHeight?.75*e.TaskHeight:Math.max(mxUtils.getSizeForString(e.TaskName.t,Jc?Jc[0]:"13",null,r-10).height+15,24),Dc=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");-Dc.value=m(e.TaskName);Dc.vertex=!0;v.insert(Dc);Dc.style+=a(e.TaskName,G);Dc.style+=b(Dc.style,e,t,Dc,G);Wb+=pc;X=[];for(l=0;l<e.Fields;l++){var Ud=e["Participant"+(l+1)];Jc=f(Ud).match(/\d+/);pc=Math.max(mxUtils.getSizeForString(Ud.t,Jc?Jc[0]:"13",null,r-10).height,24);X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;fillColor=none;spacingTop=-1;spacingLeft=3;spacingRight=3;");Wb+=pc;X[l].vertex=!0;v.insert(X[l]);X[l].style+=a(Ud,G);X[l].style+=b(X[l].style,e,t,X[l],G);-X[l].value=m(Ud)}}catch(gb){console.log(gb)}break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=m(e.Text);v.style=0==e.bpmnConversationType?v.style+sa(e):v.style+"strokeWidth=2;";e.bpmnIsSubConversation&&(w=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),w.geometry.offset=new mxPoint(-6,-17),w.style+=ca(e,t)+I(e,t),w.geometry.relative=!0,w.vertex=!0,v.insert(w));v.style+=b(v.style,e,t,v,G);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;verticalLabelPosition=bottom;verticalAlign=top;";-switch(e.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=b(v.style,e,t,v);-v.value=m(e.Text);v.style+=a(e,G);break;case "BPMNData":v.style+="shape=note;size=14;";switch(e.bpmnDataType){case 0:v.value=m(e.Text);e.Text&&!e.Text.t&&(e.Text.t=" ");break;case 1:w=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");w.geometry.offset=new mxPoint(-6,-15);w.style+=ca(e,t)+I(e,t);w.geometry.relative=!0;w.vertex=!0;v.insert(w);break;case 2:w=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");w.geometry.offset=new mxPoint(3,-3);w.style+=ca(e,t)+I(e,t);w.geometry.relative=!0;w.vertex=!0;v.insert(w);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;");Da.geometry.offset=new mxPoint(0,14);Da.geometry.relative=!0;Da.vertex=!0;v.insert(Da);Da.value=m(e.Text);Da.style+=a(e,G);break;case 3:w=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),w.geometry.offset=new mxPoint(3,3),w.style+=I(e,t),w.geometry.relative=-!0,w.vertex=!0,v.insert(w),Y=I(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),w.style+=Y,Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;"),Da.geometry.offset=new mxPoint(0,14),Da.geometry.relative=!0,Da.vertex=!0,v.insert(Da),Da.value=m(e.Text),Da.style+=a(e,G)}v.style+=b(v.style,e,t,v);break;case "BPMNBlackPool":v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,r,q),"fillColor=#000000;strokeColor=none;opacity=30;");-w.vertex=!0;v.insert(w);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=new mxCell("",new mxGeometry(0,0,.95*r,.95*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.05*r,.05*q,.95*r,.95*q),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,t,E,G);break;case "GSDFDDataStoreBlock":v.value=m(e.Text);v.style+="shape=partialRectangle;right=0;"+a(e.Text,G);-v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,.2*r,q),"part=1;");w.vertex=!0;v.insert(w);w.value=m(e.Number);w.style+=a(e.Number,G);w.style+=b(w.style,e,t,w,G);break;case "OrgBlock":var Te="";for(Ga in e.Active)"Photo"!=Ga&&e.Active[Ga]&&(Te+=m(e[Ga],!0));if(e.Active.Photo){var ke=.4*r;v.style+="spacingLeft="+ke+";imageWidth="+(ke-4)+";imageHeight="+(ke-4)+";imageAlign=left;imageVerticalAlign=top;image="+g(e.Photo)}v.value=Te;v.style+=b(v.style,e,t,v,!0);break;case "DefaultTableBlock":try{Fb=-e.RowHeights.length;Rb=e.ColWidths.length;var Vd=[],Cd=[];for(l=0;l<Fb;l++)Vd[l]=.75*e.RowHeights[l];for(fa=0;fa<Rb;fa++)Cd[fa]=.75*e.ColWidths[fa];v.style="group;dropTarget=0;pointerEvents=0;";var le=e.BandedColor1,me=e.BandedColor2,Gf=e.BandedRows,Ue=e.BandedCols,Wd=e.HideH,Hf=e.HideV,Ve=e.TextVAlign,We=e.FillColor,Xe=e.StrokeStyle;delete e.StrokeStyle;var If=ka(We,"fillOpacity"),Ye=e.LineColor,Jf=ka(Ye,"strokeOpacity");aa=0;var Dd={};for(l=0;l<Fb;l++){Z=0;q=Vd[l];for(fa=0;fa<Rb;fa++){var Lb=l++break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=b(v.style,e,u,v,G);break;case "BPMNChoreography":try{var ia=T(e.FillColor),je=Rd(ia,.75),Jc=f(e.Name).match(/\d+/),db=Math.max(mxUtils.getSizeForString(e.Name.t,Jc?Jc[0]:"13",null,r-10).height,24);ia="swimlaneFillColor="+je+";";v.value=+m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ia+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);var Wb=db;Jc=f(e.TaskName).match(/\d+/);var pc=e.TaskHeight?.75*e.TaskHeight:Math.max(mxUtils.getSizeForString(e.TaskName.t,Jc?Jc[0]:"13",null,r-10).height+15,24),Dc=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");+Dc.value=m(e.TaskName);Dc.vertex=!0;v.insert(Dc);Dc.style+=a(e.TaskName,G);Dc.style+=b(Dc.style,e,u,Dc,G);Wb+=pc;X=[];for(l=0;l<e.Fields;l++){var Ud=e["Participant"+(l+1)];Jc=f(Ud).match(/\d+/);pc=Math.max(mxUtils.getSizeForString(Ud.t,Jc?Jc[0]:"13",null,r-10).height,24);X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;fillColor=none;spacingTop=-1;spacingLeft=3;spacingRight=3;");Wb+=pc;X[l].vertex=!0;v.insert(X[l]);X[l].style+=a(Ud,G);X[l].style+=b(X[l].style,e,u,X[l],G);+X[l].value=m(Ud)}}catch(gb){console.log(gb)}break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=m(e.Text);v.style=0==e.bpmnConversationType?v.style+sa(e):v.style+"strokeWidth=2;";e.bpmnIsSubConversation&&(x=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),x.geometry.offset=new mxPoint(-6,-17),x.style+=ca(e,u)+J(e,u),x.geometry.relative=!0,x.vertex=!0,v.insert(x));v.style+=b(v.style,e,u,v,G);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;verticalLabelPosition=bottom;verticalAlign=top;";+switch(e.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=b(v.style,e,u,v);+v.value=m(e.Text);v.style+=a(e,G);break;case "BPMNData":v.style+="shape=note;size=14;";switch(e.bpmnDataType){case 0:v.value=m(e.Text);e.Text&&!e.Text.t&&(e.Text.t=" ");break;case 1:x=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(-6,-15);x.style+=ca(e,u)+J(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);break;case 2:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");x.geometry.offset=new mxPoint(3,+3);x.style+=ca(e,u)+J(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;");Da.geometry.offset=new mxPoint(0,14);Da.geometry.relative=!0;Da.vertex=!0;v.insert(Da);Da.value=m(e.Text);Da.style+=a(e,G);break;case 3:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),x.geometry.offset=new mxPoint(3,3),x.style+=J(e,u),x.geometry.relative=+!0,x.vertex=!0,v.insert(x),Y=J(e,u),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),x.style+=Y,Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;"),Da.geometry.offset=new mxPoint(0,14),Da.geometry.relative=!0,Da.vertex=!0,v.insert(Da),Da.value=m(e.Text),Da.style+=a(e,G)}v.style+=b(v.style,e,u,v);break;case "BPMNBlackPool":v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,p),"fillColor=#000000;strokeColor=none;opacity=30;");+x.vertex=!0;v.insert(x);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,.95*r,.95*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.05*p,.95*r,.95*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,u,E,G);break;case "GSDFDDataStoreBlock":v.value=m(e.Text);v.style+="shape=partialRectangle;right=0;"+a(e.Text,G);+v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,.2*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Number);x.style+=a(e.Number,G);x.style+=b(x.style,e,u,x,G);break;case "OrgBlock":var Te="";for(Ga in e.Active)"Photo"!=Ga&&e.Active[Ga]&&(Te+=m(e[Ga],!0));if(e.Active.Photo){var ke=.4*r;v.style+="spacingLeft="+ke+";imageWidth="+(ke-4)+";imageHeight="+(ke-4)+";imageAlign=left;imageVerticalAlign=top;image="+g(e.Photo)}v.value=Te;v.style+=b(v.style,e,u,v,!0);break;case "DefaultTableBlock":try{Fb=+e.RowHeights.length;Rb=e.ColWidths.length;var Vd=[],Cd=[];for(l=0;l<Fb;l++)Vd[l]=.75*e.RowHeights[l];for(fa=0;fa<Rb;fa++)Cd[fa]=.75*e.ColWidths[fa];v.style="group;dropTarget=0;pointerEvents=0;";var le=e.BandedColor1,me=e.BandedColor2,Gf=e.BandedRows,Ue=e.BandedCols,Wd=e.HideH,Hf=e.HideV,Ve=e.TextVAlign,We=e.FillColor,Xe=e.StrokeStyle;delete e.StrokeStyle;var If=ka(We,"fillOpacity"),Ye=e.LineColor,Jf=ka(Ye,"strokeOpacity");aa=0;var Dd={};for(l=0;l<Fb;l++){Z=0;p=Vd[l];for(fa=0;fa<Rb;fa++){var Lb=l+","+fa;if(Dd[Lb])Z+=Cd[fa];else{var kb=e["CellFill_"+Lb],ne=e["NoBand_"+Lb],Xd=e["CellSize_"+Lb],qc=e["Cell_"+Lb],Ze=e["Cell_"+Lb+"_VAlign"],Kf=e["Cell_"+Lb+"_TRotation"],Lf=e["CellBorderWidthH_"+Lb],Mf=e["CellBorderColorH_"+Lb],Nf=e["CellBorderStrokeStyleH_"+Lb],Of=e["CellBorderWidthV_"+Lb],Pf=e["CellBorderColorV_"+Lb],Qf=e["CellBorderStrokeStyleV_"+Lb],$e=Wd?Pf:Mf,af=ka($e,"strokeOpacity"),bf=Wd?Of:Lf,Sc=Wd?Qf:Nf;kb=Gf&&!ne?0==l%2?le:Ue&&!ne?0==fa%2?le:me:me:Ue&&!ne?0==fa%2?le:me:kb;var Rf=ka(kb,-"fillOpacity")||If;r=Cd[fa];var cf=q;Yc=r;for(var Mb=l+1;Mb<l+Xd.h;Mb++)if(null!=Vd[Mb]){cf+=Vd[Mb];Dd[Mb+","+fa]=!0;for(var Tc=fa+1;Tc<fa+Xd.w;Tc++)Dd[Mb+","+Tc]=!0}for(Mb=fa+1;Mb<fa+Xd.w;Mb++)if(null!=Cd[Mb])for(Yc+=Cd[Mb],Dd[l+","+Mb]=!0,Tc=l+1;Tc<l+Xd.h;Tc++)Dd[Tc+","+Mb]=!0;var oa=new mxCell("",new mxGeometry(Z,aa,Yc,cf),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Hf?"left=0;right=0;":"")+(Wd?"top=0;bottom=0;":"")+ca({FillColor:kb||We})+Zb(mxConstants.STYLE_STROKECOLOR,S($e),-S(Ye))+(null!=bf?Zb(mxConstants.STYLE_STROKEWIDTH,Math.round(.75*parseFloat(bf)),"1"):"")+(af?af:Jf)+Rf+"verticalAlign="+(Ze?Ze:Ve?Ve:"middle")+";"+qa({StrokeStyle:Sc?Sc:Xe?Xe:"solid"})+(Kf?"horizontal=0;":""));oa.vertex=!0;oa.value=m(qc);oa.style+=b(oa.style,e,t,oa,G)+(G?"fontSize=13;":f(qc)+p(qc)+x(qc)+C(qc,oa)+J(qc)+M(qc)+L(qc)+Q(qc))+U(qc)+H(qc);v.insert(oa);Z+=r}}aa+=q}}catch(gb){console.log(gb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";-"VSMDedicatedProcessBlock"==u.Class?v.value=m(e.Text):"VSMProductionControlBlock"==u.Class&&(v.value=m(e.Resources));v.style+=b(v.style,e,t,v,G);"VSMDedicatedProcessBlock"==u.Class&&(w=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(4,-13),w.vertex=!0,v.insert(w),w.style+=b(w.style,e,t,w));Da=new mxCell("",new mxGeometry(0,0,r,15),"strokeColor=none;fillColor=none;part=1;");Da.vertex=!0;v.insert(Da);Da.value=-m(e.Title);Da.style+=a(e.Title,G);e.Text=null;break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);Da=new mxCell("",new mxGeometry(.1*r,.3*q,.8*r,.6*q),"part=1;");Da.vertex=!0;v.insert(Da);Da.value=m(e.Resource);Da.style+=a(e.Resource,G);Da.style+=b(Da.style,e,t,Da,G);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";-v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);Bb=q;bc=parseInt(e.Cells);ia=b("part=1;",e,t,v);0<bc&&(Bb/=bc);X=[];Qa=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),ia),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["cell_"+l]),X[l].style+=a(e["cell_"+l],G);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);Bb=q;bc=parseInt(e.Cells);ia=b("part=1;fillColor=none;",e,t,v);0<bc&&(Bb/=bc);X=[];Ub=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Bb,.5*r,Bb),"shape=partialRectangle;left=0;"+ia),X[l].vertex=!0,v.insert(X[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),"strokeColor=none;fillColor=none;part=1;"),Ub[l].vertex=!0,v.insert(Ub[l]),Ub[l].value=-m(e["cell_"+l]),Ub[l].style+=a(e["cell_"+l],G);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=b(v.style,e,t,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.17*r,.2*q,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");w.vertex=!0;v.insert(w);-w.style+=b(w.style,e,t,w);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ia="shape=card;size=18;flipH=1;part=1;";w=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.05*r,.1*q,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);E.vertex=!0;v.insert(E);E.style+=b(E.style,-e,t,E);var T=new mxCell("",new mxGeometry(0,.2*q,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ia);T.vertex=!0;v.insert(T);T.value=m(e.Text);T.style+=b(T.style,e,t,T,G);break;case "VSMElectronicInformationArrow":v.style="group;";v.value=m(e.Title);v.style+=a(e.Title,G);var va=new mxCell("",new mxGeometry(0,0,r,q),"shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;entryX=0;entryY=1;exitX=1;exitY=0;");va.edge=!0;va.geometry.relative=-1;D.addCell(va,v,null,v,v);break;case "AWSRoundedRectangleContainerBlock2":case "AWSRoundedRectangleContainerBlock":v.style+="strokeColor=none;fillColor=none;";e.Spotfleet?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,35,40),-"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Beanstalk?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),-E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.EC2?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),E.geometry.relative=-!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Subnet?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=-new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.VPC?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,-0),E.vertex=!0,v.insert(E)):e.AWS?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):-e.Corporate?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):-(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.value=m(e.Title),v.style+=b(v.style,e,t,v,G));break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,t,v,G);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;";-v.value=m(e.Title);v.style+=b(v.style,e,t,v,G);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,t,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";oa=new mxCell("",new mxGeometry(.25*r,.25*q,.5*r,.5*q),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");oa.vertex=!0;v.insert(oa);var Oa=[oa];oa.style+=ca(e,t);va=new mxCell("",new mxGeometry(0,-0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;sc(.5*r,0,va,F,D,Oa,v,oa);sc(.855*r,.145*q,va,F,D,Oa,v,oa);sc(r,.5*q,va,F,D,Oa,v,oa);sc(.855*r,.855*q,va,F,D,Oa,v,oa);sc(.5*r,q,va,F,D,Oa,v,oa);sc(.145*r,.855*q,va,F,D,Oa,v,oa);sc(0,.5*q,va,F,D,Oa,v,oa);sc(.145*r,.145*q,va,F,D,Oa,v,oa);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";oa=new mxCell("",new mxGeometry(0,.5*q-10,r,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");-oa.vertex=!0;v.insert(oa);Oa=[oa];va=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;Oa=[oa];var Ed=r/e.NumTopNodes;for(l=0;l<e.NumTopNodes;l++)sc(.5*Ed+l*Ed,0,va,F,D,Oa,v,oa);Ed=r/e.NumBottomNodes;for(l=0;l<e.NumBottomNodes;l++)sc(.5*Ed+l*Ed,q,va,F,D,Oa,v,oa);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=m(e.Title);v.style+=b(v.style,e,t,v,G);-e.ToggleCharge&&(v.style+="flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);"EIMessageChannelBlock"==u.Class?(w=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(.45*-r,0)):"EIDatatypeChannelBlock"==-u.Class?(w=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(.45*-r,0)):"EIInvalidMessageChannelBlock"==u.Class?(w=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(.45*-r,0)):"EIDeadLetterChannelBlock"==u.Class?(w=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),w.geometry.offset=-new mxPoint(.45*-r,0)):"EIGuaranteedDeliveryBlock"==u.Class&&(w=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(-10,-7));w.geometry.relative=!0;w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);va=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");va.geometry.relative=!0;va.edge=!0;fb(.15*r,.25*q,.85*r,.25*q,va,F,D,Oa,v,oa);break;-case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,.07*q,.21*r,.86*q),"fillColor=#FFFF33;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.26*r,.09*q,.2*r,.82*q),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,t,E);T=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");-T.geometry.relative=!0;T.geometry.offset=new mxPoint(.4*-r,-10);T.vertex=!0;v.insert(T);T.style+=b(T.style,e,t,T);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");ea.geometry.relative=!0;ea.edge=!0;w.insertEdge(ea,!0);E.insertEdge(ea,!1);ea.style+=I(e,t);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");-da.geometry.relative=!0;da.edge=!0;E.insertEdge(da,!0);T.insertEdge(da,!1);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);var Fd=-e.Messages,oe=(q-17)/Fd;E=[];va=[];for(l=0;l<Fd;l++){var Gd=oe*(l+1)-3;E[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;");E[l].vertex=!0;v.insert(E[l]);switch(u.Class){case "EIMessageBlock":E[l].value=m(e["message_"+(l+1)]);E.style+=a(e["message_"+(l+1)],G);break;case "EICommandMessageBlock":E[l].value="C";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIDocumentMessageBlock":E[l].value="D";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIEventMessageBlock":E[l].value="E",E[l].style+=-"fontStyle=1;fontSize=13;"}E[l].style+=b(E[l].style,e,t,E[l]);va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");va[l].geometry.relative=!0;va[l].edge=!0;w.insertEdge(va[l],!1);E[l].insertEdge(va[l],!0);va[l].style+=b(va[l].style,e,t,va[l]);var Kc=[];Kc.push(new mxPoint(Z+8.5,aa+Gd+10));va[l].geometry.points=Kc;F.push(D.addCell(va[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.45*r,.25*q,.3*r,.5*q),"part=1;fillColor=#ffffff");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);va=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");va.geometry.relative=!0;va.edge=!0;fb(0,.5*q,.4*r,.5*q,va,F,D,Oa,v,oa);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);var ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");ea.geometry.relative=!0;ea.edge=!0;fb(.05*r,.5*q,.85*r,.5*q,ea,F,D,Oa,v,oa);var da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.05*r,.5*q,.85*-r,.15*q,da,F,D,Oa,v,oa);var xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");xa.geometry.relative=!0;xa.edge=!0;fb(.05*r,.5*q,.85*r,.85*q,xa,F,D,Oa,v,oa);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");-ea.geometry.relative=!0;ea.edge=!0;ea.style+=I(e,t);fb(.05*r,.5*q,.95*r,.5*q,ea,F,D,Oa,v,oa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");da.geometry.relative=!0;da.edge=!0;da.style+=I(e,t);fb(.3*r,.1*q,.3*r,.5*q,da,F,D,Oa,v,oa);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");-xa.geometry.relative=!0;xa.edge=!0;xa.style+=I(e,t);fb(.7*r,.1*q,.7*r,.5*q,xa,F,D,Oa,v,oa);var Ya=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");Ya.geometry.relative=!0;Ya.edge=!0;Ya.style+=I(e,t);fb(.5*r,.5*q,.5*r,.9*q,Ya,F,D,Oa,v,oa);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,-e,t,v,G);w=new mxCell("",new mxGeometry(.2*r,.21*q,.16*r,.24*q),"part=1;fillColor=#ffffff;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");ea.geometry.relative=!0;ea.edge=!0;fb(.45*r,.33*q,.8*r,.33*q,ea,F,D,Oa,v,oa);E=new mxCell("",new mxGeometry(.64*r,.55*q,.16*r,.24*q),"part=1;fillColor=#ffffff;");E.vertex=!0;v.insert(E);E.style+=b(E.style,-e,t,E);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.55*r,.67*q,.2*r,.67*q,da,F,D,Oa,v,oa);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.1*r,.15*q,.8*r,.7*q),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");w.vertex=!0;v.insert(w);-w.style+=b(w.style,e,t,w);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.04*r,.06*q,.18*r,.28*q),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.2*r,.56*q,.2*r,.32*q),"part=1;");E.vertex=!0;v.insert(E);E.value="A";E.style+="fontStyle=1;fontSize=13;";w.style+=b(w.style,e,t,w);ea=new mxCell("",new mxGeometry(0,-0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");ea.geometry.relative=!0;ea.edge=!0;w.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.style+=b(ea.style,e,t,ea);Kc=[];Kc.push(new mxPoint(Z+.13*r,aa+.72*q));ea.geometry.points=Kc;F.push(D.addCell(ea,null,null,null,null));T=new mxCell("",new mxGeometry(.6*r,.06*q,.18*r,.28*q),"ellipse;fillColor=#808080;part=1;");T.vertex=!0;v.insert(T);T.style+=I(e,t)+sa(e);T.style+=b(T.style,e,t,T);ta=new mxCell("",new mxGeometry(.76*-r,.56*q,.2*r,.32*q),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=I(e,t)+O(e,t,ta)+sa(e)+qa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=b(ta.style,e,t,ta);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");da.geometry.relative=!0;da.edge=!0;T.insertEdge(da,!1);ta.insertEdge(da,!0);da.style+=b(da.style,e,t,da);var df=[];df.push(new mxPoint(Z+.69*r,aa+.72*q));da.geometry.points=-df;F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");xa.geometry.relative=!0;xa.edge=!0;w.insertEdge(xa,!1);T.insertEdge(xa,!0);xa.style+=b(xa.style,e,t,xa);F.push(D.addCell(xa,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("1",new mxGeometry(.2*r,.4*q,.1*r,.19*q),-"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("2",new mxGeometry(.45*r,.4*q,.1*r,.19*q),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,t,E);T=new mxCell("3",new mxGeometry(.7*r,.4*q,.1*r,.19*q),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");T.vertex=!0;v.insert(T);T.style+=b(T.style,e,t,T);ea=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");-w.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.geometry.points=[new mxPoint(Z+.375*r,aa+.15*q)];ea.geometry.relative=!0;ea.edge=!0;ea.style+=b(ea.style,e,t,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");E.insertEdge(da,!1);T.insertEdge(da,!0);da.geometry.points=[new mxPoint(Z+.675*r,aa+.15*q)];da.geometry.relative=!0;da.edge=!0;da.style+=b(da.style,e,t,da);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=-"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.3*r,.2*q,.4*r,.6*q),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.38*r,.42*q,.24*r,.16*q),"part=1;fillColor=#aefe7d;");-w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*q),"part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,t,E);T=new mxCell("",new mxGeometry(.76*r,.23*q,.24*r,.16*q),"");T.vertex=!0;v.insert(T);T.style=E.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*q,.24*r,.16*q),"");ta.vertex=!0;v.insert(ta);ta.style=E.style;var Yd=new mxCell("",new mxGeometry(.38*r,.84*q,.24*r,.16*q),"");Yd.vertex=!0;v.insert(Yd);Yd.style=E.style;var Zd=new mxCell("",new mxGeometry(0,-.61*q,.24*r,.16*q),"");Zd.vertex=!0;v.insert(Zd);Zd.style=E.style;var $d=new mxCell("",new mxGeometry(0,.23*q,.24*r,.16*q),"");$d.vertex=!0;v.insert($d);$d.style=E.style;ea=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.edge=!0;ea.style+=b(ea.style,e,t,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(da,!1);T.insertEdge(da,!0);da.edge=!0;da.style+=b(da.style,e,t,da);-F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(xa,!1);ta.insertEdge(xa,!0);xa.edge=!0;xa.style+=b(xa.style,e,t,xa);F.push(D.addCell(xa,null,null,null,null));Ya=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Ya,!1);Yd.insertEdge(Ya,!0);Ya.edge=!0;Ya.style+=b(Ya.style,e,t,Ya);F.push(D.addCell(Ya,null,null,null,null));var Lc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Lc,-!1);Zd.insertEdge(Lc,!0);Lc.edge=!0;Lc.style+=b(Lc.style,e,t,Lc);F.push(D.addCell(Lc,null,null,null,null));var Mc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Mc,!1);$d.insertEdge(Mc,!0);Mc.edge=!0;Mc.style+=b(Mc.style,e,t,Mc);F.push(D.addCell(Mc,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");-ea.geometry.relative=!0;ea.edge=!0;fb(.05*r,.5*q,.6*r,.25*q,ea,F,D,Oa,v,oa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.05*r,.5*q,.6*r,.75*q,da,F,D,Oa,v,oa);w=new mxCell("",new mxGeometry(.7*r,.1*q,.15*r,.32*q),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";-v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.25*r,.25*q,.5*r,.5*q),"shape=mxgraph.eip.control_bus;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);T=new mxCell("",-new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");T.vertex=!0;v.insert(T);T.style+=b(T.style,e,t,T);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");xa.geometry.relative=!0;xa.edge=!0;w.insertEdge(xa,!1);T.insertEdge(xa,!0);xa.style+=b(xa.style,e,t,xa);xa.geometry.points=[new mxPoint(Z+8.5,aa+40)];F.push(D.addCell(xa,null,null,null,null));ta=new mxCell("",new mxGeometry(r-45,-q-20,20,20),"part=1;");ta.vertex=!0;v.insert(ta);ta.value=m(e.message_0);ta.style+=a(e.message_0,G);ta.style+=b(ta.style,e,t,ta,G);Ya=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");Ya.geometry.relative=!0;Ya.edge=!0;w.insertEdge(Ya,!1);ta.insertEdge(Ya,!0);Ya.style+=b(Ya.style,e,t,Ya);Ya.geometry.points=[new mxPoint(Z+8.5,aa+q-10)];F.push(D.addCell(Ya,null,null,null,null));Fd=e.HistoryMessages;oe=(q-75)/Fd;E=[];va=-[];for(l=0;l<Fd;l++)Gd=oe*(l+1)+30,E[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;"),E[l].vertex=!0,E[l].value=m(e["message_"+(l+1)]),E.style+=a(e["message_"+(l+1)],G),v.insert(E[l]),E[l].style+=b(E[l].style,e,t,E[l],G),va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),va[l].geometry.relative=!0,va[l].edge=!0,T.insertEdge(va[l],!1),E[l].insertEdge(va[l],!0),va[l].style+=b(va[l].style,e,t,va[l]),Kc=[],Kc.push(new mxPoint(Z+-r-30,aa+Gd+10)),va[l].geometry.points=Kc,F.push(D.addCell(va[l],null,null,null,null));break;case "Equation":LucidImporter.hasMath=!0;v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);v.value="$$"+e.Latex+"$$";break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,t,v);break;case "fpWall":v.style+="labelPosition=center;verticalAlign=bottom;verticalLabelPosition=top;";v.value=m(e);v.style+=b(v.style,e,t,v,G);v.style=v.style.replace("rotation=180;",-"");break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,t,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=new mxCell("",new mxGeometry(0,0,r,.25*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=[];var ef=.02*r,pe=(r-2*ef)/e.LightCount,ff=.8*pe;for(l=0;l<e.LightCount;l++)E[l]=new mxCell("",new mxGeometry(ef+pe*l+(pe-ff)/2,.25*q,ff,.75*q),"ellipse;part=1;"),-E[l].vertex=!0,v.insert(E[l]),E[l].style+=b(E[l].style,e,t,E[l]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=[];var gf=r/e.SinkCount;for(l=0;l<e.SinkCount;l++)w[l]=new mxCell("",new mxGeometry(gf*l,0,gf,q),"part=1;shape=mxgraph.floorplan.sink_2;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=b(w[l].style,e,t,w[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Eb=.1*r/e.StallCount;w=new mxCell("",new mxGeometry(0,-0,Eb,q),"fillColor=#000000;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);var Nb=(r-Eb)/e.StallCount,qe=[],Hd=[],Id=[],Jd=[];Y=I(e,t);Y=""==Y?"#000000;":Y.replace("stokreColor=","");var re="part=1;fillColor="+Y;re+=b(re,e,t,v);var se=b("",e,t,v);for(l=0;l<e.StallCount;l++)qe[l]=new mxCell("",new mxGeometry((l+1)*Nb,0,Eb,q),re),qe[l].vertex=!0,v.insert(qe[l]),Id[l]=new mxCell("",new mxGeometry(Eb+l*Nb+.05*(Nb-Eb),q-.92*(Nb-Eb),.9*(Nb-Eb),.92*(Nb-Eb)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),-Id[l].vertex=!0,v.insert(Id[l]),Id[l].style+=se,Hd[l]=new mxCell("",new mxGeometry(Eb+l*Nb+.2*(Nb-Eb),0,.6*(Nb-Eb),.8*(Nb-Eb)),"shape=mxgraph.floorplan.toilet;part=1;"),Hd[l].vertex=!0,v.insert(Hd[l]),Hd[l].style+=se,Jd[l]=new mxCell("",new mxGeometry(Eb+l*Nb,.42*q,.15*(Nb-Eb),.12*(Nb-Eb)),"part=1;"),Jd[l].vertex=!0,v.insert(Jd[l]),Jd[l].style+=se;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var ae="edgeStyle=none;endArrow=none;part=1;";Y=I(e,t);Y=""==Y?"#000000;":Y.replace("strokeColor=",-"");var Uc="shape=triangle;part=1;fillColor="+Y;Uc+=b(Uc,e,t,v);ea=new mxCell("",new mxGeometry(0,0,0,0),ae);ea.geometry.relative=!0;ea.edge=!0;fb(0,.5*q,.65*r,.5*q,ea,F,D,Oa,v,oa);var ha=q/e.numLines;da=[];var Vc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),da[l].geometry.relative=!0,da[l].edge=!0,fb(.65*r,.5*q,.96*r,(l+.5)*ha,da[l],F,D,Oa,v,oa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ha,.05*r,.6*ha),Uc),Vc[l].vertex=!0,v.insert(Vc[l]);break;case "PEMultilines":v.style+=-"strokeColor=none;fillColor=none;";ae="edgeStyle=none;endArrow=none;part=1;";Y=I(e,t);Y=""==Y?"#000000;":Y.replace("strokeColor=","");Uc="shape=triangle;part=1;fillColor="+Y;Uc+=b(Uc,e,t,v);ha=q/e.numLines;da=[];Vc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),da[l].geometry.relative=!0,da[l].edge=!0,fb(0,(l+.5)*ha,.96*r,(l+.5)*ha,da[l],F,D,Oa,v,oa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ha,.05*r,.6*ha),Uc),Vc[l].vertex=!0,v.insert(Vc[l]);break;case "PEVesselBlock":v.style+=-"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);switch(e.vesselType){case 1:v.style+="shape=mxgraph.pid.vessels.pressurized_vessel;";break;case 2:v.style+="shape=hexagon;perimeter=hexagonPerimeter2;size=0.10;direction=south;"}v.style+=b(v.style,e,t,v,G);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);1==e.peakedRoof&&0==e.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==e.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");-v.style+=b(v.style,e,t,v,G);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style=0==e.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";v.style+=b(v.style,e,t,v,G);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,.2*q,r,.6*q),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");-w.vertex=!0;v.insert(w);w.style+=ia;w.style+=b(w.style,e,t,w);ia="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=!0,ea.edge=!0,ea.style+=ia,ea.style+=b(ea.style,e,t,ea),fb(0,0,0,.2*q,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ia,da.style+=b(da.style,e,t,da),fb(r,.67*q,r,q,da,F,D,Oa,v,oa)):(w.style+="flipH=1;",ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=-!0,ea.edge=!0,ea.style+=ia,ea.style+=b(ea.style,e,t,ea),fb(0,0,0,.33*q,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ia,da.style+=b(da.style,e,t,da),fb(r,.8*q,r,q,da,F,D,Oa,v,oa));1==e.centerLineType&&(xa=new mxCell("",new mxGeometry(0,0,0,0),""),xa.geometry.relative=!0,xa.edge=!0,xa.style+=ia,xa.style+=b(xa.style,e,t,xa),fb(.2*r,.5*q,.8*r,.5*q,xa,F,D,Oa,v,oa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";-v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.2*r,.2*q,.6*r,.6*q),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(u.Class){case "PEIndicatorBlock":v.style+="shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+=-"shape=mxgraph.pid2inst.indicator;indType=inst;";break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+="shape=mxgraph.pid2inst.progLogCont;"}v.style+=b(v.style,e,t,v);"PEIndicator2Block"==u.Class||"PESharedIndicator2Block"==u.Class?(w=new mxCell("",-new mxGeometry(0,0,r,.5*r),"part=1;strokeColor=none;fillColor=none;"),w.vertex=!0,v.insert(w),w.value=m(e.TopText),w.style+=a(e.TopText,G),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,.5*r,r,.5*r),"part=1;strokeColor=none;fillColor=none;")):(w=new mxCell("",new mxGeometry(0,0,r,.5*q),"part=1;strokeColor=none;fillColor=none;"),w.vertex=!0,v.insert(w),w.value=m(e.TopText),w.style+=a(e.TopText,G),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,.5*q,r,.5*q),"part=1;strokeColor=none;fillColor=none;"));-E.vertex=!0;v.insert(E);E.value=m(e.BotText);E.style+=a(e.BotText,G);E.style+=b(E.style,e,t,E,G);switch(e.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var te=!1;"PEPoweredValveBlock"==u.Class?1!=e.poweredHandOperated&&(te=!0):1!=-e.handOperated&&(te=!0);if(te){e=h(u).Properties;P=e.BoundingBox;var Sf=P.h;P.h="PEAngleValveBlock"==u.Class||"PEAngleGlobeValveBlock"==u.Class?.7*P.h:.6*P.h;v=new mxCell("",new mxGeometry(Math.round(.75*P.x+wc),Math.round(.75*(P.y+Sf-P.h)+xc),Math.round(.75*P.w),Math.round(.75*P.h)),"");v.vertex=!0;Qb(v,u,D)}if("PEPoweredValveBlock"==u.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",v.style+=b(v.style,e,t,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",-w=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*q),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),w.vertex=!0,v.insert(w),w.value=m(e.PoweredText),w.style+=(G?"":p(e.PoweredText)+x(e.PoweredText)+C(e.PoweredText)+J(e.PoweredText)+M(e.PoweredText)+Q(e.PoweredText)+U(e.PoweredText))+"fontSize=6;"+H(e.PoweredText),w.style+=b(w.style,e,t,w,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=m(e.Text);switch(u.Class){case "PEGateValveBlock":v.style+=-"valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==e.handOperated&&(v.style+="actuator=man;")}v.style+=b(v.style,e,t,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(T=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):-new mxCell("",new mxGeometry(1,0,20,q-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(-20,110),T.vertex=!0,v.insert(T),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),-ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,t,v);break;case "UI2WindowBlock":v.value=m(e.Title);v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+(G?"fontSize=13;":f(e.Title)+p(e.Title)+x(e.Title));1==e.vScroll&&(T=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,-0,20,q-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(-20,30),T.vertex=!0,v.insert(T),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=-!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,t,v,G);break;case "UI2DialogBlock":v.value=m(e.Text);v.style+=a(e.Text,G);w=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");w.vertex=!0;v.insert(w);w.value=m(e.Title);w.style+=a(e.Title,G);w.style+=b(w.style,e,t,w,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=new mxPoint(-25,-10);-E.vertex=!0;w.insert(E);1==e.vScroll&&(T=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(-20,30),T.vertex=!0,v.insert(T),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,-1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,t,v);e.Text=null;break;case "UI2AccordionBlock":w=[];ha=25;for(l=0;l<=e.Panels-1;l++)w[l]=l<e.Selected-1?new mxCell("",new mxGeometry(0,l*ha,r,ha),"part=1;fillColor=#000000;fillOpacity=25;"):-l==e.Selected-1?new mxCell("",new mxGeometry(0,l*ha,r,ha),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,q-(e.Panels-e.Selected)*ha+(l-e.Selected)*ha,r,ha),"part=1;fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Panel_"+(l+1)]),w[l].style+=a(e["Panel_"+(l+1)],G),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=5;");var Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?-new mxCell("",new mxGeometry(1,0,20,q-e.Selected*ha-20-(e.Panels-e.Selected)*ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-e.Selected*ha-(e.Panels-e.Selected)*ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,e.Selected*ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,-e,t,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*ha),T.vertex=!0,v.insert(T),T.style+=Ua,T.style+=b(T.style,e,t,T));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,e.Selected*ha,r-20,q-e.Selected*ha--20-(e.Panels-e.Selected)*ha),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*ha,r-20,q-e.Selected*ha-(e.Panels-e.Selected)*ha),"part=1;fillColor=none;strokeColor=none;");ta.vertex=!0;v.insert(ta);ta.value=m(e.Content_1);ta.style+=a(e.Content_1,G);!G&&0>ta.style.indexOf(";align=")&&(ta.style+="align=left;spacingLeft=5;");v.style+=b(v.style,e,t,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];E=[];ha=25;var Hb=3,Ha=(r+Hb)/-(e.Tabs+1),hb=new mxCell("",new mxGeometry(0,ha,r,q-ha),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Hb,ha),""),E[l].vertex=!0,v.insert(E[l])):(w[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Hb,ha),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Hb,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=-!0,w[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,e,t,E[l]);Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),-E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,t,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20),T.vertex=!0,v.insert(T),T.style+=-Ua,T.style+=b(T.style,e,t,T));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];E=[];ha=25;Hb=3;Ha=(r+Hb)/e.Tabs;hb=new mxCell("",new mxGeometry(0,ha,r,q-ha),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),""),E[l].vertex=!0,v.insert(E[l])):(w[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=-b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Hb,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,t,E[l],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;");Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):-new mxCell("",new mxGeometry(1,0,20,q-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,t,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),-T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20),T.vertex=!0,v.insert(T),T.style+=Ua,T.style+=b(T.style,e,t,T));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];E=[];Hb=3;ha=25+Hb;Ha=80;zc=10;hb=new mxCell("",new mxGeometry(Ha,0,r-Ha,q),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,zc+l*ha,Ha,ha-Hb),""),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Tab_"+-(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,t,E[l],G)):(w[l]=new mxCell("",new mxGeometry(0,zc+l*ha,Ha,ha-Hb),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,ha-Hb),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[l].insert(E[l]),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G)),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,-e,t,E[l]);Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,0),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",-E.style+=Ua,E.style+=b(E.style,e,t,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(Ha,1,r-20-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(Ha,1,r-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20),T.vertex=!0,v.insert(T),T.style+=Ua,T.style+=b(T.style,e,t,T));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";-ha=q/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(0,l*ha+.5*ha-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=I(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,-2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,t,E[l]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(l*Ha,.5*q-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=-a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=I(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,t,E[l]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";ha=q/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(0,-l*ha+.5*ha-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=I(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"ellipse;"),E[l].vertex=!0,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=-b(E[l].style,e,t,E[l]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(l*Ha,.5*q-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=I(e,t),-Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"ellipse;part=1;"),E[l].vertex=!0,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,t,E[l]));break;case "UI2SelectBlock":v.style+="shape=mxgraph.mockup.forms.comboBox;strokeColor=#999999;fillColor=#ddeeff;align=left;fillColor2=#aaddff;mainText=;fontColor=#666666";v.value=m(e.Selected);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+="shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;";-"UI2VSliderBlock"==u.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";v.style+=b(v.style,e,t,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";w=new mxCell("",new mxGeometry(0,0,.6*r,q),"part=1;");w.vertex=!0;v.insert(w);w.value=m(e.Date);w.style+=a(e.Date,G);v.style+=b(v.style,e,t,v);Y=I(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");E=new mxCell("",new mxGeometry(.75*r,0,.25*r,q),"part=1;shape=mxgraph.gmdl.calendar;");-E.vertex=!0;v.insert(E);E.style+=Y;E.style+=b(E.style,e,t,E);break;case "UI2SearchBlock":v.value=m(e.Search);v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+a(e.Search,G);v.style+=b(v.style,e,t,v,G);break;case "UI2NumericStepperBlock":Y=I(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");v.value=m(e.Number);v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+-Y+a(e.Number,G);v.style+=b(v.style,e,t,v,G);break;case "UI2TableBlock":try{kb=S(e.FillColor);var Kd=S(e.LineColor);Sc="";var be=20;v.style="html=1;overflow=fill;verticalAlign=top;spacing=0;";var Ld='<table style="width:100%;height:100%;border-collapse: collapse;border: 1px solid '+Kd+';">',tc=e.Data.split("\n");var hf=e.AltRow&&"default"!=e.AltRow?"none"==e.AltRow?kb:S(e.AltRow):Rd(kb,.95);Oc=e.Header&&"default"!=e.Header?"none"==e.Header?hf:S(e.Header):Rd(kb,.8);if("full"==e.GridLines)Sc="border: 1px solid "+-Kd,be=19;else if("row"==e.GridLines)Sc="border-bottom: 1px solid "+Kd,be=19;else if("default"==e.GridLines||"column"==e.GridLines)Sc="border-right: 1px solid "+Kd;tc=tc.filter(function(gb){return gb});/^\{[^}]*\}$/.test(tc[tc.length-1])&&tc.pop();Fc=tc[0].split(",").length;var jf="";for(fa=0;fa<Fc-1;fa++)jf+=" , ";for(l=tc.length;l<Math.ceil(q/20);l++)tc.push(jf);for(l=0;l<tc.length;l++){Ld+='<tr style="height: '+be+"px;background:"+(0==l?Oc:l%2?kb:hf)+'">';var kf=tc[l].split(",");for(fa=0;fa<kf.length;fa++){var Md=-e["Cell_"+l+"_"+fa],Tf=Md&&Md.m&&Md.m[0]&&"c"==Md.m[0].n?S(Md.m[0].v):Kd;Ld+='<td style="height: '+be+"px;color:"+Tf+";"+Sc+'">'+mxUtils.htmlEntities(kf[fa])+"</td>"}Ld+="</tr>"}Ld+="</table>";v.value=Ld}catch(gb){console.log(gb)}break;case "UI2ButtonBarBlock":v.style+=b(v.style,e,t,v);w=[];E=[];Ha=r/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),""),E[l].vertex=!0,v.insert(E[l])):(w[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"strokeColor=none;"),-w[l].vertex=!0,v.insert(w[l]),w[l].style+=w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,q),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,t,E[l],G);break;case "UI2VerticalButtonBarBlock":v.style+=b(v.style,e,t,v);w=[];E=[];ha=q/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,l*ha,r,ha),""),E[l].vertex=!0,v.insert(E[l])):-(w[l]=new mxCell("",new mxGeometry(0,l*ha,r,ha),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,r,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,t,E[l],G);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)0!=-l?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),E[l].style+=b(E[l].style,e,t,E[l])):E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"fillColor=none;strokeColor=none;"),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Link_"+(l+1)]),E[l].style+=a(e["Link_"+(l+1)],G);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)w[l]=new mxCell("",new mxGeometry(l*-Ha,0,Ha,q),"fillColor=none;strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Link_"+(l+1)]),w[l].style+=a(e["Link_"+(l+1)],G);for(l=1;l<e.Links;l++)E[l]=new mxCell("",new mxGeometry(l/e.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),E[l].geometry.relative=!0,E[l].geometry.offset=new mxPoint(-3,-5),E[l].vertex=!0,v.insert(E[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);w=[];Ha=r/(e.Buttons+1);for(l=0;l<=e.Buttons-1;l++)w[l]=l!=e.Selected--1?new mxCell("",new mxGeometry(0,0,Ha,q),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,Ha,q),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),w[l].geometry.relative=!0,w[l].geometry.offset=new mxPoint(l*Ha,0),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["MenuItem_"+(l+1)]),w[l].style+=a(e["MenuItem_"+(l+1)],G);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";-break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_prev);v.value=m(e.Text_prev)+" ";for(l=0;l<e.Links;l++)v.value+=m(e["Link_"+(l+1)])+" ";v.value+=m(e.Text_next);break;case "UI2ContextMenuBlock":v.style+=b(v.style,e,t,v);X=[];nb=[];var jd=[];ha=q/e.Lines;ia=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ia&&(ia=""+f(e["Item_"+(l+1)])+p(e["Item_"+(l+1)])+x(e["Item_"+(l+1)])),X[l]=new mxCell("",new mxGeometry(0,l*q/e.Lines,r,ha),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia,X[l].value=m(e["Item_"+(l+1)])),null!=e.Icons[l+1]&&null!=X[l]&&("dot"==e.Icons[l+1]?(nb[l]=new mxCell("",new mxGeometry(0,.5,8,8),"ellipse;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6,-4)):"check"==e.Icons[l+1]&&(nb[l]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6.5,-4)),null!=nb[l]&&(nb[l].geometry.relative=!0,nb[l].vertex=!0,X[l].insert(nb[l]),Y=I(e,t),-Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),nb[l].style+=Y)),null!=e["Shortcut_"+(l+1)]&&(null==ia&&(ia=""+f(e["Shortcut_"+(l+1)])+p(e["Shortcut_"+(l+1)])+x(e["Shortcut_"+(l+1)])),jd[l]=new mxCell("",new mxGeometry(.6*r,l*q/e.Lines,.4*r,ha),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),jd[l].vertex=!0,v.insert(jd[l]),jd[l].style+=ia,jd[l].value=m(e["Shortcut_"+(l+1)])),null!=e.Dividers[l+1]&&(X[l]=new mxCell("",new mxGeometry(.05*r,l*q/e.Lines,.9*-r,ha),"shape=line;strokeWidth=1;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=I(e,t));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*e.ScrollVal+";";break;case "CalloutSquareBlock":case "UI2TooltipSquareBlock":v.value=m(e.Tip||e.Text);v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+e.RoundCorners+";"+a(e.Tip||e.Text,G);v.style+=b(v.style,e,t,v,G);v.geometry.height+=10;break;case "UI2CalloutBlock":v.value=-m(e.Txt);v.style+="shape=ellipse;perimeter=ellipsePerimeter;"+a(e.Txt,G);v.style+=b(v.style,e,t,v,G);break;case "UI2AlertBlock":v.value=m(e.Txt);v.style+=a(e.Txt,G);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");w.vertex=!0;v.insert(w);w.value=m(e.Title);w.style+=a(e.Title,G);w.style+=b(w.style,e,t,w,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=-new mxPoint(-25,-10);E.vertex=!0;w.insert(E);var Uf=45*e.Buttons+(10*e.Buttons-1);T=[];for(l=0;l<e.Buttons;l++)T[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),T[l].geometry.relative=!0,T[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),T[l].vertex=!0,v.insert(T[l]),T[l].value=m(e["Button_"+(l+1)]),T[l].style+=a(e["Button_"+(l+1)],G),T[l].style+=b(T[l].style,e,t,T[l],G);break;case "UMLClassBlock":if(0==e.Simple){ia=ca(e,t);db=Math.round(.75*e.TitleHeight)||25;ia=ia.replace("fillColor",-"swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ia+"startSize="+db+";"+a(e.Title,G);v.style+=b(v.style,e,t,v,G);X=[];var ue=[],wb=db/q;Wb=db;for(l=0;l<=e.Attributes;l++)0<l&&(ue[l]=new mxCell("",new mxGeometry(0,Wb,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),-Wb+=8,ue[l].vertex=!0,v.insert(ue[l])),ha=0,0==e.Attributes?ha=l=1:l<e.Attributes?(ha=e["Text"+(l+1)+"Percent"],wb+=ha):ha=1-wb,pc=Math.round((q-db)*ha)+(e.ExtraHeightSet&&1==l?.75*e.ExtraHeight:0),X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;whiteSpace=wrap;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),X[l].style+=-ia+O(e,t,X[l])+a(e["Text"+(l+1)],G),X[l].value=m(e["Text"+(l+1)])}else v.value=m(e.Title),v.style+="align=center;",v.style+=a(e.Title,G),v.style+=b(v.style,e,t,v,G);break;case "ERDEntityBlock":ia=ca(e,t);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ia+"startSize="+-db+";"+a(e.Name,G);v.style+=b(v.style,e,t,v,G);e.ShadedHeader?(ia=S(e.FillColor),je=Rd(ia,.85),v.style+="fillColor="+je+";"):v.style+=ca(e,t);X=[];wb=db/q;Wb=db;for(l=0;l<e.Fields;l++)ha=0,pc=.75*e["Field"+(l+1)+"_h"],X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),-X[l].style+=ia+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;opacity=5;":X[l].style+("fillColor=none;"+O(e,t,X[l])),X[l].value=m(e["Field"+(l+1)]);break;case "ERDEntityBlock2":ia=ca(e,t);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ia+"startSize="+db+";"+a(e.Name,G);v.style=e.ShadedHeader?-v.style+"fillColor=#e0e0e0;":v.style+ca(e,t);v.style+=b(v.style,e,t,v,G);X=[];var Ga=[];wb=db;var Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ia+a(e["Key"+(l+1)],-G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,t,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=-ia+a(e["Field"+(l+1)],G),v.style+=b(v.style,e,t,v),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,t,X[l])),X[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ia=ca(e,t);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ia+"startSize="+db+-";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ca(e,t);v.value=m(e.Name);v.style+=b(v.style,e,t,v,G);X=[];Ga=[];wb=db;Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Field"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),-Ga[l].style+=ia+a(e["Field"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,t,Ga[l])),Ga[l].value=m(e["Field"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,t,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia+a(e["Type"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,t,X[l])),X[l].value=m(e["Type"+(l+1)]),X[l].style+=b(X[l].style,e,t,X[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ia=ca(e,t);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+-ia+"startSize="+db+";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ca(e,t);v.value=m(e.Name);v.style+=b(v.style,e,t,v,G);X=[];Ga=[];var Jb=[];wb=db;Ib=30;var ce=40;null!=e.Column1&&(Ib=.75*e.Column1);null!=e.Column2&&(ce=.75*e.Column2);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),-Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ia+a(e["Key"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,t,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,t,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib-ce,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,t,X[l])),X[l].value=m(e["Field"+(l+1)]),X[l].style+=b(X[l].style,e,t,X[l],G),Jb[l]=new mxCell("",new mxGeometry(r-ce,wb,ce,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),-Jb[l].vertex=!0,v.insert(Jb[l]),Jb[l].style+=ia+a(e["Type"+(l+1)],G),Jb[l].style=1==e.AltRows&&0!=l%2?Jb[l].style+"fillColor=#000000;fillOpacity=5;":Jb[l].style+("fillColor=none;"+O(e,t,Jb[l])),Jb[l].value=m(e["Type"+(l+1)]),Jb[l].style+=b(Jb[l].style,e,t,Jb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Sa("application_system",r,q,v,e,t);break;case "GCPServiceCardAuthorizationBlock":Sa("internal_payment_authorization",r,q,v,e,t);break;case "GCPServiceCardBlankBlock":Sa("blank",-r,q,v,e,t);break;case "GCPServiceCardReallyBlankBlock":Sa("blank",r,q,v,e,t);break;case "GCPServiceCardBucketBlock":Sa("bucket",r,q,v,e,t);break;case "GCPServiceCardCDNInterconnectBlock":Sa("google_network_edge_cache",r,q,v,e,t);break;case "GCPServiceCardCloudDNSBlock":Sa("blank",r,q,v,e,t);break;case "GCPServiceCardClusterBlock":Sa("cluster",r,q,v,e,t);break;case "GCPServiceCardDiskSnapshotBlock":Sa("persistent_disk_snapshot",r,q,v,e,t);break;case "GCPServiceCardEdgePopBlock":Sa("google_network_edge_cache",-r,q,v,e,t);break;case "GCPServiceCardFrontEndPlatformServicesBlock":Sa("frontend_platform_services",r,q,v,e,t);break;case "GCPServiceCardGatewayBlock":Sa("gateway",r,q,v,e,t);break;case "GCPServiceCardGoogleNetworkBlock":Sa("google_network_edge_cache",r,q,v,e,t);break;case "GCPServiceCardImageServicesBlock":Sa("image_services",r,q,v,e,t);break;case "GCPServiceCardLoadBalancerBlock":Sa("network_load_balancer",r,q,v,e,t);break;case "GCPServiceCardLocalComputeBlock":Sa("dedicated_game_server",r,q,v,-e,t);break;case "GCPServiceCardLocalStorageBlock":Sa("persistent_disk_snapshot",r,q,v,e,t);break;case "GCPServiceCardLogsAPIBlock":Sa("logs_api",r,q,v,e,t);break;case "GCPServiceCardMemcacheBlock":Sa("memcache",r,q,v,e,t);break;case "GCPServiceCardNATBlock":Sa("nat",r,q,v,e,t);break;case "GCPServiceCardPaymentFormBlock":Sa("external_payment_form",r,q,v,e,t);break;case "GCPServiceCardPushNotificationsBlock":Sa("push_notification_service",r,q,v,e,t);break;case "GCPServiceCardScheduledTasksBlock":Sa("scheduled_tasks",-r,q,v,e,t);break;case "GCPServiceCardServiceDiscoveryBlock":Sa("service_discovery",r,q,v,e,t);break;case "GCPServiceCardSquidProxyBlock":Sa("squid_proxy",r,q,v,e,t);break;case "GCPServiceCardTaskQueuesBlock":Sa("task_queues",r,q,v,e,t);break;case "GCPServiceCardVirtualFileSystemBlock":Sa("virtual_file_system",r,q,v,e,t);break;case "GCPServiceCardVPNGatewayBlock":Sa("gateway",r,q,v,e,t);break;case "GCPInputDatabase":Wa("database",1,.9,r,q,v,e,t);break;case "GCPInputRecord":Wa("record",1,.66,r,q,v,-e,t);break;case "GCPInputPayment":Wa("payment",1,.8,r,q,v,e,t);break;case "GCPInputGateway":Wa("gateway_icon",1,.44,r,q,v,e,t);break;case "GCPInputLocalCompute":Wa("compute_engine_icon",1,.89,r,q,v,e,t);break;case "GCPInputBeacon":Wa("beacon",.73,1,r,q,v,e,t);break;case "GCPInputStorage":Wa("storage",1,.8,r,q,v,e,t);break;case "GCPInputList":Wa("list",.89,1,r,q,v,e,t);break;case "GCPInputStream":Wa("stream",1,.82,r,q,v,e,t);break;case "GCPInputMobileDevices":Wa("mobile_devices",1,.73,r,q,v,e,t);break;-case "GCPInputCircuitBoard":Wa("circuit_board",1,.9,r,q,v,e,t);break;case "GCPInputLive":Wa("live",.74,1,r,q,v,e,t);break;case "GCPInputUsers":Wa("users",1,.63,r,q,v,e,t);break;case "GCPInputLaptop":Wa("laptop",1,.66,r,q,v,e,t);break;case "GCPInputApplication":Wa("application",1,.8,r,q,v,e,t);break;case "GCPInputLightbulb":Wa("lightbulb",.7,1,r,q,v,e,t);break;case "GCPInputGame":Wa("game",1,.54,r,q,v,e,t);break;case "GCPInputDesktop":Wa("desktop",1,.9,r,q,v,e,t);break;case "GCPInputDesktopAndMobile":Wa("desktop_and_mobile",-1,.66,r,q,v,e,t);break;case "GCPInputWebcam":Wa("webcam",.5,1,r,q,v,e,t);break;case "GCPInputSpeaker":Wa("speaker",.7,1,r,q,v,e,t);break;case "GCPInputRetail":Wa("retail",1,.89,r,q,v,e,t);break;case "GCPInputReport":Wa("report",1,1,r,q,v,e,t);break;case "GCPInputPhone":Wa("phone",.64,1,r,q,v,e,t);break;case "GCPInputBlank":Wa("transparent",1,1,r,q,v,e,t);break;case "PresentationFrameBlock":0==e.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=a(e.Text),v.value=m(e.Text),v.style+=b(v.style,-e,t,v,G));break;case "SVGPathBlock2":try{var Vf=e.LineWidth,Wf=e.LineColor,lf=e.FillColor,mf=e.DrawData.Data,de='<svg viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg">',ve=null;for(l=0;l<mf.length;l++){var uc=mf[l],Xf=uc.a,Yf=("prop"==uc.w||null==uc.w?Vf:uc.w)/Math.min(r,q)*.75;Rc="prop"==uc.s||null==uc.s?Wf:uc.s;Y="prop"==uc.f||null==uc.f?lf:uc.f;"object"==typeof Y&&(null!=Y.url&&(ve="shape=image;image="+g(Y.url)+";"),Y=Array.isArray(Y.cs)?Y.cs[0].c:lf);de+='<path d="'+Xf+'" fill="'+Y+'" stroke="'+-Rc+'" stroke-width="'+Yf+'"/>'}de+="</svg>";v.style=ve?ve:"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+(window.btoa?btoa(de):Base64.encode(de,!0))+";"}catch(gb){}break;case "BraceBlock":case "BraceBlockRotated":case "BracketBlock":case "BracketBlockRotated":var nf=0==V.indexOf("Bracket")?"size=0;arcSize=50;":"",of=b(v.style,e,t,v,G);mb=ba(e,t,v);v.style="group;"+mb;var we=Math.min(.14*(mb?r:q),100),xe=-new mxCell("",new mxGeometry(0,0,we,q),"shape=curlyBracket;rounded=1;"+nf+of);xe.vertex=!0;xe.geometry.relative=!0;var ye=new mxCell("",new mxGeometry(1-we/r,0,we,q),"shape=curlyBracket;rounded=1;flipH=1;"+nf+of);ye.vertex=!0;ye.geometry.relative=!0;v.insert(xe);v.insert(ye);break;case "BPMNTextAnnotation":case "NoteBlock":e.InsetMargin=null;v.value=m(e.Text);v.style="group;spacingLeft=8;align=left;spacing=0;strokeColor=none;";v.style+=b(v.style,e,t,v,G);0>v.style.indexOf("verticalAlign")&&(v.style+=-"verticalAlign=middle;");var kd=new mxCell("",new mxGeometry(0,0,8,q),"shape=partialRectangle;right=0;fillColor=none;");kd.geometry.relative=!0;kd.vertex=!0;kd.style+=b(kd.style,e,t,v,G);v.insert(kd);break;case "VSMTimelineBlock":case "TimelineBlock":case "TimelineMilestoneBlock":case "TimelineIntervalBlock":LucidImporter.hasTimeLine=!0;LucidImporter.hasUnknownShapes=!0;break;case "FreehandBlock":try{mb=ba(e,t,v);v.style="group;"+mb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",-Ke(e.Stencil.id,e.Stencil));var Ob=LucidImporter.stencilsMap[e.Stencil.id],Zf=-Ob.x/Ob.w,$f=-Ob.y/Ob.h;for(l=0;l<Ob.stencils.length;l++){var ob=Ob.stencils[l];oa=new mxCell("",new mxGeometry(Zf,$f,r,q),"shape="+ob.shapeStencil+";");var ag=ob.FillColor,bg=ob.LineColor,cg=ob.LineWidth;"prop"==ob.FillColor&&(ob.FillColor=e.FillColor);null==ob.FillColor&&(ob.FillColor="#ffffff00");"prop"==ob.LineColor&&(ob.LineColor=e.LineColor);null==ob.LineColor&&(ob.LineColor="#ffffff00");"prop"==ob.LineWidth&&(ob.LineWidth=-e.LineWidth);oa.style+=b(oa.style,ob,t,oa,G);ob.FillColor=ag;ob.LineColor=bg;ob.LineWidth=cg;Y=e.FillColor;var dg=e.LineColor,eg=e.LineWidth;e.FillColor=null;e.LineColor=null;e.LineWidth=null;oa.style+=b(oa.style,e,t,oa,G);e.FillColor=Y;e.LineColor=dg;e.LineWidth=eg;oa.vertex=!0;oa.geometry.relative=!0;v.insert(oa)}var Xb=0;for(mb=e.Rotation;e["t"+Xb];){var pf=e["t"+Xb],qf=m(pf);if(qf){ra=new mxCell(qf,new mxGeometry(0,0,r,q),"strokeColor=none;fillColor=none;overflow=visible;");e.Rotation=0;ra.style+=-b(ra.style,pf,t,ra,G);ra.style+=b(ra.style,e,t,ra,G);e.Rotation=mb;if(null!=Ob.text&&null!=Ob.text["t"+Xb]){var eb=Ob.text["t"+Xb];eb.Rotation=mb+(eb.rotation?eb.rotation:0)+(e["t"+Xb+"_TRotation"]?e["t"+Xb+"_TRotation"]:0)+(e["t"+Xb+"_TAngle"]?e["t"+Xb+"_TAngle"]:0);ra.style+=b(ra.style,eb,t,ra,G);var Yb=ra.geometry;eb.w&&(Yb.width*=eb.w/Ob.w);eb.h&&(Yb.height*=eb.h/Ob.h);eb.x&&(Yb.x=eb.x/Ob.w);eb.y&&(Yb.y=eb.y/Ob.h);eb.fw&&(Yb.width*=.75*eb.fw/r);eb.fh&&(Yb.height*=.75*eb.fh/q);eb.fx&&(Yb.x=(0<-eb.fx?1:0)+.75*eb.fx/r);eb.fy&&(Yb.y=(0<eb.fy?1:0)+.75*eb.fy/q)}ra.vertex=!0;ra.geometry.relative=!0;v.insert(ra)}Xb++}}if(e.FillColor&&e.FillColor.url){var Nd=new mxCell("",new mxGeometry(0,0,r,q),"shape=image;html=1;");Nd.style+=Fa({},{},e.FillColor.url);Nd.vertex=!0;Nd.geometry.relative=!0;v.insert(Nd)}}catch(gb){console.log("Freehand error",gb)}break;case "RightArrowBlock":var ze=e.Head*q/r;v.style="shape=singleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=b(v.style,-e,t,v,G);break;case "DoubleArrowBlock":ze=e.Head*q/r;v.style="shape=doubleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=b(v.style,e,t,v,G);break;case "VPCSubnet2017":case "VirtualPrivateCloudContainer2017":case "ElasticBeanStalkContainer2017":case "EC2InstanceContents2017":case "AWSCloudContainer2017":case "CorporateDataCenterContainer2017":switch(V){case "VPCSubnet2017":var ld="shape=mxgraph.aws3.permissions;fillColor=#D9A741;";var md=30;var nd=35;break;case "VirtualPrivateCloudContainer2017":ld=+"fillOpacity")||If;r=Cd[fa];var cf=p;Yc=r;for(var Mb=l+1;Mb<l+Xd.h;Mb++)if(null!=Vd[Mb]){cf+=Vd[Mb];Dd[Mb+","+fa]=!0;for(var Tc=fa+1;Tc<fa+Xd.w;Tc++)Dd[Mb+","+Tc]=!0}for(Mb=fa+1;Mb<fa+Xd.w;Mb++)if(null!=Cd[Mb])for(Yc+=Cd[Mb],Dd[l+","+Mb]=!0,Tc=l+1;Tc<l+Xd.h;Tc++)Dd[Tc+","+Mb]=!0;var oa=new mxCell("",new mxGeometry(Z,aa,Yc,cf),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Hf?"left=0;right=0;":"")+(Wd?"top=0;bottom=0;":"")+ca({FillColor:kb||We})+Zb(mxConstants.STYLE_STROKECOLOR,T($e),+T(Ye))+(null!=bf?Zb(mxConstants.STYLE_STROKEWIDTH,Math.round(.75*parseFloat(bf)),"1"):"")+(af?af:Jf)+Rf+"verticalAlign="+(Ze?Ze:Ve?Ve:"middle")+";"+qa({StrokeStyle:Sc?Sc:Xe?Xe:"solid"})+(Kf?"horizontal=0;":""));oa.vertex=!0;oa.value=m(qc);oa.style+=b(oa.style,e,u,oa,G)+(G?"fontSize=13;":f(qc)+q(qc)+t(qc)+C(qc,oa)+I(qc)+M(qc)+K(qc)+Q(qc))+S(qc)+H(qc);v.insert(oa);Z+=r}}aa+=p}}catch(gb){console.log(gb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";+"VSMDedicatedProcessBlock"==w.Class?v.value=m(e.Text):"VSMProductionControlBlock"==w.Class&&(v.value=m(e.Resources));v.style+=b(v.style,e,u,v,G);"VSMDedicatedProcessBlock"==w.Class&&(x=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(4,-13),x.vertex=!0,v.insert(x),x.style+=b(x.style,e,u,x));Da=new mxCell("",new mxGeometry(0,0,r,15),"strokeColor=none;fillColor=none;part=1;");Da.vertex=!0;v.insert(Da);Da.value=+m(e.Title);Da.style+=a(e.Title,G);e.Text=null;break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);Da=new mxCell("",new mxGeometry(.1*r,.3*p,.8*r,.6*p),"part=1;");Da.vertex=!0;v.insert(Da);Da.value=m(e.Resource);Da.style+=a(e.Resource,G);Da.style+=b(Da.style,e,u,Da,G);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Bb=p;bc=parseInt(e.Cells);ia=b("part=1;",e,u,v);0<bc&&(Bb/=bc);X=[];Qa=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),ia),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["cell_"+l]),X[l].style+=a(e["cell_"+l],G);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);Bb=p;bc=parseInt(e.Cells);ia=b("part=1;fillColor=none;",e,u,v);0<bc&&(Bb/=bc);X=[];Ub=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Bb,.5*r,Bb),"shape=partialRectangle;left=0;"+ia),X[l].vertex=!0,v.insert(X[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),"strokeColor=none;fillColor=none;part=1;"),Ub[l].vertex=!0,v.insert(Ub[l]),Ub[l].value=+m(e["cell_"+l]),Ub[l].style+=a(e["cell_"+l],G);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=b(v.style,e,u,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.17*r,.2*p,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");x.vertex=!0;v.insert(x);+x.style+=b(x.style,e,u,x);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ia="shape=card;size=18;flipH=1;part=1;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.1*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);E.vertex=!0;v.insert(E);E.style+=b(E.style,+e,u,E);var U=new mxCell("",new mxGeometry(0,.2*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ia);U.vertex=!0;v.insert(U);U.value=m(e.Text);U.style+=b(U.style,e,u,U,G);break;case "VSMElectronicInformationArrow":v.style="group;";v.value=m(e.Title);v.style+=a(e.Title,G);var va=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;entryX=0;entryY=1;exitX=1;exitY=0;");va.edge=!0;va.geometry.relative=+1;D.addCell(va,v,null,v,v);break;case "AWSRoundedRectangleContainerBlock2":case "AWSRoundedRectangleContainerBlock":v.style+="strokeColor=none;fillColor=none;";e.Spotfleet?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,35,40),+"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Beanstalk?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),+E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.EC2?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),E.geometry.relative=+!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Subnet?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=+new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.VPC?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,+0),E.vertex=!0,v.insert(E)):e.AWS?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):+e.Corporate?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):+(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.value=m(e.Title),v.style+=b(v.style,e,u,v,G));break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;";+v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";oa=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");oa.vertex=!0;v.insert(oa);var Oa=[oa];oa.style+=ca(e,u);va=new mxCell("",new mxGeometry(0,+0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;sc(.5*r,0,va,F,D,Oa,v,oa);sc(.855*r,.145*p,va,F,D,Oa,v,oa);sc(r,.5*p,va,F,D,Oa,v,oa);sc(.855*r,.855*p,va,F,D,Oa,v,oa);sc(.5*r,p,va,F,D,Oa,v,oa);sc(.145*r,.855*p,va,F,D,Oa,v,oa);sc(0,.5*p,va,F,D,Oa,v,oa);sc(.145*r,.145*p,va,F,D,Oa,v,oa);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";oa=new mxCell("",new mxGeometry(0,.5*p-10,r,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");+oa.vertex=!0;v.insert(oa);Oa=[oa];va=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;Oa=[oa];var Ed=r/e.NumTopNodes;for(l=0;l<e.NumTopNodes;l++)sc(.5*Ed+l*Ed,0,va,F,D,Oa,v,oa);Ed=r/e.NumBottomNodes;for(l=0;l<e.NumBottomNodes;l++)sc(.5*Ed+l*Ed,p,va,F,D,Oa,v,oa);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);+e.ToggleCharge&&(v.style+="flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);"EIMessageChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIDatatypeChannelBlock"==+w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIInvalidMessageChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIDeadLetterChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),x.geometry.offset=+new mxPoint(.45*-r,0)):"EIGuaranteedDeliveryBlock"==w.Class&&(x=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(-10,-7));x.geometry.relative=!0;x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);va=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");va.geometry.relative=!0;va.edge=!0;fb(.15*r,.25*p,.85*r,.25*p,va,F,D,Oa,v,oa);break;+case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.07*p,.21*r,.86*p),"fillColor=#FFFF33;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.26*r,.09*p,.2*r,.82*p),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");+U.geometry.relative=!0;U.geometry.offset=new mxPoint(.4*-r,-10);U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");ea.geometry.relative=!0;ea.edge=!0;x.insertEdge(ea,!0);E.insertEdge(ea,!1);ea.style+=J(e,u);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");+da.geometry.relative=!0;da.edge=!0;E.insertEdge(da,!0);U.insertEdge(da,!1);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);var Fd=+e.Messages,oe=(p-17)/Fd;E=[];va=[];for(l=0;l<Fd;l++){var Gd=oe*(l+1)-3;E[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;");E[l].vertex=!0;v.insert(E[l]);switch(w.Class){case "EIMessageBlock":E[l].value=m(e["message_"+(l+1)]);E.style+=a(e["message_"+(l+1)],G);break;case "EICommandMessageBlock":E[l].value="C";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIDocumentMessageBlock":E[l].value="D";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIEventMessageBlock":E[l].value="E",E[l].style+=+"fontStyle=1;fontSize=13;"}E[l].style+=b(E[l].style,e,u,E[l]);va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");va[l].geometry.relative=!0;va[l].edge=!0;x.insertEdge(va[l],!1);E[l].insertEdge(va[l],!0);va[l].style+=b(va[l].style,e,u,va[l]);var Kc=[];Kc.push(new mxPoint(Z+8.5,aa+Gd+10));va[l].geometry.points=Kc;F.push(D.addCell(va[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.45*r,.25*p,.3*r,.5*p),"part=1;fillColor=#ffffff");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);va=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");va.geometry.relative=!0;va.edge=!0;fb(0,.5*p,.4*r,.5*p,va,F,D,Oa,v,oa);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);var ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");ea.geometry.relative=!0;ea.edge=!0;fb(.05*r,.5*p,.85*r,.5*p,ea,F,D,Oa,v,oa);var da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.05*r,.5*p,.85*+r,.15*p,da,F,D,Oa,v,oa);var xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");xa.geometry.relative=!0;xa.edge=!0;fb(.05*r,.5*p,.85*r,.85*p,xa,F,D,Oa,v,oa);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");+ea.geometry.relative=!0;ea.edge=!0;ea.style+=J(e,u);fb(.05*r,.5*p,.95*r,.5*p,ea,F,D,Oa,v,oa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");da.geometry.relative=!0;da.edge=!0;da.style+=J(e,u);fb(.3*r,.1*p,.3*r,.5*p,da,F,D,Oa,v,oa);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");+xa.geometry.relative=!0;xa.edge=!0;xa.style+=J(e,u);fb(.7*r,.1*p,.7*r,.5*p,xa,F,D,Oa,v,oa);var Ya=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");Ya.geometry.relative=!0;Ya.edge=!0;Ya.style+=J(e,u);fb(.5*r,.5*p,.5*r,.9*p,Ya,F,D,Oa,v,oa);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,+e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.21*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");ea.geometry.relative=!0;ea.edge=!0;fb(.45*r,.33*p,.8*r,.33*p,ea,F,D,Oa,v,oa);E=new mxCell("",new mxGeometry(.64*r,.55*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");E.vertex=!0;v.insert(E);E.style+=b(E.style,+e,u,E);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.55*r,.67*p,.2*r,.67*p,da,F,D,Oa,v,oa);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.1*r,.15*p,.8*r,.7*p),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");x.vertex=!0;v.insert(x);+x.style+=b(x.style,e,u,x);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.04*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.2*r,.56*p,.2*r,.32*p),"part=1;");E.vertex=!0;v.insert(E);E.value="A";E.style+="fontStyle=1;fontSize=13;";x.style+=b(x.style,e,u,x);ea=new mxCell("",new mxGeometry(0,+0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");ea.geometry.relative=!0;ea.edge=!0;x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.style+=b(ea.style,e,u,ea);Kc=[];Kc.push(new mxPoint(Z+.13*r,aa+.72*p));ea.geometry.points=Kc;F.push(D.addCell(ea,null,null,null,null));U=new mxCell("",new mxGeometry(.6*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");U.vertex=!0;v.insert(U);U.style+=J(e,u)+sa(e);U.style+=b(U.style,e,u,U);ta=new mxCell("",new mxGeometry(.76*+r,.56*p,.2*r,.32*p),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=J(e,u)+O(e,u,ta)+sa(e)+qa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=b(ta.style,e,u,ta);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");da.geometry.relative=!0;da.edge=!0;U.insertEdge(da,!1);ta.insertEdge(da,!0);da.style+=b(da.style,e,u,da);var df=[];df.push(new mxPoint(Z+.69*r,aa+.72*p));da.geometry.points=+df;F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("1",new mxGeometry(.2*r,.4*p,.1*r,.19*p),+"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("2",new mxGeometry(.45*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("3",new mxGeometry(.7*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);ea=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");+x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.geometry.points=[new mxPoint(Z+.375*r,aa+.15*p)];ea.geometry.relative=!0;ea.edge=!0;ea.style+=b(ea.style,e,u,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");E.insertEdge(da,!1);U.insertEdge(da,!0);da.geometry.points=[new mxPoint(Z+.675*r,aa+.15*p)];da.geometry.relative=!0;da.edge=!0;da.style+=b(da.style,e,u,da);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=+"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.3*r,.2*p,.4*r,.6*p),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.38*r,.42*p,.24*r,.16*p),"part=1;fillColor=#aefe7d;");+x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*p),"part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("",new mxGeometry(.76*r,.23*p,.24*r,.16*p),"");U.vertex=!0;v.insert(U);U.style=E.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*p,.24*r,.16*p),"");ta.vertex=!0;v.insert(ta);ta.style=E.style;var Yd=new mxCell("",new mxGeometry(.38*r,.84*p,.24*r,.16*p),"");Yd.vertex=!0;v.insert(Yd);Yd.style=E.style;var Zd=new mxCell("",new mxGeometry(0,+.61*p,.24*r,.16*p),"");Zd.vertex=!0;v.insert(Zd);Zd.style=E.style;var $d=new mxCell("",new mxGeometry(0,.23*p,.24*r,.16*p),"");$d.vertex=!0;v.insert($d);$d.style=E.style;ea=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.edge=!0;ea.style+=b(ea.style,e,u,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(da,!1);U.insertEdge(da,!0);da.edge=!0;da.style+=b(da.style,e,u,da);+F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(xa,!1);ta.insertEdge(xa,!0);xa.edge=!0;xa.style+=b(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));Ya=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Ya,!1);Yd.insertEdge(Ya,!0);Ya.edge=!0;Ya.style+=b(Ya.style,e,u,Ya);F.push(D.addCell(Ya,null,null,null,null));var Lc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Lc,+!1);Zd.insertEdge(Lc,!0);Lc.edge=!0;Lc.style+=b(Lc.style,e,u,Lc);F.push(D.addCell(Lc,null,null,null,null));var Mc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Mc,!1);$d.insertEdge(Mc,!0);Mc.edge=!0;Mc.style+=b(Mc.style,e,u,Mc);F.push(D.addCell(Mc,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");+ea.geometry.relative=!0;ea.edge=!0;fb(.05*r,.5*p,.6*r,.25*p,ea,F,D,Oa,v,oa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.05*r,.5*p,.6*r,.75*p,da,F,D,Oa,v,oa);x=new mxCell("",new mxGeometry(.7*r,.1*p,.15*r,.32*p),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"shape=mxgraph.eip.control_bus;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);U=new mxCell("",+new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);xa.geometry.points=[new mxPoint(Z+8.5,aa+40)];F.push(D.addCell(xa,null,null,null,null));ta=new mxCell("",new mxGeometry(r-45,+p-20,20,20),"part=1;");ta.vertex=!0;v.insert(ta);ta.value=m(e.message_0);ta.style+=a(e.message_0,G);ta.style+=b(ta.style,e,u,ta,G);Ya=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");Ya.geometry.relative=!0;Ya.edge=!0;x.insertEdge(Ya,!1);ta.insertEdge(Ya,!0);Ya.style+=b(Ya.style,e,u,Ya);Ya.geometry.points=[new mxPoint(Z+8.5,aa+p-10)];F.push(D.addCell(Ya,null,null,null,null));Fd=e.HistoryMessages;oe=(p-75)/Fd;E=[];va=+[];for(l=0;l<Fd;l++)Gd=oe*(l+1)+30,E[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;"),E[l].vertex=!0,E[l].value=m(e["message_"+(l+1)]),E.style+=a(e["message_"+(l+1)],G),v.insert(E[l]),E[l].style+=b(E[l].style,e,u,E[l],G),va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),va[l].geometry.relative=!0,va[l].edge=!0,U.insertEdge(va[l],!1),E[l].insertEdge(va[l],!0),va[l].style+=b(va[l].style,e,u,va[l]),Kc=[],Kc.push(new mxPoint(Z++r-30,aa+Gd+10)),va[l].geometry.points=Kc,F.push(D.addCell(va[l],null,null,null,null));break;case "Equation":LucidImporter.hasMath=!0;v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);v.value="$$"+e.Latex+"$$";break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,u,v);break;case "fpWall":v.style+="labelPosition=center;verticalAlign=bottom;verticalLabelPosition=top;";v.value=m(e);v.style+=b(v.style,e,u,v,G);v.style=v.style.replace("rotation=180;",+"");break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,u,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,r,.25*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=[];var ef=.02*r,pe=(r-2*ef)/e.LightCount,ff=.8*pe;for(l=0;l<e.LightCount;l++)E[l]=new mxCell("",new mxGeometry(ef+pe*l+(pe-ff)/2,.25*p,ff,.75*p),"ellipse;part=1;"),+E[l].vertex=!0,v.insert(E[l]),E[l].style+=b(E[l].style,e,u,E[l]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];var gf=r/e.SinkCount;for(l=0;l<e.SinkCount;l++)x[l]=new mxCell("",new mxGeometry(gf*l,0,gf,p),"part=1;shape=mxgraph.floorplan.sink_2;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Eb=.1*r/e.StallCount;x=new mxCell("",new mxGeometry(0,+0,Eb,p),"fillColor=#000000;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);var Nb=(r-Eb)/e.StallCount,qe=[],Hd=[],Id=[],Jd=[];Y=J(e,u);Y=""==Y?"#000000;":Y.replace("stokreColor=","");var re="part=1;fillColor="+Y;re+=b(re,e,u,v);var se=b("",e,u,v);for(l=0;l<e.StallCount;l++)qe[l]=new mxCell("",new mxGeometry((l+1)*Nb,0,Eb,p),re),qe[l].vertex=!0,v.insert(qe[l]),Id[l]=new mxCell("",new mxGeometry(Eb+l*Nb+.05*(Nb-Eb),p-.92*(Nb-Eb),.9*(Nb-Eb),.92*(Nb-Eb)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),+Id[l].vertex=!0,v.insert(Id[l]),Id[l].style+=se,Hd[l]=new mxCell("",new mxGeometry(Eb+l*Nb+.2*(Nb-Eb),0,.6*(Nb-Eb),.8*(Nb-Eb)),"shape=mxgraph.floorplan.toilet;part=1;"),Hd[l].vertex=!0,v.insert(Hd[l]),Hd[l].style+=se,Jd[l]=new mxCell("",new mxGeometry(Eb+l*Nb,.42*p,.15*(Nb-Eb),.12*(Nb-Eb)),"part=1;"),Jd[l].vertex=!0,v.insert(Jd[l]),Jd[l].style+=se;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var ae="edgeStyle=none;endArrow=none;part=1;";Y=J(e,u);Y=""==Y?"#000000;":Y.replace("strokeColor=",+"");var Uc="shape=triangle;part=1;fillColor="+Y;Uc+=b(Uc,e,u,v);ea=new mxCell("",new mxGeometry(0,0,0,0),ae);ea.geometry.relative=!0;ea.edge=!0;fb(0,.5*p,.65*r,.5*p,ea,F,D,Oa,v,oa);var ha=p/e.numLines;da=[];var Vc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),da[l].geometry.relative=!0,da[l].edge=!0,fb(.65*r,.5*p,.96*r,(l+.5)*ha,da[l],F,D,Oa,v,oa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ha,.05*r,.6*ha),Uc),Vc[l].vertex=!0,v.insert(Vc[l]);break;case "PEMultilines":v.style+=+"strokeColor=none;fillColor=none;";ae="edgeStyle=none;endArrow=none;part=1;";Y=J(e,u);Y=""==Y?"#000000;":Y.replace("strokeColor=","");Uc="shape=triangle;part=1;fillColor="+Y;Uc+=b(Uc,e,u,v);ha=p/e.numLines;da=[];Vc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),da[l].geometry.relative=!0,da[l].edge=!0,fb(0,(l+.5)*ha,.96*r,(l+.5)*ha,da[l],F,D,Oa,v,oa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ha,.05*r,.6*ha),Uc),Vc[l].vertex=!0,v.insert(Vc[l]);break;case "PEVesselBlock":v.style+=+"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);switch(e.vesselType){case 1:v.style+="shape=mxgraph.pid.vessels.pressurized_vessel;";break;case 2:v.style+="shape=hexagon;perimeter=hexagonPerimeter2;size=0.10;direction=south;"}v.style+=b(v.style,e,u,v,G);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);1==e.peakedRoof&&0==e.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==e.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");+v.style+=b(v.style,e,u,v,G);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style=0==e.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";v.style+=b(v.style,e,u,v,G);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.2*p,r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");+x.vertex=!0;v.insert(x);x.style+=ia;x.style+=b(x.style,e,u,x);ia="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=!0,ea.edge=!0,ea.style+=ia,ea.style+=b(ea.style,e,u,ea),fb(0,0,0,.2*p,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ia,da.style+=b(da.style,e,u,da),fb(r,.67*p,r,p,da,F,D,Oa,v,oa)):(x.style+="flipH=1;",ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=+!0,ea.edge=!0,ea.style+=ia,ea.style+=b(ea.style,e,u,ea),fb(0,0,0,.33*p,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ia,da.style+=b(da.style,e,u,da),fb(r,.8*p,r,p,da,F,D,Oa,v,oa));1==e.centerLineType&&(xa=new mxCell("",new mxGeometry(0,0,0,0),""),xa.geometry.relative=!0,xa.edge=!0,xa.style+=ia,xa.style+=b(xa.style,e,u,xa),fb(.2*r,.5*p,.8*r,.5*p,xa,F,D,Oa,v,oa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.2*p,.6*r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(w.Class){case "PEIndicatorBlock":v.style+="shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+=+"shape=mxgraph.pid2inst.indicator;indType=inst;";break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+="shape=mxgraph.pid2inst.progLogCont;"}v.style+=b(v.style,e,u,v);"PEIndicator2Block"==w.Class||"PESharedIndicator2Block"==w.Class?(x=new mxCell("",+new mxGeometry(0,0,r,.5*r),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,.5*r,r,.5*r),"part=1;strokeColor=none;fillColor=none;")):(x=new mxCell("",new mxGeometry(0,0,r,.5*p),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,.5*p,r,.5*p),"part=1;strokeColor=none;fillColor=none;"));+E.vertex=!0;v.insert(E);E.value=m(e.BotText);E.style+=a(e.BotText,G);E.style+=b(E.style,e,u,E,G);switch(e.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var te=!1;"PEPoweredValveBlock"==w.Class?1!=e.poweredHandOperated&&(te=!0):1!=+e.handOperated&&(te=!0);if(te){e=h(w).Properties;P=e.BoundingBox;var Sf=P.h;P.h="PEAngleValveBlock"==w.Class||"PEAngleGlobeValveBlock"==w.Class?.7*P.h:.6*P.h;v=new mxCell("",new mxGeometry(Math.round(.75*P.x+wc),Math.round(.75*(P.y+Sf-P.h)+xc),Math.round(.75*P.w),Math.round(.75*P.h)),"");v.vertex=!0;Qb(v,w,D)}if("PEPoweredValveBlock"==w.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",v.style+=b(v.style,e,u,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",+x=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*p),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),x.vertex=!0,v.insert(x),x.value=m(e.PoweredText),x.style+=(G?"":q(e.PoweredText)+t(e.PoweredText)+C(e.PoweredText)+I(e.PoweredText)+M(e.PoweredText)+Q(e.PoweredText)+S(e.PoweredText))+"fontSize=6;"+H(e.PoweredText),x.style+=b(x.style,e,u,x,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=m(e.Text);switch(w.Class){case "PEGateValveBlock":v.style+=+"valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==e.handOperated&&(v.style+="actuator=man;")}v.style+=b(v.style,e,u,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):+new mxCell("",new mxGeometry(1,0,20,p-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,110),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),+ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v);break;case "UI2WindowBlock":v.value=m(e.Title);v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+(G?"fontSize=13;":f(e.Title)+q(e.Title)+t(e.Title));1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,+0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,30),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=+!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v,G);break;case "UI2DialogBlock":v.value=m(e.Text);v.style+=a(e.Text,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=b(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=new mxPoint(-25,-10);+E.vertex=!0;x.insert(E);1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,30),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,+1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v);e.Text=null;break;case "UI2AccordionBlock":x=[];ha=25;for(l=0;l<=e.Panels-1;l++)x[l]=l<e.Selected-1?new mxCell("",new mxGeometry(0,l*ha,r,ha),"part=1;fillColor=#000000;fillOpacity=25;"):+l==e.Selected-1?new mxCell("",new mxGeometry(0,l*ha,r,ha),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,p-(e.Panels-e.Selected)*ha+(l-e.Selected)*ha,r,ha),"part=1;fillColor=#000000;fillOpacity=25;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Panel_"+(l+1)]),x[l].style+=a(e["Panel_"+(l+1)],G),0>x[l].style.indexOf(";align=")&&(x[l].style+="align=left;spacingLeft=5;");var Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?+new mxCell("",new mxGeometry(1,0,20,p-e.Selected*ha-20-(e.Panels-e.Selected)*ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-e.Selected*ha-(e.Panels-e.Selected)*ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,e.Selected*ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,+e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*ha),U.vertex=!0,v.insert(U),U.style+=Ua,U.style+=b(U.style,e,u,U));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,e.Selected*ha,r-20,p-e.Selected*ha-+20-(e.Panels-e.Selected)*ha),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*ha,r-20,p-e.Selected*ha-(e.Panels-e.Selected)*ha),"part=1;fillColor=none;strokeColor=none;");ta.vertex=!0;v.insert(ta);ta.value=m(e.Content_1);ta.style+=a(e.Content_1,G);!G&&0>ta.style.indexOf(";align=")&&(ta.style+="align=left;spacingLeft=5;");v.style+=b(v.style,e,u,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];ha=25;var Hb=3,Ha=(r+Hb)/+(e.Tabs+1),hb=new mxCell("",new mxGeometry(0,ha,r,p-ha),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Hb,ha),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Hb,ha),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Hb,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=+!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,e,u,E[l]);Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),+E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=+Ua,U.style+=b(U.style,e,u,U));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];ha=25;Hb=3;Ha=(r+Hb)/e.Tabs;hb=new mxCell("",new mxGeometry(0,ha,r,p-ha),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=+b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Hb,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;");Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):+new mxCell("",new mxGeometry(1,0,20,p-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),+U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Ua,U.style+=b(U.style,e,u,U));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];Hb=3;ha=25+Hb;Ha=80;zc=10;hb=new mxCell("",new mxGeometry(Ha,0,r-Ha,p),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,zc+l*ha,Ha,ha-Hb),""),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Tab_"++(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G)):(x[l]=new mxCell("",new mxGeometry(0,zc+l*ha,Ha,ha-Hb),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,ha-Hb),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G)),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,+e,u,E[l]);Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,0),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",+E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(Ha,1,r-20-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(Ha,1,r-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Ua,U.style+=b(U.style,e,u,U));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";+ha=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,l*ha+.5*ha-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=J(e,u),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,+2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(l*Ha,.5*p-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=+a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=J(e,u),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";ha=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,+l*ha+.5*ha-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=J(e,u),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"ellipse;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Y,E[l].style+=+b(E[l].style,e,u,E[l]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(l*Ha,.5*p-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=J(e,u),+Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"ellipse;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2SelectBlock":v.style+="shape=mxgraph.mockup.forms.comboBox;strokeColor=#999999;fillColor=#ddeeff;align=left;fillColor2=#aaddff;mainText=;fontColor=#666666";v.value=m(e.Selected);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+="shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;";+"UI2VSliderBlock"==w.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";v.style+=b(v.style,e,u,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(0,0,.6*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Date);x.style+=a(e.Date,G);v.style+=b(v.style,e,u,v);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");E=new mxCell("",new mxGeometry(.75*r,0,.25*r,p),"part=1;shape=mxgraph.gmdl.calendar;");+E.vertex=!0;v.insert(E);E.style+=Y;E.style+=b(E.style,e,u,E);break;case "UI2SearchBlock":v.value=m(e.Search);v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+a(e.Search,G);v.style+=b(v.style,e,u,v,G);break;case "UI2NumericStepperBlock":Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");v.value=m(e.Number);v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"++Y+a(e.Number,G);v.style+=b(v.style,e,u,v,G);break;case "UI2TableBlock":try{kb=T(e.FillColor);var Kd=T(e.LineColor);Sc="";var be=20;v.style="html=1;overflow=fill;verticalAlign=top;spacing=0;";var Ld='<table style="width:100%;height:100%;border-collapse: collapse;border: 1px solid '+Kd+';">',tc=e.Data.split("\n");var hf=e.AltRow&&"default"!=e.AltRow?"none"==e.AltRow?kb:T(e.AltRow):Rd(kb,.95);Oc=e.Header&&"default"!=e.Header?"none"==e.Header?hf:T(e.Header):Rd(kb,.8);if("full"==e.GridLines)Sc="border: 1px solid "++Kd,be=19;else if("row"==e.GridLines)Sc="border-bottom: 1px solid "+Kd,be=19;else if("default"==e.GridLines||"column"==e.GridLines)Sc="border-right: 1px solid "+Kd;tc=tc.filter(function(gb){return gb});/^\{[^}]*\}$/.test(tc[tc.length-1])&&tc.pop();Fc=tc[0].split(",").length;var jf="";for(fa=0;fa<Fc-1;fa++)jf+=" , ";for(l=tc.length;l<Math.ceil(p/20);l++)tc.push(jf);for(l=0;l<tc.length;l++){Ld+='<tr style="height: '+be+"px;background:"+(0==l?Oc:l%2?kb:hf)+'">';var kf=tc[l].split(",");for(fa=0;fa<kf.length;fa++){var Md=+e["Cell_"+l+"_"+fa],Tf=Md&&Md.m&&Md.m[0]&&"c"==Md.m[0].n?T(Md.m[0].v):Kd;Ld+='<td style="height: '+be+"px;color:"+Tf+";"+Sc+'">'+mxUtils.htmlEntities(kf[fa])+"</td>"}Ld+="</tr>"}Ld+="</table>";v.value=Ld}catch(gb){console.log(gb)}break;case "UI2ButtonBarBlock":v.style+=b(v.style,e,u,v);x=[];E=[];Ha=r/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),"strokeColor=none;"),+x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,p),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G);break;case "UI2VerticalButtonBarBlock":v.style+=b(v.style,e,u,v);x=[];E=[];ha=p/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,l*ha,r,ha),""),E[l].vertex=!0,v.insert(E[l])):+(x[l]=new mxCell("",new mxGeometry(0,l*ha,r,ha),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,r,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)0!=+l?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),E[l].style+=b(E[l].style,e,u,E[l])):E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),"fillColor=none;strokeColor=none;"),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Link_"+(l+1)]),E[l].style+=a(e["Link_"+(l+1)],G);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)x[l]=new mxCell("",new mxGeometry(l*+Ha,0,Ha,p),"fillColor=none;strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Link_"+(l+1)]),x[l].style+=a(e["Link_"+(l+1)],G);for(l=1;l<e.Links;l++)E[l]=new mxCell("",new mxGeometry(l/e.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),E[l].geometry.relative=!0,E[l].geometry.offset=new mxPoint(-3,-5),E[l].vertex=!0,v.insert(E[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);x=[];Ha=r/(e.Buttons+1);for(l=0;l<=e.Buttons-1;l++)x[l]=l!=e.Selected-+1?new mxCell("",new mxGeometry(0,0,Ha,p),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,Ha,p),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),x[l].geometry.relative=!0,x[l].geometry.offset=new mxPoint(l*Ha,0),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["MenuItem_"+(l+1)]),x[l].style+=a(e["MenuItem_"+(l+1)],G);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";+break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_prev);v.value=m(e.Text_prev)+" ";for(l=0;l<e.Links;l++)v.value+=m(e["Link_"+(l+1)])+" ";v.value+=m(e.Text_next);break;case "UI2ContextMenuBlock":v.style+=b(v.style,e,u,v);X=[];nb=[];var jd=[];ha=p/e.Lines;ia=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ia&&(ia=""+f(e["Item_"+(l+1)])+q(e["Item_"+(l+1)])+t(e["Item_"+(l+1)])),X[l]=new mxCell("",new mxGeometry(0,l*p/e.Lines,r,ha),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia,X[l].value=m(e["Item_"+(l+1)])),null!=e.Icons[l+1]&&null!=X[l]&&("dot"==e.Icons[l+1]?(nb[l]=new mxCell("",new mxGeometry(0,.5,8,8),"ellipse;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6,-4)):"check"==e.Icons[l+1]&&(nb[l]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6.5,-4)),null!=nb[l]&&(nb[l].geometry.relative=!0,nb[l].vertex=!0,X[l].insert(nb[l]),Y=J(e,u),+Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),nb[l].style+=Y)),null!=e["Shortcut_"+(l+1)]&&(null==ia&&(ia=""+f(e["Shortcut_"+(l+1)])+q(e["Shortcut_"+(l+1)])+t(e["Shortcut_"+(l+1)])),jd[l]=new mxCell("",new mxGeometry(.6*r,l*p/e.Lines,.4*r,ha),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),jd[l].vertex=!0,v.insert(jd[l]),jd[l].style+=ia,jd[l].value=m(e["Shortcut_"+(l+1)])),null!=e.Dividers[l+1]&&(X[l]=new mxCell("",new mxGeometry(.05*r,l*p/e.Lines,.9*+r,ha),"shape=line;strokeWidth=1;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=J(e,u));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*e.ScrollVal+";";break;case "CalloutSquareBlock":case "UI2TooltipSquareBlock":v.value=m(e.Tip||e.Text);v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+e.RoundCorners+";"+a(e.Tip||e.Text,G);v.style+=b(v.style,e,u,v,G);v.geometry.height+=10;break;case "UI2CalloutBlock":v.value=+m(e.Txt);v.style+="shape=ellipse;perimeter=ellipsePerimeter;"+a(e.Txt,G);v.style+=b(v.style,e,u,v,G);break;case "UI2AlertBlock":v.value=m(e.Txt);v.style+=a(e.Txt,G);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=b(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=+new mxPoint(-25,-10);E.vertex=!0;x.insert(E);var Uf=45*e.Buttons+(10*e.Buttons-1);U=[];for(l=0;l<e.Buttons;l++)U[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),U[l].geometry.relative=!0,U[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),U[l].vertex=!0,v.insert(U[l]),U[l].value=m(e["Button_"+(l+1)]),U[l].style+=a(e["Button_"+(l+1)],G),U[l].style+=b(U[l].style,e,u,U[l],G);break;case "UMLClassBlock":if(0==e.Simple){ia=ca(e,u);db=Math.round(.75*e.TitleHeight)||25;ia=ia.replace("fillColor",+"swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ia+"startSize="+db+";"+a(e.Title,G);v.style+=b(v.style,e,u,v,G);X=[];var ue=[],wb=db/p;Wb=db;for(l=0;l<=e.Attributes;l++)0<l&&(ue[l]=new mxCell("",new mxGeometry(0,Wb,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),+Wb+=8,ue[l].vertex=!0,v.insert(ue[l])),ha=0,0==e.Attributes?ha=l=1:l<e.Attributes?(ha=e["Text"+(l+1)+"Percent"],wb+=ha):ha=1-wb,pc=Math.round((p-db)*ha)+(e.ExtraHeightSet&&1==l?.75*e.ExtraHeight:0),X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;whiteSpace=wrap;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),X[l].style+=+ia+O(e,u,X[l])+a(e["Text"+(l+1)],G),X[l].value=m(e["Text"+(l+1)])}else v.value=m(e.Title),v.style+="align=center;",v.style+=a(e.Title,G),v.style+=b(v.style,e,u,v,G);break;case "ERDEntityBlock":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ia+"startSize="++db+";"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);e.ShadedHeader?(ia=T(e.FillColor),je=Rd(ia,.85),v.style+="fillColor="+je+";"):v.style+=ca(e,u);X=[];wb=db/p;Wb=db;for(l=0;l<e.Fields;l++)ha=0,pc=.75*e["Field"+(l+1)+"_h"],X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),+X[l].style+=ia+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;opacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]);break;case "ERDEntityBlock2":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ia+"startSize="+db+";"+a(e.Name,G);v.style=e.ShadedHeader?+v.style+"fillColor=#e0e0e0;":v.style+ca(e,u);v.style+=b(v.style,e,u,v,G);X=[];var Ga=[];wb=db;var Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ia+a(e["Key"+(l+1)],+G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,u,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=+ia+a(e["Field"+(l+1)],G),v.style+=b(v.style,e,u,v),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ia+"startSize="+db++";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ca(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Ga=[];wb=db;Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Field"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),+Ga[l].style+=ia+a(e["Field"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,u,Ga[l])),Ga[l].value=m(e["Field"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,u,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia+a(e["Type"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Type"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"++ia+"startSize="+db+";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ca(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Ga=[];var Jb=[];wb=db;Ib=30;var ce=40;null!=e.Column1&&(Ib=.75*e.Column1);null!=e.Column2&&(ce=.75*e.Column2);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),+Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ia+a(e["Key"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,u,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,u,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib-ce,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),Jb[l]=new mxCell("",new mxGeometry(r-ce,wb,ce,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),+Jb[l].vertex=!0,v.insert(Jb[l]),Jb[l].style+=ia+a(e["Type"+(l+1)],G),Jb[l].style=1==e.AltRows&&0!=l%2?Jb[l].style+"fillColor=#000000;fillOpacity=5;":Jb[l].style+("fillColor=none;"+O(e,u,Jb[l])),Jb[l].value=m(e["Type"+(l+1)]),Jb[l].style+=b(Jb[l].style,e,u,Jb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Sa("application_system",r,p,v,e,u);break;case "GCPServiceCardAuthorizationBlock":Sa("internal_payment_authorization",r,p,v,e,u);break;case "GCPServiceCardBlankBlock":Sa("blank",+r,p,v,e,u);break;case "GCPServiceCardReallyBlankBlock":Sa("blank",r,p,v,e,u);break;case "GCPServiceCardBucketBlock":Sa("bucket",r,p,v,e,u);break;case "GCPServiceCardCDNInterconnectBlock":Sa("google_network_edge_cache",r,p,v,e,u);break;case "GCPServiceCardCloudDNSBlock":Sa("blank",r,p,v,e,u);break;case "GCPServiceCardClusterBlock":Sa("cluster",r,p,v,e,u);break;case "GCPServiceCardDiskSnapshotBlock":Sa("persistent_disk_snapshot",r,p,v,e,u);break;case "GCPServiceCardEdgePopBlock":Sa("google_network_edge_cache",+r,p,v,e,u);break;case "GCPServiceCardFrontEndPlatformServicesBlock":Sa("frontend_platform_services",r,p,v,e,u);break;case "GCPServiceCardGatewayBlock":Sa("gateway",r,p,v,e,u);break;case "GCPServiceCardGoogleNetworkBlock":Sa("google_network_edge_cache",r,p,v,e,u);break;case "GCPServiceCardImageServicesBlock":Sa("image_services",r,p,v,e,u);break;case "GCPServiceCardLoadBalancerBlock":Sa("network_load_balancer",r,p,v,e,u);break;case "GCPServiceCardLocalComputeBlock":Sa("dedicated_game_server",r,p,v,+e,u);break;case "GCPServiceCardLocalStorageBlock":Sa("persistent_disk_snapshot",r,p,v,e,u);break;case "GCPServiceCardLogsAPIBlock":Sa("logs_api",r,p,v,e,u);break;case "GCPServiceCardMemcacheBlock":Sa("memcache",r,p,v,e,u);break;case "GCPServiceCardNATBlock":Sa("nat",r,p,v,e,u);break;case "GCPServiceCardPaymentFormBlock":Sa("external_payment_form",r,p,v,e,u);break;case "GCPServiceCardPushNotificationsBlock":Sa("push_notification_service",r,p,v,e,u);break;case "GCPServiceCardScheduledTasksBlock":Sa("scheduled_tasks",+r,p,v,e,u);break;case "GCPServiceCardServiceDiscoveryBlock":Sa("service_discovery",r,p,v,e,u);break;case "GCPServiceCardSquidProxyBlock":Sa("squid_proxy",r,p,v,e,u);break;case "GCPServiceCardTaskQueuesBlock":Sa("task_queues",r,p,v,e,u);break;case "GCPServiceCardVirtualFileSystemBlock":Sa("virtual_file_system",r,p,v,e,u);break;case "GCPServiceCardVPNGatewayBlock":Sa("gateway",r,p,v,e,u);break;case "GCPInputDatabase":Wa("database",1,.9,r,p,v,e,u);break;case "GCPInputRecord":Wa("record",1,.66,r,p,v,+e,u);break;case "GCPInputPayment":Wa("payment",1,.8,r,p,v,e,u);break;case "GCPInputGateway":Wa("gateway_icon",1,.44,r,p,v,e,u);break;case "GCPInputLocalCompute":Wa("compute_engine_icon",1,.89,r,p,v,e,u);break;case "GCPInputBeacon":Wa("beacon",.73,1,r,p,v,e,u);break;case "GCPInputStorage":Wa("storage",1,.8,r,p,v,e,u);break;case "GCPInputList":Wa("list",.89,1,r,p,v,e,u);break;case "GCPInputStream":Wa("stream",1,.82,r,p,v,e,u);break;case "GCPInputMobileDevices":Wa("mobile_devices",1,.73,r,p,v,e,u);break;+case "GCPInputCircuitBoard":Wa("circuit_board",1,.9,r,p,v,e,u);break;case "GCPInputLive":Wa("live",.74,1,r,p,v,e,u);break;case "GCPInputUsers":Wa("users",1,.63,r,p,v,e,u);break;case "GCPInputLaptop":Wa("laptop",1,.66,r,p,v,e,u);break;case "GCPInputApplication":Wa("application",1,.8,r,p,v,e,u);break;case "GCPInputLightbulb":Wa("lightbulb",.7,1,r,p,v,e,u);break;case "GCPInputGame":Wa("game",1,.54,r,p,v,e,u);break;case "GCPInputDesktop":Wa("desktop",1,.9,r,p,v,e,u);break;case "GCPInputDesktopAndMobile":Wa("desktop_and_mobile",+1,.66,r,p,v,e,u);break;case "GCPInputWebcam":Wa("webcam",.5,1,r,p,v,e,u);break;case "GCPInputSpeaker":Wa("speaker",.7,1,r,p,v,e,u);break;case "GCPInputRetail":Wa("retail",1,.89,r,p,v,e,u);break;case "GCPInputReport":Wa("report",1,1,r,p,v,e,u);break;case "GCPInputPhone":Wa("phone",.64,1,r,p,v,e,u);break;case "GCPInputBlank":Wa("transparent",1,1,r,p,v,e,u);break;case "PresentationFrameBlock":0==e.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=a(e.Text),v.value=m(e.Text),v.style+=b(v.style,+e,u,v,G));break;case "SVGPathBlock2":try{var Vf=e.LineWidth,Wf=e.LineColor,lf=e.FillColor,mf=e.DrawData.Data,de='<svg viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg">',ve=null;for(l=0;l<mf.length;l++){var uc=mf[l],Xf=uc.a,Yf=("prop"==uc.w||null==uc.w?Vf:uc.w)/Math.min(r,p)*.75;Rc="prop"==uc.s||null==uc.s?Wf:uc.s;Y="prop"==uc.f||null==uc.f?lf:uc.f;"object"==typeof Y&&(null!=Y.url&&(ve="shape=image;image="+g(Y.url)+";"),Y=Array.isArray(Y.cs)?Y.cs[0].c:lf);de+='<path d="'+Xf+'" fill="'+Y+'" stroke="'++Rc+'" stroke-width="'+Yf+'"/>'}de+="</svg>";v.style=ve?ve:"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+(window.btoa?btoa(de):Base64.encode(de,!0))+";"}catch(gb){}break;case "BraceBlock":case "BraceBlockRotated":case "BracketBlock":case "BracketBlockRotated":var nf=0==V.indexOf("Bracket")?"size=0;arcSize=50;":"",of=b(v.style,e,u,v,G);mb=ba(e,u,v);v.style="group;"+mb;var we=Math.min(.14*(mb?r:p),100),xe=+new mxCell("",new mxGeometry(0,0,we,p),"shape=curlyBracket;rounded=1;"+nf+of);xe.vertex=!0;xe.geometry.relative=!0;var ye=new mxCell("",new mxGeometry(1-we/r,0,we,p),"shape=curlyBracket;rounded=1;flipH=1;"+nf+of);ye.vertex=!0;ye.geometry.relative=!0;v.insert(xe);v.insert(ye);break;case "BPMNTextAnnotation":case "NoteBlock":e.InsetMargin=null;v.value=m(e.Text);v.style="group;spacingLeft=8;align=left;spacing=0;strokeColor=none;";v.style+=b(v.style,e,u,v,G);0>v.style.indexOf("verticalAlign")&&(v.style+=+"verticalAlign=middle;");var kd=new mxCell("",new mxGeometry(0,0,8,p),"shape=partialRectangle;right=0;fillColor=none;");kd.geometry.relative=!0;kd.vertex=!0;kd.style+=b(kd.style,e,u,v,G);v.insert(kd);break;case "VSMTimelineBlock":case "TimelineBlock":case "TimelineMilestoneBlock":case "TimelineIntervalBlock":LucidImporter.hasTimeLine=!0;LucidImporter.hasUnknownShapes=!0;break;case "FreehandBlock":try{mb=ba(e,u,v);v.style="group;"+mb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",+Ke(e.Stencil.id,e.Stencil));var Ob=LucidImporter.stencilsMap[e.Stencil.id],Zf=-Ob.x/Ob.w,$f=-Ob.y/Ob.h;for(l=0;l<Ob.stencils.length;l++){var ob=Ob.stencils[l];oa=new mxCell("",new mxGeometry(Zf,$f,r,p),"shape="+ob.shapeStencil+";");var ag=ob.FillColor,bg=ob.LineColor,cg=ob.LineWidth;"prop"==ob.FillColor&&(ob.FillColor=e.FillColor);null==ob.FillColor&&(ob.FillColor="#ffffff00");"prop"==ob.LineColor&&(ob.LineColor=e.LineColor);null==ob.LineColor&&(ob.LineColor="#ffffff00");"prop"==ob.LineWidth&&(ob.LineWidth=+e.LineWidth);oa.style+=b(oa.style,ob,u,oa,G);ob.FillColor=ag;ob.LineColor=bg;ob.LineWidth=cg;Y=e.FillColor;var dg=e.LineColor,eg=e.LineWidth;e.FillColor=null;e.LineColor=null;e.LineWidth=null;oa.style+=b(oa.style,e,u,oa,G);e.FillColor=Y;e.LineColor=dg;e.LineWidth=eg;oa.vertex=!0;oa.geometry.relative=!0;v.insert(oa)}var Xb=0;for(mb=e.Rotation;e["t"+Xb];){var pf=e["t"+Xb],qf=m(pf);if(qf){ra=new mxCell(qf,new mxGeometry(0,0,r,p),"strokeColor=none;fillColor=none;overflow=visible;");e.Rotation=0;ra.style+=+b(ra.style,pf,u,ra,G);ra.style+=b(ra.style,e,u,ra,G);e.Rotation=mb;if(null!=Ob.text&&null!=Ob.text["t"+Xb]){var eb=Ob.text["t"+Xb];eb.Rotation=mb+(eb.rotation?eb.rotation:0)+(e["t"+Xb+"_TRotation"]?e["t"+Xb+"_TRotation"]:0)+(e["t"+Xb+"_TAngle"]?e["t"+Xb+"_TAngle"]:0);ra.style+=b(ra.style,eb,u,ra,G);var Yb=ra.geometry;eb.w&&(Yb.width*=eb.w/Ob.w);eb.h&&(Yb.height*=eb.h/Ob.h);eb.x&&(Yb.x=eb.x/Ob.w);eb.y&&(Yb.y=eb.y/Ob.h);eb.fw&&(Yb.width*=.75*eb.fw/r);eb.fh&&(Yb.height*=.75*eb.fh/p);eb.fx&&(Yb.x=(0<+eb.fx?1:0)+.75*eb.fx/r);eb.fy&&(Yb.y=(0<eb.fy?1:0)+.75*eb.fy/p)}ra.vertex=!0;ra.geometry.relative=!0;v.insert(ra)}Xb++}}if(e.FillColor&&e.FillColor.url){var Nd=new mxCell("",new mxGeometry(0,0,r,p),"shape=image;html=1;");Nd.style+=Fa({},{},e.FillColor.url);Nd.vertex=!0;Nd.geometry.relative=!0;v.insert(Nd)}}catch(gb){console.log("Freehand error",gb)}break;case "RightArrowBlock":var ze=e.Head*p/r;v.style="shape=singleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=b(v.style,+e,u,v,G);break;case "DoubleArrowBlock":ze=e.Head*p/r;v.style="shape=doubleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "VPCSubnet2017":case "VirtualPrivateCloudContainer2017":case "ElasticBeanStalkContainer2017":case "EC2InstanceContents2017":case "AWSCloudContainer2017":case "CorporateDataCenterContainer2017":switch(V){case "VPCSubnet2017":var ld="shape=mxgraph.aws3.permissions;fillColor=#D9A741;";var md=30;var nd=35;break;case "VirtualPrivateCloudContainer2017":ld="shape=mxgraph.aws3.virtual_private_cloud;fillColor=#F58536;";md=52;nd=36;break;case "ElasticBeanStalkContainer2017":ld="shape=mxgraph.aws3.elastic_beanstalk;fillColor=#F58536;";md=30;nd=41;break;case "EC2InstanceContents2017":ld="shape=mxgraph.aws3.instance;fillColor=#F58536;";md=40;nd=41;break;case "AWSCloudContainer2017":ld="shape=mxgraph.aws3.cloud;fillColor=#F58536;";md=52;nd=36;break;case "CorporateDataCenterContainer2017":ld="shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;",md=-30,nd=42}v.style="rounded=1;arcSize=10;dashed=0;verticalAlign=bottom;";v.value=m(e);v.style+=b(v.style,e,t,v,G);v.geometry.y+=20;v.geometry.height-=20;nb=new mxCell("",new mxGeometry(20,-20,md,nd),ld);nb.vertex=!0;v.insert(nb);break;case "FlexiblePolygonBlock":var Wc=['<shape strokewidth="inherit"><foreground>'];Wc.push("<path>");for(fa=0;fa<e.Vertices.length;fa++)Qa=e.Vertices[fa],0==fa?Wc.push('<move x="'+100*Qa.x+'" y="'+100*Qa.y+'"/>'):Wc.push('<line x="'+100*Qa.x+'" y="'+100*Qa.y+'"/>');Wc.push("</path>");-Wc.push("<fillstroke/>");Wc.push("</foreground></shape>");v.style="shape=stencil("+Graph.compress(Wc.join(""))+");";v.value=m(e);v.style+=b(v.style,e,t,v,G);break;case "InfographicsBlock":var rf=e.ShapeData_1.Value,Ae=e.ShapeData_2.Value-rf,Be=e.ShapeData_3.Value-rf,ee=e.ShapeData_4.Value*r/200;Xb="ProgressBar"==e.InternalStencilId?4:5;kb=e["ShapeData_"+Xb].Value;kb="=fillColor()"==kb?e.FillColor:kb;var od=e["ShapeData_"+(Xb+1)].Value;switch(e.InternalStencilId){case "ProgressDonut":v.style="shape=mxgraph.basic.donut;dx="+-ee+";strokeColor=none;fillColor="+S(od)+";"+ka(od,"fillOpacity");v.style+=b(v.style,e,t,v,G);var ab=new mxCell("",new mxGeometry(0,0,r,q),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Be/Ae+";arcWidth="+ee/r*2+";strokeColor=none;fillColor="+S(kb)+";"+ka(kb,"fillOpacity"));ab.style+=b(ab.style,e,t,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressHalfDonut":v.geometry.height*=2;v.geometry.rotate90();var sf=Be/Ae/2;v.style="shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+-sf+";arcWidth="+2*ee/r+";strokeColor=none;fillColor="+S(kb)+";"+ka(kb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=b(v.style,e,t,v,G);ab=new mxCell("",new mxGeometry(0,0,v.geometry.width,v.geometry.height),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+(.5-sf)+";arcWidth="+2*ee/r+";strokeColor=none;flipH=1;fillColor="+S(od)+";"+ka(od,"fillOpacity"));e.Rotation+=Math.PI;ab.style+=b(ab.style,e,t,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressBar":v.style="strokeColor=none;fillColor="+-S(od)+";"+ka(od,"fillOpacity"),v.style+=b(v.style,e,t,v,G),ab=new mxCell("",new mxGeometry(0,0,r*Be/Ae,q),"strokeColor=none;fillColor="+S(kb)+";"+ka(kb,"fillOpacity")),ab.style+=b(ab.style,e,t,ab,G),ab.vertex=!0,ab.geometry.relative=1,v.insert(ab)}break;case "InternalStorageBlock":v.style+="shape=internalStorage;dx=10;dy=10";if(e.Text&&e.Text.m){var fe=e.Text.m,Ce=!1,De=!1;for(l=0;l<fe.length;l++){var pd=fe[l];Ce||"mt"!=pd.n?De||"il"!=pd.n||(pd.v=17+(pd.v||0),De=!0):(pd.v=17+(pd.v||0),Ce=!0)}Ce||-fe.push({s:0,n:"mt",v:17});De||fe.push({s:0,n:"il",v:17})}v.value=m(e);v.style+=b(v.style,e,t,v,G);break;case "PersonRoleBlock":try{ia=ca(e,t);db=q/2;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Role);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ia+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Role,G);v.style+=b(v.style,-e,t,v,G);var Ec=new mxCell("",new mxGeometry(0,q/2,r,q/2),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");Ec.value=m(e.Name);Ec.vertex=!0;v.insert(Ec);Ec.style+=a(e.Name,G);Ec.style+=b(Ec.style,e,t,Ec,G)}catch(gb){console.log(gb)}}v.style&&0>v.style.indexOf("html")&&(v.style+="html=1;");if(e.Title&&e.Title.t&&e.Text&&e.Text.t)try{var tf=v.geometry,uf=new mxCell(m(e.Title),new mxGeometry(0,tf.height+4,tf.width,10),"strokeColor=none;fillColor=none;whiteSpace=wrap;verticalAlign=top;labelPosition=center;verticalLabelPosition=top;align=center;");-uf.vertex=!0;v.insert(uf);v.style+=a(e.Title,G)}catch(gb){console.log(gb)}Ge(v,e);pa(v,e,D);e.Hidden&&(v.visible=!1);return v}function Ge(u,F){if(F.Text_TRotation||F.TextRotation)try{var D=mxUtils.toDegree(F.Text_TRotation||0)+mxUtils.toDegree(F.TextRotation||0);if(!isNaN(D)&&0!=D&&u.value){var t=u.geometry.width,e=u.geometry.height,P=t,r=e,q=0,Z=0;if(-90==D||-270==D){P=e;r=t;var aa=(e-t)/2;q=-aa/t;Z=aa/e}D+=mxUtils.toDegree(F.Rotation);var V=u.style.split(";").filter(function(ja){return 0>ja.indexOf("fillColor=")&&-0>ja.indexOf("strokeColor=")&&0>ja.indexOf("rotation=")}).join(";"),wa=new mxCell(u.value,new mxGeometry(q,Z,P,r),V+"fillColor=none;strokeColor=none;rotation="+D+";");u.value=null;wa.geometry.relative=!0;wa.vertex=!0;u.insert(wa)}}catch(ja){console.log(ja)}}function Je(u,F,D,t,e){function P(Kb,$b){var Xa="";try{for(var pb=0;pb<Kb.text.length;pb++){var Nc=Kb.text[pb];if(Nc[0]=="t_"+$b){for(var Fc in Nc[1]){var Gc=Nc[1][Fc];if(Gc)switch(Fc){case "font":Xa+=y(Gc);break;case "bold":Xa+="font-weight: bold;";+30,nd=42}v.style="rounded=1;arcSize=10;dashed=0;verticalAlign=bottom;";v.value=m(e);v.style+=b(v.style,e,u,v,G);v.geometry.y+=20;v.geometry.height-=20;nb=new mxCell("",new mxGeometry(20,-20,md,nd),ld);nb.vertex=!0;v.insert(nb);break;case "FlexiblePolygonBlock":var Wc=['<shape strokewidth="inherit"><foreground>'];Wc.push("<path>");for(fa=0;fa<e.Vertices.length;fa++)Qa=e.Vertices[fa],0==fa?Wc.push('<move x="'+100*Qa.x+'" y="'+100*Qa.y+'"/>'):Wc.push('<line x="'+100*Qa.x+'" y="'+100*Qa.y+'"/>');Wc.push("</path>");+Wc.push("<fillstroke/>");Wc.push("</foreground></shape>");v.style="shape=stencil("+Graph.compress(Wc.join(""))+");";v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "InfographicsBlock":var rf=e.ShapeData_1.Value,Ae=e.ShapeData_2.Value-rf,Be=e.ShapeData_3.Value-rf,ee=e.ShapeData_4.Value*r/200;Xb="ProgressBar"==e.InternalStencilId?4:5;kb=e["ShapeData_"+Xb].Value;kb="=fillColor()"==kb?e.FillColor:kb;var od=e["ShapeData_"+(Xb+1)].Value;switch(e.InternalStencilId){case "ProgressDonut":v.style="shape=mxgraph.basic.donut;dx="++ee+";strokeColor=none;fillColor="+T(od)+";"+ka(od,"fillOpacity");v.style+=b(v.style,e,u,v,G);var ab=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Be/Ae+";arcWidth="+ee/r*2+";strokeColor=none;fillColor="+T(kb)+";"+ka(kb,"fillOpacity"));ab.style+=b(ab.style,e,u,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressHalfDonut":v.geometry.height*=2;v.geometry.rotate90();var sf=Be/Ae/2;v.style="shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="++sf+";arcWidth="+2*ee/r+";strokeColor=none;fillColor="+T(kb)+";"+ka(kb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=b(v.style,e,u,v,G);ab=new mxCell("",new mxGeometry(0,0,v.geometry.width,v.geometry.height),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+(.5-sf)+";arcWidth="+2*ee/r+";strokeColor=none;flipH=1;fillColor="+T(od)+";"+ka(od,"fillOpacity"));e.Rotation+=Math.PI;ab.style+=b(ab.style,e,u,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressBar":v.style="strokeColor=none;fillColor="++T(od)+";"+ka(od,"fillOpacity"),v.style+=b(v.style,e,u,v,G),ab=new mxCell("",new mxGeometry(0,0,r*Be/Ae,p),"strokeColor=none;fillColor="+T(kb)+";"+ka(kb,"fillOpacity")),ab.style+=b(ab.style,e,u,ab,G),ab.vertex=!0,ab.geometry.relative=1,v.insert(ab)}break;case "InternalStorageBlock":v.style+="shape=internalStorage;dx=10;dy=10";if(e.Text&&e.Text.m){var fe=e.Text.m,Ce=!1,De=!1;for(l=0;l<fe.length;l++){var pd=fe[l];Ce||"mt"!=pd.n?De||"il"!=pd.n||(pd.v=17+(pd.v||0),De=!0):(pd.v=17+(pd.v||0),Ce=!0)}Ce||+fe.push({s:0,n:"mt",v:17});De||fe.push({s:0,n:"il",v:17})}v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "PersonRoleBlock":try{ia=ca(e,u);db=p/2;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Role);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ia+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Role,G);v.style+=b(v.style,+e,u,v,G);var Ec=new mxCell("",new mxGeometry(0,p/2,r,p/2),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");Ec.value=m(e.Name);Ec.vertex=!0;v.insert(Ec);Ec.style+=a(e.Name,G);Ec.style+=b(Ec.style,e,u,Ec,G)}catch(gb){console.log(gb)}}v.style&&0>v.style.indexOf("html")&&(v.style+="html=1;");if(e.Title&&e.Title.t&&e.Text&&e.Text.t)try{var tf=v.geometry,uf=new mxCell(m(e.Title),new mxGeometry(0,tf.height+4,tf.width,10),"strokeColor=none;fillColor=none;whiteSpace=wrap;verticalAlign=top;labelPosition=center;verticalLabelPosition=top;align=center;");+uf.vertex=!0;v.insert(uf);v.style+=a(e.Title,G)}catch(gb){console.log(gb)}Ge(v,e);pa(v,e,D);e.Hidden&&(v.visible=!1);return v}function Ge(w,F){if(F.Text_TRotation||F.TextRotation)try{var D=mxUtils.toDegree(F.Text_TRotation||0)+mxUtils.toDegree(F.TextRotation||0);if(!isNaN(D)&&0!=D&&w.value){var u=w.geometry.width,e=w.geometry.height,P=u,r=e,p=0,Z=0;if(-90==D||-270==D){P=e;r=u;var aa=(e-u)/2;p=-aa/u;Z=aa/e}D+=mxUtils.toDegree(F.Rotation);var V=w.style.split(";").filter(function(ja){return 0>ja.indexOf("fillColor=")&&+0>ja.indexOf("strokeColor=")&&0>ja.indexOf("rotation=")}).join(";"),wa=new mxCell(w.value,new mxGeometry(p,Z,P,r),V+"fillColor=none;strokeColor=none;rotation="+D+";");w.value=null;wa.geometry.relative=!0;wa.vertex=!0;w.insert(wa)}}catch(ja){console.log(ja)}}function Je(w,F,D,u,e){function P(Kb,$b){var Xa="";try{for(var pb=0;pb<Kb.text.length;pb++){var Nc=Kb.text[pb];if(Nc[0]=="t_"+$b){for(var Fc in Nc[1]){var Gc=Nc[1][Fc];if(Gc)switch(Fc){case "font":Xa+=y(Gc);break;case "bold":Xa+="font-weight: bold;";break;case "italic":Xa+="font-style: italic;";break;case "underline":Xa+="text-decoration: underline;";break;case "size":Xa+="font-size:"+z(.75*Gc)+"px;";break;case "color":Xa+="color:"+R(Gc).substring(0,7)+";";break;case "fill":Xa+="background-color:"+R(Gc).substring(0,7)+";";break;case "align":Xa+="text-align:"+Gc+";"}}break}}}catch(Sd){}return Xa}try{var r=function(Kb,$b,Xa){Kb=Aa+Kb;ra[Kb]=$b;$b="";for(var pb=0;pb<V.length;pb++)$b+='<div style="'+ma[pb]+'">'+(Xa[V[pb]]||" ")+"</div>";pb=-mxUtils.getSizeForString($b);Xa=g(Xa.Image||Xa["018__ImageUrl__"])||"https://cdn4.iconfinder.com/data/icons/basic-user-interface-elements/700/user-account-profile-human-avatar-face-head--128.png";Xa=new mxCell($b,new mxGeometry(0,0,pb.width+Ba,pb.height+Pa),ua+(Ca?Xa:""));Xa.vertex=!0;e[Kb]=Xa;t.addCell(Xa,aa)},q=F.OrgChartBlockType,Z=F.Location,aa=new mxCell("",new mxGeometry(.75*Z.x,.75*Z.y,200,100),"group");aa.vertex=!0;t.addCell(aa);var V=F.FieldNames,wa=F.LayoutSettings,ja=F.BlockItemDefaultStyle||-{props:{}},na=F.EdgeItemDefaultStyle,ra={},Aa=(u||Date.now())+"_";4==q&&(ja.props.LineWidth=0);var ma=[],Ba=25,Pa=40,Ca=!0,ua=b("",ja.props,{},aa,!0);0==q?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Pa+=54):1==q||2==q?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=q&&(Ca=!1);for(u=0;u<V.length;u++)ma.push(P(ja,V[u]));if(D.Items)for(var Na=D.Items.n,Ka=0;Ka<Na.length;Ka++){var La=Na[Ka];-r(La.pk,La.ie[0]?La.ie[0].nf:null,La.f)}else{var l=F.ContractMap.derivative;if(null==l){var Ia=F.ContractMap.c.People;var bb=Ia.id;bb=bb.substr(0,bb.lastIndexOf("_"));for(u=0;u<V.length;u++)V[u]=Ia.f[V[u]]||V[u]}else for(Ka=0;Ka<l.length;Ka++)if("ForeignKeyGraph"==l[Ka].type)bb=l[Ka].c[0].id,bb=bb.substr(0,bb.lastIndexOf("_"));else if("MappedGraph"==l[Ka].type)for(u=0;u<V.length;u++)V[u]=l[Ka].nfs[V[u]]||V[u];var Ea;for(Ea in D){La=D[Ea].Collections;for(var Ra in La)if(Ra==bb)Na=La[Ra].Items;else if(La[Ra].Properties.ForeignKeys&&+mxUtils.getSizeForString($b);Xa=g(Xa.Image||Xa["018__ImageUrl__"])||"https://cdn4.iconfinder.com/data/icons/basic-user-interface-elements/700/user-account-profile-human-avatar-face-head--128.png";Xa=new mxCell($b,new mxGeometry(0,0,pb.width+Ba,pb.height+Pa),ua+(Ca?Xa:""));Xa.vertex=!0;e[Kb]=Xa;u.addCell(Xa,aa)},p=F.OrgChartBlockType,Z=F.Location,aa=new mxCell("",new mxGeometry(.75*Z.x,.75*Z.y,200,100),"group");aa.vertex=!0;u.addCell(aa);var V=F.FieldNames,wa=F.LayoutSettings,ja=F.BlockItemDefaultStyle||+{props:{}},na=F.EdgeItemDefaultStyle,ra={},Aa=(w||Date.now())+"_";4==p&&(ja.props.LineWidth=0);var ma=[],Ba=25,Pa=40,Ca=!0,ua=b("",ja.props,{},aa,!0);0==p?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Pa+=54):1==p||2==p?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=p&&(Ca=!1);for(w=0;w<V.length;w++)ma.push(P(ja,V[w]));if(D.Items)for(var Na=D.Items.n,Ka=0;Ka<Na.length;Ka++){var La=Na[Ka];+r(La.pk,La.ie[0]?La.ie[0].nf:null,La.f)}else{var l=F.ContractMap.derivative;if(null==l){var Ia=F.ContractMap.c.People;var bb=Ia.id;bb=bb.substr(0,bb.lastIndexOf("_"));for(w=0;w<V.length;w++)V[w]=Ia.f[V[w]]||V[w]}else for(Ka=0;Ka<l.length;Ka++)if("ForeignKeyGraph"==l[Ka].type)bb=l[Ka].c[0].id,bb=bb.substr(0,bb.lastIndexOf("_"));else if("MappedGraph"==l[Ka].type)for(w=0;w<V.length;w++)V[w]=l[Ka].nfs[V[w]]||V[w];var Ea;for(Ea in D){La=D[Ea].Collections;for(var Ra in La)if(Ra==bb)Na=La[Ra].Items;else if(La[Ra].Properties.ForeignKeys&&La[Ra].Properties.ForeignKeys[0]){var la=La[Ra].Properties.ForeignKeys[0].SourceFields[0];var Ma=La[Ra].Properties.Schema.PrimaryKey[0]}if(Na)break}F={};for(var ya in Na){La=Na[ya];var za=La[Ma],Pb=La[la];za==Pb?(F[za]=za+Date.now(),za=F[za],La[Ma]=za,r(za,Pb,La)):r(za,F[Pb]||Pb,La)}}for(Ea in ra){var fa=ra[Ea];if(null!=fa){var xb=e[Aa+fa],Va=e[Ea];if(null!=xb&&null!=Va){var rc=new mxCell("",new mxGeometry(0,0,100,100),"");rc.geometry.relative=!0;rc.edge=!0;null!=na&&null!=na.props&&Qb(rc,na.props,-t,null,null,!0);t.addCell(rc,aa,null,xb,Va)}}}var vc=.75*wa.NodeSpacing.LevelSeparation;(new mxOrgChartLayout(t,0,vc,.75*wa.NodeSpacing.NeighborSeparation)).execute(aa);for(Ka=wa=r=0;aa.children&&Ka<aa.children.length;Ka++){var Fb=aa.children[Ka].geometry;r=Math.max(r,Fb.x+Fb.width);wa=Math.max(wa,Fb.y+Fb.height)}var Rb=aa.geometry;Rb.y-=vc;Rb.width=r;Rb.height=wa}catch(Kb){LucidImporter.hasUnknownShapes=!0,LucidImporter.hasOrgChart=!0,console.log(Kb)}}var wc=0,xc=0,ge="text;html=1;resizable=0;labelBackgroundColor=default;align=center;verticalAlign=middle;",+u,null,null,!0);u.addCell(rc,aa,null,xb,Va)}}}var vc=.75*wa.NodeSpacing.LevelSeparation;(new mxOrgChartLayout(u,0,vc,.75*wa.NodeSpacing.NeighborSeparation)).execute(aa);for(Ka=wa=r=0;aa.children&&Ka<aa.children.length;Ka++){var Fb=aa.children[Ka].geometry;r=Math.max(r,Fb.x+Fb.width);wa=Math.max(wa,Fb.y+Fb.height)}var Rb=aa.geometry;Rb.y-=vc;Rb.width=r;Rb.height=wa}catch(Kb){LucidImporter.hasUnknownShapes=!0,LucidImporter.hasOrgChart=!0,console.log(Kb)}}var wc=0,xc=0,ge="text;html=1;resizable=0;labelBackgroundColor=default;align=center;verticalAlign=middle;",G=!1,lb="",vf=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],wf=["fpDoor"],Ee={None:"none;",Arrow:"block;xyzFill=1;","Hollow Arrow":"block;xyzFill=0;","Open Arrow":"open;","CFN ERD Zero Or More Arrow":"ERzeroToMany;xyzSize=10;","CFN ERD One Or More Arrow":"ERoneToMany;xyzSize=10;","CFN ERD Many Arrow":"ERmany;xyzSize=10;","CFN ERD Exactly One Arrow":"ERmandOne;xyzSize=10;","CFN ERD Zero Or One Arrow":"ERzeroToOne;xyzSize=10;","CFN ERD One Arrow":"ERone;xyzSize=16;",Generalization:"block;xyzFill=0;xyzSize=12;","Big Open Arrow":"open;xyzSize=10;",Asynch1:"openAsync;flipV=1;xyzSize=10;",Asynch2:"openAsync;xyzSize=10;",Aggregation:"diamond;xyzFill=0;xyzSize=16;",Composition:"diamond;xyzFill=1;xyzSize=16;",BlockEnd:"box;xyzFill=0;xyzSize=16;",Measure:"ERone;xyzSize=10;",CircleOpen:"oval;xyzFill=0;xyzSize=16;",CircleClosed:"oval;xyzFill=1;xyzSize=16;",BlockEndFill:"box;xyzFill=1;xyzSize=16;",Nesting:"circlePlus;xyzSize=7;xyzFill=0;","BPMN Conditional":"diamond;xyzFill=0;","BPMN Default":"dash;"},Od={DefaultTextBlockNew:"strokeColor=none;fillColor=none",DefaultTextBlock:"strokeColor=none;fillColor=none",DefaultSquareBlock:"",RectangleBlock:"",DefaultNoteBlock:"shape=note;size=15",DefaultNoteBlockV2:"shape=note;size=15",HotspotBlock:"strokeColor=none;fillColor=none",ImageSearchBlock2:"shape=image",UserImage2Block:"shape=image",ExtShapeBoxBlock:"",DefaultStickyNoteBlock:"shadow=1",ProcessBlock:"",DecisionBlock:"rhombus",TerminatorBlock:"rounded=1;arcSize=50",PredefinedProcessBlock:"shape=process",@@ -15381,52 +15380,52 @@ SMCalendar:"shape=mxgraph.sitemap.calendar;strokeColor=#000000;fillColor=#E6E6E6SMGame:"shape=mxgraph.sitemap.game;strokeColor=#000000;fillColor=#E6E6E6",SMJobs:"shape=mxgraph.sitemap.jobs;strokeColor=#000000;fillColor=#E6E6E6",SMLucid:"shape=mxgraph.sitemap.home;strokeColor=#000000;fillColor=#E6E6E6",SMNewspress:"shape=mxgraph.sitemap.news;strokeColor=#000000;fillColor=#E6E6E6",SMPhoto:"shape=mxgraph.sitemap.photo;strokeColor=#000000;fillColor=#E6E6E6",SMPortfolio:"shape=mxgraph.sitemap.portfolio;strokeColor=#000000;fillColor=#E6E6E6",SMPricing:"shape=mxgraph.sitemap.pricing;strokeColor=#000000;fillColor=#E6E6E6",SMProfile:"shape=mxgraph.sitemap.profile;strokeColor=#000000;fillColor=#E6E6E6",SMSlideshow:"shape=mxgraph.sitemap.slideshow;strokeColor=#000000;fillColor=#E6E6E6",SMUpload:"shape=mxgraph.sitemap.upload;strokeColor=#000000;fillColor=#E6E6E6",SVGPathBlock2:"mxCompositeShape",PresentationFrameBlock:"mxCompositeShape",TimelineBlock:"mxCompositeShape",TimelineMilestoneBlock:"mxCompositeShape",TimelineIntervalBlock:"mxCompositeShape",MinimalTextBlock:"strokeColor=none;fillColor=none",FreehandBlock:"mxCompositeShape",ExtShapeLaptopBlock:"strokeColor=none;shape=mxgraph.citrix.laptop_2;verticalLabelPosition=bottom;verticalAlign=top",ExtShapeServerBlock:"strokeColor=none;shape=mxgraph.citrix.tower_server;verticalLabelPosition=bottom;verticalAlign=top",ExtShapeCloudBlock:"strokeColor=none;shape=mxgraph.citrix.cloud;verticalLabelPosition=bottom;verticalAlign=top",ExtShapeUserBlock:"strokeColor=none;shape=mxgraph.aws3d.end_user;verticalLabelPosition=bottom;verticalAlign=top;fillColor=#073763",ExtShapeWorkstationLCDBlock:"strokeColor=none;shape=mxgraph.veeam.3d.workstation;verticalLabelPosition=bottom;verticalAlign=top",-InfographicsBlock:"mxCompositeShape",FlexiblePolygonBlock:"mxCompositeShape",PersonRoleBlock:"mxCompositeShape"},xf=RegExp("{{(date{.*}|[^%^{^}]+)}}","g");Qd.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};Qd.prototype.getX=function(u){return Math.round(100*this.nurbsValues[4*(u+1)])/100};Qd.prototype.getY=function(u){return Math.round(100*this.nurbsValues[4*(u+1)+1])/100};LucidImporter.importState=function(u,F,D){function t(q){null!=q.state&&EditorUi.debug("convertLucidChart addPages",-q);if(q.Properties){for(var Z in q.Properties)"Stencil-"==Z.substr(0,8)&&Ke(Z.substr(8),q.Properties[Z]);LucidImporter.globalProps=q.Properties}for(var aa in q.Pages)Z=q.Pages[aa],Z.id=aa,Z.Data=q.Data,e.push(Z);e.sort(function(V,wa){return V.Properties.Order<wa.Properties.Order?-1:V.Properties.Order>wa.Properties.Order?1:0});for(q=0;q<e.length;q++)LucidImporter.pageIdsMap[e[q].id]=q}xc=wc=0;LucidImporter.stencilsMap={};LucidImporter.imgSrcRepl=F;LucidImporter.advImpConfig=D;LucidImporter.globalProps=+InfographicsBlock:"mxCompositeShape",FlexiblePolygonBlock:"mxCompositeShape",PersonRoleBlock:"mxCompositeShape"},xf=RegExp("{{(date{.*}|[^%^{^}]+)}}","g");Qd.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};Qd.prototype.getX=function(w){return Math.round(100*this.nurbsValues[4*(w+1)])/100};Qd.prototype.getY=function(w){return Math.round(100*this.nurbsValues[4*(w+1)+1])/100};LucidImporter.importState=function(w,F,D){function u(p){null!=p.state&&EditorUi.debug("convertLucidChart addPages",+p);if(p.Properties){for(var Z in p.Properties)"Stencil-"==Z.substr(0,8)&&Ke(Z.substr(8),p.Properties[Z]);LucidImporter.globalProps=p.Properties}for(var aa in p.Pages)Z=p.Pages[aa],Z.id=aa,Z.Data=p.Data,e.push(Z);e.sort(function(V,wa){return V.Properties.Order<wa.Properties.Order?-1:V.Properties.Order>wa.Properties.Order?1:0});for(p=0;p<e.length;p++)LucidImporter.pageIdsMap[e[p].id]=p}xc=wc=0;LucidImporter.stencilsMap={};LucidImporter.imgSrcRepl=F;LucidImporter.advImpConfig=D;LucidImporter.globalProps={};LucidImporter.pageIdsMap={};LucidImporter.hasUnknownShapes=!1;LucidImporter.hasOrgChart=!1;LucidImporter.hasTimeLine=!1;LucidImporter.hasExtImgs=!1;F=['<?xml version="1.0" encoding="UTF-8"?>','<mxfile type="Lucidchart-Import" version="'+EditorUi.VERSION+'" host="'+mxUtils.htmlEntities(window.location.hostname)+'" agent="'+mxUtils.htmlEntities(navigator.appVersion)+'" modified="'+mxUtils.htmlEntities((new Date).toISOString())+'">'];D&&D.transparentEdgeLabels&&(ge=ge.replace("labelBackgroundColor=default;",-"labelBackgroundColor=none;"));var e=[];null!=u.state?t(JSON.parse(u.state)):null==u.Page&&null!=u.Pages?t(u):e.push(u);u=Df();D=new mxCodec;for(var P=0;P<e.length;P++){F.push("<diagram");null!=e[P].Properties&&null!=e[P].Properties.Title&&F.push(' name="'+mxUtils.htmlEntities(e[P].Properties.Title)+'"');F.push(' id="'+P+'"');zf(u,e[P],!0);var r=D.encode(u.getModel());null!=e[P].Properties&&(e[P].Properties.FillColor&&"#ffffff"!=e[P].Properties.FillColor&&r.setAttribute("background",S(e[P].Properties.FillColor)),-e[P].Properties.InfiniteCanvas?r.setAttribute("page",0):null!=e[P].Properties.Size&&(r.setAttribute("page",1),r.setAttribute("pageWidth",.75*e[P].Properties.Size.w),r.setAttribute("pageHeight",.75*e[P].Properties.Size.h)),null!=e[P].Properties.GridSpacing&&(r.setAttribute("grid",1),r.setAttribute("gridSize",.75*e[P].Properties.GridSpacing)));LucidImporter.hasMath&&r.setAttribute("math",1);u.getModel().clear();F.push(">"+Graph.compress(mxUtils.getXml(r))+"</diagram>")}F.push("</mxfile>");LucidImporter.imgSrcRepl=-null;return F.join("")}})();function VsdxExport(g){function y(H,I){var N={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>",+"labelBackgroundColor=none;"));var e=[];null!=w.state?u(JSON.parse(w.state)):null==w.Page&&null!=w.Pages?u(w):e.push(w);w=Df();D=new mxCodec;for(var P=0;P<e.length;P++){F.push("<diagram");null!=e[P].Properties&&null!=e[P].Properties.Title&&F.push(' name="'+mxUtils.htmlEntities(e[P].Properties.Title)+'"');F.push(' id="'+P+'"');zf(w,e[P],!0);var r=D.encode(w.getModel());null!=e[P].Properties&&(e[P].Properties.FillColor&&"#ffffff"!=e[P].Properties.FillColor&&r.setAttribute("background",T(e[P].Properties.FillColor)),+e[P].Properties.InfiniteCanvas?r.setAttribute("page",0):null!=e[P].Properties.Size&&(r.setAttribute("page",1),r.setAttribute("pageWidth",.75*e[P].Properties.Size.w),r.setAttribute("pageHeight",.75*e[P].Properties.Size.h)),null!=e[P].Properties.GridSpacing&&(r.setAttribute("grid",1),r.setAttribute("gridSize",.75*e[P].Properties.GridSpacing)));LucidImporter.hasMath&&r.setAttribute("math",1);w.getModel().clear();F.push(">"+Graph.compress(mxUtils.getXml(r))+"</diagram>")}F.push("</mxfile>");LucidImporter.imgSrcRepl=+null;return F.join("")}})();function VsdxExport(g){function y(H,J){var N={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>","_rels/.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties' Target='docProps/core.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/document' Target='visio/document.xml' /><Relationship Id='rId3' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties' Target='docProps/custom.xml' /><Relationship Id='rId4' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties' Target='docProps/app.xml' /></Relationships>","docProps/app.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\'><Application>Microsoft Visio</Application><AppVersion>15.0000</AppVersion><Template /><Manager /><Company /><HyperlinkBase /></Properties>',"docProps/core.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><cp:coreProperties xmlns:cp='http://schemas.openxmlformats.org/package/2006/metadata/core-properties' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:dcterms='http://purl.org/dc/terms/' xmlns:dcmitype='http://purl.org/dc/dcmitype/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><dc:title /><dc:subject /><dc:creator /><cp:keywords /><dc:description /><cp:category /><dc:language>en-US</dc:language></cp:coreProperties>","docProps/custom.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\' />',"visio/document.xml":"<?xml version='1.0' encoding='utf-8' ?><VisioDocument xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><DocumentSettings TopPage='0' DefaultTextStyle='3' DefaultLineStyle='3' DefaultFillStyle='3' DefaultGuideStyle='4'><GlueSettings>9</GlueSettings><SnapSettings>65847</SnapSettings><SnapExtensions>34</SnapExtensions><SnapAngles/><DynamicGridEnabled>1</DynamicGridEnabled><ProtectStyles>0</ProtectStyles><ProtectShapes>0</ProtectShapes><ProtectMasters>0</ProtectMasters><ProtectBkgnds>0</ProtectBkgnds></DocumentSettings><Colors><ColorEntry IX='24' RGB='#000000'/><ColorEntry IX='25' RGB='#FFFFFF'/><ColorEntry IX='26' RGB='#FF0000'/><ColorEntry IX='27' RGB='#00FF00'/><ColorEntry IX='28' RGB='#0000FF'/><ColorEntry IX='29' RGB='#FFFF00'/><ColorEntry IX='30' RGB='#FF00FF'/><ColorEntry IX='31' RGB='#00FFFF'/><ColorEntry IX='32' RGB='#800000'/><ColorEntry IX='33' RGB='#008000'/><ColorEntry IX='34' RGB='#000080'/><ColorEntry IX='35' RGB='#808000'/><ColorEntry IX='36' RGB='#800080'/><ColorEntry IX='37' RGB='#008080'/><ColorEntry IX='38' RGB='#C0C0C0'/><ColorEntry IX='39' RGB='#E6E6E6'/><ColorEntry IX='40' RGB='#CDCDCD'/><ColorEntry IX='41' RGB='#B3B3B3'/><ColorEntry IX='42' RGB='#9A9A9A'/><ColorEntry IX='43' RGB='#808080'/><ColorEntry IX='44' RGB='#666666'/><ColorEntry IX='45' RGB='#4D4D4D'/><ColorEntry IX='46' RGB='#333333'/><ColorEntry IX='47' RGB='#1A1A1A'/><ColorEntry IX='48' RGB='#7F7F7F'/><ColorEntry IX='49' RGB='#99004D'/><ColorEntry IX='50' RGB='#FF0080'/><ColorEntry IX='51' RGB='#CC0066'/></Colors><FaceNames><FaceName NameU='Calibri' UnicodeRanges='-536859905 -1073732485 9 0' CharSets='536871423 0' Panose='2 15 5 2 2 2 4 3 2 4' Flags='325'/></FaceNames><StyleSheets><StyleSheet ID='0' NameU='No Style' IsCustomNameU='1' Name='No Style' IsCustomName='1'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0.01041666666666667'/><Cell N='LineColor' V='0'/><Cell N='LinePattern' V='1'/><Cell N='Rounding' V='0'/><Cell N='EndArrowSize' V='2'/><Cell N='BeginArrow' V='0'/><Cell N='EndArrow' V='0'/><Cell N='LineCap' V='0'/><Cell N='BeginArrowSize' V='2'/><Cell N='LineColorTrans' V='0'/><Cell N='CompoundType' V='0'/><Cell N='FillForegnd' V='1'/><Cell N='FillBkgnd' V='0'/><Cell N='FillPattern' V='1'/><Cell N='ShdwForegnd' V='0'/><Cell N='ShdwPattern' V='0'/><Cell N='FillForegndTrans' V='0'/><Cell N='FillBkgndTrans' V='0'/><Cell N='ShdwForegndTrans' V='0'/><Cell N='ShapeShdwType' V='0'/><Cell N='ShapeShdwOffsetX' V='0'/><Cell N='ShapeShdwOffsetY' V='0'/><Cell N='ShapeShdwObliqueAngle' V='0'/><Cell N='ShapeShdwScaleFactor' V='1'/><Cell N='ShapeShdwBlur' V='0'/><Cell N='ShapeShdwShow' V='0'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='1'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5'/><Cell N='TextDirection' V='0'/><Cell N='TextBkgndTrans' V='0'/><Cell N='LockWidth' V='0'/><Cell N='LockHeight' V='0'/><Cell N='LockMoveX' V='0'/><Cell N='LockMoveY' V='0'/><Cell N='LockAspect' V='0'/><Cell N='LockDelete' V='0'/><Cell N='LockBegin' V='0'/><Cell N='LockEnd' V='0'/><Cell N='LockRotate' V='0'/><Cell N='LockCrop' V='0'/><Cell N='LockVtxEdit' V='0'/><Cell N='LockTextEdit' V='0'/><Cell N='LockFormat' V='0'/><Cell N='LockGroup' V='0'/><Cell N='LockCalcWH' V='0'/><Cell N='LockSelect' V='0'/><Cell N='LockCustProp' V='0'/><Cell N='LockFromGroupFormat' V='0'/><Cell N='LockThemeColors' V='0'/><Cell N='LockThemeEffects' V='0'/><Cell N='LockThemeConnectors' V='0'/><Cell N='LockThemeFonts' V='0'/><Cell N='LockThemeIndex' V='0'/><Cell N='LockReplace' V='0'/><Cell N='LockVariation' V='0'/><Cell N='NoObjHandles' V='0'/><Cell N='NonPrinting' V='0'/><Cell N='NoCtlHandles' V='0'/><Cell N='NoAlignBox' V='0'/><Cell N='UpdateAlignBox' V='0'/><Cell N='HideText' V='0'/><Cell N='DynFeedback' V='0'/><Cell N='GlueType' V='0'/><Cell N='WalkPreference' V='0'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0'/><Cell N='Comment' V=''/><Cell N='IsDropSource' V='0'/><Cell N='NoLiveDynamics' V='0'/><Cell N='LocalizeMerge' V='0'/><Cell N='NoProofing' V='0'/><Cell N='Calendar' V='0'/><Cell N='LangID' V='en-US'/><Cell N='ShapeKeywords' V=''/><Cell N='DropOnPageScale' V='1'/><Cell N='TheData' V='0' F='No Formula'/><Cell N='TheText' V='0' F='No Formula'/><Cell N='EventDblClick' V='0' F='No Formula'/><Cell N='EventXFMod' V='0' F='No Formula'/><Cell N='EventDrop' V='0' F='No Formula'/><Cell N='EventMultiDrop' V='0' F='No Formula'/><Cell N='HelpTopic' V=''/><Cell N='Copyright' V=''/><Cell N='LayerMember' V=''/><Cell N='XRulerDensity' V='32'/><Cell N='YRulerDensity' V='32'/><Cell N='XRulerOrigin' V='0'/><Cell N='YRulerOrigin' V='0'/><Cell N='XGridDensity' V='8'/><Cell N='YGridDensity' V='8'/><Cell N='XGridSpacing' V='0'/><Cell N='YGridSpacing' V='0'/><Cell N='XGridOrigin' V='0'/><Cell N='YGridOrigin' V='0'/><Cell N='Gamma' V='1'/><Cell N='Contrast' V='0.5'/><Cell N='Brightness' V='0.5'/><Cell N='Sharpen' V='0'/><Cell N='Blur' V='0'/><Cell N='Denoise' V='0'/><Cell N='Transparency' V='0'/><Cell N='SelectMode' V='1'/><Cell N='DisplayMode' V='2'/><Cell N='IsDropTarget' V='0'/><Cell N='IsSnapTarget' V='1'/><Cell N='IsTextEditTarget' V='1'/><Cell N='DontMoveChildren' V='0'/><Cell N='ShapePermeableX' V='0'/><Cell N='ShapePermeableY' V='0'/><Cell N='ShapePermeablePlace' V='0'/><Cell N='Relationships' V='0'/><Cell N='ShapeFixedCode' V='0'/><Cell N='ShapePlowCode' V='0'/><Cell N='ShapeRouteStyle' V='0'/><Cell N='ShapePlaceStyle' V='0'/><Cell N='ConFixedCode' V='0'/><Cell N='ConLineJumpCode' V='0'/><Cell N='ConLineJumpStyle' V='0'/><Cell N='ConLineJumpDirX' V='0'/><Cell N='ConLineJumpDirY' V='0'/><Cell N='ShapePlaceFlip' V='0'/><Cell N='ConLineRouteExt' V='0'/><Cell N='ShapeSplit' V='0'/><Cell N='ShapeSplittable' V='0'/><Cell N='DisplayLevel' V='0'/><Cell N='ResizePage' V='0'/><Cell N='EnableGrid' V='0'/><Cell N='DynamicsOff' V='0'/><Cell N='CtrlAsInput' V='0'/><Cell N='AvoidPageBreaks' V='0'/><Cell N='PlaceStyle' V='0'/><Cell N='RouteStyle' V='0'/><Cell N='PlaceDepth' V='0'/><Cell N='PlowCode' V='0'/><Cell N='LineJumpCode' V='1'/><Cell N='LineJumpStyle' V='0'/><Cell N='PageLineJumpDirX' V='0'/><Cell N='PageLineJumpDirY' V='0'/><Cell N='LineToNodeX' V='0.125'/><Cell N='LineToNodeY' V='0.125'/><Cell N='BlockSizeX' V='0.25'/><Cell N='BlockSizeY' V='0.25'/><Cell N='AvenueSizeX' V='0.375'/><Cell N='AvenueSizeY' V='0.375'/><Cell N='LineToLineX' V='0.125'/><Cell N='LineToLineY' V='0.125'/><Cell N='LineJumpFactorX' V='0.66666666666667'/><Cell N='LineJumpFactorY' V='0.66666666666667'/><Cell N='LineAdjustFrom' V='0'/><Cell N='LineAdjustTo' V='0'/><Cell N='PlaceFlip' V='0'/><Cell N='LineRouteExt' V='0'/><Cell N='PageShapeSplit' V='0'/><Cell N='PageLeftMargin' V='0.25'/><Cell N='PageRightMargin' V='0.25'/><Cell N='PageTopMargin' V='0.25'/><Cell N='PageBottomMargin' V='0.25'/><Cell N='ScaleX' V='1'/><Cell N='ScaleY' V='1'/><Cell N='PagesX' V='1'/><Cell N='PagesY' V='1'/><Cell N='CenterX' V='0'/><Cell N='CenterY' V='0'/><Cell N='OnPage' V='0'/><Cell N='PrintGrid' V='0'/><Cell N='PrintPageOrientation' V='1'/><Cell N='PaperKind' V='1'/><Cell N='PaperSource' V='7'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineGradientDir' V='0'/><Cell N='LineGradientAngle' V='1.5707963267949'/><Cell N='FillGradientDir' V='0'/><Cell N='FillGradientAngle' V='1.5707963267949'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='1'/><Cell N='UseGroupGradient' V='0'/><Cell N='BevelTopType' V='0'/><Cell N='BevelTopWidth' V='0'/><Cell N='BevelTopHeight' V='0'/><Cell N='BevelBottomType' V='0'/><Cell N='BevelBottomWidth' V='0'/><Cell N='BevelBottomHeight' V='0'/><Cell N='BevelDepthColor' V='1'/><Cell N='BevelDepthSize' V='0'/><Cell N='BevelContourColor' V='0'/><Cell N='BevelContourSize' V='0'/><Cell N='BevelMaterialType' V='0'/><Cell N='BevelLightingType' V='0'/><Cell N='BevelLightingAngle' V='0'/><Cell N='RotationXAngle' V='0'/><Cell N='RotationYAngle' V='0'/><Cell N='RotationZAngle' V='0'/><Cell N='RotationType' V='0'/><Cell N='Perspective' V='0'/><Cell N='DistanceFromGround' V='0'/><Cell N='KeepTextFlat' V='0'/><Cell N='ReflectionTrans' V='0'/><Cell N='ReflectionSize' V='0'/><Cell N='ReflectionDist' V='0'/><Cell N='ReflectionBlur' V='0'/><Cell N='GlowColor' V='1'/><Cell N='GlowColorTrans' V='0'/><Cell N='GlowSize' V='0'/><Cell N='SoftEdgesSize' V='0'/><Cell N='SketchSeed' V='0'/><Cell N='SketchEnabled' V='0'/><Cell N='SketchAmount' V='5'/><Cell N='SketchLineWeight' V='0.04166666666666666' U='PT'/><Cell N='SketchLineChange' V='0.14'/><Cell N='SketchFillChange' V='0.1'/><Cell N='ColorSchemeIndex' V='0'/><Cell N='EffectSchemeIndex' V='0'/><Cell N='ConnectorSchemeIndex' V='0'/><Cell N='FontSchemeIndex' V='0'/><Cell N='ThemeIndex' V='0'/><Cell N='VariationColorIndex' V='0'/><Cell N='VariationStyleIndex' V='0'/><Cell N='EmbellishmentIndex' V='0'/><Cell N='ReplaceLockShapeData' V='0'/><Cell N='ReplaceLockText' V='0'/><Cell N='ReplaceLockFormat' V='0'/><Cell N='ReplaceCopyCells' V='0' U='BOOL' F='No Formula'/><Cell N='PageWidth' V='0' F='No Formula'/><Cell N='PageHeight' V='0' F='No Formula'/><Cell N='ShdwOffsetX' V='0' F='No Formula'/><Cell N='ShdwOffsetY' V='0' F='No Formula'/><Cell N='PageScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingSizeType' V='0' F='No Formula'/><Cell N='DrawingScaleType' V='0' F='No Formula'/><Cell N='InhibitSnap' V='0' F='No Formula'/><Cell N='PageLockReplace' V='0' U='BOOL' F='No Formula'/><Cell N='PageLockDuplicate' V='0' U='BOOL' F='No Formula'/><Cell N='UIVisibility' V='0' F='No Formula'/><Cell N='ShdwType' V='0' F='No Formula'/><Cell N='ShdwObliqueAngle' V='0' F='No Formula'/><Cell N='ShdwScaleFactor' V='0' F='No Formula'/><Cell N='DrawingResizeType' V='0' F='No Formula'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Calibri'/><Cell N='Color' V='0'/><Cell N='Style' V='0'/><Cell N='Case' V='0'/><Cell N='Pos' V='0'/><Cell N='FontScale' V='1'/><Cell N='Size' V='0.1666666666666667'/><Cell N='DblUnderline' V='0'/><Cell N='Overline' V='0'/><Cell N='Strikethru' V='0'/><Cell N='DoubleStrikethrough' V='0'/><Cell N='Letterspace' V='0'/><Cell N='ColorTrans' V='0'/><Cell N='AsianFont' V='0'/><Cell N='ComplexScriptFont' V='0'/><Cell N='ComplexScriptSize' V='-1'/><Cell N='LangID' V='en-US'/></Row></Section><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0'/><Cell N='IndLeft' V='0'/><Cell N='IndRight' V='0'/><Cell N='SpLine' V='-1.2'/><Cell N='SpBefore' V='0'/><Cell N='SpAfter' V='0'/><Cell N='HorzAlign' V='1'/><Cell N='Bullet' V='0'/><Cell N='BulletStr' V=''/><Cell N='BulletFont' V='0'/><Cell N='BulletFontSize' V='-1'/><Cell N='TextPosAfterBullet' V='0'/><Cell N='Flags' V='0'/></Row></Section><Section N='Tabs'><Row IX='0'/></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section></StyleSheet><StyleSheet ID='1' NameU='Text Only' IsCustomNameU='1' Name='Text Only' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='Themed' F='Inh'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='0'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='Themed' F='Inh'/><Cell N='FillGradientEnabled' V='Themed' F='Inh'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0' F='Inh'/><Cell N='IndLeft' V='0' F='Inh'/><Cell N='IndRight' V='0' F='Inh'/><Cell N='SpLine' V='-1.2' F='Inh'/><Cell N='SpBefore' V='0' F='Inh'/><Cell N='SpAfter' V='0' F='Inh'/><Cell N='HorzAlign' V='0'/><Cell N='Bullet' V='0' F='Inh'/><Cell N='BulletStr' V='' F='Inh'/><Cell N='BulletFont' V='0' F='Inh'/><Cell N='BulletFontSize' V='-1' F='Inh'/><Cell N='TextPosAfterBullet' V='0' F='Inh'/><Cell N='Flags' V='0' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='2' NameU='None' IsCustomNameU='1' Name='None' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='0'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='QuickStyleLineColor' V='100' F='Inh'/><Cell N='QuickStyleFillColor' V='100' F='Inh'/><Cell N='QuickStyleShadowColor' V='100' F='Inh'/><Cell N='QuickStyleFontColor' V='100' F='Inh'/><Cell N='QuickStyleLineMatrix' V='100' F='Inh'/><Cell N='QuickStyleFillMatrix' V='100' F='Inh'/><Cell N='QuickStyleEffectsMatrix' V='0' F='GUARD(0)'/><Cell N='QuickStyleFontMatrix' V='100' F='Inh'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='2'/></StyleSheet><StyleSheet ID='3' NameU='Normal' IsCustomNameU='1' Name='Normal' IsCustomName='1' LineStyle='6' FillStyle='6' TextStyle='6'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT'/><Cell N='RightMargin' V='0.05555555555555555' U='PT'/><Cell N='TopMargin' V='0.05555555555555555' U='PT'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/></StyleSheet><StyleSheet ID='4' NameU='Guide' IsCustomNameU='1' Name='Guide' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0' U='PT'/><Cell N='LineColor' V='#7f7f7f'/><Cell N='LinePattern' V='23'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='2'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='1'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='ShapePermeableX' V='1'/><Cell N='ShapePermeableY' V='1'/><Cell N='ShapePermeablePlace' V='1'/><Cell N='Relationships' V='0' F='Inh'/><Cell N='ShapeFixedCode' V='0' F='Inh'/><Cell N='ShapePlowCode' V='0' F='Inh'/><Cell N='ShapeRouteStyle' V='0' F='Inh'/><Cell N='ShapePlaceStyle' V='0' F='Inh'/><Cell N='ConFixedCode' V='0' F='Inh'/><Cell N='ConLineJumpCode' V='0' F='Inh'/><Cell N='ConLineJumpStyle' V='0' F='Inh'/><Cell N='ConLineJumpDirX' V='0' F='Inh'/><Cell N='ConLineJumpDirY' V='0' F='Inh'/><Cell N='ShapePlaceFlip' V='0' F='Inh'/><Cell N='ConLineRouteExt' V='0' F='Inh'/><Cell N='ShapeSplit' V='0' F='Inh'/><Cell N='ShapeSplittable' V='0' F='Inh'/><Cell N='DisplayLevel' V='0' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='4'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.125'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='6' NameU='Theme' IsCustomNameU='1' Name='Theme' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='THEMEVAL()'/><Cell N='LineColor' V='Themed' F='THEMEVAL()'/><Cell N='LinePattern' V='Themed' F='THEMEVAL()'/><Cell N='Rounding' V='Themed' F='THEMEVAL()'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='CompoundType' V='Themed' F='THEMEVAL()'/><Cell N='FillForegnd' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgnd' V='Themed' F='THEMEVAL()'/><Cell N='FillPattern' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegnd' V='Themed' F='THEMEVAL()'/><Cell N='ShdwPattern' V='Themed' F='THEMEVAL()'/><Cell N='FillForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwType' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetX' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetY' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwBlur' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='RotateGradientWithShape' V='Themed' F='THEMEVAL()'/><Cell N='UseGroupGradient' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopType' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopWidth' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopHeight' V='Themed' F='THEMEVAL()'/><Cell N='BevelBottomType' V='0' F='Inh'/><Cell N='BevelBottomWidth' V='0' F='Inh'/><Cell N='BevelBottomHeight' V='0' F='Inh'/><Cell N='BevelDepthColor' V='1' F='Inh'/><Cell N='BevelDepthSize' V='0' F='Inh'/><Cell N='BevelContourColor' V='Themed' F='THEMEVAL()'/><Cell N='BevelContourSize' V='Themed' F='THEMEVAL()'/><Cell N='BevelMaterialType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingAngle' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionTrans' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionSize' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionDist' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionBlur' V='Themed' F='THEMEVAL()'/><Cell N='GlowColor' V='Themed' F='THEMEVAL()'/><Cell N='GlowColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GlowSize' V='Themed' F='THEMEVAL()'/><Cell N='SoftEdgesSize' V='Themed' F='THEMEVAL()'/><Cell N='SketchSeed' V='0' F='Inh'/><Cell N='SketchEnabled' V='Themed' F='THEMEVAL()'/><Cell N='SketchAmount' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineWeight' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineChange' V='Themed' F='THEMEVAL()'/><Cell N='SketchFillChange' V='Themed' F='THEMEVAL()'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='0' F='Inh'/><Cell N='ColorSchemeIndex' V='65534'/><Cell N='EffectSchemeIndex' V='65534'/><Cell N='ConnectorSchemeIndex' V='65534'/><Cell N='FontSchemeIndex' V='65534'/><Cell N='ThemeIndex' V='65534'/><Cell N='VariationColorIndex' V='65534'/><Cell N='VariationStyleIndex' V='65534'/><Cell N='EmbellishmentIndex' V='65534'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='THEMEVAL()'/><Cell N='Color' V='Themed' F='THEMEVAL()'/><Cell N='Style' V='Themed' F='THEMEVAL()'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1666666666666667' F='Inh'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section></StyleSheet><StyleSheet ID='7' NameU='Connector' IsCustomNameU='1' Name='Connector' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='#ffffff' F='THEMEGUARD(THEMEVAL(\"BackgroundColor\")+1)'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='0' F='Inh'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='1'/><Cell N='QuickStyleFillMatrix' V='1'/><Cell N='QuickStyleEffectsMatrix' V='1'/><Cell N='QuickStyleFontMatrix' V='1'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrow' V='Themed' F='THEMEVAL()'/><Cell N='EndArrow' V='Themed' F='THEMEVAL()'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='Themed' F='Inh'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1111111111111111'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet></StyleSheets><DocumentSheet NameU='TheDoc' IsCustomNameU='1' Name='TheDoc' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='OutputFormat' V='0'/><Cell N='LockPreview' V='0'/><Cell N='AddMarkup' V='0'/><Cell N='ViewMarkup' V='0'/><Cell N='DocLockReplace' V='0' U='BOOL'/><Cell N='NoCoauth' V='0' U='BOOL'/><Cell N='DocLockDuplicatePage' V='0' U='BOOL'/><Cell N='PreviewQuality' V='0'/><Cell N='PreviewScope' V='0'/><Cell N='DocLangID' V='en-US'/><Section N='User'><Row N='msvNoAutoConnect'><Cell N='Value' V='1'/><Cell N='Prompt' V='' F='No Formula'/></Row></Section></DocumentSheet></VisioDocument>","visio/windows.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Windows ClientWidth='0' ClientHeight='0' xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve' />","visio/_rels/document.xml.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.microsoft.com/visio/2010/relationships/masters' Target='masters/masters.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/pages' Target='pages/pages.xml' /><Relationship Id='rId3' Type='http://schemas.microsoft.com/visio/2010/relationships/windows' Target='windows.xml' /></Relationships>","visio/masters/_rels/masters.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.microsoft.com/visio/2010/relationships/master" Target="master1.xml"/></Relationships>',"visio/masters/masters.xml":"<?xml version='1.0' encoding='utf-8' ?><Masters xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Master ID='4' NameU='Dynamic connector' IsCustomNameU='1' Name='Dynamic connector' IsCustomName='1' Prompt='This connector automatically routes between the shapes it connects.' IconSize='1' AlignName='2' MatchByName='1' IconUpdate='0' UniqueID='{002A9108-0000-0000-8E40-00608CF305B2}' BaseID='{F7290A45-E3AD-11D2-AE4F-006008C9F5A9}' PatternFlags='0' Hidden='0' MasterType='0'><PageSheet LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='PageWidth' V='3'/><Cell N='PageHeight' V='3'/><Cell N='ShdwOffsetX' V='0.125'/><Cell N='ShdwOffsetY' V='-0.125'/><Cell N='PageScale' V='1' U='IN_F'/><Cell N='DrawingScale' V='1' U='IN_F'/><Cell N='DrawingSizeType' V='4'/><Cell N='DrawingScaleType' V='0'/><Cell N='InhibitSnap' V='0'/><Cell N='PageLockReplace' V='0' U='BOOL'/><Cell N='PageLockDuplicate' V='0' U='BOOL'/><Cell N='UIVisibility' V='0'/><Cell N='ShdwType' V='0'/><Cell N='ShdwObliqueAngle' V='0'/><Cell N='ShdwScaleFactor' V='1'/><Cell N='DrawingResizeType' V='0'/><Section N='Layer'><Row IX='0'><Cell N='Name' V='Connector'/><Cell N='Color' V='255'/><Cell N='Status' V='0'/><Cell N='Visible' V='1'/><Cell N='Print' V='1'/><Cell N='Active' V='0'/><Cell N='Lock' V='0'/><Cell N='Snap' V='1'/><Cell N='Glue' V='1'/><Cell N='NameUniv' V='Connector'/><Cell N='ColorTrans' V='0'/></Row></Section></PageSheet><Rel r:id='rId1'/></Master></Masters>","visio/masters/master1.xml":"<?xml version='1.0' encoding='utf-8' ?><MasterContents xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Shapes><Shape ID='5' OriginalID='0' Type='Shape' LineStyle='7' FillStyle='7' TextStyle='7'><Cell N='PinX' V='1.5' F='GUARD((BeginX+EndX)/2)'/><Cell N='PinY' V='1.5' F='GUARD((BeginY+EndY)/2)'/><Cell N='Width' V='1' F='GUARD(EndX-BeginX)'/><Cell N='Height' V='-1' F='GUARD(EndY-BeginY)'/><Cell N='LocPinX' V='0.5' F='GUARD(Width*0.5)'/><Cell N='LocPinY' V='-0.5' F='GUARD(Height*0.5)'/><Cell N='Angle' V='0' F='GUARD(0DA)'/><Cell N='FlipX' V='0' F='GUARD(FALSE)'/><Cell N='FlipY' V='0' F='GUARD(FALSE)'/><Cell N='ResizeMode' V='0'/><Cell N='BeginX' V='1'/><Cell N='BeginY' V='2'/><Cell N='EndX' V='2'/><Cell N='EndY' V='1'/><Cell N='TxtPinX' V='0' F='SETATREF(Controls.TextPosition)'/><Cell N='TxtPinY' V='-1' F='SETATREF(Controls.TextPosition.Y)'/><Cell N='TxtWidth' V='0.5555555555555556' F='MAX(TEXTWIDTH(TheText),5*Char.Size)'/><Cell N='TxtHeight' V='0.2444444444444444' F='TEXTHEIGHT(TheText,TxtWidth)'/><Cell N='TxtLocPinX' V='0.2777777777777778' F='TxtWidth*0.5'/><Cell N='TxtLocPinY' V='0.1222222222222222' F='TxtHeight*0.5'/><Cell N='TxtAngle' V='0'/><Cell N='LockHeight' V='1'/><Cell N='LockCalcWH' V='1'/><Cell N='HelpTopic' V='Vis_SE.chm!#20000'/><Cell N='Copyright' V='Copyright 2001 Microsoft Corporation. All rights reserved.'/><Cell N='NoAlignBox' V='1'/><Cell N='DynFeedback' V='2'/><Cell N='GlueType' V='2'/><Cell N='ObjType' V='2'/><Cell N='NoLiveDynamics' V='1'/><Cell N='ShapeSplittable' V='1'/><Cell N='LayerMember' V='0'/><Section N='Control'><Row N='TextPosition'><Cell N='X' V='0'/><Cell N='Y' V='-1'/><Cell N='XDyn' V='0' F='Controls.TextPosition'/><Cell N='YDyn' V='-1' F='Controls.TextPosition.Y'/><Cell N='XCon' V='5' F='IF(OR(STRSAME(SHAPETEXT(TheText),\"\"),HideText),5,0)'/><Cell N='YCon' V='0'/><Cell N='CanGlue' V='0'/><Cell N='Prompt' V='Reposition Text'/></Row></Section><Section N='Geometry' IX='0'><Cell N='NoFill' V='1'/><Cell N='NoLine' V='0'/><Cell N='NoShow' V='0'/><Cell N='NoSnap' V='0'/><Cell N='NoQuickDrag' V='0'/><Row T='MoveTo' IX='1'><Cell N='X' V='0'/><Cell N='Y' V='0'/></Row><Row T='LineTo' IX='2'><Cell N='X' V='0'/><Cell N='Y' V='-1'/></Row></Section></Shape></Shapes></MasterContents>"},-K;for(K in N)if(1<I&&K==M.CONTENT_TYPES_XML){for(var O=mxUtils.parseXml(N[K]),ba=O.documentElement,W=ba.children,R=null,S=0;S<W.length;S++){var ka=W[S];"/visio/pages/page1.xml"==ka.getAttribute(M.PART_NAME)&&(R=ka)}for(S=2;S<=I;S++)W=R.cloneNode(),W.setAttribute(M.PART_NAME,"/visio/pages/page"+S+".xml"),ba.appendChild(W);A(H,K,O,!0)}else H.file(K,N[K])}function z(H,I,N){return null!=H.createElementNS?H.createElementNS(I,N):H.createElement(N)}function B(H){var I=Q[H];null==I&&(I=U++,Q[H]=I);return I}-function m(H){var I={};try{var N=H.getGraphBounds().clone(),K=H.view.scale,O=H.view.translate,ba=Math.round(N.x/K)-O.x,W=Math.round(N.y/K)-O.y,R=H.pageFormat.width,S=H.pageFormat.height;0>ba&&(ba+=Math.ceil((O.x-N.x/K)/R)*R);0>W&&(W+=Math.ceil((O.y-N.y/K)/S)*S);var ka=Math.max(1,Math.ceil((N.width/K+ba)/R)),ca=Math.max(1,Math.ceil((N.height/K+W)/S));I.gridEnabled=H.gridEnabled;I.gridSize=H.gridSize;I.guidesEnabled=H.graphHandler.guidesEnabled;I.pageVisible=H.pageVisible;I.pageScale=H.pageScale;I.pageWidth=-H.pageFormat.width*ka;I.pageHeight=H.pageFormat.height*ca;I.backgroundClr=H.background;I.mathEnabled=H.mathEnabled;I.shadowVisible=H.shadowVisible}catch(qa){}return I}function h(H,I,N,K){return c(H,I/M.CONVERSION_FACTOR,N,K)}function c(H,I,N,K){N=z(N,M.XMLNS,"Cell");N.setAttribute("N",H);N.setAttribute("V",I);K&&N.setAttribute("F",K);return N}function a(H,I,N,K,O){var ba=z(O,M.XMLNS,"Row");ba.setAttribute("T",H);ba.setAttribute("IX",I);ba.appendChild(h("X",N,O));ba.appendChild(h("Y",K,O));return ba}-function b(H,I,N){var K=mxUtils.rgba2hex(H.style[mxConstants.STYLE_FILLCOLOR]);if(K&&"none"!=K){if(I.appendChild(c("FillForegnd",K,N)),(K=mxUtils.rgba2hex(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=K){I.appendChild(c("FillBkgnd",K,N));K=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var O=28;if(K)switch(K){case mxConstants.DIRECTION_EAST:O=25;break;case mxConstants.DIRECTION_WEST:O=27;break;case mxConstants.DIRECTION_NORTH:O=30}I.appendChild(c("FillPattern",O,N))}}else I.appendChild(c("FillPattern",-0,N));(K=mxUtils.rgba2hex(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=K?I.appendChild(c("LineColor",K,N)):I.appendChild(c("LinePattern",0,N));(K=H.style[mxConstants.STYLE_STROKEWIDTH])&&I.appendChild(h("LineWeight",K,N));(O=H.style[mxConstants.STYLE_OPACITY])?K=O:(K=H.style[mxConstants.STYLE_FILL_OPACITY],O=H.style[mxConstants.STYLE_STROKE_OPACITY]);K&&I.appendChild(c("FillForegndTrans",1-parseInt(K)/100,N));O&&I.appendChild(c("LineColorTrans",1-parseInt(O)/100,N));if(1==H.style[mxConstants.STYLE_DASHED]){K=-H.style[mxConstants.STYLE_DASH_PATTERN];O=9;if(K)switch(K){case "1 1":O=10;break;case "1 2":O=3;break;case "1 4":O=17}I.appendChild(c("LinePattern",O,N))}1==H.style[mxConstants.STYLE_SHADOW]&&(I.appendChild(c("ShdwPattern",1,N)),I.appendChild(c("ShdwForegnd","#000000",N)),I.appendChild(c("ShdwForegndTrans",.6,N)),I.appendChild(c("ShapeShdwType",1,N)),I.appendChild(c("ShapeShdwOffsetX","0.02946278254943948",N)),I.appendChild(c("ShapeShdwOffsetY","-0.02946278254943948",N)),I.appendChild(c("ShapeShdwScaleFactor",-"1",N)),I.appendChild(c("ShapeShdwBlur","0.05555555555555555",N)),I.appendChild(c("ShapeShdwShow",2,N)));1==H.style[mxConstants.STYLE_FLIPH]&&I.appendChild(c("FlipX",1,N));1==H.style[mxConstants.STYLE_FLIPV]&&I.appendChild(c("FlipY",1,N));1==H.style[mxConstants.STYLE_ROUNDED]&&I.appendChild(h("Rounding",.1*H.cell.geometry.width,N));(H=mxUtils.rgba2hex(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&I.appendChild(c("TextBkgnd",H,N))}function d(H,I,N,K,O,ba){var W=z(K,M.XMLNS,"Shape");W.setAttribute("ID",-H);W.setAttribute("NameU","Shape"+H);W.setAttribute("LineStyle","0");W.setAttribute("FillStyle","0");W.setAttribute("TextStyle","0");H=I.width/2;var R=I.height/2;W.appendChild(h("PinX",I.x+H+(ba?0:L.shiftX),K));W.appendChild(h("PinY",O-I.y-R-(ba?0:L.shiftY),K));W.appendChild(h("Width",I.width,K));W.appendChild(h("Height",I.height,K));W.appendChild(h("LocPinX",H,K));W.appendChild(h("LocPinY",R,K));W.appendChild(c("LayerMember",N+"",K));return W}function f(H,I){H=M.ARROWS_MAP[(null==H?"none":H)+"|"+-(null==I?"1":I)];return null!=H?H:1}function k(H){return null==H?2:2>=H?0:3>=H?1:5>=H?2:7>=H?3:9>=H?4:22>=H?5:6}function n(H,I,N,K,O,ba){var W=N.view.getState(H,!0);if(null==W||null==W.absolutePoints||null==W.cellBounds)return null;N=z(K,M.XMLNS,"Shape");var R=B(H.id);N.setAttribute("ID",R);N.setAttribute("NameU","Dynamic connector."+R);N.setAttribute("Name","Dynamic connector."+R);N.setAttribute("Type","Shape");N.setAttribute("Master","4");var S=L.state;R=W.absolutePoints;var ka=W.cellBounds,ca=-ka.width/2,qa=ka.height/2;N.appendChild(h("PinX",ka.x+ca+(ba?0:L.shiftX),K));N.appendChild(h("PinY",O-ka.y-qa-(ba?0:L.shiftY),K));N.appendChild(h("Width",ka.width,K));N.appendChild(h("Height",ka.height,K));N.appendChild(h("LocPinX",ca,K));N.appendChild(h("LocPinY",qa,K));L.newEdge(N,W,K);ca=function(sa,Fa,pa){var Za=sa.x;sa=sa.y;Za=Za*S.scale-ka.x+S.dx+(pa||ba?0:L.shiftX);sa=(Fa?0:ka.height)-sa*S.scale+ka.y-S.dy-(pa||ba?0:L.shiftY);return{x:Za,y:sa}};qa=ca(R[0],!0);N.appendChild(h("BeginX",ka.x+qa.x,-K,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));N.appendChild(h("BeginY",O-ka.y+qa.y,K,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));qa=ca(R[R.length-1],!0);N.appendChild(h("EndX",ka.x+qa.x,K,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));N.appendChild(h("EndY",O-ka.y+qa.y,K,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));N.appendChild(c("BegTrigger","2",K,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));N.appendChild(c("EndTrigger","2",K,H.target?"_XFTRIGGER(Sheet."+-B(H.target.id)+"!EventXFMod)":null));N.appendChild(c("ConFixedCode","6",K));N.appendChild(c("LayerMember",I+"",K));b(W,N,K);I=W.style[mxConstants.STYLE_STARTSIZE];H=f(W.style[mxConstants.STYLE_STARTARROW],W.style[mxConstants.STYLE_STARTFILL]);N.appendChild(c("BeginArrow",H,K));N.appendChild(c("BeginArrowSize",k(I),K));I=W.style[mxConstants.STYLE_ENDSIZE];H=f(W.style[mxConstants.STYLE_ENDARROW],W.style[mxConstants.STYLE_ENDFILL]);N.appendChild(c("EndArrow",H,K));N.appendChild(c("EndArrowSize",k(I),-K));null!=W.text&&W.text.checkBounds()&&(L.save(),W.text.paint(L),L.restore());W=z(K,M.XMLNS,"Section");W.setAttribute("N","Geometry");W.setAttribute("IX","0");for(H=0;H<R.length;H++)I=ca(R[H],!1,!0),W.appendChild(a(0==H?"MoveTo":"LineTo",H+1,I.x,I.y,K));W.appendChild(c("NoFill","1",K));W.appendChild(c("NoLine","0",K));N.appendChild(W);return N}function p(H,I,N,K,O,ba,W){var R=H.geometry,S=R;if(null!=R)try{R.relative&&ba&&(S=R.clone(),R.x*=ba.width,R.y*=ba.height,H.vertex&&null!=R.offset&&(R.x+=R.offset.x,-R.y+=R.offset.y),R.relative=0);var ka=B(H.id);if(!H.treatAsSingle&&0<H.getChildCount()){var ca=d(ka+"10000",R,I,K,O,W);ca.setAttribute("Type","Group");var qa=z(K,M.XMLNS,"Shapes");L.save();L.translate(-R.x,-R.y);var sa=R.clone();sa.x=0;sa.y=0;H.setGeometry(sa);H.treatAsSingle=!0;var Fa=p(H,I,N,K,R.height,R,!0);delete H.treatAsSingle;H.setGeometry(R);null!=Fa&&qa.appendChild(Fa);for(O=0;O<H.getChildCount();O++)Fa=p(H.children[O],I,N,K,R.height,R,!0),null!=Fa&&qa.appendChild(Fa);ca.appendChild(qa);-L.restore();return ca}if(H.vertex){ca=d(ka,R,I,K,O,W);var pa=N.view.getState(H,!0);null!=pa&&(b(pa,ca,K),L.newShape(ca,pa,K),null!=pa.text&&pa.text.checkBounds()&&(L.save(),pa.text.paint(L),L.restore()),null!=pa.shape&&pa.shape.checkBounds()&&(L.save(),pa.shape.paint(L),L.restore()),ca.appendChild(L.getShapeGeo()),L.endShape(),ca.setAttribute("Type",L.getShapeType()));return ca}return n(H,I,N,K,O,W)}finally{H.geometry=S}else return null}function x(H,I){var N=mxUtils.createXmlDocument(),K=z(N,M.XMLNS,-"PageContents");K.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);K.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",M.XMLNS_R);var O=z(N,M.XMLNS,"Shapes");K.appendChild(O);var ba=H.model,W=H.view.translate,R=H.view.scale,S=H.getGraphBounds();L.shiftX=0;L.shiftY=0;if(S.x/R<W.x||S.y/R<W.y)L.shiftX=Math.ceil((W.x-S.x/R)/H.pageFormat.width)*H.pageFormat.width,L.shiftY=Math.ceil((W.y-S.y/R)/H.pageFormat.height)*H.pageFormat.height;L.save();L.translate(-W.x,-W.y);L.scale(1/R);L.newPage();-R=H.model.getChildCells(H.model.root);W={};for(S=0;S<R.length;S++)W[R[S].id]=S;for(var ka in ba.cells)R=ba.cells[ka],S=null!=R.parent?W[R.parent.id]:null,null!=S&&(R=p(R,S,H,N,I.pageHeight),null!=R&&O.appendChild(R));H=z(N,M.XMLNS,"Connects");K.appendChild(H);for(ka in ba.cells)R=ba.cells[ka],R.edge&&(R.source&&(I=z(N,M.XMLNS,"Connect"),I.setAttribute("FromSheet",B(R.id)),I.setAttribute("FromCell","BeginX"),I.setAttribute("ToSheet",B(R.source.id)),H.appendChild(I)),R.target&&(I=z(N,M.XMLNS,"Connect"),-I.setAttribute("FromSheet",B(R.id)),I.setAttribute("FromCell","EndX"),I.setAttribute("ToSheet",B(R.target.id)),H.appendChild(I)));N.appendChild(K);L.restore();return N}function A(H,I,N,K){H.file(I,(K?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(N,"\n"))}function C(H,I,N,K){var O=mxUtils.createXmlDocument(),ba=mxUtils.createXmlDocument(),W=z(O,M.XMLNS,"Pages");W.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);W.setAttributeNS("http://www.w3.org/2000/xmlns/",-"xmlns:r",M.XMLNS_R);var R=z(ba,M.RELS_XMLNS,"Relationships"),S=1,ka;for(ka in I){var ca="page"+S+".xml",qa=z(O,M.XMLNS,"Page");qa.setAttribute("ID",S-1);qa.setAttribute("NameU",ka);qa.setAttribute("Name",ka);var sa=z(O,M.XMLNS,"PageSheet"),Fa=K[ka];sa.appendChild(h("PageWidth",Fa.pageWidth,O));sa.appendChild(h("PageHeight",Fa.pageHeight,O));sa.appendChild(c("PageScale",Fa.pageScale,O));sa.appendChild(c("DrawingScale",1,O));Fa=z(O,M.XMLNS,"Rel");Fa.setAttributeNS(M.XMLNS_R,"r:id","rId"+S);var pa=+L;for(L in N)if(1<J&&L==M.CONTENT_TYPES_XML){for(var O=mxUtils.parseXml(N[L]),ba=O.documentElement,W=ba.children,R=null,T=0;T<W.length;T++){var ka=W[T];"/visio/pages/page1.xml"==ka.getAttribute(M.PART_NAME)&&(R=ka)}for(T=2;T<=J;T++)W=R.cloneNode(),W.setAttribute(M.PART_NAME,"/visio/pages/page"+T+".xml"),ba.appendChild(W);A(H,L,O,!0)}else H.file(L,N[L])}function z(H,J,N){return null!=H.createElementNS?H.createElementNS(J,N):H.createElement(N)}function B(H){var J=Q[H];null==J&&(J=S++,Q[H]=J);return J}+function m(H){var J={};try{var N=H.getGraphBounds().clone(),L=H.view.scale,O=H.view.translate,ba=Math.round(N.x/L)-O.x,W=Math.round(N.y/L)-O.y,R=H.pageFormat.width,T=H.pageFormat.height;0>ba&&(ba+=Math.ceil((O.x-N.x/L)/R)*R);0>W&&(W+=Math.ceil((O.y-N.y/L)/T)*T);var ka=Math.max(1,Math.ceil((N.width/L+ba)/R)),ca=Math.max(1,Math.ceil((N.height/L+W)/T));J.gridEnabled=H.gridEnabled;J.gridSize=H.gridSize;J.guidesEnabled=H.graphHandler.guidesEnabled;J.pageVisible=H.pageVisible;J.pageScale=H.pageScale;J.pageWidth=+H.pageFormat.width*ka;J.pageHeight=H.pageFormat.height*ca;J.backgroundClr=H.background;J.mathEnabled=H.mathEnabled;J.shadowVisible=H.shadowVisible}catch(qa){}return J}function h(H,J,N,L){return c(H,J/M.CONVERSION_FACTOR,N,L)}function c(H,J,N,L){N=z(N,M.XMLNS,"Cell");N.setAttribute("N",H);N.setAttribute("V",J);L&&N.setAttribute("F",L);return N}function a(H,J,N,L,O){var ba=z(O,M.XMLNS,"Row");ba.setAttribute("T",H);ba.setAttribute("IX",J);ba.appendChild(h("X",N,O));ba.appendChild(h("Y",L,O));return ba}+function b(H,J,N){var L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_FILLCOLOR]);if(L&&"none"!=L){if(J.appendChild(c("FillForegnd",L,N)),(L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=L){J.appendChild(c("FillBkgnd",L,N));L=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var O=28;if(L)switch(L){case mxConstants.DIRECTION_EAST:O=25;break;case mxConstants.DIRECTION_WEST:O=27;break;case mxConstants.DIRECTION_NORTH:O=30}J.appendChild(c("FillPattern",O,N))}}else J.appendChild(c("FillPattern",+0,N));(L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=L?J.appendChild(c("LineColor",L,N)):J.appendChild(c("LinePattern",0,N));(L=H.style[mxConstants.STYLE_STROKEWIDTH])&&J.appendChild(h("LineWeight",L,N));(O=H.style[mxConstants.STYLE_OPACITY])?L=O:(L=H.style[mxConstants.STYLE_FILL_OPACITY],O=H.style[mxConstants.STYLE_STROKE_OPACITY]);L&&J.appendChild(c("FillForegndTrans",1-parseInt(L)/100,N));O&&J.appendChild(c("LineColorTrans",1-parseInt(O)/100,N));if(1==H.style[mxConstants.STYLE_DASHED]){L=+H.style[mxConstants.STYLE_DASH_PATTERN];O=9;if(L)switch(L){case "1 1":O=10;break;case "1 2":O=3;break;case "1 4":O=17}J.appendChild(c("LinePattern",O,N))}1==H.style[mxConstants.STYLE_SHADOW]&&(J.appendChild(c("ShdwPattern",1,N)),J.appendChild(c("ShdwForegnd","#000000",N)),J.appendChild(c("ShdwForegndTrans",.6,N)),J.appendChild(c("ShapeShdwType",1,N)),J.appendChild(c("ShapeShdwOffsetX","0.02946278254943948",N)),J.appendChild(c("ShapeShdwOffsetY","-0.02946278254943948",N)),J.appendChild(c("ShapeShdwScaleFactor",+"1",N)),J.appendChild(c("ShapeShdwBlur","0.05555555555555555",N)),J.appendChild(c("ShapeShdwShow",2,N)));1==H.style[mxConstants.STYLE_FLIPH]&&J.appendChild(c("FlipX",1,N));1==H.style[mxConstants.STYLE_FLIPV]&&J.appendChild(c("FlipY",1,N));1==H.style[mxConstants.STYLE_ROUNDED]&&J.appendChild(h("Rounding",.1*H.cell.geometry.width,N));(H=mxUtils.rgba2hex(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&J.appendChild(c("TextBkgnd",H,N))}function d(H,J,N,L,O,ba){var W=z(L,M.XMLNS,"Shape");W.setAttribute("ID",+H);W.setAttribute("NameU","Shape"+H);W.setAttribute("LineStyle","0");W.setAttribute("FillStyle","0");W.setAttribute("TextStyle","0");H=J.width/2;var R=J.height/2;W.appendChild(h("PinX",J.x+H+(ba?0:K.shiftX),L));W.appendChild(h("PinY",O-J.y-R-(ba?0:K.shiftY),L));W.appendChild(h("Width",J.width,L));W.appendChild(h("Height",J.height,L));W.appendChild(h("LocPinX",H,L));W.appendChild(h("LocPinY",R,L));W.appendChild(c("LayerMember",N+"",L));return W}function f(H,J){H=M.ARROWS_MAP[(null==H?"none":H)+"|"++(null==J?"1":J)];return null!=H?H:1}function k(H){return null==H?2:2>=H?0:3>=H?1:5>=H?2:7>=H?3:9>=H?4:22>=H?5:6}function n(H,J,N,L,O,ba){var W=N.view.getState(H,!0);if(null==W||null==W.absolutePoints||null==W.cellBounds)return null;N=z(L,M.XMLNS,"Shape");var R=B(H.id);N.setAttribute("ID",R);N.setAttribute("NameU","Dynamic connector."+R);N.setAttribute("Name","Dynamic connector."+R);N.setAttribute("Type","Shape");N.setAttribute("Master","4");var T=K.state;R=W.absolutePoints;var ka=W.cellBounds,ca=+ka.width/2,qa=ka.height/2;N.appendChild(h("PinX",ka.x+ca+(ba?0:K.shiftX),L));N.appendChild(h("PinY",O-ka.y-qa-(ba?0:K.shiftY),L));N.appendChild(h("Width",ka.width,L));N.appendChild(h("Height",ka.height,L));N.appendChild(h("LocPinX",ca,L));N.appendChild(h("LocPinY",qa,L));K.newEdge(N,W,L);ca=function(sa,Fa,pa){var Za=sa.x;sa=sa.y;Za=Za*T.scale-ka.x+T.dx+(pa||ba?0:K.shiftX);sa=(Fa?0:ka.height)-sa*T.scale+ka.y-T.dy-(pa||ba?0:K.shiftY);return{x:Za,y:sa}};qa=ca(R[0],!0);N.appendChild(h("BeginX",ka.x+qa.x,+L,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));N.appendChild(h("BeginY",O-ka.y+qa.y,L,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));qa=ca(R[R.length-1],!0);N.appendChild(h("EndX",ka.x+qa.x,L,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));N.appendChild(h("EndY",O-ka.y+qa.y,L,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));N.appendChild(c("BegTrigger","2",L,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));N.appendChild(c("EndTrigger","2",L,H.target?"_XFTRIGGER(Sheet."++B(H.target.id)+"!EventXFMod)":null));N.appendChild(c("ConFixedCode","6",L));N.appendChild(c("LayerMember",J+"",L));b(W,N,L);J=W.style[mxConstants.STYLE_STARTSIZE];H=f(W.style[mxConstants.STYLE_STARTARROW],W.style[mxConstants.STYLE_STARTFILL]);N.appendChild(c("BeginArrow",H,L));N.appendChild(c("BeginArrowSize",k(J),L));J=W.style[mxConstants.STYLE_ENDSIZE];H=f(W.style[mxConstants.STYLE_ENDARROW],W.style[mxConstants.STYLE_ENDFILL]);N.appendChild(c("EndArrow",H,L));N.appendChild(c("EndArrowSize",k(J),+L));null!=W.text&&W.text.checkBounds()&&(K.save(),W.text.paint(K),K.restore());W=z(L,M.XMLNS,"Section");W.setAttribute("N","Geometry");W.setAttribute("IX","0");for(H=0;H<R.length;H++)J=ca(R[H],!1,!0),W.appendChild(a(0==H?"MoveTo":"LineTo",H+1,J.x,J.y,L));W.appendChild(c("NoFill","1",L));W.appendChild(c("NoLine","0",L));N.appendChild(W);return N}function q(H,J,N,L,O,ba,W){var R=H.geometry,T=R;if(null!=R)try{R.relative&&ba&&(T=R.clone(),R.x*=ba.width,R.y*=ba.height,H.vertex&&null!=R.offset&&(R.x+=R.offset.x,+R.y+=R.offset.y),R.relative=0);var ka=B(H.id);if(!H.treatAsSingle&&0<H.getChildCount()){var ca=d(ka+"10000",R,J,L,O,W);ca.setAttribute("Type","Group");var qa=z(L,M.XMLNS,"Shapes");K.save();K.translate(-R.x,-R.y);var sa=R.clone();sa.x=0;sa.y=0;H.setGeometry(sa);H.treatAsSingle=!0;var Fa=q(H,J,N,L,R.height,R,!0);delete H.treatAsSingle;H.setGeometry(R);null!=Fa&&qa.appendChild(Fa);for(O=0;O<H.getChildCount();O++)Fa=q(H.children[O],J,N,L,R.height,R,!0),null!=Fa&&qa.appendChild(Fa);ca.appendChild(qa);+K.restore();return ca}if(H.vertex){ca=d(ka,R,J,L,O,W);var pa=N.view.getState(H,!0);null!=pa&&(b(pa,ca,L),K.newShape(ca,pa,L),null!=pa.text&&pa.text.checkBounds()&&(K.save(),pa.text.paint(K),K.restore()),null!=pa.shape&&pa.shape.checkBounds()&&(K.save(),pa.shape.paint(K),K.restore()),ca.appendChild(K.getShapeGeo()),K.endShape(),ca.setAttribute("Type",K.getShapeType()));return ca}return n(H,J,N,L,O,W)}finally{H.geometry=T}else return null}function t(H,J){var N=mxUtils.createXmlDocument(),L=z(N,M.XMLNS,+"PageContents");L.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);L.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",M.XMLNS_R);var O=z(N,M.XMLNS,"Shapes");L.appendChild(O);var ba=H.model,W=H.view.translate,R=H.view.scale,T=H.getGraphBounds();K.shiftX=0;K.shiftY=0;if(T.x/R<W.x||T.y/R<W.y)K.shiftX=Math.ceil((W.x-T.x/R)/H.pageFormat.width)*H.pageFormat.width,K.shiftY=Math.ceil((W.y-T.y/R)/H.pageFormat.height)*H.pageFormat.height;K.save();K.translate(-W.x,-W.y);K.scale(1/R);K.newPage();+R=H.model.getChildCells(H.model.root);W={};for(T=0;T<R.length;T++)W[R[T].id]=T;for(var ka in ba.cells)R=ba.cells[ka],T=null!=R.parent?W[R.parent.id]:null,null!=T&&(R=q(R,T,H,N,J.pageHeight),null!=R&&O.appendChild(R));H=z(N,M.XMLNS,"Connects");L.appendChild(H);for(ka in ba.cells)R=ba.cells[ka],R.edge&&(R.source&&(J=z(N,M.XMLNS,"Connect"),J.setAttribute("FromSheet",B(R.id)),J.setAttribute("FromCell","BeginX"),J.setAttribute("ToSheet",B(R.source.id)),H.appendChild(J)),R.target&&(J=z(N,M.XMLNS,"Connect"),+J.setAttribute("FromSheet",B(R.id)),J.setAttribute("FromCell","EndX"),J.setAttribute("ToSheet",B(R.target.id)),H.appendChild(J)));N.appendChild(L);K.restore();return N}function A(H,J,N,L){H.file(J,(L?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(N,"\n"))}function C(H,J,N,L){var O=mxUtils.createXmlDocument(),ba=mxUtils.createXmlDocument(),W=z(O,M.XMLNS,"Pages");W.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);W.setAttributeNS("http://www.w3.org/2000/xmlns/",+"xmlns:r",M.XMLNS_R);var R=z(ba,M.RELS_XMLNS,"Relationships"),T=1,ka;for(ka in J){var ca="page"+T+".xml",qa=z(O,M.XMLNS,"Page");qa.setAttribute("ID",T-1);qa.setAttribute("NameU",ka);qa.setAttribute("Name",ka);var sa=z(O,M.XMLNS,"PageSheet"),Fa=L[ka];sa.appendChild(h("PageWidth",Fa.pageWidth,O));sa.appendChild(h("PageHeight",Fa.pageHeight,O));sa.appendChild(c("PageScale",Fa.pageScale,O));sa.appendChild(c("DrawingScale",1,O));Fa=z(O,M.XMLNS,"Rel");Fa.setAttributeNS(M.XMLNS_R,"r:id","rId"+T);var pa=z(O,M.XMLNS,"Section");pa.setAttribute("N","Layer");for(var Za=N[ka],Qb=0;Qb<Za.length;Qb++){var vb=z(O,M.XMLNS,"Row");vb.setAttribute("IX",Qb+"");pa.appendChild(vb);vb.appendChild(c("Name",Za[Qb].name,O));vb.appendChild(c("Color","255",O));vb.appendChild(c("Status","0",O));vb.appendChild(c("Visible",Za[Qb].visible?"1":"0",O));vb.appendChild(c("Print","1",O));vb.appendChild(c("Active","0",O));vb.appendChild(c("Lock",Za[Qb].locked?"1":"0",O));vb.appendChild(c("Snap","1",O));vb.appendChild(c("Glue",-"1",O));vb.appendChild(c("NameUniv",Za[Qb].name,O));vb.appendChild(c("ColorTrans","0",O))}sa.appendChild(pa);qa.appendChild(sa);qa.appendChild(Fa);W.appendChild(qa);qa=z(ba,M.RELS_XMLNS,"Relationship");qa.setAttribute("Id","rId"+S);qa.setAttribute("Type",M.PAGES_TYPE);qa.setAttribute("Target",ca);R.appendChild(qa);A(H,M.VISIO_PAGES+ca,I[ka]);S++}O.appendChild(W);ba.appendChild(R);A(H,M.VISIO_PAGES+"pages.xml",O);A(H,M.VISIO_PAGES+"_rels/pages.xml.rels",ba)}function J(H,I){I=M.VISIO_PAGES_RELS+"page"+-I+".xml.rels";var N=mxUtils.createXmlDocument(),K=z(N,M.RELS_XMLNS,"Relationships"),O=z(N,M.RELS_XMLNS,"Relationship");O.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");O.setAttribute("Id","rId1");O.setAttribute("Target","../masters/master1.xml");K.appendChild(O);var ba=L.images;if(0<ba.length)for(var W=0;W<ba.length;W++)O=z(N,M.RELS_XMLNS,"Relationship"),O.setAttribute("Type",M.XMLNS_R+"/image"),O.setAttribute("Id","rId"+(W+2)),O.setAttribute("Target","../media/"+-ba[W]),K.appendChild(O);N.appendChild(K);A(H,I,N)}var M=this,L=new mxVsdxCanvas2D,Q={},U=1;this.exportCurrentDiagrams=function(H){try{if(g.spinner.spin(document.body,mxResources.get("exporting"))){var I=function(Fa,pa){Fa=Fa.model.getChildCells(Fa.model.root);O[pa]=[];for(var Za=0;Za<Fa.length;Za++)Fa[Za].visible&&O[pa].push({name:Fa[Za].value||"Background",visible:Fa[Za].visible,locked:Fa[Za].style&&0<=Fa[Za].style.indexOf("locked=1")})},N=new JSZip;L.init(N);Q={};U=1;var K={},O={},ba={},W=null!=-g.pages?g.pages.length:1;if(null!=g.pages){var R=function(Fa){Fa=Fa.getName();var pa=g.editor.graph,Za=m(pa);K[Fa]=x(pa,Za);I(pa,Fa);J(N,ca+1);ba[Fa]=Za},S=g.editor.graph.getSelectionCells(),ka=g.currentPage;if(H)R(ka);else{for(var ca=0;ca<g.pages.length;ca++){var qa=g.pages[ca];g.currentPage!=qa&&g.selectPage(qa,!0);R(qa)}ka!=g.currentPage&&g.selectPage(ka,!0);g.editor.graph.setSelectionCells(S)}}else{R=g.editor.graph;var sa=m(R);K.Page1=x(R,sa);I(R,"Page1");J(N,1);ba.Page1=sa}y(N,W);C(N,K,O,ba);-H=function(){N.generateAsync({type:"base64"}).then(function(Fa){g.spinner.stop();var pa=g.getBaseFilename();g.saveData(pa+".vsdx","vsdx",Fa,"application/vnd.visio2013",!0)})};0<L.filesLoading?L.onFilesLoaded=H:H()}return!0}catch(Fa){return console.log(Fa),g.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";+"1",O));vb.appendChild(c("NameUniv",Za[Qb].name,O));vb.appendChild(c("ColorTrans","0",O))}sa.appendChild(pa);qa.appendChild(sa);qa.appendChild(Fa);W.appendChild(qa);qa=z(ba,M.RELS_XMLNS,"Relationship");qa.setAttribute("Id","rId"+T);qa.setAttribute("Type",M.PAGES_TYPE);qa.setAttribute("Target",ca);R.appendChild(qa);A(H,M.VISIO_PAGES+ca,J[ka]);T++}O.appendChild(W);ba.appendChild(R);A(H,M.VISIO_PAGES+"pages.xml",O);A(H,M.VISIO_PAGES+"_rels/pages.xml.rels",ba)}function I(H,J){J=M.VISIO_PAGES_RELS+"page"++J+".xml.rels";var N=mxUtils.createXmlDocument(),L=z(N,M.RELS_XMLNS,"Relationships"),O=z(N,M.RELS_XMLNS,"Relationship");O.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");O.setAttribute("Id","rId1");O.setAttribute("Target","../masters/master1.xml");L.appendChild(O);var ba=K.images;if(0<ba.length)for(var W=0;W<ba.length;W++)O=z(N,M.RELS_XMLNS,"Relationship"),O.setAttribute("Type",M.XMLNS_R+"/image"),O.setAttribute("Id","rId"+(W+2)),O.setAttribute("Target","../media/"++ba[W]),L.appendChild(O);N.appendChild(L);A(H,J,N)}var M=this,K=new mxVsdxCanvas2D,Q={},S=1;this.exportCurrentDiagrams=function(H){try{if(g.spinner.spin(document.body,mxResources.get("exporting"))){var J=function(Fa,pa){Fa=Fa.model.getChildCells(Fa.model.root);O[pa]=[];for(var Za=0;Za<Fa.length;Za++)Fa[Za].visible&&O[pa].push({name:Fa[Za].value||"Background",visible:Fa[Za].visible,locked:Fa[Za].style&&0<=Fa[Za].style.indexOf("locked=1")})},N=new JSZip;K.init(N);Q={};S=1;var L={},O={},ba={},W=null!=+g.pages?g.pages.length:1;if(null!=g.pages){var R=function(Fa){Fa=Fa.getName();var pa=g.editor.graph,Za=m(pa);L[Fa]=t(pa,Za);J(pa,Fa);I(N,ca+1);ba[Fa]=Za},T=g.editor.graph.getSelectionCells(),ka=g.currentPage;if(H)R(ka);else{for(var ca=0;ca<g.pages.length;ca++){var qa=g.pages[ca];g.currentPage!=qa&&g.selectPage(qa,!0);R(qa)}ka!=g.currentPage&&g.selectPage(ka,!0);g.editor.graph.setSelectionCells(T)}}else{R=g.editor.graph;var sa=m(R);L.Page1=t(R,sa);J(R,"Page1");I(N,1);ba.Page1=sa}y(N,W);C(N,L,O,ba);+H=function(){N.generateAsync({type:"base64"}).then(function(Fa){g.spinner.stop();var pa=g.getBaseFilename();g.saveData(pa+".vsdx","vsdx",Fa,"application/vnd.visio2013",!0)})};0<K.filesLoading?K.onFilesLoaded=H:H()}return!0}catch(Fa){return console.log(Fa),g.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";VsdxExport.prototype.XMLNS="http://schemas.microsoft.com/office/visio/2012/main";VsdxExport.prototype.VISIO_PAGES="visio/pages/";VsdxExport.prototype.PREFEX="com/mxgraph/io/vsdx/resources/export/";VsdxExport.prototype.VSDX_ENC="ISO-8859-1";VsdxExport.prototype.PART_NAME="PartName";VsdxExport.prototype.CONTENT_TYPES_XML="[Content_Types].xml";VsdxExport.prototype.VISIO_PAGES_RELS="visio/pages/_rels/";VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(g){this.filesLoading=0;this.zip=g};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(g){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,g):this.xmlDoc.createElement(g)};mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var g=this.createElt("Section");g.setAttribute("N","Geometry");g.setAttribute("IX",this.geoIndex++);this.geoSec=g;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(g,y,z){this.geoIndex=0;this.shape=g;this.cellState=y;this.xmGeo=y.cell.geometry;this.xmlDoc=z;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()};mxVsdxCanvas2D.prototype.newEdge=function(g,y,z){this.shape=g;this.cellState=y;this.xmGeo=y.cellBounds;this.xmlDoc=z};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec};mxVsdxCanvas2D.prototype.createCellElemScaled=function(g,y,z){return this.createCellElem(g,y/VsdxExport.prototype.CONVERSION_FACTOR,z)};mxVsdxCanvas2D.prototype.createCellElem=function(g,y,z){var B=this.createElt("Cell");B.setAttribute("N",g);B.setAttribute("V",y);z&&B.setAttribute("F",z);return B};-mxVsdxCanvas2D.prototype.createRowScaled=function(g,y,z,B,m,h,c,a,b,d,f,k,n,p){return this.createRowRel(g,y,z/VsdxExport.prototype.CONVERSION_FACTOR,B/VsdxExport.prototype.CONVERSION_FACTOR,m/VsdxExport.prototype.CONVERSION_FACTOR,h/VsdxExport.prototype.CONVERSION_FACTOR,c/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,b,d,f,k,n,p)};-mxVsdxCanvas2D.prototype.createRowRel=function(g,y,z,B,m,h,c,a,b,d,f,k,n,p){var x=this.createElt("Row");x.setAttribute("T",g);x.setAttribute("IX",y);x.appendChild(this.createCellElem("X",z,b));x.appendChild(this.createCellElem("Y",B,d));null!=m&&isFinite(m)&&x.appendChild(this.createCellElem("A",m,f));null!=h&&isFinite(h)&&x.appendChild(this.createCellElem("B",h,k));null!=c&&isFinite(c)&&x.appendChild(this.createCellElem("C",c,n));null!=a&&isFinite(a)&&x.appendChild(this.createCellElem("D",a,p));-return x};mxVsdxCanvas2D.prototype.begin=function(){1<this.geoStepIndex&&this.createGeoSec()};+mxVsdxCanvas2D.prototype.createRowScaled=function(g,y,z,B,m,h,c,a,b,d,f,k,n,q){return this.createRowRel(g,y,z/VsdxExport.prototype.CONVERSION_FACTOR,B/VsdxExport.prototype.CONVERSION_FACTOR,m/VsdxExport.prototype.CONVERSION_FACTOR,h/VsdxExport.prototype.CONVERSION_FACTOR,c/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,b,d,f,k,n,q)};+mxVsdxCanvas2D.prototype.createRowRel=function(g,y,z,B,m,h,c,a,b,d,f,k,n,q){var t=this.createElt("Row");t.setAttribute("T",g);t.setAttribute("IX",y);t.appendChild(this.createCellElem("X",z,b));t.appendChild(this.createCellElem("Y",B,d));null!=m&&isFinite(m)&&t.appendChild(this.createCellElem("A",m,f));null!=h&&isFinite(h)&&t.appendChild(this.createCellElem("B",h,k));null!=c&&isFinite(c)&&t.appendChild(this.createCellElem("C",c,n));null!=a&&isFinite(a)&&t.appendChild(this.createCellElem("D",a,q));+return t};mxVsdxCanvas2D.prototype.begin=function(){1<this.geoStepIndex&&this.createGeoSec()};mxVsdxCanvas2D.prototype.rect=function(g,y,z,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;z*=m.scale;B*=m.scale;var h=this.xmGeo;g=(g-h.x+m.dx)*m.scale;y=(h.height-y+h.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("MoveTo",this.geoStepIndex++,g,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g+z,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g+z,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g,y))};mxVsdxCanvas2D.prototype.roundrect=function(g,y,z,B,m,h){this.rect(g,y,z,B);this.shape.appendChild(this.createCellElemScaled("Rounding",m))};mxVsdxCanvas2D.prototype.ellipse=function(g,y,z,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;z*=m.scale;B*=m.scale;var h=this.xmGeo,c=h.height*m.scale,a=h.width*m.scale;g=(g-h.x+m.dx)*m.scale;y=c+(-y+h.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,g+z/2,y-B/2,g,y-B/2,g+z/2,y,"Width*"+(g+z/2)/a,"Height*"+(y-B/2)/c,"Width*"+g/a,"Height*"+(y-B/2)/c,"Width*"+(g+z/2)/a,"Height*"+y/c))};@@ -15438,18 +15437,18 @@ mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lasmxVsdxCanvas2D.prototype.convertSvg2Png=function(g,y,z){var B=this;this.filesLoading++;try{var m=document.createElement("canvas"),h=m.getContext("2d");y||(g=String.fromCharCode.apply(null,new Uint8Array(g)),g=window.btoa?btoa(g):Base64.encode(g,!0));y="data:image/svg+xml;base64,"+g;img=new Image;img.onload=function(){m.width=this.width;m.height=this.height;h.drawImage(this,0,0);try{z(m.toDataURL("image/png"))}catch(c){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed");try{z(g)}catch(c){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.src=y}catch(c){console.log("SVG2PNG conversion failed"+c.message);try{z(g)}catch(a){}this.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()}};mxVsdxCanvas2D.prototype.image=function(g,y,z,B,m,h,c,a){var b=this,d="image"+(this.images.length+1)+".";if(0==m.indexOf("data:")){var f=m.indexOf("base64,");h=m.substring(f+7);f=m.substring(11,f-1);0==f.indexOf("svg")?(f="png",d+=f,this.convertSvg2Png(h,!0,function(n){b.zip.file("visio/media/"+d,n.substring(22),{base64:!0})})):(d+=f,this.zip.file("visio/media/"+d,h,{base64:!0}))}else if(window.XMLHttpRequest){m=this.converter.convert(m);this.filesLoading++;f=m.lastIndexOf(".");f=m.substring(f+1);-var k=!1;0==f.indexOf("svg")&&(f="png",k=!0);d+=f;h=new XMLHttpRequest;h.open("GET",m,!0);h.responseType="arraybuffer";h.onreadystatechange=function(n){if(4==this.readyState&&(200==this.status&&(k?b.convertSvg2Png(this.response,!1,function(p){b.zip.file("visio/media/"+d,p.substring(22),{base64:!0})}):b.zip.file("visio/media/"+d,this.response)),b.filesLoading--,0==b.filesLoading))b.onFilesLoaded()};h.send()}this.images.push(d);this.shapeImg={type:f,id:this.images.length+1};m=this.state;z*=m.scale;+var k=!1;0==f.indexOf("svg")&&(f="png",k=!0);d+=f;h=new XMLHttpRequest;h.open("GET",m,!0);h.responseType="arraybuffer";h.onreadystatechange=function(n){if(4==this.readyState&&(200==this.status&&(k?b.convertSvg2Png(this.response,!1,function(q){b.zip.file("visio/media/"+d,q.substring(22),{base64:!0})}):b.zip.file("visio/media/"+d,this.response)),b.filesLoading--,0==b.filesLoading))b.onFilesLoaded()};h.send()}this.images.push(d);this.shapeImg={type:f,id:this.images.length+1};m=this.state;z*=m.scale;B*=m.scale;f=this.xmGeo;g=(g-f.x+m.dx)*m.scale;y=(f.height-y+f.y-m.dy)*m.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",g));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",y-B));this.shape.appendChild(this.createCellElemScaled("ImgWidth",z));this.shape.appendChild(this.createCellElemScaled("ImgHeight",B))};-mxVsdxCanvas2D.prototype.text=function(g,y,z,B,m,h,c,a,b,d,f,k,n){var p=this;if(this.textEnabled&&null!=m){mxUtils.isNode(m)&&(m=mxUtils.getOuterHtml(m));0==z&&0==B&&(B=mxUtils.getSizeForString(m,p.cellState.style.fontSize,p.cellState.style.fontFamily),z=2*B.width,B=2*B.height);"html"==b&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=Graph.sanitizeHtml(m),-m=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));d=this.state;f=this.xmGeo;z*=d.scale;B*=d.scale;var x=this.createElt("Section");x.setAttribute("N","Character");var A=this.createElt("Section");A.setAttribute("N","Paragraph");var C=this.createElt("Text"),J=0,M=0,L=0,Q=0,U=0,H=0,I=0,N=function(R,S,ka,ca,qa){var sa=R.fontSize,Fa=R.fontFamily,pa=mxUtils.getSizeForString(qa,sa,Fa);a&&pa.width>z&&(pa=mxUtils.getSizeForString(qa,sa,Fa,z));R.blockElem?(U+=pa.width,L=Math.min(Math.max(L,U),-z),U=0,H=Math.max(H,pa.height),Q+=H+I,I=H,H=0):(U+=pa.width,L=Math.min(Math.max(L,U),z),H=Math.max(H,pa.height),Q=Math.max(Q,H));pa=p.createElt("Row");pa.setAttribute("IX",J);R.fontColor&&pa.appendChild(p.createCellElem("Color",mxUtils.rgba2hex(R.fontColor)));sa&&pa.appendChild(p.createCellElemScaled("Size",.97*sa));Fa&&pa.appendChild(p.createCellElem("Font",Fa));sa=0;R.bold&&(sa|=17);R.italic&&(sa|=34);R.underline&&(sa|=4);pa.appendChild(p.createCellElem("Style",sa));pa.appendChild(p.createCellElem("Case",-"0"));pa.appendChild(p.createCellElem("Pos","0"));pa.appendChild(p.createCellElem("FontScale","1"));pa.appendChild(p.createCellElem("Letterspace","0"));S.appendChild(pa);S=p.createElt("Row");S.setAttribute("IX",M);switch(R.align){case "left":sa=0;break;case "center":sa=1;break;case "right":sa=2;break;case "start":sa=0;break;case "end":sa=2;break;case "justify":sa=0;break;default:sa=1}S.appendChild(p.createCellElem("HorzAlign",sa));ka.appendChild(S);ka=p.createElt("cp");ka.setAttribute("IX",J++);ca.appendChild(ka);-R=p.xmlDoc.createTextNode(qa+(R.blockElem?"\n":""));ca.appendChild(R)},K=function(R,S){S=S||{};for(var ka=0;ka<R.length;ka++){var ca=R[ka];if(3==ca.nodeType){var qa=p.cellState.style.fontStyle;qa={fontColor:S.fontColor||p.cellState.style.fontColor,fontSize:S.fontSize||p.cellState.style.fontSize,fontFamily:S.fontFamily||p.cellState.style.fontFamily,align:S.align||p.cellState.style.align,bold:S.bold||qa&1,italic:S.italic||qa&2,underline:S.underline||qa&4};var sa=!1;ka+1<R.length&&"BR"==R[ka+1].nodeName.toUpperCase()&&-(sa=!0,ka++);N(qa,x,A,C,(S.OL?S.LiIndex+". ":"")+ca.textContent+(sa?"\n":""))}else if(1==ca.nodeType){sa=ca.nodeName.toUpperCase();var Fa=ca.childNodes.length;qa=window.getComputedStyle(ca,null);qa={bold:"bold"==qa.getPropertyValue("font-weight")||S.bold,italic:"italic"==qa.getPropertyValue("font-style")||S.italic,underline:0<=qa.getPropertyValue("text-decoration").indexOf("underline")||S.underline,align:qa.getPropertyValue("text-align"),fontColor:qa.getPropertyValue("color"),fontSize:parseFloat(qa.getPropertyValue("font-size")),-fontFamily:qa.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==qa.getPropertyValue("display")||"BR"==sa||"LI"==sa,OL:S.OL,LiIndex:S.LiIndex};if("UL"==sa){var pa=p.createElt("Row");pa.setAttribute("IX",M);pa.appendChild(p.createCellElem("HorzAlign","0"));pa.appendChild(p.createCellElem("Bullet","1"));A.appendChild(pa);pa=p.createElt("pp");pa.setAttribute("IX",M++);C.appendChild(pa)}else"OL"==sa?qa.OL=!0:"LI"==sa&&(qa.LiIndex=ka+1);0<Fa?(K(ca.childNodes,qa),"UL"==sa&&(pa=p.createElt("Row"),-pa.setAttribute("IX",M),pa.appendChild(p.createCellElem("Bullet","0")),A.appendChild(pa),pa=p.createElt("pp"),pa.setAttribute("IX",M++),C.appendChild(pa)),N(qa,x,A,C,"")):N(qa,x,A,C,(S.OL?S.LiIndex+". ":"")+ca.textContent)}}};"html"==b&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&K(m.childNodes,{})):N({fontColor:p.cellState.style.fontColor,fontSize:p.cellState.style.fontSize,fontFamily:p.cellState.style.fontFamily},x,A,C,m);b=m=0;B=Math.max(B,-Q);z=Math.max(z,L);n=z/2;var O=B/2,ba=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),W=ba*Math.PI/180;switch(h){case "right":0!=ba?(g-=n*Math.cos(W),y-=n*Math.sin(W)):m=L/2;break;case "left":0!=ba?(g+=n*Math.cos(W),y+=n*Math.sin(W)):m=-L/2}switch(c){case "top":0!=ba?(g+=O*Math.sin(W),y+=O*Math.cos(W)):b=Q/2;break;case "bottom":0!=ba?(g-=O*Math.sin(W),y-=O*Math.cos(W)):b=-Q/2}g=(g-f.x+d.dx)*d.scale;y=(f.height-y+f.y-d.dy)*d.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",-g));this.shape.appendChild(this.createCellElemScaled("TxtPinY",y));this.shape.appendChild(this.createCellElemScaled("TxtWidth",z));this.shape.appendChild(this.createCellElemScaled("TxtHeight",B));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",n+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",O+b));k-=ba;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(x);this.shape.appendChild(A);this.shape.appendChild(C)}};+mxVsdxCanvas2D.prototype.text=function(g,y,z,B,m,h,c,a,b,d,f,k,n){var q=this;if(this.textEnabled&&null!=m){mxUtils.isNode(m)&&(m=mxUtils.getOuterHtml(m));0==z&&0==B&&(B=mxUtils.getSizeForString(m,q.cellState.style.fontSize,q.cellState.style.fontFamily),z=2*B.width,B=2*B.height);"html"==b&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=Graph.sanitizeHtml(m),+m=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));d=this.state;f=this.xmGeo;z*=d.scale;B*=d.scale;var t=this.createElt("Section");t.setAttribute("N","Character");var A=this.createElt("Section");A.setAttribute("N","Paragraph");var C=this.createElt("Text"),I=0,M=0,K=0,Q=0,S=0,H=0,J=0,N=function(R,T,ka,ca,qa){var sa=R.fontSize,Fa=R.fontFamily,pa=mxUtils.getSizeForString(qa,sa,Fa);a&&pa.width>z&&(pa=mxUtils.getSizeForString(qa,sa,Fa,z));R.blockElem?(S+=pa.width,K=Math.min(Math.max(K,S),+z),S=0,H=Math.max(H,pa.height),Q+=H+J,J=H,H=0):(S+=pa.width,K=Math.min(Math.max(K,S),z),H=Math.max(H,pa.height),Q=Math.max(Q,H));pa=q.createElt("Row");pa.setAttribute("IX",I);R.fontColor&&pa.appendChild(q.createCellElem("Color",mxUtils.rgba2hex(R.fontColor)));sa&&pa.appendChild(q.createCellElemScaled("Size",.97*sa));Fa&&pa.appendChild(q.createCellElem("Font",Fa));sa=0;R.bold&&(sa|=17);R.italic&&(sa|=34);R.underline&&(sa|=4);pa.appendChild(q.createCellElem("Style",sa));pa.appendChild(q.createCellElem("Case",+"0"));pa.appendChild(q.createCellElem("Pos","0"));pa.appendChild(q.createCellElem("FontScale","1"));pa.appendChild(q.createCellElem("Letterspace","0"));T.appendChild(pa);T=q.createElt("Row");T.setAttribute("IX",M);switch(R.align){case "left":sa=0;break;case "center":sa=1;break;case "right":sa=2;break;case "start":sa=0;break;case "end":sa=2;break;case "justify":sa=0;break;default:sa=1}T.appendChild(q.createCellElem("HorzAlign",sa));ka.appendChild(T);ka=q.createElt("cp");ka.setAttribute("IX",I++);ca.appendChild(ka);+R=q.xmlDoc.createTextNode(qa+(R.blockElem?"\n":""));ca.appendChild(R)},L=function(R,T){T=T||{};for(var ka=0;ka<R.length;ka++){var ca=R[ka];if(3==ca.nodeType){var qa=q.cellState.style.fontStyle;qa={fontColor:T.fontColor||q.cellState.style.fontColor,fontSize:T.fontSize||q.cellState.style.fontSize,fontFamily:T.fontFamily||q.cellState.style.fontFamily,align:T.align||q.cellState.style.align,bold:T.bold||qa&1,italic:T.italic||qa&2,underline:T.underline||qa&4};var sa=!1;ka+1<R.length&&"BR"==R[ka+1].nodeName.toUpperCase()&&+(sa=!0,ka++);N(qa,t,A,C,(T.OL?T.LiIndex+". ":"")+ca.textContent+(sa?"\n":""))}else if(1==ca.nodeType){sa=ca.nodeName.toUpperCase();var Fa=ca.childNodes.length;qa=window.getComputedStyle(ca,null);qa={bold:"bold"==qa.getPropertyValue("font-weight")||T.bold,italic:"italic"==qa.getPropertyValue("font-style")||T.italic,underline:0<=qa.getPropertyValue("text-decoration").indexOf("underline")||T.underline,align:qa.getPropertyValue("text-align"),fontColor:qa.getPropertyValue("color"),fontSize:parseFloat(qa.getPropertyValue("font-size")),+fontFamily:qa.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==qa.getPropertyValue("display")||"BR"==sa||"LI"==sa,OL:T.OL,LiIndex:T.LiIndex};if("UL"==sa){var pa=q.createElt("Row");pa.setAttribute("IX",M);pa.appendChild(q.createCellElem("HorzAlign","0"));pa.appendChild(q.createCellElem("Bullet","1"));A.appendChild(pa);pa=q.createElt("pp");pa.setAttribute("IX",M++);C.appendChild(pa)}else"OL"==sa?qa.OL=!0:"LI"==sa&&(qa.LiIndex=ka+1);0<Fa?(L(ca.childNodes,qa),"UL"==sa&&(pa=q.createElt("Row"),+pa.setAttribute("IX",M),pa.appendChild(q.createCellElem("Bullet","0")),A.appendChild(pa),pa=q.createElt("pp"),pa.setAttribute("IX",M++),C.appendChild(pa)),N(qa,t,A,C,"")):N(qa,t,A,C,(T.OL?T.LiIndex+". ":"")+ca.textContent)}}};"html"==b&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&L(m.childNodes,{})):N({fontColor:q.cellState.style.fontColor,fontSize:q.cellState.style.fontSize,fontFamily:q.cellState.style.fontFamily},t,A,C,m);b=m=0;B=Math.max(B,+Q);z=Math.max(z,K);n=z/2;var O=B/2,ba=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),W=ba*Math.PI/180;switch(h){case "right":0!=ba?(g-=n*Math.cos(W),y-=n*Math.sin(W)):m=K/2;break;case "left":0!=ba?(g+=n*Math.cos(W),y+=n*Math.sin(W)):m=-K/2}switch(c){case "top":0!=ba?(g+=O*Math.sin(W),y+=O*Math.cos(W)):b=Q/2;break;case "bottom":0!=ba?(g-=O*Math.sin(W),y-=O*Math.cos(W)):b=-Q/2}g=(g-f.x+d.dx)*d.scale;y=(f.height-y+f.y-d.dy)*d.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",+g));this.shape.appendChild(this.createCellElemScaled("TxtPinY",y));this.shape.appendChild(this.createCellElemScaled("TxtWidth",z));this.shape.appendChild(this.createCellElemScaled("TxtHeight",B));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",n+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",O+b));k-=ba;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(t);this.shape.appendChild(A);this.shape.appendChild(C)}};mxVsdxCanvas2D.prototype.rotate=function(g,y,z,B,m){0!=g&&(y=this.state,B+=y.dx,m+=y.dy,B*=y.scale,m*=y.scale,this.shape.appendChild(this.createCellElem("Angle",(360-g)*Math.PI/180)),y.rotation+=g,y.rotationCx=B,y.rotationCy=m)};mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};function BmpDecoder(g,y){this.pos=0;this.buffer=g;this.is_with_alpha=!!y;if(66!=this.buffer[0]&&77!=this.buffer[1])throw Error("Invalid BMP File");this.pos+=2;this.parseHeader();this.parseBGR()}BmpDecoder.prototype.parseHeader=function(){var g=this.buffer;this.fileSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.reserved=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.offset=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.headerSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.width=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];@@ -15466,66 +15465,66 @@ BmpDecoder.prototype.bit32=function(){for(var g=this.height-1;0<=g;g--)for(var y(function(g){(function(y){(function(z){var B=function(){function m(c){this.RESPONSE_END="</mxfile>";this.RESPONSE_DIAGRAM_START="";this.RESPONSE_DIAGRAM_END="</diagram>";this.RESPONSE_HEADER='<?xml version="1.0" encoding="UTF-8"?><mxfile>';this.vertexMap={};this.edgeShapeMap={};this.vertexShapeMap={};this.parentsMap={};this.layerNames=[];this.debugPaths=!1;this.vsdxModel=null;this.editorUi=c;this.shapeIndexShift=0}function h(c,a,b,d,f){c=b.createLabelSubShape(c,a);null!=c&&(0!==d&&(a=c.getStyle().match(/;rotation=(\d+\.*\d+)/),null!=a&&(d+=parseFloat(a[1])),c.setStyle(c.getStyle().replace(/;rotation=(\d+\.*\d+)/,"")+";rotation="+(60<d&&240>d?(d+180)%360:d))),d=c.getGeometry(),d.x=0,d.y=0,d.relative=!0,f=f||new mxPoint(0,0),d.offset=new mxPoint(f.x-d.width/2,f.y-d.height/2))}m.vsdxPlaceholder_$LI$=function(){null==m.vsdxPlaceholder&&(m.vsdxPlaceholder=window.atob?atob("dmlzaW8="):Base64.decode("dmlzaW8=",!0));return m.vsdxPlaceholder};m.parsererrorNS_$LI$=function(){m.parsererrorNS=mxConstants.NS_XHTML;return m.parsererrorNS};m.parseXml=function(c){try{var a=mxUtils.parseXml(c);return 0<a.getElementsByTagNameNS(m.parsererrorNS,"parsererror").length?null:a}catch(b){return null}};m.decodeUTF16LE=function(c){for(var a="",b=0;b<c.length;b+=2)a+=String.fromCharCode(c.charCodeAt(b)|c.charCodeAt(b+1)<<8);return a};m.prototype.scaleGraph=function(c,a){if(1!==a){c=c.getModel();for(var b in c.cells){var d=c.cells[b],f=c.getGeometry(d);if(null!=f&&(this.scaleRect(f,a),this.scaleRect(f.alternateBounds,a),c.isEdge(d)&&(this.scalePoint(f.sourcePoint,-a),this.scalePoint(f.targetPoint,a),this.scalePoint(f.offset,a),d=f.points,null!=d)))for(f=0;f<d.length;f++)this.scalePoint(d[f],a)}}};m.incorrectXMLReqExp=[{regExp:/&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&"}];m.prototype.decodeVsdx=function(c,a,b,d){function f(L,Q,U){function H(){C++;J();Q++;Q==I&&f(L,Q,U)}for(var I=Math.min(Q+M,L.length),N=Q;N<I;N++)(function(K){function O(W){var R=new FormData;R.append("img",W,K.name);R.append("inputformat","emf");R.append("outputformat","png");var S=new XMLHttpRequest;-S.open("POST",EMF_CONVERT_URL);S.responseType="blob";k.editorUi.addRemoteServiceSecurityCheck(S);S.onreadystatechange=mxUtils.bind(this,function(){if(4==S.readyState)if(200<=S.status&&299>=S.status)try{var ka=new FileReader;ka.readAsDataURL(S.response);ka.onloadend=function(){var ca=ka.result.indexOf(",")+1;U[K.name]=ka.result.substr(ca);H()}}catch(ca){console.log(ca),H()}else ba++,3>ba?O(W):H()});S.send(R)}var ba=0;K.async("blob").then(O)})(L[N])}var k=this,n={},p={},x=function(){function L(){I=-I.concat(k.RESPONSE_END);a&&a(I)}for(var Q=m.vsdxPlaceholder+"/document.xml",U=n[Q]?n[Q]:null,H=U.firstChild;null!=H&&1!=H.nodeType;)H=H.nextSibling;if(null!=H&&1==H.nodeType)k.importNodes(U,H,Q,n);else return null;k.vsdxModel=new g.mxgraph.io.vsdx.mxVsdxModel(U,n,p);Q=k.vsdxModel.getPages();var I=k.RESPONSE_HEADER;var N=function(ba){null==ba.entries&&(ba.entries=[]);return ba.entries}(Q),K=function(ba,W){var R=N[ba].getValue(),S=O.createMxGraph();S.getModel().beginUpdate();O.importPage(R,S,S.getDefaultParent(),-!0);O.scaleGraph(S,R.getPageScale()/R.getDrawingScale());S.getModel().endUpdate();O.postImportPage(R,S,function(){O.sanitiseGraph(S);I=I.concat(k.RESPONSE_DIAGRAM_START);I=I.concat(k.processPage(S,R));I=I.concat(k.RESPONSE_DIAGRAM_END);ba<N.length-1?K(ba+1,W):W()})},O=k;0<N.length?K(0,L):L()},A=0,C=0,J=function(){if(C==A)try{x()}catch(L){console.log(L),null!=d?d(L):a("")}},M=window.EMF_CHUNK_SIZE||10;JSZip.loadAsync(c).then(function(L){if(0==Object.keys(L.files).length)null!=d&&d();else{var Q=[];-L.forEach(function(U,H){var I=H.name;U=I.toLowerCase();var N=U.length;U.indexOf(".xml")==N-4||U.indexOf(".rels")==N-5?(A++,H.async("string").then(function(K){if(0!==K.length){65279==K.charCodeAt(0)&&(K=K.substring(1));var O=m.parseXml(K);if(null==O)if(0===K.charCodeAt(1)&&0===K.charCodeAt(3)&&0===K.charCodeAt(5))O=m.parseXml(m.decodeUTF16LE(K));else{for(O=0;O<m.incorrectXMLReqExp.length;O++)m.incorrectXMLReqExp[O].regExp.test(K)&&(K=K.replace(m.incorrectXMLReqExp[O].regExp,m.incorrectXMLReqExp[O].repl));-O=m.parseXml(K)}null!=O&&(O.vsdxFileName=I,n[I]=O)}C++;J()})):0===U.indexOf(m.vsdxPlaceholder+"/media")&&(A++,function(K,O){var ba=K.length-O.length;K=K.indexOf(O,ba);return-1!==K&&K===ba}(U,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?Q.push(H):(C++,J()):function(K,O){var ba=K.length-O.length;K=K.indexOf(O,ba);return-1!==K&&K===ba}(U,".bmp")?JSZip.support.uint8array&&H.async("uint8array").then(function(K){K=new BmpDecoder(K);var O=document.createElement("canvas");O.width=K.width;O.height=K.height;-O.getContext("2d").putImageData(K.imageData,0,0);K=O.toDataURL("image/jpeg");p[I]=K.substr(23);C++;J()}):H.async("base64").then(function(K){p[I]=K;C++;J()}))});f(Q,0,p)}},function(L){null!=d&&d(L)})};m.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};m.prototype.processPage=function(c,a){c=(new mxCodec).encode(c.getModel());c.setAttribute("style","default-style2");+a),this.scalePoint(f.targetPoint,a),this.scalePoint(f.offset,a),d=f.points,null!=d)))for(f=0;f<d.length;f++)this.scalePoint(d[f],a)}}};m.incorrectXMLReqExp=[{regExp:/&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&"}];m.prototype.decodeVsdx=function(c,a,b,d){function f(K,Q,S){function H(){C++;I();Q++;Q==J&&f(K,Q,S)}for(var J=Math.min(Q+M,K.length),N=Q;N<J;N++)(function(L){function O(W){var R=new FormData;R.append("img",W,L.name);R.append("inputformat","emf");R.append("outputformat","png");var T=new XMLHttpRequest;+T.open("POST",EMF_CONVERT_URL);T.responseType="blob";k.editorUi.addRemoteServiceSecurityCheck(T);T.onreadystatechange=mxUtils.bind(this,function(){if(4==T.readyState)if(200<=T.status&&299>=T.status)try{var ka=new FileReader;ka.readAsDataURL(T.response);ka.onloadend=function(){var ca=ka.result.indexOf(",")+1;S[L.name]=ka.result.substr(ca);H()}}catch(ca){console.log(ca),H()}else ba++,3>ba?O(W):H()});T.send(R)}var ba=0;L.async("blob").then(O)})(K[N])}var k=this,n={},q={},t=function(){function K(){J=+J.concat(k.RESPONSE_END);a&&a(J)}for(var Q=m.vsdxPlaceholder+"/document.xml",S=n[Q]?n[Q]:null,H=S.firstChild;null!=H&&1!=H.nodeType;)H=H.nextSibling;if(null!=H&&1==H.nodeType)k.importNodes(S,H,Q,n);else return null;k.vsdxModel=new g.mxgraph.io.vsdx.mxVsdxModel(S,n,q);Q=k.vsdxModel.getPages();var J=k.RESPONSE_HEADER;var N=function(ba){null==ba.entries&&(ba.entries=[]);return ba.entries}(Q),L=function(ba,W){var R=N[ba].getValue(),T=O.createMxGraph();T.getModel().beginUpdate();O.importPage(R,T,T.getDefaultParent(),+!0);O.scaleGraph(T,R.getPageScale()/R.getDrawingScale());T.getModel().endUpdate();O.postImportPage(R,T,function(){O.sanitiseGraph(T);J=J.concat(k.RESPONSE_DIAGRAM_START);J=J.concat(k.processPage(T,R));J=J.concat(k.RESPONSE_DIAGRAM_END);ba<N.length-1?L(ba+1,W):W()})},O=k;0<N.length?L(0,K):K()},A=0,C=0,I=function(){if(C==A)try{t()}catch(K){console.log(K),null!=d?d(K):a("")}},M=window.EMF_CHUNK_SIZE||10;JSZip.loadAsync(c).then(function(K){if(0==Object.keys(K.files).length)null!=d&&d();else{var Q=[];+K.forEach(function(S,H){var J=H.name;S=J.toLowerCase();var N=S.length;S.indexOf(".xml")==N-4||S.indexOf(".rels")==N-5?(A++,H.async("string").then(function(L){if(0!==L.length){65279==L.charCodeAt(0)&&(L=L.substring(1));var O=m.parseXml(L);if(null==O)if(0===L.charCodeAt(1)&&0===L.charCodeAt(3)&&0===L.charCodeAt(5))O=m.parseXml(m.decodeUTF16LE(L));else{for(O=0;O<m.incorrectXMLReqExp.length;O++)m.incorrectXMLReqExp[O].regExp.test(L)&&(L=L.replace(m.incorrectXMLReqExp[O].regExp,m.incorrectXMLReqExp[O].repl));+O=m.parseXml(L)}null!=O&&(O.vsdxFileName=J,n[J]=O)}C++;I()})):0===S.indexOf(m.vsdxPlaceholder+"/media")&&(A++,function(L,O){var ba=L.length-O.length;L=L.indexOf(O,ba);return-1!==L&&L===ba}(S,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?Q.push(H):(C++,I()):function(L,O){var ba=L.length-O.length;L=L.indexOf(O,ba);return-1!==L&&L===ba}(S,".bmp")?JSZip.support.uint8array&&H.async("uint8array").then(function(L){L=new BmpDecoder(L);var O=document.createElement("canvas");O.width=L.width;O.height=L.height;+O.getContext("2d").putImageData(L.imageData,0,0);L=O.toDataURL("image/jpeg");q[J]=L.substr(23);C++;I()}):H.async("base64").then(function(L){q[J]=L;C++;I()}))});f(Q,0,q)}},function(K){null!=d&&d(K)})};m.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};m.prototype.processPage=function(c,a){c=(new mxCodec).encode(c.getModel());c.setAttribute("style","default-style2");c=mxUtils.getXml(c);var b="";if(null!=a){var d=mxUtils.htmlEntities(a.getPageName())+(a.isBackground()?" (Background)":"");a=mxUtils.htmlEntities(a.getPageNameU());b+='<diagram name="'+d+'" id="'+a.replace(/\s/g,"_")+'">'}return b+=Graph.compress(c)};m.prototype.scalePoint=function(c,a){null!=c&&(c.x*=a,c.y*=a);return c};m.prototype.scaleRect=function(c,a){null!=c&&(c.x*=a,c.y*=a,c.height*=a,c.width*=a);return c};m.prototype.importNodes=function(c,a,b,d){var f=b.lastIndexOf("/"),k=b,n=b;if(-1!==f&&-(k=b.substring(0,f),n=b.substring(f+1,b.length),b=function(C,J){return C[J]?C[J]:null}(d,k+"/_rels/"+n+".rels"),null!=b)){var p=b.getElementsByTagName("Relationship");b={};for(f=0;f<p.length;f++){n=p.item(f);var x=n.getAttribute("Id");n=n.getAttribute("Target");b[x]=n}a=a.getElementsByTagName("Rel");for(f=0;f<a.length;f++)if(p=a.item(f),n=function(C,J){return C[J]?C[J]:null}(b,p.getAttribute("r:id")),n=k+"/"+n,null!=n&&(x=d[n]?d[n]:null,null!=x)){p=p.parentNode;for(x=x.firstChild;null!=x&&1!=x.nodeType;)x=-x.nextSibling;if(null!=x&&1==x.nodeType)for(x=x.firstChild;null!=x;){if(null!=x&&1==x.nodeType){var A=p.appendChild(c.importNode(x,!0));this.importNodes(c,A,n,d)}x=x.nextSibling}}}};m.prototype.layerIndexToNames=function(c){var a=[];if(c)for(var b=0;b<c.length;b++){var d=parseInt(c[b]);d<this.layerNames.length&&a.push(this.layerNames[d])}return 0<a.length?a:[mxResources.get("background")]};m.prototype.importPage=function(c,a,b,d){var f=c.getBackPage();if(null!=f){a.getModel().setValue(a.getDefaultParent(),-c.getPageName());var k=new mxCell(f.getPageName());a.addCell(k,a.getModel().getRoot(),0,null,null);this.importPage(f,a,a.getDefaultParent())}var n=c.getLayers();k=c.getShapes();f=[];for(var p=0;p<n.length;p++){var x=n[p],A=x.Name.replace(/\s/g,"_");this.layerNames.push(A);0==x.Visible&&f.push(A)}x=function(C){var J=0;return{next:function(){return J<C.length?C[J++]:null},hasNext:function(){return J<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(k));k=c.getPageDimensions().y;-for(p=c.getId();x.hasNext();)n=x.next(),n=n.getValue(),A=this.addShape(a,n,b,p,k),n=this.layerIndexToNames(n.layerMember),null!=A&&null!=n&&a.addTagsForCells([A],n);for(c=function(C){var J=0;return{next:function(){return J<C.length?C[J++]:null},hasNext:function(){return J<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(c.getConnects()));c.hasNext();)n=c.next(),n=this.addConnectedEdge(a,n.getValue(),p,k),null!=n&&function(C,J){null==C.entries&&(C.entries=[]);for(var M=0;M<-C.entries.length;M++)if(null!=C.entries[M].key.equals&&C.entries[M].key.equals(J)||C.entries[M].key===J)return C.entries.splice(M,1)[0]}(this.edgeShapeMap,n);for(c=function(C){var J=0;return{next:function(){return J<C.length?C[J++]:null},hasNext:function(){return J<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(this.edgeShapeMap));c.hasNext();)n=c.next(),n.getKey().getPageNumber()===p&&(x=this.addUnconnectedEdge(a,function(C,J){null==C.entries&&(C.entries=[]);for(var M=-0;M<C.entries.length;M++)if(null!=C.entries[M].key.equals&&C.entries[M].key.equals(J)||C.entries[M].key===J)return C.entries[M].value;return null}(this.parentsMap,n.getKey()),n.getValue(),k),n=this.layerIndexToNames(n.getValue().layerMember),null!=n&&a.addTagsForCells([x],n));if(0<this.layerNames.length){c=a.getAllTags();p=!1;for(n=0;n<this.layerNames.length;n++)if(0>mxUtils.indexOf(c,this.layerNames[n])){p=!0;break}p&&(b=a.insertVertex(b,null,null,0,0,0,0),a.addTagsForCells([b],this.layerNames),-b.setVisible(!1));a.setHiddenTags(f)}d||this.sanitiseGraph(a);return k};m.prototype.postImportPage=function(c,a,b){try{var d=function(p){if(null!=p){p=p.entries||[];for(var x=0;x<p.length;x++){var A=p[x].value||{};A.toBeCroppedImg&&k.push(A);d(A.getChildShapes())}}},f=this,k=[];d(c.getShapes());if(0<k.length){var n=function(p,x){function A(){p<k.length-1?n(p+1,x):x()}var C=k[p],J=C.toBeCroppedImg,M=function(Q,U){null==Q.entries&&(Q.entries=[]);for(var H=0;H<Q.entries.length;H++)if(null!=Q.entries[H].key.equals&&-Q.entries[H].key.equals(U)||Q.entries[H].key===U)return Q.entries[H].value;return null}(f.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c.Id,C.Id)),L=new Image;L.onload=function(){var Q=J.iData,U=J.iType;try{var H=L.width/J.imgWidth,I=L.height/J.imgHeight,N=-J.imgOffsetX*H,K=(J.imgHeight-J.height+J.imgOffsetY)*I,O=document.createElement("canvas");O.width=J.width*H;O.height=J.height*I;var ba=O.getContext("2d");ba.fillStyle="#FFFFFF";ba.fillRect(0,0,O.width,O.height);ba.drawImage(L,N,K,O.width,O.height,-0,0,O.width,O.height);Q=O.toDataURL("image/jpeg").substr(23);U="jpg"}catch(W){console.log(W)}M.style+=";image=data:image/"+U+","+Q;A()};L.src="data:image/"+J.iType+";base64,"+J.iData;L.onerror=function(){M.style+=";image=data:image/"+J.iType+","+J.iData;A()}};n(0,b)}else b()}catch(p){console.log(p),b()}};m.prototype.addShape=function(c,a,b,d,f){a.parentHeight=f;var k=g.mxgraph.io.vsdx.VsdxShape.getType(a.getShape());if(null!=k&&(function(p,x){return p&&p.equals?p.equals(x):p===x}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||-function(p,x){return p&&p.equals?p.equals(x):p===x}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(p,x){return p&&p.equals?p.equals(x):p===x}(k,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var n=a.getId();if(a.isVertex()){k=null;k=a.isGroup()?this.addGroup(c,a,b,d,f):this.addVertex(c,a,b,d,f);(function(p,x,A){null==p.entries&&(p.entries=[]);for(var C=0;C<p.entries.length;C++)if(null!=p.entries[C].key.equals&&p.entries[C].key.equals(x)||p.entries[C].key===x){p.entries[C].value=A;return}p.entries.push({key:x,-value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);b=a.getHyperlink();b.extLink?c.setLinkForCell(k,b.extLink):b.pageLink&&c.setLinkForCell(k,"data:page/id,"+b.pageLink.replace(/\s/g,"_"));a=a.getProperties();for(b=0;b<a.length;b++)try{c.setAttributeForCell(k,a[b].key,a[b].val)}catch(p){console.log('Attribute: "',a[b].key,'" with value "',a[b].val,'" not allowed in HTML')}return k}a.isGroup()&&this.addGroup(c,-a,b,d,f,!0);a.setShapeIndex(c.getModel().getChildCount(b));(function(p,x,A){null==p.entries&&(p.entries=[]);for(var C=0;C<p.entries.length;C++)if(null!=p.entries[C].key.equals&&p.entries[C].key.equals(x)||p.entries[C].key===x){p.entries[C].value=A;return}p.entries.push({key:x,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);(function(p,x,A){null==p.entries&&(p.entries=[]);for(var C=0;C<p.entries.length;C++)if(null!=-p.entries[C].key.equals&&p.entries[C].key.equals(x)||p.entries[C].key===x){p.entries[C].value=A;return}p.entries.push({key:x,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),b)}return null};m.prototype.addGroup=function(c,a,b,d,f,k){var n=a.getDimensions(),p=a.getMaster(),x=a.getStyleFromShape(),A=a.getGeomList();if(A.isNoFill()||k)x[mxConstants.STYLE_FILLCOLOR]="none",x[mxConstants.STYLE_GRADIENTCOLOR]="none";-if(A.isNoLine()||k)x[mxConstants.STYLE_STROKECOLOR]="none";x.html="1";x[mxConstants.STYLE_WHITE_SPACE]="wrap";var C=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(x,"=");k=null;A=a.getChildShapes();k=null!=A&&0<function(L){null==L.entries&&(L.entries=[]);return L.entries.length}(A);x=a.isDisplacedLabel()||a.isRotatedLabel()||k;k=a.getOriginPoint(f,!0);if(x)k=c.insertVertex(b,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*-n.y)/100),C);else{var J=a.getTextLabel();k=c.insertVertex(b,null,J,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C)}b=k.geometry.height;for(A=function(L){var Q=0;return{next:function(){return Q<L.length?L[Q++]:null},hasNext:function(){return Q<L.length}}}(function(L){null==L.entries&&(L.entries=[]);return L.entries}(A));A.hasNext();)if(C=A.next().getValue(),J=C.getId(),C.isVertex()){var M=g.mxgraph.io.vsdx.VsdxShape.getType(C.getShape());-null!=M&&(function(L,Q){return L&&L.equals?L.equals(Q):L===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(L,Q){return L&&L.equals?L.equals(Q):L===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(L,Q){return L&&L.equals?L.equals(Q):L===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&C.isVertex()&&(C.propagateRotation(a.getRotation()),(M=C.isGroup()?this.addGroup(c,C,k,d,n.y):this.addVertex(c,C,k,d,n.y))&&M.geometry&&(b=Math.max(M.geometry.height,b)));null==p&&function(L,-Q,U){null==L.entries&&(L.entries=[]);for(var H=0;H<L.entries.length;H++)if(null!=L.entries[H].key.equals&&L.entries[H].key.equals(Q)||L.entries[H].key===Q){L.entries[H].value=U;return}L.entries.push({key:Q,value:U,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,J),C)}else null==p?(function(L,Q,U){null==L.entries&&(L.entries=[]);for(var H=0;H<L.entries.length;H++)if(null!=L.entries[H].key.equals&&L.entries[H].key.equals(Q)||-L.entries[H].key===Q){L.entries[H].value=U;return}L.entries.push({key:Q,value:U,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,J),C),function(L,Q,U){null==L.entries&&(L.entries=[]);for(var H=0;H<L.entries.length;H++)if(null!=L.entries[H].key.equals&&L.entries[H].key.equals(Q)||L.entries[H].key===Q){L.entries[H].value=U;return}L.entries.push({key:Q,value:U,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,-new g.mxgraph.io.vsdx.ShapePageId(d,J),k)):this.addUnconnectedEdge(c,k,C,f);if(k.children&&0==k.geometry.height&&0<b)for(k.geometry.height=b,f=0;f<k.children.length;f++)n=k.children[f],n.geometry&&(n.geometry.y+=b);x&&a.createLabelSubShape(c,k);c=a.getRotation();if(0!==c)for(f=k.getGeometry(),p=f.width/2,x=f.height/2,f=0;f<k.getChildCount();f++)n=k.getChildAt(f),g.mxgraph.online.Utils.rotatedGeometry(n.getGeometry(),c,p,x);(function(L,Q,U){null==L.entries&&(L.entries=[]);for(var H=0;H<L.entries.length;H++)if(null!=-L.entries[H].key.equals&&L.entries[H].key.equals(Q)||L.entries[H].key===Q){L.entries[H].value=U;return}L.entries.push({key:Q,value:U,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),k);return k};m.rotatedEdgePoint=function(c,a,b,d){a=a*Math.PI/180;var f=Math.cos(a);a=Math.sin(a);var k=c.x-b,n=c.y-d;c.x=Math.round(k*f-n*a+b);c.y=Math.round(n*f+k*a+d)};m.prototype.addVertex=function(c,a,b,d,f){var k="",n=a.isDisplacedLabel()||-a.isRotatedLabel();n||(k=a.getTextLabel());var p=a.getDimensions(),x=a.getStyleFromShape();x.html="1";var A=x.hasOwnProperty(mxConstants.STYLE_SHAPE)||x.hasOwnProperty("stencil");x.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&A||(x[mxConstants.STYLE_FILLCOLOR]="none");A||(x[mxConstants.STYLE_STROKECOLOR]="none");x.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&A||(x[mxConstants.STYLE_GRADIENTCOLOR]="none");x[mxConstants.STYLE_WHITE_SPACE]="wrap";f=a.getOriginPoint(f,!0);return A||null!=k?(x=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(x,-"="),A=null,A=n?c.insertVertex(b,null,null,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*p.x)/100),Math.floor(Math.round(100*p.y)/100),x):c.insertVertex(b,null,k,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*p.x)/100),Math.floor(Math.round(100*p.y)/100),x),function(C,J,M){null==C.entries&&(C.entries=[]);for(var L=0;L<C.entries.length;L++)if(null!=C.entries[L].key.equals&&C.entries[L].key.equals(J)||-C.entries[L].key===J){C.entries[L].value=M;return}C.entries.push({key:J,value:M,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),A),a.setLabelOffset(A,x),n&&a.createLabelSubShape(c,A),A):null};m.calculateAbsolutePoint=function(c){for(var a=0,b=0;null!=c;){var d=c.geometry;null!=d&&(a+=d.x,b+=d.y);c=c.parent}return new mxPoint(a,b)};m.prototype.processEdgeGeo=function(c,a){try{var b=c.geomList.geomList[0].rows;-for(c=0;c<b.length;c++)if(b[c]instanceof g.mxgraph.io.vsdx.geometry.ArcTo){a.style+="jumpStyle=arc;";break}for(c=0;c<b.length;c++);}catch(d){}};m.prototype.addConnectedEdge=function(c,a,b,d){var f=a.getFromSheet();f=new g.mxgraph.io.vsdx.ShapePageId(b,f);var k=function(I,N){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(N)||I.entries[K].key===N)return I.entries[K].value;return null}(this.edgeShapeMap,f);if(null==k)return null;-var n=function(I,N){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(N)||I.entries[K].key===N)return I.entries[K].value;return null}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(b,k.getId()));if(null!=n){var p=c.getModel().getGeometry(n);null!=p&&(d=p.height)}var x=k.getStartXY(d),A=k.getEndXY(d);p=k.getRoutingPoints(d,x,k.getRotation());this.rotateChildEdge(c.getModel(),n,x,A,p);var C=null,J=a.getSourceToSheet();J=null!=-J?function(I,N){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(N)||I.entries[K].key===N)return I.entries[K].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,J)):null;var M=!0;if(null==J||0==J.geometry.width||0==J.geometry.height)J=c.insertVertex(n,null,null,Math.floor(Math.round(100*x.x)/100),Math.floor(Math.round(100*x.y)/100),0,0);else if(J.style&&-1==J.style.indexOf(";rotation=")){C=m.calculateAbsolutePoint(J);-var L=m.calculateAbsolutePoint(n),Q=J.geometry;C=new mxPoint((L.x+x.x-C.x)/Q.width,(L.y+x.y-C.y)/Q.height)}else M=!1;x=null;a=a.getTargetToSheet();a=null!=a?function(I,N){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(N)||I.entries[K].key===N)return I.entries[K].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,a)):null;L=!0;null==a||0==a.geometry.width||0==a.geometry.height?a=c.insertVertex(n,null,null,-Math.floor(Math.round(100*A.x)/100),Math.floor(Math.round(100*A.y)/100),0,0):a.style&&-1==a.style.indexOf(";rotation=")?(b=m.calculateAbsolutePoint(a),x=m.calculateAbsolutePoint(n),Q=a.geometry,x=new mxPoint((x.x+A.x-b.x)/Q.width,(x.y+A.y-b.y)/Q.height)):L=!1;b=k.getStyleFromEdgeShape(d);Q=k.getRotation();A="";var U=k.isDisplacedLabel()||k.isRotatedLabel()||0!==Q,H=k.getLblEdgeOffset(c.getView(),p);U||(A=k.getTextLabel(!0));A=c.insertEdge(n,null,A,J,a,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,-"="));U?h(c,A,k,Q,H):A.getGeometry().offset=H;null!=C&&c.setConnectionConstraint(A,J,!0,new mxConnectionConstraint(C,!1));M&&p.shift();null!=x&&c.setConnectionConstraint(A,a,!1,new mxConnectionConstraint(x,!1));L&&p.pop();M=c.getModel().getGeometry(A);if(J.parent!=a.parent&&null!=n&&1!=n.id&&1==J.parent.id){a=C=0;do x=n.geometry,null!=x&&(C+=x.x,a+=x.y),n=n.parent;while(null!=n);A.parent=J.parent;for(n=0;n<p.length;n++)p[n].x+=C,p[n].y+=a}M.points=p;b.hasOwnProperty("curved")&&function(I,N){return I&&-I.equals?I.equals(N):I===N}(function(I,N){return I[N]?I[N]:null}(b,"curved"),"1")&&(M=c.getModel().getGeometry(A),d=k.getControlPoints(d),M.points=d);this.processEdgeGeo(k,A);k=this.layerIndexToNames(k.layerMember);null!=k&&c.addTagsForCells([A],k);return f};m.prototype.addUnconnectedEdge=function(c,a,b,d){if(null!=a){var f=c.getModel().getGeometry(a);null!=f&&(d=f.height)}f=b.getStartXY(d);var k=b.getEndXY(d),n=b.getStyleFromEdgeShape(d),p=b.getRoutingPoints(d,f,b.getRotation()),x=b.getRotation();-var A="";var C=b.isDisplacedLabel()||b.isRotatedLabel()||0!==x,J=b.getLblEdgeOffset(c.getView(),p);C||(A=b.getTextLabel(!0));0===b.getShapeIndex()?A=c.insertEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(A=c.createEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),A=c.addEdge(A,a,null,null,b.getShapeIndex()+this.shapeIndexShift++));C?h(c,A,b,x,J):A.getGeometry().offset=J;this.rotateChildEdge(c.getModel(),a,f,k,p);a=c.getModel().getGeometry(A);-p.pop();p.shift();a.points=p;a.setTerminalPoint(f,!0);a.setTerminalPoint(k,!1);n.hasOwnProperty("curved")&&function(M,L){return M&&M.equals?M.equals(L):M===L}(function(M,L){return M[L]?M[L]:null}(n,"curved"),"1")&&(a=c.getModel().getGeometry(A),c=b.getControlPoints(d),a.points=c);this.processEdgeGeo(b,A);return A};m.prototype.rotateChildEdge=function(c,a,b,d,f){if(null!=a){var k=c.getGeometry(a);c=c.getStyle(a);if(null!=k&&null!=c&&(a=c.indexOf("rotation="),-1<a))for(c=parseFloat(c.substring(a+9,-c.indexOf(";",a))),a=k.width/2,k=k.height/2,m.rotatedEdgePoint(b,c,a,k),m.rotatedEdgePoint(d,c,a,k),b=0;b<f.length;b++)m.rotatedEdgePoint(f[b],c,a,k)}};m.prototype.sanitiseGraph=function(c){var a=c.getModel().getRoot();this.sanitiseCell(c,a)};m.prototype.sanitiseCell=function(c,a){for(var b=c.getModel(),d=b.getChildCount(a),f=[],k=0;k<d;k++){var n=b.getChildAt(a,k);this.sanitiseCell(c,n)&&f.push(n)}for(c=0;c<f.length;c++)b.remove(f[c]);f=a.geometry;null!=f&&(0>f.height&&(f.height=Math.abs(f.height),-f.y-=f.height,a.style+=";flipV=1;"),0>f.width&&(f.width=Math.abs(f.width),f.x-=f.width,a.style+=";flipH=1;"));0<d&&(d=b.getChildCount(a));f=(new String(b.getValue(a))).toString();c=b.getStyle(a);return 0!==d||!b.isVertex(a)||null!=b.getValue(a)&&0!==f.length||null==c||-1==c.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==c.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=c.indexOf("image=")?!1:!0};return m}();z.mxVsdxCodec=B;B.__class="com.mxgraph.io.mxVsdxCodec"})(y.io||(y.io={}))})(g.mxgraph||-(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){var B=function(m){function h(c){var a=m.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=c;return a}__extends(h,m);h.prototype.decodeVssx=function(c,a,b,d){var f=this,k="<mxlibrary>[";this.decodeVsdx(c,function(n){k=k.concat(n);var p=f.vsdxModel.getMasterShapes(),x=function(Q){var U=0;return{next:function(){return U<Q.length?Q[U++]:null},hasNext:function(){return U<Q.length}}}(function(Q){var U=-[];null==Q.entries&&(Q.entries=[]);for(var H=0;H<Q.entries.length;H++)U.push(Q.entries[H].value);return U}(f.vsdxModel.getPages())).next();if(null!=p){var A={str:"",toString:function(){return this.str}},C=0===n.length?"":",",J=function(Q){return Object.keys(Q).map(function(U){return Q[U]})}(p);n=function(Q){Q=J[Q];var U=M.createMxGraph(),H=1;if(null!=Q.pageSheet){var I=H=1,N=Q.pageSheet.DrawingScale;null!=N&&(H=parseFloat(N.getAttribute("V"))||1);N=Q.pageSheet.PageScale;null!=N&&(I=parseFloat(N.getAttribute("V"))||-1);H=I/H}I=!1;for(N=0;null!=Q.firstLevelShapes&&N<Q.firstLevelShapes.length;N++){var K=Q.firstLevelShapes[N].getShape(),O=new g.mxgraph.io.vsdx.VsdxShape(x,K,!x.isEdge(K),p,null,M.vsdxModel);K=null;if(O.isVertex()){M.edgeShapeMap.entries=[];M.parentsMap.entries=[];K=M.addShape(U,O,U.getDefaultParent(),0,1169);O=function(S){null==S.entries&&(S.entries=[]);return S.entries}(M.edgeShapeMap);for(var ba=0;ba<O.length;ba++){var W=O[ba],R=function(S,ka){null==S.entries&&(S.entries=[]);for(var ca=0;ca<S.entries.length;ca++)if(null!=-S.entries[ca].key.equals&&S.entries[ca].key.equals(ka)||S.entries[ca].key===ka)return S.entries[ca].value;return null}(M.parentsMap,W.getKey());M.addUnconnectedEdge(U,R,W.getValue(),1169)}}else K=M.addUnconnectedEdge(U,null,O,1169);I|=null!=K}if(I){M.scaleGraph(U,H);H=M.normalizeGraph(U);M.sanitiseGraph(U);if(0===U.getModel().getChildCount(U.getDefaultParent()))return"continue";A.str=A.str.concat(C);A.str=A.str.concat('{"xml":"');U=m.prototype.processPage.call(M,U,null);A.str=A.str.concat(U);A.str=-A.str.concat('","w":');A.str=A.str.concat(H.width);A.str=A.str.concat(',"h":');A.str=A.str.concat(H.height);A.str=A.str.concat(',"title":');Q=Q.getName();null==Q&&(Q="");Q=mxUtils.htmlEntities(JSON.stringify(Q));A.str=A.str.concat(Q);A.str=A.str.concat("}");C=","}};for(var M=f,L=0;L<J.length;L++)n(L);k=k.concat(A)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(Q){null!=d?d(Q):a("")}},b)};h.prototype.normalizeGeo=function(c){var a=c.getGeometry();a.x=0;a.y=0;var b=a.sourcePoint;if(c.isEdge()&&null!=-b){this.transPoint(a.targetPoint,b);this.transPoint(a.offset,b);c=a.points;if(null!=c)for(var d=0;d<c.length;d++)this.transPoint(c[d],b);this.transPoint(b,b)}return a};h.prototype.normalizeGraph=function(c){function a(C){null!=C&&(null==b?(b=C.x,d=C.y,f=C.x+(C.width||0),k=C.y+(C.height||0)):(b=Math.min(C.x,b),d=Math.min(C.y,d),f=Math.max(C.x+(C.width||0),f),k=Math.max(C.y+(C.height||0),k)))}var b,d,f,k,n;for(n in c.model.cells){var p=c.model.cells[n],x=p.geometry;if(null!=x&&1==p.parent.id)if(p.vertex)a(x);-else for(a(x.sourcePoint),a(x.targetPoint),p=x.points,x=0;null!=p&&x<p.length;x++)a(p[x])}var A={x:b,y:d};for(n in c.model.cells)if(p=c.model.cells[n],x=p.geometry,null!=x&&1==p.parent.id&&(x.x-=b,x.y-=d,p.isEdge()))for(this.transPoint(x.sourcePoint,A),this.transPoint(x.targetPoint,A),this.transPoint(x.offset,A),p=x.points,x=0;null!=p&&x<p.length;x++)this.transPoint(p[x],A);return{width:f-b,height:k-d}};h.prototype.transPoint=function(c,a){null!=c&&(c.x-=a.x,c.y-=a.y)};h.prototype.processPage=function(c,-a){var b=c.getModel(),d="",f="";for(p in b.cells){var k=b.cells[p];if(c.getDefaultParent()===b.getParent(k)){d=d.concat(f);d=d.concat('{"xml":"');var n=this.createMxGraph();n.addCell(k);this.sanitiseGraph(n);if(0===n.getModel().getChildCount(n.getDefaultParent()))return"continue";f=this.normalizeGeo(k);n=m.prototype.processPage.call(this,n,null);d=d.concat(n);d=d.concat('","w":');d=d.concat(f.width);d=d.concat(',"h":');d=d.concat(f.height);d=d.concat(',"title":"');f=b.getStyle(k);k="";if(null!=f&&-(n=f.indexOf(g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID),0<=n)){n+=g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;var p=parseInt(f.substring(n,f.indexOf(";",n)));a:{f=this.vertexShapeMap;n=new g.mxgraph.io.vsdx.ShapePageId(a.getId(),p);null==f.entries&&(f.entries=[]);for(var x=0;x<f.entries.length;x++)if(null!=f.entries[x].key.equals&&f.entries[x].key.equals(n)||f.entries[x].key===n){f=f.entries[x].value;break a}f=null}null!=f&&(k=f.getName())}d=d.concat(k);d=d.concat('"}');f=","}}this.RESPONSE_DIAGRAM_START=+(k=b.substring(0,f),n=b.substring(f+1,b.length),b=function(C,I){return C[I]?C[I]:null}(d,k+"/_rels/"+n+".rels"),null!=b)){var q=b.getElementsByTagName("Relationship");b={};for(f=0;f<q.length;f++){n=q.item(f);var t=n.getAttribute("Id");n=n.getAttribute("Target");b[t]=n}a=a.getElementsByTagName("Rel");for(f=0;f<a.length;f++)if(q=a.item(f),n=function(C,I){return C[I]?C[I]:null}(b,q.getAttribute("r:id")),n=k+"/"+n,null!=n&&(t=d[n]?d[n]:null,null!=t)){q=q.parentNode;for(t=t.firstChild;null!=t&&1!=t.nodeType;)t=+t.nextSibling;if(null!=t&&1==t.nodeType)for(t=t.firstChild;null!=t;){if(null!=t&&1==t.nodeType){var A=q.appendChild(c.importNode(t,!0));this.importNodes(c,A,n,d)}t=t.nextSibling}}}};m.prototype.layerIndexToNames=function(c){var a=[];if(c)for(var b=0;b<c.length;b++){var d=parseInt(c[b]);d<this.layerNames.length&&a.push(this.layerNames[d])}return 0<a.length?a:[mxResources.get("background")]};m.prototype.importPage=function(c,a,b,d){var f=c.getBackPage();if(null!=f){a.getModel().setValue(a.getDefaultParent(),+c.getPageName());var k=new mxCell(f.getPageName());a.addCell(k,a.getModel().getRoot(),0,null,null);this.importPage(f,a,a.getDefaultParent())}var n=c.getLayers();k=c.getShapes();f=[];for(var q=0;q<n.length;q++){var t=n[q],A=t.Name.replace(/\s/g,"_");this.layerNames.push(A);0==t.Visible&&f.push(A)}t=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(k));k=c.getPageDimensions().y;+for(q=c.getId();t.hasNext();)n=t.next(),n=n.getValue(),A=this.addShape(a,n,b,q,k),n=this.layerIndexToNames(n.layerMember),null!=A&&null!=n&&a.addTagsForCells([A],n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(c.getConnects()));c.hasNext();)n=c.next(),n=this.addConnectedEdge(a,n.getValue(),q,k),null!=n&&function(C,I){null==C.entries&&(C.entries=[]);for(var M=0;M<+C.entries.length;M++)if(null!=C.entries[M].key.equals&&C.entries[M].key.equals(I)||C.entries[M].key===I)return C.entries.splice(M,1)[0]}(this.edgeShapeMap,n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(this.edgeShapeMap));c.hasNext();)n=c.next(),n.getKey().getPageNumber()===q&&(t=this.addUnconnectedEdge(a,function(C,I){null==C.entries&&(C.entries=[]);for(var M=+0;M<C.entries.length;M++)if(null!=C.entries[M].key.equals&&C.entries[M].key.equals(I)||C.entries[M].key===I)return C.entries[M].value;return null}(this.parentsMap,n.getKey()),n.getValue(),k),n=this.layerIndexToNames(n.getValue().layerMember),null!=n&&a.addTagsForCells([t],n));if(0<this.layerNames.length){c=a.getAllTags();q=!1;for(n=0;n<this.layerNames.length;n++)if(0>mxUtils.indexOf(c,this.layerNames[n])){q=!0;break}q&&(b=a.insertVertex(b,null,null,0,0,0,0),a.addTagsForCells([b],this.layerNames),+b.setVisible(!1));a.setHiddenTags(f)}d||this.sanitiseGraph(a);return k};m.prototype.postImportPage=function(c,a,b){try{var d=function(q){if(null!=q){q=q.entries||[];for(var t=0;t<q.length;t++){var A=q[t].value||{};A.toBeCroppedImg&&k.push(A);d(A.getChildShapes())}}},f=this,k=[];d(c.getShapes());if(0<k.length){var n=function(q,t){function A(){q<k.length-1?n(q+1,t):t()}var C=k[q],I=C.toBeCroppedImg,M=function(Q,S){null==Q.entries&&(Q.entries=[]);for(var H=0;H<Q.entries.length;H++)if(null!=Q.entries[H].key.equals&&+Q.entries[H].key.equals(S)||Q.entries[H].key===S)return Q.entries[H].value;return null}(f.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c.Id,C.Id)),K=new Image;K.onload=function(){var Q=I.iData,S=I.iType;try{var H=K.width/I.imgWidth,J=K.height/I.imgHeight,N=-I.imgOffsetX*H,L=(I.imgHeight-I.height+I.imgOffsetY)*J,O=document.createElement("canvas");O.width=I.width*H;O.height=I.height*J;var ba=O.getContext("2d");ba.fillStyle="#FFFFFF";ba.fillRect(0,0,O.width,O.height);ba.drawImage(K,N,L,O.width,O.height,+0,0,O.width,O.height);Q=O.toDataURL("image/jpeg").substr(23);S="jpg"}catch(W){console.log(W)}M.style+=";image=data:image/"+S+","+Q;A()};K.src="data:image/"+I.iType+";base64,"+I.iData;K.onerror=function(){M.style+=";image=data:image/"+I.iType+","+I.iData;A()}};n(0,b)}else b()}catch(q){console.log(q),b()}};m.prototype.addShape=function(c,a,b,d,f){a.parentHeight=f;var k=g.mxgraph.io.vsdx.VsdxShape.getType(a.getShape());if(null!=k&&(function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||+function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var n=a.getId();if(a.isVertex()){k=null;k=a.isGroup()?this.addGroup(c,a,b,d,f):this.addVertex(c,a,b,d,f);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,+value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);b=a.getHyperlink();b.extLink?c.setLinkForCell(k,b.extLink):b.pageLink&&c.setLinkForCell(k,"data:page/id,"+b.pageLink.replace(/\s/g,"_"));a=a.getProperties();for(b=0;b<a.length;b++)try{c.setAttributeForCell(k,a[b].key,a[b].val)}catch(q){console.log('Attribute: "',a[b].key,'" with value "',a[b].val,'" not allowed in HTML')}return k}a.isGroup()&&this.addGroup(c,+a,b,d,f,!0);a.setShapeIndex(c.getModel().getChildCount(b));(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=+q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),b)}return null};m.prototype.addGroup=function(c,a,b,d,f,k){var n=a.getDimensions(),q=a.getMaster(),t=a.getStyleFromShape(),A=a.getGeomList();if(A.isNoFill()||k)t[mxConstants.STYLE_FILLCOLOR]="none",t[mxConstants.STYLE_GRADIENTCOLOR]="none";+if(A.isNoLine()||k)t[mxConstants.STYLE_STROKECOLOR]="none";t.html="1";t[mxConstants.STYLE_WHITE_SPACE]="wrap";var C=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"=");k=null;A=a.getChildShapes();k=null!=A&&0<function(K){null==K.entries&&(K.entries=[]);return K.entries.length}(A);t=a.isDisplacedLabel()||a.isRotatedLabel()||k;k=a.getOriginPoint(f,!0);if(t)k=c.insertVertex(b,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*+n.y)/100),C);else{var I=a.noLabelGroup?null:a.getTextLabel();k=c.insertVertex(b,null,I,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C)}b=k.geometry.height;for(A=function(K){var Q=0;return{next:function(){return Q<K.length?K[Q++]:null},hasNext:function(){return Q<K.length}}}(function(K){null==K.entries&&(K.entries=[]);return K.entries}(A));A.hasNext();)if(C=A.next().getValue(),I=C.getId(),C.isVertex()){var M=+g.mxgraph.io.vsdx.VsdxShape.getType(C.getShape());null!=M&&(function(K,Q){return K&&K.equals?K.equals(Q):K===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(K,Q){return K&&K.equals?K.equals(Q):K===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(K,Q){return K&&K.equals?K.equals(Q):K===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&C.isVertex()&&(C.propagateRotation(a.getRotation()),(M=C.isGroup()?this.addGroup(c,C,k,d,n.y):this.addVertex(c,C,k,d,n.y))&&M.geometry&&(b=Math.max(M.geometry.height,+b)));null==q&&function(K,Q,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),C)}else null==q?(function(K,Q,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&+K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),C),function(K,Q,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},+getValue:function(){return this.value}})}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),k)):this.addUnconnectedEdge(c,k,C,f);if(k.children&&0==k.geometry.height&&0<b)for(k.geometry.height=b,f=0;f<k.children.length;f++)n=k.children[f],n.geometry&&(n.geometry.y+=b);t&&a.createLabelSubShape(c,k);c=a.getRotation();if(0!==c)for(f=k.getGeometry(),q=f.width/2,t=f.height/2,f=0;f<k.getChildCount();f++)n=k.getChildAt(f),g.mxgraph.online.Utils.rotatedGeometry(n.getGeometry(),c,q,t);(function(K,Q,S){null==+K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),k);return k};m.rotatedEdgePoint=function(c,a,b,d){a=a*Math.PI/180;var f=Math.cos(a);a=Math.sin(a);var k=c.x-b,n=c.y-d;c.x=Math.round(k*f-n*a+b);c.y=Math.round(n*+f+k*a+d)};m.prototype.addVertex=function(c,a,b,d,f){var k="",n=a.isDisplacedLabel()||a.isRotatedLabel();n||(k=a.getTextLabel());var q=a.getDimensions(),t=a.getStyleFromShape();t.html="1";var A=t.hasOwnProperty(mxConstants.STYLE_SHAPE)||t.hasOwnProperty("stencil");t.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&A||(t[mxConstants.STYLE_FILLCOLOR]="none");A||(t[mxConstants.STYLE_STROKECOLOR]="none");t.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&A||(t[mxConstants.STYLE_GRADIENTCOLOR]="none");t[mxConstants.STYLE_WHITE_SPACE]=+"wrap";f=a.getOriginPoint(f,!0);return A||null!=k?(t=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"="),A=null,A=n?c.insertVertex(b,null,null,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t):c.insertVertex(b,null,k,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t),function(C,I,M){null==C.entries&&(C.entries=+[]);for(var K=0;K<C.entries.length;K++)if(null!=C.entries[K].key.equals&&C.entries[K].key.equals(I)||C.entries[K].key===I){C.entries[K].value=M;return}C.entries.push({key:I,value:M,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),A),a.setLabelOffset(A,t),n&&a.createLabelSubShape(c,A),A):null};m.calculateAbsolutePoint=function(c){for(var a=0,b=0;null!=c;){var d=c.geometry;null!=d&&(a+=d.x,b+=d.y);c=c.parent}return new mxPoint(a,+b)};m.prototype.processEdgeGeo=function(c,a){try{var b=c.geomList.geomList[0].rows;for(c=0;c<b.length;c++)if(b[c]instanceof g.mxgraph.io.vsdx.geometry.ArcTo){a.style+="jumpStyle=arc;";break}for(c=0;c<b.length;c++);}catch(d){}};m.prototype.addConnectedEdge=function(c,a,b,d){var f=a.getFromSheet();f=new g.mxgraph.io.vsdx.ShapePageId(b,f);var k=function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===+N)return J.entries[L].value;return null}(this.edgeShapeMap,f);if(null==k)return null;var n=function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===N)return J.entries[L].value;return null}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(b,k.getId()));if(null!=n){var q=c.getModel().getGeometry(n);null!=q&&(d=q.height)}var t=k.getStartXY(d),A=k.getEndXY(d);q=k.getRoutingPoints(d,t,k.getRotation());+this.rotateChildEdge(c.getModel(),n,t,A,q);var C=null,I=a.getSourceToSheet();I=null!=I?function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===N)return J.entries[L].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,I)):null;var M=!0;if(null==I||0==I.geometry.width||0==I.geometry.height)I=c.insertVertex(n,null,null,Math.floor(Math.round(100*t.x)/100),Math.floor(Math.round(100*+t.y)/100),0,0);else if(I.style&&-1==I.style.indexOf(";rotation=")){C=m.calculateAbsolutePoint(I);var K=m.calculateAbsolutePoint(n),Q=I.geometry;C=new mxPoint((K.x+t.x-C.x)/Q.width,(K.y+t.y-C.y)/Q.height)}else M=!1;t=null;a=a.getTargetToSheet();a=null!=a?function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===N)return J.entries[L].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,+a)):null;K=!0;null==a||0==a.geometry.width||0==a.geometry.height?a=c.insertVertex(n,null,null,Math.floor(Math.round(100*A.x)/100),Math.floor(Math.round(100*A.y)/100),0,0):a.style&&-1==a.style.indexOf(";rotation=")?(b=m.calculateAbsolutePoint(a),t=m.calculateAbsolutePoint(n),Q=a.geometry,t=new mxPoint((t.x+A.x-b.x)/Q.width,(t.y+A.y-b.y)/Q.height)):K=!1;b=k.getStyleFromEdgeShape(d);Q=k.getRotation();A="";var S=k.isDisplacedLabel()||k.isRotatedLabel()||0!==Q,H=k.getLblEdgeOffset(c.getView(),q);S||(A=+k.getTextLabel(!0));A=c.insertEdge(n,null,A,I,a,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,"="));S?h(c,A,k,Q,H):A.getGeometry().offset=H;null!=C&&c.setConnectionConstraint(A,I,!0,new mxConnectionConstraint(C,!1));M&&q.shift();null!=t&&c.setConnectionConstraint(A,a,!1,new mxConnectionConstraint(t,!1));K&&q.pop();M=c.getModel().getGeometry(A);if(I.parent!=a.parent&&null!=n&&1!=n.id&&1==I.parent.id){a=C=0;do t=n.geometry,null!=t&&(C+=t.x,a+=t.y),n=n.parent;while(null!=n);A.parent=I.parent;for(n=+0;n<q.length;n++)q[n].x+=C,q[n].y+=a}M.points=q;b.hasOwnProperty("curved")&&function(J,N){return J&&J.equals?J.equals(N):J===N}(function(J,N){return J[N]?J[N]:null}(b,"curved"),"1")&&(M=c.getModel().getGeometry(A),d=k.getControlPoints(d),M.points=d);this.processEdgeGeo(k,A);k=this.layerIndexToNames(k.layerMember);null!=k&&c.addTagsForCells([A],k);return f};m.prototype.addUnconnectedEdge=function(c,a,b,d){if(null!=a){var f=c.getModel().getGeometry(a);null!=f&&(d=f.height)}f=b.getStartXY(d);var k=b.getEndXY(d),+n=b.getStyleFromEdgeShape(d),q=b.getRoutingPoints(d,f,b.getRotation()),t=b.getRotation();var A="";var C=b.isDisplacedLabel()||b.isRotatedLabel()||0!==t,I=b.getLblEdgeOffset(c.getView(),q);C||(A=b.getTextLabel(!0));0===b.getShapeIndex()?A=c.insertEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(A=c.createEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),A=c.addEdge(A,a,null,null,b.getShapeIndex()+this.shapeIndexShift++));C?h(c,A,b,t,I):A.getGeometry().offset=+I;this.rotateChildEdge(c.getModel(),a,f,k,q);a=c.getModel().getGeometry(A);q.pop();q.shift();a.points=q;a.setTerminalPoint(f,!0);a.setTerminalPoint(k,!1);n.hasOwnProperty("curved")&&function(M,K){return M&&M.equals?M.equals(K):M===K}(function(M,K){return M[K]?M[K]:null}(n,"curved"),"1")&&(a=c.getModel().getGeometry(A),c=b.getControlPoints(d),a.points=c);this.processEdgeGeo(b,A);return A};m.prototype.rotateChildEdge=function(c,a,b,d,f){if(null!=a){var k=c.getGeometry(a);c=c.getStyle(a);if(null!=k&&+null!=c&&(a=c.indexOf("rotation="),-1<a))for(c=parseFloat(c.substring(a+9,c.indexOf(";",a))),a=k.width/2,k=k.height/2,m.rotatedEdgePoint(b,c,a,k),m.rotatedEdgePoint(d,c,a,k),b=0;b<f.length;b++)m.rotatedEdgePoint(f[b],c,a,k)}};m.prototype.sanitiseGraph=function(c){var a=c.getModel().getRoot();this.sanitiseCell(c,a)};m.prototype.sanitiseCell=function(c,a){for(var b=c.getModel(),d=b.getChildCount(a),f=[],k=0;k<d;k++){var n=b.getChildAt(a,k);this.sanitiseCell(c,n)&&f.push(n)}for(c=0;c<f.length;c++)b.remove(f[c]);+f=a.geometry;null!=f&&(0>f.height&&(f.height=Math.abs(f.height),f.y-=f.height,a.style+=";flipV=1;"),0>f.width&&(f.width=Math.abs(f.width),f.x-=f.width,a.style+=";flipH=1;"));0<d&&(d=b.getChildCount(a));f=(new String(b.getValue(a))).toString();c=b.getStyle(a);return 0!==d||!b.isVertex(a)||null!=b.getValue(a)&&0!==f.length||null==c||-1==c.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==c.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=c.indexOf("image=")?!1:!0};return m}();z.mxVsdxCodec=B;B.__class=+"com.mxgraph.io.mxVsdxCodec"})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){var B=function(m){function h(c){var a=m.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=c;return a}__extends(h,m);h.prototype.decodeVssx=function(c,a,b,d){var f=this,k="<mxlibrary>[";this.decodeVsdx(c,function(n){k=k.concat(n);var q=f.vsdxModel.getMasterShapes(),t=function(Q){var S=0;return{next:function(){return S<Q.length?Q[S++]:null},hasNext:function(){return S<Q.length}}}(function(Q){var S=+[];null==Q.entries&&(Q.entries=[]);for(var H=0;H<Q.entries.length;H++)S.push(Q.entries[H].value);return S}(f.vsdxModel.getPages())).next();if(null!=q){var A={str:"",toString:function(){return this.str}},C=0===n.length?"":",",I=function(Q){return Object.keys(Q).map(function(S){return Q[S]})}(q);n=function(Q){Q=I[Q];var S=M.createMxGraph(),H=1;if(null!=Q.pageSheet){var J=H=1,N=Q.pageSheet.DrawingScale;null!=N&&(H=parseFloat(N.getAttribute("V"))||1);N=Q.pageSheet.PageScale;null!=N&&(J=parseFloat(N.getAttribute("V"))||+1);H=J/H}J=!1;for(N=0;null!=Q.firstLevelShapes&&N<Q.firstLevelShapes.length;N++){var L=Q.firstLevelShapes[N].getShape(),O=new g.mxgraph.io.vsdx.VsdxShape(t,L,!t.isEdge(L),q,null,M.vsdxModel);L=null;if(O.isVertex()){M.edgeShapeMap.entries=[];M.parentsMap.entries=[];L=M.addShape(S,O,S.getDefaultParent(),0,1169);O=function(T){null==T.entries&&(T.entries=[]);return T.entries}(M.edgeShapeMap);for(var ba=0;ba<O.length;ba++){var W=O[ba],R=function(T,ka){null==T.entries&&(T.entries=[]);for(var ca=0;ca<T.entries.length;ca++)if(null!=+T.entries[ca].key.equals&&T.entries[ca].key.equals(ka)||T.entries[ca].key===ka)return T.entries[ca].value;return null}(M.parentsMap,W.getKey());M.addUnconnectedEdge(S,R,W.getValue(),1169)}}else L=M.addUnconnectedEdge(S,null,O,1169);J|=null!=L}if(J){M.scaleGraph(S,H);H=M.normalizeGraph(S);M.sanitiseGraph(S);if(0===S.getModel().getChildCount(S.getDefaultParent()))return"continue";A.str=A.str.concat(C);A.str=A.str.concat('{"xml":"');S=m.prototype.processPage.call(M,S,null);A.str=A.str.concat(S);A.str=+A.str.concat('","w":');A.str=A.str.concat(H.width);A.str=A.str.concat(',"h":');A.str=A.str.concat(H.height);A.str=A.str.concat(',"title":');Q=Q.getName();null==Q&&(Q="");Q=mxUtils.htmlEntities(JSON.stringify(Q));A.str=A.str.concat(Q);A.str=A.str.concat("}");C=","}};for(var M=f,K=0;K<I.length;K++)n(K);k=k.concat(A)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(Q){null!=d?d(Q):a("")}},b)};h.prototype.normalizeGeo=function(c){var a=c.getGeometry();a.x=0;a.y=0;var b=a.sourcePoint;if(c.isEdge()&&null!=+b){this.transPoint(a.targetPoint,b);this.transPoint(a.offset,b);c=a.points;if(null!=c)for(var d=0;d<c.length;d++)this.transPoint(c[d],b);this.transPoint(b,b)}return a};h.prototype.normalizeGraph=function(c){function a(C){null!=C&&(null==b?(b=C.x,d=C.y,f=C.x+(C.width||0),k=C.y+(C.height||0)):(b=Math.min(C.x,b),d=Math.min(C.y,d),f=Math.max(C.x+(C.width||0),f),k=Math.max(C.y+(C.height||0),k)))}var b,d,f,k,n;for(n in c.model.cells){var q=c.model.cells[n],t=q.geometry;if(null!=t&&1==q.parent.id)if(q.vertex)a(t);+else for(a(t.sourcePoint),a(t.targetPoint),q=t.points,t=0;null!=q&&t<q.length;t++)a(q[t])}var A={x:b,y:d};for(n in c.model.cells)if(q=c.model.cells[n],t=q.geometry,null!=t&&1==q.parent.id&&(t.x-=b,t.y-=d,q.isEdge()))for(this.transPoint(t.sourcePoint,A),this.transPoint(t.targetPoint,A),this.transPoint(t.offset,A),q=t.points,t=0;null!=q&&t<q.length;t++)this.transPoint(q[t],A);return{width:f-b,height:k-d}};h.prototype.transPoint=function(c,a){null!=c&&(c.x-=a.x,c.y-=a.y)};h.prototype.processPage=function(c,+a){var b=c.getModel(),d="",f="";for(q in b.cells){var k=b.cells[q];if(c.getDefaultParent()===b.getParent(k)){d=d.concat(f);d=d.concat('{"xml":"');var n=this.createMxGraph();n.addCell(k);this.sanitiseGraph(n);if(0===n.getModel().getChildCount(n.getDefaultParent()))return"continue";f=this.normalizeGeo(k);n=m.prototype.processPage.call(this,n,null);d=d.concat(n);d=d.concat('","w":');d=d.concat(f.width);d=d.concat(',"h":');d=d.concat(f.height);d=d.concat(',"title":"');f=b.getStyle(k);k="";if(null!=f&&+(n=f.indexOf(g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID),0<=n)){n+=g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;var q=parseInt(f.substring(n,f.indexOf(";",n)));a:{f=this.vertexShapeMap;n=new g.mxgraph.io.vsdx.ShapePageId(a.getId(),q);null==f.entries&&(f.entries=[]);for(var t=0;t<f.entries.length;t++)if(null!=f.entries[t].key.equals&&f.entries[t].key.equals(n)||f.entries[t].key===n){f=f.entries[t].value;break a}f=null}null!=f&&(k=f.getName())}d=d.concat(k);d=d.concat('"}');f=","}}this.RESPONSE_DIAGRAM_START=0<d.length?",":"";return d};return h}(g.mxgraph.io.mxVsdxCodec);z.mxVssxCodec=B;B.__class="com.mxgraph.io.mxVssxCodec"})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=b;this.y=d}c.prototype.getX=function(){return this.x};c.prototype.getY=function(){return this.y};c.prototype.getA=function(){return this.a};c.prototype.getB=function(){return this.b};c.prototype.getC=function(){return this.c};c.prototype.getD=function(){return this.d};c.prototype.getFormulaA=function(){return this.formulaA};c.prototype.getFormulaE=function(){return this.formulaE};c.prototype.getIndex=function(){return this.index};return c}();m.Row=h;h.__class="com.mxgraph.io.vsdx.geometry.Row"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(b){return 1}};c.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(d){}return null};c.getRowObj=function(a,b){var d=a.getAttribute("T"),f=c.getIndex(a);var k=(k=a.getAttribute("Del"))&&k.equals?k.equals("1"):"1"===k;if(!k){var n=null;f<=b.length&&(n=b[f-1]);var p=k=b=null,x=null,-A=null,C=null,J=null,M=null;null!=n&&(b=n.x,k=n.y,p=n.getA(),x=n.getB(),A=n.getC(),C=n.getD(),M=n.getFormulaA(),J=n.getFormulaE());a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(n=0;n<a.length;n++){var L=a[n],Q=L.getAttribute("N"),U=L.getAttribute("V");switch(Q){case "X":b=c.getDoubleVal(U);break;case "Y":k=c.getDoubleVal(U);break;case "A":p=c.getDoubleVal(U);M=L.getAttribute("V");break;case "B":x=c.getDoubleVal(U);break;case "C":A=c.getDoubleVal(U);break;case "D":C=c.getDoubleVal(U);-break;case "E":J=U}}switch(d){case "MoveTo":return new g.mxgraph.io.vsdx.geometry.MoveTo(f,b,k);case "LineTo":return new g.mxgraph.io.vsdx.geometry.LineTo(f,b,k);case "ArcTo":return new g.mxgraph.io.vsdx.geometry.ArcTo(f,b,k,p);case "Ellipse":return new g.mxgraph.io.vsdx.geometry.Ellipse(f,b,k,p,x,A,C);case "EllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.EllipticalArcTo(f,b,k,p,x,A,C);case "InfiniteLine":return new g.mxgraph.io.vsdx.geometry.InfiniteLine(f,b,k,p,x);case "NURBSTo":return new g.mxgraph.io.vsdx.geometry.NURBSTo(f,-b,k,p,x,A,C,J);case "PolylineTo":return new g.mxgraph.io.vsdx.geometry.PolylineTo(f,b,k,M);case "RelCubBezTo":return new g.mxgraph.io.vsdx.geometry.RelCubBezTo(f,b,k,p,x,A,C);case "RelEllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,b,k,p,x,A,C);case "RelLineTo":return new g.mxgraph.io.vsdx.geometry.RelLineTo(f,b,k);case "RelMoveTo":return new g.mxgraph.io.vsdx.geometry.RelMoveTo(f,b,k);case "RelQuadBezTo":return new g.mxgraph.io.vsdx.geometry.RelQuadBezTo(f,b,k,p,x);case "SplineKnot":return new g.mxgraph.io.vsdx.geometry.SplineKnot(f,-b,k,p);case "SplineStart":return new g.mxgraph.io.vsdx.geometry.SplineStart(f,b,k,p,x,A,C)}}return new g.mxgraph.io.vsdx.geometry.DelRow(f)};return c}();m.RowFactory=h;h.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(b){return 1}};c.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(d){}return null};c.getRowObj=function(a,b){var d=a.getAttribute("T"),f=c.getIndex(a);var k=(k=a.getAttribute("Del"))&&k.equals?k.equals("1"):"1"===k;if(!k){var n=null;f<=b.length&&(n=b[f-1]);var q=k=b=null,t=null,+A=null,C=null,I=null,M=null;null!=n&&(b=n.x,k=n.y,q=n.getA(),t=n.getB(),A=n.getC(),C=n.getD(),M=n.getFormulaA(),I=n.getFormulaE());a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(n=0;n<a.length;n++){var K=a[n],Q=K.getAttribute("N"),S=K.getAttribute("V");switch(Q){case "X":b=c.getDoubleVal(S);break;case "Y":k=c.getDoubleVal(S);break;case "A":q=c.getDoubleVal(S);M=K.getAttribute("V");break;case "B":t=c.getDoubleVal(S);break;case "C":A=c.getDoubleVal(S);break;case "D":C=c.getDoubleVal(S);+break;case "E":I=S}}switch(d){case "MoveTo":return new g.mxgraph.io.vsdx.geometry.MoveTo(f,b,k);case "LineTo":return new g.mxgraph.io.vsdx.geometry.LineTo(f,b,k);case "ArcTo":return new g.mxgraph.io.vsdx.geometry.ArcTo(f,b,k,q);case "Ellipse":return new g.mxgraph.io.vsdx.geometry.Ellipse(f,b,k,q,t,A,C);case "EllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.EllipticalArcTo(f,b,k,q,t,A,C);case "InfiniteLine":return new g.mxgraph.io.vsdx.geometry.InfiniteLine(f,b,k,q,t);case "NURBSTo":return new g.mxgraph.io.vsdx.geometry.NURBSTo(f,+b,k,q,t,A,C,I);case "PolylineTo":return new g.mxgraph.io.vsdx.geometry.PolylineTo(f,b,k,M);case "RelCubBezTo":return new g.mxgraph.io.vsdx.geometry.RelCubBezTo(f,b,k,q,t,A,C);case "RelEllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,b,k,q,t,A,C);case "RelLineTo":return new g.mxgraph.io.vsdx.geometry.RelLineTo(f,b,k);case "RelMoveTo":return new g.mxgraph.io.vsdx.geometry.RelMoveTo(f,b,k);case "RelQuadBezTo":return new g.mxgraph.io.vsdx.geometry.RelQuadBezTo(f,b,k,q,t);case "SplineKnot":return new g.mxgraph.io.vsdx.geometry.SplineKnot(f,+b,k,q);case "SplineStart":return new g.mxgraph.io.vsdx.geometry.SplineStart(f,b,k,q,t,A,C)}}return new g.mxgraph.io.vsdx.geometry.DelRow(f)};return c}();m.RowFactory=h;h.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(){this.colorElementMap={};this.fontElementMap={}}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0())};h.defaultColors_$LI$=function(){h.__static_initialize();null==h.defaultColors&&(h.defaultColors={});return h.defaultColors};h.__static_initializer_0=function(){h.defaultColors_$LI$()["0"]="#000000";h.defaultColors_$LI$()["1"]="#FFFFFF";h.defaultColors_$LI$()["2"]="#FF0000";h.defaultColors_$LI$()["3"]="#00FF00";h.defaultColors_$LI$()["4"]="#0000FF";h.defaultColors_$LI$()["5"]="#FFFF00";h.defaultColors_$LI$()["6"]="#FF00FF";h.defaultColors_$LI$()["7"]="#00FFFF";h.defaultColors_$LI$()["8"]="#800000";h.defaultColors_$LI$()["9"]="#008000";h.defaultColors_$LI$()["10"]="#000080";h.defaultColors_$LI$()["11"]="#808000";h.defaultColors_$LI$()["12"]="#800080";h.defaultColors_$LI$()["13"]="#008080";h.defaultColors_$LI$()["14"]="#C0C0C0";h.defaultColors_$LI$()["15"]="#E6E6E6";h.defaultColors_$LI$()["16"]="#CDCDCD";h.defaultColors_$LI$()["17"]="#B3B3B3";h.defaultColors_$LI$()["18"]="#9A9A9A";h.defaultColors_$LI$()["19"]="#808080";h.defaultColors_$LI$()["20"]="#666666";h.defaultColors_$LI$()["21"]="#4D4D4D";h.defaultColors_$LI$()["22"]="#333333";h.defaultColors_$LI$()["23"]="#1A1A1A"};h.prototype.initialise=function(c,a){if(null!=c){a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLORS);if(0<a.length){var b=a.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_ENTRY),@@ -15547,45 +15546,45 @@ m.BULLET="Bullet";m.CASE="Case";m.CHARACTER="Character";m.COLOR="Color";m.COLOR_this.processGeoElem(c);else if((null!=c&&1==c.nodeType||null===c)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(c),this.processGeoElem(c);else throw Error("invalid overload");}h.prototype.getIndex$org_w3c_dom_Element=function(c){try{return parseInt(c.getAttribute("IX"))||0}catch(a){return 0}};h.prototype.getIndex=function(c){if(null!=c&&1==c.nodeType||null===c)return this.getIndex$org_w3c_dom_Element(c);if(void 0===c)return this.getIndex$();throw Error("invalid overload");};h.prototype.processGeoElem=function(c){var a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Cell");c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Row");if(null==this.rows){this.rows=[];for(var b=0;b<c.length;b++)this.rows.push(null)}for(b=0;b<a.length;b++){var d=a[b],f=d.getAttribute("N");d=d.getAttribute("V");switch(f){case "NoFill":this.noFill=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoLine":this.noLine=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoShow":this.noShow=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoSnap":this.noSnap=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoQuickDrag":this.noQuickDrag=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d)}}a=this.rows.length;b=!1;for(f=0;f<c.length;f++)d=g.mxgraph.io.vsdx.geometry.RowFactory.getRowObj(c[f],-this.rows),d.getIndex()>a?(this.rows.push(d),b=!0):this.rows[d.getIndex()-1]=d;b&&function(k,n){n.compare?k.sort(function(p,x){return n.compare(p,x)}):k.sort(n)}(this.rows,new h.mxVsdxGeometry$0(this))};h.prototype.inheritGeo=function(c){this.noFill=c.noFill;this.noLine=c.noLine;this.noShow=c.noShow;this.noSnap=c.noSnap;this.noQuickDrag=c.noQuickDrag;var a=this.rows=[];a.push.apply(a,c.rows)};h.prototype.getIndex$=function(){return this.index};h.prototype.isNoFill=function(){return this.noFill};h.prototype.isNoLine=+this.rows),d.getIndex()>a?(this.rows.push(d),b=!0):this.rows[d.getIndex()-1]=d;b&&function(k,n){n.compare?k.sort(function(q,t){return n.compare(q,t)}):k.sort(n)}(this.rows,new h.mxVsdxGeometry$0(this))};h.prototype.inheritGeo=function(c){this.noFill=c.noFill;this.noLine=c.noLine;this.noShow=c.noShow;this.noSnap=c.noSnap;this.noQuickDrag=c.noQuickDrag;var a=this.rows=[];a.push.apply(a,c.rows)};h.prototype.getIndex$=function(){return this.index};h.prototype.isNoFill=function(){return this.noFill};h.prototype.isNoLine=function(){return this.noLine};h.prototype.isNoShow=function(){return this.noShow};h.prototype.isNoSnap=function(){return this.noSnap};h.prototype.isNoQuickDrag=function(){return this.noQuickDrag};h.prototype.getRows=function(){return this.rows};h.prototype.getPathXML=function(c,a){if(this.noShow)return"";for(var b="",d=0;d<this.rows.length;d++){var f=this.rows[d];b=b.concat(null!=f?f.handle(c,a):"")}return b};return h}();B.mxVsdxGeometry=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometry";(function(h){var c=function(){function a(b){this.__parent=b}a.prototype.compare=function(b,d){b=null!=b?b.getIndex():0;d=null!=d?d.getIndex():0;return b-d};return a}();h.mxVsdxGeometry$0=c;c.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometry||(B.mxVsdxGeometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=c){this.parentGeomList=c.geomList;var a=this.geomList;a.push.apply(a,c.geomList)}}h.prototype.addGeometry=function(c){c=new g.mxgraph.io.vsdx.mxVsdxGeometry(c,this.parentGeomList);c.getIndex()<this.geomList.length?this.geomList[c.getIndex()]=c:(this.geomList.push(c),this.sortNeeded=!0)};h.prototype.sort=function(){this.sortNeeded&&(function(c,a){a.compare?c.sort(function(b,d){return a.compare(b,d)}):c.sort(a)}(this.geomList,new h.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};h.prototype.isNoShow=function(){for(var c=0;c<this.geomList.length;c++)if(!this.geomList[c].isNoShow())return!1;return!0};h.prototype.isNoFill=function(){for(var c=0;c<this.geomList.length;c++){var a=this.geomList[c];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};h.prototype.isNoLine=function(){for(var c=0;c<this.geomList.length;c++){var a=this.geomList[c];if(!a.isNoShow()&&-!a.isNoLine())return!1}return!0};h.prototype.hasGeom=function(){return 0!=this.geomList.length};h.prototype.getGeoCount=function(){for(var c=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||c++;return c};h.prototype.rotatedPoint=function(c,a,b){var d=c.y*a+c.x*b;c.x=c.x*a-c.y*b;c.y=d};h.prototype.getRoutingPoints=function(c,a,b){this.sort();c=[];c.push(a.clone());for(var d=0,f=0,k=0;k<this.geomList.length;k++){var n=this.geomList[k];if(!n.isNoShow()){n=n.getRows();for(var p=0;p<n.length;p++){var x=-n[p];if(0==p&&null!=x&&x instanceof g.mxgraph.io.vsdx.geometry.MoveTo)d=null!=x.x?x.x:0,f=null!=x.y?x.y:0;else if(null!=x&&x instanceof g.mxgraph.io.vsdx.geometry.LineTo){var A=null!=x.x?x.x:0;x=null!=x.y?x.y:0;var C=new mxPoint(A,x);0!==b&&(b=(360-b)*Math.PI/180,this.rotatedPoint(C,Math.cos(b),Math.sin(b)));A=(C.x-d)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();A+=a.x;x=(C.y-f)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;x+=a.y;A=Math.round(100*A)/100;x=Math.round(100*x)/100;-C.x=A;C.y=x;c.push(C)}}}}return c};h.prototype.getShapeXML=function(c){var a=new mxPoint(0,0),b={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},d=b.str.length;var f=this.processGeo(c,a,b,-1,!0);f=this.processGeo(c,a,b,f,!1);if(b.str.length===d)return"";this.closePath(b,f);b.str=b.str.concat("</foreground></shape>");return b.str};h.prototype.processGeo=function(c,a,b,d,f){var k=c.getRounding(),n="";0<k&&(n=' rounded="1" arcSize="'+k*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor+-'" ');for(k=0;k<this.geomList.length;k++){var p=this.geomList[k];if(f!==p.isNoFill()){var x=p.getPathXML(a,c);0!==x.length&&(p=this.getGeoStyle(p),-1===d?b.str=b.str.concat("<path"+n+">"):d!==p&&(this.closePath(b,d),b.str=b.str.concat("<path"+n+">")),b.str=b.str.concat(x),d=p)}}return d};h.prototype.getGeoStyle=function(c){var a=0;c.isNoLine()||c.isNoFill()?c.isNoFill()?c.isNoLine()||(a=3):a=2:a=1;return a};h.prototype.closePath=function(c,a){c.str=c.str.concat("</path>");1===a?c.str=c.str.concat("<fillstroke/>"):+!a.isNoLine())return!1}return!0};h.prototype.hasGeom=function(){return 0!=this.geomList.length};h.prototype.getGeoCount=function(){for(var c=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||c++;return c};h.prototype.rotatedPoint=function(c,a,b){var d=c.y*a+c.x*b;c.x=c.x*a-c.y*b;c.y=d};h.prototype.getRoutingPoints=function(c,a,b){this.sort();c=[];c.push(a.clone());for(var d=0,f=0,k=0;k<this.geomList.length;k++){var n=this.geomList[k];if(!n.isNoShow()){n=n.getRows();for(var q=0;q<n.length;q++){var t=+n[q];if(0==q&&null!=t&&t instanceof g.mxgraph.io.vsdx.geometry.MoveTo)d=null!=t.x?t.x:0,f=null!=t.y?t.y:0;else if(null!=t&&t instanceof g.mxgraph.io.vsdx.geometry.LineTo){var A=null!=t.x?t.x:0;t=null!=t.y?t.y:0;var C=new mxPoint(A,t);0!==b&&(b=(360-b)*Math.PI/180,this.rotatedPoint(C,Math.cos(b),Math.sin(b)));A=(C.x-d)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();A+=a.x;t=(C.y-f)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;t+=a.y;A=Math.round(100*A)/100;t=Math.round(100*t)/100;+C.x=A;C.y=t;c.push(C)}}}}return c};h.prototype.getShapeXML=function(c){var a=new mxPoint(0,0),b={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},d=b.str.length;var f=this.processGeo(c,a,b,-1,!0);f=this.processGeo(c,a,b,f,!1);if(b.str.length===d)return"";this.closePath(b,f);b.str=b.str.concat("</foreground></shape>");return b.str};h.prototype.processGeo=function(c,a,b,d,f){var k=c.getRounding(),n="";0<k&&(n=' rounded="1" arcSize="'+k*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor++'" ');for(k=0;k<this.geomList.length;k++){var q=this.geomList[k];if(f!==q.isNoFill()){var t=q.getPathXML(a,c);0!==t.length&&(q=this.getGeoStyle(q),-1===d?b.str=b.str.concat("<path"+n+">"):d!==q&&(this.closePath(b,d),b.str=b.str.concat("<path"+n+">")),b.str=b.str.concat(t),d=q)}}return d};h.prototype.getGeoStyle=function(c){var a=0;c.isNoLine()||c.isNoFill()?c.isNoFill()?c.isNoLine()||(a=3):a=2:a=1;return a};h.prototype.closePath=function(c,a){c.str=c.str.concat("</path>");1===a?c.str=c.str.concat("<fillstroke/>"):2===a?c.str=c.str.concat("<fill/>"):3===a&&(c.str=c.str.concat("<stroke/>"))};return h}();B.mxVsdxGeometryList=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(h){var c=function(){function a(b){this.__parent=b}a.prototype.compare=function(b,d){return b.getIndex()-d.getIndex()};return a}();h.mxVsdxGeometryList$0=c;c.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometryList||(B.mxVsdxGeometryList={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.masterShape=this.Id=null;this.childShapes={};this.master=c;this.Id=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID)||"";this.processMasterShapes(a)}h.prototype.processMasterShapes=function(c){for(var a=this.master.firstChild;null!=a;){if(null!=a&&1==a.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(a.nodeName,"Rel")){var b=c.getRelationship(a.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/_rels/masters.xml.rels"),-d=b.getAttribute("Target");b=b.getAttribute("Type");var f=null;null!=b&&function(k,n){var p=k.length-n.length;k=k.indexOf(n,p);return-1!==k&&k===p}(b,"master")&&(f=c.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/"+d));if(null!=f)for(d=f.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(d.nodeName,"MasterContents")){this.processMasterShape(d,c);break}d=d.nextSibling}}else if(1==a.nodeType&&"PageSheet"==a.nodeName)for(this.pageSheet={},-d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Cell"),b=0;b<d.length;b++)this.pageSheet[d[b].getAttribute("N")]=d[b];a=a.nextSibling}};h.prototype.processMasterShape=function(c,a,b){b||(this.firstLevelShapes=[]);for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(p,x){return p&&p.equals?p.equals(x):p===x}(c.nodeName,"Shapes"))for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(p,x){return p&&p.equals?p.equals(x):p===x}(d.nodeName,"Shape")){var f=d,k=f.getAttribute("ID"),+d=b.getAttribute("Target");b=b.getAttribute("Type");var f=null;null!=b&&function(k,n){var q=k.length-n.length;k=k.indexOf(n,q);return-1!==k&&k===q}(b,"master")&&(f=c.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/"+d));if(null!=f)for(d=f.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(d.nodeName,"MasterContents")){this.processMasterShape(d,c);break}d=d.nextSibling}}else if(1==a.nodeType&&"PageSheet"==a.nodeName)for(this.pageSheet={},+d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Cell"),b=0;b<d.length;b++)this.pageSheet[d[b].getAttribute("N")]=d[b];a=a.nextSibling}};h.prototype.processMasterShape=function(c,a,b){b||(this.firstLevelShapes=[]);for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(q,t){return q&&q.equals?q.equals(t):q===t}(c.nodeName,"Shapes"))for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(q,t){return q&&q.equals?q.equals(t):q===t}(d.nodeName,"Shape")){var f=d,k=f.getAttribute("ID"),n=new g.mxgraph.io.vsdx.Shape(f,a);this.masterShape=null==this.masterShape?n:this.masterShape;this.childShapes[k]=n;b||this.firstLevelShapes.push(n);this.processMasterShape(f,a,!0)}d=d.nextSibling}else if(null!=c&&1==c.nodeType&&"Connects"==c.nodeName)for(this.connects={},d=c.firstChild;null!=d;)null!=d&&1==d.nodeType&&"Connect"==d.nodeName&&(f=new g.mxgraph.io.vsdx.mxVsdxConnect(d),this.connects[f.getFromSheet()]=f),d=d.nextSibling;c=c.nextSibling}};h.prototype.getMasterShape=function(){return this.masterShape};h.prototype.getSubShape=function(c){var a=this.childShapes;return a[c]?a[c]:null};h.prototype.getNameU=function(){return this.master.getAttribute("NameU")||""};h.prototype.getName=function(){return this.master.getAttribute("Name")||""};h.prototype.getUniqueID=function(){var c="";this.master.hasAttribute("UniqueID")&&(c=this.master.getAttribute("UniqueID"));return c};h.prototype.getId=function(){return this.Id};h.prototype.getMasterElement=function(){return this.master};return h}();B.mxVsdxMaster=m;m.__class="com.mxgraph.io.vsdx.mxVsdxMaster"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a,b){this.pages=this.media=this.xmlDocs=null;this.masters={};this.stylesheets={};this.themes={};this.pm=this.rootElement=null;this.xmlDocs=a;this.media=b;for(c=c.firstChild;null!=c;){if(a=null!=c&&1==c.nodeType)a=c.tagName.toLowerCase(),b=g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"document",a=a&&a.equals?a.equals(b):a===b;if(a){this.rootElement=c;break}c=c.nextSibling}this.pm=new g.mxgraph.io.vsdx.mxPropertiesManager;this.pm.initialise(this.rootElement,this);this.initStylesheets();this.initThemes();this.initMasters();this.initPages()}h.prototype.initThemes=function(){if(null!=this.xmlDocs)for(var c=!0,a=1;c;){var b=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/theme/theme"+a+".xml");if(null!=b){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.tagName,"a:theme")){b=new g.mxgraph.io.vsdx.mxVsdxTheme(b);0>-b.getThemeIndex()&&b.processTheme();var d=function(f,k){null==f.entries&&(f.entries=[]);for(var n=0;n<f.entries.length;n++)if(null!=f.entries[n].key.equals&&f.entries[n].key.equals(k)||f.entries[n].key===k)return f.entries[n].value;return null}(this.themes,b.getThemeIndex());null!=d&&d.isPure()||function(f,k,n){null==f.entries&&(f.entries=[]);for(var p=0;p<f.entries.length;p++)if(null!=f.entries[p].key.equals&&f.entries[p].key.equals(k)||f.entries[p].key===k){f.entries[p].value=n;return}f.entries.push({key:k,+b.getThemeIndex()&&b.processTheme();var d=function(f,k){null==f.entries&&(f.entries=[]);for(var n=0;n<f.entries.length;n++)if(null!=f.entries[n].key.equals&&f.entries[n].key.equals(k)||f.entries[n].key===k)return f.entries[n].value;return null}(this.themes,b.getThemeIndex());null!=d&&d.isPure()||function(f,k,n){null==f.entries&&(f.entries=[]);for(var q=0;q<f.entries.length;q++)if(null!=f.entries[q].key.equals&&f.entries[q].key.equals(k)||f.entries[q].key===k){f.entries[q].value=n;return}f.entries.push({key:k,value:n,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.themes,b.getThemeIndex(),b);break}b=b.nextSibling}a++}else c=!1}};h.prototype.initStylesheets=function(){var c=this.rootElement.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEETS);if(0<c.length){c=c.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEET);for(var a=c.length,b=0;b<a;b++){var d=c.item(b),f=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);d=new g.mxgraph.io.vsdx.Style(d,this);this.stylesheets[f]=d}}for(c=function(k){var n=0;return{next:function(){return n<k.length?k[n++]:null},hasNext:function(){return n<k.length}}}(function(k){return Object.keys(k).map(function(n){return k[n]})}(this.stylesheets));c.hasNext();)d=c.next(),d.stylesheetRefs(this)};h.prototype.initMasters=function(){if(null!=this.xmlDocs){var c=function(b,d){return b[d]?b[d]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/masters.xml");if(null!=c)for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(b,d){return b&&b.equals?b.equals(d):b===d}(c.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.MASTERS)){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(b,d){return b&&b.equals?b.equals(d):b===d}(c.tagName,"Master")){var a=new g.mxgraph.io.vsdx.mxVsdxMaster(c,this);this.masters[a.getId()]=a}c=c.nextSibling}break}c=c.nextSibling}}};h.prototype.initPages=function(){if(null!=this.xmlDocs){var c=function(k,n){return k[n]?k[n]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+-"/pages/pages.xml");if(null!=c)for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(c.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.PAGES)){var a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.PAGE);if(null!=a&&0<a.length){this.pages={};c={};for(var b=a.length,d=0;d<b;d++){var f=a.item(d);f=this.createPage(f);f.isBackground()&&function(k,n,p){null==k.entries&&(k.entries=[]);for(var x=0;x<k.entries.length;x++)if(null!=k.entries[x].key.equals&&-k.entries[x].key.equals(n)||k.entries[x].key===n){k.entries[x].value=p;return}k.entries.push({key:n,value:p,getKey:function(){return this.key},getValue:function(){return this.value}})}(c,f.getId(),f);(function(k,n,p){null==k.entries&&(k.entries=[]);for(var x=0;x<k.entries.length;x++)if(null!=k.entries[x].key.equals&&k.entries[x].key.equals(n)||k.entries[x].key===n){k.entries[x].value=p;return}k.entries.push({key:n,value:p,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.pages,-f.getId(),f)}a=function(k){null==k.entries&&(k.entries=[]);return k.entries}(this.pages);for(b=0;b<a.length;b++)f=a[b].getValue(),d=f.getBackPageId(),null!=d&&(d=function(k,n){null==k.entries&&(k.entries=[]);for(var p=0;p<k.entries.length;p++)if(null!=k.entries[p].key.equals&&k.entries[p].key.equals(n)||k.entries[p].key===n)return k.entries[p].value;return null}(c,d),f.setBackPage(d))}break}c=c.nextSibling}}};h.prototype.getPages=function(){return this.pages};h.prototype.getThemes=function(){return this.themes};+"/pages/pages.xml");if(null!=c)for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(c.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.PAGES)){var a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.PAGE);if(null!=a&&0<a.length){this.pages={};c={};for(var b=a.length,d=0;d<b;d++){var f=a.item(d);f=this.createPage(f);f.isBackground()&&function(k,n,q){null==k.entries&&(k.entries=[]);for(var t=0;t<k.entries.length;t++)if(null!=k.entries[t].key.equals&&+k.entries[t].key.equals(n)||k.entries[t].key===n){k.entries[t].value=q;return}k.entries.push({key:n,value:q,getKey:function(){return this.key},getValue:function(){return this.value}})}(c,f.getId(),f);(function(k,n,q){null==k.entries&&(k.entries=[]);for(var t=0;t<k.entries.length;t++)if(null!=k.entries[t].key.equals&&k.entries[t].key.equals(n)||k.entries[t].key===n){k.entries[t].value=q;return}k.entries.push({key:n,value:q,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.pages,+f.getId(),f)}a=function(k){null==k.entries&&(k.entries=[]);return k.entries}(this.pages);for(b=0;b<a.length;b++)f=a[b].getValue(),d=f.getBackPageId(),null!=d&&(d=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(c,d),f.setBackPage(d))}break}c=c.nextSibling}}};h.prototype.getPages=function(){return this.pages};h.prototype.getThemes=function(){return this.themes};h.prototype.getDefaultTheme=function(){null==this.defaultTheme&&null!=this.themes.entries&&0<this.themes.entries.length&&(this.defaultTheme=this.themes.entries[0].getValue());return this.defaultTheme};h.prototype.getRelationship=function(c,a){a=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,a);if(null==a||null==c||0===c.length)return null;a=a.getElementsByTagName("Relationship");for(var b=0;b<a.length;b++){var d=a.item(b);if(function(f,k){return f&&f.equals?f.equals(k):f===k}(d.getAttribute("Id"),c))return d}return null};h.prototype.getMaster=function(c){var a=this.masters;return a[c]?a[c]:null};h.prototype.createPage=function(c){return new g.mxgraph.io.vsdx.mxVsdxPage(c,this)};h.prototype.getPropertiesManager=function(){return this.pm};h.prototype.setPropertiesManager=function(c){this.pm=c};h.prototype.getMasterShapes=function(){return this.masters};h.prototype.setMasterShapes=function(c){this.masters=c};h.prototype.getStylesheet=function(c){var a=this.stylesheets;return a[c]?a[c]:null};h.prototype.getXmlDoc=function(c){var a=this.xmlDocs;return a[c]?a[c]:null};h.prototype.getMedia=function(c){var a=this.media;return a[c]?a[c]:null};return h}();B.mxVsdxModel=m;m.__class="com.mxgraph.io.vsdx.mxVsdxModel"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.pageName=this.Id=null;this.__isBackground=!1;this.model=this.pageSheet=this.pageElement=this.backPage=this.backPageId=null;this.shapes={};this.connects={};this.connectsMap={};this.cellElements={};this.model=a;this.pageElement=c;this.layers=[];var b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACKGROUND),d;if(d=null!=b)d=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE,d=b&&b.equals?b.equals(d):b===d;this.__isBackground=d?!0:!1;b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACK_PAGE);null!=b&&0<b.length&&(this.backPageId=parseFloat(b));this.Id=parseFloat(c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID));this.pageName=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME)||"";this.pageNameU=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||this.pageName;b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"PageSheet");if(0<b.length){b=b[0];d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,-"Cell");for(var f=0;f<d.length;f++){var k=d[f],n=k.getAttribute("N");this.cellElements[n]=k}b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Section");for(d=0;d<b.length;d++)if(f=b[d],n=f.getAttribute("N"),"Layer"==n)for(n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Row"),f=0;f<n.length;f++){k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n[f],"Cell");for(var p={},x=0;x<k.length;x++)p[k[x].getAttribute("N")]=k[x].getAttribute("V");null==p.Name&&(p.Name="Layer "+-f);this.layers[parseInt(n[f].getAttribute("IX"))]=p}}this.parseNodes(c,a,"pages")}h.prototype.parseNodes=function(c,a,b){for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType){var f=d,k=f.nodeName;if(function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"Connects"))for(f=f.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),f=null!=f&&0<f.length?f.item(0):null;null!=f;){if(null!=f&&1==f.nodeType){k=f;var n=new g.mxgraph.io.vsdx.mxVsdxConnect(k),p=n.getFromSheet();this.connectsMap[p]=-(this.connectsMap[p]||0)+1;p=null!=p&&-1<p?function(x,A){null==x.entries&&(x.entries=[]);for(var C=0;C<x.entries.length;C++)if(null!=x.entries[C].key.equals&&x.entries[C].key.equals(A)||x.entries[C].key===A)return x.entries[C].value;return null}(this.connects,p):null;null!=p?p.addConnect(k):function(x,A,C){null==x.entries&&(x.entries=[]);for(var J=0;J<x.entries.length;J++)if(null!=x.entries[J].key.equals&&x.entries[J].key.equals(A)||x.entries[J].key===A){x.entries[J].value=C;return}x.entries.push({key:A,-value:C,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.connects,n.getFromSheet(),n)}f=f.nextSibling}}d=d.nextSibling}for(d=c.firstChild;null!=d;)null!=d&&1==d.nodeType&&(f=d,k=f.nodeName,function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"Rel")?this.resolveRel(f,a,b):function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"Shapes")?this.shapes=this.parseShapes(f,null,!1):function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"PageSheet")&&(this.pageSheet=f)),d=d.nextSibling};+"Cell");for(var f=0;f<d.length;f++){var k=d[f],n=k.getAttribute("N");this.cellElements[n]=k}b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Section");for(d=0;d<b.length;d++)if(f=b[d],n=f.getAttribute("N"),"Layer"==n)for(n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Row"),f=0;f<n.length;f++){k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n[f],"Cell");for(var q={},t=0;t<k.length;t++)q[k[t].getAttribute("N")]=k[t].getAttribute("V");null==q.Name&&(q.Name="Layer "++f);this.layers[parseInt(n[f].getAttribute("IX"))]=q}}this.parseNodes(c,a,"pages")}h.prototype.parseNodes=function(c,a,b){for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType){var f=d,k=f.nodeName;if(function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Connects"))for(f=f.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),f=null!=f&&0<f.length?f.item(0):null;null!=f;){if(null!=f&&1==f.nodeType){k=f;var n=new g.mxgraph.io.vsdx.mxVsdxConnect(k),q=n.getFromSheet();this.connectsMap[q]=+(this.connectsMap[q]||0)+1;q=null!=q&&-1<q?function(t,A){null==t.entries&&(t.entries=[]);for(var C=0;C<t.entries.length;C++)if(null!=t.entries[C].key.equals&&t.entries[C].key.equals(A)||t.entries[C].key===A)return t.entries[C].value;return null}(this.connects,q):null;null!=q?q.addConnect(k):function(t,A,C){null==t.entries&&(t.entries=[]);for(var I=0;I<t.entries.length;I++)if(null!=t.entries[I].key.equals&&t.entries[I].key.equals(A)||t.entries[I].key===A){t.entries[I].value=C;return}t.entries.push({key:A,+value:C,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.connects,n.getFromSheet(),n)}f=f.nextSibling}}d=d.nextSibling}for(d=c.firstChild;null!=d;)null!=d&&1==d.nodeType&&(f=d,k=f.nodeName,function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Rel")?this.resolveRel(f,a,b):function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"Shapes")?this.shapes=this.parseShapes(f,null,!1):function(t,A){return t&&t.equals?t.equals(A):t===A}(k,"PageSheet")&&(this.pageSheet=f)),d=d.nextSibling};h.prototype.resolveRel=function(c,a,b){b=a.getRelationship(c.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/_rels/"+b+".xml.rels");c=b.getAttribute("Target");b=b.getAttribute("Type");if(function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}((new String(b)).toString(),"page")){var d=null;null!=b&&function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}(b,"page")&&(d=a.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/"+c));if(null!=d)for(b=d.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.tagName,"PageContents")){d=c.indexOf(".");-1!==d&&this.parseNodes(b,a,c.substring(0,d));break}b=b.nextSibling}}};h.prototype.parseShapes=function(c,a,b){b={};c=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPE);for(c=null!=c&&0<c.length?c.item(0):null;null!=c;){if(null!=c&&1==c.nodeType){var d=c,f=a;if(null==f){var k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER);-null==k||function(p,x){return p&&p.equals?p.equals(x):p===x}(k,"")||(f=this.model.getMaster(k))}var n=this.isEdge(d);n||null==f||(k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE),n=f.getMasterElement(),null==k||function(p,x){return p&&p.equals?p.equals(x):p===x}(k,"")||(k=f.getSubShape(k),n=null!=k?k.getShape():n),n=this.isEdge(n));d=this.createCell(d,!n,f);(function(p,x,A){null==p.entries&&(p.entries=[]);for(var C=0;C<p.entries.length;C++)if(null!=p.entries[C].key.equals&&p.entries[C].key.equals(x)||-p.entries[C].key===x){p.entries[C].value=A;return}p.entries.push({key:x,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(b,d.getId(),d)}c=c.nextSibling}return b};h.prototype.createCell=function(c,a,b){return new g.mxgraph.io.vsdx.VsdxShape(this,c,a,this.model.getMasterShapes(),b,this.model)};h.prototype.isEdge=function(c){if(null!=c&&(c=c.childNodes,null!=c))for(c=c.item(0);null!=c;){if(null!=c&&1==c.nodeType){var a=c;if(function(b,d){return b&&b.equals?b.equals(d):+null==k||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,"")||(f=this.model.getMaster(k))}var n=this.isEdge(d);n||null==f||(k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE),n=f.getMasterElement(),null==k||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,"")||(k=f.getSubShape(k),n=null!=k?k.getShape():n),n=this.isEdge(n));d=this.createCell(d,!n,f);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||+q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(b,d.getId(),d)}c=c.nextSibling}return b};h.prototype.createCell=function(c,a,b){return new g.mxgraph.io.vsdx.VsdxShape(this,c,a,this.model.getMasterShapes(),b,this.model)};h.prototype.isEdge=function(c){if(null!=c&&(c=c.childNodes,null!=c))for(c=c.item(0);null!=c;){if(null!=c&&1==c.nodeType){var a=c;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a.nodeName,"Cell")&&(a=a.getAttribute("N"),function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"BeginX")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"BeginY")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"EndY")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"EndX")))return!0}c=c.nextSibling}return!1};h.prototype.getPageDimensions=function(){var c=0,a=0,b=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageHeight"),d=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageWidth");null!=b&&(c=parseFloat(b.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),c=Math.round(100*c)/100);null!=d&&(a=parseFloat(d.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),a=Math.round(100*a)/100);return new mxPoint(a,c)};h.prototype.getDrawingScale=function(){var c=this.cellElements;c=c.DrawingScale?c.DrawingScale:null;return null!=c?parseFloat(c.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getPageScale=function(){var c=this.cellElements;c=c.PageScale?c.PageScale:null;return null!=c?parseFloat(c.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getCellValue=function(c){var a=this.cellElements;c=a[c]?a[c]:null;return null!=c?c.getAttribute("V")||"":null};h.prototype.getCellIntValue=function(c,a){c=this.getCellValue(c);return null!=c?parseInt(c):a};h.prototype.getId=function(){return this.Id};h.prototype.getPageName=function(){return this.pageName};h.prototype.getPageNameU=@@ -15607,8 +15606,8 @@ f.equals(k):f===k}(d,"a:fontScheme")?(function(f,k){return f&&f.equals?f.equals(!0}};h.prototype.processExtras=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0;a<c.length;a++){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c[a]);switch(b.nodeName){case "vt:fmtConnectorScheme":var d=this.name;var f=b.getAttribute("name");d=d&&d.equals?d.equals(f):d===f;d||(this.__isPure=!1);b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "a:fillStyleLst":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);for(var k=0;k<f.length;k++)this.connFillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f[k]));break;case "a:lnStyleLst":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.connLineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(f[k]))}break;case "vt:lineStyles":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "vt:fmtConnectorSchemeLineStyles":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);for(k=0;k<f.length;k++)this.connLineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]));break;case "vt:fmtSchemeLineStyles":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.lineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]))}break;case "vt:fontStylesGroup":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "vt:connectorFontStyles":this.fillFontStyles(f,this.connFontColors,this.connFontStyles);-break;case "vt:fontStyles":this.fillFontStyles(f,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b),f=d=0;f<b.length;f++){k=b[f];this.variantEmbellishment[d]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(k,"embellishment");k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(k);for(var n=0,p=0;p<k.length;p++){var x=k[p];this.variantFillIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,-"fillIdx");this.variantLineIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"lineIdx");this.variantEffectIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"effectIdx");this.variantFontIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"fontIdx");n++}d++}}}};h.prototype.fillFontStyles=function(c,a,b){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var d=0;d<c.length;d++){var f=+break;case "vt:fontStyles":this.fillFontStyles(f,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b),f=d=0;f<b.length;f++){k=b[f];this.variantEmbellishment[d]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(k,"embellishment");k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(k);for(var n=0,q=0;q<k.length;q++){var t=k[q];this.variantFillIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,+"fillIdx");this.variantLineIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"lineIdx");this.variantEffectIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"effectIdx");this.variantFontIdx[d][n]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(t,"fontIdx");n++}d++}}}};h.prototype.fillFontStyles=function(c,a,b){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var d=0;d<c.length;d++){var f=c[d];b.push(g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"style"));f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f);null!=f&&a.push(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f)))}};h.prototype.processFormats=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0;a<c.length;a++){var b=c[a];switch(b.nodeName){case "a:fillStyleLst":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var d=0;d<b.length;d++)this.fillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(b[d]));break;case "a:lnStyleLst":for(b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b),d=0;d<b.length;d++)this.lineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(b[d]))}}};h.prototype.processFonts=function(c){};h.prototype.processColors=function(c){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType){var a=c,b=a.nodeName;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);var d=(d=b)&&d.equals?d.equals("a:extLst"):"a:extLst"===d;d?3===a.length&&(0>this.themeIndex&&this.extractThemeIndex(a[0]),this.addBkgndColor(a[1]),this.addVariantColors(a[2])):(b=b.substring(2),0<a.length&&this.addBasicColor(b,a[0]))}c=c.nextSibling}};h.prototype.addVariantColors=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);if(null!=c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0,b=0;b<c.length;b++){var d=c[b];this.addVariantColorsSet(a++,d)}}};h.prototype.addVariantColorsSet=@@ -15640,20 +15639,20 @@ throw Error("invalid overload");};h.prototype.getLineWidth$com_mxgraph_io_vsdx_t{}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(){}h.conversionFactor_$LI$=function(){null==h.conversionFactor&&(h.conversionFactor=h.screenCoordinatesPerCm*h.CENTIMETERS_PER_INCHES);return h.conversionFactor};h.getDirectChildNamedElements=function(c,a){var b=[];for(c=c.firstChild;null!=c;c=c.nextSibling){var d;if(d=null!=c&&1==c.nodeType){d=a;var f=c.nodeName;d=d&&d.equals?d.equals(f):d===f}d&&b.push(c)}return b};h.getDirectChildElements=function(c){var a=[];for(c=c.firstChild;null!=c;c=c.nextSibling)null!=c&&1==c.nodeType&&a.push(c);return a};h.getDirectFirstChildElement=function(c){for(c=c.firstChild;null!=c;c=c.nextSibling)if(null!=c&&1==c.nodeType)return c;return null};h.getIntAttr$org_w3c_dom_Element$java_lang_String$int=function(c,a,b){try{var d=c.getAttribute(a);if(null!=d)return parseInt(d)}catch(f){}return b};h.getIntAttr=function(c,a,b){if((null==c||1!=c.nodeType)&&null!==c||"string"!==typeof a&&null!==a||"number"!==typeof b&&null!==b){if((null==-c||1!=c.nodeType)&&null!==c||"string"!==typeof a&&null!==a||void 0!==b)throw Error("invalid overload");return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(c,a)}return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,b)};h.getIntAttr$org_w3c_dom_Element$java_lang_String=function(c,a){return h.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,0)};h.getStyleString=function(c,a){for(var b="",d=function(p){var x=0;return{next:function(){return x<-p.length?p[x++]:null},hasNext:function(){return x<p.length}}}(function(p){return Object.keys(p).map(function(x){return p[x]})}(c)),f=function(p){var x=0;return{next:function(){return x<p.length?p[x++]:null},hasNext:function(){return x<p.length}}}(Object.keys(c));f.hasNext();){var k=f.next(),n=d.next();if(!function(p,x){return p&&p.equals?p.equals(x):p===x}(k,mxConstants.STYLE_SHAPE)||!function(p,x,A){void 0===A&&(A=0);return p.substr(A,x.length)===x}(c[k]?c[k]:null,"image")&&!function(p,x,A){void 0===-A&&(A=0);return p.substr(A,x.length)===x}(c[k]?c[k]:null,"rounded="))try{b=b+k+a}catch(p){}b=b+n+";"}return b};h.surroundByTags=function(c,a,b){return"<"+a+(b?' style="'+b+'"':"")+">"+c+"</"+a+">"};h.htmlEntities=function(c){return c.replace(RegExp("&","g"),"&").replace(RegExp('"',"g"),""").replace(RegExp("'","g"),"′").replace(RegExp("<","g"),"<").replace(RegExp(">","g"),">")};h.toInitialCapital=function(c){c=c.split(" ");for(var a="",b=0;b<c.length;b++){var d=c[b],f=d.substring(0,+c||1!=c.nodeType)&&null!==c||"string"!==typeof a&&null!==a||void 0!==b)throw Error("invalid overload");return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(c,a)}return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,b)};h.getIntAttr$org_w3c_dom_Element$java_lang_String=function(c,a){return h.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,0)};h.getStyleString=function(c,a){for(var b="",d=function(q){var t=0;return{next:function(){return t<+q.length?q[t++]:null},hasNext:function(){return t<q.length}}}(function(q){return Object.keys(q).map(function(t){return q[t]})}(c)),f=function(q){var t=0;return{next:function(){return t<q.length?q[t++]:null},hasNext:function(){return t<q.length}}}(Object.keys(c));f.hasNext();){var k=f.next(),n=d.next();if(!function(q,t){return q&&q.equals?q.equals(t):q===t}(k,mxConstants.STYLE_SHAPE)||!function(q,t,A){void 0===A&&(A=0);return q.substr(A,t.length)===t}(c[k]?c[k]:null,"image")&&!function(q,t,A){void 0===+A&&(A=0);return q.substr(A,t.length)===t}(c[k]?c[k]:null,"rounded="))try{b=b+k+a}catch(q){}b=b+n+";"}return b};h.surroundByTags=function(c,a,b){return"<"+a+(b?' style="'+b+'"':"")+">"+c+"</"+a+">"};h.htmlEntities=function(c){return c.replace(RegExp("&","g"),"&").replace(RegExp('"',"g"),""").replace(RegExp("'","g"),"′").replace(RegExp("<","g"),"<").replace(RegExp(">","g"),">")};h.toInitialCapital=function(c){c=c.split(" ");for(var a="",b=0;b<c.length;b++){var d=c[b],f=d.substring(0,1);d=d.substring(1);f=f.toUpperCase();a+=f+d}return a.substring(0,a.length)};h.toSmallCaps=function(c,a){var b="",d=b;if(a&&a.equals?a.equals(d):a===d)b=c;else for(c=c.split(""),d=0;d<c.length;d++){var f=c[d];(null==f.charCodeAt?f:f.charCodeAt(0))>=(null=="a".charCodeAt?"a":97)&&(null==f.charCodeAt?f:f.charCodeAt(0))<=(null=="z".charCodeAt?"z":122)?(f=(new String(f)).toString(),f=f.toUpperCase(),b+='<font style="font-size:'+parseFloat(a)/1.28+'px">'+f+"</font>"):b+=f}return b};h.getStyleMap=function(c,-a){var b={};c=c.split(";");for(var d=0;d<c.length;d++){var f=c[d],k=f.indexOf(a),n=f.substring(0,k);f=f.substring(k+1);b[n]=f}return b};h.isInsideTriangle=function(c,a,b,d,f,k,n,p){var x=(c-f)*(d-k)-(b-f)*(a-k);f=(c-n)*(k-p)-(f-n)*(a-p);c=(c-b)*(p-d)-(n-b)*(a-d);return!((0>x||0>f||0>c)&&(0<x||0<f||0<c))};return h}();m.screenCoordinatesPerCm=40;m.CENTIMETERS_PER_INCHES=2.54;B.mxVsdxUtils=m;m.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=+a){var b={};c=c.split(";");for(var d=0;d<c.length;d++){var f=c[d],k=f.indexOf(a),n=f.substring(0,k);f=f.substring(k+1);b[n]=f}return b};h.isInsideTriangle=function(c,a,b,d,f,k,n,q){var t=(c-f)*(d-k)-(b-f)*(a-k);f=(c-n)*(k-q)-(f-n)*(a-q);c=(c-b)*(q-d)-(n-b)*(a-d);return!((0>t||0>f||0>c)&&(0<t||0<f||0<c))};return h}();m.screenCoordinatesPerCm=40;m.CENTIMETERS_PER_INCHES=2.54;B.mxVsdxUtils=m;m.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a,b,d){this.paraIndex=this.fields=this.charIndices=this.values=null;this.values=[];this.values.push(c);this.charIndices=[];this.charIndices.push(a);this.fields=[];this.fields.push(d);this.paraIndex=b}h.prototype.addText=function(c,a,b){this.values.push(c);this.charIndices.push(a);this.fields.push(b)};h.prototype.getParagraphIndex=function(){return this.paraIndex};h.prototype.getValue=function(c){return this.values[c]};h.prototype.numValues=function(){return this.values.length};h.prototype.getChar=function(c){return this.charIndices[c]};h.prototype.getField=function(c){return this.fields[c]};return h}();B.Paragraph=m;m.__class="com.mxgraph.io.vsdx.Paragraph"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.elem=c}h.prototype.getIndexedCell=function(c,a){for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.elem,"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("IX");if(function(x,A){return x&&x.equals?x.equals(A):x===A}(k,c)||null==c){f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Cell");for(var n=0;n<f.length;n++){var p=f[n];k=p.getAttribute("N");if(function(x,A){return x&&-x.equals?x.equals(A):x===A}(k,a))return p}}}return null};return h}();B.Section=m;m.__class="com.mxgraph.io.vsdx.Section"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.elem=c}h.prototype.getIndexedCell=function(c,a){for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.elem,"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("IX");if(function(t,A){return t&&t.equals?t.equals(A):t===A}(k,c)||null==c){f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Cell");for(var n=0;n<f.length;n++){var q=f[n];k=q.getAttribute("N");if(function(t,A){return t&&+t.equals?t.equals(A):t===A}(k,a))return q}}}return null};return h}();B.Section=m;m.__class="com.mxgraph.io.vsdx.Section"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.pageNumber=0;this.pageNumber=c;this.Id=a}h.prototype.getId=function(){return this.Id};h.prototype.getPageNumber=function(){return this.pageNumber};h.prototype.equals=function(c){return null==c||this.constructor!==c.constructor||this.pageNumber!==c.pageNumber||this.Id!==c.Id?!1:!0};h.prototype.hashCode=function(){return 1E5*this.pageNumber+this.Id};return h}();B.ShapePageId=m;m.__class="com.mxgraph.io.vsdx.ShapePageId"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=b;this.blue=d}c.NONE_$LI$=function(){null==c.NONE&&(c.NONE=new c(-1,-1,-1));return c.NONE};c.prototype.getRed=function(){return this.red};c.prototype.setRed=function(a){this.red=a};c.prototype.getGreen=function(){return this.green};c.prototype.setGreen=function(a){this.green=a};c.prototype.getBlue=function(){return this.blue};-c.prototype.setBlue=function(a){this.blue=a};c.prototype.toHsl=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,Math.min(b,d)),n=(f+k)/2;if(f===k)a=k=0;else{var p=f-k;k=.5<n?p/(2-f-k):p/(f+k);a=(f===a?(b-d)/p+(b<d?6:0):f===b?(d-a)/p+2:(a-b)/p+4)/6}return new g.mxgraph.io.vsdx.theme.HSLColor(a,k,n)};c.prototype.toHsv=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,+c.prototype.setBlue=function(a){this.blue=a};c.prototype.toHsl=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,Math.min(b,d)),n=(f+k)/2;if(f===k)a=k=0;else{var q=f-k;k=.5<n?q/(2-f-k):q/(f+k);a=(f===a?(b-d)/q+(b<d?6:0):f===b?(d-a)/q+2:(a-b)/q+4)/6}return new g.mxgraph.io.vsdx.theme.HSLColor(a,k,n)};c.prototype.toHsv=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,Math.min(b,d)),n=f-k;a=f===k?0:(f===a?(b-d)/n+(b<d?6:0):f===b?(d-a)/n+2:(a-b)/n+4)/6;return new g.mxgraph.io.vsdx.theme.HSVColor(a,0===f?0:n/f,f)};c.decodeColorHex=function(a){a=parseInt(a,16);return new c(a>>16&255,a>>8&255,a&255)};c.prototype.toHexStr=function(){var a=this.red.toString(16);a=1==a.length?"0"+a:a;var b=this.green.toString(16);b=1==b.length?"0"+b:b;var d=this.blue.toString(16);d=1==d.length?"0"+d:d;return"#"+a+b+d};c.prototype.getGradientClr=function(){return this.gradientClr};c.prototype.setGradientClr=function(a){this.gradientClr=a};return c}();m.Color=h;h.__class="com.mxgraph.io.vsdx.theme.Color"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getFillStyle=function(a){var b=null;switch(a.nodeName){case "a:solidFill":b=new g.mxgraph.io.vsdx.theme.SolidFillStyle(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":b=new g.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":b=new g.mxgraph.io.vsdx.theme.GradFill(a)}return b};return c}();m.FillStyleFactory=@@ -15671,8 +15670,8 @@ a/100;this.lum=this.clamp01(this.lum);return this};c.prototype.satMod=function(athis.isBevelJoin=this.isRoundJoin=!1;this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.lineWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"w");var b=a.getAttribute("cap");if(null!=b)switch(b){case "rnd":this.lineCap=c.LineCapType.ROUND;break;case "sq":this.lineCap=c.LineCapType.SQUARE;break;case "flat":this.lineCap=c.LineCapType.FLAT}b=a.getAttribute("cmpd");if(null!=b)switch(b){case "sng":this.lineComp=c.CompoundLineType.SINGLE;break;case "dbl":this.lineComp=c.CompoundLineType.DOUBLE;break;case "thickThin":this.lineComp=c.CompoundLineType.THICK_THIN_DOUBLE;break;case "thinThick":this.lineComp=c.CompoundLineType.THIN_THICK_DOUBLE;break;case "tri":this.lineComp=c.CompoundLineType.THIN_THICK_THIN_TRIPLE}b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<b.length;d++){var f=b[d];switch(f.nodeName){case "a:noFill":case "a:solidFill":case "a:gradFill":case "a:pattFill":this.fillStyle=g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f);break;case "a:prstDash":f=f.getAttribute("val");this.isLineDashed=!0;switch(f){case "solid":this.isLineDashed=!1;break;case "sysDot":case "dot":this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDash":this.lineDashPattern.push(12);this.lineDashPattern.push(4);break;case "sysDashDot":case "dashDot":this.lineDashPattern.push(8);this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDashDot":this.lineDashPattern.push(12);-this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "sysDashDotDot":case "lgDashDotDot":this.lineDashPattern.push(12),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4)}break;case "a:custDash":this.isLineDashed=!0;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"a:ds");for(var k=0;k<f.length;k++){var n=f[k],p=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,-"d");n=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"sp");this.lineDashPattern.push(p/1E4);this.lineDashPattern.push(n/1E4)}break;case "a:round":this.isRoundJoin=!0;break;case "a:bevel":this.isBevelJoin=!0;break;case "a:miter":g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"lim");this.isMiterJoin=!0;break;case "a:headEnd":this.headEndType=this.getLineEndType(f);this.headEndWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,+this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "sysDashDotDot":case "lgDashDotDot":this.lineDashPattern.push(12),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4)}break;case "a:custDash":this.isLineDashed=!0;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"a:ds");for(var k=0;k<f.length;k++){var n=f[k],q=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,+"d");n=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"sp");this.lineDashPattern.push(q/1E4);this.lineDashPattern.push(n/1E4)}break;case "a:round":this.isRoundJoin=!0;break;case "a:bevel":this.isBevelJoin=!0;break;case "a:miter":g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"lim");this.isMiterJoin=!0;break;case "a:headEnd":this.headEndType=this.getLineEndType(f);this.headEndWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"w");this.headEndLen=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len");break;case "a:tailEnd":this.tailEndType=this.getLineEndType(f),this.tailEndWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"w"),this.tailEndLen=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len")}}}else if(void 0===a)Array.prototype.slice.call(arguments),this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0,this.isLineDashed=!1,this.lineDashPattern=[],this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1,this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0;else throw Error("invalid overload");}c.prototype.getLineEndType=function(a){var b=null;switch(a.getAttribute("type")){case "none":b=c.LineEndType.NONE;break;case "triangle":b=c.LineEndType.TRIANGLE;break;case "stealth":b=c.LineEndType.STEALTH;break;case "diamond":b=c.LineEndType.DIAMOND;break;case "oval":b=c.LineEndType.OVAL;break;case "arrow":b=c.LineEndType.ARROW}return b};c.prototype.getLineColor=function(a,b){return null!=this.fillStyle?this.fillStyle.applyStyle(a,b):b.getDefaultLineClr()};c.prototype.isDashed=function(){return this.isLineDashed};c.prototype.getLineDashPattern=function(){return this.lineDashPattern};c.prototype.getStartSize=@@ -15692,8 +15691,8 @@ function(a){this.blueOff=a;this.hasEffects=!0};c.prototype.setBlueMod=function(a(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getOoxmlColor=function(a){var b=null;switch(a.nodeName){case "a:scrgbClr":b=new g.mxgraph.io.vsdx.theme.ScrgbClr(parseInt(a.getAttribute("r")),parseInt(a.getAttribute("g")),parseInt(a.getAttribute("b")));break;case "a:srgbClr":b=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"));break;case "a:hslClr":b=new g.mxgraph.io.vsdx.theme.HslClr(parseInt(a.getAttribute("hue")),parseInt(a.getAttribute("sat")),parseInt(a.getAttribute("lum")));break;case "a:sysClr":b=new g.mxgraph.io.vsdx.theme.SysClr(a.getAttribute("val"),a.getAttribute("lastClr"));break;case "a:schemeClr":b=new g.mxgraph.io.vsdx.theme.SchemeClr(a.getAttribute("val"));break;case "a:prstClr":b=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"))}a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<a.length;d++){var f=a[d],k=parseInt(f.getAttribute("val"))/1E3|0;switch(f.nodeName){case "a:tint":b.setTint(k);break;case "a:shade":b.setShade(k);break;case "a:satMod":b.setSatMod(k);break;case "a:lumMod":b.setLumMod(k);break;case "a:hueMod":b.setHueMod(k)}}return b};return c}();m.OoxmlColorFactory=h;h.__class="com.mxgraph.io.vsdx.theme.OoxmlColorFactory"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d,f,k,n,p,x,A,C){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=b;this.quickStyleFillMatrix=d;this.quickStyleFontColor=f;this.quickStyleFontMatrix=k;this.quickStyleLineColor=-n;this.quickStyleLineMatrix=p;this.quickStyleShadowColor=x;this.quickStyleType=A;this.quickStyleVariation=C}c.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};c.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};c.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};c.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};c.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix};+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d,f,k,n,q,t,A,C){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=b;this.quickStyleFillMatrix=d;this.quickStyleFontColor=f;this.quickStyleFontMatrix=k;this.quickStyleLineColor=+n;this.quickStyleLineMatrix=q;this.quickStyleShadowColor=t;this.quickStyleType=A;this.quickStyleVariation=C}c.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};c.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};c.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};c.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};c.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix};c.prototype.getQuickStyleLineColor=function(){return this.quickStyleLineColor};c.prototype.getQuickStyleLineMatrix=function(){return this.quickStyleLineMatrix};c.prototype.getQuickStyleShadowColor=function(){return this.quickStyleShadowColor};c.prototype.getQuickStyleType=function(){return this.quickStyleType};c.prototype.getQuickStyleVariation=function(){return this.quickStyleVariation};c.prototype.setQuickStyleEffectsMatrix=function(a){this.quickStyleEffectsMatrix=a};c.prototype.setQuickStyleFillColor=function(a){this.quickStyleFillColor=a};c.prototype.setQuickStyleFillMatrix=function(a){this.quickStyleFillMatrix=a};c.prototype.setQuickStyleFontColor=function(a){this.quickStyleFontColor=a};c.prototype.setQuickStyleFontMatrix=function(a){this.quickStyleFontMatrix=a};c.prototype.setQuickStyleLineColor=function(a){this.quickStyleLineColor=a};c.prototype.setQuickStyleLineMatrix=function(a){this.quickStyleLineMatrix=a};c.prototype.setQuickStyleShadowColor=function(a){this.quickStyleShadowColor=a};c.prototype.setQuickStyleType=function(a){this.quickStyleType=a};c.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return c}();m.QuickStyleVals=h;h.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));@@ -15701,36 +15700,36 @@ function(a){this.quickStyleType=a};c.prototype.setQuickStyleVariation=function(a(function(g){(function(y){(function(z){var B=function(){function m(){}m.MAX_AREA_$LI$=function(){null==m.MAX_AREA&&(m.MAX_AREA=1E8);return m.MAX_AREA};return m}();B.MAX_REQUEST_SIZE=52428800;B.IMAGE_DOMAIN="http://img.diagramly.com/";z.Constants=B;B.__class="com.mxgraph.online.Constants"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){var B=function(){function m(){}m.getRotatedPoint=function(h,c,a,b){var d=h.x-b.x;h=h.y-b.y;return new mxPoint(d*c-h*a+b.x,h*c+d*a+b.y)};m.rotatedGeometry=function(h,c,a,b){c=c*Math.PI/180;var d=Math.cos(c);c=Math.sin(c);var f=h.getCenterX()-a,k=h.getCenterY()-b;h.x=Math.round(f*d-k*c+a-h.width/2);h.y=Math.round(k*d+f*c+b-h.height/2)};return m}();B.CHARSET_FOR_URL_ENCODING="ISO-8859-1";z.Utils=B;B.__class="com.mxgraph.online.Utils"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.a=k;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a){var f=d.getHeight(),k=d.getWidth(),n=Math.floor(Math.round(d.getLastX()*k)/100),p=Math.floor(Math.round(d.getLastY()*f)/100);b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var x=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();x=f-x;var A=-this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(b-n);p=Math.abs(x-p);n=p=.5*A+(n*n+p*p)/(8*A);var C=Math.abs(p);p=Math.round(100*p/k*100)/100;n=Math.round(100*n/f*100)/100;b=Math.round(100*b/k*100)/100;x=Math.round(100*x/f*100)/100;A=Math.round(100*A)/100;p=Math.abs(p);n=Math.abs(n);f=0>A?"1":"0";A=C<Math.abs(A)?"1":"0";d.setLastX(b);d.setLastY(x);return'<arc rx="'+(new String(p)).toString()+'" ry="'+(new String(n)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(x)).toString()++(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.a=k;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a){var f=d.getHeight(),k=d.getWidth(),n=Math.floor(Math.round(d.getLastX()*k)/100),q=Math.floor(Math.round(d.getLastY()*f)/100);b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var t=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();t=f-t;var A=+this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(b-n);q=Math.abs(t-q);n=q=.5*A+(n*n+q*q)/(8*A);var C=Math.abs(q);q=Math.round(100*q/k*100)/100;n=Math.round(100*n/f*100)/100;b=Math.round(100*b/k*100)/100;t=Math.round(100*t/f*100)/100;A=Math.round(100*A)/100;q=Math.abs(q);n=Math.abs(n);f=0>A?"1":"0";A=C<Math.abs(A)?"1":"0";d.setLastX(b);d.setLastY(t);return'<arc rx="'+(new String(q)).toString()+'" ry="'+(new String(n)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(t)).toString()+'" x-axis-rotation="0" large-arc-flag="'+A+'" sweep-flag="'+f+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.ArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b){return c.call(this,b,null,null)||this}__extends(a,c);a.prototype.handle=function(b,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.DelRow=h;h.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,p,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=p;b.d=x;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b=d.getHeight();var f=d.getWidth(),k=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=b-d;var n=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),-p=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();p=b-p;var x=this.c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.d*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(n-k);p=Math.abs(p-d);p=Math.sqrt(n*n+p*p);x=Math.abs(x-k);A=Math.abs(b-A-d);k=100*k/f;A=Math.round(100*Math.sqrt(x*x+A*A)/b/2*100)/100;f=Math.round(100*p/f/2*100)/100;x=Math.round(100*(k-2*f))/100;k=Math.round(100*(k+2*f))/100;b=Math.round(100*d/b*100)/100;return'<move x="'+(new String(x)).toString()+-'" y="'+(new String(b)).toString()+'"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(x)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.Ellipse=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b=d.getHeight();var f=d.getWidth(),k=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=b-d;var n=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),+q=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();q=b-q;var t=this.c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.d*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(n-k);q=Math.abs(q-d);q=Math.sqrt(n*n+q*q);t=Math.abs(t-k);A=Math.abs(b-A-d);k=100*k/f;A=Math.round(100*Math.sqrt(t*t+A*A)/b/2*100)/100;f=Math.round(100*q/f/2*100)/100;t=Math.round(100*(k-2*f))/100;k=Math.round(100*(k+2*f))/100;b=Math.round(100*d/b*100)/100;return'<move x="'+(new String(t)).toString()++'" y="'+(new String(b)).toString()+'"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(t)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.Ellipse=h;h.__class="com.mxgraph.io.vsdx.geometry.Ellipse"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,p,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=p;b.d=x;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=f-n;var p=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),-x=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.c,C=this.d;b=100*b/k;n=100*n/f;var J=d.getLastX()*k/100,M=d.getLastY()*f/100,L=b*k/100,Q=n*f/100,U=f-x,H=-A;A=Math.sqrt(J*J+M*M)*Math.cos(Math.atan2(M,J)-H);x=Math.sqrt(J*J+M*M)*Math.sin(Math.atan2(M,J)-H);var I=Math.sqrt(L*L+Q*Q)*Math.cos(Math.atan2(Q,L)-H),N=Math.sqrt(L*L+Q*Q)*Math.sin(Math.atan2(Q,L)-H),K=Math.sqrt(p*p+U*U)*Math.cos(Math.atan2(U,p)-H),O=Math.sqrt(p*p+U*U)*Math.sin(Math.atan2(U,p)-H),ba=((A-I)*(A+I)*(N-O)-(I--K)*(I+K)*(x-N)+C*C*(x-N)*(N-O)*(x-O))/(2*((A-I)*(N-O)-(I-K)*(x-N))),W=((A-I)*(I-K)*(A-K)/(C*C)+(I-K)*(x-N)*(x+N)-(A-I)*(N-O)*(N+O))/(2*((I-K)*(x-N)-(A-I)*(N-O))),R=A-ba,S=x-W;R=Math.sqrt(R*R+S*S*C*C);C=R/C;H=180*H/Math.PI;b=Math.round(100*b)/100;n=Math.round(100*n)/100;R=Math.round(100*R/k*100)/100;C=Math.round(100*C/f*100)/100;H=Math.round(100*H)/100;f=0<(L-J)*(U-M)-(Q-M)*(p-J)?"0":"1";k="0";g.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ba,W,A,x,I,N,K,O)&&(k="1");d.setLastX(b);d.setLastY(n);return'<arc rx="'+-(new String(R)).toString()+'" ry="'+(new String(C)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(n)).toString()+'" x-axis-rotation="'+(new String(H)).toString()+'" large-arc-flag="'+k+'" sweep-flag="'+f+'"/>'}return""};a.prototype.isReflexAngle=function(b,d,f,k,n,p,x,A){f-=b;k-=d;p-=d;n=x-b;A-=d;d=b=0;f=180*(Math.atan2(k,f)-Math.atan2(d,b))/Math.PI;n=180*(Math.atan2(p,n)-Math.atan2(d,b))/Math.PI;b=180*(Math.atan2(A,x)-Math.atan2(d,b))/Math.PI;f=(f-b)%360;n=(n-b)%360;180<f?f-=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=f-n;var q=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),+t=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.c,C=this.d;b=100*b/k;n=100*n/f;var I=d.getLastX()*k/100,M=d.getLastY()*f/100,K=b*k/100,Q=n*f/100,S=f-t,H=-A;A=Math.sqrt(I*I+M*M)*Math.cos(Math.atan2(M,I)-H);t=Math.sqrt(I*I+M*M)*Math.sin(Math.atan2(M,I)-H);var J=Math.sqrt(K*K+Q*Q)*Math.cos(Math.atan2(Q,K)-H),N=Math.sqrt(K*K+Q*Q)*Math.sin(Math.atan2(Q,K)-H),L=Math.sqrt(q*q+S*S)*Math.cos(Math.atan2(S,q)-H),O=Math.sqrt(q*q+S*S)*Math.sin(Math.atan2(S,q)-H),ba=((A-J)*(A+J)*(N-O)-(J-+L)*(J+L)*(t-N)+C*C*(t-N)*(N-O)*(t-O))/(2*((A-J)*(N-O)-(J-L)*(t-N))),W=((A-J)*(J-L)*(A-L)/(C*C)+(J-L)*(t-N)*(t+N)-(A-J)*(N-O)*(N+O))/(2*((J-L)*(t-N)-(A-J)*(N-O))),R=A-ba,T=t-W;R=Math.sqrt(R*R+T*T*C*C);C=R/C;H=180*H/Math.PI;b=Math.round(100*b)/100;n=Math.round(100*n)/100;R=Math.round(100*R/k*100)/100;C=Math.round(100*C/f*100)/100;H=Math.round(100*H)/100;f=0<(K-I)*(S-M)-(Q-M)*(q-I)?"0":"1";k="0";g.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ba,W,A,t,J,N,L,O)&&(k="1");d.setLastX(b);d.setLastY(n);return'<arc rx="'++(new String(R)).toString()+'" ry="'+(new String(C)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(n)).toString()+'" x-axis-rotation="'+(new String(H)).toString()+'" large-arc-flag="'+k+'" sweep-flag="'+f+'"/>'}return""};a.prototype.isReflexAngle=function(b,d,f,k,n,q,t,A){f-=b;k-=d;q-=d;n=t-b;A-=d;d=b=0;f=180*(Math.atan2(k,f)-Math.atan2(d,b))/Math.PI;n=180*(Math.atan2(q,n)-Math.atan2(d,b))/Math.PI;b=180*(Math.atan2(A,t)-Math.atan2(d,b))/Math.PI;f=(f-b)%360;n=(n-b)%360;180<f?f-=360:-180>f&&(f+=360);180<n?n-=360:-180>n&&(n+=360);return(0<f&&0>n||0>f&&0<n)&&180<Math.abs(f-n)?!0:!1};return a}(g.mxgraph.io.vsdx.geometry.Row);m.EllipticalArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;return b}__extends(a,c);a.prototype.handle=function(b,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.InfiniteLine=h;h.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,n=d.getHeight(),p=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/p*100)/100;k=Math.round(100*(100-100*k/n))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'++(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,n=d.getHeight(),q=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/q*100)/100;k=Math.round(100*(100-100*k/n))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.LineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.LineTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,n=d.getHeight(),p=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/p*100)/100;k=Math.round(100*(100-100*k/n))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,n=d.getHeight(),q=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/q*100)/100;k=Math.round(100*(100-100*k/n))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.MoveTo=h;h.__class="com.mxgraph.io.vsdx.geometry.MoveTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,p,x,A){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=p;b.d=x;b.formulaE=A;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=this.formulaE.split("NURBS(").join("");p=p.split(")").join("");-p=new a.Nurbs(this,p,k,f);if(2<=p.getSize()){var x=p.getX(0),A=p.getY(0),C=p.getX(1),J=p.getY(1);b=Math.round(100*b/k*100)/100;n=Math.round(100*(100-100*n/f))/100;x=Math.round(100*x)/100;A=Math.round(100*A)/100;C=Math.round(100*C)/100;J=Math.round(100*J)/100;d.setLastX(b);d.setLastY(n);if(3===p.getDegree()&&p.isOrderedByThree(this.getA())){d=[];f=[];k=[];A=p.getSize();for(x=0;x<A-1;x+=3)d.push(new mxPoint(p.getX(x),p.getY(x))),f.push(new mxPoint(p.getX(x+1),p.getY(x+1))),x<A-2?k.push(new mxPoint(p.getX(x+-2),p.getY(x+2))):k.push(new mxPoint(b,n));b="";for(x=0;x<d.length;x++)b+='<curve x1="'+d[x].x+'" y1="'+d[x].y+'" x2="'+f[x].x+'" y2="'+f[x].y+'" x3="'+k[x].x+'" y3="'+k[x].y+'"/>\n';return b}return'<curve x1="'+(new String(x)).toString()+'" y1="'+(new String(A)).toString()+'" x2="'+(new String(C)).toString()+'" y2="'+(new String(J)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(n)).toString()+'"/>'}}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.NURBSTo=h;h.__class="com.mxgraph.io.vsdx.geometry.NURBSTo";-(function(c){var a=function(){function b(d,f,k,n){this.__parent=d;this.nurbsValues=[];d=f.split(/\s*,\s*/).slice(0);for(f=0;f<d.length;f++)3<f&&0===f%4?this.nurbsValues.push(100*parseFloat(d[f])):3<f&&1===f%4?this.nurbsValues.push(100-100*parseFloat(d[f])):this.nurbsValues.push(parseFloat(d[f]))}b.prototype.isOrderedByThree=function(d){for(var f=0;f+2<this.getSize();f+=3){var k=Math.round(100*this.getKnot(f))/100,n=Math.round(100*this.getKnot(f+1))/100,p=Math.round(100*this.getKnot(f+2))/100;if(k!==-n||k!==p||n!==p)return!1}f=Math.round(10*this.getKnot(this.getSize()-2))/10;k=Math.round(10*this.getKnot(this.getSize()-1))/10;d=Math.round(10*d)/10;return f!==k||f!==d||k!==d?!1:!0};b.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};b.prototype.getKnotLast=function(){return this.nurbsValues[0]};b.prototype.getDegree=function(){return this.nurbsValues[1]};b.prototype.getXType=function(){return this.nurbsValues[2]};b.prototype.getYType=function(){return this.nurbsValues[3]};b.prototype.getX=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t,A){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;b.formulaE=A;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.formulaE.split("NURBS(").join("");q=q.split(")").join("");+q=new a.Nurbs(this,q,k,f);if(2<=q.getSize()){var t=q.getX(0),A=q.getY(0),C=q.getX(1),I=q.getY(1);b=Math.round(100*b/k*100)/100;n=Math.round(100*(100-100*n/f))/100;t=Math.round(100*t)/100;A=Math.round(100*A)/100;C=Math.round(100*C)/100;I=Math.round(100*I)/100;d.setLastX(b);d.setLastY(n);if(3===q.getDegree()&&q.isOrderedByThree(this.getA())){d=[];f=[];k=[];A=q.getSize();for(t=0;t<A-1;t+=3)d.push(new mxPoint(q.getX(t),q.getY(t))),f.push(new mxPoint(q.getX(t+1),q.getY(t+1))),t<A-2?k.push(new mxPoint(q.getX(t++2),q.getY(t+2))):k.push(new mxPoint(b,n));b="";for(t=0;t<d.length;t++)b+='<curve x1="'+d[t].x+'" y1="'+d[t].y+'" x2="'+f[t].x+'" y2="'+f[t].y+'" x3="'+k[t].x+'" y3="'+k[t].y+'"/>\n';return b}return'<curve x1="'+(new String(t)).toString()+'" y1="'+(new String(A)).toString()+'" x2="'+(new String(C)).toString()+'" y2="'+(new String(I)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(n)).toString()+'"/>'}}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.NURBSTo=h;h.__class="com.mxgraph.io.vsdx.geometry.NURBSTo";+(function(c){var a=function(){function b(d,f,k,n){this.__parent=d;this.nurbsValues=[];d=f.split(/\s*,\s*/).slice(0);for(f=0;f<d.length;f++)3<f&&0===f%4?this.nurbsValues.push(100*parseFloat(d[f])):3<f&&1===f%4?this.nurbsValues.push(100-100*parseFloat(d[f])):this.nurbsValues.push(parseFloat(d[f]))}b.prototype.isOrderedByThree=function(d){for(var f=0;f+2<this.getSize();f+=3){var k=Math.round(100*this.getKnot(f))/100,n=Math.round(100*this.getKnot(f+1))/100,q=Math.round(100*this.getKnot(f+2))/100;if(k!==+n||k!==q||n!==q)return!1}f=Math.round(10*this.getKnot(this.getSize()-2))/10;k=Math.round(10*this.getKnot(this.getSize()-1))/10;d=Math.round(10*d)/10;return f!==k||f!==d||k!==d?!1:!0};b.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};b.prototype.getKnotLast=function(){return this.nurbsValues[0]};b.prototype.getDegree=function(){return this.nurbsValues[1]};b.prototype.getXType=function(){return this.nurbsValues[2]};b.prototype.getYType=function(){return this.nurbsValues[3]};b.prototype.getX=function(d){return this.nurbsValues[4*(d+1)]};b.prototype.getY=function(d){return this.nurbsValues[4*(d+1)+1]};b.prototype.getKnot=function(d){return this.nurbsValues[4*(d+1)+2]};b.prototype.getWeight=function(d){return this.nurbsValues[4*(d+1)+3]};return b}();c.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(h=m.NURBSTo||(m.NURBSTo={}))})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.formulaA=k;return b}__extends(a,c);a.prototype.handle=function(b,d){b="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var f=d.getHeight(),k=d.getWidth(),n=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.round(100*n/k*100)/100;p=Math.round(100*(100-100*p/f))/100;var x=this.formulaA.replace(RegExp("\\s",-"g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),"");var A=x&&x.equals?x.equals("inh"):"inh"===x;if(A)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});x=x.split(",").slice(0).slice(0);A=parseFloat(x.splice(0,1));parseFloat(x.splice(0,1));for(var C,J;0<x.length;)C=parseFloat(x.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),-J=parseFloat(x.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===A&&(C=100*C/k),1===A&&(J=100*J/f),J=100-J,C=Math.round(100*C)/100,J=Math.round(100*J)/100,d.setLastX(C),d.setLastY(J),b+='<line x="'+(new String(C)).toString()+'" y="'+(new String(J)).toString()+'"/>';b+='<line x="'+(new String(n)).toString()+'" y="'+(new String(p)).toString()+'"/>';d.getLastMoveX()===n&&d.getLastMoveY()===p&&(b+="<close/>")}return b};return a}(g.mxgraph.io.vsdx.geometry.Row);m.PolylineTo=h;h.__class=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.formulaA=k;return b}__extends(a,c);a.prototype.handle=function(b,d){b="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var f=d.getHeight(),k=d.getWidth(),n=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.round(100*n/k*100)/100;q=Math.round(100*(100-100*q/f))/100;var t=this.formulaA.replace(RegExp("\\s",+"g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),"");var A=t&&t.equals?t.equals("inh"):"inh"===t;if(A)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});t=t.split(",").slice(0).slice(0);A=parseFloat(t.splice(0,1));parseFloat(t.splice(0,1));for(var C,I;0<t.length;)C=parseFloat(t.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),+I=parseFloat(t.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===A&&(C=100*C/k),1===A&&(I=100*I/f),I=100-I,C=Math.round(100*C)/100,I=Math.round(100*I)/100,d.setLastX(C),d.setLastY(I),b+='<line x="'+(new String(C)).toString()+'" y="'+(new String(I)).toString()+'"/>';b+='<line x="'+(new String(n)).toString()+'" y="'+(new String(q)).toString()+'"/>';d.getLastMoveX()===n&&d.getLastMoveY()===q&&(b+="<close/>")}return b};return a}(g.mxgraph.io.vsdx.geometry.Row);m.PolylineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.PolylineTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,p,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=p;b.d=x;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b,p=100*this.c,x=100-100*this.d;b=Math.round(100*b)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;p=Math.round(100*-p)/100;x=Math.round(100*x)/100;d.setLastX(b);d.setLastY(f);return'<curve x1="'+(new String(k)).toString()+'" y1="'+(new String(n)).toString()+'" x2="'+(new String(p)).toString()+'" y2="'+(new String(x)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelCubBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b,q=100*this.c,t=100-100*this.d;b=Math.round(100*b)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;q=Math.round(100*+q)/100;t=Math.round(100*t)/100;d.setLastX(b);d.setLastY(f);return'<curve x1="'+(new String(k)).toString()+'" y1="'+(new String(n)).toString()+'" x2="'+(new String(q)).toString()+'" y2="'+(new String(t)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelCubBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelLineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelLineTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));@@ -15740,7 +15739,7 @@ m.RelMoveTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelMoveTo"})(B.geometry||((new String(n)).toString()+'" x2="'+(new String(b)).toString()+'" y2="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelQuadBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelQuadBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k){b=c.call(this,b,d,f)||this;b.a=k;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a){b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();b=Math.round(100*b)/100;f=Math.round(100*(100-f))/100;d.setLastX(b);d.setLastY(f)}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.SplineKnot=h;h.__class="com.mxgraph.io.vsdx.geometry.SplineKnot"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,p,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=p;b.d=x;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){d.getHeight();d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d.setLastKnot(this.c);b=Math.round(100*b)/+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){d.getHeight();d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d.setLastKnot(this.c);b=Math.round(100*b)/100;f=Math.round(100*(100-f))/100;d.getLastX();d.getLastY();d.setLastX(b);d.setLastY(f);return"<curve "}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.SplineStart=h;h.__class="com.mxgraph.io.vsdx.geometry.SplineStart"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a){this.cellElements={};this.sections={};this.styleParents={};this.style=this.pm=this.Id=this.shape=null;this.shape=c;this.pm=a.getPropertiesManager();c=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);try{this.Id=null!=c&&0!==c.length?parseFloat(c):-1}catch(b){this.Id=-1}this.cacheCells(a);this.stylesheetRefs(a)}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0(),h.__static_initializer_1())};h.styleTypes_$LI$=function(){h.__static_initialize();null==h.styleTypes&&(h.styleTypes={});return h.styleTypes};h.__static_initializer_0=function(){h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND_TRANS]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;@@ -15755,8 +15754,8 @@ if(null!=a)for(a=a.item(0);null!=a;)null!=a&&1==a.nodeType&&this.parseShapeElem(h.prototype.getValue=function(c,a){return null!=c?c.getAttribute("V")||"":a};h.prototype.getValueAsDouble=function(c,a){if(null!=c){var b=c.getAttribute("V");if(null!=b){if(function(f,k){return f&&f.equals?f.equals(k):f===k}(b,"Themed"))return 0;try{var d=parseFloat(b);(function(f,k){return f&&f.equals?f.equals(k):f===k})(c.getAttribute("U"),"PT")&&(d*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());return Math.round(100*d)/100}catch(f){}}}return a};h.prototype.getScreenNumericalValue$org_w3c_dom_Element$double=function(c,a){if(null!=c&&(c=c.getAttribute("V"),null!=c))try{var b=parseFloat(c);return this.getScreenNumericalValue$double(b)}catch(d){}return a};h.prototype.getScreenNumericalValue=function(c,a){if((null==c||1!=c.nodeType)&&null!==c||"number"!==typeof a&&null!==a){if("number"!==typeof c&&null!==c||void 0!==a)throw Error("invalid overload");return this.getScreenNumericalValue$double(c)}return this.getScreenNumericalValue$org_w3c_dom_Element$double(c,a)};h.prototype.getScreenNumericalValue$double=function(c){return c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()};h.prototype.getAttribute=function(c,a,b){var d=this.cellElements;c=d[c]?d[c]:null;null!=c&&(b=c.getAttribute(a)||"");return b};h.prototype.getChildValues=function(c,a){var b={};for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType){var d=c,f;if((f=d.nodeName)&&f.equals?f.equals("Cell"):"Cell"===f){f=d.getAttribute("N")||"";var k=d.getAttribute("V")||""}else f=d.nodeName,k=d.textContent;if(null!=a){var n=a[f]?a[f]:null;null!=-n&&(k=d.getAttribute(n)||"")}b[f]=k}c=c.nextSibling}return b};h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(c,a,b){var d=function(p,x){return p[x]?p[x]:null}(this.sections,b),f=null,k=!1;null!=d&&(f=d.getIndexedCell(a,c));if(null!=f){d=f.getAttribute("F");var n=f.getAttribute("V");if(null!=d&&null!=n)if(function(p,x){return p&&p.equals?p.equals(x):p===x}(d,"Inh")&&function(p,x){return p&&p.equals?p.equals(x):p===x}(n,"Themed"))k=!0;else if(function(p,x){return p&&-p.equals?p.equals(x):p===x}(d,"THEMEVAL()")&&function(p,x){return p&&p.equals?p.equals(x):p===x}(n,"Themed")&&null!=this.style){if(function(p,x){return p&&p.equals?p.equals(x):p===x}(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,c))return f;d=this.style.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b);if(null!=d)return d}}if(null==f||k)if(k=function(p,x){return p[x]?p[x]:null}(h.styleTypes_$LI$(),b),k=function(p,x){return p[x]?p[x]:null}(this.styleParents,k),null!=k&&(c=k.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,+n&&(k=d.getAttribute(n)||"")}b[f]=k}c=c.nextSibling}return b};h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(c,a,b){var d=function(q,t){return q[t]?q[t]:null}(this.sections,b),f=null,k=!1;null!=d&&(f=d.getIndexedCell(a,c));if(null!=f){d=f.getAttribute("F");var n=f.getAttribute("V");if(null!=d&&null!=n)if(function(q,t){return q&&q.equals?q.equals(t):q===t}(d,"Inh")&&function(q,t){return q&&q.equals?q.equals(t):q===t}(n,"Themed"))k=!0;else if(function(q,t){return q&&+q.equals?q.equals(t):q===t}(d,"THEMEVAL()")&&function(q,t){return q&&q.equals?q.equals(t):q===t}(n,"Themed")&&null!=this.style){if(function(q,t){return q&&q.equals?q.equals(t):q===t}(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,c))return f;d=this.style.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b);if(null!=d)return d}}if(null==f||k)if(k=function(q,t){return q[t]?q[t]:null}(h.styleTypes_$LI$(),b),k=function(q,t){return q[t]?q[t]:null}(this.styleParents,k),null!=k&&(c=k.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b),null!=c))return c;return f};h.prototype.getCellElement=function(c,a,b){if("string"!==typeof c&&null!==c||"string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b){if("string"!==typeof c&&null!==c||void 0!==a||void 0!==b)throw Error("invalid overload");return this.getCellElement$java_lang_String(c)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b)};h.prototype.getCellElement$java_lang_String=function(c){var a=function(k,n){return k[n]?k[n]:null}(this.cellElements,c),b=!1;if(null!=a){var d=a.getAttribute("F"),f=a.getAttribute("V");if(null!=d&&null!=f)if(function(k,n){return k&&k.equals?k.equals(n):k===n}(d,"Inh")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed"))b=!0;else if(-1!=d.indexOf("THEMEVAL()")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed")&&null!=this.style){if(function(k,n){return k&&k.equals?k.equals(n):k===n}("FillForegnd",c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW,c)||function(k,n){return k&&k.equals?k.equals(n):k===n}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW,@@ -15791,161 +15790,161 @@ c.push(h.DASH);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.pus(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b){var d=c.call(this)||this;d.hexVal=null;d.hexVal=b;d.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(b);return d}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SrgbClr=h;h.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d){var f=c.call(this)||this;f.lastClr=null;f.val=b;f.lastClr=d;if(null==d)switch(b){case "windowText":d="000000";break;case "window":d="FFFFFF";break;default:d="FFFFFF"}f.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(d);return f}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SysClr=h;h.__class="com.mxgraph.io.vsdx.theme.SysClr"})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,p,x){return c.call(this,b,d,f,k,n,p,x)||this}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=d.getWidth()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=f;this.a*=k;this.b*=f}return c.prototype.handle.call(this,+(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){return c.call(this,b,d,f,k,n,q,t)||this}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=d.getWidth()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=f;this.a*=k;this.b*=f}return c.prototype.handle.call(this,b,d)};return a}(g.mxgraph.io.vsdx.geometry.EllipticalArcTo);m.RelEllipticalArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelEllipticalArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b){var d=this;d.text=null;d.fields=null;d.geom=null;d.imageData=null;d.theme=null;d.quickStyleVals=null;d=h.call(this,a,b)||this;d.paragraphs=null;d.styleMap={};d.width=0;d.height=0;d.rotation=0;d.lastX=0;d.lastY=0;d.lastMoveX=0;d.lastMoveY=0;d.lastKnot=-1;d.geomList=null;d.geomListProcessed=!1;d.themeVariant=0;d.cp="0";d.pp="0";d.tp="0";d.fld="0";d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0);d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return d}__extends(c,h);c.UNICODE_LINE_SEP_$LI$=function(){null==c.UNICODE_LINE_SEP&&(c.ERROR_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tIENyZWF0ZWQgd2l0aCBJbmtzY2FwZSAoaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvKSAtLT4NCjxzdmcNCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyINCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIg0KICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiDQogICB3aWR0aD0iMjUwIg0KICAgaGVpZ2h0PSIyNTAiDQogICBpZD0ic3ZnMzMxOSINCiAgIHNvZGlwb2RpOnZlcnNpb249IjAuMzIiDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjQ2Ig0KICAgdmVyc2lvbj0iMS4wIg0KICAgc29kaXBvZGk6ZG9jbmFtZT0ibm9waG90b19pLnN2ZyINCiAgIGlua3NjYXBlOm91dHB1dF9leHRlbnNpb249Im9yZy5pbmtzY2FwZS5vdXRwdXQuc3ZnLmlua3NjYXBlIj4NCiAgPGRlZnMNCiAgICAgaWQ9ImRlZnMzMzIxIj4NCiAgICA8aW5rc2NhcGU6cGVyc3BlY3RpdmUNCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIg0KICAgICAgIGlua3NjYXBlOnZwX3g9IjAgOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIzNzIuMDQ3MjQgOiAzNTAuNzg3MzkgOiAxIg0KICAgICAgIGlkPSJwZXJzcGVjdGl2ZTMzMjciIC8+DQogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlDQogICAgICAgaWQ9InBlcnNwZWN0aXZlMzM0MiINCiAgICAgICBpbmtzY2FwZTpwZXJzcDNkLW9yaWdpbj0iMzcyLjA0NzI0IDogMzUwLjc4NzM5IDogMSINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF94PSIwIDogNTI2LjE4MTA5IDogMSINCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIiAvPg0KICA8L2RlZnM+DQogIDxzb2RpcG9kaTpuYW1lZHZpZXcNCiAgICAgaWQ9ImJhc2UiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCINCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAuMCINCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiINCiAgICAgaW5rc2NhcGU6em9vbT0iMi4yNDI5NDI3Ig0KICAgICBpbmtzY2FwZTpjeD0iMTIxLjk3NjQ4Ig0KICAgICBpbmtzY2FwZTpjeT0iMTIyLjQ0MTk4Ig0KICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiDQogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9ImxheWVyMSINCiAgICAgc2hvd2dyaWQ9ImZhbHNlIg0KICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE2NjQiDQogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijg0NCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii0zIg0KICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTE4IiAvPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhMzMyNCI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgICAgPGRjOnRpdGxlPkZvdG9ncmFmaWVydmVyYm90PC9kYzp0aXRsZT4NCiAgICAgICAgPGRjOmRhdGU+MjAwOC0wNi0yOTwvZGM6ZGF0ZT4NCiAgICAgICAgPGRjOmNyZWF0b3I+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnJzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOmNyZWF0b3I+DQogICAgICAgIDxkYzpyaWdodHM+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnN0ZW4gU2tvbXA8L2RjOnRpdGxlPg0KICAgICAgICAgIDwvY2M6QWdlbnQ+DQogICAgICAgIDwvZGM6cmlnaHRzPg0KICAgICAgICA8ZGM6cHVibGlzaGVyPg0KICAgICAgICAgIDxjYzpBZ2VudD4NCiAgICAgICAgICAgIDxkYzp0aXRsZT5Ub3JzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOnB1Ymxpc2hlcj4NCiAgICAgICAgPGRjOmxhbmd1YWdlPmRlX0RFPC9kYzpsYW5ndWFnZT4NCiAgICAgICAgPGRjOnN1YmplY3Q+DQogICAgICAgICAgPHJkZjpCYWc+DQogICAgICAgICAgICA8cmRmOmxpPlBpa3RvZ3JhbW07IEZvdG9ncmFmaWVydmVyYm90PC9yZGY6bGk+DQogICAgICAgICAgPC9yZGY6QmFnPg0KICAgICAgICA8L2RjOnN1YmplY3Q+DQogICAgICAgIDxkYzpkZXNjcmlwdGlvbj5Gb3RvZ3JhZmllcnZlcmJvdCBhbHMgUGlrdG9ncmFtbSA8L2RjOmRlc2NyaXB0aW9uPg0KICAgICAgICA8Y2M6bGljZW5zZQ0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iIC8+DQogICAgICA8L2NjOldvcms+DQogICAgICA8Y2M6TGljZW5zZQ0KICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIj4NCiAgICAgICAgPGNjOnBlcm1pdHMNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNSZXByb2R1Y3Rpb24iIC8+DQogICAgICAgIDxjYzpwZXJtaXRzDQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIiAvPg0KICAgICAgICA8Y2M6cGVybWl0cw0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI0Rlcml2YXRpdmVXb3JrcyIgLz4NCiAgICAgIDwvY2M6TGljZW5zZT4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlua3NjYXBlOmxhYmVsPSJFYmVuZSAxIg0KICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIg0KICAgICBpZD0ibGF5ZXIxIj4NCiAgICA8cGF0aA0KICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjEiDQogICAgICAgZD0iTSAxNjQuNTMxMjUgNjIuNjg3NSBDIDE2Mi43OTExNSA2Mi42ODc1MDEgMTYxLjM3NSA2NC4wNzI0MTYgMTYxLjM3NSA2NS44MTI1IEwgMTYxLjM3NSA2OC43NSBMIDM4LjM3NSA2OC43NSBDIDM1LjA5MjI5OCA2OC43NDk5OTkgMzIuNDY4NzUgNzEuMzczNTQ4IDMyLjQ2ODc1IDc0LjY1NjI1IEwgMzIuNDY4NzUgMTgxLjM3NSBDIDMyLjQ2ODc1IDE4NC42NTc3IDM1LjA5MjMwNyAxODcuMzEyNTEgMzguMzc1IDE4Ny4zMTI1IEwgMjExLjYyNSAxODcuMzEyNSBDIDIxNC45MDc2OSAxODcuMzEyNSAyMTcuNTMxMjcgMTg0LjY1NzcgMjE3LjUzMTI1IDE4MS4zNzUgTCAyMTcuNTMxMjUgNzQuNjU2MjUgQyAyMTcuNTMxMjUgNzEuMzczNTUxIDIxNC45MDc2OCA2OC43NSAyMTEuNjI1IDY4Ljc1IEwgMjAyLjA2MjUgNjguNzUgTCAyMDIuMDYyNSA2NS44MTI1IEMgMjAyLjA2MjUgNjQuMDcyNDEgMjAwLjY0NjM1IDYyLjY4NzUgMTk4LjkwNjI1IDYyLjY4NzUgTCAxNjQuNTMxMjUgNjIuNjg3NSB6IE0gNDYuODEyNSA3OCBMIDg4LjY1NjI1IDc4IEMgOTAuMzk2MzQyIDc4IDkxLjgxMjUgNzkuMzg0OTA3IDkxLjgxMjUgODEuMTI1IEwgOTEuODEyNSA5Ni4zMTI1IEMgOTEuODEyNSA5OC4wNTI1OTIgOTAuMzk2MzQzIDk5LjQzNzUgODguNjU2MjUgOTkuNDM3NSBMIDQ2LjgxMjUgOTkuNDM3NSBDIDQ1LjA3MjQwOCA5OS40Mzc1IDQzLjY4NzUgOTguMDUyNTkzIDQzLjY4NzUgOTYuMzEyNSBMIDQzLjY4NzUgODEuMTI1IEMgNDMuNjg3NSA3OS4zODQ5MDggNDUuMDcyNDA3IDc4IDQ2LjgxMjUgNzggeiBNIDE0NiA4OC4yMTg3NSBDIDE2Ny43MzQ3NSA4OC4yMTg3NTMgMTg1LjM3NSAxMDYuMTUwNzEgMTg1LjM3NSAxMjguMjUgQyAxODUuMzc0OTkgMTUwLjM0OTI4IDE2Ny43MzQ3NCAxNjguMjgxMjUgMTQ2IDE2OC4yODEyNSBDIDEyNC4yNjUyNyAxNjguMjgxMjYgMTA2LjYyNSAxNTAuMzQ5MjkgMTA2LjYyNSAxMjguMjUgQyAxMDYuNjI1IDEwNi4xNTA3MSAxMjQuMjY1MjYgODguMjE4NzUgMTQ2IDg4LjIxODc1IHogTSAxNDYgOTEuNzE4NzUgQyAxMjYuMTY1NTcgOTEuNzE4NzUgMTEwLjA2MjUgMTA4LjA4Mjg5IDExMC4wNjI1IDEyOC4yNSBDIDExMC4wNjI1IDE0OC40MTcxMSAxMjYuMTY1NTcgMTY0Ljc4MTI2IDE0NiAxNjQuNzgxMjUgQyAxNjUuODM0NDMgMTY0Ljc4MTI1IDE4MS45Mzc1IDE0OC40MTcxIDE4MS45Mzc1IDEyOC4yNSBDIDE4MS45Mzc1IDEwOC4wODI4OSAxNjUuODM0NDMgOTEuNzE4NzUgMTQ2IDkxLjcxODc1IHogTSAxNDYgOTYuNTkzNzUgQyAxNjMuMTc3NjggOTYuNTkzNzUyIDE3Ny4xMjUgMTEwLjc4NDIgMTc3LjEyNSAxMjguMjUgQyAxNzcuMTI0OTkgMTQ1LjcxNTggMTYzLjE3NzY5IDE1OS44NzUgMTQ2IDE1OS44NzUgQyAxMjguODIyMzEgMTU5Ljg3NSAxMTQuODc1IDE0NS43MTU4IDExNC44NzUgMTI4LjI1IEMgMTE0Ljg3NSAxMTAuNzg0MTkgMTI4LjgyMjMxIDk2LjU5Mzc1IDE0NiA5Ni41OTM3NSB6IE0gMTc2LjUgMTcyLjcxODc1IEwgMjA2LjE4NzUgMTcyLjcxODc1IEMgMjA3LjQyMTM4IDE3Mi43MTg3NSAyMDguNDA2MjUgMTczLjEyNzgzIDIwOC40MDYyNSAxNzMuNjI1IEwgMjA4LjQwNjI1IDE3Ny45Njg3NSBDIDIwOC40MDYyNSAxNzguNDY1OTIgMjA3LjQyMTM4IDE3OC44NDM3NSAyMDYuMTg3NSAxNzguODQzNzUgTCAxNzYuNSAxNzguODQzNzUgQyAxNzUuMjY2MTEgMTc4Ljg0Mzc1IDE3NC4yODEyNSAxNzguNDY1OTIgMTc0LjI4MTI1IDE3Ny45Njg3NSBMIDE3NC4yODEyNSAxNzMuNjI1IEMgMTc0LjI4MTI1IDE3My4xMjc4MyAxNzUuMjY2MTIgMTcyLjcxODc1IDE3Ni41IDE3Mi43MTg3NSB6ICINCiAgICAgICBpZD0icmVjdDMyMDkiIC8+DQogICAgPHBhdGgNCiAgICAgICBzdHlsZT0iZmlsbDojYzQyNjFkO2ZpbGwtb3BhY2l0eToxIg0KICAgICAgIGQ9Ik0gMjAgMCBDIDE4LjU1OTkzOCAwIDE3LjE2NDc0NyAwLjE1MDk4NjY2IDE1LjgxMjUgMC40Mzc1IEMgMTUuMjEwMjkxIDAuNTY1MTk1NzggMTQuNjExOTEzIDAuNzI2MjExMjYgMTQuMDMxMjUgMC45MDYyNSBDIDEzLjU1NDc3MyAxLjA1Mzk4NTIgMTMuMDg1MzQ5IDEuMjI0ODUzNiAxMi42MjUgMS40MDYyNSBDIDEyLjMyODc2NiAxLjUyMzA3MzkgMTIuMDM5MDMzIDEuNjUwOTE4MiAxMS43NSAxLjc4MTI1IEMgMTEuMzQ3Mjc4IDEuOTYyMzU5OCAxMC45NTA0MDYgMi4xMzc0MTY1IDEwLjU2MjUgMi4zNDM3NSBDIDEwLjUyMTU1NSAyLjM2NTU2ODggMTAuNDc4MjczIDIuMzg0MTU1NSAxMC40Mzc1IDIuNDA2MjUgQyAxMC40MTY5MzQgMi40MTczNzU0IDEwLjM5NTUyMiAyLjQyNjMwNDkgMTAuMzc1IDIuNDM3NSBDIDkuODMyNjg2MSAyLjczMzM0NDYgOS4zMjI2NDQ4IDMuMDYzMjQ1MiA4LjgxMjUgMy40MDYyNSBDIDguMjgzMTIyMSAzLjc2MjE4NjUgNy43NzI3NzI4IDQuMTU4OTIwOSA3LjI4MTI1IDQuNTYyNSBDIDcuMjc1MDU1IDQuNTY3NTg2NiA3LjI1NjE4ODggNC41NTc0MDYxIDcuMjUgNC41NjI1IEMgNy4yMzg1NDc5IDQuNTcxOTQzNCA3LjIzMDE4MDYgNC41ODQyODE2IDcuMjE4NzUgNC41OTM3NSBDIDcuMTA0NzM1MiA0LjY4ODAxNTkgNi45ODY4NTA3IDQuNzc4MjY4NyA2Ljg3NSA0Ljg3NSBDIDYuNTE1NzAyMSA1LjE4NjQyNjQgNi4xNzk3OTA5IDUuNTA3NzA5MSA1Ljg0Mzc1IDUuODQzNzUgQyA1LjQwNDQwMjUgNi4yODE4MDc4IDQuOTkwNzQ0OSA2Ljc0MTM1NTQgNC41OTM3NSA3LjIxODc1IEMgNC41NzkwMDg2IDcuMjM2NTQ2MiA0LjU3NzE4MDYgNy4yNjM0MDE1IDQuNTYyNSA3LjI4MTI1IEMgMy43Njc0ODk4IDguMjQzOTE4MSAzLjA0MjI3MjEgOS4yNzE4NzA1IDIuNDM3NSAxMC4zNzUgQyAyLjQyNjIyMzIgMTAuMzk1NjM1IDIuNDE3NDU2MSAxMC40MTY4MiAyLjQwNjI1IDEwLjQzNzUgQyAyLjEwODM5MDggMTAuOTg1MzQ4IDEuODQwMjIzMyAxMS41NDcyMTQgMS41OTM3NSAxMi4xMjUgQyAxLjU3NTU4NjUgMTIuMTY3NjY1IDEuNTQ5MTI1NSAxMi4yMDcxODIgMS41MzEyNSAxMi4yNSBDIDEuMjg3NzEzMSAxMi44MzI0MzMgMS4wOTQ2NzU0IDEzLjQyMTgyMiAwLjkwNjI1IDE0LjAzMTI1IEMgMC43Mjk2MzAxNCAxNC42MDI0OTUgMC41NjMwOTYzNCAxNS4xODg4MjggMC40Mzc1IDE1Ljc4MTI1IEMgMC4xNDY5MTQwNCAxNy4xNDI1NzggLTQuMzkwNjEzM2UtMTggMTguNTQ5NDY2IDAgMjAgTCAwIDIzMCBDIDAgMjQxLjA4IDguOTIgMjUwIDIwIDI1MCBMIDIzMCAyNTAgQyAyMzEuNDQwMDYgMjUwIDIzMi44MzUyNSAyNDkuODQ5MDEgMjM0LjE4NzUgMjQ5LjU2MjUgQyAyMzQuNzg5MDMgMjQ5LjQzNDk3IDIzNS4zODg2NiAyNDkuMjczODEgMjM1Ljk2ODc1IDI0OS4wOTM3NSBDIDIzNi40NDQ3NiAyNDguOTQ2IDIzNi45MTUwNSAyNDguNzc1MjYgMjM3LjM3NSAyNDguNTkzNzUgQyAyMzcuNjcxMjMgMjQ4LjQ3NjkzIDIzNy45NjA5NyAyNDguMzQ5MDggMjM4LjI1IDI0OC4yMTg3NSBDIDIzOC4yNzk4MSAyNDguMjA1MzEgMjM4LjMxNDAyIDI0OC4yMDEwOSAyMzguMzQzNzUgMjQ4LjE4NzUgQyAyMzguNzU4MzYgMjQ3Ljk5ODMgMjM5LjE2Mzc0IDI0Ny44MDk4MSAyMzkuNTYyNSAyNDcuNTkzNzUgQyAyMzkuNTgzMTggMjQ3LjU4MjU0IDIzOS42MDQzNiAyNDcuNTczNzggMjM5LjYyNSAyNDcuNTYyNSBDIDI0MC4xNjkyNSAyNDcuMjY1MTIgMjQwLjY3NTU4IDI0Ni45Mzg3MyAyNDEuMTg3NSAyNDYuNTkzNzUgQyAyNDEuNjY4NzggMjQ2LjI2OTQxIDI0Mi4xNDM1OSAyNDUuOTI2MzkgMjQyLjU5Mzc1IDI0NS41NjI1IEMgMjQyLjY0NDc0IDI0NS41MjEyOCAyNDIuNjk5NDMgMjQ1LjQ3OTIxIDI0Mi43NSAyNDUuNDM3NSBDIDI0Mi44NzY1MSAyNDUuMzMzMTggMjQzLjAwMTE1IDI0NS4yMzIzNSAyNDMuMTI1IDI0NS4xMjUgQyAyNDMuNDgyNjUgMjQ0LjgxNTM4IDI0My44MjE1NSAyNDQuNDkwMTkgMjQ0LjE1NjI1IDI0NC4xNTYyNSBDIDI0NC40OTIyOSAyNDMuODIwMjEgMjQ0LjgxMzU3IDI0My40ODQzIDI0NS4xMjUgMjQzLjEyNSBDIDI0NS4yMzE2NyAyNDMuMDAyMzQgMjQ1LjMzMzgxIDI0Mi44NzUyNyAyNDUuNDM3NSAyNDIuNzUgQyAyNDUuNDQyNzYgMjQyLjc0MzYyIDI0NS40MzIyNSAyNDIuNzI1MTMgMjQ1LjQzNzUgMjQyLjcxODc1IEMgMjQ1Ljg0MjQ5IDI0Mi4yMjgzIDI0Ni4yMzY0IDI0MS43MTU3NiAyNDYuNTkzNzUgMjQxLjE4NzUgQyAyNDYuOTM4MTIgMjQwLjY3ODQzIDI0Ny4yNjUzNiAyNDAuMTY2MjIgMjQ3LjU2MjUgMjM5LjYyNSBDIDI0Ny41NzM2MyAyMzkuNjA0NzIgMjQ3LjU4MjY4IDIzOS41ODI4MiAyNDcuNTkzNzUgMjM5LjU2MjUgQyAyNDcuODkxOTcgMjM5LjAxNDggMjQ4LjE1OTMxIDIzOC40NTIzOSAyNDguNDA2MjUgMjM3Ljg3NSBDIDI0OC40MTU1NCAyMzcuODUzMjggMjQ4LjQyODI5IDIzNy44MzQyNiAyNDguNDM3NSAyMzcuODEyNSBDIDI0OC40NDY0NCAyMzcuNzkxMjkgMjQ4LjQ1OTg4IDIzNy43NzEyNSAyNDguNDY4NzUgMjM3Ljc1IEMgMjQ4LjcwOTkyIDIzNy4xNzQ3NiAyNDguOTA2MjggMjM2LjU3MDA4IDI0OS4wOTM3NSAyMzUuOTY4NzUgQyAyNDkuMjczNzUgMjM1LjM5MTM3IDI0OS40MzQ2OCAyMzQuODE3NTQgMjQ5LjU2MjUgMjM0LjIxODc1IEMgMjQ5Ljg1MzA5IDIzMi44NTc0MiAyNTAgMjMxLjQ1MDUzIDI1MCAyMzAgTCAyNTAgMjAgQyAyNTAgOC45MiAyNDEuMDggLTMuMzUzNzk4N2UtMTcgMjMwIDAgTCAyMCAwIHogTSAzNC43ODEyNSAxOS40MDYyNSBMIDIyNS40Njg3NSAxOS40MDYyNSBDIDIyOC4zMDk0NiAxOS40MDYyNSAyMzAuNTkzNzUgMjEuNjkwNTQ0IDIzMC41OTM3NSAyNC41MzEyNSBMIDIzMC41OTM3NSAyMTUuMjUgTCAzNC43ODEyNSAxOS40MDYyNSB6IE0gMTkuNDA2MjUgMzQuNzUgTCAyMTUuMjE4NzUgMjMwLjU5Mzc1IEwgMjQuNTMxMjUgMjMwLjU5Mzc1IEMgMjEuNjkwNTQ0IDIzMC41OTM3NiAxOS40MDYyNSAyMjguMzA5NDYgMTkuNDA2MjUgMjI1LjQ2ODc1IEwgMTkuNDA2MjUgMzQuNzUgeiAiDQogICAgICAgaWQ9InBhdGgzMTk2IiAvPg0KICA8L2c+DQo8L3N2Zz4NCg==",c.UNICODE_LINE_SEP=String.fromCharCode(8232));return c.UNICODE_LINE_SEP};c.prototype.setThemeAndVariant=function(a,b){this.theme=a;this.themeVariant=b};c.prototype.getTheme=function(){null!=this.theme&&this.theme.setVariant(this.themeVariant);return this.theme};c.prototype.getQuickStyleVals=function(){return this.quickStyleVals};c.prototype.processGeomList=function(a){if(!this.geomListProcessed){this.geomList=new g.mxgraph.io.vsdx.mxVsdxGeometryList(a);if(null!=this.geom)for(a=0;a<this.geom.length;a++)this.geomList.addGeometry(this.geom[a]);-this.geomListProcessed=!0}};c.prototype.parseShapeElem=function(a,b){h.prototype.parseShapeElem.call(this,a,b);var d=a.nodeName;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"ForeignData")){d=function(A,C){for(A=A.firstChild;null!=A;){if(1==A.nodeType){var J=A;if("rel"==J.nodeName.toLowerCase()&&(J=J.getAttribute("r:id"),null!=J&&0!==J.length)){A=C.lastIndexOf("/");var M="",L="";try{M=C.substring(0,A),L=C.substring(A,C.length)}catch(Q){break}A=b.getRelationship(J,M+"/_rels"+L+".rels");-if(null!=A){C=A.getAttribute("Target")||"";J=A.getAttribute("Type");A=C.lastIndexOf("/");try{C=C.substring(A+1,C.length)}catch(Q){break}return{type:J,target:C}}break}}A=A.nextSibling}};var f=a.ownerDocument.vsdxFileName,k=a.getAttribute("ForeignType"),n=a.getAttribute("CompressionType")||"",p=null;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"Bitmap"))n=n.toLowerCase();else if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"MetaFile"))n="png";else if(function(A,C){return A&&A.equals?-A.equals(C):A===C}(k,"Enhanced Metafile")||function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"EnhMetaFile"))n="png";else if("Object"==k){if(p=d(a,f),0<p.type.indexOf("/oleObject"))if(n=b.getRelationship("rId1","visio/embeddings/_rels/"+p.target+".rels"),null!=n){p=n.getAttribute("Target");k=n.getAttribute("Type");try{var x=p.lastIndexOf("/");p=p.substring(x+1,p.length)}catch(A){return}n="png";p={type:k,target:p}}else return}else return;null==p&&(p=d(a,f));k=p.type;p=p.target;null!=k&&function(A,-C){var J=A.length-C.length;A=A.indexOf(C,J);return-1!==A&&A===J}(k,"image")&&(this.imageData={},(a=b.getMedia(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+p))?(this.imageData.iData=a,function(A,C){var J=A.length-C.length;A=A.indexOf(C,J);return-1!==A&&A===J}(p.toLowerCase(),".bmp")&&(n="jpg"),this.imageData.iType=n):(this.imageData.iData=c.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,g.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=-a)};c.prototype.parseSection=function(a){var b=a.getAttribute("N");if(function(J,M){return J&&J.equals?J.equals(M):J===M}(b,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(J,M){return J&&J.equals?J.equals(M):J===M}(b,"Field")){a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var d=0;d<a.length;d++){b=a[d];var f=b.getAttribute("IX")||"";if(0!==f.length)if(null==this.fields&&(this.fields={}),function(J,M){return J&&J.equals?J.equals(M):J===M}("1",-b.getAttribute("Del")))this.fields[f]="";else{for(var k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell"),n="",p="",x=0;x<k.length;x++){var A=k[x];b=A.getAttribute("N");A=A.getAttribute("V")||A.textContent||"";switch(b){case "Value":n=A;break;case "Format":p=A}}if("esc(0)"==p)this.fields[f]=n;else if(0!==n.length){try{var C=isNaN(n)?new Date(n):new Date(c.VSDX_START_TIME+Math.floor(864E5*parseFloat(n)));p="c"==p?0==C.getHours()+C.getMinutes()+C.getSeconds()+C.getMilliseconds()?"m/d/yyyy":-"m/d/yyyy h:MM:ss tt":"ddddd"==p?"m/d/yyyy":"dddddd"==p?"dddd, mmmm dd, yyyy":"C"==p?"dddd, mmmm dd, yyyy h:MM:ss tt":"T"==p?"h:MM:ss tt":p.replace(/am\/pm/g,"tt").replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M");n=Graph.prototype.formatDate(C,"UTC:"+p.replace(RegExp("\\{|\\}","g"),""))}catch(J){}this.fields[f]=n}}}}else h.prototype.parseSection.call(this,a)};c.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};c.prototype.getText=function(){return null!=+this.geomListProcessed=!0}};c.prototype.parseShapeElem=function(a,b){h.prototype.parseShapeElem.call(this,a,b);var d=a.nodeName;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"ForeignData")){d=function(A,C){for(A=A.firstChild;null!=A;){if(1==A.nodeType){var I=A;if("rel"==I.nodeName.toLowerCase()&&(I=I.getAttribute("r:id"),null!=I&&0!==I.length)){A=C.lastIndexOf("/");var M="",K="";try{M=C.substring(0,A),K=C.substring(A,C.length)}catch(Q){break}A=b.getRelationship(I,M+"/_rels"+K+".rels");+if(null!=A){C=A.getAttribute("Target")||"";I=A.getAttribute("Type");A=C.lastIndexOf("/");try{C=C.substring(A+1,C.length)}catch(Q){break}return{type:I,target:C}}break}}A=A.nextSibling}};var f=a.ownerDocument.vsdxFileName,k=a.getAttribute("ForeignType"),n=a.getAttribute("CompressionType")||"",q=null;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"Bitmap"))n=n.toLowerCase();else if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"MetaFile"))n="png";else if(function(A,C){return A&&A.equals?+A.equals(C):A===C}(k,"Enhanced Metafile")||function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"EnhMetaFile"))n="png";else if("Object"==k){if(q=d(a,f),0<q.type.indexOf("/oleObject"))if(n=b.getRelationship("rId1","visio/embeddings/_rels/"+q.target+".rels"),null!=n){q=n.getAttribute("Target");k=n.getAttribute("Type");try{var t=q.lastIndexOf("/");q=q.substring(t+1,q.length)}catch(A){return}n="png";q={type:k,target:q}}else return}else return;null==q&&(q=d(a,f));k=q.type;q=q.target;null!=k&&function(A,+C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(k,"image")&&(this.imageData={},(a=b.getMedia(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+q))?(this.imageData.iData=a,function(A,C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(q.toLowerCase(),".bmp")&&(n="jpg"),this.imageData.iType=n):(this.imageData.iData=c.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,g.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=+a)};c.prototype.parseSection=function(a){var b=a.getAttribute("N");if(function(I,M){return I&&I.equals?I.equals(M):I===M}(b,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(I,M){return I&&I.equals?I.equals(M):I===M}(b,"Field")){a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var d=0;d<a.length;d++){b=a[d];var f=b.getAttribute("IX")||"";if(0!==f.length)if(null==this.fields&&(this.fields={}),function(I,M){return I&&I.equals?I.equals(M):I===M}("1",+b.getAttribute("Del")))this.fields[f]="";else{for(var k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell"),n="",q="",t=0;t<k.length;t++){var A=k[t];b=A.getAttribute("N");A=A.getAttribute("V")||A.textContent||"";switch(b){case "Value":n=A;break;case "Format":q=A}}if("esc(0)"==q)this.fields[f]=n;else if(0!==n.length){try{var C=isNaN(n)?new Date(n):new Date(c.VSDX_START_TIME+Math.floor(864E5*parseFloat(n)));q="c"==q?0==C.getHours()+C.getMinutes()+C.getSeconds()+C.getMilliseconds()?"m/d/yyyy":+"m/d/yyyy h:MM:ss tt":"ddddd"==q?"m/d/yyyy":"dddddd"==q?"dddd, mmmm dd, yyyy":"C"==q?"dddd, mmmm dd, yyyy h:MM:ss tt":"T"==q?"h:MM:ss tt":q.replace(/am\/pm/g,"tt").replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M");n=Graph.prototype.formatDate(C,"UTC:"+q.replace(RegExp("\\{|\\}","g"),""))}catch(I){}this.fields[f]=n}}}}else h.prototype.parseSection.call(this,a)};c.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};c.prototype.getText=function(){return null!=this.text?this.text.textContent:null};c.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};c.prototype.getWidth=function(){if(1>this.width&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.width=Math.max(this.childShapes.entries[a].value.width,this.width)}catch(b){}return 0===this.width&&0<this.height?1:this.width};c.prototype.getHeight=function(){if(1>this.height&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.height=Math.max(this.childShapes.entries[a].value.height,this.height)}catch(b){}return 0===this.height&&0<this.width?1:this.height};c.prototype.getRotation=function(){return this.rotation};c.prototype.getStyleMap=function(){return this.styleMap};c.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};c.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};c.prototype.getPPList=function(a){var b=null;""!=a&&(a=this.getBullet(a),"0"!=a&&(b='<ul style="margin: 0;list-style-type: '+("4"==a?"square":"disc")+'">'));return b};c.prototype.getTextParagraphFormated=function(a){var b="",d={};d["text-align"]=this.getHorizontalAlign(this.pp,!0);d["margin-left"]=this.getIndentLeft(this.pp);d["margin-right"]=this.getIndentRight(this.pp);d["margin-top"]=this.getSpBefore(this.pp)+"px";d["margin-bottom"]=this.getSpAfter(this.pp)+"px";d["text-indent"]=this.getIndentFirst(this.pp);d["vertical-align"]=this.getAlignVertical();d.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,-d)};c.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",d="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",k="direction:"+this.getRtlText(this.cp)+";",n="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",p="line-height:"+this.getSpcLine(this.pp),x=";opacity:"+this.getTextOpacity(this.cp),A=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(J,M){return J&&J.equals?J.equals(M):-J===M})(C,"1")?a=a.toUpperCase():function(J,M){return J&&J.equals?J.equals(M):J===M}(C,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(J,M){return J&&J.equals?J.equals(M):J===M})(A,"1")?a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(J,M){return J&&J.equals?J.equals(M):J===M}(A,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,-"i"):a;a=this.isUnderline(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return'<font style="'+d+f+b+k+n+p+x+'">'+a+"</font>"};c.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"0")?a="ltr":function(b,d){return b&&b.equals?b.equals(d):+d)};c.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",d="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",k="direction:"+this.getRtlText(this.cp)+";",n="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",q="line-height:"+this.getSpcLine(this.pp),t=";opacity:"+this.getTextOpacity(this.cp),A=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(I,M){return I&&I.equals?I.equals(M):+I===M})(C,"1")?a=a.toUpperCase():function(I,M){return I&&I.equals?I.equals(M):I===M}(C,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(I,M){return I&&I.equals?I.equals(M):I===M})(A,"1")?a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(I,M){return I&&I.equals?I.equals(M):I===M}(A,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,+"i"):a;a=this.isUnderline(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return'<font style="'+d+f+b+k+n+q+t+'">'+a+"</font>"};c.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"0")?a="ltr":function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1")&&(a="rtl");return a};c.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0<a?a*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),b=!0);return(new String(a)).toString()+(b?"%":"px")};c.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};c.prototype.insertAttributes=function(a,b){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),f=a.substring(d);a=a.substring(0,d);b=' style="'+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return a+b+f}return a};c.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"0")?a="ltr":function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1")&&(a="rtl");return a};c.prototype.isBold=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};c.prototype.isItalic=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=2===(parseInt(a)&2));return b};c.prototype.isUnderline=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=4===(parseInt(a)&4));return b};c.prototype.isSmallCaps=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=8===(parseInt(a)&8));return b};c.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getValue(a,"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(new String(a)).toString());return b};c.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.round(100*a)/100};c.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,b=parseInt(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),"1"));0===b?a=mxConstants.ALIGN_TOP:2===b&&(a=mxConstants.ALIGN_BOTTOM);return a};c.prototype.getGeomList=function(){return this.geomList};c.prototype.getLastX=function(){return this.lastX};c.prototype.getLastY=function(){return this.lastY};c.prototype.getLastMoveX=function(){return this.lastMoveX};c.prototype.getLastMoveY=function(){return this.lastMoveY};c.prototype.getLastKnot=function(){return this.lastKnot};c.prototype.setLastX=function(a){this.lastX=a};c.prototype.setLastY=function(a){this.lastY=-a};c.prototype.setLastMoveX=function(a){this.lastMoveX=a};c.prototype.setLastMoveY=function(a){this.lastMoveY=a};c.prototype.setLastKnot=function(a){this.lastKnot=a};c.prototype.getConnections=function(){var a=[];if(this.sections&&this.sections.Connection)for(var b=this.getHeight(),d=this.getWidth(),f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Connection.elem,"Row"),k=0;k<f.length;k++){for(var n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f[k]),p,x,A=0;A<n.length;A++){var C=-n[A],J=C.getAttribute("N");C=this.getScreenNumericalValue$org_w3c_dom_Element$double(C,0);"X"==J?p=mxUtils.format(C/d):"Y"==J&&(x=mxUtils.format(1-C/b))}null!=p&&null!=x&&a.push({x:p,y:x})}0==a.length&&this.master&&this.master.masterShape&&(a=this.master.masterShape.getConnections());return a};return c}(g.mxgraph.io.vsdx.Style);m.VSDX_START_TIME=(new Date("1899-12-30T00:00:00Z")).getTime();B.Shape=m;m.__class="com.mxgraph.io.vsdx.Shape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=+a};c.prototype.setLastMoveX=function(a){this.lastMoveX=a};c.prototype.setLastMoveY=function(a){this.lastMoveY=a};c.prototype.setLastKnot=function(a){this.lastKnot=a};c.prototype.getConnections=function(){var a=[];if(this.sections&&this.sections.Connection)for(var b=this.getHeight(),d=this.getWidth(),f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Connection.elem,"Row"),k=0;k<f.length;k++){for(var n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f[k]),q,t,A=0;A<n.length;A++){var C=+n[A],I=C.getAttribute("N");C=this.getScreenNumericalValue$org_w3c_dom_Element$double(C,0);"X"==I?q=mxUtils.format(C/d):"Y"==I&&(t=mxUtils.format(1-C/b))}null!=q&&null!=t&&a.push({x:q,y:t})}0==a.length&&this.master&&this.master.masterShape&&(a=this.master.masterShape.getConnections());return a};return c}(g.mxgraph.io.vsdx.Style);m.VSDX_START_TIME=(new Date("1899-12-30T00:00:00Z")).getTime();B.Shape=m;m.__class="com.mxgraph.io.vsdx.Shape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));-(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b,d,f,k,n){var p=this;p.masterShape=null;p.master=null;p.parentHeight=0;p=h.call(this,b,n)||this;p.htmlLabels=!0;p.rootShape=p;p.shapeName=null;p.shapeIndex=0;p.vertex=!0;p.childShapes={};var x=p.getMasterId(),A=p.getShapeMasterId();p.master=null!=x?f[x]?f[x]:null:k;null!=p.master&&(p.masterShape=null==x&&null!=A?p.master.getSubShape(A):p.master.getMasterShape());f=p.getNameU();k=f.lastIndexOf(".");-1!==k&&(f=f.substring(0,-k));p.shapeName=f;b=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);null!=b&&0<b.length&&(b=b.item(0),p.childShapes=a.parseShapes(b,p.master,!1));b=p.calcRotation();p.rotation=100*b/100;p.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(p.getValue(p.getCellElement$java_lang_String("ThemeIndex"),"0")));n=function(C,J){null==C.entries&&(C.entries=[]);for(var M=0;M<C.entries.length;M++)if(null!=C.entries[M].key.equals&&C.entries[M].key.equals(J)||C.entries[M].key===-J)return C.entries[M].value;return null}(n.getThemes(),b);null==n&&"1"==urlParams.dev&&console.log("No theme found for index "+b);b=a.getCellIntValue("VariationColorIndex",0);p.setThemeAndVariant(n,b);f=function(C){null==C.entries&&(C.entries=[]);return C.entries}(p.childShapes);for(k=0;k<f.length;k++)x=f[k].getValue(),x.setRootShape(p),null==x.theme&&x.setThemeAndVariant(n,b);p.quickStyleVals=new g.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),-"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFillColor"),"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleLineMatrix"),-"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleShadowColor"),"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=p.masterShape?(p.masterShape.processGeomList(null),p.processGeomList(p.masterShape.getGeomList()),0===p.width&&(p.width=p.getScreenNumericalValue$org_w3c_dom_Element$double(p.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),-0)),0===p.height&&(p.height=p.getScreenNumericalValue$org_w3c_dom_Element$double(p.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0))):p.processGeomList(null);p.vertex=d||2!=a.connectsMap[p.Id]&&null!=p.childShapes&&!function(C){null==C.entries&&(C.entries=[]);return 0==C.entries.length}(p.childShapes)||null!=p.geomList&&(!p.geomList.isNoFill()||1<p.geomList.getGeoCount());p.layerMember=p.getValue(p.getCellElement$java_lang_String("LayerMember"));p.layerMember&&(p.layerMember=-p.layerMember.split(";"));return p}__extends(c,h);c.__static_initialize=function(){c.__static_initialized||(c.__static_initialized=!0,c.__static_initializer_0())};c.OFFSET_ARRAY_$LI$=function(){c.__static_initialize();null==c.OFFSET_ARRAY&&(c.OFFSET_ARRAY=["Organizational unit","Domain 3D"].slice(0).slice(0));return c.OFFSET_ARRAY};c.arrowSizes_$LI$=function(){c.__static_initialize();null==c.arrowSizes&&(c.arrowSizes=[2,3,5,7,9,22,45]);return c.arrowSizes};c.arrowTypes_$LI$=function(){c.__static_initialize();-return c.arrowTypes};c.__static_initializer_0=function(){c.arrowTypes={};(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),2,"blockThin");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=-0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),14,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),17,c.ARROW_NO_FILL_MARKER+-mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),20,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&-a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),22,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),23,"dash");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),24,"ERone");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),25,"ERmandOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),27,"ERmany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),29,"ERzeroToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),7,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),9,"openAsync");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),11,"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),15,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=-[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),16,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=-d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),18,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-19,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),21,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=-a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),26,"ERmandOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},-getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),31,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),32,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,-d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),33,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||-a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),34,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-35,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),36,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||-a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),37,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-38,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),39,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||-a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),40,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-41,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),42,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&-a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),43,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),-44,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){c.__static_initialize();null==c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&-(c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};c.prototype.getShapeNode=function(a){var b=this.cellElements;b=b[a]?b[a]:null;return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};c.prototype.getTextLabel=function(a){var b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");b="1".equals?"1".equals(b):"1"===b;if(b)return null;b=this.getTextChildren();null==b&&null!=-this.masterShape&&(b=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=b)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(),this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),a||(this.styleMap.overflow="width"),this.getHtmlTextContent(b)}else return a=this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};c.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};c.prototype.initLabels=-function(a){this.paragraphs={};for(var b=null,d=null,f=null,k=0;k<a.length;k++){var n=a.item(k);switch(n.nodeName){case "cp":b=this.getIndex(n);break;case "tp":this.getIndex(n);break;case "pp":d=this.getIndex(n);break;case "fld":f=this.getIndex(n);break;case "#text":n=n.textContent;var p=this.paragraphs;p=p[d]?p[d]:null;null==p?(p=new g.mxgraph.io.vsdx.Paragraph(n,b,d,f),this.paragraphs[d]=p):p.addText(n,b,f)}}};c.prototype.createHybridLabel=function(a){var b=function(p,x){return p[x]?p[x]:null}(this.paragraphs,-a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=this.getIndentRight(a);this.styleMap[mxConstants.STYLE_SPACING_TOP]=this.getSpBefore(a);this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=this.getSpAfter(a);this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical();this.styleMap.fontColor=this.getTextColor(a);this.styleMap.fontSize=this.getTextSize(a);-this.styleMap.fontFamily=this.getTextFont(a);var d=this.isBold(a)?mxConstants.FONT_BOLD:0;d|=this.isItalic(a)?mxConstants.FONT_ITALIC:0;d|=this.isUnderline(a)?mxConstants.FONT_UNDERLINE:0;this.styleMap.fontStyle=(new String(d)).toString();a=b.numValues();d=null;for(var f=0;f<a;f++){var k=b.getValue(f);if(0===k.length&&null!=this.fields){var n=b.getField(f);null!=n&&(k=function(p,x){return p[x]?p[x]:null}(this.fields,n),null==k&&null!=this.masterShape&&null!=this.masterShape.fields&&(k=function(p,-x){return p[x]?p[x]:null}(this.masterShape.fields,n)))}null!=k&&(d=null==d?k:d+k)}return d};c.prototype.getHtmlTextContent=function(a){function b(A){A=g.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(A);n&&(A="<li>"+A,n=!1);k?(A=A.split("\n"),A[A.length-1]||(A.pop(),n=!0),A=A.join("</li><li>")):A=A.replace(RegExp("\n","g"),"<br/>").replace(new RegExp(g.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP,"g"),"<br/>");return this.getTextCharFormated(A)}var d="",f=!0,k=!1,n=!1;if(null!=a&&0<a.length)for(var p=0;p<a.length;p++){var x=-a.item(p);(function(A,C){return A&&A.equals?A.equals(C):A===C})(x.nodeName,"cp")?this.cp=this.getIndex(x):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"tp")?this.tp=this.getIndex(x):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"pp")?(this.pp=this.getIndex(x),k&&(d+="</li></ul>"),f?f=!1:d+="</p>",d+=this.getTextParagraphFormated("<p>"),x=this.getPPList(this.pp),n=k=null!=x,d+=k?x:""):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"fld")?(this.fld=-this.getIndex(x),x=null,null!=this.fields&&(x=function(A,C){return A[C]?A[C]:null}(this.fields,this.fld)),null==x&&null!=this.masterShape&&null!=this.masterShape.fields&&(x=function(A,C){return A[C]?A[C]:null}(this.masterShape.fields,this.fld)),null!=x&&(d+=b.call(this,x))):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"#text")&&(x=x.textContent,d+=b.call(this,x))}k&&(d+="</li></ul>");return g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(d+(f?"":"</p>"),"div","font-size: 1px")};c.prototype.isConnectorBigNameU=-function(a){return function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree single")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree single")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree tail")||function(b,d,f){void 0===f&&(f=0);-return b.substr(f,d.length)===d}(a,"60 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 2")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 1")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 3")||function(b,-d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Double flexi-arrow")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Fancy arrow")};c.prototype.isVertex=function(){return this.vertex};c.prototype.getOriginPoint=function(a,b){var d=this.getPinX(),f=this.getPinY(),k=this.getLocPinY(),n=this.getLocPinX(),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),-0);d-=n;a-=f+(x-k);return!b||k===x/2&&n===p/2||0===this.rotation?new mxPoint(d,a):(b=p/2-n,k-=x/2,x=Math.cos((360-this.rotation)*Math.PI/180),n=Math.sin((360-this.rotation)*Math.PI/180),new mxPoint(d+b-(b*x-k*n),b*n+k*x+a-k))};c.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),-0);return new mxPoint(0===a&&0<b?1:a,0===b&&0<a?1:b)};c.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_X),0)};c.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};c.prototype.getLocPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),-0)};c.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};c.prototype.getOpacity=function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};c.prototype.getGradient=function(){if(function(d,f){return d&&d.equals?d.equals(f):d===f}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),-"0"))){var a=function(d,f){return d[f]?d[f]:null}(this.sections,"FillGradient");if(null!=a){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem,"Row");a=this.getColor(a.getIndexedCell(b[b.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");25<=parseInt(b)?a=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):-(b=this.getTheme(),null!=b&&(b=b.getFillGraientColor(this.getQuickStyleVals()),null!=b&&(a=b.toHexStr())));return a};c.prototype.getGradientDirection=function(){var a="",b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"25")?a=mxConstants.DIRECTION_EAST:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"27")?a=mxConstants.DIRECTION_WEST:function(d,f){return d&&d.equals?d.equals(f):-d===f}(b,"28")?a=mxConstants.DIRECTION_SOUTH:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"30")&&(a=mxConstants.DIRECTION_NORTH);return a};c.prototype.calcRotation=function(){var a=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ANGLE),"0"));a=180*a/Math.PI;return 360-a%360*100/100};c.prototype.propagateRotation=function(a){this.rotation+=a;this.rotation%=360;this.rotation=100*this.rotation/100};c.prototype.getTopSpacing=function(){return 100*-(this.getTextTopMargin()/2-2.8)/100};c.prototype.getBottomSpacing=function(){return 100*(this.getTextBottomMargin()/2-2.8)/100};c.prototype.getLeftSpacing=function(){return 100*(this.getTextLeftMargin()/2-2.8)/100};c.prototype.getRightSpacing=function(){return 100*(this.getTextRightMargin()/2-2.8)/100};c.prototype.getLabelRotation=function(){var a=!0,b=this.calcRotation(),d=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),"0"));d=180*d/Math.PI;-d-=b;45>Math.abs(d)||270<Math.abs(d)||(a=!1);return a};c.prototype.getHyperlink=function(){var a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("Address",null,"Hyperlink");a=this.getValue(a,"");var b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("SubAddress",null,"Hyperlink");b=this.getValue(b,"");return{extLink:a,pageLink:b}};c.prototype.getProperties=function(){var a=[];if(this.sections&&this.sections.Property)for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Property.elem,-"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("N"),n=null;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);for(var p=0;p<f.length;p++){var x=f[p],A=x.getAttribute("N");"Value"==A?n=x.getAttribute("V"):"Label"==A&&(k=x.getAttribute("V"))}null!=n&&a.push({key:k,val:n})}return a};c.prototype.getStyleFromShape=function(){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();this.rotation=Math.round(this.rotation);0!==this.rotation&&(this.styleMap[mxConstants.STYLE_ROTATION]=-""+this.rotation);var a=this.getFillColor();(function(n,p){return n&&n.equals?n.equals(p):n===p})(a,"")?this.styleMap[mxConstants.STYLE_FILLCOLOR]="none":this.styleMap[mxConstants.STYLE_FILLCOLOR]=a;var b=this.getId();this.styleDebug("ID = "+b+" , Fill Color = "+a);a=this.getGradient();(function(n,p){return n&&n.equals?n.equals(p):n===p})(a,"")?this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]="none":(this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]=a,a=this.getGradientDirection(),function(n,p){return n&&-n.equals?n.equals(p):n===p}(a,"")||function(n,p){return n&&n.equals?n.equals(p):n===p}(a,mxConstants.DIRECTION_SOUTH)||(this.styleMap[mxConstants.STYLE_GRADIENT_DIRECTION]=a));a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_FILL_OPACITY]=""+a);a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_STROKE_OPACITY]=""+a);a=this.getForm();a.hasOwnProperty(mxConstants.STYLE_SHAPE)&&function(n,-p,x){void 0===x&&(x=0);return n.substr(x,p.length)===p}(function(n,p){return n[p]?n[p]:null}(a,mxConstants.STYLE_SHAPE),"image;")&&(this.styleMap[mxConstants.STYLE_WHITE_SPACE]="wrap");for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=d));d=this.getStrokeColor();var f=this.getStrokeTransparency();this.styleDebug("ID = "+b+" , Color = "+d+" , stroke transparency = "+f);(function(n,-p){return n&&n.equals?n.equals(p):n===p})(d,"")||1===f||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);b=Math.round(this.getTopSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b);b=Math.round(this.getBottomSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b);b=Math.round(this.getLeftSpacing())|-0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+b);b=Math.round(this.getRightSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b);a=this.getDirection(a);a!==mxConstants.DIRECTION_EAST&&(this.styleMap[mxConstants.STYLE_DIRECTION]=a);a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_X),"0");b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_Y),"0");(function(n,p){return n&&n.equals?n.equals(p):-n===p})("1",a)&&(this.styleMap[mxConstants.STYLE_FLIPH]="1");(function(n,p){return n&&n.equals?n.equals(p):n===p})("1",b)&&(this.styleMap[mxConstants.STYLE_FLIPV]="1");try{var k=this.getConnections();a=[];for(b=0;b<k.length;b++)a.push("["+k[b].x+","+k[b].y+",0]");this.styleMap.points="["+a.join(",")+"]"}catch(n){console.log(n)}this.resolveCommonStyles();return this.styleMap};c.prototype.getDashPattern=function(){var a=null,b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),-"0");(b&&b.equals?b.equals("Themed"):"Themed"===b)?(b=this.getTheme(),null!=b&&(a=this.isVertex()?b.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnLineDashPattern(this.getQuickStyleVals()))):a=B.Style.getLineDashPattern(parseInt(b));if(null!=a&&0!=a.length){b="";for(var d=0;d<a.length;d++)b=b.concat(a[d].toFixed(2)+" ");return b.trim()}return null};c.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),-"0");if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):a.isConnLineDashed(this.getQuickStyleVals())}else if(!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1"))return!0;return!1};c.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),-"1"),b=1;try{var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=(this.isVertex()?f.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):f.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else b=parseFloat(a),b=this.getScreenNumericalValue$double(b)}catch(k){}1>b&&(b*=2);return b};c.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");-try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=this.isVertex()?f.getStartSize(this.getQuickStyleVals()):f.getConnStartSize(this.getQuickStyleVals()))}else b=parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE),"4");try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=-this.getTheme();null!=f&&(b=this.isVertex()?f.getEndSize(this.getQuickStyleVals()):f.getConnEndSize(this.getQuickStyleVals()))}else b=parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getRounding=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0");var b=a;b="Themed".equals?"Themed".equals(b):"Themed"===b;b&&(a="0");return parseFloat(a)};c.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),-"0");return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")?!1:!0};c.prototype.getEdgeStyle$java_util_Map=function(a){var b={};(function(d,f){return d&&d.equals?d.equals(f):d===f})(function(d,f){return d[f]?d[f]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")?b[mxConstants.STYLE_EDGE]=mxConstants.NONE:b[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return b};c.prototype.getEdgeStyle=-function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};c.prototype.getMasterId=function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};c.prototype.getShapeMasterId=function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):-null};c.prototype.isGroup=function(){var a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};c.getType=function(a){return a.getAttribute("Type")};c.prototype.getMaster=function(){return this.master};c.prototype.getNameU=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||"",b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};c.prototype.getName=function(){var a=-this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME),b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getName());return a};c.prototype.getMasterName=function(){return this.shapeName};c.prototype.setLabelOffset=function(a,b){var d="",f="";this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(d=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&-this.getMaster().getMasterElement().hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(f=this.getMaster().getMasterElement().getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));if(function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C}(d,"Organizational unit")||function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C}(f,"Organizational unit")){var k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;d="0.0";f=null;f="-0.4";null!=-k&&(d=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent,f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.hasAttribute("F")?f.getAttribute("F"):f.textContent);k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,"Inh")&&(d="0.0");(function(A,C){return A&&A.equals?A.equals(C):A===C})(f,"Inh")&&(f=-"-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");b=b.split(";");for(var n="",p=0;p<b.length;p++){var x=b[p];x=x.trim();(function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C})(x,"tabHeight=")&&(n=x.split("tabHeight=").join(""))}(function(A,C){return A&&A.equals?A.equals(C):A===C})(n,"")&&(n="20");b=parseFloat(n);d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f-b/2);a.getGeometry().offset=d}else if(function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===-C}(d,"Domain 3D")||function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C}(f,"Domain 3D")){k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F")||"",f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.getAttribute("F")||"");k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");-if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(d,""))d="0.0";if(function(A,C){return A&&A.equals?A.equals(C):A===C}(f,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f);a.getGeometry().offset=d}};c.prototype.getForm=function(){var a={};if(this.isVertex())try{var b=c.getType(this.getShape());-this.styleDebug("shape type = "+b);if(null!=this.imageData||function(Q,U){return Q&&Q.equals?Q.equals(U):Q===U}(g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,b)&&null!=this.masterShape&&null!=this.masterShape.imageData){var d=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var f=function(Q,U){return Q[U]?Q[U]:null}(d,"iType"),k=function(Q,U){return Q[U]?Q[U]:null}(d,"iData"),n=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),-p=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),x=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),A=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"),"0")),C=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),J=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=n||0!=p||x!=C||A!=J?this.toBeCroppedImg={imgOffsetX:n,imgOffsetY:p,imgWidth:x,imgHeight:A,-width:C,height:J,iType:f,iData:k}:a.image="data:image/"+f+","+k;return a}var M=this.parseGeom();if(function(Q,U){return Q&&Q.equals?Q.equals(U):Q===U}(M,""))return this.styleDebug("No geom found"),a;var L=Graph.compress(M);a[mxConstants.STYLE_SHAPE]="stencil("+L+")"}catch(Q){}else return this.getEdgeStyle();return a};c.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Off-page reference")||function(b,d){return b&&b.equals?-b.equals(d):b===d}(a,"Lined/Shaded process")?!0:!1};c.prototype.isExternal_process=function(){var a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};c.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+this.shapeName);if(null!=a&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")){if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1"))return mxConstants.DIRECTION_SOUTH;-if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};c.prototype.isSubproces=function(){var a=(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};c.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};c.prototype.getChildShapes=function(){return this.childShapes};c.prototype.setChildShapes=function(a){this.childShapes=-a};c.prototype.isDisplacedLabel=function(){var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),b=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),d=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F",""),f=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","");if(null!=this.masterShape){if(""===a||function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,-"F","");if(""===b||function(k,n){return k&&k.equals?k.equals(n):k===n}(b.toLowerCase(),"inh"))b=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===d||function(k,n){return k&&k.equals?k.equals(n):k===n}(d.toLowerCase(),"inh"))d=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===f||function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,-"F","")}return function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"width*0.5")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(b.toLowerCase(),"height*0.5")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(d.toLowerCase(),"width*1")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"height*1")||!(function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(a.toLowerCase(),"width*")&&function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===-n}(b.toLowerCase(),"height*")&&function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(d.toLowerCase(),"width*")&&function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(f.toLowerCase(),"height*")||function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(a.toLowerCase(),"controls.row_")||function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(b.toLowerCase(),"controls.row_"))?!1:!0};c.prototype.isVerticalLabel=function(){var a=this.getAttribute("TextDirection",-"V","");a||null==this.masterShape||(a=this.masterShape.getAttribute("TextDirection","V",""));return"1"==a};c.prototype.isRotatedLabel=function(){if(this.isVerticalLabel())return!0;var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V","");null!=this.masterShape&&function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")&&(a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")||function(b,-d){return b&&b.equals?b.equals(d):b===d}(a,"0.0")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")?!1:!0};c.prototype.setRootShape=function(a){this.rootShape=a};c.prototype.getRootShape=function(){return this.rootShape};c.prototype.getStartXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),-0)))/100);return new mxPoint(b,a)};c.prototype.getEndXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(b,a)};c.prototype.getRoutingPoints=function(a,b,d){return null!=-this.geomList?this.geomList.getRoutingPoints(a,b,d):null};c.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var d=[];if(null!=this.shape){var f=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.GEOM);if(0<f.length&&(f=f.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=f)){f=f.getAttribute("F")||"";f=f.replace(RegExp("NURBS\\(","g"),"");f=f.replace(RegExp("\\)","g"),"");f=f.replace(RegExp(",",-"g")," ");f=f.replace(RegExp("\\s\\s","g")," ");f=f.split(" ");for(var k=f.length,n=[];0<k--;)n.push(0);for(k=0;k<f.length;k++)n[k]=parseFloat(f[k]);for(k=2;k+4<f.length;k+=4){var p=new mxPoint,x=n[k+3];p.x=Math.floor(Math.round(100*(b.x+Math.min(100,Math.abs(a.x-b.x))*n[k+2]))/100);p.y=Math.floor(Math.round(100*(b.y-100*x))/100);d.push(p)}return d}}return null};c.prototype.getStyleFromEdgeShape=function(a){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();-if(null!=a&&!function(d,f){return d&&d.equals?d.equals(f):d===f}(a,""))for(var b in a)this.styleMap[b]=a[b];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",b=this.getDashPattern(),null!=b&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=b));b=this.getEdgeMarker(!0);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=-b);b=this.getEdgeMarker(!1);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]=b);b=Math.round(this.getStartArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+b);b=Math.round(this.getFinalArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+b);b=Math.round(this.getLineWidth())|0;1!==-b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+b);b=this.getStrokeColor();(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,b=this.getFillColor(),function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=-b));b=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b;b=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b;b=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+b;b=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b;b=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=b;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};-c.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND));var b=a&&a.equals?a.equals(""):""===a;b||"1"!=this.getValue(this.getCellElement$java_lang_String("TextBkgndTrans"),"0")&&(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]=0<this.getRounding()?g.mxgraph.io.vsdx.mxVsdxConstants.TRUE:g.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};c.prototype.getEdgeMarker=-function(a){var b=this.getValue(this.getCellElement$java_lang_String(a?g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),d=0;try{if(function(k,n){return k&&k.equals?k.equals(n):k===n}(b,"Themed")){var f=this.getTheme();null!=f&&(d=this.isVertex()?f.getEdgeMarker(a,this.getQuickStyleVals()):f.getConnEdgeMarker(a,this.getQuickStyleVals()))}else d=parseInt(b)}catch(k){}a=function(k,n){null==k.entries&&(k.entries=[]);for(var p=0;p<k.entries.length;p++)if(null!=-k.entries[p].key.equals&&k.entries[p].key.equals(n)||k.entries[p].key===n)return k.entries[p].value;return null}(c.arrowTypes_$LI$(),d);0<d&&null==a&&(a=function(k,n){null==k.entries&&(k.entries=[]);for(var p=0;p<k.entries.length;p++)if(null!=k.entries[p].key.equals&&k.entries[p].key.equals(n)||k.entries[p].key===n)return k.entries[p].value;return null}(c.arrowTypes_$LI$(),1));return a};c.prototype.getCellElement$java_lang_String=function(a){var b=h.prototype.getCellElement$java_lang_String.call(this,-a);return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};c.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,b,d){var f=h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,a,b,d);return null==f&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d):f};c.prototype.getCellElement=function(a,b,d){if("string"!==typeof a&&null!==a||-"string"!==typeof b&&null!==b||"string"!==typeof d&&null!==d){if("string"!==typeof a&&null!==a||void 0!==b||void 0!==d)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d)};c.prototype.createLabelSubShape=function(a,b){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),-this.getHeight()),k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),f/2),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),k),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),-n),A=this.getValueAsDouble(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),C=this.getTextLabel(1>d||1>f);if(null!=C&&0!==C.length){var J=mxUtils.clone(this.getStyleMap())||{};J[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;J[mxConstants.STYLE_STROKECOLOR]=mxConstants.NONE;J[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;J.hasOwnProperty("align")||(J.align="center");J.hasOwnProperty("verticalAlign")||(J.verticalAlign="middle");J.hasOwnProperty("whiteSpace")||(J.whiteSpace="wrap");-delete J.shape;delete J.image;this.isVerticalLabel()&&(A+=Math.PI+.01,J.horizontal="0");var M=this.getRotation();0!==A&&(A=360-180*A/Math.PI,A=Math.round((A+M)%360*100)/100,0!==A&&(J.rotation=""+A));J="text;"+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(J,"=");n=b.getGeometry().height-(x+f-n);k=p-k;0<M&&(p=new mxGeometry(k,n,d,f),k=b.getGeometry(),g.mxgraph.online.Utils.rotatedGeometry(p,M,k.width/2,k.height/2),k=p.x,n=p.y);return a.insertVertex(b,null,C,Math.round(100*k)/100,Math.round(100*n)/100,-Math.round(100*d)/100,Math.round(100*f)/100,J+";html=1;")}return null};c.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var d=new mxCellState;d.absolutePoints=b;a.updateEdgeBounds(d);a=a.getPoint(d);d=b[0];var f=b[b.length-1];b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth());var k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),-this.getHeight()),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),0),A=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),-0);f=(this.getHeight()-(d.y-f.y))/2+d.y-a.y-(A-p+k/2);a=x-n+b/2+(d.x-a.x);return 1E11<Math.abs(a)?null:new mxPoint(Math.floor(Math.round(100*a)/100),Math.floor(Math.round(100*f)/100))}return null};c.prototype.getShapeIndex=function(){return this.shapeIndex};c.prototype.setShapeIndex=function(a){this.shapeIndex=a};return c}(g.mxgraph.io.vsdx.Shape);m.__static_initialized=!1;m.ARROW_NO_FILL_MARKER="0";m.maxDp=2;m.USE_SHAPE_MATCH=!1;m.stencilTemplate='<shape h="htemplate" w="wtemplate" aspect="variable" strokewidth="inherit"><connections></connections><background></background><foreground></foreground></shape>';-B.VsdxShape=m;m.__class="com.mxgraph.io.vsdx.VsdxShape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));+(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b,d,f,k,n){function q(){var I;if(I=2!=a.connectsMap[t.Id])if(I=null!=t.childShapes)I=t.childShapes,null==I.entries&&(I.entries=[]),I=0!=I.entries.length;try{if(1==t.childShapes.entries.length){var M=t.childShapes.entries[0].value,K=t.fields?Object.values(t.fields).join(""):t.text.textContent,Q=M.fields?Object.values(M.fields).join(""):M.text.textContent;K==Q&&(I=!1,t.childShapes.entries=[],t.noLabelGroup=!0)}}catch(S){console.log(S)}return I}+var t=this;t.masterShape=null;t.master=null;t.parentHeight=0;t=h.call(this,b,n)||this;t.htmlLabels=!0;t.rootShape=t;t.shapeName=null;t.shapeIndex=0;t.vertex=!0;t.childShapes={};var A=t.getMasterId(),C=t.getShapeMasterId();t.master=null!=A?f[A]?f[A]:null:k;null!=t.master&&(t.masterShape=null==A&&null!=C?t.master.getSubShape(C):t.master.getMasterShape());f=t.getNameU();k=f.lastIndexOf(".");-1!==k&&(f=f.substring(0,k));t.shapeName=f;b=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);+null!=b&&0<b.length&&(b=b.item(0),t.childShapes=a.parseShapes(b,t.master,!1));b=t.calcRotation();t.rotation=100*b/100;t.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(t.getValue(t.getCellElement$java_lang_String("ThemeIndex"),"0")));n=function(I,M){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(M)||I.entries[K].key===M)return I.entries[K].value;return null}(n.getThemes(),b);null==n&&"1"==urlParams.dev&&+console.log("No theme found for index "+b);b=a.getCellIntValue("VariationColorIndex",0);t.setThemeAndVariant(n,b);f=function(I){null==I.entries&&(I.entries=[]);return I.entries}(t.childShapes);for(k=0;k<f.length;k++)A=f[k].getValue(),A.setRootShape(t),null==A.theme&&A.setThemeAndVariant(n,b);t.quickStyleVals=new g.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFillColor"),+"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleShadowColor"),+"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=t.masterShape?(t.masterShape.processGeomList(null),t.processGeomList(t.masterShape.getGeomList()),0===t.width&&(t.width=t.getScreenNumericalValue$org_w3c_dom_Element$double(t.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===t.height&&(t.height=t.getScreenNumericalValue$org_w3c_dom_Element$double(t.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),+0))):t.processGeomList(null);t.vertex=d||q()||null!=t.geomList&&(!t.geomList.isNoFill()||1<t.geomList.getGeoCount());t.layerMember=t.getValue(t.getCellElement$java_lang_String("LayerMember"));t.layerMember&&(t.layerMember=t.layerMember.split(";"));return t}__extends(c,h);c.__static_initialize=function(){c.__static_initialized||(c.__static_initialized=!0,c.__static_initializer_0())};c.OFFSET_ARRAY_$LI$=function(){c.__static_initialize();null==c.OFFSET_ARRAY&&(c.OFFSET_ARRAY=["Organizational unit",+"Domain 3D"].slice(0).slice(0));return c.OFFSET_ARRAY};c.arrowSizes_$LI$=function(){c.__static_initialize();null==c.arrowSizes&&(c.arrowSizes=[2,3,5,7,9,22,45]);return c.arrowSizes};c.arrowTypes_$LI$=function(){c.__static_initialize();return c.arrowTypes};c.__static_initializer_0=function(){c.arrowTypes={};(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&+(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),2,"blockThin");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,b,d){null==+a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=+d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK);+(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),14,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||+a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),17,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),+20,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),22,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=+a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),23,"dash");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),24,"ERone");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),25,"ERmandOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=+a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),27,"ERmany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),29,"ERzeroToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=+a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),7,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<+a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),9,"openAsync");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),11,"diamond");(function(a,b,d){null==a.entries&&(a.entries=+[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),15,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),16,c.ARROW_NO_FILL_MARKER++mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),18,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&+a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),19,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),21,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),26,"ERmandOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<+a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),31,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),32,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),33,c.ARROW_NO_FILL_MARKER++mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),34,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&+a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),35,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),+36,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),37,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||+a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),38,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),+39,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),40,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&+a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),41,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},+getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),42,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),43,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<+a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),44,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){c.__static_initialize();null==c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&(c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};c.prototype.getShapeNode=function(a){var b=this.cellElements;b=b[a]?b[a]:null;return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):+b};c.prototype.getTextLabel=function(a){var b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");b="1".equals?"1".equals(b):"1"===b;if(b)return null;b=this.getTextChildren();null==b&&null!=this.masterShape&&(b=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=b)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(),this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),a||(this.styleMap.overflow=+"width"),this.getHtmlTextContent(b)}else return a=this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};c.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};c.prototype.initLabels=function(a){this.paragraphs={};for(var b=null,d=null,f=null,k=0;k<a.length;k++){var n=a.item(k);switch(n.nodeName){case "cp":b=this.getIndex(n);break;case "tp":this.getIndex(n);break;case "pp":d=this.getIndex(n);break;case "fld":f=this.getIndex(n);break;+case "#text":n=n.textContent;var q=this.paragraphs;q=q[d]?q[d]:null;null==q?(q=new g.mxgraph.io.vsdx.Paragraph(n,b,d,f),this.paragraphs[d]=q):q.addText(n,b,f)}}};c.prototype.createHybridLabel=function(a){var b=function(q,t){return q[t]?q[t]:null}(this.paragraphs,a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=this.getIndentRight(a);this.styleMap[mxConstants.STYLE_SPACING_TOP]=+this.getSpBefore(a);this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=this.getSpAfter(a);this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical();this.styleMap.fontColor=this.getTextColor(a);this.styleMap.fontSize=this.getTextSize(a);this.styleMap.fontFamily=this.getTextFont(a);var d=this.isBold(a)?mxConstants.FONT_BOLD:0;d|=this.isItalic(a)?mxConstants.FONT_ITALIC:0;d|=this.isUnderline(a)?mxConstants.FONT_UNDERLINE:0;this.styleMap.fontStyle=(new String(d)).toString();a=b.numValues();+d=null;for(var f=0;f<a;f++){var k=b.getValue(f);if(0===k.length&&null!=this.fields){var n=b.getField(f);null!=n&&(k=function(q,t){return q[t]?q[t]:null}(this.fields,n),null==k&&null!=this.masterShape&&null!=this.masterShape.fields&&(k=function(q,t){return q[t]?q[t]:null}(this.masterShape.fields,n)))}null!=k&&(d=null==d?k:d+k)}return d};c.prototype.getHtmlTextContent=function(a){function b(A){A=g.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(A);n&&(A="<li>"+A,n=!1);k?(A=A.split("\n"),A[A.length-1]||(A.pop(),+n=!0),A=A.join("</li><li>")):A=A.replace(RegExp("\n","g"),"<br/>").replace(new RegExp(g.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP,"g"),"<br/>");return this.getTextCharFormated(A)}var d="",f=!0,k=!1,n=!1;if(null!=a&&0<a.length)for(var q=0;q<a.length;q++){var t=a.item(q);(function(A,C){return A&&A.equals?A.equals(C):A===C})(t.nodeName,"cp")?this.cp=this.getIndex(t):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"tp")?this.tp=this.getIndex(t):function(A,C){return A&&A.equals?A.equals(C):+A===C}(t.nodeName,"pp")?(this.pp=this.getIndex(t),k&&(d+="</li></ul>"),f?f=!1:d+="</p>",d+=this.getTextParagraphFormated("<p>"),t=this.getPPList(this.pp),n=k=null!=t,d+=k?t:""):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"fld")?(this.fld=this.getIndex(t),t=null,null!=this.fields&&(t=function(A,C){return A[C]?A[C]:null}(this.fields,this.fld)),null==t&&null!=this.masterShape&&null!=this.masterShape.fields&&(t=function(A,C){return A[C]?A[C]:null}(this.masterShape.fields,this.fld)),+null!=t&&(d+=b.call(this,t))):function(A,C){return A&&A.equals?A.equals(C):A===C}(t.nodeName,"#text")&&(t=t.textContent,d+=b.call(this,t))}k&&(d+="</li></ul>");return g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(d+(f?"":"</p>"),"div","font-size: 1px")};c.prototype.isConnectorBigNameU=function(a){return function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree single")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree single")||function(b,d,f){void 0===+f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree tail")||+function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 2")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 1")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 3")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Double flexi-arrow")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Fancy arrow")};c.prototype.isVertex=function(){return this.vertex};c.prototype.getOriginPoint=+function(a,b){var d=this.getPinX(),f=this.getPinY(),k=this.getLocPinY(),n=this.getLocPinX(),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);d-=n;a-=f+(t-k);return!b||k===t/2&&n===q/2||0===this.rotation?new mxPoint(d,a):(b=q/2-n,k-=t/2,t=Math.cos((360-this.rotation)*Math.PI/180),n=Math.sin((360-this.rotation)*+Math.PI/180),new mxPoint(d+b-(b*t-k*n),b*n+k*t+a-k))};c.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0<b?1:a,0===b&&0<a?1:b)};c.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_X),+0)};c.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};c.prototype.getLocPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),0)};c.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};c.prototype.getOpacity=+function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};c.prototype.getGradient=function(){if(function(d,f){return d&&d.equals?d.equals(f):d===f}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var a=function(d,f){return d[f]?d[f]:null}(this.sections,"FillGradient");if(null!=a){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem,+"Row");a=this.getColor(a.getIndexedCell(b[b.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");25<=parseInt(b)?a=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):(b=this.getTheme(),null!=b&&(b=b.getFillGraientColor(this.getQuickStyleVals()),null!=b&&(a=b.toHexStr())));return a};c.prototype.getGradientDirection=+function(){var a="",b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"25")?a=mxConstants.DIRECTION_EAST:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"27")?a=mxConstants.DIRECTION_WEST:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"28")?a=mxConstants.DIRECTION_SOUTH:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"30")&&(a=mxConstants.DIRECTION_NORTH);return a};c.prototype.calcRotation=+function(){var a=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ANGLE),"0"));a=180*a/Math.PI;return 360-a%360*100/100};c.prototype.propagateRotation=function(a){this.rotation+=a;this.rotation%=360;this.rotation=100*this.rotation/100};c.prototype.getTopSpacing=function(){return 100*(this.getTextTopMargin()/2-2.8)/100};c.prototype.getBottomSpacing=function(){return 100*(this.getTextBottomMargin()/2-2.8)/100};c.prototype.getLeftSpacing=function(){return 100*+(this.getTextLeftMargin()/2-2.8)/100};c.prototype.getRightSpacing=function(){return 100*(this.getTextRightMargin()/2-2.8)/100};c.prototype.getLabelRotation=function(){var a=!0,b=this.calcRotation(),d=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),"0"));d=180*d/Math.PI;d-=b;45>Math.abs(d)||270<Math.abs(d)||(a=!1);return a};c.prototype.getHyperlink=function(){var a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("Address",+null,"Hyperlink");a=this.getValue(a,"");var b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("SubAddress",null,"Hyperlink");b=this.getValue(b,"");return{extLink:a,pageLink:b}};c.prototype.getProperties=function(){var a=[];if(this.sections&&this.sections.Property)for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Property.elem,"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("N"),n=null;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);+for(var q=0;q<f.length;q++){var t=f[q],A=t.getAttribute("N");"Value"==A?n=t.getAttribute("V"):"Label"==A&&(k=t.getAttribute("V"))}null!=n&&a.push({key:k,val:n})}return a};c.prototype.getStyleFromShape=function(){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();this.rotation=Math.round(this.rotation);0!==this.rotation&&(this.styleMap[mxConstants.STYLE_ROTATION]=""+this.rotation);var a=this.getFillColor();(function(n,q){return n&&n.equals?n.equals(q):n===q})(a,"")?this.styleMap[mxConstants.STYLE_FILLCOLOR]=+"none":this.styleMap[mxConstants.STYLE_FILLCOLOR]=a;var b=this.getId();this.styleDebug("ID = "+b+" , Fill Color = "+a);a=this.getGradient();(function(n,q){return n&&n.equals?n.equals(q):n===q})(a,"")?this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]="none":(this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]=a,a=this.getGradientDirection(),function(n,q){return n&&n.equals?n.equals(q):n===q}(a,"")||function(n,q){return n&&n.equals?n.equals(q):n===q}(a,mxConstants.DIRECTION_SOUTH)||(this.styleMap[mxConstants.STYLE_GRADIENT_DIRECTION]=+a));a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_FILL_OPACITY]=""+a);a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_STROKE_OPACITY]=""+a);a=this.getForm();a.hasOwnProperty(mxConstants.STYLE_SHAPE)&&function(n,q,t){void 0===t&&(t=0);return n.substr(t,q.length)===q}(function(n,q){return n[q]?n[q]:null}(a,mxConstants.STYLE_SHAPE),"image;")&&(this.styleMap[mxConstants.STYLE_WHITE_SPACE]=+"wrap");for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=d));d=this.getStrokeColor();var f=this.getStrokeTransparency();this.styleDebug("ID = "+b+" , Color = "+d+" , stroke transparency = "+f);(function(n,q){return n&&n.equals?n.equals(q):n===q})(d,"")||1===f||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=+""+b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);b=Math.round(this.getTopSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b);b=Math.round(this.getBottomSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b);b=Math.round(this.getLeftSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+b);b=Math.round(this.getRightSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b);a=+this.getDirection(a);a!==mxConstants.DIRECTION_EAST&&(this.styleMap[mxConstants.STYLE_DIRECTION]=a);a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_X),"0");b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_Y),"0");(function(n,q){return n&&n.equals?n.equals(q):n===q})("1",a)&&(this.styleMap[mxConstants.STYLE_FLIPH]="1");(function(n,q){return n&&n.equals?n.equals(q):n===q})("1",b)&&(this.styleMap[mxConstants.STYLE_FLIPV]=+"1");try{var k=this.getConnections();a=[];for(b=0;b<k.length;b++)a.push("["+k[b].x+","+k[b].y+",0]");this.styleMap.points="["+a.join(",")+"]"}catch(n){console.log(n)}this.resolveCommonStyles();return this.styleMap};c.prototype.getDashPattern=function(){var a=null,b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");(b&&b.equals?b.equals("Themed"):"Themed"===b)?(b=this.getTheme(),null!=b&&(a=this.isVertex()?b.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):+b.getConnLineDashPattern(this.getQuickStyleVals()))):a=B.Style.getLineDashPattern(parseInt(b));if(null!=a&&0!=a.length){b="";for(var d=0;d<a.length;d++)b=b.concat(a[d].toFixed(2)+" ");return b.trim()}return null};c.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):+a.isConnLineDashed(this.getQuickStyleVals())}else if(!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1"))return!0;return!1};c.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),"1"),b=1;try{var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=(this.isVertex()?f.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):+f.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else b=parseFloat(a),b=this.getScreenNumericalValue$double(b)}catch(k){}1>b&&(b*=2);return b};c.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=this.isVertex()?f.getStartSize(this.getQuickStyleVals()):f.getConnStartSize(this.getQuickStyleVals()))}else b=+parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE),"4");try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=this.isVertex()?f.getEndSize(this.getQuickStyleVals()):f.getConnEndSize(this.getQuickStyleVals()))}else b=parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getRounding=+function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0");var b=a;b="Themed".equals?"Themed".equals(b):"Themed"===b;b&&(a="0");return parseFloat(a)};c.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),"0");return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")?!1:!0};c.prototype.getEdgeStyle$java_util_Map=+function(a){var b={};(function(d,f){return d&&d.equals?d.equals(f):d===f})(function(d,f){return d[f]?d[f]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")?b[mxConstants.STYLE_EDGE]=mxConstants.NONE:b[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return b};c.prototype.getEdgeStyle=function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};c.prototype.getMasterId=+function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};c.prototype.getShapeMasterId=function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):null};c.prototype.isGroup=function(){var a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};c.getType=function(a){return a.getAttribute("Type")};+c.prototype.getMaster=function(){return this.master};c.prototype.getNameU=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||"",b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};c.prototype.getName=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME),b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getName());return a};+c.prototype.getMasterName=function(){return this.shapeName};c.prototype.setLabelOffset=function(a,b){var d="",f="";this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(d=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&this.getMaster().getMasterElement().hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(f=this.getMaster().getMasterElement().getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));+if(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(d,"Organizational unit")||function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(f,"Organizational unit")){var k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent,f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),+f=f.hasAttribute("F")?f.getAttribute("F"):f.textContent);k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,"Inh")&&(d="0.0");(function(A,C){return A&&A.equals?A.equals(C):A===C})(f,"Inh")&&(f="-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");b=b.split(";");for(var n="",q=0;q<b.length;q++){var t=b[q];t=t.trim();(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C})(t,"tabHeight=")&&+(n=t.split("tabHeight=").join(""))}(function(A,C){return A&&A.equals?A.equals(C):A===C})(n,"")&&(n="20");b=parseFloat(n);d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f-b/2);a.getGeometry().offset=d}else if(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(d,"Domain 3D")||function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(f,"Domain 3D")){k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;+d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F")||"",f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.getAttribute("F")||"");k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(d,""))d="0.0";if(function(A,C){return A&&A.equals?A.equals(C):+A===C}(f,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f);a.getGeometry().offset=d}};c.prototype.getForm=function(){var a={};if(this.isVertex())try{var b=c.getType(this.getShape());this.styleDebug("shape type = "+b);if(null!=this.imageData||function(Q,S){return Q&&Q.equals?Q.equals(S):Q===S}(g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,b)&&null!=this.masterShape&&+null!=this.masterShape.imageData){var d=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var f=function(Q,S){return Q[S]?Q[S]:null}(d,"iType"),k=function(Q,S){return Q[S]?Q[S]:null}(d,"iData"),n=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),q=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),t=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),A=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"),+"0")),C=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),I=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=n||0!=q||t!=C||A!=I?this.toBeCroppedImg={imgOffsetX:n,imgOffsetY:q,imgWidth:t,imgHeight:A,width:C,height:I,iType:f,iData:k}:a.image="data:image/"+f+","+k;return a}var M=this.parseGeom();if(function(Q,S){return Q&&Q.equals?Q.equals(S):Q===S}(M,""))return this.styleDebug("No geom found"),a;var K=Graph.compress(M);a[mxConstants.STYLE_SHAPE]=+"stencil("+K+")"}catch(Q){}else return this.getEdgeStyle();return a};c.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Off-page reference")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Lined/Shaded process")?!0:!1};c.prototype.isExternal_process=function(){var a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};c.prototype.getDirection=function(a){a=mxResources.get("mxOffset"++this.shapeName);if(null!=a&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")){if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1"))return mxConstants.DIRECTION_SOUTH;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};c.prototype.isSubproces=function(){var a=+(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};c.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};c.prototype.getChildShapes=function(){return this.childShapes};c.prototype.setChildShapes=function(a){this.childShapes=a};c.prototype.isDisplacedLabel=function(){var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),b=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),d=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,+"F",""),f=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","");if(null!=this.masterShape){if(""===a||function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F","");if(""===b||function(k,n){return k&&k.equals?k.equals(n):k===n}(b.toLowerCase(),"inh"))b=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===d||function(k,n){return k&&k.equals?k.equals(n):+k===n}(d.toLowerCase(),"inh"))d=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===f||function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","")}return function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"width*0.5")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(b.toLowerCase(),"height*0.5")&&function(k,n){return k&&k.equals?k.equals(n):+k===n}(d.toLowerCase(),"width*1")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"height*1")||!(function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(a.toLowerCase(),"width*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(b.toLowerCase(),"height*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(d.toLowerCase(),"width*")&&function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(f.toLowerCase(),"height*")||function(k,+n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(a.toLowerCase(),"controls.row_")||function(k,n,q){void 0===q&&(q=0);return k.substr(q,n.length)===n}(b.toLowerCase(),"controls.row_"))?!1:!0};c.prototype.isVerticalLabel=function(){var a=this.getAttribute("TextDirection","V","");a||null==this.masterShape||(a=this.masterShape.getAttribute("TextDirection","V",""));return"1"==a};c.prototype.isRotatedLabel=function(){if(this.isVerticalLabel())return!0;var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,+"V","");null!=this.masterShape&&function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")&&(a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0.0")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")?!1:!0};c.prototype.setRootShape=function(a){this.rootShape=a};c.prototype.getRootShape=function(){return this.rootShape};c.prototype.getStartXY=+function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(b,a)};c.prototype.getEndXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_X),+0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(b,a)};c.prototype.getRoutingPoints=function(a,b,d){return null!=this.geomList?this.geomList.getRoutingPoints(a,b,d):null};c.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var d=[];if(null!=this.shape){var f=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.GEOM);+if(0<f.length&&(f=f.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=f)){f=f.getAttribute("F")||"";f=f.replace(RegExp("NURBS\\(","g"),"");f=f.replace(RegExp("\\)","g"),"");f=f.replace(RegExp(",","g")," ");f=f.replace(RegExp("\\s\\s","g")," ");f=f.split(" ");for(var k=f.length,n=[];0<k--;)n.push(0);for(k=0;k<f.length;k++)n[k]=parseFloat(f[k]);for(k=2;k+4<f.length;k+=4){var q=new mxPoint,t=n[k+3];q.x=Math.floor(Math.round(100*(b.x++Math.min(100,Math.abs(a.x-b.x))*n[k+2]))/100);q.y=Math.floor(Math.round(100*(b.y-100*t))/100);d.push(q)}return d}}return null};c.prototype.getStyleFromEdgeShape=function(a){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();if(null!=a&&!function(d,f){return d&&d.equals?d.equals(f):d===f}(a,""))for(var b in a)this.styleMap[b]=a[b];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",b=this.getDashPattern(),null!=b&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=+b));b=this.getEdgeMarker(!0);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=b);b=this.getEdgeMarker(!1);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]=+b);b=Math.round(this.getStartArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+b);b=Math.round(this.getFinalArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+b);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+b);b=this.getStrokeColor();(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);+this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,b=this.getFillColor(),function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=b));b=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b;b=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b;b=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""++b;b=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b;b=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=b;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};c.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND));var b=a&&a.equals?a.equals(""):""===a;b||"1"!=this.getValue(this.getCellElement$java_lang_String("TextBkgndTrans"),+"0")&&(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]=0<this.getRounding()?g.mxgraph.io.vsdx.mxVsdxConstants.TRUE:g.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};c.prototype.getEdgeMarker=function(a){var b=this.getValue(this.getCellElement$java_lang_String(a?g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),d=0;try{if(function(k,n){return k&&k.equals?k.equals(n):k===n}(b,"Themed")){var f=+this.getTheme();null!=f&&(d=this.isVertex()?f.getEdgeMarker(a,this.getQuickStyleVals()):f.getConnEdgeMarker(a,this.getQuickStyleVals()))}else d=parseInt(b)}catch(k){}a=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(c.arrowTypes_$LI$(),d);0<d&&null==a&&(a=function(k,n){null==k.entries&&(k.entries=[]);for(var q=0;q<k.entries.length;q++)if(null!=+k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return k.entries[q].value;return null}(c.arrowTypes_$LI$(),1));return a};c.prototype.getCellElement$java_lang_String=function(a){var b=h.prototype.getCellElement$java_lang_String.call(this,a);return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};c.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,b,d){var f=h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,+a,b,d);return null==f&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d):f};c.prototype.getCellElement=function(a,b,d){if("string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b||"string"!==typeof d&&null!==d){if("string"!==typeof a&&null!==a||void 0!==b||void 0!==d)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d)};c.prototype.createLabelSubShape=+function(a,b){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),+f/2),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),k),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),n),A=this.getValueAsDouble(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),C=this.getTextLabel(1>d||1>f);if(null!=C&&0!==C.length){var I=mxUtils.clone(this.getStyleMap())||{};I[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;I[mxConstants.STYLE_STROKECOLOR]=+mxConstants.NONE;I[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;I.hasOwnProperty("align")||(I.align="center");I.hasOwnProperty("verticalAlign")||(I.verticalAlign="middle");I.hasOwnProperty("whiteSpace")||(I.whiteSpace="wrap");delete I.shape;delete I.image;this.isVerticalLabel()&&(A+=Math.PI+.01,I.horizontal="0");var M=this.getRotation();0!==A&&(A=360-180*A/Math.PI,A=Math.round((A+M)%360*100)/100,0!==A&&(I.rotation=""+A));I="text;"+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(I,"=");n=b.getGeometry().height-+(t+f-n);k=q-k;0<M&&(q=new mxGeometry(k,n,d,f),k=b.getGeometry(),g.mxgraph.online.Utils.rotatedGeometry(q,M,k.width/2,k.height/2),k=q.x,n=q.y);return a.insertVertex(b,null,C,Math.round(100*k)/100,Math.round(100*n)/100,Math.round(100*d)/100,Math.round(100*f)/100,I+";html=1;")}return null};c.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var d=new mxCellState;d.absolutePoints=b;a.updateEdgeBounds(d);a=a.getPoint(d);d=b[0];var f=b[b.length-1];b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),+this.getWidth());var k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),+0),A=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),0);f=(this.getHeight()-(d.y-f.y))/2+d.y-a.y-(A-q+k/2);a=t-n+b/2+(d.x-a.x);return 1E11<Math.abs(a)?null:new mxPoint(Math.floor(Math.round(100*a)/100),Math.floor(Math.round(100*f)/100))}return null};c.prototype.getShapeIndex=function(){return this.shapeIndex};c.prototype.setShapeIndex=function(a){this.shapeIndex=a};return c}(g.mxgraph.io.vsdx.Shape);m.__static_initialized=!1;m.ARROW_NO_FILL_MARKER=+"0";m.maxDp=2;m.USE_SHAPE_MATCH=!1;m.stencilTemplate='<shape h="htemplate" w="wtemplate" aspect="variable" strokewidth="inherit"><connections></connections><background></background><foreground></foreground></shape>';B.VsdxShape=m;m.__class="com.mxgraph.io.vsdx.VsdxShape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));(function(g){(function(y){(function(z){var B=function(){function m(){}m.__static_initialize=function(){m.__static_initialized||(m.__static_initialized=!0,m.__static_initializer_0())};m.CA_$LI$=function(){m.__static_initialize();null==m.CA&&(m.CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""));return m.CA};m.IA_$LI$=function(){m.__static_initialize();if(null==m.IA){for(var h=256,c=[];0<h--;)c.push(0);m.IA=c}return m.IA};m.__static_initializer_0=function(){for(var h=m.IA_$LI$(),-c=0;c<h.length;c++)h[c]=-1;h=0;for(c=m.CA_$LI$().length;h<c;h++)m.IA_$LI$()[m.CA_$LI$()[h].charCodeAt(0)]=h;m.IA_$LI$()[61]=0};m.encodeToChar=function(h,c,a){var b=null!=h?h.length-c:0;if(0===b)return[];var d=3*(b/3|0),f=((b-1)/3|0)+1<<2;f+=a?((f-1)/76|0)<<1:0;for(var k=Array(f),n=c,p=0,x=0;n<d+c;){var A=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255;k[p++]=m.CA_$LI$()[A>>>18&63];k[p++]=m.CA_$LI$()[A>>>12&63];k[p++]=m.CA_$LI$()[A>>>6&63];k[p++]=m.CA_$LI$()[A&63];a&&19===++x&&p<f-2&&(k[p++]="\r",k[p++]=-"\n",x=0)}a=b-d;0<a&&(A=(h[d+c]&255)<<10|(2===a?(h[b+c-1]&255)<<2:0),k[f-4]=m.CA_$LI$()[A>>12],k[f-3]=m.CA_$LI$()[A>>>6&63],k[f-2]=2===a?m.CA_$LI$()[A&63]:"=",k[f-1]="=");return k};m.decode$char_A=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h[b].charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h[--b].charCodeAt(0)];)61==function(p){return null==p.charCodeAt?p:p.charCodeAt(0)}(h[b])&&d++;c=(6*(c-a)>>3)-d;a=function(p){for(var x=-[];0<p--;)x.push(0);return x}(c);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var n=m.IA_$LI$()[h[d++].charCodeAt(0)];0<=n?b|=n<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decode=function(h){if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$byte_A(h);+c=0;c<h.length;c++)h[c]=-1;h=0;for(c=m.CA_$LI$().length;h<c;h++)m.IA_$LI$()[m.CA_$LI$()[h].charCodeAt(0)]=h;m.IA_$LI$()[61]=0};m.encodeToChar=function(h,c,a){var b=null!=h?h.length-c:0;if(0===b)return[];var d=3*(b/3|0),f=((b-1)/3|0)+1<<2;f+=a?((f-1)/76|0)<<1:0;for(var k=Array(f),n=c,q=0,t=0;n<d+c;){var A=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255;k[q++]=m.CA_$LI$()[A>>>18&63];k[q++]=m.CA_$LI$()[A>>>12&63];k[q++]=m.CA_$LI$()[A>>>6&63];k[q++]=m.CA_$LI$()[A&63];a&&19===++t&&q<f-2&&(k[q++]="\r",k[q++]=+"\n",t=0)}a=b-d;0<a&&(A=(h[d+c]&255)<<10|(2===a?(h[b+c-1]&255)<<2:0),k[f-4]=m.CA_$LI$()[A>>12],k[f-3]=m.CA_$LI$()[A>>>6&63],k[f-2]=2===a?m.CA_$LI$()[A&63]:"=",k[f-1]="=");return k};m.decode$char_A=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h[b].charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h[--b].charCodeAt(0)];)61==function(q){return null==q.charCodeAt?q:q.charCodeAt(0)}(h[b])&&d++;c=(6*(c-a)>>3)-d;a=function(q){for(var t=+[];0<q--;)t.push(0);return t}(c);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var n=m.IA_$LI$()[h[d++].charCodeAt(0)];0<=n?b|=n<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decode=function(h){if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$byte_A(h);if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decode$java_lang_String(h);throw Error("invalid overload");};m.decodeFast$char_A=function(h){var c=h.length;if(0===c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[h[a].charCodeAt(0)];)a++;for(;0<b&&0>m.IA_$LI$()[h[b].charCodeAt(0)];)b--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[b])?61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[b-1])?2:1:0,f=b-a+1,k=76<c?(13==function(C){return null==C.charCodeAt?-C:C.charCodeAt(0)}(h[76])?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var J=[];0<C--;)J.push(0);return J}(f);for(var n=0,p=0,x=3*(f/3|0);n<x;){var A=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18|m.IA_$LI$()[h[a++].charCodeAt(0)]<<12|m.IA_$LI$()[h[a++].charCodeAt(0)]<<6|m.IA_$LI$()[h[a++].charCodeAt(0)];c[n++]=A>>16|0;c[n++]=A>>8|0;c[n++]=A|0;0<k&&19===++p&&(a+=2,p=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>h|0}return c};m.decodeFast=function(h){if(null!=+C:C.charCodeAt(0)}(h[76])?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var I=[];0<C--;)I.push(0);return I}(f);for(var n=0,q=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18|m.IA_$LI$()[h[a++].charCodeAt(0)]<<12|m.IA_$LI$()[h[a++].charCodeAt(0)]<<6|m.IA_$LI$()[h[a++].charCodeAt(0)];c[n++]=A>>16|0;c[n++]=A>>8|0;c[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>h|0}return c};m.decodeFast=function(h){if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$byte_A(h);if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decodeFast$java_lang_String(h);throw Error("invalid overload");};m.encodeToByte=function(h,c){var a=null!=h?h.length:0;if(0===a)return[];for(var b=3*(a/-3|0),d=((a-1)/3|0)+1<<2,f=d+=c?((d-1)/76|0)<<1:0,k=[];0<f--;)k.push(0);for(var n=0,p=0,x=0;n<b;)f=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255,k[p++]=m.CA_$LI$()[f>>>18&63].charCodeAt(0),k[p++]=m.CA_$LI$()[f>>>12&63].charCodeAt(0),k[p++]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[p++]=m.CA_$LI$()[f&63].charCodeAt(0),c&&19===++x&&p<d-2&&(k[p++]=13,k[p++]=10,x=0);c=a-b;0<c&&(f=(h[b]&255)<<10|(2===c?(h[a-1]&255)<<2:0),k[d-4]=m.CA_$LI$()[f>>12].charCodeAt(0),k[d-3]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[d-2]=+3|0),d=((a-1)/3|0)+1<<2,f=d+=c?((d-1)/76|0)<<1:0,k=[];0<f--;)k.push(0);for(var n=0,q=0,t=0;n<b;)f=(h[n++]&255)<<16|(h[n++]&255)<<8|h[n++]&255,k[q++]=m.CA_$LI$()[f>>>18&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f>>>12&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[q++]=m.CA_$LI$()[f&63].charCodeAt(0),c&&19===++t&&q<d-2&&(k[q++]=13,k[q++]=10,t=0);c=a-b;0<c&&(f=(h[b]&255)<<10|(2===c?(h[a-1]&255)<<2:0),k[d-4]=m.CA_$LI$()[f>>12].charCodeAt(0),k[d-3]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[d-2]=2===c?m.CA_$LI$()[f&63].charCodeAt(0):61,k[d-1]=61);return k};m.decode$byte_A=function(h){for(var c=h.length,a=0,b=0;b<c;b++)0>m.IA_$LI$()[h[b]&255]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h[--b]&255];)61==h[b]&&d++;b=c=(6*(c-a)>>3)-d;for(a=[];0<b--;)a.push(0);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var n=m.IA_$LI$()[h[d++]&255];0<=n?b|=n<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decodeFast$byte_A=function(h){var c=h.length;if(0===-c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[h[a]&255];)a++;for(;0<b&&0>m.IA_$LI$()[h[b]&255];)b--;var d=61==h[b]?61==h[b-1]?2:1:0,f=b-a+1,k=76<c?(13==h[76]?f/78|0:0)<<1:0,n=f=(6*(f-k)>>3)-d;for(c=[];0<n--;)c.push(0);for(var p=n=0,x=3*(f/3|0);n<x;){var A=m.IA_$LI$()[h[a++]]<<18|m.IA_$LI$()[h[a++]]<<12|m.IA_$LI$()[h[a++]]<<6|m.IA_$LI$()[h[a++]];c[n++]=A>>16|0;c[n++]=A>>8|0;c[n++]=A|0;0<k&&19===++p&&(a+=2,p=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++]]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>-h|0}return c};m.encodeToString=function(h,c,a){return m.encodeToChar(h,c,a).join("")};m.decode$java_lang_String=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h.charAt(b).charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h.charAt(--b).charCodeAt(0)];)61==function(p){return null==p.charCodeAt?p:p.charCodeAt(0)}(h.charAt(b))&&d++;c=(6*(c-a)>>3)-d;a=function(p){for(var x=[];0<p--;)x.push(0);return x}(c);for(var f=d=0;f<c;){for(var k=+c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[h[a]&255];)a++;for(;0<b&&0>m.IA_$LI$()[h[b]&255];)b--;var d=61==h[b]?61==h[b-1]?2:1:0,f=b-a+1,k=76<c?(13==h[76]?f/78|0:0)<<1:0,n=f=(6*(f-k)>>3)-d;for(c=[];0<n--;)c.push(0);for(var q=n=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h[a++]]<<18|m.IA_$LI$()[h[a++]]<<12|m.IA_$LI$()[h[a++]]<<6|m.IA_$LI$()[h[a++]];c[n++]=A>>16|0;c[n++]=A>>8|0;c[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++]]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>+h|0}return c};m.encodeToString=function(h,c,a){return m.encodeToChar(h,c,a).join("")};m.decode$java_lang_String=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h.charAt(b).charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h.charAt(--b).charCodeAt(0)];)61==function(q){return null==q.charCodeAt?q:q.charCodeAt(0)}(h.charAt(b))&&d++;c=(6*(c-a)>>3)-d;a=function(q){for(var t=[];0<q--;)t.push(0);return t}(c);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var n=m.IA_$LI$()[h.charAt(d++).charCodeAt(0)];0<=n?b|=n<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decodeFast$java_lang_String=function(h){var c=h.length;if(0===c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(a))&255];)a++;for(;0<b&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b))&255];)b--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b))?-61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b-1))?2:1:0,f=b-a+1,k=76<c?(13==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(76))?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var J=[];0<C--;)J.push(0);return J}(f);for(var n=0,p=0,x=3*(f/3|0);n<x;){var A=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<12|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<6|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)];c[n++]=A>>16|0;c[n++]=A>>-8|0;c[n++]=A|0;0<k&&19===++p&&(a+=2,p=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>h|0}return c};return m}();B.__static_initialized=!1;z.mxBase64=B;B.__class="com.mxgraph.online.mxBase64"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$();+61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b-1))?2:1:0,f=b-a+1,k=76<c?(13==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(76))?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var I=[];0<C--;)I.push(0);return I}(f);for(var n=0,q=0,t=3*(f/3|0);n<t;){var A=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<12|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<6|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)];c[n++]=A>>16|0;c[n++]=A>>+8|0;c[n++]=A|0;0<k&&19===++q&&(a+=2,q=0)}if(n<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18-6*k;for(h=16;n<f;h-=8)c[n++]=A>>h|0}return c};return m}();B.__static_initialized=!1;z.mxBase64=B;B.__class="com.mxgraph.online.mxBase64"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$();com.mxgraph.io.vsdx.VsdxShape.arrowTypes_$LI$();com.mxgraph.io.vsdx.VsdxShape.arrowSizes_$LI$();com.mxgraph.io.vsdx.VsdxShape.OFFSET_ARRAY_$LI$();com.mxgraph.io.vsdx.VsdxShape.__static_initialize();com.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP_$LI$();com.mxgraph.io.vsdx.Style.lineDashPatterns_$LI$();com.mxgraph.io.vsdx.Style.styleTypes_$LI$();com.mxgraph.io.vsdx.Style.__static_initialize();com.mxgraph.online.Constants.MAX_AREA_$LI$();com.mxgraph.io.vsdx.theme.Color.NONE_$LI$();com.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.colorIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.themesIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.__static_initialize();com.mxgraph.io.vsdx.mxVsdxConstants.MY_SET_$LI$();com.mxgraph.io.vsdx.mxVsdxConstants.SET_VALUES_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.defaultColors_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.__static_initialize();com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder_$LI$();com.mxgraph.io.mxVsdxCodec.parsererrorNS_$LI$();EditorUi.prototype.doImportVisio=function(g,y,z,B){B=B||g.name;null!=B&&/(\.vs(x|sx?))($|\?)/i.test(B)?(new com.mxgraph.io.mxVssxCodec(this)).decodeVssx(g,y,null,z):(new com.mxgraph.io.mxVsdxCodec(this)).decodeVsdx(g,y,null,z)};function mxGraphMlCodec(){this.cachedRefObj={}}mxGraphMlCodec.prototype.refRegexp=/^\{y:GraphMLReference\s+(\d+)\}$/;mxGraphMlCodec.prototype.staticRegexp=/^\{x:Static\s+(.+)\.(.+)\}$/;mxGraphMlCodec.prototype.decode=function(g,y,z){try{var B=mxUtils.parseXml(g),m=this.getDirectChildNamedElements(B.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(B.documentElement);g='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(B=0;B<m.length;B++){var h=m[B],c=this.createMxGraph(),a=c.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(h,c,c.getDefaultParent()),B=0;B<this.edges.length;B++)for(var b=this.edges[B],d=b.edges,f=b.parent,k=b.dx,n=b.dy,-p=0;p<d.length;p++)this.importEdge(d[p],c,f,k,n)}catch(W){throw console.log(W),W;}finally{a.endUpdate()}a.beginUpdate();try{var x=c.getModel().cells,A;for(A in x){var C=x[A];if(C.edge&&0<C.getChildCount())for(B=0;B<C.getChildCount();B++){var J=C.children[B].geometry;if(J.adjustIt){var M=c.view.getState(C),L=M.absolutePoints,Q=L[0],U=L[L.length-1],H=J.x,I=J.y;k=U.x-Q.x;n=U.y-Q.y;var N=Q.x+H*k,K=Q.y+H*n,O=Math.sqrt(k*k+n*n);k/=O;n/=O;N-=I*n;K+=I*k;var ba=c.view.getRelativePoint(M,N,K);J.x=ba.x;J.y=+q=0;q<d.length;q++)this.importEdge(d[q],c,f,k,n)}catch(W){throw console.log(W),W;}finally{a.endUpdate()}a.beginUpdate();try{var t=c.getModel().cells,A;for(A in t){var C=t[A];if(C.edge&&0<C.getChildCount())for(B=0;B<C.getChildCount();B++){var I=C.children[B].geometry;if(I.adjustIt){var M=c.view.getState(C),K=M.absolutePoints,Q=K[0],S=K[K.length-1],H=I.x,J=I.y;k=S.x-Q.x;n=S.y-Q.y;var N=Q.x+H*k,L=Q.y+H*n,O=Math.sqrt(k*k+n*n);k/=O;n/=O;N-=J*n;L+=J*k;var ba=c.view.getRelativePoint(M,N,L);I.x=ba.x;I.y=ba.y}}}}catch(W){throw console.log(W),W;}finally{a.endUpdate()}g+=this.processPage(c,B+1)}y&&y(g+"</mxfile>")}catch(W){z&&z(W)}};mxGraphMlCodec.prototype.initializeKeys=function(g){var y=this.getDirectChildNamedElements(g,mxGraphMlConstants.KEY);this.nodesKeys={};this.edgesKeys={};this.portsKeys={};this.sharedData={};this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY]={};this.nodesKeys[mxGraphMlConstants.USER_TAGS]={};this.nodesKeys[mxGraphMlConstants.NODE_STYLE]={};this.nodesKeys[mxGraphMlConstants.NODE_LABELS]={};this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS]={};this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY]={};this.edgesKeys[mxGraphMlConstants.EDGE_STYLE]={};this.edgesKeys[mxGraphMlConstants.EDGE_LABELS]={};this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER]={};this.portsKeys[mxGraphMlConstants.PORT_STYLE]={};this.portsKeys[mxGraphMlConstants.PORT_VIEW_STATE]={};for(var z,B=0;B<y.length;B++){var m=this.dataElem2Obj(y[B]),h=m[mxGraphMlConstants.ID],c=m[mxGraphMlConstants.KEY_FOR],a=m[mxGraphMlConstants.KEY_NAME],b=m[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(z=h);a=a?a:b;switch(c){case mxGraphMlConstants.NODE:this.nodesKeys[a]=@@ -15960,20 +15959,20 @@ break;case "bpmnOutline":c=mxGraphMlShapesMap.bpmnOutline[h.toLowerCase()];breakmxGraphMlCodec.prototype.importGraph=function(g,y,z){for(var B=this.getDirectChildNamedElements(g,mxGraphMlConstants.NODE),m=z,h=0,c=0;m&&m.geometry;)h+=m.geometry.x,c+=m.geometry.y,m=m.parent;for(m=0;m<B.length;m++)this.importNode(B[m],y,z,h,c);this.edges.push({edges:this.getDirectChildNamedElements(g,mxGraphMlConstants.EDGE),parent:z,dx:h,dy:c})};mxGraphMlCodec.prototype.importPort=function(g,y){var z=g.getAttribute(mxGraphMlConstants.PORT_NAME),B={};g=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA);for(var m=0;m<g.length;m++){var h=g[m];h.getAttribute(mxGraphMlConstants.KEY);h=this.dataElem2Obj(h);h.key==this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER].key&&this.mapObject(h,{"y:FreeNodePortLocationModelParameter.Ratio":function(c,a){c=c.split(",");a.pos={x:c[0],y:c[1]}}},B)}y[z]=B};mxGraphMlCodec.prototype.styleMap2Str=function(g){var y="",z="",B;for(B in g)z+=y+B+"="+g[B],y=";";return z};-mxGraphMlCodec.prototype.importNode=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),c=g.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);y.addCell(a,z);z={graphMlID:c};for(var b=null,d=null,f=null,k=null,n=0;n<h.length;n++){var p=this.dataElem2Obj(h[n]);if(p.key)if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,p,B,m);else if(p.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)f=-p;else if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)b=p,p["yjs:StringTemplateNodeStyle"]?d=p["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,p,z);else if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)k=p;else if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var x=b=null;for(x in p)if("key"!=x&&"#text"!=x){if("y:ProxyAutoBoundsNode"==x){if(x=p[x]["y:Realizers"])for(var A in x)if("active"!=A&&"#text"!=A){b=x[A][x.active];p={};p[A]=b;break}}else b=-p[x];break}b&&(b[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,b[mxGraphMlConstants.GEOMETRY],B,m),b[mxGraphMlConstants.NODE_LABEL]&&(k=b[mxGraphMlConstants.NODE_LABEL]));b=p;this.addNodeStyle(a,p,z)}}m=this.getDirectChildNamedElements(g,mxGraphMlConstants.PORT);B={};for(n=0;n<m.length;n++)this.importPort(m[n],B);d&&this.handleTemplates(d,f,a,z);this.handleFixedRatio(a,z);this.handleCompoundShape(a,z,b,null);0==z.strokeWidth&&(z.strokeColor="none");a.style=this.styleMap2Str(z);g=this.getDirectChildNamedElements(g,+mxGraphMlCodec.prototype.importNode=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),c=g.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);y.addCell(a,z);z={graphMlID:c};for(var b=null,d=null,f=null,k=null,n=0;n<h.length;n++){var q=this.dataElem2Obj(h[n]);if(q.key)if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,q,B,m);else if(q.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)f=+q;else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)b=q,q["yjs:StringTemplateNodeStyle"]?d=q["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,q,z);else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)k=q;else if(q.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var t=b=null;for(t in q)if("key"!=t&&"#text"!=t){if("y:ProxyAutoBoundsNode"==t){if(t=q[t]["y:Realizers"])for(var A in t)if("active"!=A&&"#text"!=A){b=t[A][t.active];q={};q[A]=b;break}}else b=+q[t];break}b&&(b[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,b[mxGraphMlConstants.GEOMETRY],B,m),b[mxGraphMlConstants.NODE_LABEL]&&(k=b[mxGraphMlConstants.NODE_LABEL]));b=q;this.addNodeStyle(a,q,z)}}m=this.getDirectChildNamedElements(g,mxGraphMlConstants.PORT);B={};for(n=0;n<m.length;n++)this.importPort(m[n],B);d&&this.handleTemplates(d,f,a,z);this.handleFixedRatio(a,z);this.handleCompoundShape(a,z,b,null);0==z.strokeWidth&&(z.strokeColor="none");a.style=this.styleMap2Str(z);g=this.getDirectChildNamedElements(g,mxGraphMlConstants.GRAPH);for(n=0;n<g.length;n++)this.importGraph(g[n],y,a,B);k&&this.addLabels(a,k,z,y);this.nodesMap[c]={node:a,ports:B}};-mxGraphMlCodec.prototype.addNodeStyle=function(g,y,z){g=function(H,I){if("line"!=H){I.dashed=1;switch(H){case "DashDot":H="3 1 1 1";break;case "Dot":H="1 1";break;case "DashDotDot":H="3 1 1 1 1 1";break;case "Dash":H="3 1";break;case "dotted":H="1 3";break;case "dashed":H="5 2";break;default:H=H.replace(/0/g,"1")}H&&(0>H.indexOf(" ")&&(H=H+" "+H),I.dashPattern=H)}};g={shape:{key:"shape",mod:"shape"},"y:Shape.type":{key:"shape",mod:"shape"},configuration:{key:"shape",mod:"shape"},type:{key:"shape",-mod:"shape"},assetName:{key:"shape",mod:"shape"},activityType:{key:"shape",mod:"shape"},fill:{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"y:Fill":{color:{key:"fillColor",mod:"color"},transparent:function(H,I){"true"==H&&(I.fillColor="none")}},"y:BorderStyle":{color:{key:"strokeColor",mod:"color"},width:"strokeWidth",hasColor:function(H,I){"false"==H&&(I.strokeColor="none")},+mxGraphMlCodec.prototype.addNodeStyle=function(g,y,z){g=function(H,J){if("line"!=H){J.dashed=1;switch(H){case "DashDot":H="3 1 1 1";break;case "Dot":H="1 1";break;case "DashDotDot":H="3 1 1 1 1 1";break;case "Dash":H="3 1";break;case "dotted":H="1 3";break;case "dashed":H="5 2";break;default:H=H.replace(/0/g,"1")}H&&(0>H.indexOf(" ")&&(H=H+" "+H),J.dashPattern=H)}};g={shape:{key:"shape",mod:"shape"},"y:Shape.type":{key:"shape",mod:"shape"},configuration:{key:"shape",mod:"shape"},type:{key:"shape",+mod:"shape"},assetName:{key:"shape",mod:"shape"},activityType:{key:"shape",mod:"shape"},fill:{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"y:Fill":{color:{key:"fillColor",mod:"color"},transparent:function(H,J){"true"==H&&(J.fillColor="none")}},"y:BorderStyle":{color:{key:"strokeColor",mod:"color"},width:"strokeWidth",hasColor:function(H,J){"false"==H&&(J.strokeColor="none")},type:g},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:g,"dashStyle.yjs:DashStyle.dashes":g,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"}};var B=mxUtils.clone(g);B.defaults={fillColor:"#CCCCCC",strokeColor:"#6881B3"};var m=mxUtils.clone(g);m.defaults={shape:"ext;rounded=1",fillColor:"#FFFFFF",strokeColor:"#000090"};var h=mxUtils.clone(g);h.defaults={shape:"rhombus;fillColor=#FFFFFF;strokeColor=#FFCD28"};var c=mxUtils.clone(g);c.defaults={shape:"hexagon",strokeColor:"#007000"};var a=mxUtils.clone(g);a.defaults={shape:"mxgraph.bpmn.shape;perimeter=ellipsePerimeter;symbol=general",outline:"standard"};a.characteristic={key:"outline",mod:"bpmnOutline"};var b=mxUtils.clone(g);b.defaults={shape:"js:bpmnDataObject"};var d=mxUtils.clone(g);d.defaults={shape:"datastore"};var f=mxUtils.clone(g);f.defaults={shape:"swimlane;swimlaneLine=0;startSize=20;dashed=1;dashPattern=3 1 1 1;collapsible=0;rounded=1"};var k=-mxUtils.clone(g);k.defaults={shape:"js:BpmnChoreography"};var n=mxUtils.clone(g);n.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};n.inset="strokeWidth";n.radius="arcSize";n.drawShadow={key:"shadow",mod:"bool"};n.color={key:"fillColor",mod:"color",addGradient:"north"};n["color.yjs:Color.value"]=n.color;var p=mxUtils.clone(g);p.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};p.drawShadow={key:"shadow",mod:"bool"};var x=mxUtils.clone(g);x.defaults={shape:"swimlane",-startSize:20,strokeWidth:4,spacingLeft:10};x.isCollapsible={key:"collapsible",mod:"bool"};x.borderColor={key:"strokeColor",mod:"color"};x.folderFrontColor={key:"fillColor",mod:"color"};var A=mxUtils.clone(g);A.defaults={shape:"swimlane",startSize:20,spacingLeft:10};A["yjs:PanelNodeStyle"]={color:{key:"swimlaneFillColor",mod:"color"},"color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},labelInsetsColor:{key:"fillColor",mod:"color"},"labelInsetsColor.yjs:Color.value":{key:"fillColor",mod:"color"}};-var C=mxUtils.clone(g);C.defaults={shape:"js:table"};var J=mxUtils.clone(g);J.defaults={shape:"image"};J.image=function(H,I){I.image=H};var M=mxUtils.clone(g);M.defaults={shape:"image"};M["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(H,I){I.image="data:image/svg+xml,"+(window.btoa?btoa(H):Base64.encode(H))};var L=mxUtils.clone(g);L.defaults={shape:"swimlane",startSize:20};L["y:Shape.type"]=function(H,I){"roundrectangle"==H&&(I.rounded=1,I.arcSize=5)};var Q=mxUtils.clone(g);Q.defaults={shape:"js:table2"};-var U=mxUtils.clone(g);U.defaults={gradientDirection:"east"};U["y:Fill"].color2={key:"gradientColor",mod:"color"};U["y:StyleProperties.y:Property"]={"com.yworks.bpmn.characteristic":{key:"outline",mod:"bpmnOutline"},"com.yworks.bpmn.icon.fill":{key:"gradientColor",mod:"color"},"com.yworks.bpmn.icon.fill2":{key:"fillColor",mod:"color"},"com.yworks.bpmn.type":{key:"symbol",mod:"bpmnSymbol"},"y.view.ShadowNodePainter.SHADOW_PAINTING":{key:"shadow",mod:"bool"},doubleBorder:{key:"double",mod:"bool"},"com.yworks.sbgn.style.radius":{key:"arcSize",-mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(y,{"yjs:ShapeNodeStyle":g,"demostyle:FlowchartNodeStyle":g,"demostyle:AssetNodeStyle":B,"bpmn:ActivityNodeStyle":m,"bpmn:GatewayNodeStyle":h,"bpmn:ConversationNodeStyle":c,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":b,"bpmn:DataStoreNodeStyle":d,"bpmn:GroupNodeStyle":f,"bpmn:ChoreographyNodeStyle":k,"yjs:BevelNodeStyle":n,"yjs:ShinyPlateNodeStyle":p,"demostyle:DemoGroupStyle":x,"yjs:CollapsibleNodeStyleDecorator":A,-"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":J,"y:ShapeNode":g,"y:GenericNode":U,"y:GenericGroupNode":U,"y:TableNode":Q,"y:SVGNode":M,"y:GroupNode":L},z)};+mxUtils.clone(g);k.defaults={shape:"js:BpmnChoreography"};var n=mxUtils.clone(g);n.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};n.inset="strokeWidth";n.radius="arcSize";n.drawShadow={key:"shadow",mod:"bool"};n.color={key:"fillColor",mod:"color",addGradient:"north"};n["color.yjs:Color.value"]=n.color;var q=mxUtils.clone(g);q.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};q.drawShadow={key:"shadow",mod:"bool"};var t=mxUtils.clone(g);t.defaults={shape:"swimlane",+startSize:20,strokeWidth:4,spacingLeft:10};t.isCollapsible={key:"collapsible",mod:"bool"};t.borderColor={key:"strokeColor",mod:"color"};t.folderFrontColor={key:"fillColor",mod:"color"};var A=mxUtils.clone(g);A.defaults={shape:"swimlane",startSize:20,spacingLeft:10};A["yjs:PanelNodeStyle"]={color:{key:"swimlaneFillColor",mod:"color"},"color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},labelInsetsColor:{key:"fillColor",mod:"color"},"labelInsetsColor.yjs:Color.value":{key:"fillColor",mod:"color"}};+var C=mxUtils.clone(g);C.defaults={shape:"js:table"};var I=mxUtils.clone(g);I.defaults={shape:"image"};I.image=function(H,J){J.image=H};var M=mxUtils.clone(g);M.defaults={shape:"image"};M["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(H,J){J.image="data:image/svg+xml,"+(window.btoa?btoa(H):Base64.encode(H))};var K=mxUtils.clone(g);K.defaults={shape:"swimlane",startSize:20};K["y:Shape.type"]=function(H,J){"roundrectangle"==H&&(J.rounded=1,J.arcSize=5)};var Q=mxUtils.clone(g);Q.defaults={shape:"js:table2"};+var S=mxUtils.clone(g);S.defaults={gradientDirection:"east"};S["y:Fill"].color2={key:"gradientColor",mod:"color"};S["y:StyleProperties.y:Property"]={"com.yworks.bpmn.characteristic":{key:"outline",mod:"bpmnOutline"},"com.yworks.bpmn.icon.fill":{key:"gradientColor",mod:"color"},"com.yworks.bpmn.icon.fill2":{key:"fillColor",mod:"color"},"com.yworks.bpmn.type":{key:"symbol",mod:"bpmnSymbol"},"y.view.ShadowNodePainter.SHADOW_PAINTING":{key:"shadow",mod:"bool"},doubleBorder:{key:"double",mod:"bool"},"com.yworks.sbgn.style.radius":{key:"arcSize",+mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(y,{"yjs:ShapeNodeStyle":g,"demostyle:FlowchartNodeStyle":g,"demostyle:AssetNodeStyle":B,"bpmn:ActivityNodeStyle":m,"bpmn:GatewayNodeStyle":h,"bpmn:ConversationNodeStyle":c,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":b,"bpmn:DataStoreNodeStyle":d,"bpmn:GroupNodeStyle":f,"bpmn:ChoreographyNodeStyle":k,"yjs:BevelNodeStyle":n,"yjs:ShinyPlateNodeStyle":q,"demostyle:DemoGroupStyle":t,"yjs:CollapsibleNodeStyleDecorator":A,+"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":I,"y:ShapeNode":g,"y:GenericNode":S,"y:GenericGroupNode":S,"y:TableNode":Q,"y:SVGNode":M,"y:GroupNode":K},z)};mxGraphMlCodec.prototype.handleTemplates=function(g,y,z,B){if(g){var m=z.geometry.width,h=z.geometry.height;z='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+m+" "+h+'"><g>';for(var c,a=[],b=/\{TemplateBinding\s+([^}]+)\}/g;null!=(c=b.exec(g));){var d="";switch(c[1]){case "width":d=m;break;case "height":d=h}a.push({match:c[0],repl:d})}if(y&&y["y:Json"])for(y=JSON.parse(y["y:Json"]["#text"]),m=/\{Binding\s+([^}]+)\}/g;null!=(c=m.exec(g));)if(h=c[1].split(","),b=y[h[0]])1<h.length&&h[1].indexOf("Converter=")&&(d=mxGraphMlConverters[h[1].substr(11)])&&(b=[b],h[2]&&b.push(h[2].substr(11)),b=d.apply(null,b)),a.push({match:c[0],repl:mxUtils.htmlEntities(b)});for(c=0;c<a.length;c++)g=g.replace(a[c].match,a[c].repl);a=[];for(y=/<text.+data-content="([^"]+).+<\/text>/g;null!=(c=y.exec(g));)b=c[0].substr(0,c[0].length-7)+c[1]+"</text>",a.push({match:c[0],repl:b});for(c=0;c<a.length;c++)g=g.replace(a[c].match,a[c].repl);g=z+g+"</g></svg>";B.shape="image";B.image="data:image/svg+xml,"+(window.btoa?btoa(g):Base64.encode(g))}};@@ -15991,16 +15990,16 @@ mod:"color"},thickness:"strokeWidth"}},"backgroundStyle.yjs:ShapeNodeStyle.fill""Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",mod:"color"},backgroundFill:{key:"oddLaneFill",mod:"color"}}},"Style.yjs:NodeStyleStripeStyleAdapter":{"demotablestyle:DemoStripeStyle":{"stripeInsetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableLineFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"strokeColor",mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(B.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":n},k);c={};b={Insets:function(A,C){C.startSize=A.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",mod:"color"},backgroundFill:{key:"oddLaneFill",mod:"color"}}},"Style.yjs:NodeStyleStripeStyleAdapter":{"demotablestyle:DemoStripeStyle":{"stripeInsetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableLineFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"strokeColor",mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"width"};this.mapObject(B.ColumnDefaults,{defaults:{shape:"swimlane;collapsible=0",startSize:"0",fillColor:"none"},-"y:StripeDefaults":b},c);h=g.geometry;a=B.Rows["y:Row"];d+=parseFloat(c.startSize);var p=f.x,x=f.x;f.lx=f.x;if(a)for(a instanceof Array||(a=[a]),h=0;h<a.length;h++)f.x=x,f.lx=x,d=this.addRow(a[h],g,h&1,d,f,n,k),p=Math.max(f.x,p);B=B.Columns["y:Column"];a=p;if(B)for(B instanceof Array||(B=[B]),h=0;h<B.length;h++)a=this.addColumn(B[h],g,h&1,a,z,b,c);break;case "js:table2":y.shape="swimlane;collapsible=0;swimlaneLine=0";B={};this.mapObject(z,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor",+"y:StripeDefaults":b},c);h=g.geometry;a=B.Rows["y:Row"];d+=parseFloat(c.startSize);var q=f.x,t=f.x;f.lx=f.x;if(a)for(a instanceof Array||(a=[a]),h=0;h<a.length;h++)f.x=t,f.lx=t,d=this.addRow(a[h],g,h&1,d,f,n,k),q=Math.max(f.x,q);B=B.Columns["y:Column"];a=q;if(B)for(B instanceof Array||(B=[B]),h=0;h<B.length;h++)a=this.addColumn(B[h],g,h&1,a,z,b,c);break;case "js:table2":y.shape="swimlane;collapsible=0;swimlaneLine=0";B={};this.mapObject(z,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor",mod:"color"},"yed.table.header.height":"headerH","yed.table.header.color.main":{key:"headerColor",mod:"color"},"yed.table.header.color.alternating":{key:"headerColorAlt",mod:"color"},"yed.table.lane.color.main":{key:"laneColor",mod:"color"},"yed.table.lane.color.alternating":{key:"laneColorAlt",mod:"color"},"yed.table.lane.style":"laneStyle","com.yworks.bpmn.type":"isHorz",POOL_LANE_COLOR_ALTERNATING:{key:"laneColorAlt",mod:"color"},POOL_LANE_COLOR_MAIN:{key:"laneColor",mod:"color"},POOL_LANE_STYLE:"laneStyle",POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},B);y.swimlaneFillColor=y.fillColor;n=c=0;"pool_type_lane_and_column"==B.isHorz||"pool_type_empty"==B.isHorz||"pool_type_lane"==B.isHorz?n=parseFloat(B.tblHWidth):c=parseFloat(B.tblHHeight);y.startSize=c?c:n;try{a=z["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];b=z["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];d="lane.style.rows"==B.laneStyle||"lane_style_rows"==B.laneStyle;a instanceof Array||(a=[a]);b instanceof Array||(b=[b]);f=parseFloat(B.rowHWidth);for(h=0;h<a.length;h++)a[h]["y:Insets"]&&(f=Math.max(f,parseFloat(a[h]["y:Insets"].left)+parseFloat(a[h]["y:Insets"].right)));k=parseFloat(B.colHHeight);for(h=0;h<b.length;h++)b[h]["y:Insets"]&&(k=Math.max(k,parseFloat(b[h]["y:Insets"].top)+parseFloat(b[h]["y:Insets"].bottom)));d?(this.addTbl2Rows(g,a,c,n,f,k,d,B),this.addTbl2Cols(g,b,c,n,f,k,d,B)):(this.addTbl2Cols(g,b,c,n,f,k,d,B),this.addTbl2Rows(g,a,c,n,f,k,d,B))}catch(A){}break;case "js:relationship_big_entity":y.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(g=z["y:GenericNode"]["y:Fill"])y.fillColor=g.color2,y.swimlaneFillColor=g.color;break;case "js:relationship_attribute":y.shape="1"==y["double"]?"doubleEllipse":"ellipse"}0<m.indexOf("Shadow")&&(y.shadow="1")}};-mxGraphMlCodec.prototype.addTbl2Rows=function(g,y,z,B,m,h,c,a){z+=h;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0;horizontal=0",startSize:m,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none",n.swimlaneLine="0");if(c){var p=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=p?p:n.swimlaneFillColor}f=parseFloat(y[d].height);p=b&&0==d?h:0;-k.geometry=new mxGeometry(B,z-p,g.geometry.width-B,f+p);z+=f;k.style=this.styleMap2Str(n);g.insert(k)}};-mxGraphMlCodec.prototype.addTbl2Cols=function(g,y,z,B,m,h,c,a){B=m+B;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0",startSize:h,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none");if(!c){var p=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=p?p:n.swimlaneFillColor}f=parseFloat(y[d].width);p=b&&0==d?m:0;k.geometry=new mxGeometry(B-p,-z,f+p,g.geometry.height-z);B+=f;k.style=this.styleMap2Str(n);g.insert(k)}};+mxGraphMlCodec.prototype.addTbl2Rows=function(g,y,z,B,m,h,c,a){z+=h;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0;horizontal=0",startSize:m,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none",n.swimlaneLine="0");if(c){var q=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=q?q:n.swimlaneFillColor}f=parseFloat(y[d].height);q=b&&0==d?h:0;+k.geometry=new mxGeometry(B,z-q,g.geometry.width-B,f+q);z+=f;k.style=this.styleMap2Str(n);g.insert(k)}};+mxGraphMlCodec.prototype.addTbl2Cols=function(g,y,z,B,m,h,c,a){B=m+B;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0",startSize:h,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none");if(!c){var q=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=q?q:n.swimlaneFillColor}f=parseFloat(y[d].width);q=b&&0==d?m:0;k.geometry=new mxGeometry(B-q,+z,f+q,g.geometry.height-z);B+=f;k.style=this.styleMap2Str(n);g.insert(k)}};mxGraphMlCodec.prototype.addRow=function(g,y,z,B,m,h,c){var a=new mxCell;a.vertex=!0;var b=mxUtils.clone(c);this.mapObject(g,h,b);z?(b.oddFill&&(b.fillColor=b.oddFill),b.oddLaneFill&&(b.swimlaneFillColor=b.oddLaneFill)):(b.evenFill&&(b.fillColor=b.evenFill),b.evenLaneFill&&(b.swimlaneFillColor=b.evenLaneFill));z=parseFloat(b.height);a.geometry=new mxGeometry(m.lx,B,y.geometry.width-m.lx,z);var d=g.Labels;d&&this.addLabels(a,d,b);a.style=this.styleMap2Str(b);y.insert(a);g=g["y:Row"];m.lx=0;b.startSize&&(m.lx=parseFloat(b.startSize),m.x+=m.lx);y=b=m.x;d=m.lx;var f=0;if(g){g instanceof Array||(g=[g]);for(var k=0;k<g.length;k++)m.x=b,m.lx=d,f=this.addRow(g[k],a,k&1,f,m,h,c),y=Math.max(m.x,y)}m.x=y;z=Math.max(z,f);a.geometry.height=z;return B+=z};mxGraphMlCodec.prototype.addColumn=function(g,y,z,B,m,h,c){var a=new mxCell;a.vertex=!0;var b=mxUtils.clone(c);this.mapObject(g,h,b);z?(b.oddFill&&(b.fillColor=b.oddFill),b.oddLaneFill&&(b.swimlaneFillColor=b.oddLaneFill)):(b.evenFill&&(b.fillColor=b.evenFill),b.evenLaneFill&&(b.swimlaneFillColor=b.evenLaneFill));z=parseFloat(b.width);a.geometry=new mxGeometry(B,m,z,y.geometry.height-m);var d=g.Labels;d&&this.addLabels(a,d,b);a.style=this.styleMap2Str(b);y.insert(a);g=g["y:Column"];y=0;if(g)for(g instanceof@@ -16016,16 +16015,16 @@ mxGraphMlCodec.prototype.addEdgeStyle=function(g,y,z){g=function(a,b){b.dashed=1h={defaults:{rounded:0,endArrow:"none"},configuration:{key:"shape",mod:"shape"},"y:LineStyle":{color:{key:"strokeColor",mod:"color"},type:function(a,b){"line"!=a&&(b.dashed=1);var d=null;switch(a){case "dashed":d="3 1";break;case "dotted":d="1 1";break;case "dashed_dotted":d="3 2 1 2"}d&&(b.dashPattern=d)},width:"strokeWidth"},"y:Arrows":{source:function(a,b){b.startArrow=mxGraphMlArrowsMap[a]||"classic";m(a,b)},target:function(a,b){b.endArrow=mxGraphMlArrowsMap[a]||"classic";B(a,b)}},"y:BendStyle":{smoothed:{key:"rounded",mod:"bool"}}},c=mxUtils.clone(h);c.defaults.curved="1";this.mapObject(y,{"yjs:PolylineEdgeStyle":{defaults:{endArrow:"none",rounded:0},smoothingLength:function(a,b){b.rounded=a&&0<parseFloat(a)?"1":"0"},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:g,"dashStyle.yjs:DashStyle.dashes":g,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"},targetArrow:{key:"endArrow",mod:"arrow"},"targetArrow.yjs:Arrow":{defaults:{endArrow:"classic",endFill:"1",endSize:"6"},fill:B,scale:{key:"endSize",mod:"scale",scale:5},type:{key:"endArrow",mod:"arrow"}},sourceArrow:{key:"startArrow",mod:"arrow"},"sourceArrow.yjs:Arrow":{defaults:{startArrow:"classic",startFill:"1",startSize:"6"},fill:m,scale:{key:"startSize",mod:"scale",scale:5},type:{key:"startArrow",mod:"arrow"}}},"y:PolyLineEdge":h,"y:GenericEdge":h,"y:ArcEdge":c,"y:BezierEdge":c,"y:QuadCurveEdge":c,"y:SplineEdge":c},z)};-mxGraphMlCodec.prototype.addLabels=function(g,y,z,B,m){z=g.getChildCount();var h=y[mxGraphMlConstants.Y_LABEL]||y;y=[];var c=[],a=[];if(h){h instanceof Array||(h=[h]);for(var b=0;b<h.length;b++){var d=h[b],f={},k=d[mxGraphMlConstants.TEXT]||d;k&&(k=k["#text"]);var n=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},p=function(L,Q){L&&(L=L.toUpperCase());var U=Q.fontStyle||0;switch(L){case "ITALIC":U|=2;break;case "BOLD":U|=1;break;case "UNDERLINE":U|=4}Q.fontStyle=U};this.mapObject(d,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor",-mod:"color"},"backgroundFill.yjs:SolidColorFill.color":{key:"labelBackgroundColor",mod:"color"},backgroundStroke:{key:"labelBorderColor",mod:"color"},"backgroundStroke.yjs:Stroke.fill":{key:"labelBorderColor",mod:"color"},textFill:{key:"fontColor",mod:"color"},"textFill.yjs:SolidColorFill.color":{key:"fontColor",mod:"color"},textSize:"fontSize",horizontalTextAlignment:"align",verticalTextAlignment:"verticalAlign",wrapping:function(L,Q){L&&(Q.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",-fontSize:"fontSize",fontStyle:p,fontWeight:p,textDecoration:p}},"Style.y:VoidLabelStyle":function(L,Q){Q.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:p,underlinedText:function(L,Q){var U=Q.fontStyle||0;"true"==L&&(U|=4);Q.fontStyle=U},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},f);f.VoidLbl||"0"==f.hasText||(y.push(k),c.push(f),a.push(n))}}for(b=+mxGraphMlCodec.prototype.addLabels=function(g,y,z,B,m){z=g.getChildCount();var h=y[mxGraphMlConstants.Y_LABEL]||y;y=[];var c=[],a=[];if(h){h instanceof Array||(h=[h]);for(var b=0;b<h.length;b++){var d=h[b],f={},k=d[mxGraphMlConstants.TEXT]||d;k&&(k=k["#text"]);var n=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},q=function(K,Q){K&&(K=K.toUpperCase());var S=Q.fontStyle||0;switch(K){case "ITALIC":S|=2;break;case "BOLD":S|=1;break;case "UNDERLINE":S|=4}Q.fontStyle=S};this.mapObject(d,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor",+mod:"color"},"backgroundFill.yjs:SolidColorFill.color":{key:"labelBackgroundColor",mod:"color"},backgroundStroke:{key:"labelBorderColor",mod:"color"},"backgroundStroke.yjs:Stroke.fill":{key:"labelBorderColor",mod:"color"},textFill:{key:"fontColor",mod:"color"},"textFill.yjs:SolidColorFill.color":{key:"fontColor",mod:"color"},textSize:"fontSize",horizontalTextAlignment:"align",verticalTextAlignment:"verticalAlign",wrapping:function(K,Q){K&&(Q.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",+fontSize:"fontSize",fontStyle:q,fontWeight:q,textDecoration:q}},"Style.y:VoidLabelStyle":function(K,Q){Q.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:q,underlinedText:function(K,Q){var S=Q.fontStyle||0;"true"==K&&(S|=4);Q.fontStyle=S},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},f);f.VoidLbl||"0"==f.hasText||(y.push(k),c.push(f),a.push(n))}}for(b=0;b<y.length;b++)if(y[b]&&(!a[b]||!a[b]["bpmn:ParticipantParameter"])){y[b]=mxUtils.htmlEntities(y[b],!1).replace(/\n/g,"<br/>");n=g.geometry;f=new mxCell(y[b],new mxGeometry(0,0,n.width,n.height),"text;html=1;spacing=0;"+this.styleMap2Str(c[b]));f.vertex=!0;g.insert(f,z);h=f.geometry;if(a[b]["y:RatioAnchoredLabelModelParameter"])n=mxUtils.getSizeForString(y[b],c[b].fontSize,c[b].fontFamily),(d=a[b]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(d=d.split(","),h.x=parseFloat(d[0]),h.y=parseFloat(d[1]),h.width=n.width,h.height=n.height,f.style+=";spacingTop=-4;"):f.style+=";align=center;";else if(a[b]["y:InteriorLabelModel"]){switch(a[b]["y:InteriorLabelModel"]){case "Center":f.style+=";verticalAlign=middle;";break;case "North":h.height=1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90"}f.style+=";align=center;"}else if(a[b]["y:StretchStripeLabelModel"]||a[b]["y:StripeLabelModelParameter"])switch(a[b]["y:StretchStripeLabelModel"]||a[b]["y:StripeLabelModelParameter"].Position){case "North":h.height=1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}else if(a[b]["bpmn:PoolHeaderLabelModel"]){switch(a[b]["bpmn:PoolHeaderLabelModel"]){case "NORTH":h.height=1;break;case "WEST":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}f.style+=";align=center;"}else if(a[b]["y:InteriorStretchLabelModelParameter"])f.style+=";align=center;";else if(a[b]["y:ExteriorLabelModel"])switch(a[b]["y:ExteriorLabelModel"]){case "East":f.style+=";labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;";break;case "South":f.style+=";labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;";break;case "North":f.style+=";labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;";break;case "West":f.style+=";labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;"}else if(a[b]["y:FreeEdgeLabelModelParameter"]){h.relative=!0;h.adjustIt=!0;n=a[b]["y:FreeEdgeLabelModelParameter"];-d=n.Ratio;p=n.Distance;var x=n.Angle;d&&(h.x=parseFloat(d));p&&(h.y=parseFloat(p));x&&(f.style+=";rotation="+parseFloat(x)*(180/Math.PI));f.style+=";verticalAlign=middle;"}else if(a[b]["y:EdgePathLabelModelParameter"]){h.relative=!0;n=a[b]["y:EdgePathLabelModelParameter"];k=n.SideOfEdge;d=n.SegmentRatio;h.x=d?2*parseFloat(d)-1:0;if(k)switch(k){case "RightOfEdge":h.y=-15;break;case "LeftOfEdge":h.y=15}f.style+=";verticalAlign=middle;"}else if(n=parseFloat(a[b].x),d=parseFloat(a[b].y),a[b].width&&(h.width=-parseFloat(a[b].width)),a[b].height&&(h.height=parseFloat(a[b].height)),g.edge)if(h.relative=!0,h.x=0,h.y=0,f=g.source.geometry.getCenterX()-g.target.geometry.getCenterX(),k=g.source.geometry.getCenterY()-g.target.geometry.getCenterY(),B&&m&&a[b]["y:ModelParameter"]&&a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){n=a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"];x=parseFloat(n.angle);p=parseFloat(n.distance);var A=n.position;d=parseFloat(n.ratio);n=parseFloat(n.segment);var C=-new mxCellState;C.absolutePoints=m;B.view.updateEdgeBounds(C);var J="left"==A?1:-1;if(-1==n&&6.283185307179586==x)h.offset=new mxPoint(1>Math.abs(d)?C.segments[0]*d:d,J*p);else{-1==n&&(n=0);for(var M=x=0;M<n;M++)x+=C.segments[M];x+=C.segments[n]*d;h.x=x/C.length*2-1;h.y=(("center"==A?0:p)+h.height/2*J*(Math.abs(f)>Math.abs(k)?1:-1))*J}}else isNaN(n)||isNaN(d)||(h.offset=new mxPoint(n+f/2+(0<f?-h.width:h.width),d));else h.x=n||0,h.y=d||0;c[b].rotation&&270==c[b].rotation&&(h.x-=h.height/2)}return{lblTxts:y,+d=n.Ratio;q=n.Distance;var t=n.Angle;d&&(h.x=parseFloat(d));q&&(h.y=parseFloat(q));t&&(f.style+=";rotation="+parseFloat(t)*(180/Math.PI));f.style+=";verticalAlign=middle;"}else if(a[b]["y:EdgePathLabelModelParameter"]){h.relative=!0;n=a[b]["y:EdgePathLabelModelParameter"];k=n.SideOfEdge;d=n.SegmentRatio;h.x=d?2*parseFloat(d)-1:0;if(k)switch(k){case "RightOfEdge":h.y=-15;break;case "LeftOfEdge":h.y=15}f.style+=";verticalAlign=middle;"}else if(n=parseFloat(a[b].x),d=parseFloat(a[b].y),a[b].width&&(h.width=+parseFloat(a[b].width)),a[b].height&&(h.height=parseFloat(a[b].height)),g.edge)if(h.relative=!0,h.x=0,h.y=0,f=g.source.geometry.getCenterX()-g.target.geometry.getCenterX(),k=g.source.geometry.getCenterY()-g.target.geometry.getCenterY(),B&&m&&a[b]["y:ModelParameter"]&&a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){n=a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"];t=parseFloat(n.angle);q=parseFloat(n.distance);var A=n.position;d=parseFloat(n.ratio);n=parseFloat(n.segment);var C=+new mxCellState;C.absolutePoints=m;B.view.updateEdgeBounds(C);var I="left"==A?1:-1;if(-1==n&&6.283185307179586==t)h.offset=new mxPoint(1>Math.abs(d)?C.segments[0]*d:d,I*q);else{-1==n&&(n=0);for(var M=t=0;M<n;M++)t+=C.segments[M];t+=C.segments[n]*d;h.x=t/C.length*2-1;h.y=(("center"==A?0:q)+h.height/2*I*(Math.abs(f)>Math.abs(k)?1:-1))*I}}else isNaN(n)||isNaN(d)||(h.offset=new mxPoint(n+f/2+(0<f?-h.width:h.width),d));else h.x=n||0,h.y=d||0;c[b].rotation&&270==c[b].rotation&&(h.x-=h.height/2)}return{lblTxts:y,lblStyles:c}};mxGraphMlCodec.prototype.processPage=function(g,y){g=(new mxCodec).encode(g.getModel());g.setAttribute("style","default-style2");g=mxUtils.getXml(g);y='<diagram name="Page '+y+'">'+Graph.compress(g);return y+"</diagram>"};mxGraphMlCodec.prototype.getDirectChildNamedElements=function(g,y){var z=[];for(g=g.firstChild;null!=g;g=g.nextSibling)null!=g&&1==g.nodeType&&y==g.nodeName&&z.push(g);return z};mxGraphMlCodec.prototype.getDirectFirstChildNamedElements=function(g,y){for(g=g.firstChild;null!=g;g=g.nextSibling)if(null!=g&&1==g.nodeType&&y==g.nodeName)return g;return null};mxGraphMlCodec.prototype.getDirectChildElements=function(g){var y=[];for(g=g.firstChild;null!=g;g=g.nextSibling)null!=g&&1==g.nodeType&&y.push(g);return y};mxGraphMlCodec.prototype.getDirectFirstChildElement=function(g){for(g=g.firstChild;null!=g;g=g.nextSibling)if(null!=g&&1==g.nodeType)return g;return null};var mxGraphMlConverters={"orgchartconverters.linebreakconverter":function(g,y){if("string"===typeof g){for(var z=g;20<z.length&&-1<z.indexOf(" ");)z=z.substring(0,z.lastIndexOf(" "));return"true"===y?z:g.substring(z.length)}return""},"orgchartconverters.borderconverter":function(g,y){return"boolean"===typeof g?g?"#FFBB33":"rgba(0,0,0,0)":"#FFF"},"orgchartconverters.addhashconverter":function(g,y){return"string"===typeof g?"string"===typeof y?"#"+g+y:"#"+g:g},"orgchartconverters.intermediateconverter":function(g,diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.jsindex 0573bc2e9..be47571f7 100644--- a/src/main/webapp/js/viewer-static.min.js+++ b/src/main/webapp/js/viewer-static.min.js@@ -30,7 +30,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);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"26.0.7",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.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.9",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&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.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||@@ -1875,8 +1875,8 @@ var mxStylesheetCodec=mxCodecRegistry.register(function(){var a=new mxObjectCodefunction(b,c){b=typeof c;"function"==b?c=mxStyleRegistry.getName(c):"object"==b&&(c=null);return c};a.decode=function(b,c,d){d=d||new this.template.constructor;var e=c.getAttribute("id");null!=e&&(b.objects[e]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(b,c,d)&&"add"==c.nodeName&&(e=c.getAttribute("as"),null!=e)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),g={});for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var k=f.getAttribute("as");if("add"==f.nodeName){var l=mxUtils.getTextContent(f);null!=l&&0<l.length&&mxStylesheetCodec.allowEval?l=mxUtils.eval(l):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[k]=l)}else"remove"==f.nodeName&&delete g[k]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());mxStylesheetCodec.allowEval=!1;var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};$jscomp.arrayIteratorImpl=function(b){var e=0;return function(){return e<b.length?{done:!1,value:b[e++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var e="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return e?e.call(b):$jscomp.arrayIterator(b)};-Editor=function(b,e,g,m,v){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=m||this.createGraph(e,g);this.editable=null!=v?v:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(p,A){this.status=p;this.statusFunction=A;this.fireEvent(new mxEventObject("statusChanged"))};-this.getStatus=function(){return this.status};this.graphChangeListener=function(p,A){p=null!=A?A.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;+Editor=function(b,e,g,m,u){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=m||this.createGraph(e,g);this.editable=null!=u?u:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(p,B){this.status=p;this.statusFunction=B;this.fireEvent(new mxEventObject("statusChanged"))};+this.getStatus=function(){return this.status};this.graphChangeListener=function(p,B){p=null!=B?B.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;Editor.pageCounter=0;(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(e){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;Editor.smallScreenWidth=1024;Editor.helpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDc4LTI0MHEyMSAwIDM1LjUtMTQuNVQ1MjgtMjkwcTAtMjEtMTQuNS0zNS41VDQ3OC0zNDBxLTIxIDAtMzUuNSAxNC41VDQyOC0yOTBxMCAyMSAxNC41IDM1LjVUNDc4LTI0MFptLTM2LTE1NGg3NHEwLTMzIDcuNS01MnQ0Mi41LTUycTI2LTI2IDQxLTQ5LjV0MTUtNTYuNXEwLTU2LTQxLTg2dC05Ny0zMHEtNTcgMC05Mi41IDMwVDM0Mi02MThsNjYgMjZxNS0xOCAyMi41LTM5dDUzLjUtMjFxMzIgMCA0OCAxNy41dDE2IDM4LjVxMCAyMC0xMiAzNy41VDUwNi01MjZxLTQ0IDM5LTU0IDU5dC0xMCA3M1ptMzggMzE0cS04MyAwLTE1Ni0zMS41VDE5Ny0xOTdxLTU0LTU0LTg1LjUtMTI3VDgwLTQ4MHEwLTgzIDMxLjUtMTU2VDE5Ny03NjNxNTQtNTQgMTI3LTg1LjVUNDgwLTg4MHE4MyAwIDE1NiAzMS41VDc2My03NjNxNTQgNTQgODUuNSAxMjdUODgwLTQ4MHEwIDgzLTMxLjUgMTU2VDc2My0xOTdxLTU0IDU0LTEyNyA4NS41VDQ4MC04MFptMC04MHExMzQgMCAyMjctOTN0OTMtMjI3cTAtMTM0LTkzLTIyN3QtMjI3LTkzcS0xMzQgMC0yMjcgOTN0LTkzIDIyN3EwIDEzNCA5MyAyMjd0MjI3IDkzWm0wLTMyMFoiLz48L3N2Zz4=";Editor.menuImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTMgMThoMTh2LTJIM3Yyem0wLTVoMTh2LTJIM3Yyem0wLTd2MmgxOFY2SDN6Ii8+PC9zdmc+";Editor.moveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=";@@ -1945,17 +1945,17 @@ Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"HaEditor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=[];Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#121212";Editor.darkColorVar="--ge-dark-color";Editor.fontSizeUnit="px";Editor.pageSizeUnit=mxConstants.INCHES;Editor.isDarkMode=function(){return Editor.darkMode};Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};Editor.convertHtmlToText=function(b){if(null!=b){var e=document.createElement("div");e.innerHTML=Graph.sanitizeHtml(b);return mxUtils.extractTextWithWhitespace(e.childNodes)}return null};-Editor.extractGraphModelFromPng=function(b){var e=null;try{var g=b.substring(b.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0);EditorUi.parsePng(m,mxUtils.bind(this,function(v,p,A){v=m.substring(v+8,v+8+A);"zTXt"==p?(A=v.indexOf(String.fromCharCode(0)),"mxGraphModel"==v.substring(0,A)&&(v=pako.inflateRaw(Graph.stringToArrayBuffer(v.substring(A+2)),{to:"string"}).replace(/\+/g," "),null!=v&&0<v.length&&(e=v))):"tEXt"==p&&(v=v.split(String.fromCharCode(0)),1<v.length&&("mxGraphModel"==-v[0]||"mxfile"==v[0])&&(e=v[1]));if(null!=e||"IDAT"==p)return!0}))}catch(v){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};-Editor.soundex=function(b){if(null==b||0==b.length)return"";var e=[],g=1;e[0]=b[0].toUpperCase();for(var m=1,v=b.length;m<v;m++){var p=b[m].toUpperCase().charCodeAt(0)-65;if(0<=p&&25>=p&&"0"!="01230120022455012603010202"[p]&&("01230120022455012603010202"[p]!=e[g-1]&&(e[g]="01230120022455012603010202"[p],g++),3<g))break}if(3>=g)for(;3>=g;)e[g]="0",g++;return e.join("")};+Editor.extractGraphModelFromPng=function(b){var e=null;try{var g=b.substring(b.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0);EditorUi.parsePng(m,mxUtils.bind(this,function(u,p,B){u=m.substring(u+8,u+8+B);"zTXt"==p?(B=u.indexOf(String.fromCharCode(0)),"mxGraphModel"==u.substring(0,B)&&(u=pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(B+2)),{to:"string"}).replace(/\+/g," "),null!=u&&0<u.length&&(e=u))):"tEXt"==p&&(u=u.split(String.fromCharCode(0)),1<u.length&&("mxGraphModel"==+u[0]||"mxfile"==u[0])&&(e=u[1]));if(null!=e||"IDAT"==p)return!0}))}catch(u){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};+Editor.soundex=function(b){if(null==b||0==b.length)return"";var e=[],g=1;e[0]=b[0].toUpperCase();for(var m=1,u=b.length;m<u;m++){var p=b[m].toUpperCase().charCodeAt(0)-65;if(0<=p&&25>=p&&"0"!="01230120022455012603010202"[p]&&("01230120022455012603010202"[p]!=e[g-1]&&(e[g]="01230120022455012603010202"[p],g++),3<g))break}if(3>=g)for(;3>=g;)e[g]="0",g++;return e.join("")};Editor.selectFilename=function(b){var e=b.value.lastIndexOf(".");if(0<e){var g=b.value.substring(e+1);"drawio"!=g&&0<=mxUtils.indexOf(["png","svg","html","xml","pdf"],g)&&(g=b.value.lastIndexOf(".drawio.",e),0<g&&(e=g))}e=0<e?e:b.value.length;Editor.selectSubstring(b,0,e)};Editor.selectSubstring=function(b,e,g){b.focus();"undefined"!=typeof b.selectionStart?(b.selectionStart=e,b.selectionEnd=g):document.selection&&document.selection.createRange&&(b.select(),b=document.selection.createRange(),b.collapse(!0),b.moveEnd("character",g),b.moveStart("character",e),b.select())};Editor.toUnit=function(b,e){return e==mxConstants.INCHES?Math.round(100*b/mxConstants.PIXELS_PER_INCH)/100:e==mxConstants.MILLIMETERS?Math.round(100*b/mxConstants.PIXELS_PER_MM)/100:e==mxConstants.METERS?Math.round(1E3*b/(1E3*mxConstants.PIXELS_PER_MM))/1E3:Math.round(b)};Editor.fromUnit=function(b,e){return e==mxConstants.INCHES?Math.round(b*mxConstants.PIXELS_PER_INCH):e==mxConstants.MILLIMETERS?Math.round(b*mxConstants.PIXELS_PER_MM):e==mxConstants.METERS?Math.round(b*mxConstants.PIXELS_PER_MM*1E3):Math.round(b)};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.origin+window.location.pathname;Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};-Editor.prototype.editAsNew=function(b,e){e=null!=e?"?title="+encodeURIComponent(e):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var g=null,m=mxUtils.bind(this,function(v){"ready"==v.data&&v.source==g&&(mxEvent.removeListener(window,"message",m),g.postMessage(b,"*"))});mxEvent.addListener(window,"message",m);g=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"),-null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,e){b=new Graph(null,e,null,null,b);b.transparentBackground=!1;var g=b.isCssTransformsSupported,m=this;b.isCssTransformsSupported=function(){return g.apply(this,arguments)&&(!m.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(v){return!this.isExternalProtocol(v)});return b};+Editor.prototype.editAsNew=function(b,e){e=null!=e?"?title="+encodeURIComponent(e):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var g=null,m=mxUtils.bind(this,function(u){"ready"==u.data&&u.source==g&&(mxEvent.removeListener(window,"message",m),g.postMessage(b,"*"))});mxEvent.addListener(window,"message",m);g=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"),+null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,e){b=new Graph(null,e,null,null,b);b.transparentBackground=!1;var g=b.isCssTransformsSupported,m=this;b.isCssTransformsSupported=function(){return g.apply(this,arguments)&&(!m.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(u){return!this.isExternalProtocol(u)});return b};Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};Editor.prototype.readGraphState=function(b){var e=b.getAttribute("grid");if(null==e||""==e)e=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=e&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=@@ -1967,203 +1967,202 @@ Editor.prototype.getGraphXml=function(b){if(null!=b?b:1){var e=new mxCodec(mxUtithis.graph.isGridEnabled()?"1":"0");b.setAttribute("gridSize",this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(b){this.modified=b};Editor.prototype.setFilename=function(b){this.filename=b};-Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,v){e.undoableEditHappened(v.getProperty("edit"))};var g=mxUtils.bind(this,function(m,v){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,g);b.getView().addListener(mxEvent.UNDO,g);g=function(m,v){m=v.getProperty("edit").changes;m=b.getSelectionCellsForChanges(m);v=!1;if(0<m.length){for(var p=[],A=0;A<m.length;A++)null!=b.view.getState(m[A])&&(p.push(m[A]),-v||(b.scrollCellToVisible(m[A]),v=!0));b.setSelectionCells(p)}};e.addListener(mxEvent.UNDO,g);e.addListener(mxEvent.REDO,g);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};+Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,u){e.undoableEditHappened(u.getProperty("edit"))};var g=mxUtils.bind(this,function(m,u){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,g);b.getView().addListener(mxEvent.UNDO,g);g=function(m,u){m=u.getProperty("edit").changes;m=b.getSelectionCellsForChanges(m);u=!1;if(0<m.length){for(var p=[],B=0;B<m.length;B++)null!=b.view.getState(m[B])&&(p.push(m[B]),+u||(b.scrollCellToVisible(m[B]),u=!0));b.setSelectionCells(p)}};e.addListener(mxEvent.UNDO,g);e.addListener(mxEvent.REDO,g);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};-function Dialog(b,e,g,m,v,p,A,G,S,F,P){this.editorUi=b;var R=S?57:0,T=g,c=m,f=S?0:64,k=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(k.height=window.innerHeight);var B=k.height;k=Math.max(1,Math.round((k.width-g-f)/2));var z=Math.max(1,Math.round((B-m-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-f):g;m=Math.min(m,B-f);0<b.dialogs.length&&-(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=B+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var C=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=C.x+"px";this.bg.style.top=C.y+"px";k+=C.x;z+=C.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",z+=b.embedViewport.y,k+=b.embedViewport.x);-v&&document.body.appendChild(this.bg);var I=b.createDiv(S?"geTransDialog":"geDialog");v=this.getPosition(k,z,g,m);k=v.x;z=v.y;I.style.width=g+"px";I.style.height=m+"px";I.style.left=k+"px";I.style.top=z+"px";I.style.zIndex=this.zIndex;I.appendChild(e);document.body.appendChild(I);!G&&e.clientHeight>I.clientHeight-f&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),-p.className="geDialogClose",p.style.top=z+14+"px",p.style.left=k+g+38-R+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!P)){var L=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(K){L=!0}),null,mxUtils.bind(this,function(K){L&&(b.hideDialog(!0),L=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=F){var K=F();null!=K&&(T=g=K.w,c=m=K.h)}K=Editor.inlineFullscreen||-null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);B=K.height;this.bg.style.height=B+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");g=null!=document.body?Math.min(T,document.body.scrollWidth-f):T;m=Math.min(c,B-f);K=Math.max(1,Math.round((K.width-g-f)/2));var O=Math.max(1,Math.round((B-m-b.footerHeight)/3));O=this.getPosition(K,O,g,m);K=O.x;O=O.y;var da=mxUtils.getDocumentScrollOrigin(document);K+=da.x;O+=da.y;-Editor.inlineFullscreen||null==b.embedViewport||(O+=b.embedViewport.y,K+=b.embedViewport.x);I.style.left=K+"px";I.style.top=O+"px";I.style.width=g+"px";I.style.height=m+"px";!G&&e.clientHeight>I.clientHeight-f&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=O+14+"px",this.dialogImg.style.left=K+g+38-R+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=A;this.container=-I;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;+function Dialog(b,e,g,m,u,p,B,H,S,G,O){this.editorUi=b;var R=S?57:0,c=g,f=m,l=S?0:64,t=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(t.height=window.innerHeight);var z=t.height;t=Math.max(1,Math.round((t.width-g-l)/2));var C=Math.max(1,Math.round((z-m-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-l):g;m=Math.min(m,z-l);0<b.dialogs.length&&+(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=z+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var F=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=F.x+"px";this.bg.style.top=F.y+"px";t+=F.x;C+=F.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",C+=b.embedViewport.y,t+=b.embedViewport.x);+u&&document.body.appendChild(this.bg);var N=b.createDiv(S?"geTransDialog":"geDialog");u=this.getPosition(t,C,g,m);t=u.x;C=u.y;N.style.width=g+"px";N.style.height=m+"px";N.style.left=t+"px";N.style.top=C+"px";N.style.zIndex=this.zIndex;N.appendChild(e);document.body.appendChild(N);!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),+p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=t+g+38-R+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!O)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(I){K=!0}),null,mxUtils.bind(this,function(I){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var I=G();null!=I&&(c=g=I.w,f=m=I.h)}I=Editor.inlineFullscreen||+null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);z=I.height;this.bg.style.height=z+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");g=null!=document.body?Math.min(c,document.body.scrollWidth-l):c;m=Math.min(f,z-l);I=Math.max(1,Math.round((I.width-g-l)/2));var ca=Math.max(1,Math.round((z-m-b.footerHeight)/3));ca=this.getPosition(I,ca,g,m);I=ca.x;ca=ca.y;var da=mxUtils.getDocumentScrollOrigin(document);I+=da.x;+ca+=da.y;Editor.inlineFullscreen||null==b.embedViewport||(ca+=b.embedViewport.y,I+=b.embedViewport.x);N.style.left=I+"px";N.style.top=ca+"px";N.style.width=g+"px";N.style.height=m+"px";!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ca+14+"px",this.dialogImg.style.left=I+g+38-R+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=+B;this.container=N;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&this.container.parentNode.removeChild(this.container)};-var ErrorDialog=function(b,e,g,m,v,p,A,G,S,F,P){S=null!=S?S:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var T=document.createElement("div");T.style.padding="0px";T.style.margin="0px";T.style.fontSize="18px";T.style.paddingBottom="16px";T.style.marginBottom="10px";T.style.borderBottom="1px solid #c0c0c0";T.style.color="gray";T.style.whiteSpace="nowrap";T.style.textOverflow="ellipsis";T.style.overflow="hidden";mxUtils.write(T,e);T.setAttribute("title",e);R.appendChild(T)}e=-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=F&&(F=mxUtils.button(F,function(){null!=P&&P()}),F.className="geBtn",g.appendChild(F));-var c=mxUtils.button(m,function(){S&&b.hideDialog();null!=v&&v()});c.className="geBtn";g.appendChild(c);null!=A&&(m=mxUtils.button(A,function(){S&&b.hideDialog();null!=G&&G()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){c.focus()};R.appendChild(g);this.container=R},PrintDialog=function(b,e,g){this.create(b,e,g)};-PrintDialog.prototype.create=function(b){function e(c){var f=A.checked||F.checked,k=parseInt(R.value)/100;isNaN(k)&&(k=1,R.value="100%");mxClient.IS_SF&&(k*=.75);var B=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,z=1/g.pageScale;if(f){var C=A.checked?1:parseInt(P.value);isNaN(C)||(z=mxUtils.getScaleForPageCount(C,g,B))}var I=C=0;B=mxRectangle.fromRectangle(B);B.width=Math.ceil(B.width*k);B.height=Math.ceil(B.height*k);z*=k;!f&&g.pageVisible?(k=g.getPageLayout(),C-=k.x*B.width,I-=k.y*B.height):-f=!0;f=PrintDialog.createPrintPreview(g,z,B,0,C,I,f);f.open();c&&PrintDialog.printPreview(f)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var v=document.createElement("tbody");var p=document.createElement("tr");var A=document.createElement("input");A.setAttribute("type","checkbox");var G=document.createElement("td");G.setAttribute("colspan","2");G.style.fontSize="10pt";G.appendChild(A);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));-G.appendChild(S);mxEvent.addListener(S,"click",function(c){A.checked=!A.checked;F.checked=!A.checked;mxEvent.consume(c)});mxEvent.addListener(A,"change",function(){F.checked=!A.checked});p.appendChild(G);v.appendChild(p);p=p.cloneNode(!1);var F=document.createElement("input");F.setAttribute("type","checkbox");G=document.createElement("td");G.style.fontSize="10pt";G.appendChild(F);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");G.appendChild(S);mxEvent.addListener(S,-"click",function(c){F.checked=!F.checked;A.checked=!F.checked;mxEvent.consume(c)});p.appendChild(G);var P=document.createElement("input");P.setAttribute("value","1");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("size","4");P.setAttribute("disabled","disabled");P.style.width="50px";G=document.createElement("td");G.style.fontSize="10pt";G.appendChild(P);mxUtils.write(G," "+mxResources.get("pages")+" (max)");p.appendChild(G);v.appendChild(p);mxEvent.addListener(F,"change",-function(){F.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");A.checked=!F.checked});p=p.cloneNode(!1);G=document.createElement("td");mxUtils.write(G,mxResources.get("pageScale")+":");p.appendChild(G);G=document.createElement("td");var R=document.createElement("input");R.setAttribute("value","100 %");R.setAttribute("size","5");R.style.width="50px";G.appendChild(R);p.appendChild(G);v.appendChild(p);p=document.createElement("tr");G=document.createElement("td");G.colSpan=2;-G.style.paddingTop="20px";G.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&G.appendChild(S);if(PrintDialog.previewEnabled){var T=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});T.className="geBtn";G.appendChild(T)}T=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});T.className="geBtn gePrimaryBtn";G.appendChild(T);b.editor.cancelFirst||-G.appendChild(S);p.appendChild(G);v.appendChild(p);m.appendChild(v);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};-PrintDialog.createPrintPreview=function(b,e,g,m,v,p,A){e=new mxPrintPreview(b,e,g,m,v,p);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=A;A=b.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";e.backgroundColor=A;var G=e.isTextLabel;e.isTextLabel=function(F){return"geHint"==!F.className&&G.apply(this,arguments)};var S=e.getLinkForCellState;e.getLinkForCellState=function(F){return b.getAbsoluteUrl(S.apply(this,arguments))};return e};+var ErrorDialog=function(b,e,g,m,u,p,B,H,S,G,O){S=null!=S?S:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var c=document.createElement("div");c.style.padding="0px";c.style.margin="0px";c.style.fontSize="18px";c.style.paddingBottom="16px";c.style.marginBottom="10px";c.style.borderBottom="1px solid #c0c0c0";c.style.color="gray";c.style.whiteSpace="nowrap";c.style.textOverflow="ellipsis";c.style.overflow="hidden";mxUtils.write(c,e);c.setAttribute("title",e);R.appendChild(c)}e=+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=O&&O()}),G.className="geBtn",g.appendChild(G));+var f=mxUtils.button(m,function(){S&&b.hideDialog();null!=u&&u()});f.className="geBtn";g.appendChild(f);null!=B&&(m=mxUtils.button(B,function(){S&&b.hideDialog();null!=H&&H()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){f.focus()};R.appendChild(g);this.container=R},PrintDialog=function(b,e,g){this.create(b,e,g)};+PrintDialog.prototype.create=function(b){function e(f){var l=B.checked||G.checked,t=parseInt(R.value)/100;isNaN(t)&&(t=1,R.value="100%");mxClient.IS_SF&&(t*=.75);var z=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/g.pageScale;if(l){var F=B.checked?1:parseInt(O.value);isNaN(F)||(C=mxUtils.getScaleForPageCount(F,g,z))}var N=F=0;z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*t);z.height=Math.ceil(z.height*t);C*=t;!l&&g.pageVisible?(t=g.getPageLayout(),F-=t.x*z.width,N-=t.y*z.height):+l=!0;l=PrintDialog.createPrintPreview(g,C,z,0,F,N,l);l.open();f&&PrintDialog.printPreview(l)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");var p=document.createElement("tr");var B=document.createElement("input");B.setAttribute("type","checkbox");var H=document.createElement("td");H.setAttribute("colspan","2");H.style.fontSize="10pt";H.appendChild(B);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));+H.appendChild(S);mxEvent.addListener(S,"click",function(f){B.checked=!B.checked;G.checked=!B.checked;mxEvent.consume(f)});mxEvent.addListener(B,"change",function(){G.checked=!B.checked});p.appendChild(H);u.appendChild(p);p=p.cloneNode(!1);var G=document.createElement("input");G.setAttribute("type","checkbox");H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(G);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");H.appendChild(S);mxEvent.addListener(S,+"click",function(f){G.checked=!G.checked;B.checked=!G.checked;mxEvent.consume(f)});p.appendChild(H);var O=document.createElement("input");O.setAttribute("value","1");O.setAttribute("type","number");O.setAttribute("min","1");O.setAttribute("size","4");O.setAttribute("disabled","disabled");O.style.width="50px";H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(O);mxUtils.write(H," "+mxResources.get("pages")+" (max)");p.appendChild(H);u.appendChild(p);mxEvent.addListener(G,"change",+function(){G.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled");B.checked=!G.checked});p=p.cloneNode(!1);H=document.createElement("td");mxUtils.write(H,mxResources.get("pageScale")+":");p.appendChild(H);H=document.createElement("td");var R=document.createElement("input");R.setAttribute("value","100 %");R.setAttribute("size","5");R.style.width="50px";H.appendChild(R);p.appendChild(H);u.appendChild(p);p=document.createElement("tr");H=document.createElement("td");H.colSpan=2;+H.style.paddingTop="20px";H.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&H.appendChild(S);if(PrintDialog.previewEnabled){var c=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});c.className="geBtn";H.appendChild(c)}c=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});c.className="geBtn gePrimaryBtn";H.appendChild(c);b.editor.cancelFirst||+H.appendChild(S);p.appendChild(H);u.appendChild(p);m.appendChild(u);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};+PrintDialog.createPrintPreview=function(b,e,g,m,u,p,B){e=new mxPrintPreview(b,e,g,m,u,p);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=B;B=b.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";e.backgroundColor=B;var H=e.isTextLabel;e.isTextLabel=function(G){return"geHint"==!G.className&&H.apply(this,arguments)};var S=e.getLinkForCellState;e.getLinkForCellState=function(G){return b.getAbsoluteUrl(S.apply(this,arguments))};return e};PrintDialog.previewEnabled=!0;-var PageSetupDialog=function(b){function e(){var k=R;null!=k&&null!=k.originalSrc&&(k=b.createImageForPageLink(k.originalSrc,null));null!=k&&null!=k.src?(P.style.backgroundImage="url("+k.src+")",P.style.display="inline-block"):(P.style.backgroundImage="",P.style.display="none");P.style.backgroundColor="";null!=T&&T!=mxConstants.NONE&&(P.style.backgroundColor=T,P.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var v=document.createElement("tbody");-var p=document.createElement("tr");var A=document.createElement("td");A.style.verticalAlign="top";A.style.fontSize="10pt";mxUtils.write(A,mxResources.get("paperSize")+":");p.appendChild(A);A=document.createElement("td");A.style.verticalAlign="top";A.style.fontSize="10pt";var G=PageSetupDialog.addPageFormatPanel(A,"pagesetupdialog",g.pageFormat);p.appendChild(A);v.appendChild(p);p=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("gridSize")+":");p.appendChild(A);-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 k=parseInt(S.value);S.value=Math.max(1,isNaN(k)?g.getGridSize():k)});p.appendChild(A);v.appendChild(p);p=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("background")+":");-p.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 P=document.createElement("div");P.style.display="inline-block";P.style.verticalAlign="middle";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.backgroundSize="contain";P.style.border="1px solid lightGray";P.style.borderRadius="4px";P.style.marginRight="14px";P.style.height="32px";-P.style.width="64px";P.style.cursor="pointer";P.style.padding="4px";var R=g.backgroundImage,T=g.background,c=g.shadowVisible,f=function(k){b.showBackgroundImageDialog(function(B,z,C,I){z||(null!=B&&null!=B.src&&Graph.isPageLink(B.src)&&(B={originalSrc:B.src}),R=B,c=I);T=C;e()},R,T,!0);mxEvent.consume(k)};mxEvent.addListener(F,"click",f);mxEvent.addListener(P,"click",f);e();A.appendChild(P);A.appendChild(F);p.appendChild(A);v.appendChild(p);p=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 k=parseInt(S.value);isNaN(k)||g.gridSize===k||g.setGridSize(k);k=new ChangePageSetup(b,T,R,G.get());k.ignoreColor=g.background==T;k.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=R?R.src:null);null!=c&&-(k.shadowVisible=c);g.pageFormat.width==k.previousFormat.width&&g.pageFormat.height==k.previousFormat.height&&k.ignoreColor&&k.ignoreImage&&k.shadowVisible==g.shadowVisible||g.model.execute(k)});f.className="geBtn gePrimaryBtn";A.appendChild(f);b.editor.cancelFirst||A.appendChild(F);p.appendChild(A);v.appendChild(p);m.appendChild(v);this.container=m};-PageSetupDialog.addPageFormatPanel=function(b,e,g,m){e="format-"+e;var v=document.createElement("input");v.setAttribute("name",e);v.setAttribute("type","radio");v.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","landscape");var A=document.createElement("select");A.style.marginBottom="4px";A.style.borderRadius="4px";A.style.borderWidth="1px";A.style.borderStyle="solid";A.style.boxSizing="border-box";-A.style.padding="2px";A.style.width="210px";var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.width="210px";G.style.height="24px";v.style.marginRight="6px";G.appendChild(v);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));G.appendChild(e);p.style.marginLeft="10px";p.style.marginRight="6px";G.appendChild(p);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,mxResources.get("landscape"));-G.appendChild(S);var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.marginLeft="4px";F.style.fontSize="12px";F.style.width="210px";F.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";F.appendChild(P);mxUtils.write(F," x ");var R=document.createElement("input");R.setAttribute("size","7");R.setAttribute("title",mxResources.get("height"));R.style.textAlign="right";F.appendChild(R);-var T=document.createElement("select");T.style.marginLeft="4px";T.style.maxWidth="78px";T.style.width="78px";for(var c=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],f=0;f<c.length;f++){var k=document.createElement("option");k.setAttribute("value",c[f].unit);mxUtils.write(k,c[f].label);T.appendChild(k)}T.value=Editor.pageSizeUnit;F.appendChild(T);G.style.display=-"none";F.style.display="none";var B={},z=PageSetupDialog.getFormats();for(f=0;f<z.length;f++)c=z[f],B[c.key]=c,k=document.createElement("option"),k.setAttribute("value",c.key),mxUtils.write(k,c.title),A.appendChild(k);var C=function(){A.value="custom";for(var L=0;L<z.length;L++){var K=z[L];null!=K.format&&("a4"==K.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==K.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=-583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==K.format.width&&g.height==K.format.height?(A.value=K.key,v.setAttribute("checked","checked"),v.defaultChecked=!0,v.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,detected=!0):g.width==K.format.height&&g.height==K.format.width&&(A.value=K.key,v.removeAttribute("checked"),v.defaultChecked=!1,v.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,detected=p.checked=!0))}"custom"==A.value?-(P.value=Editor.toUnit(g.width,T.value),R.value=Editor.toUnit(g.height,T.value),v.setAttribute("checked","checked"),A.value="custom",G.style.display="none",F.style.display=""):(G.style.display="",F.style.display="none")};C();b.appendChild(A);mxUtils.br(b);b.appendChild(G);b.appendChild(F);var I=function(L,K){L=B[A.value];null!=L.format?(P.value=Editor.toUnit(p.checked?L.format.height:L.format.width,T.value),R.value=Editor.toUnit(p.checked?L.format.width:L.format.height,T.value),F.style.display="none",-G.style.display=""):(G.style.display="none",F.style.display="");L=parseFloat(P.value);if(isNaN(L)||0>=L)P.value=Editor.toUnit(g.width,T.value);L=parseFloat(R.value);if(isNaN(L)||0>=L)R.value=Editor.toUnit(g.height,T.value);L=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(P.value),T.value)),Math.floor(Editor.fromUnit(parseFloat(R.value),T.value)));K||L.width==g.width&&L.height==g.height||(g=L,null!=m&&m(g))};mxEvent.addListener(e,"click",function(L){v.checked=!0;I(L);mxEvent.consume(L)});-mxEvent.addListener(S,"click",function(L){p.checked=!0;I(L);mxEvent.consume(L)});mxEvent.addListener(P,"blur",I);mxEvent.addListener(P,"click",I);mxEvent.addListener(R,"blur",I);mxEvent.addListener(R,"click",I);mxEvent.addListener(p,"change",I);mxEvent.addListener(v,"change",I);mxEvent.addListener(A,"change",function(L){I(L,"custom"==A.value);mxEvent.consume(L)});mxEvent.addListener(T,"change",function(L){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),T.value);R.value=Editor.toUnit(Editor.fromUnit(R.value,-Editor.pageSizeUnit),T.value);Editor.pageSizeUnit=T.value;I(L,!0);mxEvent.consume(L)});I(null,!0);return{set:function(L){g=L;C(null,null,!0)},get:function(){return g},widthInput:P,heightInput:R}};+var PageSetupDialog=function(b){function e(){var t=R;null!=t&&null!=t.originalSrc&&(t=b.createImageForPageLink(t.originalSrc,null));null!=t&&null!=t.src?(O.style.backgroundImage="url("+t.src+")",O.style.display="inline-block"):(O.style.backgroundImage="",O.style.display="none");O.style.backgroundColor="";null!=c&&c!=mxConstants.NONE&&(O.style.backgroundColor=c,O.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");+var p=document.createElement("tr");var B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";mxUtils.write(B,mxResources.get("paperSize")+":");p.appendChild(B);B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";var H=PageSetupDialog.addPageFormatPanel(B,"pagesetupdialog",g.pageFormat);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("gridSize")+":");p.appendChild(B);+B=document.createElement("td");B.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();B.appendChild(S);mxEvent.addListener(S,"change",function(){var t=parseInt(S.value);S.value=Math.max(1,isNaN(t)?g.getGridSize():t)});p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("background")+":");+p.appendChild(B);B=document.createElement("td");var G=document.createElement("button");G.className="geBtn";G.style.margin="0px";mxUtils.write(G,mxResources.get("change")+"...");var O=document.createElement("div");O.style.display="inline-block";O.style.verticalAlign="middle";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="contain";O.style.border="1px solid lightGray";O.style.borderRadius="4px";O.style.marginRight="14px";O.style.height="32px";+O.style.width="64px";O.style.cursor="pointer";O.style.padding="4px";var R=g.backgroundImage,c=g.background,f=g.shadowVisible,l=function(t){b.showBackgroundImageDialog(function(z,C,F,N){C||(null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src}),R=z,f=N);c=F;e()},R,c,!0);mxEvent.consume(t)};mxEvent.addListener(G,"click",l);mxEvent.addListener(O,"click",l);e();B.appendChild(O);B.appendChild(G);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");+B.colSpan=2;B.style.paddingTop="16px";B.setAttribute("align","right");G=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});G.className="geBtn";b.editor.cancelFirst&&B.appendChild(G);l=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var t=parseInt(S.value);isNaN(t)||g.gridSize===t||g.setGridSize(t);t=new ChangePageSetup(b,c,R,H.get());t.ignoreColor=g.background==c;t.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=R?R.src:null);null!=f&&+(t.shadowVisible=f);g.pageFormat.width==t.previousFormat.width&&g.pageFormat.height==t.previousFormat.height&&t.ignoreColor&&t.ignoreImage&&t.shadowVisible==g.shadowVisible||g.model.execute(t)});l.className="geBtn gePrimaryBtn";B.appendChild(l);b.editor.cancelFirst||B.appendChild(G);p.appendChild(B);u.appendChild(p);m.appendChild(u);this.container=m};+PageSetupDialog.addPageFormatPanel=function(b,e,g,m){e="format-"+e;var u=document.createElement("input");u.setAttribute("name",e);u.setAttribute("type","radio");u.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","landscape");var B=document.createElement("select");B.style.marginBottom="4px";B.style.borderRadius="4px";B.style.borderWidth="1px";B.style.borderStyle="solid";B.style.boxSizing="border-box";+B.style.padding="2px";B.style.width="210px";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.marginLeft="4px";H.style.width="210px";H.style.height="24px";u.style.marginRight="6px";H.appendChild(u);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));H.appendChild(e);p.style.marginLeft="10px";p.style.marginRight="6px";H.appendChild(p);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,mxResources.get("landscape"));+H.appendChild(S);var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.fontSize="12px";G.style.width="210px";G.style.height="24px";var O=document.createElement("input");O.setAttribute("size","7");O.setAttribute("title",mxResources.get("width"));O.style.textAlign="right";G.appendChild(O);mxUtils.write(G," x ");var R=document.createElement("input");R.setAttribute("size","7");R.setAttribute("title",mxResources.get("height"));R.style.textAlign="right";G.appendChild(R);+var c=document.createElement("select");c.style.marginLeft="4px";c.style.maxWidth="78px";c.style.width="78px";for(var f=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],l=0;l<f.length;l++){var t=document.createElement("option");t.setAttribute("value",f[l].unit);mxUtils.write(t,f[l].label);c.appendChild(t)}c.value=Editor.pageSizeUnit;G.appendChild(c);H.style.display=+"none";G.style.display="none";var z={},C=PageSetupDialog.getFormats();for(l=0;l<C.length;l++)f=C[l],z[f.key]=f,t=document.createElement("option"),t.setAttribute("value",f.key),mxUtils.write(t,f.title),B.appendChild(t);var F=function(){B.value="custom";for(var K=0;K<C.length;K++){var I=C[K];null!=I.format&&("a4"==I.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==I.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=+583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==I.format.width&&g.height==I.format.height?(B.value=I.key,u.setAttribute("checked","checked"),u.defaultChecked=!0,u.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,detected=!0):g.width==I.format.height&&g.height==I.format.width&&(B.value=I.key,u.removeAttribute("checked"),u.defaultChecked=!1,u.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,detected=p.checked=!0))}"custom"==B.value?+(O.value=Editor.toUnit(g.width,c.value),R.value=Editor.toUnit(g.height,c.value),u.setAttribute("checked","checked"),B.value="custom",H.style.display="none",G.style.display=""):(H.style.display="",G.style.display="none")};F();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(G);var N=function(K,I){K=z[B.value];null!=K.format?(O.value=Editor.toUnit(p.checked?K.format.height:K.format.width,c.value),R.value=Editor.toUnit(p.checked?K.format.width:K.format.height,c.value),G.style.display="none",+H.style.display=""):(H.style.display="none",G.style.display="");K=parseFloat(O.value);if(isNaN(K)||0>=K)O.value=Editor.toUnit(g.width,c.value);K=parseFloat(R.value);if(isNaN(K)||0>=K)R.value=Editor.toUnit(g.height,c.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(O.value),c.value)),Math.floor(Editor.fromUnit(parseFloat(R.value),c.value)));I||K.width==g.width&&K.height==g.height||(g=K,null!=m&&m(g))};mxEvent.addListener(e,"click",function(K){u.checked=!0;N(K);mxEvent.consume(K)});+mxEvent.addListener(S,"click",function(K){p.checked=!0;N(K);mxEvent.consume(K)});mxEvent.addListener(O,"blur",N);mxEvent.addListener(O,"click",N);mxEvent.addListener(R,"blur",N);mxEvent.addListener(R,"click",N);mxEvent.addListener(p,"change",N);mxEvent.addListener(u,"change",N);mxEvent.addListener(B,"change",function(K){N(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(c,"change",function(K){O.value=Editor.toUnit(Editor.fromUnit(O.value,Editor.pageSizeUnit),c.value);R.value=Editor.toUnit(Editor.fromUnit(R.value,+Editor.pageSizeUnit),c.value);Editor.pageSizeUnit=c.value;N(K,!0);mxEvent.consume(K)});N(null,!0);return{set:function(K){g=K;F(null,null,!0)},get:function(){return g},widthInput:O,heightInput:R}};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,m,v,p,A,G,S,F,P){S=null!=S?S:!0;var R=document.createElement("div"),T=document.createElement("div");T.style.width="100%";T.style.display="grid";T.style.gap="5px 8px";T.style.gridAutoColumns="auto 1fr";T.style.boxSizing="border-box";T.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",v||mxResources.get("filename"));mxUtils.write(f,(v||mxResources.get("filename"))+":");c.appendChild(f);T.appendChild(c);var k=document.createElement("input");k.setAttribute("value",e||"");k.style.flexGrow="1";var B=mxUtils.button(g,function(){if(null==p||p(k.value))S&&b.hideDialog(),m(k.value)});B.className="geBtn gePrimaryBtn";this.init=function(){if(null!=-v||null==A)if(null!=P?Editor.selectFilename(k):(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var z=T.parentNode;if(null!=z){var C=null;mxEvent.addListener(z,"dragleave",function(I){null!=C&&(C.style.backgroundColor="",C=null);I.stopPropagation();I.preventDefault()});mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(I){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=k,C.style.backgroundColor=-"#ebf2f9");I.stopPropagation();I.preventDefault()}));mxEvent.addListener(z,"drop",mxUtils.bind(this,function(I){null!=C&&(C.style.backgroundColor="",C=null);0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")&&(k.value=decodeURIComponent(I.dataTransfer.getData("text/uri-list")),B.click());I.stopPropagation();I.preventDefault()}))}}};c=document.createElement("div");c.style.display="inline-flex";c.style.alignItems="center";c.style.gap="4px";c.style.whiteSpace="nowrap";c.appendChild(k);T.appendChild(c);-null==v&&null!=A||null==P||null==b.editor.diagramFileTypes||(c=document.createElement("div"),c.style.display="inline-flex",c.style.alignItems="center",c.style.textOverflow="ellipsis",c.style.justifyContent="flex-end",c.style.fontSize="10pt",mxUtils.write(c,mxResources.get("type")+":"),T.appendChild(c),c=document.createElement("div"),c.style.display="inline-flex",c.style.alignItems="center",c.style.whiteSpace="nowrap",T.appendChild(c),e=FilenameDialog.createFileTypes(b,k,b.editor.diagramFileTypes),-e.style.width="100%",c.appendChild(e));null!=A&&T.appendChild(A);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=P?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=F&&F()});c.className="geBtn";null==G||b.isOffline()||row.appendChild(b.createHelpIcon(G));-b.editor.cancelFirst&&row.appendChild(c);mxEvent.addListener(k,"keypress",function(z){13==z.keyCode&&B.click()});row.appendChild(B);b.editor.cancelFirst||row.appendChild(c);T.appendChild(row);R.appendChild(T);this.container=R};FilenameDialog.filenameHelpLink=null;-FilenameDialog.createFileTypes=function(b,e,g){var m=document.createElement("select");for(b=0;b<g.length;b++){var v=document.createElement("option");v.setAttribute("value",b);mxUtils.write(v,mxResources.get(g[b].description)+" (."+g[b].extension+")");m.appendChild(v)}mxEvent.addListener(m,"change",function(p){p=g[m.value].extension;var A=e.value.lastIndexOf(".drawio.");A=0<A?A:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<A?e.value.substring(0,A+1)+p:e.value+"."+p;"createEvent"in-document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var A=0,G=0;G<g.length;G++){var S=g[G].extension,F=null;"drawio"!=S&&(F=S,S=".drawio."+S);if(p.substring(p.length-S.length-1)=="."+S||null!=F&&p.substring(p.length-F.length-1)=="."+F){A=G;break}}m.value=A};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};-var WrapperWindow=function(b,e,g,m,v,p,A){var G=b.createSidebarContainer();A(G);this.window=new mxWindow(e,G,g,m,v,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(S){null==S&&(S=window.event);return null!=S&&b.isSelectionAllowed(S)}))};-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var A=this.graph;if(null!=A.container&&!A.transparentBackground){if(A.pageVisible){var G=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=A.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(G),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,-this.backgroundPageShape.init(A.container),S.style.position="absolute",A.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(F){A.dblClick(F)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(F){A.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(F))}),mxUtils.bind(this,function(F){null!=-A.tooltipHandler&&A.tooltipHandler.isHideOnHover()&&A.tooltipHandler.hide();A.isMouseDown&&!mxEvent.isConsumed(F)&&A.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(F))}),mxUtils.bind(this,function(F){A.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(F))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=G,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};-mxGraphView.prototype.validateBackgroundStyles=function(A,G,S){var F=this.graph;A=null!=A?A:1;var P=mxUtils.getLightDarkColor(null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background).cssText,R=mxUtils.getLightDarkColor(F.defaultPageBorderColor).cssText,T=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",c="none",f="";if(F.isGridEnabled()||F.gridVisible){f=10;mxClient.IS_SVG?(c=unescape(encodeURIComponent(this.createSvgGrid(T,A))),c=window.btoa?-btoa(c):Base64.encode(c,!0),c="url(data:image/svg+xml;base64,"+c+")",f=F.gridSize*this.scale*this.gridSteps*A):c="url("+this.gridImage+")";var k=T=0;G=null!=G?G-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var B=F.gridSize*this.scale*this.gridSteps,z=G%B;B=S%B;null!=F.view.backgroundPageShape&&(k=this.getBackgroundPageBounds(),T=1+k.x,k=1+k.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-T+G,f)+z*A)+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale--k+S,f)+B*A)+"px"}A=F.view.canvas;null!=A.ownerSVGElement&&(A=A.ownerSVGElement);T=!Editor.isDarkMode()&&F.enableDiagramBackground;null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=f,F.view.backgroundPageShape.node.style.backgroundImage=c,F.view.backgroundPageShape.node.style.backgroundColor=P,F.view.backgroundPageShape.node.style.borderColor=R,F.view.backgroundPageShape.node.style.colorScheme="none"==F.getAdaptiveColors()?"light":"",F.container.classList.add("geDiagramBackdrop"),-A.style.backgroundImage="none",A.style.backgroundColor="",F.container.style.backgroundColor=T?F.diagramBackgroundColor:""):(F.container.classList.remove("geDiagramBackdrop"),A.style.backgroundPosition=f,A.style.backgroundImage=c,!T||null!=F.background&&F.background!=mxConstants.NONE?A.style.backgroundColor=P:(A.style.backgroundColor=F.diagramBackgroundColor,F.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(A,G){for(var S=this.graph.gridSize*this.scale*(null!=G?G:-1);S<this.minGridSize;)S*=2;G=this.gridSteps*S;for(var F=[],P=1;P<this.gridSteps;P++){var R=P*S;F.push("M 0 "+R+" L "+G+" "+R+" M "+R+" 0 L "+R+" "+G)}A=mxUtils.getLightDarkColor(A);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+G+'" height="'+G+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+G+'" height="'+G+'" patternUnits="userSpaceOnUse"><path d="'+-F.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(A.cssText)+';" stroke="'+A.light+'" opacity="0.2" stroke-width="1"/><path d="M '+G+" 0 L 0 0 0 "+G+'" fill="none" style="stroke:'+mxUtils.htmlEntities(A.cssText)+';" stroke="'+A.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(A,G){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+G,F))+"px";S.style.backgroundPosition=F}};mxGraph.prototype.updatePageBreaks=function(A,G,S){var F=this.view.scale,P=this.view.translate,R=this.pageFormat,T=F*this.pageScale,c=this.view.getBackgroundPageBounds();G=c.width;S=c.height;var f=new mxRectangle(F*P.x,F*-P.y,R.width*T,R.height*T),k=(A=A&&Math.min(f.width,f.height)>this.minPageBreakDist)?Math.ceil(S/f.height)-1:0,B=A?Math.ceil(G/f.width)-1:0,z=c.x+G,C=c.y+S;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<B&&(this.verticalPageBreaks=[]);A=mxUtils.bind(this,function(I){if(null!=I){for(var L=I==this.horizontalPageBreaks?k:B,K=0;K<=L;K++){var O=I==this.horizontalPageBreaks?[new mxPoint(Math.round(c.x),Math.round(c.y+(K+1)*f.height)),new mxPoint(Math.round(z),-Math.round(c.y+(K+1)*f.height))]:[new mxPoint(Math.round(c.x+(K+1)*f.width),Math.round(c.y)),new mxPoint(Math.round(c.x+(K+1)*f.width),Math.round(C))];null!=I[K]?(I[K].points=O,I[K].redraw()):(O=new mxPolyline(O,this.pageBreakColor),O.dialect=this.dialect,O.isDashed=this.pageBreakDashed,O.pointerEvents=!1,O.init(this.view.backgroundPane),O.redraw(),I[K]=O)}for(K=L;K<I.length;K++)null!=I[K]&&I[K].destroy();I.splice(L,I.length-L)}});A(this.horizontalPageBreaks);A(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;-mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(A,G,S){for(var F=0;F<G.length;F++){if(this.graph.isTableCell(G[F])||this.graph.isTableRow(G[F]))return!1;if(this.graph.getModel().isVertex(G[F])){var P=this.graph.getCellGeometry(G[F]);if(null!=P&&P.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var A=g.apply(this,arguments);A.intersects=mxUtils.bind(this,function(G,S){return this.isConnecting()?-!0:mxCellMarker.prototype.intersects.apply(A,arguments)});return A};mxGraphView.prototype.createBackgroundPageShape=function(A){return new mxRectangleShape(A,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var A=this.getGraphBounds(),G=0<A.width?A.x/this.scale-this.translate.x:0,S=0<A.height?A.y/this.scale-this.translate.y:0,F=this.graph.pageFormat,P=this.graph.pageScale,R=F.width*P;F=F.height*P;P=Math.floor(Math.min(0,G)/R);var T=Math.floor(Math.min(0,-S)/F);return new mxRectangle(this.scale*(this.translate.x+P*R),this.scale*(this.translate.y+T*F),this.scale*(Math.ceil(Math.max(1,G+A.width/this.scale)/R)-P)*R,this.scale*(Math.ceil(Math.max(1,S+A.height/this.scale)/F)-T)*F)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(A,G){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=-A+"px",this.view.backgroundPageShape.node.style.marginTop=G+"px")};var v=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(A,G,S,F,P,R){var T=v.apply(this,arguments);null==R||R||mxEvent.addListener(T,"mousedown",function(c){mxEvent.consume(c)});return T};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(A,G,S){var F=this.graph.model.getParent(A);if(G){var P=this.graph.model.isEdge(A)?null:this.graph.getCellGeometry(A);-P=!this.graph.model.isEdge(F)&&!this.graph.isSiblingSelected(A)&&(null!=P&&P.relative||!this.graph.isContainer(F)||this.graph.isPart(A))}else if(P=p.apply(this,arguments),this.graph.isTableCell(A)||this.graph.isTableRow(A))P=F,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(A)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(A)&&-this.graph.isCellSelected(F);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(A){A=A.getCell();for(var G=this.graph.getModel(),S=G.getParent(A),F=this.graph.view.getState(S),P=this.graph.isCellSelected(A);null!=F&&(G.isVertex(S)||G.isEdge(S));){var R=this.graph.isCellSelected(S);P=P||R;if(R||!P&&(this.graph.isTableCell(A)||this.graph.isTableRow(A)))A=S;S=G.getParent(S)}return A}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,v=this.editor.graph;v.lightbox=g;var p=v.getGraphBounds;v.getGraphBounds=function(){var ca=p.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var ma=this.view.translate,la=this.view.scale;ca=mxRectangle.fromRectangle(ca);ca.add(new mxRectangle((ma.x+V.x)*la,(ma.y+V.y)*la,V.width*la,V.height*la))}return ca};v.useCssTransforms&&-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(ca,V){this.clearSelectionState()});v.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);v.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);v.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);v.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);v.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=-0;v.isEnabled=function(){return!1};v.panningHandler.isForcePanningEvent=function(ca){for(var V=ca.getSource();null!=V&&V!=v.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(ca.getEvent())};var A=v.panningHandler.start;v.panningHandler.start=function(){A.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!v.standalone){var G=!1,S=!1;this.setDefaultStyle=function(ca){try{v.getModel().isEdge(ca)?-S=v.pasteEdgeStyle=!1:G=!1;var V=v.getCellStyle(ca,!1),ma=[],la=[],Y;for(Y in V)ma.push(V[Y]),la.push(Y);v.getModel().isEdge(ca)?v.currentEdgeStyle={}:v.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ma,"cells",[ca],"force",!0));v.getModel().isEdge(ca)?S=v.pasteEdgeStyle=!0:G=!0}catch(fa){this.handleError(fa)}};this.clearDefaultStyle=function(){v.currentEdgeStyle=mxUtils.clone(v.defaultEdgeStyle);v.currentVertexStyle=mxUtils.clone(v.defaultVertexStyle);G=-S=v.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};v.addListener("cellsInserted",function(ca,V){v.pasteCellStyles(v.includeDescendants(V.getProperty("cells")))});v.addListener("textInserted",function(ca,V){v.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(ca){null==ca&&(ca=window.event);return v.isEditing()||null!=ca&&this.isSelectionAllowed(ca)});this.container!=document.body||-this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown=F,this.formatContainer.onselectstart=F,this.formatContainer.onmousedown=F,this.footerContainer.onselectstart=F,this.footerContainer.onmousedown=F,null!=this.tabContainer&&-(this.tabContainer.onselectstart=F),mxClient.IS_IOS&&(e=function(){var ca=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{ca=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(ma){}}return ca}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect",-"none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(ca){if(null!=ca){var V=mxEvent.getSource(ca);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return F(ca)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||-9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):v.panningHandler.usePopupTrigger=!1;v.init(this.diagramContainer);mxClient.IS_SVG&&null!=v.view.getDrawPane()&&(e=v.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=v.graphHandler){var P=v.graphHandler.start;v.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();P.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,-"mousemove",mxUtils.bind(this,function(ca){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(ca)-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(ca)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var R=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(ca,V){return m.isSpaceDown()||R.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,-function(ca){16==ca.which?this.shiftDown=!0:32!=ca.which||v.isEditing()?mxEvent.isConsumed(ca)||27!=ca.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),v.container.style.cursor="move",v.isEditing()||mxEvent.getSource(ca)!=v.container||mxEvent.consume(ca))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(ca){v.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);-var T=v.panningHandler.isForcePanningEvent;v.panningHandler.isForcePanningEvent=function(ca){return T.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(ca.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(ca.getEvent()))&&(!mxEvent.isControlDown(ca.getEvent())&&mxEvent.isRightMouseButton(ca.getEvent())||mxEvent.isMiddleMouseButton(ca.getEvent()))};var c=v.cellEditor.isStopEditingEvent;v.cellEditor.isStopEditingEvent=function(ca){return c.apply(this,arguments)||13==ca.keyCode&&-(!mxClient.IS_SF&&mxEvent.isControlDown(ca)||mxClient.IS_MAC&&mxEvent.isMetaDown(ca)||mxClient.IS_SF&&mxEvent.isShiftDown(ca))};var f=v.isZoomWheelEvent;v.isZoomWheelEvent=function(){return m.isSpaceDown()||f.apply(this,arguments)};var k=!1,B=null,z=null,C=null,I=mxUtils.bind(this,function(){if(null!=this.toolbar&&k!=v.cellEditor.isContentEditing()){for(var ca=this.toolbar.container.firstChild,V=[];null!=ca;){var ma=ca.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,ca)&&(ca.parentNode.removeChild(ca),-V.push(ca));ca=ma}ca=this.toolbar.fontMenu;ma=this.toolbar.sizeMenu;if(null==C)this.toolbar.createTextToolbar();else{for(var la=0;la<C.length;la++)this.toolbar.container.appendChild(C[la]);this.toolbar.fontMenu=B;this.toolbar.sizeMenu=z}k=v.cellEditor.isContentEditing();B=ca;z=ma;C=V}}),L=v.cellEditor.startEditing;v.cellEditor.startEditing=function(){L.apply(this,arguments);I();if(v.cellEditor.isContentEditing()){var ca=!1,V=function(){ca||(ca=!0,window.setTimeout(function(){var ma=v.getSelectedEditingElement();-null!=ma&&(ma=mxUtils.getCurrentStyle(ma),null!=ma&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ma.fontFamily)),m.toolbar.setFontSize(parseInt(ma.fontSize))));ca=!1},0))};mxEvent.addListener(v.cellEditor.textarea,"input",V);mxEvent.addListener(v.cellEditor.textarea,"touchend",V);mxEvent.addListener(v.cellEditor.textarea,"mouseup",V);mxEvent.addListener(v.cellEditor.textarea,"keyup",V);V()}};var K=v.cellEditor.stopEditing;v.cellEditor.stopEditing=function(ca,V){try{K.apply(this,-arguments),I()}catch(ma){m.handleError(ma)}};v.container.setAttribute("tabindex","0");v.container.style.cursor="default";if(window.self===window.top&&null!=v.container.parentNode)try{v.container.focus()}catch(ca){}var O=v.fireMouseEvent;v.fireMouseEvent=function(ca,V,ma){try{ca==mxEvent.MOUSE_DOWN&&this.container.focus(),O.apply(this,arguments)}catch(la){m.handleError(la)}};var da=v.foldCells;v.foldCells=function(ca,V,ma,la,Y){try{da.apply(this,arguments)}catch(fa){m.handleError(fa)}};v.popupMenuHandler.autoExpand=-!0;null!=this.menus&&(v.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(ca,V,ma){this.menus.createPopupMenu(ca,V,ma)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(ca){v.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};v.connectionHandler.addListener(mxEvent.CONNECT,function(ca,V){var ma=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(ma.push(V.getProperty("terminal")),window.setTimeout(function(){null!=-m.hoverIcons&&m.hoverIcons.update(v.view.getState(ma[ma.length-1]))},0));v.pasteCellStyles(ma)});this.addListener("styleChanged",mxUtils.bind(this,function(ca,V){ca=V.getProperty("force");(this.updateDefaultStyle||ca)&&v.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),v.currentVertexStyle,v.currentEdgeStyle,G,S);null!=this.toolbar&&(this.toolbar.setFontName(v.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(v.currentVertexStyle.fontSize||-Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(V=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="orthogonalEdgeStyle"==v.currentEdgeStyle.edgeStyle&&"1"==v.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==v.currentEdgeStyle.edgeStyle||"none"==v.currentEdgeStyle.edgeStyle||-null==v.currentEdgeStyle.edgeStyle?"url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==v.currentEdgeStyle.edgeStyle?"url("+Format.entityImage.src+")":"elbowEdgeStyle"==v.currentEdgeStyle.edgeStyle?"vertical"==v.currentEdgeStyle.elbow?"url("+Format.verticalElbowImage.src+")":"url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==v.currentEdgeStyle.edgeStyle?"vertical"==v.currentEdgeStyle.elbow?"url("+Format.verticalIsometricImage.src+")":"url("+Format.horizontalIsometricImage.src+-")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&(V=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="link"==v.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==v.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==v.currentEdgeStyle.shape?"url("+Format.simpleArrowImage.src+-")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var ca=v.currentVertexStyle.fontFamily||"Helvetica",V=String(v.currentVertexStyle.fontSize||"12"),ma=v.getView().getState(v.getSelectionCell());null!=ma&&(ca=ma.style[mxConstants.STYLE_FONTFAMILY]||ca,V=ma.style[mxConstants.STYLE_FONTSIZE]||V,10<ca.length&&(ca=ca.substring(0,8)+"..."));this.toolbar.setFontName(ca);this.toolbar.setFontSize(V)}),v.getSelectionModel().addListener(mxEvent.CHANGE,b),v.getModel().addListener(mxEvent.CHANGE,-b));v.addListener(mxEvent.CELLS_ADDED,function(ca,V){ca=V.getProperty("cells");V=V.getProperty("parent");null!=V&&v.getModel().isLayer(V)&&!v.isCellVisible(V)&&null!=ca&&0<ca.length&&v.getModel().setVisible(V,!0)});Graph.selectParentLayer&&v.selectionModel.addListener(mxEvent.CHANGE,function(){if(v.isEnabled()&&!v.isSelectionEmpty()){var ca=v.getLayerForCells(v.getSelectionCells());null!=ca&&v.setDefaultParent(ca)}});this.gestureHandler=mxUtils.bind(this,function(ca){null!=this.currentMenu&&mxEvent.getSource(ca)!=-this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ea=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ea&&window.clearTimeout(ea);ea=window.setTimeout(mxUtils.bind(this,function(){ea=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&-!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){v.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){v.view.validateBackground()}));v.addListener("gridSizeChanged",-mxUtils.bind(this,function(){v.isGridEnabled()&&v.view.validateBackground()}));this.editor.resetGraph()}this.init();v.standalone||this.open()};EditorUi.compactUi=!0;-EditorUi.parsePng=function(b,e,g){function m(G,S){var F=p;p+=S;return G.substring(F,p)}function v(G){G=m(G,4);return G.charCodeAt(3)+(G.charCodeAt(2)<<8)+(G.charCodeAt(1)<<16)+(G.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=v(b);var A=m(b,4);if(null!=e&&e(p-8,A,g))break;value=m(b,g);m(b,4);if("IEND"==A)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);+var FilenameDialog=function(b,e,g,m,u,p,B,H,S,G,O){S=null!=S?S:!0;var R=document.createElement("div"),c=document.createElement("div");c.style.width="100%";c.style.display="grid";c.style.gap="5px 8px";c.style.gridAutoColumns="auto 1fr";c.style.boxSizing="border-box";c.style.padding="3px";var f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.justifyContent="flex-end";f.style.minWidth="0";var l=document.createElement("div");l.style.display="inline-block";+l.style.textOverflow="ellipsis";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.fontSize="10pt";l.style.padding="2px 0";l.setAttribute("title",u||mxResources.get("filename"));mxUtils.write(l,(u||mxResources.get("filename"))+":");f.appendChild(l);c.appendChild(f);var t=document.createElement("input");t.setAttribute("value",e||"");t.style.flexGrow="1";var z=mxUtils.button(g,function(){if(null==p||p(t.value))S&&b.hideDialog(),m(t.value)});z.className="geBtn gePrimaryBtn";this.init=function(){if(null!=+u||null==B)if(null!=O?Editor.selectFilename(t):(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var C=c.parentNode;if(null!=C){var F=null;mxEvent.addListener(C,"dragleave",function(N){null!=F&&(F.style.backgroundColor="",F=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(N){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=t,F.style.backgroundColor=+"#ebf2f9");N.stopPropagation();N.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(N){null!=F&&(F.style.backgroundColor="",F=null);0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")&&(t.value=decodeURIComponent(N.dataTransfer.getData("text/uri-list")),z.click());N.stopPropagation();N.preventDefault()}))}}};f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.gap="4px";f.style.whiteSpace="nowrap";f.appendChild(t);c.appendChild(f);+null==u&&null!=B||null==O||null==b.editor.diagramFileTypes||(f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.textOverflow="ellipsis",f.style.justifyContent="flex-end",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("type")+":"),c.appendChild(f),f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.whiteSpace="nowrap",c.appendChild(f),e=FilenameDialog.createFileTypes(b,t,b.editor.diagramFileTypes),+e.style.width="100%",f.appendChild(e));null!=B&&c.appendChild(B);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=O?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});f.className="geBtn";null==H||b.isOffline()||row.appendChild(b.createHelpIcon(H));+b.editor.cancelFirst&&row.appendChild(f);mxEvent.addListener(t,"keypress",function(C){13==C.keyCode&&z.click()});row.appendChild(z);b.editor.cancelFirst||row.appendChild(f);c.appendChild(row);R.appendChild(c);this.container=R};FilenameDialog.filenameHelpLink=null;+FilenameDialog.createFileTypes=function(b,e,g){var m=document.createElement("select");for(b=0;b<g.length;b++){var u=document.createElement("option");u.setAttribute("value",b);mxUtils.write(u,mxResources.get(g[b].description)+" (."+g[b].extension+")");m.appendChild(u)}mxEvent.addListener(m,"change",function(p){p=g[m.value].extension;var B=e.value.lastIndexOf(".drawio.");B=0<B?B:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<B?e.value.substring(0,B+1)+p:e.value+"."+p;"createEvent"in+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var B=0,H=0;H<g.length;H++){var S=g[H].extension,G=null;"drawio"!=S&&(G=S,S=".drawio."+S);if(p.substring(p.length-S.length-1)=="."+S||null!=G&&p.substring(p.length-G.length-1)=="."+G){B=H;break}}m.value=B};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};+var WrapperWindow=function(b,e,g,m,u,p,B){var H=b.createSidebarContainer();B(H);this.window=new mxWindow(e,H,g,m,u,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(S){null==S&&(S=window.event);return null!=S&&b.isSelectionAllowed(S)}))};+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph;if(null!=B.container&&!B.transparentBackground){if(B.pageVisible){var H=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=B.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(H),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,+this.backgroundPageShape.init(B.container),S.style.position="absolute",B.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(G){B.dblClick(G)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(G){B.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){null!=+B.tooltipHandler&&B.tooltipHandler.isHideOnHover()&&B.tooltipHandler.hide();B.isMouseDown&&!mxEvent.isConsumed(G)&&B.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){B.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(G))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=H,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};+mxGraphView.prototype.validateBackgroundStyles=function(B,H,S){var G=this.graph;B=null!=B?B:1;var O=mxUtils.getLightDarkColor(null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background).cssText,R=mxUtils.getLightDarkColor(G.defaultPageBorderColor).cssText,c=null!=O&&this.gridColor!=O.toLowerCase()?this.gridColor:"#ffffff",f="none",l="";"simple"==G.getAdaptiveColors()&&G.background!=mxConstants.NONE&&null!=G.background&&(O=G.background);if(G.isGridEnabled()||G.gridVisible){l=+10;mxClient.IS_SVG?(f=unescape(encodeURIComponent(this.createSvgGrid(c,B))),f=window.btoa?btoa(f):Base64.encode(f,!0),f="url(data:image/svg+xml;base64,"+f+")",l=G.gridSize*this.scale*this.gridSteps*B):f="url("+this.gridImage+")";var t=c=0;H=null!=H?H-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var z=G.gridSize*this.scale*this.gridSteps,C=H%z;z=S%z;null!=G.view.backgroundPageShape&&(t=this.getBackgroundPageBounds(),c=1+t.x,t=1+t.y);l=-Math.round(l-mxUtils.mod(this.translate.x*+this.scale-c+H,l)+C*B)+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-t+S,l)+z*B)+"px"}B=G.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);c=!Editor.isDarkMode()&&G.enableDiagramBackground;null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=l,G.view.backgroundPageShape.node.style.backgroundImage=f,G.view.backgroundPageShape.node.style.backgroundColor=O,G.view.backgroundPageShape.node.style.borderColor=R,G.view.backgroundPageShape.node.style.colorScheme=+"none"==G.getAdaptiveColors()?"light":"",G.container.classList.add("geDiagramBackdrop"),B.style.backgroundImage="none",B.style.backgroundColor="",G.container.style.backgroundColor=c?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),B.style.backgroundPosition=l,B.style.backgroundImage=f,!c||null!=G.background&&G.background!=mxConstants.NONE?B.style.backgroundColor=O:(B.style.backgroundColor=G.diagramBackgroundColor,G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=+function(B,H){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var G=[],O=1;O<this.gridSteps;O++){var R=O*S;G.push("M 0 "+R+" L "+H+" "+R+" M "+R+" 0 L "+R+" "+H)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+H+'" height="'+H+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'++H+'" height="'+H+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" opacity="0.2" stroke-width="1"/><path d="M '+H+" 0 L 0 0 0 "+H+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);+if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+B,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+H,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.view.scale,O=this.view.translate,R=this.pageFormat,c=G*this.pageScale,f=this.view.getBackgroundPageBounds();+H=f.width;S=f.height;var l=new mxRectangle(G*O.x,G*O.y,R.width*c,R.height*c),t=(B=B&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(S/l.height)-1:0,z=B?Math.ceil(H/l.width)-1:0,C=f.x+H,F=f.y+S;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(N){if(null!=N){for(var K=N==this.horizontalPageBreaks?t:z,I=0;I<=K;I++){var ca=N==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),+Math.round(f.y+(I+1)*l.height)),new mxPoint(Math.round(C),Math.round(f.y+(I+1)*l.height))]:[new mxPoint(Math.round(f.x+(I+1)*l.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(I+1)*l.width),Math.round(F))];null!=N[I]?(N[I].points=ca,N[I].redraw()):(ca=new mxPolyline(ca,this.pageBreakColor),ca.dialect=this.dialect,ca.isDashed=this.pageBreakDashed,ca.pointerEvents=!1,ca.init(this.view.backgroundPane),ca.redraw(),N[I]=ca)}for(I=K;I<N.length;I++)null!=N[I]&&N[I].destroy();N.splice(K,N.length-K)}});+B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var G=0;G<H.length;G++){if(this.graph.isTableCell(H[G])||this.graph.isTableRow(H[G]))return!1;if(this.graph.getModel().isVertex(H[G])){var O=this.graph.getCellGeometry(H[G]);if(null!=O&&O.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=+function(){var B=g.apply(this,arguments);B.intersects=mxUtils.bind(this,function(H,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(B,arguments)});return B};mxGraphView.prototype.createBackgroundPageShape=function(B){return new mxRectangleShape(B,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var B=this.getGraphBounds(),H=0<B.width?B.x/this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,+O=this.graph.pageScale,R=G.width*O;G=G.height*O;O=Math.floor(Math.min(0,H)/R);var c=Math.floor(Math.min(0,S)/G);return new mxRectangle(this.scale*(this.translate.x+O*R),this.scale*(this.translate.y+c*G),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/R)-O)*R,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/G)-c)*G)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,H){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var u=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,G,O,R){var c=u.apply(this,arguments);null==R||R||mxEvent.addListener(c,"mousedown",function(f){mxEvent.consume(f)});return c};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=+function(B,H,S){var G=this.graph.model.getParent(B);if(H){var O=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);O=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(B)&&(null!=O&&O.relative||!this.graph.isContainer(G)||this.graph.isPart(B))}else if(O=p.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))O=G,this.graph.isTable(O)||(O=this.graph.model.getParent(O)),O=!this.graph.selectionCellsHandler.isHandled(O)||this.graph.isCellSelected(O)&&this.graph.isToggleEvent(S.getEvent())||+this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(G);return O};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),G=this.graph.view.getState(S),O=this.graph.isCellSelected(B);null!=G&&(H.isVertex(S)||H.isEdge(S));){var R=this.graph.isCellSelected(S);O=O||R;if(R||!O&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,u=this.editor.graph;u.lightbox=g;var p=u.getGraphBounds;u.getGraphBounds=function(){var X=p.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ha=this.view.translate,ma=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ha.x+ba.x)*ma,(ha.y+ba.y)*ma,ba.width*ma,ba.height*ma))}return X};u.useCssTransforms&&+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(X,ba){this.clearSelectionState()});u.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);u.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);u.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=+0;u.isEnabled=function(){return!1};u.panningHandler.isForcePanningEvent=function(X){for(var ba=X.getSource();null!=ba&&ba!=u.container;){if("foreignObject"===ba.nodeName||"text"===ba.nodeName)return!1;ba=ba.parentNode}return!mxEvent.isPopupTrigger(X.getEvent())};var B=u.panningHandler.start;u.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!u.standalone){var H=!1,S=!1;this.setDefaultStyle=function(X){try{u.getModel().isEdge(X)?+S=u.pasteEdgeStyle=!1:H=!1;var ba=u.getCellStyle(X,!1),ha=[],ma=[],Y;for(Y in ba)ha.push(ba[Y]),ma.push(Y);u.getModel().isEdge(X)?u.currentEdgeStyle={}:u.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ma,"values",ha,"cells",[X],"force",!0));u.getModel().isEdge(X)?S=u.pasteEdgeStyle=!0:H=!0}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){u.currentEdgeStyle=mxUtils.clone(u.defaultEdgeStyle);u.currentVertexStyle=mxUtils.clone(u.defaultVertexStyle);H=S=+u.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};u.addListener("cellsInserted",function(X,ba){u.pasteCellStyles(u.includeDescendants(ba.getProperty("cells")))});u.addListener("textInserted",function(X,ba){u.pasteCellStyles(ba.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var G=mxUtils.bind(this,function(X){null==X&&(X=window.event);return u.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container!=document.body||+this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=G,this.menubarContainer.onmousedown=G,this.toolbarContainer.onselectstart=G,this.toolbarContainer.onmousedown=G,this.diagramContainer.onselectstart=G,this.diagramContainer.onmousedown=G,this.sidebarContainer.onselectstart=G,this.sidebarContainer.onmousedown=G,this.formatContainer.onselectstart=G,this.formatContainer.onmousedown=G,this.footerContainer.onselectstart=G,this.footerContainer.onmousedown=G,null!=this.tabContainer&&+(this.tabContainer.onselectstart=G),mxClient.IS_IOS&&(e=function(){var X=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ba=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{X=[parseInt(ba[1],10),parseInt(ba[2],10),parseInt(ba[3]||0,10)]}catch(ha){}}return X}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect",+"none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(X){if(null!=X){var ba=mxEvent.getSource(X);if("A"==ba.nodeName)for(;null!=ba;){if("geHint"==ba.className)return!0;ba=ba.parentNode}}return G(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||+9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):u.panningHandler.usePopupTrigger=!1;u.init(this.diagramContainer);mxClient.IS_SVG&&null!=u.view.getDrawPane()&&(e=u.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=u.graphHandler){var O=u.graphHandler.start;u.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();O.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,+"mousemove",mxUtils.bind(this,function(X){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-ba.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var R=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,ba){return m.isSpaceDown()||R.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,+function(X){16==X.which?this.shiftDown=!0:32!=X.which||u.isEditing()?mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),u.container.style.cursor="move",u.isEditing()||mxEvent.getSource(X)!=u.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){u.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);+var c=u.panningHandler.isForcePanningEvent;u.panningHandler.isForcePanningEvent=function(X){return c.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var f=u.cellEditor.isStopEditingEvent;u.cellEditor.isStopEditingEvent=function(X){return f.apply(this,arguments)||13==X.keyCode&&(!mxClient.IS_SF&&+mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X)||mxClient.IS_SF&&mxEvent.isShiftDown(X))};var l=u.isZoomWheelEvent;u.isZoomWheelEvent=function(){return m.isSpaceDown()||l.apply(this,arguments)};var t=!1,z=null,C=null,F=null,N=mxUtils.bind(this,function(){if(null!=this.toolbar&&t!=u.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,ba=[];null!=X;){var ha=X.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,X)&&(X.parentNode.removeChild(X),ba.push(X));+X=ha}X=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==F)this.toolbar.createTextToolbar();else{for(var ma=0;ma<F.length;ma++)this.toolbar.container.appendChild(F[ma]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=C}t=u.cellEditor.isContentEditing();z=X;C=ha;F=ba}}),K=u.cellEditor.startEditing;u.cellEditor.startEditing=function(){K.apply(this,arguments);N();if(u.cellEditor.isContentEditing()){var X=!1,ba=function(){X||(X=!0,window.setTimeout(function(){var ha=u.getSelectedEditingElement();+null!=ha&&(ha=mxUtils.getCurrentStyle(ha),null!=ha&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ha.fontFamily)),m.toolbar.setFontSize(parseInt(ha.fontSize))));X=!1},0))};mxEvent.addListener(u.cellEditor.textarea,"input",ba);mxEvent.addListener(u.cellEditor.textarea,"touchend",ba);mxEvent.addListener(u.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(u.cellEditor.textarea,"keyup",ba);ba()}};var I=u.cellEditor.stopEditing;u.cellEditor.stopEditing=function(X,ba){try{I.apply(this,+arguments),N()}catch(ha){m.handleError(ha)}};u.container.setAttribute("tabindex","0");u.container.style.cursor="default";if(window.self===window.top&&null!=u.container.parentNode)try{u.container.focus()}catch(X){}var ca=u.fireMouseEvent;u.fireMouseEvent=function(X,ba,ha){try{X==mxEvent.MOUSE_DOWN&&this.container.focus(),ca.apply(this,arguments)}catch(ma){m.handleError(ma)}};var da=u.foldCells;u.foldCells=function(X,ba,ha,ma,Y){try{da.apply(this,arguments)}catch(la){m.handleError(la)}};u.popupMenuHandler.autoExpand=+!0;null!=this.menus&&(u.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,ba,ha){this.menus.createPopupMenu(X,ba,ha)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){u.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};u.connectionHandler.addListener(mxEvent.CONNECT,function(X,ba){var ha=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(ha.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=+m.hoverIcons&&m.hoverIcons.update(u.view.getState(ha[ha.length-1]))},0));u.pasteCellStyles(ha)});this.addListener("styleChanged",mxUtils.bind(this,function(X,ba){X=ba.getProperty("force");(this.updateDefaultStyle||X)&&u.copyCellStyles(ba.getProperty("cells"),ba.getProperty("keys"),ba.getProperty("values"),u.currentVertexStyle,u.currentEdgeStyle,H,S);null!=this.toolbar&&(this.toolbar.setFontName(u.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(u.currentVertexStyle.fontSize||+Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(ba=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],ba.style.backgroundPosition="left center",ba.style.backgroundRepeat="no-repeat",ba.className="geAdaptiveAsset",ba.style.height="100%",ba.style.width="100%",ba.style.backgroundImage="orthogonalEdgeStyle"==u.currentEdgeStyle.edgeStyle&&"1"==u.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==u.currentEdgeStyle.edgeStyle||"none"==u.currentEdgeStyle.edgeStyle||+null==u.currentEdgeStyle.edgeStyle?"url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==u.currentEdgeStyle.edgeStyle?"url("+Format.entityImage.src+")":"elbowEdgeStyle"==u.currentEdgeStyle.edgeStyle?"vertical"==u.currentEdgeStyle.elbow?"url("+Format.verticalElbowImage.src+")":"url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==u.currentEdgeStyle.edgeStyle?"vertical"==u.currentEdgeStyle.elbow?"url("+Format.verticalIsometricImage.src+")":"url("+Format.horizontalIsometricImage.src++")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&(ba=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],ba.style.backgroundPosition="left center",ba.style.backgroundRepeat="no-repeat",ba.className="geAdaptiveAsset",ba.style.height="100%",ba.style.width="100%",ba.style.backgroundImage="link"==u.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==u.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==u.currentEdgeStyle.shape?"url("++Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=u.currentVertexStyle.fontFamily||"Helvetica",ba=String(u.currentVertexStyle.fontSize||"12"),ha=u.getView().getState(u.getSelectionCell());null!=ha&&(X=ha.style[mxConstants.STYLE_FONTFAMILY]||X,ba=ha.style[mxConstants.STYLE_FONTSIZE]||ba,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(ba)}),u.getSelectionModel().addListener(mxEvent.CHANGE,+b),u.getModel().addListener(mxEvent.CHANGE,b));u.addListener(mxEvent.CELLS_ADDED,function(X,ba){X=ba.getProperty("cells");ba=ba.getProperty("parent");null!=ba&&u.getModel().isLayer(ba)&&!u.isCellVisible(ba)&&null!=X&&0<X.length&&u.getModel().setVisible(ba,!0)});Graph.selectParentLayer&&u.selectionModel.addListener(mxEvent.CHANGE,function(){if(u.isEnabled()&&!u.isSelectionEmpty()){var X=u.getLayerForCells(u.getSelectionCells());null!=X&&u.setDefaultParent(X)}});this.gestureHandler=mxUtils.bind(this,+function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ea=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ea&&window.clearTimeout(ea);ea=window.setTimeout(mxUtils.bind(this,function(){ea=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,+"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){u.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,+function(){u.view.validateBackground()}));u.addListener("gridSizeChanged",mxUtils.bind(this,function(){u.isGridEnabled()&&u.view.validateBackground()}));this.editor.resetGraph()}this.init();u.standalone||this.open()};EditorUi.compactUi=!0;+EditorUi.parsePng=function(b,e,g){function m(H,S){var G=p;p+=S;return H.substring(G,p)}function u(H){H=m(H,4);return H.charCodeAt(3)+(H.charCodeAt(2)<<8)+(H.charCodeAt(1)<<16)+(H.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=u(b);var B=m(b,4);if(null!=e&&e(p-8,B,g))break;value=m(b,g);m(b,4);if("IEND"==B)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?212:240);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,"keydown",mxUtils.bind(this,function(m){this.onKeyDown(m)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(m){this.onKeyPress(m)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var e=b.setDefaultParent,g=this;this.editor.graph.setDefaultParent=function(){e.apply(this,arguments);g.updateActionStates()};b.showLinkDialog=mxUtils.bind(g,g.showLinkDialog);b.editLink=g.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};-EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),g=this.initSelectionState(),m=!0,v=0;v<e.length;v++){var p=b.getCurrentCellStyle(e[v]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(g,e[v],e,m),m=!1)}this.updateSelectionStateForTableCells(g);return g};+EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),g=this.initSelectionState(),m=!0,u=0;u<e.length;u++){var p=b.getCurrentCellStyle(e[u]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(g,e[u],e,m),m=!1)}this.updateSelectionStateForTableCells(g);return g};EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),v=g.getParent(m);if(null!=m&&null!=v){for(var p=m.getIndex(e[0]),A=v.getIndex(m),G=null,S=1,F=1,P=0,R=A<v.getChildCount()-1?g.getChildAt(g.getChildAt(v,A+1),p):null;P<e.length-1;){var T=e[++P];null==R||R!=T||null!=G&&S!=G||(G=S,S=0,F++,m=g.getParent(R),R=A+F<v.getChildCount()?g.getChildAt(g.getChildAt(v,A+F),p):null);var c=this.editor.graph.view.getState(T);-if(T==g.getChildAt(m,p+S)&&null!=c&&1==mxUtils.getValue(c.style,"colspan",1)&&1==mxUtils.getValue(c.style,"rowspan",1))S++;else break}P==F*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=F)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};-EditorUi.prototype.createTimeout=function(b,e,g){var m=!0,v=null,p=mxUtils.bind(this,function(G){v.clear()&&(m=!1,G=null!=G?G:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,e,g)})},null!=g?g(G):this.handleError(G))}),A=window.setTimeout(p,null!=b?b:this.timeout);v={clear:function(){window.clearTimeout(A);return m},isAlive:function(){return m}};null!=e&&this.tryAndHandle(mxUtils.bind(this,function(){e(v)}),p);return v};+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),u=g.getParent(m);if(null!=m&&null!=u){for(var p=m.getIndex(e[0]),B=u.getIndex(m),H=null,S=1,G=1,O=0,R=B<u.getChildCount()-1?g.getChildAt(g.getChildAt(u,B+1),p):null;O<e.length-1;){var c=e[++O];null==R||R!=c||null!=H&&S!=H||(H=S,S=0,G++,m=g.getParent(R),R=B+G<u.getChildCount()?g.getChildAt(g.getChildAt(u,B+G),p):null);var f=this.editor.graph.view.getState(c);+if(c==g.getChildAt(m,p+S)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))S++;else break}O==G*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=G)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};+EditorUi.prototype.createTimeout=function(b,e,g){var m=!0,u=null,p=mxUtils.bind(this,function(H){u.clear()&&(m=!1,H=null!=H?H:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,e,g)})},null!=g?g(H):this.handleError(H))}),B=window.setTimeout(p,null!=b?b:this.timeout);u={clear:function(){window.clearTimeout(B);return m},isAlive:function(){return m}};null!=e&&this.tryAndHandle(mxUtils.bind(this,function(){e(u)}),p);return u};EditorUi.prototype.tryAndHandle=function(b,e){try{b()}catch(g){null!=e?e(g):this.handleError(g)}};-EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var v=Graph.colorStyles,p=document.createElement("div");m.model.beginUpdate();try{for(var A=0;A<b.length;A++)if(m.model.isEdge(b[A])||m.model.isVertex(b[A])){var G=m.getCellStyle(b[A],!1);if(null!=G)for(var S=0;S<v.length;S++)try{var F=G[v[S]];if(mxUtils.isLightDarkColor(F)){var P=mxUtils.getLightDarkColor(F);m.setCellStyles(v[S],P.light,[b[A]])}}catch(T){}e&&m.isHtmlLabel(b[A])&&-"0"!=mxUtils.getValue(G,"html","0")&&(p.innerHTML=Graph.sanitizeHtml(m.getLabel(b[A])),Graph.addLightDarkColors(p,null,null,function(T,c,f){return mxUtils.isLightDarkColor(f)?(f=mxUtils.getLightDarkColor(f),T.style.setProperty(c,f.light),!0):!1})&&m.cellLabelChanged(b[A],p.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){P=mxUtils.getLightDarkColor(m.background);var R=new ChangePageSetup(this,P.light);R.ignoreImage=!0;m.model.execute(R)}}finally{m.model.endUpdate()}return b};+EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var u=Graph.colorStyles,p=document.createElement("div");m.model.beginUpdate();try{for(var B=0;B<b.length;B++)if(m.model.isEdge(b[B])||m.model.isVertex(b[B])){var H=m.getCellStyle(b[B],!1);if(null!=H)for(var S=0;S<u.length;S++)try{var G=H[u[S]];if(mxUtils.isLightDarkColor(G)){var O=mxUtils.getLightDarkColor(G);m.setCellStyles(u[S],O.light,[b[B]])}}catch(c){}e&&m.isHtmlLabel(b[B])&&+"0"!=mxUtils.getValue(H,"html","0")&&(p.innerHTML=Graph.sanitizeHtml(m.getLabel(b[B])),Graph.addLightDarkColors(p,null,null,function(c,f,l){return mxUtils.isLightDarkColor(l)?(l=mxUtils.getLightDarkColor(l),c.style.setProperty(f,l.light),!0):!1})&&m.cellLabelChanged(b[B],p.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){O=mxUtils.getLightDarkColor(m.background);var R=new ChangePageSetup(this,O.light);R.ignoreImage=!0;m.model.execute(R)}}finally{m.model.endUpdate()}return b};EditorUi.prototype.updateSelectionStateForCell=function(b,e,g,m){g=this.editor.graph;b.cells.push(e);if(g.getModel().isVertex(e)){b.connections=0<g.model.getEdgeCount(e);b.unlocked=b.unlocked&&!g.isCellLocked(e);b.resizable=b.resizable&&g.isCellResizable(e);b.rotatable=b.rotatable&&g.isCellRotatable(e);b.movable=b.movable&&g.isCellMovable(e)&&!g.isTableRow(e)&&!g.isTableCell(e);b.swimlane=b.swimlane||g.isSwimlane(e);b.table=b.table||g.isTable(e);b.cell=b.cell||g.isTableCell(e);b.row=b.row||g.isTableRow(e);-b.vertices.push(e);var v=g.getCellGeometry(e);if(null!=v&&(0<v.width?null==b.width?b.width=v.width:b.width!=v.width&&(b.width=""):b.containsLabel=!0,0<v.height?null==b.height?b.height=v.height:b.height!=v.height&&(b.height=""):b.containsLabel=!0,!v.relative||null!=v.offset)){var p=v.relative?v.offset.x:v.x;v=v.relative?v.offset.y:v.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=v:b.y!=v&&(b.y="")}}else g.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=+b.vertices.push(e);var u=g.getCellGeometry(e);if(null!=u&&(0<u.width?null==b.width?b.width=u.width:b.width!=u.width&&(b.width=""):b.containsLabel=!0,0<u.height?null==b.height?b.height=u.height:b.height!=u.height&&(b.height=""):b.containsLabel=!0,!u.relative||null!=u.offset)){var p=u.relative?u.offset.x:u.x;u=u.relative?u.offset.y:u.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=u:b.y!=u&&(b.y="")}}else g.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=!1);p=g.view.getState(e);null!=p&&(b.html=b.html&&g.isHtmlLabel(e),b.autoSize=b.autoSize||g.isAutoSizeState(p),b.glass=b.glass&&g.isGlassState(p),b.rounded=b.rounded&&g.isRoundedState(p),b.lineJumps=b.lineJumps&&g.isLineJumpState(p),b.image=b.image||g.isImageState(p),b.shadow=b.shadow&&g.isShadowState(p),b.fill=b.fill&&g.isFillState(p),b.gradient=b.fill&&g.isGradientState(p),b.stroke=b.stroke&&g.isStrokeState(p),e=mxUtils.getValue(p.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==e,g.mergeStyle(p.style,b.style,m))};-EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,F){"mouseDown"==F.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;-b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var v=b.dblClick;b.dblClick=function(S,F){if(this.isEnabled())if(null!=F||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))v.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",-g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var A=this.hoverIcons.execute;this.hoverIcons.execute=function(S,F,P){var R=P.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?A.apply(this,arguments):this.graph.connectVertex(S.cell,F,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(T,c,f){var k=b.getCompositeParent(S.cell);T=b.getCellGeometry(k);for(P.consume();null!=k&&b.model.isVertex(k)&&null!=T&&T.relative;)cell=-k,k=b.model.getParent(cell),T=b.getCellGeometry(k);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.getGraphX(),P.getGraphY(),k,mxUtils.bind(this,function(B){f(B);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(B))}),F)}),30)}),mxUtils.bind(this,function(T){this.graph.selectCellsForConnectVertex(T,R,this)}))};var G=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,F){null!=G&&window.clearTimeout(G);G=window.setTimeout(mxUtils.bind(this,function(){var P=-F.getProperty("arrow"),R=F.getProperty("direction"),T=F.getProperty("event");P=P.getBoundingClientRect();var c=mxUtils.getOffset(b.container),f=b.container.scrollLeft+P.x-c.x;c=b.container.scrollTop+P.y-c.y;var k=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),B=e.showShapePicker(f,c,k,mxUtils.bind(this,function(z){null!=z&&b.connectVertex(k,R,b.defaultEdgeLength,T,!0,!1,function(C,I,L){L(z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(z))},-function(C){b.selectCellsForConnectVertex(C)},T,this.hoverIcons)}),R,!0);null!=B&&(this.centerShapePicker(B,P,f,c,R),mxUtils.setOpacity(B,30),mxEvent.addListener(B,"mouseenter",function(){mxUtils.setOpacity(B,100)}),mxEvent.addListener(B,"mouseleave",function(){e.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,F){null!=G&&window.clearTimeout(G)}))}};-EditorUi.prototype.centerShapePicker=function(b,e,g,m,v){if(v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();v==mxConstants.DIRECTION_NORTH?(g-=p.width/2-10,m-=p.height+6):v==mxConstants.DIRECTION_SOUTH?(g-=p.width/2-10,m+=e.height+6):v==mxConstants.DIRECTION_WEST?(g-=p.width+6,m-=p.height/2-10):v==mxConstants.DIRECTION_EAST&&(g+=e.width+6,m-=p.height/2-10);b.style.left=g+"px";b.style.top=m+"px"};-EditorUi.prototype.showShapePicker=function(b,e,g,m,v,p,A,G,S){var F=null;this.editor.graph.freehand.isDrawing()||(G=G||null==g,F=this.createShapePicker(b,e,g,m,v,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,p,G),p,A,G,S),null!=F&&(null==this.hoverIcons||p||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=F));return F};-EditorUi.prototype.createShapePicker=function(b,e,g,m,v,p,A,G,S,F,P){P=null!=P?P:!0;var R=this.editor.graph,T=null;S=null!=S?S:function(k){k=k[0];var B=0,z=0,C=k.geometry;null!=C&&(R.model.isEdge(k)&&(k=C.getTerminalPoint(!1),C=new mxRectangle(0,0,k.x,k.y)),B=C.width/2,z=C.height/2);return new mxPoint(R.snap(Math.round(b/R.view.scale)-R.view.translate.x-B),R.snap(Math.round(e/R.view.scale)-R.view.translate.y-z))};if(null!=A&&0<A.length){var c=this;R=this.editor.graph;T=document.createElement("div");-v=R.view.getState(g);var f=null==g||null!=v&&R.isTransparentState(v)?null:R.copyStyle(g);v=6>A.length?35*A.length:140;T.className="geToolbarContainer geSidebarContainer geShapePicker";T.setAttribute("title",mxResources.get("sidebarTooltip"));T.style.left=Math.round(b)+"px";T.style.top=Math.round(e)+"px";T.style.width=v+"px";mxClient.IS_POINTER&&(T.style.touchAction="none");G||mxUtils.setPrefixedStyle(T.style,"transform","translate(-22px,-22px)");R.container.appendChild(T);v=mxUtils.bind(this,function(k){var B=-document.createElement("a");B.className="geToolbarButton";B.style.display="inline-block";B.style.position="relative";B.style.overflow="hidden";B.style.cursor="pointer";B.style.width="30px";B.style.height="30px";B.style.padding="1px";T.appendChild(B);null!=f&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(f,[k]):this.sidebar.graph.pasteCellStyles([k],R.currentVertexStyle,R.currentEdgeStyle);var z=k.geometry;R.model.isEdge(k)&&(z=z.getTerminalPoint(!1),z=new mxRectangle(0,0,z.x,z.y));null!=z&&-B.appendChild(this.sidebar.createVertexTemplateFromCells([k],z.width,z.height,"",!0,!1,null,!1,mxUtils.bind(this,function(C){if(!mxEvent.isShiftDown(C)||null==g&&R.isSelectionEmpty()){var I=R.cloneCell(k);if(null!=m)m(I);else{var L=S([I]);R.model.isEdge(I)?I.geometry.translate(L.x,L.y):(I.geometry.x=L.x,I.geometry.y=L.y);R.model.beginUpdate();try{R.addCell(I),R.model.isVertex(I)&&R.isAutoSizeCell(I)&&R.updateCellSize(I)}finally{R.model.endUpdate()}R.setSelectionCell(I);R.scrollCellToVisible(I);P&&-R.startEditing(I);null!=c.hoverIcons&&c.hoverIcons.update(R.view.getState(I))}}else I=R.getEditableCells(null!=g?[g]:R.getSelectionCells()),R.updateShapes(k,I);null!=p&&p(C);mxEvent.consume(C)}),25,25,null,null,g))});for(F=0;F<(G?Math.min(A.length,4):A.length);F++)v(A[F]);A=T.offsetTop+T.clientHeight-(R.container.scrollTop+R.container.offsetHeight);0<A&&(T.style.top=Math.max(R.container.scrollTop+22,e-A)+"px");A=T.offsetLeft+T.clientWidth-(R.container.scrollLeft+R.container.offsetWidth);0<A&&(T.style.left=-Math.max(R.container.scrollLeft+22,b-A)+"px")}return T};-EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,v=mxUtils.bind(this,function(p,A,G,S){return m.createVertex(null,null,S||"",0,0,A||120,G||60,p,!1)});e=mxUtils.bind(this,function(p,A,G){p=new mxCell(G||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),p);p.geometry.setTerminalPoint(new mxPoint(0,0),!0);p.geometry.setTerminalPoint(new mxPoint(p.geometry.width,null!=A?A:0),!1);p.geometry.points=null!=A?[new mxPoint(p.geometry.width/2,A)]:[];p.geometry.relative=!0;p.edge=-!0;return p});if(null!=b)try{b=m.cloneCell(b),m.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(p){b=null}null==b&&(b=v(m.appendFontSize("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",m.vertexFontSize),40,20,"Text"),m.model.isVertex(b)&&m.isAutoSizeCell(b)&&Graph.createOffscreenGraph(m.getStylesheet()).updateCellSize(b));b=[b,v("whiteSpace=wrap;html=1;"),v("ellipse;whiteSpace=wrap;html=1;",80,80),v("rhombus;whiteSpace=wrap;html=1;",-80,80),v("rounded=1;whiteSpace=wrap;html=1;"),v("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),v("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),v("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),v("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),v("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),v("triangle;whiteSpace=wrap;html=1;",-60,80),v("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),v("shape=tape;whiteSpace=wrap;html=1;",120,100),v("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),v("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),v("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];g&&(b=b.concat([e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,G){"mouseDown"==G.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;+b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var u=b.dblClick;b.dblClick=function(S,G){if(this.isEnabled())if(null!=G||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))u.apply(this,arguments);else{var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(O.x,O.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",+g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var B=this.hoverIcons.execute;this.hoverIcons.execute=function(S,G,O){var R=O.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?B.apply(this,arguments):this.graph.connectVertex(S.cell,G,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(c,f,l){var t=b.getCompositeParent(S.cell);c=b.getCellGeometry(t);for(O.consume();null!=t&&b.model.isVertex(t)&&null!=c&&c.relative;)cell=+t,t=b.model.getParent(cell),c=b.getCellGeometry(t);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(O.getGraphX(),O.getGraphY(),t,mxUtils.bind(this,function(z){l(z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(z))}),G)}),30)}),mxUtils.bind(this,function(c){this.graph.selectCellsForConnectVertex(c,R,this)}))};var H=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H);H=window.setTimeout(mxUtils.bind(this,function(){var O=+G.getProperty("arrow"),R=G.getProperty("direction"),c=G.getProperty("event");O=O.getBoundingClientRect();var f=mxUtils.getOffset(b.container),l=b.container.scrollLeft+O.x-f.x;f=b.container.scrollTop+O.y-f.y;var t=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),z=e.showShapePicker(l,f,t,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(t,R,b.defaultEdgeLength,c,!0,!1,function(F,N,K){K(C);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(C))},+function(F){b.selectCellsForConnectVertex(F)},c,this.hoverIcons)}),R,!0);null!=z&&(this.centerShapePicker(z,O,l,f,R),mxUtils.setOpacity(z,30),mxEvent.addListener(z,"mouseenter",function(){mxUtils.setOpacity(z,100)}),mxEvent.addListener(z,"mouseleave",function(){e.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H)}))}};+EditorUi.prototype.centerShapePicker=function(b,e,g,m,u){if(u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();u==mxConstants.DIRECTION_NORTH?(g-=p.width/2-10,m-=p.height+6):u==mxConstants.DIRECTION_SOUTH?(g-=p.width/2-10,m+=e.height+6):u==mxConstants.DIRECTION_WEST?(g-=p.width+6,m-=p.height/2-10):u==mxConstants.DIRECTION_EAST&&(g+=e.width+6,m-=p.height/2-10);b.style.left=g+"px";b.style.top=m+"px"};+EditorUi.prototype.showShapePicker=function(b,e,g,m,u,p,B,H,S){var G=null;this.editor.graph.freehand.isDrawing()||(H=H||null==g,G=this.createShapePicker(b,e,g,m,u,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,p,H),p,B,H,S),null!=G&&(null==this.hoverIcons||p||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=G));return G};+EditorUi.prototype.createShapePicker=function(b,e,g,m,u,p,B,H,S,G,O){O=null!=O?O:!0;var R=this.editor.graph,c=null;S=null!=S?S:function(t){t=t[0];var z=0,C=0,F=t.geometry;null!=F&&(R.model.isEdge(t)&&(t=F.getTerminalPoint(!1),F=new mxRectangle(0,0,t.x,t.y)),z=F.width/2,C=F.height/2);return new mxPoint(R.snap(Math.round(b/R.view.scale)-R.view.translate.x-z),R.snap(Math.round(e/R.view.scale)-R.view.translate.y-C))};if(null!=B&&0<B.length){var f=this;R=this.editor.graph;c=document.createElement("div");+u=R.view.getState(g);var l=null==g||null!=u&&R.isTransparentState(u)?null:R.copyStyle(g);u=6>B.length?35*B.length:140;c.className="geToolbarContainer geSidebarContainer geShapePicker";c.setAttribute("title",mxResources.get("sidebarTooltip"));c.style.left=Math.round(b)+"px";c.style.top=Math.round(e)+"px";c.style.width=u+"px";mxClient.IS_POINTER&&(c.style.touchAction="none");H||mxUtils.setPrefixedStyle(c.style,"transform","translate(-22px,-22px)");R.container.appendChild(c);u=mxUtils.bind(this,function(t){var z=+document.createElement("a");z.className="geToolbarButton";z.style.display="inline-block";z.style.position="relative";z.style.overflow="hidden";z.style.cursor="pointer";z.style.width="30px";z.style.height="30px";z.style.padding="1px";c.appendChild(z);null!=l&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(l,[t]):this.sidebar.graph.pasteCellStyles([t],R.currentVertexStyle,R.currentEdgeStyle);var C=t.geometry;R.model.isEdge(t)&&(C=C.getTerminalPoint(!1),C=new mxRectangle(0,0,C.x,C.y));null!=C&&+z.appendChild(this.sidebar.createVertexTemplateFromCells([t],C.width,C.height,"",!0,!1,null,!1,mxUtils.bind(this,function(F){if(!mxEvent.isShiftDown(F)||null==g&&R.isSelectionEmpty()){var N=R.cloneCell(t);if(null!=m)m(N);else{var K=S([N]);R.model.isEdge(N)?N.geometry.translate(K.x,K.y):(N.geometry.x=K.x,N.geometry.y=K.y);R.model.beginUpdate();try{R.addCell(N),R.model.isVertex(N)&&R.isAutoSizeCell(N)&&R.updateCellSize(N)}finally{R.model.endUpdate()}R.setSelectionCell(N);R.scrollCellToVisible(N);O&&+R.startEditing(N);null!=f.hoverIcons&&f.hoverIcons.update(R.view.getState(N))}}else N=R.getEditableCells(null!=g?[g]:R.getSelectionCells()),R.updateShapes(t,N);null!=p&&p(F);mxEvent.consume(F)}),25,25,null,null,g))});for(G=0;G<(H?Math.min(B.length,4):B.length);G++)u(B[G]);B=c.offsetTop+c.clientHeight-(R.container.scrollTop+R.container.offsetHeight);0<B&&(c.style.top=Math.max(R.container.scrollTop+22,e-B)+"px");B=c.offsetLeft+c.clientWidth-(R.container.scrollLeft+R.container.offsetWidth);0<B&&(c.style.left=+Math.max(R.container.scrollLeft+22,b-B)+"px")}return c};+EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,u=mxUtils.bind(this,function(p,B,H,S){return m.createVertex(null,null,S||"",0,0,B||120,H||60,p,!1)});e=mxUtils.bind(this,function(p,B,H){p=new mxCell(H||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),p);p.geometry.setTerminalPoint(new mxPoint(0,0),!0);p.geometry.setTerminalPoint(new mxPoint(p.geometry.width,null!=B?B:0),!1);p.geometry.points=null!=B?[new mxPoint(p.geometry.width/2,B)]:[];p.geometry.relative=!0;p.edge=+!0;return p});if(null!=b)try{b=m.cloneCell(b),m.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(p){b=null}null==b&&(b=u(m.appendFontSize("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",m.vertexFontSize),40,20,"Text"),m.model.isVertex(b)&&m.isAutoSizeCell(b)&&Graph.createOffscreenGraph(m.getStylesheet()).updateCellSize(b));b=[b,u("whiteSpace=wrap;html=1;"),u("ellipse;whiteSpace=wrap;html=1;",80,80),u("rhombus;whiteSpace=wrap;html=1;",+80,80),u("rounded=1;whiteSpace=wrap;html=1;"),u("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),u("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),u("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),u("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),u("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),u("triangle;whiteSpace=wrap;html=1;",+60,80),u("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),u("shape=tape;whiteSpace=wrap;html=1;",120,100),u("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),u("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),u("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];g&&(b=b.concat([e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;"),e("edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;",this.editor.graph.defaultEdgeLength/2)]));return b};EditorUi.prototype.isShapePickerVisible=function(b){return null!=this.shapePicker};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};EditorUi.prototype.isSpaceDown=function(){return this.spaceDown};EditorUi.prototype.isShiftDown=function(){return this.shiftDown};-EditorUi.prototype.onKeyDown=function(b){var e=this.editor.graph;if(9==b.which&&e.isEnabled()&&!mxEvent.isControlDown(b)){if(e.isEditing())if(mxEvent.isAltDown(b))e.stopEditing(!1);else try{var g=e.cellEditor.isContentEditing()&&e.cellEditor.isTextSelected();if(window.getSelection&&e.cellEditor.isContentEditing()&&!g&&!mxClient.IS_IE&&!mxClient.IS_IE11){var m=window.getSelection(),v=0<m.rangeCount?m.getRangeAt(0).commonAncestorContainer:null;g=null!=v&&("LI"==v.nodeName||null!=v.parentNode&&"LI"==-v.parentNode.nodeName)}g?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?e.stopEditing(!1):e.cellEditor.insertTab(e.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?e.selectParentCell():e.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};+EditorUi.prototype.onKeyDown=function(b){var e=this.editor.graph;if(9==b.which&&e.isEnabled()&&!mxEvent.isControlDown(b)){if(e.isEditing())if(mxEvent.isAltDown(b))e.stopEditing(!1);else try{var g=e.cellEditor.isContentEditing()&&e.cellEditor.isTextSelected();if(window.getSelection&&e.cellEditor.isContentEditing()&&!g&&!mxClient.IS_IE&&!mxClient.IS_IE11){var m=window.getSelection(),u=0<m.rangeCount?m.getRangeAt(0).commonAncestorContainer:null;g=null!=u&&("LI"==u.nodeName||null!=u.parentNode&&"LI"==+u.parentNode.nodeName)}g?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?e.stopEditing(!1):e.cellEditor.insertTab(e.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?e.selectParentCell():e.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};EditorUi.prototype.onKeyPress=function(b){var e=this.editor.graph;!this.isImmediateEditingEvent(b)||e.isEditing()||e.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(e.escape(),e.startEditing(null,String.fromCharCode(b.which)))};EditorUi.prototype.isImmediateEditingEvent=function(b){return!0};-EditorUi.prototype.updateCssForMarker=function(b,e,g,m,v){b.style.display="inline-flex";b.style.alignItems="center";b.style.justifyContent="center";b.innerText="";g=this.getImageForMarker(m,v,g);null==g?(b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.fontSize="11px",b.style.filter="none"):(m=document.createElement("img"),m.className="geAdaptiveAsset",m.setAttribute("src",g),b.className="","end"==e&&mxUtils.setPrefixedStyle(m.style,"transform","scaleX(-1)"),+EditorUi.prototype.updateCssForMarker=function(b,e,g,m,u){b.style.display="inline-flex";b.style.alignItems="center";b.style.justifyContent="center";b.innerText="";g=this.getImageForMarker(m,u,g);null==g?(b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.fontSize="11px",b.style.filter="none"):(m=document.createElement("img"),m.className="geAdaptiveAsset",m.setAttribute("src",g),b.className="","end"==e&&mxUtils.setPrefixedStyle(m.style,"transform","scaleX(-1)"),b.appendChild(m))};EditorUi.prototype.getImageForMarker=function(b,e,g){return"flexArrow"==g?null!=b&&b!=mxConstants.NONE?Format.blockMarkerImage.src:null:b==mxConstants.ARROW_CLASSIC?"1"!=e?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?"1"!=e?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?"1"!=e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK_THIN?"1"!=e?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?"1"!=e?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?"1"!=e?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?"1"!=e?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?"1"!=e?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==b?Format.boxMarkerImage.src:"halfCircle"==b?Format.halfCircleMarkerImage.src:"openAsync"==b?Format.openAsyncFilledMarkerImage.src:"async"==b?"1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?Format.dashMarkerImage.src:"baseDash"==b?Format.baseDashMarkerImage.src:"cross"==b?Format.crossMarkerImage.src:"circle"==b?Format.circleMarkerImage.src:"circlePlus"==b?Format.circlePlusMarkerImage.src:"ERone"==b?Format.EROneMarkerImage.src:"ERmandOne"==b?Format.ERmandOneMarkerImage.src:"ERmany"==b?Format.ERmanyMarkerImage.src:"ERoneToMany"==b?Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b?Format.ERzeroToManyMarkerImage.src:null};EditorUi.prototype.createMenus=function(){return null};EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),g=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));g.setEnabled(e.isEnabled())};-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var A=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{A=A||p.getSelectionCells();A=p.getExportableCells(p.model.getTopmostCells(A));for(var G={},S=p.createCellLookup(A),F=p.cloneCells(A,null,G),P=new mxGraphModel,R=P.getChildAt(P.getRoot(),-0),T=0;T<F.length;T++){P.add(R,F[T]);var c=p.view.getState(A[T]);if(null!=c){var f=p.getCellGeometry(F[T]);null!=f&&f.relative&&!P.isEdge(A[T])&&null==S[mxObjectIdentity.get(P.getParent(A[T]))]&&(f.offset=null,f.relative=!1,f.x=c.x/c.view.scale-c.view.translate.x,f.y=c.y/c.view.scale-c.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(G,S),F);mxClipboard.insertCount=1;mxClipboard.setCells(F)}b.updatePasteActionStates();return A};var g=mxClipboard.paste;mxClipboard.paste=function(p){var A=-null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):A=g.apply(this,arguments);b.updatePasteActionStates();return A};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var v=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,A){v.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var B=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{B=B||p.getSelectionCells();B=p.getExportableCells(p.model.getTopmostCells(B));for(var H={},S=p.createCellLookup(B),G=p.cloneCells(B,null,H),O=new mxGraphModel,R=O.getChildAt(O.getRoot(),+0),c=0;c<G.length;c++){O.add(R,G[c]);var f=p.view.getState(B[c]);if(null!=f){var l=p.getCellGeometry(G[c]);null!=l&&l.relative&&!O.isEdge(B[c])&&null==S[mxObjectIdentity.get(O.getParent(B[c]))]&&(l.offset=null,l.relative=!1,l.x=f.x/f.view.scale-f.view.translate.x,l.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(H,S),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return B};var g=mxClipboard.paste;mxClipboard.paste=function(p){var B=+null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):B=g.apply(this,arguments);b.updatePasteActionStates();return B};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var u=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,B){u.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var J=this.graph.getPageLayout(),W=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+J.x*W.width),this.scale*(this.translate.y+J.y*W.height),this.scale*J.width*W.width,-this.scale*J.height*W.height)};b.getPreferredPageSize=function(J,W,aa){J=this.getPageLayout();W=this.getPageSize();return new mxRectangle(0,0,J.width*W.width,J.height*W.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(J,W,aa,ba){if(null!=b.container&&!b.isViewer()){aa=null!=aa?aa:0;ba=null!=ba?ba:0;var ja=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),oa=mxUtils.hasScrollbars(b.container),qa=b.view.translate,ra=b.view.scale,-ua=mxRectangle.fromRectangle(ja);ua.x=ua.x/ra-qa.x;ua.y=ua.y/ra-qa.y;ua.width/=ra;ua.height/=ra;qa=b.container.scrollTop;var za=b.container.scrollLeft,Ba=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ba+=3;var Ca=b.container.offsetWidth-Ba;Ba=b.container.offsetHeight-Ba;J=J?Math.max(.3,Math.min(W||1,Ca/ua.width)):ra;W=(Ca-J*ua.width)/2/J;var La=0==this.lightboxVerticalDivider?0:(Ba-J*ua.height)/this.lightboxVerticalDivider/J;oa&&(W=Math.max(W,0),La=Math.max(La,-0));if(oa||ja.width<Ca||ja.height<Ba)b.view.scaleAndTranslate(J,Math.floor(W-ua.x),Math.floor(La-ua.y)),b.container.scrollTop=qa*J/ra,b.container.scrollLeft=za*J/ra;else if(0!=aa||0!=ba)ja=b.view.translate,b.view.setTranslate(Math.floor(ja.x+aa/ra),Math.floor(ja.y+ba/ra))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,-"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(J){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(J){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var v=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),T=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*T.width),this.scale*(this.translate.y+P.y*T.height),this.scale*P.width*T.width,+this.scale*P.height*T.height)};b.getPreferredPageSize=function(P,T,W){P=this.getPageLayout();T=this.getPageSize();return new mxRectangle(0,0,P.width*T.width,P.height*T.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,T,W,aa){if(null!=b.container&&!b.isViewer()){W=null!=W?W:0;aa=null!=aa?aa:0;var ja=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),pa=mxUtils.hasScrollbars(b.container),sa=b.view.translate,qa=b.view.scale,+wa=mxRectangle.fromRectangle(ja);wa.x=wa.x/qa-sa.x;wa.y=wa.y/qa-sa.y;wa.width/=qa;wa.height/=qa;sa=b.container.scrollTop;var Ba=b.container.scrollLeft,za=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)za+=3;var Ea=b.container.offsetWidth-za;za=b.container.offsetHeight-za;P=P?Math.max(.3,Math.min(T||1,Ea/wa.width)):qa;T=(Ea-P*wa.width)/2/P;var ra=0==this.lightboxVerticalDivider?0:(za-P*wa.height)/this.lightboxVerticalDivider/P;pa&&(T=Math.max(T,0),ra=Math.max(ra,+0));if(pa||ja.width<Ea||ja.height<za)b.view.scaleAndTranslate(P,Math.floor(T-wa.x),Math.floor(ra-wa.y)),b.container.scrollTop=sa*P/qa,b.container.scrollLeft=Ba*P/qa;else if(0!=W||0!=aa)ja=b.view.translate,b.view.setTranslate(Math.floor(ja.x+W/qa),Math.floor(ja.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,+"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var u=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var J=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=J?parseInt(J["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var A=0;p=mxUtils.bind(this,function(J,W,aa){A++;-var ba=document.createElement("span");ba.style.paddingLeft="8px";ba.style.paddingRight="8px";ba.style.cursor="pointer";mxEvent.addListener(ba,"click",J);null!=aa&&ba.setAttribute("title",aa);J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("src",W);J.style.width="36px";J.style.filter="invert(100%)";ba.appendChild(J);this.chromelessToolbar.appendChild(ba);return ba});if(null!=v.backBtn){var G=Graph.sanitizeLink(v.backBtn.url);null!=G&&p(mxUtils.bind(this,function(J){window.location.href=-G;mxEvent.consume(J)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(J){this.actions.get("previousPage").funct();mxEvent.consume(J)}),Editor.previousImage,mxResources.get("previousPage")),F=document.createElement("div");F.style.fontFamily=Editor.defaultHtmlFont;F.style.display="inline-block";F.style.verticalAlign="top";F.style.fontWeight="bold";F.style.marginTop="8px";F.style.fontSize="14px";F.style.cursor="default";F.style.color=-mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(F);var P=p(mxUtils.bind(this,function(J){this.actions.get("nextPage").funct();mxEvent.consume(J)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){F.innerText="";var J=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(F,J+1+" / "+this.pages.length);F.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());-S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(J-1,this.pages.length)].getName());P.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(J+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";P.style.paddingLeft="4px";P.style.paddingRight="0px";var T=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(P.style.display="",S.style.display="",F.style.display="inline-block"):-(P.style.display="none",S.style.display="none",F.style.display="none");R()});if(null!=this.menus){var c=this.menus.get("pages");null!=c&&mxEvent.addListener(F,"click",mxUtils.bind(this,function(J){var W=new mxPopupMenu(c.funct);W.div.className+=" geMenubarMenu";W.smartSeparators=!0;W.showDisabled=!0;W.autoExpand=!0;W.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(W,arguments);W.destroy()});var aa=mxUtils.getOffset(F);W.popup(aa.x,aa.y+F.offsetHeight,null,J);mxEvent.addListener(W.div,-"mouseleave",mxUtils.bind(this,function(){W.hideMenu()}))}))}this.editor.addListener("resetGraphView",T);this.editor.addListener("pageSelected",R)}p(mxUtils.bind(this,function(J){this.actions.get("zoomOut").funct();mxEvent.consume(J)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(J){this.actions.get("zoomIn").funct();mxEvent.consume(J)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(J){b.isLightboxView()?-(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(J)}),Editor.zoomFitImage,mxResources.get("fit"));var f=null,k=null,B=mxUtils.bind(this,function(J){null!=f&&(window.clearTimeout(f),f=null);null!=k&&(window.clearTimeout(k),k=null);f=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;k=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";k=null}),-600)}),J||200)}),z=mxUtils.bind(this,function(J){null!=f&&(window.clearTimeout(f),f=null);null!=k&&(window.clearTimeout(k),k=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,J||30)});if("1"==urlParams.layers){this.layersDialog=null;var C=p(mxUtils.bind(this,function(J){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var W=C.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=-W.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));W=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=-W.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(J)}),Editor.layersImage,mxResources.get("layers")),I=b.getModel();I.addListener(mxEvent.CHANGE,function(){C.style.display=1<I.getChildCount(I.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(J){null!=this.editor.editButtonFunc?-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(J)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(T=0;T<this.lightboxToolbarActions.length;T++){var L=this.lightboxToolbarActions[T];L.elem=p(L.fn,L.icon,L.tooltip)}if(null!=v.refreshBtn){var K=null==v.refreshBtn.url?null:Graph.sanitizeLink(v.refreshBtn.url);p(mxUtils.bind(this,function(J){null!=-K?window.location.href=K:window.location.reload();mxEvent.consume(J)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=v.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(J){v.fullscreenBtn.url?b.openLink(v.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(J)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!v.noCloseBtn&&(v.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=-document.body))&&p(mxUtils.bind(this,function(J){"1"==urlParams.close||v.closeBtn?window.close():(this.destroy(),mxEvent.consume(J))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(J){mxEvent.isTouchEvent(J)||-(mxEvent.isShiftDown(J)||z(30),B())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(J){mxEvent.consume(J)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(J){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(J)?B():z(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(J){mxEvent.isShiftDown(J)?B():z(100);mxEvent.consume(J)}));mxEvent.addListener(this.chromelessToolbar,-"mouseleave",mxUtils.bind(this,function(J){mxEvent.isTouchEvent(J)||z(30)}));var O=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(J,W){this.startX=W.getGraphX();this.startY=W.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(J,W){},mouseUp:function(J,W){mxEvent.isTouchEvent(W.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<O&&Math.abs(this.scrollTop-b.container.scrollTop)<O&&-Math.abs(this.startX-W.getGraphX())<O&&Math.abs(this.startY-W.getGraphY())<O&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?B():z(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var da=b.view.validate,ea=new mxPoint,ca=!1,V=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&V!=g.currentPage){V=g.currentPage;ca=!0;var J=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,!0);null==-J&&(J=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));J=b.getPageLayout(J,ea,1);var W=b.getDefaultTranslate(J);this.x0=J.x;this.y0=J.y;if(W.x!=this.translate.x||W.y!=this.translate.y)this.invalidate(),this.translate.x=W.x,this.translate.y=W.y}W=b.getPagePadding();var aa=b.getPageSize();J=W.x-(this.x0||0)*aa.width;W=W.y-(this.y0||0)*aa.height;if(this.translate.x!=J||this.translate.y!=W)this.invalidate(),this.translate.x=J,this.translate.y=W}da.apply(this,arguments)};-if(!b.isViewer()){var ma=b.sizeDidChange;b.sizeDidChange=function(){var J=ca;ca=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var W=this.getPageLayout(),aa=this.getDefaultTranslate(W),ba=this.view.translate.x,ja=this.view.translate.y;if(aa.x!=ba||aa.y!=ja){this.view.x0=W.x;this.view.y0=W.y;this.autoTranslate=!0;this.view.setTranslate(aa.x,aa.y);this.autoTranslate=!1;J||(this.container.scrollLeft+=Math.round((aa.x-ba)*this.view.scale),-this.container.scrollTop+=Math.round((aa.y-ja)*this.view.scale));return}}ma.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var la=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var fa=null,Z=null,l=null,u=null,H=null,U=function(J){null!=fa&&window.clearTimeout(fa);0<=J&&window.setTimeout(function(){if(!b.isMouseDown||u)fa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&-null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),Y.style.transformOrigin="",la.style.transformOrigin="",mxClient.IS_SF?(Y.style.transform="scale(1)",la.style.transform="scale(1)",window.setTimeout(function(){Y.style.transform="";la.style.transform=""},0)):(Y.style.transform="",la.style.transform=""),b.view.getDecoratorPane().style.opacity=-"",b.view.getOverlayPane().style.opacity="");var W=new mxPoint(b.container.scrollLeft,b.container.scrollTop),aa=mxUtils.getOffset(b.container),ba=b.view.scale,ja=0,oa=0;null!=Z&&(ja=b.container.offsetWidth/2-Z.x+aa.x,oa=b.container.offsetHeight/2-Z.y+aa.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=ba&&(null!=l&&(ja+=W.x-l.x,oa+=W.y-l.y),null!=e&&g.chromelessResize(!1,null,ja*(b.cumulativeZoomFactor-1),oa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||-0==ja&&0==oa||(b.container.scrollLeft-=ja*(b.cumulativeZoomFactor-1),b.container.scrollTop-=oa*(b.cumulativeZoomFactor-1)));null!=H&&Y.setAttribute("filter",H);b.cumulativeZoomFactor=1;H=u=Z=l=fa=null}),null!=J?J:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(J,W,aa,ba){ba=null!=ba?ba:this.zoomFactor;(W=W||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));J?.15>=this.view.scale*this.cumulativeZoomFactor?-this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*-this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==H&&""!=Y.getAttribute("filter")&&(H=Y.getAttribute("filter"),Y.removeAttribute("filter"));l=new mxPoint(b.container.scrollLeft,b.container.scrollTop);J=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);ba=W||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var ja=W||null==Z?b.container.scrollTop+b.container.clientHeight/-2:Z.y+b.container.scrollTop-b.container.offsetTop;Y.style.transformOrigin=ba+"px "+ja+"px";Y.style.transform="scale("+J+")";la.style.transformOrigin=ba+"px "+ja+"px";la.style.transform="scale("+J+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(ba=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ba.style,"transform-origin",(W||null==Z?b.container.clientWidth/2+b.container.scrollLeft-ba.offsetLeft+"px":Z.x+b.container.scrollLeft-ba.offsetLeft-b.container.offsetLeft+-"px")+" "+(W||null==Z?b.container.clientHeight/2+b.container.scrollTop-ba.offsetTop+"px":Z.y+b.container.scrollTop-ba.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ba.style,"transform","scale("+J+")")):b.view.validateBackgroundStyles(J,ba,ja);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",J))}U(b.isFastZoomEnabled()?aa:0)};mxEvent.addGestureListeners(b.container,-function(J){null!=fa&&window.clearTimeout(fa)},null,function(J){1!=b.cumulativeZoomFactor&&U(0)});mxEvent.addListener(b.container,"scroll",function(J){null==fa||b.isMouseDown||1==b.cumulativeZoomFactor||U(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(J,W,aa,ba,ja){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!aa&&b.isScrollWheelEvent(J))aa=b.view.getTranslate(),ba=40/b.view.scale,mxEvent.isShiftDown(J)?b.view.setTranslate(aa.x+-(W?-ba:ba),aa.y):b.view.setTranslate(aa.x,aa.y+(W?ba:-ba));else if(aa||b.isZoomWheelEvent(J))for(var oa=mxEvent.getSource(J);null!=oa;){if(oa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=ba&&null!=ja?new mxPoint(ba,ja):new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),u=aa,aa=b.zoomFactor,ba=null,J.ctrlKey&&null!=J.deltaY&&40>Math.abs(J.deltaY)&&Math.round(J.deltaY)!=J.deltaY?aa=1+Math.abs(J.deltaY)/20*(aa-1):null!=J.movementY&&"pointermove"==J.type&&(aa=1+Math.max(1,Math.abs(J.movementY))/-20*(aa-1),ba=-1),b.lazyZoom(W,null,ba,aa),mxEvent.consume(J),!1;oa=oa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(J){b.cumulativeZoomFactor=J.scale;b.lazyZoom(0<J.scale,!0);mxEvent.consume(J)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};-EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.width=this.formatWidth+"px",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};-EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,g=60;null!=e&&(g=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};-EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};-EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var B=0;p=mxUtils.bind(this,function(P,T,W){B++;+var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",P);null!=W&&aa.setAttribute("title",W);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",T);P.style.width="36px";P.style.filter="invert(100%)";aa.appendChild(P);this.chromelessToolbar.appendChild(aa);return aa});if(null!=u.backBtn){var H=Graph.sanitizeLink(u.backBtn.url);null!=H&&p(mxUtils.bind(this,function(P){window.location.href=+H;mxEvent.consume(P)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.previousImage,mxResources.get("previousPage")),G=document.createElement("div");G.style.fontFamily=Editor.defaultHtmlFont;G.style.display="inline-block";G.style.verticalAlign="top";G.style.fontWeight="bold";G.style.marginTop="8px";G.style.fontSize="14px";G.style.cursor="default";G.style.color=+mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var O=p(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){G.innerText="";var P=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(G,P+1+" / "+this.pages.length);G.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());+S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(P-1,this.pages.length)].getName());O.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(P+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";O.style.paddingLeft="4px";O.style.paddingRight="0px";var c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(O.style.display="",S.style.display="",G.style.display="inline-block"):+(O.style.display="none",S.style.display="none",G.style.display="none");R()});if(null!=this.menus){var f=this.menus.get("pages");null!=f&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(P){var T=new mxPopupMenu(f.funct);T.div.className+=" geMenubarMenu";T.smartSeparators=!0;T.showDisabled=!0;T.autoExpand=!0;T.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(T,arguments);T.destroy()});var W=mxUtils.getOffset(G);T.popup(W.x,W.y+G.offsetHeight,null,P);mxEvent.addListener(T.div,+"mouseleave",mxUtils.bind(this,function(){T.hideMenu()}))}))}this.editor.addListener("resetGraphView",c);this.editor.addListener("pageSelected",R)}p(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){b.isLightboxView()?+(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var l=null,t=null,z=mxUtils.bind(this,function(P){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),+600)}),P||200)}),C=mxUtils.bind(this,function(P){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var F=p(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var T=F.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=+T.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));T=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=+T.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),N=b.getModel();N.addListener(mxEvent.CHANGE,function(){F.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(P){null!=this.editor.editButtonFunc?+this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(c=0;c<this.lightboxToolbarActions.length;c++){var K=this.lightboxToolbarActions[c];K.elem=p(K.fn,K.icon,K.tooltip)}if(null!=u.refreshBtn){var I=null==u.refreshBtn.url?null:Graph.sanitizeLink(u.refreshBtn.url);p(mxUtils.bind(this,function(P){null!=+I?window.location.href=I:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=u.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(P){u.fullscreenBtn.url?b.openLink(u.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!u.noCloseBtn&&(u.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=+document.body))&&p(mxUtils.bind(this,function(P){"1"==urlParams.close||u.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||+(mxEvent.isShiftDown(P)||C(30),z())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?z():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?z():C(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar,+"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||C(30)}));var ca=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,T){this.startX=T.getGraphX();this.startY=T.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,T){},mouseUp:function(P,T){mxEvent.isTouchEvent(T.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ca&&Math.abs(this.scrollTop-b.container.scrollTop)<+ca&&Math.abs(this.startX-T.getGraphX())<ca&&Math.abs(this.startY-T.getGraphY())<ca&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var da=b.view.validate,ea=new mxPoint,X=!1,ba=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&ba!=g.currentPage){ba=g.currentPage;X=!0;var P=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,+!0);null==P&&(P=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));P=b.getPageLayout(P,ea,1);var T=b.getDefaultTranslate(P);this.x0=P.x;this.y0=P.y;if(T.x!=this.translate.x||T.y!=this.translate.y)this.invalidate(),this.translate.x=T.x,this.translate.y=T.y}T=b.getPagePadding();var W=b.getPageSize();P=T.x-(this.x0||0)*W.width;T=T.y-(this.y0||0)*W.height;if(this.translate.x!=P||this.translate.y!=T)this.invalidate(),this.translate.x=P,this.translate.y=T}da.apply(this,arguments)};+if(!b.isViewer()){var ha=b.sizeDidChange;b.sizeDidChange=function(){var P=X;X=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var T=this.getPageLayout(),W=this.getDefaultTranslate(T),aa=this.view.translate.x,ja=this.view.translate.y;if(W.x!=aa||W.y!=ja){this.view.x0=T.x;this.view.y0=T.y;this.autoTranslate=!0;this.view.setTranslate(W.x,W.y);this.autoTranslate=!1;P||(this.container.scrollLeft+=Math.round((W.x-aa)*this.view.scale),this.container.scrollTop+=+Math.round((W.y-ja)*this.view.scale));return}}ha.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ma=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var la=null,Z=null,k=null,A=null,J=null,U=function(P){null!=la&&window.clearTimeout(la);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||A)la=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&+(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),Y.style.transformOrigin="",ma.style.transformOrigin="",mxClient.IS_SF?(Y.style.transform="scale(1)",ma.style.transform="scale(1)",window.setTimeout(function(){Y.style.transform="";ma.style.transform=""},0)):(Y.style.transform="",ma.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity=+"");var T=new mxPoint(b.container.scrollLeft,b.container.scrollTop),W=mxUtils.getOffset(b.container),aa=b.view.scale,ja=0,pa=0;null!=Z&&(ja=b.container.offsetWidth/2-Z.x+W.x,pa=b.container.offsetHeight/2-Z.y+W.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=k&&(ja+=T.x-k.x,pa+=T.y-k.y),null!=e&&g.chromelessResize(!1,null,ja*(b.cumulativeZoomFactor-1),pa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ja&&0==pa||(b.container.scrollLeft-=+ja*(b.cumulativeZoomFactor-1),b.container.scrollTop-=pa*(b.cumulativeZoomFactor-1)));null!=J&&Y.setAttribute("filter",J);b.cumulativeZoomFactor=1;J=A=Z=k=la=null}),null!=P?P:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(P,T,W,aa){aa=null!=aa?aa:this.zoomFactor;(T=T||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=+(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,+160))/this.view.scale;if(b.isFastZoomEnabled()){null==J&&""!=Y.getAttribute("filter")&&(J=Y.getAttribute("filter"),Y.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);P=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=T||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var ja=T||null==Z?b.container.scrollTop+b.container.clientHeight/2:Z.y+b.container.scrollTop-+b.container.offsetTop;Y.style.transformOrigin=aa+"px "+ja+"px";Y.style.transform="scale("+P+")";ma.style.transformOrigin=aa+"px "+ja+"px";ma.style.transform="scale("+P+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(T||null==Z?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":Z.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+"px")+" "+(T||null==Z?b.container.clientHeight/+2+b.container.scrollTop-aa.offsetTop+"px":Z.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+P+")")):b.view.validateBackgroundStyles(P,aa,ja);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",P))}U(b.isFastZoomEnabled()?W:0)};mxEvent.addGestureListeners(b.container,function(P){null!=la&&window.clearTimeout(la)},+null,function(P){1!=b.cumulativeZoomFactor&&U(0)});mxEvent.addListener(b.container,"scroll",function(P){null==la||b.isMouseDown||1==b.cumulativeZoomFactor||U(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,T,W,aa,ja){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!W&&b.isScrollWheelEvent(P))W=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(W.x+(T?-aa:aa),W.y):b.view.setTranslate(W.x,W.y+(T?+aa:-aa));else if(W||b.isZoomWheelEvent(P))for(var pa=mxEvent.getSource(P);null!=pa;){if(pa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=aa&&null!=ja?new mxPoint(aa,ja):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),A=W,W=b.zoomFactor,aa=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?W=1+Math.abs(P.deltaY)/20*(W-1):null!=P.movementY&&"pointermove"==P.type&&(W=1+Math.max(1,Math.abs(P.movementY))/20*(W-1),aa=-1),b.lazyZoom(T,null,aa,W),mxEvent.consume(P),+!1;pa=pa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};+EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.width=this.formatWidth+"px",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};+EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,g=60;null!=e&&(g=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};+EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,e){try{var g=mxUtils.parseXml(b);this.editor.setGraphXml(g.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=e&&(this.editor.setFilename(e),this.updateDocumentTitle())}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+m.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPrintDialog=function(b,e){this.showDialog((new PrintDialog(this,b,e)).container,300,180,!0,!0)};-EditorUi.prototype.showPopupMenu=function(b,e,g,m){this.editor.graph.popupMenuHandler.hideMenu();var v=new mxPopupMenu(b);v.div.className+=" geMenubarMenu";v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);v.destroy()});v.popup(e,g,null,m);this.setCurrentMenu(v)};EditorUi.prototype.setCurrentMenu=function(b,e){this.currentMenuElt=e;this.currentMenu=b;this.hideShapePicker()};+EditorUi.prototype.showPopupMenu=function(b,e,g,m){this.editor.graph.popupMenuHandler.hideMenu();var u=new mxPopupMenu(b);u.div.className+=" geMenubarMenu";u.smartSeparators=!0;u.showDisabled=!0;u.autoExpand=!0;u.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);u.destroy()});u.popup(e,g,null,m);this.setCurrentMenu(u)};EditorUi.prototype.setCurrentMenu=function(b,e){this.currentMenuElt=e;this.currentMenu=b;this.hideShapePicker()};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var e=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);e==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(g){}};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.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml()}};EditorUi.prototype.updateDiagramData=function(b,e){this.replaceDiagramData(xUtils.getXml(e))};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.beginUpdate();try{this.editor.setGraphXml(mxUtils.parseXml(b).documentElement)}finally{this.editor.graph.model.endUpdate()}};@@ -2173,22 +2172,22 @@ EditorUi.prototype.fitDiagramToWindow=function(){var b=this.editor.graph,e=b.isSg.x,e.height+=g.height+g.y),b.fitWindow(e))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph,e=b.container;if(!this.editor.extendCanvas)e.scrollTop=0,e.scrollLeft=0,mxUtils.hasScrollbars(e)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(e))if(b.pageVisible){var g=b.getPagePadding();e.scrollTop=Math.floor(g.y-this.editor.initialTopSpacing)-1;e.scrollLeft=Math.floor(Math.min(g.x,(e.scrollWidth-e.clientWidth)/2))-1;g=b.getGraphBounds();0<g.width&&0<g.height&&(g.x>e.scrollLeft+.9*e.clientWidth&&(e.scrollLeft=Math.min(g.x+g.width-e.clientWidth,g.x-10)),g.y>e.scrollTop+.9*e.clientHeight&&(e.scrollTop=Math.min(g.y+g.height-e.clientHeight,g.y-10)))}else if(g=b.getGraphBounds(),0==g.width&&0==g.height)e.scrollLeft=(e.scrollWidth-e.clientWidth)/2,e.scrollTop=(e.scrollHeight-e.clientHeight)/2;else{var m=Math.max(g.height,b.scrollTileSize.height*b.view.scale);e.scrollLeft=Math.floor(Math.max(0,g.x-Math.max(0,(e.clientWidth-Math.max(g.width,b.scrollTileSize.width*b.view.scale))/2)));-e.scrollTop=Math.floor(Math.max(0,g.y-Math.max(20,(e.clientHeight-m)/4)))}else{g=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());m=b.view.translate;var v=b.view.scale;g.x=g.x/v-m.x;g.y=g.y/v-m.y;g.width/=v;g.height/=v;b.view.setTranslate(Math.floor(Math.max(0,(e.clientWidth-g.width)/2)-g.x+2),Math.floor((b.pageVisible?0:Math.max(0,(e.clientHeight-g.height)/4))-g.y+1))}};-EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,g=mxUtils.hasScrollbars(e.container),m=0,v=0;g&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,v=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(g){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();g&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*-e.view.scale-v);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};-EditorUi.prototype.installResizeHandler=function(b,e,g){e&&(b.window.setSize=function(v,p){if(!this.minimized){var A=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;v=Math.min(v,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,A-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(v,p){var A=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,-G=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),F=parseInt(this.div.style.height);v=Math.max(0,Math.min(v,A-S));p=Math.max(0,Math.min(p,G-F));this.getX()==v&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(S,F)};var m=mxUtils.bind(this,function(){var v=b.window.getX(),p=b.window.getY();b.window.setLocation(v,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,+e.scrollTop=Math.floor(Math.max(0,g.y-Math.max(20,(e.clientHeight-m)/4)))}else{g=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());m=b.view.translate;var u=b.view.scale;g.x=g.x/u-m.x;g.y=g.y/u-m.y;g.width/=u;g.height/=u;b.view.setTranslate(Math.floor(Math.max(0,(e.clientWidth-g.width)/2)-g.x+2),Math.floor((b.pageVisible?0:Math.max(0,(e.clientHeight-g.height)/4))-g.y+1))}};+EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,g=mxUtils.hasScrollbars(e.container),m=0,u=0;g&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,u=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(g){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();g&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*+e.view.scale-u);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};+EditorUi.prototype.installResizeHandler=function(b,e,g){e&&(b.window.setSize=function(u,p){if(!this.minimized){var B=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;u=Math.min(u,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,B-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(u,p){var B=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,+H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),G=parseInt(this.div.style.height);u=Math.max(0,Math.min(u,B-S));p=Math.max(0,Math.min(p,H-G));this.getX()==u&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(S,G)};var m=mxUtils.bind(this,function(){var u=b.window.getX(),p=b.window.getY();b.window.setLocation(u,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,"resize",m);b.window.destroy();null!=g&&g()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();-function ChangePageSetup(b,e,g,m,v){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=g;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=v;this.ignoreImage=this.ignoreColor=!1}+function ChangePageSetup(b,e,g,m,u){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=g;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=u;this.ignoreImage=this.ignoreColor=!1}ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var g=this.previousImage;null!=g&&Graph.isPageLink(g.src)&&(g=this.ui.createImageForPageLink(g.src,this.ui.currentPage));this.ui.setBackgroundImage(g);this.previousImage=e}null!=this.previousFormat&&(this.format=this.previousFormat,e=b.pageFormat,this.previousFormat.width!=e.width||this.previousFormat.height!=e.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=e);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(e,g,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousPageScale=m.pageScale;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);return m};mxCodecRegistry.register(b)})();EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b,e){e=null!=e?e:Editor.isDarkMode();var g=this.editor.graph;e?g.view.defaultDarkGridColor=b:g.view.defaultGridColor=b;g.view.gridColor="light-dark("+g.view.defaultGridColor+", "+g.view.defaultDarkGridColor+")";g.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};-EditorUi.prototype.addUndoListener=function(){var b=this.editor.undoManager,e=mxUtils.bind(this,function(){this.updateActionStates()});b.addListener(mxEvent.ADD,e);b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);b.addListener(mxEvent.CLEAR,e);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);e()};var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(v,p){m.apply(this,arguments);+EditorUi.prototype.addUndoListener=function(){var b=this.editor.undoManager,e=mxUtils.bind(this,function(){this.updateActionStates()});b.addListener(mxEvent.ADD,e);b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);b.addListener(mxEvent.CLEAR,e);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);e()};var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(u,p){m.apply(this,arguments);e()};e()};-EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),g=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m=!this.editor.chromeless||this.editor.editable,v="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),p=0;p<v.length;p++)this.actions.get(v[p]).setEnabled(0<+EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),g=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m=!this.editor.chromeless||this.editor.editable,u="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),p=0;p<u.length;p++)this.actions.get(u[p]).setEnabled(0<e.cells.length);this.actions.get("grid").setEnabled(m);this.actions.get("undo").setEnabled(this.canUndo()&&m);this.actions.get("redo").setEnabled(this.canRedo()&&m);this.actions.get("swap").setEnabled(2==e.cells.length&&2==e.vertices.length);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(0<e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("clearAnchors").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(1<e.cells.length||1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0]));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));@@ -2197,9 +2196,9 @@ e.cells.length);this.actions.get("editStyle").setEnabled(0<e.cells.length);this.this.actions.get("expand").setEnabled(m);this.actions.get("collapse").setEnabled(m);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(g);this.menus.get("insert").setEnabled(g);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&&1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth);var g=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(g=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-40));e=0;null!=this.menubar&&-(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var v=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=v+"px";this.formatContainer.style.display=null!=this.format?-"":"none";var p=this.getDiagramContainerOffset(),A=null!=this.hsplit.parentNode?m:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer?(this.tabContainer.style.left=A+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px"):this.hsplit.style.bottom=this.footerHeight+g+"px";0<this.footerHeight&&(this.footerContainer.style.bottom=-g+"px");m=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+g+"px",this.tabContainer.style.right=v+"px",m=this.tabContainer.clientHeight,this.checkTabScrollerOverflow());this.sidebarContainer.style.bottom=this.footerHeight+g+"px";this.formatContainer.style.bottom=this.footerHeight+g+"px";this.diagramContainer.style.left=A+p.x+"px";this.diagramContainer.style.top=e+p.y+"px";this.diagramContainer.style.right=v+"px";this.diagramContainer.style.bottom=this.footerHeight+g+m++(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var u=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=u+"px";this.formatContainer.style.display=null!=this.format?+"":"none";var p=this.getDiagramContainerOffset(),B=null!=this.hsplit.parentNode?m:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer?(this.tabContainer.style.left=B+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px"):this.hsplit.style.bottom=this.footerHeight+g+"px";0<this.footerHeight&&(this.footerContainer.style.bottom=+g+"px");m=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+g+"px",this.tabContainer.style.right=u+"px",m=this.tabContainer.clientHeight,this.checkTabScrollerOverflow());this.sidebarContainer.style.bottom=this.footerHeight+g+"px";this.formatContainer.style.bottom=this.footerHeight+g+"px";this.diagramContainer.style.left=B+p.x+"px";this.diagramContainer.style.top=e+p.y+"px";this.diagramContainer.style.right=u+"px";this.diagramContainer.style.bottom=this.footerHeight+g+m+"px";b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.sidebarContainer.style.zIndex="1";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom="0px";this.footerContainer.style.zIndex=@@ -2207,28 +2206,28 @@ mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";this.EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var b=this.editor.chromeless?null:this.createFooter();null!=b&&(this.footerContainer.appendChild(b),this.container.appendChild(this.footerContainer));this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};-EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){var g=mxEvent.getSource(e);if(g!=b)for(;g.parentNode!=b;)g=g.parentNode;if("A"!=g.nodeName){var m=g.getAttribute("data-action");if("statusFunction"==m&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=m)g=this.actions.get(m),null!=g&&g.funct();else{m=g.getAttribute("data-title");var v=g.getAttribute("data-message");-null!=m&&null!=v?this.showError(m,v):(g=g.getAttribute("data-link"),null!=g&&this.editor.graph.openLink(g))}mxEvent.consume(e)}}));return b};+EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){var g=mxEvent.getSource(e);if(g!=b)for(;g.parentNode!=b;)g=g.parentNode;if("A"!=g.nodeName){var m=g.getAttribute("data-action");if("statusFunction"==m&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=m)g=this.actions.get(m),null!=g&&g.funct();else{m=g.getAttribute("data-title");var u=g.getAttribute("data-message");+null!=m&&null!=u?this.showError(m,u):(g=g.getAttribute("data-link"),null!=g&&this.editor.graph.openLink(g))}mxEvent.consume(e)}}));return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Graph.sanitizeHtml(b);0==this.statusContainer.getElementsByTagName("div").length&&null!=b&&0<b.length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b));b=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=b)for(var e=0;e<b.length;e++)(function(g){mxUtils.setOpacity(g,0);mxUtils.setPrefixedStyle(g.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(g.style,"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(g,100);mxUtils.setPrefixedStyle(g.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(g.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(g.style,"transform","scaleX(0)");mxUtils.setOpacity(g,0);window.setTimeout(mxUtils.bind(this,function(){null!=g.parentNode&&g.parentNode.removeChild(g)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[e])};EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.style.textOverflow="ellipsis";e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.minWidth="0";e.setAttribute("title",b);e.innerHTML=Graph.sanitizeHtml(b);return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};-EditorUi.prototype.addSplitHandler=function(b,e,g,m){function v(R){if(null!=A){var T=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));m(Math.max(0,G+(e?T.x-A.x:A.y-T.y)-g));mxEvent.consume(R);G!=P()&&(S=!0,F=null)}}function p(R){v(R);A=G=null}var A=null,G=null,S=!0,F=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){A=new mxPoint(mxEvent.getClientX(R),-mxEvent.getClientY(R));G=P();S=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!S&&this.hsplitClickEnabled){var T=null!=F?F-g:0;F=P();m(T);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,v,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,v,p)})};+EditorUi.prototype.addSplitHandler=function(b,e,g,m){function u(R){if(null!=B){var c=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));m(Math.max(0,H+(e?c.x-B.x:B.y-c.y)-g));mxEvent.consume(R);H!=O()&&(S=!0,G=null)}}function p(R){u(R);B=H=null}var B=null,H=null,S=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var O=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){B=new mxPoint(mxEvent.getClientX(R),+mxEvent.getClientY(R));H=O();S=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!S&&this.hsplitClickEnabled){var c=null!=G?G-g:0;G=O();m(c);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,u,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,u,p)})};EditorUi.prototype.prompt=function(b,e,g){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){g(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};-EditorUi.prototype.handleError=function(b,e,g,m,v){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){v=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(v=mxUtils.htmlEntities(b.message));this.showError(e,v,p,g,null,null,null,null,null,null,null,null,m?g:null)}else null!=g&&g()};-EditorUi.prototype.showError=function(b,e,g,m,v,p,A,G,S,F,P,R,T){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,v,p,A,R,G,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,F||340,P||100+20*e,!0,!1,T);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,v,p,A,G,S,F){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,v,p,A,G,S,F);this.dialogs.push(this.dialog)};-EditorUi.prototype.hideDialog=function(b,e,g){var m=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var v=this.dialogs.length-1;0<=v;v--)if(!this.dialogs[v].closing){m=this.dialogs[v];break}null==m||null!=g&&g!=this.dialog.container.firstChild||(m.closing=!0,0==m.close(b,e)?delete m.closing:(delete m.closing,b=mxUtils.lastIndexOf(this.dialogs,m),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog",+EditorUi.prototype.handleError=function(b,e,g,m,u){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){u=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(u=mxUtils.htmlEntities(b.message));this.showError(e,u,p,g,null,null,null,null,null,null,null,null,m?g:null)}else null!=g&&g()};+EditorUi.prototype.showError=function(b,e,g,m,u,p,B,H,S,G,O,R,c){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,u,p,B,R,H,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,O||100+20*e,!0,!1,c);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,u,p,B,H,S,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,u,p,B,H,S,G);this.dialogs.push(this.dialog)};+EditorUi.prototype.hideDialog=function(b,e,g){var m=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var u=this.dialogs.length-1;0<=u;u--)if(!this.dialogs[u].closing){m=this.dialogs[u];break}null==m||null!=g&&g!=this.dialog.container.firstChild||(m.closing=!0,0==m.close(b,e)?delete m.closing:(delete m.closing,b=mxUtils.lastIndexOf(this.dialogs,m),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog","dialog",m)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus()))}),0)))};-EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),g=new mxDictionary,m=[],v=0;v<e.length;v++){var p=b.isTableCell(e[v])?b.model.getParent(e[v]):e[v];null==p||g.get(p)||(g.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(A){this.handleError(A)}};-EditorUi.prototype.pickColor=function(b,e,g,m,v){var p=this.editor.graph,A=p.cellEditor.saveSelection(),G=(v?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){p.cellEditor.restoreSelection(A);e(S)},function(){p.cellEditor.restoreSelection(A)},g,m,v);this.showDialog(b.container,230,G,!0,!1);b.init()};+EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),g=new mxDictionary,m=[],u=0;u<e.length;u++){var p=b.isTableCell(e[u])?b.model.getParent(e[u]):e[u];null==p||g.get(p)||(g.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(B){this.handleError(B)}};+EditorUi.prototype.pickColor=function(b,e,g,m,u){var p=this.editor.graph,B=p.cellEditor.saveSelection(),H=(u?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){p.cellEditor.restoreSelection(B);e(S)},function(){p.cellEditor.restoreSelection(B)},g,m,u);this.showDialog(b.container,230,H,!0,!1);b.init()};EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};-EditorUi.prototype.base64ToBlob=function(b,e){e=e||"";b=atob(b);for(var g=b.length,m=Math.ceil(g/1024),v=Array(m),p=0;p<m;++p){for(var A=1024*p,G=Math.min(A+1024,g),S=Array(G-A),F=0;A<G;++F,++A)S[F]=b[A].charCodeAt(0);v[p]=new Uint8Array(S)}return new Blob(v,{type:e})};-EditorUi.prototype.writeImageToClipboard=function(b,e,g,m){var v=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":v,"text/html":new Blob(['<img src="'+b+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](m)};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 m=b.lastIndexOf("</mxGraphModel>");m>g&&(e=b.substring(g,m+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(v){}return e};+EditorUi.prototype.base64ToBlob=function(b,e){e=e||"";b=atob(b);for(var g=b.length,m=Math.ceil(g/1024),u=Array(m),p=0;p<m;++p){for(var B=1024*p,H=Math.min(B+1024,g),S=Array(H-B),G=0;B<H;++G,++B)S[G]=b[B].charCodeAt(0);u[p]=new Uint8Array(S)}return new Blob(u,{type:e})};+EditorUi.prototype.writeImageToClipboard=function(b,e,g,m){var u=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":u,"text/html":new Blob(['<img src="'+b+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](m)};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 m=b.lastIndexOf("</mxGraphModel>");m>g&&(e=b.substring(g,m+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(u){}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 m=decodeURIComponent(g);this.isCompatibleString(m)&&(g=m)}b(g)}),"text")}),"html")};-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0<g.length&&"html"==e&&0<=mxUtils.indexOf(g[0].types,"text/html"))g[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(v){try{var p=this.parseHtmlData(v),A="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var G=A.lastIndexOf("%3E");-0<=G&&G<A.length-3&&(A=A.substring(0,G+3))}catch(P){}try{var S=p.getElementsByTagName("span"),F=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(A);this.isCompatibleString(F)&&(A=F)}catch(P){}}catch(P){}b(this.isCompatibleString(A)?A:null)}))["catch"](function(v){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(v){b(v)})["catch"](function(){b(null)})})["catch"](function(){b(null)});+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0<g.length&&"html"==e&&0<=mxUtils.indexOf(g[0].types,"text/html"))g[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(u){try{var p=this.parseHtmlData(u),B="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var H=B.lastIndexOf("%3E");+0<=H&&H<B.length-3&&(B=B.substring(0,H+3))}catch(O){}try{var S=p.getElementsByTagName("span"),G=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(B);this.isCompatibleString(G)&&(B=G)}catch(O){}}catch(O){}b(this.isCompatibleString(B)?B:null)}))["catch"](function(u){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(u){b(u)})["catch"](function(){b(null)})})["catch"](function(){b(null)});else b(null)}))["catch"](function(g){b(null)})};EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var g="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(g?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));g=g&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=g&&null==g.nextSibling&&g.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==g.nodeName?(b=g.getAttribute("src"),null!=b&&(Editor.isPngDataUrl(b)&&@@ -2238,70 +2237,70 @@ EditorUi.prototype.extractGraphModelFromEvent=function(b){var e=null,g=null;nullEditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,e);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(e.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(e))).simulate(document,"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(e);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(g){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};EditorUi.prototype.executeLayouts=function(b,e){this.executeLayout(mxUtils.bind(this,function(){var g=new mxCompositeLayout(this.editor.graph,b),m=this.editor.graph.getSelectionCells();g.execute(this.editor.graph.getDefaultParent(),0==m.length?null:m)}),!0,e)};-EditorUi.prototype.executeLayout=function(b,e,g){var m=this.editor.graph;m.getModel().beginUpdate();try{b()}catch(v){throw v;}finally{this.allowAnimation&&e&&m.isEnabled()?(b=new mxMorphing(m),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=g&&g()})),b.startAnimation()):(m.getModel().endUpdate(),null!=g&&g())}};-EditorUi.prototype.showImageDialog=function(b,e,g,m){m=this.editor.graph.cellEditor;var v=m.saveSelection(),p=mxUtils.prompt(b,e);m.restoreSelection(v);if(null!=p&&0<p.length){var A=new Image;A.onload=function(){g(p,A.width,A.height)};A.onerror=function(){g(null);mxUtils.alert(mxResources.get("fileNotFound"))};A.src=p}else g(null)};EditorUi.prototype.showLinkDialog=function(b,e,g){b=new LinkDialog(this,b,e,g);this.showDialog(b.container,420,90,!0,!0);b.init()};+EditorUi.prototype.executeLayout=function(b,e,g){var m=this.editor.graph;m.getModel().beginUpdate();try{b()}catch(u){throw u;}finally{this.allowAnimation&&e&&m.isEnabled()?(b=new mxMorphing(m),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=g&&g()})),b.startAnimation()):(m.getModel().endUpdate(),null!=g&&g())}};+EditorUi.prototype.showImageDialog=function(b,e,g,m){m=this.editor.graph.cellEditor;var u=m.saveSelection(),p=mxUtils.prompt(b,e);m.restoreSelection(u);if(null!=p&&0<p.length){var B=new Image;B.onload=function(){g(p,B.width,B.height)};B.onerror=function(){g(null);mxUtils.alert(mxResources.get("fileNotFound"))};B.src=p}else g(null)};EditorUi.prototype.showLinkDialog=function(b,e,g){b=new LinkDialog(this,b,e,g);this.showDialog(b.container,420,90,!0,!0);b.init()};EditorUi.prototype.showDataDialog=function(b){null!=b&&"undefined"!==typeof window.EditDataDialog&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(m){m=new ChangePageSetup(this,null,m);m.ignoreColor=!0;this.editor.graph.model.execute(m)});var g=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=g&&0<g.length?(e=new Image,e.onload=function(){b(new mxImage(g,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=g):b(null)};EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,g){mxUtils.confirm(b)?null!=e&&e():null!=g&&g()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};-EditorUi.prototype.createKeyHandler=function(b){function e(R,T,c){if(!m.isSelectionEmpty()&&m.isEnabled()){T=null!=T?T:1;var f=m.getCompositeParents(m.getSelectionCells()),k=0<f.length?f[0]:null;if(null!=k)if(c){m.getModel().beginUpdate();try{for(k=0;k<f.length;k++)if(m.getModel().isVertex(f[k])&&m.isCellResizable(f[k])){var B=m.getCellGeometry(f[k]);null!=B&&(B=B.clone(),37==R?B.width=Math.max(0,B.width-T):38==R?B.height=Math.max(0,B.height-T):39==R?B.width+=T:40==R&&(B.height+=T),m.getModel().setGeometry(f[k],-B))}}finally{m.getModel().endUpdate()}}else{B=m.model.getParent(k);var z=m.getView().scale;c=null;1==m.getSelectionCount()&&m.model.isVertex(k)&&null!=m.layoutManager&&!m.isCellLocked(k)&&(c=m.layoutManager.getLayout(B));if(null!=c&&c.constructor==mxStackLayout)T=B.getIndex(k),37==R||38==R?m.model.add(B,k,Math.max(0,T-1)):(39==R||40==R)&&m.model.add(B,k,Math.min(m.model.getChildCount(B),T+1));else{var C=m.graphHandler;null!=C&&(null==C.first&&C.start(k,0,0,m.getMovableCells(f)),null!=C.first&&(k=-f=0,37==R?f=-T:38==R?k=-T:39==R?f=T:40==R&&(k=T),C.currentDx+=f*z,C.currentDy+=k*z,C.checkPreview(),C.updatePreview()),null!=A&&window.clearTimeout(A),A=window.setTimeout(function(){if(null!=C.first){var I=C.roundLength(C.currentDx/z),L=C.roundLength(C.currentDy/z);C.moveCells(C.cells,I,L);C.reset()}},400))}}}}var g=this,m=this.editor.graph,v=new mxKeyHandler(m),p=v.isEventIgnored;v.isEventIgnored=function(R){return!(mxEvent.isShiftDown(R)&&9==R.keyCode)&&(!this.isControlDown(R)||mxEvent.isShiftDown(R)||-90!=R.keyCode&&89!=R.keyCode&&188!=R.keyCode&&190!=R.keyCode&&85!=R.keyCode)&&(66!=R.keyCode&&73!=R.keyCode||!this.isControlDown(R)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=R.keyCode&&107!=R.keyCode||!this.isControlDown(R)&&!mxEvent.isShiftDown(R)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};v.isEnabledForEvent=function(R){return!mxEvent.isConsumed(R)&&this.isGraphEvent(R)&&this.isEnabled()&&(null==-g.dialogs||0==g.dialogs.length)};v.isControlDown=function(R){return mxEvent.isControlDown(R)||mxClient.IS_MAC&&R.metaKey};var A=null,G={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=v.getFunction;mxKeyHandler.prototype.getFunction=function(R){if(m.isEnabled()){var T=null;mxEvent.isShiftDown(R)&&this.isControlDown(R)&&mxEvent.isAltDown(R)?T=g.actions.get(g.ctrlAltShiftActions[R.keyCode]):mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)?-T=g.actions.get(g.altShiftActions[R.keyCode]):this.isControlDown(R)&&mxEvent.isAltDown(R)&&(T=g.actions.get(g.ctrlAltActions[R.keyCode]));if(null!=T)return T.funct;if(null!=G[R.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(R)&&mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)){if(m.model.isVertex(m.getSelectionCell()))return function(){var c=m.connectVertex(m.getSelectionCell(),G[R.keyCode],m.defaultEdgeLength,R,!0);null!=c&&0<c.length&&(1==c.length&&m.model.isEdge(c[0])?m.setSelectionCell(m.model.getTerminal(c[0],-!1)):m.setSelectionCell(c[c.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(R)?function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null)}}return S.apply(this,arguments)};v.bindAction=mxUtils.bind(this,function(R,T,c,f){var k=this.actions.get(c);null!=k&&(c=function(){k.isEnabled()&&k.funct.apply(this,arguments)},-T?f?v.bindControlShiftKey(R,c):v.bindControlKey(R,c):f?v.bindShiftKey(R,c):v.bindKey(R,c))});var F=this,P=v.escape;v.escape=function(R){P.apply(this,arguments)};v.enter=function(){};v.bindControlShiftKey(36,function(){m.exitGroup()});v.bindControlShiftKey(35,function(){m.enterGroup()});v.bindShiftKey(36,function(){m.home()});v.bindKey(35,function(){m.refresh()});v.bindAction(80,!0,"print");v.bindAction(107,!0,"zoomIn");v.bindAction(109,!0,"zoomOut");v.bindAction(61,!0,"zoomIn");v.bindAction(187,!0,-"zoomIn");v.bindAction(222,!0,"zoomIn");v.bindAction(173,!0,"zoomOut");v.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)v.bindAction(79,!0,"outline",!0),v.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),v.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),v.bindControlKey(13,function(){F.ctrlEnter()}),v.bindAction(8,!1,"delete"),v.bindAction(8,!0,"deleteAll"),v.bindAction(8,!1,"deleteLabels",!0),v.bindAction(46,!1,"delete"),v.bindAction(46,!0,-"deleteAll"),v.bindAction(46,!1,"deleteLabels",!0),v.bindAction(36,!1,"resetView"),v.bindAction(72,!0,"fitWindow",!0),v.bindAction(74,!0,"fitPage"),v.bindAction(74,!0,"fitTwoPages",!0),v.bindAction(48,!0,"customZoom"),v.bindAction(82,!0,"turn"),v.bindAction(82,!0,"clearDefaultStyle",!0),v.bindAction(83,!0,"save"),v.bindAction(83,!0,"saveAs",!0),v.bindAction(65,!0,"selectAll"),v.bindAction(65,!0,"selectNone",!0),v.bindAction(73,!0,"selectVertices",!0),v.bindAction(69,!0,"selectEdges",!0),v.bindAction(69,-!0,"editStyle"),v.bindAction(66,!0,"bold"),v.bindAction(66,!0,"toBack",!0),v.bindAction(70,!0,"toFront",!0),v.bindAction(68,!0,"duplicate"),v.bindAction(68,!0,"setAsDefaultStyle",!0),v.bindAction(90,!0,"undo"),v.bindAction(90,!0,"redo",!0),v.bindAction(89,!0,"redo"),v.bindAction(89,!0,"autosize",!0),v.bindAction(88,!0,"cut"),v.bindAction(67,!0,"copy"),v.bindAction(86,!0,"paste"),v.bindAction(71,!0,"group"),v.bindAction(77,!0,"editData"),v.bindAction(71,!0,"grid",!0),v.bindAction(73,!0,"italic"),v.bindAction(76,-!0,"lockUnlock"),v.bindAction(76,!0,"layers",!0),v.bindAction(80,!0,"format",!0),v.bindAction(85,!0,"underline"),v.bindAction(85,!0,"ungroup",!0),v.bindAction(109,!0,"decreaseFontSize",!0),v.bindAction(107,!0,"increaseFontSize",!0),v.bindAction(219,!0,"decreaseFontSize",!0),v.bindAction(221,!0,"increaseFontSize",!0),v.bindAction(190,!0,"superscript"),v.bindAction(188,!0,"subscript"),v.bindAction(13,!1,"keyPressEnter"),v.bindKey(113,function(){m.isEnabled()&&m.startEditingAtCell()});return v};+EditorUi.prototype.createKeyHandler=function(b){function e(R,c,f){if(!m.isSelectionEmpty()&&m.isEnabled()){c=null!=c?c:1;var l=m.getCompositeParents(m.getSelectionCells()),t=0<l.length?l[0]:null;if(null!=t)if(f){m.getModel().beginUpdate();try{for(t=0;t<l.length;t++)if(m.getModel().isVertex(l[t])&&m.isCellResizable(l[t])){var z=m.getCellGeometry(l[t]);null!=z&&(z=z.clone(),37==R?z.width=Math.max(0,z.width-c):38==R?z.height=Math.max(0,z.height-c):39==R?z.width+=c:40==R&&(z.height+=c),m.getModel().setGeometry(l[t],+z))}}finally{m.getModel().endUpdate()}}else{z=m.model.getParent(t);var C=m.getView().scale;f=null;1==m.getSelectionCount()&&m.model.isVertex(t)&&null!=m.layoutManager&&!m.isCellLocked(t)&&(f=m.layoutManager.getLayout(z));if(null!=f&&f.constructor==mxStackLayout)c=z.getIndex(t),37==R||38==R?m.model.add(z,t,Math.max(0,c-1)):(39==R||40==R)&&m.model.add(z,t,Math.min(m.model.getChildCount(z),c+1));else{var F=m.graphHandler;null!=F&&(null==F.first&&F.start(t,0,0,m.getMovableCells(l)),null!=F.first&&(t=+l=0,37==R?l=-c:38==R?t=-c:39==R?l=c:40==R&&(t=c),F.currentDx+=l*C,F.currentDy+=t*C,F.checkPreview(),F.updatePreview()),null!=B&&window.clearTimeout(B),B=window.setTimeout(function(){if(null!=F.first){var N=F.roundLength(F.currentDx/C),K=F.roundLength(F.currentDy/C);F.moveCells(F.cells,N,K);F.reset()}},400))}}}}var g=this,m=this.editor.graph,u=new mxKeyHandler(m),p=u.isEventIgnored;u.isEventIgnored=function(R){return!(mxEvent.isShiftDown(R)&&9==R.keyCode)&&(!this.isControlDown(R)||mxEvent.isShiftDown(R)||+90!=R.keyCode&&89!=R.keyCode&&188!=R.keyCode&&190!=R.keyCode&&85!=R.keyCode)&&(66!=R.keyCode&&73!=R.keyCode||!this.isControlDown(R)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=R.keyCode&&107!=R.keyCode||!this.isControlDown(R)&&!mxEvent.isShiftDown(R)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};u.isEnabledForEvent=function(R){return!mxEvent.isConsumed(R)&&this.isGraphEvent(R)&&this.isEnabled()&&(null==+g.dialogs||0==g.dialogs.length)};u.isControlDown=function(R){return mxEvent.isControlDown(R)||mxClient.IS_MAC&&R.metaKey};var B=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=u.getFunction;mxKeyHandler.prototype.getFunction=function(R){if(m.isEnabled()){var c=null;mxEvent.isShiftDown(R)&&this.isControlDown(R)&&mxEvent.isAltDown(R)?c=g.actions.get(g.ctrlAltShiftActions[R.keyCode]):mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)?+c=g.actions.get(g.altShiftActions[R.keyCode]):this.isControlDown(R)&&mxEvent.isAltDown(R)&&(c=g.actions.get(g.ctrlAltActions[R.keyCode]));if(null!=c)return c.funct;if(null!=H[R.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(R)&&mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)){if(m.model.isVertex(m.getSelectionCell()))return function(){var f=m.connectVertex(m.getSelectionCell(),H[R.keyCode],m.defaultEdgeLength,R,!0);null!=f&&0<f.length&&(1==f.length&&m.model.isEdge(f[0])?m.setSelectionCell(m.model.getTerminal(f[0],+!1)):m.setSelectionCell(f[f.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(R)?function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null)}}return S.apply(this,arguments)};u.bindAction=mxUtils.bind(this,function(R,c,f,l){var t=this.actions.get(f);null!=t&&(f=function(){t.isEnabled()&&t.funct.apply(this,arguments)},+c?l?u.bindControlShiftKey(R,f):u.bindControlKey(R,f):l?u.bindShiftKey(R,f):u.bindKey(R,f))});var G=this,O=u.escape;u.escape=function(R){O.apply(this,arguments)};u.enter=function(){};u.bindControlShiftKey(36,function(){m.exitGroup()});u.bindControlShiftKey(35,function(){m.enterGroup()});u.bindShiftKey(36,function(){m.home()});u.bindKey(35,function(){m.refresh()});u.bindAction(80,!0,"print");u.bindAction(107,!0,"zoomIn");u.bindAction(109,!0,"zoomOut");u.bindAction(61,!0,"zoomIn");u.bindAction(187,!0,+"zoomIn");u.bindAction(222,!0,"zoomIn");u.bindAction(173,!0,"zoomOut");u.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)u.bindAction(79,!0,"outline",!0),u.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),u.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),u.bindControlKey(13,function(){G.ctrlEnter()}),u.bindAction(8,!1,"delete"),u.bindAction(8,!0,"deleteAll"),u.bindAction(8,!1,"deleteLabels",!0),u.bindAction(46,!1,"delete"),u.bindAction(46,!0,+"deleteAll"),u.bindAction(46,!1,"deleteLabels",!0),u.bindAction(36,!1,"resetView"),u.bindAction(72,!0,"fitWindow",!0),u.bindAction(74,!0,"fitPage"),u.bindAction(74,!0,"fitTwoPages",!0),u.bindAction(48,!0,"customZoom"),u.bindAction(82,!0,"turn"),u.bindAction(82,!0,"clearDefaultStyle",!0),u.bindAction(83,!0,"save"),u.bindAction(83,!0,"saveAs",!0),u.bindAction(65,!0,"selectAll"),u.bindAction(65,!0,"selectNone",!0),u.bindAction(73,!0,"selectVertices",!0),u.bindAction(69,!0,"selectEdges",!0),u.bindAction(69,+!0,"editStyle"),u.bindAction(66,!0,"bold"),u.bindAction(66,!0,"toBack",!0),u.bindAction(70,!0,"toFront",!0),u.bindAction(68,!0,"duplicate"),u.bindAction(68,!0,"setAsDefaultStyle",!0),u.bindAction(90,!0,"undo"),u.bindAction(90,!0,"redo",!0),u.bindAction(89,!0,"redo"),u.bindAction(89,!0,"autosize",!0),u.bindAction(88,!0,"cut"),u.bindAction(67,!0,"copy"),u.bindAction(86,!0,"paste"),u.bindAction(71,!0,"group"),u.bindAction(77,!0,"editData"),u.bindAction(71,!0,"grid",!0),u.bindAction(73,!0,"italic"),u.bindAction(76,+!0,"lockUnlock"),u.bindAction(76,!0,"layers",!0),u.bindAction(80,!0,"format",!0),u.bindAction(85,!0,"underline"),u.bindAction(85,!0,"ungroup",!0),u.bindAction(109,!0,"decreaseFontSize",!0),u.bindAction(107,!0,"increaseFontSize",!0),u.bindAction(219,!0,"decreaseFontSize",!0),u.bindAction(221,!0,"increaseFontSize",!0),u.bindAction(190,!0,"superscript"),u.bindAction(188,!0,"subscript"),u.bindAction(13,!1,"keyPressEnter"),u.bindKey(113,function(){m.isEnabled()&&m.startEditingAtCell()});return u};EditorUi.prototype.createHelpIcon=function(b){var e=document.createElement("div");e.setAttribute("title",mxResources.get("help"));e.style.display="inline";e.style.marginLeft="8px";e.style.marginRight="4px";e.style.cursor="help";var g=document.createElement("img");g.setAttribute("src",Editor.helpImage);g.setAttribute("valign","middle");g.setAttribute("border","0");g.className="geAdaptiveAsset";mxUtils.setOpacity(g,60);g.style.marginTop="-4px";g.style.height="16px";g.style.width="16px";e.appendChild(g);mxEvent.addListener(e,"click",mxUtils.bind(this,function(m){this.hideCurrentMenu();this.openLink(b);mxEvent.consume(m)}));return e};EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(this.selectionStateListener),b.getModel().removeListener(this.selectionStateListener),b.getView().removeListener(this.selectionStateListener),b.removeListener(this.selectionStateListener),this.selectionStateListener=null);null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=-null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(m){for(var v=0;v<b.length;v++)m=m.replace(new RegExp("&"+b[v][0]+";","g"),"&#"+b[v][1]+";");return e(m)};var g=mxUtils.getSizeForString;mxUtils.getSizeForString=function(m,v,p,A){return g(Graph.sanitizeHtml(m),v,p,A)}})();+null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(m){for(var u=0;u<b.length;u++)m=m.replace(new RegExp("&"+b[u][0]+";","g"),"&#"+b[u][1]+";");return e(m)};var g=mxUtils.getSizeForString;mxUtils.getSizeForString=function(m,u,p,B){return g(Graph.sanitizeHtml(m),u,p,B)}})();Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});-Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},g=Math.pow(2,53)-1;return function(m){var v=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,A;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(A=-arguments[2])}var G=Number(v.length);G=isNaN(G)?0:0!==G&&isFinite(G)?(0<G?1:-1)*Math.floor(Math.abs(G)):G;G=Math.min(Math.max(G,0),g);for(var S=e(this)?Object(new this(G)):Array(G),F=0,P;F<G;)P=v[F],S[F]=p?"undefined"===typeof A?p(P,F):p.call(A,P,F):P,F+=1;S.length=G;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},g=Math.pow(2,53)-1;return function(m){var u=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,B;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(B=+arguments[2])}var H=Number(u.length);H=isNaN(H)?0:0!==H&&isFinite(H)?(0<H?1:-1)*Math.floor(Math.abs(H)):H;H=Math.min(Math.max(H,0),g);for(var S=e(this)?Object(new this(H)):Array(H),G=0,O;G<H;)O=u[G],S[G]=p?"undefined"===typeof B?p(O,G):p.call(B,O,G):O,G+=1;S.length=H;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,g){return null};mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};-(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(e,g,m,v,p){return"default"==v&&null!=p?"fillcolor"==m.nodeName?p.shapeBackgroundColor:p.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(e,g,m){null==m&&(m=e);return b.apply(this,[e,g,m])}})();-(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,v,p,A,G,S){var F=b.apply(this,arguments);if(null!=g){var P=F.getElementsByTagName("img");0<P.length&&(P[0].className="geToolbarButton geAdaptiveAsset",P[0].style.margin="4px",P[0].style.width="18px")}return F}})();-Graph=function(b,e,g,m,v,p){mxGraph.call(this,b,e,g,m);this.themes=v||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(Z){Z=this.getCurrentCellStyle(Z);-return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var A=null,G=null,S=null,F=null,P=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,l){if("mouseDown"==l.getProperty("eventName")&&this.isEnabled()){Z=l.getProperty("event");var u=Z.getState();l=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=u&&(R=this.isCellSelected(u.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var H=this.selectionCellsHandler.getHandler(u.cell);-if(null==H||null==H.getHandleForEvent(Z)){var U=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),J=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;H=J+2;U.grow(J);if(this.isTableCell(u.cell)&&this.isCellMovable(u.cell)&&!this.isCellSelected(u.cell)&&!(mxUtils.contains(u,Z.getGraphX()-H,Z.getGraphY()-H)&&mxUtils.contains(u,Z.getGraphX()-H,Z.getGraphY()+H)&&mxUtils.contains(u,Z.getGraphX()+H,Z.getGraphY()+H)&&mxUtils.contains(u,Z.getGraphX()+-H,Z.getGraphY()-H))){var W=this.model.getParent(u.cell);H=this.model.getParent(W);if(!this.isCellSelected(H)){J*=l;var aa=2*J;if(this.model.getChildAt(H,0)!=W&&mxUtils.intersects(U,new mxRectangle(u.x,u.y-J,u.width,aa))||this.model.getChildAt(W,0)!=u.cell&&mxUtils.intersects(U,new mxRectangle(u.x-J,u.y,aa,u.height))||mxUtils.intersects(U,new mxRectangle(u.x,u.y+u.height-J,u.width,aa))||mxUtils.intersects(U,new mxRectangle(u.x+u.width-J,u.y,aa,u.height)))W=this.selectionCellsHandler.isHandled(H),this.selectCellForEvent(H,-Z.getEvent()),H=this.selectionCellsHandler.getHandler(H),null!=H&&(J=H.getHandleForEvent(Z),null!=J&&(H.start(Z.getGraphX(),Z.getGraphY(),J),H.blockDelayedSelection=!W,Z.consume()))}}for(;!Z.isConsumed()&&null!=u&&(this.isTableCell(u.cell)||this.isTableRow(u.cell)||this.isTable(u.cell));)this.isSwimlane(u.cell)&&this.isCellMovable(u.cell)&&(H=this.getActualStartSize(u.cell),(0<H.x||0<H.width)&&mxUtils.intersects(U,new mxRectangle(u.x+(H.x-H.width-1)*l+(0==H.x?u.width:0),u.y,1,u.height))||(0<H.y||-0<H.height)&&mxUtils.intersects(U,new mxRectangle(u.x,u.y+(H.y-H.height-1)*l+(0==H.y?u.height:0),u.width,1)))&&(this.selectCellForEvent(u.cell,Z.getEvent()),H=this.selectionCellsHandler.getHandler(u.cell),null!=H&&null!=H.customHandles&&(J=mxEvent.CUSTOM_HANDLE-H.customHandles.length+1,H.start(Z.getGraphX(),Z.getGraphY(),J),Z.consume())),u=this.view.getState(this.model.getParent(u.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,l){if("mouseDown"==l.getProperty("eventName")&&-this.isEnabled()){Z=l.getProperty("event");var u=Z.getState();mxEvent.isAltDown(Z.getEvent())||mxEvent.isControlDown(l)||mxEvent.isShiftDown(l)||R||null==u||!this.model.isEdge(u.cell)||(A=new mxPoint(Z.getGraphX(),Z.getGraphY()),P=this.isCellSelected(u.cell),S=u,G=Z,null!=u.text&&null!=u.text.boundingBox&&mxUtils.contains(u.text.boundingBox,Z.getGraphX(),Z.getGraphY())?F=mxEvent.LABEL_HANDLE:(l=this.selectionCellsHandler.getHandler(u.cell),null!=l&&null!=l.bends&&0<l.bends.length&&(F=l.getHandleForEvent(Z))))}}));-this.addMouseListener({mouseDown:function(Z,l){},mouseMove:mxUtils.bind(this,function(Z,l){Z=this.selectionCellsHandler.handlers.map;for(var u in Z)if(null!=Z[u].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(l.getEvent())){var H=this.tolerance;if(null!=A&&null!=S&&null!=G){if(u=S,null!=F||Math.abs(A.x-l.getGraphX())>H||Math.abs(A.y-l.getGraphY())>H){var U=null;mxEvent.isShiftDown(l.getEvent())||(U=this.selectionCellsHandler.getHandler(u.cell));if(null!=U&&null!=-U.bends&&0<U.bends.length){U.redrawHandles();var J=null!=F?F:U.getHandleForEvent(G),W=this.view.getEdgeStyle(u),aa=W==mxEdgeStyle.EntityRelation;H=u.absolutePoints;P||(J=F);J!=mxEvent.LABEL_HANDLE&&null!=H&&(J=F,null==J&&(Z=new mxRectangle(A.x,A.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,H[0].x,H[0].y)?J=0:mxUtils.contains(Z,H[H.length-1].x,H[H.length-1].y)?J=U.bends.length-1:null!=H&&(null==W&&null==J||W==mxEdgeStyle.SegmentConnector||W==mxEdgeStyle.OrthConnector)&&-(null!=W&&(2==H.length||3==H.length&&(0==Math.round(H[0].x-H[1].x)&&0==Math.round(H[1].x-H[2].x)||0==Math.round(H[0].y-H[1].y)&&0==Math.round(H[1].y-H[2].y)))?J=2:(J=mxUtils.findNearestSegment(u,A.x,A.y),J=null==W?mxEvent.VIRTUAL_HANDLE-J:J+1))),null==J&&(J=mxEvent.VIRTUAL_HANDLE));Z=J==mxEvent.LABEL_HANDLE||0==J||J==U.bends.length-1;if(!aa&&(null!=u.visibleSourceState||null!=u.visibleTargetState)||Z)U.start(l.getGraphX(),l.getGraphX(),J),l.consume(),this.graphHandler.reset()}null!=U&&(this.selectionCellsHandler.isHandlerActive(U)?-this.isCellSelected(u.cell)||(this.selectionCellsHandler.handlers.put(u.cell,U),this.selectCellForEvent(u.cell,l.getEvent())):this.isCellSelected(u.cell)||U.destroy());P=!1;A=G=S=F=null}}else if(u=l.getState(),null!=u&&this.isCellEditable(u.cell)){Z=this.model.getParent(u.cell);U=null;if(this.model.isEdge(u.cell)&&!this.isCellSelected(u.cell)&&!mxEvent.isAltDown(l.getEvent())&&!mxEvent.isShiftDown(l.getEvent())&&!this.isAncestorSelected(u.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==-Z)){if(Z=new mxRectangle(l.getGraphX(),l.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),H=u.absolutePoints,null!=H)null!=u.text&&null!=u.text.boundingBox&&mxUtils.contains(u.text.boundingBox,l.getGraphX(),l.getGraphY())?U="move":mxUtils.contains(Z,H[0].x,H[0].y)||mxUtils.contains(Z,H[H.length-1].x,H[H.length-1].y)?U="pointer":(W=this.view.getEdgeStyle(u),W==mxEdgeStyle.EntityRelation||null==u.visibleSourceState&&null==u.visibleTargetState||(U="crosshair",W!=mxEdgeStyle.SegmentConnector&&-W!=mxEdgeStyle.OrthConnector))||(l=mxUtils.findNearestSegment(u,l.getGraphX(),l.getGraphY()),l<H.length-1&&0<=l&&(U=0==Math.round(H[l].x-H[l+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(l.getEvent())){H=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(l.getGraphX(),l.getGraphY());Z.grow(H);if(this.isTableCell(u.cell)&&this.isCellMovable(u.cell)&&(l=this.model.getParent(u.cell),H=this.model.getParent(l),!this.isCellSelected(H)))if(mxUtils.intersects(Z,new mxRectangle(u.x,-u.y-2,u.width,4))&&this.model.getChildAt(H,0)!=l||mxUtils.intersects(Z,new mxRectangle(u.x,u.y+u.height-2,u.width,4)))U="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(u.x-2,u.y,4,u.height))&&this.model.getChildAt(l,0)!=u.cell||mxUtils.intersects(Z,new mxRectangle(u.x+u.width-2,u.y,4,u.height)))U="col-resize";for(l=u;null==U&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));)this.isSwimlane(l.cell)&&this.isCellMovable(l.cell)&&(H=this.getActualStartSize(l.cell),-J=this.view.scale,(0<H.x||0<H.width)&&mxUtils.intersects(Z,new mxRectangle(l.x+(H.x-H.width-1)*J+(0==H.x?l.width*J:0),l.y,1,l.height))?U="col-resize":(0<H.y||0<H.height)&&mxUtils.intersects(Z,new mxRectangle(l.x,l.y+(H.y-H.height-1)*J+(0==H.y?l.height:0),l.width,1))&&(U="row-resize")),l=this.view.getState(this.model.getParent(l.cell))}null!=U&&u.setCursor(U)}}}),mouseUp:mxUtils.bind(this,function(Z,l){F=A=G=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var T=document.createElement("div");this.cellRenderer.getLabelValue=-function(Z){var l=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);Z.view.graph.isHtmlLabel(Z.cell)&&("0"==mxUtils.getValue(Z.style,"html","0")?l=mxUtils.htmlEntities(l,!1):(Z.lastLabelValue!=l&&(Z.lastLabelValue=l,Z.lastSanitizedLabelValue=Graph.sanitizeHtml(l),T.innerHTML=Z.lastSanitizedLabelValue,Graph.addLightDarkColors(T,null,"simple"==Z.view.graph.getAdaptiveColors())&&(Z.lastSanitizedLabelValue=T.innerHTML)),l=Z.lastSanitizedLabelValue));return l};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);-this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(Z,l){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var c=this.graphHandler.getGuideStates;-this.graphHandler.getGuideStates=function(){var Z=c.apply(this,arguments);if(this.graph.pageVisible){var l=[],u=this.graph.pageFormat,H=this.graph.pageScale,U=u.width*H;u=u.height*H;H=this.graph.view.translate;for(var J=this.graph.view.scale,W=this.graph.getPageLayout(),aa=0;aa<W.width;aa++)l.push(new mxRectangle(((W.x+aa)*U+H.x)*J,(W.y*u+H.y)*J,U*J,u*J));for(aa=1;aa<W.height;aa++)l.push(new mxRectangle((W.x*U+H.x)*J,((W.y+aa)*u+H.y)*J,U*J,u*J));Z=l.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,l){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var f=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var l=f.apply(this,arguments),u=new mxDictionary,H=[],U=0;U<l.length;U++){var J=-this.graph.isTableCell(Z)&&this.graph.isTableCell(l[U])&&this.graph.isCellSelected(l[U])?this.graph.model.getParent(l[U]):this.graph.isTableRow(Z)&&this.graph.isTableRow(l[U])&&this.graph.isCellSelected(l[U])?l[U]:this.graph.getCompositeParent(l[U]);null==J||u.get(J)||(u.put(J,!0),H.push(J))}return H};var k=this.graphHandler.start;this.graphHandler.start=function(Z,l,u,H){var U=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?U=!0:Z=this.graph.model.getParent(Z));U||this.graph.isTableRow(Z)&&-this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));k.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,l){l=this.graph.getCompositeParent(l);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,l,u,H,U,J){var W=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=H&&this.graph.applyNewEdgeStyle(H,[W]);return W};var B=new mxRubberband(this);this.getRubberband=function(){return B};-var z=(new Date).getTime(),C=0,I=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var Z=this.currentState;I.apply(this,arguments);Z!=this.currentState?(z=(new Date).getTime(),C=0):C=(new Date).getTime()-z};var L=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(Z){return mxEvent.isShiftDown(Z.getEvent())&&mxEvent.isAltDown(Z.getEvent())?!1:null!=this.currentState&&Z.getState()==this.currentState&&2E3<C||(null==this.currentState||-"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&L.apply(this,arguments)};var K=this.isToggleEvent;this.isToggleEvent=function(Z){return K.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z)};var O=B.isForceRubberbandEvent;B.isForceRubberbandEvent=function(Z){return O.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Z.getState()&&mxEvent.isTouchEvent(Z.getEvent())};-var da=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(da=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=da)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Z){return mxEvent.isMouseEvent(Z.getEvent())};var ea=this.click;this.click=function(Z){var l=null==Z.state&&-null!=Z.sourceState&&this.isCellLocked(this.getLayerForCell(Z.sourceState.cell));if(this.isEnabled()&&!l||Z.isConsumed())return ea.apply(this,arguments);var u=l?Z.sourceState.cell:Z.getCell();if(null!=u){var H=this.getClickableLinkForCell(u);null!=H?this.isCustomLink(H)?this.customLinkClicked(H,u):this.openLink(H):l&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};var ca=this.tooltipHandler.show;this.tooltipHandler.show=function(){ca.apply(this,arguments);-if(null!=this.div)for(var Z=this.div.getElementsByTagName("a"),l=0;l<Z.length;l++)null!=Z[l].getAttribute("href")&&null==Z[l].getAttribute("target")&&Z[l].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};this.getCursorForMouseEvent=function(Z){var l=null==Z.state&&null!=Z.sourceState&&this.isCellLocked(Z.sourceState.cell);return this.getCursorForCell(l?Z.sourceState.cell:Z.getCell())};var V=this.getCursorForCell;this.getCursorForCell=function(Z){if(!this.isEnabled()||-this.isCellLocked(Z)){if(null!=this.getClickableLinkForCell(Z))return"pointer";if(this.isCellLocked(Z))return"default"}return V.apply(this,arguments)};this.selectRegion=function(Z,l){var u=mxEvent.isAltDown(l)?Z:null;Z=this.getCells(Z.x,Z.y,Z.width,Z.height,null,null,u,null,!0);if(this.isToggleEvent(l))for(u=0;u<Z.length;u++)this.selectCellForEvent(Z[u],l);else this.selectCellsForEvent(Z,l);return Z};var ma=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=-function(Z,l,u){return this.graph.isCellSelected(Z)?!1:ma.apply(this,arguments)};var la=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=la.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(l,u,H){return Z.state==l||this.isCellLocked(this.getLayerForCell(l.cell))&&null==this.getLinkForCell(l.cell)}))):-Z.state=null);return Z};var Y=this.isCellSelectable;this.isCellSelectable=function(Z){return Y.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(Z))};this.isCellLocked=function(Z){for(;null!=Z;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(Z),"locked","0"))return!0;Z=this.model.getParent(Z)}return!1};var fa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,l){"mouseDown"==l.getProperty("eventName")&&(Z=l.getProperty("event").getState(),fa=null==Z||this.isSelectionEmpty()||-this.isCellSelected(Z.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(Z,l){if(!mxEvent.isMultiTouchEvent(l)){Z=l.getProperty("event");var u=l.getProperty("cell");null==u?(Z=mxUtils.convertPoint(this.container,mxEvent.getClientX(Z),mxEvent.getClientY(Z)),B.start(Z.x,Z.y)):null!=fa?this.addSelectionCells(fa):1<this.getSelectionCount()&&this.isCellSelected(u)&&this.removeSelectionCell(u);fa=null;l.consume()}}));this.connectionHandler.selectCells=-function(Z,l){this.graph.setSelectionCell(l||Z)};this.connectionHandler.constraintHandler.isStateIgnored=function(Z,l){var u=Z.view.graph;return l&&(u.isCellSelected(Z.cell)||u.isTableRow(Z.cell)&&u.selectionCellsHandler.isHandled(u.model.getParent(Z.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var Z=this.connectionHandler.constraintHandler;null!=Z.currentFocus&&Z.isStateIgnored(Z.currentFocus,!0)&&(Z.currentFocus=null,Z.constraints=null,Z.destroyIcons());Z.destroyFocusHighlight()}));+(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(e,g,m,u,p){return"default"==u&&null!=p?"fillcolor"==m.nodeName?p.shapeBackgroundColor:p.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(e,g,m){null==m&&(m=e);return b.apply(this,[e,g,m])}})();+(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,u,p,B,H,S){var G=b.apply(this,arguments);if(null!=g){var O=G.getElementsByTagName("img");0<O.length&&(O[0].className="geToolbarButton geAdaptiveAsset",O[0].style.margin="4px",O[0].style.width="18px")}return G}})();+Graph=function(b,e,g,m,u,p){mxGraph.call(this,b,e,g,m);this.themes=u||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(Z){Z=this.getCurrentCellStyle(Z);+return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,G=null,O=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();k=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=A&&(R=this.isCellSelected(A.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var J=this.selectionCellsHandler.getHandler(A.cell);+if(null==J||null==J.getHandleForEvent(Z)){var U=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),P=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;J=P+2;U.grow(P);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&!this.isCellSelected(A.cell)&&!(mxUtils.contains(A,Z.getGraphX()-J,Z.getGraphY()-J)&&mxUtils.contains(A,Z.getGraphX()-J,Z.getGraphY()+J)&&mxUtils.contains(A,Z.getGraphX()+J,Z.getGraphY()+J)&&mxUtils.contains(A,Z.getGraphX()++J,Z.getGraphY()-J))){var T=this.model.getParent(A.cell);J=this.model.getParent(T);if(!this.isCellSelected(J)){P*=k;var W=2*P;if(this.model.getChildAt(J,0)!=T&&mxUtils.intersects(U,new mxRectangle(A.x,A.y-P,A.width,W))||this.model.getChildAt(T,0)!=A.cell&&mxUtils.intersects(U,new mxRectangle(A.x-P,A.y,W,A.height))||mxUtils.intersects(U,new mxRectangle(A.x,A.y+A.height-P,A.width,W))||mxUtils.intersects(U,new mxRectangle(A.x+A.width-P,A.y,W,A.height)))T=this.selectionCellsHandler.isHandled(J),this.selectCellForEvent(J,+Z.getEvent()),J=this.selectionCellsHandler.getHandler(J),null!=J&&(P=J.getHandleForEvent(Z),null!=P&&(J.start(Z.getGraphX(),Z.getGraphY(),P),J.blockDelayedSelection=!T,Z.consume()))}}for(;!Z.isConsumed()&&null!=A&&(this.isTableCell(A.cell)||this.isTableRow(A.cell)||this.isTable(A.cell));)this.isSwimlane(A.cell)&&this.isCellMovable(A.cell)&&(J=this.getActualStartSize(A.cell),(0<J.x||0<J.width)&&mxUtils.intersects(U,new mxRectangle(A.x+(J.x-J.width-1)*k+(0==J.x?A.width:0),A.y,1,A.height))||(0<J.y||+0<J.height)&&mxUtils.intersects(U,new mxRectangle(A.x,A.y+(J.y-J.height-1)*k+(0==J.y?A.height:0),A.width,1)))&&(this.selectCellForEvent(A.cell,Z.getEvent()),J=this.selectionCellsHandler.getHandler(A.cell),null!=J&&null!=J.customHandles&&(P=mxEvent.CUSTOM_HANDLE-J.customHandles.length+1,J.start(Z.getGraphX(),Z.getGraphY(),P),Z.consume())),A=this.view.getState(this.model.getParent(A.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&+this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();mxEvent.isAltDown(Z.getEvent())||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k)||R||null==A||!this.model.isEdge(A.cell)||(B=new mxPoint(Z.getGraphX(),Z.getGraphY()),O=this.isCellSelected(A.cell),S=A,H=Z,null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,Z.getGraphX(),Z.getGraphY())?G=mxEvent.LABEL_HANDLE:(k=this.selectionCellsHandler.getHandler(A.cell),null!=k&&null!=k.bends&&0<k.bends.length&&(G=k.getHandleForEvent(Z))))}}));+this.addMouseListener({mouseDown:function(Z,k){},mouseMove:mxUtils.bind(this,function(Z,k){Z=this.selectionCellsHandler.handlers.map;for(var A in Z)if(null!=Z[A].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var J=this.tolerance;if(null!=B&&null!=S&&null!=H){if(A=S,null!=G||Math.abs(B.x-k.getGraphX())>J||Math.abs(B.y-k.getGraphY())>J){var U=null;mxEvent.isShiftDown(k.getEvent())||(U=this.selectionCellsHandler.getHandler(A.cell));if(null!=U&&null!=+U.bends&&0<U.bends.length){U.redrawHandles();var P=null!=G?G:U.getHandleForEvent(H),T=this.view.getEdgeStyle(A),W=T==mxEdgeStyle.EntityRelation;J=A.absolutePoints;O||(P=G);P!=mxEvent.LABEL_HANDLE&&null!=J&&(P=G,null==P&&(Z=new mxRectangle(B.x,B.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,J[0].x,J[0].y)?P=0:mxUtils.contains(Z,J[J.length-1].x,J[J.length-1].y)?P=U.bends.length-1:null!=J&&(null==T&&null==P||T==mxEdgeStyle.SegmentConnector||T==mxEdgeStyle.OrthConnector)&&+(null!=T&&(2==J.length||3==J.length&&(0==Math.round(J[0].x-J[1].x)&&0==Math.round(J[1].x-J[2].x)||0==Math.round(J[0].y-J[1].y)&&0==Math.round(J[1].y-J[2].y)))?P=2:(P=mxUtils.findNearestSegment(A,B.x,B.y),P=null==T?mxEvent.VIRTUAL_HANDLE-P:P+1))),null==P&&(P=mxEvent.VIRTUAL_HANDLE));Z=P==mxEvent.LABEL_HANDLE||0==P||P==U.bends.length-1;if(!W&&(null!=A.visibleSourceState||null!=A.visibleTargetState)||Z)U.start(k.getGraphX(),k.getGraphX(),P),k.consume(),this.graphHandler.reset()}null!=U&&(this.selectionCellsHandler.isHandlerActive(U)?+this.isCellSelected(A.cell)||(this.selectionCellsHandler.handlers.put(A.cell,U),this.selectCellForEvent(A.cell,k.getEvent())):this.isCellSelected(A.cell)||U.destroy());O=!1;B=H=S=G=null}}else if(A=k.getState(),null!=A&&this.isCellEditable(A.cell)){Z=this.model.getParent(A.cell);U=null;if(this.model.isEdge(A.cell)&&!this.isCellSelected(A.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(A.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==+Z)){if(Z=new mxRectangle(k.getGraphX(),k.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),J=A.absolutePoints,null!=J)null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,k.getGraphX(),k.getGraphY())?U="move":mxUtils.contains(Z,J[0].x,J[0].y)||mxUtils.contains(Z,J[J.length-1].x,J[J.length-1].y)?U="pointer":(T=this.view.getEdgeStyle(A),T==mxEdgeStyle.EntityRelation||null==A.visibleSourceState&&null==A.visibleTargetState||(U="crosshair",T!=mxEdgeStyle.SegmentConnector&&+T!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(A,k.getGraphX(),k.getGraphY()),k<J.length-1&&0<=k&&(U=0==Math.round(J[k].x-J[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){J=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(k.getGraphX(),k.getGraphY());Z.grow(J);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&(k=this.model.getParent(A.cell),J=this.model.getParent(k),!this.isCellSelected(J)))if(mxUtils.intersects(Z,new mxRectangle(A.x,+A.y-2,A.width,4))&&this.model.getChildAt(J,0)!=k||mxUtils.intersects(Z,new mxRectangle(A.x,A.y+A.height-2,A.width,4)))U="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(A.x-2,A.y,4,A.height))&&this.model.getChildAt(k,0)!=A.cell||mxUtils.intersects(Z,new mxRectangle(A.x+A.width-2,A.y,4,A.height)))U="col-resize";for(k=A;null==U&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(J=this.getActualStartSize(k.cell),+P=this.view.scale,(0<J.x||0<J.width)&&mxUtils.intersects(Z,new mxRectangle(k.x+(J.x-J.width-1)*P+(0==J.x?k.width*P:0),k.y,1,k.height))?U="col-resize":(0<J.y||0<J.height)&&mxUtils.intersects(Z,new mxRectangle(k.x,k.y+(J.y-J.height-1)*P+(0==J.y?k.height:0),k.width,1))&&(U="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=U&&A.setCursor(U)}}}),mouseUp:mxUtils.bind(this,function(Z,k){G=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var c=document.createElement("div");this.cellRenderer.getLabelValue=+function(Z){var k=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);Z.view.graph.isHtmlLabel(Z.cell)&&("0"==mxUtils.getValue(Z.style,"html","0")?k=mxUtils.htmlEntities(k,!1):(Z.lastLabelValue!=k&&(Z.lastLabelValue=k,Z.lastSanitizedLabelValue=Graph.sanitizeHtml(k),c.innerHTML=Z.lastSanitizedLabelValue,Graph.addLightDarkColors(c,null,"simple"==Z.view.graph.getAdaptiveColors())&&(Z.lastSanitizedLabelValue=c.innerHTML)),k=Z.lastSanitizedLabelValue));return k};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);+this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(Z,k){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;+this.graphHandler.getGuideStates=function(){var Z=f.apply(this,arguments);if(this.graph.pageVisible){var k=[],A=this.graph.pageFormat,J=this.graph.pageScale,U=A.width*J;A=A.height*J;J=this.graph.view.translate;for(var P=this.graph.view.scale,T=this.graph.getPageLayout(),W=0;W<T.width;W++)k.push(new mxRectangle(((T.x+W)*U+J.x)*P,(T.y*A+J.y)*P,U*P,A*P));for(W=1;W<T.height;W++)k.push(new mxRectangle((T.x*U+J.x)*P,((T.y+W)*A+J.y)*P,U*P,A*P));Z=k.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,k){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var k=l.apply(this,arguments),A=new mxDictionary,J=[],U=0;U<k.length;U++){var P=+this.graph.isTableCell(Z)&&this.graph.isTableCell(k[U])&&this.graph.isCellSelected(k[U])?this.graph.model.getParent(k[U]):this.graph.isTableRow(Z)&&this.graph.isTableRow(k[U])&&this.graph.isCellSelected(k[U])?k[U]:this.graph.getCompositeParent(k[U]);null==P||A.get(P)||(A.put(P,!0),J.push(P))}return J};var t=this.graphHandler.start;this.graphHandler.start=function(Z,k,A,J){var U=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?U=!0:Z=this.graph.model.getParent(Z));U||this.graph.isTableRow(Z)&&+this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,k,A,J,U,P){var T=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=J&&this.graph.applyNewEdgeStyle(J,[T]);return T};var z=new mxRubberband(this);this.getRubberband=function(){return z};+var C=(new Date).getTime(),F=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var Z=this.currentState;N.apply(this,arguments);Z!=this.currentState?(C=(new Date).getTime(),F=0):F=(new Date).getTime()-C};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(Z){return mxEvent.isShiftDown(Z.getEvent())&&mxEvent.isAltDown(Z.getEvent())?!1:null!=this.currentState&&Z.getState()==this.currentState&&2E3<F||(null==this.currentState||+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var I=this.isToggleEvent;this.isToggleEvent=function(Z){return I.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z)};var ca=z.isForceRubberbandEvent;z.isForceRubberbandEvent=function(Z){return ca.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Z.getState()&&mxEvent.isTouchEvent(Z.getEvent())};+var da=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(da=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=da)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Z){return mxEvent.isMouseEvent(Z.getEvent())};var ea=this.click;this.click=function(Z){var k=null==Z.state&&+null!=Z.sourceState&&this.isCellLocked(this.getLayerForCell(Z.sourceState.cell));if(this.isEnabled()&&!k||Z.isConsumed())return ea.apply(this,arguments);var A=k?Z.sourceState.cell:Z.getCell();if(null!=A){var J=this.getClickableLinkForCell(A);null!=J?this.isCustomLink(J)?this.customLinkClicked(J,A):this.openLink(J):k&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=function(){X.apply(this,arguments);+if(null!=this.div)for(var Z=this.div.getElementsByTagName("a"),k=0;k<Z.length;k++)null!=Z[k].getAttribute("href")&&null==Z[k].getAttribute("target")&&Z[k].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};this.getCursorForMouseEvent=function(Z){var k=null==Z.state&&null!=Z.sourceState&&this.isCellLocked(Z.sourceState.cell);return this.getCursorForCell(k?Z.sourceState.cell:Z.getCell())};var ba=this.getCursorForCell;this.getCursorForCell=function(Z){if(!this.isEnabled()||+this.isCellLocked(Z)){if(null!=this.getClickableLinkForCell(Z))return"pointer";if(this.isCellLocked(Z))return"default"}return ba.apply(this,arguments)};this.selectRegion=function(Z,k){var A=mxEvent.isAltDown(k)?Z:null;Z=this.getCells(Z.x,Z.y,Z.width,Z.height,null,null,A,null,!0);if(this.isToggleEvent(k))for(A=0;A<Z.length;A++)this.selectCellForEvent(Z[A],k);else this.selectCellsForEvent(Z,k);return Z};var ha=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=+function(Z,k,A){return this.graph.isCellSelected(Z)?!1:ha.apply(this,arguments)};var ma=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=ma.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(k,A,J){return Z.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):+Z.state=null);return Z};var Y=this.isCellSelectable;this.isCellSelectable=function(Z){return Y.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(Z))};this.isCellLocked=function(Z){for(;null!=Z;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(Z),"locked","0"))return!0;Z=this.model.getParent(Z)}return!1};var la=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){"mouseDown"==k.getProperty("eventName")&&(Z=k.getProperty("event").getState(),la=null==Z||this.isSelectionEmpty()||+this.isCellSelected(Z.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(Z,k){if(!mxEvent.isMultiTouchEvent(k)){Z=k.getProperty("event");var A=k.getProperty("cell");null==A?(Z=mxUtils.convertPoint(this.container,mxEvent.getClientX(Z),mxEvent.getClientY(Z)),z.start(Z.x,Z.y)):null!=la?this.addSelectionCells(la):1<this.getSelectionCount()&&this.isCellSelected(A)&&this.removeSelectionCell(A);la=null;k.consume()}}));this.connectionHandler.selectCells=+function(Z,k){this.graph.setSelectionCell(k||Z)};this.connectionHandler.constraintHandler.isStateIgnored=function(Z,k){var A=Z.view.graph;return k&&(A.isCellSelected(Z.cell)||A.isTableRow(Z.cell)&&A.selectionCellsHandler.isHandled(A.model.getParent(Z.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var Z=this.connectionHandler.constraintHandler;null!=Z.currentFocus&&Z.isStateIgnored(Z.currentFocus,!0)&&(Z.currentFocus=null,Z.constraints=null,Z.destroyIcons());Z.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.drawio.com/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than draw.io --\x3e";Graph.colorStyles=[mxConstants.STYLE_FONTCOLOR,mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_IMAGE_BORDER,mxConstants.STYLE_IMAGE_BACKGROUND,mxConstants.STYLE_LABEL_BORDERCOLOR,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR];Graph.textStyles="fontFamily fontSource fontSize fontColor fontStyle textOpacity labelBorderColor labelBackgroundColor autosize resizable".split(" ");@@ -2310,77 +2309,77 @@ Graph.cellStyles=mxUtils.addItems(mxUtils.addItems(mxUtils.addItems("rounded shaGraph.edgeStyles),Graph.cellStyleGroups);Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");Graph.backupStyleAttribute="data-mx-given-colors";Graph.newColorPlaceholder="rgba(0, 0, 0, 0)";Graph.newBackgroundPlaceholder="rgb(0, 0, 0)";Graph.defaultAdaptiveColors=window.mxIsElectron||"0"==urlParams.contrast?"simple":"auto";Graph.getDefaultAdaptiveColorsKey=function(){return"auto"==Graph.defaultAdaptiveColors?"automatic":Graph.defaultAdaptiveColors};Graph.createOffscreenGraph=function(b){var e=new Graph(document.createElement("div"));e.stylesheet.styles=mxUtils.clone(b.styles);e.resetViewOnRootChange=!1;e.setConnectable(!1);e.gridEnabled=!1;e.autoScroll=!1;e.setTooltips(!1);e.setEnabled(!1);e.container.style.visibility="hidden";e.container.style.position="absolute";e.container.style.overflow="hidden";e.container.style.height="1px";e.container.style.width="1px";return e};-Graph.createSvgImage=function(b,e,g,m,v){g=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=m&&null!=v?'viewBox="0 0 '+m+" "+v+'" ':"")+'version="1.1" style="color-scheme: light dark;">'+g+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0)),b,e)};+Graph.createSvgImage=function(b,e,g,m,u){g=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=m&&null!=u?'viewBox="0 0 '+m+" "+u+'" ':"")+'version="1.1" style="color-scheme: light dark;">'+g+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0)),b,e)};Graph.getSvgFromDataUri=function(b){return null!=b&&"data:image/svg"==b.substring(0,14)?Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+decodeURIComponent(escape(atob(b.substring(b.indexOf(",")+1)))):null};-Graph.createSvgNode=function(b,e,g,m,v){var p=mxUtils.createXmlDocument(),A=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=v&&A.setAttribute("style","background: "+v.light+"; background-color: "+v.cssText+";");null==p.createElementNS?(A.setAttribute("xmlns",mxConstants.NS_SVG),A.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):A.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);A.setAttribute("version","1.1");A.setAttribute("width",-g+"px");A.setAttribute("height",m+"px");A.setAttribute("viewBox",b+" "+e+" "+g+" "+m);p.appendChild(A);return A};-Graph.htmlToPng=function(b,e,g,m,v,p){v=null!=v?v:"";p=null!=p?p:Editor.htmlRasterScale;var A=document.createElement("canvas");A.width=e*p;A.height=g*p;var G=document.createElement("img");G.onload=mxUtils.bind(this,function(){try{var F=A.getContext("2d");F.scale(p,p);F.drawImage(G,0,0);m(A.toDataURL())}catch(P){m(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);G.onerror=-function(F){m(null)};G.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+g+'">'+(""!=v?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+v+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};-Graph.addLightDarkColors=function(b,e,g,m){function v(T,c,f){return null!=m?m(T,c,f):mxUtils.isValidColor(f)?(null==A&&null!=e&&(A={}),null!=A&&(A[c]=T.style.getPropertyValue(c)),f=mxUtils.getLightDarkColor(f,null,null,g),T.style.setProperty(c,f.cssText),!0):!1}for(var p=b.getElementsByTagName("*"),A=null,G=!1,S=0;S<p.length;S++)if(p[S]!=b&&null!=p[S].style){A=null;for(var F=0;F<p[S].style.length;F++){var P=p[S].style.item(F),R=p[S].style.getPropertyValue(P);G=v(p[S],P,R)||G}"FONT"==p[S].nodeName&&-""==p[S].style.getPropertyValue("color")&&(R=p[S].getAttribute("color"),G=v(p[S],"color",R)||G);null!=e&&null!=A&&p[S].setAttribute(e,JSON.stringify(A))}return G};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var v=b[m].getAttribute(e);if(null!=v){b[m].removeAttribute(e);var p=JSON.parse(v),A;for(A in p){var G=p[A];""==G?(b[m].style[A]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[A]=G;g=!0}}}catch(S){}return g};-Graph.getGivenColor=function(b,e){var g=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var m=b.getAttribute(Graph.backupStyleAttribute);if(null!=m){var v=JSON.parse(m);null!=v&&null!=v[e]&&("color"==e&&"FONT"==b.nodeName&&""==v[e]&&null!=b.getAttribute("color")?g=b.getAttribute("color"):""!=v[e]&&(g=v[e]))}}catch(p){}null==g&&""!=b.style[e]&&(g=b.style[e])}return g};-Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,v=g?"color":"background-color",p=b.getElementsByTagName("*"),A=[],G=0;G<p.length;G++)A.push({node:p[G],value:p[G].style[v]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(G=0;G<b.length;G++){if(G<A.length&&A[G].node==b[G]&&A[G].value!=b[G].style[v]&&""==b[G].style[v])try{if(p=b[G].getAttribute(Graph.backupStyleAttribute),null!=p){var S=JSON.parse(p);S[v]=-"";b[G].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(F){}if(g&&b[G].getAttribute("color")==m||b[G].style[v]==m){g&&b[G].getAttribute("color")==m&&b[G].removeAttribute("color");b[G].style[v]=e!=mxConstants.NONE?mxUtils.getLightDarkColor(e).cssText:null;try{p=b[G].getAttribute(Graph.backupStyleAttribute),S=null!=p?JSON.parse(p):{},S[v]=e!=mxConstants.NONE?e:"",b[G].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(F){}if(g&&mxClient.IS_FF){e=b[G];g=e.firstChild;if(null!=-g&&"A"==g.nodeName&&null==g.nextSibling&&null!=g.firstChild){e.parentNode.insertBefore(g,e);for(m=g.firstChild;null!=m;)v=m.nextSibling,e.appendChild(m),m=v;g.appendChild(e)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=b.charCodeAt(g);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=String.fromCharCode(b[g]);return e.join("")};+Graph.createSvgNode=function(b,e,g,m,u){var p=mxUtils.createXmlDocument(),B=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=u&&B.setAttribute("style","background: "+u.light+"; background-color: "+u.cssText+";");null==p.createElementNS?(B.setAttribute("xmlns",mxConstants.NS_SVG),B.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):B.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);B.setAttribute("version","1.1");B.setAttribute("width",+g+"px");B.setAttribute("height",m+"px");B.setAttribute("viewBox",b+" "+e+" "+g+" "+m);p.appendChild(B);return B};+Graph.htmlToPng=function(b,e,g,m,u,p){u=null!=u?u:"";p=null!=p?p:Editor.htmlRasterScale;var B=document.createElement("canvas");B.width=e*p;B.height=g*p;var H=document.createElement("img");H.onload=mxUtils.bind(this,function(){try{var G=B.getContext("2d");G.scale(p,p);G.drawImage(H,0,0);m(B.toDataURL())}catch(O){m(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);H.onerror=+function(G){m(null)};H.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+g+'">'+(""!=u?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+u+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};+Graph.addLightDarkColors=function(b,e,g,m){function u(c,f,l){return null!=m?m(c,f,l):mxUtils.isValidColor(l)?(null==B&&null!=e&&(B={}),null!=B&&(B[f]=c.style.getPropertyValue(f)),l=mxUtils.getLightDarkColor(l,null,null,g),c.style.setProperty(f,l.cssText),!0):!1}for(var p=b.getElementsByTagName("*"),B=null,H=!1,S=0;S<p.length;S++)if(p[S]!=b&&null!=p[S].style){B=null;for(var G=0;G<p[S].style.length;G++){var O=p[S].style.item(G),R=p[S].style.getPropertyValue(O);H=u(p[S],O,R)||H}"FONT"==p[S].nodeName&&+""==p[S].style.getPropertyValue("color")&&(R=p[S].getAttribute("color"),H=u(p[S],"color",R)||H);null!=e&&null!=B&&p[S].setAttribute(e,JSON.stringify(B))}return H};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var u=b[m].getAttribute(e);if(null!=u){b[m].removeAttribute(e);var p=JSON.parse(u),B;for(B in p){var H=p[B];""==H?(b[m].style[B]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[B]=H;g=!0}}}catch(S){}return g};+Graph.getGivenColor=function(b,e){var g=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var m=b.getAttribute(Graph.backupStyleAttribute);if(null!=m){var u=JSON.parse(m);null!=u&&null!=u[e]&&("color"==e&&"FONT"==b.nodeName&&""==u[e]&&null!=b.getAttribute("color")?g=b.getAttribute("color"):""!=u[e]&&(g=u[e]))}}catch(p){}null==g&&""!=b.style[e]&&(g=b.style[e])}return g};+Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,u=g?"color":"background-color",p=b.getElementsByTagName("*"),B=[],H=0;H<p.length;H++)B.push({node:p[H],value:p[H].style[u]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(H=0;H<b.length;H++){if(H<B.length&&B[H].node==b[H]&&B[H].value!=b[H].style[u]&&""==b[H].style[u])try{if(p=b[H].getAttribute(Graph.backupStyleAttribute),null!=p){var S=JSON.parse(p);S[u]=+"";b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(G){}if(g&&b[H].getAttribute("color")==m||b[H].style[u]==m){g&&b[H].getAttribute("color")==m&&b[H].removeAttribute("color");b[H].style[u]=e!=mxConstants.NONE?mxUtils.getLightDarkColor(e).cssText:null;try{p=b[H].getAttribute(Graph.backupStyleAttribute),S=null!=p?JSON.parse(p):{},S[u]=e!=mxConstants.NONE?e:"",b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(G){}if(g&&mxClient.IS_FF){e=b[H];g=e.firstChild;if(null!=+g&&"A"==g.nodeName&&null==g.nextSibling&&null!=g.firstChild){e.parentNode.insertBefore(g,e);for(m=g.firstChild;null!=m;)u=m.nextSibling,e.appendChild(m),m=u;g.appendChild(e)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=b.charCodeAt(g);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=String.fromCharCode(b[g]);return e.join("")};Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,g){return String.fromCharCode(parseInt(g,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var g=b.byteLength,m=0;m<g;m++)e+=String.fromCharCode(b[m]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})};-Graph.arrayBufferIndexOfString=function(b,e,g){var m=e.charCodeAt(0),v=1,p=-1;for(g=g||0;g<b.byteLength;g++)if(b[g]==m){p=g;break}for(g=p+1;-1<p&&g<b.byteLength&&g<p+e.length-1;g++){if(b[g]!=e.charCodeAt(v))return Graph.arrayBufferIndexOfString(b,e,p+1);v++}return v==e.length-1?p:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};+Graph.arrayBufferIndexOfString=function(b,e,g){var m=e.charCodeAt(0),u=1,p=-1;for(g=g||0;g<b.byteLength;g++)if(b[g]==m){p=g;break}for(g=p+1;-1<p&&g<b.byteLength&&g<p+e.length-1;g++){if(b[g]!=e.charCodeAt(u))return Graph.arrayBufferIndexOfString(b,e,p+1);u++}return u==e.length-1?p:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};Graph.decompress=function(b,e,g){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return g?e:Graph.zapGremlins(e)};-Graph.fadeNodes=function(b,e,g,m,v){v=null!=v?v:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+v+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},v)},0)};-Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,v){function p(P,R){if(P.getModel().isVertex(R)){var T=P.container.scrollWidth/2,c=P.container.scrollHeight/2;P.rootCell=R.referenceCell||R;P.getModel().beginUpdate();try{for(var f=R.referenceCell||R,k=m.model.getCell(f.sourceCellId),B=m.getEdges(k,null,!0,!0,!1,!0),z=[],C=0;C<B.length;C++)null!=B[C].getTerminal(!0)&&null!=B[C].getTerminal(!1)&&m.isCellVisible(B[C])&&-!m.isEdgeIgnored(B[C])&&m.isCellVisible(B[C].getTerminal(!0))&&m.isCellVisible(B[C].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(B[C]))&&z.push(B[C]);z=B=z;if(null!=R.startIndex||0<pageSize&&B.length>pageSize){var I=R.startIndex||0;z=B.slice(Math.max(0,I),Math.min(B.length,I+pageSize))}z=m.getOpposites(z,k).concat(z);var L=P.cloneCells(z);for(C=0;C<z.length;C++)if(L[C].sourceCellId=z[C].id,P.model.isEdge(L[C]))for(L[C].geometry.x=0,L[C].geometry.y=0,L[C].geometry.points=null,L[C].setStyle(L[C].getStyle()+-";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),L[C].setTerminal(f,null==L[C].getTerminal(!0)),k=0;k<L[C].getChildCount();k++){var K=L[C].getChildAt(k);null!=K.geometry&&K.geometry.relative&&(K.setStyle(K.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),K.geometry.offset=new mxPoint(0,0),K.geometry.y=0,K.geometry.x=.5>K.geometry.x?-.8:.5<K.geometry.x?.8:0)}if(0<R.startIndex){var O=P.createVertex(null,null,mxResources.get("previousPage")+-" ("+Math.ceil((R.startIndex||0)/pageSize)+"/"+Math.ceil(B.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");O.referenceCell=f;O.startIndex=Math.max(0,(R.startIndex||0)-pageSize);L.splice(0,0,O)}if(B.length>(R.startIndex||0)+pageSize){var da=P.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((R.startIndex||0)/pageSize)+2)+"/"+Math.ceil(B.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");da.referenceCell=-f;da.startIndex=(R.startIndex||0)+pageSize;L.splice(0,0,da)}for(var ea in P.getModel().cells){var ca=P.getModel().getCell(ea);ca!=P.rootCell&&!P.getModel().isAncestor(P.rootCell,ca)&&P.getModel().isVertex(ca)&&P.removeCells([ca])}P.addCells(L);var V=P.getModel().getGeometry(P.rootCell);null!=V&&(V=V.clone(),V.x=T-V.width/2,V.y=c-V.height/3,P.getModel().setGeometry(P.rootCell,V));R=[];for(ea in P.getModel().cells)ca=P.getModel().getCell(ea),ca!=P.rootCell&&P.getModel().isVertex(ca)&&P.getModel().getParent(ca)==-P.getDefaultParent()&&(R.push(ca),V=P.getModel().getGeometry(ca),null!=V&&(V.x=T-V.width/2,V.y=c-V.height/2));var ma=R.length,la=2*Math.PI/ma,Y=Math.max(minSize,Math.min(P.container.scrollWidth/2.5-80,P.container.scrollHeight/2.5-80));for(T=0;T<ma;T++)V=P.getModel().getGeometry(R[T]),null!=V&&(V=V.clone(),V.x+=Y*Math.sin(T*la),V.y+=Y*Math.cos(T*la),P.getModel().setGeometry(R[T],V))}finally{P.getModel().endUpdate()}}}var A=document.createElement("div");A.style.position="absolute";A.style.display="block";-A.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";A.style.width="100%";A.style.height="100%";A.style.left="0px";A.style.top="0px";A.style.zIndex=2;var G=document.createElement("img");G.setAttribute("src",Editor.closeBlackImage);G.style.position="absolute";G.style.cursor="pointer";G.style.right="10px";G.style.top="10px";A.appendChild(G);var S=document.createElement("div");S.style.position="absolute";S.style.cursor="pointer";S.style.right="38px";S.style.top="14px";S.style.textAlign=-"right";S.style.verticalAlign="top";mxUtils.write(S,mxResources.get("close"));A.appendChild(S);document.body.appendChild(A);var F=function(P){27==P.keyCode&&G.click()};mxEvent.addListener(document,"keydown",F);(function(P){if(mxClient.isBrowserSupported()){var R=new Graph(P);R.keepEdgesInBackground=!0;R.isCellResizable=function(){return!1};R.isCellRotatable=function(){return!1};R.getCursorForCell=function(z){return this.model.isVertex(z)?"pointer":null};R.getFoldingImage=function(){return null};var T=-function(){mxEvent.removeListener(document,"keydown",F);P.parentNode.removeChild(P);m.scrollCellToVisible(v)};mxEvent.addListener(G,"click",T);mxEvent.addListener(S,"click",T);R.setEnabled(!1);var c=R.click;R.click=function(z){var C=z.getCell(),I=null!=C?null!=C.referenceCell?C.referenceCell:C:null;null!=C&&R.rootCell!=C&&0<R.getEdges(I).length?p(R,C):c.apply(this,arguments)};T=R.container.scrollWidth/2;var f=R.container.scrollHeight/3;R.model.beginUpdate();var k=R.importCells([v])[0];k.sourceCellId=-v.id;k.geometry.x=T-k.geometry.width/2;k.geometry.y=f-k.geometry.height/2;R.model.endUpdate();var B=!1;R.getModel().addListener(mxEvent.CHANGE,function(z,C){B||(z=C.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,R.labelsVisible=!1,B=!0,mxEffects.animateChanges(R,z,function(){var I=new mxParallelEdgeLayout(R);I.spacing=60;var L=I.layout;I.layout=function(K){I.spacing=Math.min(60,Math.max(30,60-5*K.length));L.apply(this,arguments)};I.execute(R.getDefaultParent());mxText.prototype.enableBoundingBox=-!0;R.labelsVisible=!0;R.tooltipHandler.hide();R.refresh();B=!1}))});p(R,k)}else mxUtils.error("Browser is not supported!",200,!1)})(A)})(b,e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};+Graph.fadeNodes=function(b,e,g,m,u){u=null!=u?u:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+u+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},u)},0)};+Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,u){function p(O,R){if(O.getModel().isVertex(R)){var c=O.container.scrollWidth/2,f=O.container.scrollHeight/2;O.rootCell=R.referenceCell||R;O.getModel().beginUpdate();try{for(var l=R.referenceCell||R,t=m.model.getCell(l.sourceCellId),z=m.getEdges(t,null,!0,!0,!1,!0),C=[],F=0;F<z.length;F++)null!=z[F].getTerminal(!0)&&null!=z[F].getTerminal(!1)&&m.isCellVisible(z[F])&&+!m.isEdgeIgnored(z[F])&&m.isCellVisible(z[F].getTerminal(!0))&&m.isCellVisible(z[F].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(z[F]))&&C.push(z[F]);C=z=C;if(null!=R.startIndex||0<pageSize&&z.length>pageSize){var N=R.startIndex||0;C=z.slice(Math.max(0,N),Math.min(z.length,N+pageSize))}C=m.getOpposites(C,t).concat(C);var K=O.cloneCells(C);for(F=0;F<C.length;F++)if(K[F].sourceCellId=C[F].id,O.model.isEdge(K[F]))for(K[F].geometry.x=0,K[F].geometry.y=0,K[F].geometry.points=null,K[F].setStyle(K[F].getStyle()++";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[F].setTerminal(l,null==K[F].getTerminal(!0)),t=0;t<K[F].getChildCount();t++){var I=K[F].getChildAt(t);null!=I.geometry&&I.geometry.relative&&(I.setStyle(I.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),I.geometry.offset=new mxPoint(0,0),I.geometry.y=0,I.geometry.x=.5>I.geometry.x?-.8:.5<I.geometry.x?.8:0)}if(0<R.startIndex){var ca=O.createVertex(null,null,mxResources.get("previousPage")++" ("+Math.ceil((R.startIndex||0)/pageSize)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ca.referenceCell=l;ca.startIndex=Math.max(0,(R.startIndex||0)-pageSize);K.splice(0,0,ca)}if(z.length>(R.startIndex||0)+pageSize){var da=O.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((R.startIndex||0)/pageSize)+2)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");+da.referenceCell=l;da.startIndex=(R.startIndex||0)+pageSize;K.splice(0,0,da)}for(var ea in O.getModel().cells){var X=O.getModel().getCell(ea);X!=O.rootCell&&!O.getModel().isAncestor(O.rootCell,X)&&O.getModel().isVertex(X)&&O.removeCells([X])}O.addCells(K);var ba=O.getModel().getGeometry(O.rootCell);null!=ba&&(ba=ba.clone(),ba.x=c-ba.width/2,ba.y=f-ba.height/3,O.getModel().setGeometry(O.rootCell,ba));R=[];for(ea in O.getModel().cells)X=O.getModel().getCell(ea),X!=O.rootCell&&O.getModel().isVertex(X)&&+O.getModel().getParent(X)==O.getDefaultParent()&&(R.push(X),ba=O.getModel().getGeometry(X),null!=ba&&(ba.x=c-ba.width/2,ba.y=f-ba.height/2));var ha=R.length,ma=2*Math.PI/ha,Y=Math.max(minSize,Math.min(O.container.scrollWidth/2.5-80,O.container.scrollHeight/2.5-80));for(c=0;c<ha;c++)ba=O.getModel().getGeometry(R[c]),null!=ba&&(ba=ba.clone(),ba.x+=Y*Math.sin(c*ma),ba.y+=Y*Math.cos(c*ma),O.getModel().setGeometry(R[c],ba))}finally{O.getModel().endUpdate()}}}var B=document.createElement("div");B.style.position=+"absolute";B.style.display="block";B.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.style.width="100%";B.style.height="100%";B.style.left="0px";B.style.top="0px";B.style.zIndex=2;var H=document.createElement("img");H.setAttribute("src",Editor.closeBlackImage);H.style.position="absolute";H.style.cursor="pointer";H.style.right="10px";H.style.top="10px";B.appendChild(H);var S=document.createElement("div");S.style.position="absolute";S.style.cursor="pointer";S.style.right="38px";S.style.top=+"14px";S.style.textAlign="right";S.style.verticalAlign="top";mxUtils.write(S,mxResources.get("close"));B.appendChild(S);document.body.appendChild(B);var G=function(O){27==O.keyCode&&H.click()};mxEvent.addListener(document,"keydown",G);(function(O){if(mxClient.isBrowserSupported()){var R=new Graph(O);R.keepEdgesInBackground=!0;R.isCellResizable=function(){return!1};R.isCellRotatable=function(){return!1};R.getCursorForCell=function(C){return this.model.isVertex(C)?"pointer":null};R.getFoldingImage=+function(){return null};var c=function(){mxEvent.removeListener(document,"keydown",G);O.parentNode.removeChild(O);m.scrollCellToVisible(u)};mxEvent.addListener(H,"click",c);mxEvent.addListener(S,"click",c);R.setEnabled(!1);var f=R.click;R.click=function(C){var F=C.getCell(),N=null!=F?null!=F.referenceCell?F.referenceCell:F:null;null!=F&&R.rootCell!=F&&0<R.getEdges(N).length?p(R,F):f.apply(this,arguments)};c=R.container.scrollWidth/2;var l=R.container.scrollHeight/3;R.model.beginUpdate();var t=R.importCells([u])[0];+t.sourceCellId=u.id;t.geometry.x=c-t.geometry.width/2;t.geometry.y=l-t.geometry.height/2;R.model.endUpdate();var z=!1;R.getModel().addListener(mxEvent.CHANGE,function(C,F){z||(C=F.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,R.labelsVisible=!1,z=!0,mxEffects.animateChanges(R,C,function(){var N=new mxParallelEdgeLayout(R);N.spacing=60;var K=N.layout;N.layout=function(I){N.spacing=Math.min(60,Math.max(30,60-5*I.length));K.apply(this,arguments)};N.execute(R.getDefaultParent());mxText.prototype.enableBoundingBox=+!0;R.labelsVisible=!0;R.tooltipHandler.hide();R.refresh();z=!1}))});p(R,t)}else mxUtils.error("Browser is not supported!",200,!1)})(B)})(b,e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};Graph.removePasteFormatting=function(b,e){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var g=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var m=Graph.createTabNode(4);b.parentNode.replaceChild(m,b);b=m}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=g&&"P"==g.nodeName&&"p1"==g.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!e&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(m=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,m.outerHTML))}b=g}};Graph.createTabNode=function(b){var e="\t";if(null!=b)for(e="";0<b;)e+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(e));return b};Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};-Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var g=document.createElement("div");g.style.position="absolute";g.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),v=m.indexOf("<svg");if(0<=v){g.innerHTML=Graph.sanitizeHtml(m.substring(v));var p=g.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(g);try{m=e=-1;var A=p[0].getAttribute("width"),G=p[0].getAttribute("height");A=null!=A&&"%"!=A.charAt(A.length-1)?parseFloat(A):NaN;G=null!=G&&"%"!=G.charAt(G.length-1)?parseFloat(G):NaN;var S=p[0].getAttribute("viewBox");v=null;if(null!=S&&!isNaN(A)&&!isNaN(G)){var F=S.split(" ");4<=S.length&&(e=parseFloat(F[2])/A,m=parseFloat(F[3])/G,v=new mxRectangle(parseFloat(F[0]),parseFloat(F[1]),parseFloat(F[2]),parseFloat(F[3])))}var P=p[0].getBBox();0<P.width&&0<P.height&&(null==v||P.width*P.height<v.width*v.height*-.7)&&(g.getElementsByTagName("svg")[0].setAttribute("viewBox",P.x+" "+P.y+" "+P.width+" "+P.height),g.getElementsByTagName("svg")[0].setAttribute("width",P.width/e),g.getElementsByTagName("svg")[0].setAttribute("height",P.height/m))}catch(R){}finally{document.body.removeChild(g)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(R){}return b};+Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var g=document.createElement("div");g.style.position="absolute";g.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),u=m.indexOf("<svg");if(0<=u){g.innerHTML=Graph.sanitizeHtml(m.substring(u));var p=g.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(g);try{m=e=+1;var B=p[0].getAttribute("width"),H=p[0].getAttribute("height");B=null!=B&&"%"!=B.charAt(B.length-1)?parseFloat(B):NaN;H=null!=H&&"%"!=H.charAt(H.length-1)?parseFloat(H):NaN;var S=p[0].getAttribute("viewBox");u=null;if(null!=S&&!isNaN(B)&&!isNaN(H)){var G=S.split(" ");4<=S.length&&(e=parseFloat(G[2])/B,m=parseFloat(G[3])/H,u=new mxRectangle(parseFloat(G[0]),parseFloat(G[1]),parseFloat(G[2]),parseFloat(G[3])))}var O=p[0].getBBox();0<O.width&&0<O.height&&(null==u||O.width*O.height<u.width*u.height*+.7)&&(g.getElementsByTagName("svg")[0].setAttribute("viewBox",O.x+" "+O.y+" "+O.width+" "+O.height),g.getElementsByTagName("svg")[0].setAttribute("width",O.width/e),g.getElementsByTagName("svg")[0].setAttribute("height",O.height/m))}catch(R){}finally{document.body.removeChild(g)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(R){}return b};Graph.createRemoveIcon=function(b,e){var g=document.createElement("img");g.setAttribute("src",Dialog.prototype.clearImage);g.setAttribute("title",b);g.setAttribute("width","13");g.setAttribute("height","10");g.style.marginLeft="4px";g.style.marginBottom="-1px";g.style.cursor="pointer";mxEvent.addListener(g,"click",e);return g};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};-Graph.rewritePageLinks=function(b,e){function g(v,p){var A=v.getAttribute(p);if(null!=A){Graph.isPageLink(A)&&(A="#"+A.substring(A.indexOf(":")+1));var G=p;e&&"xlink:href"==p&&(v.removeAttribute(p),G="href");v.setAttribute(G,A)}}b=b.getElementsByTagName("a");if(null!=b)for(var m=0;m<b.length;m++)g(b[m],"href"),g(b[m],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};+Graph.rewritePageLinks=function(b,e){function g(u,p){var B=u.getAttribute(p);if(null!=B){Graph.isPageLink(B)&&(B="#"+B.substring(B.indexOf(":")+1));var H=p;e&&"xlink:href"==p&&(u.removeAttribute(p),H="href");u.setAttribute(H,B)}}b=b.getElementsByTagName("a");if(null!=b)for(var m=0;m<b.length;m++)g(b[m],"href"),g(b[m],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBackground=!1;Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeForegroundColor="light-dark(#000000, #ffffff)";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var v=g.view.graph.tolerance,p=!0,A=null,G=mxUtils.bind(this,function(P){p=!0;A=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),S=mxUtils.bind(this,function(P){p=p&&null!=A&&Math.abs(A.x-mxEvent.getClientX(P))<v&&Math.abs(A.y-mxEvent.getClientY(P))<v}),F=mxUtils.bind(this,function(P){if(p)for(var R=mxEvent.getSource(P);null!=-R&&R!=m.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,P);break}R=R.parentNode}});mxEvent.addGestureListeners(m.node,G,S,F);mxEvent.addListener(m.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var u=g.view.graph.tolerance,p=!0,B=null,H=mxUtils.bind(this,function(O){p=!0;B=new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O))}),S=mxUtils.bind(this,function(O){p=p&&null!=B&&Math.abs(B.x-mxEvent.getClientX(O))<u&&Math.abs(B.y-mxEvent.getClientY(O))<u}),G=mxUtils.bind(this,function(O){if(p)for(var R=mxEvent.getSource(O);null!=+R&&R!=m.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,O);break}R=R.parentNode}});mxEvent.addGestureListeners(m.node,H,S,G);mxEvent.addListener(m.node,"click",function(O){mxEvent.consume(O)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&this.graph.customLinkClicked(m)&&mxEvent.consume(g))}))}}this.initLayoutManager()};-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(A){return!this.isSpecialColor(A.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(A.style,"lineShape",null)&&(this.model.isVertex(A.cell)||"arrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"wire"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(A.style,-mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(A){return this.isFillState(A)&&"wire"!=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(A){return!0};Graph.prototype.getTextColor=function(A,G){for(var S=A==this.cellEditor.textarea&&G?"default":Graph.getGivenColor(A,G?"color":-"background-color");null==S&&null!=A&&A!=this.cellEditor.textarea.parentNode;)S=A==this.cellEditor.textarea&&G?"default":Graph.getGivenColor(A,"color"),A=A.parentNode;if("rgba(0, 0, 0, 0)"==S||"transparent"==S)S=mxConstants.NONE;return S};Graph.prototype.isSpecialColor=function(A){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],A)};Graph.prototype.isGlassState=function(A){A=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null);-return"label"==A||"rectangle"==A||"internalStorage"==A||"ext"==A||"umlLifeline"==A||"swimlane"==A||"process"==A};Graph.prototype.isRoundedState=function(A){return null!=A.shape?A.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(A){var G=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(A.style,mxConstants.STYLE_CURVED,!1)&&("connector"==G||"filledEdge"==G||"wire"==-G)};Graph.prototype.isAutoSizeState=function(A){return"1"==mxUtils.getValue(A.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(A){return null!=mxUtils.getValue(A.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(A){return!0};Graph.prototype.getVerticesAndEdges=function(A,G){A=null!=A?A:!0;G=null!=G?G:!0;var S=this.model;return S.filterDescendants(function(F){return A&&S.isVertex(F)||G&&S.isEdge(F)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=-function(A,G,S){A=this.getCellStyle(A).newEdgeStyle;if(null!=A){this.model.beginUpdate();try{var F=JSON.parse(A),P;for(P in F)this.setCellStyles(P,F[P],G),"edgeStyle"==P&&"elbowEdgeStyle"==F[P]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",G)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(A){for(var G={},S=0;S<A.length;S++){var F=this.view.getState(A[S]);null!=F&&this.mergeStyle(F.style,G,0==S)}return G};-Graph.prototype.mergeStyle=function(A,G,S){if(null!=A){var F={},P;for(P in A){var R=A[P];null!=R&&(F[P]=!0,null==G[P]&&S?G[P]=R:G[P]!=R&&delete G[P])}for(P in G)F[P]||delete G[P]}};Graph.prototype.getStartEditingCell=function(A,G){G=this.getCellStyle(A);G=parseInt(mxUtils.getValue(G,mxConstants.STYLE_STARTSIZE,0));this.isTable(A)&&(!this.isSwimlane(A)||0==G)&&""==this.getLabel(A)&&0<this.model.getChildCount(A)&&(A=this.model.getChildAt(A,0),G=this.getCellStyle(A),G=parseInt(mxUtils.getValue(G,mxConstants.STYLE_STARTSIZE,-0)));if(this.isTableRow(A)&&(!this.isSwimlane(A)||0==G)&&""==this.getLabel(A)&&0<this.model.getChildCount(A))for(G=0;G<this.model.getChildCount(A);G++){var S=this.model.getChildAt(A,G);if(this.isCellEditable(S)){A=S;break}}return A};Graph.prototype.copyStyle=function(A){return this.getCellStyle(A,!1)};Graph.prototype.pasteStyle=function(A,G,S,F){null!=A&&(F||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(A,function(P){return 0>mxUtils.indexOf(S,P)})),this.updateCellStyles(A,G))};Graph.prototype.copyCellStyles=-function(A,G,S,F,P,R,T){var c=!1,f=!1;if(0<A.length)for(var k=0;k<A.length&&(c=this.getModel().isVertex(A[k])||c,!(f=this.getModel().isEdge(A[k])||f)||!c);k++);else f=c=!0;c=c&&!R;f=f&&!T;for(k=0;k<G.length;k++)if(A=0<=mxUtils.indexOf(Graph.textStyles,G[k]),"strokeColor"!=G[k]||null!=S[k]&&"none"!=S[k])if(0<=mxUtils.indexOf(Graph.cellStyles,G[k])||"shape"==G[k])if("shape"!=G[k]&&(c||A)&&(null==S[k]?delete F[G[k]]:F[G[k]]=S[k]),f||A)null==S[k]?delete P[G[k]]:P[G[k]]=S[k]};Graph.prototype.includeDescendants=-function(A){for(var G=[],S=0;S<A.length;S++)G=G.concat(this.model.getDescendants(A[S]));return G};Graph.prototype.pasteCellStyles=function(A,G,S,F,P){G=null!=G?G:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var R=0;R<A.length;R++){var T=A[R],c=this.model.getStyle(T),f=!1;null!=T.style&&(pairs=T.style.split(";"),f=f||0<=mxUtils.indexOf(pairs,"text"));if(f)var k=Graph.textStyles;else if(k=Graph.cellStyles.slice(),!F)for(var B=-null!=c?c.split(";"):[],z=0;z<B.length;z++){var C=B[z],I=C.indexOf("=");if(0<=I){var L=C.substring(0,I),K=mxUtils.indexOf(k,L);0<=K&&k.splice(K,1);for(f=0;f<Graph.cellStyleGroups.length;f++){var O=Graph.cellStyleGroups[f];if(0<=mxUtils.indexOf(O,L))for(var da=0;da<O.length;da++){var ea=mxUtils.indexOf(k,O[da]);0<=ea&&k.splice(ea,1)}}}}var ca=this.model.isEdge(T);f=ca?S:G;for(z=0;z<k.length;z++){L=k[z];var V=f[L];null!=V&&("edgeStyle"!=L||P)&&(ca||!ca&&0>mxUtils.indexOf(Graph.edgeStyles,L))&&(c=mxUtils.setStyle(c,-L,V),"fontFamily"==L&&null==f.fontSource&&(c=mxUtils.setStyle(c,"fontSource",null)),ca&&"rounded"==L&&"1"==V&&null==f.curved&&(c=mxUtils.setStyle(c,"curved",null)))}Editor.simpleLabels&&(c=mxUtils.setStyle(mxUtils.setStyle(c,"html",null),"whiteSpace",null));this.model.setStyle(T,c)}}finally{this.model.endUpdate()}return A};Graph.prototype.updateCellStyles=function(A,G){this.model.beginUpdate();try{for(var S=0;S<G.length;S++)if(this.model.isVertex(G[S])||this.model.isEdge(G[S])){var F=this.getCellStyle(G[S],-!1),P=F[mxConstants.STYLE_PERIMETER],R=!1;for(c in A){var T=A[c];if(F[c]!=T){if(c==mxConstants.STYLE_SHAPE&&"umlLifeline"==F[c]&&"umlLifeline"!=T){R=!0;var c="participant"}this.setCellStyles(c,T,[G[S]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[G[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=-function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(A,G,S,F,P,R){this.useCssTransforms&&(A=A/this.currentScale-this.currentTranslate.x,G=G/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(A,G,S,F,P,R){F=null!=F?F:!0;P=null!=P?P:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var T=-this.model.getChildCount(S)-1;0<=T;T--){var c=this.model.getChildAt(S,T),f=this.getScaledCellAt(A,G,c,F,P,R);if(null!=f)return f;if(this.isCellVisible(c)&&(P&&this.model.isEdge(c)||F&&this.model.isVertex(c))&&(f=this.view.getState(c),null!=f&&(null==R||!R(f,A,G))&&this.intersects(f,A,G)))return c}return null};Graph.prototype.isRecursiveVertexResize=function(A){return!this.isSwimlane(A.cell)&&0<this.model.getChildCount(A.cell)&&!this.isCellCollapsed(A.cell)&&"1"==mxUtils.getValue(A.style,"recursiveResize",-"1")&&null==mxUtils.getValue(A.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(A){for(var G=this.getCellGeometry(A);null!=G&&G.relative;)A=this.getModel().getParent(A),G=this.getCellGeometry(A);return A};Graph.prototype.isPart=function(A){return"1"==mxUtils.getValue(this.getCurrentCellStyle(A),"part","0")||this.isTableCell(A)||this.isTableRow(A)};Graph.prototype.getCompositeParents=function(A){for(var G=new mxDictionary,S=[],F=0;F<A.length;F++){var P=this.getCompositeParent(A[F]);-this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));null==P||G.get(P)||(G.put(P,!0),S.push(P))}return S};Graph.prototype.getReferenceTerminal=function(A){if(null!=A){var G=this.getCellGeometry(A);null!=G&&G.relative&&(A=this.model.getParent(A))}null!=A&&this.model.isEdge(A)&&(A=this.model.getParent(A));null!=A&&(A=this.getCompositeParent(A));return A};Graph.prototype.getCompositeParent=function(A){for(;this.isPart(A);){var G=this.model.getParent(A);-if(!this.model.isVertex(G))break;A=G}return A};Graph.prototype.filterSelectionCells=function(A){var G=this.getSelectionCells();if(null!=A){for(var S=[],F=0;F<G.length;F++)A(G[F])||S.push(G[F]);G=S}return G};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(A){if(this.useCssTransforms){var G=this.currentScale,S=this.currentTranslate;A=new mxRectangle((A.x+2*S.x)*G-S.x,(A.y+2*S.y)*G-S.y,A.width*G,A.height*G)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=-function(A){A=this.strokeWidth;this.graph.useCssTransforms&&(A/=this.graph.currentScale);return A};mxGraphView.prototype.getGraphBounds=function(){var A=this.graphBounds;if(this.graph.useCssTransforms){var G=this.graph.currentTranslate,S=this.graph.currentScale;A=new mxRectangle((A.x+G.x)*S,(A.y+G.y)*S,A.width*S,A.height*S)}return A};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;-mxGraphView.prototype.validate=function(A){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);e.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 g=mxGraph.prototype.getCellsForGroup;-Graph.prototype.getCellsForGroup=function(A){A=g.apply(this,arguments);for(var G=[],S=0;S<A.length;S++)this.isTableRow(A[S])||this.isTableCell(A[S])||G.push(A[S]);return G};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(A){A=m.apply(this,arguments);for(var G=[],S=0;S<A.length;S++)this.isTable(A[S])||this.isTableRow(A[S])||this.isTableCell(A[S])||G.push(A[S]);return G};Graph.prototype.updateCssTransform=function(){var A=this.view.getDrawPane();if(null!=A)if(A=-A.parentNode,this.useCssTransforms){var G=A.getAttribute("transform");A.setAttribute("transformOrigin","0 0");var S=Math.round(100*this.currentScale)/100;A.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");G!=A.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",A.getAttribute("transform"))}else A.removeAttribute("transformOrigin"),A.removeAttribute("transform")};-var v=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var A=this.graph.useCssTransforms,G=this.scale,S=this.translate;A&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);v.apply(this,arguments);A&&(this.scale=G,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(A,G,S){var F=this.useCssTransforms,P=this.view.scale,R=this.view.translate;F&&(this.view.scale=1,this.view.translate=-new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);F&&(this.view.scale=P,this.view.translate=R,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(B){return!this.isSpecialColor(B.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(B.style,"lineShape",null)&&(this.model.isVertex(B.cell)||"arrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"wire"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(B.style,+mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(B){return this.isFillState(B)&&"wire"!=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(B){return!0};Graph.prototype.getTextColor=function(B,H){for(var S=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,H?"color":+"background-color");null==S&&null!=B&&B!=this.cellEditor.textarea.parentNode;)S=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,"color"),B=B.parentNode;if("rgba(0, 0, 0, 0)"==S||"transparent"==S)S=mxConstants.NONE;return S};Graph.prototype.isSpecialColor=function(B){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],B)};Graph.prototype.isGlassState=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);+return"label"==B||"rectangle"==B||"internalStorage"==B||"ext"==B||"umlLifeline"==B||"swimlane"==B||"process"==B};Graph.prototype.isRoundedState=function(B){return null!=B.shape?B.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(B){var H=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(B.style,mxConstants.STYLE_CURVED,!1)&&("connector"==H||"filledEdge"==H||"wire"==+H)};Graph.prototype.isAutoSizeState=function(B){return"1"==mxUtils.getValue(B.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(B){return null!=mxUtils.getValue(B.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(B){return!0};Graph.prototype.getVerticesAndEdges=function(B,H){B=null!=B?B:!0;H=null!=H?H:!0;var S=this.model;return S.filterDescendants(function(G){return B&&S.isVertex(G)||H&&S.isEdge(G)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=+function(B,H,S){B=this.getCellStyle(B).newEdgeStyle;if(null!=B){this.model.beginUpdate();try{var G=JSON.parse(B),O;for(O in G)this.setCellStyles(O,G[O],H),"edgeStyle"==O&&"elbowEdgeStyle"==G[O]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",H)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(B){for(var H={},S=0;S<B.length;S++){var G=this.view.getState(B[S]);null!=G&&this.mergeStyle(G.style,H,0==S)}return H};+Graph.prototype.mergeStyle=function(B,H,S){if(null!=B){var G={},O;for(O in B){var R=B[O];null!=R&&(G[O]=!0,null==H[O]&&S?H[O]=R:H[O]!=R&&delete H[O])}for(O in H)G[O]||delete H[O]}};Graph.prototype.getStartEditingCell=function(B,H){H=this.getCellStyle(B);H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0));this.isTable(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B)&&(B=this.model.getChildAt(B,0),H=this.getCellStyle(B),H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,+0)));if(this.isTableRow(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B))for(H=0;H<this.model.getChildCount(B);H++){var S=this.model.getChildAt(B,H);if(this.isCellEditable(S)){B=S;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,H,S,G){null!=B&&(G||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(O){return 0>mxUtils.indexOf(S,O)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=+function(B,H,S,G,O,R,c){var f=!1,l=!1;if(0<B.length)for(var t=0;t<B.length&&(f=this.getModel().isVertex(B[t])||f,!(l=this.getModel().isEdge(B[t])||l)||!f);t++);else l=f=!0;f=f&&!R;l=l&&!c;for(t=0;t<H.length;t++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[t]),"strokeColor"!=H[t]||null!=S[t]&&"none"!=S[t])if(0<=mxUtils.indexOf(Graph.cellStyles,H[t])||"shape"==H[t])if("shape"!=H[t]&&(f||B)&&(null==S[t]?delete G[H[t]]:G[H[t]]=S[t]),l||B)null==S[t]?delete O[H[t]]:O[H[t]]=S[t]};Graph.prototype.includeDescendants=+function(B){for(var H=[],S=0;S<B.length;S++)H=H.concat(this.model.getDescendants(B[S]));return H};Graph.prototype.pasteCellStyles=function(B,H,S,G,O){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;O=null!=O?O:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var R=0;R<B.length;R++){var c=B[R],f=this.model.getStyle(c),l=!1;null!=c.style&&(pairs=c.style.split(";"),l=l||0<=mxUtils.indexOf(pairs,"text"));if(l)var t=Graph.textStyles;else if(t=Graph.cellStyles.slice(),!G)for(var z=+null!=f?f.split(";"):[],C=0;C<z.length;C++){var F=z[C],N=F.indexOf("=");if(0<=N){var K=F.substring(0,N),I=mxUtils.indexOf(t,K);0<=I&&t.splice(I,1);for(l=0;l<Graph.cellStyleGroups.length;l++){var ca=Graph.cellStyleGroups[l];if(0<=mxUtils.indexOf(ca,K))for(var da=0;da<ca.length;da++){var ea=mxUtils.indexOf(t,ca[da]);0<=ea&&t.splice(ea,1)}}}}var X=this.model.isEdge(c);l=X?S:H;for(C=0;C<t.length;C++){K=t[C];var ba=l[K];null!=ba&&("edgeStyle"!=K||O)&&(X||!X&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(f=+mxUtils.setStyle(f,K,ba),"fontFamily"==K&&null==l.fontSource&&(f=mxUtils.setStyle(f,"fontSource",null)),X&&"rounded"==K&&"1"==ba&&null==l.curved&&(f=mxUtils.setStyle(f,"curved",null)))}Editor.simpleLabels&&(f=mxUtils.setStyle(mxUtils.setStyle(f,"html",null),"whiteSpace",null));this.model.setStyle(c,f)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,H){this.model.beginUpdate();try{for(var S=0;S<H.length;S++)if(this.model.isVertex(H[S])||this.model.isEdge(H[S])){var G=+this.getCellStyle(H[S],!1),O=G[mxConstants.STYLE_PERIMETER],R=!1;for(f in B){var c=B[f];if(G[f]!=c){if(f==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[f]&&"umlLifeline"!=c){R=!0;var f="participant"}this.setCellStyles(f,c,[H[S]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,O,[H[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};+Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(B,H,S,G,O,R){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,H,S,G,O,R){G=null!=G?G:!0;O=null!=O?O:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));+if(null!=S)for(var c=this.model.getChildCount(S)-1;0<=c;c--){var f=this.model.getChildAt(S,c),l=this.getScaledCellAt(B,H,f,G,O,R);if(null!=l)return l;if(this.isCellVisible(f)&&(O&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(l=this.view.getState(f),null!=l&&(null==R||!R(l,B,H))&&this.intersects(l,B,H)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(B){return!this.isSwimlane(B.cell)&&0<this.model.getChildCount(B.cell)&&!this.isCellCollapsed(B.cell)&&"1"==mxUtils.getValue(B.style,+"recursiveResize","1")&&null==mxUtils.getValue(B.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(B){for(var H=this.getCellGeometry(B);null!=H&&H.relative;)B=this.getModel().getParent(B),H=this.getCellGeometry(B);return B};Graph.prototype.isPart=function(B){return"1"==mxUtils.getValue(this.getCurrentCellStyle(B),"part","0")||this.isTableCell(B)||this.isTableRow(B)};Graph.prototype.getCompositeParents=function(B){for(var H=new mxDictionary,S=[],G=0;G<B.length;G++){var O=this.getCompositeParent(B[G]);+this.isTableCell(O)&&(O=this.graph.model.getParent(O));this.isTableRow(O)&&(O=this.graph.model.getParent(O));null==O||H.get(O)||(H.put(O,!0),S.push(O))}return S};Graph.prototype.getReferenceTerminal=function(B){if(null!=B){var H=this.getCellGeometry(B);null!=H&&H.relative&&(B=this.model.getParent(B))}null!=B&&this.model.isEdge(B)&&(B=this.model.getParent(B));null!=B&&(B=this.getCompositeParent(B));return B};Graph.prototype.getCompositeParent=function(B){for(;this.isPart(B);){var H=this.model.getParent(B);+if(!this.model.isVertex(H))break;B=H}return B};Graph.prototype.filterSelectionCells=function(B){var H=this.getSelectionCells();if(null!=B){for(var S=[],G=0;G<H.length;G++)B(H[G])||S.push(H[G]);H=S}return H};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(B){if(this.useCssTransforms){var H=this.currentScale,S=this.currentTranslate;B=new mxRectangle((B.x+2*S.x)*H-S.x,(B.y+2*S.y)*H-S.y,B.width*H,B.height*H)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=+function(B){B=this.strokeWidth;this.graph.useCssTransforms&&(B/=this.graph.currentScale);return B};mxGraphView.prototype.getGraphBounds=function(){var B=this.graphBounds;if(this.graph.useCssTransforms){var H=this.graph.currentTranslate,S=this.graph.currentScale;B=new mxRectangle((B.x+H.x)*S,(B.y+H.y)*S,B.width*S,B.height*S)}return B};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;+mxGraphView.prototype.validate=function(B){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);e.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 g=mxGraph.prototype.getCellsForGroup;+Graph.prototype.getCellsForGroup=function(B){B=g.apply(this,arguments);for(var H=[],S=0;S<B.length;S++)this.isTableRow(B[S])||this.isTableCell(B[S])||H.push(B[S]);return H};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(B){B=m.apply(this,arguments);for(var H=[],S=0;S<B.length;S++)this.isTable(B[S])||this.isTableRow(B[S])||this.isTableCell(B[S])||H.push(B[S]);return H};Graph.prototype.updateCssTransform=function(){var B=this.view.getDrawPane();if(null!=B)if(B=+B.parentNode,this.useCssTransforms){var H=B.getAttribute("transform");B.setAttribute("transformOrigin","0 0");var S=Math.round(100*this.currentScale)/100;B.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");H!=B.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",B.getAttribute("transform"))}else B.removeAttribute("transformOrigin"),B.removeAttribute("transform")};+var u=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph.useCssTransforms,H=this.scale,S=this.translate;B&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);u.apply(this,arguments);B&&(this.scale=H,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.useCssTransforms,O=this.view.scale,R=this.view.translate;G&&(this.view.scale=1,this.view.translate=+new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);G&&(this.view.scale=O,this.view.translate=R,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,g){var m=e.getAttribute("href");m!=Graph.sanitizeLink(m)&&Graph.sanitizeNode(e);if(null!=m&&!this.isCustomLink(m)&&(mxEvent.isLeftMouseButton(g)&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(m)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(m),b);mxEvent.consume(g)}};-Graph.prototype.openLink=function(b,e,g){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var v=b.split("#")[1];window.location.hash=="#"+v&&(window.location.hash="");window.location.hash=v}else m=window.open(b,null!=e?e:"_blank",g?null:"noopener,noreferrer"),null==m||g||(m.opener=null)}catch(p){}return m};+Graph.prototype.openLink=function(b,e,g){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var u=b.split("#")[1];window.location.hash=="#"+u&&(window.location.hash="");window.location.hash=u}else m=window.open(b,null!=e?e:"_blank",g?null:"noopener,noreferrer"),null==m||g||(m.opener=null)}catch(p){}return m};Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b,e){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,e){var g=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(e!=mxEvent.BEGIN_UPDATE||this.hasLayout(g,e))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return e=new mxStackLayout(this.graph,!0),e.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",@@ -2389,16 +2388,16 @@ b.childLayout)return e=new mxCompactTreeLayout(this.graph),e.horizontal="1"==mxU"flowOrientation",mxConstants.DIRECTION_EAST)),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.parentBorder=mxUtils.getValue(b,"parentPadding",20),e.maintainParentLocation=!0,e.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),e.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),e.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),e.parallelEdgeSpacing=mxUtils.getValue(b,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),e;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==String(b.childLayout).charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(m){null!=window.console&&console.error(m)}}return null}};-Graph.prototype.createLayouts=function(b){for(var e=[],g=0;g<b.length;g++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[g].layout)){var m="mxOrgChartLayout"==b[g].layout&&null!=b[g].config?new window[b[g].layout](this,b[g].config.branchOptimizer):new window[b[g].layout](this);if(null!=b[g].config)for(var v in b[g].config)if("mxOrgChartLayout"!=b[g].layout||"branchOptimizer"!=v)m[v]=b[g].config[v];e.push(m)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[g].layout]));return e};-Graph.prototype.getDataForCells=function(b,e){for(var g=[],m=0;m<b.length;m++){var v={};v.id=b[m].id;var p=null!=b[m].value?b[m].value.attributes:null;this.isReplacePlaceholders(b[m])&&e&&(v.value=this.getLabel(b[m]));if(null!=p)for(var A=0;A<p.length;A++)v[p[A].nodeName]=p[A].nodeValue;else v.label=this.convertValueToString(b[m]);g.push(v)}return g};-Graph.prototype.getNodesForCells=function(b){for(var e=[],g=0;g<b.length;g++){var m=this.view.getState(b[g]);if(null!=m){for(var v=this.cellRenderer.getShapesForState(m),p=0;p<v.length;p++)null!=v[p]&&null!=v[p].node&&e.push(v[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};-Graph.prototype.createWipeAnimations=function(b,e){for(var g=[],m=0;m<b.length;m++){var v=this.view.getState(b[m]);null!=v&&null!=v.shape&&(this.model.isEdge(v.cell)&&null!=v.absolutePoints&&1<v.absolutePoints.length?g.push(this.createEdgeWipeAnimation(v,e)):this.model.isVertex(v.cell)&&null!=v.shape.bounds&&g.push(this.createVertexWipeAnimation(v,e)))}return g};-Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,v=b.length,p=g.length;return{execute:mxUtils.bind(this,function(A,G){if(null!=b.shape){var S=[g[0]];G=A/G;e||(G=1-G);for(var F=v*G,P=1;P<p;P++)if(F<=m[P-1]){S.push(new mxPoint(g[P-1].x+(g[P].x-g[P-1].x)*F/m[P-1],g[P-1].y+(g[P].y-g[P-1].y)*F/m[P-1]));break}else F-=m[P-1],S.push(g[P]);b.shape.points=S;b.shape.redraw();0==A&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=-b.text.node&&(b.text.node.style.opacity=G)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};-Graph.prototype.createVertexWipeAnimation=function(b,e){var g=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,v){null!=b.shape&&(v=m/v,e||(v=1-v),b.shape.bounds=new mxRectangle(g.x,g.y,g.width*v,g.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=v))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,g,m){g=null!=g?g:30;m=null!=m?m:30;var v=null,p=0,A=mxUtils.bind(this,function(){if(p==g||this.stoppingCustomActions){window.clearInterval(v);for(var G=0;G<b.length;G++)b[G].stop();null!=e&&e()}else for(G=0;G<b.length;G++)b[G].execute(p,g);p++});v=window.setInterval(A,m);A()};+Graph.prototype.createLayouts=function(b){for(var e=[],g=0;g<b.length;g++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[g].layout)){var m="mxOrgChartLayout"==b[g].layout&&null!=b[g].config?new window[b[g].layout](this,b[g].config.branchOptimizer):new window[b[g].layout](this);if(null!=b[g].config)for(var u in b[g].config)if("mxOrgChartLayout"!=b[g].layout||"branchOptimizer"!=u)m[u]=b[g].config[u];e.push(m)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[g].layout]));return e};+Graph.prototype.getDataForCells=function(b,e){for(var g=[],m=0;m<b.length;m++){var u={};u.id=b[m].id;var p=null!=b[m].value?b[m].value.attributes:null;this.isReplacePlaceholders(b[m])&&e&&(u.value=this.getLabel(b[m]));if(null!=p)for(var B=0;B<p.length;B++)u[p[B].nodeName]=p[B].nodeValue;else u.label=this.convertValueToString(b[m]);g.push(u)}return g};+Graph.prototype.getNodesForCells=function(b){for(var e=[],g=0;g<b.length;g++){var m=this.view.getState(b[g]);if(null!=m){for(var u=this.cellRenderer.getShapesForState(m),p=0;p<u.length;p++)null!=u[p]&&null!=u[p].node&&e.push(u[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};+Graph.prototype.createWipeAnimations=function(b,e){for(var g=[],m=0;m<b.length;m++){var u=this.view.getState(b[m]);null!=u&&null!=u.shape&&(this.model.isEdge(u.cell)&&null!=u.absolutePoints&&1<u.absolutePoints.length?g.push(this.createEdgeWipeAnimation(u,e)):this.model.isVertex(u.cell)&&null!=u.shape.bounds&&g.push(this.createVertexWipeAnimation(u,e)))}return g};+Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,u=b.length,p=g.length;return{execute:mxUtils.bind(this,function(B,H){if(null!=b.shape){var S=[g[0]];H=B/H;e||(H=1-H);for(var G=u*H,O=1;O<p;O++)if(G<=m[O-1]){S.push(new mxPoint(g[O-1].x+(g[O].x-g[O-1].x)*G/m[O-1],g[O-1].y+(g[O].y-g[O-1].y)*G/m[O-1]));break}else G-=m[O-1],S.push(g[O]);b.shape.points=S;b.shape.redraw();0==B&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=+b.text.node&&(b.text.node.style.opacity=H)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};+Graph.prototype.createVertexWipeAnimation=function(b,e){var g=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,u){null!=b.shape&&(u=m/u,e||(u=1-u),b.shape.bounds=new mxRectangle(g.x,g.y,g.width*u,g.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=u))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,g,m){g=null!=g?g:30;m=null!=m?m:30;var u=null,p=0,B=mxUtils.bind(this,function(){if(p==g||this.stoppingCustomActions){window.clearInterval(u);for(var H=0;H<b.length;H++)b[H].stop();null!=e&&e()}else for(H=0;H<b.length;H++)b[H].execute(p,g);p++});u=window.setInterval(B,m);B()};Graph.prototype.getPageSize=function(){return this.pageVisible&&null!=this.pageFormat?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};-Graph.prototype.getPageLayout=function(b,e,g){b=null!=b?b:this.getGraphBounds();e=null!=e?e:this.view.translate;g=null!=g?g:this.view.scale;var m=this.getPageSize();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var v=Math.floor(Math.ceil(b.x/g-e.x)/m.width),p=Math.floor(Math.ceil(b.y/g-e.y)/m.height);return new mxRectangle(v,p,Math.ceil((Math.floor((b.x+b.width)/g)-e.x)/m.width)-v,Math.ceil((Math.floor((b.y+b.height)/g)-e.y)/m.height)-p)};+Graph.prototype.getPageLayout=function(b,e,g){b=null!=b?b:this.getGraphBounds();e=null!=e?e:this.view.translate;g=null!=g?g:this.view.scale;var m=this.getPageSize();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var u=Math.floor(Math.ceil(b.x/g-e.x)/m.width),p=Math.floor(Math.ceil(b.y/g-e.y)/m.height);return new mxRectangle(u,p,Math.ceil((Math.floor((b.x+b.width)/g)-e.x)/m.width)-u,Math.ceil((Math.floor((b.y+b.height)/g)-e.y)/m.height)-p)};Graph.prototype.getDefaultTranslate=function(b){var e=this.getPagePadding(),g=this.getPageSize();return new mxPoint(e.x-b.x*g.width,e.y-b.y*g.height)};Graph.prototype.updateMinimumSize=function(){var b=this.getPageLayout(),e=this.getPagePadding(),g=this.getPageSize(),m=Math.ceil(2*e.x+b.width*g.width);b=Math.ceil(2*e.y+b.height*g.height);if(null==this.minimumGraphSize||this.minimumGraphSize.width!=m||this.minimumGraphSize.height!=b)this.minimumGraphSize=new mxRectangle(0,0,m,b)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var g=this.model.cells[e];this.isReplacePlaceholders(g)&&(this.view.invalidate(g,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};Graph.prototype.isZoomWheelEvent=function(b){return Graph.zoomWheel&&!mxEvent.isShiftDown(b)&&!mxEvent.isMetaDown(b)&&!mxEvent.isAltDown(b)&&(!mxEvent.isControlDown(b)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(b)||mxEvent.isControlDown(b))};Graph.prototype.isScrollWheelEvent=function(b){return!this.isZoomWheelEvent(b)};Graph.prototype.isTransparentClickEvent=function(b){return mxEvent.isAltDown(b)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};@@ -2407,33 +2406,33 @@ Graph.prototype.isSplitTarget=function(b,e,g){return!this.model.isEdge(e[0])&&!mGraph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(e,"labelMovable","0")))};Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};Graph.prototype.formatDate=function(b,e,g){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,v=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,A=function(z,C){z=String(z);for(C=C||2;z.length<C;)z="0"+z;return z};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var G=g?"getUTC":"get",S=b[G+"Date"](),F=b[G+"Day"](),P=b[G+"Month"](),R=b[G+"FullYear"](),T=b[G+"Hours"](),c=b[G+"Minutes"](),f=b[G+"Seconds"]();G=b[G+"Milliseconds"]();var k=g?0:b.getTimezoneOffset(),B={d:S,dd:A(S),ddd:m.i18n.dayNames[F],dddd:m.i18n.dayNames[F+7],m:P+1,mm:A(P+1),mmm:m.i18n.monthNames[P],mmmm:m.i18n.monthNames[P+-12],yy:String(R).slice(2),yyyy:R,h:T%12||12,hh:A(T%12||12),H:T,HH:A(T),M:c,MM:A(c),s:f,ss:A(f),l:A(G,3),L:A(99<G?Math.round(G/10):G),t:12>T?"a":"p",tt:12>T?"am":"pm",T:12>T?"A":"P",TT:12>T?"AM":"PM",Z:g?"UTC":(String(b).match(v)||[""]).pop().replace(p,""),o:(0<k?"-":"+")+A(100*Math.floor(Math.abs(k)/60)+Math.abs(k)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(z){return z in B?B[z]:z.slice(1,-z.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){e=this.getLayerForCell(b[0]);for(var g=1;g<b.length;g++)if(!this.model.isAncestor(e,b[g])){e=null;break}}return e};-Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),v=m.getChildCount(m.root),p=0;p<v;p++)mxUtils.bind(this,function(A){function G(){m.isVisible(A)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(F,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(F,25))}var S=this.convertValueToString(A)||mxResources.get("background")||"Background",F=document.createElement("div");F.style.overflow=-"hidden";F.style.textOverflow="ellipsis";F.style.padding="2px";F.style.whiteSpace="nowrap";F.style.cursor="pointer";F.setAttribute("title",mxResources.get(m.isVisible(A)?"hideIt":"show",[S]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";e&&(P.style.filter="invert(100%)",P.style.top="-2px");F.appendChild(P);mxUtils.write(F,S);g.appendChild(F);-mxEvent.addListener(F,"click",function(){m.setVisible(A,!m.isVisible(A));G();null!=b&&b(A)});G()})(m.getChildAt(m.root,p));return g};-Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var v=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var A=null;if(match.index>v&&"%"==e.charAt(match.index-1))A=p.substring(1);else{var G=p.substring(1,p.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==G)A=b.id;else if("width"===G.substring(0,5)&&this.model.isVertex(b)){var F=this.getCellGeometry(b);-null!=F&&(A=F.width,5<G.length&&(A=Editor.toUnit(A,S[G.substring(6)])))}else if("height"==G.substring(0,6)&&this.model.isVertex(b))F=this.getCellGeometry(b),null!=F&&(A=F.height,6<G.length&&(A=Editor.toUnit(A,S[G.substring(7)])));else if("length"==G.substring(0,6)){for(F=b;null!=F&&!this.model.isEdge(F);)F=this.model.getParent(F);F=this.view.getState(F);null!=F&&(A=Math.round(F.length/this.view.scale),6<G.length&&(A=Editor.toUnit(A,S[G.substring(7)])))}else if(0>G.indexOf("{"))for(S=b;null==A&&null!=-S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(A=S.getAttribute(G+"_"+Graph.diagramLanguage)),null==A&&(A=S.hasAttribute(G)?null!=S.getAttribute(G)?S.getAttribute(G):"":null)),S=this.model.getParent(S);null==A&&(A=this.getGlobalVariable(G));null==A&&null!=g&&(A=g[G])}m.push(e.substring(v,match.index)+(null!=A?A:p));v=match.index+p.length}}m.push(e.substring(v))}return m.join("")};+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,u=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,B=function(C,F){C=String(C);for(F=F||2;C.length<F;)C="0"+C;return C};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var H=g?"getUTC":"get",S=b[H+"Date"](),G=b[H+"Day"](),O=b[H+"Month"](),R=b[H+"FullYear"](),c=b[H+"Hours"](),f=b[H+"Minutes"](),l=b[H+"Seconds"]();H=b[H+"Milliseconds"]();var t=g?0:b.getTimezoneOffset(),z={d:S,dd:B(S),ddd:m.i18n.dayNames[G],dddd:m.i18n.dayNames[G+7],m:O+1,mm:B(O+1),mmm:m.i18n.monthNames[O],mmmm:m.i18n.monthNames[O++12],yy:String(R).slice(2),yyyy:R,h:c%12||12,hh:B(c%12||12),H:c,HH:B(c),M:f,MM:B(f),s:l,ss:B(l),l:B(H,3),L:B(99<H?Math.round(H/10):H),t:12>c?"a":"p",tt:12>c?"am":"pm",T:12>c?"A":"P",TT:12>c?"AM":"PM",Z:g?"UTC":(String(b).match(u)||[""]).pop().replace(p,""),o:(0<t?"-":"+")+B(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in z?z[C]:C.slice(1,+C.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){e=this.getLayerForCell(b[0]);for(var g=1;g<b.length;g++)if(!this.model.isAncestor(e,b[g])){e=null;break}}return e};+Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),u=m.getChildCount(m.root),p=0;p<u;p++)mxUtils.bind(this,function(B){function H(){m.isVisible(B)?(O.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(O.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var S=this.convertValueToString(B)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=+"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(m.isVisible(B)?"hideIt":"show",[S]));var O=document.createElement("img");O.setAttribute("draggable","false");O.setAttribute("align","absmiddle");O.setAttribute("border","0");O.style.position="relative";O.style.width="16px";O.style.padding="0px 6px 0 4px";e&&(O.style.filter="invert(100%)",O.style.top="-2px");G.appendChild(O);mxUtils.write(G,S);g.appendChild(G);+mxEvent.addListener(G,"click",function(){m.setVisible(B,!m.isVisible(B));H();null!=b&&b(B)});H()})(m.getChildAt(m.root,p));return g};+Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var u=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var B=null;if(match.index>u&&"%"==e.charAt(match.index-1))B=p.substring(1);else{var H=p.substring(1,p.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==H)B=b.id;else if("width"===H.substring(0,5)&&this.model.isVertex(b)){var G=this.getCellGeometry(b);+null!=G&&(B=G.width,5<H.length&&(B=Editor.toUnit(B,S[H.substring(6)])))}else if("height"==H.substring(0,6)&&this.model.isVertex(b))G=this.getCellGeometry(b),null!=G&&(B=G.height,6<H.length&&(B=Editor.toUnit(B,S[H.substring(7)])));else if("length"==H.substring(0,6)){for(G=b;null!=G&&!this.model.isEdge(G);)G=this.model.getParent(G);G=this.view.getState(G);null!=G&&(B=Math.round(G.length/this.view.scale),6<H.length&&(B=Editor.toUnit(B,S[H.substring(7)])))}else if(0>H.indexOf("{"))for(S=b;null==B&&null!=+S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(B=S.getAttribute(H+"_"+Graph.diagramLanguage)),null==B&&(B=S.hasAttribute(H)?null!=S.getAttribute(H)?S.getAttribute(H):"":null)),S=this.model.getParent(S);null==B&&(B=this.getGlobalVariable(H));null==B&&null!=g&&(B=g[H])}m.push(e.substring(u,match.index)+(null!=B?B:p));u=match.index+p.length}}m.push(e.substring(u))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],g=0;g<b.length;g++){var m=this.model.getCell(b[g].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};-Graph.prototype.selectTableRange=function(b,e){var g=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),v=this.model.getParent(m),p=this.model.getParent(e);if(v==this.model.getParent(p)){b=m.getIndex(b);m=v.getIndex(m);var A=p.getIndex(e),G=v.getIndex(p);p=Math.max(m,G);e=Math.min(b,A);b=Math.max(b,A);A=[];for(m=Math.min(m,G);m<=p;m++){G=this.model.getChildAt(v,m);for(var S=e;S<=b;S++)A.push(this.model.getChildAt(G,S))}0<A.length&&(1<A.length||1<this.getSelectionCount()||-!this.isCellSelected(A[0]))&&(this.setSelectionCells(A),g=!0)}}return g};-Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var g=0;g<b.length;g++){var m=b[g],v=this.getCellGeometry(m);if(null!=v){v=v.clone();if(this.getModel().isVertex(m))v.x=Math.round(v.x/e)*e,v.y=Math.round(v.y/e)*e,v.width=Math.round(v.width/e)*e,v.height=Math.round(v.height/e)*e;else if(this.getModel().isEdge(m)&&null!=v.points)for(var p=0;p<v.points.length;p++)v.points[p].x=Math.round(v.points[p].x/e)*e,v.points[p].y=Math.round(v.points[p].y/e)*e;this.getModel().setGeometry(m,-v)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var e=this.model.getChildCount(b);0<=e;e--)this.model.remove(this.model.getChildAt(b,e))}finally{this.model.endUpdate()}};-Graph.prototype.updateShapes=function(b,e,g){this.model.beginUpdate();try{var m=this.model.getStyle(b),v=g?this.stylesheet.getCellStyle(m,{},!1):null;null!=v&&null==v[mxConstants.STYLE_SHAPE]&&(this.model.isVertex(b)?v[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultVertexStyle()[mxConstants.STYLE_SHAPE]:this.model.isEdge(b)&&(v[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultEdgeStyle()[mxConstants.STYLE_SHAPE]));for(var p=0;p<e.length;p++){if(this.model.isVertex(b)&&this.model.isVertex(e[p])||-this.model.isEdge(b)&&this.model.isEdge(e[p]))if(g){var A=this.model.getStyle(e[p]);if(null!=A){var G=A.split(";");0<G.length&&0>G[0].indexOf("=")&&(G=G.slice(1));this.model.setStyle(e[p],G.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[e[p]]);this.setCellStyles("points",null,[e[p]]);this.pasteStyle(v,[e[p]],null,!0)}else v=this.copyStyle(e[p]),this.model.setStyle(e[p],m),this.pasteStyle(v,[e[p]]);"1"==mxUtils.getValue(this.getCellStyle(e[p],!1),"composite","0")&&this.removeChildCells(e[p])}}finally{this.model.endUpdate()}};+Graph.prototype.selectTableRange=function(b,e){var g=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),u=this.model.getParent(m),p=this.model.getParent(e);if(u==this.model.getParent(p)){b=m.getIndex(b);m=u.getIndex(m);var B=p.getIndex(e),H=u.getIndex(p);p=Math.max(m,H);e=Math.min(b,B);b=Math.max(b,B);B=[];for(m=Math.min(m,H);m<=p;m++){H=this.model.getChildAt(u,m);for(var S=e;S<=b;S++)B.push(this.model.getChildAt(H,S))}0<B.length&&(1<B.length||1<this.getSelectionCount()||+!this.isCellSelected(B[0]))&&(this.setSelectionCells(B),g=!0)}}return g};+Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var g=0;g<b.length;g++){var m=b[g],u=this.getCellGeometry(m);if(null!=u){u=u.clone();if(this.getModel().isVertex(m))u.x=Math.round(u.x/e)*e,u.y=Math.round(u.y/e)*e,u.width=Math.round(u.width/e)*e,u.height=Math.round(u.height/e)*e;else if(this.getModel().isEdge(m)&&null!=u.points)for(var p=0;p<u.points.length;p++)u.points[p].x=Math.round(u.points[p].x/e)*e,u.points[p].y=Math.round(u.points[p].y/e)*e;this.getModel().setGeometry(m,+u)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var e=this.model.getChildCount(b);0<=e;e--)this.model.remove(this.model.getChildAt(b,e))}finally{this.model.endUpdate()}};+Graph.prototype.updateShapes=function(b,e,g){this.model.beginUpdate();try{var m=this.model.getStyle(b),u=g?this.stylesheet.getCellStyle(m,{},!1):null;null!=u&&null==u[mxConstants.STYLE_SHAPE]&&(this.model.isVertex(b)?u[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultVertexStyle()[mxConstants.STYLE_SHAPE]:this.model.isEdge(b)&&(u[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultEdgeStyle()[mxConstants.STYLE_SHAPE]));for(var p=0;p<e.length;p++){if(this.model.isVertex(b)&&this.model.isVertex(e[p])||+this.model.isEdge(b)&&this.model.isEdge(e[p]))if(g){var B=this.model.getStyle(e[p]);if(null!=B){var H=B.split(";");0<H.length&&0>H[0].indexOf("=")&&(H=H.slice(1));this.model.setStyle(e[p],H.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[e[p]]);this.setCellStyles("points",null,[e[p]]);this.pasteStyle(u,[e[p]],null,!0)}else u=this.copyStyle(e[p]),this.model.setStyle(e[p],m),this.pasteStyle(u,[e[p]]);"1"==mxUtils.getValue(this.getCellStyle(e[p],!1),"composite","0")&&this.removeChildCells(e[p])}}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,m,v,p,A,G){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),F=S?b:this.getCompositeParent(b),P=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?(P.x+=F.geometry.width/2,P.y-=g):e==-mxConstants.DIRECTION_SOUTH?(P.x+=F.geometry.width/2,P.y+=F.geometry.height+g):(P.x=e==mxConstants.DIRECTION_WEST?P.x-g:P.x+(F.geometry.width+g),P.y+=F.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var T=this.view.translate;F=T.x*g;T=T.y*g;null!=R&&this.model.isVertex(R.cell)&&(F=R.x,T=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(P.x+=b.parent.geometry.x,P.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(F+P.x*g,T+P.y*g)).grow(40*g);p=null!=p?-this.getCells(0,0,0,0,null,null,p,null,!0):null;R=this.view.getState(b);var c=null,f=null;if(null!=p){p=p.reverse();for(var k=0;k<p.length;k++)if(!this.isCellLocked(p[k])&&!this.model.isEdge(p[k])&&p[k]!=b)if(!this.model.isAncestor(b,p[k])&&this.isContainer(p[k])&&(null==c||p[k]==this.model.getParent(b)))c=p[k];else if(null==f&&this.isCellConnectable(p[k])&&!this.model.isAncestor(p[k],b)&&!this.isSwimlane(p[k])){var B=this.view.getState(p[k]);null==R||null==B||mxUtils.intersects(R,B)||(f=p[k])}}var z=-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||v;z&&("1"!=urlParams.sketch||v)&&(e==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var C=[],I=f;f=c;v=mxUtils.bind(this,function(L){if(null==A||null!=L||null==f&&S){this.model.beginUpdate();try{if(null==I&&z){var K=this.getAbsoluteParent(null!=L?L:b);K=S?b:this.getCompositeParent(K);I=null!=L?L:this.duplicateCells([K],-!1)[0];null!=L&&this.addCells([I],this.model.getParent(b),null,null,null,!0);var O=this.getCellGeometry(I);null!=O&&(null!=L&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?P.y-=O.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=O.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-O.width/2:P.x+O.width/2),O.x=P.x-O.width/2,O.y=P.y-O.height/2);null!=c?(this.addCells([I],c,null,null,null,!0),f=null):z&&!S&&this.addCells([I],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(m)&&-mxEvent.isShiftDown(m)&&z||null==f&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,I,this.createCurrentEdgeStyle());null!=da&&(C.push(da),this.applyNewEdgeStyle(b,[da],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(da,b));if(null==f&&null!=I&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var ea=b.parent.getIndex(b);this.model.add(b.parent,I,ea)}null==f&&null!=I&&C.push(I);null==I&&null!=da&&da.geometry.setTerminalPoint(P,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted",-"cells",[da]))}finally{this.model.endUpdate()}}if(null!=G)G(C);else return C});if(null==A||null!=I||!z||null==f&&S)return v(I);A(F+P.x*g,T+P.y*g,v)};-Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),g=[],m,v=0;v<b.length;v++)if(m=b[v],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&g.push(m);return g.join(" ")};+Graph.prototype.connectVertex=function(b,e,g,m,u,p,B,H){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),G=S?b:this.getCompositeParent(b),O=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(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(O.x+=G.geometry.width/2,O.y-=g):e==+mxConstants.DIRECTION_SOUTH?(O.x+=G.geometry.width/2,O.y+=G.geometry.height+g):(O.x=e==mxConstants.DIRECTION_WEST?O.x-g:O.x+(G.geometry.width+g),O.y+=G.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var c=this.view.translate;G=c.x*g;c=c.y*g;null!=R&&this.model.isVertex(R.cell)&&(G=R.x,c=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(O.x+=b.parent.geometry.x,O.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+O.x*g,c+O.y*g)).grow(40*g);p=null!=p?+this.getCells(0,0,0,0,null,null,p,null,!0):null;R=this.view.getState(b);var f=null,l=null;if(null!=p){p=p.reverse();for(var t=0;t<p.length;t++)if(!this.isCellLocked(p[t])&&!this.model.isEdge(p[t])&&p[t]!=b)if(!this.model.isAncestor(b,p[t])&&this.isContainer(p[t])&&(null==f||p[t]==this.model.getParent(b)))f=p[t];else if(null==l&&this.isCellConnectable(p[t])&&!this.model.isAncestor(p[t],b)&&!this.isSwimlane(p[t])){var z=this.view.getState(p[t]);null==R||null==z||mxUtils.intersects(R,z)||(l=p[t])}}var C=+!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||u;C&&("1"!=urlParams.sketch||u)&&(e==mxConstants.DIRECTION_NORTH?O.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=b.geometry.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-b.geometry.width/2:O.x+b.geometry.width/2);var F=[],N=l;l=f;u=mxUtils.bind(this,function(K){if(null==B||null!=K||null==l&&S){this.model.beginUpdate();try{if(null==N&&C){var I=this.getAbsoluteParent(null!=K?K:b);I=S?b:this.getCompositeParent(I);N=null!=K?K:this.duplicateCells([I],+!1)[0];null!=K&&this.addCells([N],this.model.getParent(b),null,null,null,!0);var ca=this.getCellGeometry(N);null!=ca&&(null!=K&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?O.y-=ca.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=ca.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-ca.width/2:O.x+ca.width/2),ca.x=O.x-ca.width/2,ca.y=O.y-ca.height/2);null!=f?(this.addCells([N],f,null,null,null,!0),l=null):C&&!S&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(m)&&+mxEvent.isShiftDown(m)&&C||null==l&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,N,this.createCurrentEdgeStyle());null!=da&&(F.push(da),this.applyNewEdgeStyle(b,[da],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(da,b));if(null==l&&null!=N&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var ea=b.parent.getIndex(b);this.model.add(b.parent,N,ea)}null==l&&null!=N&&F.push(N);null==N&&null!=da&&da.geometry.setTerminalPoint(O,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted",+"cells",[da]))}finally{this.model.endUpdate()}}if(null!=H)H(F);else return F});if(null==B||null!=N||!C||null==l&&S)return u(N);B(G+O.x*g,c+O.y*g,u)};+Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),g=[],m,u=0;u<b.length;u++)if(m=b[u],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&g.push(m);return g.join(" ")};Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var g=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==g&&null!=m;)null!=m.value&&"object"==typeof m.value&&(g=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else g=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=e.getAttribute("label_"+Graph.diagramLanguage)),null==g&&(g=e.getAttribute("label")||"");return g||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b,e){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),e||(b=mxUtils.removeJavascriptProtocol(b)),b):null};Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,e){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};@@ -2443,23 +2442,23 @@ mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(e,mxConstants.STYGraph.prototype.getDefaultColor=function(b,e,g){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(b=mxUtils.getLightDarkColor(g),g="light-dark("+b.dark+", "+b.light+")");return g};Graph.prototype.setAdaptiveColors=function(b){this.adaptiveColors="default"==b?null:b;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(b=this.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};Graph.prototype.updateAlternateBounds=function(b,e,g){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};-Graph.prototype.foldCells=function(b,e,g,m,v){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<g.length;p++){var A=this.view.getState(g[p]),G=this.getCellGeometry(g[p]);if(null!=A&&null!=G){var S=0,F=0;if(G.alternateBounds)S=G.width-G.alternateBounds.width,F=G.height-G.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;-S=Math.round(G.width-A.width/P);F=Math.round(G.height-A.height/P)}if(0!=F||0!=S){var R=this.model.getParent(g[p]),T=this.layoutManager.getLayout(R);null==T?null!=v&&this.isMoveCellsEvent(v,A)&&this.moveSiblings(A,R,S,F):null!=v&&mxEvent.isAltDown(v)||T.constructor!=mxStackLayout||T.resizeLast||this.resizeParentStacks(R,T,S,F)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};-Graph.prototype.moveSiblings=function(b,e,g,m){this.model.beginUpdate();try{var v=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<v.length;e++)if(v[e]!=b.cell){var p=this.view.getState(v[e]),A=this.getCellGeometry(v[e]);null!=p&&null!=A&&(A=A.clone(),A.translate(Math.round(g*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(v[e],A))}}finally{this.model.endUpdate()}};-Graph.prototype.resizeParentStacks=function(b,e,g,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var v=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==v&&!e.resizeLast;){var p=this.getCellGeometry(b),A=this.view.getState(b);null!=A&&null!=p&&(p=p.clone(),e.horizontal?p.width+=g+Math.min(0,A.width/this.view.scale-p.width):p.height+=m+Math.min(0,A.height/this.view.scale-p.height),this.model.setGeometry(b,+Graph.prototype.foldCells=function(b,e,g,m,u){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<g.length;p++){var B=this.view.getState(g[p]),H=this.getCellGeometry(g[p]);if(null!=B&&null!=H){var S=0,G=0;if(H.alternateBounds)S=H.width-H.alternateBounds.width,G=H.height-H.alternateBounds.height;else{var O=this.useCssTransforms?1:this.view.scale;+S=Math.round(H.width-B.width/O);G=Math.round(H.height-B.height/O)}if(0!=G||0!=S){var R=this.model.getParent(g[p]),c=this.layoutManager.getLayout(R);null==c?null!=u&&this.isMoveCellsEvent(u,B)&&this.moveSiblings(B,R,S,G):null!=u&&mxEvent.isAltDown(u)||c.constructor!=mxStackLayout||c.resizeLast||this.resizeParentStacks(R,c,S,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};+Graph.prototype.moveSiblings=function(b,e,g,m){this.model.beginUpdate();try{var u=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<u.length;e++)if(u[e]!=b.cell){var p=this.view.getState(u[e]),B=this.getCellGeometry(u[e]);null!=p&&null!=B&&(B=B.clone(),B.translate(Math.round(g*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(u[e],B))}}finally{this.model.endUpdate()}};+Graph.prototype.resizeParentStacks=function(b,e,g,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var u=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==u&&!e.resizeLast;){var p=this.getCellGeometry(b),B=this.view.getState(b);null!=B&&null!=p&&(p=p.clone(),e.horizontal?p.width+=g+Math.min(0,B.width/this.view.scale-p.width):p.height+=m+Math.min(0,B.height/this.view.scale-p.height),this.model.setGeometry(b,p));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.movableLabel?"0"!=e.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,e,g){g=g||this.getDefaultParent();this.isCellLocked(g)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(b,e,g){var m=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(m)&&(m=null);return m};Graph.prototype.isCellFoldable=function(b){var e=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&("1"==e.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=e.collapsible||!this.isContainer(b)&&"1"==e.collapsible))};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,e){b=Math.max(.01,Math.min(this.view.scale*b,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)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};-Graph.prototype.fitPages=function(b,e){var g=1;null==b&&(g=this.getPageLayout(),b=g.width,g=g.height);var m=this.pageScale,v=this.pageFormat,p=this.container.clientHeight-10,A=(this.container.clientWidth-10)/(b*v.width)/m;this.zoomTo(Math.floor(20*(e?A:Math.min(A,p/(g*v.height)/m)))/20);mxUtils.hasScrollbars(this.container)&&(g=this.getPagePadding(),this.container.scrollLeft=Math.min(g.x*this.view.scale,(this.container.scrollWidth-this.container.clientWidth)/2)-1,e||(this.container.scrollTop=2<=b?+Graph.prototype.fitPages=function(b,e){var g=1;null==b&&(g=this.getPageLayout(),b=g.width,g=g.height);var m=this.pageScale,u=this.pageFormat,p=this.container.clientHeight-10,B=(this.container.clientWidth-10)/(b*u.width)/m;this.zoomTo(Math.floor(20*(e?B:Math.min(B,p/(g*u.height)/m)))/20);mxUtils.hasScrollbars(this.container)&&(g=this.getPagePadding(),this.container.scrollLeft=Math.min(g.x*this.view.scale,(this.container.scrollWidth-this.container.clientWidth)/2)-1,e||(this.container.scrollTop=2<=b?Math.min(g.y,(this.container.scrollHeight-this.container.clientHeight)/2):g.y*this.view.scale-1))};-Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var g=this.container.clientWidth-e,m=this.container.clientHeight-e;this.zoomTo(Math.floor(20*Math.min(g/b.width,m/b.height))/20);mxUtils.hasScrollbars(this.container)&&window.setTimeout(mxUtils.bind(this,function(){var v=this.view.translate;this.container.scrollLeft=(b.x+v.x)*this.view.scale-Math.max((g-b.width*this.view.scale)/2+e/2,0);this.container.scrollTop=(b.y+v.y)*this.view.scale-Math.max((m-b.height*this.view.scale)/2+e/2,0)}),0)};+Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var g=this.container.clientWidth-e,m=this.container.clientHeight-e;this.zoomTo(Math.floor(20*Math.min(g/b.width,m/b.height))/20);mxUtils.hasScrollbars(this.container)&&window.setTimeout(mxUtils.bind(this,function(){var u=this.view.translate;this.container.scrollLeft=(b.x+u.x)*this.view.scale-Math.max((g-b.width*this.view.scale)/2+e/2,0);this.container.scrollTop=(b.y+u.y)*this.view.scale-Math.max((m-b.height*this.view.scale)/2+e/2,0)}),0)};Graph.prototype.convertValueToTooltip=function(b){var e=null;mxUtils.isNode(b.value)&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.value.getAttribute("tooltip_"+Graph.diagramLanguage)),null==e&&(e=b.value.getAttribute("tooltip")),null!=e&&(null!=e&&this.isReplacePlaceholders(b)&&(e=this.replacePlaceholders(b,e)),e=Graph.sanitizeHtml(e)));return e};-Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)&&(e=this.convertValueToTooltip(b),null==e)){var g=this.builtInProperties;b=b.value.attributes;var m=[];e="";this.isEnabled()&&(g.push("linkTarget"),g.push("link"));for(var v=0;v<b.length;v++)(Graph.translateDiagram&&"label"==b[v].nodeName||0>mxUtils.indexOf(g,b[v].nodeName))&&0<b[v].nodeValue.length&&m.push({name:b[v].nodeName,value:b[v].nodeValue});m.sort(function(p,A){return p.name<A.name?-1:p.name>A.name?1:0});for(v=-0;v<m.length;v++)"link"==m[v].name&&this.isCustomLink(m[v].value)||(e+=("link"!=m[v].name?"<b>"+mxUtils.htmlEntities(m[v].name)+":</b> ":"")+mxUtils.htmlEntities(m[v].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+e+"</div>"))}return e};-Graph.prototype.addFlowAnimationToNode=function(b,e,g,m){if(null!=b&&null!=m){var v=b.getAttribute("stroke-dasharray");if(""==v||null==v){var p=String(mxUtils.getValue(e,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");v=1==mxUtils.getValue(e,mxConstants.STYLE_FIX_DASH,!1)||null==e.dashPattern?1:mxUtils.getNumber(e,mxConstants.STYLE_STROKEWIDTH,1);if(0<p.length)for(var A=0;A<p.length;A++)p[A]=Math.round(Number(p[A])*g*v*100)/100;b.setAttribute("stroke-dasharray",p.join(" "))}else p=v.split(" ");if(0<-p.length){for(A=v=0;A<p.length;A++){var G=parseFloat(p[A]);isNaN(G)||(v+=parseFloat(p[A]))}0!=p.length%2&&(v*=2);g=Math.round(v/g/16*parseInt(mxUtils.getValue(e,"flowAnimationDuration",500)));p=mxUtils.getValue(e,"flowAnimationTimingFunction","linear");e=mxUtils.getValue(e,"flowAnimationDirection","normal");b.style.animation=m+" "+g+"ms "+mxUtils.htmlEntities(p)+" infinite "+mxUtils.htmlEntities(e);b.style.strokeDashoffset=v}}};+Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)&&(e=this.convertValueToTooltip(b),null==e)){var g=this.builtInProperties;b=b.value.attributes;var m=[];e="";this.isEnabled()&&(g.push("linkTarget"),g.push("link"));for(var u=0;u<b.length;u++)(Graph.translateDiagram&&"label"==b[u].nodeName||0>mxUtils.indexOf(g,b[u].nodeName))&&0<b[u].nodeValue.length&&m.push({name:b[u].nodeName,value:b[u].nodeValue});m.sort(function(p,B){return p.name<B.name?-1:p.name>B.name?1:0});for(u=+0;u<m.length;u++)"link"==m[u].name&&this.isCustomLink(m[u].value)||(e+=("link"!=m[u].name?"<b>"+mxUtils.htmlEntities(m[u].name)+":</b> ":"")+mxUtils.htmlEntities(m[u].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+e+"</div>"))}return e};+Graph.prototype.addFlowAnimationToNode=function(b,e,g,m){if(null!=b&&null!=m){var u=b.getAttribute("stroke-dasharray");if(""==u||null==u){var p=String(mxUtils.getValue(e,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");u=1==mxUtils.getValue(e,mxConstants.STYLE_FIX_DASH,!1)||null==e.dashPattern?1:mxUtils.getNumber(e,mxConstants.STYLE_STROKEWIDTH,1);if(0<p.length)for(var B=0;B<p.length;B++)p[B]=Math.round(Number(p[B])*g*u*100)/100;b.setAttribute("stroke-dasharray",p.join(" "))}else p=u.split(" ");if(0<+p.length){for(B=u=0;B<p.length;B++){var H=parseFloat(p[B]);isNaN(H)||(u+=parseFloat(p[B]))}0!=p.length%2&&(u*=2);g=Math.round(u/g/16*parseInt(mxUtils.getValue(e,"flowAnimationDuration",500)));p=mxUtils.getValue(e,"flowAnimationTimingFunction","linear");e=mxUtils.getValue(e,"flowAnimationDirection","normal");b.style.animation=m+" "+g+"ms "+mxUtils.htmlEntities(p)+" infinite "+mxUtils.htmlEntities(e);b.style.strokeDashoffset=u}}};Graph.prototype.addFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationId){this.flowAnimationId="ge-flow-animation-"+Editor.guid();var e=document.createElement("style");e.innerHTML=this.createFlowAnimationCss(this.flowAnimationId);b.appendChild(e)}return this.flowAnimationId};Graph.prototype.createFlowAnimationCss=function(b){return"@keyframes "+b+" {\n to {\n stroke-dashoffset: 0;\n }\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,e){return Graph.compress(b,e)};Graph.prototype.decompress=function(b,e){return Graph.decompress(b,e)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";@@ -2475,21 +2474,21 @@ mxEvent.getSource(g)==this.graph.container&&this.setDisplay("none")}));this.grapm){e=!1;g=m.getEvent();this.isResetEvent(g)?this.reset():this.isActive()||(m=this.getState(m.getState()),null==m&&mxEvent.isTouchEvent(g)||this.update(m));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(g,m){g=m.getEvent();this.isResetEvent(g)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(g)||this.update(this.getState(m.getState()),m.getGraphX(),m.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(e=!0)}),mouseUp:mxUtils.bind(this,function(g,m){g=m.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(g),mxEvent.getClientY(g));this.isResetEvent(g)?this.reset():this.isActive()&&!e&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),m):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(m.getGraphX(),m.getGraphY())))):mxEvent.isTouchEvent(g)||null!=this.bbox&&mxUtils.contains(this.bbox,m.getGraphX(),m.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(g)||this.reset();e=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,e){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};-HoverIcons.prototype.createArrow=function(b,e,g){var m=null;m=mxUtils.createImage(b.src);m.style.width=b.width+"px";m.style.height=b.height+"px";m.style.padding=this.tolerance+"px";null!=e&&m.setAttribute("title",e);m.style.position="absolute";m.style.cursor=this.cssCursor;mxEvent.addGestureListeners(m,mxUtils.bind(this,function(v){null==this.currentState||this.isResetEvent(v)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),this.drag(v,-this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=m,this.setDisplay("none"),mxEvent.consume(v))}));mxEvent.redirectMouseEvents(m,this.graph,this.currentState);mxEvent.addListener(m,"mouseenter",mxUtils.bind(this,function(v){mxEvent.isMouseEvent(v)&&(null!=this.activeArrow&&this.activeArrow!=m&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(m,100),this.activeArrow=m,this.fireEvent(new mxEventObject("focus",-"arrow",m,"direction",g,"event",v)))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(v){mxEvent.isMouseEvent(v)&&this.fireEvent(new mxEventObject("blur","arrow",m,"direction",g,"event",v));this.graph.isMouseDown||this.resetActiveArrow()}));return m};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};+HoverIcons.prototype.createArrow=function(b,e,g){var m=null;m=mxUtils.createImage(b.src);m.style.width=b.width+"px";m.style.height=b.height+"px";m.style.padding=this.tolerance+"px";null!=e&&m.setAttribute("title",e);m.style.position="absolute";m.style.cursor=this.cssCursor;mxEvent.addGestureListeners(m,mxUtils.bind(this,function(u){null==this.currentState||this.isResetEvent(u)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(u),mxEvent.getClientY(u)),this.drag(u,+this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=m,this.setDisplay("none"),mxEvent.consume(u))}));mxEvent.redirectMouseEvents(m,this.graph,this.currentState);mxEvent.addListener(m,"mouseenter",mxUtils.bind(this,function(u){mxEvent.isMouseEvent(u)&&(null!=this.activeArrow&&this.activeArrow!=m&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(m,100),this.activeArrow=m,this.fireEvent(new mxEventObject("focus",+"arrow",m,"direction",g,"event",u)))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(u){mxEvent.isMouseEvent(u)&&this.fireEvent(new mxEventObject("blur","arrow",m,"direction",g,"event",u));this.graph.isMouseDown||this.resetActiveArrow()}));return m};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var e=0;e<this.elts.length;e++)null!=this.elts[e]&&b(this.elts[e])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(e){e.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};HoverIcons.prototype.drag=function(b,e,g){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,e,g),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=e&&e.setHandlesVisible(!1),e=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=e&&"orthogonalEdgeStyle"===mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),e.cell.style=mxUtils.setStyle(e.cell.style,"sourcePortConstraint",b),e.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,e,g){return this.graph.view.getState(this.graph.getCellAt(e,g))};-HoverIcons.prototype.click=function(b,e,g){var m=g.getEvent(),v=g.getGraphX(),p=g.getGraphY();v=this.getStateAt(b,v,p);null==v||!this.graph.model.isEdge(v.cell)||this.graph.isCloneEvent(m)||v.getVisibleTerminalState(!0)!=b&&v.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,e,g):(this.graph.setSelectionCell(v.cell),this.reset());g.consume()};+HoverIcons.prototype.click=function(b,e,g){var m=g.getEvent(),u=g.getGraphX(),p=g.getGraphY();u=this.getStateAt(b,u,p);null==u||!this.graph.model.isEdge(u.cell)||this.graph.isCloneEvent(m)||u.getVisibleTerminalState(!0)!=b&&u.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,e,g):(this.graph.setSelectionCell(u.cell),this.reset());g.consume()};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(G,S,F){if(null!=g){var P=new mxRectangle(S,F,G.clientWidth,G.clientHeight);mxUtils.intersects(P,g)&&(G==this.arrowUp?F-=P.y+P.height-g.y:G==this.arrowRight?S+=g.x+g.width-P.x:G==this.arrowDown?F+=g.y+g.height-P.y:G==this.arrowLeft&&(S-=P.x+P.width-g.x))}G.style.left=S+"px";G.style.top=F+"px";mxUtils.setOpacity(G,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,G){if(null!=g){var O=new mxRectangle(S,G,H.clientWidth,H.clientHeight);mxUtils.intersects(O,g)&&(H==this.arrowUp?G-=O.y+O.height-g.y:H==this.arrowRight?S+=g.x+g.width-O.x:H==this.arrowDown?G+=g.y+g.height-O.y:H==this.arrowLeft&&(S-=O.x+O.width-g.x))}H.style.left=S+"px";H.style.top=G+"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 m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),v=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==m&&m==v&&v==b&&(b=v=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),A=mxUtils.bind(this,function(G,S){var F=this.graph.model.isVertex(G)&&this.graph.getCellGeometry(G);null==G||this.graph.model.isAncestor(G,-this.currentState.cell)||this.graph.isSwimlane(G)||!(null==F||null==p||F.height<3*p.height&&F.width<3*p.width)?S.style.visibility="visible":S.style.visibility="hidden"});A(e,this.arrowRight);A(m,this.arrowLeft);A(v,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 m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),u=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==m&&m==u&&u==b&&(b=u=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),B=mxUtils.bind(this,function(H,S){var G=this.graph.model.isVertex(H)&&this.graph.getCellGeometry(H);null==H||this.graph.model.isAncestor(H,+this.currentState.cell)||this.graph.isSwimlane(H)||!(null==G||null==p||G.height<3*p.height&&G.width<3*p.width)?S.style.visibility="visible":S.style.visibility="hidden"});B(e,this.arrowRight);B(m,this.arrowLeft);B(u,this.arrowUp);B(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};@@ -2497,205 +2496,205 @@ HoverIcons.prototype.update=function(b,e,g){if(!this.graph.connectionArrowsEnablwindow.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,g))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,g)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!=b||null==this.bbox||null==e||null==g||!mxUtils.contains(this.bbox,e,g))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};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),m=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(g,"html","0")){var v=this.convertValueToString(b);"0"!=mxUtils.getValue(g,"nl2Br","1")&&(v=v.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));v=Editor.convertHtmlToText(v);this.cellLabelChanged(b,v);m=!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 m};Graph.prototype.createParent=function(b,e,g,m,v){b=this.cloneCell(b);for(var p=0;p<g;p++){var A=this.cloneCell(e),G=this.getCellGeometry(A);null!=G&&(G.x+=p*m,G.y+=p*v);b.insert(A)}return b};-Graph.prototype.createTable=function(b,e,g,m,v,p,A,G,S){g=null!=g?g:60;m=null!=m?m:40;p=null!=p?p:30;G=null!=G?G:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,-null,null!=v?v:"",0,0,e*g,b*m+(null!=v?p:0),null!=A?A:"shape=table;startSize="+(null!=v?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*g,m,G),this.createVertex(null,null,"",0,0,g,m,S),e,g,0),b,0,m)};-Graph.prototype.setTableValues=function(b,e,g){for(var m=this.model.getChildCells(b,!0),v=0;v<m.length;v++)if(null!=g&&(m[v].value=g[v]),null!=e)for(var p=this.model.getChildCells(m[v],!0),A=0;A<p.length;A++)null!=e[v][A]&&(p[A].value=e[v][A]);return b};-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,v,p,A,G,S){g=null!=g?g:120;m=null!=m?m:120;A=null!=A?A:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";G=null!=G?G:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";-S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";v=this.createVertex(null,null,null!=v?v:"",0,0,e*g,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==v?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(v),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);v.geometry.width+=p;v.geometry.height+=-p;A=this.createVertex(null,null,"",0,p,e*g+p,m,A);v.insert(this.createParent(A,this.createVertex(null,null,"",p,0,g,m,G),e,g,0));return 1<b?(A.geometry.y=m+p,this.createParent(v,this.createParent(A,this.createVertex(null,null,"",p,0,g,m,S),e,g,0),b-1,0,m)):v};-Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var v=0;v<m.length;v++){for(var p=this.getActualStartSize(m[v],!0),A=this.model.getChildCells(m[v],!0),G=this.getCellStyle(m[v],!0),S=null,F=[],P=0;P<A.length;P++){var R=this.getCellGeometry(A[P]),T={cell:A[P],rospan:1,colspan:1,row:v,col:P,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;T.point=new mxPoint(R.width+(null!=S?S.point.x:b.x+p.x),R.height+(null!=g&&null!=-g[0]?g[0].point.y:b.y+p.y));T.actual=T;null!=g&&null!=g[P]&&1<g[P].rowspan?(T.rowspan=g[P].rowspan-1,T.colspan=g[P].colspan,T.actual=g[P].actual):null!=S&&1<S.colspan?(T.rowspan=S.rowspan,T.colspan=S.colspan-1,T.actual=S.actual):(S=this.getCurrentCellStyle(A[P],!0),null!=S&&(T.rowspan=parseInt(S.rowspan||1),T.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(G,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(G,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(T,A.length,-m.length,b.x+(S?p.x:0),b.y+(S?p.y:0));F.push(T);S=T}g=F}};Graph.prototype.getTableLines=function(b,e,g){var m=[],v=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(p,A,G,S,F){e&&p.row<G-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(S,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));g&&p.col<A-1&&(null==v[p.col]&&(v[p.col]=[new mxPoint(p.point.x,F)]),1<p.colspan&&v[p.col].push(null),v[p.col].push(p.point))}));return m.concat(v)};+Graph.prototype.removeTextStyleForCell=function(b,e){var g=this.getCurrentCellStyle(b),m=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(g,"html","0")){var u=this.convertValueToString(b);"0"!=mxUtils.getValue(g,"nl2Br","1")&&(u=u.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));u=Editor.convertHtmlToText(u);this.cellLabelChanged(b,u);m=!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 m};Graph.prototype.createParent=function(b,e,g,m,u){b=this.cloneCell(b);for(var p=0;p<g;p++){var B=this.cloneCell(e),H=this.getCellGeometry(B);null!=H&&(H.x+=p*m,H.y+=p*u);b.insert(B)}return b};+Graph.prototype.createTable=function(b,e,g,m,u,p,B,H,S){g=null!=g?g:60;m=null!=m?m:40;p=null!=p?p:30;H=null!=H?H:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,+null,null!=u?u:"",0,0,e*g,b*m+(null!=u?p:0),null!=B?B:"shape=table;startSize="+(null!=u?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*g,m,H),this.createVertex(null,null,"",0,0,g,m,S),e,g,0),b,0,m)};+Graph.prototype.setTableValues=function(b,e,g){for(var m=this.model.getChildCells(b,!0),u=0;u<m.length;u++)if(null!=g&&(m[u].value=g[u]),null!=e)for(var p=this.model.getChildCells(m[u],!0),B=0;B<p.length;B++)null!=e[u][B]&&(p[B].value=e[u][B]);return b};+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,u,p,B,H,S){g=null!=g?g:120;m=null!=m?m:120;B=null!=B?B:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";H=null!=H?H:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";+S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";u=this.createVertex(null,null,null!=u?u:"",0,0,e*g,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==u?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(u),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);u.geometry.width+=p;u.geometry.height+=+p;B=this.createVertex(null,null,"",0,p,e*g+p,m,B);u.insert(this.createParent(B,this.createVertex(null,null,"",p,0,g,m,H),e,g,0));return 1<b?(B.geometry.y=m+p,this.createParent(u,this.createParent(B,this.createVertex(null,null,"",p,0,g,m,S),e,g,0),b-1,0,m)):u};+Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var u=0;u<m.length;u++){for(var p=this.getActualStartSize(m[u],!0),B=this.model.getChildCells(m[u],!0),H=this.getCellStyle(m[u],!0),S=null,G=[],O=0;O<B.length;O++){var R=this.getCellGeometry(B[O]),c={cell:B[O],rospan:1,colspan:1,row:u,col:O,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;c.point=new mxPoint(R.width+(null!=S?S.point.x:b.x+p.x),R.height+(null!=g&&null!=+g[0]?g[0].point.y:b.y+p.y));c.actual=c;null!=g&&null!=g[O]&&1<g[O].rowspan?(c.rowspan=g[O].rowspan-1,c.colspan=g[O].colspan,c.actual=g[O].actual):null!=S&&1<S.colspan?(c.rowspan=S.rowspan,c.colspan=S.colspan-1,c.actual=S.actual):(S=this.getCurrentCellStyle(B[O],!0),null!=S&&(c.rowspan=parseInt(S.rowspan||1),c.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(H,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(c,B.length,+m.length,b.x+(S?p.x:0),b.y+(S?p.y:0));G.push(c);S=c}g=G}};Graph.prototype.getTableLines=function(b,e,g){var m=[],u=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(p,B,H,S,G){e&&p.row<H-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(S,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));g&&p.col<B-1&&(null==u[p.col]&&(u[p.col]=[new mxPoint(p.point.x,G)]),1<p.colspan&&u[p.col].push(null),u[p.col].push(p.point))}));return m.concat(u)};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};-Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var v=this.getCellGeometry(b);if(null!=v){v=v.clone();v.height+=e;m.setGeometry(b,v);var p=m.getParent(b),A=m.getChildCells(p,!0);if(!g){var G=mxUtils.indexOf(A,b);if(G<A.length-1){var S=A[G+1],F=this.getCellGeometry(S);null!=F&&(F=F.clone(),F.y+=e,F.height-=e,m.setGeometry(S,F))}}var P=this.getCellGeometry(p);null!=P&&(g||(g=b==A[A.length-1]),g&&(P=P.clone(),P.height+=e,m.setGeometry(p,P)))}}finally{m.endUpdate()}};-Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),v=m.getParent(b),p=m.getParent(v),A=m.getChildCells(v,!0);b=mxUtils.indexOf(A,b);var G=b==A.length-1;m.beginUpdate();try{for(var S=m.getChildCells(p,!0),F=0;F<S.length;F++){v=S[F];A=m.getChildCells(v,!0);var P=A[b],R=this.getCellGeometry(P);null!=R&&(R=R.clone(),R.width+=e,null!=R.alternateBounds&&(R.alternateBounds.width+=e),m.setGeometry(P,R));b<A.length-1&&(P=A[b+1],R=this.getCellGeometry(P),null!=R&&(R=R.clone(),-R.x+=e,g||(R.width-=e,null!=R.alternateBounds&&(R.alternateBounds.width-=e)),m.setGeometry(P,R)))}if(G||g){var T=this.getCellGeometry(p);null!=T&&(T=T.clone(),T.width+=e,m.setGeometry(p,T))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};-TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var g=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var v=this.graph.getCellGeometry(b[m]);null!=v&&(g+=e?v.width:v.height)}return g};-TableLayout.prototype.getRowLayout=function(b,e){var g=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(g,!0);e=e-m.x-m.width;var v=[];m=m.x;for(var p=0;p<g.length;p++){var A=this.graph.getCellGeometry(g[p]);null!=A&&(m+=(null!=A.alternateBounds?A.alternateBounds.width:A.width)*e/b,v.push(Math.round(m)))}return v};-TableLayout.prototype.layoutRow=function(b,e,g,m){var v=this.graph.getModel(),p=v.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var A=b.x,G=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var S=0;S<p.length;S++){var F=this.graph.getCellGeometry(p[S]);null!=F&&(F=F.clone(),F.y=b.y,F.height=g-b.y-b.height,null!=e?(F.x=e[S],F.width=e[S+1]-F.x,S==p.length-1&&S<e.length-2&&(F.width=m-F.x-b.x-b.width)):(F.x=A,A+=F.width,S==p.length-1?F.width=m-b.x-b.width-G:G+=F.width),F.alternateBounds=new mxRectangle(0,-0,F.width,F.height),v.setGeometry(p[S],F))}return G};-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),v="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var A=this.graph.getModel(),G=0;A.beginUpdate();try{for(var S=g.height-e.y-e.height,F=g.width-e.x-e.width,P=A.getChildCells(b,!0),R=0;R<P.length;R++)A.setVisible(P[R],!0);var T=this.getSize(P,!1);if(0<S&&0<F&&0<-P.length&&0<T){if(v){var c=this.graph.getCellGeometry(P[P.length-1]);null!=c&&(c=c.clone(),c.height=S-T+c.height,A.setGeometry(P[P.length-1],c))}var f=p?null:this.getRowLayout(P[0],F),k=[],B=e.y;for(R=0;R<P.length;R++)c=this.graph.getCellGeometry(P[R]),null!=c&&(c=c.clone(),c.x=e.x,c.width=F,c.y=Math.round(B),B=v||m?B+c.height:B+c.height/T*S,c.height=Math.round(B)-c.y,A.setGeometry(P[R],c)),G=Math.max(G,this.layoutRow(P[R],f,c.height,F,k));m&&S<T&&(g=g.clone(),g.height=B+e.height,A.setGeometry(b,-g));p&&F<G+Graph.minTableColumnWidth&&(g=g.clone(),g.width=G+e.width+e.x+Graph.minTableColumnWidth,A.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(z){A.setVisible(z.cell,z.actual.cell==z.cell);if(z.actual.cell!=z.cell){if(z.actual.row==z.row){var C=null!=z.geo.alternateBounds?z.geo.alternateBounds:z.geo;z.actual.geo.width+=C.width}z.actual.col==z.col&&(C=null!=z.geo.alternateBounds?z.geo.alternateBounds:z.geo,z.actual.geo.height+=C.height)}}))}else for(R=0;R<P.length;R++)A.setVisible(P[R],-!1)}finally{A.endUpdate()}}};-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(R,T){T=null!=T?T:!0;var c=this.getState(R);null!=c&&T&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=e.apply(this,-arguments);null!=c&&T&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var R=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=-R)for(var T=0;T<R.length;T++)if("hidden"!=R[T].getAttribute("visibility"))return R[T];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(R){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;-mxShape.prototype.createSvgCanvas=function(R){R=m.apply(this,arguments);null!=this.state&&(R.adaptiveColors=this.state.view.graph.getAdaptiveColors());return R};var v=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(R,T){return v.apply(this,arguments)||null!=R.routedPoints&&null!=T.routedPoints&&!mxUtils.equalPoints(T.routedPoints,R.routedPoints)};var p=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(R){p.apply(this,arguments);-this.graph.model.isEdge(R.cell)&&1!=R.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(R)};mxGraphView.prototype.updateLineJumps=function(R){var T=R.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=R.routedPoints,f=null;if(null!=T&&null!=this.validEdges&&"none"!==mxUtils.getValue(R.style,"jumpStyle","none")){var k=function(Y,fa,Z){var l=new mxPoint(fa,Z);l.type=Y;f.push(l);l=null!=R.routedPoints?R.routedPoints[f.length-1]:null;return null==l||l.type!=Y||l.x!=fa||l.y!=Z},B=.5*this.scale;-c=!1;f=[];for(var z=0;z<T.length-1;z++){for(var C=T[z+1],I=T[z],L=[],K=T[z+2];z<T.length-2&&mxUtils.ptSegDistSq(I.x,I.y,K.x,K.y,C.x,C.y)<1*this.scale*this.scale;)C=K,z++,K=T[z+2];c=k(0,I.x,I.y)||c;for(var O=0;O<this.validEdges.length;O++){var da=this.validEdges[O],ea=da.absolutePoints;if(null!=ea&&mxUtils.intersects(R,da)&&"1"!=da.style.noJump){var ca=null;for(da=0;da<ea.length-1;da++){var V=ea[da+1],ma=ea[da];for(K=ea[da+2];da<ea.length-2&&mxUtils.ptSegDistSq(ma.x,ma.y,K.x,K.y,V.x,V.y)<1*this.scale*-this.scale;)V=K,da++,K=ea[da+2];var la=mxUtils.intersection(I.x,I.y,C.x,C.y,ma.x,ma.y,V.x,V.y);if(null!=la&&(Math.abs(la.x-I.x)>B||Math.abs(la.y-I.y)>B)&&(Math.abs(la.x-C.x)>B||Math.abs(la.y-C.y)>B)&&(null==ca||mxUtils.ptLineDist(I.x,I.y,C.x,C.y,ca.x,ca.y)>B||mxUtils.ptLineDist(I.x,I.y,C.x,C.y,ma.x,ma.y)>B)&&(null==K||mxUtils.ptLineDist(I.x,I.y,C.x,C.y,K.x,K.y)>B||mxUtils.ptLineDist(I.x,I.y,C.x,C.y,V.x,V.y)>B)){K=la.x-I.x;ca=la.y-I.y;la={distSq:K*K+ca*ca,x:la.x,y:la.y};for(K=0;K<L.length;K++)if(L[K].distSq>-la.distSq){L.splice(K,0,la);la=null;break}null==la||0!=L.length&&L[L.length-1].x===la.x&&L[L.length-1].y===la.y||L.push(la)}ca=ma}}}for(da=0;da<L.length;da++)c=k(1,L[da].x,L[da].y)||c}la=T[T.length-1];c=k(0,la.x,la.y)||c}R.routedPoints=f;return c}return!1};var A=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(R,T,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)A.apply(this,-arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,k=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,B=mxUtils.getValue(this.style,"jumpStyle","none"),z=!0,C=null,I=null,L=[],K=null;R.begin();for(var O=0;O<this.state.routedPoints.length;O++){var da=this.state.routedPoints[O],ea=new mxPoint(da.x/this.scale,da.y/this.scale);0==O?ea=T[0]:O==this.state.routedPoints.length-1&&(ea=T[T.length-1]);var ca=!1;-if(null!=C&&1==da.type){var V=this.state.routedPoints[O+1];da=V.x/this.scale-ea.x;V=V.y/this.scale-ea.y;da=da*da+V*V;null==K&&(K=new mxPoint(ea.x-C.x,ea.y-C.y),I=Math.sqrt(K.x*K.x+K.y*K.y),0<I?(K.x=K.x*k/I,K.y=K.y*k/I):K=null);da>k*k&&0<I&&(da=C.x-ea.x,V=C.y-ea.y,da=da*da+V*V,da>k*k&&(ca=new mxPoint(ea.x-K.x,ea.y-K.y),da=new mxPoint(ea.x+K.x,ea.y+K.y),L.push(ca),this.addPoints(R,L,c,f,!1,null,z),L=0>Math.round(K.x)||0==Math.round(K.x)&&0>=Math.round(K.y)?1:-1,z=!1,"sharp"==B?(R.lineTo(ca.x-K.y*L,-ca.y+K.x*L),R.lineTo(da.x-K.y*L,da.y+K.x*L),R.lineTo(da.x,da.y)):"line"==B?(R.moveTo(ca.x+K.y*L,ca.y-K.x*L),R.lineTo(ca.x-K.y*L,ca.y+K.x*L),R.moveTo(da.x-K.y*L,da.y+K.x*L),R.lineTo(da.x+K.y*L,da.y-K.x*L),R.moveTo(da.x,da.y)):"arc"==B?(L*=1.3,R.curveTo(ca.x-K.y*L,ca.y+K.x*L,da.x-K.y*L,da.y+K.x*L,da.x,da.y)):(R.moveTo(da.x,da.y),z=!0),L=[da],ca=!0))}else K=null;ca||(L.push(ea),C=ea)}this.addPoints(R,L,c,f,!1,null,z);R.stroke()}};var G=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=-function(R,T,c,f){return null!=T&&"centerPerimeter"==T.style[mxConstants.STYLE_PERIMETER]?new mxPoint(T.getCenterX(),T.getCenterY()):G.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(R,T,c,f){if(null==T||null==R||"1"!=T.style.snapToPoint&&"1"!=R.style.snapToPoint)S.apply(this,arguments);else{T=this.getTerminalPort(R,T,f);var k=this.getNextPoint(R,c,f),B=this.graph.isOrthogonal(R),z=mxUtils.toRadians(Number(T.style[mxConstants.STYLE_ROTATION]||-"0")),C=new mxPoint(T.getCenterX(),T.getCenterY());if(0!=z){var I=Math.cos(-z),L=Math.sin(-z);k=mxUtils.getRotatedPoint(k,I,L,C)}I=parseFloat(R.style[mxConstants.STYLE_PERIMETER_SPACING]||0);I+=parseFloat(R.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);k=this.getPerimeterPoint(T,k,0==z&&B,I);0!=z&&(I=Math.cos(z),L=Math.sin(z),k=mxUtils.getRotatedPoint(k,I,L,C));R.setAbsoluteTerminalPoint(this.snapToAnchorPoint(R,T,c,f,k),f)}};mxGraphView.prototype.snapToAnchorPoint=-function(R,T,c,f,k){if(null!=T&&null!=R){R=this.graph.getAllConnectionConstraints(T);f=c=null;if(null!=R)for(var B=0;B<R.length;B++){var z=this.graph.getConnectionPoint(T,R[B]);if(null!=z){var C=(z.x-k.x)*(z.x-k.x)+(z.y-k.y)*(z.y-k.y);if(null==f||C<f)c=z,f=C}}null!=c&&(k=c)}return k};var F=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(R,T,c){var f=F.apply(this,arguments);"1"==R.getAttribute("placeholders")&&null!=c.state&&(f=c.state.view.graph.replacePlaceholders(c.state.cell,-f));return f};var P=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(R){if(null!=R.style&&"undefined"!==typeof pako){var T=mxUtils.getValue(R.style,mxConstants.STYLE_SHAPE,null);if(null!=T&&"string"===typeof T&&"stencil("==T.substring(0,8))try{var c=T.substring(8,T.length-1),f=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(f.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return P.apply(this,arguments)}})();+Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var u=this.getCellGeometry(b);if(null!=u){u=u.clone();u.height+=e;m.setGeometry(b,u);var p=m.getParent(b),B=m.getChildCells(p,!0);if(!g){var H=mxUtils.indexOf(B,b);if(H<B.length-1){var S=B[H+1],G=this.getCellGeometry(S);null!=G&&(G=G.clone(),G.y+=e,G.height-=e,m.setGeometry(S,G))}}var O=this.getCellGeometry(p);null!=O&&(g||(g=b==B[B.length-1]),g&&(O=O.clone(),O.height+=e,m.setGeometry(p,O)))}}finally{m.endUpdate()}};+Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),u=m.getParent(b),p=m.getParent(u),B=m.getChildCells(u,!0);b=mxUtils.indexOf(B,b);var H=b==B.length-1;m.beginUpdate();try{for(var S=m.getChildCells(p,!0),G=0;G<S.length;G++){u=S[G];B=m.getChildCells(u,!0);var O=B[b],R=this.getCellGeometry(O);null!=R&&(R=R.clone(),R.width+=e,null!=R.alternateBounds&&(R.alternateBounds.width+=e),m.setGeometry(O,R));b<B.length-1&&(O=B[b+1],R=this.getCellGeometry(O),null!=R&&(R=R.clone(),+R.x+=e,g||(R.width-=e,null!=R.alternateBounds&&(R.alternateBounds.width-=e)),m.setGeometry(O,R)))}if(H||g){var c=this.getCellGeometry(p);null!=c&&(c=c.clone(),c.width+=e,m.setGeometry(p,c))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};+TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var g=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var u=this.graph.getCellGeometry(b[m]);null!=u&&(g+=e?u.width:u.height)}return g};+TableLayout.prototype.getRowLayout=function(b,e){var g=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(g,!0);e=e-m.x-m.width;var u=[];m=m.x;for(var p=0;p<g.length;p++){var B=this.graph.getCellGeometry(g[p]);null!=B&&(m+=(null!=B.alternateBounds?B.alternateBounds.width:B.width)*e/b,u.push(Math.round(m)))}return u};+TableLayout.prototype.layoutRow=function(b,e,g,m){var u=this.graph.getModel(),p=u.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var B=b.x,H=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var S=0;S<p.length;S++){var G=this.graph.getCellGeometry(p[S]);null!=G&&(G=G.clone(),G.y=b.y,G.height=g-b.y-b.height,null!=e?(G.x=e[S],G.width=e[S+1]-G.x,S==p.length-1&&S<e.length-2&&(G.width=m-G.x-b.x-b.width)):(G.x=B,B+=G.width,S==p.length-1?G.width=m-b.x-b.width-H:H+=G.width),G.alternateBounds=new mxRectangle(0,+0,G.width,G.height),u.setGeometry(p[S],G))}return H};+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),u="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var B=this.graph.getModel(),H=0;B.beginUpdate();try{for(var S=g.height-e.y-e.height,G=g.width-e.x-e.width,O=B.getChildCells(b,!0),R=0;R<O.length;R++)B.setVisible(O[R],!0);var c=this.getSize(O,!1);if(0<S&&0<G&&0<+O.length&&0<c){if(u){var f=this.graph.getCellGeometry(O[O.length-1]);null!=f&&(f=f.clone(),f.height=S-c+f.height,B.setGeometry(O[O.length-1],f))}var l=p?null:this.getRowLayout(O[0],G),t=[],z=e.y;for(R=0;R<O.length;R++)f=this.graph.getCellGeometry(O[R]),null!=f&&(f=f.clone(),f.x=e.x,f.width=G,f.y=Math.round(z),z=u||m?z+f.height:z+f.height/c*S,f.height=Math.round(z)-f.y,B.setGeometry(O[R],f)),H=Math.max(H,this.layoutRow(O[R],l,f.height,G,t));m&&S<c&&(g=g.clone(),g.height=z+e.height,B.setGeometry(b,+g));p&&G<H+Graph.minTableColumnWidth&&(g=g.clone(),g.width=H+e.width+e.x+Graph.minTableColumnWidth,B.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){B.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=F.width}C.actual.col==C.col&&(F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=F.height)}}))}else for(R=0;R<O.length;R++)B.setVisible(O[R],+!1)}finally{B.endUpdate()}}};+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(R,c){c=null!=c?c:!0;var f=this.getState(R);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=e.apply(this,+arguments);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var R=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=+R)for(var c=0;c<R.length;c++)if("hidden"!=R[c].getAttribute("visibility"))return R[c];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(R){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;+mxShape.prototype.createSvgCanvas=function(R){R=m.apply(this,arguments);null!=this.state&&(R.adaptiveColors=this.state.view.graph.getAdaptiveColors());return R};var u=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(R,c){return u.apply(this,arguments)||null!=R.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,R.routedPoints)};var p=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(R){p.apply(this,arguments);+this.graph.model.isEdge(R.cell)&&1!=R.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(R)};mxGraphView.prototype.updateLineJumps=function(R){var c=R.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=R.routedPoints,l=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(R.style,"jumpStyle","none")){var t=function(Y,la,Z){var k=new mxPoint(la,Z);k.type=Y;l.push(k);k=null!=R.routedPoints?R.routedPoints[l.length-1]:null;return null==k||k.type!=Y||k.x!=la||k.y!=Z},z=.5*this.scale;+f=!1;l=[];for(var C=0;C<c.length-1;C++){for(var F=c[C+1],N=c[C],K=[],I=c[C+2];C<c.length-2&&mxUtils.ptSegDistSq(N.x,N.y,I.x,I.y,F.x,F.y)<1*this.scale*this.scale;)F=I,C++,I=c[C+2];f=t(0,N.x,N.y)||f;for(var ca=0;ca<this.validEdges.length;ca++){var da=this.validEdges[ca],ea=da.absolutePoints;if(null!=ea&&mxUtils.intersects(R,da)&&"1"!=da.style.noJump){var X=null;for(da=0;da<ea.length-1;da++){var ba=ea[da+1],ha=ea[da];for(I=ea[da+2];da<ea.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,I.x,I.y,ba.x,ba.y)<1*this.scale*+this.scale;)ba=I,da++,I=ea[da+2];var ma=mxUtils.intersection(N.x,N.y,F.x,F.y,ha.x,ha.y,ba.x,ba.y);if(null!=ma&&(Math.abs(ma.x-N.x)>z||Math.abs(ma.y-N.y)>z)&&(Math.abs(ma.x-F.x)>z||Math.abs(ma.y-F.y)>z)&&(null==X||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,X.x,X.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ha.x,ha.y)>z)&&(null==I||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,I.x,I.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ba.x,ba.y)>z)){I=ma.x-N.x;X=ma.y-N.y;ma={distSq:I*I+X*X,x:ma.x,y:ma.y};for(I=0;I<K.length;I++)if(K[I].distSq>+ma.distSq){K.splice(I,0,ma);ma=null;break}null==ma||0!=K.length&&K[K.length-1].x===ma.x&&K[K.length-1].y===ma.y||K.push(ma)}X=ha}}}for(da=0;da<K.length;da++)f=t(1,K[da].x,K[da].y)||f}ma=c[c.length-1];f=t(0,ma.x,ma.y)||f}R.routedPoints=l;return f}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(R,c,f){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)B.apply(this,+arguments);else{var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,F=null,N=null,K=[],I=null;R.begin();for(var ca=0;ca<this.state.routedPoints.length;ca++){var da=this.state.routedPoints[ca],ea=new mxPoint(da.x/this.scale,da.y/this.scale);0==ca?ea=c[0]:ca==this.state.routedPoints.length-1&&(ea=c[c.length-1]);var X=+!1;if(null!=F&&1==da.type){var ba=this.state.routedPoints[ca+1];da=ba.x/this.scale-ea.x;ba=ba.y/this.scale-ea.y;da=da*da+ba*ba;null==I&&(I=new mxPoint(ea.x-F.x,ea.y-F.y),N=Math.sqrt(I.x*I.x+I.y*I.y),0<N?(I.x=I.x*t/N,I.y=I.y*t/N):I=null);da>t*t&&0<N&&(da=F.x-ea.x,ba=F.y-ea.y,da=da*da+ba*ba,da>t*t&&(X=new mxPoint(ea.x-I.x,ea.y-I.y),da=new mxPoint(ea.x+I.x,ea.y+I.y),K.push(X),this.addPoints(R,K,f,l,!1,null,C),K=0>Math.round(I.x)||0==Math.round(I.x)&&0>=Math.round(I.y)?1:-1,C=!1,"sharp"==z?(R.lineTo(X.x-+I.y*K,X.y+I.x*K),R.lineTo(da.x-I.y*K,da.y+I.x*K),R.lineTo(da.x,da.y)):"line"==z?(R.moveTo(X.x+I.y*K,X.y-I.x*K),R.lineTo(X.x-I.y*K,X.y+I.x*K),R.moveTo(da.x-I.y*K,da.y+I.x*K),R.lineTo(da.x+I.y*K,da.y-I.x*K),R.moveTo(da.x,da.y)):"arc"==z?(K*=1.3,R.curveTo(X.x-I.y*K,X.y+I.x*K,da.x-I.y*K,da.y+I.x*K,da.x,da.y)):(R.moveTo(da.x,da.y),C=!0),K=[da],X=!0))}else I=null;X||(K.push(ea),F=ea)}this.addPoints(R,K,f,l,!1,null,C);R.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=+function(R,c,f,l){return null!=c&&"centerPerimeter"==c.style[mxConstants.STYLE_PERIMETER]?new mxPoint(c.getCenterX(),c.getCenterY()):H.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(R,c,f,l){if(null==c||null==R||"1"!=c.style.snapToPoint&&"1"!=R.style.snapToPoint)S.apply(this,arguments);else{c=this.getTerminalPort(R,c,l);var t=this.getNextPoint(R,f,l),z=this.graph.isOrthogonal(R),C=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||+"0")),F=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=C){var N=Math.cos(-C),K=Math.sin(-C);t=mxUtils.getRotatedPoint(t,N,K,F)}N=parseFloat(R.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(R.style[l?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(c,t,0==C&&z,N);0!=C&&(N=Math.cos(C),K=Math.sin(C),t=mxUtils.getRotatedPoint(t,N,K,F));R.setAbsoluteTerminalPoint(this.snapToAnchorPoint(R,c,f,l,t),l)}};mxGraphView.prototype.snapToAnchorPoint=+function(R,c,f,l,t){if(null!=c&&null!=R){R=this.graph.getAllConnectionConstraints(c);l=f=null;if(null!=R)for(var z=0;z<R.length;z++){var C=this.graph.getConnectionPoint(c,R[z]);if(null!=C){var F=(C.x-t.x)*(C.x-t.x)+(C.y-t.y)*(C.y-t.y);if(null==l||F<l)f=C,l=F}}null!=f&&(t=f)}return t};var G=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(R,c,f){var l=G.apply(this,arguments);"1"==R.getAttribute("placeholders")&&null!=f.state&&(l=f.state.view.graph.replacePlaceholders(f.state.cell,+l));return l};var O=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(R){if(null!=R.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(R.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var f=c.substring(8,c.length-1),l=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(l.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return O.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};mxStencilRegistry.setFileLoaded=function(b){mxStencilRegistry.filesLoaded[b]=!0};-mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var g=mxStencilRegistry.getBasenameForStencil(b);if(null!=g){e=mxStencilRegistry.libraries[g];if(null!=e){if(null==mxStencilRegistry.packages[g]){for(var m=0;m<e.length;m++){var v=e[m];if(!mxStencilRegistry.isFileLoaded(v))if(mxStencilRegistry.setFileLoaded(v),".xml"==v.toLowerCase().substring(v.length-4,v.length))mxStencilRegistry.loadStencilSet(v,-null);else if(".js"==v.toLowerCase().substring(v.length-3,v.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(v);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(A){null!=window.console&&console.log("error in getStencil:",b,g,e,v,A)}}mxStencilRegistry.packages[g]=1}}else g=g.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+g+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};+mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var g=mxStencilRegistry.getBasenameForStencil(b);if(null!=g){e=mxStencilRegistry.libraries[g];if(null!=e){if(null==mxStencilRegistry.packages[g]){for(var m=0;m<e.length;m++){var u=e[m];if(!mxStencilRegistry.isFileLoaded(u))if(mxStencilRegistry.setFileLoaded(u),".xml"==u.toLowerCase().substring(u.length-4,u.length))mxStencilRegistry.loadStencilSet(u,+null);else if(".js"==u.toLowerCase().substring(u.length-3,u.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(u);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(B){null!=window.console&&console.log("error in getStencil:",b,g,e,u,B)}}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<b.length&&"mxgraph"==b[0])){e=b[1];for(var g=2;g<b.length-1;g++)e+="/"+b[g]}return e};-mxStencilRegistry.loadStencilSet=function(b,e,g,m){var v=mxStencilRegistry.packages[b];if(null!=g&&g||null==v){var p=!1;if(null==v)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(A){null!=A&&null!=A.documentElement&&(mxStencilRegistry.packages[b]=A,p=!0,mxStencilRegistry.parseStencilSet(A.documentElement,e,p))}));return}v=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=v;p=!0}catch(A){null!=window.console&&console.log("error in loadStencilSet:",b,A)}null!=v&&null!=-v.documentElement&&mxStencilRegistry.parseStencilSet(v.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(g){e(200<=g.getStatus()&&299>=g.getStatus()?g.getXml():null)}),mxUtils.bind(this,function(g){e(null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};-mxStencilRegistry.parseStencilSet=function(b,e,g){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,g),m=m.nextSibling;else{g=null!=g?g:!0;m=b.firstChild;var v="";b=b.getAttribute("name");for(null!=b&&(v=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){v=v.toLowerCase();var p=b.replace(/ /g,"_");g&&mxStencilRegistry.addStencil(v+p.toLowerCase(),new mxStencil(m));if(null!=e){var A=m.getAttribute("w"),-G=m.getAttribute("h");A=null==A?80:parseInt(A,10);G=null==G?80:parseInt(G,10);e(v,p,b,A,G)}}m=m.nextSibling}}};-"undefined"!==typeof mxVertexHandler&&function(){function b(){var t=document.createElement("div");t.className="geHint";t.style.whiteSpace="nowrap";t.style.position="absolute";return t}function e(t,N){switch(N){case mxConstants.POINTS:return t;case mxConstants.MILLIMETERS:return(t/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(t/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(t/mxConstants.PIXELS_PER_INCH).toFixed(3)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";+mxStencilRegistry.loadStencilSet=function(b,e,g,m){var u=mxStencilRegistry.packages[b];if(null!=g&&g||null==u){var p=!1;if(null==u)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(B){null!=B&&null!=B.documentElement&&(mxStencilRegistry.packages[b]=B,p=!0,mxStencilRegistry.parseStencilSet(B.documentElement,e,p))}));return}u=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=u;p=!0}catch(B){null!=window.console&&console.log("error in loadStencilSet:",b,B)}null!=u&&null!=+u.documentElement&&mxStencilRegistry.parseStencilSet(u.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(g){e(200<=g.getStatus()&&299>=g.getStatus()?g.getXml():null)}),mxUtils.bind(this,function(g){e(null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};+mxStencilRegistry.parseStencilSet=function(b,e,g){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,g),m=m.nextSibling;else{g=null!=g?g:!0;m=b.firstChild;var u="";b=b.getAttribute("name");for(null!=b&&(u=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){u=u.toLowerCase();var p=b.replace(/ /g,"_");g&&mxStencilRegistry.addStencil(u+p.toLowerCase(),new mxStencil(m));if(null!=e){var B=m.getAttribute("w"),+H=m.getAttribute("h");B=null==B?80:parseInt(B,10);H=null==H?80:parseInt(H,10);e(u,p,b,B,H)}}m=m.nextSibling}}};+"undefined"!==typeof mxVertexHandler&&function(){function b(){var x=document.createElement("div");x.className="geHint";x.style.whiteSpace="nowrap";x.style.position="absolute";return x}function e(x,M){switch(M){case mxConstants.POINTS:return x;case mxConstants.MILLIMETERS:return(x/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(x/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(x/mxConstants.PIXELS_PER_INCH).toFixed(3)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=50;mxConstants.HIGHLIGHT_SIZE=5;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;-mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(t){return!mxEvent.isAltDown(t)||mxEvent.isShiftDown(t)};var g=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(t){return g.apply(this,arguments)||this.graph.isTableRow(t)||this.graph.isTableCell(t)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=-function(t){return m.apply(this,arguments)||this.graph.isEdgeIgnored(t)};var v=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(t){return this.graph.isCloneEvent(t)!=v.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var t=new mxEllipse(null,this.highlightColor,this.highlightColor,0);t.opacity=mxConstants.HIGHLIGHT_OPACITY;return t};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(t){t=this.graph.createCurrentEdgeStyle();t=this.graph.createEdge(null,null,null,null,null,t);t=new mxCellState(this.graph.view,t,this.graph.getCellStyle(t));for(var N in this.graph.currentEdgeStyle)t.style[N]=this.graph.currentEdgeStyle[N];if(null!=this.previous){var Q=this.previous.style.newEdgeStyle;if(null!=Q)try{var X=JSON.parse(Q);for(N in X)t.style[N]=X[N]}catch(ia){}}t.style=this.graph.postProcessCellStyle(t.cell,t.style);return t};-var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var t=p.apply(this,arguments);t.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return t};mxConnectionHandler.prototype.updatePreview=function(t){};var A=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var t=A.apply(this,arguments),N=t.getCell;t.getCell=mxUtils.bind(this,function(Q){var X=N.apply(this,arguments);this.error=null;return X});-return t};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var t="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",N="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),Q=0;Q<N.length;Q++)null!=-this.currentEdgeStyle[N[Q]]&&(t+=N[Q]+"="+this.currentEdgeStyle[N[Q]]+";");null!=this.currentEdgeStyle.orthogonalLoop?t+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(t+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?t+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(t+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+-";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(t+="elbow="+this.currentEdgeStyle.elbow+";");return t=null!=this.currentEdgeStyle.html?t+("html="+this.currentEdgeStyle.html+";"):t+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var t=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=-t&&(new mxCodec(t.ownerDocument)).decode(t,this.getStylesheet())};Graph.prototype.createCellLookup=function(t,N){N=null!=N?N:{};for(var Q=0;Q<t.length;Q++){var X=t[Q];N[mxObjectIdentity.get(X)]=X.getId();for(var ia=this.model.getChildCount(X),ka=0;ka<ia;ka++)this.createCellLookup([this.model.getChildAt(X,ka)],N)}return N};Graph.prototype.createCellMapping=function(t,N,Q){Q=null!=Q?Q:{};for(var X in t){var ia=N[X];null==Q[ia]&&(Q[ia]=t[X].getId()||"")}return Q};Graph.prototype.importGraphModel=function(t,-N,Q,X){N=null!=N?N:0;Q=null!=Q?Q:0;var ia=new mxCodec(t.ownerDocument),ka=new mxGraphModel;ia.decode(t,ka);t=[];ia={};var pa={},xa=ka.getChildren(this.cloneCell(ka.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ta=this.createCellLookup([ka.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ka=0;ka<xa.length;ka++)va=this.model.getChildren(this.moveCells([xa[ka]],N,Q,!1,this.model.getRoot())[0]),null!=va&&(t=t.concat(va));else{var va=-ka.getChildren(xa[0]);null!=va&&(t=this.moveCells(va,N,Q,!1,this.getDefaultParent()),pa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=t&&(this.createCellMapping(ia,ta,pa),this.updateCustomLinks(pa,t),X)){this.isGridEnabled()&&(N=this.snap(N),Q=this.snap(Q));var Da=this.getBoundingBoxFromGeometry(t,!0);null!=Da&&this.moveCells(t,N-Da.x,Q-Da.y)}}finally{this.model.endUpdate()}}return t};Graph.prototype.encodeCells=function(t){for(var N={},Q=this.cloneCells(t,null,N),X=-new mxDictionary,ia=0;ia<t.length;ia++)X.put(t[ia],!0);var ka=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ia=0;ia<Q.length;ia++){pa.add(xa,Q[ia]);var ta=this.view.getState(t[ia]);if(null!=ta){var va=this.getCellGeometry(Q[ia]);null!=va&&va.relative&&!this.model.isEdge(t[ia])&&null==X.get(this.model.getParent(t[ia]))&&(va.offset=null,va.relative=!1,va.x=ta.x/ta.view.scale-ta.view.translate.x,va.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(N,-this.createCellLookup(t)),Q);return ka.encode(pa)};Graph.prototype.isSwimlane=function(t,N){var Q=null;null==t||this.model.isEdge(t)||this.model.getParent(t)==this.model.getRoot()||(Q=this.getCurrentCellStyle(t,N)[mxConstants.STYLE_SHAPE]);return Q==mxConstants.SHAPE_SWIMLANE||"table"==Q||"tableRow"==Q};var G=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(t){return null!=t&&G.apply(this,arguments)?this.isTableCell(t)||this.isTableRow(t)?this.isCellEditable(this.model.getParent(t)):-!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(t){return null!=t&&S.apply(this,arguments)?this.isTableCell(t)||this.isTableRow(t)?this.isCellMovable(this.model.getParent(t)):!0:!1};var F=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(t){var N=this.model.getParent(t);if(null!=N){var Q=this.getCurrentCellStyle(N);if(null!=Q.expand)return"0"!=Q.expand}return F.apply(this,arguments)&&(null==N||!this.isTable(N))};var P=Graph.prototype.splitEdge;-Graph.prototype.splitEdge=function(t,N,Q,X,ia,ka,pa,xa){null==xa&&(xa=this.model.getParent(t),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,pa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=P.apply(this,[t,N,Q,X,ia,ka,pa,xa]);this.model.setValue(Q,"");var ta=this.getChildCells(Q,!0);for(N=0;N<ta.length;N++){var va=this.getCellGeometry(ta[N]);null!=va&&va.relative&&0<va.x&&this.model.remove(ta[N])}var Da=this.getChildCells(t,!0);for(N=0;N<Da.length;N++)va=this.getCellGeometry(Da[N]),-null!=va&&va.relative&&0>=va.x&&this.model.remove(Da[N]);var Na=this.model.getTerminal(Q,!1);if(null!=Na){var Ya=this.getCurrentCellStyle(Na);null!=Ya&&"1"==Ya.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[t]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[t]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[Q]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[Q]))}}finally{this.model.endUpdate()}return Q};var R=Graph.prototype.selectCell;Graph.prototype.selectCell=function(t,-N,Q){if(N||Q)R.apply(this,arguments);else{var X=this.getSelectionCell(),ia=null,ka=[],pa=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ka.push(xa),xa==X)ia=ka.length-1;else if(t&&null==X&&0<ka.length||null!=ia&&t&&ka.length>ia||!t&&0<ia)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)pa(this.model.getChildAt(xa,ta))});pa(this.model.root);0<ka.length&&(ia=null!=ia?mxUtils.mod(ia+(t?1:-1),ka.length):0,this.setSelectionCell(ka[ia]))}};-Graph.prototype.swapShapes=function(t,N){if(this.model.isVertex(t)&&this.model.isVertex(N)&&2==this.getMovableCells([t,N]).length){var Q=this.getCellGeometry(t),X=this.getCellGeometry(N);if(null!=Q&&null!=X){var ia=Q.clone(),ka=X.clone();this.model.beginUpdate();try{ia.x=X.getCenterX()-Q.width/2,ia.y=X.getCenterY()-Q.height/2,ka.x=Q.getCenterX()-X.width/2,ka.y=Q.getCenterY()-X.height/2,this.model.setGeometry(t,ia),this.model.setGeometry(N,ka)}finally{this.model.endUpdate()}}}};var T=Graph.prototype.moveCells;-Graph.prototype.moveCells=function(t,N,Q,X,ia,ka,pa){pa=null!=pa?pa:{};if(this.isTable(ia)){for(var xa=[],ta=0;ta<t.length;ta++)this.isTable(t[ta])?xa=xa.concat(this.model.getChildCells(t[ta],!0).reverse()):xa.push(t[ta]);t=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<t.length;ta++)if(null!=ia&&this.isTableRow(t[ta])){var va=this.model.getParent(t[ta]),Da=this.getCellGeometry(t[ta]);this.isTable(va)&&xa.push(va);if(null!=va&&null!=Da&&this.isTable(va)&&this.isTable(ia)&&(X||va!=ia)){if(!X){var Na=-this.getCellGeometry(va);null!=Na&&(Na=Na.clone(),Na.height-=Da.height,this.model.setGeometry(va,Na))}Na=this.getCellGeometry(ia);null!=Na&&(Na=Na.clone(),Na.height+=Da.height,this.model.setGeometry(ia,Na));var Ya=this.model.getChildCells(ia,!0);if(0<Ya.length){t[ta]=X?this.cloneCell(t[ta]):t[ta];var Za=this.model.getChildCells(t[ta],!0),ab=this.model.getChildCells(Ya[0],!0),Ra=ab.length-Za.length;if(0<Ra)for(var Oa=0;Oa<Ra;Oa++){var kb=this.cloneCell(Za[Za.length-1]);null!=kb&&(kb.value="",this.model.add(t[ta],-kb))}else if(0>Ra)for(Oa=0;Oa>Ra;Oa--)this.model.remove(Za[Za.length+Oa-1]);Za=this.model.getChildCells(t[ta],!0);for(Oa=0;Oa<ab.length;Oa++){var cb=this.getCellGeometry(ab[Oa]),$a=this.getCellGeometry(Za[Oa]);null!=cb&&null!=$a&&($a=$a.clone(),$a.width=cb.width,this.model.setGeometry(Za[Oa],$a))}}}}var fb=T.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!X&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&this.model.remove(xa[ta]);X&&this.updateCustomLinks(this.createCellMapping(pa,-this.createCellLookup(t)),fb)}finally{this.model.endUpdate()}return fb};var c=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,N){var Q=[];this.model.beginUpdate();try{for(var X=0;X<t.length;X++)if(this.isTableCell(t[X])){var ia=this.model.getParent(t[X]),ka=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(t,ka)&&0>mxUtils.indexOf(Q,ka)&&Q.push(ka):this.labelChanged(t[X],"")}else{if(this.isTableRow(t[X])&&(ka=this.model.getParent(t[X]),-0>mxUtils.indexOf(t,ka)&&0>mxUtils.indexOf(Q,ka))){for(var pa=this.model.getChildCells(ka,!0),xa=0,ta=0;ta<pa.length;ta++)0<=mxUtils.indexOf(t,pa[ta])&&xa++;xa==pa.length&&Q.push(ka)}Q.push(t[X])}Q=c.apply(this,[Q,N])}finally{this.model.endUpdate()}return Q};Graph.prototype.updateCustomLinks=function(t,N,Q){Q=null!=Q?Q:new Graph;for(var X=0;X<N.length;X++)null!=N[X]&&Q.updateCustomLinksForCell(t,N[X],Q)};Graph.prototype.updateCustomLinksForCell=function(t,N){this.doUpdateCustomLinksForCell(t,N);for(var Q=-this.model.getChildCount(N),X=0;X<Q;X++)this.updateCustomLinksForCell(t,this.model.getChildAt(N,X))};Graph.prototype.doUpdateCustomLinksForCell=function(t,N){};Graph.prototype.getAllConnectionConstraints=function(t,N){if(null!=t){N=mxUtils.getValue(t.style,"points",null);if(null!=N){t=[];try{var Q=JSON.parse(N);for(N=0;N<Q.length;N++){var X=Q[N];t.push(new mxConnectionConstraint(new mxPoint(X[0],X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(ka){}return t}if(null!=-t.shape&&null!=t.shape.bounds){X=t.shape.direction;N=t.shape.bounds;var ia=t.shape.scale;Q=N.width/ia;N=N.height/ia;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=Q,Q=N,N=X;N=t.shape.getConstraints(t.style,Q,N);if(null!=N)return N;if(null!=t.shape.stencil&&null!=t.shape.stencil.constraints)return t.shape.stencil.constraints;if(null!=t.shape.constraints)return t.shape.constraints}}return null};Graph.prototype.flipEdge=function(t){if(null!=t){var N=this.getCurrentCellStyle(t);N=-mxUtils.getValue(N,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,N,[t])}};Graph.prototype.isValidRoot=function(t){for(var N=this.model.getChildCount(t),Q=0,X=0;X<N;X++){var ia=this.model.getChildAt(t,X);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||Q++)}return 0<Q||this.isContainer(t)};Graph.prototype.isValidDropTarget=function(t,N,-Q){for(var X=this.getCurrentCellStyle(t),ia=!0,ka=!0,pa=0;pa<N.length&&ka;pa++)ia=ia&&this.isTable(N[pa]),ka=ka&&this.isTableRow(N[pa]);return!this.isCellLocked(t)&&(this.isTargetShape(t,N,Q)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(t))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(t))&&!this.isTableRow(t)&&(!this.isTable(t)||ka||ia))};Graph.prototype.createGroupCell=function(){var t=mxGraph.prototype.createGroupCell.apply(this,-arguments);t.setStyle("group");return t};Graph.prototype.isExtendParentsOnAdd=function(t){var N=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(N&&null!=t&&null!=this.layoutManager){var Q=this.model.getParent(t);null!=Q&&(Q=this.layoutManager.getLayout(Q),null!=Q&&Q.constructor==mxStackLayout&&(N=!1))}return N};Graph.prototype.getPreferredSizeForCell=function(t,N,Q){Q=null!=Q?Q:this.gridEnabled;var X=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=X&&(X.width+=-10,X.height+=4,Q&&(X.width=this.snap(X.width),X.height=this.snap(X.height)));return X};Graph.prototype.turnShapes=function(t,N){var Q=this.getModel(),X=[];Q.beginUpdate();try{for(var ia=0;ia<t.length;ia++){var ka=t[ia];if(Q.isEdge(ka)){var pa=Q.getTerminal(ka,!0),xa=Q.getTerminal(ka,!1);Q.setTerminal(ka,xa,!0);Q.setTerminal(ka,pa,!1);var ta=Q.getGeometry(ka);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var va=ta.getTerminalPoint(!0),Da=ta.getTerminalPoint(!1);ta.setTerminalPoint(va,-!1);ta.setTerminalPoint(Da,!0);Q.setGeometry(ka,ta);var Na=this.view.getState(ka),Ya=this.view.getState(pa),Za=this.view.getState(xa);if(null!=Na){var ab=null!=Ya?this.getConnectionConstraint(Na,Ya,!0):null,Ra=null!=Za?this.getConnectionConstraint(Na,Za,!1):null;this.setConnectionConstraint(ka,pa,!0,Ra);this.setConnectionConstraint(ka,xa,!1,ab);var Oa=mxUtils.getValue(Na.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Na.style,-mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ka]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Oa,[ka])}X.push(ka)}}else if(Q.isVertex(ka)&&(ta=this.getCellGeometry(ka),null!=ta)){if(!(this.isTable(ka)||this.isTableRow(ka)||this.isTableCell(ka)||this.isSwimlane(ka))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var kb=ta.width;ta.width=ta.height;ta.height=kb;Q.setGeometry(ka,ta)}var cb=this.view.getState(ka);if(null!=cb){var $a=[mxConstants.DIRECTION_EAST,-mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],fb=mxUtils.getValue(cb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,$a[mxUtils.mod(mxUtils.indexOf($a,fb)+(N?-1:1),$a.length)],[ka])}X.push(ka)}}}finally{Q.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(t){if(null!=t&&null!=t.fgNode)for(t=t.fgNode.firstChild;null!=t;){if("text"==t.nodeName&&"1"==t.getAttribute("placeholders"))return!0;-t=t.nextSibling}return!1};var f=Graph.prototype.processChange;Graph.prototype.processChange=function(t){if(t instanceof mxGeometryChange&&(this.isTableCell(t.cell)||this.isTableRow(t.cell))&&(null==t.previous&&null!=t.geometry||null!=t.previous&&!t.previous.equals(t.geometry))){var N=t.cell;this.isTableCell(N)&&(N=this.model.getParent(N));this.isTableRow(N)&&(N=this.model.getParent(N));var Q=this.view.getState(N);null!=Q&&null!=Q.shape&&(this.view.invalidate(N),Q.shape.bounds=null)}f.apply(this,arguments);-t instanceof mxValueChange&&null!=t.cell&&null!=t.cell.value&&"object"==typeof t.cell.value&&this.invalidateDescendantsWithPlaceholders(t.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(t){t=this.model.getDescendants(t);if(0<t.length)for(var N=0;N<t.length;N++){var Q=this.view.getState(t[N]);null!=Q&&null!=Q.shape&&null!=Q.shape.stencil&&this.stencilHasPlaceholders(Q.shape.stencil)?this.removeStateForCell(t[N]):this.isReplacePlaceholders(t[N])&&this.view.invalidate(t[N],!1,!1)}};-Graph.prototype.replaceElement=function(t,N){N=t.ownerDocument.createElement(null!=N?N:"span");for(var Q=Array.prototype.slice.call(t.attributes);attr=Q.pop();)N.setAttribute(attr.nodeName,attr.nodeValue);N.innerHTML=t.innerHTML;t.parentNode.replaceChild(N,t)};Graph.prototype.processElements=function(t,N){if(null!=t){t=t.getElementsByTagName("*");for(var Q=0;Q<t.length;Q++)null!=t[Q]&&N(t[Q])}};Graph.prototype.updateLabelElements=function(t,N,Q){t=null!=t?t:this.getSelectionCells();for(var X=document.createElement("div"),-ia=0;ia<t.length;ia++){var ka=this.getCurrentCellStyle(t[ia]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(t[ia]),null!=ka&&0<ka.length)){X.innerHTML=Graph.sanitizeHtml(ka);for(var pa=X.getElementsByTagName(null!=Q?Q:"*"),xa=0;xa<pa.length;xa++)N(pa[xa]);X.innerHTML!=ka&&this.cellLabelChanged(t[ia],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(t,N,Q){N=Graph.zapGremlins(N);this.model.beginUpdate();try{if(null!=t.value&&"object"==typeof t.value){if(this.isReplacePlaceholders(t)&&-null!=t.getAttribute("placeholder"))for(var X=t.getAttribute("placeholder"),ia=t;null!=ia;){if(ia==this.model.getRoot()||null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(X)){this.setAttributeForCell(ia,X,N);break}ia=this.model.getParent(ia)}var ka=t.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,N):ka.setAttribute("label",N);N=ka}mxGraph.prototype.cellLabelChanged.apply(this,-arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(t){if(null!=t){for(var N=new mxDictionary,Q=0;Q<t.length;Q++)N.put(t[Q],!0);var X=[];for(Q=0;Q<t.length;Q++){var ia=this.model.getParent(t[Q]);null==ia||N.get(ia)||(N.put(ia,!0),X.push(ia))}for(Q=0;Q<X.length;Q++)if(ia=this.view.getState(X[Q]),null!=ia&&(this.model.isEdge(ia.cell)||this.model.isVertex(ia.cell))&&this.isCellDeletable(ia.cell)&&this.isTransparentState(ia)){for(var ka=!0,pa=0;pa<this.model.getChildCount(ia.cell)&&-ka;pa++)N.get(this.model.getChildAt(ia.cell,pa))||(ka=!1);ka&&t.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(t){for(var N=[],Q=0;Q<t.length;Q++)this.isCellDeletable(t[Q])&&this.isTransparentState(this.view.getState(t[Q]))&&N.push(t[Q]);t=N;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(t,N){this.setAttributeForCell(t,"link",N)};Graph.prototype.setTooltipForCell=function(t,-N){var Q="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(t.value)&&t.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(t,Q,N)};Graph.prototype.getAttributeForCell=function(t,N,Q){t=null!=t.value&&"object"===typeof t.value?t.value.getAttribute(N):null;return null!=t?t:Q};Graph.prototype.setAttributeForCell=function(t,N,Q){if(null!=t.value&&"object"==typeof t.value)var X=t.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),-X.setAttribute("label",t.value||"");null!=Q?X.setAttribute(N,Q):X.removeAttribute(N);this.model.setValue(t,X)};Graph.prototype.isTargetShape=function(t,N,Q){t=mxUtils.getValue(this.getCurrentCellStyle(t),mxConstants.STYLE_SHAPE,"");for(Q=0;Q<N.length;Q++){var X=mxUtils.getValue(this.getCurrentCellStyle(N[Q]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(X,t))return!0}return!1};var k=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(t,N,Q,X){if(mxEvent.isAltDown(N))return null;-for(var ia=0;ia<t.length;ia++){var ka=this.model.getParent(t[ia]);if(this.model.isEdge(ka)&&0>mxUtils.indexOf(t,ka))return null}ka=k.apply(this,arguments);var pa=!0;for(ia=0;ia<t.length&&pa;ia++)pa=pa&&this.isTableRow(t[ia]);pa&&(this.isTableCell(ka)&&(ka=this.model.getParent(ka)),this.isTableRow(ka)&&(ka=this.model.getParent(ka)),this.isTable(ka)||(ka=null));return ka};Graph.prototype.click=function(t){mxGraph.prototype.click.call(this,t);this.firstClickState=t.getState();this.firstClickSource=t.getSource()};-Graph.prototype.dblClick=function(t,N){this.isEnabled()&&(N=this.insertTextForEvent(t,N),mxGraph.prototype.dblClick.call(this,t,N))};Graph.prototype.insertTextForEvent=function(t,N){var Q=mxUtils.convertPoint(this.container,mxEvent.getClientX(t),mxEvent.getClientY(t));if(null!=t&&!this.model.isVertex(N)){var X=this.model.isEdge(N)?this.view.getState(N):null,ia=mxEvent.getSource(t);this.firstClickState!=X||this.firstClickSource!=ia||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&-(mxUtils.contains(X.text.boundingBox,Q.x,Q.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(t)))||(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==X&&(X=this.view.getState(this.getCellAt(Q.x,Q.y))),N=this.addText(Q.x,Q.y,X))}return N};Graph.prototype.getInsertPoint=function(){var t=this.getGridSize(),N=this.container.scrollLeft/this.view.scale-this.view.translate.x,Q=-this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),ia=this.getPageSize();N=Math.max(N,X.x*ia.width);Q=Math.max(Q,X.y*ia.height)}return new mxPoint(this.snap(N+t),this.snap(Q+t))};Graph.prototype.getFreeInsertPoint=function(){var t=this.view,N=this.getGraphBounds(),Q=this.getInsertPoint(),X=this.snap(Math.round(Math.max(Q.x,N.x/t.scale-t.translate.x+(0==N.width?2*this.gridSize:0))));t=this.snap(Math.round(Math.max(Q.y,(N.y+N.height)/t.scale--t.translate.y+2*this.gridSize)));return new mxPoint(X,t)};Graph.prototype.getCenterInsertPoint=function(t){t=null!=t?t:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-t.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/-2/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-t.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(t,N){t=null!=t?t:"";null!=N&&(0<t.length&&";"!=t.charAt(t.length-1)&&(t+=";"),t+="fontSize="+N+";");return t};Graph.prototype.addText=function(t,N,Q){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,0,0,0);X.vertex=!0;if(null!=Q&&this.model.isEdge(Q.cell)){X.style=-"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);X.geometry.relative=!0;X.connectable=!1;var ia=this.view.getRelativePoint(Q,t,N);X.geometry.x=Math.round(1E4*ia.x)/1E4;X.geometry.y=Math.round(ia.y);X.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(Q,X.geometry);var ka=this.view.scale;X.geometry.offset=new mxPoint(Math.round((t-ia.x)/ka),Math.round((N-ia.y)/ka))}else ia=this.view.translate,X.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",-this.vertexFontSize),X.geometry.width=40,X.geometry.height=20,X.geometry.x=Math.round(t/this.view.scale)-ia.x-(null!=Q?Q.origin.x:0),X.geometry.y=Math.round(N/this.view.scale)-ia.y-(null!=Q?Q.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=Q?Q.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(t,N,Q){var X=mxUtils.bind(this,-function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var va=0;va<ta.length;va++){var Da=this.getAbsoluteUrl(ta[va].getAttribute("href"));null!=Da&&(ta[va].setAttribute("rel",this.linkRelation),ta[va].setAttribute("href",Da),null!=N&&mxEvent.addGestureListeners(ta[va],null,null,N))}});this.model.addListener(mxEvent.CHANGE,X);X();var ia=this.container.style.cursor,ka=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=t&&""!=t&&-t!=mxConstants.NONE?new mxCellHighlight(pa,t,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var va=ta.sourceState;if(null==va||null==pa.getLinkForCell(va.cell))ta=pa.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(Da,Na,Ya){return null==pa.getLinkForCell(Da.cell)}),va=null==va||pa.model.isAncestor(ta,va.cell)?pa.view.getState(ta):null;va!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=va,null!=this.currentState&&this.activate(this.currentState))},-mouseDown:function(ta,va){this.startX=va.getGraphX();this.startY=va.getGraphY();this.scrollLeft=pa.container.scrollLeft;this.scrollTop=pa.container.scrollTop;null==this.currentLink&&"auto"==pa.container.style.overflow&&(pa.container.style.cursor="move");this.updateCurrentState(va)},mouseMove:function(ta,va){if(pa.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-va.getGraphX()),va=Math.abs(this.startY-va.getGraphY()),(ta>ka||va>ka)&&this.clear());else{for(ta=va.getSource();null!=ta&&"a"!=-ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=pa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&pa.tooltipHandler.reset(va,!0,this.currentState),(null==this.currentState||va.getState()!=this.currentState&&null!=va.sourceState||!pa.intersects(this.currentState,va.getGraphX(),va.getGraphY()))&&this.updateCurrentState(va))}},mouseUp:function(ta,va){var Da=va.getSource();for(ta=va.getEvent();null!=Da&&"a"!=Da.nodeName.toLowerCase();)Da=Da.parentNode;null==-Da&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-pa.container.scrollTop)<ka&&(null==va.sourceState||!va.isSource(va.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(Da=pa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Da||null==N||N(ta,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ta)||-(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":Da?pa.linkTarget:"_top",pa.openLink(this.currentLink,ta),va.consume())):null!=Q&&!va.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-pa.container.scrollTop)<ka&&Math.abs(this.startX-va.getGraphX())<ka&&Math.abs(this.startY-va.getGraphY())<ka&&Q(va.getEvent()));this.clear()},activate:function(ta){this.currentLink=pa.getAbsoluteUrl(pa.getLinkForCell(ta.cell));null!=this.currentLink&&-(this.currentTarget=pa.getLinkTargetForCell(ta.cell),pa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=pa.container&&(pa.container.style.cursor=ia);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=pa.tooltipHandler&&pa.tooltipHandler.hide()}};pa.click=function(ta){};pa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=-function(t,N){t=null!=t?t:this.getSelectionCells();N=null!=N?N:!0;for(var Q=0;Q<t.length;Q++)this.isTableCell(t[Q])&&(t[Q]=this.model.getParent(t[Q]));t=this.model.getTopmostCells(t);var X=this.getModel(),ia=this.gridSize,ka=[];X.beginUpdate();try{var pa={},xa=this.createCellLookup(t),ta=this.cloneCells(t,!1,pa,!0);for(Q=0;Q<t.length;Q++){var va=X.getParent(t[Q]);if(null!=va){var Da=this.moveCells([ta[Q]],ia,ia,!1)[0];ka.push(Da);if(N)X.add(va,ta[Q]);else{var Na=va.getIndex(t[Q]);X.add(va,ta[Q],Na+-1)}if(this.isTable(va)){var Ya=this.getCellGeometry(ta[Q]),Za=this.getCellGeometry(va);null!=Ya&&null!=Za&&(Za=Za.clone(),Za.height+=Ya.height,X.setGeometry(va,Za))}}else ka.push(ta[Q])}this.updateCustomLinks(this.createCellMapping(pa,xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{X.endUpdate()}return ka};Graph.prototype.insertImage=function(t,N,Q){if(null!=t&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ia=-[],ka=0;ka<X.length;ka++)ia.push(X[ka]);document.execCommand("insertimage",!1,t);t=this.cellEditor.textarea.getElementsByTagName("img");if(t.length==ia.length+1)for(ka=t.length-1;0<=ka;ka--)if(0==ka||t[ka]!=ia[ka-1]){t[ka].setAttribute("width",N);t[ka].setAttribute("height",Q);break}}};Graph.prototype.insertLink=function(t){if(null!=this.cellEditor.textarea)if(0==t.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var N=this.cellEditor.textarea.getElementsByTagName("a"),Q=[],X=-0;X<N.length;X++)Q.push(N[X]);document.execCommand("createlink",!1,mxUtils.trim(t));N=this.cellEditor.textarea.getElementsByTagName("a");if(N.length==Q.length+1)for(X=N.length-1;0<=X;X--)if(N[X]!=Q[X-1]){for(N=N[X].getElementsByTagName("a");0<N.length;){for(Q=N[0].parentNode;null!=N[0].firstChild;)Q.insertBefore(N[0].firstChild,N[0]);Q.removeChild(N[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(t))};Graph.prototype.isCellResizable=function(t){var N=mxGraph.prototype.isCellResizable.apply(this,-arguments),Q=this.getCurrentCellStyle(t);return!this.isTableCell(t)&&!this.isTableRow(t)&&(N||"0"!=mxUtils.getValue(Q,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==Q[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(t,N,Q){null==N&&(N=this.getSelectionCells());if(null!=N&&1<N.length){for(var X=[],ia=null,ka=null,pa=0,xa=0;xa<N.length;xa++)if(this.getModel().isVertex(N[xa])){var ta=this.view.getState(N[xa]);if(null!=ta){var va=t?ta.getCenterX():ta.getCenterY();ia=null!=ia?Math.max(ia,-va):va;ka=null!=ka?Math.min(ka,va):va;Q&&(pa+=t?ta.width:ta.height);X.push(ta)}}if(2<X.length){X.sort(function(ab,Ra){return t?ab.x-Ra.x:ab.y-Ra.y});Q&&(pa-=t?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);ta=this.view.translate;va=this.view.scale;ka=ka/va-(t?ta.x:ta.y);ia=ia/va-(t?ta.x:ta.y);this.getModel().beginUpdate();try{var Da=(ia-ka-pa)/(X.length-1),Na=ka+(Q?t?X[0].width/2:X[0].height/2:0);for(xa=1;xa<X.length-1;xa++){var Ya=this.view.getState(this.model.getParent(X[xa].cell)),-Za=this.getCellGeometry(X[xa].cell);Na+=Da;null!=Za&&null!=Ya&&(Za=Za.clone(),t?Za.x=Math.round(Na-(Q?0:Za.width/2))-Ya.origin.x:Za.y=Math.round(Na-(Q?0:Za.height/2))-Ya.origin.y,this.getModel().setGeometry(X[xa].cell,Za));Q&&(Na+=t?X[xa].width:X[xa].height)}}finally{this.getModel().endUpdate()}}}return N};Graph.prototype.isCloneEvent=function(t){return mxClient.IS_MAC&&mxEvent.isMetaDown(t)||mxEvent.isControlDown(t)};Graph.prototype.createSvgImageExport=function(t){t=new mxImageExport;t.addCellData=-function(Q,X,ia){X.setAttribute("data-cell-id",Q.id);if(ia)if(mxUtils.isNode(Q.value))for(ia=0;ia<Q.value.attributes.length;ia++){var ka=Q.value.attributes[ia];X.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof Q.value)for(ka in Q.value)X.setAttribute("data-cell-"+ka,Q.value[ka]);else null!=Q.value&&X.setAttribute("data-cell-value",Q.value);return X};var N=t.visitStatesRecursive;t.visitStatesRecursive=function(Q,X,ia){if(null!=Q){var ka=X.root,pa=X.root.ownerDocument;X.root=this.addCellData(Q.cell,-null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),Editor.addSvgMetadata);ka.appendChild(X.root);N.apply(this,arguments);X.root=ka}};t.getLinkForCellState=mxUtils.bind(this,function(Q,X){return this.getLinkForCell(Q.cell)});t.getTitleForCellState=mxUtils.bind(this,function(Q,X){return Editor.convertHtmlToText(this.convertValueToTooltip(Q.cell))});return t};Graph.prototype.parseBackgroundImage=function(t){var N=null;null!=t&&0<t.length&&(t=JSON.parse(t),N=new mxImage(t.src,-t.width,t.height));return N};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,N,Q,X,ia,ka,pa,xa,ta,va,Da,Na,Ya,Za,ab,Ra){var Oa=null;if(null!=Za)for(Oa=new mxDictionary,Da=0;Da<Za.length;Da++)Oa.put(Za[Da],!0);Za=this.useCssTransforms;var kb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Za&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{N=null!=N?N:1;Q=null!=Q?Q:0;ia=null!=ia?ia:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:-!0;va=null!=va?va:!1;var cb="page"==Ya?this.view.getBackgroundPageBounds():ka&&null==Oa||X||"diagram"==Ya?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),$a=this.backgroundImage,fb=this.view.translate,jb=this.view.scale;"diagram"==Ya&&null!=$a&&null!=$a.width&&null!=$a.height&&(cb=mxRectangle.fromRectangle(cb),cb.add(new mxRectangle((fb.x+$a.x)*jb,(fb.y+$a.y)*jb,$a.width*jb,$a.height*jb)));if(null==cb)throw Error(mxResources.get("drawingEmpty"));X=N/jb;var sb=Math.max(1,Math.ceil(cb.width*-X)+2*Q)+(va&&0==Q?5:0),Ab=Math.max(1,Math.ceil(cb.height*X)+2*Q)+(va&&0==Q?5:0);va=ia?-.5:0;var nb=mxUtils.getLightDarkColor(t),lb=Graph.createSvgNode(va,va,sb,Ab,nb),db=lb.ownerDocument;if(null!=t){var mb=mxUtils.createElementNs(db,mxConstants.NS_SVG,"rect");mb.setAttribute("fill",nb.light);mb.style.fill=nb.cssText;mb.setAttribute("width","100%");mb.setAttribute("height","100%");mb.setAttribute("x","0");mb.setAttribute("y","0");lb.appendChild(mb)}var ub=mxUtils.createElementNs(db,mxConstants.NS_SVG,-"g");lb.appendChild(ub);var eb=this.createSvgCanvas(ub);eb.foOffset=ia?-.5:0;eb.textOffset=ia?-.5:0;eb.imageOffset=ia?-.5:0;eb.translate(Math.floor(Q/N-cb.x/jb),Math.floor(Q/N-cb.y/jb));eb.idPrefix="drawio-svg-"+Editor.guid();var ob=document.createElement("div"),tb=eb.getAlternateText;eb.getAlternateText=function(hb,Bb,rb,yb,zb,qb,Cb,d,n,y,q,x,D){if(null!=qb&&0<this.state.fontSize)try{mxUtils.isNode(qb)?qb=qb.innerText:(ob.innerHTML=qb,qb=mxUtils.extractTextWithWhitespace(ob.childNodes));for(var E=-Math.ceil(2*yb/this.state.fontSize),ha=[],M=0,wa=0;(0==E||M<E)&&wa<qb.length;){var na=qb.charCodeAt(wa);if(10==na||13==na){if(0<M)break}else ha.push(qb.charAt(wa)),255>na&&M++;wa++}ha.length<qb.length&&1<qb.length-ha.length&&(qb=mxUtils.trim(ha.join(""))+"...");return qb}catch(Va){return tb.apply(this,arguments)}else return tb.apply(this,arguments)};null!=$a&&null!=$a.width&&null!=$a.height&&(t=jb/N,va=new mxRectangle(($a.x+fb.x)*t,($a.y+fb.y)*t,$a.width*t,$a.height*t),mxUtils.intersects(cb,va)&&-eb.image($a.x+fb.x,$a.y+fb.y,$a.width,$a.height,$a.src,!0));eb.scale(X);eb.textEnabled=pa;xa=null!=xa?xa:this.createSvgImageExport();var pb=xa.getLinkForCellState;xa.getLinkForCellState=function(hb,Bb){var rb=hb.view.graph.getAbsoluteUrl(pb.apply(this,arguments));return null==rb||hb.view.graph.isCustomLink(rb)?null:rb};xa.getLinkTargetForCellState=function(hb,Bb){return hb.view.graph.getLinkTargetForCell(hb.cell)};var wb=xa.drawCellState,vb=null,xb=mxUtils.bind(this,function(){if(null==vb){vb="ge-flow-animation-"+-Editor.guid();var hb=null!=db.createElementNS?db.createElementNS(mxConstants.NS_SVG,"style"):db.createElement("style");hb.innerHTML=this.createFlowAnimationCss(vb);db.getElementsByTagName("defs")[0].appendChild(hb)}return vb});xa.drawCellState=function(hb,Bb){for(var rb=hb.view.graph,yb=null!=Oa?Oa.get(hb.cell):rb.isCellSelected(hb.cell),zb=rb.model.getParent(hb.cell);!(ka&&null==Oa||yb)&&null!=zb;)yb=null!=Oa?Oa.get(zb):rb.isCellSelected(zb),zb=rb.model.getParent(zb);if(null!=hb.shape)try{var qb=-hb.shape.isFlowAnimationEnabled,Cb=hb.shape.addFlowAnimationToShape;hb.shape.isFlowAnimationEnabled=function(){return kb&&rb.model.isEdge(hb.cell)&&"1"==mxUtils.getValue(hb.style,"flowAnimation","0")};hb.shape.addFlowAnimationToShape=function(){rb.addFlowAnimationToNode(this.getFlowAnimationPath(),hb.style,N,xb())};if(ka&&null==Oa||yb)rb.view.redrawEnumerationState(hb),wb.apply(this,arguments),this.doDrawShape(hb.secondLabel,Bb)}finally{hb.shape.isFlowAnimationEnabled=qb,hb.shape.addFlowAnimationToShape=-Cb}};var ib=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(ib),eb);this.addForeignObjectWarning(eb,lb);Ra?this.disableSvgLinks(lb):this.updateSvgLinks(lb,ta,!0);return lb}finally{this.enableFlowAnimation=kb,Za&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(t,N){if("0"!=urlParams["svg-warning"]&&0<N.getElementsByTagName("foreignObject").length){var Q=t.createElement("switch"),-X=t.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=t.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||N.ownerDocument!=document&&null==document.documentMode?(ia.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ia.setAttribute("target","_blank")):(ia.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ia.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));-t=t.createElement("text");t.setAttribute("text-anchor","middle");t.setAttribute("font-size","10px");t.setAttribute("x","50%");t.setAttribute("y","100%");mxUtils.write(t,Graph.foreignObjectWarningText);Q.appendChild(X);ia.appendChild(t);Q.appendChild(ia);N.appendChild(Q)}};Graph.prototype.disableSvgLinks=function(t,N){t=t.getElementsByTagName("a");for(var Q=0;Q<t.length;Q++){var X=t[Q].getAttribute("href");null==X&&(X=t[Q].getAttribute("xlink:href"));null!=X&&(t[Q].style.pointerEvents="none",t[Q].setAttribute("href",-""));N&&N(t[Q])}};Graph.prototype.updateSvgLinks=function(t,N,Q){t=t.getElementsByTagName("a");for(var X=0;X<t.length;X++)if(null==t[X].getAttribute("target")){var ia=t[X].getAttribute("href");null==ia&&(ia=t[X].getAttribute("xlink:href"));null!=ia&&(null!=N&&/^https?:\/\//.test(ia)?t[X].setAttribute("target",N):Q&&this.isCustomLink(ia)&&t[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(t){t=new mxSvgCanvas2D(t);t.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;-t.adaptiveColors=this.getAdaptiveColors();t.pointerEvents=!0;return t};Graph.prototype.getSelectedElement=function(){var t=null;if(window.getSelection){var N=window.getSelection();N.getRangeAt&&N.rangeCount&&(t=N.getRangeAt(0).commonAncestorContainer)}else document.selection&&(t=document.selection.createRange().parentElement());return t};Graph.prototype.getSelectedEditingElement=function(){var t=null;if(null!=this.cellEditor.textarea)for(t=this.getSelectedElement();null!=t&&t.nodeType!=mxConstants.NODETYPE_ELEMENT;)t=-t.parentNode;return t};Graph.prototype.getParentByName=function(t,N,Q){for(;null!=t&&t.nodeName!=N;){if(t==Q)return null;t=t.parentNode}return t};Graph.prototype.getParentByNames=function(t,N,Q){for(;null!=t&&!(0<=mxUtils.indexOf(N,t.nodeName));){if(t==Q)return null;t=t.parentNode}return t};Graph.prototype.selectNode=function(t){var N=null;if(window.getSelection){if(N=window.getSelection(),N.getRangeAt&&N.rangeCount){var Q=document.createRange();Q.selectNode(t);N.removeAllRanges();N.addRange(Q)}}else(N=-document.selection)&&"Control"!=N.type&&(t=N.createRange(),t.collapse(!0),Q=N.createRange(),Q.setEndPoint("StartToStart",t),Q.select())};Graph.prototype.flipEdgePoints=function(t,N,Q){var X=this.getCellGeometry(t);if(null!=X){X=X.clone();if(null!=X.points)for(var ia=0;ia<X.points.length;ia++)N?X.points[ia].x=Q+(Q-X.points[ia].x):X.points[ia].y=Q+(Q-X.points[ia].y);ia=function(ka){null!=ka&&(N?ka.x=Q+(Q-ka.x):ka.y=Q+(Q-ka.y))};ia(X.getTerminalPoint(!0));ia(X.getTerminalPoint(!1));this.model.setGeometry(t,-X)}};Graph.prototype.flipChildren=function(t,N,Q){this.model.beginUpdate();try{for(var X=this.model.getChildCount(t),ia=0;ia<X;ia++){var ka=this.model.getChildAt(t,ia);if(this.model.isEdge(ka))this.flipEdgePoints(ka,N,Q);else{var pa=this.getCellGeometry(ka);null!=pa&&(pa=pa.clone(),N?pa.x=Q+(Q-pa.x-pa.width):pa.y=Q+(Q-pa.y-pa.height),this.model.setGeometry(ka,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,N){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);-for(var Q=[],X=0;X<t.length;X++)if(this.model.isEdge(t[X])){var ia=this.view.getState(t[X]);null!=ia&&this.flipEdgePoints(t[X],N,(N?ia.getCenterX():ia.getCenterY())/this.view.scale-(N?ia.origin.x:ia.origin.y)-(N?this.view.translate.x:this.view.translate.y))}else{var ka=this.getCellGeometry(t[X]);null!=ka&&this.flipChildren(t[X],N,N?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);Q.push(t[X])}this.toggleCellStyles(N?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,Q)}finally{this.model.endUpdate()}};-Graph.prototype.deleteCells=function(t,N){var Q=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var X=0;X<t.length;X++){var ia=this.model.getParent(t[X]);if(this.isTable(ia)){var ka=this.getCellGeometry(t[X]),pa=this.getCellGeometry(ia);null!=ka&&null!=pa&&(pa=pa.clone(),pa.height-=ka.height,this.model.setGeometry(ia,pa))}}var xa=this.selectParentAfterDelete?this.model.getParents(t):null;this.removeCells(t,N)}finally{this.model.endUpdate()}if(null!=xa)for(Q=[],X=0;X<xa.length;X++)this.model.contains(xa[X])&&-(this.model.isVertex(xa[X])||this.model.isEdge(xa[X]))&&Q.push(xa[X])}return Q};Graph.prototype.insertTableColumn=function(t,N){var Q=this.getModel();Q.beginUpdate();try{var X=t,ia=0;if(this.isTableCell(t)){var ka=Q.getParent(t);X=Q.getParent(ka);ia=mxUtils.indexOf(Q.getChildCells(ka,!0),t)}else this.isTableRow(t)?X=Q.getParent(t):t=Q.getChildCells(X,!0)[0],N||(ia=Q.getChildCells(t,!0).length-1);var pa=Q.getChildCells(X,!0),xa=Graph.minTableColumnWidth;for(t=0;t<pa.length;t++){var ta=Q.getChildCells(pa[t],-!0)[ia],va=Q.cloneCell(ta,!1);null==va&&(va=this.createVertex());var Da=this.getCellGeometry(va);va.value=null;va.style=mxUtils.setStyle(mxUtils.setStyle(va.style,"rowspan",null),"colspan",null);if(null!=Da){null!=Da.alternateBounds&&(Da.width=Da.alternateBounds.width,Da.height=Da.alternateBounds.height,Da.alternateBounds=null);xa=Da.width;var Na=this.getCellGeometry(pa[t]);null!=Na&&(Da.height=Na.height)}Q.add(pa[t],va,ia+(N?0:1))}var Ya=this.getCellGeometry(X);null!=Ya&&(Ya=Ya.clone(),Ya.width+=-xa,Q.setGeometry(X,Ya))}finally{Q.endUpdate()}};Graph.prototype.deleteLane=function(t){var N=this.getModel();N.beginUpdate();try{var Q=null;Q="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:N.getParent(t);var X=N.getChildCells(Q,!0);0==X.length?N.remove(Q):(Q==t&&(t=X[X.length-1]),N.remove(t))}finally{N.endUpdate()}};Graph.prototype.insertLane=function(t,N){var Q=this.getModel();Q.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(t).childLayout){X=t;var ia=Q.getChildCells(X,-!0);t=ia[N?0:ia.length-1]}else X=Q.getParent(t);var ka=X.getIndex(t);t=Q.cloneCell(t,!1);t.value=null;Q.add(X,t,ka+(N?0:1))}finally{Q.endUpdate()}};Graph.prototype.insertTableRow=function(t,N){var Q=this.getModel();Q.beginUpdate();try{var X=t,ia=t;if(this.isTableCell(t))ia=Q.getParent(t),X=Q.getParent(ia);else if(this.isTableRow(t))X=Q.getParent(t);else{var ka=Q.getChildCells(X,!0);ia=ka[N?0:ka.length-1]}var pa=Q.getChildCells(ia,!0),xa=X.getIndex(ia);ia=Q.cloneCell(ia,!1);ia.value=null;var ta=this.getCellGeometry(ia);-if(null!=ta){for(ka=0;ka<pa.length;ka++){t=Q.cloneCell(pa[ka],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var va=this.getCellGeometry(t);null!=va&&(null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null),va.height=ta.height);ia.insert(t)}Q.add(X,ia,xa+(N?0:1));var Da=this.getCellGeometry(X);null!=Da&&(Da=Da.clone(),Da.height+=ta.height,Q.setGeometry(X,Da))}}finally{Q.endUpdate()}};-Graph.prototype.deleteTableColumn=function(t){var N=this.getModel();N.beginUpdate();try{var Q=t,X=t;this.isTableCell(t)&&(X=N.getParent(t));this.isTableRow(X)&&(Q=N.getParent(X));var ia=N.getChildCells(Q,!0);if(0==ia.length)N.remove(Q);else{this.isTableRow(X)||(X=ia[0]);var ka=N.getChildCells(X,!0);if(1>=ka.length)N.remove(Q);else{var pa=ka.length-1;this.isTableCell(t)&&(pa=mxUtils.indexOf(ka,t));for(X=t=0;X<ia.length;X++){var xa=N.getChildCells(ia[X],!0)[pa];N.remove(xa);var ta=this.getCellGeometry(xa);-null!=ta&&(t=Math.max(t,ta.width))}var va=this.getCellGeometry(Q);null!=va&&(va=va.clone(),va.width-=t,N.setGeometry(Q,va))}}}finally{N.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var N=this.getModel();N.beginUpdate();try{var Q=t,X=t;this.isTableCell(t)&&(t=X=N.getParent(t));this.isTableRow(t)&&(Q=N.getParent(X));var ia=N.getChildCells(Q,!0);if(1>=ia.length)N.remove(Q);else{this.isTableRow(X)||(X=ia[ia.length-1]);N.remove(X);t=0;var ka=this.getCellGeometry(X);null!=ka&&(t=ka.height);-var pa=this.getCellGeometry(Q);null!=pa&&(pa=pa.clone(),pa.height-=t,N.setGeometry(Q,pa))}}finally{N.endUpdate()}};Graph.prototype.insertRow=function(t,N){for(var Q=t.tBodies[0],X=Q.rows[0].cells,ia=t=0;ia<X.length;ia++){var ka=X[ia].getAttribute("colspan");t+=null!=ka?parseInt(ka):1}N=Q.insertRow(N);for(ia=0;ia<t;ia++)mxUtils.br(N.insertCell(-1));return N.cells[0]};Graph.prototype.deleteRow=function(t,N){t.tBodies[0].deleteRow(N)};Graph.prototype.insertColumn=function(t,N){var Q=t.tHead;if(null!=-Q)for(var X=0;X<Q.rows.length;X++){var ia=document.createElement("th");Q.rows[X].appendChild(ia);mxUtils.br(ia)}t=t.tBodies[0];for(Q=0;Q<t.rows.length;Q++)X=t.rows[Q].insertCell(N),mxUtils.br(X);return t.rows[0].cells[0<=N?N:t.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(t,N){if(0<=N){t=t.tBodies[0].rows;for(var Q=0;Q<t.length;Q++)t[Q].cells.length>N&&t[Q].deleteCell(N)}};Graph.prototype.pasteHtmlAtCaret=function(t){if(window.getSelection){var N=window.getSelection();if(N.getRangeAt&&-N.rangeCount){N=N.getRangeAt(0);N.deleteContents();var Q=document.createElement("div");Q.innerHTML=t;t=document.createDocumentFragment();for(var X;X=Q.firstChild;)lastNode=t.appendChild(X);N.insertNode(t)}}else(N=document.selection)&&"Control"!=N.type&&N.createRange().pasteHTML(t)};Graph.prototype.createLinkForHint=function(t,N,Q){function X(ka,pa){ka.length>pa&&(ka=ka.substring(0,Math.round(pa/2))+"..."+ka.substring(ka.length-Math.round(pa/4)));return ka}t=null!=t?t:"javascript:void(0);";if(null==-N||0==N.length)N=this.isCustomLink(t)?this.getLinkTitle(t):t;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(t));ia.setAttribute("title",X(this.isCustomLink(t)?this.getLinkTitle(t):t,80));null!=this.linkTarget&&ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,X(N,40));this.isCustomLink(t)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(t,Q);mxEvent.consume(ka)}));return ia};Graph.prototype.initTouch=-function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ka,pa){this.popupMenuHandler.hideMenu()});var t=this.updateMouseEvent;this.updateMouseEvent=function(ka){ka=t.apply(this,arguments);if(mxEvent.isTouchEvent(ka.getEvent())&&null==ka.getState()){var pa=this.getCellAt(ka.graphX,ka.graphY);null!=pa&&this.isSwimlane(pa)&&this.hitsSwimlaneContent(pa,ka.graphX,ka.graphY)||(ka.state=this.view.getState(pa),-null!=ka.state&&null!=ka.state.shape&&(this.container.style.cursor=ka.state.shape.node.style.cursor))}null==ka.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ka};var N=!1,Q=!1,X=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ka,pa,xa){ka==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),N=this.isCellSelected(pa.getCell()),Q=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,-function(ka,pa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(pa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==pa.getState()||!pa.isSource(pa.getState().control))&&(this.popupMenuHandler.popupTrigger||!X&&!xa&&(Q&&null==pa.getCell()&&this.isSelectionEmpty()||N&&this.isCellSelected(pa.getCell())));xa=!N||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var va=mxUtils.getScrollOrigin();-this.popupMenuHandler.popup(pa.getX()+va.x+1,pa.getY()+va.y+1,ta,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ka,pa,xa])}})};mxCellEditor.prototype.isContentEditing=function(){var t=this.graph.view.getState(this.editingCell);return null!=t&&1==t.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var t=-"";window.getSelection?t=window.getSelection():document.getSelection?t=document.getSelection():document.selection&&(t=document.selection.createRange().text);return""!=t};mxCellEditor.prototype.insertTab=function(t){var N=this.textarea.ownerDocument.defaultView.getSelection(),Q=N.getRangeAt(0);t=Graph.createTabNode(t);Q.insertNode(t);Q.setStartAfter(t);Q.setEndAfter(t);N.removeAllRanges();N.addRange(Q)};mxCellEditor.prototype.alignText=function(t,N){var Q=this.graph.getView().getState(this.editingCell);-if(null!=Q){Q=mxUtils.getValue(Q.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var X=null!=Q&&"vertical-"==Q.substring(0,9),ia=null!=N&&mxEvent.isShiftDown(N);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(pa){ia||X||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ka=!1});(ka||X)&&this.graph.cellEditor.setAlign(t)}X||document.execCommand("justify"+-t.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var t=window.getSelection();if(t.getRangeAt&&t.rangeCount){for(var N=[],Q=0,X=t.rangeCount;Q<X;++Q)N.push(t.getRangeAt(Q));return N}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(t){try{if(t)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var N=0,Q=t.length;N<-Q;++N)sel.addRange(t[N])}else document.selection&&t.select&&t.select()}catch(X){}};var B=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(t){null!=t.text&&(t.text.replaceLinefeeds="0"!=mxUtils.getValue(t.style,"nl2Br","1"));B.apply(this,arguments)};var z=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(t,N){this.isKeepFocusEvent(t)||!mxEvent.isAltDown(t.getEvent())?z.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=-function(t){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var C=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(t,N){t=this.graph.getStartEditingCell(t,N);C.apply(this,arguments);var Q=this.graph.view.getState(t);this.textarea.className=null!=Q&&1==Q.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?-"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(t)};mxCellEditor.prototype.toggleViewMode=function(){var t=this.graph.view.getState(this.editingCell);if(null!=t){var N=null!=t&&"0"!=mxUtils.getValue(t.style,"nl2Br","1"),Q=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,-xa.length-1));xa=Graph.sanitizeHtml(N?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(t.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);N=mxUtils.getValue(t.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(t.style,-mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,pa=[];(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&pa.push("underline");(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&pa.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=pa.join(" ");this.textarea.style.fontWeight=ia?"bold":"normal";this.textarea.style.fontStyle=ka?"italic":"";this.textarea.style.fontFamily=N;this.textarea.style.textAlign=X;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,-"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=Graph.sanitizeHtml(N?xa.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):xa,!0);this.textarea.className=+mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(x){return!mxEvent.isAltDown(x)||mxEvent.isShiftDown(x)};var g=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(x){return g.apply(this,arguments)||this.graph.isTableRow(x)||this.graph.isTableCell(x)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=+function(x){return m.apply(this,arguments)||this.graph.isEdgeIgnored(x)};var u=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(x){return this.graph.isCloneEvent(x)!=u.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var x=new mxEllipse(null,this.highlightColor,this.highlightColor,0);x.opacity=mxConstants.HIGHLIGHT_OPACITY;return x};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=+"crosshair";mxConnectionHandler.prototype.createEdgeState=function(x){x=this.graph.createCurrentEdgeStyle();x=this.graph.createEdge(null,null,null,null,null,x);x=new mxCellState(this.graph.view,x,this.graph.getCellStyle(x));for(var M in this.graph.currentEdgeStyle)x.style[M]=this.graph.currentEdgeStyle[M];if(null!=this.previous){var Q=this.previous.style.newEdgeStyle;if(null!=Q)try{var V=JSON.parse(Q);for(M in V)x.style[M]=V[M]}catch(ia){}}x.style=this.graph.postProcessCellStyle(x.cell,x.style);return x};+var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var x=p.apply(this,arguments);x.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return x};mxConnectionHandler.prototype.updatePreview=function(x){};var B=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var x=B.apply(this,arguments),M=x.getCell;x.getCell=mxUtils.bind(this,function(Q){var V=M.apply(this,arguments);this.error=null;return V});+return x};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var x="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",M="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),Q=0;Q<M.length;Q++)null!=+this.currentEdgeStyle[M[Q]]&&(x+=M[Q]+"="+this.currentEdgeStyle[M[Q]]+";");null!=this.currentEdgeStyle.orthogonalLoop?x+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(x+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?x+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(x+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize++";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(x+="elbow="+this.currentEdgeStyle.elbow+";");return x=null!=this.currentEdgeStyle.html?x+("html="+this.currentEdgeStyle.html+";"):x+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var x=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=+x&&(new mxCodec(x.ownerDocument)).decode(x,this.getStylesheet())};Graph.prototype.createCellLookup=function(x,M){M=null!=M?M:{};for(var Q=0;Q<x.length;Q++){var V=x[Q];M[mxObjectIdentity.get(V)]=V.getId();for(var ia=this.model.getChildCount(V),ka=0;ka<ia;ka++)this.createCellLookup([this.model.getChildAt(V,ka)],M)}return M};Graph.prototype.createCellMapping=function(x,M,Q){Q=null!=Q?Q:{};for(var V in x){var ia=M[V];null==Q[ia]&&(Q[ia]=x[V].getId()||"")}return Q};Graph.prototype.importGraphModel=function(x,+M,Q,V){M=null!=M?M:0;Q=null!=Q?Q:0;var ia=new mxCodec(x.ownerDocument),ka=new mxGraphModel;ia.decode(x,ka);x=[];ia={};var oa={},xa=ka.getChildren(this.cloneCell(ka.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ta=this.createCellLookup([ka.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ka=0;ka<xa.length;ka++)ua=this.model.getChildren(this.moveCells([xa[ka]],M,Q,!1,this.model.getRoot())[0]),null!=ua&&(x=x.concat(ua));else{var ua=+ka.getChildren(xa[0]);null!=ua&&(x=this.moveCells(ua,M,Q,!1,this.getDefaultParent()),oa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(ia,ta,oa),this.updateCustomLinks(oa,x),V)){this.isGridEnabled()&&(M=this.snap(M),Q=this.snap(Q));var Fa=this.getBoundingBoxFromGeometry(x,!0);null!=Fa&&this.moveCells(x,M-Fa.x,Q-Fa.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var M={},Q=this.cloneCells(x,null,M),V=+new mxDictionary,ia=0;ia<x.length;ia++)V.put(x[ia],!0);var ka=new mxCodec,oa=new mxGraphModel,xa=oa.getChildAt(oa.getRoot(),0);for(ia=0;ia<Q.length;ia++){oa.add(xa,Q[ia]);var ta=this.view.getState(x[ia]);if(null!=ta){var ua=this.getCellGeometry(Q[ia]);null!=ua&&ua.relative&&!this.model.isEdge(x[ia])&&null==V.get(this.model.getParent(x[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ta.x/ta.view.scale-ta.view.translate.x,ua.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(M,+this.createCellLookup(x)),Q);return ka.encode(oa)};Graph.prototype.isSwimlane=function(x,M){var Q=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(Q=this.getCurrentCellStyle(x,M)[mxConstants.STYLE_SHAPE]);return Q==mxConstants.SHAPE_SWIMLANE||"table"==Q||"tableRow"==Q};var H=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(x){return null!=x&&H.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellEditable(this.model.getParent(x)):+!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(x){return null!=x&&S.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellMovable(this.model.getParent(x)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var M=this.model.getParent(x);if(null!=M){var Q=this.getCurrentCellStyle(M);if(null!=Q.expand)return"0"!=Q.expand}return G.apply(this,arguments)&&(null==M||!this.isTable(M))};var O=Graph.prototype.splitEdge;+Graph.prototype.splitEdge=function(x,M,Q,V,ia,ka,oa,xa){null==xa&&(xa=this.model.getParent(x),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,oa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=O.apply(this,[x,M,Q,V,ia,ka,oa,xa]);this.model.setValue(Q,"");var ta=this.getChildCells(Q,!0);for(M=0;M<ta.length;M++){var ua=this.getCellGeometry(ta[M]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(ta[M])}var Fa=this.getChildCells(x,!0);for(M=0;M<Fa.length;M++)ua=this.getCellGeometry(Fa[M]),+null!=ua&&ua.relative&&0>=ua.x&&this.model.remove(Fa[M]);var Na=this.model.getTerminal(Q,!1);if(null!=Na){var Wa=this.getCurrentCellStyle(Na);null!=Wa&&"1"==Wa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[Q]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[Q]))}}finally{this.model.endUpdate()}return Q};var R=Graph.prototype.selectCell;Graph.prototype.selectCell=function(x,+M,Q){if(M||Q)R.apply(this,arguments);else{var V=this.getSelectionCell(),ia=null,ka=[],oa=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ka.push(xa),xa==V)ia=ka.length-1;else if(x&&null==V&&0<ka.length||null!=ia&&x&&ka.length>ia||!x&&0<ia)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)oa(this.model.getChildAt(xa,ta))});oa(this.model.root);0<ka.length&&(ia=null!=ia?mxUtils.mod(ia+(x?1:-1),ka.length):0,this.setSelectionCell(ka[ia]))}};+Graph.prototype.swapShapes=function(x,M){if(this.model.isVertex(x)&&this.model.isVertex(M)&&2==this.getMovableCells([x,M]).length){var Q=this.getCellGeometry(x),V=this.getCellGeometry(M);if(null!=Q&&null!=V){var ia=Q.clone(),ka=V.clone();this.model.beginUpdate();try{ia.x=V.getCenterX()-Q.width/2,ia.y=V.getCenterY()-Q.height/2,ka.x=Q.getCenterX()-V.width/2,ka.y=Q.getCenterY()-V.height/2,this.model.setGeometry(x,ia),this.model.setGeometry(M,ka)}finally{this.model.endUpdate()}}}};var c=Graph.prototype.moveCells;+Graph.prototype.moveCells=function(x,M,Q,V,ia,ka,oa){oa=null!=oa?oa:{};if(this.isTable(ia)){for(var xa=[],ta=0;ta<x.length;ta++)this.isTable(x[ta])?xa=xa.concat(this.model.getChildCells(x[ta],!0).reverse()):xa.push(x[ta]);x=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<x.length;ta++)if(null!=ia&&this.isTableRow(x[ta])){var ua=this.model.getParent(x[ta]),Fa=this.getCellGeometry(x[ta]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Fa&&this.isTable(ua)&&this.isTable(ia)&&(V||ua!=ia)){if(!V){var Na=+this.getCellGeometry(ua);null!=Na&&(Na=Na.clone(),Na.height-=Fa.height,this.model.setGeometry(ua,Na))}Na=this.getCellGeometry(ia);null!=Na&&(Na=Na.clone(),Na.height+=Fa.height,this.model.setGeometry(ia,Na));var Wa=this.model.getChildCells(ia,!0);if(0<Wa.length){x[ta]=V?this.cloneCell(x[ta]):x[ta];var Xa=this.model.getChildCells(x[ta],!0),ab=this.model.getChildCells(Wa[0],!0),Oa=ab.length-Xa.length;if(0<Oa)for(var Qa=0;Qa<Oa;Qa++){var kb=this.cloneCell(Xa[Xa.length-1]);null!=kb&&(kb.value="",this.model.add(x[ta],+kb))}else if(0>Oa)for(Qa=0;Qa>Oa;Qa--)this.model.remove(Xa[Xa.length+Qa-1]);Xa=this.model.getChildCells(x[ta],!0);for(Qa=0;Qa<ab.length;Qa++){var cb=this.getCellGeometry(ab[Qa]),Ya=this.getCellGeometry(Xa[Qa]);null!=cb&&null!=Ya&&(Ya=Ya.clone(),Ya.width=cb.width,this.model.setGeometry(Xa[Qa],Ya))}}}}var gb=c.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!V&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&this.model.remove(xa[ta]);V&&this.updateCustomLinks(this.createCellMapping(oa,+this.createCellLookup(x)),gb)}finally{this.model.endUpdate()}return gb};var f=Graph.prototype.removeCells;Graph.prototype.removeCells=function(x,M){var Q=[];this.model.beginUpdate();try{for(var V=0;V<x.length;V++)if(this.isTableCell(x[V])){var ia=this.model.getParent(x[V]),ka=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(x,ka)&&0>mxUtils.indexOf(Q,ka)&&Q.push(ka):this.labelChanged(x[V],"")}else{if(this.isTableRow(x[V])&&(ka=this.model.getParent(x[V]),+0>mxUtils.indexOf(x,ka)&&0>mxUtils.indexOf(Q,ka))){for(var oa=this.model.getChildCells(ka,!0),xa=0,ta=0;ta<oa.length;ta++)0<=mxUtils.indexOf(x,oa[ta])&&xa++;xa==oa.length&&Q.push(ka)}Q.push(x[V])}Q=f.apply(this,[Q,M])}finally{this.model.endUpdate()}return Q};Graph.prototype.updateCustomLinks=function(x,M,Q){Q=null!=Q?Q:new Graph;for(var V=0;V<M.length;V++)null!=M[V]&&Q.updateCustomLinksForCell(x,M[V],Q)};Graph.prototype.updateCustomLinksForCell=function(x,M){this.doUpdateCustomLinksForCell(x,M);for(var Q=+this.model.getChildCount(M),V=0;V<Q;V++)this.updateCustomLinksForCell(x,this.model.getChildAt(M,V))};Graph.prototype.doUpdateCustomLinksForCell=function(x,M){};Graph.prototype.getAllConnectionConstraints=function(x,M){if(null!=x){M=mxUtils.getValue(x.style,"points",null);if(null!=M){x=[];try{var Q=JSON.parse(M);for(M=0;M<Q.length;M++){var V=Q[M];x.push(new mxConnectionConstraint(new mxPoint(V[0],V[1]),2<V.length?"0"!=V[2]:!0,null,3<V.length?V[3]:0,4<V.length?V[4]:0))}}catch(ka){}return x}if(null!=+x.shape&&null!=x.shape.bounds){V=x.shape.direction;M=x.shape.bounds;var ia=x.shape.scale;Q=M.width/ia;M=M.height/ia;if(V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_SOUTH)V=Q,Q=M,M=V;M=x.shape.getConstraints(x.style,Q,M);if(null!=M)return M;if(null!=x.shape.stencil&&null!=x.shape.stencil.constraints)return x.shape.stencil.constraints;if(null!=x.shape.constraints)return x.shape.constraints}}return null};Graph.prototype.flipEdge=function(x){if(null!=x){var M=this.getCurrentCellStyle(x);M=+mxUtils.getValue(M,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,M,[x])}};Graph.prototype.isValidRoot=function(x){for(var M=this.model.getChildCount(x),Q=0,V=0;V<M;V++){var ia=this.model.getChildAt(x,V);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||Q++)}return 0<Q||this.isContainer(x)};Graph.prototype.isValidDropTarget=function(x,M,+Q){for(var V=this.getCurrentCellStyle(x),ia=!0,ka=!0,oa=0;oa<M.length&&ka;oa++)ia=ia&&this.isTable(M[oa]),ka=ka&&this.isTableRow(M[oa]);return!this.isCellLocked(x)&&(this.isTargetShape(x,M,Q)||("1"!=mxUtils.getValue(V,"part","0")||this.isContainer(x))&&"0"!=mxUtils.getValue(V,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(x))&&!this.isTableRow(x)&&(!this.isTable(x)||ka||ia))};Graph.prototype.createGroupCell=function(){var x=mxGraph.prototype.createGroupCell.apply(this,+arguments);x.setStyle("group");return x};Graph.prototype.isExtendParentsOnAdd=function(x){var M=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(M&&null!=x&&null!=this.layoutManager){var Q=this.model.getParent(x);null!=Q&&(Q=this.layoutManager.getLayout(Q),null!=Q&&Q.constructor==mxStackLayout&&(M=!1))}return M};Graph.prototype.getPreferredSizeForCell=function(x,M,Q){Q=null!=Q?Q:this.gridEnabled;var V=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=V&&(V.width+=+10,V.height+=4,Q&&(V.width=this.snap(V.width),V.height=this.snap(V.height)));return V};Graph.prototype.turnShapes=function(x,M){var Q=this.getModel(),V=[];Q.beginUpdate();try{for(var ia=0;ia<x.length;ia++){var ka=x[ia];if(Q.isEdge(ka)){var oa=Q.getTerminal(ka,!0),xa=Q.getTerminal(ka,!1);Q.setTerminal(ka,xa,!0);Q.setTerminal(ka,oa,!1);var ta=Q.getGeometry(ka);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var ua=ta.getTerminalPoint(!0),Fa=ta.getTerminalPoint(!1);ta.setTerminalPoint(ua,+!1);ta.setTerminalPoint(Fa,!0);Q.setGeometry(ka,ta);var Na=this.view.getState(ka),Wa=this.view.getState(oa),Xa=this.view.getState(xa);if(null!=Na){var ab=null!=Wa?this.getConnectionConstraint(Na,Wa,!0):null,Oa=null!=Xa?this.getConnectionConstraint(Na,Xa,!1):null;this.setConnectionConstraint(ka,oa,!0,Oa);this.setConnectionConstraint(ka,xa,!1,ab);var Qa=mxUtils.getValue(Na.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Na.style,+mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ka]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Qa,[ka])}V.push(ka)}}else if(Q.isVertex(ka)&&(ta=this.getCellGeometry(ka),null!=ta)){if(!(this.isTable(ka)||this.isTableRow(ka)||this.isTableCell(ka)||this.isSwimlane(ka))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var kb=ta.width;ta.width=ta.height;ta.height=kb;Q.setGeometry(ka,ta)}var cb=this.view.getState(ka);if(null!=cb){var Ya=[mxConstants.DIRECTION_EAST,+mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],gb=mxUtils.getValue(cb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Ya[mxUtils.mod(mxUtils.indexOf(Ya,gb)+(M?-1:1),Ya.length)],[ka])}V.push(ka)}}}finally{Q.endUpdate()}return V};Graph.prototype.stencilHasPlaceholders=function(x){if(null!=x&&null!=x.fgNode)for(x=x.fgNode.firstChild;null!=x;){if("text"==x.nodeName&&"1"==x.getAttribute("placeholders"))return!0;+x=x.nextSibling}return!1};var l=Graph.prototype.processChange;Graph.prototype.processChange=function(x){if(x instanceof mxGeometryChange&&(this.isTableCell(x.cell)||this.isTableRow(x.cell))&&(null==x.previous&&null!=x.geometry||null!=x.previous&&!x.previous.equals(x.geometry))){var M=x.cell;this.isTableCell(M)&&(M=this.model.getParent(M));this.isTableRow(M)&&(M=this.model.getParent(M));var Q=this.view.getState(M);null!=Q&&null!=Q.shape&&(this.view.invalidate(M),Q.shape.bounds=null)}l.apply(this,arguments);+x instanceof mxValueChange&&null!=x.cell&&null!=x.cell.value&&"object"==typeof x.cell.value&&this.invalidateDescendantsWithPlaceholders(x.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(x){x=this.model.getDescendants(x);if(0<x.length)for(var M=0;M<x.length;M++){var Q=this.view.getState(x[M]);null!=Q&&null!=Q.shape&&null!=Q.shape.stencil&&this.stencilHasPlaceholders(Q.shape.stencil)?this.removeStateForCell(x[M]):this.isReplacePlaceholders(x[M])&&this.view.invalidate(x[M],!1,!1)}};+Graph.prototype.replaceElement=function(x,M){M=x.ownerDocument.createElement(null!=M?M:"span");for(var Q=Array.prototype.slice.call(x.attributes);attr=Q.pop();)M.setAttribute(attr.nodeName,attr.nodeValue);M.innerHTML=x.innerHTML;x.parentNode.replaceChild(M,x)};Graph.prototype.processElements=function(x,M){if(null!=x){x=x.getElementsByTagName("*");for(var Q=0;Q<x.length;Q++)null!=x[Q]&&M(x[Q])}};Graph.prototype.updateLabelElements=function(x,M,Q){x=null!=x?x:this.getSelectionCells();for(var V=document.createElement("div"),+ia=0;ia<x.length;ia++){var ka=this.getCurrentCellStyle(x[ia]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(x[ia]),null!=ka&&0<ka.length)){V.innerHTML=Graph.sanitizeHtml(ka);for(var oa=V.getElementsByTagName(null!=Q?Q:"*"),xa=0;xa<oa.length;xa++)M(oa[xa]);V.innerHTML!=ka&&this.cellLabelChanged(x[ia],V.innerHTML)}}};Graph.prototype.cellLabelChanged=function(x,M,Q){M=Graph.zapGremlins(M);this.model.beginUpdate();try{if(null!=x.value&&"object"==typeof x.value){if(this.isReplacePlaceholders(x)&&+null!=x.getAttribute("placeholder"))for(var V=x.getAttribute("placeholder"),ia=x;null!=ia;){if(ia==this.model.getRoot()||null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(V)){this.setAttributeForCell(ia,V,M);break}ia=this.model.getParent(ia)}var ka=x.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,M):ka.setAttribute("label",M);M=ka}mxGraph.prototype.cellLabelChanged.apply(this,+arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(x){if(null!=x){for(var M=new mxDictionary,Q=0;Q<x.length;Q++)M.put(x[Q],!0);var V=[];for(Q=0;Q<x.length;Q++){var ia=this.model.getParent(x[Q]);null==ia||M.get(ia)||(M.put(ia,!0),V.push(ia))}for(Q=0;Q<V.length;Q++)if(ia=this.view.getState(V[Q]),null!=ia&&(this.model.isEdge(ia.cell)||this.model.isVertex(ia.cell))&&this.isCellDeletable(ia.cell)&&this.isTransparentState(ia)){for(var ka=!0,oa=0;oa<this.model.getChildCount(ia.cell)&&+ka;oa++)M.get(this.model.getChildAt(ia.cell,oa))||(ka=!1);ka&&x.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(x){for(var M=[],Q=0;Q<x.length;Q++)this.isCellDeletable(x[Q])&&this.isTransparentState(this.view.getState(x[Q]))&&M.push(x[Q]);x=M;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(x,M){this.setAttributeForCell(x,"link",M)};Graph.prototype.setTooltipForCell=function(x,+M){var Q="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(x.value)&&x.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(x,Q,M)};Graph.prototype.getAttributeForCell=function(x,M,Q){x=null!=x.value&&"object"===typeof x.value?x.value.getAttribute(M):null;return null!=x?x:Q};Graph.prototype.setAttributeForCell=function(x,M,Q){if(null!=x.value&&"object"==typeof x.value)var V=x.value.cloneNode(!0);else V=mxUtils.createXmlDocument().createElement("UserObject"),+V.setAttribute("label",x.value||"");null!=Q?V.setAttribute(M,Q):V.removeAttribute(M);this.model.setValue(x,V)};Graph.prototype.isTargetShape=function(x,M,Q){x=mxUtils.getValue(this.getCurrentCellStyle(x),mxConstants.STYLE_SHAPE,"");for(Q=0;Q<M.length;Q++){var V=mxUtils.getValue(this.getCurrentCellStyle(M[Q]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(V,x))return!0}return!1};var t=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(x,M,Q,V){if(mxEvent.isAltDown(M))return null;+for(var ia=0;ia<x.length;ia++){var ka=this.model.getParent(x[ia]);if(this.model.isEdge(ka)&&0>mxUtils.indexOf(x,ka))return null}ka=t.apply(this,arguments);var oa=!0;for(ia=0;ia<x.length&&oa;ia++)oa=oa&&this.isTableRow(x[ia]);oa&&(this.isTableCell(ka)&&(ka=this.model.getParent(ka)),this.isTableRow(ka)&&(ka=this.model.getParent(ka)),this.isTable(ka)||(ka=null));return ka};Graph.prototype.click=function(x){mxGraph.prototype.click.call(this,x);this.firstClickState=x.getState();this.firstClickSource=x.getSource()};+Graph.prototype.dblClick=function(x,M){this.isEnabled()&&(M=this.insertTextForEvent(x,M),mxGraph.prototype.dblClick.call(this,x,M))};Graph.prototype.insertTextForEvent=function(x,M){var Q=mxUtils.convertPoint(this.container,mxEvent.getClientX(x),mxEvent.getClientY(x));if(null!=x&&!this.model.isVertex(M)){var V=this.model.isEdge(M)?this.view.getState(M):null,ia=mxEvent.getSource(x);this.firstClickState!=V||this.firstClickSource!=ia||null!=V&&null!=V.text&&null!=V.text.node&&null!=V.text.boundingBox&&+(mxUtils.contains(V.text.boundingBox,Q.x,Q.y)||mxUtils.isAncestorNode(V.text.node,mxEvent.getSource(x)))||(null!=V||this.isCellLocked(this.getDefaultParent()))&&(null==V||this.isCellLocked(V.cell))||!(null!=V||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==V&&(V=this.view.getState(this.getCellAt(Q.x,Q.y))),M=this.addText(Q.x,Q.y,V))}return M};Graph.prototype.getInsertPoint=function(){var x=this.getGridSize(),M=this.container.scrollLeft/this.view.scale-this.view.translate.x,Q=+this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var V=this.getPageLayout(),ia=this.getPageSize();M=Math.max(M,V.x*ia.width);Q=Math.max(Q,V.y*ia.height)}return new mxPoint(this.snap(M+x),this.snap(Q+x))};Graph.prototype.getFreeInsertPoint=function(){var x=this.view,M=this.getGraphBounds(),Q=this.getInsertPoint(),V=this.snap(Math.round(Math.max(Q.x,M.x/x.scale-x.translate.x+(0==M.width?2*this.gridSize:0))));x=this.snap(Math.round(Math.max(Q.y,(M.y+M.height)/x.scale-+x.translate.y+2*this.gridSize)));return new mxPoint(V,x)};Graph.prototype.getCenterInsertPoint=function(x){x=null!=x?x:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-x.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/+2/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-x.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(x,M){x=null!=x?x:"";null!=M&&(0<x.length&&";"!=x.charAt(x.length-1)&&(x+=";"),x+="fontSize="+M+";");return x};Graph.prototype.addText=function(x,M,Q){var V=new mxCell;V.value="Text";V.geometry=new mxGeometry(0,0,0,0);V.vertex=!0;if(null!=Q&&this.model.isEdge(Q.cell)){V.style=+"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);V.geometry.relative=!0;V.connectable=!1;var ia=this.view.getRelativePoint(Q,x,M);V.geometry.x=Math.round(1E4*ia.x)/1E4;V.geometry.y=Math.round(ia.y);V.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(Q,V.geometry);var ka=this.view.scale;V.geometry.offset=new mxPoint(Math.round((x-ia.x)/ka),Math.round((M-ia.y)/ka))}else ia=this.view.translate,V.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",+this.vertexFontSize),V.geometry.width=40,V.geometry.height=20,V.geometry.x=Math.round(x/this.view.scale)-ia.x-(null!=Q?Q.origin.x:0),V.geometry.y=Math.round(M/this.view.scale)-ia.y-(null!=Q?Q.origin.y:0),V.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([V],null!=Q?Q.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[V])),this.autoSizeCell(V)}finally{this.getModel().endUpdate()}return V};Graph.prototype.addClickHandler=function(x,M,Q){var V=mxUtils.bind(this,+function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var ua=0;ua<ta.length;ua++){var Fa=this.getAbsoluteUrl(ta[ua].getAttribute("href"));null!=Fa&&(ta[ua].setAttribute("rel",this.linkRelation),ta[ua].setAttribute("href",Fa),null!=M&&mxEvent.addGestureListeners(ta[ua],null,null,M))}});this.model.addListener(mxEvent.CHANGE,V);V();var ia=this.container.style.cursor,ka=this.getTolerance(),oa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=x&&""!=x&&+x!=mxConstants.NONE?new mxCellHighlight(oa,x,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var ua=ta.sourceState;if(null==ua||null==oa.getLinkForCell(ua.cell))ta=oa.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(Fa,Na,Wa){return null==oa.getLinkForCell(Fa.cell)}),ua=null==ua||oa.model.isAncestor(ta,ua.cell)?oa.view.getState(ta):null;ua!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ua,null!=this.currentState&&this.activate(this.currentState))},+mouseDown:function(ta,ua){this.startX=ua.getGraphX();this.startY=ua.getGraphY();this.scrollLeft=oa.container.scrollLeft;this.scrollTop=oa.container.scrollTop;null==this.currentLink&&"auto"==oa.container.style.overflow&&(oa.container.style.cursor="move");this.updateCurrentState(ua)},mouseMove:function(ta,ua){if(oa.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-ua.getGraphX()),ua=Math.abs(this.startY-ua.getGraphY()),(ta>ka||ua>ka)&&this.clear());else{for(ta=ua.getSource();null!=ta&&"a"!=+ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=oa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&oa.tooltipHandler.reset(ua,!0,this.currentState),(null==this.currentState||ua.getState()!=this.currentState&&null!=ua.sourceState||!oa.intersects(this.currentState,ua.getGraphX(),ua.getGraphY()))&&this.updateCurrentState(ua))}},mouseUp:function(ta,ua){var Fa=ua.getSource();for(ta=ua.getEvent();null!=Fa&&"a"!=Fa.nodeName.toLowerCase();)Fa=Fa.parentNode;null==+Fa&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-oa.container.scrollTop)<ka&&(null==ua.sourceState||!ua.isSource(ua.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(Fa=oa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Fa||null==M||M(ta,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ta)||+(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":Fa?oa.linkTarget:"_top",oa.openLink(this.currentLink,ta),ua.consume())):null!=Q&&!ua.isConsumed()&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-oa.container.scrollTop)<ka&&Math.abs(this.startX-ua.getGraphX())<ka&&Math.abs(this.startY-ua.getGraphY())<ka&&Q(ua.getEvent()));this.clear()},activate:function(ta){this.currentLink=oa.getAbsoluteUrl(oa.getLinkForCell(ta.cell));null!=this.currentLink&&+(this.currentTarget=oa.getLinkTargetForCell(ta.cell),oa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=oa.container&&(oa.container.style.cursor=ia);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=oa.tooltipHandler&&oa.tooltipHandler.hide()}};oa.click=function(ta){};oa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=+function(x,M){x=null!=x?x:this.getSelectionCells();M=null!=M?M:!0;for(var Q=0;Q<x.length;Q++)this.isTableCell(x[Q])&&(x[Q]=this.model.getParent(x[Q]));x=this.model.getTopmostCells(x);var V=this.getModel(),ia=this.gridSize,ka=[];V.beginUpdate();try{var oa={},xa=this.createCellLookup(x),ta=this.cloneCells(x,!1,oa,!0);for(Q=0;Q<x.length;Q++){var ua=V.getParent(x[Q]);if(null!=ua){var Fa=this.moveCells([ta[Q]],ia,ia,!1)[0];ka.push(Fa);if(M)V.add(ua,ta[Q]);else{var Na=ua.getIndex(x[Q]);V.add(ua,ta[Q],Na++1)}if(this.isTable(ua)){var Wa=this.getCellGeometry(ta[Q]),Xa=this.getCellGeometry(ua);null!=Wa&&null!=Xa&&(Xa=Xa.clone(),Xa.height+=Wa.height,V.setGeometry(ua,Xa))}}else ka.push(ta[Q])}this.updateCustomLinks(this.createCellMapping(oa,xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{V.endUpdate()}return ka};Graph.prototype.insertImage=function(x,M,Q){if(null!=x&&null!=this.cellEditor.textarea){for(var V=this.cellEditor.textarea.getElementsByTagName("img"),ia=+[],ka=0;ka<V.length;ka++)ia.push(V[ka]);document.execCommand("insertimage",!1,x);x=this.cellEditor.textarea.getElementsByTagName("img");if(x.length==ia.length+1)for(ka=x.length-1;0<=ka;ka--)if(0==ka||x[ka]!=ia[ka-1]){x[ka].setAttribute("width",M);x[ka].setAttribute("height",Q);break}}};Graph.prototype.insertLink=function(x){if(null!=this.cellEditor.textarea)if(0==x.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var M=this.cellEditor.textarea.getElementsByTagName("a"),Q=[],V=+0;V<M.length;V++)Q.push(M[V]);document.execCommand("createlink",!1,mxUtils.trim(x));M=this.cellEditor.textarea.getElementsByTagName("a");if(M.length==Q.length+1)for(V=M.length-1;0<=V;V--)if(M[V]!=Q[V-1]){for(M=M[V].getElementsByTagName("a");0<M.length;){for(Q=M[0].parentNode;null!=M[0].firstChild;)Q.insertBefore(M[0].firstChild,M[0]);Q.removeChild(M[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(x))};Graph.prototype.isCellResizable=function(x){var M=mxGraph.prototype.isCellResizable.apply(this,+arguments),Q=this.getCurrentCellStyle(x);return!this.isTableCell(x)&&!this.isTableRow(x)&&(M||"0"!=mxUtils.getValue(Q,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==Q[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(x,M,Q){null==M&&(M=this.getSelectionCells());if(null!=M&&1<M.length){for(var V=[],ia=null,ka=null,oa=0,xa=0;xa<M.length;xa++)if(this.getModel().isVertex(M[xa])){var ta=this.view.getState(M[xa]);if(null!=ta){var ua=x?ta.getCenterX():ta.getCenterY();ia=null!=ia?Math.max(ia,+ua):ua;ka=null!=ka?Math.min(ka,ua):ua;Q&&(oa+=x?ta.width:ta.height);V.push(ta)}}if(2<V.length){V.sort(function(ab,Oa){return x?ab.x-Oa.x:ab.y-Oa.y});Q&&(oa-=x?V[0].width/2+V[V.length-1].width/2:V[0].height/2+V[V.length-1].height/2);ta=this.view.translate;ua=this.view.scale;ka=ka/ua-(x?ta.x:ta.y);ia=ia/ua-(x?ta.x:ta.y);this.getModel().beginUpdate();try{var Fa=(ia-ka-oa)/(V.length-1),Na=ka+(Q?x?V[0].width/2:V[0].height/2:0);for(xa=1;xa<V.length-1;xa++){var Wa=this.view.getState(this.model.getParent(V[xa].cell)),+Xa=this.getCellGeometry(V[xa].cell);Na+=Fa;null!=Xa&&null!=Wa&&(Xa=Xa.clone(),x?Xa.x=Math.round(Na-(Q?0:Xa.width/2))-Wa.origin.x:Xa.y=Math.round(Na-(Q?0:Xa.height/2))-Wa.origin.y,this.getModel().setGeometry(V[xa].cell,Xa));Q&&(Na+=x?V[xa].width:V[xa].height)}}finally{this.getModel().endUpdate()}}}return M};Graph.prototype.isCloneEvent=function(x){return mxClient.IS_MAC&&mxEvent.isMetaDown(x)||mxEvent.isControlDown(x)};Graph.prototype.createSvgImageExport=function(x){x=new mxImageExport;x.addCellData=+function(Q,V,ia){V.setAttribute("data-cell-id",Q.id);if(ia)if(mxUtils.isNode(Q.value))for(ia=0;ia<Q.value.attributes.length;ia++){var ka=Q.value.attributes[ia];V.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof Q.value)for(ka in Q.value)V.setAttribute("data-cell-"+ka,Q.value[ka]);else null!=Q.value&&V.setAttribute("data-cell-value",Q.value);return V};var M=x.visitStatesRecursive;x.visitStatesRecursive=function(Q,V,ia){if(null!=Q){var ka=V.root,oa=V.root.ownerDocument;V.root=this.addCellData(Q.cell,+null!=oa.createElementNS?oa.createElementNS(mxConstants.NS_SVG,"g"):oa.createElement("g"),Editor.addSvgMetadata);ka.appendChild(V.root);M.apply(this,arguments);V.root=ka}};x.getLinkForCellState=mxUtils.bind(this,function(Q,V){return this.getLinkForCell(Q.cell)});x.getTitleForCellState=mxUtils.bind(this,function(Q,V){return Editor.convertHtmlToText(this.convertValueToTooltip(Q.cell))});return x};Graph.prototype.parseBackgroundImage=function(x){var M=null;null!=x&&0<x.length&&(x=JSON.parse(x),M=new mxImage(x.src,+x.width,x.height));return M};Graph.prototype.getBackgroundImageObject=function(x){return x};Graph.prototype.getSvg=function(x,M,Q,V,ia,ka,oa,xa,ta,ua,Fa,Na,Wa,Xa,ab,Oa){var Qa=null;if(null!=Xa)for(Qa=new mxDictionary,Fa=0;Fa<Xa.length;Fa++)Qa.put(Xa[Fa],!0);Xa=this.useCssTransforms;var kb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Xa&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{M=null!=M?M:1;Q=null!=Q?Q:0;ia=null!=ia?ia:!0;ka=null!=ka?ka:!0;oa=null!=oa?oa:+!0;ua=null!=ua?ua:!1;var cb="page"==Wa?this.view.getBackgroundPageBounds():ka&&null==Qa||V||"diagram"==Wa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ya=this.backgroundImage,gb=this.view.translate,hb=this.view.scale;"diagram"==Wa&&null!=Ya&&null!=Ya.width&&null!=Ya.height&&(cb=mxRectangle.fromRectangle(cb),cb.add(new mxRectangle((gb.x+Ya.x)*hb,(gb.y+Ya.y)*hb,Ya.width*hb,Ya.height*hb)));if(null==cb)throw Error(mxResources.get("drawingEmpty"));V=M/hb;var vb=Math.max(1,Math.ceil(cb.width*+V)+2*Q)+(ua&&0==Q?5:0),mb=Math.max(1,Math.ceil(cb.height*V)+2*Q)+(ua&&0==Q?5:0);ua=ia?-.5:0;var pb=mxUtils.getLightDarkColor(x),db=Graph.createSvgNode(ua,ua,vb,mb,pb),qb=db.ownerDocument;if(null!=x){var nb=mxUtils.createElementNs(qb,mxConstants.NS_SVG,"rect");nb.setAttribute("fill",pb.light);nb.style.fill=pb.cssText;nb.setAttribute("width","100%");nb.setAttribute("height","100%");nb.setAttribute("x","0");nb.setAttribute("y","0");db.appendChild(nb)}var lb=mxUtils.createElementNs(qb,mxConstants.NS_SVG,+"g");db.appendChild(lb);var eb=this.createSvgCanvas(lb);eb.foOffset=ia?-.5:0;eb.textOffset=ia?-.5:0;eb.imageOffset=ia?-.5:0;eb.translate(Math.floor(Q/M-cb.x/hb),Math.floor(Q/M-cb.y/hb));eb.idPrefix="drawio-svg-"+Editor.guid();var tb=document.createElement("div"),ob=eb.getAlternateText;eb.getAlternateText=function(ib,Bb,sb,xb,zb,rb,Cb,d,n,y,q,v,D){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(tb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(tb.childNodes));for(var E=+Math.ceil(2*xb/this.state.fontSize),fa=[],L=0,va=0;(0==E||L<E)&&va<rb.length;){var na=rb.charCodeAt(va);if(10==na||13==na){if(0<L)break}else fa.push(rb.charAt(va)),255>na&&L++;va++}fa.length<rb.length&&1<rb.length-fa.length&&(rb=mxUtils.trim(fa.join(""))+"...");return rb}catch(Va){return ob.apply(this,arguments)}else return ob.apply(this,arguments)};null!=Ya&&null!=Ya.width&&null!=Ya.height&&(x=hb/M,ua=new mxRectangle((Ya.x+gb.x)*x,(Ya.y+gb.y)*x,Ya.width*x,Ya.height*x),mxUtils.intersects(cb,ua)&&+eb.image(Ya.x+gb.x,Ya.y+gb.y,Ya.width,Ya.height,Ya.src,!0));eb.scale(V);eb.textEnabled=oa;xa=null!=xa?xa:this.createSvgImageExport();var ub=xa.getLinkForCellState;xa.getLinkForCellState=function(ib,Bb){var sb=ib.view.graph.getAbsoluteUrl(ub.apply(this,arguments));return null==sb||ib.view.graph.isCustomLink(sb)?null:sb};xa.getLinkTargetForCellState=function(ib,Bb){return ib.view.graph.getLinkTargetForCell(ib.cell)};var Ab=xa.drawCellState,yb=null,wb=mxUtils.bind(this,function(){if(null==yb){yb="ge-flow-animation-"++Editor.guid();var ib=null!=qb.createElementNS?qb.createElementNS(mxConstants.NS_SVG,"style"):qb.createElement("style");ib.innerHTML=this.createFlowAnimationCss(yb);qb.getElementsByTagName("defs")[0].appendChild(ib)}return yb});xa.drawCellState=function(ib,Bb){for(var sb=ib.view.graph,xb=null!=Qa?Qa.get(ib.cell):sb.isCellSelected(ib.cell),zb=sb.model.getParent(ib.cell);!(ka&&null==Qa||xb)&&null!=zb;)xb=null!=Qa?Qa.get(zb):sb.isCellSelected(zb),zb=sb.model.getParent(zb);if(null!=ib.shape)try{var rb=+ib.shape.isFlowAnimationEnabled,Cb=ib.shape.addFlowAnimationToShape;ib.shape.isFlowAnimationEnabled=function(){return kb&&sb.model.isEdge(ib.cell)&&"1"==mxUtils.getValue(ib.style,"flowAnimation","0")};ib.shape.addFlowAnimationToShape=function(){sb.addFlowAnimationToNode(this.getFlowAnimationPath(),ib.style,M,wb())};if(ka&&null==Qa||xb)sb.view.redrawEnumerationState(ib),Ab.apply(this,arguments),this.doDrawShape(ib.secondLabel,Bb)}finally{ib.shape.isFlowAnimationEnabled=rb,ib.shape.addFlowAnimationToShape=+Cb}};var jb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(jb),eb);this.addForeignObjectWarning(eb,db);Oa?this.disableSvgLinks(db):this.updateSvgLinks(db,ta,!0);return db}finally{this.enableFlowAnimation=kb,Xa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(x,M){if("0"!=urlParams["svg-warning"]&&0<M.getElementsByTagName("foreignObject").length){var Q=x.createElement("switch"),+V=x.createElement("g");V.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=x.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||M.ownerDocument!=document&&null==document.documentMode?(ia.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ia.setAttribute("target","_blank")):(ia.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ia.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));+x=x.createElement("text");x.setAttribute("text-anchor","middle");x.setAttribute("font-size","10px");x.setAttribute("x","50%");x.setAttribute("y","100%");mxUtils.write(x,Graph.foreignObjectWarningText);Q.appendChild(V);ia.appendChild(x);Q.appendChild(ia);M.appendChild(Q)}};Graph.prototype.disableSvgLinks=function(x,M){x=x.getElementsByTagName("a");for(var Q=0;Q<x.length;Q++){var V=x[Q].getAttribute("href");null==V&&(V=x[Q].getAttribute("xlink:href"));null!=V&&(x[Q].style.pointerEvents="none",x[Q].setAttribute("href",+""));M&&M(x[Q])}};Graph.prototype.updateSvgLinks=function(x,M,Q){x=x.getElementsByTagName("a");for(var V=0;V<x.length;V++)if(null==x[V].getAttribute("target")){var ia=x[V].getAttribute("href");null==ia&&(ia=x[V].getAttribute("xlink:href"));null!=ia&&(null!=M&&/^https?:\/\//.test(ia)?x[V].setAttribute("target",M):Q&&this.isCustomLink(ia)&&x[V].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(x){x=new mxSvgCanvas2D(x);x.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;+x.adaptiveColors=this.getAdaptiveColors();x.pointerEvents=!0;return x};Graph.prototype.getSelectedElement=function(){var x=null;if(window.getSelection){var M=window.getSelection();M.getRangeAt&&M.rangeCount&&(x=M.getRangeAt(0).commonAncestorContainer)}else document.selection&&(x=document.selection.createRange().parentElement());return x};Graph.prototype.getSelectedEditingElement=function(){var x=null;if(null!=this.cellEditor.textarea)for(x=this.getSelectedElement();null!=x&&x.nodeType!=mxConstants.NODETYPE_ELEMENT;)x=+x.parentNode;return x};Graph.prototype.getParentByName=function(x,M,Q){for(;null!=x&&x.nodeName!=M;){if(x==Q)return null;x=x.parentNode}return x};Graph.prototype.getParentByNames=function(x,M,Q){for(;null!=x&&!(0<=mxUtils.indexOf(M,x.nodeName));){if(x==Q)return null;x=x.parentNode}return x};Graph.prototype.selectNode=function(x){var M=null;if(window.getSelection){if(M=window.getSelection(),M.getRangeAt&&M.rangeCount){var Q=document.createRange();Q.selectNode(x);M.removeAllRanges();M.addRange(Q)}}else(M=+document.selection)&&"Control"!=M.type&&(x=M.createRange(),x.collapse(!0),Q=M.createRange(),Q.setEndPoint("StartToStart",x),Q.select())};Graph.prototype.flipEdgePoints=function(x,M,Q){var V=this.getCellGeometry(x);if(null!=V){V=V.clone();if(null!=V.points)for(var ia=0;ia<V.points.length;ia++)M?V.points[ia].x=Q+(Q-V.points[ia].x):V.points[ia].y=Q+(Q-V.points[ia].y);ia=function(ka){null!=ka&&(M?ka.x=Q+(Q-ka.x):ka.y=Q+(Q-ka.y))};ia(V.getTerminalPoint(!0));ia(V.getTerminalPoint(!1));this.model.setGeometry(x,+V)}};Graph.prototype.flipChildren=function(x,M,Q){this.model.beginUpdate();try{for(var V=this.model.getChildCount(x),ia=0;ia<V;ia++){var ka=this.model.getChildAt(x,ia);if(this.model.isEdge(ka))this.flipEdgePoints(ka,M,Q);else{var oa=this.getCellGeometry(ka);null!=oa&&(oa=oa.clone(),M?oa.x=Q+(Q-oa.x-oa.width):oa.y=Q+(Q-oa.y-oa.height),this.model.setGeometry(ka,oa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(x,M){this.model.beginUpdate();try{x=this.model.getTopmostCells(x);+for(var Q=[],V=0;V<x.length;V++)if(this.model.isEdge(x[V])){var ia=this.view.getState(x[V]);null!=ia&&this.flipEdgePoints(x[V],M,(M?ia.getCenterX():ia.getCenterY())/this.view.scale-(M?ia.origin.x:ia.origin.y)-(M?this.view.translate.x:this.view.translate.y))}else{var ka=this.getCellGeometry(x[V]);null!=ka&&this.flipChildren(x[V],M,M?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);Q.push(x[V])}this.toggleCellStyles(M?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,Q)}finally{this.model.endUpdate()}};+Graph.prototype.deleteCells=function(x,M){var Q=null;if(null!=x&&0<x.length){this.model.beginUpdate();try{for(var V=0;V<x.length;V++){var ia=this.model.getParent(x[V]);if(this.isTable(ia)){var ka=this.getCellGeometry(x[V]),oa=this.getCellGeometry(ia);null!=ka&&null!=oa&&(oa=oa.clone(),oa.height-=ka.height,this.model.setGeometry(ia,oa))}}var xa=this.selectParentAfterDelete?this.model.getParents(x):null;this.removeCells(x,M)}finally{this.model.endUpdate()}if(null!=xa)for(Q=[],V=0;V<xa.length;V++)this.model.contains(xa[V])&&+(this.model.isVertex(xa[V])||this.model.isEdge(xa[V]))&&Q.push(xa[V])}return Q};Graph.prototype.insertTableColumn=function(x,M){var Q=this.getModel();Q.beginUpdate();try{var V=x,ia=0;if(this.isTableCell(x)){var ka=Q.getParent(x);V=Q.getParent(ka);ia=mxUtils.indexOf(Q.getChildCells(ka,!0),x)}else this.isTableRow(x)?V=Q.getParent(x):x=Q.getChildCells(V,!0)[0],M||(ia=Q.getChildCells(x,!0).length-1);var oa=Q.getChildCells(V,!0),xa=Graph.minTableColumnWidth;for(x=0;x<oa.length;x++){var ta=Q.getChildCells(oa[x],+!0)[ia],ua=Q.cloneCell(ta,!1);null==ua&&(ua=this.createVertex());var Fa=this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Fa){null!=Fa.alternateBounds&&(Fa.width=Fa.alternateBounds.width,Fa.height=Fa.alternateBounds.height,Fa.alternateBounds=null);xa=Fa.width;var Na=this.getCellGeometry(oa[x]);null!=Na&&(Fa.height=Na.height)}Q.add(oa[x],ua,ia+(M?0:1))}var Wa=this.getCellGeometry(V);null!=Wa&&(Wa=Wa.clone(),Wa.width+=+xa,Q.setGeometry(V,Wa))}finally{Q.endUpdate()}};Graph.prototype.deleteLane=function(x){var M=this.getModel();M.beginUpdate();try{var Q=null;Q="stackLayout"==this.getCurrentCellStyle(x).childLayout?x:M.getParent(x);var V=M.getChildCells(Q,!0);0==V.length?M.remove(Q):(Q==x&&(x=V[V.length-1]),M.remove(x))}finally{M.endUpdate()}};Graph.prototype.insertLane=function(x,M){var Q=this.getModel();Q.beginUpdate();try{var V=null;if("stackLayout"==this.getCurrentCellStyle(x).childLayout){V=x;var ia=Q.getChildCells(V,+!0);x=ia[M?0:ia.length-1]}else V=Q.getParent(x);var ka=V.getIndex(x);x=Q.cloneCell(x,!1);x.value=null;Q.add(V,x,ka+(M?0:1))}finally{Q.endUpdate()}};Graph.prototype.insertTableRow=function(x,M){var Q=this.getModel();Q.beginUpdate();try{var V=x,ia=x;if(this.isTableCell(x))ia=Q.getParent(x),V=Q.getParent(ia);else if(this.isTableRow(x))V=Q.getParent(x);else{var ka=Q.getChildCells(V,!0);ia=ka[M?0:ka.length-1]}var oa=Q.getChildCells(ia,!0),xa=V.getIndex(ia);ia=Q.cloneCell(ia,!1);ia.value=null;var ta=this.getCellGeometry(ia);+if(null!=ta){for(ka=0;ka<oa.length;ka++){x=Q.cloneCell(oa[ka],!1);x.value=null;x.style=mxUtils.setStyle(mxUtils.setStyle(x.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(x);null!=ua&&(null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ta.height);ia.insert(x)}Q.add(V,ia,xa+(M?0:1));var Fa=this.getCellGeometry(V);null!=Fa&&(Fa=Fa.clone(),Fa.height+=ta.height,Q.setGeometry(V,Fa))}}finally{Q.endUpdate()}};+Graph.prototype.deleteTableColumn=function(x){var M=this.getModel();M.beginUpdate();try{var Q=x,V=x;this.isTableCell(x)&&(V=M.getParent(x));this.isTableRow(V)&&(Q=M.getParent(V));var ia=M.getChildCells(Q,!0);if(0==ia.length)M.remove(Q);else{this.isTableRow(V)||(V=ia[0]);var ka=M.getChildCells(V,!0);if(1>=ka.length)M.remove(Q);else{var oa=ka.length-1;this.isTableCell(x)&&(oa=mxUtils.indexOf(ka,x));for(V=x=0;V<ia.length;V++){var xa=M.getChildCells(ia[V],!0)[oa];M.remove(xa);var ta=this.getCellGeometry(xa);+null!=ta&&(x=Math.max(x,ta.width))}var ua=this.getCellGeometry(Q);null!=ua&&(ua=ua.clone(),ua.width-=x,M.setGeometry(Q,ua))}}}finally{M.endUpdate()}};Graph.prototype.deleteTableRow=function(x){var M=this.getModel();M.beginUpdate();try{var Q=x,V=x;this.isTableCell(x)&&(x=V=M.getParent(x));this.isTableRow(x)&&(Q=M.getParent(V));var ia=M.getChildCells(Q,!0);if(1>=ia.length)M.remove(Q);else{this.isTableRow(V)||(V=ia[ia.length-1]);M.remove(V);x=0;var ka=this.getCellGeometry(V);null!=ka&&(x=ka.height);+var oa=this.getCellGeometry(Q);null!=oa&&(oa=oa.clone(),oa.height-=x,M.setGeometry(Q,oa))}}finally{M.endUpdate()}};Graph.prototype.insertRow=function(x,M){for(var Q=x.tBodies[0],V=Q.rows[0].cells,ia=x=0;ia<V.length;ia++){var ka=V[ia].getAttribute("colspan");x+=null!=ka?parseInt(ka):1}M=Q.insertRow(M);for(ia=0;ia<x;ia++)mxUtils.br(M.insertCell(-1));return M.cells[0]};Graph.prototype.deleteRow=function(x,M){x.tBodies[0].deleteRow(M)};Graph.prototype.insertColumn=function(x,M){var Q=x.tHead;if(null!=+Q)for(var V=0;V<Q.rows.length;V++){var ia=document.createElement("th");Q.rows[V].appendChild(ia);mxUtils.br(ia)}x=x.tBodies[0];for(Q=0;Q<x.rows.length;Q++)V=x.rows[Q].insertCell(M),mxUtils.br(V);return x.rows[0].cells[0<=M?M:x.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(x,M){if(0<=M){x=x.tBodies[0].rows;for(var Q=0;Q<x.length;Q++)x[Q].cells.length>M&&x[Q].deleteCell(M)}};Graph.prototype.pasteHtmlAtCaret=function(x){if(window.getSelection){var M=window.getSelection();if(M.getRangeAt&&+M.rangeCount){M=M.getRangeAt(0);M.deleteContents();var Q=document.createElement("div");Q.innerHTML=x;x=document.createDocumentFragment();for(var V;V=Q.firstChild;)lastNode=x.appendChild(V);M.insertNode(x)}}else(M=document.selection)&&"Control"!=M.type&&M.createRange().pasteHTML(x)};Graph.prototype.createLinkForHint=function(x,M,Q){function V(ka,oa){ka.length>oa&&(ka=ka.substring(0,Math.round(oa/2))+"..."+ka.substring(ka.length-Math.round(oa/4)));return ka}x=null!=x?x:"javascript:void(0);";if(null==+M||0==M.length)M=this.isCustomLink(x)?this.getLinkTitle(x):x;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(x));ia.setAttribute("title",V(this.isCustomLink(x)?this.getLinkTitle(x):x,80));null!=this.linkTarget&&ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,V(M,40));this.isCustomLink(x)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(x,Q);mxEvent.consume(ka)}));return ia};Graph.prototype.initTouch=+function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ka,oa){this.popupMenuHandler.hideMenu()});var x=this.updateMouseEvent;this.updateMouseEvent=function(ka){ka=x.apply(this,arguments);if(mxEvent.isTouchEvent(ka.getEvent())&&null==ka.getState()){var oa=this.getCellAt(ka.graphX,ka.graphY);null!=oa&&this.isSwimlane(oa)&&this.hitsSwimlaneContent(oa,ka.graphX,ka.graphY)||(ka.state=this.view.getState(oa),+null!=ka.state&&null!=ka.state.shape&&(this.container.style.cursor=ka.state.shape.node.style.cursor))}null==ka.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ka};var M=!1,Q=!1,V=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ka,oa,xa){ka==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),M=this.isCellSelected(oa.getCell()),Q=this.isSelectionEmpty(),V=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,+function(ka,oa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!V&&!xa&&(Q&&null==oa.getCell()&&this.isSelectionEmpty()||M&&this.isCellSelected(oa.getCell())));xa=!M||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ua=mxUtils.getScrollOrigin();+this.popupMenuHandler.popup(oa.getX()+ua.x+1,oa.getY()+ua.y+1,ta,oa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ka,oa,xa])}})};mxCellEditor.prototype.isContentEditing=function(){var x=this.graph.view.getState(this.editingCell);return null!=x&&1==x.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var x=+"";window.getSelection?x=window.getSelection():document.getSelection?x=document.getSelection():document.selection&&(x=document.selection.createRange().text);return""!=x};mxCellEditor.prototype.insertTab=function(x){var M=this.textarea.ownerDocument.defaultView.getSelection(),Q=M.getRangeAt(0);x=Graph.createTabNode(x);Q.insertNode(x);Q.setStartAfter(x);Q.setEndAfter(x);M.removeAllRanges();M.addRange(Q)};mxCellEditor.prototype.alignText=function(x,M){var Q=this.graph.getView().getState(this.editingCell);+if(null!=Q){Q=mxUtils.getValue(Q.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var V=null!=Q&&"vertical-"==Q.substring(0,9),ia=null!=M&&mxEvent.isShiftDown(M);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(oa){ia||V||window.getSelection().containsNode(oa,!0)?(oa.removeAttribute("align"),oa.style.textAlign=null):ka=!1});(ka||V)&&this.graph.cellEditor.setAlign(x)}V||document.execCommand("justify"++x.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var x=window.getSelection();if(x.getRangeAt&&x.rangeCount){for(var M=[],Q=0,V=x.rangeCount;Q<V;++Q)M.push(x.getRangeAt(Q));return M}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(x){try{if(x)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var M=0,Q=x.length;M<+Q;++M)sel.addRange(x[M])}else document.selection&&x.select&&x.select()}catch(V){}};var z=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(x){null!=x.text&&(x.text.replaceLinefeeds="0"!=mxUtils.getValue(x.style,"nl2Br","1"));z.apply(this,arguments)};var C=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(x,M){this.isKeepFocusEvent(x)||!mxEvent.isAltDown(x.getEvent())?C.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=+function(x){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var F=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(x,M){x=this.graph.getStartEditingCell(x,M);F.apply(this,arguments);var Q=this.graph.view.getState(x);this.textarea.className=null!=Q&&1==Q.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?+"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(x)};mxCellEditor.prototype.toggleViewMode=function(){var x=this.graph.view.getState(this.editingCell);if(null!=x){var M=null!=x&&"0"!=mxUtils.getValue(x.style,"nl2Br","1"),Q=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,+xa.length-1));xa=Graph.sanitizeHtml(M?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(x.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);M=mxUtils.getValue(x.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var V=mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(x.style,+mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,oa=[];(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&oa.push("underline");(mxUtils.getValue(x.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=ka?"italic":"";this.textarea.style.fontFamily=M;this.textarea.style.textAlign=V;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,+"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=Graph.sanitizeHtml(M?xa.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):xa,!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!=xa&&(this.textarea.innerHTML=xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=Q;this.resize()}};var I=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(t,N){if(null!=this.textarea)if(t=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=t){var Q=t.view.scale;this.bounds=mxRectangle.fromRectangle(t);if(0==this.bounds.width&&-0==this.bounds.height){this.bounds.width=160*Q;this.bounds.height=60*Q;var X=null!=t.text?t.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(t.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/Q)+"px";this.textarea.style.height=Math.round((this.bounds.height-+"2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=Q;this.resize()}};var N=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(x,M){if(null!=this.textarea)if(x=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=x){var Q=x.view.scale;this.bounds=mxRectangle.fromRectangle(x);if(0==this.bounds.width&&+0==this.bounds.height){this.bounds.width=160*Q;this.bounds.height=60*Q;var V=null!=x.text?x.text.margin:null;null==V&&(V=mxUtils.getAlignmentAsPoint(mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(x.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=V.x*this.bounds.width;this.bounds.y+=V.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/Q)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/Q)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/Q)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*Q);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/Q)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*-Q);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+Q+","+Q+")")}else this.textarea.style.height="",this.textarea.style.overflow="",I.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(t,N){if("0"==mxUtils.getValue(t.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);-var Q=this.graph.getEditingValue(t.cell,N);"1"==mxUtils.getValue(t.style,"nl2Br","1")&&(Q=Q.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(Q,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(t,N){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(t.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;-mxCellEditor.prototype.getCurrentValue=function(t){if("0"==mxUtils.getValue(t.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var N=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(t.style,"nl2Br","1")?(N=N.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<N.length&&("<br/>"==N.substring(N.length-5)||"<br>"==N.substring(N.length-4))&&(N=N.substring(0,N.lastIndexOf("<br"))+"<div><br/></div>")):-N=N.replace(/\r\n/g,"").replace(/\n/g,"");return N};var L=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(t){this.codeViewMode&&this.toggleViewMode();L.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(t){}};var K=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,N){this.graph.getModel().beginUpdate();try{K.apply(this,arguments),""==N&&this.graph.isCellDeletable(t.cell)&&-0==this.graph.model.getChildCount(t.cell)&&this.graph.isTransparentState(t)&&this.graph.removeCells([t.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(t){t=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);t==mxConstants.NONE&&(t=null);return t};mxCellEditor.prototype.getBorderColor=function(t){t=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);t==mxConstants.NONE&&(t=null);return t};mxCellEditor.prototype.getMinimumSize=-function(t){var N=this.graph.getView().scale;return new mxRectangle(0,0,null==t.text?30:t.text.size*N+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(t,N){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(N.getEvent)};mxGraphView.prototype.formatUnitText=function(t){return t?e(t,this.unit):t};mxGraphHandler.prototype.updateHint=function(t){if(null!=this.pBounds&&(null!=this.shape||-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var N=this.graph.view.translate,Q=this.graph.view.scale;t=this.roundLength((this.bounds.x+this.currentDx)/Q-N.x);N=this.roundLength((this.bounds.y+this.currentDy)/Q-N.y);Q=this.graph.view.unit;this.hint.innerHTML=e(t,Q)+", "+e(N,Q);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 O=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(t,N){O.apply(this,arguments);var Q=this.graph.getCellStyle(t);if(null==Q.childLayout){var X=this.graph.model.getParent(t),ia=null!=X?this.graph.getCellGeometry(X):null;if(null!=ia&&(Q=this.graph.getCellStyle(X),"stackLayout"==Q.childLayout)){var ka=-parseFloat(mxUtils.getValue(Q,"stackBorder",mxStackLayout.prototype.border));Q="1"==mxUtils.getValue(Q,"horizontalStack","1");var pa=this.graph.getActualStartSize(X);ia=ia.clone();Q?ia.height=N.height+pa.y+pa.height+2*ka:ia.width=N.width+pa.x+pa.width+2*ka;this.graph.model.setGeometry(X,ia)}}};var da=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function t(xa){Q.get(xa)||(Q.put(xa,!0),ia.push(xa))}for(var N=da.apply(this,-arguments),Q=new mxDictionary,X=this.graph.model,ia=[],ka=0;ka<N.length;ka++){var pa=N[ka];this.graph.isTableCell(pa)?t(X.getParent(X.getParent(pa))):this.graph.isTableRow(pa)&&t(X.getParent(pa));t(pa)}return ia};var ea=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(t){return ea.apply(this,arguments)&&!mxEvent.isControlDown(t.getEvent())&&!mxEvent.isShiftDown(t.getEvent())};var ca=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=-function(){return ca.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var V=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(t){var N=V.apply(this,arguments);N.stroke="#C0C0C0";N.strokewidth=1;return N};var ma=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=-function(t){var N=ma.apply(this,arguments);N.stroke="#C0C0C0";N.strokewidth=1;return N};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var t=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+t.x/2,this.bounds.y+this.rotationHandleVSpacing-t.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(t,N){return this.graph.isRecursiveVertexResize(t)&&!mxEvent.isAltDown(N.getEvent())};-mxVertexHandler.prototype.isCenteredEvent=function(t,N){return mxEvent.isControlDown(N.getEvent())||mxEvent.isMetaDown(N.getEvent())};var la=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return la.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?-this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var Y=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var fa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(t){return t.tableHandle||fa.apply(this,arguments)&&-(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var t=0;this.graph.isTableRow(this.state.cell)?t=1:this.graph.isTableCell(this.state.cell)&&(t=2);return t};var Z=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Z.apply(this,arguments).grow(-this.getSelectionBorderInset())};var l=null,u=mxVertexHandler.prototype.createCustomHandles;-mxVertexHandler.prototype.createCustomHandles=function(){null==l&&(l=mxCellRenderer.defaultShapes.tableLine);var t=u.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var N=function(ab,Ra,Oa){for(var kb=[],cb=0;cb<ab.length;cb++){var $a=ab[cb];kb.push(null==$a?null:new mxPoint((ta+$a.x+Ra)*ka,(va+$a.y+Oa)*ka))}return kb},Q=this,X=this.graph,ia=X.model,ka=X.view.scale,pa=this.state,xa=this.selectionBorder,ta=this.state.origin.x+X.view.translate.x,-va=this.state.origin.y+X.view.translate.y;null==t&&(t=[]);var Da=X.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Da.length){var Na=ia.getChildCells(Da[0].cell,!0),Ya=X.getTableLines(this.state.cell,!1,!0),Za=X.getTableLines(this.state.cell,!0,!1);for(ia=0;ia<Da.length;ia++)mxUtils.bind(this,function(ab){var Ra=Da[ab],Oa=null;if(X.isCellMovable(Ra.cell)){Oa=ab<Da.length-1?Da[ab+1]:null;Oa=null!=Oa?X.getCellGeometry(Oa.cell):null;var kb=null!=Oa&&null!=Oa.alternateBounds?Oa.alternateBounds:-Oa;Oa=null!=Za[ab]?new l(Za[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Oa.isDashed=xa.isDashed;Oa.svgStrokeTolerance++;Oa=new mxHandle(Ra,"row-resize",null,Oa);Oa.tableHandle=!0;var cb=0;Oa.shape.node.parentNode.insertBefore(Oa.shape.node,Oa.shape.node.parentNode.firstChild);Oa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==l)this.shape.line=N(Za[ab],0,cb),this.shape.updateBoundsFromLine();else{var fb=-X.getActualStartSize(pa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+cb*ka;this.shape.bounds.x=pa.x+(ab==Da.length-1?0:fb.x*ka);this.shape.bounds.width=pa.width-(ab==Da.length-1?0:fb.width+fb.x+ka)}this.shape.redraw()}};var $a=!1;Oa.setPosition=function(fb,jb,sb){cb=Math.max(Graph.minTableRowHeight-fb.height,jb.y-fb.y-fb.height);$a=mxEvent.isShiftDown(sb.getEvent());null!=kb&&$a&&(cb=Math.min(cb,kb.height-Graph.minTableRowHeight))};Oa.execute=function(fb){if(0!=-cb)X.setTableRowHeight(this.state.cell,cb,!$a);else if(!Q.blockDelayedSelection){var jb=X.getCellAt(fb.getGraphX(),fb.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(jb,fb)}cb=0};Oa.reset=function(){cb=0}}t.push(Oa)})(ia);for(ia=0;ia<Na.length;ia++)mxUtils.bind(this,function(ab){var Ra=X.view.getState(Na[ab]),Oa=X.getCellGeometry(Na[ab]),kb=null!=Oa.alternateBounds?Oa.alternateBounds:Oa;null==Ra&&(Ra=new mxCellState(X.view,Na[ab],X.getCellStyle(Na[ab])),Ra.x=pa.x+Oa.x*ka,Ra.y=pa.y+Oa.y*ka,-Ra.width=kb.width*ka,Ra.height=kb.height*ka,Ra.updateCachedBounds());Oa=ab<Na.length-1?Na[ab+1]:null;Oa=null!=Oa?X.getCellGeometry(Oa):null;var cb=null!=Oa&&null!=Oa.alternateBounds?Oa.alternateBounds:Oa;Oa=null!=Ya[ab]?new l(Ya[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Oa.isDashed=xa.isDashed;Oa.svgStrokeTolerance++;Ra=new mxHandle(Ra,"col-resize",null,Oa);Ra.tableHandle=!0;var $a=0;Ra.shape.node.parentNode.insertBefore(Ra.shape.node,Ra.shape.node.parentNode.firstChild);-Ra.redraw=function(){if(null!=this.shape){this.shape.stroke=0==$a?mxConstants.NONE:xa.stroke;if(this.shape.constructor==l)this.shape.line=N(Ya[ab],$a,0),this.shape.updateBoundsFromLine();else{var jb=X.getActualStartSize(pa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(kb.width+$a)*ka;this.shape.bounds.y=pa.y+(ab==Na.length-1?0:jb.y*ka);this.shape.bounds.height=pa.height-(ab==Na.length-1?0:(jb.height+jb.y)*ka)}this.shape.redraw()}};var fb=!1;Ra.setPosition=function(jb,sb,Ab){$a=-Math.max(Graph.minTableColumnWidth-kb.width,sb.x-jb.x-kb.width);fb=mxEvent.isShiftDown(Ab.getEvent());null==cb||fb||($a=Math.min($a,cb.width-Graph.minTableColumnWidth))};Ra.execute=function(jb){if(0!=$a)X.setTableColumnWidth(this.state.cell,$a,fb);else if(!Q.blockDelayedSelection){var sb=X.getCellAt(jb.getGraphX(),jb.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(sb,jb)}$a=0};Ra.positionChanged=function(){};Ra.reset=function(){$a=0};t.push(Ra)})(ia)}}return null!=t?t.reverse():null};var H=-mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){H.apply(this,arguments);if(null!=this.moveHandles)for(var N=0;N<this.moveHandles.length;N++)null!=this.moveHandles[N]&&(this.moveHandles[N].node.style.visibility=t?"":"hidden");if(null!=this.cornerHandles)for(N=0;N<this.cornerHandles.length;N++)this.cornerHandles[N].node.style.visibility=t?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&-this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var t=this.isMoveHandlesVisible();t&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():t||null==this.moveHandles||this.destroyMoveHandles();if(t&&null==this.moveHandles){for(t=0;t<this.moveHandles.length;t++)null!=this.moveHandles[t]&&this.moveHandles[t].parentNode.removeChild(this.moveHandles[t]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var t=-this.graph,N=t.model,Q=[],X=0;X<N.getChildCount(this.state.cell);X++)mxUtils.bind(this,function(ia){if(null!=ia&&N.isVertex(ia.cell)&&t.isCellMovable(ia.cell)){var ka=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ia;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,-mxUtils.bind(this,function(pa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(pa)&&this.graph.isCellSelected(ia.cell)||this.graph.selectCellForEvent(ia.cell,pa);mxEvent.isPopupTrigger(pa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(pa),mxEvent.getClientY(pa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(pa),this.graph.isMouseDown=!0);mxEvent.consume(pa)}),-null,mxUtils.bind(this,function(pa){mxEvent.isPopupTrigger(pa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(pa),mxEvent.getClientY(pa),ia.cell,pa),mxEvent.consume(pa))}));Q.push(ka)}else Q.push(null)})(this.graph.view.getState(N.getChildAt(this.state.cell,X)));return Q};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var t=0;t<this.moveHandles.length;t++)null!=this.moveHandles[t]&&this.moveHandles[t].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=-function(){if(null!=this.cornerHandles){for(var t=0;t<this.cornerHandles.length;t++)null!=this.cornerHandles[t]&&null!=this.cornerHandles[t].node&&null!=this.cornerHandles[t].node.parentNode&&this.cornerHandles[t].node.parentNode.removeChild(this.cornerHandles[t].node);this.cornerHandles=null}};var U=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){U.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();-else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var t=0;4>t;t++){var N=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);N.dialect=mxConstants.DIALECT_SVG;N.init(this.graph.view.getOverlayPane());this.cornerHandles.push(N)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();-t=this.graph.getLinkForCell(this.state.cell);N=this.graph.getLinksForState(this.state);this.updateLinkHint(t,N)};var J=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var t=new mxPoint(0,0),N=this.tolerance,Q=this.state.style.shape;null==mxCellRenderer.defaultShapes[Q]&&mxStencilRegistry.getStencil(Q);Q=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!Q&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=-this.customHandles[X]&&null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var ia=this.customHandles[X].shape.bounds,ka=ia.getCenterX(),pa=ia.getCenterY();if(Math.abs(this.state.x-ka)<ia.width/2||Math.abs(this.state.y-pa)<ia.height/2||Math.abs(this.state.x+this.state.width-ka)<ia.width/2||Math.abs(this.state.y+this.state.height-pa)<ia.height/2){Q=!0;break}}Q&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(N/=2,this.graph.isTable(this.state.cell)&&(N+=7),t.x=-this.sizers[0].bounds.width+N,t.y=this.sizers[0].bounds.height+N):t=J.apply(this,arguments);return t};mxVertexHandler.prototype.updateHint=function(t){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{t=this.state.view.scale;var N=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/t),N)+" x "+e(this.roundLength(this.bounds.height/-t),N)}t=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==t&&(t=this.bounds);this.hint.style.left=t.x+Math.round((t.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=t.y+t.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=-"")};var W=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){W.apply(this,arguments);var t=this.graph.getLinkForCell(this.state.cell),N=this.graph.getLinksForState(this.state);this.updateLinkHint(t,N)};var aa=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(t,N){aa.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};-var ba=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(t,N){ba.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(t,N,Q){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var X=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(N.x/ia-X.x);X=this.roundLength(N.y/ia-X.y);var pa=-this.graph.view.unit;this.hint.innerHTML=e(ka,pa)+", "+e(X,pa);this.hint.style.visibility="visible";null!=Q&&(Q.view.updateEdgeBounds(Q),this.hint.innerHTML+=" ("+(pa==mxConstants.POINTS?Math.round(Q.length/ia):e(Q.length/ia,pa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Q=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*Q.x)+"%, "+Math.round(100*-Q.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(t.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(t.getGraphY(),N.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');+Q);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+Q+","+Q+")")}else this.textarea.style.height="",this.textarea.style.overflow="",N.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,M){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);+var Q=this.graph.getEditingValue(x.cell,M);"1"==mxUtils.getValue(x.style,"nl2Br","1")&&(Q=Q.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(Q,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(x,M){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(x.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;+mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var M=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(x.style,"nl2Br","1")?(M=M.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<M.length&&("<br/>"==M.substring(M.length-5)||"<br>"==M.substring(M.length-4))&&(M=M.substring(0,M.lastIndexOf("<br"))+"<div><br/></div>")):+M=M.replace(/\r\n/g,"").replace(/\n/g,"");return M};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};var I=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,M){this.graph.getModel().beginUpdate();try{I.apply(this,arguments),""==M&&this.graph.isCellDeletable(x.cell)&&+0==this.graph.model.getChildCount(x.cell)&&this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getBorderColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getMinimumSize=+function(x){var M=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*M+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,M){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(M.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?e(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||+this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var M=this.graph.view.translate,Q=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/Q-M.x);M=this.roundLength((this.bounds.y+this.currentDy)/Q-M.y);Q=this.graph.view.unit;this.hint.innerHTML=e(x,Q)+", "+e(M,Q);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 ca=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,M){ca.apply(this,arguments);var Q=this.graph.getCellStyle(x);if(null==Q.childLayout){var V=this.graph.model.getParent(x),ia=null!=V?this.graph.getCellGeometry(V):null;if(null!=ia&&(Q=this.graph.getCellStyle(V),"stackLayout"==Q.childLayout)){var ka=+parseFloat(mxUtils.getValue(Q,"stackBorder",mxStackLayout.prototype.border));Q="1"==mxUtils.getValue(Q,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);ia=ia.clone();Q?ia.height=M.height+oa.y+oa.height+2*ka:ia.width=M.width+oa.x+oa.width+2*ka;this.graph.model.setGeometry(V,ia)}}};var da=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(xa){Q.get(xa)||(Q.put(xa,!0),ia.push(xa))}for(var M=da.apply(this,+arguments),Q=new mxDictionary,V=this.graph.model,ia=[],ka=0;ka<M.length;ka++){var oa=M[ka];this.graph.isTableCell(oa)?x(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&x(V.getParent(oa));x(oa)}return ia};var ea=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(x){return ea.apply(this,arguments)&&!mxEvent.isControlDown(x.getEvent())&&!mxEvent.isShiftDown(x.getEvent())};var X=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=+function(){return X.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var ba=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var M=ba.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=+function(x){var M=ha.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,M){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(M.getEvent())};+mxVertexHandler.prototype.isCenteredEvent=function(x,M){return mxEvent.isControlDown(M.getEvent())||mxEvent.isMetaDown(M.getEvent())};var ma=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ma.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?+this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var Y=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var la=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||la.apply(this,arguments)&&+(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var x=0;this.graph.isTableRow(this.state.cell)?x=1:this.graph.isTableCell(this.state.cell)&&(x=2);return x};var Z=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Z.apply(this,arguments).grow(-this.getSelectionBorderInset())};var k=null,A=mxVertexHandler.prototype.createCustomHandles;+mxVertexHandler.prototype.createCustomHandles=function(){null==k&&(k=mxCellRenderer.defaultShapes.tableLine);var x=A.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var M=function(ab,Oa,Qa){for(var kb=[],cb=0;cb<ab.length;cb++){var Ya=ab[cb];kb.push(null==Ya?null:new mxPoint((ta+Ya.x+Oa)*ka,(ua+Ya.y+Qa)*ka))}return kb},Q=this,V=this.graph,ia=V.model,ka=V.view.scale,oa=this.state,xa=this.selectionBorder,ta=this.state.origin.x+V.view.translate.x,+ua=this.state.origin.y+V.view.translate.y;null==x&&(x=[]);var Fa=V.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Fa.length){var Na=ia.getChildCells(Fa[0].cell,!0),Wa=V.getTableLines(this.state.cell,!1,!0),Xa=V.getTableLines(this.state.cell,!0,!1);for(ia=0;ia<Fa.length;ia++)mxUtils.bind(this,function(ab){var Oa=Fa[ab],Qa=null;if(V.isCellMovable(Oa.cell)){Qa=ab<Fa.length-1?Fa[ab+1]:null;Qa=null!=Qa?V.getCellGeometry(Qa.cell):null;var kb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:+Qa;Qa=null!=Xa[ab]?new k(Xa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Qa.isDashed=xa.isDashed;Qa.svgStrokeTolerance++;Qa=new mxHandle(Oa,"row-resize",null,Qa);Qa.tableHandle=!0;var cb=0;Qa.shape.node.parentNode.insertBefore(Qa.shape.node,Qa.shape.node.parentNode.firstChild);Qa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==k)this.shape.line=M(Xa[ab],0,cb),this.shape.updateBoundsFromLine();else{var gb=+V.getActualStartSize(oa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+cb*ka;this.shape.bounds.x=oa.x+(ab==Fa.length-1?0:gb.x*ka);this.shape.bounds.width=oa.width-(ab==Fa.length-1?0:gb.width+gb.x+ka)}this.shape.redraw()}};var Ya=!1;Qa.setPosition=function(gb,hb,vb){cb=Math.max(Graph.minTableRowHeight-gb.height,hb.y-gb.y-gb.height);Ya=mxEvent.isShiftDown(vb.getEvent());null!=kb&&Ya&&(cb=Math.min(cb,kb.height-Graph.minTableRowHeight))};Qa.execute=function(gb){if(0!=+cb)V.setTableRowHeight(this.state.cell,cb,!Ya);else if(!Q.blockDelayedSelection){var hb=V.getCellAt(gb.getGraphX(),gb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(hb,gb)}cb=0};Qa.reset=function(){cb=0}}x.push(Qa)})(ia);for(ia=0;ia<Na.length;ia++)mxUtils.bind(this,function(ab){var Oa=V.view.getState(Na[ab]),Qa=V.getCellGeometry(Na[ab]),kb=null!=Qa.alternateBounds?Qa.alternateBounds:Qa;null==Oa&&(Oa=new mxCellState(V.view,Na[ab],V.getCellStyle(Na[ab])),Oa.x=oa.x+Qa.x*ka,Oa.y=oa.y+Qa.y*ka,+Oa.width=kb.width*ka,Oa.height=kb.height*ka,Oa.updateCachedBounds());Qa=ab<Na.length-1?Na[ab+1]:null;Qa=null!=Qa?V.getCellGeometry(Qa):null;var cb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:Qa;Qa=null!=Wa[ab]?new k(Wa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Qa.isDashed=xa.isDashed;Qa.svgStrokeTolerance++;Oa=new mxHandle(Oa,"col-resize",null,Qa);Oa.tableHandle=!0;var Ya=0;Oa.shape.node.parentNode.insertBefore(Oa.shape.node,Oa.shape.node.parentNode.firstChild);+Oa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ya?mxConstants.NONE:xa.stroke;if(this.shape.constructor==k)this.shape.line=M(Wa[ab],Ya,0),this.shape.updateBoundsFromLine();else{var hb=V.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(kb.width+Ya)*ka;this.shape.bounds.y=oa.y+(ab==Na.length-1?0:hb.y*ka);this.shape.bounds.height=oa.height-(ab==Na.length-1?0:(hb.height+hb.y)*ka)}this.shape.redraw()}};var gb=!1;Oa.setPosition=function(hb,vb,mb){Ya=+Math.max(Graph.minTableColumnWidth-kb.width,vb.x-hb.x-kb.width);gb=mxEvent.isShiftDown(mb.getEvent());null==cb||gb||(Ya=Math.min(Ya,cb.width-Graph.minTableColumnWidth))};Oa.execute=function(hb){if(0!=Ya)V.setTableColumnWidth(this.state.cell,Ya,gb);else if(!Q.blockDelayedSelection){var vb=V.getCellAt(hb.getGraphX(),hb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(vb,hb)}Ya=0};Oa.positionChanged=function(){};Oa.reset=function(){Ya=0};x.push(Oa)})(ia)}}return null!=x?x.reverse():null};var J=+mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(x){J.apply(this,arguments);if(null!=this.moveHandles)for(var M=0;M<this.moveHandles.length;M++)null!=this.moveHandles[M]&&(this.moveHandles[M].node.style.visibility=x?"":"hidden");if(null!=this.cornerHandles)for(M=0;M<this.cornerHandles.length;M++)this.cornerHandles[M].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&+this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var x=this.isMoveHandlesVisible();x&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():x||null==this.moveHandles||this.destroyMoveHandles();if(x&&null==this.moveHandles){for(x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].parentNode.removeChild(this.moveHandles[x]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var x=+this.graph,M=x.model,Q=[],V=0;V<M.getChildCount(this.state.cell);V++)mxUtils.bind(this,function(ia){if(null!=ia&&M.isVertex(ia.cell)&&x.isCellMovable(ia.cell)){var ka=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ia;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,+mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(ia.cell)||this.graph.selectCellForEvent(ia.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),+null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),ia.cell,oa),mxEvent.consume(oa))}));Q.push(ka)}else Q.push(null)})(this.graph.view.getState(M.getChildAt(this.state.cell,V)));return Q};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=+function(){if(null!=this.cornerHandles){for(var x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}};var U=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){U.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();+else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var x=0;4>x;x++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();+x=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var P=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),M=this.tolerance,Q=this.state.style.shape;null==mxCellRenderer.defaultShapes[Q]&&mxStencilRegistry.getStencil(Q);Q=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!Q&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=+this.customHandles[V]&&null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var ia=this.customHandles[V].shape.bounds,ka=ia.getCenterX(),oa=ia.getCenterY();if(Math.abs(this.state.x-ka)<ia.width/2||Math.abs(this.state.y-oa)<ia.height/2||Math.abs(this.state.x+this.state.width-ka)<ia.width/2||Math.abs(this.state.y+this.state.height-oa)<ia.height/2){Q=!0;break}}Q&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(M/=2,this.graph.isTable(this.state.cell)&&(M+=7),x.x=+this.sizers[0].bounds.width+M,x.y=this.sizers[0].bounds.height+M):x=P.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{x=this.state.view.scale;var M=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/x),M)+" x "+e(this.roundLength(this.bounds.height/+x),M)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=x.y+x.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=+"")};var T=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){T.apply(this,arguments);var x=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var W=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,M){W.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};+var aa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,M){aa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(x,M,Q){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var V=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(M.x/ia-V.x);V=this.roundLength(M.y/ia-V.y);var oa=+this.graph.view.unit;this.hint.innerHTML=e(ka,oa)+", "+e(V,oa);this.hint.style.visibility="visible";null!=Q&&(Q.view.updateEdgeBounds(Q),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(Q.length/ia):e(Q.length/ia,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Q=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*Q.x)+"%, "+Math.round(100*+Q.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),M.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+@@ -2705,407 +2704,407 @@ HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fHoverIcons.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=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxGraphHandler.prototype.previewColor="light-dark(#000000, #cccccc)";mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=-function(t){return!mxEvent.isShiftDown(t.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(t){return!mxEvent.isShiftDown(t.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(t){return mxEvent.isMouseEvent(t.getEvent())?-4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(t){var N=t.getEvent();return null==t.getState()&&!mxEvent.isMouseEvent(N)||mxEvent.isPopupTrigger(N)&&(null==t.getState()||mxEvent.isControlDown(N)||mxEvent.isShiftDown(N))}}else mxPanningHandler.prototype.isPanningTrigger=function(t){var N=t.getEvent();return mxEvent.isLeftMouseButton(N)&&(this.useLeftButtonForPanning&&null==t.getState()||mxEvent.isControlDown(N)&&!mxEvent.isShiftDown(N))||this.usePopupTrigger&&mxEvent.isPopupTrigger(N)};-mxRubberband.prototype.isSpaceEvent=function(t){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(t.getEvent())||mxEvent.isMetaDown(t.getEvent()))&&mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(t,N){if(this.cancelled)this.cancelled=!1,N.consume();else{var Q=-null!=this.div&&"none"!=this.div.style.display,X=null,ia=null,ka=t=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ia=this.first.y,t=(this.currentX-X)/this.graph.view.scale,ka=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(N.getEvent())||(t=this.graph.snap(t),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(t)<this.graph.tolerance&&(t=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(Q){if(this.isSpaceEvent(N)){this.graph.model.beginUpdate();-try{var pa=this.graph.getCellsBeyond(X,ia,this.graph.getDefaultParent(),!0,!0);for(Q=0;Q<pa.length;Q++)if(this.graph.isCellMovable(pa[Q])){var xa=this.graph.view.getState(pa[Q]),ta=this.graph.getCellGeometry(pa[Q]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(t,ka),this.graph.model.setGeometry(pa[Q],ta))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,N.getEvent());N.consume()}}};mxRubberband.prototype.mouseMove=function(t,-N){if(!N.isConsumed()&&null!=this.first){var Q=mxUtils.getScrollOrigin(this.graph.container);t=mxUtils.getOffset(this.graph.container);Q.x-=t.x;Q.y-=t.y;t=N.getX()+Q.x;Q=N.getY()+Q.y;var X=this.first.x-t,ia=this.first.y-Q,ka=this.graph.tolerance;if(null!=this.div||Math.abs(X)>ka||Math.abs(ia)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(t,Q),this.isSpaceEvent(N)?(t=this.x+this.width,Q=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(N.getEvent())||-(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=t-this.width),this.y<this.first.y&&(this.y=Q-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=+function(x){return!mxEvent.isShiftDown(x.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(x){return!mxEvent.isShiftDown(x.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(x){return mxEvent.isMouseEvent(x.getEvent())?+4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(x){var M=x.getEvent();return null==x.getState()&&!mxEvent.isMouseEvent(M)||mxEvent.isPopupTrigger(M)&&(null==x.getState()||mxEvent.isControlDown(M)||mxEvent.isShiftDown(M))}}else mxPanningHandler.prototype.isPanningTrigger=function(x){var M=x.getEvent();return mxEvent.isLeftMouseButton(M)&&(this.useLeftButtonForPanning&&null==x.getState()||mxEvent.isControlDown(M)&&!mxEvent.isShiftDown(M))||this.usePopupTrigger&&mxEvent.isPopupTrigger(M)};+mxRubberband.prototype.isSpaceEvent=function(x){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(x.getEvent())||mxEvent.isMetaDown(x.getEvent()))&&mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(x,M){if(this.cancelled)this.cancelled=!1,M.consume();else{var Q=+null!=this.div&&"none"!=this.div.style.display,V=null,ia=null,ka=x=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(V=this.first.x,ia=this.first.y,x=(this.currentX-V)/this.graph.view.scale,ka=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(M.getEvent())||(x=this.graph.snap(x),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(x)<this.graph.tolerance&&(x=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(Q){if(this.isSpaceEvent(M)){this.graph.model.beginUpdate();+try{var oa=this.graph.getCellsBeyond(V,ia,this.graph.getDefaultParent(),!0,!0);for(Q=0;Q<oa.length;Q++)if(this.graph.isCellMovable(oa[Q])){var xa=this.graph.view.getState(oa[Q]),ta=this.graph.getCellGeometry(oa[Q]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(x,ka),this.graph.model.setGeometry(oa[Q],ta))}}finally{this.graph.model.endUpdate()}}else oa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(oa,M.getEvent());M.consume()}}};mxRubberband.prototype.mouseMove=function(x,+M){if(!M.isConsumed()&&null!=this.first){var Q=mxUtils.getScrollOrigin(this.graph.container);x=mxUtils.getOffset(this.graph.container);Q.x-=x.x;Q.y-=x.y;x=M.getX()+Q.x;Q=M.getY()+Q.y;var V=this.first.x-x,ia=this.first.y-Q,ka=this.graph.tolerance;if(null!=this.div||Math.abs(V)>ka||Math.abs(ia)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(x,Q),this.isSpaceEvent(M)?(x=this.x+this.width,Q=this.y+this.height,V=this.graph.view.scale,mxEvent.isAltDown(M.getEvent())||+(this.width=this.graph.snap(this.width/V)*V,this.height=this.graph.snap(this.height/V)*V,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=x-this.width),this.y<this.first.y&&(this.y=Q-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):-(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),N.consume()}};var ja=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ja.apply(this,arguments)};var oa=(new Date).getTime(),qa=0,ra=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=-function(t,N,Q,X){ra.apply(this,arguments);Q!=this.currentTerminalState?(oa=(new Date).getTime(),qa=0):qa=(new Date).getTime()-oa;this.currentTerminalState=Q};var ua=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(t){return mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())?!1:null!=this.currentTerminalState&&t.getState()==this.currentTerminalState&&2E3<qa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,-"outlineConnect","1"))&&ua.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(t,N,Q){N=null!=t&&0==t;var X=this.state.getVisibleTerminalState(N);t=null!=t&&null!=this.state.absolutePoints&&(0==t||t>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==t)?this.graph.getConnectionConstraint(this.state,X,N):null;Q=null!=(null!=t?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(N),t):null)?Q?this.endFixedHandleImage:this.fixedHandleImage:-null!=t&&null!=X?Q?this.endTerminalHandleImage:this.terminalHandleImage:Q?this.endHandleImage:this.handleImage;if(null!=Q)return Q=new mxImageShape(new mxRectangle(0,0,Q.width,Q.height),Q.src),Q.preserveImageAspect=!1,Q;Q=mxConstants.HANDLE_SIZE;this.preferHtml&&--Q;return new mxRectangleShape(new mxRectangle(0,0,Q,Q),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var za=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(t,N,Q,X){X=N==mxEvent.ROTATION_HANDLE?-HoverIcons.prototype.rotationHandle:N==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:X;return za.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var N=this.graph.getModel(),Q=N.getParent(t[0]),X=this.graph.getCellGeometry(t[0]);if(N.isEdge(Q)&&null!=X&&X.relative&&(N=this.graph.view.getState(t[0]),null!=N&&2>N.width&&2>N.height&&null!=N.text&&null!=N.text.boundingBox))return mxRectangle.fromRectangle(N.text.boundingBox)}return Ba.apply(this,-arguments)};var Ca=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var t=Ca.apply(this,arguments),N=[],Q=0;Q<t.length;Q++)"1"!=mxUtils.getValue(t[Q].style,"part","0")&&N.push(t[Q]);return N};var La=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(t){var N=this.graph.getModel(),Q=N.getParent(t.cell),X=this.graph.getCellGeometry(t.cell);return N.isEdge(Q)&&null!=X&&X.relative&&2>t.width&&2>t.height&&null!=-t.text&&null!=t.text.boundingBox?(N=t.text.unrotatedBoundingBox||t.text.boundingBox,new mxRectangle(Math.round(N.x),Math.round(N.y),Math.round(N.width),Math.round(N.height))):La.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,N){var Q=this.graph.getModel(),X=Q.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(N)==mxEvent.ROTATION_HANDLE||!Q.isEdge(X)||null==ia||!ia.relative||null==this.state||-2<=this.state.width||2<=this.state.height)&&sa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var t=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),N=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&t==mxConstants.NONE&&N==mxConstants.NONE?(t=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,-t,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Aa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(t,N){Aa.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ea=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=-function(t,N){Ea.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(t,N){try{if(null==t&&(null==N||0==N.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),-this.linkHint=null);else if(null!=t||null!=N&&0<N.length){var Q=document.createElement("img");Q.className="geAdaptiveAsset";Q.setAttribute("src",Editor.editImage);Q.setAttribute("title",mxResources.get("editLink"));Q.setAttribute("width","14");Q.setAttribute("height","14");Q.style.paddingLeft="8px";Q.style.marginLeft="auto";Q.style.marginBottom="-1px";Q.style.cursor="pointer";var X=Q.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));-X.style.paddingLeft="4px";X.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=t){var ia=document.createElement("div");-ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(t,null,this.state.cell));this.linkHint.appendChild(ia);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ka=Q.cloneNode(!0);ia.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var pa=X.cloneNode(!0);ia.appendChild(pa);mxEvent.addListener(pa,-"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=N)for(ia=0;ia<N.length;ia++)mxUtils.bind(this,function(xa,ta){var va=document.createElement("div");va.style.display="flex";va.style.alignItems="center";va.style.marginTop=null!=t||0<ta?"6px":"0px";va.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Da=Q.cloneNode(!0);va.appendChild(Da);var Na=mxUtils.bind(this,function(Ya){var Za=-document.createElement("div");Za.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var ab=Za.getElementsByTagName("a")[ta];if(null!=ab){if(null==Ya||""==Ya){for(Ya=ab.cloneNode(!0).firstChild;null!=Ya;)ab.parentNode.insertBefore(Ya.cloneNode(!0),ab),Ya=Ya.nextSibling;ab.parentNode.removeChild(ab)}else ab.setAttribute("href",Ya);this.graph.labelChanged(this.state.cell,Za.innerHTML)}});mxEvent.addListener(Da,"click",mxUtils.bind(this,function(Ya){this.graph.showLinkDialog(xa.getAttribute("href")||-"",mxResources.get("ok"),Na);mxEvent.consume(Ya)}));Da=X.cloneNode(!0);va.appendChild(Da);mxEvent.addListener(Da,"click",mxUtils.bind(this,function(Ya){Na();mxEvent.consume(Ya)}));this.linkHint.appendChild(va)})(N[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ka=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var t=Ka.apply(this,-arguments);t.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return t};var Ma=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ma.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var ya=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var t=0;t<this.moveHandles.length;t++)null!=-this.moveHandles[t]&&(this.moveHandles[t].bounds.x=Math.round(this.moveHandles[t].rowState.x+this.moveHandles[t].rowState.width-this.moveHandles[t].bounds.width/2),this.moveHandles[t].bounds.y=Math.round(this.moveHandles[t].rowState.y+(this.moveHandles[t].rowState.height-this.moveHandles[t].bounds.height)/2),this.moveHandles[t].redraw());if(null!=this.cornerHandles){t=this.getSelectionBorderInset();var N=this.cornerHandles,Q=N[0].bounds.height/2;N[0].bounds.x=this.state.x-N[0].bounds.width/2+t;N[0].bounds.y=-this.state.y-Q+t;N[0].redraw();N[1].bounds.x=N[0].bounds.x+this.state.width-2*t;N[1].bounds.y=N[0].bounds.y;N[1].redraw();N[2].bounds.x=N[0].bounds.x;N[2].bounds.y=this.state.y+this.state.height-2*t;N[2].redraw();N[3].bounds.x=N[1].bounds.x;N[3].bounds.y=N[2].bounds.y;N[3].redraw();for(t=0;t<this.cornerHandles.length;t++)this.cornerHandles[t].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",-mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");ya.apply(this);null!=this.state&&null!=this.linkHint&&(t=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),N=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),Q=mxUtils.getBoundingBox(N,this.state.style[mxConstants.STYLE_ROTATION]||"0",t),t=null!=Q?mxUtils.getBoundingBox(this.state,-this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,N=null!=this.state.text?this.state.text.boundingBox:null,null==Q&&(Q=this.state),Q=Q.y+Q.height,null!=N&&(Q=Math.max(Q,N.y+N.height)),this.linkHint.style.left=t.x+t.width/2+"px",this.linkHint.style.top=Math.round(Q+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Wa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Wa.apply(this,arguments);-this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ia=mxEdgeHandler.prototype.redrawHandles;-mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ia.apply(this),null!=this.state&&null!=this.linkHint)){var t=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(t=new mxRectangle(t.x,t.y,t.width,t.height),t.add(this.state.text.bounds));this.linkHint.style.left=t.x+t.width/2+"px";this.linkHint.style.top=Math.round(t.y+t.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var Xa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=-function(){Xa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Pa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Pa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,n,y){mxShape.call(this);this.line=d;this.stroke=n;this.strokewidth=null!=y?y:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function v(){mxConnector.call(this)}function p(){mxCylinder.call(this)}function A(){mxActor.call(this)}function G(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function R(){mxShape.call(this)}-function T(){mxShape.call(this)}function c(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1}function f(){mxActor.call(this)}function k(){mxCylinder.call(this)}function B(){mxCylinder.call(this)}function z(){mxActor.call(this)}function C(){mxActor.call(this)}function I(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxActor.call(this)}function O(){mxActor.call(this)}function da(){mxActor.call(this)}function ea(d,n){this.canvas=d;this.canvas.setLineJoin("round");+(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),M.consume()}};var ja=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ja.apply(this,arguments)};var pa=(new Date).getTime(),sa=0,qa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=+function(x,M,Q,V){qa.apply(this,arguments);Q!=this.currentTerminalState?(pa=(new Date).getTime(),sa=0):sa=(new Date).getTime()-pa;this.currentTerminalState=Q};var wa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(x){return mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())?!1:null!=this.currentTerminalState&&x.getState()==this.currentTerminalState&&2E3<sa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,+"outlineConnect","1"))&&wa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(x,M,Q){M=null!=x&&0==x;var V=this.state.getVisibleTerminalState(M);x=null!=x&&null!=this.state.absolutePoints&&(0==x||x>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==x)?this.graph.getConnectionConstraint(this.state,V,M):null;Q=null!=(null!=x?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(M),x):null)?Q?this.endFixedHandleImage:this.fixedHandleImage:+null!=x&&null!=V?Q?this.endTerminalHandleImage:this.terminalHandleImage:Q?this.endHandleImage:this.handleImage;if(null!=Q)return Q=new mxImageShape(new mxRectangle(0,0,Q.width,Q.height),Q.src),Q.preserveImageAspect=!1,Q;Q=mxConstants.HANDLE_SIZE;this.preferHtml&&--Q;return new mxRectangleShape(new mxRectangle(0,0,Q,Q),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Ba=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(x,M,Q,V){V=M==mxEvent.ROTATION_HANDLE?+HoverIcons.prototype.rotationHandle:M==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:V;return Ba.apply(this,arguments)};var za=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(x){if(null!=x&&1==x.length){var M=this.graph.getModel(),Q=M.getParent(x[0]),V=this.graph.getCellGeometry(x[0]);if(M.isEdge(Q)&&null!=V&&V.relative&&(M=this.graph.view.getState(x[0]),null!=M&&2>M.width&&2>M.height&&null!=M.text&&null!=M.text.boundingBox))return mxRectangle.fromRectangle(M.text.boundingBox)}return za.apply(this,+arguments)};var Ea=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var x=Ea.apply(this,arguments),M=[],Q=0;Q<x.length;Q++)"1"!=mxUtils.getValue(x[Q].style,"part","0")&&M.push(x[Q]);return M};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(x){var M=this.graph.getModel(),Q=M.getParent(x.cell),V=this.graph.getCellGeometry(x.cell);return M.isEdge(Q)&&null!=V&&V.relative&&2>x.width&&2>x.height&&null!=+x.text&&null!=x.text.boundingBox?(M=x.text.unrotatedBoundingBox||x.text.boundingBox,new mxRectangle(Math.round(M.x),Math.round(M.y),Math.round(M.width),Math.round(M.height))):ra.apply(this,arguments)};var ya=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(x,M){var Q=this.graph.getModel(),V=Q.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(M)==mxEvent.ROTATION_HANDLE||!Q.isEdge(V)||null==ia||!ia.relative||null==this.state||+2<=this.state.width||2<=this.state.height)&&ya.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var x=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),M=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&x==mxConstants.NONE&&M==mxConstants.NONE?(x=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,+x,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(x,M){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ma=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=+function(x,M){Ma.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(x,M){try{if(null==x&&(null==M||0==M.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),+this.linkHint=null);else if(null!=x||null!=M&&0<M.length){var Q=document.createElement("img");Q.className="geAdaptiveAsset";Q.setAttribute("src",Editor.editImage);Q.setAttribute("title",mxResources.get("editLink"));Q.setAttribute("width","14");Q.setAttribute("height","14");Q.style.paddingLeft="8px";Q.style.marginLeft="auto";Q.style.marginBottom="-1px";Q.style.cursor="pointer";var V=Q.cloneNode(!0);V.setAttribute("src",Editor.trashImage);V.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));+V.style.paddingLeft="4px";V.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=x){var ia=document.createElement("div");+ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(x,null,this.state.cell));this.linkHint.appendChild(ia);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ka=Q.cloneNode(!0);ia.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var oa=V.cloneNode(!0);ia.appendChild(oa);mxEvent.addListener(oa,+"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=M)for(ia=0;ia<M.length;ia++)mxUtils.bind(this,function(xa,ta){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=x||0<ta?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Fa=Q.cloneNode(!0);ua.appendChild(Fa);var Na=mxUtils.bind(this,function(Wa){var Xa=+document.createElement("div");Xa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var ab=Xa.getElementsByTagName("a")[ta];if(null!=ab){if(null==Wa||""==Wa){for(Wa=ab.cloneNode(!0).firstChild;null!=Wa;)ab.parentNode.insertBefore(Wa.cloneNode(!0),ab),Wa=Wa.nextSibling;ab.parentNode.removeChild(ab)}else ab.setAttribute("href",Wa);this.graph.labelChanged(this.state.cell,Xa.innerHTML)}});mxEvent.addListener(Fa,"click",mxUtils.bind(this,function(Wa){this.graph.showLinkDialog(xa.getAttribute("href")||+"",mxResources.get("ok"),Na);mxEvent.consume(Wa)}));Fa=V.cloneNode(!0);ua.appendChild(Fa);mxEvent.addListener(Fa,"click",mxUtils.bind(this,function(Wa){Na();mxEvent.consume(Wa)}));this.linkHint.appendChild(ua)})(M[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ha=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var x=Ha.apply(this,+arguments);x.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return x};var Aa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Aa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ra=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var x=0;x<this.moveHandles.length;x++)null!=+this.moveHandles[x]&&(this.moveHandles[x].bounds.x=Math.round(this.moveHandles[x].rowState.x+this.moveHandles[x].rowState.width-this.moveHandles[x].bounds.width/2),this.moveHandles[x].bounds.y=Math.round(this.moveHandles[x].rowState.y+(this.moveHandles[x].rowState.height-this.moveHandles[x].bounds.height)/2),this.moveHandles[x].redraw());if(null!=this.cornerHandles){x=this.getSelectionBorderInset();var M=this.cornerHandles,Q=M[0].bounds.height/2;M[0].bounds.x=this.state.x-M[0].bounds.width/2+x;M[0].bounds.y=+this.state.y-Q+x;M[0].redraw();M[1].bounds.x=M[0].bounds.x+this.state.width-2*x;M[1].bounds.y=M[0].bounds.y;M[1].redraw();M[2].bounds.x=M[0].bounds.x;M[2].bounds.y=this.state.y+this.state.height-2*x;M[2].redraw();M[3].bounds.x=M[1].bounds.x;M[3].bounds.y=M[2].bounds.y;M[3].redraw();for(x=0;x<this.cornerHandles.length;x++)this.cornerHandles[x].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",+mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ra.apply(this);null!=this.state&&null!=this.linkHint&&(x=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),M=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),Q=mxUtils.getBoundingBox(M,this.state.style[mxConstants.STYLE_ROTATION]||"0",x),x=null!=Q?mxUtils.getBoundingBox(this.state,+this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,M=null!=this.state.text?this.state.text.boundingBox:null,null==Q&&(Q=this.state),Q=Q.y+Q.height,null!=M&&(Q=Math.max(Q,M.y+M.height)),this.linkHint.style.left=x.x+x.width/2+"px",this.linkHint.style.top=Math.round(Q+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Za=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Za.apply(this,arguments);+this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var La=mxEdgeHandler.prototype.redrawHandles;+mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(La.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=x.x+x.width/2+"px";this.linkHint.style.top=Math.round(x.y+x.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var $a=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=+function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Da=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Da.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,n,y){mxShape.call(this);this.line=d;this.stroke=n;this.strokewidth=null!=y?y:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function u(){mxConnector.call(this)}function p(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function O(){mxCylinder.call(this)}function R(){mxShape.call(this)}+function c(){mxShape.call(this)}function f(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1}function l(){mxActor.call(this)}function t(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function C(){mxActor.call(this)}function F(){mxActor.call(this)}function N(){mxActor.call(this)}function K(){mxActor.call(this)}function I(){mxActor.call(this)}function ca(){mxActor.call(this)}function da(){mxActor.call(this)}function ea(d,n){this.canvas=d;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=n;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ea.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ea.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ea.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ea.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=-mxUtils.bind(this,ea.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ea.prototype.arcTo)}function ca(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function ma(){mxActor.call(this)}function la(){mxActor.call(this)}function Y(){mxActor.call(this)}function fa(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function l(){mxCylinder.call(this)}function u(){mxShape.call(this)}function H(){mxShape.call(this)}function U(){mxEllipse.call(this)}-function J(){mxShape.call(this)}function W(){mxShape.call(this)}function aa(){mxRectangleShape.call(this)}function ba(){mxShape.call(this)}function ja(){mxShape.call(this)}function oa(){mxShape.call(this)}function qa(){mxShape.call(this)}function ra(){mxShape.call(this)}function ua(){mxCylinder.call(this)}function za(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ca(){mxDoubleEllipse.call(this)}function La(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);-this.spacing=0}function Aa(){mxArrowConnector.call(this);this.spacing=0}function Ea(){mxActor.call(this)}function Ka(){mxRectangleShape.call(this)}function Ma(){mxActor.call(this)}function ya(){mxActor.call(this)}function Wa(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Xa(){mxActor.call(this)}function Pa(){mxActor.call(this)}function t(){mxActor.call(this)}function N(){mxActor.call(this)}function Q(){mxActor.call(this)}function X(){mxActor.call(this)}function ia(){mxEllipse.call(this)}-function ka(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Ya(){mxActor.call(this)}function Za(){mxActor.call(this)}function ab(){mxActor.call(this)}function Ra(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=-!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)}function kb(d,n,y,q,x,D,E,ha,M,wa){E+=M;var na=q.clone();q.x-=x*(2*E+M);q.y-=D*(2*E+M);x*=E+M;D*=E+M;return function(){d.ellipse(na.x-x-E,na.y-D-E,2*E,2*E);wa?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var n=0;n<this.line.length;n++){var y=this.line[n];null!=y&&(y=new mxRectangle(y.x,y.y,this.strokewidth,this.strokewidth),null==-d?d=y:d.add(y))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,n,y,q,x){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,n,y,q){if(null!=n){var x=null;d.begin();for(var D=0;D<n.length;D++){var E=n[D];null!=E&&(null==x?d.moveTo(E.x+y,E.y+q):null!=x&&d.lineTo(E.x+y,E.y+q));x=E}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var n=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var y=null,-q=0;q<this.line.length&&!n;q++){var x=this.line[q];null!=x&&null!=y&&(n=mxUtils.rectangleIntersectsSegment(d,y,x));y=x}return n};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(d,n,y,q,x){var D=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):-!1,E=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Da.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-n,-y));D||this.outline||!(E&&ha<x||!E&&ha<q)||this.paintForeground(d,n,y,q,x)};e.prototype.paintForeground=function(d,n,y,q,x){if(null!=this.state){var D=this.flipH,E=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=D;D=E;E=ha}d.rotate(-this.getShapeRotation(),-D,E,n+q/2,y+x/2);s=this.scale;n=this.bounds.x/s;y=this.bounds.y/s;q=this.bounds.width/s;x=this.bounds.height/s;this.paintTableForeground(d,n,y,q,x)}};e.prototype.paintTableForeground=function(d,n,y,q,x){q=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(x=0;x<q.length;x++)b.prototype.paintTableLine(d,q[x],n,y)};e.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?-d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(g,e);g.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",g);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(d,n,y,q,x){var D=Math.max(0,Math.min(q,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,x);d.lineTo(D,x);d.lineTo(0,x-D);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(0,0),d.lineTo(q-D,0),d.lineTo(q,D),-d.lineTo(D,D),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(D,D),d.lineTo(D,x),d.lineTo(0,x-D),d.close(),d.fill()),d.begin(),d.moveTo(D,x),d.lineTo(D,D),d.lineTo(0,0),d.moveTo(D,D),d.lineTo(q,D),d.end(),d.stroke())};m.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",-m);var cb=Math.tan(mxUtils.toRadians(30)),$a=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",A);mxUtils.extend(v,mxConnector);v.prototype.paintEdgeShape=function(d,n){var y=this.createMarker(d,n,!0),q=this.createMarker(d,n,!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!=y&&y();null!=q&&q()};mxCellRenderer.registerShape("wire",v);mxUtils.extend(p,mxCylinder);p.prototype.size=6;p.prototype.paintVertexShape=function(d,n,y,q,x){d.setFillColor(this.stroke);var D=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(n+.5*(q-D),y+.5*(x-D),D,D);d.fill();d.setFillColor(mxConstants.NONE);d.rect(n,y,q,x);d.fill()};mxCellRenderer.registerShape("waypoint",-p);mxUtils.extend(A,mxActor);A.prototype.size=20;A.prototype.redrawPath=function(d,n,y,q,x){n=Math.min(q,x/cb);d.translate((q-n)/2,(x-n)/2+n/4);d.moveTo(0,.25*n);d.lineTo(.5*n,n*$a);d.lineTo(n,.25*n);d.lineTo(.5*n,(.5-$a)*n);d.lineTo(0,.25*n);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",A);mxUtils.extend(G,mxCylinder);G.prototype.size=20;G.prototype.redrawPath=function(d,n,y,q,x,D){n=Math.min(q,x/(.5+cb));D?(d.moveTo(0,.25*n),d.lineTo(.5*n,(.5-$a)*n),d.lineTo(n,.25*n),d.moveTo(.5*-n,(.5-$a)*n),d.lineTo(.5*n,(1-$a)*n)):(d.translate((q-n)/2,(x-n)/2),d.moveTo(0,.25*n),d.lineTo(.5*n,n*$a),d.lineTo(n,.25*n),d.lineTo(n,.75*n),d.lineTo(.5*n,(1-$a)*n),d.lineTo(0,.75*n),d.close());d.end()};mxCellRenderer.registerShape("isoCube",G);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,n,y,q,x,D){n=Math.min(x/2,Math.round(x/8)+this.strokewidth-1);if(D&&null!=this.fill||!D&&null==this.fill)d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,-n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,-n);D||(d.moveTo(0,n),d.curveTo(0,-n/3,q,-n/3,q,n),d.lineTo(q,x-n),d.curveTo(q,x+n/3,0,x+n/3,0,x-n),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,n,y,q,x){var D=Math.max(0,Math.min(q,Math.min(x,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(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,x);d.lineTo(0,x);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(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.close(),d.fill()),d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.end(),d.stroke())};mxCellRenderer.registerShape("note",F);mxUtils.extend(P,F);mxCellRenderer.registerShape("note2",P);P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=-15;R.prototype.paintVertexShape=function(d,n,y,q,x){var D=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;D=Math.min(q*Math.tan(D),.5*x);d.translate(n,y);d.begin();d.moveTo(.5*q,0);d.lineTo(q,D);d.lineTo(q,x-D);d.lineTo(.5*q,x);d.lineTo(0,x-D);d.lineTo(0,D);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,D);d.lineTo(.5*q,2*D);d.lineTo(q,D);d.moveTo(.5*q,2*D);d.lineTo(.5*q,x);d.stroke()};mxCellRenderer.registerShape("isoCube2",-R);mxUtils.extend(T,mxShape);T.prototype.size=15;T.prototype.paintVertexShape=function(d,n,y,q,x){var D=Math.max(0,Math.min(.5*x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(n,y);0==D?(d.rect(0,0,q,x),d.fillAndStroke()):(d.begin(),d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D),d.lineTo(q,x-D),d.arcTo(.5*q,D,0,0,1,.5*q,x),d.arcTo(.5*q,D,0,0,1,0,x-D),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*-q,D,0,0,1,0,D),d.stroke())};mxCellRenderer.registerShape("cylinder2",T);mxUtils.extend(c,mxCylinder);c.prototype.size=15;c.prototype.paintVertexShape=function(d,n,y,q,x){var D=Math.max(0,Math.min(.5*x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"lid",!0);d.translate(n,y);0==D?(d.rect(0,0,q,x),d.fillAndStroke()):(d.begin(),E?(d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D)):(d.moveTo(0,0),d.arcTo(.5*q,D,0,0,0,.5*q,D),d.arcTo(.5*q,D,-0,0,0,q,0)),d.lineTo(q,x-D),d.arcTo(.5*q,D,0,0,1,.5*q,x),d.arcTo(.5*q,D,0,0,1,0,x-D),d.close(),d.fillAndStroke(),d.setShadow(!1),E&&(d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*q,D,0,0,1,0,D),d.stroke()))};mxCellRenderer.registerShape("cylinder3",c);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(d,n,y,q,x){d.moveTo(0,0);d.quadTo(q/2,.5*x,q,0);d.quadTo(.5*q,x/2,q,x);d.quadTo(q/2,.5*x,0,x);d.quadTo(.5*q,x/2,0,0);d.end()};mxCellRenderer.registerShape("switch",f);mxUtils.extend(k,-mxCylinder);k.prototype.tabWidth=60;k.prototype.tabHeight=20;k.prototype.tabPosition="right";k.prototype.arcSize=.1;k.prototype.paintVertexShape=function(d,n,y,q,x){d.translate(n,y);n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));y=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var D=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),E=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,-"absoluteArcSize",!1),M=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ha||(M*=Math.min(q,x));M=Math.min(M,.5*q,.5*(x-y));n=Math.max(n,M);n=Math.min(q-M,n);E||(M=0);d.begin();"left"==D?(d.moveTo(Math.max(M,0),y),d.lineTo(Math.max(M,0),0),d.lineTo(n,0),d.lineTo(n,y)):(d.moveTo(q-n,y),d.lineTo(q-n,0),d.lineTo(q-Math.max(M,0),0),d.lineTo(q-Math.max(M,0),y));E?(d.moveTo(0,M+y),d.arcTo(M,M,0,0,1,M,y),d.lineTo(q-M,y),d.arcTo(M,M,0,0,1,q,M+y),d.lineTo(q,x-M),d.arcTo(M,M,0,0,1,q-M,x),d.lineTo(M,-x),d.arcTo(M,M,0,0,1,0,x-M)):(d.moveTo(0,y),d.lineTo(q,y),d.lineTo(q,x),d.lineTo(0,x));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(q-30,y+20),d.lineTo(q-20,y+10),d.lineTo(q-10,y+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",k);k.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,-"labelInHeader",!1)){var y=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var q=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x||(D*=Math.min(d.width,d.height));D=Math.min(D,.5*d.width,.5*(d.height-n));q||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width--y),Math.min(d.height,d.height-n)):new mxRectangle(Math.min(d.width,d.width-y),0,D,Math.min(d.height,d.height-n))}return new mxRectangle(0,Math.min(d.height,n),0,0)}return null};mxUtils.extend(B,mxCylinder);B.prototype.arcSize=.1;B.prototype.paintVertexShape=function(d,n,y,q,x){d.translate(n,y);var D=mxUtils.getValue(this.style,"rounded",!1),E=mxUtils.getValue(this.style,"absoluteArcSize",!1);n=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));y=mxUtils.getValue(this.style,"umlStateConnection",-null);E||(n*=Math.min(q,x));n=Math.min(n,.5*q,.5*x);D||(n=0);D=0;null!=y&&(D=10);d.begin();d.moveTo(D,n);d.arcTo(n,n,0,0,1,D+n,0);d.lineTo(q-n,0);d.arcTo(n,n,0,0,1,q,n);d.lineTo(q,x-n);d.arcTo(n,n,0,0,1,q-n,x);d.lineTo(D+n,x);d.arcTo(n,n,0,0,1,D,x-n);d.close();d.fillAndStroke();d.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(d.roundrect(q-40,x-20,10,10,3,3),d.stroke(),d.roundrect(q-20,x-20,10,10,3,3),d.stroke(),d.begin(),d.moveTo(q-30,x-15),d.lineTo(q-20,x-15),-d.stroke());"connPointRefEntry"==y?(d.ellipse(0,.5*x-10,20,20),d.fillAndStroke()):"connPointRefExit"==y&&(d.ellipse(0,.5*x-10,20,20),d.fillAndStroke(),d.begin(),d.moveTo(5,.5*x-5),d.lineTo(15,.5*x+5),d.moveTo(15,.5*x-5),d.lineTo(5,.5*x+5),d.stroke())};B.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",B);mxUtils.extend(z,-mxActor);z.prototype.size=30;z.prototype.isRoundable=function(){return!0};z.prototype.redrawPath=function(d,n,y,q,x){n=Math.max(0,Math.min(q,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,0),new mxPoint(q,0),new mxPoint(q,x),new mxPoint(0,x),new mxPoint(0,n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("card",z);mxUtils.extend(C,mxActor);C.prototype.size=-.4;C.prototype.redrawPath=function(d,n,y,q,x){n=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,n/2);d.quadTo(q/4,1.4*n,q/2,n/2);d.quadTo(3*q/4,n*(1-1.4),q,n/2);d.lineTo(q,x-n/2);d.quadTo(3*q/4,x-1.4*n,q/2,x-n/2);d.quadTo(q/4,x-n*(1-1.4),0,x-n/2);d.lineTo(0,n/2);d.close();d.end()};C.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",this.size),y=d.width,q=d.height;if(null==this.direction||-this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return n*=q,new mxRectangle(d.x,d.y+n,y,q-2*n);n*=y;return new mxRectangle(d.x+n,d.y,y-2*n,q)}return d};mxCellRenderer.registerShape("tape",C);mxUtils.extend(I,mxActor);I.prototype.size=.3;I.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};I.prototype.redrawPath=function(d,n,y,-q,x){n=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,0);d.lineTo(q,0);d.lineTo(q,x-n/2);d.quadTo(3*q/4,x-1.4*n,q/2,x-n/2);d.quadTo(q/4,x-n*(1-1.4),0,x-n/2);d.lineTo(0,n/2);d.close();d.end()};mxCellRenderer.registerShape("document",I);var fb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(d,n,y,q){var x=mxUtils.getValue(this.style,"size");return null!=x?q*Math.max(0,Math.min(1,x)):fb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=-function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,d.height*n),0,0)}return null};c.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(n/=2);return new mxRectangle(0,Math.min(d.height*this.scale,2*n*this.scale),0,Math.max(0,.3*n*this.scale))}return null};k.prototype.getLabelMargins=-function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var y=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var q=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x||(D*=Math.min(d.width,d.height));D=Math.min(D,-.5*d.width,.5*(d.height-n));q||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width-y),Math.min(d.height,d.height-n)):new mxRectangle(Math.min(d.width,d.width-y),0,D,Math.min(d.height,d.height-n))}return new mxRectangle(0,Math.min(d.height,n),0,0)}return null};B.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};P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,Math.max(0,n*this.scale))}return null};mxUtils.extend(L,mxActor);L.prototype.size=.2;L.prototype.fixedSize=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(d,n,y,q,x){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,-"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(n,0),new mxPoint(q,0),new mxPoint(q-n,x)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("parallelogram",L);mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,-n,y,q,x){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,x)],this.isRounded,y,!0)};mxCellRenderer.registerShape("trapezoid",K);mxUtils.extend(O,mxActor);-O.prototype.size=.5;O.prototype.redrawPath=function(d,n,y,q,x){d.setFillColor(null);n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(q,0),new mxPoint(n,0),new mxPoint(n,x/2),new mxPoint(0,x/2),new mxPoint(n,x/2),new mxPoint(n,x),new mxPoint(q,x)],this.isRounded,y,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",O);mxUtils.extend(da,mxActor);-da.prototype.redrawPath=function(d,n,y,q,x){d.setStrokeWidth(1);d.setFillColor(this.stroke);n=q/5;d.rect(0,0,n,x);d.fillAndStroke();d.rect(2*n,0,n,x);d.fillAndStroke();d.rect(4*n,0,n,x);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",da);ea.prototype.moveTo=function(d,n){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;this.firstX=d;this.firstY=n};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,n,y,q){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=y;this.lastY=q};ea.prototype.curveTo=function(d,n,y,q,x,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=D};ea.prototype.arcTo=function(d,n,y,q,x,D,E){this.originalArcTo.apply(this.canvas,arguments);this.lastX=D;this.lastY=E};ea.prototype.lineTo=function(d,n){if(null!=this.lastX&&null!=this.lastY){var y=function(na){return"number"===-typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},q=Math.abs(d-this.lastX),x=Math.abs(n-this.lastY),D=Math.sqrt(q*q+x*x);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;return}var E=Math.round(D/10),ha=this.defaultVariation;5>E&&(E=5,ha/=3);var M=y(d-this.lastX)*q/E;y=y(n-this.lastY)*x/E;q/=D;x/=D;for(D=0;D<E;D++){var wa=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,M*D+this.lastX-wa*x,y*D+this.lastY-wa*q)}this.originalLineTo.call(this.canvas,d,n)}else this.originalLineTo.apply(this.canvas,-arguments);this.lastX=d;this.lastY=n};ea.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var jb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(d){jb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var sb=mxShape.prototype.afterPaint;-mxShape.prototype.afterPaint=function(d){sb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ea(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var Ab=mxRectangleShape.prototype.isHtmlAllowed;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"))&&Ab.apply(this,arguments)};var nb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,n,y,q,x){if(null==d.handJiggle||d.handJiggle.constructor!=ea)nb.apply(this,arguments);else{var D=!0;null!=this.style&&(D="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(D||-null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)D||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?D=Math.min(q/2,Math.min(x/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,D=Math.min(q*D,x*D)),d.moveTo(n+-D,y),d.lineTo(n+q-D,y),d.quadTo(n+q,y,n+q,y+D),d.lineTo(n+q,y+x-D),d.quadTo(n+q,y+x,n+q-D,y+x),d.lineTo(n+D,y+x),d.quadTo(n,y+x,n,y+x-D),d.lineTo(n,y+D),d.quadTo(n,y,n+D,y)):(d.moveTo(n,y),d.lineTo(n+q,y),d.lineTo(n+q,y+x),d.lineTo(n,y+x),d.lineTo(n,y)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(ca,mxRectangleShape);ca.prototype.size=.1;ca.prototype.fixedSize=!1;ca.prototype.isHtmlAllowed=function(){return!1};ca.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,-!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var n=d.width,y=d.height;d=new mxRectangle(d.x,d.y,n,y);var q=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;q=Math.max(q,Math.min(n*x,y*x))}d.x+=Math.round(q);d.width-=Math.round(2*q);return d}return d};ca.prototype.paintForeground=-function(d,n,y,q,x){var D=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),E=parseFloat(mxUtils.getValue(this.style,"size",this.size));E=D?Math.max(0,Math.min(q,E)):q*Math.max(0,Math.min(1,E));this.isRounded&&(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.max(E,Math.min(q*D,x*D)));E=Math.round(E);d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+x);d.moveTo(n+q-E,y);d.lineTo(n+q-E,y+x);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,-arguments)};mxCellRenderer.registerShape("process",ca);mxCellRenderer.registerShape("process2",ca);mxUtils.extend(V,mxRectangleShape);V.prototype.paintBackground=function(d,n,y,q,x){d.setFillColor(mxConstants.NONE);d.rect(n,y,q,x);d.fill()};V.prototype.paintForeground=function(d,n,y,q,x){};mxCellRenderer.registerShape("transparent",V);mxUtils.extend(ma,mxHexagon);ma.prototype.size=30;ma.prototype.position=.5;ma.prototype.position2=.5;ma.prototype.base=20;ma.prototype.getLabelMargins=function(){return new mxRectangle(0,-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ma.prototype.isRoundable=function(){return!0};ma.prototype.redrawPath=function(d,n,y,q,x){n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;y=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var D=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",-this.position2)))),ha=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,x-y),new mxPoint(Math.min(q,D+ha),x-y),new mxPoint(E,x),new mxPoint(Math.max(0,D),x-y),new mxPoint(0,x-y)],this.isRounded,n,!0,[4])};mxCellRenderer.registerShape("callout",ma);mxUtils.extend(la,mxActor);la.prototype.size=.2;la.prototype.fixedSize=20;la.prototype.isRoundable=function(){return!0};la.prototype.redrawPath=function(d,-n,y,q,x){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q-n,0),new mxPoint(q,x/2),new mxPoint(q-n,x),new mxPoint(0,x),new mxPoint(n,x/2)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("step",-la);mxUtils.extend(Y,mxHexagon);Y.prototype.size=.25;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(d,n,y,q,x){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,-0),new mxPoint(q-n,0),new mxPoint(q,.5*x),new mxPoint(q-n,x),new mxPoint(n,x),new mxPoint(0,.5*x)],this.isRounded,y,!0)};mxCellRenderer.registerShape("hexagon",Y);mxUtils.extend(fa,mxRectangleShape);fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.paintForeground=function(d,n,y,q,x){var D=Math.min(q/5,x/5)+1;d.begin();d.moveTo(n+q/2,y+D);d.lineTo(n+q/2,y+x-D);d.moveTo(n+D,y+x/2);d.lineTo(n+q-D,y+x/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};-mxCellRenderer.registerShape("plus",fa);var lb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};mxRhombus.prototype.paintVertexShape=function(d,n,y,q,x){lb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var D=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||-0);n+=D;y+=D;q-=2*D;x-=2*D;0<q&&0<x&&(d.setShadow(!1),lb.apply(this,[d,n,y,q,x]))}};mxUtils.extend(Z,mxRectangleShape);Z.prototype.isHtmlAllowed=function(){return!1};Z.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};Z.prototype.paintForeground=function(d,n,y,q,x){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var D=-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;x-=2*D;0<q&&0<x&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);D=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+D]];if(null!=E){var ha=this.style["symbol"+D+"Align"],M=this.style["symbol"+D+"VerticalAlign"],wa=this.style["symbol"+D+"Width"],na=this.style["symbol"+D+"Height"],Va=this.style["symbol"+D+"Spacing"]||0,gb=this.style["symbol"+D+"VSpacing"]||-Va,bb=this.style["symbol"+D+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(q+this.strokewidth,x+this.strokewidth),Va+=bb,gb+=bb);bb=n;var Fa=y;bb=ha==mxConstants.ALIGN_CENTER?bb+(q-wa)/2:ha==mxConstants.ALIGN_RIGHT?bb+(q-wa-Va):bb+Va;Fa=M==mxConstants.ALIGN_MIDDLE?Fa+(x-na)/2:M==mxConstants.ALIGN_BOTTOM?Fa+(x-na-gb):Fa+gb;d.save();ha=new E;ha.style=this.style;E.prototype.paintVertexShape.call(ha,d,bb,Fa,wa,na);d.restore()}D++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};-mxCellRenderer.registerShape("ext",Z);mxUtils.extend(l,mxCylinder);l.prototype.redrawPath=function(d,n,y,q,x,D){D?(d.moveTo(0,0),d.lineTo(q/2,x/2),d.lineTo(q,0),d.end()):(d.moveTo(0,0),d.lineTo(q,0),d.lineTo(q,x),d.lineTo(0,x),d.close())};mxCellRenderer.registerShape("message",l);mxUtils.extend(u,mxShape);u.prototype.paintBackground=function(d,n,y,q,x){d.translate(n,y);d.ellipse(q/4,0,q/2,x/4);d.fillAndStroke();d.begin();d.moveTo(q/2,x/4);d.lineTo(q/2,2*x/3);d.moveTo(q/2,x/3);d.lineTo(0,x/3);d.moveTo(q/-2,x/3);d.lineTo(q,x/3);d.moveTo(q/2,2*x/3);d.lineTo(0,x);d.moveTo(q/2,2*x/3);d.lineTo(q,x);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",u);mxUtils.extend(H,mxShape);H.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};H.prototype.paintBackground=function(d,n,y,q,x){d.translate(n,y);d.begin();d.moveTo(0,x/4);d.lineTo(0,3*x/4);d.end();d.stroke();d.begin();d.moveTo(0,x/2);d.lineTo(q/6,x/2);d.end();d.stroke();d.ellipse(q/6,0,5*q/6,x);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",-H);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(d,n,y,q,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+x);d.lineTo(n+7*q/8,y+x);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",U);mxUtils.extend(J,mxShape);J.prototype.paintVertexShape=function(d,n,y,q,x){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,x);d.moveTo(0,0);d.lineTo(q,x);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",J);mxUtils.extend(W,mxShape);-W.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};W.prototype.paintBackground=function(d,n,y,q,x){d.translate(n,y);d.begin();d.moveTo(3*q/8,x/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,x/8,q,7*x/8);d.fillAndStroke()};W.prototype.paintForeground=function(d,n,y,q,x){d.begin();d.moveTo(3*q/8,x/8*1.1);d.lineTo(5*q/8,x/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",W);mxUtils.extend(aa,mxRectangleShape);aa.prototype.size=-40;aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.getLabelBounds=function(d){var n=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,n)};aa.prototype.paintBackground=function(d,n,y,q,x){var D=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,-d,n,y,q,D):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=aa&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,n,y,q,D),d.restore()));D<x&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(n+q/2,y+D),d.lineTo(n+q/2,y+x),d.end(),d.stroke())};aa.prototype.paintForeground=function(d,n,y,q,x){var D=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,n,y,q,-Math.min(x,D))};mxCellRenderer.registerShape("umlLifeline",aa);mxUtils.extend(ba,mxShape);ba.prototype.width=60;ba.prototype.height=30;ba.prototype.corner=10;ba.prototype.configurePointerEvents=function(d){var n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=n&&n!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};ba.prototype.getLabelMargins=-function(d){return new mxRectangle(0,0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};ba.prototype.paintBackground=function(d,n,y,q,x){var D=this.corner,E=Math.min(q,Math.max(D,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),ha=Math.min(x,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),M=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,-mxConstants.NONE);M!=mxConstants.NONE&&(d.setFillColor(M),d.rect(n,y,q,x),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,n,y,q,x),d.setGradient(this.fill,this.gradient,n,y,q,x,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(n,y);d.lineTo(n+E,y);d.lineTo(n+E,y+Math.max(0,ha-1.5*D));d.lineTo(n+Math.max(0,E-D),y+ha);d.lineTo(n,y+ha);d.close();d.fillAndStroke();this.configurePointerEvents(d);-d.begin();d.moveTo(n+E,y);d.lineTo(n+q,y);d.lineTo(n+q,y+x);d.lineTo(n,y+x);d.lineTo(n,y+ha);d.stroke()};mxCellRenderer.registerShape("umlFrame",ba);mxPerimeter.CenterPerimeter=function(d,n,y,q){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,n,y,q){q=aa.prototype.size;null!=n&&(q=mxUtils.getValue(n.style,"size",q)*n.view.scale);n=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*-n.view.scale/2-1;y.x<d.getCenterX()&&(n=-1*(n+1));return new mxPoint(d.getCenterX()+n,Math.min(d.y+d.height,Math.max(d.y+q,y.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,n,y,q){q=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,n,y,q){q=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||-1)*n.view.scale/2-1;null!=n.style.backboneSize&&(q+=parseFloat(n.style.backboneSize)*n.view.scale/2-1);if("south"==n.style[mxConstants.STYLE_DIRECTION]||"north"==n.style[mxConstants.STYLE_DIRECTION])return y.x<d.getCenterX()&&(q=-1*(q+1)),new mxPoint(d.getCenterX()+q,Math.min(d.y+d.height,Math.max(d.y,y.y)));y.y<d.getCenterY()&&(q=-1*(q+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,y.x)),d.getCenterY()+q)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=-function(d,n,y,q){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(n.style,"size",ma.prototype.size))*n.view.scale))),n.style),n,y,q)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,n,y,q){var x="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=x?L.prototype.fixedSize:L.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));-x&&(D*=n.view.scale);var E=d.x,ha=d.y,M=d.width,wa=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(x=x?Math.max(0,Math.min(wa,D)):wa*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M,ha+x),new mxPoint(E+M,ha+wa),new mxPoint(E,ha+wa-x),new mxPoint(E,ha)]):(x=x?Math.max(0,Math.min(.5*M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+x,ha),new mxPoint(E+-M,ha),new mxPoint(E+M-x,ha+wa),new mxPoint(E,ha+wa),new mxPoint(E+x,ha)]);wa=d.getCenterX();d=d.getCenterY();d=new mxPoint(wa,d);q&&(y.x<E||y.x>E+M?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(ha,d,y)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,n,y,q){var x="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=x?K.prototype.fixedSize:K.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));x&&(D*=n.view.scale);-var E=d.x,ha=d.y,M=d.width,wa=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(x=x?Math.max(0,Math.min(.5*M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+x,ha),new mxPoint(E+M-x,ha),new mxPoint(E+M,ha+wa),new mxPoint(E,ha+wa),new mxPoint(E+x,ha)]):n==mxConstants.DIRECTION_WEST?(x=x?Math.max(0,Math.min(M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M,ha),new mxPoint(E+-M-x,ha+wa),new mxPoint(E+x,ha+wa),new mxPoint(E,ha)]):n==mxConstants.DIRECTION_NORTH?(x=x?Math.max(0,Math.min(wa,D)):wa*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha+x),new mxPoint(E+M,ha),new mxPoint(E+M,ha+wa),new mxPoint(E,ha+wa-x),new mxPoint(E,ha+x)]):(x=x?Math.max(0,Math.min(wa,D)):wa*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M,ha+x),new mxPoint(E+M,ha+wa-x),new mxPoint(E,ha+wa),new mxPoint(E,ha)]);wa=d.getCenterX();d=d.getCenterY();d=new mxPoint(wa,d);q&&(y.x<E||y.x>E+-M?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(ha,d,y)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,n,y,q){var x="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=x?la.prototype.fixedSize:la.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));x&&(D*=n.view.scale);var E=d.x,ha=d.y,M=d.width,wa=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):-mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(x=x?Math.max(0,Math.min(M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M-x,ha),new mxPoint(E+M,d),new mxPoint(E+M-x,ha+wa),new mxPoint(E,ha+wa),new mxPoint(E+x,d),new mxPoint(E,ha)]):n==mxConstants.DIRECTION_WEST?(x=x?Math.max(0,Math.min(M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+x,ha),new mxPoint(E+M,ha),new mxPoint(E+M-x,d),new mxPoint(E+M,ha+wa),new mxPoint(E+x,ha+wa),new mxPoint(E,d),new mxPoint(E+x,ha)]):-n==mxConstants.DIRECTION_NORTH?(x=x?Math.max(0,Math.min(wa,D)):wa*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha+x),new mxPoint(na,ha),new mxPoint(E+M,ha+x),new mxPoint(E+M,ha+wa),new mxPoint(na,ha+wa-x),new mxPoint(E,ha+wa),new mxPoint(E,ha+x)]):(x=x?Math.max(0,Math.min(wa,D)):wa*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(na,ha+x),new mxPoint(E+M,ha),new mxPoint(E+M,ha+wa-x),new mxPoint(na,ha+wa),new mxPoint(E,ha+wa-x),new mxPoint(E,ha)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+M?-na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(ha,na,y)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,n,y,q){var x="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=x?Y.prototype.fixedSize:Y.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));x&&(D*=n.view.scale);var E=d.x,ha=d.y,M=d.width,wa=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):-mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(x=x?Math.max(0,Math.min(wa,D)):wa*Math.max(0,Math.min(1,D)),ha=[new mxPoint(na,ha),new mxPoint(E+M,ha+x),new mxPoint(E+M,ha+wa-x),new mxPoint(na,ha+wa),new mxPoint(E,ha+wa-x),new mxPoint(E,ha+x),new mxPoint(na,ha)]):(x=x?Math.max(0,Math.min(M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+x,ha),new mxPoint(E+M-x,ha),new mxPoint(E+M,d),new mxPoint(E+M-x,ha+wa),new mxPoint(E+x,ha+wa),new mxPoint(E,d),new mxPoint(E+-x,ha)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+M?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(ha,na,y)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ja,mxShape);ja.prototype.size=10;ja.prototype.paintBackground=function(d,n,y,q,x){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(n,y);d.ellipse((q-D)/2,0,D,D);d.fillAndStroke();d.begin();d.moveTo(q/2,D);d.lineTo(q/2,x);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",-ja);mxUtils.extend(oa,mxShape);oa.prototype.size=10;oa.prototype.inset=2;oa.prototype.paintBackground=function(d,n,y,q,x){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size)),E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(n,y);d.begin();d.moveTo(q/2,D+E);d.lineTo(q/2,x);d.end();d.stroke();d.begin();d.moveTo((q-D)/2-E,D/2);d.quadTo((q-D)/2-E,D+E,q/2,D+E);d.quadTo((q+D)/2+E,D+E,(q+D)/2+E,D/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",-oa);mxUtils.extend(qa,mxShape);qa.prototype.paintBackground=function(d,n,y,q,x){d.translate(n,y);d.begin();d.moveTo(0,0);d.quadTo(q,0,q,x/2);d.quadTo(q,x,0,x);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",qa);mxUtils.extend(ra,mxShape);ra.prototype.inset=2;ra.prototype.paintBackground=function(d,n,y,q,x){var D=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(n,y);d.ellipse(0,D,q-2*D,x-2*D);d.fillAndStroke();d.begin();d.moveTo(q/2,0);d.quadTo(q,-0,q,x/2);d.quadTo(q,x,q/2,x);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ra);mxUtils.extend(ua,mxCylinder);ua.prototype.jettyWidth=20;ua.prototype.jettyHeight=10;ua.prototype.redrawPath=function(d,n,y,q,x,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var ha=Math.min(n,x-n),M=Math.min(ha+2*n,x-n);D?(d.moveTo(y,ha),d.lineTo(E,ha),d.lineTo(E,ha+n),-d.lineTo(y,ha+n),d.moveTo(y,M),d.lineTo(E,M),d.lineTo(E,M+n),d.lineTo(y,M+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,x),d.lineTo(y,x),d.lineTo(y,M+n),d.lineTo(0,M+n),d.lineTo(0,M),d.lineTo(y,M),d.lineTo(y,ha+n),d.lineTo(0,ha+n),d.lineTo(0,ha),d.lineTo(y,ha),d.close());d.end()};mxCellRenderer.registerShape("module",ua);mxUtils.extend(za,mxCylinder);za.prototype.jettyWidth=32;za.prototype.jettyHeight=12;za.prototype.redrawPath=function(d,n,y,q,x,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",-this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var ha=.3*x-n/2,M=.7*x-n/2;D?(d.moveTo(y,ha),d.lineTo(E,ha),d.lineTo(E,ha+n),d.lineTo(y,ha+n),d.moveTo(y,M),d.lineTo(E,M),d.lineTo(E,M+n),d.lineTo(y,M+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,x),d.lineTo(y,x),d.lineTo(y,M+n),d.lineTo(0,M+n),d.lineTo(0,M),d.lineTo(y,M),d.lineTo(y,ha+n),d.lineTo(0,ha+n),d.lineTo(0,ha),d.lineTo(y,ha),d.close());d.end()};mxCellRenderer.registerShape("component",-za);mxUtils.extend(Ba,mxRectangleShape);Ba.prototype.paintForeground=function(d,n,y,q,x){var D=q/2,E=x/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(n+D,y),new mxPoint(n+q,y+E),new mxPoint(n+D,y+x),new mxPoint(n,y+E)],this.isRounded,ha,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ba);mxUtils.extend(Ca,mxDoubleEllipse);Ca.prototype.outerStroke=-!0;Ca.prototype.paintVertexShape=function(d,n,y,q,x){var D=Math.min(4,Math.min(q/5,x/5));0<q&&0<x&&(d.ellipse(n+D,y+D,q-2*D,x-2*D),d.fillAndStroke());d.setShadow(!1);this.outerStroke&&(d.ellipse(n,y,q,x),d.stroke())};mxCellRenderer.registerShape("endState",Ca);mxUtils.extend(La,Ca);La.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",La);mxUtils.extend(sa,mxArrowConnector);sa.prototype.defaultWidth=4;sa.prototype.isOpenEnded=function(){return!0};sa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,-"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};sa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",sa);mxUtils.extend(Aa,mxArrowConnector);Aa.prototype.defaultWidth=10;Aa.prototype.defaultArrowWidth=20;Aa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Aa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",-this.defaultArrowWidth)};Aa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Aa);mxUtils.extend(Ea,mxActor);Ea.prototype.size=30;Ea.prototype.isRoundable=function(){return!0};Ea.prototype.redrawPath=function(d,n,y,q,x){n=Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,-[new mxPoint(0,x),new mxPoint(0,n),new mxPoint(q,0),new mxPoint(q,x)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("manualInput",Ea);mxUtils.extend(Ka,mxRectangleShape);Ka.prototype.dx=20;Ka.prototype.dy=20;Ka.prototype.isHtmlAllowed=function(){return!1};Ka.prototype.paintForeground=function(d,n,y,q,x){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var D=0;if(this.isRounded){var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/-100;D=Math.max(D,Math.min(q*E,x*E))}E=Math.max(D,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));D=Math.max(D,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(n,y+D);d.lineTo(n+q,y+D);d.end();d.stroke();d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+x);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",Ka);mxUtils.extend(Ma,mxActor);Ma.prototype.dx=20;Ma.prototype.dy=20;Ma.prototype.redrawPath=function(d,n,y,q,x){n=Math.max(0,Math.min(q,-parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint(n,y),new mxPoint(n,x),new mxPoint(0,x)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("corner",Ma);mxUtils.extend(ya,mxActor);-ya.prototype.redrawPath=function(d,n,y,q,x){d.moveTo(0,0);d.lineTo(0,x);d.end();d.moveTo(q,0);d.lineTo(q,x);d.end();d.moveTo(0,x/2);d.lineTo(q,x/2);d.end()};mxCellRenderer.registerShape("crossbar",ya);mxUtils.extend(Wa,mxActor);Wa.prototype.dx=20;Wa.prototype.dy=20;Wa.prototype.redrawPath=function(d,n,y,q,x){n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,-"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint((q+n)/2,y),new mxPoint((q+n)/2,x),new mxPoint((q-n)/2,x),new mxPoint((q-n)/2,y),new mxPoint(0,y)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("tee",Wa);mxUtils.extend(Ia,mxActor);Ia.prototype.arrowWidth=.3;Ia.prototype.arrowSize=.2;Ia.prototype.redrawPath=function(d,n,y,q,x){var D=x*Math.max(0,Math.min(1,-parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));y=(x-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,x/2),new mxPoint(q-n,x),new mxPoint(q-n,D),new mxPoint(0,D)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Ia);mxUtils.extend(Xa,-mxActor);Xa.prototype.redrawPath=function(d,n,y,q,x){var D=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ia.prototype.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ia.prototype.arrowSize))));y=(x-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x/2),new mxPoint(n,0),new mxPoint(n,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,x/2),new mxPoint(q--n,x),new mxPoint(q-n,D),new mxPoint(n,D),new mxPoint(n,x)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",Xa);mxUtils.extend(Pa,mxActor);Pa.prototype.size=.1;Pa.prototype.fixedSize=20;Pa.prototype.redrawPath=function(d,n,y,q,x){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(n,0);d.lineTo(q,-0);d.quadTo(q-2*n,x/2,q,x);d.lineTo(n,x);d.quadTo(n-2*n,x/2,n,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Pa);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(d,n,y,q,x){d.moveTo(0,0);d.quadTo(q,0,q,x/2);d.quadTo(q,x,0,x);d.close();d.end()};mxCellRenderer.registerShape("or",t);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(d,n,y,q,x){d.moveTo(0,0);d.quadTo(q,0,q,x/2);d.quadTo(q,x,0,x);d.quadTo(q/2,x/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",-N);mxUtils.extend(Q,mxActor);Q.prototype.size=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(d,n,y,q,x){n=Math.min(q/2,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,.8*n),new mxPoint(q,x),new mxPoint(0,x),new mxPoint(0,.8*n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("loopLimit",-Q);mxUtils.extend(X,mxActor);X.prototype.size=.375;X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(d,n,y,q,x){n=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,x-n),new mxPoint(q/2,x),new mxPoint(0,x-n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",X);mxUtils.extend(ia,-mxEllipse);ia.prototype.paintVertexShape=function(d,n,y,q,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/2,y+x);d.lineTo(n+q,y+x);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(d,n,y,q,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+x/2);d.lineTo(n+q,y+x/2);d.end();d.stroke();d.begin();d.moveTo(n+q/2,y);d.lineTo(n+q/2,y+x);-d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(d,n,y,q,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n+.145*q,y+.145*x);d.lineTo(n+.855*q,y+.855*x);d.end();d.stroke();d.begin();d.moveTo(n+.855*q,y+.145*x);d.lineTo(n+.145*q,y+.855*x);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,-n,y,q,x){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+x/2);d.lineTo(n+q,y+x/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(d,n,y,q,x){d.begin();d.moveTo(n,y);d.lineTo(n+q,y);d.lineTo(n+q/2,y+x/2);d.close();d.fillAndStroke();d.begin();d.moveTo(n,y+x);d.lineTo(n+q,y+x);d.lineTo(n+q/2,y+x/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);-mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(d,n,y,q,x){var D=d.state.strokeWidth/2,E=10+2*D,ha=y+x-E/2;d.begin();d.moveTo(n,y);d.lineTo(n,y+x);d.moveTo(n+D,ha);d.lineTo(n+D+E,ha-E/2);d.moveTo(n+D,ha);d.lineTo(n+D+E,ha+E/2);d.moveTo(n+D,ha);d.lineTo(n+q-D,ha);d.moveTo(n+q,y);d.lineTo(n+q,y+x);d.moveTo(n+q-D,ha);d.lineTo(n+q-E-D,ha-E/2);d.moveTo(n+q-D,ha);d.lineTo(n+q-E-D,ha+E/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",va);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=-!0;Da.prototype.paintVertexShape=function(d,n,y,q,x){this.outline||d.setStrokeColor(null);if(null!=this.style){var D=d.pointerEvents,E=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||E||(d.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),M="1"==mxUtils.getValue(this.style,"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||E||this.outline||-ha||wa||na||M?(d.rect(n,y,q,x),d.fill(),d.pointerEvents=D,d.setStrokeColor(this.stroke),d.setLineCap("square"),d.begin(),d.moveTo(n,y),this.outline||ha?d.lineTo(n+q,y):d.moveTo(n+q,y),this.outline||wa?d.lineTo(n+q,y+x):d.moveTo(n+q,y+x),this.outline||na?d.lineTo(n,y+x):d.moveTo(n,y+x),(this.outline||M)&&d.lineTo(n,y),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=-function(d,n,y,q,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==mxUtils.getValue(this.style,"line")?(d.moveTo(n+q/2,y),d.lineTo(n+q/2,y+x)):(d.moveTo(n,y+x/2),d.lineTo(n+q,y+x/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Na);mxUtils.extend(Ya,mxActor);Ya.prototype.redrawPath=function(d,n,y,q,x){n=Math.min(q,x/2);d.moveTo(0,0);d.lineTo(q-n,0);d.quadTo(q,0,q,x/2);d.quadTo(q,x,q-n,x);d.lineTo(0,x);d.close();d.end()};mxCellRenderer.registerShape("delay",-Ya);mxUtils.extend(Za,mxActor);Za.prototype.size=.2;Za.prototype.redrawPath=function(d,n,y,q,x){n=Math.min(x,q);var D=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(x-D)/2;y=n+D;var E=(q-D)/2;D=E+D;d.moveTo(0,n);d.lineTo(E,n);d.lineTo(E,0);d.lineTo(D,0);d.lineTo(D,n);d.lineTo(q,n);d.lineTo(q,y);d.lineTo(D,y);d.lineTo(D,x);d.lineTo(E,x);d.lineTo(E,y);d.lineTo(0,y);d.close();d.end()};mxCellRenderer.registerShape("cross",Za);mxUtils.extend(ab,mxActor);ab.prototype.size=-.25;ab.prototype.redrawPath=function(d,n,y,q,x){n=Math.min(q,x/2);y=Math.min(q-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*q);d.moveTo(0,x/2);d.lineTo(y,0);d.lineTo(q-n,0);d.quadTo(q,0,q,x/2);d.quadTo(q,x,q-n,x);d.lineTo(y,x);d.close();d.end()};mxCellRenderer.registerShape("display",ab);mxUtils.extend(Ra,mxActor);Ra.prototype.cst={RECT2:"mxgraph.basic.rect"};Ra.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",-dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",-defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",-dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",-dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Ra.prototype.paintVertexShape=function(d,n,y,q,x){d.translate(n,y);this.strictDrawShape(d,0,0,q,x)};Ra.prototype.strictDrawShape=function(d,n,y,q,x,D){var E=D&&D.rectStyle?D.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),-ha=D&&D.absoluteCornerSize?D.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),M=D&&D.size?D.size:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=D&&D.rectOutline?D.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=D&&D.indent?D.indent:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Va=D&&D.dashed?D.dashed:mxUtils.getValue(this.style,"dashed",!1),gb=D&&D.dashPattern?-D.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=D&&D.relIndent?D.relIndent:Math.max(0,Math.min(50,na)),Fa=D&&D.top?D.top:mxUtils.getValue(this.style,"top",!0),Ja=D&&D.right?D.right:mxUtils.getValue(this.style,"right",!0),Ha=D&&D.bottom?D.bottom:mxUtils.getValue(this.style,"bottom",!0),Ga=D&&D.left?D.left:mxUtils.getValue(this.style,"left",!0),Qa=D&&D.topLeftStyle?D.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Sa=D&&D.topRightStyle?D.topRightStyle:mxUtils.getValue(this.style,-"topRightStyle","default"),Ta=D&&D.bottomRightStyle?D.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ua=D&&D.bottomLeftStyle?D.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=D&&D.fillColor?D.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");D&&D.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=D&&D.strokeWidth?D.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=D&&D.fillColor2?D.fillColor2:mxUtils.getValue(this.style,-"fillColor2","none"),Eb=D&&D.gradientColor2?D.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Hb=D&&D.gradientDirection2?D.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=D&&D.opacity?D.opacity:mxUtils.getValue(this.style,"opacity","100"),Jb=Math.max(0,Math.min(50,M));D=Ra.prototype;d.setDashed(Va);gb&&""!=gb&&d.setDashPattern(gb);d.setStrokeWidth(Gb);M=Math.min(.5*x,.5*q,M);ha||(M=Jb*Math.min(q,x)/100);M=Math.min(M,.5*Math.min(q,x));ha||(na=Math.min(bb*-Math.min(q,x)/100));na=Math.min(na,.5*Math.min(q,x)-M);(Fa||Ja||Ha||Ga)&&"frame"!=wa&&(d.begin(),Fa?D.moveNW(d,n,y,q,x,E,Qa,M,Ga):d.moveTo(0,0),Fa&&D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),Ja&&D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),Ha&&D.paintSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),Ga&&D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Db),Va=ha=Ib,"none"==Db&&(ha=0),"none"==-Eb&&(Va=0),d.setGradient(Db,Eb,0,0,q,x,Hb,ha,Va),d.begin(),Fa?D.moveNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga):d.moveTo(na,0),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),Ga&&Ha&&D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),Ha&&Ja&&D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),Ja&&Fa&&D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),Fa&&Ga&&D.paintNWInner(d,n,y,q,x,E,Qa,M,na),d.fill(),"none"==Fb&&(d.begin(),-D.paintFolds(d,n,y,q,x,E,Qa,Sa,Ta,Ua,M,Fa,Ja,Ha,Ga),d.stroke()));Fa||Ja||Ha||!Ga?Fa||Ja||!Ha||Ga?!Fa&&!Ja&&Ha&&Ga?"frame"!=wa?(d.begin(),D.moveSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),"double"==wa&&(D.moveNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,x,E,Ta,M,-Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.lineNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),d.close(),d.fillAndStroke()):Fa||!Ja||Ha||Ga?!Fa&&Ja&&!Ha&&Ga?"frame"!=wa?(d.begin(),D.moveSW(d,n,y,q,x,E,Qa,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),"double"==wa&&(D.moveNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,n,y,q,-x,E,Ua,M,na,Ha,Ga)),d.stroke(),d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),"double"==wa&&(D.moveSEInner(d,n,y,q,x,E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,x,E,Qa,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.lineNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),d.close(),d.fillAndStroke(),d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.lineSEInner(d,n,y,q,x,-E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),d.close(),d.fillAndStroke()):!Fa&&Ja&&Ha&&!Ga?"frame"!=wa?(d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.paintSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),"double"==wa&&(D.moveSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,-n,y,q,x,E,Ta,M,Ha),D.paintSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.lineSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),d.close(),d.fillAndStroke()):!Fa&&Ja&&Ha&&Ga?"frame"!=wa?(d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.paintSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,-E,Qa,M,Fa),"double"==wa&&(D.moveNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.paintSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.lineNWInner(d,-n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),d.close(),d.fillAndStroke()):!Fa||Ja||Ha||Ga?Fa&&!Ja&&!Ha&&Ga?"frame"!=wa?(d.begin(),D.moveSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),"double"==wa&&(D.moveNEInner(d,n,y,q,x,E,Sa,M,na,Ja),D.paintTopInner(d,-n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.lineNEInner(d,n,y,q,x,E,Sa,M,na,Ja),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),d.close(),d.fillAndStroke()):Fa&&!Ja&&Ha&&!Ga?"frame"!=wa?(d.begin(),D.moveNW(d,n,y,q,-x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),"double"==wa&&(D.moveNEInner(d,n,y,q,x,E,Sa,M,na,Ja),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa)),d.stroke(),d.begin(),D.moveSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),"double"==wa&&(D.moveSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.lineNEInner(d,n,y,q,x,E,Sa,M,na,Ja),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),d.close(),-d.fillAndStroke(),d.begin(),D.moveSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.lineSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),d.close(),d.fillAndStroke()):Fa&&!Ja&&Ha&&Ga?"frame"!=wa?(d.begin(),D.moveSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),"double"==wa&&(D.moveNEInner(d,n,y,q,x,E,Sa,M,na,Ja),D.paintTopInner(d,-n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.lineNEInner(d,n,y,q,x,E,Sa,M,na,Ja),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,-n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),d.close(),d.fillAndStroke()):Fa&&Ja&&!Ha&&!Ga?"frame"!=wa?(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),"double"==wa&&(D.moveSEInner(d,n,y,q,x,E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,-x,E,Qa,M,na,Ga,Fa)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.lineSEInner(d,n,y,q,x,E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),d.close(),d.fillAndStroke()):Fa&&Ja&&!Ha&&Ga?"frame"!=wa?(d.begin(),D.moveSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,-n,y,q,x,E,Sa,M,Ja),D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),"double"==wa&&(D.moveSEInner(d,n,y,q,x,E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.paintNE(d,-n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.lineSEInner(d,n,y,q,x,E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),d.close(),d.fillAndStroke()):Fa&&Ja&&Ha&&!Ga?"frame"!=wa?(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.paintSE(d,-n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),"double"==wa&&(D.moveSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.paintSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,-n,y,q,x,E,Ua,M,Ga),D.lineSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),d.close(),d.fillAndStroke()):Fa&&Ja&&Ha&&Ga&&("frame"!=wa?(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.paintSE(d,-n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),d.close(),"double"==wa&&(D.moveSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,-Ga),d.close()),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.paintSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),d.close(),D.moveSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,-n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),d.close(),d.fillAndStroke())):"frame"!=wa?(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),"double"==wa&&(D.moveNEInner(d,n,y,q,x,E,Sa,M,na,Ja),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.lineNEInner(d,n,y,-q,x,E,Sa,M,na,Ja),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),d.close(),d.fillAndStroke()):"frame"!=wa?(d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),"double"==wa&&(D.moveSEInner(d,n,y,q,x,E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.lineSEInner(d,n,y,q,x,E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),d.close(),d.fillAndStroke()):"frame"!=wa?(d.begin(),D.moveSE(d,-n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),"double"==wa&&(D.moveSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.lineSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),d.close(),d.fillAndStroke()):"frame"!=wa?(d.begin(),D.moveSW(d,n,y,q,x,E,Qa,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),"double"==wa&&(D.moveNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,-n,y,q,x,E,Ua,M,na,Ha,Ga)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,x,E,Qa,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.lineNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),d.close(),d.fillAndStroke());d.begin();D.paintFolds(d,n,y,q,x,E,Qa,Sa,Ta,Ua,M,Fa,Ja,Ha,Ga);d.stroke()};Ra.prototype.moveNW=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.moveTo(0,0):d.moveTo(0,ha)};Ra.prototype.moveNE=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==-D||!M?d.moveTo(q,0):d.moveTo(q-ha,0)};Ra.prototype.moveSE=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.moveTo(q,x):d.moveTo(q,x-ha)};Ra.prototype.moveSW=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.moveTo(0,x):d.moveTo(ha,x)};Ra.prototype.paintNW=function(d,n,y,q,x,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,0,n,ha,-0)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(ha,0);else d.lineTo(0,0)};Ra.prototype.paintTop=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(q,0):d.lineTo(q-ha,0)};Ra.prototype.paintNE=function(d,n,y,q,x,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,0,n,q,ha)}else("snip"==E||"default"==E&&"snip"==-D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q,ha);else d.lineTo(q,0)};Ra.prototype.paintRight=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(q,x):d.lineTo(q,x-ha)};Ra.prototype.paintLeft=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(0,0):d.lineTo(0,ha)};Ra.prototype.paintSE=function(d,n,y,q,x,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==-E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,0,n,q-ha,x)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-ha,x);else d.lineTo(q,x)};Ra.prototype.paintBottom=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(0,x):d.lineTo(ha,x)};Ra.prototype.paintSW=function(d,n,y,q,x,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,-0,n,0,x-ha)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(0,x-ha);else d.lineTo(0,x)};Ra.prototype.paintNWInner=function(d,n,y,q,x,D,E,ha,M){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,M,.5*M+ha);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,ha+M,0,0,1,M,M+ha);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(M,.5*M+ha);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(M+ha,M+ha),d.lineTo(M,M+ha)};Ra.prototype.paintTopInner=-function(d,n,y,q,x,D,E,ha,M,wa,na){wa||na?!wa&&na?d.lineTo(0,M):wa&&!na?d.lineTo(M,0):wa?"square"==E||"default"==E&&"square"==D?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(ha+.5*M,M):d.lineTo(ha+M,M):d.lineTo(0,M):d.lineTo(0,0)};Ra.prototype.paintNEInner=function(d,n,y,q,x,D,E,ha,M){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,q-ha-.5*M,M);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,ha+M,0,0,1,-q-ha-M,M);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(q-ha-.5*M,M);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-ha-M,ha+M),d.lineTo(q-ha-M,M)};Ra.prototype.paintRightInner=function(d,n,y,q,x,D,E,ha,M,wa,na){wa||na?!wa&&na?d.lineTo(q-M,0):wa&&!na?d.lineTo(q,M):wa?"square"==E||"default"==E&&"square"==D?d.lineTo(q-M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-M,ha+.5*M):d.lineTo(q-M,ha+M):d.lineTo(q-M,0):d.lineTo(q,0)};Ra.prototype.paintLeftInner=-function(d,n,y,q,x,D,E,ha,M,wa,na){wa||na?!wa&&na?d.lineTo(M,x):wa&&!na?d.lineTo(0,x-M):wa?"square"==E||"default"==E&&"square"==D?d.lineTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(M,x-ha-.5*M):d.lineTo(M,x-ha-M):d.lineTo(M,x):d.lineTo(0,x)};Ra.prototype.paintSEInner=function(d,n,y,q,x,D,E,ha,M){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,q-M,x-ha-.5*M);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,-ha+M,0,0,1,q-M,x-ha-M);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(q-M,x-ha-.5*M);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-ha-M,x-ha-M),d.lineTo(q-M,x-ha-M)};Ra.prototype.paintBottomInner=function(d,n,y,q,x,D,E,ha,M,wa,na){wa||na?!wa&&na?d.lineTo(q,x-M):wa&&!na?d.lineTo(q-M,x):"square"==E||"default"==E&&"square"==D||!wa?d.lineTo(q-M,x-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-ha-.5*M,x-M):d.lineTo(q-ha-M,x-M):d.lineTo(q,x)};Ra.prototype.paintSWInner=-function(d,n,y,q,x,D,E,ha,M,wa){if(!wa)d.lineTo(M,x);else if("square"==E||"default"==E&&"square"==D)d.lineTo(M,x-M);else if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,ha+.5*M,x-M);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,ha+M,0,0,1,ha+M,x-M);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(ha+.5*M,x-M);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(M+ha,x-ha-M),d.lineTo(M+ha,x-M)};Ra.prototype.moveSWInner=function(d,n,y,q,x,D,E,ha,M,wa){wa?-"square"==E||"default"==E&&"square"==D?d.moveTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(M,x-ha-.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(M,x-ha-M):d.moveTo(0,x-M)};Ra.prototype.lineSWInner=function(d,n,y,q,x,D,E,ha,M,wa){wa?"square"==E||"default"==E&&"square"==D?d.lineTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(M,x-ha-.5*M):("invRound"==E||-"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(M,x-ha-M):d.lineTo(0,x-M)};Ra.prototype.moveSEInner=function(d,n,y,q,x,D,E,ha,M,wa){wa?"square"==E||"default"==E&&"square"==D?d.moveTo(q-M,x-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-M,x-ha-.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(q-M,x-ha-M):d.moveTo(q-M,x)};Ra.prototype.lineSEInner=function(d,n,y,q,x,D,E,ha,M,wa){wa?"square"==-E||"default"==E&&"square"==D?d.lineTo(q-M,x-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-M,x-ha-.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-M,x-ha-M):d.lineTo(q-M,x)};Ra.prototype.moveNEInner=function(d,n,y,q,x,D,E,ha,M,wa){wa?"square"==E||"default"==E&&"square"==D||wa?d.moveTo(q-M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-M,ha+.5*M):("invRound"==E||-"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(q-M,ha+M):d.moveTo(q,M)};Ra.prototype.lineNEInner=function(d,n,y,q,x,D,E,ha,M,wa){wa?"square"==E||"default"==E&&"square"==D||wa?d.lineTo(q-M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-M,ha+.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-M,ha+M):d.lineTo(q,M)};Ra.prototype.moveNWInner=function(d,n,y,q,x,D,E,ha,M,wa,na){wa||na?-!wa&&na?d.moveTo(M,0):wa&&!na?d.moveTo(0,M):"square"==E||"default"==E&&"square"==D?d.moveTo(M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(M,ha+.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(M,ha+M):d.moveTo(0,0)};Ra.prototype.lineNWInner=function(d,n,y,q,x,D,E,ha,M,wa,na){wa||na?!wa&&na?d.lineTo(M,0):wa&&!na?d.lineTo(0,M):"square"==E||"default"==E&&"square"==D?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==-D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(M,ha+.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(M,ha+M):d.lineTo(0,0)};Ra.prototype.paintFolds=function(d,n,y,q,x,D,E,ha,M,wa,na,Va,gb,bb,Fa){if("fold"==D||"fold"==E||"fold"==ha||"fold"==M||"fold"==wa)("fold"==E||"default"==E&&"fold"==D)&&Va&&Fa&&(d.moveTo(0,na),d.lineTo(na,na),d.lineTo(na,0)),("fold"==ha||"default"==ha&&"fold"==D)&&Va&&gb&&(d.moveTo(q-na,0),d.lineTo(q-na,na),d.lineTo(q,na)),("fold"==-M||"default"==M&&"fold"==D)&&bb&&gb&&(d.moveTo(q-na,x),d.lineTo(q-na,x-na),d.lineTo(q,x-na)),("fold"==wa||"default"==wa&&"fold"==D)&&bb&&Fa&&(d.moveTo(0,x-na),d.lineTo(na,x-na),d.lineTo(na,x))};mxCellRenderer.registerShape(Ra.prototype.cst.RECT2,Ra);Ra.prototype.constraints=null;mxUtils.extend(Oa,mxConnector);Oa.prototype.origPaintEdgeShape=Oa.prototype.paintEdgeShape;Oa.prototype.paintEdgeShape=function(d,n,y){for(var q=[],x=0;x<n.length;x++)q.push(mxUtils.clone(n[x]));x=d.state.dashed;var D=d.state.fixDash;-Oa.prototype.origPaintEdgeShape.apply(this,[d,q,y]);3<=d.state.strokeWidth&&(q=mxUtils.getValue(this.style,"fillColor",null),null!=q&&(d.setStrokeColor(q),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(x,D),Oa.prototype.origPaintEdgeShape.apply(this,[d,n,y])))};mxCellRenderer.registerShape("filledEdge",Oa);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var n=this.editorUi.getSelectionState(),-y=d.apply(this,arguments);"umlFrame"==n.style.shape&&y.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return y}}();mxMarker.addMarker("dash",function(d,n,y,q,x,D,E,ha,M,wa){var na=x*(E+M+1),Va=D*(E+M+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.stroke()}});mxMarker.addMarker("box",function(d,n,y,q,x,D,E,ha,M,wa){var na=x*(E+M+1),Va=D*(E+M+1),gb=q.x+na/2,bb=q.y+Va/2;q.x-=na;q.y-=Va;return function(){d.begin();-d.moveTo(gb-na/2-Va/2,bb-Va/2+na/2);d.lineTo(gb-na/2+Va/2,bb-Va/2-na/2);d.lineTo(gb+Va/2-3*na/2,bb-3*Va/2-na/2);d.lineTo(gb-Va/2-3*na/2,bb-3*Va/2+na/2);d.close();wa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,n,y,q,x,D,E,ha,M,wa){var na=x*(E+M+1),Va=D*(E+M+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.moveTo(q.x-na/2+Va/2,q.y-Va/2-na/2);d.lineTo(q.x-Va/2-3*na/2,q.y-3*Va/2+na/2);d.stroke()}});mxMarker.addMarker("circle",-kb);mxMarker.addMarker("circlePlus",function(d,n,y,q,x,D,E,ha,M,wa){var na=q.clone(),Va=kb.apply(this,arguments),gb=x*(E+2*M),bb=D*(E+2*M);return function(){Va.apply(this,arguments);d.begin();d.moveTo(na.x-x*M,na.y-D*M);d.lineTo(na.x-2*gb+x*M,na.y-2*bb+D*M);d.moveTo(na.x-gb-bb+D*M,na.y-bb+gb-x*M);d.lineTo(na.x+bb-gb-D*M,na.y-bb-gb+x*M);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,n,y,q,x,D,E,ha,M,wa){var na=x*(E+M+1),Va=D*(E+M+1),gb=q.clone();q.x-=na;q.y-=Va;return function(){d.begin();-d.moveTo(gb.x-Va,gb.y+na);d.quadTo(q.x-Va,q.y+na,q.x,q.y);d.quadTo(q.x+Va,q.y-na,gb.x+Va,gb.y-na);d.stroke()}});mxMarker.addMarker("async",function(d,n,y,q,x,D,E,ha,M,wa){n=x*M*1.118;y=D*M*1.118;x*=E+M;D*=E+M;var na=q.clone();na.x-=n;na.y-=y;q.x+=-x-n;q.y+=-D-y;return function(){d.begin();d.moveTo(na.x,na.y);ha?d.lineTo(na.x-x-D/2,na.y-D+x/2):d.lineTo(na.x+D/2-x,na.y-D-x/2);d.lineTo(na.x-x,na.y-D);d.close();wa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:-2;return function(n,y,q,x,D,E,ha,M,wa,na){D*=ha+wa;E*=ha+wa;var Va=x.clone();return function(){n.begin();n.moveTo(Va.x,Va.y);M?n.lineTo(Va.x-D-E/d,Va.y-E+D/d):n.lineTo(Va.x+E/d-D,Va.y-E-D/d);n.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var db=function(d,n,y){return mb(d,["width"],n,function(q,x,D,E,ha){ha=d.shape.getEdgeWidth()*d.view.scale+y;return new mxPoint(E.x+x*q/4+D*ha/2,E.y+D*q/4-x*ha/2)},function(q,x,D,E,ha,M){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));d.style.width=-Math.round(2*q)/d.view.scale-y})},mb=function(d,n,y,q,x){return ib(d,n,function(D){var E=d.absolutePoints;if(null!=E&&0<E.length){var ha=E.length-1;D=d.view.translate;var M=d.view.scale,wa=y?E[0]:E[ha];E=y?E[1]:E[ha-1];ha=E.x-wa.x;var na=E.y-wa.y,Va=Math.sqrt(ha*ha+na*na);wa=q.call(this,Va,ha/Va,na/Va,wa,E);return new mxPoint(wa.x/M-D.x,wa.y/M-D.y)}return null},function(D,E,ha){var M=d.absolutePoints,wa=M.length-1;D=d.view.translate;var na=d.view.scale,Va=y?M[0]:M[wa];M=y?M[1]:M[wa-1];wa=M.x-Va.x;-var gb=M.y-Va.y,bb=Math.sqrt(wa*wa+gb*gb);E.x=(E.x+D.x)*na;E.y=(E.y+D.y)*na;x.call(this,bb,wa/bb,gb/bb,Va,M,E,ha)})},ub=function(d,n){return function(y){return[mb(y,["startWidth"],!0,function(q,x,D,E,ha){ha=mxUtils.getNumber(y.style,"startWidth",d)*y.view.scale+n;return new mxPoint(E.x+x*q/4+D*ha/2,E.y+D*q/4-x*ha/2)},function(q,x,D,E,ha,M){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));y.style.startWidth=Math.round(2*q)/y.view.scale-n})]}},eb=function(d){return function(n){return[ib(n,-["arrowWidth","arrowSize"],function(y){var q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Ia.prototype.arrowWidth))),x=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",Ia.prototype.arrowSize)));return new mxPoint(y.x+(1-x)*y.width,y.y+(1-q)*y.height/2)},function(y,q){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(y.y+y.height/2-q.y)/y.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(y.x+y.width-q.x)/y.width))})]}},ob=function(d){return function(n){return[ib(n,-["size"],function(y){var q=Math.max(0,Math.min(.5*y.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(y.x,y.y+q)},function(y,q){this.state.style.size=Math.max(0,q.y-y.y)},!0)]}},tb=function(d,n,y){return function(q){var x=[ib(q,["size"],function(D){var E=Math.max(0,Math.min(D.width,Math.min(D.height,parseFloat(mxUtils.getValue(this.state.style,"size",n)))))*d;return new mxPoint(D.x+E,D.y+E)},function(D,E){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(D.width,-E.x-D.x),Math.min(D.height,E.y-D.y)))/d)},!1)];y&&mxUtils.getValue(q.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(xb(q));return x}},pb=function(d,n,y,q,x){y=null!=y?y:.5;return function(D){var E=[ib(D,["size"],function(ha){var M=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",M?x:d));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,wa*(M?1:ha.width))),ha.getCenterY())},function(ha,M,wa){ha=null!=x&&"0"!=mxUtils.getValue(this.state.style,-"fixedSize","0")?M.x-ha.x:Math.max(0,Math.min(y,(M.x-ha.x)/ha.width));this.state.style.size=ha},!1,q)];n&&mxUtils.getValue(D.style,mxConstants.STYLE_ROUNDED,!1)&&E.push(xb(D));return E}},wb=function(d,n,y){d=null!=d?d:.5;return function(q){var x=[ib(q,["size"],function(D){var E=null!=y?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",E?y:n)));return new mxPoint(D.x+Math.min(.75*D.width*d,ha*(E?.75:.75*D.width)),D.y+D.height/-4)},function(D,E){D=null!=y&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?E.x-D.x:Math.max(0,Math.min(d,(E.x-D.x)/D.width*.75));this.state.style.size=D},!1,!0)];mxUtils.getValue(q.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(xb(q));return x}},vb=function(){return function(d){var n=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(xb(d));return n}},xb=function(d,n){return ib(d,[mxConstants.STYLE_ARCSIZE],function(y){var q=null!=n?n:y.height/8;if("1"==mxUtils.getValue(d.style,-mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var x=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(y.x+y.width-Math.min(y.width/2,x),y.y+q)}x=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(y.x+y.width-Math.min(Math.max(y.width/2,y.height/2),Math.min(y.width,y.height)*x),y.y+q)},function(y,q,x){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?-this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(y.width,2*(y.x+y.width-q.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(y.width-q.x+y.x)/Math.min(y.width,y.height))))})},ib=function(d,n,y,q,x,D,E){var ha=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(wa){for(var na=0;na<n.length;na++)this.copyStyle(n[na]);E&&E(wa)};ha.getPosition=y;ha.setPosition=q;ha.ignoreGrid=null!=x?x:!0;if(D){var M=ha.positionChanged;-ha.positionChanged=function(){M.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ha},hb={link:function(d){return[db(d,!0,10),db(d,!1,10)]},flexArrow:function(d){var n=d.view.graph.gridSize/d.view.scale,y=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(mb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,x,D,E,ha){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ha=3*mxUtils.getNumber(d.style,-mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ha+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)-x*q/2)},function(q,x,D,E,ha,M,wa){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||-mxEvent.isControlDown(wa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),y.push(mb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,x,D,E,ha){q=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;-ha=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ha+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)-x*q/2)},function(q,x,D,E,ha,M,wa){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/-d.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<n&&(d.style.startWidth=-d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(mb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,x,D,E,ha){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ha=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ha+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)+x*q/2)},function(q,-x,D,E,ha,M,wa){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<-n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),y.push(mb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,x,D,E,ha){q=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ha=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ha+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)+x*q/2)},function(q,x,D,E,ha,M,-wa){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(wa.getEvent())||-(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<n&&(d.style.endWidth=d.style.startWidth))})));return y},swimlane:function(d){var n=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var y=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));n.push(xb(d,-y/2))}n.push(ib(d,[mxConstants.STYLE_STARTSIZE],function(q){var x=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(q.getCenterX(),q.y+Math.max(0,Math.min(q.height,x))):new mxPoint(q.x+Math.max(0,Math.min(q.width,x)),q.getCenterY())},function(q,x){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,-Math.min(q.height,x.y-q.y))):Math.round(Math.max(0,Math.min(q.width,x.x-q.x)))},!1,null,function(q){var x=d.view.graph;if(!mxEvent.isShiftDown(q.getEvent())&&!mxEvent.isControlDown(q.getEvent())&&(x.isTableRow(d.cell)||x.isTableCell(d.cell))){q=x.getSwimlaneDirection(d.style);var D=x.model.getParent(d.cell);D=x.model.getChildCells(D,!0);for(var E=[],ha=0;ha<D.length;ha++)D[ha]!=d.cell&&x.isSwimlane(D[ha])&&x.getSwimlaneDirection(x.getCurrentCellStyle(D[ha]))==q&&E.push(D[ha]);x.setCellStyles(mxConstants.STYLE_STARTSIZE,-d.style[mxConstants.STYLE_STARTSIZE],E)}}));return n},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(d){return[ib(d,["size"],function(n){var y=Math.max(0,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(n.getCenterX(),n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},umlFrame:function(d){return[ib(d,["width","height"],function(n){var y=Math.max(ba.prototype.corner,-Math.min(n.width,mxUtils.getValue(this.state.style,"width",ba.prototype.width))),q=Math.max(1.5*ba.prototype.corner,Math.min(n.height,mxUtils.getValue(this.state.style,"height",ba.prototype.height)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.width=Math.round(Math.max(ba.prototype.corner,Math.min(n.width,y.x-n.x)));this.state.style.height=Math.round(Math.max(1.5*ba.prototype.corner,Math.min(n.height,y.y-n.y)))},!1)]},process:function(d){var n=[ib(d,["size"],function(y){var q=-"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),x=parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size));return q?new mxPoint(y.x+x,y.y+y.height/4):new mxPoint(y.x+y.width*x,y.y+y.height/4)},function(y,q){y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*y.width,q.x-y.x)):Math.max(0,Math.min(.5,(q.x-y.x)/y.width));this.state.style.size=y},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(xb(d));return n},cross:function(d){return[ib(d,-["size"],function(n){var y=Math.min(n.width,n.height);y=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Za.prototype.size)))*y/2;return new mxPoint(n.getCenterX()-y,n.getCenterY()-y)},function(n,y){var q=Math.min(n.width,n.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,n.getCenterY()-y.y)/q*2,Math.max(0,n.getCenterX()-y.x)/q*2)))})]},note:function(d){return[ib(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,-"size",F.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},note2:function(d){return[ib(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,-n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},manualInput:function(d){var n=[ib(d,["size"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",Ea.prototype.size)));return new mxPoint(y.x+y.width/4,y.y+3*q/4)},function(y,q){this.state.style.size=Math.round(Math.max(0,Math.min(y.height,4*(q.y-y.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(xb(d));return n},dataStorage:function(d){return[ib(d,["size"],function(n){var y="0"!=mxUtils.getValue(this.state.style,-"fixedSize","0"),q=parseFloat(mxUtils.getValue(this.state.style,"size",y?Pa.prototype.fixedSize:Pa.prototype.size));return new mxPoint(n.x+n.width-q*(y?1:n.width),n.getCenterY())},function(n,y){n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(n.width,n.x+n.width-y.x)):Math.max(0,Math.min(1,(n.x+n.width-y.x)/n.width));this.state.style.size=n},!1)]},callout:function(d){var n=[ib(d,["size","position"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,-"size",ma.prototype.size))),x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ma.prototype.position)));mxUtils.getValue(this.state.style,"base",ma.prototype.base);return new mxPoint(y.x+x*y.width,y.y+y.height-q)},function(y,q){mxUtils.getValue(this.state.style,"base",ma.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(y.height,y.y+y.height-q.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),ib(d,["position2"],function(y){var q=-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ma.prototype.position2)));return new mxPoint(y.x+q*y.width,y.y+y.height)},function(y,q){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),ib(d,["base"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",ma.prototype.size))),x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ma.prototype.position))),D=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,-"base",ma.prototype.base)));return new mxPoint(y.x+Math.min(y.width,x*y.width+D),y.y+y.height-q)},function(y,q){var x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ma.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(y.width,q.x-y.x-x*y.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(xb(d));return n},internalStorage:function(d){var n=[ib(d,["dx","dy"],function(y){var q=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,-"dx",Ka.prototype.dx))),x=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"dy",Ka.prototype.dy)));return new mxPoint(y.x+q,y.y+x)},function(y,q){this.state.style.dx=Math.round(Math.max(0,Math.min(y.width,q.x-y.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(y.height,q.y-y.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(xb(d));return n},module:function(d){return[ib(d,["jettyWidth","jettyHeight"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,-"jettyWidth",ua.prototype.jettyWidth))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"jettyHeight",ua.prototype.jettyHeight)));return new mxPoint(n.x+y/2,n.y+2*q)},function(n,y){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(n.height,y.y-n.y))/2)})]},corner:function(d){return[ib(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",Ma.prototype.dx))),-q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",Ma.prototype.dy)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.dx=Math.round(Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},tee:function(d){return[ib(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",Wa.prototype.dx))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",Wa.prototype.dy)));-return new mxPoint(n.x+(n.width+y)/2,n.y+q)},function(n,y){this.state.style.dx=Math.round(Math.max(0,2*Math.min(n.width/2,y.x-n.x-n.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},singleArrow:eb(1),doubleArrow:eb(.5),"mxgraph.arrows2.wedgeArrow":ub(20,20),"mxgraph.arrows2.wedgeArrowDashed":ub(20,20),"mxgraph.arrows2.wedgeArrowDashed2":ub(20,20),folder:function(d){return[ib(d,["tabWidth","tabHeight"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,-"tabWidth",k.prototype.tabWidth))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"tabHeight",k.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",k.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(y=n.width-y);return new mxPoint(n.x+y,n.y+q)},function(n,y){var q=Math.max(0,Math.min(n.width,y.x-n.x));mxUtils.getValue(this.state.style,"tabPosition",k.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=n.width-q);this.state.style.tabWidth=Math.round(q);this.state.style.tabHeight=-Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},document:function(d){return[ib(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",I.prototype.size))));return new mxPoint(n.x+3*n.width/4,n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},tape:function(d){return[ib(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));-return new mxPoint(n.getCenterX(),n.y+y*n.height/2)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(y.y-n.y)/n.height*2))},!1)]},isoCube2:function(d){return[ib(d,["isoAngle"],function(n){var y=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",R.isoAngle))))*Math.PI/200;return new mxPoint(n.x,n.y+Math.min(n.width*Math.tan(y),.5*n.height))},function(n,y){this.state.style.isoAngle=Math.max(0,50*(y.y-n.y)/n.height)},!0)]},cylinder2:ob(T.prototype.size),cylinder3:ob(c.prototype.size),-offPageConnector:function(d){return[ib(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(n.getCenterX(),n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},"mxgraph.basic.rect":function(d){var n=[Graph.createHandle(d,["size"],function(y){var q=Math.max(0,Math.min(y.width/2,y.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));-return new mxPoint(y.x+q,y.y+q)},function(y,q){this.state.style.size=Math.round(100*Math.max(0,Math.min(y.height/2,y.width/2,q.x-y.x)))/100})];d=Graph.createHandle(d,["indent"],function(y){var q=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(y.x+.75*y.width,y.y+q*y.height/200)},function(y,q){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(q.y-y.y)/y.height)))/100});n.push(d);return n},step:pb(la.prototype.size,!0,null,-!0,la.prototype.fixedSize),hexagon:pb(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:pb(O.prototype.size,!1),display:pb(ab.prototype.size,!1),cube:tb(1,m.prototype.size,!1),card:tb(.5,z.prototype.size,!0),loopLimit:tb(.5,Q.prototype.size,!0),trapezoid:wb(.5,K.prototype.size,K.prototype.fixedSize),parallelogram:wb(1,L.prototype.size,L.prototype.fixedSize)};Graph.createHandle=ib;Graph.handleFactory=hb;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=-function(){var d=Bb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var n=this.state.style.shape;null==mxCellRenderer.defaultShapes[n]&&null==mxStencilRegistry.getStencil(n)?n=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(n=mxConstants.SHAPE_SWIMLANE);n=hb[n];null==n&&null!=this.state.shape&&this.state.shape.isRoundable()&&(n=hb[mxConstants.SHAPE_RECTANGLE]);null!=n&&(n=n(this.state),null!=n&&(d=null==d?n:d.concat(n)))}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=hb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var rb=new mxPoint(1,0),yb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);rb=mxUtils.getRotatedPoint(rb,Math.cos(zb),Math.sin(zb));var qb=mxUtils.toRadians(-150);yb=mxUtils.getRotatedPoint(yb,Math.cos(qb),Math.sin(qb));mxEdgeStyle.IsometricConnector=function(d,-n,y,q,x){var D=d.view;q=null!=q&&0<q.length?q[0]:null;var E=d.absolutePoints,ha=E[0];E=E[E.length-1];null!=q&&(q=D.transformControlPoint(d,q));null==ha&&null!=n&&(ha=new mxPoint(n.getCenterX(),n.getCenterY()));null==E&&null!=y&&(E=new mxPoint(y.getCenterX(),y.getCenterY()));var M=rb.x,wa=rb.y,na=yb.x,Va=yb.y,gb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=ha){d=function(Fa,Ja,Ha){Fa-=bb.x;var Ga=Ja-bb.y;Ja=(Va*Fa-na*Ga)/(M*Va-wa*na);Fa=(wa*Fa-M*Ga)/(wa*na-M*Va);gb?-(Ha&&(bb=new mxPoint(bb.x+M*Ja,bb.y+wa*Ja),x.push(bb)),bb=new mxPoint(bb.x+na*Fa,bb.y+Va*Fa)):(Ha&&(bb=new mxPoint(bb.x+na*Fa,bb.y+Va*Fa),x.push(bb)),bb=new mxPoint(bb.x+M*Ja,bb.y+wa*Ja));x.push(bb)};var bb=ha;null==q&&(q=new mxPoint(ha.x+(E.x-ha.x)/2,ha.y+(E.y-ha.y)/2));d(q.x,q.y,!0);d(E.x,E.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Cb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,n){if(n==mxEdgeStyle.IsometricConnector){var y=-new mxElbowEdgeHandler(d);y.snapToTerminals=!1;return y}return Cb.apply(this,arguments)};A.prototype.constraints=[];G.prototype.getConstraints=function(d,n,y){d=[];var q=Math.tan(mxUtils.toRadians(30)),x=(.5-q)/2;q=Math.min(n,y/(.5+q));n=(n-q)/2;y=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y+.25*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+.5*q,y+q*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+q,y+.25*q));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,n+q,y+.75*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+.5*q,y+(1-x)*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y+.75*q));return d};R.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;q=Math.min(n*Math.tan(q),.5*y);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,-.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));return d};ma.prototype.getConstraints=function(d,n,y){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var q=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,-"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,-0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y-q)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y-q)));n>=2*q&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,+mxUtils.bind(this,ea.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ea.prototype.arcTo)}function X(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function ha(){mxActor.call(this)}function ma(){mxActor.call(this)}function Y(){mxActor.call(this)}function la(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function A(){mxShape.call(this)}function J(){mxShape.call(this)}function U(){mxEllipse.call(this)}+function P(){mxShape.call(this)}function T(){mxShape.call(this)}function W(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ja(){mxShape.call(this)}function pa(){mxShape.call(this)}function sa(){mxShape.call(this)}function qa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Ba(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ea(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ma(){mxActor.call(this)}function Ha(){mxRectangleShape.call(this)}function Aa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Za(){mxActor.call(this)}function La(){mxActor.call(this)}function $a(){mxActor.call(this)}function Da(){mxActor.call(this)}function x(){mxActor.call(this)}function M(){mxActor.call(this)}function Q(){mxActor.call(this)}function V(){mxActor.call(this)}function ia(){mxEllipse.call(this)}+function ka(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Wa(){mxActor.call(this)}function Xa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Oa(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=+!0;this.indent=2;this.rectOutline="single"}function Qa(){mxConnector.call(this)}function kb(d,n,y,q,v,D,E,fa,L,va){E+=L;var na=q.clone();q.x-=v*(2*E+L);q.y-=D*(2*E+L);v*=E+L;D*=E+L;return function(){d.ellipse(na.x-v-E,na.y-D-E,2*E,2*E);va?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var n=0;n<this.line.length;n++){var y=this.line[n];null!=y&&(y=new mxRectangle(y.x,y.y,this.strokewidth,this.strokewidth),null==+d?d=y:d.add(y))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,n,y,q,v){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,n,y,q){if(null!=n){var v=null;d.begin();for(var D=0;D<n.length;D++){var E=n[D];null!=E&&(null==v?d.moveTo(E.x+y,E.y+q):null!=v&&d.lineTo(E.x+y,E.y+q));v=E}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var n=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var y=null,+q=0;q<this.line.length&&!n;q++){var v=this.line[q];null!=v&&null!=y&&(n=mxUtils.rectangleIntersectsSegment(d,y,v));y=v}return n};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(d,n,y,q,v){var D=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):+!1,E=this.isHorizontal(),fa=this.getTitleSize();0==fa||this.outline?Fa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-n,-y));D||this.outline||!(E&&fa<v||!E&&fa<q)||this.paintForeground(d,n,y,q,v)};e.prototype.paintForeground=function(d,n,y,q,v){if(null!=this.state){var D=this.flipH,E=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var fa=D;D=E;E=fa}d.rotate(-this.getShapeRotation(),+D,E,n+q/2,y+v/2);s=this.scale;n=this.bounds.x/s;y=this.bounds.y/s;q=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(d,n,y,q,v)}};e.prototype.paintTableForeground=function(d,n,y,q,v){q=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(v=0;v<q.length;v++)b.prototype.paintTableLine(d,q[v],n,y)};e.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?+d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(g,e);g.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",g);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(q,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)))),fa=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,v);d.lineTo(D,v);d.lineTo(0,v-D);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(0,0),d.lineTo(q-D,0),d.lineTo(q,D),+d.lineTo(D,D),d.close(),d.fill()),0!=fa&&(d.setFillAlpha(Math.abs(fa)),d.setFillColor(0>fa?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(D,D),d.lineTo(D,v),d.lineTo(0,v-D),d.close(),d.fill()),d.begin(),d.moveTo(D,v),d.lineTo(D,D),d.lineTo(0,0),d.moveTo(D,D),d.lineTo(q,D),d.end(),d.stroke())};m.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",+m);var cb=Math.tan(mxUtils.toRadians(30)),Ya=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(u,mxConnector);u.prototype.paintEdgeShape=function(d,n){var y=this.createMarker(d,n,!0),q=this.createMarker(d,n,!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!=y&&y();null!=q&&q()};mxCellRenderer.registerShape("wire",u);mxUtils.extend(p,mxCylinder);p.prototype.size=6;p.prototype.paintVertexShape=function(d,n,y,q,v){d.setFillColor(this.stroke);var D=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(n+.5*(q-D),y+.5*(v-D),D,D);d.fill();d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};mxCellRenderer.registerShape("waypoint",+p);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/cb);d.translate((q-n)/2,(v-n)/2+n/4);d.moveTo(0,.25*n);d.lineTo(.5*n,n*Ya);d.lineTo(n,.25*n);d.lineTo(.5*n,(.5-Ya)*n);d.lineTo(0,.25*n);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(H,mxCylinder);H.prototype.size=20;H.prototype.redrawPath=function(d,n,y,q,v,D){n=Math.min(q,v/(.5+cb));D?(d.moveTo(0,.25*n),d.lineTo(.5*n,(.5-Ya)*n),d.lineTo(n,.25*n),d.moveTo(.5*+n,(.5-Ya)*n),d.lineTo(.5*n,(1-Ya)*n)):(d.translate((q-n)/2,(v-n)/2),d.moveTo(0,.25*n),d.lineTo(.5*n,n*Ya),d.lineTo(n,.25*n),d.lineTo(n,.75*n),d.lineTo(.5*n,(1-Ya)*n),d.lineTo(0,.75*n),d.close());d.end()};mxCellRenderer.registerShape("isoCube",H);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,n,y,q,v,D){n=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(D&&null!=this.fill||!D&&null==this.fill)d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,+n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,-n);D||(d.moveTo(0,n),d.curveTo(0,-n/3,q,-n/3,q,n),d.lineTo(q,v-n),d.curveTo(q,v+n/3,0,v+n/3,0,v-n),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(G,mxCylinder);G.prototype.size=30;G.prototype.darkOpacity=+0;G.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(q,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(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,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(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.close(),d.fill()),d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.end(),d.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(O,G);mxCellRenderer.registerShape("note2",O);O.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=+15;R.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;D=Math.min(q*Math.tan(D),.5*v);d.translate(n,y);d.begin();d.moveTo(.5*q,0);d.lineTo(q,D);d.lineTo(q,v-D);d.lineTo(.5*q,v);d.lineTo(0,v-D);d.lineTo(0,D);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,D);d.lineTo(.5*q,2*D);d.lineTo(q,D);d.moveTo(.5*q,2*D);d.lineTo(.5*q,v);d.stroke()};mxCellRenderer.registerShape("isoCube2",+R);mxUtils.extend(c,mxShape);c.prototype.size=15;c.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(n,y);0==D?(d.rect(0,0,q,v),d.fillAndStroke()):(d.begin(),d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D),d.lineTo(q,v-D),d.arcTo(.5*q,D,0,0,1,.5*q,v),d.arcTo(.5*q,D,0,0,1,0,v-D),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*+q,D,0,0,1,0,D),d.stroke())};mxCellRenderer.registerShape("cylinder2",c);mxUtils.extend(f,mxCylinder);f.prototype.size=15;f.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"lid",!0);d.translate(n,y);0==D?(d.rect(0,0,q,v),d.fillAndStroke()):(d.begin(),E?(d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D)):(d.moveTo(0,0),d.arcTo(.5*q,D,0,0,0,.5*q,D),d.arcTo(.5*q,D,+0,0,0,q,0)),d.lineTo(q,v-D),d.arcTo(.5*q,D,0,0,1,.5*q,v),d.arcTo(.5*q,D,0,0,1,0,v-D),d.close(),d.fillAndStroke(),d.setShadow(!1),E&&(d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*q,D,0,0,1,0,D),d.stroke()))};mxCellRenderer.registerShape("cylinder3",f);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q/2,.5*v,q,0);d.quadTo(.5*q,v/2,q,v);d.quadTo(q/2,.5*v,0,v);d.quadTo(.5*q,v/2,0,0);d.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(t,+mxCylinder);t.prototype.tabWidth=60;t.prototype.tabHeight=20;t.prototype.tabPosition="right";t.prototype.arcSize=.1;t.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var D=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),E=mxUtils.getValue(this.style,"rounded",!1),fa=mxUtils.getValue(this.style,+"absoluteArcSize",!1),L=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));fa||(L*=Math.min(q,v));L=Math.min(L,.5*q,.5*(v-y));n=Math.max(n,L);n=Math.min(q-L,n);E||(L=0);d.begin();"left"==D?(d.moveTo(Math.max(L,0),y),d.lineTo(Math.max(L,0),0),d.lineTo(n,0),d.lineTo(n,y)):(d.moveTo(q-n,y),d.lineTo(q-n,0),d.lineTo(q-Math.max(L,0),0),d.lineTo(q-Math.max(L,0),y));E?(d.moveTo(0,L+y),d.arcTo(L,L,0,0,1,L,y),d.lineTo(q-L,y),d.arcTo(L,L,0,0,1,q,L+y),d.lineTo(q,v-L),d.arcTo(L,L,0,0,1,q-L,v),d.lineTo(L,+v),d.arcTo(L,L,0,0,1,0,v-L)):(d.moveTo(0,y),d.lineTo(q,y),d.lineTo(q,v),d.lineTo(0,v));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(q-30,y+20),d.lineTo(q-20,y+10),d.lineTo(q-10,y+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",t);t.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,+"labelInHeader",!1)){var y=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var q=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(D*=Math.min(d.width,d.height));D=Math.min(D,.5*d.width,.5*(d.height-n));q||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width-+y),Math.min(d.height,d.height-n)):new mxRectangle(Math.min(d.width,d.width-y),0,D,Math.min(d.height,d.height-n))}return new mxRectangle(0,Math.min(d.height,n),0,0)}return null};mxUtils.extend(z,mxCylinder);z.prototype.arcSize=.1;z.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);var D=mxUtils.getValue(this.style,"rounded",!1),E=mxUtils.getValue(this.style,"absoluteArcSize",!1);n=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));y=mxUtils.getValue(this.style,"umlStateConnection",+null);E||(n*=Math.min(q,v));n=Math.min(n,.5*q,.5*v);D||(n=0);D=0;null!=y&&(D=10);d.begin();d.moveTo(D,n);d.arcTo(n,n,0,0,1,D+n,0);d.lineTo(q-n,0);d.arcTo(n,n,0,0,1,q,n);d.lineTo(q,v-n);d.arcTo(n,n,0,0,1,q-n,v);d.lineTo(D+n,v);d.arcTo(n,n,0,0,1,D,v-n);d.close();d.fillAndStroke();d.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(d.roundrect(q-40,v-20,10,10,3,3),d.stroke(),d.roundrect(q-20,v-20,10,10,3,3),d.stroke(),d.begin(),d.moveTo(q-30,v-15),d.lineTo(q-20,v-15),+d.stroke());"connPointRefEntry"==y?(d.ellipse(0,.5*v-10,20,20),d.fillAndStroke()):"connPointRefExit"==y&&(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(C,+mxActor);C.prototype.size=30;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(d,n,y,q,v){n=Math.max(0,Math.min(q,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,0),new mxPoint(q,0),new mxPoint(q,v),new mxPoint(0,v),new mxPoint(0,n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("card",C);mxUtils.extend(F,mxActor);F.prototype.size=+.4;F.prototype.redrawPath=function(d,n,y,q,v){n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,n/2);d.quadTo(q/4,1.4*n,q/2,n/2);d.quadTo(3*q/4,n*(1-1.4),q,n/2);d.lineTo(q,v-n/2);d.quadTo(3*q/4,v-1.4*n,q/2,v-n/2);d.quadTo(q/4,v-n*(1-1.4),0,v-n/2);d.lineTo(0,n/2);d.close();d.end()};F.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",this.size),y=d.width,q=d.height;if(null==this.direction||+this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return n*=q,new mxRectangle(d.x,d.y+n,y,q-2*n);n*=y;return new mxRectangle(d.x+n,d.y,y-2*n,q)}return d};mxCellRenderer.registerShape("tape",F);mxUtils.extend(N,mxActor);N.prototype.size=.3;N.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};N.prototype.redrawPath=function(d,n,y,+q,v){n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,0);d.lineTo(q,0);d.lineTo(q,v-n/2);d.quadTo(3*q/4,v-1.4*n,q/2,v-n/2);d.quadTo(q/4,v-n*(1-1.4),0,v-n/2);d.lineTo(0,n/2);d.close();d.end()};mxCellRenderer.registerShape("document",N);var gb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(d,n,y,q){var v=mxUtils.getValue(this.style,"size");return null!=v?q*Math.max(0,Math.min(1,v)):gb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=+function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,d.height*n),0,0)}return null};f.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(n/=2);return new mxRectangle(0,Math.min(d.height*this.scale,2*n*this.scale),0,Math.max(0,.3*n*this.scale))}return null};t.prototype.getLabelMargins=+function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var y=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var q=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(D*=Math.min(d.width,d.height));D=Math.min(D,+.5*d.width,.5*(d.height-n));q||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width-y),Math.min(d.height,d.height-n)):new mxRectangle(Math.min(d.width,d.width-y),0,D,Math.min(d.height,d.height-n))}return new mxRectangle(0,Math.min(d.height,n),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};O.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,Math.max(0,n*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,+"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q,0),new mxPoint(q-n,v)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(I,mxActor);I.prototype.size=.2;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(d,+n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("trapezoid",I);mxUtils.extend(ca,mxActor);+ca.prototype.size=.5;ca.prototype.redrawPath=function(d,n,y,q,v){d.setFillColor(null);n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(q,0),new mxPoint(n,0),new mxPoint(n,v/2),new mxPoint(0,v/2),new mxPoint(n,v/2),new mxPoint(n,v),new mxPoint(q,v)],this.isRounded,y,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ca);mxUtils.extend(da,mxActor);+da.prototype.redrawPath=function(d,n,y,q,v){d.setStrokeWidth(1);d.setFillColor(this.stroke);n=q/5;d.rect(0,0,n,v);d.fillAndStroke();d.rect(2*n,0,n,v);d.fillAndStroke();d.rect(4*n,0,n,v);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",da);ea.prototype.moveTo=function(d,n){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;this.firstX=d;this.firstY=n};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,n,y,q){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=y;this.lastY=q};ea.prototype.curveTo=function(d,n,y,q,v,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=D};ea.prototype.arcTo=function(d,n,y,q,v,D,E){this.originalArcTo.apply(this.canvas,arguments);this.lastX=D;this.lastY=E};ea.prototype.lineTo=function(d,n){if(null!=this.lastX&&null!=this.lastY){var y=function(na){return"number"===+typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},q=Math.abs(d-this.lastX),v=Math.abs(n-this.lastY),D=Math.sqrt(q*q+v*v);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;return}var E=Math.round(D/10),fa=this.defaultVariation;5>E&&(E=5,fa/=3);var L=y(d-this.lastX)*q/E;y=y(n-this.lastY)*v/E;q/=D;v/=D;for(D=0;D<E;D++){var va=(Math.random()-.5)*fa;this.originalLineTo.call(this.canvas,L*D+this.lastX-va*v,y*D+this.lastY-va*q)}this.originalLineTo.call(this.canvas,d,n)}else this.originalLineTo.apply(this.canvas,+arguments);this.lastX=d;this.lastY=n};ea.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var hb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(d){hb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var vb=mxShape.prototype.afterPaint;+mxShape.prototype.afterPaint=function(d){vb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ea(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var mb=mxRectangleShape.prototype.isHtmlAllowed;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"))&&mb.apply(this,arguments)};var pb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,n,y,q,v){if(null==d.handJiggle||d.handJiggle.constructor!=ea)pb.apply(this,arguments);else{var D=!0;null!=this.style&&(D="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(D||+null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)D||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?D=Math.min(q/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,D=Math.min(q*D,v*D)),d.moveTo(n++D,y),d.lineTo(n+q-D,y),d.quadTo(n+q,y,n+q,y+D),d.lineTo(n+q,y+v-D),d.quadTo(n+q,y+v,n+q-D,y+v),d.lineTo(n+D,y+v),d.quadTo(n,y+v,n,y+v-D),d.lineTo(n,y+D),d.quadTo(n,y,n+D,y)):(d.moveTo(n,y),d.lineTo(n+q,y),d.lineTo(n+q,y+v),d.lineTo(n,y+v),d.lineTo(n,y)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(X,mxRectangleShape);X.prototype.size=.1;X.prototype.fixedSize=!1;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,+!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var n=d.width,y=d.height;d=new mxRectangle(d.x,d.y,n,y);var q=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;q=Math.max(q,Math.min(n*v,y*v))}d.x+=Math.round(q);d.width-=Math.round(2*q);return d}return d};X.prototype.paintForeground=+function(d,n,y,q,v){var D=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),E=parseFloat(mxUtils.getValue(this.style,"size",this.size));E=D?Math.max(0,Math.min(q,E)):q*Math.max(0,Math.min(1,E));this.isRounded&&(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.max(E,Math.min(q*D,v*D)));E=Math.round(E);d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+v);d.moveTo(n+q-E,y);d.lineTo(n+q-E,y+v);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,+arguments)};mxCellRenderer.registerShape("process",X);mxCellRenderer.registerShape("process2",X);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(d,n,y,q,v){d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};ba.prototype.paintForeground=function(d,n,y,q,v){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(ha,mxHexagon);ha.prototype.size=30;ha.prototype.position=.5;ha.prototype.position2=.5;ha.prototype.base=20;ha.prototype.getLabelMargins=function(){return new mxRectangle(0,+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(d,n,y,q,v){n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var D=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",+this.position2)))),fa=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-y),new mxPoint(Math.min(q,D+fa),v-y),new mxPoint(E,v),new mxPoint(Math.max(0,D),v-y),new mxPoint(0,v-y)],this.isRounded,n,!0,[4])};mxCellRenderer.registerShape("callout",ha);mxUtils.extend(ma,mxActor);ma.prototype.size=.2;ma.prototype.fixedSize=20;ma.prototype.isRoundable=function(){return!0};ma.prototype.redrawPath=function(d,+n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(0,v),new mxPoint(n,v/2)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("step",+ma);mxUtils.extend(Y,mxHexagon);Y.prototype.size=.25;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,+0),new mxPoint(q-n,0),new mxPoint(q,.5*v),new mxPoint(q-n,v),new mxPoint(n,v),new mxPoint(0,.5*v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("hexagon",Y);mxUtils.extend(la,mxRectangleShape);la.prototype.isHtmlAllowed=function(){return!1};la.prototype.paintForeground=function(d,n,y,q,v){var D=Math.min(q/5,v/5)+1;d.begin();d.moveTo(n+q/2,y+D);d.lineTo(n+q/2,y+v-D);d.moveTo(n+D,y+v/2);d.lineTo(n+q-D,y+v/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};+mxCellRenderer.registerShape("plus",la);var db=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};mxRhombus.prototype.paintVertexShape=function(d,n,y,q,v){db.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var D=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||+0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&(d.setShadow(!1),db.apply(this,[d,n,y,q,v]))}};mxUtils.extend(Z,mxRectangleShape);Z.prototype.isHtmlAllowed=function(){return!1};Z.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};Z.prototype.paintForeground=function(d,n,y,q,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var D=+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);D=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+D]];if(null!=E){var fa=this.style["symbol"+D+"Align"],L=this.style["symbol"+D+"VerticalAlign"],va=this.style["symbol"+D+"Width"],na=this.style["symbol"+D+"Height"],Va=this.style["symbol"+D+"Spacing"]||0,fb=this.style["symbol"+D+"VSpacing"]||+Va,bb=this.style["symbol"+D+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(q+this.strokewidth,v+this.strokewidth),Va+=bb,fb+=bb);bb=n;var Ga=y;bb=fa==mxConstants.ALIGN_CENTER?bb+(q-va)/2:fa==mxConstants.ALIGN_RIGHT?bb+(q-va-Va):bb+Va;Ga=L==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:L==mxConstants.ALIGN_BOTTOM?Ga+(v-na-fb):Ga+fb;d.save();fa=new E;fa.style=this.style;E.prototype.paintVertexShape.call(fa,d,bb,Ga,va,na);d.restore()}D++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};+mxCellRenderer.registerShape("ext",Z);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(d,n,y,q,v,D){D?(d.moveTo(0,0),d.lineTo(q/2,v/2),d.lineTo(q,0),d.end()):(d.moveTo(0,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(0,v),d.close())};mxCellRenderer.registerShape("message",k);mxUtils.extend(A,mxShape);A.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.ellipse(q/4,0,q/2,v/4);d.fillAndStroke();d.begin();d.moveTo(q/2,v/4);d.lineTo(q/2,2*v/3);d.moveTo(q/2,v/3);d.lineTo(0,v/3);d.moveTo(q/+2,v/3);d.lineTo(q,v/3);d.moveTo(q/2,2*v/3);d.lineTo(0,v);d.moveTo(q/2,2*v/3);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",A);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};J.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(0,v/4);d.lineTo(0,3*v/4);d.end();d.stroke();d.begin();d.moveTo(0,v/2);d.lineTo(q/6,v/2);d.end();d.stroke();d.ellipse(q/6,0,5*q/6,v);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",+J);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+v);d.lineTo(n+7*q/8,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",U);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,v);d.moveTo(0,0);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(T,mxShape);+T.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};T.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,v/8,q,7*v/8);d.fillAndStroke()};T.prototype.paintForeground=function(d,n,y,q,v){d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,v/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",T);mxUtils.extend(W,mxRectangleShape);W.prototype.size=+40;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.getLabelBounds=function(d){var n=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,n)};W.prototype.paintBackground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,n,+y,q,D):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=W&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,n,y,q,D),d.restore()));D<v&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(n+q/2,y+D),d.lineTo(n+q/2,y+v),d.end(),d.stroke())};W.prototype.paintForeground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,n,y,q,Math.min(v,+D))};mxCellRenderer.registerShape("umlLifeline",W);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.configurePointerEvents=function(d){var n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=n&&n!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};aa.prototype.getLabelMargins=function(d){return new mxRectangle(0,+0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(d,n,y,q,v){var D=this.corner,E=Math.min(q,Math.max(D,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),fa=Math.min(v,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),L=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);L!=mxConstants.NONE&&+(d.setFillColor(L),d.rect(n,y,q,v),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,n,y,q,v),d.setGradient(this.fill,this.gradient,n,y,q,v,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(n,y);d.lineTo(n+E,y);d.lineTo(n+E,y+Math.max(0,fa-1.5*D));d.lineTo(n+Math.max(0,E-D),y+fa);d.lineTo(n,y+fa);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(n+E,y);+d.lineTo(n+q,y);d.lineTo(n+q,y+v);d.lineTo(n,y+v);d.lineTo(n,y+fa);d.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(d,n,y,q){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,n,y,q){q=W.prototype.size;null!=n&&(q=mxUtils.getValue(n.style,"size",q)*n.view.scale);n=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;y.x<d.getCenterX()&&+(n=-1*(n+1));return new mxPoint(d.getCenterX()+n,Math.min(d.y+d.height,Math.max(d.y+q,y.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,n,y,q){q=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,n,y,q){q=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;null!=n.style.backboneSize&&+(q+=parseFloat(n.style.backboneSize)*n.view.scale/2-1);if("south"==n.style[mxConstants.STYLE_DIRECTION]||"north"==n.style[mxConstants.STYLE_DIRECTION])return y.x<d.getCenterX()&&(q=-1*(q+1)),new mxPoint(d.getCenterX()+q,Math.min(d.y+d.height,Math.max(d.y,y.y)));y.y<d.getCenterY()&&(q=-1*(q+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,y.x)),d.getCenterY()+q)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,n,y,q){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,+new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(n.style,"size",ha.prototype.size))*n.view.scale))),n.style),n,y,q)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?K.prototype.fixedSize:K.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,+mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa)]):(v=v?Math.max(0,Math.min(.5*L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,fa)]);va=d.getCenterX();+d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?I.prototype.fixedSize:I.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,fa)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,fa)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,+Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa+v),new mxPoint(E+L,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa+v)]):(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va-v),new mxPoint(E,fa+va),new mxPoint(E,fa)]);va=d.getCenterX();d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("trapezoidPerimeter",+mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?ma.prototype.fixedSize:ma.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,+Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,d),new mxPoint(E+L-v,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,d),new mxPoint(E,fa)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,d),new mxPoint(E+L,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,d),new mxPoint(E+v,fa)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,+fa+v),new mxPoint(na,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va),new mxPoint(na,fa+va-v),new mxPoint(E,fa+va),new mxPoint(E,fa+v)]):(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(na,fa+v),new mxPoint(E+L,fa),new mxPoint(E+L,fa+va-v),new mxPoint(na,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+L?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(fa,na,y)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);+mxPerimeter.HexagonPerimeter2=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?Y.prototype.fixedSize:Y.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(va,D)):va*+Math.max(0,Math.min(1,D)),fa=[new mxPoint(na,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va-v),new mxPoint(na,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa+v),new mxPoint(na,fa)]):(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,d),new mxPoint(E+L-v,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,d),new mxPoint(E+v,fa)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+L?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(fa,na,y)};mxStyleRegistry.putValue("hexagonPerimeter2",+mxPerimeter.HexagonPerimeter2);mxUtils.extend(ja,mxShape);ja.prototype.size=10;ja.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(n,y);d.ellipse((q-D)/2,0,D,D);d.fillAndStroke();d.begin();d.moveTo(q/2,D);d.lineTo(q/2,v);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",ja);mxUtils.extend(pa,mxShape);pa.prototype.size=10;pa.prototype.inset=2;pa.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,+"size",this.size)),E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(n,y);d.begin();d.moveTo(q/2,D+E);d.lineTo(q/2,v);d.end();d.stroke();d.begin();d.moveTo((q-D)/2-E,D/2);d.quadTo((q-D)/2-E,D+E,q/2,D+E);d.quadTo((q+D)/2+E,D+E,(q+D)/2+E,D/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",pa);mxUtils.extend(sa,mxShape);sa.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);+d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",sa);mxUtils.extend(qa,mxShape);qa.prototype.inset=2;qa.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(n,y);d.ellipse(0,D,q-2*D,v-2*D);d.fillAndStroke();d.begin();d.moveTo(q/2,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,q/2,v);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(wa,mxCylinder);wa.prototype.jettyWidth=+20;wa.prototype.jettyHeight=10;wa.prototype.redrawPath=function(d,n,y,q,v,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var fa=Math.min(n,v-n),L=Math.min(fa+2*n,v-n);D?(d.moveTo(y,fa),d.lineTo(E,fa),d.lineTo(E,fa+n),d.lineTo(y,fa+n),d.moveTo(y,L),d.lineTo(E,L),d.lineTo(E,L+n),d.lineTo(y,L+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(y,v),d.lineTo(y,L+n),d.lineTo(0,L++n),d.lineTo(0,L),d.lineTo(y,L),d.lineTo(y,fa+n),d.lineTo(0,fa+n),d.lineTo(0,fa),d.lineTo(y,fa),d.close());d.end()};mxCellRenderer.registerShape("module",wa);mxUtils.extend(Ba,mxCylinder);Ba.prototype.jettyWidth=32;Ba.prototype.jettyHeight=12;Ba.prototype.redrawPath=function(d,n,y,q,v,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var fa=.3*v-n/2,L=.7*v-n/2;D?(d.moveTo(y,fa),d.lineTo(E,+fa),d.lineTo(E,fa+n),d.lineTo(y,fa+n),d.moveTo(y,L),d.lineTo(E,L),d.lineTo(E,L+n),d.lineTo(y,L+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(y,v),d.lineTo(y,L+n),d.lineTo(0,L+n),d.lineTo(0,L),d.lineTo(y,L),d.lineTo(y,fa+n),d.lineTo(0,fa+n),d.lineTo(0,fa),d.lineTo(y,fa),d.close());d.end()};mxCellRenderer.registerShape("component",Ba);mxUtils.extend(za,mxRectangleShape);za.prototype.paintForeground=function(d,n,y,q,v){var D=q/2,E=v/2,fa=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,+mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(n+D,y),new mxPoint(n+q,y+E),new mxPoint(n+D,y+v),new mxPoint(n,y+E)],this.isRounded,fa,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",za);mxUtils.extend(Ea,mxDoubleEllipse);Ea.prototype.outerStroke=!0;Ea.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.min(4,Math.min(q/5,v/5));0<q&&0<v&&(d.ellipse(n+D,y+D,q-2*D,v-2*D),d.fillAndStroke());d.setShadow(!1);+this.outerStroke&&(d.ellipse(n,y,q,v),d.stroke())};mxCellRenderer.registerShape("endState",Ea);mxUtils.extend(ra,Ea);ra.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ra);mxUtils.extend(ya,mxArrowConnector);ya.prototype.defaultWidth=4;ya.prototype.isOpenEnded=function(){return!0};ya.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ya.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",+ya);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-+1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ma,mxActor);Ma.prototype.size=30;Ma.prototype.isRoundable=function(){return!0};Ma.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(0,n),new mxPoint(q,0),new mxPoint(q,v)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("manualInput",+Ma);mxUtils.extend(Ha,mxRectangleShape);Ha.prototype.dx=20;Ha.prototype.dy=20;Ha.prototype.isHtmlAllowed=function(){return!1};Ha.prototype.paintForeground=function(d,n,y,q,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var D=0;if(this.isRounded){var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;D=Math.max(D,Math.min(q*E,v*E))}E=Math.max(D,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));D=Math.max(D,Math.min(v,+parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(n,y+D);d.lineTo(n+q,y+D);d.end();d.stroke();d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",Ha);mxUtils.extend(Aa,mxActor);Aa.prototype.dx=20;Aa.prototype.dy=20;Aa.prototype.redrawPath=function(d,n,y,q,v){n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));+parseFloat(mxUtils.getValue(this.style,"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint(n,y),new mxPoint(n,v),new mxPoint(0,v)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("corner",Aa);mxUtils.extend(Ra,mxActor);Ra.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.lineTo(0,v);d.end();d.moveTo(q,0);d.lineTo(q,v);d.end();d.moveTo(0,v/2);d.lineTo(q,+v/2);d.end()};mxCellRenderer.registerShape("crossbar",Ra);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(d,n,y,q,v){n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,+0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint((q+n)/2,y),new mxPoint((q+n)/2,v),new mxPoint((q-n)/2,v),new mxPoint((q-n)/2,y),new mxPoint(0,y)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(La,mxActor);La.prototype.arrowWidth=.3;La.prototype.arrowSize=.2;La.prototype.redrawPath=function(d,n,y,q,v){var D=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,+"arrowSize",this.arrowSize))));y=(v-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(q-n,D),new mxPoint(0,D)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("singleArrow",La);mxUtils.extend($a,mxActor);$a.prototype.redrawPath=function(d,n,y,q,v){var D=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",+La.prototype.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",La.prototype.arrowSize))));y=(v-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v/2),new mxPoint(n,0),new mxPoint(n,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(q-n,D),new mxPoint(n,D),new mxPoint(n,v)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",+$a);mxUtils.extend(Da,mxActor);Da.prototype.size=.1;Da.prototype.fixedSize=20;Da.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(n,0);d.lineTo(q,0);d.quadTo(q-2*n,v/2,q,v);d.lineTo(n,v);d.quadTo(n-2*n,v/2,n,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Da);+mxUtils.extend(x,mxActor);x.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);d.close();d.end()};mxCellRenderer.registerShape("or",x);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);d.quadTo(q/2,v/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",M);mxUtils.extend(Q,mxActor);Q.prototype.size=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(d,+n,y,q,v){n=Math.min(q/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,.8*n),new mxPoint(q,v),new mxPoint(0,v),new mxPoint(0,.8*n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("loopLimit",Q);mxUtils.extend(V,mxActor);V.prototype.size=.375;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(d,+n,y,q,v){n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-n),new mxPoint(q/2,v),new mxPoint(0,v-n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",V);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);+d.begin();d.moveTo(n+q/2,y+v);d.lineTo(n+q,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+v/2);d.lineTo(n+q,y+v/2);d.end();d.stroke();d.begin();d.moveTo(n+q/2,y);d.lineTo(n+q/2,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=+function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n+.145*q,y+.145*v);d.lineTo(n+.855*q,y+.855*v);d.end();d.stroke();d.begin();d.moveTo(n+.855*q,y+.145*v);d.lineTo(n+.145*q,y+.855*v);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",oa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,n,y,q,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+v/2);d.lineTo(n++q,y+v/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(d,n,y,q,v){d.begin();d.moveTo(n,y);d.lineTo(n+q,y);d.lineTo(n+q/2,y+v/2);d.close();d.fillAndStroke();d.begin();d.moveTo(n,y+v);d.lineTo(n+q,y+v);d.lineTo(n+q/2,y+v/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(d,n,y,q,v){var D=d.state.strokeWidth/2,E=10+2*D,fa=y++v-E/2;d.begin();d.moveTo(n,y);d.lineTo(n,y+v);d.moveTo(n+D,fa);d.lineTo(n+D+E,fa-E/2);d.moveTo(n+D,fa);d.lineTo(n+D+E,fa+E/2);d.moveTo(n+D,fa);d.lineTo(n+q-D,fa);d.moveTo(n+q,y);d.lineTo(n+q,y+v);d.moveTo(n+q-D,fa);d.lineTo(n+q-E-D,fa-E/2);d.moveTo(n+q-D,fa);d.lineTo(n+q-E-D,fa+E/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(d,n,y,q,v){this.outline||d.setStrokeColor(null);if(null!=+this.style){var D=d.pointerEvents,E=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||E||(d.pointerEvents=!1);var fa="1"==mxUtils.getValue(this.style,"top","1"),L="1"==mxUtils.getValue(this.style,"left","1"),va="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||E||this.outline||fa||va||na||L?(d.rect(n,y,q,v),d.fill(),d.pointerEvents=D,d.setStrokeColor(this.stroke),d.setLineCap("square"),+d.begin(),d.moveTo(n,y),this.outline||fa?d.lineTo(n+q,y):d.moveTo(n+q,y),this.outline||va?d.lineTo(n+q,y+v):d.moveTo(n+q,y+v),this.outline||na?d.lineTo(n,y+v):d.moveTo(n,y+v),(this.outline||L)&&d.lineTo(n,y),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==+mxUtils.getValue(this.style,"line")?(d.moveTo(n+q/2,y),d.lineTo(n+q/2,y+v)):(d.moveTo(n,y+v/2),d.lineTo(n+q,y+v/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Na);mxUtils.extend(Wa,mxActor);Wa.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/2);d.moveTo(0,0);d.lineTo(q-n,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,q-n,v);d.lineTo(0,v);d.close();d.end()};mxCellRenderer.registerShape("delay",Wa);mxUtils.extend(Xa,mxActor);Xa.prototype.size=.2;Xa.prototype.redrawPath=function(d,n,+y,q,v){n=Math.min(v,q);var D=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-D)/2;y=n+D;var E=(q-D)/2;D=E+D;d.moveTo(0,n);d.lineTo(E,n);d.lineTo(E,0);d.lineTo(D,0);d.lineTo(D,n);d.lineTo(q,n);d.lineTo(q,y);d.lineTo(D,y);d.lineTo(D,v);d.lineTo(E,v);d.lineTo(E,y);d.lineTo(0,y);d.close();d.end()};mxCellRenderer.registerShape("cross",Xa);mxUtils.extend(ab,mxActor);ab.prototype.size=.25;ab.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/2);y=Math.min(q-+n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*q);d.moveTo(0,v/2);d.lineTo(y,0);d.lineTo(q-n,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,q-n,v);d.lineTo(y,v);d.close();d.end()};mxCellRenderer.registerShape("display",ab);mxUtils.extend(Oa,mxActor);Oa.prototype.cst={RECT2:"mxgraph.basic.rect"};Oa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},+{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",+defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",+dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},+{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},+{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);this.strictDrawShape(d,0,0,q,v)};Oa.prototype.strictDrawShape=function(d,n,y,q,v,D){var E=D&&D.rectStyle?D.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),fa=D&&D.absoluteCornerSize?D.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",+this.absoluteCornerSize),L=D&&D.size?D.size:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),va=D&&D.rectOutline?D.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=D&&D.indent?D.indent:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Va=D&&D.dashed?D.dashed:mxUtils.getValue(this.style,"dashed",!1),fb=D&&D.dashPattern?D.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=D&&D.relIndent?D.relIndent:+Math.max(0,Math.min(50,na)),Ga=D&&D.top?D.top:mxUtils.getValue(this.style,"top",!0),Ka=D&&D.right?D.right:mxUtils.getValue(this.style,"right",!0),Ja=D&&D.bottom?D.bottom:mxUtils.getValue(this.style,"bottom",!0),Ia=D&&D.left?D.left:mxUtils.getValue(this.style,"left",!0),Pa=D&&D.topLeftStyle?D.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Sa=D&&D.topRightStyle?D.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ta=D&&D.bottomRightStyle?D.bottomRightStyle:mxUtils.getValue(this.style,+"bottomRightStyle","default"),Ua=D&&D.bottomLeftStyle?D.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=D&&D.fillColor?D.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");D&&D.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=D&&D.strokeWidth?D.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=D&&D.fillColor2?D.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=D&&D.gradientColor2?D.gradientColor2:mxUtils.getValue(this.style,+"gradientColor2","none"),Hb=D&&D.gradientDirection2?D.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=D&&D.opacity?D.opacity:mxUtils.getValue(this.style,"opacity","100"),Jb=Math.max(0,Math.min(50,L));D=Oa.prototype;d.setDashed(Va);fb&&""!=fb&&d.setDashPattern(fb);d.setStrokeWidth(Gb);L=Math.min(.5*v,.5*q,L);fa||(L=Jb*Math.min(q,v)/100);L=Math.min(L,.5*Math.min(q,v));fa||(na=Math.min(bb*Math.min(q,v)/100));na=Math.min(na,.5*Math.min(q,v)-L);(Ga||Ka||Ja||Ia)&&"frame"!=+va&&(d.begin(),Ga?D.moveNW(d,n,y,q,v,E,Pa,L,Ia):d.moveTo(0,0),Ga&&D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),Ka&&D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),Ja&&D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),Ia&&D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Db),Va=fa=Ib,"none"==Db&&(fa=0),"none"==Eb&&(Va=0),d.setGradient(Db,Eb,0,0,q,v,Hb,fa,Va),d.begin(),Ga?D.moveNWInner(d,+n,y,q,v,E,Pa,L,na,Ga,Ia):d.moveTo(na,0),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),Ia&&Ja&&D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),Ja&&Ka&&D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),Ka&&Ga&&D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),Ga&&Ia&&D.paintNWInner(d,n,y,q,v,E,Pa,L,na),d.fill(),"none"==Fb&&(d.begin(),D.paintFolds(d,n,y,q,v,E,Pa,Sa,Ta,Ua,L,Ga,Ka,Ja,Ia),d.stroke()));Ga||Ka||+Ja||!Ia?Ga||Ka||!Ja||Ia?!Ga&&!Ka&&Ja&&Ia?"frame"!=va?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,+n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):Ga||!Ka||Ja||Ia?!Ga&&Ka&&!Ja&&Ia?"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke(),d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,+n,y,q,v,E,Ta,L,Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke(),d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):+!Ga&&Ka&&Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),+D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):!Ga&&Ka&&Ja&&Ia?"frame"!=va?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,+n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,+n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):!Ga||Ka||Ja||Ia?Ga&&!Ka&&!Ja&&Ia?"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,+n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke()):Ga&&!Ka&&Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,+q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke(),d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke(),d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,+q,v,E,Ua,L,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):Ga&&!Ka&&Ja&&Ia?"frame"!=va?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,+n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,+n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):Ga&&Ka&&!Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,+n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke()):Ga&&Ka&&!Ja&&Ia?"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,+Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,+Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke()):Ga&&Ka&&Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,+n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,+n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke()):Ga&&Ka&&Ja&&Ia&&("frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,+L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),d.close(),"double"==va&&(D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close()),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintNW(d,+n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),d.close(),D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,+n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke())):"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke()):+"frame"!=va?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):"frame"!=va?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,+n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,+Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke());d.begin();D.paintFolds(d,n,y,q,v,E,Pa,Sa,Ta,Ua,L,Ga,Ka,Ja,Ia);d.stroke()};Oa.prototype.moveNW=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(0,0):d.moveTo(0,fa)};Oa.prototype.moveNE=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(q,0):d.moveTo(q-fa,0)};Oa.prototype.moveSE=function(d,+n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(q,v):d.moveTo(q,v-fa)};Oa.prototype.moveSW=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(0,v):d.moveTo(fa,v)};Oa.prototype.paintNW=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,fa,0)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&+"fold"==D)&&d.lineTo(fa,0);else d.lineTo(0,0)};Oa.prototype.paintTop=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(q,0):d.lineTo(q-fa,0)};Oa.prototype.paintNE=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,q,fa)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q,fa);else d.lineTo(q,+0)};Oa.prototype.paintRight=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(q,v):d.lineTo(q,v-fa)};Oa.prototype.paintLeft=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(0,0):d.lineTo(0,fa)};Oa.prototype.paintSE=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,q-fa,v)}else("snip"==E||"default"==+E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-fa,v);else d.lineTo(q,v)};Oa.prototype.paintBottom=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(0,v):d.lineTo(fa,v)};Oa.prototype.paintSW=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,0,v-fa)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==+E&&"fold"==D)&&d.lineTo(0,v-fa);else d.lineTo(0,v)};Oa.prototype.paintNWInner=function(d,n,y,q,v,D,E,fa,L){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,L,.5*L+fa);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,L,L+fa);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(L,.5*L+fa);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(L+fa,L+fa),d.lineTo(L,L+fa)};Oa.prototype.paintTopInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(0,+L):va&&!na?d.lineTo(L,0):va?"square"==E||"default"==E&&"square"==D?d.lineTo(L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(fa+.5*L,L):d.lineTo(fa+L,L):d.lineTo(0,L):d.lineTo(0,0)};Oa.prototype.paintNEInner=function(d,n,y,q,v,D,E,fa,L){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,q-fa-.5*L,L);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,q-fa-L,L);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(q-+fa-.5*L,L);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-fa-L,fa+L),d.lineTo(q-fa-L,L)};Oa.prototype.paintRightInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(q-L,0):va&&!na?d.lineTo(q,L):va?"square"==E||"default"==E&&"square"==D?d.lineTo(q-L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-L,fa+.5*L):d.lineTo(q-L,fa+L):d.lineTo(q-L,0):d.lineTo(q,0)};Oa.prototype.paintLeftInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(L,+v):va&&!na?d.lineTo(0,v-L):va?"square"==E||"default"==E&&"square"==D?d.lineTo(L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(L,v-fa-.5*L):d.lineTo(L,v-fa-L):d.lineTo(L,v):d.lineTo(0,v)};Oa.prototype.paintSEInner=function(d,n,y,q,v,D,E,fa,L){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,q-L,v-fa-.5*L);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,q-L,v-fa-L);else if("snip"==E||"default"==E&&"snip"==+D)d.lineTo(q-L,v-fa-.5*L);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-fa-L,v-fa-L),d.lineTo(q-L,v-fa-L)};Oa.prototype.paintBottomInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(q,v-L):va&&!na?d.lineTo(q-L,v):"square"==E||"default"==E&&"square"==D||!va?d.lineTo(q-L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-fa-.5*L,v-L):d.lineTo(q-fa-L,v-L):d.lineTo(q,v)};Oa.prototype.paintSWInner=function(d,n,y,q,v,D,E,fa,L,va){if(!va)d.lineTo(L,+v);else if("square"==E||"default"==E&&"square"==D)d.lineTo(L,v-L);else if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,fa+.5*L,v-L);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,fa+L,v-L);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(fa+.5*L,v-L);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(L+fa,v-fa-L),d.lineTo(L+fa,v-L)};Oa.prototype.moveSWInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.moveTo(L,+v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(L,v-fa-L):d.moveTo(0,v-L)};Oa.prototype.lineSWInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.lineTo(L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==+E&&"fold"==D)&&d.lineTo(L,v-fa-L):d.lineTo(0,v-L)};Oa.prototype.moveSEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.moveTo(q-L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(q-L,v-fa-L):d.moveTo(q-L,v)};Oa.prototype.lineSEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.lineTo(q-L,+v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-L,v-fa-L):d.lineTo(q-L,v)};Oa.prototype.moveNEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D||va?d.moveTo(q-L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-L,fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==+E&&"fold"==D)&&d.moveTo(q-L,fa+L):d.moveTo(q,L)};Oa.prototype.lineNEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D||va?d.lineTo(q-L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-L,fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-L,fa+L):d.lineTo(q,L)};Oa.prototype.moveNWInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.moveTo(L,0):va&&!na?d.moveTo(0,L):"square"==+E||"default"==E&&"square"==D?d.moveTo(L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(L,fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(L,fa+L):d.moveTo(0,0)};Oa.prototype.lineNWInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(L,0):va&&!na?d.lineTo(0,L):"square"==E||"default"==E&&"square"==D?d.lineTo(L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(L,+fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(L,fa+L):d.lineTo(0,0)};Oa.prototype.paintFolds=function(d,n,y,q,v,D,E,fa,L,va,na,Va,fb,bb,Ga){if("fold"==D||"fold"==E||"fold"==fa||"fold"==L||"fold"==va)("fold"==E||"default"==E&&"fold"==D)&&Va&&Ga&&(d.moveTo(0,na),d.lineTo(na,na),d.lineTo(na,0)),("fold"==fa||"default"==fa&&"fold"==D)&&Va&&fb&&(d.moveTo(q-na,0),d.lineTo(q-na,na),d.lineTo(q,na)),("fold"==L||"default"==L&&"fold"==D)&&bb&&fb&&(d.moveTo(q-+na,v),d.lineTo(q-na,v-na),d.lineTo(q,v-na)),("fold"==va||"default"==va&&"fold"==D)&&bb&&Ga&&(d.moveTo(0,v-na),d.lineTo(na,v-na),d.lineTo(na,v))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);Oa.prototype.constraints=null;mxUtils.extend(Qa,mxConnector);Qa.prototype.origPaintEdgeShape=Qa.prototype.paintEdgeShape;Qa.prototype.paintEdgeShape=function(d,n,y){for(var q=[],v=0;v<n.length;v++)q.push(mxUtils.clone(n[v]));v=d.state.dashed;var D=d.state.fixDash;Qa.prototype.origPaintEdgeShape.apply(this,+[d,q,y]);3<=d.state.strokeWidth&&(q=mxUtils.getValue(this.style,"fillColor",null),null!=q&&(d.setStrokeColor(q),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(v,D),Qa.prototype.origPaintEdgeShape.apply(this,[d,n,y])))};mxCellRenderer.registerShape("filledEdge",Qa);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var n=this.editorUi.getSelectionState(),y=d.apply(this,arguments);"umlFrame"==+n.style.shape&&y.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return y}}();mxMarker.addMarker("dash",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.stroke()}});mxMarker.addMarker("box",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1),fb=q.x+na/2,bb=q.y+Va/2;q.x-=na;q.y-=Va;return function(){d.begin();d.moveTo(fb-na/2-+Va/2,bb-Va/2+na/2);d.lineTo(fb-na/2+Va/2,bb-Va/2-na/2);d.lineTo(fb+Va/2-3*na/2,bb-3*Va/2-na/2);d.lineTo(fb-Va/2-3*na/2,bb-3*Va/2+na/2);d.close();va?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.moveTo(q.x-na/2+Va/2,q.y-Va/2-na/2);d.lineTo(q.x-Va/2-3*na/2,q.y-3*Va/2+na/2);d.stroke()}});mxMarker.addMarker("circle",kb);+mxMarker.addMarker("circlePlus",function(d,n,y,q,v,D,E,fa,L,va){var na=q.clone(),Va=kb.apply(this,arguments),fb=v*(E+2*L),bb=D*(E+2*L);return function(){Va.apply(this,arguments);d.begin();d.moveTo(na.x-v*L,na.y-D*L);d.lineTo(na.x-2*fb+v*L,na.y-2*bb+D*L);d.moveTo(na.x-fb-bb+D*L,na.y-bb+fb-v*L);d.lineTo(na.x+bb-fb-D*L,na.y-bb-fb+v*L);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1),fb=q.clone();q.x-=na;q.y-=Va;return function(){d.begin();d.moveTo(fb.x-+Va,fb.y+na);d.quadTo(q.x-Va,q.y+na,q.x,q.y);d.quadTo(q.x+Va,q.y-na,fb.x+Va,fb.y-na);d.stroke()}});mxMarker.addMarker("async",function(d,n,y,q,v,D,E,fa,L,va){n=v*L*1.118;y=D*L*1.118;v*=E+L;D*=E+L;var na=q.clone();na.x-=n;na.y-=y;q.x+=-v-n;q.y+=-D-y;return function(){d.begin();d.moveTo(na.x,na.y);fa?d.lineTo(na.x-v-D/2,na.y-D+v/2):d.lineTo(na.x+D/2-v,na.y-D-v/2);d.lineTo(na.x-v,na.y-D);d.close();va?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(n,+y,q,v,D,E,fa,L,va,na){D*=fa+va;E*=fa+va;var Va=v.clone();return function(){n.begin();n.moveTo(Va.x,Va.y);L?n.lineTo(Va.x-D-E/d,Va.y-E+D/d):n.lineTo(Va.x+E/d-D,Va.y-E-D/d);n.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var qb=function(d,n,y){return nb(d,["width"],n,function(q,v,D,E,fa){fa=d.shape.getEdgeWidth()*d.view.scale+y;return new mxPoint(E.x+v*q/4+D*fa/2,E.y+D*q/4-v*fa/2)},function(q,v,D,E,fa,L){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));d.style.width=Math.round(2*+q)/d.view.scale-y})},nb=function(d,n,y,q,v){return jb(d,n,function(D){var E=d.absolutePoints;if(null!=E&&0<E.length){var fa=E.length-1;D=d.view.translate;var L=d.view.scale,va=y?E[0]:E[fa];E=y?E[1]:E[fa-1];fa=E.x-va.x;var na=E.y-va.y,Va=Math.sqrt(fa*fa+na*na);va=q.call(this,Va,fa/Va,na/Va,va,E);return new mxPoint(va.x/L-D.x,va.y/L-D.y)}return null},function(D,E,fa){var L=d.absolutePoints,va=L.length-1;D=d.view.translate;var na=d.view.scale,Va=y?L[0]:L[va];L=y?L[1]:L[va-1];va=L.x-Va.x;var fb=L.y-Va.y,+bb=Math.sqrt(va*va+fb*fb);E.x=(E.x+D.x)*na;E.y=(E.y+D.y)*na;v.call(this,bb,va/bb,fb/bb,Va,L,E,fa)})},lb=function(d,n){return function(y){return[nb(y,["startWidth"],!0,function(q,v,D,E,fa){fa=mxUtils.getNumber(y.style,"startWidth",d)*y.view.scale+n;return new mxPoint(E.x+v*q/4+D*fa/2,E.y+D*q/4-v*fa/2)},function(q,v,D,E,fa,L){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));y.style.startWidth=Math.round(2*q)/y.view.scale-n})]}},eb=function(d){return function(n){return[jb(n,["arrowWidth",+"arrowSize"],function(y){var q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",La.prototype.arrowWidth))),v=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",La.prototype.arrowSize)));return new mxPoint(y.x+(1-v)*y.width,y.y+(1-q)*y.height/2)},function(y,q){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(y.y+y.height/2-q.y)/y.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(y.x+y.width-q.x)/y.width))})]}},tb=function(d){return function(n){return[jb(n,+["size"],function(y){var q=Math.max(0,Math.min(.5*y.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(y.x,y.y+q)},function(y,q){this.state.style.size=Math.max(0,q.y-y.y)},!0)]}},ob=function(d,n,y){return function(q){var v=[jb(q,["size"],function(D){var E=Math.max(0,Math.min(D.width,Math.min(D.height,parseFloat(mxUtils.getValue(this.state.style,"size",n)))))*d;return new mxPoint(D.x+E,D.y+E)},function(D,E){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(D.width,+E.x-D.x),Math.min(D.height,E.y-D.y)))/d)},!1)];y&&mxUtils.getValue(q.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(wb(q));return v}},ub=function(d,n,y,q,v){y=null!=y?y:.5;return function(D){var E=[jb(D,["size"],function(fa){var L=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,va=parseFloat(mxUtils.getValue(this.state.style,"size",L?v:d));return new mxPoint(fa.x+Math.max(0,Math.min(.5*fa.width,va*(L?1:fa.width))),fa.getCenterY())},function(fa,L,va){fa=null!=v&&"0"!=mxUtils.getValue(this.state.style,+"fixedSize","0")?L.x-fa.x:Math.max(0,Math.min(y,(L.x-fa.x)/fa.width));this.state.style.size=fa},!1,q)];n&&mxUtils.getValue(D.style,mxConstants.STYLE_ROUNDED,!1)&&E.push(wb(D));return E}},Ab=function(d,n,y){d=null!=d?d:.5;return function(q){var v=[jb(q,["size"],function(D){var E=null!=y?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,fa=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",E?y:n)));return new mxPoint(D.x+Math.min(.75*D.width*d,fa*(E?.75:.75*D.width)),D.y+D.height/+4)},function(D,E){D=null!=y&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?E.x-D.x:Math.max(0,Math.min(d,(E.x-D.x)/D.width*.75));this.state.style.size=D},!1,!0)];mxUtils.getValue(q.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(wb(q));return v}},yb=function(){return function(d){var n=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n}},wb=function(d,n){return jb(d,[mxConstants.STYLE_ARCSIZE],function(y){var q=null!=n?n:y.height/8;if("1"==mxUtils.getValue(d.style,+mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(y.x+y.width-Math.min(y.width/2,v),y.y+q)}v=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(y.x+y.width-Math.min(Math.max(y.width/2,y.height/2),Math.min(y.width,y.height)*v),y.y+q)},function(y,q,v){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?+this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(y.width,2*(y.x+y.width-q.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(y.width-q.x+y.x)/Math.min(y.width,y.height))))})},jb=function(d,n,y,q,v,D,E){var fa=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);fa.execute=function(va){for(var na=0;na<n.length;na++)this.copyStyle(n[na]);E&&E(va)};fa.getPosition=y;fa.setPosition=q;fa.ignoreGrid=null!=v?v:!0;if(D){var L=fa.positionChanged;+fa.positionChanged=function(){L.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return fa},ib={link:function(d){return[qb(d,!0,10),qb(d,!1,10)]},flexArrow:function(d){var n=d.view.graph.gridSize/d.view.scale,y=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,v,D,E,fa){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;fa=3*mxUtils.getNumber(d.style,+mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)-v*q/2)},function(q,v,D,E,fa,L,va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||+mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),y.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,v,D,E,fa){q=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;+fa=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)-v*q/2)},function(q,v,D,E,fa,L,va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/+d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(va.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<n&&(d.style.startWidth=+d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,v,D,E,fa){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;fa=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)+v*q/2)},function(q,+v,D,E,fa,L,va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<+n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),y.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,v,D,E,fa){q=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;fa=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)+v*q/2)},function(q,v,D,E,fa,L,+va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(va.getEvent())||+(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<n&&(d.style.endWidth=d.style.startWidth))})));return y},swimlane:function(d){var n=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var y=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));n.push(wb(d,+y/2))}n.push(jb(d,[mxConstants.STYLE_STARTSIZE],function(q){var v=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(q.getCenterX(),q.y+Math.max(0,Math.min(q.height,v))):new mxPoint(q.x+Math.max(0,Math.min(q.width,v)),q.getCenterY())},function(q,v){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,+Math.min(q.height,v.y-q.y))):Math.round(Math.max(0,Math.min(q.width,v.x-q.x)))},!1,null,function(q){var v=d.view.graph;if(!mxEvent.isShiftDown(q.getEvent())&&!mxEvent.isControlDown(q.getEvent())&&(v.isTableRow(d.cell)||v.isTableCell(d.cell))){q=v.getSwimlaneDirection(d.style);var D=v.model.getParent(d.cell);D=v.model.getChildCells(D,!0);for(var E=[],fa=0;fa<D.length;fa++)D[fa]!=d.cell&&v.isSwimlane(D[fa])&&v.getSwimlaneDirection(v.getCurrentCellStyle(D[fa]))==q&&E.push(D[fa]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,+d.style[mxConstants.STYLE_STARTSIZE],E)}}));return n},label:yb(),ext:yb(),rectangle:yb(),triangle:yb(),rhombus:yb(),umlLifeline:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(n.getCenterX(),n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},umlFrame:function(d){return[jb(d,["width","height"],function(n){var y=Math.max(aa.prototype.corner,+Math.min(n.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),q=Math.max(1.5*aa.prototype.corner,Math.min(n.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.width=Math.round(Math.max(aa.prototype.corner,Math.min(n.width,y.x-n.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(n.height,y.y-n.y)))},!1)]},process:function(d){var n=[jb(d,["size"],function(y){var q=+"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size));return q?new mxPoint(y.x+v,y.y+y.height/4):new mxPoint(y.x+y.width*v,y.y+y.height/4)},function(y,q){y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*y.width,q.x-y.x)):Math.max(0,Math.min(.5,(q.x-y.x)/y.width));this.state.style.size=y},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},cross:function(d){return[jb(d,+["size"],function(n){var y=Math.min(n.width,n.height);y=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Xa.prototype.size)))*y/2;return new mxPoint(n.getCenterX()-y,n.getCenterY()-y)},function(n,y){var q=Math.min(n.width,n.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,n.getCenterY()-y.y)/q*2,Math.max(0,n.getCenterX()-y.x)/q*2)))})]},note:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,+"size",G.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},note2:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,+n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},manualInput:function(d){var n=[jb(d,["size"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",Ma.prototype.size)));return new mxPoint(y.x+y.width/4,y.y+3*q/4)},function(y,q){this.state.style.size=Math.round(Math.max(0,Math.min(y.height,4*(q.y-y.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},dataStorage:function(d){return[jb(d,["size"],function(n){var y="0"!=mxUtils.getValue(this.state.style,+"fixedSize","0"),q=parseFloat(mxUtils.getValue(this.state.style,"size",y?Da.prototype.fixedSize:Da.prototype.size));return new mxPoint(n.x+n.width-q*(y?1:n.width),n.getCenterY())},function(n,y){n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(n.width,n.x+n.width-y.x)):Math.max(0,Math.min(1,(n.x+n.width-y.x)/n.width));this.state.style.size=n},!1)]},callout:function(d){var n=[jb(d,["size","position"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,+"size",ha.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ha.prototype.position)));mxUtils.getValue(this.state.style,"base",ha.prototype.base);return new mxPoint(y.x+v*y.width,y.y+y.height-q)},function(y,q){mxUtils.getValue(this.state.style,"base",ha.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(y.height,y.y+y.height-q.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),jb(d,["position2"],function(y){var q=+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ha.prototype.position2)));return new mxPoint(y.x+q*y.width,y.y+y.height)},function(y,q){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),jb(d,["base"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",ha.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ha.prototype.position))),D=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,+"base",ha.prototype.base)));return new mxPoint(y.x+Math.min(y.width,v*y.width+D),y.y+y.height-q)},function(y,q){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ha.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(y.width,q.x-y.x-v*y.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},internalStorage:function(d){var n=[jb(d,["dx","dy"],function(y){var q=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,+"dx",Ha.prototype.dx))),v=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"dy",Ha.prototype.dy)));return new mxPoint(y.x+q,y.y+v)},function(y,q){this.state.style.dx=Math.round(Math.max(0,Math.min(y.width,q.x-y.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(y.height,q.y-y.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},module:function(d){return[jb(d,["jettyWidth","jettyHeight"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,+"jettyWidth",wa.prototype.jettyWidth))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"jettyHeight",wa.prototype.jettyHeight)));return new mxPoint(n.x+y/2,n.y+2*q)},function(n,y){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(n.height,y.y-n.y))/2)})]},corner:function(d){return[jb(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",Aa.prototype.dx))),+q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",Aa.prototype.dy)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.dx=Math.round(Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},tee:function(d){return[jb(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));+return new mxPoint(n.x+(n.width+y)/2,n.y+q)},function(n,y){this.state.style.dx=Math.round(Math.max(0,2*Math.min(n.width/2,y.x-n.x-n.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},singleArrow:eb(1),doubleArrow:eb(.5),"mxgraph.arrows2.wedgeArrow":lb(20,20),"mxgraph.arrows2.wedgeArrowDashed":lb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":lb(20,20),folder:function(d){return[jb(d,["tabWidth","tabHeight"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,+"tabWidth",t.prototype.tabWidth))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"tabHeight",t.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(y=n.width-y);return new mxPoint(n.x+y,n.y+q)},function(n,y){var q=Math.max(0,Math.min(n.width,y.x-n.x));mxUtils.getValue(this.state.style,"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=n.width-q);this.state.style.tabWidth=Math.round(q);this.state.style.tabHeight=+Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},document:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(n.x+3*n.width/4,n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},tape:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));+return new mxPoint(n.getCenterX(),n.y+y*n.height/2)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(y.y-n.y)/n.height*2))},!1)]},isoCube2:function(d){return[jb(d,["isoAngle"],function(n){var y=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",R.isoAngle))))*Math.PI/200;return new mxPoint(n.x,n.y+Math.min(n.width*Math.tan(y),.5*n.height))},function(n,y){this.state.style.isoAngle=Math.max(0,50*(y.y-n.y)/n.height)},!0)]},cylinder2:tb(c.prototype.size),cylinder3:tb(f.prototype.size),+offPageConnector:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(n.getCenterX(),n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},"mxgraph.basic.rect":function(d){var n=[Graph.createHandle(d,["size"],function(y){var q=Math.max(0,Math.min(y.width/2,y.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));+return new mxPoint(y.x+q,y.y+q)},function(y,q){this.state.style.size=Math.round(100*Math.max(0,Math.min(y.height/2,y.width/2,q.x-y.x)))/100})];d=Graph.createHandle(d,["indent"],function(y){var q=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(y.x+.75*y.width,y.y+q*y.height/200)},function(y,q){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(q.y-y.y)/y.height)))/100});n.push(d);return n},step:ub(ma.prototype.size,!0,null,+!0,ma.prototype.fixedSize),hexagon:ub(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:ub(ca.prototype.size,!1),display:ub(ab.prototype.size,!1),cube:ob(1,m.prototype.size,!1),card:ob(.5,C.prototype.size,!0),loopLimit:ob(.5,Q.prototype.size,!0),trapezoid:Ab(.5,I.prototype.size,I.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=+function(){var d=Bb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var n=this.state.style.shape;null==mxCellRenderer.defaultShapes[n]&&null==mxStencilRegistry.getStencil(n)?n=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(n=mxConstants.SHAPE_SWIMLANE);n=ib[n];null==n&&null!=this.state.shape&&this.state.shape.isRoundable()&&(n=ib[mxConstants.SHAPE_RECTANGLE]);null!=n&&(n=n(this.state),null!=n&&(d=null==d?n:d.concat(n)))}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=ib[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);sb=mxUtils.getRotatedPoint(sb,Math.cos(zb),Math.sin(zb));var rb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(d,+n,y,q,v){var D=d.view;q=null!=q&&0<q.length?q[0]:null;var E=d.absolutePoints,fa=E[0];E=E[E.length-1];null!=q&&(q=D.transformControlPoint(d,q));null==fa&&null!=n&&(fa=new mxPoint(n.getCenterX(),n.getCenterY()));null==E&&null!=y&&(E=new mxPoint(y.getCenterX(),y.getCenterY()));var L=sb.x,va=sb.y,na=xb.x,Va=xb.y,fb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=fa){d=function(Ga,Ka,Ja){Ga-=bb.x;var Ia=Ka-bb.y;Ka=(Va*Ga-na*Ia)/(L*Va-va*na);Ga=(va*Ga-L*Ia)/(va*na-L*Va);fb?+(Ja&&(bb=new mxPoint(bb.x+L*Ka,bb.y+va*Ka),v.push(bb)),bb=new mxPoint(bb.x+na*Ga,bb.y+Va*Ga)):(Ja&&(bb=new mxPoint(bb.x+na*Ga,bb.y+Va*Ga),v.push(bb)),bb=new mxPoint(bb.x+L*Ka,bb.y+va*Ka));v.push(bb)};var bb=fa;null==q&&(q=new mxPoint(fa.x+(E.x-fa.x)/2,fa.y+(E.y-fa.y)/2));d(q.x,q.y,!0);d(E.x,E.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Cb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,n){if(n==mxEdgeStyle.IsometricConnector){var y=+new mxElbowEdgeHandler(d);y.snapToTerminals=!1;return y}return Cb.apply(this,arguments)};B.prototype.constraints=[];H.prototype.getConstraints=function(d,n,y){d=[];var q=Math.tan(mxUtils.toRadians(30)),v=(.5-q)/2;q=Math.min(n,y/(.5+q));n=(n-q)/2;y=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y+.25*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+.5*q,y+q*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+q,y+.25*q));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,n+q,y+.75*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+.5*q,y+(1-v)*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y+.75*q));return d};R.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;q=Math.min(n*Math.tan(q),.5*y);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,+.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));return d};ha.prototype.getConstraints=function(d,n,y){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var q=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,+"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,+0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y-q)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y-q)));n>=2*q&&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))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.getConstraints=+0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,Math.min(y,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*(n-q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-.5*q,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,n,.5*(y+q)));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));n>=2*q&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};z.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,Math.min(y,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(1,+0),!1,null,n,.5*(y+q)));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));n>=2*q&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};C.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,Math.min(y,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*(n+q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y+q)));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));n>=2*q&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};m.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,Math.min(y,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*(n-q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-.5*q,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y+q)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,0,.5*(y-q)));return d};c.prototype.getConstraints=function(d,n,y){d=[];n=Math.max(0,Math.min(y,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,n));d.push(new mxConnectionConstraint(new mxPoint(1,+0),!1,null,0,.5*(y-q)));return d};f.prototype.getConstraints=function(d,n,y){d=[];n=Math.max(0,Math.min(y,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,n));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,n));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-n));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-n));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n+.5*(.5*y-n)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,n+.5*(.5*y-n)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,y-n-.5*(.5*y-n)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-n-.5*(.5*y-n)));d.push(new mxConnectionConstraint(new mxPoint(.145,-0),!1,null,0,.29*n));d.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*n));d.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-n));d.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-n));return d};k.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),x=Math.max(0,Math.min(y,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*q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,x)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),x))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-.5*q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,n-q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,x)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.25*(y-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.75*(y-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,-null,n,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(y-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(y-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y));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};Ka.prototype.constraints=mxRectangleShape.prototype.constraints;Pa.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;Na.prototype.constraints=mxEllipse.prototype.constraints;Ea.prototype.constraints=mxRectangleShape.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;-ab.prototype.getConstraints=function(d,n,y){d=[];var q=Math.min(n,y/2),x=Math.min(n-q,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(x+n-q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,n-q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(x+n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,y));return d};ua.prototype.getConstraints=function(d,n,y){n=parseFloat(mxUtils.getValue(d,"jettyWidth",ua.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",ua.prototype.jettyHeight));var q=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,n),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,+0),!1,null,0,.29*n));d.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*n));d.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-n));d.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-n));return d};t.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(y,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*q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,v)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),v))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-.5*q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,n-q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,v)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.25*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.75*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,+null,n,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y));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};Ha.prototype.constraints=mxRectangleShape.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;Na.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxRectangleShape.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;+ab.prototype.getConstraints=function(d,n,y){d=[];var q=Math.min(n,y/2),v=Math.min(n-q,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);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+n-q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,n-q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));return d};wa.prototype.getConstraints=function(d,n,y){n=parseFloat(mxUtils.getValue(d,"jettyWidth",wa.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",wa.prototype.jettyHeight));var q=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,n),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,n),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(y-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(y-.5*d,3.5*d))];y>5*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,n));y>8*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,n));y>15*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,n));return q};Q.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;+!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(y-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(y-.5*d,3.5*d))];y>5*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,n));y>8*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,n));y>15*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,n));return q};Q.prototype.constraints=mxRectangleShape.prototype.constraints;V.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)];u.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)];za.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,+.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];A.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)];Ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,-1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];C.prototype.constraints=-[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,+1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];F.prototype.constraints=+[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,-.25),!1)];L.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;I.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;Wa.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),x=Math.max(0,Math.min(y,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,n,.5*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*n+.25*q,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),.5*(y+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),y));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,.5*(n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),.5*(y+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*n-.25*q,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*x));return d};Ma.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,-"dx",this.dx)))),x=Math.max(0,Math.min(y,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,n,.5*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),x));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,q,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,.5*(y+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,y));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};ya.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)];Ia.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,-"arrowSize",this.arrowSize))));q=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-x),q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-x,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-x,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-x),y-q));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,0,y-q));return d};Xa.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ia.prototype.arrowWidth)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ia.prototype.arrowSize))));q=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,q));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,n-x,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-x,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,y));return d};Za.prototype.getConstraints=function(d,n,y){d=[];var q=Math.min(y,n),x=Math.max(0,Math.min(q,q*parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=(y-x)/2;var D=q+x,E=(n-x)/2;x=E+x;d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,E,.5*q));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,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y));d.push(new mxConnectionConstraint(new mxPoint(.5,-1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+x),q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,D));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,.5*(n+x),D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,q));return d};aa.prototype.constraints=-null;t.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)];N.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)];qa.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){p.escape();F=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),F);null!=F&&p.setSelectionCells(F)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var F=p.getSelectionCells(),P=0;P<F.length;P++)p.cellLabelChanged(F[P],"")}finally{p.getModel().endUpdate()}}}function g(F,P,R,T,c){c.getModel().beginUpdate();try{var f=c.getCellGeometry(F);null!=f&&R&&T&&(R/=T,f=f.clone(),1<R?f.height=f.width/R:f.width=f.height*R,c.getModel().setGeometry(F,-f));c.setCellStyles(mxConstants.STYLE_CLIP_PATH,P,[F]);c.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[F])}finally{c.getModel().endUpdate()}}var m=this.editorUi,v=m.editor,p=v.graph,A=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),-function(){p.popupMenuHandler.hideMenu();var F=p.view.scale,P=p.container.scrollLeft,R=p.container.scrollTop,T=p.view.translate.x,c=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(F-p.view.scale)&&5>Math.abs(P-p.container.scrollLeft)&&5>Math.abs(R-p.container.scrollTop)&&T==p.view.translate.x&&c==p.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.isEnabled()&&-p.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(F,P){try{var R=mxUtils.parseXml(F);v.graph.setSelectionCells(v.graph.importGraphModel(R.documentElement))}catch(T){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+T.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=-null})}).isEnabled=A;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=A;this.addAction("saveAs...",function(){m.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var F=new EditDiagramDialog(m);m.showDialog(F.container,620,420,!0,!1);F.init()}).isEnabled=A;this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,-320,240,!0,!0)}).isEnabled=A;this.addAction("print...",function(){m.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var F=null;try{F=m.copyXml(),null!=F&&p.removeCells(F,!1)}catch(P){}try{null==-F&&mxClipboard.cut(p)}catch(P){m.handleError(P)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(F){}try{mxClipboard.copy(p)}catch(F){m.handleError(F)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var F=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(P){if(null!=P){p.getModel().beginUpdate();try{m.pasteXml(P,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),-F=!0)}catch(P){}F||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(F){function P(T){if(null!=T){for(var c=!0,f=0;f<T.length&&c;f++)c=c&&p.model.isEdge(T[f]);var k=p.view.translate;f=p.view.scale;var B=k.x,z=k.y;k=null;if(1==T.length&&c){var C=p.getCellGeometry(T[0]);null!=C&&(k=C.getTerminalPoint(!0))}k=null!=k?k:p.getBoundingBoxFromGeometry(T,c);null!=k&&(c=Math.round(p.snap(p.popupMenuHandler.triggerX/f-B)),f=Math.round(p.snap(p.popupMenuHandler.triggerY/-f-z)),p.cellsMoved(T,c-k.x,f-k.y))}}function R(){p.getModel().beginUpdate();try{P(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){F=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(T){if(null!=T){p.getModel().beginUpdate();try{P(m.pasteXml(T,!0))}finally{p.getModel().endUpdate()}}else R()}),F=!0)}catch(T){}F||R()}});this.addAction("swap",function(){var F=p.getSelectionCells();2==F.length&&p.swapShapes(F[0],-F[1])});this.addAction("copySize",function(){var F=p.getSelectionCell();p.isEnabled()&&null!=F&&p.getModel().isVertex(F)&&(F=p.getCellGeometry(F),null!=F&&(m.copiedSize=new mxRectangle(F.x,F.y,F.width,F.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var F=p.getResizableCells(p.getSelectionCells()),P=0;P<F.length;P++)if(p.getModel().isVertex(F[P])){var R=p.getCellGeometry(F[P]);-null!=R&&(R=R.clone(),R.width=m.copiedSize.width,R.height=m.copiedSize.height,p.getModel().setGeometry(F[P],R))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var F=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&null!=F&&(F=F.cloneValue(),null==F||isNaN(F.nodeType)||(m.copiedValue=F))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var F=p.getSelectionCell();if(p.isEnabled()&&null!=F)try{p.isHtmlLabel(F)?m.writeHtmlToClipboard(p.getLabel(F),-mxUtils.bind(this,function(P){m.handleError(P)})):m.writeTextToClipboard(p.getLabel(F),mxUtils.bind(this,function(P){m.handleError(P)}))}catch(P){m.handleError(P)}});this.addAction("pasteData",function(F,P){function R(f,k){var B=T.getValue(f);k=f.cloneValue(k);k.removeAttribute("placeholders");null==B||isNaN(B.nodeType)||k.setAttribute("placeholders",B.getAttribute("placeholders"));null!=F&&mxEvent.isShiftDown(F)||k.setAttribute("label",p.convertValueToString(f));T.setValue(f,k)}F=null!=P?P:F;var T=-p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){T.beginUpdate();try{var c=p.getEditableCells(p.getSelectionCells());if(0==c.length)R(T.getRoot(),m.copiedValue);else for(P=0;P<c.length;P++)R(c[P],m.copiedValue)}finally{T.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(F,P){F=null!=P?P:F;null!=F&&mxEvent.isShiftDown(F)?e():b(null!=F&&(mxEvent.isControlDown(F)||mxEvent.isMetaDown(F)||mxEvent.isAltDown(F)))},null,null,"Delete");this.addAction("deleteAll",-function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(F){m.handleError(F)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var F=m.getSelectionState();if(null!=F.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",F.rowspan,[F.mergeCell]),p.setCellStyles("colspan",-F.colspan,[F.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var F=m.getSelectionState();if(0<F.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,F.cells),p.setCellStyles("colspan",null,F.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(F,P){F=null!=P?P:F;p.turnShapes(p.getResizableCells(p.getSelectionCells()),-null!=F?mxEvent.isShiftDown(F):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(F){F=p.getSelectionCell();p.isEnabled()&&null!=F&&p.addSelectionCells(p.getEdges(F))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,-!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var F=p.getSelectionCells(),P=p.getCurrentCellStyle(p.getSelectionCell()),R=1==mxUtils.getValue(P,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,R,F);p.setCellStyles(mxConstants.STYLE_RESIZABLE,R,F);p.setCellStyles(mxConstants.STYLE_ROTATABLE,R,-F);p.setCellStyles(mxConstants.STYLE_DELETABLE,R,F);p.setCellStyles(mxConstants.STYLE_EDITABLE,R,F);p.setCellStyles("locked",1==R?0:1,F);p.setCellStyles("connectable",R,F)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){p.model.isVertex(p.getSelectionCell())&&Graph.exploreFromCell(m.editor.graph,m.editor.graph.getSelectionCell())});this.addAction("home",function(){p.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){p.exitGroup()},+.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=mxRectangleShape.prototype.constraints;N.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;Za.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(y,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,n,.5*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*n+.25*q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),y));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,.5*(n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*n-.25*q,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};Aa.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,+"dx",this.dx)))),v=Math.max(0,Math.min(y,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,n,.5*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),v));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,y));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Ra.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)];La.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,+"arrowSize",this.arrowSize))));q=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-v),q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-v),y-q));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,0,y-q));return d};$a.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",La.prototype.arrowWidth)))),v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",La.prototype.arrowSize))));q=(y-q)/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*n,q));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,n-v,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));return d};Xa.prototype.getConstraints=function(d,n,y){d=[];var q=Math.min(y,n),v=Math.max(0,Math.min(q,q*parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=(y-v)/2;var D=q+v,E=(n-v)/2;v=E+v;d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,E,.5*q));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*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y));d.push(new mxConnectionConstraint(new mxPoint(.5,+1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+v),q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,D));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,.5*(n+v),D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,q));return d};W.prototype.constraints=+null;x.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)];M.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)];qa.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(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),O=0;O<G.length;O++)p.cellLabelChanged(G[O],"")}finally{p.getModel().endUpdate()}}}function g(G,O,R,c,f){f.getModel().beginUpdate();try{var l=f.getCellGeometry(G);null!=l&&R&&c&&(R/=c,l=l.clone(),1<R?l.height=l.width/R:l.width=l.height*R,f.getModel().setGeometry(G,+l));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,O,[G]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{f.getModel().endUpdate()}}var m=this.editorUi,u=m.editor,p=u.graph,B=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),+function(){p.popupMenuHandler.hideMenu();var G=p.view.scale,O=p.container.scrollLeft,R=p.container.scrollTop,c=p.view.translate.x,f=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(G-p.view.scale)&&5>Math.abs(O-p.container.scrollLeft)&&5>Math.abs(R-p.container.scrollTop)&&c==p.view.translate.x&&f==p.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.isEnabled()&&+p.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(G,O){try{var R=mxUtils.parseXml(G);u.graph.setSelectionCells(u.graph.importGraphModel(R.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=+null})}).isEnabled=B;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=B;this.addAction("saveAs...",function(){m.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var G=new EditDiagramDialog(m);m.showDialog(G.container,620,420,!0,!1);G.init()}).isEnabled=B;this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,+320,240,!0,!0)}).isEnabled=B;this.addAction("print...",function(){m.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var G=null;try{G=m.copyXml(),null!=G&&p.removeCells(G,!1)}catch(O){}try{null==+G&&mxClipboard.cut(p)}catch(O){m.handleError(O)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(G){}try{mxClipboard.copy(p)}catch(G){m.handleError(G)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(O){if(null!=O){p.getModel().beginUpdate();try{m.pasteXml(O,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),+G=!0)}catch(O){}G||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function O(c){if(null!=c){for(var f=!0,l=0;l<c.length&&f;l++)f=f&&p.model.isEdge(c[l]);var t=p.view.translate;l=p.view.scale;var z=t.x,C=t.y;t=null;if(1==c.length&&f){var F=p.getCellGeometry(c[0]);null!=F&&(t=F.getTerminalPoint(!0))}t=null!=t?t:p.getBoundingBoxFromGeometry(c,f);null!=t&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/l-z)),l=Math.round(p.snap(p.popupMenuHandler.triggerY/+l-C)),p.cellsMoved(c,f-t.x,l-t.y))}}function R(){p.getModel().beginUpdate();try{O(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(c){if(null!=c){p.getModel().beginUpdate();try{O(m.pasteXml(c,!0))}finally{p.getModel().endUpdate()}}else R()}),G=!0)}catch(c){}G||R()}});this.addAction("swap",function(){var G=p.getSelectionCells();2==G.length&&p.swapShapes(G[0],+G[1])});this.addAction("copySize",function(){var G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.getModel().isVertex(G)&&(G=p.getCellGeometry(G),null!=G&&(m.copiedSize=new mxRectangle(G.x,G.y,G.width,G.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var G=p.getResizableCells(p.getSelectionCells()),O=0;O<G.length;O++)if(p.getModel().isVertex(G[O])){var R=p.getCellGeometry(G[O]);+null!=R&&(R=R.clone(),R.width=m.copiedSize.width,R.height=m.copiedSize.height,p.getModel().setGeometry(G[O],R))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var G=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(m.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G)try{p.isHtmlLabel(G)?m.writeHtmlToClipboard(p.getLabel(G),+mxUtils.bind(this,function(O){m.handleError(O)})):m.writeTextToClipboard(p.getLabel(G),mxUtils.bind(this,function(O){m.handleError(O)}))}catch(O){m.handleError(O)}});this.addAction("pasteData",function(G,O){function R(l,t){var z=c.getValue(l);t=l.cloneValue(t);t.removeAttribute("placeholders");null==z||isNaN(z.nodeType)||t.setAttribute("placeholders",z.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||t.setAttribute("label",p.convertValueToString(l));c.setValue(l,t)}G=null!=O?O:G;var c=+p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){c.beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)R(c.getRoot(),m.copiedValue);else for(O=0;O<f.length;O++)R(f[O],m.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,O){G=null!=O?O:G;null!=G&&mxEvent.isShiftDown(G)?e():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",+function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(G){m.handleError(G)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var G=m.getSelectionState();if(null!=G.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",G.rowspan,[G.mergeCell]),p.setCellStyles("colspan",+G.colspan,[G.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var G=m.getSelectionState();if(0<G.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,G.cells),p.setCellStyles("colspan",null,G.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(G,O){G=null!=O?O:G;p.turnShapes(p.getResizableCells(p.getSelectionCells()),+null!=G?mxEvent.isShiftDown(G):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(G){G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.addSelectionCells(p.getEdges(G))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,+!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),O=p.getCurrentCellStyle(p.getSelectionCell()),R=1==mxUtils.getValue(O,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,R,G);p.setCellStyles(mxConstants.STYLE_RESIZABLE,R,G);p.setCellStyles(mxConstants.STYLE_ROTATABLE,R,+G);p.setCellStyles(mxConstants.STYLE_DELETABLE,R,G);p.setCellStyles(mxConstants.STYLE_EDITABLE,R,G);p.setCellStyles("locked",1==R?0:1,G);p.setCellStyles("connectable",R,G)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){p.model.isVertex(p.getSelectionCell())&&Graph.exploreFromCell(m.editor.graph,m.editor.graph.getSelectionCell())});this.addAction("home",function(){p.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){p.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){p.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){p.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){p.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){p.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",-function(F){p.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(F){p.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",function(){if(p.isEnabled()){var F=mxUtils.sortCells(p.getSelectionCells(),!0);1!=F.length||p.isTable(F[0])||p.isTableRow(F[0])?(F=p.getCellsForGroup(F),1<F.length&&p.setSelectionCell(p.groupCells(null,0,F))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",-function(){if(p.isEnabled()){var F=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var P=p.ungroupCells();if(null!=F)for(var R=0;R<F.length;R++)p.model.contains(F[R])&&(0==p.model.getChildCount(F[R])&&p.model.isVertex(F[R])&&p.setCellStyles("container","0",[F[R]]),P.push(F[R]))}finally{p.model.endUpdate()}0<P.length&&p.setSelectionCells(P)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var F=p.getSelectionCells();if(null!=F){for(var P=-[],R=0;R<F.length;R++)p.isTableRow(F[R])||p.isTableCell(F[R])||P.push(F[R]);p.removeCellsFromParent(P);0<P.length&&p.scrollCellToVisible(P[0])}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var F=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(F)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var F=p.getSelectionCell();if(p.isEnabled()&&null!=F&&p.isCellEditable(F)){var P=-"";if(mxUtils.isNode(F.value)){var R=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&F.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R=F.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==R&&(R=F.value.getAttribute("tooltip"));null!=R&&(P=R)}P=new TextareaDialog(m,mxResources.get("editTooltip")+":",P,function(T){p.setTooltipForCell(F,T)});m.showDialog(P.container,320,200,!0,!0);P.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var F=p.getLinkForCell(p.getSelectionCell());-null!=F&&p.openLink(F)});this.addAction("editLink...",function(){var F=p.getSelectionCell();if(p.isEnabled()&&null!=F&&p.isCellEditable(F)){var P=p.getLinkForCell(F,!0)||"";m.showLinkDialog(P,mxResources.get("ok"),function(R,T,c){p.getModel().beginUpdate();try{p.setLinkForCell(F,0<R.length?R:null),p.setAttributeForCell(F,"linkTarget",c)}finally{p.getModel().endUpdate()}},!0,p.getLinkTargetForCell(F))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&-!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=A;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(F,P,R){F=mxUtils.trim(F);if(0<F.length){var T=null,c=p.getLinkTitle(F);null!=P&&0<P.length&&(T=P[0].iconUrl,c=P[0].name||P[0].type,c=c.charAt(0).toUpperCase()+-c.substring(1),30<c.length&&(c=c.substring(0,30)+"..."));P=new mxCell(c,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=T?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+T:"spacing=10;"));P.vertex=!0;T=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([P],!0));P.geometry.x=T.x;P.geometry.y=T.y;p.setAttributeForCell(P,"linkTarget",R);p.setLinkForCell(P,F);p.cellSizeUpdated(P,!0);p.getModel().beginUpdate();try{P=p.addCell(P),-p.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{p.getModel().endUpdate()}p.setSelectionCell(P);p.scrollCellToVisible(p.getSelectionCell())}},!0)},null,null,"L")).isEnabled=A;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var F=p.getSelectedElement(),P=p.getParentByName(F,"A",p.cellEditor.textarea),R="";if(null==P&&null!=F&&null!=F.getElementsByTagName)for(var T=F.getElementsByTagName("a"),c=0;c<T.length&&null==P;c++)T[c].textContent==-F.textContent&&(P=T[c]);null!=P&&"A"==P.nodeName&&(R=P.getAttribute("href")||"",p.selectNode(P));var f=p.cellEditor.saveSelection();m.showLinkDialog(R,mxResources.get("ok"),mxUtils.bind(this,function(k){p.cellEditor.restoreSelection(f);null!=k&&p.insertLink(k)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=A;this.addAction("autosize",function(){var F=p.getSelectionCells();if(null!=F){p.getModel().beginUpdate();try{for(var P=0;P<F.length;P++){var R=-F[P];p.getModel().isVertex(R)&&(0<p.getModel().getChildCount(R)?p.updateGroupBounds([R],0,!0):p.updateCellSize(R))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var F=p.getCommonStyle(p.getSelectionCells());F="1"==mxUtils.getValue(F,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var P=p.getEditableCells(p.getSelectionCells()),-R=0;R<P.length;R++)if(state=p.getView().getState(P[R]),null!=state){var T=mxUtils.getValue(state.style,"html","0");if("1"==T&&null==F)p.removeTextStyleForCell(state.cell),p.setCellStyles("html",F,[P[R]]);else if("0"==T&&"1"==F){var c=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));p.cellLabelChanged(state.cell,Graph.sanitizeHtml(c));p.setCellStyles("html",F,[P[R]])}}m.fireEvent(new mxEventObject("styleChanged",-"keys",["html"],"values",[null!=F?F:"0"],"cells",P))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var F=p.getView().getState(p.getSelectionCell()),P="wrap";p.stopEditing();null!=F&&"wrap"==F.style[mxConstants.STYLE_WHITE_SPACE]&&(P=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,P)});this.addAction("rotation",function(){var F="0",P=p.getView().getState(p.getSelectionCell());null!=P&&(F=P.style[mxConstants.STYLE_ROTATION]||F);F=new FilenameDialog(m,F,mxResources.get("apply"),-function(R){null!=R&&0<R.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,R)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(F.container,375,80,!0,!0);F.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(F){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(F){p.isFastZoomEnabled()?+function(G){p.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(G){p.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",function(){if(p.isEnabled()){var G=mxUtils.sortCells(p.getSelectionCells(),!0);1!=G.length||p.isTable(G[0])||p.isTableRow(G[0])?(G=p.getCellsForGroup(G),1<G.length&&p.setSelectionCell(p.groupCells(null,0,G))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",+function(){if(p.isEnabled()){var G=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var O=p.ungroupCells();if(null!=G)for(var R=0;R<G.length;R++)p.model.contains(G[R])&&(0==p.model.getChildCount(G[R])&&p.model.isVertex(G[R])&&p.setCellStyles("container","0",[G[R]]),O.push(G[R]))}finally{p.model.endUpdate()}0<O.length&&p.setSelectionCells(O)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var G=p.getSelectionCells();if(null!=G){for(var O=+[],R=0;R<G.length;R++)p.isTableRow(G[R])||p.isTableCell(G[R])||O.push(G[R]);p.removeCellsFromParent(O);0<O.length&&p.scrollCellToVisible(O[0])}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(G)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var O=+"";if(mxUtils.isNode(G.value)){var R=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==R&&(R=G.value.getAttribute("tooltip"));null!=R&&(O=R)}O=new TextareaDialog(m,mxResources.get("editTooltip")+":",O,function(c){p.setTooltipForCell(G,c)});m.showDialog(O.container,320,200,!0,!0);O.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=p.getLinkForCell(p.getSelectionCell());+null!=G&&p.openLink(G)});this.addAction("editLink...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var O=p.getLinkForCell(G,!0)||"";m.showLinkDialog(O,mxResources.get("ok"),function(R,c,f){p.getModel().beginUpdate();try{p.setLinkForCell(G,0<R.length?R:null),p.setAttributeForCell(G,"linkTarget",f)}finally{p.getModel().endUpdate()}},!0,p.getLinkTargetForCell(G))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&+!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=B;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(G,O,R){G=mxUtils.trim(G);if(0<G.length){var c=null,f=p.getLinkTitle(G);null!=O&&0<O.length&&(c=O[0].iconUrl,f=O[0].name||O[0].type,f=f.charAt(0).toUpperCase()++f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));O=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));O.vertex=!0;c=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([O],!0));O.geometry.x=c.x;O.geometry.y=c.y;p.setAttributeForCell(O,"linkTarget",R);p.setLinkForCell(O,G);p.cellSizeUpdated(O,!0);p.getModel().beginUpdate();try{O=p.addCell(O),+p.fireEvent(new mxEventObject("cellsInserted","cells",[O]))}finally{p.getModel().endUpdate()}p.setSelectionCell(O);p.scrollCellToVisible(p.getSelectionCell())}},!0)},null,null,"L")).isEnabled=B;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var G=p.getSelectedElement(),O=p.getParentByName(G,"A",p.cellEditor.textarea),R="";if(null==O&&null!=G&&null!=G.getElementsByTagName)for(var c=G.getElementsByTagName("a"),f=0;f<c.length&&null==O;f++)c[f].textContent==+G.textContent&&(O=c[f]);null!=O&&"A"==O.nodeName&&(R=O.getAttribute("href")||"",p.selectNode(O));var l=p.cellEditor.saveSelection();m.showLinkDialog(R,mxResources.get("ok"),mxUtils.bind(this,function(t){p.cellEditor.restoreSelection(l);null!=t&&p.insertLink(t)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=B;this.addAction("autosize",function(){var G=p.getSelectionCells();if(null!=G){p.getModel().beginUpdate();try{for(var O=0;O<G.length;O++){var R=+G[O];p.getModel().isVertex(R)&&(0<p.getModel().getChildCount(R)?p.updateGroupBounds([R],0,!0):p.updateCellSize(R))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var G=p.getCommonStyle(p.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var O=p.getEditableCells(p.getSelectionCells()),+R=0;R<O.length;R++)if(state=p.getView().getState(O[R]),null!=state){var c=mxUtils.getValue(state.style,"html","0");if("1"==c&&null==G)p.removeTextStyleForCell(state.cell),p.setCellStyles("html",G,[O[R]]);else if("0"==c&&"1"==G){var f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));p.cellLabelChanged(state.cell,Graph.sanitizeHtml(f));p.setCellStyles("html",G,[O[R]])}}m.fireEvent(new mxEventObject("styleChanged",+"keys",["html"],"values",[null!=G?G:"0"],"cells",O))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=p.getView().getState(p.getSelectionCell()),O="wrap";p.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&(O=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,O)});this.addAction("rotation",function(){var G="0",O=p.getView().getState(p.getSelectionCell());null!=O&&(G=O.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(m,G,mxResources.get("apply"),+function(R){null!=R&&0<R.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,R)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(G){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){p.pageVisible&&p.isSelectionEmpty()?p.fitPages():m.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(2):this.get("pageView").funct()}),-null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&p.zoomTo(P/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(F.container,-300,80,!0,!0);F.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&(P=new ChangePageSetup(m,null,null,null,P/100),P.ignoreColor=!0,P.ignoreImage=!0,p.model.execute(P))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(F.container,300,80,!0,!0);F.init()}));var G=null;G=this.addAction("grid",-function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");G.setToggleAction(!0);G.setSelectedCallback(function(){return p.isGridEnabled()});G.setEnabled(!1);G=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});-G.setEnabled(!1);G=this.addAction("animations",function(){Editor.enableAnimations=!Editor.enableAnimations;m.fireEvent(new mxEventObject("enableAnimationsChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.enableAnimations});G=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});-G=this.addAction("collapseExpand",function(){var F=new ChangePageSetup(m);F.ignoreColor=!0;F.ignoreImage=!0;F.foldingEnabled=!p.foldingEnabled;p.model.execute(F)});G.setToggleAction(!0);G.setSelectedCallback(function(){return p.foldingEnabled});G.isEnabled=A;G=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return p.pageVisible});G=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=-!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");G.setToggleAction(!0);G.setSelectedCallback(function(){return p.connectionArrowsEnabled});G=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+O");G.setToggleAction(!0);G.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});G=this.addAction("copyConnect",-function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());m.fireEvent(new mxEventObject("copyConnectChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});G.isEnabled=A;G=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});G.setToggleAction(!0);G.setSelectedCallback(function(){return m.editor.autosave});G.isEnabled=A;G.visible=!1;this.addAction("help",function(){var F="";mxResources.isLanguageSupported(mxClient.language)&&-(F="_"+mxClient.language);p.openLink(RESOURCES_PATH+"/help"+F+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));G=mxUtils.bind(this,function(F,P,R,T){return this.addAction(F,function(){if(null!=R&&p.cellEditor.isContentEditing())R();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var c=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,-P,c);(P&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?p.updateLabelElements(c,function(k){k.style.fontWeight=null;"B"==k.nodeName&&p.replaceElement(k)}):(P&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(c,function(k){k.style.fontStyle=null;"I"==k.nodeName&&p.replaceElement(k)}):(P&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(c,function(k){k.style.textDecoration=null;"U"==k.nodeName&&p.replaceElement(k)});for(var f=0;f<c.length;f++)0==p.model.getChildCount(c[f])&&-p.autoSizeCell(c[f],!1)}finally{p.getModel().endUpdate()}}},null,null,T)});G("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");G("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");G("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000",+null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(O){O=parseInt(O);!isNaN(O)&&0<O&&p.zoomTo(O/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(G.container,+300,80,!0,!0);G.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(O){O=parseInt(O);!isNaN(O)&&0<O&&(O=new ChangePageSetup(m,null,null,null,O/100),O.ignoreColor=!0,O.ignoreImage=!0,p.model.execute(O))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}));var H=null;H=this.addAction("grid",+function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.isGridEnabled()});H.setEnabled(!1);H=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});+H.setEnabled(!1);H=this.addAction("animations",function(){Editor.enableAnimations=!Editor.enableAnimations;m.fireEvent(new mxEventObject("enableAnimationsChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return Editor.enableAnimations});H=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});+H=this.addAction("collapseExpand",function(){var G=new ChangePageSetup(m);G.ignoreColor=!0;G.ignoreImage=!0;G.foldingEnabled=!p.foldingEnabled;p.model.execute(G)});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.foldingEnabled});H.isEnabled=B;H=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));H.setToggleAction(!0);H.setSelectedCallback(function(){return p.pageVisible});H=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=+!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionArrowsEnabled});H=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+O");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});H=this.addAction("copyConnect",+function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());m.fireEvent(new mxEventObject("copyConnectChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});H.isEnabled=B;H=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});H.setToggleAction(!0);H.setSelectedCallback(function(){return m.editor.autosave});H.isEnabled=B;H.visible=!1;this.addAction("help",function(){var G="";mxResources.isLanguageSupported(mxClient.language)&&+(G="_"+mxClient.language);p.openLink(RESOURCES_PATH+"/help"+G+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));H=mxUtils.bind(this,function(G,O,R,c){return this.addAction(G,function(){if(null!=R&&p.cellEditor.isContentEditing())R();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,+O,f);(O&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?p.updateLabelElements(f,function(t){t.style.fontWeight=null;"B"==t.nodeName&&p.replaceElement(t)}):(O&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(t){t.style.fontStyle=null;"I"==t.nodeName&&p.replaceElement(t)}):(O&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(t){t.style.textDecoration=null;"U"==t.nodeName&&p.replaceElement(t)});for(var l=0;l<f.length;l++)0==p.model.getChildCount(f[l])&&+p.autoSizeCell(f[l],!1)}finally{p.getModel().endUpdate()}}},null,null,c)});H("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");H("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");H("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",p.shapeForegroundColor)});this.addAction("strokeColor...",function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR,null,null,"default",p.shapeBackgroundColor)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,-"backcolor",null,"default",p.shapeBackgroundColor)});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("removeFormat",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&!p.isEditing()){p.getModel().beginUpdate();try{for(var F=p.getSelectionCells(),P=0;P<F.length;P++)p.removeTextStyleForCell(F[P],!0)}finally{p.getModel().endUpdate()}}});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,+"backcolor",null,"default",p.shapeBackgroundColor)});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("removeFormat",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&!p.isEditing()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),O=0;O<G.length;O++)p.removeTextStyleForCell(G[O],!0)}finally{p.getModel().endUpdate()}}});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("sharp",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});-this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!p.isSelectionEmpty()&&p.isEnabled()){p.getModel().beginUpdate();try{var F=p.getSelectionCells(),P=p.getCurrentCellStyle(F[0]),-R="1"==mxUtils.getValue(P,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,R);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[R,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,-"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var F=p.view.getState(p.getSelectionCell()),P="1";null!=F&&null!=p.getFoldingImage(F)&&(P="0");p.setCellStyles("collapsible",P);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[P],"cells",p.getSelectionCells()))});this.addAction("editStyle...",-mxUtils.bind(this,function(){var F=p.getEditableCells(p.getSelectionCells());if(null!=F&&0<F.length){var P=p.getModel();P=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",P.getStyle(F[0])||"",function(R){null!=R&&p.setCellStyle(mxUtils.trim(R),F)},null,null,400,220);this.editorUi.showDialog(P.container,420,300,!0,!0);P.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var F=p.getSelectionCell();if(null!=F&&p.getModel().isEdge(F)){var P=v.graph.selectionCellsHandler.getHandler(F);if(P instanceof mxEdgeHandler){var R=p.view.translate,T=p.view.scale,c=R.x;R=R.y;F=p.getModel().getParent(F);for(var f=p.getCellGeometry(F);p.getModel().isVertex(F)&&null!=f;)c+=f.x,R+=f.y,F=-p.getModel().getParent(F),f=p.getCellGeometry(F);c=Math.round(p.snap(p.popupMenuHandler.triggerX/T-c));T=Math.round(p.snap(p.popupMenuHandler.triggerY/T-R));P.addPointAt(P.state,c,T)}}});this.addAction("removeWaypoint",function(){var F=m.actions.get("removeWaypoint");null!=F.handler&&F.handler.removePoint(F.handler.state,F.index)});this.addAction("clearAnchors",function(){var F=p.getSelectionCells();if(null!=F){F=p.getEditableCells(p.addAllEdges(F));p.getModel().beginUpdate();try{for(var P=0;P<F.length;P++){var R=-F[P];p.getModel().isEdge(R)&&(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[R]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{p.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var F=p.getSelectionCells();if(null!=F){F=p.getEditableCells(p.addAllEdges(F));p.getModel().beginUpdate();try{for(var P=0;P<F.length;P++){var R=F[P];if(p.getModel().isEdge(R)){var T=p.getCellGeometry(R);-null!=T&&(T=T.clone(),T.points=null,T.x=0,T.y=0,T.offset=null,p.getModel().setGeometry(R,T))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+R");G=this.addAction("subscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");G=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");G=this.addAction("decreaseFontSize",-mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var F=p.getCurrentCellStyle(p.getSelectionCell());F=mxUtils.getValue(F,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,F-1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");G=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var F=p.getCurrentCellStyle(p.getSelectionCell());F=mxUtils.getValue(F,mxConstants.STYLE_FONTSIZE,-mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,F+1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var F=mxResources.get("image")+" ("+mxResources.get("url")+"):",P=p.getView().getState(p.getSelectionCell()),R="",T=null;null!=P&&(R=P.style[mxConstants.STYLE_IMAGE]||R,T=P.style[mxConstants.STYLE_CLIP_PATH]||T);var c=p.cellEditor.saveSelection();-m.showImageDialog(F,R,function(f,k,B,z,C,I){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(c),p.insertImage(f,k,B);else{var L=p.getSelectionCells();if(null!=f&&(0<f.length||0<L.length)){var K=null;p.getModel().beginUpdate();try{if(0==L.length){L=[p.insertVertex(p.getDefaultParent(),null,"",0,0,k,B,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var O=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(L,!0));L[0].geometry.x=O.x;L[0].geometry.y=-O.y;null!=z&&g(L[0],z,C,I,p);K=L;p.fireEvent(new mxEventObject("cellsInserted","cells",K))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<f.length?f:null,L);var da=p.getCurrentCellStyle(L[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&"label"!=da[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",L):0==f.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,L);null==z&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,L);if(null!=k&&null!=B)for(f=0;f<L.length;f++){var ea=L[f];if("0"!=p.getCurrentCellStyle(ea).expand){var ca=-p.getModel().getGeometry(ea);null!=ca&&(ca=ca.clone(),ca.width=k,ca.height=B,p.getModel().setGeometry(ea,ca))}null!=z&&g(ea,z,C,I,p)}}finally{p.getModel().endUpdate()}null!=K&&(p.setSelectionCells(K),p.scrollCellToVisible(K[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,T)}}).isEnabled=A;this.addAction("crop...",function(){var F=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=F){var P=p.getCurrentCellStyle(F),R=P[mxConstants.STYLE_IMAGE],-T=P[mxConstants.STYLE_SHAPE];R&&"image"==T&&(P=new CropImageDialog(m,R,P[mxConstants.STYLE_CLIP_PATH],function(c,f,k){g(F,c,f,k,p)}),m.showDialog(P.container,300,390,!0,!0))}}).isEnabled=A;G=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",-function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));G=this.addAction("format",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,-null,Editor.ctrlKey+"+Shift+P");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return m.isFormatPanelVisible()}));G=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),-this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var F=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=F&&null!=F.geometry){var P=-new ConnectionPointsDialog(m,F);m.showDialog(P.container,350,450,!0,!1,function(){P.destroy()});P.init()}},null,null,"Alt+Shift+Q").isEnabled=A};Actions.prototype.addAction=function(b,e,g,m,v){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,g,m,v))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};-function Action(b,e,g,m,v){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=g?g:!0;this.iconCls=m;this.shortcut=v;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};+this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!p.isSelectionEmpty()&&p.isEnabled()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),O=p.getCurrentCellStyle(G[0]),+R="1"==mxUtils.getValue(O,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,R);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[R,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,+"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var G=p.view.getState(p.getSelectionCell()),O="1";null!=G&&null!=p.getFoldingImage(G)&&(O="0");p.setCellStyles("collapsible",O);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[O],"cells",p.getSelectionCells()))});this.addAction("editStyle...",+mxUtils.bind(this,function(){var G=p.getEditableCells(p.getSelectionCells());if(null!=G&&0<G.length){var O=p.getModel();O=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",O.getStyle(G[0])||"",function(R){null!=R&&p.setCellStyle(mxUtils.trim(R),G)},null,null,400,220);this.editorUi.showDialog(O.container,420,300,!0,!0);O.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=p.getSelectionCell();if(null!=G&&p.getModel().isEdge(G)){var O=u.graph.selectionCellsHandler.getHandler(G);if(O instanceof mxEdgeHandler){var R=p.view.translate,c=p.view.scale,f=R.x;R=R.y;G=p.getModel().getParent(G);for(var l=p.getCellGeometry(G);p.getModel().isVertex(G)&&null!=l;)f+=l.x,R+=l.y,G=+p.getModel().getParent(G),l=p.getCellGeometry(G);f=Math.round(p.snap(p.popupMenuHandler.triggerX/c-f));c=Math.round(p.snap(p.popupMenuHandler.triggerY/c-R));O.addPointAt(O.state,f,c)}}});this.addAction("removeWaypoint",function(){var G=m.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,G.index)});this.addAction("clearAnchors",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var O=0;O<G.length;O++){var R=+G[O];p.getModel().isEdge(R)&&(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[R]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{p.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var O=0;O<G.length;O++){var R=G[O];if(p.getModel().isEdge(R)){var c=p.getCellGeometry(R);+null!=c&&(c=c.clone(),c.points=null,c.x=0,c.y=0,c.offset=null,p.getModel().setGeometry(R,c))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+R");H=this.addAction("subscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");H=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");H=this.addAction("decreaseFontSize",+mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,G-1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");H=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,+mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",O=p.getView().getState(p.getSelectionCell()),R="",c=null;null!=O&&(R=O.style[mxConstants.STYLE_IMAGE]||R,c=O.style[mxConstants.STYLE_CLIP_PATH]||c);var f=p.cellEditor.saveSelection();+m.showImageDialog(G,R,function(l,t,z,C,F,N){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(l,t,z);else{var K=p.getSelectionCells();if(null!=l&&(0<l.length||0<K.length)){var I=null;p.getModel().beginUpdate();try{if(0==K.length){K=[p.insertVertex(p.getDefaultParent(),null,"",0,0,t,z,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ca=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ca.x;K[0].geometry.y=+ca.y;null!=C&&g(K[0],C,F,N,p);I=K;p.fireEvent(new mxEventObject("cellsInserted","cells",I))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<l.length?l:null,K);var da=p.getCurrentCellStyle(K[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&"label"!=da[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==l.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=t&&null!=z)for(l=0;l<K.length;l++){var ea=K[l];if("0"!=p.getCurrentCellStyle(ea).expand){var X=+p.getModel().getGeometry(ea);null!=X&&(X=X.clone(),X.width=t,X.height=z,p.getModel().setGeometry(ea,X))}null!=C&&g(ea,C,F,N,p)}}finally{p.getModel().endUpdate()}null!=I&&(p.setSelectionCells(I),p.scrollCellToVisible(I[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,c)}}).isEnabled=B;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var O=p.getCurrentCellStyle(G),R=O[mxConstants.STYLE_IMAGE],+c=O[mxConstants.STYLE_SHAPE];R&&"image"==c&&(O=new CropImageDialog(m,R,O[mxConstants.STYLE_CLIP_PATH],function(f,l,t){g(G,f,l,t,p)}),m.showDialog(O.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",+function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));H=this.addAction("format",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,+null,Editor.ctrlKey+"+Shift+P");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return m.isFormatPanelVisible()}));H=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),+this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G&&null!=G.geometry){var O=+new ConnectionPointsDialog(m,G);m.showDialog(O.container,350,450,!0,!1,function(){O.destroy()});O.init()}},null,null,"Alt+Shift+Q").isEnabled=B};Actions.prototype.addAction=function(b,e,g,m,u){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,g,m,u))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};+function Action(b,e,g,m,u){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=g?g:!0;this.iconCls=m;this.shortcut=u;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};-DrawioFile.prototype.synchronizeFile=function(b,e){if(this.savingFile)null!=e&&e({message:mxResources.get("busy")});else{var g=!0,m=window.setTimeout(mxUtils.bind(this,function(){g=!1;null!=e&&e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,e)})})}),this.ui.timeout),v=mxUtils.bind(this,function(A){g&&(window.clearTimeout(m),null!=e&&e(A))}),p=mxUtils.bind(this,function(){return!g});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,-function(A){g&&(window.clearTimeout(m),this.sync.cleanup(b,e,A))}),v,p):this.updateFile(mxUtils.bind(this,function(){g&&(window.clearTimeout(m),null!=b&&b())}),v,p)}};-DrawioFile.prototype.updateFile=function(b,e,g,m,v){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",v,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(p){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[p]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=p?this.mergeFile(p,b,e,-m,v):this.reloadFile(b,e))}catch(A){null!=e&&e(A)}}),e))};-DrawioFile.prototype.mergeFile=function(b,e,g,m,v){try{var p=b.getShadowPages();if(null!=p&&0<p.length){var A=this.getShadowPages(),G=[this.ui.diffPages(null!=m?m:A,p)],S=this.ignorePatches(G);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var F=this.isModified()?this.ui.diffPages(A,-this.isRealtime()?this.ownPages:this.ui.pages):null,P=this.ui.patchPages(this.ui.clonePages(A),G[0]),R=this.ui.getHashValueForPages(P,{}),T=this.ui.getHashValueForPages(p,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",A,"pages",p,"patched",P,"patches",G,"changes",F,"checksum",R,"current",T,"valid",R==T,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",v);if(null!=R&&R!=T)this.checksumError(g,G,null,null,"mergeFile",-R,T,b.getCurrentRevisionId());else{this.setShadowPages(p);if(null!=this.sync){var c=this.sync.patchRealtime(G,DrawioFile.LAST_WRITE_WINS?F:null,null,v);null==c||mxUtils.isEmptyObject(c)||G.push(c)}this.patch(G,DrawioFile.LAST_WRITE_WINS?F:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(B){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(B);try{var f=this.getCurrentUser(),k=null!=f?-f.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),k,B)}catch(z){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(B){null!=g&&g(B)}};-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),g=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var v=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(v=this.ui.anonymizeNode(v,!0));v.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,v,!0);g.appendChild(v)}return mxUtils.getPrettyXml(g)};+DrawioFile.prototype.synchronizeFile=function(b,e){if(this.savingFile)null!=e&&e({message:mxResources.get("busy")});else{var g=!0,m=window.setTimeout(mxUtils.bind(this,function(){g=!1;null!=e&&e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,e)})})}),this.ui.timeout),u=mxUtils.bind(this,function(B){g&&(window.clearTimeout(m),null!=e&&e(B))}),p=mxUtils.bind(this,function(){return!g});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,+function(B){g&&(window.clearTimeout(m),this.sync.cleanup(b,e,B))}),u,p):this.updateFile(mxUtils.bind(this,function(){g&&(window.clearTimeout(m),null!=b&&b())}),u,p)}};+DrawioFile.prototype.updateFile=function(b,e,g,m,u){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",u,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(p){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[p]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=p?this.mergeFile(p,b,e,+m,u):this.reloadFile(b,e))}catch(B){null!=e&&e(B)}}),e))};+DrawioFile.prototype.mergeFile=function(b,e,g,m,u){try{var p=b.getShadowPages();if(null!=p&&0<p.length){var B=this.getShadowPages(),H=[this.ui.diffPages(null!=m?m:B,p)],S=this.ignorePatches(H);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var G=this.isModified()?this.ui.diffPages(B,+this.isRealtime()?this.ownPages:this.ui.pages):null,O=this.ui.patchPages(this.ui.clonePages(B),H[0]),R=this.ui.getHashValueForPages(O,{}),c=this.ui.getHashValueForPages(p,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",p,"patched",O,"patches",H,"changes",G,"checksum",R,"current",c,"valid",R==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",u);if(null!=R&&R!=c)this.checksumError(g,H,null,null,"mergeFile",+R,c,b.getCurrentRevisionId());else{this.setShadowPages(p);if(null!=this.sync){var f=this.sync.patchRealtime(H,DrawioFile.LAST_WRITE_WINS?G:null,null,u);null==f||mxUtils.isEmptyObject(f)||H.push(f)}this.patch(H,DrawioFile.LAST_WRITE_WINS?G:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(z);try{var l=this.getCurrentUser(),t=null!=l?+l.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),t,z)}catch(C){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(z){null!=g&&g(z)}};+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),g=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var u=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(u=this.ui.anonymizeNode(u,!0));u.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,u,!0);g.appendChild(u)}return mxUtils.getPrettyXml(g)};DrawioFile.prototype.compressReportData=function(b,e,g){e=null!=e?e:1E4;null!=g&&null!=b&&b.length>g?b=b.substring(0,g)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};-DrawioFile.prototype.checksumError=function(b,e,g,m,v,p,A,G){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),F=null!=S?S.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",R=JSON.stringify(e).length,T=null;if(null!=e&&1E3>R){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);T=JSON.stringify(e);T=null!=T&&1E3>T.length?Graph.compress(T):-null}this.getLatestVersion(mxUtils.bind(this,function(c){try{var f=null!=T?"report":"error",k=this.ui.getHashValueForPages(c.getShadowPages()),B="unknown",z="unknown",C="unknown";try{var I=null!=c.initialData&&0<c.initialData.length?mxUtils.parseXml(c.initialData).documentElement:null;null!=I&&(null!=I.getAttribute("version")&&(B=I.getAttribute("version")),null!=I.getAttribute("agent")&&(z=I.getAttribute("agent")),null!=I.getAttribute("type")&&(C=I.getAttribute("type")))}catch(L){}EditorUi.logError("Checksum "+-f+" in "+v,null,this.getMode()+"."+P,"user_"+F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+(null!=T?"-json_"+T:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=A?"-current_"+A:"")+(null!=G?"-rev_"+this.ui.hashValue(G):"")+(null!=k?"-latest_"+k:"")+"-latestRev_"+this.ui.hashValue(c.getCurrentRevisionId())+("-latestVersion_"+B)+("-latestAgent_"+z)+("-latestType_"+C));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+P,action:v,label:"user_"+-F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+"-size_"+this.getSize()})}catch(L){}}),function(){})}catch(c){}};-DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var v=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),A=this.getCurrentUser(),G=null!=A?this.ui.hashValue(A.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",F=this.getTitle(),P=F.lastIndexOf(".");A="xml";0<P&&(A=F.substring(P));var R=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+A+")\nUser="+G+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:-"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+R+"\n\nShadow:\n"+v+"\n\nData:\n"+p,m)}catch(T){}};-DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var g=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),m=this.ui.editor.graph,v=m.getSelectionCells(),p=m.getViewState(),A=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(G){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[g],"viewState",[p],"latestFile",G);null!=G?(this.ui.replaceFileData(G.getData(),-[g]),this.ui.restoreViewState(A,p,v),this.setDescriptor(G.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([g]),S.fileChanged());this.ui.restoreViewState(A,p,v);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(G){null!=e&&e(G)}};+DrawioFile.prototype.checksumError=function(b,e,g,m,u,p,B,H){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),G=null!=S?S.id:"unknown",O=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",R=JSON.stringify(e).length,c=null;if(null!=e&&1E3>R){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);c=JSON.stringify(e);c=null!=c&&1E3>c.length?Graph.compress(c):+null}this.getLatestVersion(mxUtils.bind(this,function(f){try{var l=null!=c?"report":"error",t=this.ui.getHashValueForPages(f.getShadowPages()),z="unknown",C="unknown",F="unknown";try{var N=null!=f.initialData&&0<f.initialData.length?mxUtils.parseXml(f.initialData).documentElement:null;null!=N&&(null!=N.getAttribute("version")&&(z=N.getAttribute("version")),null!=N.getAttribute("agent")&&(C=N.getAttribute("agent")),null!=N.getAttribute("type")&&(F=N.getAttribute("type")))}catch(K){}EditorUi.logError("Checksum "++l+" in "+u,null,this.getMode()+"."+O,"user_"+G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=B?"-current_"+B:"")+(null!=H?"-rev_"+this.ui.hashValue(H):"")+(null!=t?"-latest_"+t:"")+"-latestRev_"+this.ui.hashValue(f.getCurrentRevisionId())+("-latestVersion_"+z)+("-latestAgent_"+C)+("-latestType_"+F));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+O,action:u,label:"user_"++G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(f){}};+DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var u=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),H=null!=B?this.ui.hashValue(B.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),O=G.lastIndexOf(".");B="xml";0<O&&(B=G.substring(O));var R=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()++":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+B+")\nUser="+H+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:+"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+R+"\n\nShadow:\n"+u+"\n\nData:\n"+p,m)}catch(c){}};+DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var g=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),m=this.ui.editor.graph,u=m.getSelectionCells(),p=m.getViewState(),B=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(H){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[g],"viewState",[p],"latestFile",H);null!=H?(this.ui.replaceFileData(H.getData(),+[g]),this.ui.restoreViewState(B,p,u),this.setDescriptor(H.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([g]),S.fileChanged());this.ui.restoreViewState(B,p,u);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(H){null!=e&&e(H)}};DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var g=0;g<b.length&&e;g++)e=e&&mxUtils.isEmptyObject(b[g]);return e};-DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var v=this.ui.editor.undoManager,p=v.history.slice(),A=v.indexOfNextAdd,G=this.ui.editor.graph;G.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var F=G.foldingEnabled,P=G.mathEnabled,R=G.cellRenderer.redraw;G.cellRenderer.redraw=function(z){z.view.graph.isEditing(z.cell)&&(z.view.graph.scrollCellToVisible(z.cell),z.view.graph.cellEditor.resize());R.apply(this,arguments)};G.model.beginUpdate();-try{if(g){for(var T=this.ui.pages.slice(),c=this.ui.currentPage,f=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),k=0;k<f.length;k++){var B=mxUtils.indexOf(this.ui.pages,f[k]);0>B?this.ui.insertPage(f[k],Math.min(k,this.ui.pages.length)):this.ui.movePage(B,k)}for(k=0;k<T.length;k++)0>mxUtils.indexOf(f,T[k])&&this.ui.removePage(T[k]);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);G.checkDefaultParent()}finally{G.container.style.visibility="";G.model.endUpdate();G.cellRenderer.redraw=R;this.changeListenerEnabled=S;g||(v.history=p,v.indexOfNextAdd=A,v.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=G.mathEnabled?(this.ui.editor.updateGraphComponents(),G.refresh()):(F!=G.foldingEnabled?-G.view.revalidate():G.view.validate(),G.sizeDidChange());null!=this.sync&&this.isRealtime()&&!m&&(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,m,v,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",v,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!v&&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};+DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var u=this.ui.editor.undoManager,p=u.history.slice(),B=u.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=H.foldingEnabled,O=H.mathEnabled,R=H.cellRenderer.redraw;H.cellRenderer.redraw=function(C){C.view.graph.isEditing(C.cell)&&(C.view.graph.scrollCellToVisible(C.cell),C.view.graph.cellEditor.resize());R.apply(this,arguments)};H.model.beginUpdate();+try{if(g){for(var c=this.ui.pages.slice(),f=this.ui.currentPage,l=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),t=0;t<l.length;t++){var z=mxUtils.indexOf(this.ui.pages,l[t]);0>z?this.ui.insertPage(l[t],Math.min(t,this.ui.pages.length)):this.ui.movePage(z,t)}for(t=0;t<c.length;t++)0>mxUtils.indexOf(l,c[t])&&this.ui.removePage(c[t]);0<=mxUtils.indexOf(this.ui.pages,f)&&this.ui.selectPage(f,!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);H.checkDefaultParent()}finally{H.container.style.visibility="";H.model.endUpdate();H.cellRenderer.redraw=R;this.changeListenerEnabled=S;g||(u.history=p,u.indexOfNextAdd=B,u.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)O!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(G!=H.foldingEnabled?+H.view.revalidate():H.view.validate(),H.sizeDidChange());null!=this.sync&&this.isRealtime()&&!m&&(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,m,u,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",u,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!u&&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(B){if(null!=g)g(B);else throw B;}};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};DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return Editor.defaultCompressed};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,e,g){};DrawioFile.prototype.saveFile=function(b,e,g,m){};DrawioFile.prototype.getFileUrl=function(){return null};DrawioFile.prototype.getFolderUrl=function(b){return null};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,g){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,g){};-DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var e=this.ui.editor.graph,g=e.getSelectionCells(),m=e.getViewState(),v=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(v,+DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var e=this.ui.editor.graph,g=e.getSelectionCells(),m=e.getViewState(),u=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(u,m,g);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var e=0;null!=b&&e<b.length;e++){var g=b[e];null!=g.id&&0==g.id.indexOf("extFont_")&&g.parentNode.removeChild(g)}};DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();null!=b&&(this.ui.setFileData(b),this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages)));this.installListeners();this.isSyncSupported()&&this.startSync();EditorUi.debug("DrawioFile.open",[this])};DrawioFile.prototype.isPolling=function(){return!1};DrawioFile.prototype.getPollingInterval=function(){return 1E4};DrawioFile.prototype.isSyncSupported=function(){return!1};@@ -3132,35 +3131,35 @@ DrawioFile.prototype.showRefreshDialog=function(b,e,g){null==g&&(g=mxResources.gfunction(){null!=b&&b();this.ui.alert(mxResources.get("copyCreated"))}),e)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.reloadFile(mxUtils.bind(this,function(){this.ui.spinner.stop();null!=b&&b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};DrawioFile.prototype.showCopyDialog=function(b,e,g){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,e)}),null,mxResources.get("overwrite"),g,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};DrawioFile.prototype.showConflictDialog=function(b,e){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};-DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var g=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),m=mxResources.get("redirectToNewApp");null!=e&&(m+=" ("+e+")");e=mxUtils.bind(this,function(){var v=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==g?window.location.reload():window.location.href=-g});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()});null!=b?this.isModified()?this.ui.confirm(m,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(m,e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),+DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var g=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),m=mxResources.get("redirectToNewApp");null!=e&&(m+=" ("+e+")");e=mxUtils.bind(this,function(){var u=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==g?window.location.reload():window.location.href=+g});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()});null!=b?this.isModified()?this.ui.confirm(m,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(m,e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),e)}};DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified(),"remoteFileChanged",null==this.sync?"n/a":this.sync.remoteFileChanged),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+")":"")+"</div>"))))};-DrawioFile.prototype.handleConflictError=function(b,e){var g=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),m=mxUtils.bind(this,function(A){this.handleFileError(A,!0)}),v=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,g,m,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,g,m,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),m)});"none"==DrawioFile.SYNC?this.showCopyDialog(g,m,v):this.invalidChecksum&&e?this.showRefreshDialog(g,m,this.getErrorMessage(b)):e?this.showConflictDialog(v,p):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));+DrawioFile.prototype.handleConflictError=function(b,e){var g=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),m=mxUtils.bind(this,function(B){this.handleFileError(B,!0)}),u=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,g,m,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,g,m,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),m)});"none"==DrawioFile.SYNC?this.showCopyDialog(g,m,u):this.invalidChecksum&&e?this.showRefreshDialog(g,m,this.getErrorMessage(b)):e?this.showConflictDialog(u,p):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(g,m)}))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT?e=mxResources.get("timeout"):"0"==e&&(e=mxResources.get("noResponse"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};-DrawioFile.prototype.compressionChanged=function(b){var e=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=e)for(var g=0;g<e.length;g++){var m=e[g].node;if(null!=m&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=e[g].getId())){var v=m.getElementsByTagName("mxGraphModel");v=0<v.length?v[0]:null;var p=Graph.decompress(mxUtils.getNodeValue(m));b?0==p.length&&null!=v&&(EditorUi.removeChildNodes(m),mxUtils.setTextContent(m,Graph.compressNode(v)),EditorUi.debug("DrawioFile.compressionChanged",-[this],"Page "+g+" compressed")):0<p.length&&null==v&&(EditorUi.removeChildNodes(m),m.appendChild(mxUtils.parseXml(p).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+g+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};+DrawioFile.prototype.compressionChanged=function(b){var e=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=e)for(var g=0;g<e.length;g++){var m=e[g].node;if(null!=m&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=e[g].getId())){var u=m.getElementsByTagName("mxGraphModel");u=0<u.length?u[0]:null;var p=Graph.decompress(mxUtils.getNodeValue(m));b?0==p.length&&null!=u&&(EditorUi.removeChildNodes(m),mxUtils.setTextContent(m,Graph.compressNode(u)),EditorUi.debug("DrawioFile.compressionChanged",+[this],"Page "+g+" compressed")):0<p.length&&null==u&&(EditorUi.removeChildNodes(m),m.appendChild(mxUtils.parseXml(p).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+g+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosaveDelay",this.autosaveDelay,"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck();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,m,v,p,A){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;p=null!=p?p:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(p,e,g,m,v,A)}catch(F){this.invalidChecksum=-this.inConflictState=!0;this.descriptorChanged();null!=m&&m(F);try{var G=this.getCurrentUser(),S=null!=G?G.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,F)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(F){this.descriptorChanged(),null!=m&&m(F)}};-DrawioFile.prototype.autosave=function(b,e,g,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());var v=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var p=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==p&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var A=this.isAutosaveRevision();-A&&(this.lastAutosaveRevision=(new Date).getTime());this.save(A,mxUtils.bind(this,function(G){this.autosaveCompleted();null!=g&&g(G)}),mxUtils.bind(this,function(G){null!=m&&m(G)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=g&&g(null)}catch(G){null!=m&&m(G)}}),v);this.autosaveThread=p;EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"delay",b,"maxDelay",e,"actualDelay",v,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};+DrawioFile.prototype.fileSaved=function(b,e,g,m,u,p,B){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;p=null!=p?p:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(p,e,g,m,u,B)}catch(G){this.invalidChecksum=+this.inConflictState=!0;this.descriptorChanged();null!=m&&m(G);try{var H=this.getCurrentUser(),S=null!=H?H.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,G)}catch(O){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=m&&m(G)}};+DrawioFile.prototype.autosave=function(b,e,g,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());var u=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var p=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==p&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var B=this.isAutosaveRevision();+B&&(this.lastAutosaveRevision=(new Date).getTime());this.save(B,mxUtils.bind(this,function(H){this.autosaveCompleted();null!=g&&g(H)}),mxUtils.bind(this,function(H){null!=m&&m(H)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=g&&g(null)}catch(H){null!=m&&m(H)}}),u);this.autosaveThread=p;EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"delay",b,"maxDelay",e,"actualDelay",u,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(e){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var g=b.lastIndexOf(".");b=0<g?b.substring(g):"";g=e.lastIndexOf(".");return b===(0<g?e.substring(g):"")}return b==e};DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};-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,m,v,p,A){DrawioFile.call(this,b,e);this.title=g;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=v;this.desc=p;this.editable=A};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.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,g,m,v){this.saveAs(this.title,e,g,m,v)};LocalFile.prototype.saveAs=function(b,e,g,m,v){this.saveFile(b,!1,e,g,null,m,v)};+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,m,u,p,B){DrawioFile.call(this,b,e);this.title=g;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=u;this.desc=p;this.editable=B};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.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,g,m,u){this.saveAs(this.title,e,g,m,u)};LocalFile.prototype.saveAs=function(b,e,g,m,u){this.saveFile(b,!1,e,g,null,m,u)};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,m,v,p,A){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;v||this.updateFileData();var G=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),F=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),P=mxUtils.bind(this,function(R){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=-!0;var T=mxUtils.bind(this,function(f){this.savingFile=!1;null!=m&&m({error:f})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(f){this.fileHandle.getFile().then(mxUtils.bind(this,function(k){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[k],"conflict",this.desc.lastModified!=k.lastModified);A||this.desc.lastModified==k.lastModified?f.write(G?this.ui.base64ToBlob(R,"image/png"):R).then(mxUtils.bind(this,function(){f.close().then(mxUtils.bind(this,-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(B){try{var z=this.desc;this.savingFile=!1;this.desc=B;this.fileSaved(S,z,F,T);this.removeDraft()}catch(C){T(C)}}),T)}),T)}),T):(this.inConflictState=!0,T())}),mxUtils.bind(this,function(k){this.invalidFileHandle=!0;T(k)}))}),T)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(R,b,G?"image/png":"text/xml",G);else if(R.length<MAX_REQUEST_SIZE){var c=b.lastIndexOf(".");c=0<c?b.substring(c+1):"xml";-(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(R)+"&filename="+encodeURIComponent(b)+(G?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(R)}));F()}});G?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(R){P(R)}),m,this.ui.getCurrentFile()!=this?S:null,e.scale,e.border)):P(S)};+LocalFile.prototype.saveFile=function(b,e,g,m,u,p,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;u||this.updateFileData();var H=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),G=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),O=mxUtils.bind(this,function(R){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=+!0;var c=mxUtils.bind(this,function(l){this.savingFile=!1;null!=m&&m({error:l})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(l){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[t],"conflict",this.desc.lastModified!=t.lastModified);B||this.desc.lastModified==t.lastModified?l.write(H?this.ui.base64ToBlob(R,"image/png"):R).then(mxUtils.bind(this,function(){l.close().then(mxUtils.bind(this,+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(z){try{var C=this.desc;this.savingFile=!1;this.desc=z;this.fileSaved(S,C,G,c);this.removeDraft()}catch(F){c(F)}}),c)}),c)}),c):(this.inConflictState=!0,c())}),mxUtils.bind(this,function(t){this.invalidFileHandle=!0;c(t)}))}),c)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(R,b,H?"image/png":"text/xml",H);else if(R.length<MAX_REQUEST_SIZE){var f=b.lastIndexOf(".");f=0<f?b.substring(f+1):"xml";+(new mxXmlRequest(SAVE_URL,"format="+f+"&xml="+encodeURIComponent(R)+"&filename="+encodeURIComponent(b)+(H?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(R)}));G()}});H?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(R){O(R)}),m,this.ui.getCurrentFile()!=this?S:null,e.scale,e.border)):O(S)};LocalFile.prototype.rename=function(b,e,g){this.title=b;this.descriptorChanged();null!=e&&e()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";@@ -3208,132 +3207,132 @@ Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYEditor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableUncompressedLibraries=!1;Editor.enableCustomProperties=!0;-Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(l){Editor.enableServiceWorker=!1}Editor.enableWebFonts="1"!=+Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(k){Editor.enableServiceWorker=!1}Editor.enableWebFonts="1"!=urlParams["safe-style-src"]&&!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.gptModel=null!=urlParams["gpt-model"]?decodeURIComponent(urlParams["gpt-model"]):"gpt-3.5-turbo";Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme=-"auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(l){l.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(l,u){return"1"!=mxUtils.getValue(l.style,"sketch","0")}},-{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"comic","0")||"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,-"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,-isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"dashOffset",-dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?-"1":"0")&&0<l.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==-mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},-isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",-type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",+"auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(k){k.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(k,A){return"1"!=mxUtils.getValue(k.style,"sketch","0")}},+{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"comic","0")||"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,+"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,+isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"dashOffset",+dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?+"1":"0")&&0<k.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==+mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},+isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",+type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source 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:"targetPortConstraint",dispName:"Target 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:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(l){return"orthogonalEdgeStyle"==mxUtils.getValue(l.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,-isVisible:function(l){return"entityRelationEdgeStyle"==mxUtils.getValue(l.style,mxConstants.STYLE_EDGE,null)}},{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:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",-type:"color",defVal:null},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(l){return"1"==mxUtils.getValue(l.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(l){return"1"==mxUtils.getValue(l.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(l){return"1"==mxUtils.getValue(l.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",+{name:"targetPortConstraint",dispName:"Target 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:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(k){return"orthogonalEdgeStyle"==mxUtils.getValue(k.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,+isVisible:function(k){return"entityRelationEdgeStyle"==mxUtils.getValue(k.style,mxConstants.STYLE_EDGE,null)}},{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:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",+type:"color",defVal:null},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",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(l,u){u=u.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&u.isTableCell(l.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(l,u){u=u.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&u.isTableCell(l.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(l,u){l=u.editorUi.editor.graph.getCellStyle(1==l.vertices.length&&-0==l.edges.length?l.vertices[0]:null);return"1"==mxUtils.getValue(l,"resizeLastRow","0")},isVisible:function(l,u){u=u.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&u.isTable(l.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(l,u){l=u.editorUi.editor.graph.getCellStyle(1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null);return"1"==mxUtils.getValue(l,"resizeLast","0")},isVisible:function(l,u){u=u.editorUi.editor.graph;-return 1==l.vertices.length&&0==l.edges.length&&u.isTable(l.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:"int",min:1,defVal:1,isVisible:function(k,A){A=A.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&A.isTableCell(k.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(k,A){A=A.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&A.isTableCell(k.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(k,A){k=A.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,A){A=A.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&A.isTable(k.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(k,A){k=A.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,A){A=A.editorUi.editor.graph;+return 1==k.vertices.length&&0==k.edges.length&&A.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(l,u){return u.editorUi.editor.graph.isCellConnectable(0<l.vertices.length&&0==l.edges.length?l.vertices[0]:null)},isVisible:function(l,u){return 0<l.vertices.length&&0==l.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},+dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(k,A){return A.editorUi.editor.graph.isCellConnectable(0<k.vertices.length&&0==k.edges.length?k.vertices[0]:null)},isVisible:function(k,A){return 0<k.vertices.length&&0==k.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},-{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",getDefaultValue:function(l,u){l=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;u=u.editorUi.editor.graph;return null!=l&&u.isSwimlane(l)},isVisible:function(l,u){return 1==l.vertices.length&&-0==l.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(l,u){l=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;u=u.editorUi.editor.graph;return null!=l&&(u.isSwimlane(l)||0<u.model.getChildCount(l))},isVisible:function(l,u){return 1==l.vertices.length&&0==l.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(l,u){var H=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;u=u.editorUi.editor.graph;-return null!=H&&(u.isContainer(H)&&"0"!=l.style.collapsible||!u.isContainer(H)&&"1"==l.style.collapsible)},isVisible:function(l,u){return 1==l.vertices.length&&0==l.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(l,u){return 1==l.vertices.length&&0==l.edges.length&&!u.editorUi.editor.graph.isSwimlane(l.vertices[0])&&null==mxUtils.getValue(l.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",-type:"bool",defVal:!1,isVisible:function(l,u){u=u.editorUi.editor.graph.model;return 0<l.vertices.length?u.isVertex(u.getParent(l.vertices[0])):!1}},{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:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(l,u){l=-0<l.vertices.length?u.editorUi.editor.graph.getCellGeometry(l.vertices[0]):null;return null!=l&&!l.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(l,u){return 0<l.vertices.length&&u.editorUi.editor.graph.isAutoSizeCell(l.vertices[0])}},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",+{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",getDefaultValue:function(k,A){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;return null!=k&&A.isSwimlane(k)},isVisible:function(k,A){return 1==k.vertices.length&&+0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,A){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;return null!=k&&(A.isSwimlane(k)||0<A.model.getChildCount(k))},isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,A){var J=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;+return null!=J&&(A.isContainer(J)&&"0"!=k.style.collapsible||!A.isContainer(J)&&"1"==k.style.collapsible)},isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length&&!A.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",+type:"bool",defVal:!1,isVisible:function(k,A){A=A.editorUi.editor.graph.model;return 0<k.vertices.length?A.isVertex(A.getParent(k.vertices[0])):!1}},{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:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(k,A){k=+0<k.vertices.length?A.editorUi.editor.graph.getCellGeometry(k.vertices[0]):null;return null!=k&&!k.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(k,A){return 0<k.vertices.length&&A.editorUi.editor.graph.isAutoSizeCell(k.vertices[0])}},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",-type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(l,u){var H=mxUtils.getValue(l.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||u.editorUi.editor.graph.isSwimlane(l.vertices[0])||null==H||H==mxConstants.NONE||0==mxUtils.getValue(l.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(l.style,mxConstants.STYLE_OPACITY,100)||null!=l.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",-type:"bool",defVal:!1,isVisible:function(l,u){return 0<l.vertices.length&&u.editorUi.editor.graph.isContainer(l.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\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,,[email protected],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,[email protected],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,[email protected],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,[email protected],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(l){var u=rough.canvas({getContext:function(){return l}});u.draw=function(H){var U=H.sets||[];H=H.options||this.getDefaultOptions();for(var J=0;J<U.length;J++){var W=U[J];switch(W.type){case "path":null!=H.stroke&&this._drawToContext(l,W,H);break;case "fillPath":this._drawToContext(l,W,H);break;case "fillSketch":this.fillSketch(l,W,H)}}};u.fillSketch=function(H,U,J){var W=l.state.strokeColor,aa=l.state.strokeWidth,ba=l.state.strokeAlpha,ja=l.state.dashed,oa=J.fillWeight;-0>oa&&(oa=J.strokeWidth/2);l.setStrokeAlpha(l.state.fillAlpha);l.setStrokeColor(J.fill||"");l.setStrokeWidth(oa);l.setDashed(!1);this._drawToContext(H,U,J);l.setDashed(ja);l.setStrokeWidth(aa);l.setStrokeColor(W);l.setStrokeAlpha(ba)};u._drawToContext=function(H,U,J){H.begin();for(var W=0;W<U.ops.length;W++){var aa=U.ops[W],ba=aa.data;switch(aa.op){case "move":H.moveTo(ba[0],ba[1]);break;case "bcurveTo":H.curveTo(ba[0],ba[1],ba[2],ba[3],ba[4],ba[5]);break;case "lineTo":H.lineTo(ba[0],ba[1])}}H.end();-"fillPath"===U.type&&J.filled?H.fill():H.stroke()};return u};(function(){function l(W,aa,ba){this.canvas=W;this.rc=aa;this.shape=ba;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,l.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,l.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,l.prototype.rect);this.originalRoundrect=this.canvas.roundrect;-this.canvas.roundrect=mxUtils.bind(this,l.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,l.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,l.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,l.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,l.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=-mxUtils.bind(this,l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,l.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,l.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,-l.prototype.fillAndStroke);this.path=[];this.passThrough=!1}l.prototype.moveOp="M";l.prototype.lineOp="L";l.prototype.quadOp="Q";l.prototype.curveOp="C";l.prototype.closeOp="Z";l.prototype.getStyle=function(W,aa){var ba=1;if(null!=this.shape.state){var ja=this.shape.state.cell.id;if(null!=ja)for(var oa=0;oa<ja.length;oa++)ba=(ba<<5)-ba+ja.charCodeAt(oa)<<0}ba={strokeWidth:this.canvas.state.strokeWidth,seed:ba,preserveVertices:!0};ja=this.rc.getDefaultOptions();ba.stroke=W?this.canvas.state.strokeColor===-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;W=null;(ba.filled=aa)?(ba.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,W=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ba.fill="";ba.bowing=mxUtils.getValue(this.shape.style,"bowing",ja.bowing);ba.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ja.hachureAngle);ba.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ja.curveFitting);-ba.roughness=mxUtils.getValue(this.shape.style,"jiggle",ja.roughness);ba.simplification=mxUtils.getValue(this.shape.style,"simplification",ja.simplification);ba.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ja.disableMultiStroke);ba.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ja.disableMultiStrokeFill);aa=mxUtils.getValue(this.shape.style,"hachureGap",-1);ba.hachureGap="auto"==aa?-1:aa;ba.dashGap=mxUtils.getValue(this.shape.style,"dashGap",-aa);ba.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",aa);ba.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",aa);aa=mxUtils.getValue(this.shape.style,"fillWeight",-1);ba.fillWeight="auto"==aa?-1:aa;aa=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==aa&&(aa="auto");"auto"==aa&&(aa=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&aa.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&aa.push(mxUtils.hex2rgb(Editor.darkColor)),-aa=null!=ba.fill&&(null!=W||0<=mxUtils.indexOf(aa,mxUtils.hex2rgb(ba.fill)))?"solid":ja.fillStyle);ba.fillStyle=aa;return ba};l.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};l.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};l.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var W=2;W<arguments.length;W+=2)this.lastX=arguments[W-1],this.lastY=arguments[W],-this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};l.prototype.lineTo=function(W,aa){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,W,aa),this.lastX=W,this.lastY=aa)};l.prototype.moveTo=function(W,aa){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,W,aa),this.lastX=W,this.lastY=aa,this.firstX=W,this.firstY=aa)};l.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,-arguments):this.addOp(this.closeOp)};l.prototype.quadTo=function(W,aa,ba,ja){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,W,aa,ba,ja),this.lastX=ba,this.lastY=ja)};l.prototype.curveTo=function(W,aa,ba,ja,oa,qa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,W,aa,ba,ja,oa,qa),this.lastX=oa,this.lastY=qa)};l.prototype.arcTo=function(W,aa,ba,ja,oa,qa,ra){if(this.passThrough)this.originalArcTo.apply(this.canvas,-arguments);else{var ua=mxUtils.arcToCurves(this.lastX,this.lastY,W,aa,ba,ja,oa,qa,ra);if(null!=ua)for(var za=0;za<ua.length;za+=6)this.curveTo(ua[za],ua[za+1],ua[za+2],ua[za+3],ua[za+4],ua[za+5]);this.lastX=qa;this.lastY=ra}};l.prototype.rect=function(W,aa,ba,ja){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(W,aa,ba,ja,this.getStyle(!0,!0)))};l.prototype.ellipse=function(W,aa,ba,ja){this.passThrough?this.originalEllipse.apply(this.canvas,-arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(W+ba/2,aa+ja/2,ba,ja,this.getStyle(!0,!0)))};l.prototype.roundrect=function(W,aa,ba,ja,oa,qa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(W+oa,aa),this.lineTo(W+ba-oa,aa),this.quadTo(W+ba,aa,W+ba,aa+qa),this.lineTo(W+ba,aa+ja-qa),this.quadTo(W+ba,aa+ja,W+ba-oa,aa+ja),this.lineTo(W+oa,aa+ja),this.quadTo(W,aa+ja,W,aa+ja-qa),this.lineTo(W,aa+qa),this.quadTo(W,aa,W+oa,aa))};l.prototype.drawPath=-function(W){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),W)}catch(ba){}this.passThrough=!1}else if(null!=this.nextShape){for(var aa in W)this.nextShape.options[aa]=W[aa];W.stroke!=mxConstants.NONE&&null!=W.stroke||delete this.nextShape.options.stroke;W.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};l.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,-!1))};l.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};l.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};l.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;-this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(W){return new l(W,Editor.createRoughCanvas(W),this)};var u=mxShape.prototype.createHandJiggle;-mxShape.prototype.createHandJiggle=function(W){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?u.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(W):this.createRoughCanvas(W)};var H=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(W,aa,ba,ja,oa){null!=W.handJiggle&&W.handJiggle.passThrough||H.apply(this,arguments)};var U=mxShape.prototype.paint;mxShape.prototype.paint=-function(W){var aa=W.addTolerance,ba=!0;null!=this.style&&(ba="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=W.handJiggle&&W.handJiggle.constructor==l&&!this.outline){W.save();var ja=this.fill,oa=this.stroke;this.stroke=this.fill=null;var qa=this.configurePointerEvents,ra=W.setStrokeColor;W.setStrokeColor=function(){};var ua=W.setFillColor;W.setFillColor=function(){};ba||null==ja||(this.configurePointerEvents=function(){});W.handJiggle.passThrough=!0;U.apply(this,-arguments);W.handJiggle.passThrough=!1;W.setFillColor=ua;W.setStrokeColor=ra;this.configurePointerEvents=qa;this.stroke=oa;this.fill=ja;W.restore();ba&&null!=ja&&(W.addTolerance=function(){})}U.apply(this,arguments);W.addTolerance=aa};var J=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(W,aa,ba,ja,oa,qa){null!=W.handJiggle&&W.handJiggle.constructor==l?(W.handJiggle.passThrough=!0,J.apply(this,arguments),W.handJiggle.passThrough=!1):J.apply(this,arguments)}})();Editor.fastCompress=-function(l){return null==l||0==l.length||"undefined"===typeof pako?l:Graph.arrayBufferToString(pako.deflateRaw(l))};Editor.fastDecompress=function(l){return null==l||0==l.length||"undefined"===typeof pako?l:pako.inflateRaw(Graph.stringToArrayBuffer(atob(l)),{to:"string"})};Editor.extractGraphModel=function(l,u,H){if(null!=l&&"undefined"!==typeof pako){var U=l.ownerDocument.getElementsByTagName("div"),J=[];if(null!=U&&0<U.length)for(var W=0;W<U.length;W++)if("mxgraph"==U[W].getAttribute("class")){J.push(U[W]);-break}0<J.length&&(U=J[0].getAttribute("data-mxgraph"),null!=U?(J=JSON.parse(U),null!=J&&null!=J.xml&&(l=mxUtils.parseXml(J.xml),l=l.documentElement)):(J=J[0].getElementsByTagName("div"),0<J.length&&(U=mxUtils.getTextContent(J[0]),U=Graph.decompress(U,null,H),0<U.length&&(l=mxUtils.parseXml(U),l=l.documentElement))))}if(null!=l&&"svg"==l.nodeName)if(U=l.getAttribute("content"),null!=U&&"<"!=U.charAt(0)&&"%"!=U.charAt(0)&&(U=unescape(window.atob?atob(U):Base64.decode(cont,U))),null!=U&&"%"==U.charAt(0)&&-(U=decodeURIComponent(U)),null!=U&&0<U.length)l=mxUtils.parseXml(U).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==l||u||(J=null,"diagram"==l.nodeName?J=l:"mxfile"==l.nodeName&&(U=l.getElementsByTagName("diagram"),0<U.length&&(J=U[Math.max(0,Math.min(U.length-1,urlParams.page||0))])),null!=J&&(l=Editor.parseDiagramNode(J,H)));null==l||"mxGraphModel"==l.nodeName||u&&"mxfile"==l.nodeName||(l=null);return l};Editor.parseDiagramNode=function(l,u,H){Editor.validateDiagramNode(l);-var U=mxUtils.trim(mxUtils.getTextContent(l)),J=null;0<U.length?(u=Graph.decompress(U,null,u),null!=u&&0<u.length&&(J=mxUtils.parseXml(u).documentElement)):(l=mxUtils.getChildNodes(l),0<l.length&&(J=l[0],H&&(J=Editor.parseDiagramNode(J,u,!1)),u=mxUtils.createXmlDocument(),u.appendChild(u.importNode(J,!0)),J=u.documentElement));return J};Editor.getDiagramNodeXml=function(l){Editor.validateDiagramNode(l);var u=mxUtils.getNodeValue(l),H=null;0<u.length?H=Graph.decompress(u):(l=l.getElementsByTagName("mxGraphModel"),-null!=l&&0<l.length&&(H=mxUtils.getXml(l[0])));return H};Editor.validateDiagramNode=function(l){if(0==mxUtils.trim(mxUtils.getTextContent(l)).length&&0==mxUtils.getChildNodes(l).length){var u=new mxCodec,H=new mxGraphModel;l.appendChild(u.encode(H))}return l};Editor.extractGraphModelFromPdf=function(l){var u=null;l=l.substring(l.indexOf(",")+1);l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);if("%PDF-1.7"==l.substring(0,8)){var H=l.indexOf("EmbeddedFile");if(-1<H){var U=l.indexOf("stream",-H)+9;if(0<l.substring(H,U).indexOf("application#2Fvnd.jgraph.mxfile")){var J=l.indexOf("endstream",U-1);return pako.inflateRaw(Graph.stringToArrayBuffer(l.substring(U,J)),{to:"string"})}}for(H=l.indexOf("/ObjStm");0<H;){U=l.indexOf("stream",H)+9;J=l.indexOf("endstream",U-1);U=pako.inflateRaw(Graph.stringToArrayBuffer(l.substring(U,J)),{to:"string"});J=U.indexOf("/Subject <");if(0<J){H=U.substring(J+14,U.indexOf(">",J));if(null!=H){u=H;H=[];for(U=0;U<u.length;U+=2)J=u.substr(U,2),"00"!=J&&H.push(String.fromCharCode(parseInt(J,-16)));u=H.join("")}break}H=l.indexOf("/ObjStm",H+1)}}if(null==u&&"%PDF-1.4"==l.substring(0,8)){H="";J=U=0;for(var W=[],aa=null;J<l.length;){var ba=l.charCodeAt(J);J+=1;10!=ba&&(H+=String.fromCharCode(ba));ba=="/Subject (%3Cmxfile".charCodeAt(U)?U++:U=0;if(19==U){var ja=l.indexOf("%3C%2Fmxfile%3E",J)+15;J-=9;if(ja>J){u=l.substring(J,ja);break}}10==ba&&("endobj"==H?aa=null:"obj"==H.substring(H.length-3,H.length)||"xref"==H||"trailer"==H?(aa=[],W[H.split(" ")[0]]=aa):null!=aa&&aa.push(H),H="")}}null==-u&&null!=W&&(u=Editor.extractGraphModelFromXref(W));null!=u&&(u=decodeURIComponent(u.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return u};Editor.extractGraphModelFromXref=function(l){var u=l.trailer,H=null;null!=u&&(u=/.* \/Info (\d+) (\d+) R/g.exec(u.join("\n")),null!=u&&0<u.length&&(u=l[u[1]],null!=u&&(u=/.* \/Subject (\d+) (\d+) R/g.exec(u.join("\n")),null!=u&&0<u.length&&(l=l[u[1]],null!=l&&(l=l.join("\n"),H=l.substring(1,l.length-1))))));return H};Editor.extractParserError=function(l,u){var H=-null;l=null!=l?l.getElementsByTagName("parsererror"):null;null!=l&&0<l.length&&(H=u||mxResources.get("invalidChars"),u=l[0].getElementsByTagName("div"),0<u.length&&(H=mxUtils.getTextContent(u[0])));return null!=H?mxUtils.trim(H):H};Editor.addRetryToError=function(l,u){null!=l&&(l=null!=l.error?l.error:l,null==l.retry&&(l.retry=u))};Editor.mermaidToDrawio=function(l,u,H){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(l,u,H)};Editor.configure=function(l){if(null!=l){Editor.config=-l;Editor.configVersion=l.version;l.debug&&(urlParams.test="1");null!=l.defaultFonts&&(Menus.prototype.defaultFonts=l.defaultFonts);null!=l.presetColors&&(ColorDialog.prototype.presetColors=l.presetColors);null!=l.defaultColors&&(ColorDialog.prototype.defaultColors=l.defaultColors);null!=l.colorNames&&(ColorDialog.prototype.colorNames=l.colorNames);null!=l.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=l.defaultColorSchemes);null!=l.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=-l.defaultEdgeLength);null!=l.selectParentLayer&&(Graph.selectParentLayer=l.selectParentLayer);null!=l.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=l.autosaveDelay);null!=l.templateFile&&(EditorUi.templateFile=l.templateFile);null!=l.styles&&(Array.isArray(l.styles)?Editor.styles=l.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=l.globalVars&&(Editor.globalVars=l.globalVars);null!=l.compressXml&&(Editor.defaultCompressed=l.compressXml,Editor.compressXml=l.compressXml);-null!=l.includeDiagram&&(Editor.defaultIncludeDiagram=l.includeDiagram);null!=l.simpleLabels&&(Editor.simpleLabels=l.simpleLabels);null!=l.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=l.oneDriveInlinePicker);null!=l.defaultAdaptiveColors?Graph.defaultAdaptiveColors=l.defaultAdaptiveColors:0==l.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=l.darkColor&&(Editor.darkColor=l.darkColor);null!=l.darkColorVar&&(Editor.darkColorVar=l.darkColorVar);Graph.prototype.defaultPageBackgroundColor=-"1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=l.settingsName&&(Editor.configurationKey="."+l.settingsName+"-configuration",Editor.settingsKey="."+l.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=l.customFonts&&(Menus.prototype.defaultFonts=l.customFonts.concat(Menus.prototype.defaultFonts));-null!=l.customPresetColors&&(ColorDialog.prototype.presetColors=l.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=l.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=l.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=l.css){var u=document.createElement("style");u.setAttribute("type","text/css");u.appendChild(document.createTextNode(l.css));var H=document.getElementsByTagName("script")[0];H.parentNode.insertBefore(u,H)}null!=-l.expandLibraries&&(Sidebar.prototype.expandLibraries=l.expandLibraries);null!=l.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=l.appendCustomLibraries);null!=l.libraries&&(Sidebar.prototype.customEntries=l.libraries);null!=l.enabledLibraries&&(Array.isArray(l.enabledLibraries)?Sidebar.prototype.enabledLibraries=l.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=l.defaultLibraries&&(Sidebar.prototype.defaultEntries=l.defaultLibraries);-null!=l.defaultCustomLibraries&&(Editor.defaultCustomLibraries=l.defaultCustomLibraries);null!=l.enableCustomLibraries&&(Editor.enableCustomLibraries=l.enableCustomLibraries);null!=l.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=l.defaultVertexStyle);null!=l.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=l.defaultEdgeStyle);null!=l.defaultPageVisible&&(Graph.prototype.defaultPageVisible=l.defaultPageVisible);null!=l.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=l.defaultGridEnabled);-null!=l.zoomWheel&&(Graph.zoomWheel=l.zoomWheel);null!=l.zoomFactor&&(u=parseFloat(l.zoomFactor),!isNaN(u)&&1<u?Graph.prototype.zoomFactor=u:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=l.defaultGridSize&&(u=parseInt(l.defaultGridSize),!isNaN(u)&&0<u?mxGraph.prototype.gridSize=u:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=l.gridSteps&&(u=parseInt(l.gridSteps),!isNaN(u)&&0<u?mxGraphView.prototype.gridSteps=u:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));-null!=l.pageFormat&&(u=parseInt(l.pageFormat.width),H=parseInt(l.pageFormat.height),!isNaN(u)&&0<u&&!isNaN(H)&&0<H?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,u,H),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=l.thumbWidth&&(Sidebar.prototype.thumbWidth=l.thumbWidth);null!=l.thumbHeight&&(Sidebar.prototype.thumbHeight=l.thumbHeight);null!=l.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=-l.emptyLibraryXml);null!=l.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=l.emptyDiagramXml);null!=l.sidebarWidth&&(EditorUi.prototype.hsplitPosition=l.sidebarWidth);null!=l.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=l.updateDefaultStyle);null!=l.sidebarTitles&&(Sidebar.prototype.sidebarTitles=l.sidebarTitles);null!=l.sidebarTitleSize&&(u=parseInt(l.sidebarTitleSize),!isNaN(u)&&0<u?Sidebar.prototype.sidebarTitleSize=u:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));-null!=l.fontCss&&("string"===typeof l.fontCss?Editor.configureFontCss(l.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=l.autosaveDelay&&(u=parseInt(l.autosaveDelay),!isNaN(u)&&0<u?DrawioFile.prototype.autosaveDelay=u:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=l.maxImageBytes&&(EditorUi.prototype.maxImageBytes=l.maxImageBytes);null!=l.maxImageSize&&(EditorUi.prototype.maxImageSize=l.maxImageSize);null!=l.shareCursorPosition&&-(EditorUi.prototype.shareCursorPosition=l.shareCursorPosition);null!=l.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=l.showRemoteCursors);null!=l.restrictExport&&(DrawioFile.RESTRICT_EXPORT=l.restrictExport);null!=l.replaceSvgDataUris&&(Editor.replaceSvgDataUris=l.replaceSvgDataUris);null!=l.foreignObjectImages&&(Editor.foreignObjectImages=l.foreignObjectImages);null!=l.shadowColor&&(mxConstants.SHADOW_COLOR=l.shadowColor);null!=l.shadowOpacity&&(mxConstants.SHADOW_OPACITY=l.shadowOpacity);-null!=l.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=l.shadowOffsetX);null!=l.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=l.shadowOffsetY);null!=l.shadowBlur&&(mxConstants.SHADOW_BLUR=l.shadowBlur);null!=l.enableAnimations&&(Editor.enableAnimations=l.enableAnimations);null!=l.enableChatGpt&&(Editor.enableChatGpt=l.enableChatGpt);null!=l.gptApiKey&&(Editor.gptApiKey=l.gptApiKey);null!=l.gptModel&&(Editor.gptModel=l.gptModel);null!=l.gptUrl&&(Editor.gptUrl=l.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==-typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(l){if(null!=l){Editor.prototype.fontCss=l;var u=document.getElementsByTagName("script")[0];if(null!=u&&null!=u.parentNode){var H=document.createElement("style");H.setAttribute("type","text/css");H.appendChild(document.createTextNode(l));u.parentNode.insertBefore(H,u);l=l.split("url(");for(H=1;H<l.length;H++){var U=l[H].indexOf(")");U=Editor.trimCssUrl(l[H].substring(0,U));var J=document.createElement("link");-J.setAttribute("rel","preload");J.setAttribute("href",U);J.setAttribute("as","font");J.setAttribute("crossorigin","");u.parentNode.insertBefore(J,u)}}}};Editor.trimCssUrl=function(l){return l.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=-20;Editor.guid=function(l){l=null!=l?l:Editor.GUID_LENGTH;for(var u=[],H=0;H<l;H++)u.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return u.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},+type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,A){var J=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||A.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==J||J==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",+type:"bool",defVal:!1,isVisible:function(k,A){return 0<k.vertices.length&&A.editorUi.editor.graph.isContainer(k.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\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,,[email protected],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,[email protected],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,[email protected],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,[email protected],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 A=rough.canvas({getContext:function(){return k}});A.draw=function(J){var U=J.sets||[];J=J.options||this.getDefaultOptions();for(var P=0;P<U.length;P++){var T=U[P];switch(T.type){case "path":null!=J.stroke&&this._drawToContext(k,T,J);break;case "fillPath":this._drawToContext(k,T,J);break;case "fillSketch":this.fillSketch(k,T,J)}}};A.fillSketch=function(J,U,P){var T=k.state.strokeColor,W=k.state.strokeWidth,aa=k.state.strokeAlpha,ja=k.state.dashed,pa=P.fillWeight;+0>pa&&(pa=P.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(P.fill||"");k.setStrokeWidth(pa);k.setDashed(!1);this._drawToContext(J,U,P);k.setDashed(ja);k.setStrokeWidth(W);k.setStrokeColor(T);k.setStrokeAlpha(aa)};A._drawToContext=function(J,U,P){J.begin();for(var T=0;T<U.ops.length;T++){var W=U.ops[T],aa=W.data;switch(W.op){case "move":J.moveTo(aa[0],aa[1]);break;case "bcurveTo":J.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":J.lineTo(aa[0],aa[1])}}J.end();+"fillPath"===U.type&&P.filled?J.fill():J.stroke()};return A};(function(){function k(T,W,aa){this.canvas=T;this.rc=W;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;+this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=+mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,+k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(T,W){var aa=1;if(null!=this.shape.state){var ja=this.shape.state.cell.id;if(null!=ja)for(var pa=0;pa<ja.length;pa++)aa=(aa<<5)-aa+ja.charCodeAt(pa)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};ja=this.rc.getDefaultOptions();aa.stroke=T?this.canvas.state.strokeColor===+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;T=null;(aa.filled=W)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,T=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",ja.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ja.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ja.curveFitting);+aa.roughness=mxUtils.getValue(this.shape.style,"jiggle",ja.roughness);aa.simplification=mxUtils.getValue(this.shape.style,"simplification",ja.simplification);aa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ja.disableMultiStroke);aa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ja.disableMultiStrokeFill);W=mxUtils.getValue(this.shape.style,"hachureGap",-1);aa.hachureGap="auto"==W?-1:W;aa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",+W);aa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",W);aa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",W);W=mxUtils.getValue(this.shape.style,"fillWeight",-1);aa.fillWeight="auto"==W?-1:W;W=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==W&&(W="auto");"auto"==W&&(W=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&W.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&W.push(mxUtils.hex2rgb(Editor.darkColor)),W=+null!=aa.fill&&(null!=T||0<=mxUtils.indexOf(W,mxUtils.hex2rgb(aa.fill)))?"solid":ja.fillStyle);aa.fillStyle=W;return aa};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var T=2;T<arguments.length;T+=2)this.lastX=arguments[T-1],this.lastY=arguments[T],+this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(T,W){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,T,W),this.lastX=T,this.lastY=W)};k.prototype.moveTo=function(T,W){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,T,W),this.lastX=T,this.lastY=W,this.firstX=T,this.firstY=W)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,+arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(T,W,aa,ja){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,T,W,aa,ja),this.lastX=aa,this.lastY=ja)};k.prototype.curveTo=function(T,W,aa,ja,pa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,T,W,aa,ja,pa,sa),this.lastX=pa,this.lastY=sa)};k.prototype.arcTo=function(T,W,aa,ja,pa,sa,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);+else{var wa=mxUtils.arcToCurves(this.lastX,this.lastY,T,W,aa,ja,pa,sa,qa);if(null!=wa)for(var Ba=0;Ba<wa.length;Ba+=6)this.curveTo(wa[Ba],wa[Ba+1],wa[Ba+2],wa[Ba+3],wa[Ba+4],wa[Ba+5]);this.lastX=sa;this.lastY=qa}};k.prototype.rect=function(T,W,aa,ja){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(T,W,aa,ja,this.getStyle(!0,!0)))};k.prototype.ellipse=function(T,W,aa,ja){this.passThrough?this.originalEllipse.apply(this.canvas,+arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(T+aa/2,W+ja/2,aa,ja,this.getStyle(!0,!0)))};k.prototype.roundrect=function(T,W,aa,ja,pa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(T+pa,W),this.lineTo(T+aa-pa,W),this.quadTo(T+aa,W,T+aa,W+sa),this.lineTo(T+aa,W+ja-sa),this.quadTo(T+aa,W+ja,T+aa-pa,W+ja),this.lineTo(T+pa,W+ja),this.quadTo(T,W+ja,T,W+ja-sa),this.lineTo(T,W+sa),this.quadTo(T,W,T+pa,W))};k.prototype.drawPath=function(T){if(0<+this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),T)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var W in T)this.nextShape.options[W]=T[W];T.stroke!=mxConstants.NONE&&null!=T.stroke||delete this.nextShape.options.stroke;T.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,+!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;+this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(T){return new k(T,Editor.createRoughCanvas(T),this)};var A=mxShape.prototype.createHandJiggle;+mxShape.prototype.createHandJiggle=function(T){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(T):this.createRoughCanvas(T)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(T,W,aa,ja,pa){null!=T.handJiggle&&T.handJiggle.passThrough||J.apply(this,arguments)};var U=mxShape.prototype.paint;mxShape.prototype.paint=+function(T){var W=T.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=T.handJiggle&&T.handJiggle.constructor==k&&!this.outline){T.save();var ja=this.fill,pa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,qa=T.setStrokeColor;T.setStrokeColor=function(){};var wa=T.setFillColor;T.setFillColor=function(){};aa||null==ja||(this.configurePointerEvents=function(){});T.handJiggle.passThrough=!0;U.apply(this,+arguments);T.handJiggle.passThrough=!1;T.setFillColor=wa;T.setStrokeColor=qa;this.configurePointerEvents=sa;this.stroke=pa;this.fill=ja;T.restore();aa&&null!=ja&&(T.addTolerance=function(){})}U.apply(this,arguments);T.addTolerance=W};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(T,W,aa,ja,pa,sa){null!=T.handJiggle&&T.handJiggle.constructor==k?(T.handJiggle.passThrough=!0,P.apply(this,arguments),T.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=+function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,A,J){if(null!=k&&"undefined"!==typeof pako){var U=k.ownerDocument.getElementsByTagName("div"),P=[];if(null!=U&&0<U.length)for(var T=0;T<U.length;T++)if("mxgraph"==U[T].getAttribute("class")){P.push(U[T]);+break}0<P.length&&(U=P[0].getAttribute("data-mxgraph"),null!=U?(P=JSON.parse(U),null!=P&&null!=P.xml&&(k=mxUtils.parseXml(P.xml),k=k.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(U=mxUtils.getTextContent(P[0]),U=Graph.decompress(U,null,J),0<U.length&&(k=mxUtils.parseXml(U),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(U=k.getAttribute("content"),null!=U&&"<"!=U.charAt(0)&&"%"!=U.charAt(0)&&(U=unescape(window.atob?atob(U):Base64.decode(cont,U))),null!=U&&"%"==U.charAt(0)&&+(U=decodeURIComponent(U)),null!=U&&0<U.length)k=mxUtils.parseXml(U).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||A||(P=null,"diagram"==k.nodeName?P=k:"mxfile"==k.nodeName&&(U=k.getElementsByTagName("diagram"),0<U.length&&(P=U[Math.max(0,Math.min(U.length-1,urlParams.page||0))])),null!=P&&(k=Editor.parseDiagramNode(P,J)));null==k||"mxGraphModel"==k.nodeName||A&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,A,J){Editor.validateDiagramNode(k);+var U=mxUtils.trim(mxUtils.getTextContent(k)),P=null;0<U.length?(A=Graph.decompress(U,null,A),null!=A&&0<A.length&&(P=mxUtils.parseXml(A).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(P=k[0],J&&(P=Editor.parseDiagramNode(P,A,!1)),A=mxUtils.createXmlDocument(),A.appendChild(A.importNode(P,!0)),P=A.documentElement));return P};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var A=mxUtils.getNodeValue(k),J=null;0<A.length?J=Graph.decompress(A):(k=k.getElementsByTagName("mxGraphModel"),+null!=k&&0<k.length&&(J=mxUtils.getXml(k[0])));return J};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var A=new mxCodec,J=new mxGraphModel;k.appendChild(A.encode(J))}return k};Editor.extractGraphModelFromPdf=function(k){var A=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var J=k.indexOf("EmbeddedFile");if(-1<J){var U=k.indexOf("stream",+J)+9;if(0<k.substring(J,U).indexOf("application#2Fvnd.jgraph.mxfile")){var P=k.indexOf("endstream",U-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,P)),{to:"string"})}}for(J=k.indexOf("/ObjStm");0<J;){U=k.indexOf("stream",J)+9;P=k.indexOf("endstream",U-1);U=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,P)),{to:"string"});P=U.indexOf("/Subject <");if(0<P){J=U.substring(P+14,U.indexOf(">",P));if(null!=J){A=J;J=[];for(U=0;U<A.length;U+=2)P=A.substr(U,2),"00"!=P&&J.push(String.fromCharCode(parseInt(P,+16)));A=J.join("")}break}J=k.indexOf("/ObjStm",J+1)}}if(null==A&&"%PDF-1.4"==k.substring(0,8)){J="";P=U=0;for(var T=[],W=null;P<k.length;){var aa=k.charCodeAt(P);P+=1;10!=aa&&(J+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(U)?U++:U=0;if(19==U){var ja=k.indexOf("%3C%2Fmxfile%3E",P)+15;P-=9;if(ja>P){A=k.substring(P,ja);break}}10==aa&&("endobj"==J?W=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(W=[],T[J.split(" ")[0]]=W):null!=W&&W.push(J),J="")}}null==A&&null!=+T&&(A=Editor.extractGraphModelFromXref(T));null!=A&&(A=decodeURIComponent(A.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return A};Editor.extractGraphModelFromXref=function(k){var A=k.trailer,J=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=k[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(k=k[A[1]],null!=k&&(k=k.join("\n"),J=k.substring(1,k.length-1))))));return J};Editor.extractParserError=function(k,A){var J=null;k=+null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(J=A||mxResources.get("invalidChars"),A=k[0].getElementsByTagName("div"),0<A.length&&(J=mxUtils.getTextContent(A[0])));return null!=J?mxUtils.trim(J):J};Editor.addRetryToError=function(k,A){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=A))};Editor.mermaidToDrawio=function(k,A,J){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,A,J)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=+k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);+null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&+(Editor.defaultIncludeDiagram=k.includeDiagram);null!=k.simpleLabels&&(Editor.simpleLabels=k.simpleLabels);null!=k.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=k.oneDriveInlinePicker);null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.darkColor&&(Editor.darkColor=k.darkColor);null!=k.darkColorVar&&(Editor.darkColorVar=k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?+"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));+null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){var A=document.createElement("style");A.setAttribute("type","text/css");A.appendChild(document.createTextNode(k.css));var J=document.getElementsByTagName("script")[0];J.parentNode.insertBefore(A,J)}null!=+k.expandLibraries&&(Sidebar.prototype.expandLibraries=k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);+null!=k.defaultCustomLibraries&&(Editor.defaultCustomLibraries=k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);+null!=k.zoomWheel&&(Graph.zoomWheel=k.zoomWheel);null!=k.zoomFactor&&(A=parseFloat(k.zoomFactor),!isNaN(A)&&1<A?Graph.prototype.zoomFactor=A:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&(A=parseInt(k.defaultGridSize),!isNaN(A)&&0<A?mxGraph.prototype.gridSize=A:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(A=parseInt(k.gridSteps),!isNaN(A)&&0<A?mxGraphView.prototype.gridSteps=A:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));+null!=k.pageFormat&&(A=parseInt(k.pageFormat.width),J=parseInt(k.pageFormat.height),!isNaN(A)&&0<A&&!isNaN(J)&&0<J?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,A,J),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=+k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&(A=parseInt(k.sidebarTitleSize),!isNaN(A)&&0<A?Sidebar.prototype.sidebarTitleSize=A:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));+null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(A=parseInt(k.autosaveDelay),!isNaN(A)&&0<A?DrawioFile.prototype.autosaveDelay=A:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&+(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);+null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==+typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var A=document.getElementsByTagName("script")[0];if(null!=A&&null!=A.parentNode){var J=document.createElement("style");J.setAttribute("type","text/css");J.appendChild(document.createTextNode(k));A.parentNode.insertBefore(J,A);k=k.split("url(");for(J=1;J<k.length;J++){var U=k[J].indexOf(")");U=Editor.trimCssUrl(k[J].substring(0,U));var P=document.createElement("link");+P.setAttribute("rel","preload");P.setAttribute("href",U);P.setAttribute("as","font");P.setAttribute("crossorigin","");A.parentNode.insertBefore(P,A)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=+20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var A=[],J=0;J<k;J++)A.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return A.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;-Editor.prototype.setGraphXml=function(l){l=null!=l&&"mxlibrary"!=l.nodeName?this.extractGraphModel(l):null;if(null!=l){var u=Editor.extractParserError(l,mxResources.get("invalidOrMissingFile"));if(u)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[l],"cause",[u]),Error(mxResources.get("notADiagramFile")+" ("+u+")");if("mxGraphModel"==l.nodeName){u=l.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=u&&""!=u)u!=this.graph.currentStyle&&(H=null!=this.graph.themes?-this.graph.themes[u]:mxUtils.load(STYLE_PATH+"/"+u+".xml").getDocumentElement(),null!=H&&(U=new mxCodec(H.ownerDocument),U.decode(H,this.graph.getStylesheet())));else{var H=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=H){var U=new mxCodec(H.ownerDocument);U.decode(H,this.graph.getStylesheet())}}this.graph.currentStyle=u;this.graph.mathEnabled="1"==urlParams.math||"1"==l.getAttribute("math");this.graph.setAdaptiveColors(l.getAttribute("adaptiveColors"));-u=l.getAttribute("backgroundImage");null!=u?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(u)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==l.getAttribute("shadow"),!1);if(u=l.getAttribute("extFonts"))try{for(u=u.split("|").map(function(J){J=J.split("^");return{name:J[0],url:J[1]}}),H=0;H<u.length;H++)this.graph.addExtFont(u[H].name,-u[H].url)}catch(J){console.log("ExtFonts format error: "+J.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(l,u){l=null!=l?l:!0;var H=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&H.setAttribute("style",-this.graph.currentStyle);var U=this.graph.getBackgroundImageObject(this.graph.backgroundImage,u);null!=U&&H.setAttribute("backgroundImage",JSON.stringify(U));H.setAttribute("math",this.graph.mathEnabled?"1":"0");H.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?H.setAttribute("adaptiveColors",this.graph.adaptiveColors):H.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(U=this.graph.extFonts.map(function(J){return J.name+-"^"+J.url}),H.setAttribute("extFonts",U.join("|")));return H};Editor.prototype.isDataSvg=function(l){try{var u=mxUtils.parseXml(l).documentElement.getAttribute("content");if(null!=u&&(null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(cont,u))),null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u)),null!=u&&0<u.length)){var H=mxUtils.parseXml(u).documentElement;return"mxfile"==H.nodeName||"mxGraphModel"==H.nodeName}}catch(U){}return!1};Editor.prototype.extractGraphModel=-function(l,u,H){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=-function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(l,u){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var H=function(){U=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};l=null!=l?l:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var U=null;Editor.doMathJaxRender=-function(aa){try{null==U?(MathJax.typesetClear([aa]),MathJax.typeset([aa]),H()):U!=aa&&Editor.mathJaxQueue.push(aa)}catch(ba){MathJax.typesetClear([aa]),null!=ba.retry?(U=aa,ba.retry.then(function(){MathJax.typesetPromise([aa]).then(H)["catch"](function(ja){console.log("Error in MathJax.typesetPromise: "+ja.toString());H()})})["catch"](function(ja){console.log("Error in MathJax.retry: "+ja.toString());H()})):null!=window.console&&console.log("Error in MathJax.typeset: "+ba.toString())}};window.MathJax=-null!=u?u:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var aa=0;aa<Editor.mathJaxQueue.length;aa++)Editor.doMathJaxRender(Editor.mathJaxQueue[aa])}}};Editor.MathJaxRender=function(aa){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(aa):Editor.mathJaxQueue.push(aa)};Editor.onMathJaxDone=-function(){};var J=Editor.prototype.init;Editor.prototype.init=function(){J.apply(this,arguments);var aa=mxUtils.bind(this,function(ba,ja){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,aa);this.graph.addListener(mxEvent.REFRESH,aa)};u=document.getElementsByTagName("script");if(null!=u&&0<u.length){var W=document.createElement("script");W.setAttribute("type","text/javascript");W.setAttribute("src",l);u[0].parentNode.appendChild(W)}}};-Editor.prototype.csvToArray=function(l){if(0<l.length){var u="",H=[""],U=0,J=!0,W;l=$jscomp.makeIterator(l);for(W=l.next();!W.done;W=l.next())W=W.value,'"'===W?(J&&W===u&&(H[U]+=W),J=!J):","===W&&J?W=H[++U]="":H[U]+=W,u=W;return H}return[]};Editor.prototype.getProxiedUrl=function(l){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(l)){var u=EditorUi.isVisioFilename(l);u=/\.png$/i.test(l)||/\.pdf$/i.test(l)||u;var H=-"t="+(new Date).getTime();l=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+H+(u?"&base64=1":"")}return l};Editor.prototype.isCorsEnabledForUrl=function(l){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||l.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(l)||"https://raw.githubusercontent.com/"===l.substring(0,34)||-"https://fonts.googleapis.com/"===l.substring(0,29)||"https://fonts.gstatic.com/"===l.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var l=new mxUrlConverter;l.updateBaseUrl();var u=l.convert,H=this;l.convert=function(U){null!=U&&navigator.onLine&&("http://"!=U.substring(0,7)&&"https://"!=U.substring(0,8)||U.substring(0,l.baseUrl.length)==l.baseUrl||H.crossOriginImages&&H.isCorsEnabledForUrl(U)?"chrome-extension://"!=U.substring(0,19)&&(U=u.apply(this,arguments)):U=PROXY_URL+-"?url="+encodeURIComponent(U));return U};return l};Editor.createSvgDataUri=function(l){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(l)))};Editor.prototype.convertImageToDataUri=function(l,u,H,U,J){try{var W=!0,aa=window.setTimeout(mxUtils.bind(this,function(){W=!1;u(l)}),this.timeout),ba=mxUtils.bind(this,function(){null!=U?this.convertImageToDataUri(l,u,H,U,!0):u(l)});if(/(\.svg)$/i.test(l)&&!J)mxUtils.get(l,mxUtils.bind(this,function(oa){window.clearTimeout(aa);W&&(200>oa.getStatus()||-299<oa.getStatus()?ba():u(Editor.createSvgDataUri(oa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(aa);W&&ba()}));else{var ja=new Image;this.crossOriginImages&&(ja.crossOrigin="anonymous");ja.onload=function(){window.clearTimeout(aa);if(W)try{U=null!=U&&J?U:1;var oa=document.createElement("canvas"),qa=oa.getContext("2d");qa.scale(U,U);oa.height=ja.height*U;oa.width=ja.width*U;qa.drawImage(ja,0,0);u(oa.toDataURL())}catch(ra){u(l)}};ja.onerror=function(){window.clearTimeout(aa);W&&-(null!=H?H():u(l))};ja.src=l}}catch(oa){null!=H?H():u(l)}};Editor.prototype.convertImages=function(l,u,H,U){function J(){0<W.length?W.shift()():u(l)}null==U&&(U=this.createImageUrlConverter());var W=[],aa=H||{};H=mxUtils.bind(this,function(ba,ja){ba=l.getElementsByTagName(ba);for(var oa=0;oa<ba.length;oa++)mxUtils.bind(this,function(qa){W.push(mxUtils.bind(this,function(){try{if(null!=qa){var ra=U.convert(qa.getAttribute(ja));if(null!=ra&&"data:"!=ra.substring(0,5)){var ua=aa[ra];null==ua?this.convertImageToDataUri(ra,-function(za){null!=za&&(aa[ra]=za,qa.setAttribute(ja,za));J()},null,Editor.svgRasterScale):(qa.setAttribute(ja,ua),J())}else null!=ra&&qa.setAttribute(ja,ra),J()}}catch(za){J()}}))})(ba[oa])});H("image","xlink:href");H("img","src");J()};Editor.base64Encode=function(l){for(var u="",H=0,U=l.length,J,W,aa;H<U;){J=l.charCodeAt(H++)&255;if(H==U){u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(J>>2);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((J&-3)<<4);u+="==";break}W=l.charCodeAt(H++);if(H==U){u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(J>>2);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((J&3)<<4|(W&240)>>4);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((W&15)<<2);u+="=";break}aa=l.charCodeAt(H++);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(J>>2);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((J&-3)<<4|(W&240)>>4);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((W&15)<<2|(aa&192)>>6);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(aa&63)}return u};Editor.prototype.loadUrl=function(l,u,H,U,J,W,aa,ba){try{var ja=!aa&&(U||/(\.png)($|\?)/i.test(l)||/(\.jpe?g)($|\?)/i.test(l)||/(\.gif)($|\?)/i.test(l)||/(\.pdf)($|\?)/i.test(l));J=null!=J?J:!0;var oa=mxUtils.bind(this,function(){mxUtils.get(l,mxUtils.bind(this,function(qa){if(200<=qa.getStatus()&&-299>=qa.getStatus()){if(null!=u){var ra=qa.getText();if(ja){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){qa=mxUtilsBinaryToArray(qa.request.responseBody).toArray();ra=Array(qa.length);for(var ua=0;ua<qa.length;ua++)ra[ua]=String.fromCharCode(qa[ua]);ra=ra.join("")}W=null!=W?W:"data:image/png;base64,";ra=W+Editor.base64Encode(ra)}u(ra)}}else null!=H&&(0==qa.getStatus()?H({message:mxResources.get("accessDenied")},qa):404==qa.getStatus()?-H({message:mxResources.get("fileNotFound"),code:qa.getStatus()},qa):H({message:this.getErrorMessage(qa)},qa))}),function(qa){null!=H&&H({message:mxResources.get("error")+" "+qa.getStatus()})},ja,this.timeout,function(){J&&null!=H&&H({code:App.ERROR_TIMEOUT,retry:oa})},ba)});oa()}catch(qa){null!=H&&H(qa)}};Editor.prototype.getErrorMessage=function(l){var u=mxResources.get("error")+" "+l.getStatus();try{var H=l.getText(),U=JSON.parse(H);null!=U&&null!=U.error&&null!=U.error.message&&(u=U.error.message+-" ("+u+")")}catch(J){}return u};Editor.prototype.absoluteCssFonts=function(l){var u=null;if(null!=l){var H=l.split("url(");if(0<H.length){u=[H[0]];l=window.location.pathname;var U=null!=l?l.lastIndexOf("/"):-1;0<=U&&(l=l.substring(0,U+1));U=document.getElementsByTagName("base");var J=null;null!=U&&0<U.length&&(J=U[0].getAttribute("href"));for(var W=1;W<H.length;W++)if(U=H[W].indexOf(")"),0<U){var aa=Editor.trimCssUrl(H[W].substring(0,U));this.graph.isRelativeUrl(aa)&&(aa=null!=J?J+aa:window.location.protocol+-"//"+window.location.hostname+("/"==aa.charAt(0)?"":l)+aa);u.push('url("'+aa+'"'+H[W].substring(U))}else u.push(H[W])}else u=[l]}return null!=u?u.join(""):null};Editor.prototype.mapFontUrl=function(l,u,H){/^https?:\/\//.test(u)&&!this.isCorsEnabledForUrl(u)&&(u=PROXY_URL+"?url="+encodeURIComponent(u));H(l,u)};Editor.prototype.embedCssFonts=function(l,u){var H=l.split("url("),U=0;null==this.cachedFonts&&(this.cachedFonts={});var J=mxUtils.bind(this,function(){if(0==U){for(var ja=[H[0]],oa=1;oa<H.length;oa++){var qa=-H[oa].indexOf(")");ja.push('url("');ja.push(this.cachedFonts[Editor.trimCssUrl(H[oa].substring(0,qa))]);ja.push('"'+H[oa].substring(qa))}u(ja.join(""))}});if(0<H.length){for(l=1;l<H.length;l++){var W=H[l].indexOf(")"),aa=null,ba=H[l].indexOf("format(",W);0<ba&&(aa=Editor.trimCssUrl(H[l].substring(ba+7,H[l].indexOf(")",ba))));mxUtils.bind(this,function(ja){if(null==this.cachedFonts[ja]){this.cachedFonts[ja]=ja;U++;var oa="application/x-font-ttf";if("svg"==aa||/(\.svg)($|\?)/i.test(ja))oa="image/svg+xml";-else if("otf"==aa||"embedded-opentype"==aa||/(\.otf)($|\?)/i.test(ja))oa="application/x-font-opentype";else if("woff"==aa||/(\.woff)($|\?)/i.test(ja))oa="application/font-woff";else if("woff2"==aa||/(\.woff2)($|\?)/i.test(ja))oa="application/font-woff2";else if("eot"==aa||/(\.eot)($|\?)/i.test(ja))oa="application/vnd.ms-fontobject";else if("sfnt"==aa||/(\.sfnt)($|\?)/i.test(ja))oa="application/font-sfnt";this.mapFontUrl(oa,ja,mxUtils.bind(this,function(qa,ra){this.loadUrl(ra,mxUtils.bind(this,function(ua){this.cachedFonts[ja]=-ua;U--;J()}),mxUtils.bind(this,function(ua){U--;J()}),!0,null,"data:"+qa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(H[l].substring(0,W)),aa)}J()}else u(l)};Editor.prototype.loadFonts=function(l){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(u){this.resolvedFontCss=u;null!=l&&l()})):null!=l&&l()};Editor.prototype.createGoogleFontCache=function(){var l={},u;for(u in Graph.fontMapping)Graph.isCssFontUrl(u)&&(l[u]=Graph.fontMapping[u]);-return l};Editor.prototype.embedExtFonts=function(l){var u=this.graph.getCustomFonts();if(0<u.length){var H=[],U=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var J=mxUtils.bind(this,function(){0==U&&this.embedCssFonts(H.join(""),l)}),W=0;W<u.length;W++)mxUtils.bind(this,function(aa,ba){Graph.isCssFontUrl(ba)?null==this.cachedGoogleFonts[ba]?(U++,this.loadUrl(Graph.rewriteGoogleFontUrl(ba),mxUtils.bind(this,function(ja){this.cachedGoogleFonts[ba]=ja;H.push(ja+-"\n");U--;J()}),mxUtils.bind(this,function(ja){U--;H.push("@import url("+ba+");\n");J()}))):H.push(this.cachedGoogleFonts[ba]+"\n"):H.push('@font-face {font-family: "'+aa+'";src: url("'+ba+'")}\n')})(u[W].name,u[W].url);J()}else l()};Editor.prototype.addMathCss=function(l){l=l.getElementsByTagName("defs");if(null!=l&&0<l.length)for(var u=document.getElementsByTagName("style"),H=0;H<u.length;H++){var U=mxUtils.getTextContent(u[H]);0>U.indexOf("mxPageSelector")&&0<U.indexOf("MathJax")&&l[0].appendChild(u[H].cloneNode(!0))}};-Editor.prototype.addFontCss=function(l,u){u=null!=u?u:this.absoluteCssFonts(this.fontCss);if(null!=u){var H=mxUtils.getSvgDefs(l),U=u.split("\n");u=[];for(var J=[],W=0;W<U.length;W++)"@import"==U[W].substring(0,7)?u.push(U[W]):J.push(U[W]);l=l.ownerDocument;l=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"style"):l.createElement("style");l.setAttribute("type","text/css");0<u.length&&(mxUtils.setTextContent(l,u.join("\n")),H.appendChild(l));0<J.length&&(l=l.cloneNode(!1),mxUtils.setTextContent(l,-J.join("\n")),H.appendChild(l))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(l,u,H){var U=mxClient.IS_FF?8192:16384;return Math.min(H,Math.min(U/l,U/u))};Editor.prototype.exportToCanvas=function(l,u,H,U,J,W,aa,ba,ja,oa,qa,ra,ua,za,Ba,Ca,La,sa){try{W=null!=W?W:!0;aa=null!=aa?aa:!0;ra=null!=ra?ra:this.graph;ua=null!=ua?ua:0;var Aa=ja?null:ra.background;Aa==mxConstants.NONE&&(Aa=null);null==Aa&&(Aa=U);-null==Aa&&0==ja&&(Aa="dark"==Ca?Editor.darkColor:"#ffffff");this.convertImages(ra.getSvg(null,null,ua,za,null,aa,null,null,null,oa,null,Ca,La,sa),mxUtils.bind(this,function(Ea){try{var Ka=new Image;Ka.onload=mxUtils.bind(this,function(){try{var ya=function(){mxClient.IS_SF?window.setTimeout(function(){Pa.drawImage(Ka,0,0);l(Wa,Ea)},0):(Pa.drawImage(Ka,0,0),l(Wa,Ea))},Wa=document.createElement("canvas"),Ia=parseInt(Ea.getAttribute("width")),Xa=parseInt(Ea.getAttribute("height"));ba=null!=ba?ba:1;null!=-u&&(ba=W?Math.min(1,Math.min(3*u/(4*Xa),u/Ia)):u/Ia);ba=this.getMaxCanvasScale(Ia,Xa,ba);Ia=Math.ceil(ba*Ia);Xa=Math.ceil(ba*Xa);Wa.setAttribute("width",Ia);Wa.setAttribute("height",Xa);var Pa=Wa.getContext("2d");null!=Aa&&(Pa.beginPath(),Pa.rect(0,0,Ia,Xa),Pa.fillStyle=Aa,Pa.fill());1!=ba&&Pa.scale(ba,ba);if(Ba){var t=ra.view,N=t.scale;t.scale=1;var Q=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=N;Q="data:image/svg+xml;base64,"+Q;var X=ra.gridSize*t.gridSteps*ba,ia=ra.getGraphBounds(),-ka=t.translate.x*N,pa=t.translate.y*N,xa=ka+(ia.x-ka)/N-ua,ta=pa+(ia.y-pa)/N-ua,va=new Image;va.onload=function(){try{for(var Da=-Math.round(X-mxUtils.mod((ka-xa)*ba,X)),Na=-Math.round(X-mxUtils.mod((pa-ta)*ba,X));Da<Ia;Da+=X)for(var Ya=Na;Ya<Xa;Ya+=X)Pa.drawImage(va,Da/ba,Ya/ba);ya()}catch(Za){null!=J&&J(Za)}};va.onerror=function(Da){null!=J&&J(Da)};va.src=Q}else ya()}catch(Da){null!=J&&J(Da)}});Ka.onerror=function(ya){null!=J&&J(ya)};oa&&this.graph.addSvgShadow(Ea);this.graph.mathEnabled&&this.addMathCss(Ea);-var Ma=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ea,this.resolvedFontCss),Ka.src=Editor.createSvgDataUri(mxUtils.getXml(Ea))}catch(ya){null!=J&&J(ya)}});this.embedExtFonts(mxUtils.bind(this,function(ya){try{null!=ya&&this.addFontCss(Ea,ya),this.loadFonts(Ma)}catch(Wa){null!=J&&J(Wa)}}))}catch(ya){null!=J&&J(ya)}}),H,qa)}catch(Ea){null!=J&&J(Ea)}};Editor.crcTable=[];for(var v=0;256>v;v++)for(var p=v,A=0;8>A;A++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[v]=-p;Editor.updateCRC=function(l,u,H,U){for(var J=0;J<U;J++)l=Editor.crcTable[(l^u.charCodeAt(H+J))&255]^l>>>8;return l};Editor.crc32=function(l){for(var u=-1,H=0;H<l.length;H++)u=u>>>8^Editor.crcTable[(u^l.charCodeAt(H))&255];return(u^-1)>>>0};Editor.writeGraphModelToPng=function(l,u,H,U,J){function W(qa,ra){var ua=ja;ja+=ra;return qa.substring(ua,ja)}function aa(qa){qa=W(qa,4);return qa.charCodeAt(3)+(qa.charCodeAt(2)<<8)+(qa.charCodeAt(1)<<16)+(qa.charCodeAt(0)<<24)}function ba(qa){return String.fromCharCode(qa>>-24&255,qa>>16&255,qa>>8&255,qa&255)}l=l.substring(l.indexOf(",")+1);l=window.atob?atob(l):Base64.decode(l,!0);var ja=0;if(W(l,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=J&&J();else if(W(l,4),"IHDR"!=W(l,4))null!=J&&J();else{W(l,17);J=l.substring(0,ja);do{var oa=aa(l);if("IDAT"==W(l,4)){J=l.substring(0,ja-8);"pHYs"==u&&"dpi"==H?(H=Math.round(U/.0254),H=ba(H)+ba(H)+String.fromCharCode(1)):H=H+String.fromCharCode(0)+("zTXt"==u?String.fromCharCode(0):"")+U;U=4294967295;-U=Editor.updateCRC(U,u,0,4);U=Editor.updateCRC(U,H,0,H.length);J+=ba(H.length)+u+H+ba(U^4294967295);J+=l.substring(ja-8,l.length);break}J+=l.substring(ja-8,ja-4+oa);W(l,oa);W(l,4)}while(oa);return"data:image/png;base64,"+(window.btoa?btoa(J):Base64.encode(J,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var G=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(l,u){G.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(l,u){var H=null;null!=l.editor.graph.getModel().getParent(u)?H=u.getId():null!=l.currentPage&&(H=l.currentPage.getId());return H});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 P=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?P.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(l){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=-function(l){l=R.apply(this,arguments);var u=this.editorUi,H=u.editor.graph;if(H.isEnabled()){var U=u.getCurrentFile();null!=U&&U.isAutosaveOptional()&&l.appendChild(this.createOption(mxResources.get("autosave"),function(){return u.editor.autosave},function(aa){u.editor.setAutosave(aa);u.editor.autosave&&U.isModified()&&U.fileChanged()},{install:function(aa){this.listener=function(){aa(u.editor.autosave)};u.editor.addListener("autosaveChanged",this.listener)},destroy:function(){u.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&-H.isEnabled()&&"undefined"!==typeof MathJax){var J=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return H.mathEnabled},function(aa){u.actions.get("mathematicalTypesetting").funct()},{install:function(aa){this.listener=function(){aa(H.mathEnabled)};u.addListener("mathEnabledChanged",this.listener)},destroy:function(){u.removeListener(this.listener)}});l.appendChild(J);if(!u.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var W=u.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");-W.style.position="absolute";W.style.left="85%";J.appendChild(W)}}return l};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",+Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var A=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(A)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[A]),Error(mxResources.get("notADiagramFile")+" ("+A+")");if("mxGraphModel"==k.nodeName){A=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(J=null!=this.graph.themes?+this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=J&&(U=new mxCodec(J.ownerDocument),U.decode(J,this.graph.getStylesheet())));else{var J=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=J){var U=new mxCodec(J.ownerDocument);U.decode(J,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));+A=k.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(A=k.getAttribute("extFonts"))try{for(A=A.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),J=0;J<A.length;J++)this.graph.addExtFont(A[J].name,+A[J].url)}catch(P){console.log("ExtFonts format error: "+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,A){k=null!=k?k:!0;var J=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&J.setAttribute("style",+this.graph.currentStyle);var U=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=U&&J.setAttribute("backgroundImage",JSON.stringify(U));J.setAttribute("math",this.graph.mathEnabled?"1":"0");J.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?J.setAttribute("adaptiveColors",this.graph.adaptiveColors):J.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(U=this.graph.extFonts.map(function(P){return P.name++"^"+P.url}),J.setAttribute("extFonts",U.join("|")));return J};Editor.prototype.isDataSvg=function(k){try{var A=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),null!=A&&0<A.length)){var J=mxUtils.parseXml(A).documentElement;return"mxfile"==J.nodeName||"mxGraphModel"==J.nodeName}}catch(U){}return!1};Editor.prototype.extractGraphModel=+function(k,A,J){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=+function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var J=function(){U=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var U=null;Editor.doMathJaxRender=+function(W){try{null==U?(MathJax.typesetClear([W]),MathJax.typeset([W]),J()):U!=W&&Editor.mathJaxQueue.push(W)}catch(aa){MathJax.typesetClear([W]),null!=aa.retry?(U=W,aa.retry.then(function(){MathJax.typesetPromise([W]).then(J)["catch"](function(ja){console.log("Error in MathJax.typesetPromise: "+ja.toString());J()})})["catch"](function(ja){console.log("Error in MathJax.retry: "+ja.toString());J()})):null!=window.console&&console.log("Error in MathJax.typeset: "+aa.toString())}};window.MathJax=null!=+A?A:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var W=0;W<Editor.mathJaxQueue.length;W++)Editor.doMathJaxRender(Editor.mathJaxQueue[W])}}};Editor.MathJaxRender=function(W){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(W):Editor.mathJaxQueue.push(W)};Editor.onMathJaxDone=function(){};+var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var W=mxUtils.bind(this,function(aa,ja){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,W);this.graph.addListener(mxEvent.REFRESH,W)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",k);A[0].parentNode.appendChild(T)}}};+Editor.prototype.csvToArray=function(k){if(0<k.length){var A="",J=[""],U=0,P=!0,T;k=$jscomp.makeIterator(k);for(T=k.next();!T.done;T=k.next())T=T.value,'"'===T?(P&&T===A&&(J[U]+=T),P=!P):","===T&&P?T=J[++U]="":J[U]+=T,A=T;return J}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var A=EditorUi.isVisioFilename(k);A=/\.png$/i.test(k)||/\.pdf$/i.test(k)||A;var J=+"t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+J+(A?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||+"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var A=k.convert,J=this;k.convert=function(U){null!=U&&navigator.onLine&&("http://"!=U.substring(0,7)&&"https://"!=U.substring(0,8)||U.substring(0,k.baseUrl.length)==k.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(U)?"chrome-extension://"!=U.substring(0,19)&&(U=A.apply(this,arguments)):U=PROXY_URL++"?url="+encodeURIComponent(U));return U};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,A,J,U,P){try{var T=!0,W=window.setTimeout(mxUtils.bind(this,function(){T=!1;A(k)}),this.timeout),aa=mxUtils.bind(this,function(){null!=U?this.convertImageToDataUri(k,A,J,U,!0):A(k)});if(/(\.svg)$/i.test(k)&&!P)mxUtils.get(k,mxUtils.bind(this,function(pa){window.clearTimeout(W);T&&(200>pa.getStatus()||+299<pa.getStatus()?aa():A(Editor.createSvgDataUri(pa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(W);T&&aa()}));else{var ja=new Image;this.crossOriginImages&&(ja.crossOrigin="anonymous");ja.onload=function(){window.clearTimeout(W);if(T)try{U=null!=U&&P?U:1;var pa=document.createElement("canvas"),sa=pa.getContext("2d");sa.scale(U,U);pa.height=ja.height*U;pa.width=ja.width*U;sa.drawImage(ja,0,0);A(pa.toDataURL())}catch(qa){A(k)}};ja.onerror=function(){window.clearTimeout(W);T&&(null!=+J?J():A(k))};ja.src=k}}catch(pa){null!=J?J():A(k)}};Editor.prototype.convertImages=function(k,A,J,U){function P(){0<T.length?T.shift()():A(k)}null==U&&(U=this.createImageUrlConverter());var T=[],W=J||{};J=mxUtils.bind(this,function(aa,ja){aa=k.getElementsByTagName(aa);for(var pa=0;pa<aa.length;pa++)mxUtils.bind(this,function(sa){T.push(mxUtils.bind(this,function(){try{if(null!=sa){var qa=U.convert(sa.getAttribute(ja));if(null!=qa&&"data:"!=qa.substring(0,5)){var wa=W[qa];null==wa?this.convertImageToDataUri(qa,+function(Ba){null!=Ba&&(W[qa]=Ba,sa.setAttribute(ja,Ba));P()},null,Editor.svgRasterScale):(sa.setAttribute(ja,wa),P())}else null!=qa&&sa.setAttribute(ja,qa),P()}}catch(Ba){P()}}))})(aa[pa])});J("image","xlink:href");J("img","src");P()};Editor.base64Encode=function(k){for(var A="",J=0,U=k.length,P,T,W;J<U;){P=k.charCodeAt(J++)&255;if(J==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&+3)<<4);A+="==";break}T=k.charCodeAt(J++);if(J==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(T&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2);A+="=";break}W=k.charCodeAt(J++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&+3)<<4|(T&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2|(W&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(W&63)}return A};Editor.prototype.loadUrl=function(k,A,J,U,P,T,W,aa){try{var ja=!W&&(U||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));P=null!=P?P:!0;var pa=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&+299>=sa.getStatus()){if(null!=A){var qa=sa.getText();if(ja){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();qa=Array(sa.length);for(var wa=0;wa<sa.length;wa++)qa[wa]=String.fromCharCode(sa[wa]);qa=qa.join("")}T=null!=T?T:"data:image/png;base64,";qa=T+Editor.base64Encode(qa)}A(qa)}}else null!=J&&(0==sa.getStatus()?J({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?+J({message:mxResources.get("fileNotFound"),code:sa.getStatus()},sa):J({message:this.getErrorMessage(sa)},sa))}),function(sa){null!=J&&J({message:mxResources.get("error")+" "+sa.getStatus()})},ja,this.timeout,function(){P&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:pa})},aa)});pa()}catch(sa){null!=J&&J(sa)}};Editor.prototype.getErrorMessage=function(k){var A=mxResources.get("error")+" "+k.getStatus();try{var J=k.getText(),U=JSON.parse(J);null!=U&&null!=U.error&&null!=U.error.message&&(A=U.error.message++" ("+A+")")}catch(P){}return A};Editor.prototype.absoluteCssFonts=function(k){var A=null;if(null!=k){var J=k.split("url(");if(0<J.length){A=[J[0]];k=window.location.pathname;var U=null!=k?k.lastIndexOf("/"):-1;0<=U&&(k=k.substring(0,U+1));U=document.getElementsByTagName("base");var P=null;null!=U&&0<U.length&&(P=U[0].getAttribute("href"));for(var T=1;T<J.length;T++)if(U=J[T].indexOf(")"),0<U){var W=Editor.trimCssUrl(J[T].substring(0,U));this.graph.isRelativeUrl(W)&&(W=null!=P?P+W:window.location.protocol++"//"+window.location.hostname+("/"==W.charAt(0)?"":k)+W);A.push('url("'+W+'"'+J[T].substring(U))}else A.push(J[T])}else A=[k]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(k,A,J){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+encodeURIComponent(A));J(k,A)};Editor.prototype.embedCssFonts=function(k,A){var J=k.split("url("),U=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==U){for(var ja=[J[0]],pa=1;pa<J.length;pa++){var sa=+J[pa].indexOf(")");ja.push('url("');ja.push(this.cachedFonts[Editor.trimCssUrl(J[pa].substring(0,sa))]);ja.push('"'+J[pa].substring(sa))}A(ja.join(""))}});if(0<J.length){for(k=1;k<J.length;k++){var T=J[k].indexOf(")"),W=null,aa=J[k].indexOf("format(",T);0<aa&&(W=Editor.trimCssUrl(J[k].substring(aa+7,J[k].indexOf(")",aa))));mxUtils.bind(this,function(ja){if(null==this.cachedFonts[ja]){this.cachedFonts[ja]=ja;U++;var pa="application/x-font-ttf";if("svg"==W||/(\.svg)($|\?)/i.test(ja))pa="image/svg+xml";+else if("otf"==W||"embedded-opentype"==W||/(\.otf)($|\?)/i.test(ja))pa="application/x-font-opentype";else if("woff"==W||/(\.woff)($|\?)/i.test(ja))pa="application/font-woff";else if("woff2"==W||/(\.woff2)($|\?)/i.test(ja))pa="application/font-woff2";else if("eot"==W||/(\.eot)($|\?)/i.test(ja))pa="application/vnd.ms-fontobject";else if("sfnt"==W||/(\.sfnt)($|\?)/i.test(ja))pa="application/font-sfnt";this.mapFontUrl(pa,ja,mxUtils.bind(this,function(sa,qa){this.loadUrl(qa,mxUtils.bind(this,function(wa){this.cachedFonts[ja]=+wa;U--;P()}),mxUtils.bind(this,function(wa){U--;P()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(J[k].substring(0,T)),W)}P()}else A(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(k[A]=Graph.fontMapping[A]);+return k};Editor.prototype.embedExtFonts=function(k){var A=this.graph.getCustomFonts();if(0<A.length){var J=[],U=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==U&&this.embedCssFonts(J.join(""),k)}),T=0;T<A.length;T++)mxUtils.bind(this,function(W,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(U++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),mxUtils.bind(this,function(ja){this.cachedGoogleFonts[aa]=ja;J.push(ja++"\n");U--;P()}),mxUtils.bind(this,function(ja){U--;J.push("@import url("+aa+");\n");P()}))):J.push(this.cachedGoogleFonts[aa]+"\n"):J.push('@font-face {font-family: "'+W+'";src: url("'+aa+'")}\n')})(A[T].name,A[T].url);P()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var A=document.getElementsByTagName("style"),J=0;J<A.length;J++){var U=mxUtils.getTextContent(A[J]);0>U.indexOf("mxPageSelector")&&0<U.indexOf("MathJax")&&k[0].appendChild(A[J].cloneNode(!0))}};+Editor.prototype.addFontCss=function(k,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var J=mxUtils.getSvgDefs(k),U=A.split("\n");A=[];for(var P=[],T=0;T<U.length;T++)"@import"==U[T].substring(0,7)?A.push(U[T]):P.push(U[T]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<A.length&&(mxUtils.setTextContent(k,A.join("\n")),J.appendChild(k));0<P.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,+P.join("\n")),J.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,A,J){var U=mxClient.IS_FF?8192:16384;return Math.min(J,Math.min(U/k,U/A))};Editor.prototype.exportToCanvas=function(k,A,J,U,P,T,W,aa,ja,pa,sa,qa,wa,Ba,za,Ea,ra,ya){try{T=null!=T?T:!0;W=null!=W?W:!0;qa=null!=qa?qa:this.graph;wa=null!=wa?wa:0;var Ca=ja?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=U);null==+Ca&&0==ja&&(Ca="dark"==Ea?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,wa,Ba,null,W,null,null,null,pa,null,Ea,ra,ya),mxUtils.bind(this,function(Ma){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ra=function(){mxClient.IS_SF?window.setTimeout(function(){Da.drawImage(Ha,0,0);k(Za,Ma)},0):(Da.drawImage(Ha,0,0),k(Za,Ma))},Za=document.createElement("canvas"),La=parseInt(Ma.getAttribute("width")),$a=parseInt(Ma.getAttribute("height"));aa=null!=aa?aa:1;null!=A&&+(aa=T?Math.min(1,Math.min(3*A/(4*$a),A/La)):A/La);aa=this.getMaxCanvasScale(La,$a,aa);La=Math.ceil(aa*La);$a=Math.ceil(aa*$a);Za.setAttribute("width",La);Za.setAttribute("height",$a);var Da=Za.getContext("2d");null!=Ca&&(Da.beginPath(),Da.rect(0,0,La,$a),Da.fillStyle=Ca,Da.fill());1!=aa&&Da.scale(aa,aa);if(za){var x=qa.view,M=x.scale;x.scale=1;var Q=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));x.scale=M;Q="data:image/svg+xml;base64,"+Q;var V=qa.gridSize*x.gridSteps*aa,ia=qa.getGraphBounds(),+ka=x.translate.x*M,oa=x.translate.y*M,xa=ka+(ia.x-ka)/M-wa,ta=oa+(ia.y-oa)/M-wa,ua=new Image;ua.onload=function(){try{for(var Fa=-Math.round(V-mxUtils.mod((ka-xa)*aa,V)),Na=-Math.round(V-mxUtils.mod((oa-ta)*aa,V));Fa<La;Fa+=V)for(var Wa=Na;Wa<$a;Wa+=V)Da.drawImage(ua,Fa/aa,Wa/aa);Ra()}catch(Xa){null!=P&&P(Xa)}};ua.onerror=function(Fa){null!=P&&P(Fa)};ua.src=Q}else Ra()}catch(Fa){null!=P&&P(Fa)}});Ha.onerror=function(Ra){null!=P&&P(Ra)};pa&&this.graph.addSvgShadow(Ma);this.graph.mathEnabled&&this.addMathCss(Ma);+var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ma,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}catch(Ra){null!=P&&P(Ra)}});this.embedExtFonts(mxUtils.bind(this,function(Ra){try{null!=Ra&&this.addFontCss(Ma,Ra),this.loadFonts(Aa)}catch(Za){null!=P&&P(Za)}}))}catch(Ra){null!=P&&P(Ra)}}),J,sa)}catch(Ma){null!=P&&P(Ma)}};Editor.crcTable=[];for(var u=0;256>u;u++)for(var p=u,B=0;8>B;B++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[u]=+p;Editor.updateCRC=function(k,A,J,U){for(var P=0;P<U;P++)k=Editor.crcTable[(k^A.charCodeAt(J+P))&255]^k>>>8;return k};Editor.crc32=function(k){for(var A=-1,J=0;J<k.length;J++)A=A>>>8^Editor.crcTable[(A^k.charCodeAt(J))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(k,A,J,U,P){function T(sa,qa){var wa=ja;ja+=qa;return sa.substring(wa,ja)}function W(sa){sa=T(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function aa(sa){return String.fromCharCode(sa>>+24&255,sa>>16&255,sa>>8&255,sa&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var ja=0;if(T(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(T(k,4),"IHDR"!=T(k,4))null!=P&&P();else{T(k,17);P=k.substring(0,ja);do{var pa=W(k);if("IDAT"==T(k,4)){P=k.substring(0,ja-8);"pHYs"==A&&"dpi"==J?(J=Math.round(U/.0254),J=aa(J)+aa(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+U;U=4294967295;U=+Editor.updateCRC(U,A,0,4);U=Editor.updateCRC(U,J,0,J.length);P+=aa(J.length)+A+J+aa(U^4294967295);P+=k.substring(ja-8,k.length);break}P+=k.substring(ja-8,ja-4+pa);T(k,pa);T(k,4)}while(pa);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,A){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,A){var J=null;null!=k.editor.graph.getModel().getParent(A)?J=A.getId():null!=k.currentPage&&(J=k.currentPage.getId());return J});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,+arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var O=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?O.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=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 A=this.editorUi,J=A.editor.graph;if(J.isEnabled()){var U=A.getCurrentFile();null!=U&&U.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(W){A.editor.setAutosave(W);A.editor.autosave&&U.isModified()&&U.fileChanged()},{install:function(W){this.listener=function(){W(A.editor.autosave)};A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&+J.isEnabled()&&"undefined"!==typeof MathJax){var P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return J.mathEnabled},function(W){A.actions.get("mathematicalTypesetting").funct()},{install:function(W){this.listener=function(){W(J.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});k.appendChild(P);if(!A.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var T=A.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");+T.style.position="absolute";T.style.left="85%";P.appendChild(T)}}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",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",-dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(l){return"0"==mxUtils.getValue(l.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(l){return"1"==mxUtils.getValue(l.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,-isVisible:function(l){return"0"==mxUtils.getValue(l.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(l){return"1"==mxUtils.getValue(l.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];+dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,+isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",@@ -3352,96 +3351,96 @@ min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{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(l,u,H,U){if(null!=u){var J=mxUtils.bind(this,function(aa){if(null!=aa)if(H)for(var ba=0;ba<aa.length;ba++){if("function"!==typeof aa[ba].isVisible||aa[ba].isVisible(U,this))u[aa[ba].name]=aa[ba]}else for(var ja in u){var oa=-!1;for(ba=0;ba<aa.length;ba++)if(aa[ba].name==ja&&aa[ba].type==u[ja].type){oa=!0;break}oa||delete u[ja]}}),W=this.editorUi.editor.graph.view.getState(l);null!=W&&null!=W.shape&&(W.shape.commonCustomPropAdded||(W.shape.commonCustomPropAdded=!0,W.shape.customProperties=W.shape.customProperties||[],W.cell.vertex?Array.prototype.push.apply(W.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(W.shape.customProperties,Editor.commonEdgeProperties)),J(W.shape.customProperties));-l=l.getAttribute("customProperties");if(null!=l)try{J(JSON.parse(l))}catch(aa){}}};var T=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var l=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=l.style.shape&&!l.containsLabel&&0<l.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));T.apply(this,arguments);if(Editor.enableCustomProperties){for(var u={},H=l.vertices,U=l.edges,J=0;J<H.length;J++)this.findCommonProperties(H[J],-u,0==J,l);for(J=0;J<U.length;J++)this.findCommonProperties(U[J],u,0==H.length&&0==J,l);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(u).length&&this.container.appendChild(this.addProperties(this.createPanel(),u,l))}};var c=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(l){var u=this.editorUi.getSelectionState();1==u.cells.length?this.addActions(l,["copyStyle","pasteStyle"]):1<=u.cells.length&&this.addActions(l,["pasteStyle","pasteData"]);c.apply(this,-arguments);return l};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(l,u,H,U){function J(Pa,t,N,Q,X){if(null!=N.valueChanged)N.valueChanged(t,X);else{ua.getModel().beginUpdate();try{X=[];var ia=[];if(null!=N.index){for(var ka=[],pa=N.parentRow.nextSibling;pa&&pa.getAttribute("data-pName")==Pa;)ka.push(pa.getAttribute("data-pValue")),pa=pa.nextSibling;N.index<ka.length?null!=Q?ka.splice(Q,1):ka[N.index]=t:ka.push(t);null!=N.size&&ka.length>N.size&&(ka=ka.slice(0,-N.size));t=ka.join(",");null!=N.countProperty&&(ua.setCellStyles(N.countProperty,ka.length,ua.getSelectionCells()),X.push(N.countProperty),ia.push(ka.length))}ua.setCellStyles(Pa,t,ua.getSelectionCells());X.push(Pa);ia.push(t);if(null!=N.dependentProps)for(Pa=0;Pa<N.dependentProps.length;Pa++){var xa=N.dependentPropsDefVal[Pa],ta=N.dependentPropsVals[Pa];if(ta.length>t)ta=ta.slice(0,t);else for(var va=ta.length;va<t;va++)ta.push(xa);ta=ta.join(",");ua.setCellStyles(N.dependentProps[Pa],ta,ua.getSelectionCells());-X.push(N.dependentProps[Pa]);ia.push(ta)}if("function"==typeof N.onChange)N.onChange(ua,t);ra.editorUi.fireEvent(new mxEventObject("styleChanged","keys",X,"values",ia,"cells",ua.getSelectionCells()))}finally{ua.getModel().endUpdate()}}}function W(Pa,t,N){var Q=mxUtils.getOffset(l,!0),X=mxUtils.getOffset(Pa,!0);t.style.position="absolute";t.style.left=X.x-Q.x+"px";t.style.top=X.y-Q.y+"px";t.style.width=Pa.offsetWidth+"px";t.style.height=Pa.offsetHeight-(N?4:0)+"px";t.style.zIndex=5}function aa(Pa,-t,N){function Q(ia){if(null==ia||ia==mxConstants.NONE)X.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ia)X.style.background="";else{var ka=mxUtils.getLightDarkColor(ia);mxUtils.isLightDarkColor(ia)&&ka.light!=ka.dark?X.style.background="linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":X.style.background=ia}}var X=document.createElement("div");X.style.width="32px";X.style.height="8px";X.style.margin="2px";X.style.borderStyle=-"solid";X.style.borderWidth="1px";Q(t);btn=mxUtils.button("",mxUtils.bind(ra,function(ia){this.editorUi.pickColor(t,function(ka){J(Pa,ka,N);Q(ka)});mxEvent.consume(ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(X);return btn}function ba(Pa,t,N,Q,X,ia,ka){null!=t&&(t=t.split(","),za.push({name:Pa,values:t,type:N,defVal:Q,countProperty:X,parentRow:ia,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",-mxUtils.bind(ra,function(pa){for(var xa=ia,ta=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Pa)xa=xa.nextSibling,ta++;else break;var va={type:N,parentRow:ia,index:ta,isDeletable:!0,defVal:Q,countProperty:X};ta=qa(Pa,"",va,0==ta%2,ka);J(Pa,Q,va);xa.parentNode.insertBefore(ta,xa.nextSibling);mxEvent.consume(pa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ja(Pa,t,N,Q,X,ia,ka){if(0<X){var pa=Array(X);t=null!=t?t.split(","):[];-for(var xa=0;xa<X;xa++)pa[xa]=null!=t[xa]?t[xa]:null!=Q?Q:"";za.push({name:Pa,values:pa,type:N,defVal:Q,parentRow:ia,flipBkg:ka,size:X})}return document.createElement("div")}function oa(Pa,t,N){var Q=document.createElement("input");Q.type="checkbox";Q.checked="1"==t;mxEvent.addListener(Q,"change",function(){J(Pa,Q.checked?"1":"0",N)});return Q}function qa(Pa,t,N,Q,X){var ia=N.dispName,ka=N.type,pa=document.createElement("tr");pa.className="gePropRow"+(X?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";-pa.setAttribute("data-pName",Pa);pa.setAttribute("data-pValue",t);Q=!1;null!=N.index&&(pa.setAttribute("data-index",N.index),ia=(null!=ia?ia:"")+"["+N.index+"]",Q=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ia=mxResources.get(ia,null,ia);mxUtils.write(xa,ia);xa.setAttribute("title",ia);Q&&(xa.style.textAlign="right");pa.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";xa.setAttribute("title",null!=t?t:mxResources.get("none"));if("color"==ka)xa.appendChild(aa(Pa,-t,N));else if("bool"==ka||"boolean"==ka)xa.appendChild(oa(Pa,t,N));else if("enum"==ka){var ta=N.enumList;for(X=0;X<ta.length;X++)if(ia=ta[X],ia.val==t){mxUtils.write(xa,mxResources.get(ia.dispName,null,ia.dispName));break}mxEvent.addListener(xa,"click",mxUtils.bind(ra,function(){var va=document.createElement("select"),Da=null;W(xa,va);for(var Na=0;Na<ta.length;Na++){var Ya=ta[Na],Za=document.createElement("option");Za.value=mxUtils.htmlEntities(Ya.val);mxUtils.write(Za,mxResources.get(Ya.dispName,-null,Ya.dispName));va.appendChild(Za);null==Ya.val&&(Za.value="null",Da=Za)}va.value=null==t&&null!=Da?"null":t;l.appendChild(va);mxEvent.addListener(va,"change",function(){var ab=mxUtils.htmlEntities(va.value);if(va[va.selectedIndex]==Da||"null"==ab.value)ab=null;J(Pa,ab,N)});va.focus();mxEvent.addListener(va,"blur",function(){l.removeChild(va)})}))}else"dynamicArr"==ka?xa.appendChild(ba(Pa,t,N.subType,N.subDefVal,N.countProperty,pa,X)):"staticArr"==ka?xa.appendChild(ja(Pa,t,N.subType,N.subDefVal,-N.size,pa,X)):"readOnly"==ka?(X=document.createElement("input"),X.setAttribute("readonly",""),X.value=t,X.style.borderWidth="0px","id"==Pa?(X.style.width="190px",X.style.position="relative",X.style.right="6px",X.style.float="right",X.style.background="none",X.style.textAlign="right",pa.firstChild.setAttribute("colspan","2"),X.setAttribute("title",t),pa.firstChild.appendChild(X)):(X.style.width="96px",xa.appendChild(X))):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(t)),mxEvent.addListener(xa,-"click",mxUtils.bind(ra,function(){function va(){var Na=Da.value;Na=0==Na.length&&"string"!=ka&&"numbers"!=ka?0:Na;N.allowAuto&&(null!=Na.trim&&"auto"==Na.trim().toLowerCase()?(Na="auto",ka="string"):(Na=parseFloat(Na),Na=isNaN(Na)?0:Na));null!=N.min&&Na<N.min?Na=N.min:null!=N.max&&Na>N.max&&(Na=N.max);var Ya=null;try{Ya="numbers"==ka?Na.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Na):Na)+"")}catch(Za){}J(Pa,Ya,N,null,Da)}var Da=document.createElement("input");W(xa,-Da,!0);Da.value=decodeURIComponent(t);Da.className="gePropEditor";"int"!=ka&&"float"!=ka||N.allowAuto||(Da.type="number",Da.step="int"==ka?"1":"any",null!=N.min&&(Da.min=parseFloat(N.min)),null!=N.max&&(Da.max=parseFloat(N.max)));l.appendChild(Da);mxEvent.addListener(Da,"keypress",function(Na){13==Na.keyCode&&va()});Da.focus();mxEvent.addListener(Da,"blur",function(){va()})})));N.isDeletable&&(X=mxUtils.button("-",mxUtils.bind(ra,function(va){J(Pa,"",N,N.index);mxEvent.consume(va)})),X.style.height=-"16px",X.style.width="25px",X.style.float="right",X.className="geColorBtn",xa.appendChild(X));pa.appendChild(xa);return pa}var ra=this,ua=this.editorUi.editor.graph,za=[];l.style.position="relative";l.style.padding="0";var Ba=document.createElement("table");Ba.className="geProperties";Ba.style.whiteSpace="nowrap";Ba.style.width="100%";var Ca=document.createElement("tr");Ca.className="gePropHeader";var La=document.createElement("th");La.className="gePropHeaderCell";La.style.paddingLeft="16px";La.style.backgroundRepeat=-"no-repeat";La.style.backgroundPosition="-2px 50%";La.style.backgroundSize="20px";mxUtils.write(La,mxResources.get("property"));Ca.style.cursor="pointer";var sa=function(){var Pa=Ba.querySelectorAll(".gePropNonHeaderRow");if(ra.editorUi.propertiesCollapsed){La.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var t="none";for(var N=l.childNodes.length-1;0<=N;N--)try{var Q=l.childNodes[N],X=Q.nodeName.toUpperCase();"INPUT"!=X&&"SELECT"!=X||l.removeChild(Q)}catch(ia){}}else La.style.backgroundImage=-"url('"+Editor.arrowDownImage+"')",t="";for(N=0;N<Pa.length;N++)Pa[N].style.display=t};mxEvent.addListener(Ca,"click",function(){ra.editorUi.propertiesCollapsed=!ra.editorUi.propertiesCollapsed;sa()});Ca.appendChild(La);var Aa=document.createElement("th");Aa.className="gePropHeaderCell";Aa.style.paddingLeft="4px";mxUtils.write(Aa,mxResources.get("value"));Ca.appendChild(Aa);Ba.appendChild(Ca);var Ea=Aa=!1;Ca=null;1==H.vertices.length&&0==H.edges.length?Ca=H.vertices[0].id:0==H.vertices.length&&1==-H.edges.length&&(Ca=H.edges[0].id);null==Ca||U||Ba.appendChild(qa("id",mxUtils.htmlEntities(Ca),{dispName:"id",type:"readOnly"},!0,!1));for(var Ka in u)if(U=u[Ka],"function"!=typeof U.isVisible||U.isVisible(H,this)){var Ma=null!=U.getValue?U.getValue():null!=H.style[Ka]?mxUtils.htmlEntities(H.style[Ka]+""):null!=U.getDefaultValue?U.getDefaultValue(H,this):U.defVal;if("separator"==U.type)Ea=!Ea;else{if("staticArr"==U.type)U.size=parseInt(H.style[U.sizeProperty]||u[U.sizeProperty].defVal)||0;else if(null!=-U.dependentProps){var ya=U.dependentProps,Wa=[],Ia=[];for(Ca=0;Ca<ya.length;Ca++){var Xa=H.style[ya[Ca]];Ia.push(u[ya[Ca]].subDefVal);Wa.push(null!=Xa?Xa.split(","):[])}U.dependentPropsDefVal=Ia;U.dependentPropsVals=Wa}Ba.appendChild(qa(Ka,Ma,U,Aa,Ea));Aa=!Aa}}for(Ca=0;Ca<za.length;Ca++)for(U=za[Ca],u=U.parentRow,H=0;H<U.values.length;H++)Ka=qa(U.name,U.values[H],{type:U.type,parentRow:U.parentRow,isDeletable:U.isDeletable,index:H,defVal:U.defVal,countProperty:U.countProperty,size:U.size},0==H%2,-U.flipBkg),u.parentNode.insertBefore(Ka,u.nextSibling),u=Ka;l.appendChild(Ba);sa();return l};StyleFormatPanel.prototype.addStyles=function(l){if(null!=this.defaultColorSchemes){var u=function(za){mxEvent.addListener(za,"mouseenter",function(){za.style.opacity="1"});mxEvent.addListener(za,"mouseleave",function(){za.style.opacity="0.5"})},H=this.editorUi,U=H.editor.graph,J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.paddingLeft="24px";J.style.paddingRight="20px";l.style.paddingLeft=-"16px";l.style.paddingBottom="6px";l.style.position="relative";l.appendChild(J);var W=document.createElement("div");W.style.whiteSpace="nowrap";W.style.position="relative";W.style.textAlign="center";W.style.width="210px";for(var aa=[],ba=0;ba<this.defaultColorSchemes.length;ba++){var ja=document.createElement("div");ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background=-"transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(za){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){oa(za)}))})(ba);aa.push(ja);W.appendChild(ja)}var oa=mxUtils.bind(this,function(za){null!=aa[za]&&(null!=this.format.currentScheme&&null!=aa[this.format.currentScheme]&&(aa[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=za,qa(this.defaultColorSchemes[this.format.currentScheme]),aa[this.format.currentScheme].style.background=-"#84d7ff")}),qa=mxUtils.bind(this,function(za){var Ba=mxUtils.clone(U.defaultVertexStyle);Ba[mxConstants.STYLE_STROKECOLOR]=null!=Ba[mxConstants.STYLE_STROKECOLOR]?Ba[mxConstants.STYLE_STROKECOLOR]:"default";Ba[mxConstants.STYLE_FILLCOLOR]=null!=Ba[mxConstants.STYLE_FILLCOLOR]?Ba[mxConstants.STYLE_FILLCOLOR]:"default";Ba[mxConstants.STYLE_FONTCOLOR]=null!=Ba[mxConstants.STYLE_FONTCOLOR]?Ba[mxConstants.STYLE_FONTCOLOR]:"default";U.replaceDefaultColors(new mxCell,Ba);var Ca=mxUtils.bind(this,function(sa){var Aa=-mxUtils.button("",mxUtils.bind(this,function(Ma){U.getModel().beginUpdate();try{for(var ya=H.getSelectionState().cells,Wa=0;Wa<ya.length;Wa++){var Ia=U.getModel().getStyle(ya[Wa]);null!=sa?(mxEvent.isShiftDown(Ma)||(Ia=""==sa.fill||null==sa.fill?mxUtils.setStyle(Ia,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ia,mxConstants.STYLE_FILLCOLOR,sa.fill),Ia=""==sa.gradient||null==sa.gradient?mxUtils.setStyle(Ia,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Ia,mxConstants.STYLE_GRADIENTCOLOR,-sa.gradient),mxEvent.isControlDown(Ma)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ma)||!U.getModel().isVertex(ya[Wa])||(Ia=""==sa.font||null==sa.font?mxUtils.setStyle(Ia,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Ia,mxConstants.STYLE_FONTCOLOR,sa.font))),mxEvent.isAltDown(Ma)||(Ia=""==sa.stroke||null==sa.fill?mxUtils.setStyle(Ia,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ia,mxConstants.STYLE_STROKECOLOR,sa.stroke))):(Ia=mxUtils.setStyle(Ia,mxConstants.STYLE_FILLCOLOR,null),Ia=mxUtils.setStyle(Ia,-mxConstants.STYLE_STROKECOLOR,null),Ia=mxUtils.setStyle(Ia,mxConstants.STYLE_GRADIENTCOLOR,null),U.getModel().isVertex(ya[Wa])&&(Ia=mxUtils.setStyle(Ia,mxConstants.STYLE_FONTCOLOR,null)));U.getModel().setStyle(ya[Wa],Ia)}}finally{U.getModel().endUpdate()}}));Aa.className="geStyleButton";Aa.style.width="36px";Aa.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Aa.style.margin="0px 6px 6px 0px";if(null!=sa){var Ea="1px solid";null!=sa.border&&(Ea=sa.border);if(null!=sa.gradient)Aa.style.backgroundImage=-"linear-gradient("+mxUtils.getLightDarkColor(sa.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(sa.gradient).cssText+" 100%)";else if(sa.fill==mxConstants.NONE)Aa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==sa.fill||""==sa.fill)Aa.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(Ba,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var Ka=mxUtils.getLightDarkColor(sa.fill);Aa.style.backgroundImage="linear-gradient(to right bottom, "+Ka.cssText+" 50%, "+-Ka.light+" 50.3%)"}null==sa.stroke||sa.stroke==mxConstants.NONE?Aa.style.border=Ea+" transparent":""==sa.stroke?Aa.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(Ba,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Ka=mxUtils.getLightDarkColor(sa.stroke),Aa.style.border=Ea+" "+Ka.cssText,Aa.style.borderRightColor=Ka.light,Aa.style.borderBottomColor=Aa.style.borderRightColor);null!=sa.title&&Aa.setAttribute("title",sa.title)}else Ea=mxUtils.getValue(Ba,mxConstants.STYLE_FILLCOLOR,-"#ffffff"),Ka=mxUtils.getValue(Ba,mxConstants.STYLE_STROKECOLOR,"#000000"),Aa.style.backgroundColor=Ea,Aa.style.border="1px solid "+Ka;Aa.style.borderRadius="0";J.appendChild(Aa);null!=sa&&null!=sa.gradient&&(Ea=Aa.cloneNode(!1),Ea.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(sa.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(sa.gradient).light+") 100%)",Ea.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ea.style.backgroundColor=-"transparent",J.appendChild(Ea),Ea.style.marginLeft="-42px",mxEvent.addListener(Ea,"click",function(){Aa.click()}))});J.innerText="";if(null!=za)for(var La=0;La<za.length;La++)0<La&&0==mxUtils.mod(La,4)&&mxUtils.br(J),Ca(za[La])});null==this.format.currentScheme?oa(Math.min(aa.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):oa(this.format.currentScheme);ba=10>=this.defaultColorSchemes.length?28:8;var ra=document.createElement("div");ra.style.cssText="position:absolute;left:10px;top:8px;bottom:"+-ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(ra,"click",mxUtils.bind(this,function(){oa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));-var ua=document.createElement("div");ua.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";1<this.defaultColorSchemes.length&&-(l.appendChild(ra),l.appendChild(ua));mxEvent.addListener(ua,"click",mxUtils.bind(this,function(){oa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));u(ra);u(ua);qa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&l.appendChild(W)}return l}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};-Graph.customFontElements={};Graph.isGoogleFontUrl=function(l){return l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||l.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(l){return Graph.isGoogleFontUrl(l)};Graph.rewriteGoogleFontUrl=function(l){null!=l&&l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(l=Editor.GOOGLE_FONTS_CSS2+l.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return l};Graph.createFontElement=-function(l,u){var H=Graph.fontMapping[u];null==H&&Graph.isCssFontUrl(u)?(l=document.createElement("link"),l.setAttribute("rel","stylesheet"),l.setAttribute("type","text/css"),l.setAttribute("charset","UTF-8"),l.setAttribute("href",Graph.rewriteGoogleFontUrl(u))):(null==H&&(H='@font-face {\nfont-family: "'+l+'";\nsrc: url("'+u+'");\n}'),l=document.createElement("style"),mxUtils.write(l,H));return l};Graph.addRecentCustomFont=function(l,u){};Graph.addFont=function(l,u,H){if(null!=l&&0<l.length&&null!=-u&&0<u.length){var U=l.toLowerCase();if("helvetica"!=U&&"arial"!=l&&"sans-serif"!=U){var J=Graph.customFontElements[U];null!=J&&J.url!=u&&(J.elt.parentNode.removeChild(J.elt),J=null);null==J?(J=u,"http:"==u.substring(0,5)&&(J=PROXY_URL+"?url="+encodeURIComponent(u)),J={name:l,url:u,elt:Graph.createFontElement(l,J)},Graph.customFontElements[U]=J,u=document.getElementsByTagName("head")[0],null!=H&&("link"==J.elt.nodeName.toLowerCase()?(J.elt.onload=H,J.elt.onerror=H):H()),null!=u&&u.appendChild(J.elt)):-null!=H&&H()}else null!=H&&H()}else null!=H&&H();return l};Graph.getFontUrl=function(l,u){l=Graph.customFontElements[l.toLowerCase()];null!=l&&(u=l.url);return u};Graph.processFontAttributes=function(l){l=l.getElementsByTagName("*");for(var u=0;u<l.length;u++){var H=l[u].getAttribute("data-font-src");if(null!=H){var U="FONT"==l[u].nodeName?l[u].getAttribute("face"):l[u].style.fontFamily;null!=U&&Graph.addFont(U,H)}}};Graph.processFontStyle=function(l){if(null!=l){var u=mxUtils.getValue(l,"fontSource",-null);if(null!=u){var H=mxUtils.getValue(l,mxConstants.STYLE_FONTFAMILY,null);if(null!=H)try{Graph.addFont(H,decodeURIComponent(u))}catch(U){}}}return l};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=-"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var f=Graph.prototype.init;Graph.prototype.init=function(){function l(J){u=J}f.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var u=null;mxEvent.addListener(this.container,"mouseenter",l);mxEvent.addListener(this.container,"mousemove",l);mxEvent.addListener(this.container,"mouseleave",function(J){u=null});this.isMouseInsertPoint=function(){return null!=-u};var H=this.getInsertPoint;this.getInsertPoint=function(){return null!=u?this.getPointForEvent(u):H.apply(this,arguments)};var U=this.layoutManager.getLayout;this.layoutManager.getLayout=function(J){var W=this.graph.getCellStyle(J);if(null!=W&&"rack"==W.childLayout){var aa=new mxStackLayout(this.graph,!1);aa.gridSize=null!=W.rackUnitSize?parseFloat(W.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;aa.marginLeft=W.marginLeft||0;aa.marginRight=W.marginRight||0;aa.marginTop=-W.marginTop||0;aa.marginBottom=W.marginBottom||0;aa.allowGaps=W.allowGaps||0;aa.horizontal="1"==mxUtils.getValue(W,"horizontalRack","0");aa.resizeParent=!1;aa.fill=!0;return aa}return U.apply(this,arguments)};this.updateGlobalUrlVariables()};var k=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(l,u){return Graph.processFontStyle(k.apply(this,arguments))};var B=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(l,u,H,U,J,W,aa,-ba,ja,oa,qa,ra){B.apply(this,arguments);Graph.processFontAttributes(ra)};var z=mxText.prototype.redraw;mxText.prototype.redraw=function(){z.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(l,u,H,U){function J(){for(var Ca=ba.getSelectionCells(),La=[],sa=0;sa<Ca.length;sa++)ba.isCellVisible(Ca[sa])&&La.push(Ca[sa]);ba.setSelectionCells(La)}function W(Ca){ba.setHiddenTags(Ca?[]:ja.slice());J();ba.refresh()}-function aa(Ca,La){qa.innerText="";if(0<Ca.length){var sa=document.createElement("table");sa.setAttribute("cellpadding","2");sa.style.boxSizing="border-box";sa.style.tableLayout="fixed";sa.style.width="100%";var Aa=document.createElement("tbody");if(null!=Ca&&0<Ca.length)for(var Ea=0;Ea<Ca.length;Ea++)(function(Ka){function Ma(){var t=ba.getCellsForTags([Ka],null,null,!0);ba.isEnabled()?ba.setSelectionCells(t):ba.highlightCells(t,null,null,70)}var ya=0>mxUtils.indexOf(ba.hiddenTags,Ka),Wa=document.createElement("tr"),-Ia=document.createElement("td");Ia.style.align="center";Ia.style.width="16px";var Xa=document.createElement("img");Xa.setAttribute("src",ya?Editor.visibleImage:Editor.hiddenImage);Xa.setAttribute("title",mxResources.get(ya?"hideIt":"show",[Ka]));mxUtils.setOpacity(Xa,ya?75:25);Xa.className="geAdaptiveAsset";Xa.style.verticalAlign="middle";Xa.style.cursor="pointer";Xa.style.width="16px";if(u||Editor.isDarkMode())Xa.style.filter="invert(100%)";Ia.appendChild(Xa);mxEvent.addListener(Xa,"click",function(t){mxEvent.isShiftDown(t)?-W(0<=mxUtils.indexOf(ba.hiddenTags,Ka)):(ba.toggleHiddenTag(Ka),J(),ba.refresh());mxEvent.consume(t)});Wa.appendChild(Ia);Ia=document.createElement("td");Ia.style.align="center";Ia.style.width="16px";Xa=document.createElement("img");Xa.setAttribute("src",Editor.selectImage);Xa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Xa,ya?75:25);Xa.className="geAdaptiveAsset";Xa.style.verticalAlign="middle";Xa.style.cursor="pointer";Xa.style.width="16px";if(u||Editor.isDarkMode())Xa.style.filter=-"invert(100%)";mxEvent.addListener(Xa,"click",function(t){W(!0);Ma();mxEvent.consume(t)});Ia.appendChild(Xa);Wa.appendChild(Ia);Ia=document.createElement("td");Ia.style.overflow="hidden";Ia.style.whiteSpace="nowrap";Ia.style.textOverflow="ellipsis";Ia.style.verticalAlign="middle";Ia.style.cursor="pointer";Ia.setAttribute("title",Ka);a=document.createElement("a");mxUtils.write(a,Ka);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ya?100:40);Ia.appendChild(a);mxEvent.addListener(Ia,-"click",function(t){if(mxEvent.isShiftDown(t))W(!0),Ma();else if(ya&&0<ba.hiddenTags.length)W(!0);else{var N=ja.slice(),Q=mxUtils.indexOf(N,Ka);N.splice(Q,1);ba.setHiddenTags(N);J();ba.refresh()}mxEvent.consume(t)});Wa.appendChild(Ia);if(ba.isEnabled()){Ia=document.createElement("td");Ia.style.verticalAlign="middle";Ia.style.textAlign="center";Ia.style.width="18px";if(null==La){Ia.style.align="center";Ia.style.width="16px";Xa=document.createElement("img");Xa.setAttribute("src",Editor.trashImage);-Xa.setAttribute("title",mxResources.get("removeIt",[Ka]));mxUtils.setOpacity(Xa,ya?75:25);Xa.className="geAdaptiveAsset";Xa.style.verticalAlign="middle";Xa.style.cursor="pointer";Xa.style.width="16px";if(u||Editor.isDarkMode())Xa.style.filter="invert(100%)";mxEvent.addListener(Xa,"click",function(t){var N=mxUtils.indexOf(ja,Ka);0<=N&&ja.splice(N,1);ba.removeTagsForCells(ba.model.getDescendants(ba.model.getRoot()),[Ka]);ba.refresh();mxEvent.consume(t)});Ia.appendChild(Xa)}else{var Pa=document.createElement("input");-Pa.setAttribute("type","checkbox");Pa.style.margin="0px";Pa.defaultChecked=null!=La&&0<=mxUtils.indexOf(La,Ka);Pa.checked=Pa.defaultChecked;Pa.style.background="transparent";Pa.setAttribute("title",mxResources.get(Pa.defaultChecked?"removeIt":"add",[Ka]));mxEvent.addListener(Pa,"change",function(t){Pa.checked?ba.addTagsForCells(ba.getSelectionCells(),[Ka]):ba.removeTagsForCells(ba.getSelectionCells(),[Ka]);mxEvent.consume(t)});Ia.appendChild(Pa)}Wa.appendChild(Ia)}Aa.appendChild(Wa)})(Ca[Ea]);sa.appendChild(Aa);-qa.appendChild(sa)}}var ba=this,ja=ba.hiddenTags.slice(),oa=document.createElement("div");oa.style.userSelect="none";oa.style.overflow="hidden";oa.style.padding="10px";oa.style.height="100%";var qa=document.createElement("div");qa.style.position="absolute";qa.style.boxSizing="border-box";qa.style.userSelect="none";qa.style.overflow="auto";qa.style.padding="3px";qa.style.left="0px";qa.style.right="0px";qa.style.top="0px";qa.style.bottom="0px";oa.appendChild(qa);ba.addListener(mxEvent.ROOT,function(){ja=-ba.hiddenTags.slice()});var ra=mxUtils.bind(this,function(Ca,La){if(l()){Ca=ba.getAllTags();for(La=0;La<Ca.length;La++)0>mxUtils.indexOf(ja,Ca[La])&&ja.push(Ca[La]);ja.sort();ba.isSelectionEmpty()?aa(ja):aa(ja,ba.getCommonTagsForCells(ba.getSelectionCells()))}});ba.selectionModel.addListener(mxEvent.CHANGE,ra);ba.model.addListener(mxEvent.CHANGE,ra);ba.addListener(mxEvent.REFRESH,ra);var ua=document.createElement("div");ua.className="geToolbarContainer";ua.style.position="absolute";ua.style.display=-"flex";ua.style.bottom="0px";ua.style.left="0px";ua.style.right="0px";ua.style.height="26px";ua.style.overflow="hidden";ua.style.padding="3px 4px 4px 4px";ua.style.borderWidth="1px 0px 0px 0px";ua.style.borderStyle="solid";ua.style.whiteSpace="nowrap";if(ba.isEnabled()){qa.style.bottom="34px";var za=document.createElement("a");za.className="geToolbarButton geAdaptiveAsset geToggleItem";za.style.width="16px";za.style.height="18px";za.style.backgroundPosition="center center";za.style.backgroundRepeat=-"no-repeat";za.style.backgroundSize="20px";za.style.margin="0 2px";za.style.display="inline-block";za.style.cursor="pointer";var Ba=za.cloneNode(!1);Ba.style.backgroundImage="url("+Editor.visibleImage+")";Ba.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(Ba,"click",function(Ca){ba.setHiddenTags([]);mxEvent.isShiftDown(Ca)||(ja=ba.hiddenTags.slice());J();ba.refresh();mxEvent.consume(Ca)});ua.appendChild(Ba);null!=H&&(za=za.cloneNode(!1),za.style.backgroundImage="url("+Editor.plusImage+-")",za.setAttribute("title",mxResources.get("add")),mxEvent.addListener(za,"click",function(Ca){H(ja,function(La){ja=La;ra()});mxEvent.consume(Ca)}),ua.appendChild(za));oa.appendChild(ua)}null!=U&&ua.appendChild(U);return{div:oa,refresh:ra}};Graph.prototype.getCustomFonts=function(){var l=this.extFonts;l=null!=l?l.slice():[];for(var u in Graph.customFontElements){var H=Graph.customFontElements[u];l.push({name:H.name,url:H.url})}return l};Graph.prototype.setFont=function(l,u){Graph.addFont(l,u);var H=-Editor.guid();document.execCommand("fontname",!1,H);for(var U=this.cellEditor.textarea.getElementsByTagName("font"),J=!1,W=0;W<U.length;W++)U[W].getAttribute("face")==H&&(J=!0,U[W].setAttribute("face",l),null!=u?U[W].setAttribute("data-font-src",u):U[W].removeAttribute("data-font-src"));J||document.execCommand("fontname",!1,l)};var C=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return C.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=-function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var l=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=l)for(var u in l)this.globalVars[u]=l[u]}catch(H){null!=window.console&&console.log("Error in vars URL parameter: "+H)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var I=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=-function(l){var u=I.apply(this,arguments);null==u&&null!=this.globalVars&&(u=this.globalVars[l]);return u};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var l=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(l.ownerDocument)).decode(l)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=function(l,u,H,U,J,W,aa,ba,ja,oa,qa,ra,ua,za,Ba,Ca){var La=L.apply(this,-arguments);if(null!=ra){var sa=La.getAttribute("style");null==sa&&(sa="");ra="auto"==ra?"none"==this.getAdaptiveColors()?"light":"light dark":ra;La.setAttribute("style",sa+(" color-scheme: "+ra+";"))}var Aa=this.getCustomFonts();if(qa&&0<Aa.length){var Ea=La.ownerDocument;sa=null!=Ea.createElementNS?Ea.createElementNS(mxConstants.NS_SVG,"style"):Ea.createElement("style");null!=Ea.setAttributeNS?sa.setAttributeNS("type","text/css"):sa.setAttribute("type","text/css");for(var Ka="",Ma="",ya=0;ya<Aa.length;ya++){var Wa=-Aa[ya].name,Ia=Aa[ya].url;Graph.isCssFontUrl(Ia)?Ka+="@import url("+Graph.rewriteGoogleFontUrl(Ia)+");\n":Ma+='@font-face {\nfont-family: "'+Wa+'";\nsrc: url("'+Ia+'");\n}\n'}sa.appendChild(Ea.createTextNode(Ka+Ma));La.getElementsByTagName("defs")[0].appendChild(sa)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(La);this.mathEnabled&&(document.body.appendChild(La),Editor.MathJaxRender(La),La.parentNode.removeChild(La),sa=La.ownerDocument.getElementById("MJX-SVG-styles"),-null!=sa&&La.getElementsByTagName("defs")[0].appendChild(sa.cloneNode(!0)));return La};var K=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(l){K.apply(this,arguments);null!=l.secondLabel&&(l.secondLabel.destroy(),l.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(l){return[l.shape,l.text,l.secondLabel,l.control]};var O=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){O.apply(this,arguments);this.enumerationState=-0};var da=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(l){null!=l.shape&&this.redrawEnumerationState(l);return da.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(l){l=decodeURIComponent(mxUtils.getValue(l.style,"enumerateValue",""));""==l&&(l=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(l)+"</div>"};mxGraphView.prototype.redrawEnumerationState=-function(l){var u="1"==mxUtils.getValue(l.style,"enumerate",0);u&&null==l.secondLabel?(l.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),l.secondLabel.size=12,l.secondLabel.state=l,l.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(l,l.secondLabel)):u||null==l.secondLabel||(l.secondLabel.destroy(),l.secondLabel=null);u=l.secondLabel;if(null!=u){var H=l.view.scale,U=this.createEnumerationValue(l);l=this.graph.model.isVertex(l.cell)?-new mxRectangle(l.x+l.width-4*H,l.y+4*H,0,0):mxRectangle.fromPoint(l.view.getPoint(l));u.bounds.equals(l)&&u.value==U&&u.scale==H||(u.bounds=l,u.value=U,u.scale=H,u.redraw())}};var ea=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ea.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};-var ca=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){ca.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(l,u){"data:action/json,"==l.substring(0,17)&&(l=JSON.parse(l.substring(17)),null!=l.actions&&this.executeCustomActions(l.actions,null,u))};Graph.prototype.executeCustomActions=function(l,u,H){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),-null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var U=!1,J=0,W=0,aa=mxUtils.bind(this,function(){U||(U=!0,this.model.beginUpdate())}),ba=mxUtils.bind(this,function(){U&&(U=!1,this.model.endUpdate())}),ja=mxUtils.bind(this,function(){0<J&&J--;0==J&&oa()}),oa=mxUtils.bind(this,function(){if(W<l.length){var qa=this.stoppingCustomActions,ra=l[W++],ua=[];if(null!=ra.open)if(ba(),this.isCustomLink(ra.open)){if(!this.customLinkClicked(ra.open,-H))return}else this.openLink(ra.open);null==ra.wait||qa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ja()}),J++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=ra.wait?parseInt(ra.wait):1E3),ba());null!=ra.opacity&&null!=ra.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ra.opacity,!0)),ra.opacity.value);null!=ra.fadeIn&&(J++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ra.fadeIn,-!0)),0,1,ja,qa?0:ra.fadeIn.delay));null!=ra.fadeOut&&(J++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ra.fadeOut,!0)),1,0,ja,qa?0:ra.fadeOut.delay));null!=ra.wipeIn&&(ua=ua.concat(this.createWipeAnimations(this.getCellsForAction(ra.wipeIn,!0),!0)));null!=ra.wipeOut&&(ua=ua.concat(this.createWipeAnimations(this.getCellsForAction(ra.wipeOut,!0),!1)));null!=ra.toggle&&(aa(),this.toggleCells(this.getCellsForAction(ra.toggle,!0)));if(null!=ra.show){aa();var za=this.getCellsForAction(ra.show,-!0);Graph.setOpacityForNodes(this.getNodesForCells(za),1);this.setCellsVisible(za,!0)}null!=ra.hide&&(aa(),za=this.getCellsForAction(ra.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(za),0),this.setCellsVisible(za,!1));null!=ra.toggleStyle&&null!=ra.toggleStyle.key&&(aa(),this.toggleCellStyles(ra.toggleStyle.key,null!=ra.toggleStyle.defaultValue?ra.toggleStyle.defaultValue:"0",this.getCellsForAction(ra.toggleStyle,!0)));null!=ra.style&&null!=ra.style.key&&(aa(),this.setCellStyles(ra.style.key,-ra.style.value,this.getCellsForAction(ra.style,!0)));za=[];null!=ra.select&&this.isEnabled()&&(za=this.getCellsForAction(ra.select),this.setSelectionCells(za));null!=ra.highlight&&(za=this.getCellsForAction(ra.highlight),this.highlightCells(za,ra.highlight.color,ra.highlight.duration,ra.highlight.opacity));null!=ra.scroll&&(za=this.getCellsForAction(ra.scroll));null!=ra.viewbox&&this.fitWindow(ra.viewbox,ra.viewbox.border);0<za.length&&this.scrollCellToVisible(za[0]);null!=H&&null!=ra.explore&&Graph.exploreFromCell(this,-H,ra.explore);if(null!=ra.tags){if(null!=ra.tags.toggle){var Ba=ra.tags.toggle;0==Ba.length&&(Ba=this.getAllTags());for(za=0;za<Ba.length;za++)this.toggleHiddenTag(Ba[za])}Ba=null;null!=ra.tags.hidden&&(null==Ba&&(Ba=[]),Ba=Ba.concat(ra.tags.hidden));if(null!=ra.tags.visible){null==Ba&&(Ba=[]);var Ca=this.getAllTags();for(za=0;za<Ca.length;za++)0>mxUtils.indexOf(ra.tags.visible,Ca[za])&&0>mxUtils.indexOf(Ba,Ca[za])&&Ba.push(Ca[za])}null!=Ba&&this.setHiddenTags(Ba);this.refresh()}0<ua.length&&(J++,-this.executeAnimations(ua,ja,qa?1:ra.steps,qa?0:ra.delay));0==J?oa():ba()}else this.stoppingCustomActions=this.executingCustomActions=!1,ba(),null!=u&&u()});oa()}};Graph.prototype.doUpdateCustomLinksForCell=function(l,u){var H=this.getLinkForCell(u);null!=H&&"data:action/json,"==H.substring(0,17)&&this.setLinkForCell(u,this.updateCustomLink(l,H));if(this.isHtmlLabel(u)){var U=document.createElement("div");U.innerHTML=Graph.sanitizeHtml(this.getLabel(u));for(var J=U.getElementsByTagName("a"),W=!1,-aa=0;aa<J.length;aa++)H=J[aa].getAttribute("href"),null!=H&&"data:action/json,"==H.substring(0,17)&&(J[aa].setAttribute("href",this.updateCustomLink(l,H)),W=!0);W&&this.labelChanged(u,U.innerHTML)}};Graph.prototype.updateCustomLink=function(l,u){if("data:action/json,"==u.substring(0,17))try{var H=JSON.parse(u.substring(17));null!=H.actions&&(this.updateCustomLinkActions(l,H.actions),u="data:action/json,"+JSON.stringify(H))}catch(U){}return u};Graph.prototype.updateCustomLinkActions=function(l,u){for(var H=-0;H<u.length;H++){var U=u[H],J;for(J in U)this.updateCustomLinkAction(l,U[J],"cells"),this.updateCustomLinkAction(l,U[J],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(l,u,H){if(null!=u&&null!=u[H]){for(var U=[],J=0;J<u[H].length;J++)if("*"==u[H][J])U.push(u[H][J]);else{var W=l[u[H][J]];null!=W?""!=W&&U.push(W):U.push(u[H][J])}u[H]=U}};Graph.prototype.getCellsForAction=function(l,u){u=this.getCellsById(l.cells).concat(this.getCellsForTags(l.tags,null,u));if(null!=l.excludeCells){for(var H=-[],U=0;U<u.length;U++)0>l.excludeCells.indexOf(u[U].id)&&H.push(u[U]);u=H}return u};Graph.prototype.getCellsById=function(l){var u=[];if(null!=l)for(var H=0;H<l.length;H++)if("*"==l[H]){var U=this.model.getRoot();u=u.concat(this.model.filterDescendants(function(W){return W!=U},U))}else{var J=this.model.getCell(l[H]);null!=J&&u.push(J)}return u};var V=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(l){return V.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(l))};-Graph.prototype.setHiddenTags=function(l){this.hiddenTags=l;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(l){var u=mxUtils.indexOf(this.hiddenTags,l);0>u?this.hiddenTags.push(l):0<=u&&this.hiddenTags.splice(u,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(l){if(null==l||0==l.length||0==this.hiddenTags.length)return!1;l=l.split(" ");if(l.length>this.hiddenTags.length)return!1;for(var u=0;u<l.length;u++)if(0>-mxUtils.indexOf(this.hiddenTags,l[u]))return!1;return!0};Graph.prototype.getCellsForTags=function(l,u,H,U){var J=[];if(null!=l){u=null!=u?u:this.model.getDescendants(this.model.getRoot());for(var W=0,aa={},ba=0;ba<l.length;ba++)0<l[ba].length&&(aa[l[ba]]=!0,W++);for(ba=0;ba<u.length;ba++)if(H&&this.model.getParent(u[ba])==this.model.root||this.model.isVertex(u[ba])||this.model.isEdge(u[ba])){var ja=this.getTagsForCell(u[ba]),oa=!1;if(0<ja.length&&(ja=ja.split(" "),ja.length>=l.length)){for(var qa=-oa=0;qa<ja.length&&oa<W;qa++)null!=aa[ja[qa]]&&oa++;oa=oa==W}oa&&(1!=U||this.isCellVisible(u[ba]))&&J.push(u[ba])}}return J};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(l){for(var u=null,H=[],U=0;U<l.length;U++){var J=this.getTagsForCell(l[U]);H=[];if(0<J.length){J=J.split(" ");for(var W={},aa=0;aa<J.length;aa++)if(null==u||null!=u[J[aa]])W[J[aa]]=!0,H.push(J[aa]);u=W}else return[]}return H};-Graph.prototype.getTagsForCells=function(l){for(var u=[],H={},U=0;U<l.length;U++){var J=this.getTagsForCell(l[U]);if(0<J.length){J=J.split(" ");for(var W=0;W<J.length;W++)null==H[J[W]]&&(H[J[W]]=!0,u.push(J[W]))}}return u};Graph.prototype.getTagsForCell=function(l){return this.getAttributeForCell(l,"tags","")};Graph.prototype.addTagsForCells=function(l,u){if(0<l.length&&0<u.length){this.model.beginUpdate();try{for(var H=0;H<l.length;H++){for(var U=this.getTagsForCell(l[H]),J=U.split(" "),W=!1,aa=-0;aa<u.length;aa++){var ba=mxUtils.trim(u[aa]);""!=ba&&0>mxUtils.indexOf(J,ba)&&(U=0<U.length?U+" "+ba:ba,W=!0)}W&&this.setAttributeForCell(l[H],"tags",U)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(l,u){if(0<l.length&&0<u.length){this.model.beginUpdate();try{for(var H=0;H<l.length;H++){var U=this.getTagsForCell(l[H]);if(0<U.length){for(var J=U.split(" "),W=!1,aa=0;aa<u.length;aa++){var ba=mxUtils.indexOf(J,u[aa]);0<=ba&&(J.splice(ba,1),W=!0)}W&&this.setAttributeForCell(l[H],-"tags",J.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(l){this.model.beginUpdate();try{for(var u=0;u<l.length;u++)this.model.setVisible(l[u],!this.model.isVisible(l[u]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(l,u){this.model.beginUpdate();try{for(var H=0;H<l.length;H++)this.model.setVisible(l[H],u)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(l,u,H,U){for(var J=0;J<l.length;J++)this.highlightCell(l[J],-u,H,U)};Graph.prototype.highlightCell=function(l,u,H,U,J){u=null!=u?u:mxConstants.DEFAULT_VALID_COLOR;H=null!=H?H:1E3;l=this.view.getState(l);var W=null;null!=l&&(J=null!=J?J:4,J=Math.max(J+1,mxUtils.getValue(l.style,mxConstants.STYLE_STROKEWIDTH,1)+J),W=new mxCellHighlight(this,u,J,!1),null!=U&&(W.opacity=U),W.highlight(l),window.setTimeout(function(){null!=W.shape&&(mxUtils.setPrefixedStyle(W.shape.node.style,"transition","all 1200ms ease-in-out"),W.shape.node.style.opacity=0);window.setTimeout(function(){W.destroy()},-1200)},H));return W};Graph.prototype.addSvgShadow=function(l,u,H,U){H=null!=H?H:!1;U=null!=U?U:!0;var J=l.ownerDocument,W=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"filter"):J.createElement("filter");W.setAttribute("id",this.shadowId);var aa=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):J.createElement("feGaussianBlur");aa.setAttribute("in","SourceAlpha");aa.setAttribute("stdDeviation",this.svgShadowBlur);aa.setAttribute("result","blur");W.appendChild(aa);-aa=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"feOffset"):J.createElement("feOffset");aa.setAttribute("in","blur");aa.setAttribute("dx",this.svgShadowSize);aa.setAttribute("dy",this.svgShadowSize);aa.setAttribute("result","offsetBlur");W.appendChild(aa);aa=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"feFlood"):J.createElement("feFlood");aa.setAttribute("flood-color",this.svgShadowColor);aa.setAttribute("flood-opacity",this.svgShadowOpacity);aa.setAttribute("result",-"offsetColor");W.appendChild(aa);aa=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"feComposite"):J.createElement("feComposite");aa.setAttribute("in","offsetColor");aa.setAttribute("in2","offsetBlur");aa.setAttribute("operator","in");aa.setAttribute("result","offsetBlur");W.appendChild(aa);aa=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"feBlend"):J.createElement("feBlend");aa.setAttribute("in","SourceGraphic");aa.setAttribute("in2","offsetBlur");W.appendChild(aa);aa=-l.getElementsByTagName("defs");0==aa.length?(J=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"defs"):J.createElement("defs"),null!=l.firstChild?l.insertBefore(J,l.firstChild):l.appendChild(J)):J=aa[0];J.appendChild(W);H||(u=null!=u?u:l.getElementsByTagName("g")[0],null!=u&&(u.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(l.getAttribute("width")))&&U&&(l.setAttribute("width",parseInt(l.getAttribute("width"))+6),l.setAttribute("height",parseInt(l.getAttribute("height"))+-6),u=l.getAttribute("viewBox"),null!=u&&0<u.length&&(u=u.split(" "),3<u.length&&(w=parseFloat(u[2])+6,h=parseFloat(u[3])+6,l.setAttribute("viewBox",u[0]+" "+u[1]+" "+w+" "+h))))));return W};Graph.prototype.setShadowVisible=function(l,u){mxClient.IS_SVG&&!mxClient.IS_SF&&(u=null!=u?u:!0,(this.shadowVisible=l)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),u&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=-function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var l=this.model.getChildCount(this.model.root),u=0;do var H=this.model.getChildAt(this.model.root,u);while(u++<l&&"1"==mxUtils.getValue(this.getCellStyle(H),"locked","0"));null!=H&&this.setDefaultParent(H)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=+{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,A,J,U){if(null!=A){var P=mxUtils.bind(this,function(W){if(null!=W)if(J)for(var aa=0;aa<W.length;aa++){if("function"!==typeof W[aa].isVisible||W[aa].isVisible(U,this))A[W[aa].name]=W[aa]}else for(var ja in A){var pa=!1;for(aa=+0;aa<W.length;aa++)if(W[aa].name==ja&&W[aa].type==A[ja].type){pa=!0;break}pa||delete A[ja]}}),T=this.editorUi.editor.graph.view.getState(k);null!=T&&null!=T.shape&&(T.shape.commonCustomPropAdded||(T.shape.commonCustomPropAdded=!0,T.shape.customProperties=T.shape.customProperties||[],T.cell.vertex?Array.prototype.push.apply(T.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(T.shape.customProperties,Editor.commonEdgeProperties)),P(T.shape.customProperties));k=k.getAttribute("customProperties");+if(null!=k)try{P(JSON.parse(k))}catch(W){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var A={},J=k.vertices,U=k.edges,P=0;P<J.length;P++)this.findCommonProperties(J[P],A,+0==P,k);for(P=0;P<U.length;P++)this.findCommonProperties(U[P],A,0==J.length&&0==P,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,k))}};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var A=this.editorUi.getSelectionState();1==A.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=A.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);f.apply(this,+arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,A,J,U){function P(Da,x,M,Q,V){if(null!=M.valueChanged)M.valueChanged(x,V);else{wa.getModel().beginUpdate();try{V=[];var ia=[];if(null!=M.index){for(var ka=[],oa=M.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Da;)ka.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;M.index<ka.length?null!=Q?ka.splice(Q,1):ka[M.index]=x:ka.push(x);null!=M.size&&ka.length>M.size&&(ka=ka.slice(0,+M.size));x=ka.join(",");null!=M.countProperty&&(wa.setCellStyles(M.countProperty,ka.length,wa.getSelectionCells()),V.push(M.countProperty),ia.push(ka.length))}wa.setCellStyles(Da,x,wa.getSelectionCells());V.push(Da);ia.push(x);if(null!=M.dependentProps)for(Da=0;Da<M.dependentProps.length;Da++){var xa=M.dependentPropsDefVal[Da],ta=M.dependentPropsVals[Da];if(ta.length>x)ta=ta.slice(0,x);else for(var ua=ta.length;ua<x;ua++)ta.push(xa);ta=ta.join(",");wa.setCellStyles(M.dependentProps[Da],ta,wa.getSelectionCells());+V.push(M.dependentProps[Da]);ia.push(ta)}if("function"==typeof M.onChange)M.onChange(wa,x);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",ia,"cells",wa.getSelectionCells()))}finally{wa.getModel().endUpdate()}}}function T(Da,x,M){var Q=mxUtils.getOffset(k,!0),V=mxUtils.getOffset(Da,!0);x.style.position="absolute";x.style.left=V.x-Q.x+"px";x.style.top=V.y-Q.y+"px";x.style.width=Da.offsetWidth+"px";x.style.height=Da.offsetHeight-(M?4:0)+"px";x.style.zIndex=5}function W(Da,x,+M){function Q(ia){if(null==ia||ia==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ia)V.style.background="";else{var ka=mxUtils.getLightDarkColor(ia);mxUtils.isLightDarkColor(ia)&&ka.light!=ka.dark?V.style.background="linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":V.style.background=ia}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle=+"solid";V.style.borderWidth="1px";Q(x);btn=mxUtils.button("",mxUtils.bind(qa,function(ia){this.editorUi.pickColor(x,function(ka){P(Da,ka,M);Q(ka)});mxEvent.consume(ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function aa(Da,x,M,Q,V,ia,ka){null!=x&&(x=x.split(","),Ba.push({name:Da,values:x,type:M,defVal:Q,countProperty:V,parentRow:ia,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",+mxUtils.bind(qa,function(oa){for(var xa=ia,ta=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Da)xa=xa.nextSibling,ta++;else break;var ua={type:M,parentRow:ia,index:ta,isDeletable:!0,defVal:Q,countProperty:V};ta=sa(Da,"",ua,0==ta%2,ka);P(Da,Q,ua);xa.parentNode.insertBefore(ta,xa.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ja(Da,x,M,Q,V,ia,ka){if(0<V){var oa=Array(V);x=null!=x?x.split(","):[];+for(var xa=0;xa<V;xa++)oa[xa]=null!=x[xa]?x[xa]:null!=Q?Q:"";Ba.push({name:Da,values:oa,type:M,defVal:Q,parentRow:ia,flipBkg:ka,size:V})}return document.createElement("div")}function pa(Da,x,M){var Q=document.createElement("input");Q.type="checkbox";Q.checked="1"==x;mxEvent.addListener(Q,"change",function(){P(Da,Q.checked?"1":"0",M)});return Q}function sa(Da,x,M,Q,V){var ia=M.dispName,ka=M.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";+oa.setAttribute("data-pName",Da);oa.setAttribute("data-pValue",x);Q=!1;null!=M.index&&(oa.setAttribute("data-index",M.index),ia=(null!=ia?ia:"")+"["+M.index+"]",Q=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ia=mxResources.get(ia,null,ia);mxUtils.write(xa,ia);xa.setAttribute("title",ia);Q&&(xa.style.textAlign="right");oa.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";xa.setAttribute("title",null!=x?x:mxResources.get("none"));if("color"==ka)xa.appendChild(W(Da,+x,M));else if("bool"==ka||"boolean"==ka)xa.appendChild(pa(Da,x,M));else if("enum"==ka){var ta=M.enumList;for(V=0;V<ta.length;V++)if(ia=ta[V],ia.val==x){mxUtils.write(xa,mxResources.get(ia.dispName,null,ia.dispName));break}mxEvent.addListener(xa,"click",mxUtils.bind(qa,function(){var ua=document.createElement("select"),Fa=null;T(xa,ua);for(var Na=0;Na<ta.length;Na++){var Wa=ta[Na],Xa=document.createElement("option");Xa.value=mxUtils.htmlEntities(Wa.val);mxUtils.write(Xa,mxResources.get(Wa.dispName,+null,Wa.dispName));ua.appendChild(Xa);null==Wa.val&&(Xa.value="null",Fa=Xa)}ua.value=null==x&&null!=Fa?"null":x;k.appendChild(ua);mxEvent.addListener(ua,"change",function(){var ab=mxUtils.htmlEntities(ua.value);if(ua[ua.selectedIndex]==Fa||"null"==ab.value)ab=null;P(Da,ab,M)});ua.focus();mxEvent.addListener(ua,"blur",function(){k.removeChild(ua)})}))}else"dynamicArr"==ka?xa.appendChild(aa(Da,x,M.subType,M.subDefVal,M.countProperty,oa,V)):"staticArr"==ka?xa.appendChild(ja(Da,x,M.subType,M.subDefVal,+M.size,oa,V)):"readOnly"==ka?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=x,V.style.borderWidth="0px","id"==Da?(V.style.width="190px",V.style.position="relative",V.style.right="6px",V.style.float="right",V.style.background="none",V.style.textAlign="right",oa.firstChild.setAttribute("colspan","2"),V.setAttribute("title",x),oa.firstChild.appendChild(V)):(V.style.width="96px",xa.appendChild(V))):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(x)),mxEvent.addListener(xa,+"click",mxUtils.bind(qa,function(){function ua(){var Na=Fa.value;Na=0==Na.length&&"string"!=ka&&"numbers"!=ka?0:Na;M.allowAuto&&(null!=Na.trim&&"auto"==Na.trim().toLowerCase()?(Na="auto",ka="string"):(Na=parseFloat(Na),Na=isNaN(Na)?0:Na));null!=M.min&&Na<M.min?Na=M.min:null!=M.max&&Na>M.max&&(Na=M.max);var Wa=null;try{Wa="numbers"==ka?Na.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Na):Na)+"")}catch(Xa){}P(Da,Wa,M,null,Fa)}var Fa=document.createElement("input");T(xa,+Fa,!0);Fa.value=decodeURIComponent(x);Fa.className="gePropEditor";"int"!=ka&&"float"!=ka||M.allowAuto||(Fa.type="number",Fa.step="int"==ka?"1":"any",null!=M.min&&(Fa.min=parseFloat(M.min)),null!=M.max&&(Fa.max=parseFloat(M.max)));k.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Na){13==Na.keyCode&&ua()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){ua()})})));M.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(ua){P(Da,"",M,M.index);mxEvent.consume(ua)})),V.style.height=+"16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",xa.appendChild(V));oa.appendChild(xa);return oa}var qa=this,wa=this.editorUi.editor.graph,Ba=[];k.style.position="relative";k.style.padding="0";var za=document.createElement("table");za.className="geProperties";za.style.whiteSpace="nowrap";za.style.width="100%";var Ea=document.createElement("tr");Ea.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";ra.style.paddingLeft="16px";ra.style.backgroundRepeat=+"no-repeat";ra.style.backgroundPosition="-2px 50%";ra.style.backgroundSize="20px";mxUtils.write(ra,mxResources.get("property"));Ea.style.cursor="pointer";var ya=function(){var Da=za.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){ra.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var x="none";for(var M=k.childNodes.length-1;0<=M;M--)try{var Q=k.childNodes[M],V=Q.nodeName.toUpperCase();"INPUT"!=V&&"SELECT"!=V||k.removeChild(Q)}catch(ia){}}else ra.style.backgroundImage=+"url('"+Editor.arrowDownImage+"')",x="";for(M=0;M<Da.length;M++)Da[M].style.display=x};mxEvent.addListener(Ea,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;ya()});Ea.appendChild(ra);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Ea.appendChild(Ca);za.appendChild(Ea);var Ma=Ca=!1;Ea=null;1==J.vertices.length&&0==J.edges.length?Ea=J.vertices[0].id:0==J.vertices.length&&1==+J.edges.length&&(Ea=J.edges[0].id);null==Ea||U||za.appendChild(sa("id",mxUtils.htmlEntities(Ea),{dispName:"id",type:"readOnly"},!0,!1));for(var Ha in A)if(U=A[Ha],"function"!=typeof U.isVisible||U.isVisible(J,this)){var Aa=null!=U.getValue?U.getValue():null!=J.style[Ha]?mxUtils.htmlEntities(J.style[Ha]+""):null!=U.getDefaultValue?U.getDefaultValue(J,this):U.defVal;if("separator"==U.type)Ma=!Ma;else{if("staticArr"==U.type)U.size=parseInt(J.style[U.sizeProperty]||A[U.sizeProperty].defVal)||0;else if(null!=+U.dependentProps){var Ra=U.dependentProps,Za=[],La=[];for(Ea=0;Ea<Ra.length;Ea++){var $a=J.style[Ra[Ea]];La.push(A[Ra[Ea]].subDefVal);Za.push(null!=$a?$a.split(","):[])}U.dependentPropsDefVal=La;U.dependentPropsVals=Za}za.appendChild(sa(Ha,Aa,U,Ca,Ma));Ca=!Ca}}for(Ea=0;Ea<Ba.length;Ea++)for(U=Ba[Ea],A=U.parentRow,J=0;J<U.values.length;J++)Ha=sa(U.name,U.values[J],{type:U.type,parentRow:U.parentRow,isDeletable:U.isDeletable,index:J,defVal:U.defVal,countProperty:U.countProperty,size:U.size},0==J%2,+U.flipBkg),A.parentNode.insertBefore(Ha,A.nextSibling),A=Ha;k.appendChild(za);ya();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var A=function(Ba){mxEvent.addListener(Ba,"mouseenter",function(){Ba.style.opacity="1"});mxEvent.addListener(Ba,"mouseleave",function(){Ba.style.opacity="0.5"})},J=this.editorUi,U=J.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";P.style.paddingRight="20px";k.style.paddingLeft=+"16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(P);var T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.position="relative";T.style.textAlign="center";T.style.width="210px";for(var W=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var ja=document.createElement("div");ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background=+"transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Ba){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){pa(Ba)}))})(aa);W.push(ja);T.appendChild(ja)}var pa=mxUtils.bind(this,function(Ba){null!=W[Ba]&&(null!=this.format.currentScheme&&null!=W[this.format.currentScheme]&&(W[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,sa(this.defaultColorSchemes[this.format.currentScheme]),W[this.format.currentScheme].style.background="#84d7ff")}),+sa=mxUtils.bind(this,function(Ba){var za=mxUtils.clone(U.defaultVertexStyle);za[mxConstants.STYLE_STROKECOLOR]=null!=za[mxConstants.STYLE_STROKECOLOR]?za[mxConstants.STYLE_STROKECOLOR]:"default";za[mxConstants.STYLE_FILLCOLOR]=null!=za[mxConstants.STYLE_FILLCOLOR]?za[mxConstants.STYLE_FILLCOLOR]:"default";za[mxConstants.STYLE_FONTCOLOR]=null!=za[mxConstants.STYLE_FONTCOLOR]?za[mxConstants.STYLE_FONTCOLOR]:"default";U.replaceDefaultColors(new mxCell,za);var Ea=mxUtils.bind(this,function(ya){var Ca=+mxUtils.button("",mxUtils.bind(this,function(Aa){U.getModel().beginUpdate();try{for(var Ra=J.getSelectionState().cells,Za=0;Za<Ra.length;Za++){var La=U.getModel().getStyle(Ra[Za]);null!=ya?(mxEvent.isShiftDown(Aa)||(La=""==ya.fill||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,ya.fill),La=""==ya.gradient||null==ya.gradient?mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,+ya.gradient),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!U.getModel().isVertex(Ra[Za])||(La=""==ya.font||null==ya.font?mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,ya.font))),mxEvent.isAltDown(Aa)||(La=""==ya.stroke||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,ya.stroke))):(La=mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null),La=mxUtils.setStyle(La,+mxConstants.STYLE_STROKECOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null),U.getModel().isVertex(Ra[Za])&&(La=mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null)));U.getModel().setStyle(Ra[Za],La)}}finally{U.getModel().endUpdate()}}));Ca.className="geStyleButton";Ca.style.width="36px";Ca.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ca.style.margin="0px 6px 6px 0px";if(null!=ya){var Ma="1px solid";null!=ya.border&&(Ma=ya.border);if(null!=ya.gradient)Ca.style.backgroundImage=+"linear-gradient("+mxUtils.getLightDarkColor(ya.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ya.gradient).cssText+" 100%)";else if(ya.fill==mxConstants.NONE)Ca.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ya.fill||""==ya.fill)Ca.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var Ha=mxUtils.getLightDarkColor(ya.fill);Ca.style.backgroundImage="linear-gradient(to right bottom, "+Ha.cssText+" 50%, "++Ha.light+" 50.3%)"}null==ya.stroke||ya.stroke==mxConstants.NONE?Ca.style.border=Ma+" transparent":""==ya.stroke?Ca.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Ha=mxUtils.getLightDarkColor(ya.stroke),Ca.style.border=Ma+" "+Ha.cssText,Ca.style.borderRightColor=Ha.light,Ca.style.borderBottomColor=Ca.style.borderRightColor);null!=ya.title&&Ca.setAttribute("title",ya.title)}else Ma=mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,+"#ffffff"),Ha=mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000"),Ca.style.backgroundColor=Ma,Ca.style.border="1px solid "+Ha;Ca.style.borderRadius="0";P.appendChild(Ca);null!=ya&&null!=ya.gradient&&(Ma=Ca.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(ya.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ya.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor=+"transparent",P.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ca.click()}))});P.innerText="";if(null!=Ba)for(var ra=0;ra<Ba.length;ra++)0<ra&&0==mxUtils.mod(ra,4)&&mxUtils.br(P),Ea(Ba[ra])});null==this.format.currentScheme?pa(Math.min(W.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):pa(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:10px;top:8px;bottom:"++aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));+var wa=document.createElement("div");wa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";1<this.defaultColorSchemes.length&&+(k.appendChild(qa),k.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(qa);A(wa);sa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(T)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};+Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=+function(k,A){var J=Graph.fontMapping[A];null==J&&Graph.isCssFontUrl(A)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(A))):(null==J&&(J='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+A+'");\n}'),k=document.createElement("style"),mxUtils.write(k,J));return k};Graph.addRecentCustomFont=function(k,A){};Graph.addFont=function(k,A,J){if(null!=k&&0<k.length&&null!=+A&&0<A.length){var U=k.toLowerCase();if("helvetica"!=U&&"arial"!=k&&"sans-serif"!=U){var P=Graph.customFontElements[U];null!=P&&P.url!=A&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=A,"http:"==A.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(A)),P={name:k,url:A,elt:Graph.createFontElement(k,P)},Graph.customFontElements[U]=P,A=document.getElementsByTagName("head")[0],null!=J&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=J,P.elt.onerror=J):J()),null!=A&&A.appendChild(P.elt)):+null!=J&&J()}else null!=J&&J()}else null!=J&&J();return k};Graph.getFontUrl=function(k,A){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(A=k.url);return A};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var A=0;A<k.length;A++){var J=k[A].getAttribute("data-font-src");if(null!=J){var U="FONT"==k[A].nodeName?k[A].getAttribute("face"):k[A].style.fontFamily;null!=U&&Graph.addFont(U,J)}}};Graph.processFontStyle=function(k){if(null!=k){var A=mxUtils.getValue(k,"fontSource",+null);if(null!=A){var J=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=J)try{Graph.addFont(J,decodeURIComponent(A))}catch(U){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=+"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var l=Graph.prototype.init;Graph.prototype.init=function(){function k(P){A=P}l.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(P){A=null});this.isMouseInsertPoint=function(){return null!=+A};var J=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):J.apply(this,arguments)};var U=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var T=this.graph.getCellStyle(P);if(null!=T&&"rack"==T.childLayout){var W=new mxStackLayout(this.graph,!1);W.gridSize=null!=T.rackUnitSize?parseFloat(T.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;W.marginLeft=T.marginLeft||0;W.marginRight=T.marginRight||0;W.marginTop=+T.marginTop||0;W.marginBottom=T.marginBottom||0;W.allowGaps=T.allowGaps||0;W.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");W.resizeParent=!1;W.fill=!0;return W}return U.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,A){return Graph.processFontStyle(t.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,A,J,U,P,T,W,aa,ja,+pa,sa,qa){z.apply(this,arguments);Graph.processFontAttributes(qa)};var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,A,J,U){function P(){for(var Ea=aa.getSelectionCells(),ra=[],ya=0;ya<Ea.length;ya++)aa.isCellVisible(Ea[ya])&&ra.push(Ea[ya]);aa.setSelectionCells(ra)}function T(Ea){aa.setHiddenTags(Ea?[]:ja.slice());P();aa.refresh()}+function W(Ea,ra){sa.innerText="";if(0<Ea.length){var ya=document.createElement("table");ya.setAttribute("cellpadding","2");ya.style.boxSizing="border-box";ya.style.tableLayout="fixed";ya.style.width="100%";var Ca=document.createElement("tbody");if(null!=Ea&&0<Ea.length)for(var Ma=0;Ma<Ea.length;Ma++)(function(Ha){function Aa(){var x=aa.getCellsForTags([Ha],null,null,!0);aa.isEnabled()?aa.setSelectionCells(x):aa.highlightCells(x,null,null,70)}var Ra=0>mxUtils.indexOf(aa.hiddenTags,Ha),Za=document.createElement("tr"),+La=document.createElement("td");La.style.align="center";La.style.width="16px";var $a=document.createElement("img");$a.setAttribute("src",Ra?Editor.visibleImage:Editor.hiddenImage);$a.setAttribute("title",mxResources.get(Ra?"hideIt":"show",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";La.appendChild($a);mxEvent.addListener($a,"click",function(x){mxEvent.isShiftDown(x)?+T(0<=mxUtils.indexOf(aa.hiddenTags,Ha)):(aa.toggleHiddenTag(Ha),P(),aa.refresh());mxEvent.consume(x)});Za.appendChild(La);La=document.createElement("td");La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.selectImage);$a.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter=+"invert(100%)";mxEvent.addListener($a,"click",function(x){T(!0);Aa();mxEvent.consume(x)});La.appendChild($a);Za.appendChild(La);La=document.createElement("td");La.style.overflow="hidden";La.style.whiteSpace="nowrap";La.style.textOverflow="ellipsis";La.style.verticalAlign="middle";La.style.cursor="pointer";La.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ra?100:40);La.appendChild(a);mxEvent.addListener(La,+"click",function(x){if(mxEvent.isShiftDown(x))T(!0),Aa();else if(Ra&&0<aa.hiddenTags.length)T(!0);else{var M=ja.slice(),Q=mxUtils.indexOf(M,Ha);M.splice(Q,1);aa.setHiddenTags(M);P();aa.refresh()}mxEvent.consume(x)});Za.appendChild(La);if(aa.isEnabled()){La=document.createElement("td");La.style.verticalAlign="middle";La.style.textAlign="center";La.style.width="18px";if(null==ra){La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.trashImage);+$a.setAttribute("title",mxResources.get("removeIt",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";mxEvent.addListener($a,"click",function(x){var M=mxUtils.indexOf(ja,Ha);0<=M&&ja.splice(M,1);aa.removeTagsForCells(aa.model.getDescendants(aa.model.getRoot()),[Ha]);aa.refresh();mxEvent.consume(x)});La.appendChild($a)}else{var Da=document.createElement("input");+Da.setAttribute("type","checkbox");Da.style.margin="0px";Da.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,Ha);Da.checked=Da.defaultChecked;Da.style.background="transparent";Da.setAttribute("title",mxResources.get(Da.defaultChecked?"removeIt":"add",[Ha]));mxEvent.addListener(Da,"change",function(x){Da.checked?aa.addTagsForCells(aa.getSelectionCells(),[Ha]):aa.removeTagsForCells(aa.getSelectionCells(),[Ha]);mxEvent.consume(x)});La.appendChild(Da)}Za.appendChild(La)}Ca.appendChild(Za)})(Ea[Ma]);ya.appendChild(Ca);+sa.appendChild(ya)}}var aa=this,ja=aa.hiddenTags.slice(),pa=document.createElement("div");pa.style.userSelect="none";pa.style.overflow="hidden";pa.style.padding="10px";pa.style.height="100%";var sa=document.createElement("div");sa.style.position="absolute";sa.style.boxSizing="border-box";sa.style.userSelect="none";sa.style.overflow="auto";sa.style.padding="3px";sa.style.left="0px";sa.style.right="0px";sa.style.top="0px";sa.style.bottom="0px";pa.appendChild(sa);aa.addListener(mxEvent.ROOT,function(){ja=+aa.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Ea,ra){if(k()){Ea=aa.getAllTags();for(ra=0;ra<Ea.length;ra++)0>mxUtils.indexOf(ja,Ea[ra])&&ja.push(Ea[ra]);ja.sort();aa.isSelectionEmpty()?W(ja):W(ja,aa.getCommonTagsForCells(aa.getSelectionCells()))}});aa.selectionModel.addListener(mxEvent.CHANGE,qa);aa.model.addListener(mxEvent.CHANGE,qa);aa.addListener(mxEvent.REFRESH,qa);var wa=document.createElement("div");wa.className="geToolbarContainer";wa.style.position="absolute";wa.style.display=+"flex";wa.style.bottom="0px";wa.style.left="0px";wa.style.right="0px";wa.style.height="26px";wa.style.overflow="hidden";wa.style.padding="3px 4px 4px 4px";wa.style.borderWidth="1px 0px 0px 0px";wa.style.borderStyle="solid";wa.style.whiteSpace="nowrap";if(aa.isEnabled()){sa.style.bottom="34px";var Ba=document.createElement("a");Ba.className="geToolbarButton geAdaptiveAsset geToggleItem";Ba.style.width="16px";Ba.style.height="18px";Ba.style.backgroundPosition="center center";Ba.style.backgroundRepeat=+"no-repeat";Ba.style.backgroundSize="20px";Ba.style.margin="0 2px";Ba.style.display="inline-block";Ba.style.cursor="pointer";var za=Ba.cloneNode(!1);za.style.backgroundImage="url("+Editor.visibleImage+")";za.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(za,"click",function(Ea){aa.setHiddenTags([]);mxEvent.isShiftDown(Ea)||(ja=aa.hiddenTags.slice());P();aa.refresh();mxEvent.consume(Ea)});wa.appendChild(za);null!=J&&(Ba=Ba.cloneNode(!1),Ba.style.backgroundImage="url("+Editor.plusImage++")",Ba.setAttribute("title",mxResources.get("add")),mxEvent.addListener(Ba,"click",function(Ea){J(ja,function(ra){ja=ra;qa()});mxEvent.consume(Ea)}),wa.appendChild(Ba));pa.appendChild(wa)}null!=U&&wa.appendChild(U);return{div:pa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var A in Graph.customFontElements){var J=Graph.customFontElements[A];k.push({name:J.name,url:J.url})}return k};Graph.prototype.setFont=function(k,A){Graph.addFont(k,A);var J=+Editor.guid();document.execCommand("fontname",!1,J);for(var U=this.cellEditor.textarea.getElementsByTagName("font"),P=!1,T=0;T<U.length;T++)U[T].getAttribute("face")==J&&(P=!0,U[T].setAttribute("face",k),null!=A?U[T].setAttribute("data-font-src",A):U[T].removeAttribute("data-font-src"));P||document.execCommand("fontname",!1,k)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=+function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var A in k)this.globalVars[A]=k[A]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=+function(k){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[k]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,A,J,U,P,T,W,aa,ja,pa,sa,qa,wa,Ba,za,Ea){var ra=K.apply(this,+arguments);if(null!=qa){var ya=ra.getAttribute("style");null==ya&&(ya="");qa="auto"==qa?"none"==this.getAdaptiveColors()?"light":"light dark":qa;ra.setAttribute("style",ya+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(sa&&0<Ca.length){var Ma=ra.ownerDocument;ya=null!=Ma.createElementNS?Ma.createElementNS(mxConstants.NS_SVG,"style"):Ma.createElement("style");null!=Ma.setAttributeNS?ya.setAttributeNS("type","text/css"):ya.setAttribute("type","text/css");for(var Ha="",Aa="",Ra=0;Ra<Ca.length;Ra++){var Za=+Ca[Ra].name,La=Ca[Ra].url;Graph.isCssFontUrl(La)?Ha+="@import url("+Graph.rewriteGoogleFontUrl(La)+");\n":Aa+='@font-face {\nfont-family: "'+Za+'";\nsrc: url("'+La+'");\n}\n'}ya.appendChild(Ma.createTextNode(Ha+Aa));ra.getElementsByTagName("defs")[0].appendChild(ya)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ra);this.mathEnabled&&(document.body.appendChild(ra),Editor.MathJaxRender(ra),ra.parentNode.removeChild(ra),ya=ra.ownerDocument.getElementById("MJX-SVG-styles"),+null!=ya&&ra.getElementsByTagName("defs")[0].appendChild(ya.cloneNode(!0)));return ra};var I=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){I.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ca=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ca.apply(this,arguments);this.enumerationState=+0};var da=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return da.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=+function(k){var A="1"==mxUtils.getValue(k.style,"enumerate",0);A&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):A||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);A=k.secondLabel;if(null!=A){var J=k.view.scale,U=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?+new mxRectangle(k.x+k.width-4*J,k.y+4*J,0,0):mxRectangle.fromPoint(k.view.getPoint(k));A.bounds.equals(k)&&A.value==U&&A.scale==J||(A.bounds=k,A.value=U,A.scale=J,A.redraw())}};var ea=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ea.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};+var X=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){X.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,A){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,A))};Graph.prototype.executeCustomActions=function(k,A,J){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),+null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var U=!1,P=0,T=0,W=mxUtils.bind(this,function(){U||(U=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){U&&(U=!1,this.model.endUpdate())}),ja=mxUtils.bind(this,function(){0<P&&P--;0==P&&pa()}),pa=mxUtils.bind(this,function(){if(T<k.length){var sa=this.stoppingCustomActions,qa=k[T++],wa=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,+J))return}else this.openLink(qa.open);null==qa.wait||sa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ja()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,+!0)),0,1,ja,sa?0:qa.fadeIn.delay));null!=qa.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,ja,sa?0:qa.fadeOut.delay));null!=qa.wipeIn&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(W(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){W();var Ba=this.getCellsForAction(qa.show,+!0);Graph.setOpacityForNodes(this.getNodesForCells(Ba),1);this.setCellsVisible(Ba,!0)}null!=qa.hide&&(W(),Ba=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ba),0),this.setCellsVisible(Ba,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(W(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(W(),this.setCellStyles(qa.style.key,+qa.style.value,this.getCellsForAction(qa.style,!0)));Ba=[];null!=qa.select&&this.isEnabled()&&(Ba=this.getCellsForAction(qa.select),this.setSelectionCells(Ba));null!=qa.highlight&&(Ba=this.getCellsForAction(qa.highlight),this.highlightCells(Ba,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(Ba=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<Ba.length&&this.scrollCellToVisible(Ba[0]);null!=J&&null!=qa.explore&&Graph.exploreFromCell(this,+J,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var za=qa.tags.toggle;0==za.length&&(za=this.getAllTags());for(Ba=0;Ba<za.length;Ba++)this.toggleHiddenTag(za[Ba])}za=null;null!=qa.tags.hidden&&(null==za&&(za=[]),za=za.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==za&&(za=[]);var Ea=this.getAllTags();for(Ba=0;Ba<Ea.length;Ba++)0>mxUtils.indexOf(qa.tags.visible,Ea[Ba])&&0>mxUtils.indexOf(za,Ea[Ba])&&za.push(Ea[Ba])}null!=za&&this.setHiddenTags(za);this.refresh()}0<wa.length&&(P++,+this.executeAnimations(wa,ja,sa?1:qa.steps,sa?0:qa.delay));0==P?pa():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=A&&A()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,A){var J=this.getLinkForCell(A);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(k,J));if(this.isHtmlLabel(A)){var U=document.createElement("div");U.innerHTML=Graph.sanitizeHtml(this.getLabel(A));for(var P=U.getElementsByTagName("a"),T=!1,+W=0;W<P.length;W++)J=P[W].getAttribute("href"),null!=J&&"data:action/json,"==J.substring(0,17)&&(P[W].setAttribute("href",this.updateCustomLink(k,J)),T=!0);T&&this.labelChanged(A,U.innerHTML)}};Graph.prototype.updateCustomLink=function(k,A){if("data:action/json,"==A.substring(0,17))try{var J=JSON.parse(A.substring(17));null!=J.actions&&(this.updateCustomLinkActions(k,J.actions),A="data:action/json,"+JSON.stringify(J))}catch(U){}return A};Graph.prototype.updateCustomLinkActions=function(k,A){for(var J=+0;J<A.length;J++){var U=A[J],P;for(P in U)this.updateCustomLinkAction(k,U[P],"cells"),this.updateCustomLinkAction(k,U[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,A,J){if(null!=A&&null!=A[J]){for(var U=[],P=0;P<A[J].length;P++)if("*"==A[J][P])U.push(A[J][P]);else{var T=k[A[J][P]];null!=T?""!=T&&U.push(T):U.push(A[J][P])}A[J]=U}};Graph.prototype.getCellsForAction=function(k,A){A=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,A));if(null!=k.excludeCells){for(var J=+[],U=0;U<A.length;U++)0>k.excludeCells.indexOf(A[U].id)&&J.push(A[U]);A=J}return A};Graph.prototype.getCellsById=function(k){var A=[];if(null!=k)for(var J=0;J<k.length;J++)if("*"==k[J]){var U=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(T){return T!=U},U))}else{var P=this.model.getCell(k[J]);null!=P&&A.push(P)}return A};var ba=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return ba.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};+Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var A=mxUtils.indexOf(this.hiddenTags,k);0>A?this.hiddenTags.push(k):0<=A&&this.hiddenTags.splice(A,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var A=0;A<k.length;A++)if(0>+mxUtils.indexOf(this.hiddenTags,k[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,A,J,U){var P=[];if(null!=k){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var T=0,W={},aa=0;aa<k.length;aa++)0<k[aa].length&&(W[k[aa]]=!0,T++);for(aa=0;aa<A.length;aa++)if(J&&this.model.getParent(A[aa])==this.model.root||this.model.isVertex(A[aa])||this.model.isEdge(A[aa])){var ja=this.getTagsForCell(A[aa]),pa=!1;if(0<ja.length&&(ja=ja.split(" "),ja.length>=k.length)){for(var sa=pa=+0;sa<ja.length&&pa<T;sa++)null!=W[ja[sa]]&&pa++;pa=pa==T}pa&&(1!=U||this.isCellVisible(A[aa]))&&P.push(A[aa])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var A=null,J=[],U=0;U<k.length;U++){var P=this.getTagsForCell(k[U]);J=[];if(0<P.length){P=P.split(" ");for(var T={},W=0;W<P.length;W++)if(null==A||null!=A[P[W]])T[P[W]]=!0,J.push(P[W]);A=T}else return[]}return J};+Graph.prototype.getTagsForCells=function(k){for(var A=[],J={},U=0;U<k.length;U++){var P=this.getTagsForCell(k[U]);if(0<P.length){P=P.split(" ");for(var T=0;T<P.length;T++)null==J[P[T]]&&(J[P[T]]=!0,A.push(P[T]))}}return A};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){for(var U=this.getTagsForCell(k[J]),P=U.split(" "),T=!1,W=0;W<+A.length;W++){var aa=mxUtils.trim(A[W]);""!=aa&&0>mxUtils.indexOf(P,aa)&&(U=0<U.length?U+" "+aa:aa,T=!0)}T&&this.setAttributeForCell(k[J],"tags",U)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){var U=this.getTagsForCell(k[J]);if(0<U.length){for(var P=U.split(" "),T=!1,W=0;W<A.length;W++){var aa=mxUtils.indexOf(P,A[W]);0<=aa&&(P.splice(aa,1),T=!0)}T&&this.setAttributeForCell(k[J],+"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var A=0;A<k.length;A++)this.model.setVisible(k[A],!this.model.isVisible(k[A]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,A){this.model.beginUpdate();try{for(var J=0;J<k.length;J++)this.model.setVisible(k[J],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,A,J,U){for(var P=0;P<k.length;P++)this.highlightCell(k[P],+A,J,U)};Graph.prototype.highlightCell=function(k,A,J,U,P){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;k=this.view.getState(k);var T=null;null!=k&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+P),T=new mxCellHighlight(this,A,P,!1),null!=U&&(T.opacity=U),T.highlight(k),window.setTimeout(function(){null!=T.shape&&(mxUtils.setPrefixedStyle(T.shape.node.style,"transition","all 1200ms ease-in-out"),T.shape.node.style.opacity=0);window.setTimeout(function(){T.destroy()},+1200)},J));return T};Graph.prototype.addSvgShadow=function(k,A,J,U){J=null!=J?J:!1;U=null!=U?U:!0;var P=k.ownerDocument,T=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");T.setAttribute("id",this.shadowId);var W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");W.setAttribute("in","SourceAlpha");W.setAttribute("stdDeviation",this.svgShadowBlur);W.setAttribute("result","blur");T.appendChild(W);+W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");W.setAttribute("in","blur");W.setAttribute("dx",this.svgShadowSize);W.setAttribute("dy",this.svgShadowSize);W.setAttribute("result","offsetBlur");T.appendChild(W);W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");W.setAttribute("flood-color",this.svgShadowColor);W.setAttribute("flood-opacity",this.svgShadowOpacity);W.setAttribute("result","offsetColor");+T.appendChild(W);W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");W.setAttribute("in","offsetColor");W.setAttribute("in2","offsetBlur");W.setAttribute("operator","in");W.setAttribute("result","offsetBlur");T.appendChild(W);W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");W.setAttribute("in","SourceGraphic");W.setAttribute("in2","offsetBlur");T.appendChild(W);W=k.getElementsByTagName("defs");+0==W.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=k.firstChild?k.insertBefore(P,k.firstChild):k.appendChild(P)):P=W[0];P.appendChild(T);J||(A=null!=A?A:k.getElementsByTagName("g")[0],null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&U&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),A=k.getAttribute("viewBox"),+null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,k.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return T};Graph.prototype.setShadowVisible=function(k,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=null!=A?A:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==+this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),A=0;do var J=this.model.getChildAt(this.model.root,A);while(A++<k&&"1"==mxUtils.getValue(this.getCellStyle(J),"locked","0"));null!=J&&this.setDefaultParent(J)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml",STENCIL_PATH+"/kubernetes2.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=@@ -3453,404 +3452,405 @@ function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(t"/ibm.xml"];mxStencilRegistry.libraries.ibmcloud=[STENCIL_PATH+"/ibm_cloud.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[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.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(l){var u=null;null!=l&&0<l.length&&("ER"==l.substring(0,2)?u="mxgraph.er":"sysML"==l.substring(0,5)&&(u="mxgraph.sysml"));return u};var ma=mxMarker.createMarker;mxMarker.createMarker=function(l,u,H,U,J,W,aa,ba,ja,oa){if(null!=H&&null==mxMarker.markers[H]){var qa=this.getPackageForType(H);-null!=qa&&mxStencilRegistry.getStencil(qa)}return ma.apply(this,arguments)};var la=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(l,u,H,U,J,W){"1"==mxUtils.getValue(u.style,"lineShape",null)&&l.setFillColor(mxUtils.getValue(u.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return la.apply(this,arguments)};PrintDialog.prototype.create=function(l,u,H){function U(){za.value=Math.max(1,Math.min(oa,Math.max(parseInt(za.value),parseInt(ua.value))));ua.value=Math.max(1,Math.min(oa,-Math.min(parseInt(za.value),parseInt(ua.value))))}function J(va){l.lastPrintPagesRadioChecked=ra.checked;l.lastPrintSelectionOnlyChecked=Ca.checked;l.lastPrintCropRadioChecked=sa.checked;l.lastPrintFitRadioChecked=Aa.checked;ra.checked&&ua.value<za.value?(l.lastPrintPagesFromInput=ua.value,l.lastPrintPagesToInput=za.value):(l.lastPrintPagesFromInput=null,l.lastPrintPagesToInput=null);X.value=Math.max(1,Math.min(1600,parseInt(X.value)))+"%";l.lastPrintZoom=X.value;l.lastPrintBorder=Q.value;l.lastPrintGrid=-ia.checked;l.lastPrintTransparent=ka.checked;l.lastPrintInclude=pa.checked;l.lastPrintSheetsAcross=t.value;l.lastPrintSheetsDown=N.value;var Da={};Da.border=parseInt(Q.value);Da.scale=parseInt(X.value)/100;Da.grid=ia.checked;Da.transparent=ka.checked;Da.includeCopy=pa.checked;Da.sheetsAcross=parseInt(t.value);Da.sheetsDown=parseInt(N.value);Da.pagesFrom=parseInt(ua.value);Da.pagesTo=parseInt(za.value);Da.allPages=qa.checked;Da.selection=Ca.checked;Da.pageView=La.checked;Da.crop=sa.checked;Da.fit=-Aa.checked;return null!=H?H(!va,Da):l.print(!va,Da)}var W=l.editor.graph,aa=document.createElement("div"),ba=document.createElement("h3");ba.style.width="100%";ba.style.textAlign="center";ba.style.marginTop="0px";mxUtils.write(ba,u||mxResources.get("print"));aa.appendChild(ba);var ja=1,oa=1;ba=document.createElement("div");ba.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name",-"pages-printdialog");ba.appendChild(qa);u=document.createElement("span");mxUtils.write(u,mxResources.get("allPages"));mxEvent.addListener(u,"click",function(){qa.checked=!0});ba.appendChild(u);mxUtils.br(ba);var ra=qa.cloneNode(!0);ba.appendChild(ra);u=document.createElement("span");mxUtils.write(u,mxResources.get("pages")+":");ba.appendChild(u);mxEvent.addListener(u,"click",function(){ra.checked=!0});var ua=document.createElement("input");ua.style.margin="0 4px";ua.setAttribute("value","1");ua.setAttribute("type",-"number");ua.setAttribute("min","1");ua.style.width="40px";ba.appendChild(ua);u=document.createElement("span");mxUtils.write(u,mxResources.get("to"));ba.appendChild(u);var za=ua.cloneNode(!0);ba.appendChild(za);mxEvent.addListener(ua,"focus",function(){ra.checked=!0});mxEvent.addListener(za,"focus",function(){ra.checked=!0});mxEvent.addListener(ua,"change",U);mxEvent.addListener(za,"change",U);if(null!=l.pages&&(oa=l.pages.length,null!=l.currentPage))for(var Ba=0;Ba<oa;Ba++)if(l.currentPage==l.pages[Ba]){ja=-Ba+1;break}null!=l.lastPrintPagesFromInput&&null!=l.lastPrintPagesToInput?(ua.value=Math.min(oa,Math.max(1,l.lastPrintPagesFromInput)),za.value=Math.min(oa,Math.max(1,l.lastPrintPagesToInput))):(ua.value=ja,za.value=ja);ua.setAttribute("max",oa);za.setAttribute("max",oa);Ba=mxUtils.button(mxResources.get("currentPage"),function(va){ua.value=ja;za.value=ja;ra.checked=!0});Ba.setAttribute("title",mxResources.get("currentPage"));Ba.style.marginLeft="4px";Ba.style.maxWidth="100px";Ba.style.overflow="hidden";-Ba.style.textOverflow="ellipsis";Ba.style.whiteSpace="nowrap";ba.appendChild(Ba);1<oa&&aa.appendChild(ba);ba=document.createElement("div");ba.style.borderBottom="1px solid lightGray";ba.style.paddingBottom="12px";ba.style.marginBottom="12px";ba.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.setAttribute("name","pages-printdialog");Ca.setAttribute("type",1==oa?"checkbox":"radio");Ca.style.marginRight="8px";W.isSelectionEmpty()&&Ca.setAttribute("disabled","disabled");W.isEnabled()&&-(ba.appendChild(Ca),u=document.createElement("span"),mxUtils.write(u,mxResources.get("selectionOnly")),ba.appendChild(u));(W.isEnabled()||1<oa)&&aa.appendChild(ba);!l.isPagesEnabled()||l.lastPrintPagesRadioChecked?ra.checked=!0:!W.isSelectionEmpty()&&l.lastPrintSelectionOnlyChecked?Ca.checked=!0:qa.checked=!0;W.isSelectionEmpty()||mxEvent.addListener(u,"click",function(){Ca.checked=!Ca.checked});W=document.createElement("div");W.style.whiteSpace="nowrap";var La=document.createElement("input");La.style.marginBottom=-"8px";La.style.marginRight="8px";La.setAttribute("type","radio");La.setAttribute("name","printSize");W.appendChild(La);u=document.createElement("span");mxUtils.write(u,mxResources.get("pageView"));W.appendChild(u);mxEvent.addListener(W,"click",function(){La.checked=!0});aa.appendChild(W);W=document.createElement("div");W.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginBottom="8px";sa.style.marginRight="8px";sa.setAttribute("type","radio");sa.setAttribute("name","printSize");-W.appendChild(sa);u=document.createElement("span");mxUtils.write(u,mxResources.get("crop"));W.appendChild(u);mxEvent.addListener(W,"click",function(){sa.checked=!0});aa.appendChild(W);W=document.createElement("div");W.style.whiteSpace="nowrap";var Aa=document.createElement("input");Aa.style.marginBottom="8px";Aa.style.marginRight="8px";Aa.setAttribute("type","radio");Aa.setAttribute("name","printSize");u=document.createElement("div");u.style.display="inline-block";u.style.verticalAlign="top";u.style.paddingTop=-"2px";u.appendChild(Aa);W.appendChild(u);ba=document.createElement("table");ba.style.display="inline-block";ba.style.borderSpacing="0";Ba=document.createElement("tbody");var Ea=document.createElement("tr"),Ka=Ea.cloneNode(!0),Ma=document.createElement("td"),ya=Ma.cloneNode(!0),Wa=Ma.cloneNode(!0),Ia=Ma.cloneNode(!0),Xa=Ma.cloneNode(!0),Pa=Ma.cloneNode(!0);Ma.style.textAlign="right";Ia.style.textAlign="right";mxUtils.write(Ma,mxResources.get("fitTo"));mxEvent.addListener(W,"click",function(va){mxEvent.getSource(va)!=-Aa&&(Aa.checked=!Aa.checked)});var t=document.createElement("input");t.style.margin="0 2px";t.style.boxSizing="border-box";t.setAttribute("value",l.lastPrintSheetsAcross||"1");t.setAttribute("min","1");t.setAttribute("type","number");t.style.width="40px";ya.appendChild(t);u=document.createElement("span");mxUtils.write(u,mxResources.get("fitToSheetsAcross"));Wa.appendChild(u);mxUtils.write(Ia,mxResources.get("fitToBy"));var N=t.cloneNode(!0);N.setAttribute("value",l.lastPrintSheetsDown||"1");Xa.appendChild(N);-mxEvent.addListener(t,"click",function(va){Aa.checked=!0;mxEvent.consume(va)});mxEvent.addListener(N,"click",function(va){Aa.checked=!0;mxEvent.consume(va)});l.lastPrintCropRadioChecked?sa.checked=!0:l.lastPrintFitRadioChecked?Aa.checked=!0:La.checked=!0;u=document.createElement("span");mxUtils.write(u,mxResources.get("fitToSheetsDown"));Pa.appendChild(u);Ea.appendChild(Ma);Ea.appendChild(ya);Ea.appendChild(Wa);Ka.appendChild(Ia);Ka.appendChild(Xa);Ka.appendChild(Pa);Ba.appendChild(Ea);Ba.appendChild(Ka);-ba.appendChild(Ba);W.appendChild(ba);aa.appendChild(W);W=document.createElement("div");W.style.borderTop="1px solid lightGray";W.style.whiteSpace="nowrap";W.style.paddingTop="12px";W.style.marginTop="12px";W.style.paddingLeft="8px";mxUtils.write(W,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=l.lastPrintBorder?l.lastPrintBorder:mxPrintPreview.prototype.pageMargin;-W.appendChild(Q);u=document.createElement("span");u.style.marginLeft="8px";mxUtils.write(u,mxResources.get("zoom")+":");W.appendChild(u);var X=document.createElement("input");X.style.width="60px";X.style.marginLeft="4px";X.value=null!=l.lastPrintZoom?l.lastPrintZoom:"100%";W.appendChild(X);mxUtils.br(W);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=l.lastPrintGrid?l.lastPrintGrid:!1;W.appendChild(ia);u=document.createElement("span");-u.style.marginLeft="4px";u.style.marginRight="8px";mxUtils.write(u,mxResources.get("grid"));W.appendChild(u);mxEvent.addListener(u,"click",function(va){ia.checked=!0;mxEvent.consume(va)});var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=l.lastPrintTransparent?l.lastPrintTransparent:!1;null!=H&&(W.appendChild(ka),u=document.createElement("span"),u.style.marginLeft="4px",mxUtils.write(u,mxResources.get("transparentBackground")),W.appendChild(u),-mxEvent.addListener(u,"click",function(va){ka.checked=!0;mxEvent.consume(va)}));var pa=document.createElement("input");pa.setAttribute("type","checkbox");pa.style.marginTop="10px";pa.checked=null!=l.lastPrintInclude?l.lastPrintInclude:Editor.defaultIncludeDiagram;null==H||mxClient.IS_CHROMEAPP||"draw.io"!=l.getServiceName()||(mxUtils.br(W),W.appendChild(pa),u=document.createElement("span"),u.style.marginLeft="4px",mxUtils.write(u,mxResources.get("includeCopyOfMyDiagram")),W.appendChild(u),mxEvent.addListener(u,-"click",function(va){pa.checked=!0;mxEvent.consume(va)}));aa.appendChild(W);u=document.createElement("div");u.style.marginTop="40px";u.style.textAlign="right";u.style.whiteSpace="nowrap";l.isOffline()||null!=H||u.appendChild(l.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));W=mxUtils.button(mxResources.get("cancel"),function(){l.hideDialog()});W.className="geBtn";l.editor.cancelFirst&&u.appendChild(W);PrintDialog.previewEnabled&&null==H&&(ba=mxUtils.button(mxResources.get("preview"),-function(){try{l.hideDialog(),J(!1)}catch(va){l.handleError(va)}}),ba.className="geBtn",u.appendChild(ba));ba=mxUtils.button(mxResources.get(null!=H?"export":PrintDialog.previewEnabled?"print":"ok"),function(){try{l.hideDialog(),J(!0)}catch(va){l.handleError(va)}});ba.className="geBtn gePrimaryBtn";u.appendChild(ba);l.editor.cancelFirst||u.appendChild(W);aa.appendChild(u);if(l.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(aa.classList.add("geDarkMode"),aa.style.colorScheme="dark"):-(aa.classList.remove("geDarkMode"),aa.style.colorScheme="light")};l.addListener("darkModeChanged",xa);xa();var ta=function(va,Da){va=Da.getProperty("dialog");aa.parentNode==va.container&&(l.editor.removeListener(ta),l.removeListener(xa))};l.editor.addListener("hideDialog",ta)}this.container=aa};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||-(this.page.viewState.background=this.color);if(!this.ignoreImage){var l=this.image;null!=l&&null!=l.src&&Graph.isPageLink(l.src)&&(l={originalSrc:l.src});this.page.viewState.backgroundImage=l}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Y.apply(this,-arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(l=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=l?l:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),-this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var fa=document.createElement("canvas"),Z=new Image;Z.onload=function(){try{fa.getContext("2d").drawImage(Z,0,0);var l=fa.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=l&&6<l.length}catch(u){}};Z.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(l){}Editor.prototype.useCanvasForExport=+[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var A=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?A="mxgraph.er":"sysML"==k.substring(0,5)&&(A="mxgraph.sysml"));return A};var ha=mxMarker.createMarker;mxMarker.createMarker=function(k,A,J,U,P,T,W,aa,ja,pa){if(null!=J&&null==mxMarker.markers[J]){var sa=this.getPackageForType(J);+null!=sa&&mxStencilRegistry.getStencil(sa)}return ha.apply(this,arguments)};var ma=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,A,J,U,P,T){"1"==mxUtils.getValue(A.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ma.apply(this,arguments)};PrintDialog.prototype.create=function(k,A,J){function U(){Ba.value=Math.max(1,Math.min(pa,Math.max(parseInt(Ba.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(pa,+Math.min(parseInt(Ba.value),parseInt(wa.value))))}function P(ua){k.lastPrintPagesRadioChecked=qa.checked;k.lastPrintSelectionOnlyChecked=Ea.checked;k.lastPrintCropRadioChecked=ya.checked;k.lastPrintFitRadioChecked=Ca.checked;qa.checked&&wa.value<Ba.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ba.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);V.value=Math.max(1,Math.min(1600,parseInt(V.value)))+"%";k.lastPrintZoom=V.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=+ia.checked;k.lastPrintTransparent=ka.checked;k.lastPrintInclude=oa.checked;k.lastPrintSheetsAcross=x.value;k.lastPrintSheetsDown=M.value;var Fa={};Fa.border=parseInt(Q.value);Fa.scale=parseInt(V.value)/100;Fa.grid=ia.checked;Fa.transparent=ka.checked;Fa.includeCopy=oa.checked;Fa.sheetsAcross=parseInt(x.value);Fa.sheetsDown=parseInt(M.value);Fa.pagesFrom=parseInt(wa.value);Fa.pagesTo=parseInt(Ba.value);Fa.allPages=sa.checked;Fa.selection=Ea.checked;Fa.pageView=ra.checked;Fa.crop=ya.checked;Fa.fit=+Ca.checked;return null!=J?J(!ua,Fa):k.print(!ua,Fa)}var T=k.editor.graph,W=document.createElement("div"),aa=document.createElement("h3");aa.style.width="100%";aa.style.textAlign="center";aa.style.marginTop="0px";mxUtils.write(aa,A||mxResources.get("print"));W.appendChild(aa);var ja=1,pa=1;aa=document.createElement("div");aa.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginRight="8px";sa.style.marginBottom="8px";sa.setAttribute("type","radio");sa.setAttribute("name",+"pages-printdialog");aa.appendChild(sa);A=document.createElement("span");mxUtils.write(A,mxResources.get("allPages"));mxEvent.addListener(A,"click",function(){sa.checked=!0});aa.appendChild(A);mxUtils.br(aa);var qa=sa.cloneNode(!0);aa.appendChild(qa);A=document.createElement("span");mxUtils.write(A,mxResources.get("pages")+":");aa.appendChild(A);mxEvent.addListener(A,"click",function(){qa.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type",+"number");wa.setAttribute("min","1");wa.style.width="40px";aa.appendChild(wa);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));aa.appendChild(A);var Ba=wa.cloneNode(!0);aa.appendChild(Ba);mxEvent.addListener(wa,"focus",function(){qa.checked=!0});mxEvent.addListener(Ba,"focus",function(){qa.checked=!0});mxEvent.addListener(wa,"change",U);mxEvent.addListener(Ba,"change",U);if(null!=k.pages&&(pa=k.pages.length,null!=k.currentPage))for(var za=0;za<pa;za++)if(k.currentPage==k.pages[za]){ja=+za+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(pa,Math.max(1,k.lastPrintPagesFromInput)),Ba.value=Math.min(pa,Math.max(1,k.lastPrintPagesToInput))):(wa.value=ja,Ba.value=ja);wa.setAttribute("max",pa);Ba.setAttribute("max",pa);za=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=ja;Ba.value=ja;qa.checked=!0});za.setAttribute("title",mxResources.get("currentPage"));za.style.marginLeft="4px";za.style.maxWidth="100px";za.style.overflow="hidden";+za.style.textOverflow="ellipsis";za.style.whiteSpace="nowrap";aa.appendChild(za);1<pa&&W.appendChild(aa);aa=document.createElement("div");aa.style.borderBottom="1px solid lightGray";aa.style.paddingBottom="12px";aa.style.marginBottom="12px";aa.style.whiteSpace="nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==pa?"checkbox":"radio");Ea.style.marginRight="8px";T.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");T.isEnabled()&&+(aa.appendChild(Ea),A=document.createElement("span"),mxUtils.write(A,mxResources.get("selectionOnly")),aa.appendChild(A));(T.isEnabled()||1<pa)&&W.appendChild(aa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?qa.checked=!0:!T.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ea.checked=!0:sa.checked=!0;T.isSelectionEmpty()||mxEvent.addListener(A,"click",function(){Ea.checked=!Ea.checked});T=document.createElement("div");T.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom=+"8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");T.appendChild(ra);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageView"));T.appendChild(A);mxEvent.addListener(T,"click",function(){ra.checked=!0});W.appendChild(T);T=document.createElement("div");T.style.whiteSpace="nowrap";var ya=document.createElement("input");ya.style.marginBottom="8px";ya.style.marginRight="8px";ya.setAttribute("type","radio");ya.setAttribute("name","printSize");+T.appendChild(ya);A=document.createElement("span");mxUtils.write(A,mxResources.get("crop"));T.appendChild(A);mxEvent.addListener(T,"click",function(){ya.checked=!0});W.appendChild(T);T=document.createElement("div");T.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");A=document.createElement("div");A.style.display="inline-block";A.style.verticalAlign="top";A.style.paddingTop=+"2px";A.appendChild(Ca);T.appendChild(A);aa=document.createElement("table");aa.style.display="inline-block";aa.style.borderSpacing="0";za=document.createElement("tbody");var Ma=document.createElement("tr"),Ha=Ma.cloneNode(!0),Aa=document.createElement("td"),Ra=Aa.cloneNode(!0),Za=Aa.cloneNode(!0),La=Aa.cloneNode(!0),$a=Aa.cloneNode(!0),Da=Aa.cloneNode(!0);Aa.style.textAlign="right";La.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));mxEvent.addListener(T,"click",function(ua){mxEvent.getSource(ua)!=+Ca&&(Ca.checked=!Ca.checked)});var x=document.createElement("input");x.style.margin="0 2px";x.style.boxSizing="border-box";x.setAttribute("value",k.lastPrintSheetsAcross||"1");x.setAttribute("min","1");x.setAttribute("type","number");x.style.width="40px";Ra.appendChild(x);A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsAcross"));Za.appendChild(A);mxUtils.write(La,mxResources.get("fitToBy"));var M=x.cloneNode(!0);M.setAttribute("value",k.lastPrintSheetsDown||"1");$a.appendChild(M);+mxEvent.addListener(x,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(M,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?ya.checked=!0:k.lastPrintFitRadioChecked?Ca.checked=!0:ra.checked=!0;A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsDown"));Da.appendChild(A);Ma.appendChild(Aa);Ma.appendChild(Ra);Ma.appendChild(Za);Ha.appendChild(La);Ha.appendChild($a);Ha.appendChild(Da);za.appendChild(Ma);za.appendChild(Ha);+aa.appendChild(za);T.appendChild(aa);W.appendChild(T);T=document.createElement("div");T.style.borderTop="1px solid lightGray";T.style.whiteSpace="nowrap";T.style.paddingTop="12px";T.style.marginTop="12px";T.style.paddingLeft="8px";mxUtils.write(T,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;+T.appendChild(Q);A=document.createElement("span");A.style.marginLeft="8px";mxUtils.write(A,mxResources.get("zoom")+":");T.appendChild(A);var V=document.createElement("input");V.style.width="60px";V.style.marginLeft="4px";V.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";T.appendChild(V);mxUtils.br(T);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;T.appendChild(ia);A=document.createElement("span");+A.style.marginLeft="4px";A.style.marginRight="8px";mxUtils.write(A,mxResources.get("grid"));T.appendChild(A);mxEvent.addListener(A,"click",function(ua){ia.checked=!0;mxEvent.consume(ua)});var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=J&&(T.appendChild(ka),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("transparentBackground")),T.appendChild(A),+mxEvent.addListener(A,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==J||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(T),T.appendChild(oa),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram")),T.appendChild(A),mxEvent.addListener(A,+"click",function(ua){oa.checked=!0;mxEvent.consume(ua)}));W.appendChild(T);A=document.createElement("div");A.style.marginTop="40px";A.style.textAlign="right";A.style.whiteSpace="nowrap";k.isOffline()||null!=J||A.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));T=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});T.className="geBtn";k.editor.cancelFirst&&A.appendChild(T);PrintDialog.previewEnabled&&null==J&&(aa=mxUtils.button(mxResources.get("preview"),+function(){try{k.hideDialog(),P(!1)}catch(ua){k.handleError(ua)}}),aa.className="geBtn",A.appendChild(aa));aa=mxUtils.button(mxResources.get(null!=J?"export":PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),P(!0)}catch(ua){k.handleError(ua)}});aa.className="geBtn gePrimaryBtn";A.appendChild(aa);k.editor.cancelFirst||A.appendChild(T);W.appendChild(A);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(W.classList.add("geDarkMode"),W.style.colorScheme="dark"):+(W.classList.remove("geDarkMode"),W.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Fa){ua=Fa.getProperty("dialog");W.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=W};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||+(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Y.apply(this,+arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),+this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var la=document.createElement("canvas"),Z=new Image;Z.onload=function(){try{la.getContext("2d").drawImage(Z,0,0);var k=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(A){}};Z.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(k){}Editor.prototype.useCanvasForExport=!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousAdaptiveColors=m.adaptiveColors;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.7";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.9";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};-EditorUi.logError=function(c,f,k,B,z,C,I){if(null!=c){z=null!=z?z:Error(c);z.stack=null!=z.stack?z.stack:"";C=null!=C?C:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>z.stack.indexOf("extension:")&&0>z.stack.indexOf("<anonymous>:")&&-0>z.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+C+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=B?":colno:"+encodeURIComponent(B):"")+(""!=z.stack?"&stack="+encodeURIComponent(z.stack):""))}catch(L){}try{I||null==window.console||console.error(C,c,f,k,B,z)}catch(L){}}};EditorUi.logEvent=-function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(k){}};EditorUi.sendReport=function(c,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,c.length>f&&(c=c.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email",-"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);console.log.apply(console,c)}}catch(k){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");-for(var f=[],k=0;k<c.length;k++)f.push(c[k]);for(k=0;k<f.length;k++)EditorUi.replaceSvgImage(f[k])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var k=EditorUi.getSvgSubtree(f);if(null!=k&&"svg"==k.nodeName){k.setAttribute("x",c.getAttribute("x"));k.setAttribute("y",c.getAttribute("y"));k.setAttribute("width",c.getAttribute("width"));k.setAttribute("height",c.getAttribute("height"));k.style.fontFamily=-"initial";var B=mxUtils.createElementNs(k.ownerDocument,mxConstants.NS_SVG,"g");B.appendChild(k);c.hasAttribute("transform")&&B.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(B,c)}}catch(z){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var k="svg-image-"+Editor.guid();c.setAttribute("id",k);for(var B=document.implementation.createHTMLDocument(""),-z=document.createElement("style"),C=0;C<f.length;C++){z.textContent=f[C].textContent;B.body.appendChild(z);for(var I="",L=0;L<z.sheet.cssRules.length;L++){var K=z.sheet.cssRules[L];if(null!=K.selectorText){for(var O=K.selectorText.split(","),da=0;da<O.length;da++)O[da]="#"+k+" "+O[da];K.selectorText=O.join(",")}I+=K.cssText+"\n"}f[C].textContent=I}}f=c.getElementsByTagName("*");for(k=0;k<f.length;k++)f[k].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';+EditorUi.logError=function(c,f,l,t,z,C,F){if(null!=c){z=null!=z?z:Error(c);z.stack=null!=z.stack?z.stack:"";C=null!=C?C:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>z.stack.indexOf("extension:")&&0>z.stack.indexOf("<anonymous>:")&&+0>z.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+C+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=t?":colno:"+encodeURIComponent(t):"")+(""!=z.stack?"&stack="+encodeURIComponent(z.stack):""))}catch(N){}try{F||null==window.console||console.error(C,c,f,l,t,z)}catch(N){}}};EditorUi.logEvent=+function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(l){}};EditorUi.sendReport=function(c,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,c.length>f&&(c=c.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email",+"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);console.log.apply(console,c)}}catch(l){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");+for(var f=[],l=0;l<c.length;l++)f.push(c[l]);for(l=0;l<f.length;l++)EditorUi.replaceSvgImage(f[l])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(f);if(null!=l&&"svg"==l.nodeName){l.setAttribute("x",c.getAttribute("x"));l.setAttribute("y",c.getAttribute("y"));l.setAttribute("width",c.getAttribute("width"));l.setAttribute("height",c.getAttribute("height"));l.style.fontFamily=+"initial";var t=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");t.appendChild(l);c.hasAttribute("transform")&&t.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(t,c)}}catch(z){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var l="svg-image-"+Editor.guid();c.setAttribute("id",l);for(var t=document.implementation.createHTMLDocument(""),+z=document.createElement("style"),C=0;C<f.length;C++){z.textContent=f[C].textContent;t.body.appendChild(z);for(var F="",N=0;N<z.sheet.cssRules.length;N++){var K=z.sheet.cssRules[N];if(null!=K.selectorText){for(var I=K.selectorText.split(","),ca=0;ca<I.length;ca++)I[ca]="#"+l+" "+I[ca];K.selectorText=I.join(",")}F+=K.cssText+"\n"}f[C].textContent=F}}f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(z){}try{var f=document.createElement("canvas"),-k=new Image;k.onload=function(){try{f.getContext("2d").drawImage(k,0,0);var z=f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=z&&6<z.length}catch(C){}};k.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(z){}try{f=-document.createElement("canvas");f.width=f.height=1;var B=f.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==B.match("image/jpeg");B=f.toDataURL("image/webp");EditorUi.prototype.webpSupported=null!==B.match("image/webp")}catch(z){}})();EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";c.style.overflow="1"==urlParams.embed?"hidden":"";return c};EditorUi.prototype.openLink=function(c,f,k){return this.editor.graph.openLink(c,-f,k)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,f){f(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,f,k){localStorage.setItem(c,f);null!=k&&k()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,f){localStorage.removeItem(c);f()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};+l=new Image;l.onload=function(){try{f.getContext("2d").drawImage(l,0,0);var z=f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=z&&6<z.length}catch(C){}};l.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(z){}try{f=+document.createElement("canvas");f.width=f.height=1;var t=f.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==t.match("image/jpeg");t=f.toDataURL("image/webp");EditorUi.prototype.webpSupported=null!==t.match("image/webp")}catch(z){}})();EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";c.style.overflow="1"==urlParams.embed?"hidden":"";return c};EditorUi.prototype.openLink=function(c,f,l){return this.editor.graph.openLink(c,+f,l)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,f){f(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,f,l){localStorage.setItem(c,f);null!=l&&l()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,f){localStorage.removeItem(c);f()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();f.refresh();f.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=-function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,k){var B=null==c||null==f;k=null!=k?k:24;var z=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,I=z.spin,L=null,K=null,O=mxUtils.bind(this,function(ea){null!=ea&&ea()});z.spin=function(ea,ca,V,ma){ma=null!=ma?ma:C;var la=!1;if(!this.active){var Y=Date.now();null!=V&&(L=window.setTimeout(function(){z.stop();L=null;V({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},ma));I.call(this,ea);this.active=!0;null!=ca&&(B&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/-2-2),la=document.createElement("div"),la.className="geSpinnerStatus",la.style.position="absolute",la.style.whiteSpace="nowrap",la.style.background="#4B4243",la.style.color="white",la.style.fontFamily=Editor.defaultHtmlFont,la.style.fontSize="9pt",la.style.padding="6px",la.style.paddingLeft="10px",la.style.paddingRight="10px",la.style.zIndex=2E9,la.style.left=Math.max(0,c)+"px",la.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(la.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(la.style,-"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(la.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ca.substring(ca.length-3,ca.length)&&"!"!=ca.charAt(ca.length-1)&&(ca+="..."),la.innerHTML=mxUtils.htmlEntities(ca),ea.appendChild(la),z.status=la);this.pause=mxUtils.bind(this,function(){var fa=O;this.active&&(ma=Math.max(0,ma-(Date.now()-Y)),fa=mxUtils.bind(this,function(Z){this.spin(ea,ca,V,ma);if(null!=Z)try{Z(),K=mxUtils.bind(this,function(){this.spin(ea,ca,V,-ma);try{Z()}catch(l){null!=V&&V(l)}})}catch(l){null!=V&&V(l)}}));this.stop();return fa});la=!0}return la};var da=z.stop;z.stop=function(){da.call(this);this.active&&(this.active=!1,null!=L&&(window.clearTimeout(L),L=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return O};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),k=this.editor.extractGraphModel(f.documentElement,!0);return null!=-k&&0==k.getElementsByTagName("parsererror").length}catch(B){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==+function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,l){var t=null==c||null==f;l=null!=l?l:24;var z=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,F=z.spin,N=null,K=null,I=mxUtils.bind(this,function(da){null!=da&&da()});z.spin=function(da,ea,X,ba){ba=null!=ba?ba:C;var ha=!1;if(!this.active){var ma=Date.now();null!=X&&(N=window.setTimeout(function(){z.stop();N=null;X({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},ba));F.call(this,da);this.active=!0;null!=ea&&(t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/+2-2),ha=document.createElement("div"),ha.className="geSpinnerStatus",ha.style.position="absolute",ha.style.whiteSpace="nowrap",ha.style.background="#4B4243",ha.style.color="white",ha.style.fontFamily=Editor.defaultHtmlFont,ha.style.fontSize="9pt",ha.style.padding="6px",ha.style.paddingLeft="10px",ha.style.paddingRight="10px",ha.style.zIndex=2E9,ha.style.left=Math.max(0,c)+"px",ha.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(ha.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(ha.style,+"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ha.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ea.substring(ea.length-3,ea.length)&&"!"!=ea.charAt(ea.length-1)&&(ea+="..."),ha.innerHTML=mxUtils.htmlEntities(ea),da.appendChild(ha),z.status=ha);this.pause=mxUtils.bind(this,function(){var Y=I;this.active&&(ba=Math.max(0,ba-(Date.now()-ma)),Y=mxUtils.bind(this,function(la){this.spin(da,ea,X,ba);if(null!=la)try{la(),K=mxUtils.bind(this,function(){this.spin(da,ea,+X,ba);try{la()}catch(Z){null!=X&&X(Z)}})}catch(Z){null!=X&&X(Z)}}));this.stop();return Y});ha=!0}return ha};var ca=z.stop;z.stop=function(){ca.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return I};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=+l&&0==l.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=-function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=f.getFunction,B=this.editor.graph,z=this;f.getFunction=function(C){if(B.isSelectionEmpty()&&null!=z.pages&&0<z.pages.length){var I=z.getSelectedPageIndex();if(mxEvent.isShiftDown(C)){if(37==C.keyCode)return function(){0<I&&z.movePage(I,I-1)};if(38==C.keyCode)return function(){0<I&&z.movePage(I,0)};if(39==C.keyCode)return function(){I<z.pages.length-1&&z.movePage(I,I+1)};if(40==C.keyCode)return function(){I<-z.pages.length-1&&z.movePage(I,z.pages.length-1)}}else if(mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)){if(37==C.keyCode)return function(){0<I&&z.selectNextPage(!1)};if(38==C.keyCode)return function(){0<I&&z.selectPage(z.pages[0])};if(39==C.keyCode)return function(){I<z.pages.length-1&&z.selectNextPage(!0)};if(40==C.keyCode)return function(){I<z.pages.length-1&&z.selectPage(z.pages[z.pages.length-1])}}}return!(65<=C.keyCode&&90>=C.keyCode)||B.isSelectionEmpty()||mxEvent.isAltDown(C)||-mxEvent.isShiftDown(C)||mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)?k.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var f=e.apply(this,arguments);if(null==f)try{var k=c.indexOf("<mxfile ");if(0<=k){var B=c.lastIndexOf("</mxfile>");B>k&&(f=c.substring(k,B+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var z=mxUtils.parseXml(c),-C=this.editor.extractGraphModel(z.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=C?mxUtils.getXml(C):""}}catch(I){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",-f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var k=null!=c?this.editor.extractGraphModel(c,!0):null;null!=k&&(c=k);if(null!=c){k=this.editor.graph;k.model.beginUpdate();try{var B=null!=this.pages?this.pages.slice():null,z=c.getElementsByTagName("diagram");if(1<z.length||1==z.length&&z[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var C=z.length-1;0<=C;C--){var I=this.updatePageRoot(new DiagramPage(z[C]));null==-I.getName()&&I.setName(mxResources.get("pageWithNumber",[C+1]));k.model.execute(new ChangePage(this,I,0==C?I:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,-k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=B)for(C=0;C<B.length;C++)k.model.execute(new ChangePage(this,B[C],null));var L=this.getCurrentFile();null!=L&&L.fileReplaced(f)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;da=null!=da?da:!Editor.defaultCompressed;var V=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var ma=-"_blank";else V=ma=B;if(null==c)return"";var la=c;if("mxfile"!=la.nodeName.toLowerCase()){if(da){var Y=c.ownerDocument.createElement("diagram");Y.setAttribute("name",mxResources.get("pageWithNumber",[1]));Y.setAttribute("id",Editor.guid());Y.appendChild(c)}else{Y=Graph.zapGremlins(mxUtils.getXml(c));la=Graph.compress(Y);if(Graph.decompress(la)!=Y)return Y;Y=c.ownerDocument.createElement("diagram");Y.setAttribute("name",mxResources.get("pageWithNumber",[1]));Y.setAttribute("id",Editor.guid());mxUtils.setTextContent(Y,-la)}la=c.ownerDocument.createElement("mxfile");la.appendChild(Y)}O?(la=la.cloneNode(!0),la.removeAttribute("modified"),la.removeAttribute("host"),la.removeAttribute("agent"),la.removeAttribute("etag"),la.removeAttribute("userAgent"),la.removeAttribute("version"),la.removeAttribute("editor"),la.removeAttribute("type")):(la.removeAttribute("userAgent"),la.removeAttribute("modified"),la.removeAttribute("version"),la.removeAttribute("editor"),la.removeAttribute("pages"),la.removeAttribute("type"),la.removeAttribute("etag"),-mxClient.IS_CHROMEAPP?la.setAttribute("host","Chrome"):EditorUi.isElectronApp?la.setAttribute("host","Electron"):la.setAttribute("host",window.location.hostname),la.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),la.setAttribute("version",EditorUi.VERSION),1<la.getElementsByTagName("diagram").length&&null!=this.pages&&la.setAttribute("pages",this.pages.length));null!=ea&&(la=la.cloneNode(!0),la.setAttribute("scale",ea));null!=ca&&(la=la.cloneNode(!0),la.setAttribute("border",-ca));c=da?mxUtils.getPrettyXml(la):mxUtils.getXml(la);if(!C&&!z&&(I||null!=k&&/(\.html)$/i.test(k.getTitle())))c=this.getHtml2(mxUtils.getXml(la),f,null!=k?k.getTitle():null,ma,V);else if(C||!z&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(B=null),k=this.getSvgFileProperties(la),c=this.getEmbeddedSvg(c,f,B,null,L,K,V,null,null,k.scale,k.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,k,B){c=-null!=c?c:!0;f=null!=f?f:!1;k=null!=k?k:!Editor.defaultCompressed;var z=this.editor.getGraphXml(c,B);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(K){var O=K.getElementsByTagName("mxGraphModel"),da=0<O.length?O[0]:null;O=K;null==da&&k?(da=mxUtils.getNodeValue(K),0<da.length&&(da=Graph.decompress(da),null!=da&&0<da.length&&(O=K.cloneNode(!1),O.appendChild(mxUtils.parseXml(da).documentElement)))):null==da||k?O=K.cloneNode(!0):(O=K.cloneNode(!1),mxUtils.setTextContent(O,Graph.compressNode(da)));-z.appendChild(O)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(z),z=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],I=C.node;if(C!=this.currentPage)if(C.needsUpdate){var L=new mxCodec(mxUtils.createXmlDocument());L=L.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,L,null,B);EditorUi.removeChildNodes(I);I.appendChild(L);delete C.needsUpdate}else B&&(this.updatePageRoot(C),-null!=C.viewState.backgroundImage&&(null!=C.viewState.backgroundImage.originalSrc?C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.originalSrc,C):Graph.isPageLink(C.viewState.backgroundImage.src)&&(C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.src,C))),null!=C.viewState.backgroundImage&&null!=C.viewState.backgroundImage.originalSrc&&(L=new mxCodec(mxUtils.createXmlDocument()),L=L.encode(new mxGraphModel(C.root)),this.editor.graph.saveViewState(C.viewState,-L,null,B),I=I.cloneNode(!1),I.appendChild(L)));c(I)}return z};EditorUi.prototype.anonymizeString=function(c,f){for(var k=[],B=0;B<c.length;B++){var z=c.charAt(B);0<=EditorUi.ignoredAnonymizedChars.indexOf(z)?k.push(z):isNaN(parseInt(z))?z.toLowerCase()!=z?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):z.toUpperCase()!=z?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(z)?k.push(" "):k.push("?"):k.push(f?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=-function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var k=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));c[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(k)}catch(C){c[EditorUi.DIFF_INSERT][f].data=C.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var B in c[EditorUi.DIFF_UPDATE]){var z=c[EditorUi.DIFF_UPDATE][B];null!=z.name&&-(z.name=this.anonymizeString(z.name));null!=z.cells&&(f=mxUtils.bind(this,function(C){var I=z.cells[C];if(null!=I){for(var L in I)null!=I[L].value&&(I[L].value="["+I[L].value.length+"]"),null!=I[L].xmlValue&&(I[L].xmlValue="["+I[L].xmlValue.length+"]"),null!=I[L].style&&(I[L].style="["+I[L].style.length+"]"),mxUtils.isEmptyObject(I[L])&&delete I[L];mxUtils.isEmptyObject(I)&&delete z.cells[C]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(z.cells)&&delete z.cells);mxUtils.isEmptyObject(z)&&-delete c[EditorUi.DIFF_UPDATE][B]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var k=0;k<c.attributes.length;k++)"as"!=c.attributes[k].name&&c.setAttribute(c.attributes[k].name,this.anonymizeString(c.attributes[k].value,f));if(null!=c.childNodes)for(k=0;k<c.childNodes.length;k++)this.anonymizeAttributes(c.childNodes[k],f)};EditorUi.prototype.anonymizeNode=function(c,f){f=c.getElementsByTagName("mxCell");-for(var k=0;k<f.length;k++)null!=f[k].getAttribute("value")&&f[k].setAttribute("value","["+f[k].getAttribute("value").length+"]"),null!=f[k].getAttribute("xmlValue")&&f[k].setAttribute("xmlValue","["+f[k].getAttribute("xmlValue").length+"]"),null!=f[k].getAttribute("style")&&f[k].setAttribute("style","["+f[k].getAttribute("style").length+"]"),null!=f[k].parentNode&&"root"!=f[k].parentNode.nodeName&&null!=f[k].parentNode.parentNode&&(f[k].setAttribute("id",f[k].parentNode.getAttribute("id")),f[k].parentNode.parentNode.replaceChild(f[k],-f[k].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){this.spinner.stop();-f.handleFileError(k,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){f.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca){z=null!=z?z:!0;C=null!=C?C:!1;O=null!=O?O:!Editor.defaultCompressed;var V=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var ma=V.getGlobalVariable;V=this.createTemporaryGraph(V.getStylesheet());-V.setBackgroundImage=this.editor.graph.setBackgroundImage;V.background=this.editor.graph.background;var la=null!=this.pages?this.pages[0]:null;null==la||this.currentPage==la?V.setBackgroundImage(this.editor.graph.backgroundImage):null!=la.viewState&&null!=la.viewState&&V.setBackgroundImage(la.viewState.backgroundImage);V.getGlobalVariable=function(Y){return"page"==Y&&null!=la?la.getName():"pagenumber"==Y?1:ma.apply(this,arguments)};document.body.appendChild(V.container);null!=la&&V.model.setRoot(la.root)}I=-null!=I?I:this.getXmlFileData(z,C,O,da);K=null!=K?K:this.getCurrentFile();c=this.createFileData(I,V,K,window.location.href,c,f,k,B,z,L,O,ea,ca);V!=this.editor.graph&&V.container.parentNode.removeChild(V.container);return c};EditorUi.prototype.getHtml=function(c,f,k,B,z,C){C=null!=C?C:!0;var I=null,L=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){I=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var K=f.view.scale;C=Math.floor(I.x/K-f.view.translate.x);K=Math.floor(I.y/K-f.view.translate.y);-I=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(L=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",C);c.setAttribute("y0",K)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=B&&c.setAttribute("edit",B));null!=z&&(z=z.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";B=Graph.compress(c);Graph.decompress(B)!=c&&(B=encodeURIComponent(c));-return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"+(null==z&&null!=I&&I!=mxConstants.NONE?' style="background-color:'+I+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+-B+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+L+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,f,k,B,z){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=z&&(z=z.replace(/&/g,"&"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,-resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+-z+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>\n'+(null==z?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=-function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,k=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[f],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),-k={},0<c.length)){var B=this.getHashObject(),z=null;this.fileNode=f;this.pages=[];for(var C=0;C<c.length;C++){null==c[C].getAttribute("id")&&c[C].setAttribute("id",C);f=new DiagramPage(c[C]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[C+1]));this.pages.push(f);if(null==B.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||null!=B.pageId&&f.getId()==B.pageId)z=f;if(null==k[f.getId()])k[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=-null!=z?z:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),-this.scrollToPage());if(null!=urlParams["layer-ids"])try{var I=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(C=0;C<I.length;C++)f[I[C]]=!0;var L=this.editor.graph.getModel(),K=L.getChildren(L.root);for(C=0;C<K.length;C++){var O=K[C];L.setVisible(O,f[O.id]||!1)}}catch(da){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=-f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V,ma,la){try{B=null!=B?B:this.editor.graph.isSelectionEmpty();var Y=this.getBaseFilename(!z),fa=Y+("xml"==c||"pdf"==c&&da?".drawio":"")+-"."+c;if("xml"==c){var Z=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,B,z,null,null,null,f);this.saveData(fa,c,Z,"text/xml")}else if("html"==c)Z=this.getHtml2(this.getFileData(!0),this.editor.graph,Y),this.saveData(fa,c,Z,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?fa=Y+".png":"jpeg"==c&&(fa=Y+".jpg"),this.saveRequest(fa,c,mxUtils.bind(this,function(J,W){try{return this.createDownloadRequest(J,c,B,W,I,z,L,K,O,-da,ea,void 0,void 0,!C,ca,V,ma,la)}catch(aa){this.handleError(aa)}}));else{var l=null,u=mxUtils.bind(this,function(J){J.length<=MAX_REQUEST_SIZE?this.saveData(fa,"svg",J,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(l)}))});if("svg"==c){var H=this.editor.graph.background;if(I||H==mxConstants.NONE)H=null;var U=this.editor.graph.getSvg(H,null,null,null,null,B);k&&this.editor.graph.addSvgShadow(U);this.editor.convertImages(U,-mxUtils.bind(this,mxUtils.bind(this,function(J){this.spinner.stop();u(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(J))})))}else fa=Y+".svg",l=this.getFileData(!1,!0,null,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}),B)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V,ma,la,Y,fa){c=this.downloadRequestBuilder(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V,ma,la,Y,fa);f="";for(var Z in c)k=c[Z],null!=k&&(f+=Z+"="+encodeURIComponent(k)+-"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V,ma,la,Y,fa){var Z=this.editor.graph,l=Z.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var u=null,H=null,U=null;if(!EditorUi.isElectronApp&&(l.width*l.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};O=O?"1":"0";"pdf"==f&&(null!=da?(u=da.from,H=da.to):-0==C&&(U="1"));"xmlpng"==f&&(O="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){u=C;break}C=Z.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;z={globalVars:Z.getExportVariables()};K&&(z.grid={size:Z.gridSize,steps:Z.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:Z.view.gridColor});Graph.translateDiagram&&-(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:u,to:H,allPages:U,bg:null!=C?C:mxConstants.NONE,base64:B,embedXml:O,xml:k,filename:null!=c?c:"",extras:JSON.stringify(z),scale:I,border:L,pageMargin:ma,w:ea&&isFinite(ea)?ea:null,h:ca&&isFinite(ca)?ca:null,crop:null!=V&&V?"1":"0",fit:null!=la&&la?"1":"0",sheetsAcross:Y,sheetsDown:fa}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));-if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var k=c.lastIndexOf("#");if(0<k){c=decodeURIComponent(c.substring(k+1));try{f=JSON.parse(c)}catch(B){}}}return f};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};-EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var k=f.lastIndexOf("#");0<k&&(f=f.substring(0,k));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(B){}0<k&&0<f.lastIndexOf("#")?window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,k){var B=window.location.hash,z=mxUtils.bind(this,function(I){var L=null!=c.data?c.data:"";null!=I&&0<I.length&&-(0<L.length&&(L+="\n"),L+=I);I=new LocalFile(this,"csv"!=c.format&&0<L.length?L:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);I.getHash=function(){return B};this.fileLoaded(I);"csv"==c.format&&this.importCsv(L,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,O=null,da=mxUtils.bind(this,function(){var ca=-this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(V){ca===this.currentPage&&(200<=V.getStatus()&&300>=V.getStatus()?(this.updateDiagram(V.getText()),ea()):this.handleError({message:mxResources.get("error")+" "+V.getStatus()}))}),mxUtils.bind(this,function(V){this.handleError(V)}))}),ea=mxUtils.bind(this,function(){window.clearTimeout(O);O=window.setTimeout(da,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,-function(){ea();da()}));ea();da()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(I){z(I)}),mxUtils.bind(this,function(I){null!=k&&k(I)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(l){var u=new mxCellOverlay(l.image||z.warningImage,l.tooltip,l.align,l.valign,l.offset);u.addListener(mxEvent.CLICK,function(H,U){B.alert(l.tooltip)});return u}var k=null,B=this;if(null!=c&&0<c.length&&(k=mxUtils.parseXml(c),-c=null!=k?k.documentElement:null,null!=c&&"updates"==c.nodeName)){var z=this.editor.graph,C=z.getModel();C.beginUpdate();var I=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var L=C.getCell(c.getAttribute("id"));if(null!=L){try{var K=c.getAttribute("value");if(null!=K){var O=mxUtils.parseXml(K).documentElement;if(null!=O)if("1"==O.getAttribute("replace-value"))C.setValue(L,O);else for(var da=O.attributes,ea=0;ea<da.length;ea++)z.setAttributeForCell(L,da[ea].nodeName,0<da[ea].nodeValue.length?-da[ea].nodeValue:null)}}catch(l){null!=window.console&&console.log("Error in value for "+L.id+": "+l)}try{var ca=c.getAttribute("style");null!=ca&&z.model.setStyle(L,ca)}catch(l){null!=window.console&&console.log("Error in style for "+L.id+": "+l)}try{var V=c.getAttribute("icon");if(null!=V){var ma=0<V.length?JSON.parse(V):null;null!=ma&&ma.append||z.removeCellOverlays(L);null!=ma&&z.addCellOverlay(L,f(ma))}}catch(l){null!=window.console&&console.log("Error in icon for "+L.id+": "+l)}try{var la=c.getAttribute("geometry");-if(null!=la){la=JSON.parse(la);var Y=z.getCellGeometry(L);if(null!=Y){Y=Y.clone();for(key in la){var fa=parseFloat(la[key]);"dx"==key?Y.x+=fa:"dy"==key?Y.y+=fa:"dw"==key?Y.width+=fa:"dh"==key?Y.height+=fa:Y[key]=parseFloat(la[key])}z.model.setGeometry(L,Y)}}}catch(l){null!=window.console&&console.log("Error in icon for "+L.id+": "+l)}}}else if("model"==c.nodeName){for(var Z=c.firstChild;null!=Z&&Z.nodeType!=mxConstants.NODETYPE_ELEMENT;)Z=Z.nextSibling;null!=Z&&(new mxCodec(c.firstChild)).decode(Z,-C)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(z.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(I=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{C.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return k};EditorUi.prototype.getCopyFilename=function(c,-f){var k=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var B=k.lastIndexOf(".");0<=B&&(c=k.substring(B),k=k.substring(0,B));if(f){f=k;var z=new Date;k=z.getFullYear();B=z.getMonth()+1;var C=z.getDate(),I=z.getHours(),L=z.getMinutes();z=z.getSeconds();k=f+(" "+(k+"-"+B+"-"+C+"-"+I+"-"+L+"-"+z))}return k=mxResources.get("copyOf",[k])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",[c])}catch(k){}};EditorUi.prototype.fileLoaded=function(c,-f,k){var B=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var z=!1;this.hideDialog();null!=B&&(B.removeListener(this.descriptorChangedListener),this.logIfModified(B,!0),B.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var C=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=B&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);-!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",-this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.editor.setStatus(""):this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>");!this.editor.isChromelessView()||-this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=k&&k();this.editor.fireEvent(new mxEventObject("fileLoaded"));z=!0;if(!this.isOffline()&&null!=c.getMode()){var I="1"==urlParams.sketch?"sketch":uiTheme;if(null==I)I="default";else if("sketch"==I||"min"==I)I+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",-[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(L){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(L){}}catch(L){this.fileLoadedError=L;if(null!=c)try{c.close()}catch(K){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,-mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=B?this.fileLoaded(B)||C():C()});f?c():(null!=L.fallbackFileData&&(L.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var K=new LocalFile(this,L.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(K)})}),this.handleError(L,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else C();return z};EditorUi.prototype.getHashValueForPages=function(c,f){var k=-0,B=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var C=0;C<c.length;C++){this.updatePageRoot(c[C]);var I=c[C].node.cloneNode(!1);I.removeAttribute("name");B.root=c[C].root;var L=z.encode(B);this.editor.graph.saveViewState(c[C].viewState,L,!0);L.removeAttribute("pageWidth");L.removeAttribute("pageHeight");I.appendChild(L);null!=f&&(f.eltCount+=I.getElementsByTagName("*").length,f.nodeCount+=I.getElementsByTagName("mxCell").length);k=(k<<5)-k+-this.hashValue(I,function(K,O,da,ea){return!ea||"mxGeometry"!=K.nodeName&&"mxPoint"!=K.nodeName||"x"!=O&&"y"!=O&&"width"!=O&&"height"!=O?ea&&"mxCell"==K.nodeName&&"previous"==O?null:da:Math.round(da)},f)<<0}return k};EditorUi.prototype.hashValue=function(c,f,k){var B=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(B^=this.hashValue(c.nodeName,f,k));if(null!=c.attributes){null!=k&&(k.attrCount+=c.attributes.length);-for(var z=0;z<c.attributes.length;z++){var C=c.attributes[z].name,I=null!=f?f(c,C,c.attributes[z].value,!0):c.attributes[z].value;null!=I&&(B^=this.hashValue(C,f,k)+this.hashValue(I,f,k))}}if(null!=c.childNodes)for(z=0;z<c.childNodes.length;z++)B=(B<<5)-B+this.hashValue(c.childNodes[z],f,k)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=k&&(k.byteCount+=c.length);for(z=0;z<c.length;z++)f=(f<<5)-f+c.charCodeAt(z)<<0;B^=f}return B};EditorUi.prototype.descriptorChanged=function(){};-EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,k,B,z,C,I){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};-EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var k=f.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(c,null,2));f.appendChild(k);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),-".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var k=0;k<f.length;k++)f[k].parentNode.removeChild(f[k]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,f){var k=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));-c=null!=c?c:k.firstChild.nextSibling.nextSibling;f=k.lastChild;var B=f.previousSibling;k.insertBefore(f,c);k.insertBefore(B,f)}};EditorUi.prototype.loadLibrary=function(c,f){var k=mxUtils.parseXml(c.getData());if("mxlibrary"==k.documentElement.nodeName){var B=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(c,B,k.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=-function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,f,k,B){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var z=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var C=0;C<this.openLibraries.length;C++)if(this.openLibraries[C].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[C],-this.openLibraries);break}z={file:c,images:f,title:k,expand:B};this.openLibraries.push(z)}else this.scratchpad=c;C=this.sidebar.palettes[c.getHash()];C=null!=C?C[C.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var I=null,L=mxUtils.bind(this,function(fa,Z){0==fa.length&&c.isEditable()?(null==I&&(I=document.createElement("div"),I.className="geDropTarget",mxUtils.write(I,mxResources.get("dragElementsHere"))),Z.appendChild(I)):this.addLibraryEntries(fa,Z)});null!=this.sidebar&&null!=-f&&this.sidebar.addEntries(f);null==k&&(k=c.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var K=this.sidebar.addPalette(c.getHash(),k,null!=B?B:!0,mxUtils.bind(this,function(fa){L(f,fa)}));null!=z&&(z.div=K);this.repositionLibrary(C,"L.scratchpad"!=c.getHash());B=K.parentNode.previousSibling;k=B.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=c.title&&B.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+k);var O=document.createElement("div");O.style.backgroundColor=-"inherit";B.style.position="relative";var da=document.createElement("img");da.className="geAdaptiveAsset";da.setAttribute("src",Editor.crossImage);da.setAttribute("title",mxResources.get("close"));da.setAttribute("valign","absmiddle");da.setAttribute("border","0");da.style.position="relative";da.style.top="2px";da.style.width="14px";da.style.cursor="pointer";da.style.margin="0 3px";var ea=null;if(".scratchpad"!=c.title||this.closableScratchpad)O.appendChild(da),mxEvent.addListener(da,"click",mxUtils.bind(this,-function(fa){if(!mxEvent.isConsumed(fa)){var Z=mxUtils.bind(this,function(){null!=z&&mxUtils.remove(z,this.openLibraries);this.closeLibrary(c)});null!=ea?this.confirm(mxResources.get("allChangesLost"),null,Z,mxResources.get("cancel"),mxResources.get("discardChanges")):Z();mxEvent.consume(fa)}}));if(c.isEditable()){var ca=this.editor.graph,V=null;k=mxUtils.bind(this,function(fa){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(fa)});var ma=mxUtils.bind(this,function(fa){c.setModified(!0);-c.isAutosave()?(null!=V&&null!=V.parentNode&&V.parentNode.removeChild(V),V=da.cloneNode(!1),V.setAttribute("src",Editor.spinImage),V.setAttribute("title",mxResources.get("saving")),V.style.cursor="default",V.style.marginRight="2px",V.style.marginTop="-2px",O.insertBefore(V,O.firstChild),this.saveLibrary(c.getTitle(),f,c,c.getMode(),!0,!0,function(){null!=V&&null!=V.parentNode&&V.parentNode.removeChild(V)})):null==ea&&(ea=da.cloneNode(!1),ea.setAttribute("src",Editor.saveImage),ea.setAttribute("title",-mxResources.get("save")),O.insertBefore(ea,O.firstChild),mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Z){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ea||c.isModified()||(ea.parentNode.removeChild(ea),ea=null)});mxEvent.consume(Z)})))}),la=mxUtils.bind(this,function(fa,Z,l,u){fa=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(fa)));for(var H=0;H<fa.length;H++){var U=ca.getCellGeometry(fa[H]);null!=U&&U.translate(-Z.x,-Z.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(fa,-Z.width,Z.height,u||"",!0,null,!1));fa=mxUtils.getXml(this.editor.graph.encodeCells(fa));Editor.defaultCompressed&&(fa=Graph.compress(fa));Z={xml:fa,w:Z.width,h:Z.height};null!=u&&(Z.title=u);f.push(Z);ma(l);null!=I&&null!=I.parentNode&&0<f.length&&(I.parentNode.removeChild(I),I=null)}),Y=mxUtils.bind(this,function(fa){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(fa),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),-mxResources.get("ok"));else{var Z=ca.getSelectionCells(),l=ca.view.getBounds(Z);if(null!=l&&0<l.width&&0<l.height){var u=ca.view.scale;l.x/=u;l.y/=u;l.width/=u;l.height/=u;l.x-=ca.view.translate.x;l.y-=ca.view.translate.y;la(Z,l)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(fa)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(fa){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),-null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="light-dark(#fefefe, #000000)",K.style.cursor="copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(fa))}),mxUtils.bind(this,function(fa){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,Y(fa),mxEvent.consume(fa))}));-mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(fa){ca.isMouseDown&&null!=ca.graphHandler.first&&(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(fa){K.style.backgroundColor="light-dark(#fefefe, #000000)";fa.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();-fa.stopPropagation();fa.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(fa){K.style.cursor="";K.style.backgroundColor="";0<fa.dataTransfer.files.length&&this.importFiles(fa.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(Z,l,u,H,U,J,W,aa,ba){if(null!=Z&&"image/"==l.substring(0,6))Z="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Z),Z=[new mxCell("",new mxGeometry(0,0,U,J),Z)],Z[0].vertex=-!0,la(Z,new mxRectangle(0,0,U,J),fa,mxEvent.isAltDown(fa)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),null!=I&&null!=I.parentNode&&0<f.length&&(I.parentNode.removeChild(I),I=null);else{var ja=!1,oa=mxUtils.bind(this,function(qa,ra){null!=qa&&"application/pdf"==ra&&(ra=Editor.extractGraphModelFromPdf(qa),null!=ra&&0<ra.length&&(qa=ra));if(null!=qa)if(qa=mxUtils.parseXml(qa),"mxlibrary"==qa.documentElement.nodeName)try{var ua=JSON.parse(mxUtils.getTextContent(qa.documentElement));L(ua,-K);f=f.concat(ua);ma(fa);this.spinner.stop();ja=!0}catch(La){}else if("mxfile"==qa.documentElement.nodeName)try{var za=qa.documentElement.getElementsByTagName("diagram");for(ua=0;ua<za.length;ua++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(za[ua])),Ca=this.editor.graph.getBoundingBoxFromGeometry(Ba);null!=Ca&&la(Ba,new mxRectangle(0,0,Ca.width,Ca.height),fa)}ja=!0}catch(La){null!=window.console&&console.log("error in drop handler:",La)}ja||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));-null!=I&&null!=I.parentNode&&0<f.length&&(I.parentNode.removeChild(I),I=null)});null!=ba&&null!=W&&EditorUi.isVisioFilename(W)?this.importVisio(ba,function(qa){oa(qa,"text/xml")},null,W):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(Z,W)&&null!=ba?this.isExternalDataComms()?this.parseFile(ba,mxUtils.bind(this,function(qa){4==qa.readyState&&(this.spinner.stop(),200<=qa.status&&299>=qa.status?oa(qa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==qa.status?"drawingTooLarge":-"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):oa(Z,l)}}));fa.stopPropagation();fa.preventDefault()})),mxEvent.addListener(K,"dragleave",function(fa){K.style.cursor="";K.style.backgroundColor="";fa.stopPropagation();fa.preventDefault()}));da=da.cloneNode(!1);da.setAttribute("src",Editor.editImage);da.setAttribute("title",mxResources.get("edit"));O.insertBefore(da,O.firstChild);mxEvent.addListener(da,-"click",k);k=da.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));O.insertBefore(k,O.firstChild);mxEvent.addListener(k,"click",Y);".scratchpad"==c.title&&(this.addSelectionToScratchpad=Y);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(k=this.createHelpIcon(EditorUi.scratchpadHelpLink),C=k.getElementsByTagName("img")[0],k.style.marginRight="1px",C.style.marginTop="-2px",C.style.opacity="",O.insertBefore(k,O.firstChild))}B.appendChild(O);-this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var k=0;k<c.length;k++)try{var B=c[k],z=B.data;if(null!=z){z="data:"==z.substring(0,5)?this.convertDataUri(z):z;var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==B.aspect&&(C+="aspect=fixed;");C=C+"image="+z+";";null!=B.style&&(C+=B.style);f.appendChild(this.sidebar.createVertexTemplate(C,B.w,B.h,"",B.title||"",!1,null,!0))}else if(null!=B.xml){var I=-this.stringToCells("<"==B.xml.charAt(0)?B.xml:Graph.decompress(B.xml)),L=0==I.length?mxResources.get("drawingEmpty"):null!=B.title?B.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(I,B.w,B.h,L,!0,null,!0))}}catch(K){L=null!=K.message?mxResources.get("error")+": "+K.message:String(K),C=this.sidebar.createVertexTemplateFromCells(null,B.w,B.h,L,!0,null,!0),f.appendChild(C)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=-0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=-41,EditorUi.prototype.toolbarHeight=38);"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,k,B,z,C,I){c=new ImageDialog(this,c,f,k,B,z,C,I);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,k,B,z,C){var I=localStorage.getItem(f);c=new TextareaDialog(this,-c,null!=I?JSON.stringify(JSON.parse(I),null,2):"",mxUtils.bind(this,function(L){if(null!=L)try{if(null!=C&&C(L),L==I)this.hideDialog();else{if(0<L.length){var K=JSON.parse(L);localStorage.setItem(f,JSON.stringify(K))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(O){this.handleError(O)}}),null,mxResources.get("close"),null,null,null,!0,null,null,z,k,B);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=-function(c,f,k,B){c=null!=c?c:mxUtils.bind(this,function(z,C,I,L){C||(z=new ChangePageSetup(this,B?I:null,z),z.ignoreColor=!B,null!=L&&B&&(z.shadowVisible=L),this.editor.graph.model.execute(z))});c=new BackgroundImageDialog(this,c,f,k,B);this.showDialog(c.container,400,B?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,k,B,z){c=new LibraryDialog(this,c,f,k,B,z);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&-this.showSplash()}));c.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,k,B,z,C,I){var L=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&-null!=c.message)try{I||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!I||null==window.console||console.error("EditorUi.handleError:",c)}catch(ca){}if(null!=K||null!=f){I=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var O=mxResources.get("ok"),da=null;f=null!=f?f:mxResources.get("error");if(null!=K){null!=K.retry&&(O=mxResources.get("cancel"),da=function(){L();K.retry()});if(404==K.code||-404==K.status||403==K.code){I=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ea=null!=z?null:null!=C?C:window.location.hash;if(null!=ea&&("#G"==ea.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ea.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&-0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==K.code||404==K.status)){ea="#U"==ea.substring(0,2)?ea.substring(45,ea.lastIndexOf("%26ex")):ea.substring(2);this.showError(f,I,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ea);null!=B&&B()}),da,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){Y.innerText=-"";for(var fa=0;fa<V.length;fa++){var Z=document.createElement("option");mxUtils.write(Z,V[fa].displayName);Z.value=fa;Y.appendChild(Z);Z=document.createElement("option");Z.innerHTML=" ";mxUtils.write(Z,"<"+V[fa].email+">");Z.setAttribute("disabled","disabled");Y.appendChild(Z)}Z=document.createElement("option");mxUtils.write(Z,mxResources.get("addAccount"));Z.value=V.length;Y.appendChild(Z)}var V=this.drive.getUsersList(),ma=document.createElement("div"),la=document.createElement("div");-la.style.marginBottom="6px";mxUtils.write(la,mxResources.get("changeUser")+": ");ma.appendChild(la);var Y=document.createElement("select");Y.style.width="100%";ca();mxEvent.addListener(Y,"change",mxUtils.bind(this,function(){var fa=Y.value,Z=V.length!=fa;Z&&this.drive.setUser(V[fa]);this.drive.authorize(Z,mxUtils.bind(this,function(){Z||(V=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(l){this.handleError(l)}),!0)}));ma.appendChild(Y);ma=new CustomDialog(this,ma,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),-!0)}));this.showDialog(ma.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),520,150);return}}null!=K.message?I=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,!1):mxUtils.htmlEntities(K.message,!1):null!=K.response&&null!=K.response.error?I=mxUtils.htmlEntities(K.response.error,!1):"undefined"!==typeof window.App&&(K.code==App.ERROR_TIMEOUT?I=mxUtils.htmlEntities(mxResources.get("timeout"),!1):K.code==App.ERROR_BUSY?I=mxUtils.htmlEntities(mxResources.get("busy"),-!1):"string"===typeof K&&0<K.length&&(I=mxUtils.htmlEntities(K,!1)))}z=c=null;null!=K&&null!=K.helpLink?(c=mxResources.get("help"),z=mxUtils.bind(this,function(){return this.editor.graph.openLink(K.helpLink)})):null!=K&&null!=K.ownerEmail?(c=mxResources.get("contactOwner"),I+=mxUtils.htmlEntities(" ("+c+": "+K.ownerEmail+")",!1),z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(c=K.alternateAction.label,z=K.alternateAction.funct);-this.showError(f,I,O,k,da,null,null,c,z,null,null,null,B?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(c,f,k){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,k||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,k,B,z,C){c=null!=c?c:"";var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},L=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){I();null!=f&&f()},function(){I();-null!=k&&k()},B,z,null,null,null,null,L);this.showDialog(c.container,340,46+L,!0,C);c.init()};EditorUi.prototype.showBanner=function(c,f,k,B,z,C,I,L,K){var O=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){C=null!=C?C:"bottom:10px;left:50%;";I=null!=I?I:"translate(-50%,120%)";L=null!=L?L:"translate(-50%,0%)";var da=z?500:1E3;O=z?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";-var ea=document.createElement("div");ea.style.cssText="position:absolute;"+C+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+O;mxUtils.setPrefixedStyle(ea.style,"transform",I);mxUtils.setPrefixedStyle(ea.style,"transition","all "+da+"ms ease");ea.className="geBtn gePrimaryBtn"+(z?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(ea.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(ea.style,"transform-origin",-K);if(!z){var ca=document.createElement("img");ca.setAttribute("src",IMAGE_PATH+"/logo.png");ca.setAttribute("border","0");ca.setAttribute("align","absmiddle");ca.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";ea.appendChild(ca);ca=document.createElement("img");ca.setAttribute("src",Dialog.prototype.closeImage);ca.setAttribute("title",mxResources.get(B?"doNotShowAgain":"close"));ca.setAttribute("border","0");ca.style.cssText=(z?"right:6px;top:9px;":"right:10px;top:12px;")+-"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";ea.appendChild(ca)}mxUtils.write(ea,f);document.body.appendChild(ea);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var V=document.createElement("input");V.setAttribute("type","checkbox");V.setAttribute("id","geDoNotShowAgainCheckbox");V.style.marginRight="6px";if(!B){f.appendChild(V);-var ma=document.createElement("label");ma.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ma,mxResources.get("doNotShowAgain"));f.appendChild(ma);ea.style.paddingBottom=z?"16px":"30px";ea.appendChild(f)}var la=mxUtils.bind(this,function(){null!=ea.parentNode&&(ea.parentNode.removeChild(ea),this.bannerShowing=!1,V.checked||B)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ca&&mxEvent.addListener(ca,-"click",mxUtils.bind(this,function(fa){mxEvent.consume(fa);la()}));var Y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",I);window.setTimeout(mxUtils.bind(this,function(){la()}),da)});mxEvent.addListener(ea,"click",mxUtils.bind(this,function(fa){var Z=mxEvent.getSource(fa);Z!=V&&Z!=ma?(null!=k&&k(),la(),mxEvent.consume(fa)):Y()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",L)}),da/2);window.setTimeout(Y,z?4E3:3E4);O=!0}return O};-EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,k,B){c=c.toDataURL("image/"+k);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<B&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",B));else throw{message:mxResources.get("unknownError")};-return c};EditorUi.prototype.saveCanvas=function(c,f,k,B,z){var C="jpeg"==k?"jpg":k;B=this.getBaseFilename(B)+(null!=f?".drawio":"")+"."+C;c=this.createImageDataUri(c,f,k,z);this.saveData(B,C,c.substring(c.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||-mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,k,B,z,C){"text/xml"!=k||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=C?C:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=B?this.base64ToBlob(c,-k):new Blob([c],{type:k}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(c,!0):(k.document.write(c),k.document.close(),k.document.execCommand("SaveAs",!0,f),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,k,B);else{var I=document.createElement("a");C=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&-"undefined"!==typeof I.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var L=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);C=65==(L?parseInt(L[2],10):!1)?!1:C}if(C||this.isOffline()){I.href=URL.createObjectURL(B?this.base64ToBlob(c,k):new Blob([c],{type:k}));C?I.download=f:I.setAttribute("target","_blank");document.body.appendChild(I);try{window.setTimeout(function(){URL.revokeObjectURL(I.href)},2E4),I.click(),I.parentNode.removeChild(I)}catch(K){}}else this.createEchoRequest(c,f,k,-B,z).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,k,B,z,C){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=k?"&mime="+k:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(B?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,k,B,z,C,I,L){C=null!=C?C:!1;I=null!=I?I:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(da,ea,ca,V){try{if("_blank"==-ea)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(c,k,B);else if(null!=k&&"text/html"==k.substring(0,9)){var ma=new EmbedDialog(this,c);this.showDialog(ma.container,450,240,!0,!0);ma.init()}else{var la=window.open("about:blank");null==la?mxUtils.popup(c,!0):(la.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),la.document.close())}else if(ea==App.MODE_DEVICE||"download"==ea)this.doSaveLocalFile(c,da,k,B,null,L);else if(null!=da&&0<da.length){var Y=mxUtils.bind(this,function(fa){try{this.exportFile(c,-da,k,B,ea,fa)}catch(Z){this.handleError(Z)}});null!=V?Y(V):this.pickFolder(ea,Y)}}catch(fa){this.handleError(fa)}});z=[];C||z.push(App.MODE_BROWSER);I||z.push("_blank");var O=new SaveDialog(this,f,mxUtils.bind(this,function(da,ea,ca){K(da.value,ea,da,ca);this.hideDialog(null,null,O.container)}),z,c,k,B);this.showDialog(O.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));O.init()};EditorUi.prototype.openInNewWindow=function(c,f,k){var B=window.open("about:blank");if(null==B||-null==B.document)mxUtils.popup(c,!0);else{var z="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var C=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=C&&(z="background: "+C+";")}z='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+z+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||k?(C=k?c:btoa(unescape(encodeURIComponent(c))),B.document.write(z+'<img style="max-width:100%;" src="data:'+f+";base64,"+C+'"/></body></html>')):-B.document.write(z+c+"</body></html>"):B.document.write(z+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");B.document.close()}};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=-null;var f=c(mxUtils.bind(this,function(B){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=-"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,-80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var z=f.getBoundingClientRect();this.tagsDialog.style.left=z.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+-4+"px";z=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=z.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(B)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var B=this.editor.graph.getAllTags();f.style.display=0<B.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown",-mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&-(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=c(mxUtils.bind(this,-function(B){var z=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",z);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)z.apply(this);else{this.exportDialog=document.createElement("div");var C=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";-this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=C.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";C=mxUtils.getCurrentStyle(this.editor.graph.container);-this.exportDialog.style.zIndex=C.zIndex;var I=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});I.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",z);this.editor.exportToCanvas(mxUtils.bind(this,function(L){I.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding=-"10px";var K=this.createImageDataUri(L,null,"png");L=document.createElement("img");L.style.maxWidth="140px";L.style.maxHeight="140px";L.style.cursor="pointer";L.style.backgroundColor="white";L.setAttribute("title",mxResources.get("openInNewWindow"));L.setAttribute("border","0");L.setAttribute("src",K);this.exportDialog.appendChild(L);mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.openInNewWindow(K.substring(K.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,-null,mxUtils.bind(this,function(L){I.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(L)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(B)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,k,B,z){this.isLocalFileSave()?this.saveLocalFile(k,c,B,z,f):this.saveRequest(c,f,mxUtils.bind(this,function(C,I){return this.createEchoRequest(k,-C,B,z,f,I)}),k,z,B)};EditorUi.prototype.saveRequest=function(c,f,k,B,z,C,I){I=null!=I?I:!mxClient.IS_IOS||!navigator.standalone;var L=mxUtils.bind(this,function(O,da,ea,ca){if("_blank"==da||null!=O&&0<O.length){var V=k("_blank"==da?null:O,da==App.MODE_DEVICE||"download"==da||null==da||"_blank"==da?"0":"1");null!=V&&(da==App.MODE_DEVICE||"download"==da||"_blank"==da?V.simulate(document,"_blank"):(ea=mxUtils.bind(this,function(ma){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=B)try{this.exportFile(B,-O,C,!0,da,ma)}catch(la){this.handleError(la)}else this.spinner.spin(document.body,mxResources.get("saving"))&&V.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=V.getStatus()&&299>=V.getStatus())try{this.exportFile(V.getText(),O,C,!0,da,ma)}catch(la){this.handleError(la)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(la){this.spinner.stop();this.handleError(la)}))}),null!=ca?ea(ca):this.pickFolder(da,ea)))}});z=[App.MODE_BROWSER];I||z.push("_blank");-var K=new SaveDialog(this,c,mxUtils.bind(this,function(O,da,ea){L(O.value,da,O,ea);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");this.showDialog(K.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));K.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,k,B,z,C){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=-function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,k){f(null)};EditorUi.prototype.exportSvg=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(J){Editor.addRetryToError(J,mxUtils.bind(this,function(){this.exportSvg(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V)}));this.handleError(J)})))try{var ma=this.editor.graph.isSelectionEmpty();k=null!=k?k:ma;var la=f?null:this.editor.graph.background;la==mxConstants.NONE&&-(la=null);null==la&&0==f&&(la=this.editor.graph.shapeBackgroundColor);var Y=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var fa=this.editor.graph.createSvgImageExport(z),Z=this.editor.graph.getSvg(la,c,I,L,null,k,null,fa,"blank"==O?"_blank":"self"==O?"_top":null,null,!ca,da,ea);this.editor.graph.addForeignObjectWarning=Y;B&&this.editor.graph.addSvgShadow(Z);var l=this.getBaseFilename()+(z?".drawio":"")+".svg";V=null!=-V?V:mxUtils.bind(this,function(J){this.isLocalFileSave()||J.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",J,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(J)}))});var u=mxUtils.bind(this,function(J){this.spinner.stop();z&&J.setAttribute("content",this.getFileData(!0,null,null,null,k,K,null,null,null,null,null,c,I));V(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+-mxUtils.getXml(J))});this.editor.graph.mathEnabled&&this.editor.addMathCss(Z);var H=mxUtils.bind(this,function(J){Editor.replaceSvgDataUris&&C&&EditorUi.embedSvgImages(J);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(J,da,u):u(J)}),U=mxUtils.bind(this,function(J){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(J,H,this.thumbImageCache)):H(J)});ca?this.embedFonts(Z,U):(this.editor.addFontCss(Z),U(Z))}catch(J){this.handleError(J)}};-EditorUi.prototype.replaceAlternateContent=function(c,f,k){function B(ea,ca,V,ma,la){var Y=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");Y.setAttribute("x",ca);Y.setAttribute("y",V+.5);Y.setAttribute("width",ma.width);Y.setAttribute("height",ma.height);null==Y.setAttributeNS?Y.setAttribute("xlink:href",la):Y.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",la);ea.replaceChild(Y,ea.lastChild);L()}function z(){if(I<da.length)da[I++](z)}var C="";f=c.getElementsByTagName("style");-for(var I=0;I<f.length;I++)C+=f[I].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var L=mxUtils.bind(this,function(){counter--;0==counter&&k(c)}),K={},O={},da=[];for(I=0;I<f.length;I++)mxUtils.bind(this,function(ea){var ca=ea.getElementsByTagName("div");if(0<ca.length)try{var V=ca[0].cloneNode(!0),ma=parseInt(V.style.marginLeft),la=parseInt(V.style.paddingTop),Y=V.getElementsByTagName("div")[1],fa=ca=!1,Z=V.style.alignItems,l=V.style.justifyContent;if(null!=V.style.writingMode){var u=-V.style.writingMode;fa="vertical-"==u.substring(0,9);ca="-rl"==u.substring(u.length-3)}var H=!fa&&"1px"==V.style.width||fa&&"1px"==V.style.height;if(!fa&&"1px"==V.style.height||fa&&"1px"==V.style.width)V.style.alignItems=fa&&ca?"unsafe flex-end":"unsafe flex-start";H&&(V.style.justifyContent="unsafe flex-start");V.style.paddingTop="";V.style.marginLeft="";var U=V.outerHTML,J=K[U];null==J&&(V.style.position="absolute",V.style.visibility="hidden",document.body.appendChild(V),u=1,u="1px"==V.style.width?-Y.offsetWidth:parseInt(V.style.width),H=1,H="1px"==V.style.height?Y.offsetHeight:parseInt(V.style.height),document.body.removeChild(V),J=new mxRectangle(ma,la,u,H),K[U]=J);"1px"==V.style.height&&("unsafe center"==Z?la-=J.height/2:"unsafe flex-end"==Z&&(la-=J.height));if("1px"==V.style.width)if(!fa&&"unsafe center"==l||fa&&"unsafe center"==Z)ma-=J.width/2;else if(!fa&&"unsafe flex-end"==l||fa&&(!ca&&"unsafe flex-end"==Z||ca&&"unsafe flex-start"==Z))ma-=J.width;J=new mxRectangle(ma,la,J.width,J.height+-parseInt(Y.style.fontSize)/4);da.push(mxUtils.bind(this,function(W){var aa=O[U];null==aa?Graph.htmlToPng(U,J.width,J.height,mxUtils.bind(this,function(ba){B(ea,ma,la,J,ba);O[U]=ba;W()}),C):(B(ea,ma,la,J,aa),W())}))}catch(W){L()}else L()})(f[I]);0==counter&&k(c);I=0;z()};EditorUi.prototype.addRadiobox=function(c,f,k,B,z,C,I){return this.addCheckbox(c,k,B,z,C,I,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,k,B,z,C,I,L){C=null!=C?C:!0;var K=document.createElement("input");K.style.marginRight="8px";-K.style.marginTop="16px";K.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();K.id=I;null!=L&&K.setAttribute("name",L);k&&(K.setAttribute("checked","checked"),K.defaultChecked=!0);B&&K.setAttribute("disabled","disabled");C&&(c.appendChild(K),k=document.createElement("label"),mxUtils.write(k,f),k.setAttribute("for",I),c.appendChild(k),z||mxUtils.br(c));return K};EditorUi.prototype.addEditButton=function(c,f){var k=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft=-"24px";var B=this.getCurrentFile(),z="";null!=B&&B.getMode()!=App.MODE_DEVICE&&B.getMode()!=App.MODE_BROWSER&&(z=window.location.href);var C=document.createElement("select");C.style.maxWidth="200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";B=document.createElement("option");B.setAttribute("value","blank");mxUtils.write(B,mxResources.get("makeCopy"));C.appendChild(B);var I=document.createElement("option");I.setAttribute("value","custom");mxUtils.write(I,-mxResources.get("custom")+"...");C.appendChild(I);c.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==C.value){var L=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!=K?(z=K,I.setAttribute("title",K)):(C.value="blank",I.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(L.container,300,80,!0,!1);L.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==-f||f.checked)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return k.checked?"blank"===C.value?"_blank":z:null},getEditInput:function(){return k},getEditSelect:function(){return C}}};EditorUi.prototype.addLinkSection=function(c,f){function k(){var L=document.createElement("div");L.style.width="100%";L.style.height="100%";L.style.boxSizing="border-box";null!=C&&C!=mxConstants.NONE?(L.style.border="1px solid black",L.style.backgroundColor=-C):(L.style.backgroundPosition="center center",L.style.backgroundRepeat="no-repeat",L.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");I.innerText="";I.appendChild(L)}mxUtils.write(c,mxResources.get("links")+":");var B=document.createElement("select");B.style.width="100px";B.style.padding="0px";B.style.marginLeft="8px";B.style.marginRight="10px";B.className="geBtn";var z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z,mxResources.get("automatic"));B.appendChild(z);-z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));B.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));B.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),B.appendChild(f));c.appendChild(B);mxUtils.write(c,mxResources.get("borderColor")+-":");var C="#0000ff",I=null;I=mxUtils.button("",mxUtils.bind(this,function(L){this.pickColor(C||"none",function(K){C=K;k()});mxEvent.consume(L)}));k();I.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";I.style.marginLeft="4px";I.style.height="22px";I.style.width="22px";I.style.position="relative";I.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";I.className="geColorBtn";c.appendChild(I);mxUtils.br(c);return{getColor:function(){return C},getTarget:function(){return B.value},-focus:function(){B.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,k,B,z,C){C=null!=C?C:[];k&&(C.push("lightbox=1"),"auto"!=c&&C.push("target="+c),null!=f&&f!=mxConstants.NONE&&C.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=B&&0<B.length&&C.push("edit="+encodeURIComponent(B)),z&&C.push("layers=1"),this.editor.graph.foldingEnabled&&C.push("nav=1"));return C};EditorUi.prototype.createLink=function(c,f,k,B,z,C,I,L,K,O,da){var ea=this.getCurrentFile();K=this.createUrlParameters(c,-f,B,z,C,K);c=!0;null!=I?k="#U"+encodeURIComponent(I):L||null==ea||""==ea.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+ea.getHash(),c=!1);c&&null!=ea&&null!=ea.getTitle()&&ea.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(ea.getTitle()));O&&1<k.length&&(K.push("open="+k.substring(1)),k="");da&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());-return(B&&(null!=I||null!=ea&&ea.getMode()!=App.MODE_GITHUB&&ea.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+k};EditorUi.prototype.createHtml=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca){this.getBasenames();var V={};""!=z&&z!=mxConstants.NONE&&(V.highlight=z);"auto"!==B&&(V.target=B);O||(V.lightbox=!1);V.nav=this.editor.graph.foldingEnabled;-k=parseInt(k);isNaN(k)||100==k||(V.zoom=k/100);k=[];I&&(k.push("pages"),V.resize=!0,null!=this.pages&&null!=this.currentPage&&(V.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(k.push("zoom"),V.resize=!0);L&&k.push("layers");K&&k.push("tags");null!=ca&&(V["dark-mode"]=ca);0<k.length&&(O&&k.push("lightbox"),V.toolbar=k.join(" "));null!=da&&0<da.length&&(V.edit=da);null!=c?V.url=c:V.xml=this.getFileData(!0,null,null,null,null,!I);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=-k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(V))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ea(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=-function(c,f,k,B){var z=document.createElement("div");z.style.whiteSpace="nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var I=document.createElement("div");I.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";L.setAttribute("value",-"url");L.setAttribute("type","radio");L.setAttribute("name","type-embedhtmldialog");C=L.cloneNode(!0);C.setAttribute("value","copy");I.appendChild(C);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));I.appendChild(K);mxUtils.br(I);I.appendChild(L);K=document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));I.appendChild(K);var O=this.getCurrentFile();null==k&&null!=O&&O.constructor==window.DriveFile&&(K=document.createElement("a"),-K.style.paddingLeft="12px",K.style.color="gray",K.style.cursor="pointer",mxUtils.write(K,mxResources.get("share")),I.appendChild(K),mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(O.getId(),O)})));C.setAttribute("checked","checked");null==k&&L.setAttribute("disabled","disabled");z.appendChild(I);I=380;var da=this.addLinkSection(z),ea=document.createElement("select");ea.style.maxWidth="260px";ea.style.marginLeft="8px";ea.style.marginTop="16px";-K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));ea.appendChild(K);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));ea.appendChild(K);K=document.createElement("option");K.setAttribute("value","auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected","selected");ea.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+-":");z.appendChild(ea);mxUtils.br(z);I+=26;var ca=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,":");var V=document.createElement("input");V.setAttribute("type","text");V.style.marginRight="16px";V.style.width="60px";V.style.marginLeft="4px";V.style.marginRight="12px";V.value="100%";z.appendChild(V);var ma=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=this.pages&&1<this.pages.length;var la=la=this.addCheckbox(z,mxResources.get("allPages"),K,!K),Y=this.addCheckbox(z,-mxResources.get("layers"),!0),fa=this.addCheckbox(z,mxResources.get("tags"),!0),Z=this.addCheckbox(z,mxResources.get("lightbox"),!0),l=null;if(EditorUi.enableHtmlEditOption){l=this.addEditButton(z,Z);var u=l.getEditInput();u.style.marginBottom="16px";I+=50;mxEvent.addListener(Z,"change",function(){Z.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled");u.checked&&Z.checked?l.getEditSelect().removeAttribute("disabled"):l.getEditSelect().setAttribute("disabled","disabled")})}c=-new CustomDialog(this,z,mxUtils.bind(this,function(){B(L.checked?k:null,ca.checked,V.value,da.getTarget(),da.getColor(),ma.checked,la.checked,Y.checked,fa.checked,Z.checked,null!=l?l.getLink():null,null!=ea?ea.value:null)}),null,c,f);this.showDialog(c.container,340,I,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,k,B,z,C,I,L,K){var O=document.createElement("div");O.style.whiteSpace="nowrap";var da=document.createElement("h3");mxUtils.write(da,c||mxResources.get("publish"));-da.style.width="100%";da.style.textAlign="center";da.style.marginTop="2px";da.style.marginBottom="20px";O.appendChild(da);var ea=document.createElement("select");c=30;ea.className="geBtn";ea.style.marginBottom="8px";ea.style.marginLeft="0px";ea.style.width="100%";ea.style.boxSizing="border-box";if(null==L||""==L.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",da=document.createElement("option"),mxUtils.write(da,mxResources.get("makeCopy")),da.setAttribute("value","copy"),-ea.appendChild(da);da=document.createElement("option");mxUtils.write(da,mxResources.get("authorizationRequired"));da.setAttribute("value","auth");ea.appendChild(da);null!=L&&""!=L.getHash()||da.setAttribute("disabled","disabled");L=document.createElement("option");L.setAttribute("value","public");ea.appendChild(L);null!=I?(mxUtils.write(L,mxResources.get("publicDiagramUrl")),L.setAttribute("title",I),ea.value="public"):(mxUtils.write(L,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+-")"),L.setAttribute("disabled","disabled"));O.appendChild(ea);mxUtils.br(O);ea.focus();var ca=null,V=null;if(null!=f||null!=k)c+=30,mxUtils.write(O,mxResources.get("width")+":"),ca=document.createElement("input"),ca.setAttribute("type","text"),ca.style.marginRight="16px",ca.style.width="50px",ca.style.marginLeft="6px",ca.style.marginRight="16px",ca.style.marginBottom="10px",ca.value="100%",O.appendChild(ca),mxUtils.write(O,mxResources.get("height")+":"),V=document.createElement("input"),V.setAttribute("type",-"text"),V.style.width="50px",V.style.marginLeft="6px",V.style.marginBottom="10px",V.value=k+"px",O.appendChild(V),mxUtils.br(O);var ma=this.addLinkSection(O,B),la=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),la=this.addCheckbox(O,mxResources.get("selectedPage")+": "+f));var Y=this.addCheckbox(O,mxResources.get("lightbox"),!0,null,null,!B),fa=this.addEditButton(O,-Y),Z=fa.getEditInput();B&&(Z.style.marginLeft=Y.style.marginLeft,Y.style.display="none",c-=20);var l=this.addCheckbox(O,mxResources.get("layers"),!0);l.style.marginLeft=Z.style.marginLeft;l.style.marginTop="8px";var u=this.addCheckbox(O,mxResources.get("tags"),!0);u.style.marginLeft=Z.style.marginLeft;u.style.marginBottom="16px";u.style.marginTop="16px";mxEvent.addListener(Y,"change",function(){Y.checked?(l.removeAttribute("disabled"),Z.removeAttribute("disabled"),u.removeAttribute("disabled")):(l.setAttribute("disabled",-"disabled"),Z.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));Z.checked&&Y.checked?fa.getEditSelect().removeAttribute("disabled"):fa.getEditSelect().setAttribute("disabled","disabled")});B=new CustomDialog(this,O,mxUtils.bind(this,function(){K(ma.getTarget(),ma.getColor(),null==la?!1:la.checked,Y.checked,fa.getLink(),l.checked,null!=ca?ca.value:null,null!=V?V.value:null,u.checked,ea.value)}),null,mxResources.get("create"),z,C);this.showDialog(B.container,340,296+c,!0,!0);-null!=ca?(ca.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)):null==ea.parentNode;ma.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,k,B,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var I=document.createElement("h3");mxUtils.write(I,mxResources.get("image"));I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(z?"10":"4")+"px";C.appendChild(I);if(z){mxUtils.write(C,-mxResources.get("zoom")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.style.marginRight="12px";L.value=this.lastExportZoom||"100%";C.appendChild(L);mxUtils.write(C,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=this.lastExportBorder||"0";C.appendChild(K);mxUtils.br(C)}var O=-this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),da=B?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ea=B?null:this.addCheckbox(C,mxResources.get("transparentBackground"),I.background==mxConstants.NONE||null==I.background);null!=ea&&(ea.style.marginBottom="16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ca=parseInt(L.value)/100||1,V=parseInt(K.value)||0;k(!O.checked,-null!=da?da.checked:!1,null!=ea?ea.checked:!1,ca,V)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(B?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,k,B,z,C,I,L,K){I=null!=I?I:Editor.defaultIncludeDiagram;var O=document.createElement("div");O.style.whiteSpace="nowrap";var da=this.editor.graph,ea="jpeg"==L||"webp"==L?220:320,ca=document.createElement("h3");mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";O.appendChild(ca);-mxUtils.write(O,mxResources.get("zoom")+":");var V=document.createElement("input");V.setAttribute("type","text");V.style.marginRight="16px";V.style.width="60px";V.style.marginLeft="4px";V.style.marginRight="12px";V.value=this.lastExportZoom||"100%";O.appendChild(V);mxUtils.write(O,mxResources.get("borderWidth")+":");var ma=document.createElement("input");ma.setAttribute("type","text");ma.style.marginRight="16px";ma.style.width="60px";ma.style.marginLeft="4px";ma.value=this.lastExportBorder||"0";O.appendChild(ma);-mxUtils.br(O);var la=this.addCheckbox(O,mxResources.get("selectionOnly"),!1,da.isSelectionEmpty()),Y=document.createElement("input");Y.style.marginTop="16px";Y.style.marginRight="8px";Y.style.marginLeft="24px";Y.setAttribute("disabled","disabled");Y.setAttribute("type","checkbox");var fa=document.createElement("select");fa.style.marginTop="16px";fa.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!da.isSelectionEmpty()||"selectionOnly"!=c[ca]){var Z=document.createElement("option");-mxUtils.write(Z,mxResources.get(c[ca]));Z.setAttribute("value",c[ca]);fa.appendChild(Z)}K?(mxUtils.write(O,mxResources.get("size")+":"),O.appendChild(fa),mxUtils.br(O),ea+=26,mxEvent.addListener(fa,"change",function(){"selectionOnly"==fa.value&&(la.checked=!0)})):C&&(O.appendChild(Y),mxUtils.write(O,mxResources.get("crop")),mxUtils.br(O),ea+=30,mxEvent.addListener(la,"change",function(){la.checked?Y.removeAttribute("disabled"):Y.setAttribute("disabled","disabled")}));da.isSelectionEmpty()?K&&(la.style.display=-"none",la.nextSibling.style.display="none",la.nextSibling.nextSibling.style.display="none",ea-=30):(fa.value="diagram",Y.setAttribute("checked","checked"),Y.defaultChecked=!0,mxEvent.addListener(la,"change",function(){fa.value=la.checked?"selectionOnly":"diagram"}));var l=this.addCheckbox(O,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=L&&"webp"!=L),u=document.createElement("select");u.style.maxWidth="260px";u.style.marginLeft="8px";u.style.marginTop="16px";C=document.createElement("option");-C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));u.appendChild(C);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));u.appendChild(K);"svg"==L?(C=document.createElement("option"),C.setAttribute("value","auto"),mxUtils.write(C,mxResources.get("automatic")),C.setAttribute("selected","selected"),u.appendChild(C)):Editor.isDarkMode()?K.setAttribute("selected","selected"):C.setAttribute("selected","selected");mxUtils.write(O,-mxResources.get("appearance")+":");O.appendChild(u);mxUtils.br(O);ea+=26;var H=this.addCheckbox(O,mxResources.get("shadow"),da.shadowVisible),U=null;if("png"==L||"jpeg"==L||"webp"==L)U=this.addCheckbox(O,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ea+=30;var J=this.addCheckbox(O,mxResources.get("includeCopyOfMyDiagram")+":",I,null,null,"jpeg"!=L&&"webp"!=L),W=document.createElement("select");W.style.maxWidth="260px";W.style.marginLeft="28px";"png"==L||"svg"==L?(I=function(){J.checked?-W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")},da=document.createElement("option"),da.setAttribute("value","allPages"),mxUtils.write(da,mxResources.get("allPages")),W.appendChild(da),da=document.createElement("option"),da.setAttribute("value","currentPage"),mxUtils.write(da,mxResources.get("currentPage")),W.appendChild(da),J.style.marginBottom="12px",W.style.marginBottom="16px",O.appendChild(W),mxUtils.br(O),ea+=20,null!=this.lastEmbedInclude&&(W.value=this.lastEmbedInclude),-mxEvent.addListener(J,"change",I),I()):J.style.marginBottom="16px";var aa=document.createElement("input");aa.style.marginBottom="16px";aa.style.marginRight="8px";aa.setAttribute("type","checkbox");var ba=document.createElement("input");ba.style.marginBottom="16px";ba.style.marginRight="8px";ba.setAttribute("type","checkbox");f&&(aa.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,O.appendChild(aa),mxUtils.write(O,mxResources.get("embedImages")),mxUtils.br(O),ba.checked=null!=this.lastEmbedFonts?-this.lastEmbedImages:!0,O.appendChild(ba),mxUtils.write(O,mxResources.get("embedFonts")),mxUtils.br(O),ea+=50);var ja=document.createElement("select");ja.style.maxWidth="260px";ja.style.marginLeft="8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));ja.appendChild(C);I=document.createElement("option");I.setAttribute("value","blank");mxUtils.write(I,mxResources.get("openInNewWindow"));ja.appendChild(I);I=document.createElement("option");-I.setAttribute("value","self");mxUtils.write(I,mxResources.get("openInThisWindow"));ja.appendChild(I);I=document.createElement("div");mxUtils.write(I,mxResources.get("LinksLost"));I.style.margin="7px";I.style.display="none";"svg"==L&&(mxUtils.write(O,mxResources.get("links")+":"),O.appendChild(ja),O.appendChild(I),mxUtils.br(O),mxUtils.br(O),ea+=50);k=new CustomDialog(this,O,mxUtils.bind(this,function(){this.lastExportBorder=ma.value;this.lastExportZoom=V.value;this.lastEmbedImages=aa.checked;this.lastEmbedFonts=-ba.checked;this.lastEmbedInclude=W.value;z(V.value,l.checked,!la.checked,H.checked,J.checked,aa.checked&&f,ma.value,Y.checked,("png"==L||"svg"==L)&&"currentPage"==W.value,ja.value,null!=U?U.checked:null,null!=u?u.value:null,fa.value,ba.checked)}),null,k,B);this.showDialog(k.container,340,ea,!0,!0,null,null,null,null,!0);V.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?V.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,k,B,z){var C=-document.createElement("div");C.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=f){var L=document.createElement("h3");mxUtils.write(L,f);L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(L)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),O=this.addCheckbox(C,mxResources.get("shadow"),I.shadowVisible&&B,!B),da=this.addCheckbox(C,k),ea=this.addCheckbox(C,mxResources.get("lightbox"),!0),ca=this.addEditButton(C,ea),V=ca.getEditInput(),ma=1<I.model.getChildCount(I.model.getRoot()),-la=this.addCheckbox(C,mxResources.get("layers"),ma,!ma);la.style.marginLeft=V.style.marginLeft;la.style.marginBottom="12px";la.style.marginTop="8px";mxEvent.addListener(ea,"change",function(){ea.checked?(ma&&la.removeAttribute("disabled"),V.removeAttribute("disabled")):(la.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"));V.checked&&ea.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,-mxUtils.bind(this,function(){c(K.checked,O.checked,da.checked,ea.checked,ca.getLink(),la.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,k,B,z,C,I,L){function K(V){var ma=" ",la="";B&&(ma=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+-EditorUi.lightboxHost+"/?client=1"+(null!=da?"&page="+da:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",la+="cursor:pointer;");c&&(la+="max-width:100%;");var Y="";k&&(Y=' width="'+Math.round(O.width)+'" height="'+Math.round(O.height)+'"');I('<img src="'+V+'"'+Y+(""!=la?' style="'+la+'"':"")+ma+"/>")}var O=this.editor.graph.getGraphBounds(),da=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(V){var ma=B?this.getFileData(!0):-null;V=this.createImageDataUri(V,ma,"png");K(V)}),null,null,null,mxUtils.bind(this,function(V){L({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),O.width*O.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ea="";k&&(ea="&w="+Math.round(2*O.width)+"&h="+Math.round(2*O.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(B?"1":"0")+ea+"&xml="+encodeURIComponent(f));ca.send(mxUtils.bind(this,function(){200<=-ca.getStatus()&&299>=ca.getStatus()?K("data:image/png;base64,"+ca.getText()):L({message:mxResources.get("unknownError")})}))}else L({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,k,B,z,C,I){var L=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),K=L.getElementsByTagName("a");if(null!=K)for(var O=0;O<K.length;O++){var da=K[O].getAttribute("href");null!=da&&"#"==da.charAt(0)&&"_blank"==K[O].getAttribute("target")&&K[O].removeAttribute("target")}B&&-L.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(L);if(k){var ea=" ",ca="";B&&(ea="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(C?"&layers=1":-"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");this.editor.convertImages(L,mxUtils.bind(this,function(V){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(V))+'"'+(""!=ca?' style="'+ca+'"':"")+ea+"/>")}))}else ca="",B&&(f=this.getSelectedPageIndex(),L.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),c&&(c=parseInt(L.getAttribute("width")),z=parseInt(L.getAttribute("height")),L.setAttribute("viewBox","-0.5 -0.5 "+c+" "+z),ca+="max-width:100%;max-height:"+z+"px;",L.removeAttribute("height")),""!=ca&&L.setAttribute("style",ca),this.editor.addFontCss(L),this.editor.graph.mathEnabled&&this.editor.addMathCss(L),I(mxUtils.getXml(L))};EditorUi.prototype.timeSince=-function(c){c=Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var k=null;if("diagram"==-c.nodeName)k=c;else if("mxfile"==c.nodeName){var B=c.getElementsByTagName("diagram");if(0<B.length){k=B[0];var z=f.getGlobalVariable;f.getGlobalVariable=function(C){return"page"==C?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==C?1:z.apply(this,arguments)}}}null!=k&&(c=Editor.parseDiagramNode(k))}B=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(C){}finally{this.editor.graph=B}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};-EditorUi.prototype.getPngFileProperties=function(c){var f=1,k=0;if(null!=c){if(c.hasAttribute("scale")){var B=parseFloat(c.getAttribute("scale"));!isNaN(B)&&0<B&&(f=B)}c.hasAttribute("border")&&(B=parseInt(c.getAttribute("border")),!isNaN(B)&&0<B&&(k=B))}return{scale:f,border:k}};EditorUi.prototype.getEmbeddedPng=function(c,f,k,B,z){try{var C=this.editor.graph,I=null;if(null!=k&&0<k.length)C=this.createTemporaryGraph(C.getStylesheet()),document.body.appendChild(C.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,-!0),C),I=k;else if(null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(C.getStylesheet());var L=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var K=this.pages[0];this.currentPage==K?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&C.setBackgroundImage(K.viewState.backgroundImage);C.getGlobalVariable=function(O){return"page"==O?K.getName():"pagenumber"==O?1:L.apply(this,arguments)};document.body.appendChild(C.container);-C.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(O){try{null==I&&(I=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=O.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(I));c(da.substring(da.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(ea){null!=f&&f(ea)}}),null,null,null,mxUtils.bind(this,function(O){null!=f&&f(O)}),null,null,B,null,C.shadowVisible,null,-C,z,null,null,null,"diagram",null)}catch(O){null!=f&&f(O)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca){L=null!=L?L:!0;da=null!=da?da:0;I=null!=K?K:f.background;I==mxConstants.NONE&&(I=null);null==I&&"none"==f.getAdaptiveColors()&&(I="#ffffff");K=this.editor.graph.createSvgImageExport(null!=c);C=f.getSvg(I,O,da,null,null,C,null,K,null,f.shadowVisible||ea,null,ca,"diagram");(f.shadowVisible||ea)&&f.addSvgShadow(C,null,null,0==da);null!=c&&C.setAttribute("content",c);null!=-k&&C.setAttribute("resource",k);var V=mxUtils.bind(this,function(ma){ma=(B?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ma);null!=z&&z(ma);return ma});f.mathEnabled&&this.editor.addMathCss(C);if(null!=z)this.embedFonts(C,mxUtils.bind(this,function(ma){L?this.editor.convertImages(ma,mxUtils.bind(this,function(la){V(la)})):V(ma)}));else return V(C)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=-this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(c,k),f(c)}catch(B){f(c)}}))}catch(k){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(ma){Editor.addRetryToError(ma,mxUtils.bind(this,function(){this.exportImage(c,f,k,B,z,C,I,L,K,O,da,ea,-ca)}));this.handleError(ma)}))){var V=this.editor.graph.isSelectionEmpty();k=null!=k?k:V;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(ma){this.spinner.stop();try{this.saveCanvas(ma,z?this.getFileData(!0,null,null,null,k,L,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,da)}catch(la){this.handleError(la)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ma){this.spinner.stop();this.handleError(ma)}),-null,k,c||1,f,B,null,null,C,I,O,ea,ca)}catch(ma){this.spinner.stop(),this.handleError(ma)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,k,B,z,C,I){f=null!=f?f:0;k=null!=k?k:0;var L=[];try{var K=this.editor.graph;if(null!=c&&0<-c.length){K.model.beginUpdate();try{var O=mxUtils.parseXml(c);c={};var da=this.editor.extractGraphModel(O.documentElement,null!=this.pages);if(null!=da&&"mxfile"==da.nodeName&&null!=this.pages){var ea=da.getElementsByTagName("diagram");if(1==ea.length&&!C){if(da=Editor.parseDiagramNode(ea[0]),null!=this.currentPage&&(c[ea[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=ea[0].getAttribute("name");null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,-ca))}}else if(0<ea.length){C=[];var V=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ea[0].getAttribute("id")]=this.pages[0].getId(),ca=ea[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),da=Editor.parseDiagramNode(ea[0]),B=!1,V=1);for(;V<ea.length;V++){var ma=ea[V].getAttribute("id");ea[V].removeAttribute("id");var la=this.updatePageRoot(new DiagramPage(ea[V]));c[ma]=ea[V].getAttribute("id");var Y=this.pages.length;-null==la.getName()&&la.setName(mxResources.get("pageWithNumber",[Y+1]));K.model.execute(new ChangePage(this,la,la,Y,!0));C.push(la)}this.updatePageLinks(c,C)}}if(null!=da&&"mxGraphModel"===da.nodeName){L=K.importGraphModel(da,f,k,B);if(null!=L)for(this.addLocalPagesToMapping(c),V=0;V<L.length;V++)this.updatePageLinksForCell(c,L[V]);var fa=K.parseBackgroundImage(da.getAttribute("backgroundImage"));if(null!=fa&&null!=fa.originalSrc){this.updateBackgroundPageLink(c,fa);var Z=new ChangePageSetup(this,-null,fa);Z.ignoreColor=!0;K.model.execute(Z)}}I&&K.pasteCellStyles(K.includeDescendants(L),K.defaultVertexStyle,K.defaultEdgeStyle)}finally{K.model.endUpdate()}}}catch(l){if(z)throw l;this.handleError(l)}return L};EditorUi.prototype.updatePageLinks=function(c,f){for(var k=0;k<f.length;k++)this.updatePageLinksForCell(c,f[k].root),null!=f[k].viewState&&this.updateBackgroundPageLink(c,f[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var k=-c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=k&&(f.originalSrc="data:page/id,"+k)}}catch(B){}};EditorUi.prototype.updatePageLinksForCell=function(c,f){var k=document.createElement("div"),B=this.editor.graph,z=B.getLinkForCell(f);null!=z&&B.setLinkForCell(f,this.updatePageLink(c,z));if(B.isHtmlLabel(f)){k.innerHTML=Graph.sanitizeHtml(B.getLabel(f));for(var C=k.getElementsByTagName("a"),I=!1,L=0;L<C.length;L++)z=C[L].getAttribute("href"),null!=z&&(C[L].setAttribute("href",this.updatePageLink(c,-z)),I=!0);I&&B.labelChanged(f,k.innerHTML)}for(L=0;L<B.model.getChildCount(f);L++)this.updatePageLinksForCell(c,B.model.getChildAt(f,L))};EditorUi.prototype.updatePageLink=function(c,f){if(Graph.isPageLink(f)){var k=c[f.substring(f.indexOf(",")+1)];f=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==f.substring(0,17))try{var B=JSON.parse(f.substring(17));if(null!=B.actions){for(var z=0;z<B.actions.length;z++){var C=B.actions[z];if(null!=C.open&&Graph.isPageLink(C.open)){var I=C.open.substring(C.open.indexOf(",")+-1);k=c[I];null!=k?C.open="data:page/id,"+k:null==this.getPageById(I)&&delete C.open}}f="data:action/json,"+JSON.stringify(B)}}catch(L){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,k,B,z){var C=mxUtils.bind(this,function(I){this.loadingExtensions=!1;null!=k?k(I):this.handleError(I)});this.createTimeout(null,mxUtils.bind(this,function(I){B=null!=B?B:c.name;var L=mxUtils.bind(this,-function(O){I.clear()&&C(O)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var O=this.isRemoteVisioFormat(B);try{var da=B.lastIndexOf(".");if(0<=da&&da<B.length)B.substring(da+1).toUpperCase();else{var ea=B.lastIndexOf("/");0<=ea&&ea<B.length&&(B=B.substring(ea+1))}}catch(V){}if(O)if(null==VSD_CONVERT_URL||this.isOffline())L({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{O=new FormData;-O.append("file1",c,B);var ca=new XMLHttpRequest;ca.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(B)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=z&&ca.setRequestHeader("x-convert-custom",z);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&I.clear())if(200<=ca.status&&299>=ca.status)try{var V=ca.response;if("text/xml"==V.type){var ma=new FileReader;ma.onload=mxUtils.bind(this,function(la){try{f(la.target.result)}catch(Y){L({message:mxResources.get("errorLoadingFile")})}});-ma.readAsText(V)}else this.doImportVisio(V,f,L,B)}catch(la){L(la)}else try{""==ca.responseType||"text"==ca.responseType?L({message:ca.responseText}):(ma=new FileReader,ma.onload=function(){try{L({message:JSON.parse(ma.result).Message})}catch(la){L(la)}},ma.readAsText(ca.response))}catch(la){L({})}});ca.send(O)}else if(I.clear())try{this.doImportVisio(c,f,L,B)}catch(V){L(V)}}else L({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?-K():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",K,null,null,null,L))}),C)};EditorUi.prototype.importGraphML=function(c,f,k){var B=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=k?k(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(L){z.clear()&&B(L)}),I=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,B)}catch(L){C(L)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});-this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?I():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",I,null,null,null,C))}),B)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(k){this.loadingExtensions=!1;this.handleError(k)});this.createTimeout(null,mxUtils.bind(this,function(k){var B=mxUtils.bind(this,function(C){k.clear()&&f(C)}),z=mxUtils.bind(this,function(){this.loadingExtensions=-!1;if(k.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||B({message:mxResources.get("unknownError")})}catch(C){B(C)}else B({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,B))}),f)}};EditorUi.prototype.convertLucidChart=function(c,-f,k){var B=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=k?k(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(L){z.clear()&&B(L)}),I=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if("undefined"!==typeof window.LucidImporter)try{var L=JSON.parse(c);f(LucidImporter.importState(L));try{if(null!=window.console&&"1"==urlParams.test){var K=[(new Date).toISOString(),"convertLucidChart",L];null!=L.state&&-K.push(JSON.parse(L.state));if(null!=L.svgThumbs)for(var O=0;O<L.svgThumbs.length;O++)K.push(Editor.createSvgDataUri(L.svgThumbs[O]));null!=L.thumb&&K.push(L.thumb);console.log.apply(console,K)}}catch(da){}}catch(da){null!=window.console&&console.error(da),C(da)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(I,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",-function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",I,null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",I,null,null,null,C))}),B)};EditorUi.prototype.createMermaidXml=function(c,f,k,B,z,C){var I=new Graph(document.createElement("div"));-k=I.insertVertex(null,null,null,0,0,B,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+k+";");I.setAttributeForCell(k,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=C&&I.setAttributeForCell(k,"templatePrompt",C);c=(new mxCodec).encode(I.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,k){var B=0,z=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(C){var I=new mxXmlRequest("https://www.draw.io/generate/v2",-c,"POST"),L=mxUtils.bind(this,function(K){C.clear()&&k(K)});I.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var da=mxUtils.trim(K.getText());this.generateMermaidImage(da,null,mxUtils.bind(this,function(ea,ca,V){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",da),f(da,ea,ca,V))}),L)}),L,mxUtils.bind(this,function(ea){3>-B++?C.clear()&&z():L(ea)}))}),L);else{var O={message:mxResources.get("error")+" "+K.getStatus()};try{O=JSON.parse(K.getText()),O=O.error}catch(da){}L(O)}}),L)}),k)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var k=1<f.length?-f[1]:null;if(null!=k){var B=k.indexOf("-");0<B&&(k=k.substring(0,B))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=k&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");k=f[0].split(" ")[0].replace(/:$/,"");B=k.indexOf("-");0<B&&(k=k.substring(0,B));try{"mindmap"==k&&2<f.length&&(c=extractMermaidMindmap(f))}catch(z){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,-f,k,B,z){var C=mxUtils.bind(this,function(L){this.loadingMermaid=!1;null!=B?B(L):this.handleError(L)}),I=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var L=mxUtils.bind(this,function(K){try{if(mxClient.IS_IE||mxClient.IS_IE11)K=-K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var O=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<O.length&&"error"!=O[0].getAttribute("aria-roledescription")){var da=parseFloat(O[0].getAttribute("width")),ea=parseFloat(O[0].getAttribute("height"));if(isNaN(da)||isNaN(ea))try{var ca=O[0].getAttribute("viewBox").split(/\s+/);da=parseFloat(ca[2]);ea=parseFloat(ca[3])}catch(V){da=da||100,ea=ea||100}k(this.convertDataUri(Editor.createSvgDataUri(K)),-da,ea)}else null!=z?z():B({message:mxResources.get("invalidInput")})}catch(V){B(V)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){L(K.svg)}).catch(function(K){null!=z?z(K):B(K)})}catch(K){B(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(I,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(L){this.importXml(L,-null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",I,null,null,null,C)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",I,null,null,null,C))};EditorUi.prototype.generatePlantUmlImage=function(c,f,k,B){function z(L,K,O){c1=L>>2;c2=(L&3)<<4|K>>4;c3=(K&15)<<2|O>>6;c4=O&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(L){if(10>L)return String.fromCharCode(48+L);L-=10;if(26>L)return String.fromCharCode(65+L);L-=26;if(26>L)return String.fromCharCode(97+-L);L-=26;return 0==L?"-":1==L?"_":"?"}var I=new XMLHttpRequest;I.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(L){r="";for(i=0;i<L.length;i+=3)r=i+2==L.length?r+z(L.charCodeAt(i),L.charCodeAt(i+1),0):i+1==L.length?r+z(L.charCodeAt(i),0,0):r+z(L.charCodeAt(i),L.charCodeAt(i+1),L.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(I.responseType="blob");I.onload=function(L){if(200<=this.status&&300>this.status)if("txt"==-f)k(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(O){var da=new Image;da.onload=function(){try{var ea=da.width,ca=da.height;if(0==ea&&0==ca){var V=K.result,ma=V.indexOf(","),la=decodeURIComponent(escape(atob(V.substring(ma+1)))),Y=mxUtils.parseXml(la).getElementsByTagName("svg");0<Y.length&&(ea=parseFloat(Y[0].getAttribute("width")),ca=parseFloat(Y[0].getAttribute("height")))}k(K.result,ea,ca)}catch(fa){B(fa)}};da.src=K.result};K.onerror=function(O){B(O)}}else B(L)};-I.onerror=function(L){B(L)};I.send()};EditorUi.prototype.insertAsPreText=function(c,f,k){var B=this.editor.graph,z=null;B.getModel().beginUpdate();try{z=B.insertVertex(null,null,"<pre>"+c+"</pre>",f,k,1,1,"text;html=1;align=left;verticalAlign=top;"),B.updateCellSize(z,!0)}finally{B.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(c,f,k,B,z,C,I,L){C=null!=C?C:!0;I=null!=I?I:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,f,k,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var K=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var O=Editor.extractGraphModelFromPdf(c);if(null!=-O&&0<O.length)return this.importXml(O,f,k,C,!0,L)}if(Editor.isPngDataUrl(c)&&(O=Editor.extractGraphModelFromPng(c),null!=O&&0<O.length))return this.importXml(O,f,k,C,!0,L);if("data:image/svg+xml;"==c.substring(0,19))try{O=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(O=c.substring(c.indexOf(",")+1),O=window.atob&&!mxClient.IS_SF?atob(O):Base64.decode(O,!0)):O=decodeURIComponent(c.substring(c.indexOf(",")+1));var da=this.importXml(O,f,k,C,!0,L);if(0<da.length)return da}catch(ca){}this.loadImage(c,-mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,c,mxUtils.bind(this,function(la,Y,fa){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(k),Y,fa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(la)+";"))}),I,this.maxImageSize);else{var V=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),ma=Math.round(ca.width*V);ca=Math.round(ca.height*-V);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(k),ma,ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ca=null;K.getModel().beginUpdate();try{ca=K.insertVertex(K.getDefaultParent(),null,c,K.snap(f),K.snap(k),1,1,"text;"+(B?"html=1;":"")),K.updateCellSize(ca),K.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{K.getModel().endUpdate()}K.setSelectionCell(ca)}))}else{c=-Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,k,C,null,L);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,f,k,C,null,L))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{K=this.editor.graph;z=null;K.getModel().beginUpdate();try{z=K.insertVertex(K.getDefaultParent(),null,"",K.snap(f),K.snap(k),1,1,"text;whiteSpace=wrap;"+(B?"html=1;":""));-K.fireEvent(new mxEventObject("textInserted","cells",[z]));B&&(c=K.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");z.value=c;K.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var ea=K.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=ea.width;z.geometry.height=ea.height}Graph.isLink(z.value)&&K.setLinkForCell(z,z.value);z.geometry.width+=K.gridSize;z.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[z]}}return[]};+function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=f.getFunction,t=this.editor.graph,z=this;f.getFunction=function(C){if(t.isSelectionEmpty()&&null!=z.pages&&0<z.pages.length){var F=z.getSelectedPageIndex();if(mxEvent.isShiftDown(C)){if(37==C.keyCode)return function(){0<F&&z.movePage(F,F-1)};if(38==C.keyCode)return function(){0<F&&z.movePage(F,0)};if(39==C.keyCode)return function(){F<z.pages.length-1&&z.movePage(F,F+1)};if(40==C.keyCode)return function(){F<+z.pages.length-1&&z.movePage(F,z.pages.length-1)}}else if(mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)){if(37==C.keyCode)return function(){0<F&&z.selectNextPage(!1)};if(38==C.keyCode)return function(){0<F&&z.selectPage(z.pages[0])};if(39==C.keyCode)return function(){F<z.pages.length-1&&z.selectNextPage(!0)};if(40==C.keyCode)return function(){F<z.pages.length-1&&z.selectPage(z.pages[z.pages.length-1])}}}return!(65<=C.keyCode&&90>=C.keyCode)||t.isSelectionEmpty()||mxEvent.isAltDown(C)||+mxEvent.isShiftDown(C)||mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)?l.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var f=e.apply(this,arguments);if(null==f)try{var l=c.indexOf("<mxfile ");if(0<=l){var t=c.lastIndexOf("</mxfile>");t>l&&(f=c.substring(l,t+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var z=mxUtils.parseXml(c),+C=this.editor.extractGraphModel(z.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=C?mxUtils.getXml(C):""}}catch(F){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",+f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();try{var t=null!=this.pages?this.pages.slice():null,z=c.getElementsByTagName("diagram");if(1<z.length||1==z.length&&z[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var C=z.length-1;0<=C;C--){var F=this.updatePageRoot(new DiagramPage(z[C]));null==+F.getName()&&F.setName(mxResources.get("pageWithNumber",[C+1]));l.model.execute(new ChangePage(this,F,0==C?F:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,+l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(C=0;C<t.length;C++)l.model.execute(new ChangePage(this,t[C],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;ca=null!=ca?ca:!Editor.defaultCompressed;var X=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var ba=+"_blank";else X=ba=t;if(null==c)return"";var ha=c;if("mxfile"!=ha.nodeName.toLowerCase()){if(ca){var ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());ma.appendChild(c)}else{ma=Graph.zapGremlins(mxUtils.getXml(c));ha=Graph.compress(ma);if(Graph.decompress(ha)!=ma)return ma;ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());+mxUtils.setTextContent(ma,ha)}ha=c.ownerDocument.createElement("mxfile");ha.appendChild(ma)}I?(ha=ha.cloneNode(!0),ha.removeAttribute("modified"),ha.removeAttribute("host"),ha.removeAttribute("agent"),ha.removeAttribute("etag"),ha.removeAttribute("userAgent"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("type")):(ha.removeAttribute("userAgent"),ha.removeAttribute("modified"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("pages"),ha.removeAttribute("type"),+ha.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ha.setAttribute("host","Chrome"):EditorUi.isElectronApp?ha.setAttribute("host","Electron"):ha.setAttribute("host",window.location.hostname),ha.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),ha.setAttribute("version",EditorUi.VERSION),1<ha.getElementsByTagName("diagram").length&&null!=this.pages&&ha.setAttribute("pages",this.pages.length));null!=da&&(ha=ha.cloneNode(!0),ha.setAttribute("scale",da));null!=ea&&+(ha=ha.cloneNode(!0),ha.setAttribute("border",ea));c=ca?mxUtils.getPrettyXml(ha):mxUtils.getXml(ha);if(!C&&!z&&(F||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ha),f,null!=l?l.getTitle():null,ba,X);else if(C||!z&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(ha),c=this.getEmbeddedSvg(c,f,t,null,N,K,X,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=+function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var z=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(K){var I=K.getElementsByTagName("mxGraphModel"),ca=0<I.length?I[0]:null;I=K;null==ca&&l?(ca=mxUtils.getNodeValue(K),0<ca.length&&(ca=Graph.decompress(ca),null!=ca&&0<ca.length&&(I=K.cloneNode(!1),I.appendChild(mxUtils.parseXml(ca).documentElement)))):null==ca||l?I=K.cloneNode(!0):(I=K.cloneNode(!1),mxUtils.setTextContent(I,+Graph.compressNode(ca)));z.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(z),z=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],F=C.node;if(C!=this.currentPage)if(C.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,N,null,t);EditorUi.removeChildNodes(F);F.appendChild(N);delete C.needsUpdate}else t&&+(this.updatePageRoot(C),null!=C.viewState.backgroundImage&&(null!=C.viewState.backgroundImage.originalSrc?C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.originalSrc,C):Graph.isPageLink(C.viewState.backgroundImage.src)&&(C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.src,C))),null!=C.viewState.backgroundImage&&null!=C.viewState.backgroundImage.originalSrc&&(N=new mxCodec(mxUtils.createXmlDocument()),N=N.encode(new mxGraphModel(C.root)),+this.editor.graph.saveViewState(C.viewState,N,null,t),F=F.cloneNode(!1),F.appendChild(N)));c(F)}return z};EditorUi.prototype.anonymizeString=function(c,f){for(var l=[],t=0;t<c.length;t++){var z=c.charAt(t);0<=EditorUi.ignoredAnonymizedChars.indexOf(z)?l.push(z):isNaN(parseInt(z))?z.toLowerCase()!=z?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):z.toUpperCase()!=z?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(z)?l.push(" "):l.push("?"):l.push(f?"0":Math.round(9*+Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var l=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));c[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(l)}catch(C){c[EditorUi.DIFF_INSERT][f].data=C.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var t in c[EditorUi.DIFF_UPDATE]){var z=+c[EditorUi.DIFF_UPDATE][t];null!=z.name&&(z.name=this.anonymizeString(z.name));null!=z.cells&&(f=mxUtils.bind(this,function(C){var F=z.cells[C];if(null!=F){for(var N in F)null!=F[N].value&&(F[N].value="["+F[N].value.length+"]"),null!=F[N].xmlValue&&(F[N].xmlValue="["+F[N].xmlValue.length+"]"),null!=F[N].style&&(F[N].style="["+F[N].style.length+"]"),mxUtils.isEmptyObject(F[N])&&delete F[N];mxUtils.isEmptyObject(F)&&delete z.cells[C]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(z.cells)&&+delete z.cells);mxUtils.isEmptyObject(z)&&delete c[EditorUi.DIFF_UPDATE][t]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,f));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],f)};EditorUi.prototype.anonymizeNode=+function(c,f){f=c.getElementsByTagName("mxCell");for(var l=0;l<f.length;l++)null!=f[l].getAttribute("value")&&f[l].setAttribute("value","["+f[l].getAttribute("value").length+"]"),null!=f[l].getAttribute("xmlValue")&&f[l].setAttribute("xmlValue","["+f[l].getAttribute("xmlValue").length+"]"),null!=f[l].getAttribute("style")&&f[l].setAttribute("style","["+f[l].getAttribute("style").length+"]"),null!=f[l].parentNode&&"root"!=f[l].parentNode.nodeName&&null!=f[l].parentNode.parentNode&&(f[l].setAttribute("id",+f[l].parentNode.getAttribute("id")),f[l].parentNode.parentNode.replaceChild(f[l],f[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==+DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){z=null!=z?z:!0;C=null!=C?C:!1;I=null!=I?I:!Editor.defaultCompressed;var X=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=+this.pages[0]){var ba=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());X.setBackgroundImage=this.editor.graph.setBackgroundImage;X.background=this.editor.graph.background;var ha=null!=this.pages?this.pages[0]:null;null==ha||this.currentPage==ha?X.setBackgroundImage(this.editor.graph.backgroundImage):null!=ha.viewState&&null!=ha.viewState&&X.setBackgroundImage(ha.viewState.backgroundImage);X.getGlobalVariable=function(ma){return"page"==ma&&null!=ha?ha.getName():"pagenumber"==ma?1:+ba.apply(this,arguments)};document.body.appendChild(X.container);null!=ha&&X.model.setRoot(ha.root)}F=null!=F?F:this.getXmlFileData(z,C,I,ca);K=null!=K?K:this.getCurrentFile();c=this.createFileData(F,X,K,window.location.href,c,f,l,t,z,N,I,da,ea);X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,z,C){C=null!=C?C:!0;var F=null,N=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());+var K=f.view.scale;C=Math.floor(F.x/K-f.view.translate.x);K=Math.floor(F.y/K-f.view.translate.y);F=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(N=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",C);c.setAttribute("y0",K)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=t&&c.setAttribute("edit",t));null!=z&&(z=z.replace(/&/g,"&"));c=+null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";t=Graph.compress(c);Graph.decompress(t)!=c&&(t=encodeURIComponent(c));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"++(null==z&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+t+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+N+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};+EditorUi.prototype.getHtml2=function(c,f,l,t,z){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=z&&(z=z.replace(/&/g,"&"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"++(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>\n'+(null==z?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'++z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,l=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[f],"cause",[l]),Error(mxResources.get("notADiagramFile")++" ("+l+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),l={},0<c.length)){var t=this.getHashObject(),z=null;this.fileNode=f;this.pages=[];for(var C=0;C<c.length;C++){null==c[C].getAttribute("id")&&c[C].setAttribute("id",C);f=new DiagramPage(c[C]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[C+1]));this.pages.push(f);if(null==t.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||+null!=t.pageId&&f.getId()==t.pageId)z=f;if(null==l[f.getId()])l[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=null!=z?z:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);+this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var F=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(C=0;C<F.length;C++)f[F[C]]=!0;var N=this.editor.graph.getModel(),K=N.getChildren(N.root);for(C=0;C<K.length;C++){var I=K[C];N.setVisible(I,f[I.id]||!1)}}catch(ca){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();+f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,l,t,z,+C,F,N,K,I,ca,da,ea,X,ba,ha){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var ma=this.getBaseFilename(!z),Y=ma+("xml"==c||"pdf"==c&&ca?".drawio":"")+"."+c;if("xml"==c){var la=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,z,null,null,null,f);this.saveData(Y,c,la,"text/xml")}else if("html"==c)la=this.getHtml2(this.getFileData(!0),this.editor.graph,ma),this.saveData(Y,c,la,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==+c?Y=ma+".png":"jpeg"==c&&(Y=ma+".jpg"),this.saveRequest(Y,c,mxUtils.bind(this,function(U,P){try{return this.createDownloadRequest(U,c,t,P,F,z,N,K,I,ca,da,void 0,void 0,!C,ea,X,ba,ha)}catch(T){this.handleError(T)}}));else{var Z=null,k=mxUtils.bind(this,function(U){U.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",U,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==c){var A=this.editor.graph.background;+if(F||A==mxConstants.NONE)A=null;var J=this.editor.graph.getSvg(A,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(J);this.editor.convertImages(J,mxUtils.bind(this,mxUtils.bind(this,function(U){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(U))})))}else Y=ma+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(U){this.spinner.stop();k(U)}),t)}}catch(U){this.handleError(U)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,z,C,F,N,K,+I,ca,da,ea,X,ba,ha,ma,Y){c=this.downloadRequestBuilder(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha,ma,Y);f="";for(var la in c)l=c[la],null!=l&&(f+=la+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha,ma,Y){var la=this.editor.graph,Z=la.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var k=null,A=null,J=null;if(!EditorUi.isElectronApp&&+(Z.width*Z.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};I=I?"1":"0";"pdf"==f&&(null!=ca?(k=ca.from,A=ca.to):0==C&&(J="1"));"xmlpng"==f&&(I="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){k=C;break}C=la.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;z={globalVars:la.getExportVariables()};+K&&(z.grid={size:la.gridSize,steps:la.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:la.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:k,to:A,allPages:J,bg:null!=C?C:mxConstants.NONE,base64:t,embedXml:I,xml:l,filename:null!=c?c:"",extras:JSON.stringify(z),scale:F,border:N,pageMargin:ba,w:da&&isFinite(da)?da:null,h:ea&&isFinite(ea)?ea:null,crop:null!=X&&X?"1":"0",fit:null!=ha&&ha?"1":"0",sheetsAcross:ma,+sheetsDown:Y}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{f=JSON.parse(c)}catch(t){}}}return f};EditorUi.prototype.updateHashObject=+function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var l=f.lastIndexOf("#");0<l&&(f=f.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(t){}0<l&&0<f.lastIndexOf("#")?+window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var t=window.location.hash,z=mxUtils.bind(this,function(F){var N=null!=c.data?c.data:"";null!=F&&0<F.length&&(0<N.length&&(N+="\n"),N+=F);F=new LocalFile(this,"csv"!=c.format&&0<N.length?N:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return t};this.fileLoaded(F);"csv"==c.format&&this.importCsv(N,mxUtils.bind(this,function(ea){this.editor.undoManager.clear();+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,I=null,ca=mxUtils.bind(this,function(){var ea=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(X){ea===this.currentPage&&(200<=X.getStatus()&&300>=X.getStatus()?(this.updateDiagram(X.getText()),da()):this.handleError({message:mxResources.get("error")+" "+X.getStatus()}))}),mxUtils.bind(this,+function(X){this.handleError(X)}))}),da=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(ca,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){da();ca()}));da();ca()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(F){z(F)}),mxUtils.bind(this,function(F){null!=l&&l(F)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(Z){var k=new mxCellOverlay(Z.image||+z.warningImage,Z.tooltip,Z.align,Z.valign,Z.offset);k.addListener(mxEvent.CLICK,function(A,J){t.alert(Z.tooltip)});return k}var l=null,t=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var z=this.editor.graph,C=z.getModel();C.beginUpdate();var F=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var N=C.getCell(c.getAttribute("id"));if(null!=N){try{var K=c.getAttribute("value");if(null!=K){var I=mxUtils.parseXml(K).documentElement;+if(null!=I)if("1"==I.getAttribute("replace-value"))C.setValue(N,I);else for(var ca=I.attributes,da=0;da<ca.length;da++)z.setAttributeForCell(N,ca[da].nodeName,0<ca[da].nodeValue.length?ca[da].nodeValue:null)}}catch(Z){null!=window.console&&console.log("Error in value for "+N.id+": "+Z)}try{var ea=c.getAttribute("style");null!=ea&&z.model.setStyle(N,ea)}catch(Z){null!=window.console&&console.log("Error in style for "+N.id+": "+Z)}try{var X=c.getAttribute("icon");if(null!=X){var ba=0<X.length?JSON.parse(X):+null;null!=ba&&ba.append||z.removeCellOverlays(N);null!=ba&&z.addCellOverlay(N,f(ba))}}catch(Z){null!=window.console&&console.log("Error in icon for "+N.id+": "+Z)}try{var ha=c.getAttribute("geometry");if(null!=ha){ha=JSON.parse(ha);var ma=z.getCellGeometry(N);if(null!=ma){ma=ma.clone();for(key in ha){var Y=parseFloat(ha[key]);"dx"==key?ma.x+=Y:"dy"==key?ma.y+=Y:"dw"==key?ma.width+=Y:"dh"==key?ma.height+=Y:ma[key]=parseFloat(ha[key])}z.model.setGeometry(N,ma)}}}catch(Z){null!=window.console&&console.log("Error in icon for "++N.id+": "+Z)}}}else if("model"==c.nodeName){for(var la=c.firstChild;null!=la&&la.nodeType!=mxConstants.NODETYPE_ELEMENT;)la=la.nextSibling;null!=la&&(new mxCodec(c.firstChild)).decode(la,C)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(z.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(F=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):+1);c=c.nextSibling}}finally{C.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return l};EditorUi.prototype.getCopyFilename=function(c,f){var l=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var t=l.lastIndexOf(".");0<=t&&(c=l.substring(t),l=l.substring(0,t));if(f){f=l;var z=new Date;l=z.getFullYear();t=z.getMonth()+1;var C=z.getDate(),F=z.getHours(),N=z.getMinutes();z=z.getSeconds();l=f+(" "+(l+"-"+t+"-"+C+"-"+F+"-"+N+"-"+z))}return l=mxResources.get("copyOf",+[l])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",[c])}catch(l){}};EditorUi.prototype.fileLoaded=function(c,f,l){var t=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var z=!1;this.hideDialog();null!=t&&(t.removeListener(this.descriptorChangedListener),this.logIfModified(t,!0),t.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var C=mxUtils.bind(this,function(){this.setGraphEnabled(!1);+this.setCurrentFile(null);null!=t&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility=+"");this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.editor.setStatus(""):this.editor.setStatus('<div class="geStatusBox" title="'++mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=l&&l();this.editor.fireEvent(new mxEventObject("fileLoaded"));z=!0;if(!this.isOffline()&&null!=+c.getMode()){var F="1"==urlParams.sketch?"sketch":uiTheme;if(null==F)F="default";else if("sketch"==F||"min"==F)F+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(N){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()++1),mxSettings.save()}catch(N){}}catch(N){this.fileLoadedError=N;if(null!=c)try{c.close()}catch(K){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||C():C()});f?c():(null!=N.fallbackFileData&&(N.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var K=new LocalFile(this,N.fallbackFileData,this.defaultFilename,+!0);this.fileLoaded(K)})}),this.handleError(N,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else C();return z};EditorUi.prototype.getHashValueForPages=function(c,f){var l=0,t=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var C=0;C<c.length;C++){this.updatePageRoot(c[C]);var F=c[C].node.cloneNode(!1);F.removeAttribute("name");t.root=c[C].root;var N=z.encode(t);this.editor.graph.saveViewState(c[C].viewState,N,!0);N.removeAttribute("pageWidth");+N.removeAttribute("pageHeight");F.appendChild(N);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(F,function(K,I,ca,da){return!da||"mxGeometry"!=K.nodeName&&"mxPoint"!=K.nodeName||"x"!=I&&"y"!=I&&"width"!=I&&"height"!=I?da&&"mxCell"==K.nodeName&&"previous"==I?null:ca:Math.round(ca)},f)<<0}return l};EditorUi.prototype.hashValue=function(c,f,l){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&+"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(t^=this.hashValue(c.nodeName,f,l));if(null!=c.attributes){null!=l&&(l.attrCount+=c.attributes.length);for(var z=0;z<c.attributes.length;z++){var C=c.attributes[z].name,F=null!=f?f(c,C,c.attributes[z].value,!0):c.attributes[z].value;null!=F&&(t^=this.hashValue(C,f,l)+this.hashValue(F,f,l))}}if(null!=c.childNodes)for(z=0;z<c.childNodes.length;z++)t=(t<<5)-t+this.hashValue(c.childNodes[z],f,l)<<0}else if(null!=c&&"function"!==+typeof c){c=String(c);f=0;null!=l&&(l.byteCount+=c.length);for(z=0;z<c.length;z++)f=(f<<5)-f+c.charCodeAt(z)<<0;t^=f}return t};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,l,t,z,C,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,+".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var l=f.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(c,null,2));+f.appendChild(l);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var l=0;l<f.length;l++)f[l].parentNode.removeChild(f[l]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,+f){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));c=null!=c?c:l.firstChild.nextSibling.nextSibling;f=l.lastChild;var t=f.previousSibling;l.insertBefore(f,c);l.insertBefore(t,f)}};EditorUi.prototype.loadLibrary=function(c,f){var l=mxUtils.parseXml(c.getData());if("mxlibrary"==l.documentElement.nodeName){var t=JSON.parse(mxUtils.getTextContent(l.documentElement));+this.libraryLoaded(c,t,l.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,f,l,t){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var z=null;if(c.constructor!=StorageLibrary||+".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var C=0;C<this.openLibraries.length;C++)if(this.openLibraries[C].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[C],this.openLibraries);break}z={file:c,images:f,title:l,expand:t};this.openLibraries.push(z)}else this.scratchpad=c;C=this.sidebar.palettes[c.getHash()];C=null!=C?C[C.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var F=null,N=mxUtils.bind(this,function(Y,la){0==Y.length&&c.isEditable()?+(null==F&&(F=document.createElement("div"),F.className="geDropTarget",mxUtils.write(F,mxResources.get("dragElementsHere"))),la.appendChild(F)):this.addLibraryEntries(Y,la)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var K=this.sidebar.addPalette(c.getHash(),l,null!=t?t:!0,mxUtils.bind(this,function(Y){N(f,Y)}));null!=z&&(z.div=K);this.repositionLibrary(C,"L.scratchpad"!=c.getHash());t=K.parentNode.previousSibling;+l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var I=document.createElement("div");I.style.backgroundColor="inherit";t.style.position="relative";var ca=document.createElement("img");ca.className="geAdaptiveAsset";ca.setAttribute("src",Editor.crossImage);ca.setAttribute("title",mxResources.get("close"));ca.setAttribute("valign","absmiddle");ca.setAttribute("border","0");ca.style.position="relative";ca.style.top="2px";+ca.style.width="14px";ca.style.cursor="pointer";ca.style.margin="0 3px";var da=null;if(".scratchpad"!=c.title||this.closableScratchpad)I.appendChild(ca),mxEvent.addListener(ca,"click",mxUtils.bind(this,function(Y){if(!mxEvent.isConsumed(Y)){var la=mxUtils.bind(this,function(){null!=z&&mxUtils.remove(z,this.openLibraries);this.closeLibrary(c)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,la,mxResources.get("cancel"),mxResources.get("discardChanges")):la();mxEvent.consume(Y)}}));if(c.isEditable()){var ea=+this.editor.graph,X=null;l=mxUtils.bind(this,function(Y){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(Y)});var ba=mxUtils.bind(this,function(Y){c.setModified(!0);c.isAutosave()?(null!=X&&null!=X.parentNode&&X.parentNode.removeChild(X),X=ca.cloneNode(!1),X.setAttribute("src",Editor.spinImage),X.setAttribute("title",mxResources.get("saving")),X.style.cursor="default",X.style.marginRight="2px",X.style.marginTop="-2px",I.insertBefore(X,I.firstChild),this.saveLibrary(c.getTitle(),+f,c,c.getMode(),!0,!0,function(){null!=X&&null!=X.parentNode&&X.parentNode.removeChild(X)})):null==da&&(da=ca.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),I.insertBefore(da,I.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(la){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==da||c.isModified()||(da.parentNode.removeChild(da),da=null)});mxEvent.consume(la)})))}),ha=mxUtils.bind(this,+function(Y,la,Z,k){Y=ea.cloneCells(mxUtils.sortCells(ea.model.getTopmostCells(Y)));for(var A=0;A<Y.length;A++){var J=ea.getCellGeometry(Y[A]);null!=J&&J.translate(-la.x,-la.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(Y,la.width,la.height,k||"",!0,null,!1));Y=mxUtils.getXml(this.editor.graph.encodeCells(Y));Editor.defaultCompressed&&(Y=Graph.compress(Y));la={xml:Y,w:la.width,h:la.height};null!=k&&(la.title=k);f.push(la);ba(Z);null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),+F=null)}),ma=mxUtils.bind(this,function(Y){if(ea.isSelectionEmpty())ea.getRubberband().isActive()?(ea.getRubberband().execute(Y),ea.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var la=ea.getSelectionCells(),Z=ea.view.getBounds(la);if(null!=Z&&0<Z.width&&0<Z.height){var k=ea.view.scale;Z.x/=k;Z.y/=k;Z.width/=k;Z.height/=k;Z.x-=ea.view.translate.x;Z.y-=ea.view.translate.y;ha(la,Z)}else this.showError(mxResources.get("error"),+mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(Y)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(Y){ea.isMouseDown&&null!=ea.panningManager&&null!=ea.graphHandler.first&&(ea.graphHandler.suspend(),null!=ea.graphHandler.hint&&(ea.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="light-dark(#fefefe, #000000)",K.style.cursor="copy",ea.panningManager.stop(),ea.autoScroll=!1,mxEvent.consume(Y))}),mxUtils.bind(this,function(Y){ea.isMouseDown&&+null!=ea.panningManager&&null!=ea.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,ea.panningManager.stop(),ea.graphHandler.reset(),ea.isMouseDown=!1,ea.autoScroll=!0,ma(Y),mxEvent.consume(Y))}));mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(Y){ea.isMouseDown&&null!=ea.graphHandler.first&&(ea.graphHandler.resume(),null!=ea.graphHandler.hint&&(ea.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",+ea.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Y){K.style.backgroundColor="light-dark(#fefefe, #000000)";Y.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Y){K.style.cursor="";K.style.backgroundColor="";0<Y.dataTransfer.files.length&&this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(la,+Z,k,A,J,U,P,T,W){if(null!=la&&"image/"==Z.substring(0,6))la="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(la),la=[new mxCell("",new mxGeometry(0,0,J,U),la)],la[0].vertex=!0,ha(la,new mxRectangle(0,0,J,U),Y,mxEvent.isAltDown(Y)?null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," ")),null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null);else{var aa=!1,ja=mxUtils.bind(this,function(pa,sa){null!=pa&&"application/pdf"==+sa&&(sa=Editor.extractGraphModelFromPdf(pa),null!=sa&&0<sa.length&&(pa=sa));if(null!=pa)if(pa=mxUtils.parseXml(pa),"mxlibrary"==pa.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(pa.documentElement));N(qa,K);f=f.concat(qa);ba(Y);this.spinner.stop();aa=!0}catch(Ea){}else if("mxfile"==pa.documentElement.nodeName)try{var wa=pa.documentElement.getElementsByTagName("diagram");for(qa=0;qa<wa.length;qa++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(wa[qa])),za=this.editor.graph.getBoundingBoxFromGeometry(Ba);+null!=za&&ha(Ba,new mxRectangle(0,0,za.width,za.height),Y)}aa=!0}catch(Ea){null!=window.console&&console.log("error in drop handler:",Ea)}aa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null)});null!=W&&null!=P&&EditorUi.isVisioFilename(P)?this.importVisio(W,function(pa){ja(pa,"text/xml")},null,P):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(la,P)&&null!=W?this.isExternalDataComms()?+this.parseFile(W,mxUtils.bind(this,function(pa){4==pa.readyState&&(this.spinner.stop(),200<=pa.status&&299>=pa.status?ja(pa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==pa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):ja(la,Z)}}));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"dragleave",function(Y){K.style.cursor=+"";K.style.backgroundColor="";Y.stopPropagation();Y.preventDefault()}));ca=ca.cloneNode(!1);ca.setAttribute("src",Editor.editImage);ca.setAttribute("title",mxResources.get("edit"));I.insertBefore(ca,I.firstChild);mxEvent.addListener(ca,"click",l);l=ca.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));I.insertBefore(l,I.firstChild);mxEvent.addListener(l,"click",ma);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ma);this.isOffline()||".scratchpad"!=+c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink),C=l.getElementsByTagName("img")[0],l.style.marginRight="1px",C.style.marginTop="-2px",C.style.opacity="",I.insertBefore(l,I.firstChild))}t.appendChild(I);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var t=c[l],z=t.data;if(null!=z){z="data:"==z.substring(0,5)?this.convertDataUri(z):z;var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";+"fixed"==t.aspect&&(C+="aspect=fixed;");C=C+"image="+z+";";null!=t.style&&(C+=t.style);f.appendChild(this.sidebar.createVertexTemplate(C,t.w,t.h,"",t.title||"",!1,null,!0))}else if(null!=t.xml){var F=this.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml)),N=0==F.length?mxResources.get("drawingEmpty"):null!=t.title?t.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(F,t.w,t.h,N,!0,null,!0))}}catch(K){N=null!=K.message?mxResources.get("error")+": "+K.message:String(K),+C=this.sidebar.createVertexTemplateFromCells(null,t.w,t.h,N,!0,null,!0),f.appendChild(C)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=+"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38);"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,l,t,z,C,F){c=new ImageDialog(this,c,f,l,t,z,C,F);this.showDialog(c.container,+Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,l,t,z,C){var F=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=F?JSON.stringify(JSON.parse(F),null,2):"",mxUtils.bind(this,function(N){if(null!=N)try{if(null!=C&&C(N),N==F)this.hideDialog();else{if(0<N.length){var K=JSON.parse(N);localStorage.setItem(f,JSON.stringify(K))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(I){this.handleError(I)}}),+null,mxResources.get("close"),null,null,null,!0,null,null,z,l,t);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,l,t){c=null!=c?c:mxUtils.bind(this,function(z,C,F,N){C||(z=new ChangePageSetup(this,t?F:null,z),z.ignoreColor=!t,null!=N&&t&&(z.shadowVisible=N),this.editor.graph.model.execute(z))});c=new BackgroundImageDialog(this,c,f,l,t);this.showDialog(c.container,400,t?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,+f,l,t,z){c=new LibraryDialog(this,c,f,l,t,z);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,l,+t,z,C,F){var N=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{F||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!F||null==window.console||console.error("EditorUi.handleError:",c)}catch(ea){}if(null!=K||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"),+!1);var I=mxResources.get("ok"),ca=null;f=null!=f?f:mxResources.get("error");if(null!=K){null!=K.retry&&(I=mxResources.get("cancel"),ca=function(){N();K.retry()});if(404==K.code||404==K.status||403==K.code){F=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var da=null!=z?null:null!=+C?C:window.location.hash;if(null!=da&&("#G"==da.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==da.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==K.code||404==K.status)){da="#U"==da.substring(0,2)?da.substring(45,da.lastIndexOf("%26ex")):da.substring(2);this.showError(f,F,mxResources.get("tryOpeningViaThisPage"),+mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);null!=t&&t()}),ca,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ea(){ma.innerText="";for(var Y=0;Y<X.length;Y++){var la=document.createElement("option");mxUtils.write(la,X[Y].displayName);la.value=Y;ma.appendChild(la);la=document.createElement("option");la.innerHTML=" ";mxUtils.write(la,"<"+X[Y].email+">");la.setAttribute("disabled","disabled");ma.appendChild(la)}la=+document.createElement("option");mxUtils.write(la,mxResources.get("addAccount"));la.value=X.length;ma.appendChild(la)}var X=this.drive.getUsersList(),ba=document.createElement("div"),ha=document.createElement("div");ha.style.marginBottom="6px";mxUtils.write(ha,mxResources.get("changeUser")+": ");ba.appendChild(ha);var ma=document.createElement("select");ma.style.width="100%";ea();mxEvent.addListener(ma,"change",mxUtils.bind(this,function(){var Y=ma.value,la=X.length!=Y;la&&this.drive.setUser(X[Y]);+this.drive.authorize(la,mxUtils.bind(this,function(){la||(X=this.drive.getUsersList(),ea())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ba.appendChild(ma);ba=new CustomDialog(this,ba,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ba.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=K.message?F=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,+!1):mxUtils.htmlEntities(K.message,!1):null!=K.response&&null!=K.response.error?F=mxUtils.htmlEntities(K.response.error,!1):"undefined"!==typeof window.App&&(K.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout"),!1):K.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof K&&0<K.length&&(F=mxUtils.htmlEntities(K,!1)))}z=c=null;null!=K&&null!=K.helpLink?(c=mxResources.get("help"),z=mxUtils.bind(this,function(){return this.editor.graph.openLink(K.helpLink)})):+null!=K&&null!=K.ownerEmail?(c=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+c+": "+K.ownerEmail+")",!1),z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(c=K.alternateAction.label,z=K.alternateAction.funct);this.showError(f,F,I,l,ca,null,null,c,z,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,+l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,t,z,C){c=null!=c?c:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){F();null!=f&&f()},function(){F();null!=l&&l()},t,z,null,null,null,null,N);this.showDialog(c.container,340,46+N,!0,C);c.init()};EditorUi.prototype.showBanner=function(c,f,l,t,z,C,F,N,K){var I=!1;if(!(this.bannerShowing||this["hideBanner"++c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){C=null!=C?C:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";var ca=z?500:1E3;I=z?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var da=document.createElement("div");da.style.cssText="position:absolute;"+C+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex++";"+I;mxUtils.setPrefixedStyle(da.style,"transform",F);mxUtils.setPrefixedStyle(da.style,"transition","all "+ca+"ms ease");da.className="geBtn gePrimaryBtn"+(z?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(da.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(da.style,"transform-origin",K);if(!z){var ea=document.createElement("img");ea.setAttribute("src",IMAGE_PATH+"/logo.png");ea.setAttribute("border","0");ea.setAttribute("align","absmiddle");ea.style.cssText=+"margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";da.appendChild(ea);ea=document.createElement("img");ea.setAttribute("src",Dialog.prototype.closeImage);ea.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ea.setAttribute("border","0");ea.style.cssText=(z?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";da.appendChild(ea)}mxUtils.write(da,f);document.body.appendChild(da);this.bannerShowing=+!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var X=document.createElement("input");X.setAttribute("type","checkbox");X.setAttribute("id","geDoNotShowAgainCheckbox");X.style.marginRight="6px";if(!t){f.appendChild(X);var ba=document.createElement("label");ba.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ba,mxResources.get("doNotShowAgain"));f.appendChild(ba);+da.style.paddingBottom=z?"16px":"30px";da.appendChild(f)}var ha=mxUtils.bind(this,function(){null!=da.parentNode&&(da.parentNode.removeChild(da),this.bannerShowing=!1,X.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ea&&mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);ha()}));var ma=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",F);window.setTimeout(mxUtils.bind(this,+function(){ha()}),ca)});mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){var la=mxEvent.getSource(Y);la!=X&&la!=ba?(null!=l&&l(),ha(),mxEvent.consume(Y)):ma()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",N)}),ca/2);window.setTimeout(ma,z?4E3:3E4);I=!0}return I};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,l,t){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<t&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",t));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,l,t,z){var C="jpeg"==l?"jpg":l;t=this.getBaseFilename(t)+(null!=f?".drawio":"")+"."+C;c=this.createImageDataUri(c,+f,l,z);this.saveData(t,C,c.substring(c.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,+!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,l,t,z,C){"text/xml"!=l||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=C?C:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=t?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(c,!0):(l.document.write(c),+l.document.close(),l.document.execCommand("SaveAs",!0,f),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,l,t);else{var F=document.createElement("a");C=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var N=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);C=65==(N?parseInt(N[2],10):+!1)?!1:C}if(C||this.isOffline()){F.href=URL.createObjectURL(t?this.base64ToBlob(c,l):new Blob([c],{type:l}));C?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},2E4),F.click(),F.parentNode.removeChild(F)}catch(K){}}else this.createEchoRequest(c,f,l,t,z).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,l,t,z,C){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=+l?"&mime="+l:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,z,C,F,N){C=null!=C?C:!1;F=null!=F?F:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(ca,da,ea,X){try{if("_blank"==da)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var ba=new EmbedDialog(this,c);this.showDialog(ba.container,+450,240,!0,!0);ba.init()}else{var ha=window.open("about:blank");null==ha?mxUtils.popup(c,!0):(ha.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ha.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(c,ca,l,t,null,N);else if(null!=ca&&0<ca.length){var ma=mxUtils.bind(this,function(Y){try{this.exportFile(c,ca,l,t,da,Y)}catch(la){this.handleError(la)}});null!=X?ma(X):this.pickFolder(da,ma)}}catch(Y){this.handleError(Y)}});z=[];C||z.push(App.MODE_BROWSER);F||+z.push("_blank");var I=new SaveDialog(this,f,mxUtils.bind(this,function(ca,da,ea){K(ca.value,da,ca,ea);this.hideDialog(null,null,I.container)}),z,c,l,t);this.showDialog(I.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));I.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var z="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var C=mxUtils.parseXml(c).documentElement.style.backgroundColor;+""!=C&&(z="background: "+C+";")}z='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+z+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||l?(C=l?c:btoa(unescape(encodeURIComponent(c))),t.document.write(z+'<img style="max-width:100%;" src="data:'+f+";base64,"+C+'"/></body></html>')):t.document.write(z+c+"</body></html>"):t.document.write(z+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");t.document.close()}};var m=EditorUi.prototype.addChromelessToolbarItems;+EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(t){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),+!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=+Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;+mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var z=f.getBoundingClientRect();this.tagsDialog.style.left=z.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";z=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=z.zIndex;document.body.appendChild(this.tagsDialog);+this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(t)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var t=this.editor.graph.getAllTags();f.style.display=0<t.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=+null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var l=c(mxUtils.bind(this,function(t){var z=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",z);null!=this.exportDialog&&+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)z.apply(this);else{this.exportDialog=document.createElement("div");var C=l.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=+"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=C.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";C=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=C.zIndex;var F=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});F.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",z);this.editor.exportToCanvas(mxUtils.bind(this,function(N){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var K=this.createImageDataUri(N,null,"png");N=document.createElement("img");N.style.maxWidth="140px";N.style.maxHeight="140px";+N.style.cursor="pointer";N.style.backgroundColor="white";N.setAttribute("title",mxResources.get("openInNewWindow"));N.setAttribute("border","0");N.setAttribute("src",K);this.exportDialog.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.openInNewWindow(K.substring(K.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(N){F.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),+this.exportDialog=null);this.handleError(N)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,l,t,z){this.isLocalFileSave()?this.saveLocalFile(l,c,t,z,f):this.saveRequest(c,f,mxUtils.bind(this,function(C,F){return this.createEchoRequest(l,C,t,z,f,F)}),l,z,t)};EditorUi.prototype.saveRequest=function(c,f,l,t,z,C,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;var N=mxUtils.bind(this,+function(I,ca,da,ea){if("_blank"==ca||null!=I&&0<I.length){var X=l("_blank"==ca?null:I,ca==App.MODE_DEVICE||"download"==ca||null==ca||"_blank"==ca?"0":"1");null!=X&&(ca==App.MODE_DEVICE||"download"==ca||"_blank"==ca?X.simulate(document,"_blank"):(da=mxUtils.bind(this,function(ba){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,I,C,!0,ca,ba)}catch(ha){this.handleError(ha)}else this.spinner.spin(document.body,mxResources.get("saving"))&&X.send(mxUtils.bind(this,function(){this.spinner.stop();+if(200<=X.getStatus()&&299>=X.getStatus())try{this.exportFile(X.getText(),I,C,!0,ca,ba)}catch(ha){this.handleError(ha)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ha){this.spinner.stop();this.handleError(ha)}))}),null!=ea?da(ea):this.pickFolder(ca,da)))}});z=[App.MODE_BROWSER];F||z.push("_blank");var K=new SaveDialog(this,c,mxUtils.bind(this,function(I,ca,da){N(I.value,ca,I,da);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");+this.showDialog(K.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));K.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,l,t,z,C){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,l){f(null)};EditorUi.prototype.exportSvg=+function(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(U){Editor.addRetryToError(U,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X)}));this.handleError(U)})))try{var ba=this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;var ha=f?null:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);null==ha&&0==f&&(ha=this.editor.graph.shapeBackgroundColor);var ma=this.editor.graph.addForeignObjectWarning;+Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var Y=this.editor.graph.createSvgImageExport(z),la=this.editor.graph.getSvg(ha,c,F,N,null,l,null,Y,"blank"==I?"_blank":"self"==I?"_top":null,null,!ea,ca,da);this.editor.graph.addForeignObjectWarning=ma;t&&this.editor.graph.addSvgShadow(la);var Z=this.getBaseFilename()+(z?".drawio":"")+".svg";X=null!=X?X:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",U,"image/svg+xml"):+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});var k=mxUtils.bind(this,function(U){this.spinner.stop();z&&U.setAttribute("content",this.getFileData(!0,null,null,null,l,K,null,null,null,null,null,c,F));X(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(U))});this.editor.graph.mathEnabled&&this.editor.addMathCss(la);var A=mxUtils.bind(this,function(U){Editor.replaceSvgDataUris&&+C&&EditorUi.embedSvgImages(U);Editor.foreignObjectImages&&ea?this.replaceAlternateContent(U,ca,k):k(U)}),J=mxUtils.bind(this,function(U){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(U,A,this.thumbImageCache)):A(U)});ea?this.embedFonts(la,J):(this.editor.addFontCss(la),J(la))}catch(U){this.handleError(U)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(da,ea,X,ba,ha){var ma=mxUtils.createElementNs(c.ownerDocument,+mxConstants.NS_SVG,"image");ma.setAttribute("x",ea);ma.setAttribute("y",X+.5);ma.setAttribute("width",ba.width);ma.setAttribute("height",ba.height);null==ma.setAttributeNS?ma.setAttribute("xlink:href",ha):ma.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",ha);da.replaceChild(ma,da.lastChild);N()}function z(){if(F<ca.length)ca[F++](z)}var C="";f=c.getElementsByTagName("style");for(var F=0;F<f.length;F++)C+=f[F].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,+function(){counter--;0==counter&&l(c)}),K={},I={},ca=[];for(F=0;F<f.length;F++)mxUtils.bind(this,function(da){var ea=da.getElementsByTagName("div");if(0<ea.length)try{var X=ea[0].cloneNode(!0),ba=parseInt(X.style.marginLeft),ha=parseInt(X.style.paddingTop),ma=X.getElementsByTagName("div")[1],Y=ea=!1,la=X.style.alignItems,Z=X.style.justifyContent;if(null!=X.style.writingMode){var k=X.style.writingMode;Y="vertical-"==k.substring(0,9);ea="-rl"==k.substring(k.length-3)}var A=!Y&&"1px"==X.style.width||+Y&&"1px"==X.style.height;if(!Y&&"1px"==X.style.height||Y&&"1px"==X.style.width)X.style.alignItems=Y&&ea?"unsafe flex-end":"unsafe flex-start";A&&(X.style.justifyContent="unsafe flex-start");X.style.paddingTop="";X.style.marginLeft="";var J=X.outerHTML,U=K[J];null==U&&(X.style.position="absolute",X.style.visibility="hidden",document.body.appendChild(X),k=1,k="1px"==X.style.width?ma.offsetWidth:parseInt(X.style.width),A=1,A="1px"==X.style.height?ma.offsetHeight:parseInt(X.style.height),document.body.removeChild(X),+U=new mxRectangle(ba,ha,k,A),K[J]=U);"1px"==X.style.height&&("unsafe center"==la?ha-=U.height/2:"unsafe flex-end"==la&&(ha-=U.height));if("1px"==X.style.width)if(!Y&&"unsafe center"==Z||Y&&"unsafe center"==la)ba-=U.width/2;else if(!Y&&"unsafe flex-end"==Z||Y&&(!ea&&"unsafe flex-end"==la||ea&&"unsafe flex-start"==la))ba-=U.width;U=new mxRectangle(ba,ha,U.width,U.height+parseInt(ma.style.fontSize)/4);ca.push(mxUtils.bind(this,function(P){var T=I[J];null==T?Graph.htmlToPng(J,U.width,U.height,mxUtils.bind(this,+function(W){t(da,ba,ha,U,W);I[J]=W;P()}),C):(t(da,ba,ha,U,T),P())}))}catch(P){N()}else N()})(f[F]);0==counter&&l(c);F=0;z()};EditorUi.prototype.addRadiobox=function(c,f,l,t,z,C,F){return this.addCheckbox(c,l,t,z,C,F,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;var K=document.createElement("input");K.style.marginRight="8px";K.style.marginTop="16px";K.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();K.id=F;null!=N&&K.setAttribute("name",N);l&&+(K.setAttribute("checked","checked"),K.defaultChecked=!0);t&&K.setAttribute("disabled","disabled");C&&(c.appendChild(K),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",F),c.appendChild(l),z||mxUtils.br(c));return K};EditorUi.prototype.addEditButton=function(c,f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var t=this.getCurrentFile(),z="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(z=window.location.href);+var C=document.createElement("select");C.style.maxWidth="200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));C.appendChild(t);var F=document.createElement("option");F.setAttribute("value","custom");mxUtils.write(F,mxResources.get("custom")+"...");C.appendChild(F);c.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==+C.value){var N=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!=K?(z=K,F.setAttribute("title",K)):(C.value="blank",F.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(N.container,300,80,!0,!1);N.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?+"blank"===C.value?"_blank":z:null},getEditInput:function(){return l},getEditSelect:function(){return C}}};EditorUi.prototype.addLinkSection=function(c,f){function l(){var N=document.createElement("div");N.style.width="100%";N.style.height="100%";N.style.boxSizing="border-box";null!=C&&C!=mxConstants.NONE?(N.style.border="1px solid black",N.style.backgroundColor=C):(N.style.backgroundPosition="center center",N.style.backgroundRepeat="no-repeat",N.style.backgroundImage="url('"+Dialog.prototype.closeImage++"')");F.innerText="";F.appendChild(N)}mxUtils.write(c,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z,mxResources.get("automatic"));t.appendChild(z);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));t.appendChild(z);+z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));t.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var C="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(N){this.pickColor(C||"none",function(K){C=K;l()});+mxEvent.consume(N)}));l();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";c.appendChild(F);mxUtils.br(c);return{getColor:function(){return C},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,t,z,C){C=null!=C?C:[];l&&(C.push("lightbox=1"),+"auto"!=c&&C.push("target="+c),null!=f&&f!=mxConstants.NONE&&C.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&C.push("edit="+encodeURIComponent(t)),z&&C.push("layers=1"),this.editor.graph.foldingEnabled&&C.push("nav=1"));return C};EditorUi.prototype.createLink=function(c,f,l,t,z,C,F,N,K,I,ca){var da=this.getCurrentFile();K=this.createUrlParameters(c,f,t,z,C,K);c=!0;null!=F?l="#U"+encodeURIComponent(F):N||null==da||""==da.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,+null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+da.getHash(),c=!1);c&&null!=da&&null!=da.getTitle()&&da.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(da.getTitle()));I&&1<l.length&&(K.push("open="+l.substring(1)),l="");ca&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());return(t&&(null!=F||null!=da&&da.getMode()!=App.MODE_GITHUB&&da.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||+EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){this.getBasenames();var X={};""!=z&&z!=mxConstants.NONE&&(X.highlight=z);"auto"!==t&&(X.target=t);I||(X.lightbox=!1);X.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(X.zoom=l/100);l=[];F&&(l.push("pages"),X.resize=!0,null!=this.pages&&null!=this.currentPage&&+(X.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),X.resize=!0);N&&l.push("layers");K&&l.push("tags");null!=ea&&(X["dark-mode"]=ea);0<l.length&&(I&&l.push("lightbox"),X.toolbar=l.join(" "));null!=ca&&0<ca.length&&(X.edit=ca);null!=c?X.url=c:X.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(X))+'"></div>';c=null!=c?"&fetch="++encodeURIComponent(c):"";da(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var z=document.createElement("div");z.style.whiteSpace="nowrap";var C=document.createElement("h3");+mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");C=N.cloneNode(!0);C.setAttribute("value",+"copy");F.appendChild(C);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(K);mxUtils.br(F);F.appendChild(N);K=document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));F.appendChild(K);var I=this.getCurrentFile();null==l&&null!=I&&I.constructor==window.DriveFile&&(K=document.createElement("a"),K.style.paddingLeft="12px",K.style.color="gray",K.style.cursor="pointer",mxUtils.write(K,mxResources.get("share")),F.appendChild(K),+mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(I.getId(),I)})));C.setAttribute("checked","checked");null==l&&N.setAttribute("disabled","disabled");z.appendChild(F);F=380;var ca=this.addLinkSection(z),da=document.createElement("select");da.style.maxWidth="260px";da.style.marginLeft="8px";da.style.marginTop="16px";K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));da.appendChild(K);K=document.createElement("option");+K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));da.appendChild(K);K=document.createElement("option");K.setAttribute("value","auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected","selected");da.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+":");z.appendChild(da);mxUtils.br(z);F+=26;var ea=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,":");var X=document.createElement("input");+X.setAttribute("type","text");X.style.marginRight="16px";X.style.width="60px";X.style.marginLeft="4px";X.style.marginRight="12px";X.value="100%";z.appendChild(X);var ba=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=this.pages&&1<this.pages.length;var ha=ha=this.addCheckbox(z,mxResources.get("allPages"),K,!K),ma=this.addCheckbox(z,mxResources.get("layers"),!0),Y=this.addCheckbox(z,mxResources.get("tags"),!0),la=this.addCheckbox(z,mxResources.get("lightbox"),!0),Z=null;if(EditorUi.enableHtmlEditOption){Z=+this.addEditButton(z,la);var k=Z.getEditInput();k.style.marginBottom="16px";F+=50;mxEvent.addListener(la,"change",function(){la.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&la.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,z,mxUtils.bind(this,function(){t(N.checked?l:null,ea.checked,X.value,ca.getTarget(),ca.getColor(),ba.checked,ha.checked,ma.checked,Y.checked,la.checked,+null!=Z?Z.getLink():null,null!=da?da.value:null)}),null,c,f);this.showDialog(c.container,340,F,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,z,C,F,N,K){var I=document.createElement("div");I.style.whiteSpace="nowrap";var ca=document.createElement("h3");mxUtils.write(ca,c||mxResources.get("publish"));ca.style.width="100%";ca.style.textAlign="center";ca.style.marginTop="2px";ca.style.marginBottom="20px";I.appendChild(ca);var da=document.createElement("select");c=30;da.className=+"geBtn";da.style.marginBottom="8px";da.style.marginLeft="0px";da.style.width="100%";da.style.boxSizing="border-box";if(null==N||""==N.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ca=document.createElement("option"),mxUtils.write(ca,mxResources.get("makeCopy")),ca.setAttribute("value","copy"),da.appendChild(ca);ca=document.createElement("option");mxUtils.write(ca,mxResources.get("authorizationRequired"));ca.setAttribute("value","auth");da.appendChild(ca);null!=N&&+""!=N.getHash()||ca.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");da.appendChild(N);null!=F?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",F),da.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));I.appendChild(da);mxUtils.br(I);da.focus();var ea=null,X=null;if(null!=f||null!=l)c+=30,mxUtils.write(I,mxResources.get("width")++":"),ea=document.createElement("input"),ea.setAttribute("type","text"),ea.style.marginRight="16px",ea.style.width="50px",ea.style.marginLeft="6px",ea.style.marginRight="16px",ea.style.marginBottom="10px",ea.value="100%",I.appendChild(ea),mxUtils.write(I,mxResources.get("height")+":"),X=document.createElement("input"),X.setAttribute("type","text"),X.style.width="50px",X.style.marginLeft="6px",X.style.marginBottom="10px",X.value=l+"px",I.appendChild(X),mxUtils.br(I);var ba=this.addLinkSection(I,t),+ha=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),ha=this.addCheckbox(I,mxResources.get("selectedPage")+": "+f));var ma=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!t),Y=this.addEditButton(I,ma),la=Y.getEditInput();t&&(la.style.marginLeft=ma.style.marginLeft,ma.style.display="none",c-=20);var Z=this.addCheckbox(I,mxResources.get("layers"),!0);+Z.style.marginLeft=la.style.marginLeft;Z.style.marginTop="8px";var k=this.addCheckbox(I,mxResources.get("tags"),!0);k.style.marginLeft=la.style.marginLeft;k.style.marginBottom="16px";k.style.marginTop="16px";mxEvent.addListener(ma,"change",function(){ma.checked?(Z.removeAttribute("disabled"),la.removeAttribute("disabled"),k.removeAttribute("disabled")):(Z.setAttribute("disabled","disabled"),la.setAttribute("disabled","disabled"),k.setAttribute("disabled","disabled"));la.checked&&ma.checked?Y.getEditSelect().removeAttribute("disabled"):+Y.getEditSelect().setAttribute("disabled","disabled")});t=new CustomDialog(this,I,mxUtils.bind(this,function(){K(ba.getTarget(),ba.getColor(),null==ha?!1:ha.checked,ma.checked,Y.getLink(),Z.checked,null!=ea?ea.value:null,null!=X?X.value:null,k.checked,da.value)}),null,mxResources.get("create"),z,C);this.showDialog(t.container,340,296+c,!0,!0);null!=ea?(ea.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ea.select():document.execCommand("selectAll",!1,null)):null==da.parentNode;ba.focus()};+EditorUi.prototype.showRemoteExportDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(z?"10":"4")+"px";C.appendChild(F);if(z){mxUtils.write(C,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft=+"4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";C.appendChild(N);mxUtils.write(C,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=this.lastExportBorder||"0";C.appendChild(K);mxUtils.br(C)}var I=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ca=t?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),+Editor.defaultIncludeDiagram);F=this.editor.graph;var da=t?null:this.addCheckbox(C,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=da&&(da.style.marginBottom="16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ea=parseInt(N.value)/100||1,X=parseInt(K.value)||0;l(!I.checked,null!=ca?ca.checked:!1,null!=da?da.checked:!1,ea,X)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=+function(c,f,l,t,z,C,F,N,K){F=null!=F?F:Editor.defaultIncludeDiagram;var I=document.createElement("div");I.style.whiteSpace="nowrap";var ca=this.editor.graph,da="jpeg"==N||"webp"==N?220:320,ea=document.createElement("h3");mxUtils.write(ea,c);ea.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";I.appendChild(ea);mxUtils.write(I,mxResources.get("zoom")+":");var X=document.createElement("input");X.setAttribute("type","text");X.style.marginRight="16px";X.style.width="60px";+X.style.marginLeft="4px";X.style.marginRight="12px";X.value=this.lastExportZoom||"100%";I.appendChild(X);mxUtils.write(I,mxResources.get("borderWidth")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.value=this.lastExportBorder||"0";I.appendChild(ba);mxUtils.br(I);var ha=this.addCheckbox(I,mxResources.get("selectionOnly"),!1,ca.isSelectionEmpty()),ma=document.createElement("input");ma.style.marginTop=+"16px";ma.style.marginRight="8px";ma.style.marginLeft="24px";ma.setAttribute("disabled","disabled");ma.setAttribute("type","checkbox");var Y=document.createElement("select");Y.style.marginTop="16px";Y.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ea=0;ea<c.length;ea++)if(!ca.isSelectionEmpty()||"selectionOnly"!=c[ea]){var la=document.createElement("option");mxUtils.write(la,mxResources.get(c[ea]));la.setAttribute("value",c[ea]);Y.appendChild(la)}K?(mxUtils.write(I,mxResources.get("size")++":"),I.appendChild(Y),mxUtils.br(I),da+=26,mxEvent.addListener(Y,"change",function(){"selectionOnly"==Y.value&&(ha.checked=!0)})):C&&(I.appendChild(ma),mxUtils.write(I,mxResources.get("crop")),mxUtils.br(I),da+=30,mxEvent.addListener(ha,"change",function(){ha.checked?ma.removeAttribute("disabled"):ma.setAttribute("disabled","disabled")}));ca.isSelectionEmpty()?K&&(ha.style.display="none",ha.nextSibling.style.display="none",ha.nextSibling.nextSibling.style.display="none",da-=30):(Y.value="diagram",+ma.setAttribute("checked","checked"),ma.defaultChecked=!0,mxEvent.addListener(ha,"change",function(){Y.value=ha.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(I,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=N&&"webp"!=N),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));k.appendChild(C);K=document.createElement("option");+K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));k.appendChild(K);"svg"==N?(C=document.createElement("option"),C.setAttribute("value","auto"),mxUtils.write(C,mxResources.get("automatic")),C.setAttribute("selected","selected"),k.appendChild(C)):Editor.isDarkMode()?K.setAttribute("selected","selected"):C.setAttribute("selected","selected");mxUtils.write(I,mxResources.get("appearance")+":");I.appendChild(k);mxUtils.br(I);da+=26;var A=this.addCheckbox(I,mxResources.get("shadow"),+ca.shadowVisible),J=null;if("png"==N||"jpeg"==N||"webp"==N)J=this.addCheckbox(I,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var U=this.addCheckbox(I,mxResources.get("includeCopyOfMyDiagram")+":",F,null,null,"jpeg"!=N&&"webp"!=N),P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="28px";"png"==N||"svg"==N?(F=function(){U.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")},ca=document.createElement("option"),ca.setAttribute("value",+"allPages"),mxUtils.write(ca,mxResources.get("allPages")),P.appendChild(ca),ca=document.createElement("option"),ca.setAttribute("value","currentPage"),mxUtils.write(ca,mxResources.get("currentPage")),P.appendChild(ca),U.style.marginBottom="12px",P.style.marginBottom="16px",I.appendChild(P),mxUtils.br(I),da+=20,null!=this.lastEmbedInclude&&(P.value=this.lastEmbedInclude),mxEvent.addListener(U,"change",F),F()):U.style.marginBottom="16px";var T=document.createElement("input");T.style.marginBottom="16px";+T.style.marginRight="8px";T.setAttribute("type","checkbox");var W=document.createElement("input");W.style.marginBottom="16px";W.style.marginRight="8px";W.setAttribute("type","checkbox");f&&(T.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,I.appendChild(T),mxUtils.write(I,mxResources.get("embedImages")),mxUtils.br(I),W.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,I.appendChild(W),mxUtils.write(I,mxResources.get("embedFonts")),mxUtils.br(I),da+=50);var aa=document.createElement("select");+aa.style.maxWidth="260px";aa.style.marginLeft="8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));aa.appendChild(C);F=document.createElement("option");F.setAttribute("value","blank");mxUtils.write(F,mxResources.get("openInNewWindow"));aa.appendChild(F);F=document.createElement("option");F.setAttribute("value","self");mxUtils.write(F,mxResources.get("openInThisWindow"));aa.appendChild(F);F=document.createElement("div");mxUtils.write(F,+mxResources.get("LinksLost"));F.style.margin="7px";F.style.display="none";"svg"==N&&(mxUtils.write(I,mxResources.get("links")+":"),I.appendChild(aa),I.appendChild(F),mxUtils.br(I),mxUtils.br(I),da+=50);l=new CustomDialog(this,I,mxUtils.bind(this,function(){this.lastExportBorder=ba.value;this.lastExportZoom=X.value;this.lastEmbedImages=T.checked;this.lastEmbedFonts=W.checked;this.lastEmbedInclude=P.value;z(X.value,Z.checked,!ha.checked,A.checked,U.checked,T.checked&&f,ba.value,ma.checked,("png"==N||+"svg"==N)&&"currentPage"==P.value,aa.value,null!=J?J.checked:null,null!=k?k.value:null,Y.value,W.checked)}),null,l,t);this.showDialog(l.container,340,da,!0,!0,null,null,null,null,!0);X.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?X.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,+f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(N)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),I=this.addCheckbox(C,mxResources.get("shadow"),F.shadowVisible&&t,!t),ca=this.addCheckbox(C,l),da=this.addCheckbox(C,mxResources.get("lightbox"),!0),ea=this.addEditButton(C,da),X=ea.getEditInput(),ba=1<F.model.getChildCount(F.model.getRoot()),ha=this.addCheckbox(C,mxResources.get("layers"),ba,!ba);ha.style.marginLeft=X.style.marginLeft;ha.style.marginBottom=+"12px";ha.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(ba&&ha.removeAttribute("disabled"),X.removeAttribute("disabled")):(ha.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));X.checked&&da.checked?ea.getEditSelect().removeAttribute("disabled"):ea.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){c(K.checked,I.checked,ca.checked,da.checked,ea.getLink(),ha.checked)}),null,mxResources.get("embed"),+z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,l,t,z,C,F,N){function K(X){var ba=" ",ha="";t&&(ba=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"++(null!=ca?"&page="+ca:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ha+="cursor:pointer;");c&&(ha+="max-width:100%;");var ma="";l&&(ma=' width="'+Math.round(I.width)+'" height="'+Math.round(I.height)+'"');F('<img src="'+X+'"'+ma+(""!=ha?' style="'+ha+'"':"")+ba+"/>")}var I=this.editor.graph.getGraphBounds(),ca=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(X){var ba=t?this.getFileData(!0):null;X=this.createImageDataUri(X,+ba,"png");K(X)}),null,null,null,mxUtils.bind(this,function(X){N({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),I.width*I.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";l&&(da="&w="+Math.round(2*I.width)+"&h="+Math.round(2*I.height));var ea=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+da+"&xml="+encodeURIComponent(f));ea.send(mxUtils.bind(this,function(){200<=ea.getStatus()&&299>=ea.getStatus()?+K("data:image/png;base64,"+ea.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,l,t,z,C,F){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),K=N.getElementsByTagName("a");if(null!=K)for(var I=0;I<K.length;I++){var ca=K[I].getAttribute("href");null!=ca&&"#"==ca.charAt(0)&&"_blank"==K[I].getAttribute("target")&&K[I].removeAttribute("target")}t&&N.setAttribute("content",+this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var da=" ",ea="";t&&(da="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",+ea+="cursor:pointer;");c&&(ea+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(X){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(X))+'"'+(""!=ea?' style="'+ea+'"':"")+da+"/>")}))}else ea="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"++EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ea+="cursor:pointer;"),c&&(c=parseInt(N.getAttribute("width")),z=parseInt(N.getAttribute("height")),N.setAttribute("viewBox","-0.5 -0.5 "+c+" "+z),ea+="max-width:100%;max-height:"+z+"px;",N.removeAttribute("height")),""!=ea&&N.setAttribute("style",ea),this.editor.addFontCss(N),this.editor.graph.mathEnabled&&this.editor.addMathCss(N),F(mxUtils.getXml(N))};EditorUi.prototype.timeSince=+function(c){c=Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var l=null;if("diagram"==+c.nodeName)l=c;else if("mxfile"==c.nodeName){var t=c.getElementsByTagName("diagram");if(0<t.length){l=t[0];var z=f.getGlobalVariable;f.getGlobalVariable=function(C){return"page"==C?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==C?1:z.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}t=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(C){}finally{this.editor.graph=t}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};+EditorUi.prototype.getPngFileProperties=function(c){var f=1,l=0;if(null!=c){if(c.hasAttribute("scale")){var t=parseFloat(c.getAttribute("scale"));!isNaN(t)&&0<t&&(f=t)}c.hasAttribute("border")&&(t=parseInt(c.getAttribute("border")),!isNaN(t)&&0<t&&(l=t))}return{scale:f,border:l}};EditorUi.prototype.getEmbeddedPng=function(c,f,l,t,z){try{var C=this.editor.graph,F=null;if(null!=l&&0<l.length)C=this.createTemporaryGraph(C.getStylesheet()),document.body.appendChild(C.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,+!0),C),F=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(C.getStylesheet());var N=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var K=this.pages[0];this.currentPage==K?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&C.setBackgroundImage(K.viewState.backgroundImage);C.getGlobalVariable=function(I){return"page"==I?K.getName():"pagenumber"==I?1:N.apply(this,arguments)};document.body.appendChild(C.container);+C.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==F&&(F=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ca=I.toDataURL("image/png");ca=Editor.writeGraphModelToPng(ca,"tEXt","mxfile",encodeURIComponent(F));c(ca.substring(ca.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(da){null!=f&&f(da)}}),null,null,null,mxUtils.bind(this,function(I){null!=f&&f(I)}),null,null,t,null,C.shadowVisible,null,+C,z,null,null,null,"diagram",null)}catch(I){null!=f&&f(I)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){N=null!=N?N:!0;ca=null!=ca?ca:0;F=null!=K?K:f.background;F==mxConstants.NONE&&(F=null);null==F&&"none"==f.getAdaptiveColors()&&(F="#ffffff");K=this.editor.graph.createSvgImageExport(null!=c);C=f.getSvg(F,I,ca,null,null,C,null,K,null,f.shadowVisible||da,null,ea,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(C,null,null,0==ca);null!=c&&C.setAttribute("content",c);null!=+l&&C.setAttribute("resource",l);var X=mxUtils.bind(this,function(ba){ba=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ba);null!=z&&z(ba);return ba});f.mathEnabled&&this.editor.addMathCss(C);if(null!=z)this.embedFonts(C,mxUtils.bind(this,function(ba){N?this.editor.convertImages(ba,mxUtils.bind(this,function(ha){X(ha)})):X(ba)}));else return X(C)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=+this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(ba){Editor.addRetryToError(ba,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,z,C,F,N,K,I,ca,da,+ea)}));this.handleError(ba)}))){var X=this.editor.graph.isSelectionEmpty();l=null!=l?l:X;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(ba){this.spinner.stop();try{this.saveCanvas(ba,z?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,ca)}catch(ha){this.handleError(ha)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ba){this.spinner.stop();this.handleError(ba)}),+null,l,c||1,f,t,null,null,C,F,I,da,ea)}catch(ba){this.spinner.stop(),this.handleError(ba)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,z,C,F){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var K=this.editor.graph;if(null!=c&&0<+c.length){K.model.beginUpdate();try{var I=mxUtils.parseXml(c);c={};var ca=this.editor.extractGraphModel(I.documentElement,null!=this.pages);if(null!=ca&&"mxfile"==ca.nodeName&&null!=this.pages){var da=ca.getElementsByTagName("diagram");if(1==da.length&&!C){if(ca=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(c[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ea=da[0].getAttribute("name");null!=ea&&""!=ea&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,+ea))}}else if(0<da.length){C=[];var X=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[da[0].getAttribute("id")]=this.pages[0].getId(),ea=da[0].getAttribute("name"),null!=ea&&""!=ea&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ea)),ca=Editor.parseDiagramNode(da[0]),t=!1,X=1);for(;X<da.length;X++){var ba=da[X].getAttribute("id");da[X].removeAttribute("id");var ha=this.updatePageRoot(new DiagramPage(da[X]));c[ba]=da[X].getAttribute("id");var ma=this.pages.length;+null==ha.getName()&&ha.setName(mxResources.get("pageWithNumber",[ma+1]));K.model.execute(new ChangePage(this,ha,ha,ma,!0));C.push(ha)}this.updatePageLinks(c,C)}}if(null!=ca&&"mxGraphModel"===ca.nodeName){N=K.importGraphModel(ca,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),X=0;X<N.length;X++)this.updatePageLinksForCell(c,N[X]);var Y=K.parseBackgroundImage(ca.getAttribute("backgroundImage"));if(null!=Y&&null!=Y.originalSrc){this.updateBackgroundPageLink(c,Y);var la=new ChangePageSetup(this,+null,Y);la.ignoreColor=!0;K.model.execute(la)}}F&&K.pasteCellStyles(K.includeDescendants(N),K.defaultVertexStyle,K.defaultEdgeStyle)}finally{K.model.endUpdate()}}}catch(Z){if(z)throw Z;this.handleError(Z)}return N};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=+c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(t){}};EditorUi.prototype.updatePageLinksForCell=function(c,f){var l=document.createElement("div"),t=this.editor.graph,z=t.getLinkForCell(f);null!=z&&t.setLinkForCell(f,this.updatePageLink(c,z));if(t.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(t.getLabel(f));for(var C=l.getElementsByTagName("a"),F=!1,N=0;N<C.length;N++)z=C[N].getAttribute("href"),null!=z&&(C[N].setAttribute("href",this.updatePageLink(c,+z)),F=!0);F&&t.labelChanged(f,l.innerHTML)}for(N=0;N<t.model.getChildCount(f);N++)this.updatePageLinksForCell(c,t.model.getChildAt(f,N))};EditorUi.prototype.updatePageLink=function(c,f){if(Graph.isPageLink(f)){var l=c[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var t=JSON.parse(f.substring(17));if(null!=t.actions){for(var z=0;z<t.actions.length;z++){var C=t.actions[z];if(null!=C.open&&Graph.isPageLink(C.open)){var F=C.open.substring(C.open.indexOf(",")++1);l=c[F];null!=l?C.open="data:page/id,"+l:null==this.getPageById(F)&&delete C.open}}f="data:action/json,"+JSON.stringify(t)}}catch(N){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,l,t,z){var C=mxUtils.bind(this,function(F){this.loadingExtensions=!1;null!=l?l(F):this.handleError(F)});this.createTimeout(null,mxUtils.bind(this,function(F){t=null!=t?t:c.name;var N=mxUtils.bind(this,+function(I){F.clear()&&C(I)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(t);try{var ca=t.lastIndexOf(".");if(0<=ca&&ca<t.length)t.substring(ca+1).toUpperCase();else{var da=t.lastIndexOf("/");0<=da&&da<t.length&&(t=t.substring(da+1))}}catch(X){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;+I.append("file1",c,t);var ea=new XMLHttpRequest;ea.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ea.responseType="blob";this.addRemoteServiceSecurityCheck(ea);null!=z&&ea.setRequestHeader("x-convert-custom",z);ea.onreadystatechange=mxUtils.bind(this,function(){if(4==ea.readyState&&F.clear())if(200<=ea.status&&299>=ea.status)try{var X=ea.response;if("text/xml"==X.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(ha){try{f(ha.target.result)}catch(ma){N({message:mxResources.get("errorLoadingFile")})}});+ba.readAsText(X)}else this.doImportVisio(X,f,N,t)}catch(ha){N(ha)}else try{""==ea.responseType||"text"==ea.responseType?N({message:ea.responseText}):(ba=new FileReader,ba.onload=function(){try{N({message:JSON.parse(ba.result).Message})}catch(ha){N(ha)}},ba.readAsText(ea.response))}catch(ha){N({})}});ea.send(I)}else if(F.clear())try{this.doImportVisio(c,f,N,t)}catch(X){N(X)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?+K():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",K,null,null,null,N))}),C)};EditorUi.prototype.importGraphML=function(c,f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,t)}catch(N){C(N)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});+this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.createTimeout(null,mxUtils.bind(this,function(l){var t=mxUtils.bind(this,function(C){l.clear()&&f(C)}),z=mxUtils.bind(this,function(){this.loadingExtensions=+!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||t({message:mxResources.get("unknownError")})}catch(C){t(C)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),f)}};EditorUi.prototype.convertLucidChart=function(c,+f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if("undefined"!==typeof window.LucidImporter)try{var N=JSON.parse(c);f(LucidImporter.importState(N));try{if(null!=window.console&&"1"==urlParams.test){var K=[(new Date).toISOString(),"convertLucidChart",N];null!=N.state&&+K.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var I=0;I<N.svgThumbs.length;I++)K.push(Editor.createSvgDataUri(N.svgThumbs[I]));null!=N.thumb&&K.push(N.thumb);console.log.apply(console,K)}}catch(ca){}}catch(ca){null!=window.console&&console.error(ca),C(ca)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",+function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",F,null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.createMermaidXml=function(c,f,l,t,z,C){var F=new Graph(document.createElement("div"));+l=F.insertVertex(null,null,null,0,0,t,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");F.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=C&&F.setAttributeForCell(l,"templatePrompt",C);c=(new mxCodec).encode(F.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,l){var t=0,z=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(C){var F=new mxXmlRequest("https://www.draw.io/generate/v2",+c,"POST"),N=mxUtils.bind(this,function(K){C.clear()&&l(K)});F.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ca=mxUtils.trim(K.getText());this.generateMermaidImage(ca,null,mxUtils.bind(this,function(da,ea,X){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",ca),f(ca,da,ea,X))}),N)}),N,mxUtils.bind(this,function(da){3>+t++?C.clear()&&z():N(da)}))}),N);else{var I={message:mxResources.get("error")+" "+K.getStatus()};try{I=JSON.parse(K.getText()),I=I.error}catch(ca){}N(I)}}),N)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?+f[1]:null;if(null!=l){var t=l.indexOf("-");0<t&&(l=l.substring(0,t))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");l=f[0].split(" ")[0].replace(/:$/,"");t=l.indexOf("-");0<t&&(l=l.substring(0,t));try{"mindmap"==l&&2<f.length&&(c=extractMermaidMindmap(f))}catch(z){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,+f,l,t,z){var C=mxUtils.bind(this,function(N){this.loadingMermaid=!1;null!=t?t(N):this.handleError(N)}),F=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var N=mxUtils.bind(this,function(K){try{if(mxClient.IS_IE||mxClient.IS_IE11)K=+K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var I=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<I.length&&"error"!=I[0].getAttribute("aria-roledescription")){var ca=parseFloat(I[0].getAttribute("width")),da=parseFloat(I[0].getAttribute("height"));if(isNaN(ca)||isNaN(da))try{var ea=I[0].getAttribute("viewBox").split(/\s+/);ca=parseFloat(ea[2]);da=parseFloat(ea[3])}catch(X){ca=ca||100,da=da||100}l(this.convertDataUri(Editor.createSvgDataUri(K)),+ca,da)}else null!=z?z():t({message:mxResources.get("invalidInput")})}catch(X){t(X)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){N(K.svg)}).catch(function(K){null!=z?z(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,+null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,C)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function z(N,K,I){c1=N>>2;c2=(N&3)<<4|K>>4;c3=(K&15)<<2|I>>6;c4=I&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97++N);N-=26;return 0==N?"-":1==N?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(N){r="";for(i=0;i<N.length;i+=3)r=i+2==N.length?r+z(N.charCodeAt(i),N.charCodeAt(i+1),0):i+1==N.length?r+z(N.charCodeAt(i),0,0):r+z(N.charCodeAt(i),N.charCodeAt(i+1),N.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(N){if(200<=this.status&&300>this.status)if("txt"==+f)l(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(I){var ca=new Image;ca.onload=function(){try{var da=ca.width,ea=ca.height;if(0==da&&0==ea){var X=K.result,ba=X.indexOf(","),ha=decodeURIComponent(escape(atob(X.substring(ba+1)))),ma=mxUtils.parseXml(ha).getElementsByTagName("svg");0<ma.length&&(da=parseFloat(ma[0].getAttribute("width")),ea=parseFloat(ma[0].getAttribute("height")))}l(K.result,da,ea)}catch(Y){t(Y)}};ca.src=K.result};K.onerror=function(I){t(I)}}else t(N)};+F.onerror=function(N){t(N)};F.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var t=this.editor.graph,z=null;t.getModel().beginUpdate();try{z=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(z,!0)}finally{t.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;F=null!=F?F:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ea){4==ea.readyState&&200<=ea.status&&299>=ea.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ea.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var K=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var I=Editor.extractGraphModelFromPdf(c);if(null!=+I&&0<I.length)return this.importXml(I,f,l,C,!0,N)}if(Editor.isPngDataUrl(c)&&(I=Editor.extractGraphModelFromPng(c),null!=I&&0<I.length))return this.importXml(I,f,l,C,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{I=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(I=c.substring(c.indexOf(",")+1),I=window.atob&&!mxClient.IS_SF?atob(I):Base64.decode(I,!0)):I=decodeURIComponent(c.substring(c.indexOf(",")+1));var ca=this.importXml(I,f,l,C,!0,N);if(0<ca.length)return ca}catch(ea){}this.loadImage(c,+mxUtils.bind(this,function(ea){if("data:"==c.substring(0,5))this.resizeImage(ea,c,mxUtils.bind(this,function(ha,ma,Y){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ma,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ha)+";"))}),F,this.maxImageSize);else{var X=Math.min(1,Math.min(this.maxImageSize/ea.width,this.maxImageSize/ea.height)),ba=Math.round(ea.width*X);ea=Math.round(ea.height*+X);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ba,ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ea=null;K.getModel().beginUpdate();try{ea=K.insertVertex(K.getDefaultParent(),null,c,K.snap(f),K.snap(l),1,1,"text;"+(t?"html=1;":"")),K.updateCellSize(ea),K.fireEvent(new mxEventObject("textInserted","cells",[ea]))}finally{K.getModel().endUpdate()}K.setSelectionCell(ea)}))}else{c=+Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,C,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ea){this.editor.graph.setSelectionCells(this.importXml(ea,f,l,C,null,N))}),mxUtils.bind(this,function(ea){this.handleError(ea)}));else{K=this.editor.graph;z=null;K.getModel().beginUpdate();try{z=K.insertVertex(K.getDefaultParent(),null,"",K.snap(f),K.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));+K.fireEvent(new mxEventObject("textInserted","cells",[z]));t&&(c=K.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");z.value=c;K.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var da=K.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=da.width;z.geometry.height=da.height}Graph.isLink(z.value)&&K.setLinkForCell(z,z.value);z.geometry.width+=K.gridSize;z.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[z]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=-c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=-k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(I,L){StorageFile.listFiles(this,"F",I,L)});window.openBrowserFile=mxUtils.bind(this,function(I,L,K){StorageFile.getFileContent(this,I,L,K)});window.deleteBrowserFile=mxUtils.bind(this,function(I,L,K){StorageFile.deleteFile(this,I,L,K)});if(!f){var B=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(I){this.hideDialog(I)}));-window.openFile.setConsumer(mxUtils.bind(this,function(I,L){null!=L&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(L)?(I=new Blob([I],{type:"application/octet-stream"}),this.importVisio(I,mxUtils.bind(this,function(K){this.importXml(K,0,0,!0)}),null,L)):this.editor.graph.setSelectionCells(this.importXml(I,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,C=z.close;-this.dialog.close=mxUtils.bind(this,function(I){Editor.useLocalStorage=B;C.apply(z,arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,k){var B=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))k();else{var I=0,L,K=!1;C.forEach(function(O,da){O=da.name.toLowerCase();"diagram/diagram.xml"==O?(K=!0,da.async("string").then(function(ea){0==-ea.indexOf("<mxfile ")?f(ea):k()})):0==O.indexOf("versions/")&&(O=parseInt(O.substr(9)),O>I&&(I=O,L=da))});0<I?L.async("string").then(function(O){(new XMLHttpRequest).upload&&B.isRemoteFileFormat(O,c.name)?B.isOffline()?B.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):B.parseFileData(O,mxUtils.bind(this,function(da){4==da.readyState&&(200<=da.status&&299>=da.status?f(da.responseText):k())}),c.name):k()}):K||k()}},function(C){k(C)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||-this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,k))};EditorUi.prototype.importFile=function(c,f,k,B,z,C,I,L,K,O,da,ea){O=null!=O?O:!0;var ca=!1,V=null,ma=mxUtils.bind(this,function(la){var Y=null;null!=la&&"<mxlibrary"==la.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,la,I)),this.showSidebar()):Y=this.importXml(la,k,B,O,null,null!=ea?mxEvent.isControlDown(ea):null);null!=L&&L(Y)});"image"==f.substring(0,5)?(K=!1,-"image/png"==f.substring(0,9)&&(da=da?null:this.extractGraphModelFromPng(c),null!=da&&0<da.length&&(V=this.importXml(da,k,B,O,null,null!=ea?mxEvent.isControlDown(ea):null),K=!0)),K||(K=this.editor.graph,da=c.indexOf(";"),0<da&&(c=c.substring(0,da)+c.substring(c.indexOf(",",da+1))),O&&K.isGridEnabled()&&(k=K.snap(k),B=K.snap(B)),da="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(da+="editableCssRules=.*;"),-V=[K.insertVertex(null,null,"",k,B,z,C,da+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ca=!0,this.importGraphML(c,ma)):null!=K&&null!=I&&EditorUi.isVisioFilename(I)?(ca=!0,this.importVisio(K,ma)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,f=mxUtils.bind(this,function(la){4==la.readyState&&(200<=la.status&&299>=la.status?ma(la.responseText):null!=L&&(L(null),this.showError(mxResources.get("error"),-413==la.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,I):this.parseFile(K,f,I)):0==c.indexOf("PK")&&null!=K?(ca=!0,this.importZipFile(K,ma,mxUtils.bind(this,function(){V=this.insertTextAt(this.validateFileData(c),k,B,!0,null,O);L(V)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(V=this.insertTextAt(this.validateFileData(c),k,B,!0,null,O,null,null!=ea?mxEvent.isControlDown(ea):null));ca||null==L||L(V);return V};EditorUi.prototype.importFiles=-function(c,f,k,B,z,C,I,L,K,O,da,ea,ca){B=null!=B?B:this.maxImageSize;O=null!=O?O:this.maxImageBytes;var V=null!=f&&null!=k,ma=!0;f=null!=f?f:0;k=null!=k?k:0;var la=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var Y=da||this.resampleThreshold,fa=0;fa<c.length;fa++)if("image/svg"!==c[fa].type.substring(0,9)&&"image/"===c[fa].type.substring(0,6)&&c[fa].size>Y){la=!0;break}var Z=mxUtils.bind(this,function(){var l=this.editor.graph,u=l.gridSize;z=null!=z?z:mxUtils.bind(this,function(ba,ja,oa,qa,ra,ua,za,-Ba,Ca){try{if(null!=ba&&"<mxlibrary"==ba.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,ba,za)),this.showSidebar(),null;this.isCompatibleString(ba)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(V=!1,qa=oa=0);return this.importFile(ba,ja,oa,qa,ra,ua,za,Ba,Ca,V,ea,ca)}catch(La){return this.handleError(La),null}});C=null!=C?C:mxUtils.bind(this,function(ba){l.setSelectionCells(ba)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var H=-c.length,U=H,J=[],W=mxUtils.bind(this,function(ba,ja){J[ba]=ja;if(0==--U){this.spinner.stop();if(null!=L)L(J);else{var oa=[];l.getModel().beginUpdate();try{for(ba=0;ba<J.length;ba++){var qa=J[ba]();null!=qa&&(oa=oa.concat(qa))}}finally{l.getModel().endUpdate()}}C(oa)}}),aa=0;aa<H;aa++)mxUtils.bind(this,function(ba){var ja=c[ba];if(null!=ja){var oa=new FileReader;oa.onload=mxUtils.bind(this,function(qa){if(null==I||I(ja))try{if("image/"==ja.type.substring(0,6))if("image/svg"==ja.type.substring(0,9)){var ra=-Graph.clipSvgDataUri(qa.target.result),ua=ra.indexOf(","),za=decodeURIComponent(escape(atob(ra.substring(ua+1)))),Ba=mxUtils.parseXml(za),Ca=Ba.getElementsByTagName("svg");if(0<Ca.length){var La=Ca[0],sa=ea?null:La.getAttribute("content");null!=sa&&"<"!=sa.charAt(0)&&"%"!=sa.charAt(0)&&(sa=unescape(window.atob?atob(sa):Base64.decode(sa,!0)));null!=sa&&"%"==sa.charAt(0)&&(sa=decodeURIComponent(sa));null==sa||"<mxfile "!==sa.substring(0,8)&&"<mxGraphModel "!==sa.substring(0,14)?W(ba,mxUtils.bind(this,-function(){try{if(null!=Ba){var Ka=Ba.getElementsByTagName("svg");if(0<Ka.length){var Ma=Ka[0],ya=Ma.getAttribute("width"),Wa=Ma.getAttribute("height");ya=null!=ya&&"%"!=ya.charAt(ya.length-1)?parseFloat(ya):NaN;Wa=null!=Wa&&"%"!=Wa.charAt(Wa.length-1)?parseFloat(Wa):NaN;var Ia=Ma.getAttribute("viewBox");if(null==Ia||0==Ia.length)Ma.setAttribute("viewBox","0 0 "+ya+" "+Wa);else if(isNaN(ya)||isNaN(Wa)){var Xa=Ia.split(" ");3<Xa.length&&(ya=parseFloat(Xa[2]),Wa=parseFloat(Xa[3]))}ra=Editor.createSvgDataUri(mxUtils.getXml(Ma));-var Pa=Math.min(1,Math.min(B/Math.max(1,ya)),B/Math.max(1,Wa)),t=z(ra,ja.type,f+ba*u,k+ba*u,Math.max(1,Math.round(ya*Pa)),Math.max(1,Math.round(Wa*Pa)),ja.name);if(null!=t&&(isNaN(ya)||isNaN(Wa))){var N=new Image;N.onload=mxUtils.bind(this,function(){ya=Math.max(1,N.width);Wa=Math.max(1,N.height);t[0].geometry.width=ya;t[0].geometry.height=Wa;Ma.setAttribute("viewBox","0 0 "+ya+" "+Wa);ra=Editor.createSvgDataUri(mxUtils.getXml(Ma));var Q=ra.indexOf(";");0<Q&&(ra=ra.substring(0,Q)+ra.substring(ra.indexOf(",",-Q+1)));l.setCellStyles("image",ra,[t[0]])});N.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}return t}}}catch(Q){}return null})):W(ba,mxUtils.bind(this,function(){return z(sa,"text/xml",f+ba*u,k+ba*u,0,0,ja.name)}))}else W(ba,mxUtils.bind(this,function(){return null}))}else{ua=!1;if("image/png"==ja.type){var Aa=ea?null:this.extractGraphModelFromPng(qa.target.result);if(null!=Aa&&0<Aa.length){var Ea=new Image;Ea.src=qa.target.result;W(ba,mxUtils.bind(this,function(){return z(Aa,"text/xml",f+ba*u,-k+ba*u,Ea.width,Ea.height,ja.name)}));ua=!0}}ua||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(qa.target.result,mxUtils.bind(this,function(Ka){this.resizeImage(Ka,qa.target.result,mxUtils.bind(this,function(Ma,ya,Wa){W(ba,mxUtils.bind(this,function(){if(null!=-Ma&&Ma.length<O){var Ia=ma&&this.isResampleImageSize(ja.size,da)?Math.min(1,Math.min(B/ya,B/Wa)):1;return z(Ma,ja.type,f+ba*u,k+ba*u,Math.round(ya*Ia),Math.round(Wa*Ia),ja.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),ma,B,da,ja.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else ra=qa.target.result,z(ra,ja.type,f+ba*u,k+ba*u,240,160,ja.name,function(Ka){W(ba,function(){return Ka})},ja)}catch(Ka){W(ba,-mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ka,ja)}else W(ba,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(ja.name)?z(null,ja.type,f+ba*u,k+ba*u,240,160,ja.name,function(qa){W(ba,function(){return qa})},ja):"image"==ja.type.substring(0,5)||"application/pdf"==ja.type?oa.readAsDataURL(ja):oa.readAsText(ja)}})(aa)});if(la){la=[];for(fa=0;fa<c.length;fa++)la.push(c[fa]);c=la;this.confirmImageResize(function(l){ma=l;Z()},K)}else Z()};EditorUi.prototype.isBlankFile=-function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},B=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,z=function(C,I){if(C||f)mxSettings.setResizeImages(C?I:null),mxSettings.save();k();c(I)};null==B||f?this.showDialog((new ConfirmDialog(this,-mxResources.get("resizeLargeImages"),function(C){z(C,!0)},function(C){z(C,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):z(!1,B)};EditorUi.prototype.parseFile=function(c,f,k){k=null!=k?k:c.name;var B=new FileReader;B.onload=mxUtils.bind(this,function(){this.parseFileData(B.result,-f,k)});B.readAsText(c)};EditorUi.prototype.parseFileData=function(c,f,k){var B=new XMLHttpRequest;B.open("POST",OPEN_URL);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");B.onreadystatechange=function(){f(B)};B.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>-f};EditorUi.prototype.resizeImage=function(c,f,k,B,z,C,I){z=null!=z?z:this.maxImageSize;var L=Math.max(1,c.width),K=Math.max(1,c.height),O=f;if(B&&this.isResampleImageSize(null!=I?I:f.length,C))try{var da=Math.max(L/z,K/z);if(1<da){var ea=Math.round(L/da),ca=Math.round(K/da),V=document.createElement("canvas");V.width=ea;V.height=ca;V.getContext("2d").drawImage(c,0,0,ea,ca);var ma=V.toDataURL();if(ma.length<f.length){var la=document.createElement("canvas");la.width=ea;la.height=ca;var Y=la.toDataURL();-ma!==Y&&(f=ma,L=ea,K=ca)}}}catch(fa){}B&&O!=f&&z>this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,k,B,z/1.5,C,I):k(f,L,K)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,k){try{var B=new Image;B.onload=function(){B.width=0<B.width?B.width:120;B.height=0<B.height?B.height:120;f(B)};null!=k&&(B.onerror=k);B.src=c}catch(z){if(null!=k)k(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=-function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var v=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());v.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?-mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,k=f.isEnabled;f.isEnabled=function(){return k.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(u){var H=u.getEvent();return null==u.getState()&&!mxEvent.isMouseEvent(H)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(H)&&-(null==u.getState()||mxEvent.isControlDown(H)||mxEvent.isShiftDown(H))});f.cellEditor.editPlantUmlData=function(u,H,U){var J=JSON.parse(U);H=new TextareaDialog(c,mxResources.get("plantUml")+":",J.data,function(W){null!=W&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(W,J.format,function(aa,ba,ja){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==J.format)f.labelChanged(u,"<pre>"+aa+"</pre>"),f.updateCellSize(u,!0);else{f.setCellStyles("image",c.convertDataUri(aa),-[u]);var oa=f.model.getGeometry(u);null!=oa&&(oa=oa.clone(),oa.width=ba,oa.height=ja,f.cellsResized([u],[oa],!1))}f.setAttributeForCell(u,"plantUmlData",JSON.stringify({data:W,format:J.format}))}finally{f.getModel().endUpdate()}},function(aa){c.handleError(aa)})},null,null,400,220);c.showDialog(H.container,420,300,!0,!0);H.init()};f.cellEditor.editMermaidData=function(u,H,U){var J=JSON.parse(U);H=new TextareaDialog(c,mxResources.get("mermaid")+":",J.data,function(W){null!=W&&c.spinner.spin(document.body,-mxResources.get("inserting"))&&c.generateMermaidImage(W,J.config,function(aa,ba,ja){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",aa,[u]);var oa=f.model.getGeometry(u);null!=oa&&(oa=oa.clone(),oa.width=Math.max(oa.width,ba),oa.height=Math.max(oa.height,ja),f.cellsResized([u],[oa],!1));f.setAttributeForCell(u,"mermaidData",JSON.stringify({data:W,config:J.config},null,2))}finally{f.getModel().endUpdate()}},function(aa){c.handleError(aa)})},null,null,400,220);c.showDialog(H.container,-420,300,!0,!0);H.init()};var B=f.cellEditor.startEditing;f.cellEditor.startEditing=function(u,H){try{var U=this.graph.getAttributeForCell(u,"plantUmlData");if(null!=U)this.editPlantUmlData(u,H,U);else if(U=this.graph.getAttributeForCell(u,"mermaidData"),null!=U&&window.isMermaidEnabled)this.editMermaidData(u,H,U);else{var J=f.getCellStyle(u);"1"==mxUtils.getValue(J,"metaEdit","0")?c.showDataDialog(u):B.apply(this,arguments)}}catch(W){c.handleError(W)}};f.getLinkTitle=function(u){return c.getLinkTitle(u)};-f.customLinkClicked=function(u,H){var U=!1;try{var J=this.getGraphBounds();c.handleCustomLink(u,H);U=!0;c.chromelessResize&&!J.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(H))}catch(W){c.handleError(W)}return U};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(u){var H=z.apply(this,arguments);null!=H&&null!=H.src&&Graph.isPageLink(H.src)&&(H={originalSrc:H.src});return H};var C=f.setBackgroundImage;f.setBackgroundImage=function(u){null!=u&&null!=u.originalSrc&&-(u=c.createImageForPageLink(u.originalSrc,c.currentPage,this));C.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(u,H){u=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=u){var U=u.indexOf(",");if(0<U)for(u=u.substring(U+1),H=H.getProperty("patches"),-U=0;U<H.length;U++)if(null!=H[U][EditorUi.DIFF_UPDATE]&&null!=H[U][EditorUi.DIFF_UPDATE][u]||null!=H[U][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(H[U][EditorUi.DIFF_REMOVE],u)){f.refreshBackgroundImage();break}}}));var I=f.getBackgroundImageObject;f.getBackgroundImageObject=function(u,H){var U=I.apply(this,arguments);null!=U&&null!=U.originalSrc&&(U=H?c.createImageForPageLink(U.originalSrc,null,null,!0):{src:U.originalSrc});return U};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=-"https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var L=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(u){u=null!=u?u:"";"1"==urlParams.dev&&(u+=(0<u.length?"&":"?")+"dev=1");return L.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(u,H,U){var J=H;H=function(W,aa,ba){if(null==aa){var ja=-mxEvent.getSource(W);"a"==ja.nodeName.toLowerCase()&&(aa=ja.getAttribute("href"))}null!=aa&&f.isCustomLink(aa)&&(mxEvent.isTouchEvent(W)||!mxEvent.isPopupTrigger(W))&&f.customLinkClicked(aa,ba)&&mxEvent.consume(W);null!=J&&J(W,aa,ba)};K.call(this,u,H,U)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var O=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(u,H,U){f.isSelectionEmpty()&&"simple"==-Editor.currentTheme&&this.addMenuItems(u,["zoomIn","zoomOut","-"],null,U);O.apply(this,arguments);f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(u,["-","addToScratchpad"],null,U);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(u,["-","exitGroup","home"],null,U)};var da=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(u,H,U){if(c.editor.graph.isSelectionEmpty())da.apply(this,arguments),c.menus.addMenuItems(u,["copyAsImage"],-null,U);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(u,H,U):this.addPopupMenuArrangeItems(u,H,U),this.addMenuItems(u,"- cut copy copyAsImage duplicate -".split(" "),null,U),this.isShowCellEditItems()||this.addPopupDeleteItem(u,H,U),this.addMenuItems(u,["lockUnlock","-"],null,U),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(H)&&f.isCellEditable(H)&&(this.addSubmenu("editCell",u,null,mxResources.get("edit")),u.addSeparator(),f.getModel().isEdge(H))){this.addSubmenu("line",-u);var J=f.getModel().getGeometry(H);null!=J&&null!=J.points&&0<J.points.length&&this.addMenuItems(u,["clearWaypoints"],null,U)}1==f.getSelectionCount()&&this.addMenuItems(u,["enterGroup"],null,U);J=c.getSelectionState();null!=J.mergeCell?this.addMenuItem(u,"mergeCells"):(1<J.style.colspan||1<J.style.rowspan)&&this.addMenuItem(u,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=-function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var ea=f.getExportVariables;f.getExportVariables=function(){var u=ea.apply(this,arguments),H=c.getCurrentFile();null!=H&&(u.filename=H.getTitle());u.pagecount=null!=c.pages?c.pages.length:1;u.page=null!=c.currentPage?c.currentPage.getName():"";u.pagenumber=null!=c.pages&&null!=c.currentPage?-mxUtils.indexOf(c.pages,c.currentPage)+1:1;return u};var ca=f.getGlobalVariable;f.getGlobalVariable=function(u){var H=c.getCurrentFile();return"filename"==u&&null!=H?H.getTitle():"page"==u&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==u?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==u?null!=c.pages?c.pages.length:1:ca.apply(this,arguments)};var V=null,ma=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var u=this.getCurrentFile(),-H=null!=u&&null!=u.getTitle()?u.getTitle():this.defaultFilename;V!=H&&u==ma&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),f.view.validate());V=H;ma=u}));var la=f.labelLinkClicked;f.labelLinkClicked=function(u,H,U){var J=H.getAttribute("href");if(null==J||!f.isCustomLink(J)||!mxEvent.isTouchEvent(U)&&mxEvent.isPopupTrigger(U))la.apply(this,arguments);else{if(!f.isEnabled()||null!=u&&f.isCellLocked(u.cell))f.customLinkClicked(J),f.getRubberband().reset();mxEvent.consume(U)}};this.editor.getOrCreateFilename=-function(){var u=c.defaultFilename,H=c.getCurrentFile();null!=H&&(u=null!=H.getTitle()?H.getTitle():u);return u};var Y=this.actions.get("print");Y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);Y.visible=Y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),-this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]=-"synchronize","1"==urlParams.embedInline&&f.addListener(mxEvent.ESCAPE,function(u,H){null!=H&&f.isEnabled()&&!f.isEditing()&&null!=H.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(u){var H=f.cellEditor.text2,-U=null;null!=H&&(mxEvent.addListener(H,"dragleave",function(J){null!=U&&(U.parentNode.removeChild(U),U=null);J.stopPropagation();J.preventDefault()}),mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(J){null==U&&(!mxClient.IS_IE||10<document.documentMode)&&(U=this.highlightElement(H));J.stopPropagation();J.preventDefault()})),mxEvent.addListener(H,"drop",mxUtils.bind(this,function(J){null!=U&&(U.parentNode.removeChild(U),U=null);if(0<J.dataTransfer.files.length)this.importFiles(J.dataTransfer.files,-0,0,this.maxImageSize,function(aa,ba,ja,oa,qa,ra){f.insertImage(aa,qa,ra)},function(){},function(aa){return"image/"==aa.type.substring(0,6)},function(aa){for(var ba=0;ba<aa.length;ba++)aa[ba]()},mxEvent.isControlDown(J));else if(0<=mxUtils.indexOf(J.dataTransfer.types,"text/uri-list")){var W=J.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(aa){var ba=Math.max(1,aa.width);aa=Math.max(1,aa.height);var ja=-this.maxImageSize;ja=Math.min(1,Math.min(ja/Math.max(1,ba)),ja/Math.max(1,aa));f.insertImage(decodeURIComponent(W),ba*ja,aa*ja)})):document.execCommand("insertHTML",!1,J.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(J.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,J.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(J.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,J.dataTransfer.getData("text/plain"));J.stopPropagation();J.preventDefault()})))}));-if(Editor.isSettingsEnabled()){Y=this.editor.graph.view;var fa=mxSettings.getUnit();Y.setUnit(fa);Editor.pageSizeUnit=fa==mxConstants.METERS?mxConstants.MILLIMETERS:fa;Y.addListener("unitChanged",function(u,H){u=H.getProperty("unit");mxSettings.setUnit(u);mxSettings.save();Editor.pageSizeUnit=u==mxConstants.METERS?mxConstants.MILLIMETERS:u});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?-null:new mxDualRuler(this,Y.unit);this.refresh()}if("1"==urlParams.styledev){Y=document.getElementById("geFooter");null!=Y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),-this.styleInput.value)})),Y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(u,H){0<this.editor.graph.getSelectionCount()?(u=this.editor.graph.getSelectionCell(),u=this.editor.graph.getModel().getStyle(u),this.styleInput.value=u||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var Z=this.isSelectionAllowed;this.isSelectionAllowed=function(u){return mxEvent.getSource(u)==this.styleInput?-!0:Z.apply(this,arguments)}}Y=document.getElementById("geInfo");null!=Y&&Y.parentNode.removeChild(Y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var l=null;mxEvent.addListener(f.container,"dragleave",function(u){f.isEnabled()&&(null!=l&&(l.parentNode.removeChild(l),l=null),u.stopPropagation(),u.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(u){null==l&&(!mxClient.IS_IE||10<document.documentMode)&&(l=this.highlightElement(f.container));-null!=this.sidebar&&this.sidebar.hideTooltip();u.stopPropagation();u.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(u){null!=l&&(l.parentNode.removeChild(l),l=null);if(f.isEnabled()){var H=mxUtils.convertPoint(f.container,mxEvent.getClientX(u),mxEvent.getClientY(u)),U=u.dataTransfer.files,J=f.view.translate,W=f.view.scale,aa=H.x/W-J.x,ba=H.y/W-J.y;if(0<U.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(u)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&-this.fileLoaded(null),this.openFiles(U,!0)):(mxEvent.isAltDown(u)&&(ba=aa=null),this.importFiles(U,aa,ba,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(u),null,null,mxEvent.isShiftDown(u),u));else{mxEvent.isAltDown(u)&&(ba=aa=0);var ja=0<=mxUtils.indexOf(u.dataTransfer.types,"text/uri-list")?u.dataTransfer.getData("text/uri-list"):null;H=this.extractGraphModelFromEvent(u,null!=this.pages);if(null!=H)f.setSelectionCells(this.importXml(H,aa,ba,!0));else if(0<=mxUtils.indexOf(u.dataTransfer.types,-"text/html")){var oa=u.dataTransfer.getData("text/html");H=document.createElement("div");H.innerHTML=Graph.sanitizeHtml(oa);var qa=null;U=H.getElementsByTagName("img");null!=U&&1==U.length?(oa=U[0].getAttribute("src"),null==oa&&(oa=U[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(oa)||(qa=!0)):(U=H.getElementsByTagName("a"),null!=U&&1==U.length?oa=U[0].getAttribute("href"):(H=H.getElementsByTagName("pre"),null!=H&&1==H.length&&(oa=mxUtils.getTextContent(H[0]))));var ra=!0,ua=mxUtils.bind(this,-function(){f.setSelectionCells(this.insertTextAt(oa,aa,ba,!0,qa,null,ra,mxEvent.isControlDown(u)))});qa&&null!=oa&&oa.length>this.resampleThreshold?this.confirmImageResize(function(za){ra=za;ua()},mxEvent.isControlDown(u)):ua()}else null!=ja&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)?this.loadImage(decodeURIComponent(ja),mxUtils.bind(this,function(za){var Ba=Math.max(1,za.width);za=Math.max(1,za.height);var Ca=this.maxImageSize;Ca=Math.min(1,Math.min(Ca/Math.max(1,Ba)),Ca/Math.max(1,za));f.setSelectionCell(f.insertVertex(null,-null,"",aa,ba,Ba*Ca,za*Ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ja+";"))}),mxUtils.bind(this,function(za){f.setSelectionCells(this.insertTextAt(ja,aa,ba,!0))})):0<=mxUtils.indexOf(u.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(u.dataTransfer.getData("text/plain"),aa,ba,!0))}}u.stopPropagation();u.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",-mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var u=parseInt(this.div.offsetLeft),H=-parseInt(this.div.offsetWidth),U=c.embedViewport.x+c.embedViewport.width,J=parseInt(this.div.offsetTop),W=parseInt(this.div.offsetHeight),aa=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(u,U-H))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(J,aa-W))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};-if(!this.editor.chromeless||this.editor.editable)if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme)Y=Editor.currentTheme,Editor.currentTheme="",this.doSetCurrentTheme(Y,mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}));Y=!1;null!=urlParams.dark?Y=urlParams.dark:-(Y="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||Y&&"auto"!=mxSettings.settings.darkMode||(Y=mxSettings.settings.darkMode));"auto"==Y&&this.isAutoDarkModeSupported()&&(Y=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof Y?"1"==Y:Y);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(u){this.isAutoDarkMode()&&this.setDarkMode(u.matches)}))}catch(u){this.actions.get("autoMode").setEnabled(!1)}"1"==-urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(u,H){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&-c.editor.loadFonts()};var A=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=-c}A.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,B=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(O){mxEvent.getSource(O)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var z=-document.createElement("div");z.style.position="absolute";z.style.width="10px";z.style.height="10px";z.style.borderRadius="5px";z.style.border="1px solid gray";z.style.background="#ffffff";z.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(z);this.bottomResizer=z;var C=null,I=null,L=null,K=null;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(O){K=parseInt(this.diagramContainer.style.height);I=mxEvent.getClientY(O);B.popupMenuHandler.hideMenu();mxEvent.consume(O)}));-z=z.cloneNode(!1);z.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(z);this.rightResizer=z;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(O){L=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(O);B.popupMenuHandler.hideMenu();mxEvent.consume(O)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(O){var da=!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,L+mxEvent.getClientX(O)-C)+"px",da=!0);null!=I&&(this.diagramContainer.style.height=-Math.max(20,K+mxEvent.getClientY(O)-I)+"px",da=!0);da&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(O){null==C&&null==I||mxEvent.consume(O);I=C=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=-"hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";k.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(O){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(O){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=-"hidden";f.style.visibility="hidden";c.style.visibility="hidden";k.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var k=f.clipboardData||f.originalEvent.clipboardData,B=!1,z=0;z<k.types.length;z++)if("text/"===k.types[z].substring(0,5)){B=!0;break}if(!B){var C=-k.items;for(index in C){var I=C[index];if("file"===I.kind){if(c.isEditing())this.importFiles([I.getAsFile()],0,0,this.maxImageSize,function(K,O,da,ea,ca,V){c.insertImage(K,ca,V)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var O=0;O<K.length;O++)K[O]()});else{var L=this.editor.graph.getInsertPoint();this.importFiles([I.getAsFile()],L.x,L.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){k.innerHTML=-" ";k.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow=-"hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML=" ";var B=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var I=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||-f.isEditing()||null!=this.dialog||"INPUT"==I.nodeName||"TEXTAREA"==I.nodeName||"true"==I.contentEditable||224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||B||(k.style.left=f.container.scrollLeft+10+"px",k.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,I=f.container.scrollTop,f.container.appendChild(k),B=!0,k.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=I)}));mxEvent.addListener(document,-"keyup",mxUtils.bind(this,function(C){var I=C.keyCode;window.setTimeout(mxUtils.bind(this,function(){!B||224!=I&&17!=I&&91!=I&&93!=I||(B=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k),c()}catch(I){this.handleError(I)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),-this.copyCells(k,!0),c()}catch(I){this.handleError(I)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(C){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(k.innerHTML=" ",k.focus(),null!=C.clipboardData&&(Graph.removePasteFormatting(k.firstChild),this.pasteCells(C,k,!0,!0)),!mxEvent.isConsumed(C)){var I=f.container.scrollLeft,L=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=I,f.container.scrollTop=L,Graph.removePasteFormatting(k.firstChild),-this.pasteCells(C,k,!1,!0)}catch(K){this.handleError(K)}}),0)}}catch(K){this.handleError(K)}}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==k?!0:z.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=-function(c,f){function k(L){return"simple"==L||"sketch"==L}var B=Editor.currentTheme,z=k(B)&&this.isDefaultTheme(c)||this.isDefaultTheme(B)&&k(c),C=z&&"sketch"!=c&&"sketch"!=B;if(z&&!this.themeSwitching){var I=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=c;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,function(){k(B)&&this.isDefaultTheme(c)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="block",-this.tabContainer.style.display="flex",this.hsplit.style.display="block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(B)&&k(c)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=c?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display="flex");this.switchTheme(c);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));-this.editor.graph.refresh();this.restoreScrollState(I);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&k(c)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=f&&f()}),0)}return C};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate,f=this.diagramContainer.scrollLeft,k=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(f-=this.embedViewport.x,k-=this.embedViewport.y):-(f+=this.embedViewport.x,k+=this.embedViewport.y));return{x:f,y:k,tx:c.x,ty:c.y}};EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,k=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=c.x+(k.x-c.tx)*f;this.diagramContainer.scrollTop=c.y+(k.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&-""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var k=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var B=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=B&&null!=B.getAttribute("class");if(!f&&null!=B){B=-B.getAttribute("title");var z=this.getCurrentFile();z=null!=z?z.savingStatusKey:DrawioFile.prototype.savingStatusKey;B==mxResources.get(z)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(z))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";B=32>=c.clientWidth;c.style.visibility=B&&""==this.editor.getStatus()?"hidden":"";if(B||f)this.statusContainer.style.display="inline-flex",f=!0}else"simple"==Editor.currentTheme?-(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",k);k()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=-this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);-this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);this.sidebarContainer.style.display="";if("sketch"==c){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var f=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);this.createShapesWindow();this.sidebarContainer.className="";this.sidebarContainer.style.position=-"absolute";this.sidebarContainer.style.left="0px";this.sidebarContainer.style.top="0px";this.sidebarContainer.style.bottom=f?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(c=this.isDefaultTheme(c)||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));-null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=-null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&-(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=-Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.switchCssForTheme=function(c){};-EditorUi.prototype.createWrapperForTheme=function(c){null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.createFooterMenuForTheme=-function(c){};EditorUi.prototype.createPickerMenuForTheme=function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&-(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent=-"",this.statusContainer.style.opacity="",this.menubar.container.appendChild(this.statusContainer));null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);c=this.menubar.langIcon;null!=c&&(c.style.position="absolute",c.style.height="18px",c.style.width="18px",c.style.flexShrink="",c.style.opacity="",this.menubarContainer.parentNode.insertBefore(c,this.menubarContainer));null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};-EditorUi.prototype.createMenu=function(c,f,k,B){k=null!=k?k:"geToolbarButton";var z=this.menus.get(c);B=this.menubar.addMenu(mxResources.get(c),z.funct,null,B);B.className=k;B.style.display="inline-block";B.style.cursor="pointer";B.style.height="24px";B.setAttribute("title",mxResources.get(c));this.menus.menuCreated(z,B,k);null!=f&&(B.style.backgroundImage="url("+f+")",B.style.backgroundPosition="center center",B.style.backgroundRepeat="no-repeat",B.style.backgroundSize="100% 100%",B.style.width=-"24px",B.innerText="");return B};EditorUi.prototype.createToolbarButton=function(c,f,k,B){B=null!=B?B:24;var z=document.createElement("a");z.className="geToolbarButton geAdaptiveAsset";z.setAttribute("title",f);z.style.backgroundImage="url("+c+")";z.style.backgroundPosition="center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="100% 100%";z.style.display="inline-block";z.style.cursor="pointer";z.style.marginLeft="6px";z.style.width=B+"px";z.style.height=B+"px";z.style.flexShrink=-"0";z.style.flexGrow="0";null!=k&&(mxEvent.addListener(z,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()})),mxEvent.addListener(z,"click",function(C){"disabled"!=z.getAttribute("disabled")&&k(C);mxEvent.consume(C)}));return z};EditorUi.prototype.createMenuItem=function(c,f,k){var B=this.actions.get(c),z=null!=B?B.funct:null,C=this.createToolbarButton(f,mxResources.get(c)+(null!=B&&null!=B.shortcut?" ("+B.shortcut+")":""),z);null==B||k||(c=function(){B.isEnabled()?-(C.removeAttribute("disabled"),C.style.cursor="pointer"):(C.setAttribute("disabled","disabled"),C.style.cursor="default");C.style.opacity=B.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),B.addListener("stateChanged",c),c());return C};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight--10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,f,mxUtils.bind(this,function(z){z.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var k=this.formatWindow.window.toggleMinimized,B=240;this.formatWindow.window.toggleMinimized=function(){k.apply(this,arguments);this.minimized?(B=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",-this.div.style.left=parseInt(this.div.style.left)+B-140+"px"):(this.div.style.width=B+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-B+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(z){mxEvent.getSource(z)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?-(c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>c)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var G=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):G.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=-function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=this.defaultSidebarWidth);var k=this.hsplitPosition,B=mxUtils.bind(this,function(){this.hsplitPosition=z;this.refresh();this.diagramContainer.scrollLeft-=k-this.hsplitPosition}),z=c?f:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==z?"translateX(0)":"translateX(-100%)");0!=z&&B();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",-0==z?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==z&&B()}),-300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var S=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():S.apply(this,arguments)};var F=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=null!=c?c:!0;if("1"!=urlParams.embedInline){var f=this.container.clientWidth;this.container==-document.body&&(f=document.body.clientWidth||document.documentElement.clientWidth);var k=this.getDiagramContainerOffset();var B=k.x;var z=k.y;"simple"==Editor.currentTheme&&(z+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=z+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,f=Math.max(0,-Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,f-this.splitSize-40))),this.sidebarContainer.style.width=f+"px",this.diagramContainer.style.left=f+B+"px",this.tabContainer.style.left=f+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=f+"px",this.diagramContainer.style.right=this.formatWidth+"px",-this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=k.x+"px",this.diagramContainer.style.right="0")}c&&this.editor.graph.sizeDidChange()}else F.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,function(B){B=this.createMenu(B,null,"geTitle");B.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";-c.appendChild(B);return B});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;",f.className="geTitle",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,-"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.borderLeftStyle="solid",mxUtils.write(f,mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var k=f("newLibrary");k.style.fontSize="11px";k.style.left="0";k=f("openLibraryFrom");k.style.borderLeftStyle="solid";k.style.fontSize="11px";k.style.left="50%"}c.appendChild(this.sidebarContainer);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=-function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),k="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),k&&"1"!=urlParams.embedInline?66:10,k&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,c-6,f-6,mxUtils.bind(this,function(B){this.createShapesPanel(B)}));+c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=+l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,N){StorageFile.listFiles(this,"F",F,N)});window.openBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.getFileContent(this,F,N,K)});window.deleteBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.deleteFile(this,F,N,K)});if(!f){var t=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));+window.openFile.setConsumer(mxUtils.bind(this,function(F,N){null!=N&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(N)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,mxUtils.bind(this,function(K){this.importXml(K,0,0,!0)}),null,N)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,C=z.close;+this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=t;C.apply(z,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,l){var t=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))l();else{var F=0,N,K=!1;C.forEach(function(I,ca){I=ca.name.toLowerCase();"diagram/diagram.xml"==I?(K=!0,ca.async("string").then(function(da){0==+da.indexOf("<mxfile ")?f(da):l()})):0==I.indexOf("versions/")&&(I=parseInt(I.substr(9)),I>F&&(F=I,N=ca))});0<F?N.async("string").then(function(I){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(I,c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(I,mxUtils.bind(this,function(ca){4==ca.readyState&&(200<=ca.status&&299>=ca.status?f(ca.responseText):l())}),c.name):l()}):K||l()}},function(C){l(C)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||+this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,z,C,F,N,K,I,ca,da){I=null!=I?I:!0;var ea=!1,X=null,ba=mxUtils.bind(this,function(ha){var ma=null;null!=ha&&"<mxlibrary"==ha.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ha,F)),this.showSidebar()):ma=this.importXml(ha,l,t,I,null,null!=da?mxEvent.isControlDown(da):null);null!=N&&N(ma)});"image"==f.substring(0,5)?(K=+!1,"image/png"==f.substring(0,9)&&(ca=ca?null:this.extractGraphModelFromPng(c),null!=ca&&0<ca.length&&(X=this.importXml(ca,l,t,I,null,null!=da?mxEvent.isControlDown(da):null),K=!0)),K||(K=this.editor.graph,ca=c.indexOf(";"),0<ca&&(c=c.substring(0,ca)+c.substring(c.indexOf(",",ca+1))),I&&K.isGridEnabled()&&(l=K.snap(l),t=K.snap(t)),ca="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(ca+="editableCssRules=.*;"),+X=[K.insertVertex(null,null,"",l,t,z,C,ca+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ea=!0,this.importGraphML(c,ba)):null!=K&&null!=F&&EditorUi.isVisioFilename(F)?(ea=!0,this.importVisio(K,ba)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ea=!0,f=mxUtils.bind(this,function(ha){4==ha.readyState&&(200<=ha.status&&299>=ha.status?ba(ha.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),+413==ha.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,F):this.parseFile(K,f,F)):0==c.indexOf("PK")&&null!=K?(ea=!0,this.importZipFile(K,ba,mxUtils.bind(this,function(){X=this.insertTextAt(this.validateFileData(c),l,t,!0,null,I);N(X)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(X=this.insertTextAt(this.validateFileData(c),l,t,!0,null,I,null,null!=da?mxEvent.isControlDown(da):null));ea||null==N||N(X);return X};EditorUi.prototype.importFiles=+function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){t=null!=t?t:this.maxImageSize;I=null!=I?I:this.maxImageBytes;var X=null!=f&&null!=l,ba=!0;f=null!=f?f:0;l=null!=l?l:0;var ha=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var ma=ca||this.resampleThreshold,Y=0;Y<c.length;Y++)if("image/svg"!==c[Y].type.substring(0,9)&&"image/"===c[Y].type.substring(0,6)&&c[Y].size>ma){ha=!0;break}var la=mxUtils.bind(this,function(){var Z=this.editor.graph,k=Z.gridSize;z=null!=z?z:mxUtils.bind(this,function(W,aa,ja,pa,sa,qa,wa,Ba,za){try{if(null!=+W&&"<mxlibrary"==W.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,W,wa)),this.showSidebar(),null;this.isCompatibleString(W)&&1==c.length&&null!=ea&&"drop"==ea.type&&this.isBlankFile()&&!this.canUndo()&&(X=!1,pa=ja=0);return this.importFile(W,aa,ja,pa,sa,qa,wa,Ba,za,X,da,ea)}catch(Ea){return this.handleError(Ea),null}});C=null!=C?C:mxUtils.bind(this,function(W){Z.setSelectionCells(W)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=c.length,+J=A,U=[],P=mxUtils.bind(this,function(W,aa){U[W]=aa;if(0==--J){this.spinner.stop();if(null!=N)N(U);else{var ja=[];Z.getModel().beginUpdate();try{for(W=0;W<U.length;W++){var pa=U[W]();null!=pa&&(ja=ja.concat(pa))}}finally{Z.getModel().endUpdate()}}C(ja)}}),T=0;T<A;T++)mxUtils.bind(this,function(W){var aa=c[W];if(null!=aa){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(pa){if(null==F||F(aa))try{if("image/"==aa.type.substring(0,6))if("image/svg"==aa.type.substring(0,9)){var sa=Graph.clipSvgDataUri(pa.target.result),+qa=sa.indexOf(","),wa=decodeURIComponent(escape(atob(sa.substring(qa+1)))),Ba=mxUtils.parseXml(wa),za=Ba.getElementsByTagName("svg");if(0<za.length){var Ea=za[0],ra=da?null:Ea.getAttribute("content");null!=ra&&"<"!=ra.charAt(0)&&"%"!=ra.charAt(0)&&(ra=unescape(window.atob?atob(ra):Base64.decode(ra,!0)));null!=ra&&"%"==ra.charAt(0)&&(ra=decodeURIComponent(ra));null==ra||"<mxfile "!==ra.substring(0,8)&&"<mxGraphModel "!==ra.substring(0,14)?P(W,mxUtils.bind(this,function(){try{if(null!=Ba){var Ma=Ba.getElementsByTagName("svg");+if(0<Ma.length){var Ha=Ma[0],Aa=Ha.getAttribute("width"),Ra=Ha.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;Ra=null!=Ra&&"%"!=Ra.charAt(Ra.length-1)?parseFloat(Ra):NaN;var Za=Ha.getAttribute("viewBox");if(null==Za||0==Za.length)Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);else if(isNaN(Aa)||isNaN(Ra)){var La=Za.split(" ");3<La.length&&(Aa=parseFloat(La[2]),Ra=parseFloat(La[3]))}sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var $a=Math.min(1,Math.min(t/Math.max(1,+Aa)),t/Math.max(1,Ra)),Da=z(sa,aa.type,f+W*k,l+W*k,Math.max(1,Math.round(Aa*$a)),Math.max(1,Math.round(Ra*$a)),aa.name);if(null!=Da&&(isNaN(Aa)||isNaN(Ra))){var x=new Image;x.onload=mxUtils.bind(this,function(){Aa=Math.max(1,x.width);Ra=Math.max(1,x.height);Da[0].geometry.width=Aa;Da[0].geometry.height=Ra;Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var M=sa.indexOf(";");0<M&&(sa=sa.substring(0,M)+sa.substring(sa.indexOf(",",M+1)));Z.setCellStyles("image",+sa,[Da[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}return Da}}}catch(M){}return null})):P(W,mxUtils.bind(this,function(){return z(ra,"text/xml",f+W*k,l+W*k,0,0,aa.name)}))}else P(W,mxUtils.bind(this,function(){return null}))}else{qa=!1;if("image/png"==aa.type){var ya=da?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ya&&0<ya.length){var Ca=new Image;Ca.src=pa.target.result;P(W,mxUtils.bind(this,function(){return z(ya,"text/xml",f+W*k,l+W*k,Ca.width,Ca.height,aa.name)}));+qa=!0}}qa||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(pa.target.result,mxUtils.bind(this,function(Ma){this.resizeImage(Ma,pa.target.result,mxUtils.bind(this,function(Ha,Aa,Ra){P(W,mxUtils.bind(this,function(){if(null!=Ha&&Ha.length<I){var Za=ba&&this.isResampleImageSize(aa.size,+ca)?Math.min(1,Math.min(t/Aa,t/Ra)):1;return z(Ha,aa.type,f+W*k,l+W*k,Math.round(Aa*Za),Math.round(Ra*Za),aa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),ba,t,ca,aa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=pa.target.result,z(sa,aa.type,f+W*k,l+W*k,240,160,aa.name,function(Ma){P(W,function(){return Ma})},aa)}catch(Ma){P(W,mxUtils.bind(this,function(){return null})),null!=window.console&&+console.error(Ma,aa)}else P(W,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(aa.name)?z(null,aa.type,f+W*k,l+W*k,240,160,aa.name,function(pa){P(W,function(){return pa})},aa):"image"==aa.type.substring(0,5)||"application/pdf"==aa.type?ja.readAsDataURL(aa):ja.readAsText(aa)}})(T)});if(ha){ha=[];for(Y=0;Y<c.length;Y++)ha.push(c[Y]);c=ha;this.confirmImageResize(function(Z){ba=Z;la()},K)}else la()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&+this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,z=function(C,F){if(C||f)mxSettings.setResizeImages(C?F:null),mxSettings.save();l();c(F)};null==t||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(C){z(C,+!0)},function(C){z(C,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):z(!1,t)};EditorUi.prototype.parseFile=function(c,f,l){l=null!=l?l:c.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,f,l)});t.readAsText(c)};EditorUi.prototype.parseFileData=+function(c,f,l){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){f(t)};t.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,t,z,C,+F){z=null!=z?z:this.maxImageSize;var N=Math.max(1,c.width),K=Math.max(1,c.height),I=f;if(t&&this.isResampleImageSize(null!=F?F:f.length,C))try{var ca=Math.max(N/z,K/z);if(1<ca){var da=Math.round(N/ca),ea=Math.round(K/ca),X=document.createElement("canvas");X.width=da;X.height=ea;X.getContext("2d").drawImage(c,0,0,da,ea);var ba=X.toDataURL();if(ba.length<f.length){var ha=document.createElement("canvas");ha.width=da;ha.height=ea;var ma=ha.toDataURL();ba!==ma&&(f=ba,N=da,K=ea)}}}catch(Y){}t&&I!=f&&z>+this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,l,t,z/1.5,C,F):l(f,N,K)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,l){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;f(t)};null!=l&&(t.onerror=l);t.src=c}catch(z){if(null!=l)l(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=+(null!=urlParams.rough?urlParams.rough:c)};var u=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());u.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};+var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,l=f.isEnabled;f.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(k){var A=k.getEvent();return null==k.getState()&&!mxEvent.isMouseEvent(A)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(A)&&(null==k.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))});+f.cellEditor.editPlantUmlData=function(k,A,J){var U=JSON.parse(J);A=new TextareaDialog(c,mxResources.get("plantUml")+":",U.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(P,U.format,function(T,W,aa){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==U.format)f.labelChanged(k,"<pre>"+T+"</pre>"),f.updateCellSize(k,!0);else{f.setCellStyles("image",c.convertDataUri(T),[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=+W,ja.height=aa,f.cellsResized([k],[ja],!1))}f.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:P,format:U.format}))}finally{f.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};f.cellEditor.editMermaidData=function(k,A,J){var U=JSON.parse(J);A=new TextareaDialog(c,mxResources.get("mermaid")+":",U.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(P,U.config,+function(T,W,aa){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",T,[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=Math.max(ja.width,W),ja.height=Math.max(ja.height,aa),f.cellsResized([k],[ja],!1));f.setAttributeForCell(k,"mermaidData",JSON.stringify({data:P,config:U.config},null,2))}finally{f.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=+function(k,A){try{var J=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=J)this.editPlantUmlData(k,A,J);else if(J=this.graph.getAttributeForCell(k,"mermaidData"),null!=J&&window.isMermaidEnabled)this.editMermaidData(k,A,J);else{var U=f.getCellStyle(k);"1"==mxUtils.getValue(U,"metaEdit","0")?c.showDataDialog(k):t.apply(this,arguments)}}catch(P){c.handleError(P)}};f.getLinkTitle=function(k){return c.getLinkTitle(k)};f.customLinkClicked=function(k,A){var J=!1;try{var U=this.getGraphBounds();+c.handleCustomLink(k,A);J=!0;c.chromelessResize&&!U.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(A))}catch(P){c.handleError(P)}return J};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(k){var A=z.apply(this,arguments);null!=A&&null!=A.src&&Graph.isPageLink(A.src)&&(A={originalSrc:A.src});return A};var C=f.setBackgroundImage;f.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));C.apply(this,+arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,A){k=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=k){var J=k.indexOf(",");if(0<J)for(k=k.substring(J+1),A=A.getProperty("patches"),J=0;J<A.length;J++)if(null!=A[J][EditorUi.DIFF_UPDATE]&&null!=A[J][EditorUi.DIFF_UPDATE][k]||+null!=A[J][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(A[J][EditorUi.DIFF_REMOVE],k)){f.refreshBackgroundImage();break}}}));var F=f.getBackgroundImageObject;f.getBackgroundImageObject=function(k,A){var J=F.apply(this,arguments);null!=J&&null!=J.originalSrc&&(J=A?c.createImageForPageLink(J.originalSrc,null,null,!0):{src:J.originalSrc});return J};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");+if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(k,A,J){var U=A;A=function(P,T,W){if(null==T){var aa=mxEvent.getSource(P);"a"==aa.nodeName.toLowerCase()&&(T=aa.getAttribute("href"))}null!=+T&&f.isCustomLink(T)&&(mxEvent.isTouchEvent(P)||!mxEvent.isPopupTrigger(P))&&f.customLinkClicked(T,W)&&mxEvent.consume(P);null!=U&&U(P,T,W)};K.call(this,k,A,J)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var I=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,A,J){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,J);I.apply(this,arguments);+f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,J);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,J)};var ca=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,A,J){if(c.editor.graph.isSelectionEmpty())ca.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,J);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,A,J):this.addPopupMenuArrangeItems(k,+A,J),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,J),this.isShowCellEditItems()||this.addPopupDeleteItem(k,A,J),this.addMenuItems(k,["lockUnlock","-"],null,J),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(A)&&f.isCellEditable(A)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),f.getModel().isEdge(A))){this.addSubmenu("line",k);var U=f.getModel().getGeometry(A);null!=U&&null!=U.points&&0<U.points.length&&this.addMenuItems(k,+["clearWaypoints"],null,J)}1==f.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,J);U=c.getSelectionState();null!=U.mergeCell?this.addMenuItem(k,"mergeCells"):(1<U.style.colspan||1<U.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;+this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var da=f.getExportVariables;f.getExportVariables=function(){var k=da.apply(this,arguments),A=c.getCurrentFile();null!=A&&(k.filename=A.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var ea=f.getGlobalVariable;f.getGlobalVariable=+function(k){var A=c.getCurrentFile();return"filename"==k&&null!=A?A.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:ea.apply(this,arguments)};var X=null,ba=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),A=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;X!=A&&k==ba&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),+f.view.validate());X=A;ba=k}));var ha=f.labelLinkClicked;f.labelLinkClicked=function(k,A,J){var U=A.getAttribute("href");if(null==U||!f.isCustomLink(U)||!mxEvent.isTouchEvent(J)&&mxEvent.isPopupTrigger(J))ha.apply(this,arguments);else{if(!f.isEnabled()||null!=k&&f.isCellLocked(k.cell))f.customLinkClicked(U),f.getRubberband().reset();mxEvent.consume(J)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,A=c.getCurrentFile();null!=A&&(k=null!=A.getTitle()?A.getTitle():k);return k};+var ma=this.actions.get("print");ma.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ma.visible=ma.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,+!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&f.addListener(mxEvent.ESCAPE,function(k,A){null!=A&&f.isEnabled()&&!f.isEditing()&&null!=+A.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var A=f.cellEditor.text2,J=null;null!=A&&(mxEvent.addListener(A,"dragleave",function(U){null!=J&&(J.parentNode.removeChild(J),J=null);U.stopPropagation();+U.preventDefault()}),mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(U){null==J&&(!mxClient.IS_IE||10<document.documentMode)&&(J=this.highlightElement(A));U.stopPropagation();U.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(U){null!=J&&(J.parentNode.removeChild(J),J=null);if(0<U.dataTransfer.files.length)this.importFiles(U.dataTransfer.files,0,0,this.maxImageSize,function(T,W,aa,ja,pa,sa){f.insertImage(T,pa,sa)},function(){},function(T){return"image/"==T.type.substring(0,+6)},function(T){for(var W=0;W<T.length;W++)T[W]()},mxEvent.isControlDown(U));else if(0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")){var P=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(T){var W=Math.max(1,T.width);T=Math.max(1,T.height);var aa=this.maxImageSize;aa=Math.min(1,Math.min(aa/Math.max(1,W)),aa/Math.max(1,T));f.insertImage(decodeURIComponent(P),W*aa,T*aa)})):document.execCommand("insertHTML",+!1,U.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(U.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(U.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/plain"));U.stopPropagation();U.preventDefault()})))}));if(Editor.isSettingsEnabled()){ma=this.editor.graph.view;var Y=mxSettings.getUnit();ma.setUnit(Y);Editor.pageSizeUnit=Y==mxConstants.METERS?mxConstants.MILLIMETERS:+Y;ma.addListener("unitChanged",function(k,A){k=A.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ma.unit);this.refresh()}if("1"==urlParams.styledev){ma=document.getElementById("geFooter");null!=ma&&(this.styleInput=document.createElement("input"),+this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),ma.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,+mxUtils.bind(this,function(k,A){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var la=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?!0:la.apply(this,arguments)}}ma=document.getElementById("geInfo");null!=ma&&ma.parentNode.removeChild(ma);if(Graph.fileSupport&&+(!this.editor.chromeless||this.editor.editable)){var Z=null;mxEvent.addListener(f.container,"dragleave",function(k){f.isEnabled()&&(null!=Z&&(Z.parentNode.removeChild(Z),Z=null),k.stopPropagation(),k.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(k){null==Z&&(!mxClient.IS_IE||10<document.documentMode)&&(Z=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(f.container,+"drop",mxUtils.bind(this,function(k){null!=Z&&(Z.parentNode.removeChild(Z),Z=null);if(f.isEnabled()){var A=mxUtils.convertPoint(f.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),J=k.dataTransfer.files,U=f.view.translate,P=f.view.scale,T=A.x/P-U.x,W=A.y/P-U.y;if(0<J.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(J,!0)):(mxEvent.isAltDown(k)&&(W=T=null),this.importFiles(J,T,W,this.maxImageSize,+null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(W=T=0);var aa=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;A=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=A)f.setSelectionCells(this.importXml(A,T,W,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var ja=k.dataTransfer.getData("text/html");A=document.createElement("div");A.innerHTML=Graph.sanitizeHtml(ja);+var pa=null;J=A.getElementsByTagName("img");null!=J&&1==J.length?(ja=J[0].getAttribute("src"),null==ja&&(ja=J[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)||(pa=!0)):(J=A.getElementsByTagName("a"),null!=J&&1==J.length?ja=J[0].getAttribute("href"):(A=A.getElementsByTagName("pre"),null!=A&&1==A.length&&(ja=mxUtils.getTextContent(A[0]))));var sa=!0,qa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ja,T,W,!0,pa,null,sa,mxEvent.isControlDown(k)))});pa&&null!=+ja&&ja.length>this.resampleThreshold?this.confirmImageResize(function(wa){sa=wa;qa()},mxEvent.isControlDown(k)):qa()}else null!=aa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(wa){var Ba=Math.max(1,wa.width);wa=Math.max(1,wa.height);var za=this.maxImageSize;za=Math.min(1,Math.min(za/Math.max(1,Ba)),za/Math.max(1,wa));f.setSelectionCell(f.insertVertex(null,null,"",T,W,Ba*za,wa*za,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="++aa+";"))}),mxUtils.bind(this,function(wa){f.setSelectionCells(this.insertTextAt(aa,T,W,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),T,W,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();+this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),A=parseInt(this.div.offsetWidth),J=c.embedViewport.x+c.embedViewport.width,U=parseInt(this.div.offsetTop),P=parseInt(this.div.offsetHeight),+T=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,J-A))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(U,T-P))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ma=Editor.currentTheme,"simple"==ma||"sketch"==ma)Editor.currentTheme="",this.doSetCurrentTheme(ma,+mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);ma=!1;null!=urlParams.dark?ma=urlParams.dark:(ma="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ma&&"auto"!=mxSettings.settings.darkMode||(ma=mxSettings.settings.darkMode));"auto"==ma&&+this.isAutoDarkModeSupported()&&(ma=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof ma?"1"==ma:ma);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&+null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(k,A){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts()};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==+Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=+this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(I){mxEvent.getSource(I)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(I),mxEvent.getClientY(I)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var z=document.createElement("div");z.style.position="absolute";z.style.width="10px";z.style.height="10px";z.style.borderRadius=+"5px";z.style.border="1px solid gray";z.style.background="#ffffff";z.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(z);this.bottomResizer=z;var C=null,F=null,N=null,K=null;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(I){K=parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(I);t.popupMenuHandler.hideMenu();mxEvent.consume(I)}));z=z.cloneNode(!1);z.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(z);this.rightResizer=z;mxEvent.addGestureListeners(z,+mxUtils.bind(this,function(I){N=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(I);t.popupMenuHandler.hideMenu();mxEvent.consume(I)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(I){var ca=!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(I)-C)+"px",ca=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,K+mxEvent.getClientY(I)-F)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",+fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(I){null==C&&null==F||mxEvent.consume(I);F=C=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";+this.addListener("editInlineStart",mxUtils.bind(this,function(I){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(I){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,+function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var l=f.clipboardData||f.originalEvent.clipboardData,t=!1,z=0;z<l.types.length;z++)if("text/"===l.types[z].substring(0,5)){t=!0;break}if(!t){var C=l.items;for(index in C){var F=C[index];if("file"===F.kind){if(c.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,+function(K,I,ca,da,ea,X){c.insertImage(K,ea,X)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var I=0;I<K.length;I++)K[I]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML=" ";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,+l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize=+"none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML=" ";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var F=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||"true"==F.contentEditable||+224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||t||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,F=f.container.scrollTop,f.container.appendChild(l),t=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=F)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(C){var F=C.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||+224!=F&&17!=F&&91!=F&&93!=F||(t=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l),c()}catch(F){this.handleError(F)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l,!0),c()}catch(F){this.handleError(F)}}));+mxEvent.addListener(l,"paste",mxUtils.bind(this,function(C){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML=" ",l.focus(),null!=C.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(C,l,!0,!0)),!mxEvent.isConsumed(C)){var F=f.container.scrollLeft,N=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=F,f.container.scrollTop=N,Graph.removePasteFormatting(l.firstChild),this.pasteCells(C,l,!1,!0)}catch(K){this.handleError(K)}}),+0)}}catch(K){this.handleError(K)}}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==l?!0:z.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,f,l){function t(N){return"simple"==+N||"sketch"==N}var z=Editor.currentTheme,C="simple"==z&&this.isDefaultTheme(c)||this.isDefaultTheme(z)&&"simple"==c;if((C||l)&&!this.themeSwitching){var F=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=c;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,function(){t(z)&&this.isDefaultTheme(c)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="",this.tabContainer.style.display="",this.hsplit.style.display=+"block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(z)&&t(c)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=c?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display="");this.switchTheme(c);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();+this.restoreScrollState(F);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&t(c)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=f&&f()}),0)}return C};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate,f=this.diagramContainer.scrollLeft,l=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(f-=this.embedViewport.x,l-=this.embedViewport.y):(f+=this.embedViewport.x,+l+=this.embedViewport.y));return{x:f,y:l,tx:c.x,ty:c.y}};EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,l=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*f;this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&+(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var t=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=t&&null!=t.getAttribute("class");if(!f&&null!=t){t=t.getAttribute("title");var z=+this.getCurrentFile();z=null!=z?z.savingStatusKey:DrawioFile.prototype.savingStatusKey;t==mxResources.get(z)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(z))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";t=32>=c.clientWidth;c.style.visibility=t&&""==this.editor.getStatus()?"hidden":"";if(t||f)this.statusContainer.style.display="inline-flex",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display=+"inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&+this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);+this.createMenubarForTheme(c);this.sidebarContainer.style.display="";if("sketch"==c){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var f=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);this.createShapesWindow();this.sidebarContainer.className="";this.sidebarContainer.style.position="absolute";this.sidebarContainer.style.left=+"0px";this.sidebarContainer.style.top="0px";this.sidebarContainer.style.bottom=f?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(c=this.isDefaultTheme(c)||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,+this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),+this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=+null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=+Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createWrapperForTheme=function(c){null!=+this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=+function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")++": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity=+"",this.menubar.container.appendChild(this.statusContainer));null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);c=this.menubar.langIcon;null!=c&&(c.style.position="absolute",c.style.height="18px",c.style.width="18px",c.style.flexShrink="",c.style.opacity="",this.menubarContainer.parentNode.insertBefore(c,this.menubarContainer));null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};+EditorUi.prototype.createMenu=function(c,f,l,t){l=null!=l?l:"geToolbarButton";var z=this.menus.get(c);t=this.menubar.addMenu(mxResources.get(c),z.funct,null,t);t.className=l;t.style.display="inline-block";t.style.cursor="pointer";t.style.height="24px";t.setAttribute("title",mxResources.get(c));this.menus.menuCreated(z,t,l);null!=f&&(t.style.backgroundImage="url("+f+")",t.style.backgroundPosition="center center",t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="100% 100%",t.style.width=+"24px",t.innerText="");return t};EditorUi.prototype.createToolbarButton=function(c,f,l,t){t=null!=t?t:24;var z=document.createElement("a");z.className="geToolbarButton geAdaptiveAsset";z.setAttribute("title",f);z.style.backgroundImage="url("+c+")";z.style.backgroundPosition="center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="100% 100%";z.style.display="inline-block";z.style.cursor="pointer";z.style.marginLeft="6px";z.style.width=t+"px";z.style.height=t+"px";z.style.flexShrink=+"0";z.style.flexGrow="0";null!=l&&(mxEvent.addListener(z,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()})),mxEvent.addListener(z,"click",function(C){"disabled"!=z.getAttribute("disabled")&&l(C);mxEvent.consume(C)}));return z};EditorUi.prototype.createMenuItem=function(c,f,l){var t=this.actions.get(c),z=null!=t?t.funct:null,C=this.createToolbarButton(f,mxResources.get(c)+(null!=t&&null!=t.shortcut?" ("+t.shortcut+")":""),z);null==t||l||(c=function(){t.isEnabled()?+(C.removeAttribute("disabled"),C.style.cursor="pointer"):(C.setAttribute("disabled","disabled"),C.style.cursor="default");C.style.opacity=t.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),t.addListener("stateChanged",c),c());return C};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-+10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,f,mxUtils.bind(this,function(z){z.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var l=this.formatWindow.window.toggleMinimized,t=240;this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",+this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(z){mxEvent.getSource(z)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?+(c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>c)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var H=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):H.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=+function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=this.defaultSidebarWidth);var l=this.hsplitPosition,t=mxUtils.bind(this,function(){this.hsplitPosition=z;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),z=c?f:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==z?"translateX(0)":"translateX(-100%)");0!=z&&t();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",+0==z?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==z&&t()}),+300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var S=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():S.apply(this,arguments)};var G=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=null!=c?c:!0;if("1"!=urlParams.embedInline){var f=this.container.clientWidth;this.container==+document.body&&(f=document.body.clientWidth||document.documentElement.clientWidth);var l=this.getDiagramContainerOffset();var t=l.x;var z=l.y;"simple"==Editor.currentTheme&&(z+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=z+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,f=Math.max(0,+Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,f-this.splitSize-40))),this.sidebarContainer.style.width=f+"px",this.diagramContainer.style.left=f+t+"px",this.tabContainer.style.left=f+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=f+"px",this.diagramContainer.style.right=this.formatWidth+"px",+this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=l.x+"px",this.diagramContainer.style.right="0")}c&&this.editor.graph.sizeDidChange()}else G.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,function(t){t=this.createMenu(t,null,"geTitle");t.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";+c.appendChild(t);return t});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;",f.className="geTitle",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,+"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.borderLeftStyle="solid",mxUtils.write(f,mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var l=f("newLibrary");l.style.fontSize="11px";l.style.left="0";l=f("openLibraryFrom");l.style.borderLeftStyle="solid";l.style.fontSize="11px";l.style.left="50%"}c.appendChild(this.sidebarContainer);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=+function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,c-6,f-6,mxUtils.bind(this,function(t){this.createShapesPanel(t)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setAndPersistDarkMode=function(c){var f=c;"auto"==c&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(f);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(c){mxSettings.setLanguage(c);mxSettings.save();mxClient.language=c;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var f=document.getElementById("high-contrast-stylesheet");-if(null!=f&&window.matchMedia){var k=window.matchMedia("(forced-colors: active)").matches,B=f.getAttribute("media");(B="all"==B||"not all"!=B&&k)&&!c?f.setAttribute("media",k?"not all":"(forced-colors: active)"):!B&&c&&f.setAttribute("media",k?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&+if(null!=f&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,t=f.getAttribute("media");(t="all"==t||"not all"!=t&&l)&&!c?f.setAttribute("media",l?"not all":"(forced-colors: active)"):!t&&c&&f.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.refresh();this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-f.x;this.diagramContainer.scrollTop+=c.x-f.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){Editor.darkMode=c;c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff";null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),c.style.colorScheme="light"));null!=this.ruler&&this.ruler.updateStyle();this.fireEvent(new mxEventObject("darkModeChanged"))};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,f){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=-function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,B=this.editor.graph;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",k.style.left=-"10px",k.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width=-"",this.diagramContainer.style.height="");else{var z=this.diagramContainer.getAttribute("data-bounds");if(null!=z){this.diagramContainer.removeAttribute("data-bounds");B.getGraphBounds();var C=z.split(" ");B=mxUtils.getDocumentSize();this.diagramContainer.style.top=C[0];this.diagramContainer.style.left=C[1];z=parseInt(C[2]);C=parseInt(C[3]);z=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,z):z,B.width-80);C=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,C):C,B.height--80);this.diagramContainer.style.width=z+"px";this.diagramContainer.style.height=C+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";k.style.display="";k.style.left=this.diagramContainer.offsetLeft-k.offsetWidth-4+"px";k.style.top=+function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left=+"10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width=+"",this.diagramContainer.style.height="");else{var z=this.diagramContainer.getAttribute("data-bounds");if(null!=z){this.diagramContainer.removeAttribute("data-bounds");t.getGraphBounds();var C=z.split(" ");t=mxUtils.getDocumentSize();this.diagramContainer.style.top=C[0];this.diagramContainer.style.left=C[1];z=parseInt(C[2]);C=parseInt(C[3]);z=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,z):z,t.width-80);C=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,C):C,t.height-+80);this.diagramContainer.style.width=z+"px";this.diagramContainer.style.height=C+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;f.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-@@ -3858,209 +3858,208 @@ EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defa"1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var f=Graph.prototype.getLinkTitle.apply(this,-arguments);if(Graph.isPageLink(c)){var k=c.indexOf(",");0<k&&(f=this.getPageById(c.substring(k+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var k=JSON.parse(c.substring(17));null!=k&&null!=k.title&&(f=k.title)}catch(B){}return f};EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=+arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(f=this.getPageById(c.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));null!=l&&null!=l.title&&(f=l.title)}catch(t){}return f};EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,f)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(f){f.key==mxSettings.key&&-(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,k){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));-this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,k){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,k){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+-c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,k){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,k){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||-this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(f,k){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",-mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,f,k){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,-function(B,z){try{this.spinner.stop();var C=this.createImageDataUri(B,f,"png"),I=parseInt(z.getAttribute("width")),L=parseInt(z.getAttribute("height"));this.writeImageToClipboard(C,I,L,mxUtils.bind(this,function(K){this.handleError(K)}))}catch(K){this.handleError(K)}}),null,null,null,mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?-c:null)}catch(B){this.handleError(B)}};EditorUi.prototype.copyCells=function(c,f){var k=this.editor.graph;if(k.isSelectionEmpty())c.innerText="";else{var B=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),z=mxUtils.getXml(k.encodeCells(B));mxUtils.setTextContent(c,encodeURIComponent(z));f?(k.removeCells(B,!1),k.lastPasteXml=null):(k.lastPasteXml=z,k.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var f=-this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,k,B,z){z=null!=z?z:!0;var C=this.editor.graph,I=null;C.lastPasteXml==c?C.pasteCounter++:(C.lastPasteXml=c,C.pasteCounter=0);var L=C.pasteCounter*C.gridSize;if(k||this.isCompatibleString(c))I=this.importXml(c,L,L),C.setSelectionCells(I);else if(f&&1==-C.getSelectionCount()){z=C.getStartEditingCell(C.getSelectionCell(),B);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==C.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])C.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{C.model.beginUpdate();try{C.labelChanged(z,c),Graph.isLink(c)&&C.setLinkForCell(z,c)}finally{C.model.endUpdate()}}C.setSelectionCell(z)}else I=C.getInsertPoint(),C.isMouseInsertPoint()&&(L=0,C.lastPasteXml==c&&0<C.pasteCounter&&C.pasteCounter--),I=this.insertTextAt(c,I.x+L,-I.y+L,z),C.setSelectionCells(I);C.isSelectionEmpty()||(C.scrollCellToVisible(C.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(C.view.getState(C.getSelectionCell())));return I};EditorUi.prototype.pasteCells=function(c,f,k,B){if(!mxEvent.isConsumed(c)){var z=f,C=!1;if(k&&null!=c.clipboardData&&c.clipboardData.getData){var I=c.clipboardData.getData("text/plain"),L=!1;if(null!=I&&0<I.length&&"%3CmxGraphModel%3E"==I.substring(0,18))try{var K=decodeURIComponent(I);this.isCompatibleString(K)&&-(L=!0,I=K)}catch(ma){}L=L?null:c.clipboardData.getData("text/html");null!=L&&0<L.length?(z=this.parseHtmlData(L),C="text/plain"!=z.getAttribute("data-type")):null!=I&&0<I.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,L))}I=z.getElementsByTagName("span");if(null!=I&&0<I.length&&"application/vnd.lucid.chart.objects"===I[0].getAttribute("data-lucid-type"))k=I[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(ma){var la=-this.editor.graph;la.lastPasteXml==ma?la.pasteCounter++:(la.lastPasteXml=ma,la.pasteCounter=0);var Y=la.pasteCounter*la.gridSize;la.setSelectionCells(this.importXml(ma,Y,Y));la.scrollCellToVisible(la.getSelectionCell())}),mxUtils.bind(this,function(ma){this.handleError(ma)})),mxEvent.consume(c));else{var O=!1,da="";da=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==-z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var ea=da.lastIndexOf("%3E");0<=ea&&ea<da.length-3&&(da=da.substring(0,ea+3))}catch(ma){}try{I=z.getElementsByTagName("span"),(K=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(da))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(O=!0,da=-K)}catch(ma){}try{if(null!=da&&0<da.length){if(0==da.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ca=mxUtils.bind(this,function(){try{da=(new MiroImporter).importMiroJson(JSON.parse(da)),this.pasteXml(da,B,O,c)}catch(ma){console.log("Miro import error:",ma)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ca):ca()}else this.pasteXml(da,B,O,c,C);try{mxEvent.consume(c)}catch(ma){}}else if(!k){var V=this.editor.graph;V.lastPasteXml=null;V.pasteCounter=-0}}catch(ma){this.handleError(ma)}}}f.innerHTML=" "};EditorUi.prototype.showPrintDialog=function(c,f){var k=320;this.editor.graph.isEnabled()&&(k+=40);null!=this.pages&&1<this.pages.length&&(k+=40,this.editor.graph.isEnabled()||(k+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(k+=20);this.showDialog((new PrintDialog(this,c,f)).container,320,k,!0,!0)};EditorUi.prototype.print=function(c,f){var k=this.editor,B=k.graph,z=this.getPageIndex(this.currentPage),C=null!=z?z+-1:1,I=mxUtils.bind(this,function(Y,fa,Z,l){var u=Y.useCssTransforms,H=Y.currentTranslate,U=Y.currentScale,J=Y.view.translate,W=Y.view.scale;Y.useCssTransforms&&(Y.useCssTransforms=!1,Y.currentTranslate=new mxPoint(0,0),Y.currentScale=1,Y.view.translate=new mxPoint(0,0),Y.view.scale=1);var aa=Y.getGraphBounds(),ba=0,ja=0,oa=mxRectangle.fromRectangle(Y.pageFormat),qa=f.fit||f.crop||!Y.pageVisible,ra=f.scale;oa.width=Math.ceil(oa.width*Y.pageScale);oa.height=Math.ceil(oa.height*Y.pageScale);var ua=1;-if(f.fit){ua=f.sheetsAcross;var za=f.sheetsDown;isNaN(ra)||(oa.width=Math.ceil(oa.width*ra),oa.height=Math.ceil(oa.height*ra));ua=Math.min(oa.height*za/(aa.height/Y.view.scale),oa.width*ua/(aa.width/Y.view.scale))}else ua=isNaN(ra)?1:ra;ua*=1;!qa&&Y.pageVisible?(ra=Y.getPageLayout(),ba-=ra.x*oa.width,ja-=ra.y*oa.height):qa=!0;f.crop&&(f.selection&&(aa=B.getBoundingBox(B.getSelectionCells())),oa.width=(aa.width+1)*ua/Y.view.scale,oa.height=(aa.height+1)*ua/Y.view.scale);oa.width=Math.ceil(1*oa.width);-oa.height=Math.ceil(1*oa.height);l=null!=l?"page/id,"+l:null;if(null==fa){fa=PrintDialog.createPrintPreview(Y,ua,null,0,ba,ja,qa);fa.title=this.getBaseFilename(!0);fa.pageSelector=!1;fa.mathEnabled=!1;ba=f.border;isNaN(ba)||(fa.pageMargin=ba);f.selection&&(fa.isCellVisible=function(sa){return Y.isCellSelected(sa)});var Ba=fa.writeHead;fa.writeHead=function(sa){Ba.apply(this,arguments);mxClient.IS_GC&&(sa.writeln('<style type="text/css">'),sa.writeln("@media print {"),sa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),-sa.writeln("}"),sa.writeln("</style>"));null!=k.fontCss&&(sa.writeln('<style type="text/css">'),sa.writeln(mxUtils.htmlEntities(k.fontCss,!1,!1,!1)),sa.writeln("</style>"));for(var Aa=Y.getCustomFonts(),Ea=0;Ea<Aa.length;Ea++){var Ka=Aa[Ea].name,Ma=Aa[Ea].url;Graph.isCssFontUrl(Ma)?sa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Ma))+'" charset="UTF-8" type="text/css">'):(sa.writeln('<style type="text/css">'),sa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ka)+-'";\nsrc: url("'+mxUtils.htmlEntities(Ma)+'");\n}'),sa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var Ca=fa.drawBackgroundImage;fa.drawBackgroundImage=function(sa){Ca.apply(this,arguments);null!=sa.node&&(EditorUi.embedSvgImages(sa.node),B.disableSvgLinks(sa.node,function(Aa){Aa.setAttribute("href","javascript:void(0)")}))}}var La=fa.addGraphFragment;fa.addGraphFragment=function(sa,Aa,Ea,Ka,Ma,ya){La.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:Ma.classList.add("geDisableMathJax")};-f.grid&&(fa.gridSize=Y.gridSize,fa.gridSteps=Y.view.gridSteps,fa.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:Y.view.gridColor);fa.open(null,null,Z,!0,l,oa,f.selection?Y.getSelectionCells():null)}else{aa=Y.background;if(null==aa||""==aa||aa==mxConstants.NONE)aa="#ffffff";fa.backgroundColor=aa;fa.autoOrigin=qa;f.grid&&(fa.gridSize=Y.gridSize,fa.gridSteps=Y.view.gridSteps,fa.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:Y.view.gridColor);fa.appendGraph(Y,-ua,ba,ja,Z,!0,l,oa,f.selection?Y.getSelectionCells():null);Z=Y.getCustomFonts();if(null!=fa.wnd)for(oa=0;oa<Z.length;oa++)ba=Z[oa].name,ja=Z[oa].url,Graph.isCssFontUrl(ja)?fa.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(ja)+'" charset="UTF-8" type="text/css">'):(fa.wnd.document.writeln('<style type="text/css">'),fa.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(ba)+'";\nsrc: url("'+mxUtils.htmlEntities(ja)+'");\n}'),fa.wnd.document.writeln("</style>"))}u&&-(Y.useCssTransforms=u,Y.currentTranslate=H,Y.currentScale=U,Y.view.translate=J,Y.view.scale=W);return fa}),L=f.pagesFrom,K=f.pagesTo,O=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{O&&(O=f.selection||L==C&&K==C);if(!O&&null!=this.pages&&this.pages.length){O=0;C=this.pages.length-1;f.allPages||(O=parseInt(L)-1,C=parseInt(K)-1);for(var da=O;da<=C;da++){var ea=this.pages[da];L=ea==this.currentPage?B:null;if(null==L){L=this.createTemporaryGraph(B.stylesheet);L.shapeForegroundColor=-B.shapeForegroundColor;L.shapeBackgroundColor=B.shapeBackgroundColor;K=!0;O=!1;var ca=null,V=null;null==ea.viewState&&null==ea.root&&this.updatePageRoot(ea);null!=ea.viewState&&(K=ea.viewState.pageVisible,O=ea.viewState.mathEnabled,ca=ea.viewState.background,V=ea.viewState.backgroundImage,L.pageFormat=ea.viewState.pageFormat,L.gridSize=ea.viewState.gridSize);null!=V&&null!=V.originalSrc&&(V=this.createImageForPageLink(V.originalSrc,ea));L.background=ca;L.backgroundImage=null!=V?new mxImage(V.src,-V.width,V.height,V.x,V.y):null;L.pageVisible=K;L.mathEnabled=O;var ma=L.getGraphBounds;L.getGraphBounds=function(){var Y=ma.apply(this,arguments),fa=this.backgroundImage;if(null!=fa&&null!=fa.width&&null!=fa.height){var Z=this.view.translate,l=this.view.scale;Y=mxRectangle.fromRectangle(Y);Y.add(new mxRectangle((Z.x+fa.x)*l,(Z.y+fa.y)*l,fa.width*l,fa.height*l))}return Y};var la=L.getGlobalVariable;L.getGlobalVariable=function(Y){return"page"==Y?ea.getName():"pagenumber"==Y?da+1:"pagecount"==Y?null!=-this.pages?this.pages.length:1:la.apply(this,arguments)};document.body.appendChild(L.container);this.updatePageRoot(ea);L.model.setRoot(ea.root)}z=I(L,z,da!=C,ea.getId());L!=B&&L.container.parentNode.removeChild(L.container)}}else z=I(B);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(I=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),I.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),Graph.rewritePageLinks(z.wnd.document,-!0),z.mathEnabled||c||PrintDialog.printPreview(z));return z}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,k=0;k<c.length;k++)mxEvent.addListener(c[k],"dragleave",function(B){null!=f&&(f.parentNode.removeChild(f),f=null);B.stopPropagation();B.preventDefault()}),mxEvent.addListener(c[k],"dragover",mxUtils.bind(this,function(B){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&-(f=this.highlightElement());B.stopPropagation();B.preventDefault()})),mxEvent.addListener(c[k],"drop",mxUtils.bind(this,function(B){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<B.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(B.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(B)&&!mxEvent.isShiftDown(B)):this.openFiles(B.dataTransfer.files,!0);else{var z=this.extractGraphModelFromEvent(B);-if(null==z){var C=null!=B.dataTransfer?B.dataTransfer:B.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?z=C.getData("Text"):(z=null,z=0<=mxUtils.indexOf(C.types,"text/uri-list")?B.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=z&&0<z.length?(C=document.createElement("div"),C.innerHTML=Graph.sanitizeHtml(z),C=C.getElementsByTagName("img"),0<C.length&&(z=C[0].getAttribute("src"))):0<=mxUtils.indexOf(C.types,-"text/plain")&&(z=C.getData("text/plain"))),null!=z&&(Editor.isPngDataUrl(z)?(z=Editor.extractGraphModelFromPng(z),null!=z&&0<z.length&&this.openLocalFile(z,null,!0)):this.isRemoteFileFormat(z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(z))).send(mxUtils.bind(this,function(I){200<=I.getStatus()&&299>=I.getStatus()?this.openLocalFile(I.getText(),null,!0):this.showError(mxResources.get("error"),-413==I.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(z)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(z):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(z)))))}else this.openLocalFile(z,null,!0)}B.stopPropagation();B.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,k=0;if(null==c){var B=document.body;-var z=document.documentElement;var C=(B.clientWidth||z.clientWidth)-3;B=Math.max(B.clientHeight||0,z.clientHeight)-3}else f=c.offsetTop,k=c.offsetLeft,C=c.clientWidth,B=c.clientHeight;z=document.createElement("div");z.style.zIndex=mxPopupMenu.prototype.zIndex+2;z.style.border="3px dotted rgb(254, 137, 12)";z.style.pointerEvents="none";z.style.position="absolute";z.style.top=f+"px";z.style.left=k+"px";z.style.width=Math.max(0,C-3)+"px";z.style.height=Math.max(0,B-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?-this.editor.graph.container.appendChild(z):document.body.appendChild(z);return z};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var k=new mxCodec(f.ownerDocument),B=new mxGraphModel;k.decode(f,B);f=B.getChildAt(B.getRoot(),0);for(k=0;k<B.getChildCount(f);k++)c.push(B.getChildAt(f,k))}return c};EditorUi.prototype.openFileHandle=function(c,f,k,B,z,C){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||-/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var I=mxUtils.bind(this,function(K){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==K.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,B);try{this.loadLibrary(new LocalLibrary(this,K,f)),this.showSidebar()}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,-f,B)});if(EditorUi.isVisioFilename(f))this.importVisio(k,mxUtils.bind(this,function(K){this.spinner.stop();I(K)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(K){this.spinner.stop();I(K)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),-200<=K.status&&299>=K.status?I(K.responseText):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(K){this.spinner.stop();this.openLocalFile(K,f,B)}),mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();-null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,B);try{this.loadLibrary(new LocalLibrary(this,c,k.name)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(K){this.spinner.stop();I(K)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,B)}));else{if("image/png"==k.type.substring(0,9))c=this.extractGraphModelFromPng(c);-else if("application/pdf"==k.type){var L=Editor.extractGraphModelFromPdf(c);null!=L&&(z=null,B=!0,c=L)}this.spinner.stop();this.openLocalFile(c,f,B,z,null!=z?k:null,C)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<c.length;k++)mxUtils.bind(this,function(B){var z=new FileReader;z.onload=mxUtils.bind(this,function(C){try{this.openFileHandle(C.target.result,B.name,B,f)}catch(I){this.handleError(I)}});z.onerror=mxUtils.bind(this,-function(C){this.spinner.stop();this.handleError(C);window.openFile=null});"image"!==B.type.substring(0,5)&&"application/pdf"!==B.type||"image/svg"===B.type.substring(0,9)?z.readAsText(B):z.readAsDataURL(B)})(c[k])};EditorUi.prototype.openLocalFile=function(c,f,k,B,z,C){var I=this.getCurrentFile(),L=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var K=mxUtils.parseXml(c);null!=K&&(this.editor.setGraphXml(K.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,-c,f||this.defaultFilename,k,B,z,C))});if(null!=c&&0<c.length)null==I||!I.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=B)?L():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=B)&&null!=I&&I.isModified()?this.confirm(mxResources.get("allChangesLost"),null,L,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=-I&&I.isModified()?this.confirm(mxResources.get("allChangesLost"),null,L,mxResources.get("cancel"),mxResources.get("discardChanges")):L()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var k in c)f.push(k);return f};EditorUi.prototype.addBasenamesForCell=-function(c,f){function k(I){if(null!=I){var L=I.lastIndexOf(".");0<L&&(I=I.substring(L+1,I.length));null==f[I]&&(f[I]=!0)}}var B=this.editor.graph,z=B.getCellStyle(c);k(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));B.model.isEdge(c)&&(k(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=B.model.getChildCount(c);for(var C=0;C<z;C++)this.addBasenamesForCell(B.model.getChildAt(c,C),f)};EditorUi.prototype.setGraphEnabled=+(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));+this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("++c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,l){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||+this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(f,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",+mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,f,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,+function(t,z){try{this.spinner.stop();var C=this.createImageDataUri(t,f,"png"),F=parseInt(z.getAttribute("width")),N=parseInt(z.getAttribute("height"));this.writeImageToClipboard(C,F,N,mxUtils.bind(this,function(K){this.handleError(K)}))}catch(K){this.handleError(K)}}),null,null,null,mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?+c:null)}catch(t){this.handleError(t)}};EditorUi.prototype.copyCells=function(c,f){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText="";else{var t=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),z=mxUtils.getXml(l.encodeCells(t));mxUtils.setTextContent(c,encodeURIComponent(z));f?(l.removeCells(t,!1),l.lastPasteXml=null):(l.lastPasteXml=z,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var f=+this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,l,t,z){z=null!=z?z:!0;var C=this.editor.graph,F=null;C.lastPasteXml==c?C.pasteCounter++:(C.lastPasteXml=c,C.pasteCounter=0);var N=C.pasteCounter*C.gridSize;if(l||this.isCompatibleString(c))F=this.importXml(c,N,N),C.setSelectionCells(F);else if(f&&1==+C.getSelectionCount()){z=C.getStartEditingCell(C.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==C.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])C.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{C.model.beginUpdate();try{C.labelChanged(z,c),Graph.isLink(c)&&C.setLinkForCell(z,c)}finally{C.model.endUpdate()}}C.setSelectionCell(z)}else F=C.getInsertPoint(),C.isMouseInsertPoint()&&(N=0,C.lastPasteXml==c&&0<C.pasteCounter&&C.pasteCounter--),F=this.insertTextAt(c,F.x+N,+F.y+N,z),C.setSelectionCells(F);C.isSelectionEmpty()||(C.scrollCellToVisible(C.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(C.view.getState(C.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,f,l,t){if(!mxEvent.isConsumed(c)){var z=f,C=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var F=c.clipboardData.getData("text/plain"),N=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var K=decodeURIComponent(F);this.isCompatibleString(K)&&+(N=!0,F=K)}catch(ba){}N=N?null:c.clipboardData.getData("text/html");null!=N&&0<N.length?(z=this.parseHtmlData(N),C="text/plain"!=z.getAttribute("data-type")):null!=F&&0<F.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,N))}F=z.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))l=F[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(ba){var ha=+this.editor.graph;ha.lastPasteXml==ba?ha.pasteCounter++:(ha.lastPasteXml=ba,ha.pasteCounter=0);var ma=ha.pasteCounter*ha.gridSize;ha.setSelectionCells(this.importXml(ba,ma,ma));ha.scrollCellToVisible(ha.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(c));else{var I=!1,ca="";ca=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==+z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var da=ca.lastIndexOf("%3E");0<=da&&da<ca.length-3&&(ca=ca.substring(0,da+3))}catch(ba){}try{F=z.getElementsByTagName("span"),(K=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(ca))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(I=!0,ca=+K)}catch(ba){}try{if(null!=ca&&0<ca.length){if(0==ca.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ea=mxUtils.bind(this,function(){try{ca=(new MiroImporter).importMiroJson(JSON.parse(ca)),this.pasteXml(ca,t,I,c)}catch(ba){console.log("Miro import error:",ba)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ea):ea()}else this.pasteXml(ca,t,I,c,C);try{mxEvent.consume(c)}catch(ba){}}else if(!l){var X=this.editor.graph;X.lastPasteXml=null;X.pasteCounter=+0}}catch(ba){this.handleError(ba)}}}f.innerHTML=" "};EditorUi.prototype.showPrintDialog=function(c,f){var l=320;this.editor.graph.isEnabled()&&(l+=40);null!=this.pages&&1<this.pages.length&&(l+=40,this.editor.graph.isEnabled()||(l+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(l+=20);this.showDialog((new PrintDialog(this,c,f)).container,320,l,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,t=l.graph,z=this.getPageIndex(this.currentPage),C=null!=z?z++1:1,F=mxUtils.bind(this,function(ma,Y,la,Z){var k=ma.useCssTransforms,A=ma.currentTranslate,J=ma.currentScale,U=ma.view.translate,P=ma.view.scale;ma.useCssTransforms&&(ma.useCssTransforms=!1,ma.currentTranslate=new mxPoint(0,0),ma.currentScale=1,ma.view.translate=new mxPoint(0,0),ma.view.scale=1);var T=ma.getGraphBounds(),W=0,aa=0,ja=mxRectangle.fromRectangle(ma.pageFormat),pa=f.fit||f.crop||!ma.pageVisible,sa=f.scale;ja.width=Math.ceil(ja.width*ma.pageScale);ja.height=Math.ceil(ja.height*ma.pageScale);+var qa=1;if(f.fit){qa=f.sheetsAcross;var wa=f.sheetsDown;isNaN(sa)||(ja.width=Math.ceil(ja.width*sa),ja.height=Math.ceil(ja.height*sa));qa=Math.min(ja.height*wa/(T.height/ma.view.scale),ja.width*qa/(T.width/ma.view.scale))}else qa=isNaN(sa)?1:sa;qa*=1;!pa&&ma.pageVisible?(sa=ma.getPageLayout(),W-=sa.x*ja.width,aa-=sa.y*ja.height):pa=!0;f.crop&&(f.selection&&(T=t.getBoundingBox(t.getSelectionCells())),ja.width=(T.width+1)*qa/ma.view.scale,ja.height=(T.height+1)*qa/ma.view.scale);ja.width=Math.ceil(1*+ja.width);ja.height=Math.ceil(1*ja.height);Z=null!=Z?"page/id,"+Z:null;if(null==Y){Y=PrintDialog.createPrintPreview(ma,qa,null,0,W,aa,pa);Y.title=this.getBaseFilename(!0);Y.pageSelector=!1;Y.mathEnabled=!1;W=f.border;isNaN(W)||(Y.pageMargin=W);f.selection&&(Y.isCellVisible=function(ra){return ma.isCellSelected(ra)});var Ba=Y.writeHead;Y.writeHead=function(ra){Ba.apply(this,arguments);mxClient.IS_GC&&(ra.writeln('<style type="text/css">'),ra.writeln("@media print {"),ra.writeln(".MathJax svg { shape-rendering: crispEdges; }"),+ra.writeln("}"),ra.writeln("</style>"));null!=l.fontCss&&(ra.writeln('<style type="text/css">'),ra.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),ra.writeln("</style>"));for(var ya=ma.getCustomFonts(),Ca=0;Ca<ya.length;Ca++){var Ma=ya[Ca].name,Ha=ya[Ca].url;Graph.isCssFontUrl(Ha)?ra.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Ha))+'" charset="UTF-8" type="text/css">'):(ra.writeln('<style type="text/css">'),ra.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ma)++'";\nsrc: url("'+mxUtils.htmlEntities(Ha)+'");\n}'),ra.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var za=Y.drawBackgroundImage;Y.drawBackgroundImage=function(ra){za.apply(this,arguments);null!=ra.node&&(EditorUi.embedSvgImages(ra.node),t.disableSvgLinks(ra.node,function(ya){ya.setAttribute("href","javascript:void(0)")}))}}var Ea=Y.addGraphFragment;Y.addGraphFragment=function(ra,ya,Ca,Ma,Ha,Aa){Ea.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:Ha.classList.add("geDisableMathJax")};+f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.open(null,null,la,!0,Z,ja,f.selection?ma.getSelectionCells():null)}else{T=ma.background;if(null==T||""==T||T==mxConstants.NONE)T="#ffffff";Y.backgroundColor=T;Y.autoOrigin=pa;f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.appendGraph(ma,qa,+W,aa,la,!0,Z,ja,f.selection?ma.getSelectionCells():null);la=ma.getCustomFonts();if(null!=Y.wnd)for(ja=0;ja<la.length;ja++)W=la[ja].name,aa=la[ja].url,Graph.isCssFontUrl(aa)?Y.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(aa)+'" charset="UTF-8" type="text/css">'):(Y.wnd.document.writeln('<style type="text/css">'),Y.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(W)+'";\nsrc: url("'+mxUtils.htmlEntities(aa)+'");\n}'),Y.wnd.document.writeln("</style>"))}k&&+(ma.useCssTransforms=k,ma.currentTranslate=A,ma.currentScale=J,ma.view.translate=U,ma.view.scale=P);return Y}),N=f.pagesFrom,K=f.pagesTo,I=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{I&&(I=f.selection||N==C&&K==C);if(!I&&null!=this.pages&&this.pages.length){I=0;C=this.pages.length-1;f.allPages||(I=parseInt(N)-1,C=parseInt(K)-1);for(var ca=I;ca<=C;ca++){var da=this.pages[ca];N=da==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);+N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;I=!1;var ea=null,X=null;null==da.viewState&&null==da.root&&this.updatePageRoot(da);null!=da.viewState&&(K=da.viewState.pageVisible,I=da.viewState.mathEnabled,ea=da.viewState.background,X=da.viewState.backgroundImage,N.pageFormat=da.viewState.pageFormat,N.gridSize=da.viewState.gridSize);null!=X&&null!=X.originalSrc&&(X=this.createImageForPageLink(X.originalSrc,da));N.background=ea;N.backgroundImage=null!=+X?new mxImage(X.src,X.width,X.height,X.x,X.y):null;N.pageVisible=K;N.mathEnabled=I;var ba=N.getGraphBounds;N.getGraphBounds=function(){var ma=ba.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var la=this.view.translate,Z=this.view.scale;ma=mxRectangle.fromRectangle(ma);ma.add(new mxRectangle((la.x+Y.x)*Z,(la.y+Y.y)*Z,Y.width*Z,Y.height*Z))}return ma};var ha=N.getGlobalVariable;N.getGlobalVariable=function(ma){return"page"==ma?da.getName():"pagenumber"==ma?+ca+1:"pagecount"==ma?null!=this.pages?this.pages.length:1:ha.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(da);N.model.setRoot(da.root)}z=F(N,z,ca!=C,da.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else z=F(t);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(F=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),F.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),+Graph.rewritePageLinks(z.wnd.document,!0),z.mathEnabled||c||PrintDialog.printPreview(z));return z}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(t){null!=f&&(f.parentNode.removeChild(f),f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&+12>document.documentMode)&&(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);+else{var z=this.extractGraphModelFromEvent(t);if(null==z){var C=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?z=C.getData("Text"):(z=null,z=0<=mxUtils.indexOf(C.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=z&&0<z.length?(C=document.createElement("div"),C.innerHTML=Graph.sanitizeHtml(z),C=C.getElementsByTagName("img"),0<C.length&&(z=C[0].getAttribute("src"))):+0<=mxUtils.indexOf(C.types,"text/plain")&&(z=C.getData("text/plain"))),null!=z&&(Editor.isPngDataUrl(z)?(z=Editor.extractGraphModelFromPng(z),null!=z&&0<z.length&&this.openLocalFile(z,null,!0)):this.isRemoteFileFormat(z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(z))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&299>=F.getStatus()?this.openLocalFile(F.getText(),null,!0):this.showError(mxResources.get("error"),+413==F.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(z)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(z):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(z)))))}else this.openLocalFile(z,null,!0)}t.stopPropagation();t.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,l=0;if(null==c){var t=document.body;+var z=document.documentElement;var C=(t.clientWidth||z.clientWidth)-3;t=Math.max(t.clientHeight||0,z.clientHeight)-3}else f=c.offsetTop,l=c.offsetLeft,C=c.clientWidth,t=c.clientHeight;z=document.createElement("div");z.style.zIndex=mxPopupMenu.prototype.zIndex+2;z.style.border="3px dotted rgb(254, 137, 12)";z.style.pointerEvents="none";z.style.position="absolute";z.style.top=f+"px";z.style.left=l+"px";z.style.width=Math.max(0,C-3)+"px";z.style.height=Math.max(0,t-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?+this.editor.graph.container.appendChild(z):document.body.appendChild(z);return z};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var l=new mxCodec(f.ownerDocument),t=new mxGraphModel;l.decode(f,t);f=t.getChildAt(t.getRoot(),0);for(l=0;l<t.getChildCount(f);l++)c.push(t.getChildAt(f,l))}return c};EditorUi.prototype.openFileHandle=function(c,f,l,t,z,C){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||+/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var F=mxUtils.bind(this,function(K){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==K.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,K,f)),this.showSidebar()}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,+f,t)});if(EditorUi.isVisioFilename(f))this.importVisio(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),+200<=K.status&&299>=K.status?F(K.responseText):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(K){this.spinner.stop();this.openLocalFile(K,f,t)}),mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,t)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);+else if("application/pdf"==l.type){var N=Editor.extractGraphModelFromPdf(c);null!=N&&(z=null,t=!0,c=N)}this.spinner.stop();this.openLocalFile(c,f,t,z,null!=z?l:null,C)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=0;l<c.length;l++)mxUtils.bind(this,function(t){var z=new FileReader;z.onload=mxUtils.bind(this,function(C){try{this.openFileHandle(C.target.result,t.name,t,f)}catch(F){this.handleError(F)}});z.onerror=mxUtils.bind(this,+function(C){this.spinner.stop();this.handleError(C);window.openFile=null});"image"!==t.type.substring(0,5)&&"application/pdf"!==t.type||"image/svg"===t.type.substring(0,9)?z.readAsText(t):z.readAsDataURL(t)})(c[l])};EditorUi.prototype.openLocalFile=function(c,f,l,t,z,C){var F=this.getCurrentFile(),N=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var K=mxUtils.parseXml(c);null!=K&&(this.editor.setGraphXml(K.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,+c,f||this.defaultFilename,l,t,z,C))});if(null!=c&&0<c.length)null==F||!F.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)?N():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)&&null!=F&&F.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=+F&&F.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var l in c)f.push(l);return f};EditorUi.prototype.addBasenamesForCell=+function(c,f){function l(F){if(null!=F){var N=F.lastIndexOf(".");0<N&&(F=F.substring(N+1,F.length));null==f[F]&&(f[F]=!0)}}var t=this.editor.graph,z=t.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));t.model.isEdge(c)&&(l(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=t.model.getChildCount(c);for(var C=0;C<z;C++)this.addBasenamesForCell(t.model.getChildAt(c,C),f)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?"":"none";this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=c&&0<parseInt(this.tabContainer.style.height)?"":"hidden");null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=-c?"":"hidden");c||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,k,B,z){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;-this.setFileData(f);if(z)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var I=C.model.cells,L;for(L in I){var K=I[L];null!=K&&null!=K.style&&(K.style+=";sketch=1;"+(-1==K.style.indexOf("fontFamily=")||-1<K.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(O){console.log(O)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();-this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=B?B:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,-f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(k){this.spinner.stop();f(k)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;-f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var B=f.background;if(null==B||B==mxConstants.NONE)B=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(z){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(z)}),"*")}),null,null,!0,B,1,this.embedExportBorder,null,this.embedExportTheme)}else c||-k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(z){c||this.handleError(z)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,k=!1,B=!1,z=null,C=mxUtils.bind(this,function(K,O){this.editor.modified&&-"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(K){if(K.source==(window.opener||window.parent)){var O=K.data,da=null,ea=mxUtils.bind(this,function(sa){if(null!=sa&&"function"===typeof sa.charAt&&"<"!=sa.charAt(0))try{Editor.isPngDataUrl(sa)?sa=Editor.extractGraphModelFromPng(sa):-"data:image/svg+xml;base64,"==sa.substring(0,26)?sa=atob(sa.substring(26)):"data:image/svg+xml;utf8,"==sa.substring(0,24)&&(sa=sa.substring(24)),null!=sa&&(""==sa.trim()?sa=null:"%"==sa.charAt(0)?sa=decodeURIComponent(sa):"<"!=sa.charAt(0)&&(sa=Graph.decompress(sa)))}catch(Aa){}return sa});if("json"==urlParams.proto){var ca=!1;try{O=JSON.parse(O),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[O])}catch(sa){O=null}try{if(null==O)return;if("dialog"==O.action){this.showError(null!=-O.titleKey?mxResources.get(O.titleKey):O.title,null!=O.messageKey?mxResources.get(O.messageKey):mxUtils.htmlEntities(O.message),null!=O.buttonKey?mxResources.get(O.buttonKey):O.button);null!=O.modified&&(this.editor.modified=O.modified);return}if("layout"==O.action){this.executeLayouts(this.editor.graph.createLayouts(O.layouts));return}if("prompt"==O.action){this.spinner.stop();var V=new FilenameDialog(this,O.defaultValue||"",null!=O.okKey?mxResources.get(O.okKey):O.ok,function(sa){null!=sa?I.postMessage(JSON.stringify({event:"prompt",-value:sa,message:O}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:O}),"*")},null!=O.titleKey?mxResources.get(O.titleKey):O.title,null,null,null,null,function(){I.postMessage(JSON.stringify({event:"prompt-cancel",message:O}),"*")});this.showDialog(V.container,300,80,!0,!1);V.init();return}if("draft"==O.action){var ma=ea(O.xml);this.spinner.stop();V=new DraftDialog(this,mxResources.get("draftFound",[O.name||this.defaultFilename]),ma,mxUtils.bind(this,function(){this.hideDialog();-I.postMessage(JSON.stringify({event:"draft",result:"edit",message:O}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:O}),"*")}),O.editKey?mxResources.get(O.editKey):null,O.discardKey?mxResources.get(O.discardKey):null,O.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:O}),"*")}):null);this.showDialog(V.container,640,480,!0,!1,mxUtils.bind(this,function(sa){sa&&-this.actions.get("exit").funct()}));try{V.init()}catch(sa){I.postMessage(JSON.stringify({event:"draft",error:sa.toString(),message:O}),"*")}return}if("template"==O.action){this.spinner.stop();var la=1==O.enableRecent,Y=1==O.enableSearch,fa=1==O.enableCustomTemp;V=new NewDialog(this,!1,O.templatesOnly?!1:null!=O.callback,mxUtils.bind(this,function(sa,Aa,Ea,Ka){sa=sa||this.emptyDiagramXml;null!=O.callback?I.postMessage(JSON.stringify({event:"template",xml:sa,blank:sa==this.emptyDiagramXml,name:Aa,tempUrl:Ea,-libs:Ka,builtIn:!0,message:O}),"*"):(c(sa,K,sa!=this.emptyDiagramXml,O.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,la?mxUtils.bind(this,function(sa){this.remoteInvoke("getRecentDiagrams",[null],null,sa,function(){sa(null,"Network Error!")})}):null,Y?mxUtils.bind(this,function(sa,Aa){this.remoteInvoke("searchDiagrams",[sa,null],null,Aa,function(){Aa(null,"Network Error!")})}):null,mxUtils.bind(this,function(sa,Aa,Ea){I.postMessage(JSON.stringify({event:"template",-docUrl:sa,info:Aa,name:Ea}),"*")}),null,null,fa?mxUtils.bind(this,function(sa){this.remoteInvoke("getCustomTemplates",null,null,sa,function(){sa({},0)})}):null,1==O.withoutType);this.showDialog(V.container,620,460,!0,!1,mxUtils.bind(this,function(sa){null!=this.sidebar&&this.sidebar.hideTooltip();sa&&this.actions.get("exit").funct()}));V.init();return}if("textContent"==O.action){var Z=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",data:Z,message:O}),"*");return}if("status"==-O.action){null!=O.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(O.messageKey))):null!=O.message&&this.editor.setStatus(mxUtils.htmlEntities(O.message));null!=O.modified&&(this.editor.modified=O.modified);return}if("spinner"==O.action){var l=null!=O.messageKey?mxResources.get(O.messageKey):O.message;null==O.show||O.show?this.spinner.spin(document.body,l):this.spinner.stop();return}if("exit"==O.action){this.actions.get("exit").funct();return}if("viewport"==O.action){null!=O.viewport&&-(this.embedViewport=O.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==O.action){V=null;try{var u=this.diagramContainer.getAttribute("data-scrollState");null!=u&&(this.diagramContainer.removeAttribute("data-scrollState"),V=JSON.parse(u))}catch(sa){}Editor.inlineFullscreen=O.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=V&&this.restoreScrollState(V);return}if("snapshot"==O.action){this.sendEmbeddedSvgExport(!0);-return}if("export"==O.action){if("png"==O.format||"xmlpng"==O.format){if(null==O.spin&&null==O.spinKey||this.spinner.spin(document.body,null!=O.spinKey?mxResources.get(O.spinKey):O.spin)){var H=null!=O.xml?O.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var U=this.editor.graph,J=mxUtils.bind(this,function(sa,Aa){if(O.withSvg)O.withSvg=!1,this.getEmbeddedSvg(H,this.editor.graph,null,!0,function(Ka){J(sa,Ka)},null,null,O.embedImages,this.editor.graph.background,O.scale,O.border,O.shadow,-"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ea=this.createLoadMessage("export");Ea.format=O.format;Ea.message=O;Ea.data=sa;Ea.svg=Aa;Ea.xml=H;I.postMessage(JSON.stringify(Ea),"*")}}),W=mxUtils.bind(this,function(sa){null==sa&&(sa=Editor.blankImage);"xmlpng"==O.format&&(sa=Editor.writeGraphModelToPng(sa,"tEXt","mxfile",encodeURIComponent(H)));U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);J(sa)}),aa=O.pageId||(null!=this.pages?O.currentPage?this.currentPage.getId():-this.pages[0].getId():null);if(this.isExportToCanvas()){var ba=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=aa){var sa=U.getGlobalVariable;U=this.createTemporaryGraph(U.getStylesheet());for(var Aa,Ea=0;Ea<this.pages.length;Ea++)if(this.pages[Ea].getId()==aa){Aa=this.updatePageRoot(this.pages[Ea]);break}null==Aa&&(Aa=this.currentPage);U.getGlobalVariable=function(Wa){return"page"==Wa?Aa.getName():"pagenumber"==Wa?1:sa.apply(this,arguments)};document.body.appendChild(U.container);-U.model.setRoot(Aa.root)}if(null!=O.layerIds){var Ka=U.model,Ma=Ka.getChildCells(Ka.getRoot()),ya={};for(Ea=0;Ea<O.layerIds.length;Ea++)ya[O.layerIds[Ea]]=!0;for(Ea=0;Ea<Ma.length;Ea++)Ka.setVisible(Ma[Ea],ya[Ma[Ea].id]||!1)}Ea=null;O.keepTheme&&(Ea=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Wa){W(Wa.toDataURL("image/png"))}),O.width,null,O.background,mxUtils.bind(this,function(){W(null)}),null,null,O.scale,O.transparent,O.shadow,null,U,O.border,null,-O.grid,Ea)});null!=O.xml&&0<O.xml.length&&(k=!0,this.setFileData(H),k=!1);ba()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==O.format?"1":"0")+(null!=aa?"&pageId="+aa:"")+(null!=O.layerIds&&0<O.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:O.layerIds})):"")+(null!=O.scale?"&scale="+O.scale:"")+"&base64=1&xml="+encodeURIComponent(H))).send(mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?J("data:image/png;base64,"+sa.getText()):W(null)}),-mxUtils.bind(this,function(){W(null)}))}}else if(ba=mxUtils.bind(this,function(){var sa=this.createLoadMessage("export");sa.message=O;if("html2"==O.format||"html"==O.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Aa=this.getXmlFileData();sa.xml=mxUtils.getXml(Aa);sa.data=this.getFileData(null,null,!0,null,null,null,Aa);sa.format=O.format}else if("html"==O.format)Aa=this.editor.getGraphXml(),sa.data=this.getHtml(Aa,this.editor.graph),sa.xml=mxUtils.getXml(Aa),sa.format=-O.format;else{mxSvgCanvas2D.prototype.foAltText=null;Aa=null!=O.background?O.background:this.editor.graph.background;Aa==mxConstants.NONE&&(Aa=null);sa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);sa.format="svg";var Ea=mxUtils.bind(this,function(Ma){this.editor.graph.setEnabled(!0);this.spinner.stop();sa.data=Editor.createSvgDataUri(Ma);I.postMessage(JSON.stringify(sa),"*")}),Ka="auto";O.keepTheme&&(Ka=Editor.isDarkMode()?"dark":"light");null!=O.theme&&(Ka=O.theme);if("xmlsvg"==-O.format){if(null==O.spin&&null==O.spinKey||this.spinner.spin(document.body,null!=O.spinKey?mxResources.get(O.spinKey):O.spin)){Ka=null;if(this.isAutoDarkMode()||Editor.isDarkMode())Ka="auto";null!=O.theme&&(Ka=O.theme);this.getEmbeddedSvg(sa.xml,this.editor.graph,null,!0,Ea,null,null,O.embedImages,Aa,O.scale,O.border,O.shadow,Ka)}}else if(null==O.spin&&null==O.spinKey||this.spinner.spin(document.body,null!=O.spinKey?mxResources.get(O.spinKey):O.spin))this.editor.graph.setEnabled(!1),Aa=this.editor.graph.getSvg(Aa,-O.scale,O.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||O.shadow,null,Ka),(this.editor.graph.shadowVisible||O.shadow)&&this.editor.graph.addSvgShadow(Aa),this.embedFonts(Aa,mxUtils.bind(this,function(Ma){O.embedImages||null==O.embedImages?this.editor.convertImages(Ma,mxUtils.bind(this,function(ya){Ea(mxUtils.getXml(ya))})):Ea(mxUtils.getXml(Ma))}));return}I.postMessage(JSON.stringify(sa),"*")}),null!=O.xml&&0<O.xml.length){if(this.editor.graph.mathEnabled){var ja=Editor.onMathJaxDone;-Editor.onMathJaxDone=function(){ja.apply(this,arguments);ba()}}k=!0;this.setFileData(O.xml);k=!1;this.editor.graph.mathEnabled||ba()}else ba();return}if("load"==O.action){ca=O.toSketch;B=1==O.autosave;this.hideDialog();null!=O.modified&&null==urlParams.modified&&(urlParams.modified=O.modified);null!=O.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=O.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||-this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=O.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=O.noSaveBtn);if(null!=O.rough){var oa=Editor.sketchMode;this.doSetSketchMode(O.rough);oa!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=O.dark&&this.setDarkMode(O.dark);null!=O.border&&(this.embedExportBorder=-O.border);null!=O.theme&&(this.embedExportTheme=O.theme);null!=O.background&&(this.embedExportBackground=O.background);null!=O.viewport&&(this.embedViewport=O.viewport);this.embedExitPoint=null;if(null!=O.rect){var qa=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,O.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,O.rect.top)+"px";this.minInlineWidth=O.minWidth;this.minInlineHeight=O.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom=-"";this.diagramContainer.style.right="";var ra=O.maxFitScale,ua=O.rect.width+2*qa,za=O.rect.height+2*qa;da=mxUtils.bind(this,function(){var sa=mxUtils.getDocumentSize();ua=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,ua):ua,sa.width-80);sa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,za):za,sa.height-80);this.diagramContainer.style.width=ua+"px";this.diagramContainer.style.height=sa+"px";var Aa=this.editor.graph;sa=Aa.maxFitScale;Aa.maxFitScale=ra;Aa.fit(2*-qa,null,null,null,null,null,za);this.setPageVisible(!1);if(null!=this.minInlineWidth&&Aa.getGraphBounds().width<this.minInlineWidth){var Ea=Aa.container.scrollTop;this.resetScrollbars();Aa.container.scrollTop=Ea}Aa.maxFitScale=sa;Aa.container.scrollTop-=qa;Aa.container.scrollLeft-=qa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[O]));Aa.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&-(this.formatWindow.window.div.style.top=Aa.container.style.top);var Ka=Aa.getGraphBounds();Aa.container.clientWidth>Ka.width+2*qa&&(Aa.container.scrollLeft=Ka.x+(Ka.width+qa-Aa.container.clientWidth)/2)}),10)})}null!=O.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=O.noExitBtn);null!=O.title&&null!=this.buttonContainer&&(ma=this.createStatusDiv(""),mxUtils.write(ma,O.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(ma),-this.embedFilenameSpan=ma);try{O.libs&&this.sidebar.showEntries(O.libs)}catch(sa){}O=null!=O.xmlpng?this.extractGraphModelFromPng(O.xmlpng):null!=O.descriptor?O.descriptor:O.xml}else{if("merge"==O.action){var Ba=this.getCurrentFile();null!=Ba&&(ma=ea(O.xml),null!=ma&&""!=ma&&Ba.mergeFile(new LocalFile(this,ma),function(){I.postMessage(JSON.stringify({event:"merge",message:O}),"*")},function(sa){I.postMessage(JSON.stringify({event:"merge",message:O,error:sa}),"*")}))}else"remoteInvokeReady"==O.action?-this.handleRemoteInvokeReady(I):"remoteInvoke"==O.action?this.handleRemoteInvoke(O,K.origin):"remoteInvokeResponse"==O.action?this.handleRemoteInvokeResponse(O):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(O)}),"*");return}}catch(sa){this.handleError(sa)}}var Ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),La=mxUtils.bind(this,function(sa,Aa){k=!0;try{c(sa,-Aa,null,ca)}catch(Ea){this.handleError(Ea)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");z=Ca();B&&null==f&&(f=mxUtils.bind(this,function(Ea,Ka){Ea=Ca();Ea==z||k||(Ka=this.createLoadMessage("autosave"),Ka.xml=Ea,(window.opener||window.parent).postMessage(JSON.stringify(Ka),"*"));z=Ea}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",-f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Aa=this.createLoadMessage("load"),Aa.xml=sa,I.postMessage(JSON.stringify(Aa),"*");null!=da&&da()});null!=O&&"function"===typeof O.substring&&"data:application/vnd.visio;base64,"==-O.substring(0,34)?(ea="0M8R4KGxGuE"==O.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(O.substring(O.indexOf(",")+1)),function(sa){La(sa,K)},mxUtils.bind(this,function(sa){this.handleError(sa)}),ea)):null!=O&&"function"===typeof O.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(O,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(O,mxUtils.bind(this,function(sa){4==sa.readyState&&(200<=sa.status&&-299>=sa.status&&"<mxGraphModel"==sa.responseText.substring(0,13)?La(sa.responseText,K):this.handleError({message:413==sa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=O&&"function"===typeof O.substring&&this.isLucidChartData(O)?this.convertLucidChart(O,mxUtils.bind(this,function(sa){La(sa)}),mxUtils.bind(this,function(sa){this.handleError(sa)})):null==O||"object"!==typeof O||null==O.format||null==O.data&&null==O.url?(O=ea(O),La(O,K)):this.loadDescriptor(O,-mxUtils.bind(this,function(sa){La(Ca(),K)}),mxUtils.bind(this,function(sa){this.handleError(sa,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(C,"*");if("json"==urlParams.proto){var L=this.editor.graph.openLink;this.editor.graph.openLink=function(K,O,da){L.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:K,target:O,allowOpener:da}),"*")}}};EditorUi.prototype.createEmbedButton=-function(c,f,k,B){var z="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement("button");C.setAttribute("title",c+(null!=k?" ("+k+")":""));C.style.marginLeft="6px";mxUtils.write(C,c);z?(C.className=B?"gePrimaryBtn":"",C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(B?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");+c?"":"hidden");c||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,t,z){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;+this.setFileData(f);if(z)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var F=C.model.cells,N;for(N in F){var K=F[N];null!=K&&null!=K.style&&(K.style+=";sketch=1;"+(-1==K.style.indexOf("fontFamily=")||-1<K.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(I){console.log(I)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();+this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=t?t:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,+f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;+f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(z){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(z)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||+l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(z){c||this.handleError(z)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,z=null,C=mxUtils.bind(this,function(K,I){this.editor.modified&&+"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(K){if(K.source==(window.opener||window.parent)){var I=K.data,ca=null,da=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):+"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(ya){}return ra});if("json"==urlParams.proto){var ea=!1;try{I=JSON.parse(I),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[I])}catch(ra){I=null}try{if(null==I)return;if("dialog"==I.action){this.showError(null!=+I.titleKey?mxResources.get(I.titleKey):I.title,null!=I.messageKey?mxResources.get(I.messageKey):mxUtils.htmlEntities(I.message),null!=I.buttonKey?mxResources.get(I.buttonKey):I.button);null!=I.modified&&(this.editor.modified=I.modified);return}if("layout"==I.action){this.executeLayouts(this.editor.graph.createLayouts(I.layouts));return}if("prompt"==I.action){this.spinner.stop();var X=new FilenameDialog(this,I.defaultValue||"",null!=I.okKey?mxResources.get(I.okKey):I.ok,function(ra){null!=ra?F.postMessage(JSON.stringify({event:"prompt",+value:ra,message:I}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:I}),"*")},null!=I.titleKey?mxResources.get(I.titleKey):I.title,null,null,null,null,function(){F.postMessage(JSON.stringify({event:"prompt-cancel",message:I}),"*")});this.showDialog(X.container,300,80,!0,!1);X.init();return}if("draft"==I.action){var ba=da(I.xml);this.spinner.stop();X=new DraftDialog(this,mxResources.get("draftFound",[I.name||this.defaultFilename]),ba,mxUtils.bind(this,function(){this.hideDialog();+F.postMessage(JSON.stringify({event:"draft",result:"edit",message:I}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:I}),"*")}),I.editKey?mxResources.get(I.editKey):null,I.discardKey?mxResources.get(I.discardKey):null,I.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:I}),"*")}):null);this.showDialog(X.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&+this.actions.get("exit").funct()}));try{X.init()}catch(ra){F.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:I}),"*")}return}if("template"==I.action){this.spinner.stop();var ha=1==I.enableRecent,ma=1==I.enableSearch,Y=1==I.enableCustomTemp;X=new NewDialog(this,!1,I.templatesOnly?!1:null!=I.callback,mxUtils.bind(this,function(ra,ya,Ca,Ma){ra=ra||this.emptyDiagramXml;null!=I.callback?F.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ya,tempUrl:Ca,+libs:Ma,builtIn:!0,message:I}),"*"):(c(ra,K,ra!=this.emptyDiagramXml,I.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):null,ma?mxUtils.bind(this,function(ra,ya){this.remoteInvoke("searchDiagrams",[ra,null],null,ya,function(){ya(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,ya,Ca){F.postMessage(JSON.stringify({event:"template",+docUrl:ra,info:ya,name:Ca}),"*")}),null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==I.withoutType);this.showDialog(X.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));X.init();return}if("textContent"==I.action){var la=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:la,message:I}),"*");return}if("status"==+I.action){null!=I.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(I.messageKey))):null!=I.message&&this.editor.setStatus(mxUtils.htmlEntities(I.message));null!=I.modified&&(this.editor.modified=I.modified);return}if("spinner"==I.action){var Z=null!=I.messageKey?mxResources.get(I.messageKey):I.message;null==I.show||I.show?this.spinner.spin(document.body,Z):this.spinner.stop();return}if("exit"==I.action){this.actions.get("exit").funct();return}if("viewport"==I.action){null!=I.viewport&&+(this.embedViewport=I.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==I.action){X=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),X=JSON.parse(k))}catch(ra){}Editor.inlineFullscreen=I.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=X&&this.restoreScrollState(X);return}if("snapshot"==I.action){this.sendEmbeddedSvgExport(!0);+return}if("export"==I.action){if("png"==I.format||"xmlpng"==I.format){if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin)){var A=null!=I.xml?I.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var J=this.editor.graph,U=mxUtils.bind(this,function(ra,ya){if(I.withSvg)I.withSvg=!1,this.getEmbeddedSvg(A,this.editor.graph,null,!0,function(Ma){U(ra,Ma)},null,null,I.embedImages,this.editor.graph.background,I.scale,I.border,I.shadow,+"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ca=this.createLoadMessage("export");Ca.format=I.format;Ca.message=I;Ca.data=ra;Ca.svg=ya;Ca.xml=A;F.postMessage(JSON.stringify(Ca),"*")}}),P=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==I.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(A)));J!=this.editor.graph&&J.container.parentNode.removeChild(J.container);U(ra)}),T=I.pageId||(null!=this.pages?I.currentPage?this.currentPage.getId():+this.pages[0].getId():null);if(this.isExportToCanvas()){var W=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=T){var ra=J.getGlobalVariable;J=this.createTemporaryGraph(J.getStylesheet());for(var ya,Ca=0;Ca<this.pages.length;Ca++)if(this.pages[Ca].getId()==T){ya=this.updatePageRoot(this.pages[Ca]);break}null==ya&&(ya=this.currentPage);J.getGlobalVariable=function(Ra){return"page"==Ra?ya.getName():"pagenumber"==Ra?1:ra.apply(this,arguments)};document.body.appendChild(J.container);+J.model.setRoot(ya.root)}if(null!=I.layerIds){var Ma=J.model,Ha=Ma.getChildCells(Ma.getRoot()),Aa={};for(Ca=0;Ca<I.layerIds.length;Ca++)Aa[I.layerIds[Ca]]=!0;for(Ca=0;Ca<Ha.length;Ca++)Ma.setVisible(Ha[Ca],Aa[Ha[Ca].id]||!1)}Ca=null;I.keepTheme&&(Ca=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){P(Ra.toDataURL("image/png"))}),I.width,null,I.background,mxUtils.bind(this,function(){P(null)}),null,null,I.scale,I.transparent,I.shadow,null,J,I.border,null,+I.grid,Ca)});null!=I.xml&&0<I.xml.length&&(l=!0,this.setFileData(A),l=!1);W()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==I.format?"1":"0")+(null!=T?"&pageId="+T:"")+(null!=I.layerIds&&0<I.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:I.layerIds})):"")+(null!=I.scale?"&scale="+I.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?U("data:image/png;base64,"+ra.getText()):P(null)}),+mxUtils.bind(this,function(){P(null)}))}}else if(W=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=I;if("html2"==I.format||"html"==I.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ya=this.getXmlFileData();ra.xml=mxUtils.getXml(ya);ra.data=this.getFileData(null,null,!0,null,null,null,ya);ra.format=I.format}else if("html"==I.format)ya=this.editor.getGraphXml(),ra.data=this.getHtml(ya,this.editor.graph),ra.xml=mxUtils.getXml(ya),ra.format=I.format;+else{mxSvgCanvas2D.prototype.foAltText=null;ya=null!=I.background?I.background:this.editor.graph.background;ya==mxConstants.NONE&&(ya=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Ca=mxUtils.bind(this,function(Ha){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=Editor.createSvgDataUri(Ha);F.postMessage(JSON.stringify(ra),"*")}),Ma="auto";I.keepTheme&&(Ma=Editor.isDarkMode()?"dark":"light");null!=I.theme&&(Ma=I.theme);if("xmlsvg"==I.format){if(null==+I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin)){Ma=null;if(this.isAutoDarkMode()||Editor.isDarkMode())Ma="auto";null!=I.theme&&(Ma=I.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,null,!0,Ca,null,null,I.embedImages,ya,I.scale,I.border,I.shadow,Ma)}}else if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin))this.editor.graph.setEnabled(!1),ya=this.editor.graph.getSvg(ya,+I.scale,I.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||I.shadow,null,Ma),(this.editor.graph.shadowVisible||I.shadow)&&this.editor.graph.addSvgShadow(ya),this.embedFonts(ya,mxUtils.bind(this,function(Ha){I.embedImages||null==I.embedImages?this.editor.convertImages(Ha,mxUtils.bind(this,function(Aa){Ca(mxUtils.getXml(Aa))})):Ca(mxUtils.getXml(Ha))}));return}F.postMessage(JSON.stringify(ra),"*")}),null!=I.xml&&0<I.xml.length){if(this.editor.graph.mathEnabled){var aa=Editor.onMathJaxDone;+Editor.onMathJaxDone=function(){aa.apply(this,arguments);W()}}l=!0;this.setFileData(I.xml);l=!1;this.editor.graph.mathEnabled||W()}else W();return}if("load"==I.action){ea=I.toSketch;t=1==I.autosave;this.hideDialog();null!=I.modified&&null==urlParams.modified&&(urlParams.modified=I.modified);null!=I.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=I.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||+this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=I.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=I.noSaveBtn);if(null!=I.rough){var ja=Editor.sketchMode;this.doSetSketchMode(I.rough);ja!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=I.dark&&this.setDarkMode(I.dark);null!=I.border&&(this.embedExportBorder=+I.border);null!=I.theme&&(this.embedExportTheme=I.theme);null!=I.background&&(this.embedExportBackground=I.background);null!=I.viewport&&(this.embedViewport=I.viewport);this.embedExitPoint=null;if(null!=I.rect){var pa=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,I.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,I.rect.top)+"px";this.minInlineWidth=I.minWidth;this.minInlineHeight=I.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom=+"";this.diagramContainer.style.right="";var sa=I.maxFitScale,qa=I.rect.width+2*pa,wa=I.rect.height+2*pa;ca=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();qa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,qa):qa,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,wa):wa,ra.height-80);this.diagramContainer.style.width=qa+"px";this.diagramContainer.style.height=ra+"px";var ya=this.editor.graph;ra=ya.maxFitScale;ya.maxFitScale=sa;ya.fit(2*+pa,null,null,null,null,null,wa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ya.getGraphBounds().width<this.minInlineWidth){var Ca=ya.container.scrollTop;this.resetScrollbars();ya.container.scrollTop=Ca}ya.maxFitScale=ra;ya.container.scrollTop-=pa;ya.container.scrollLeft-=pa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[I]));ya.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&+(this.formatWindow.window.div.style.top=ya.container.style.top);var Ma=ya.getGraphBounds();ya.container.clientWidth>Ma.width+2*pa&&(ya.container.scrollLeft=Ma.x+(Ma.width+pa-ya.container.clientWidth)/2)}),10)})}null!=I.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=I.noExitBtn);null!=I.title&&null!=this.buttonContainer&&(ba=this.createStatusDiv(""),mxUtils.write(ba,I.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(ba),+this.embedFilenameSpan=ba);try{I.libs&&this.sidebar.showEntries(I.libs)}catch(ra){}I=null!=I.xmlpng?this.extractGraphModelFromPng(I.xmlpng):null!=I.descriptor?I.descriptor:I.xml}else{if("merge"==I.action){var Ba=this.getCurrentFile();null!=Ba&&(ba=da(I.xml),null!=ba&&""!=ba&&Ba.mergeFile(new LocalFile(this,ba),function(){F.postMessage(JSON.stringify({event:"merge",message:I}),"*")},function(ra){F.postMessage(JSON.stringify({event:"merge",message:I,error:ra}),"*")}))}else"remoteInvokeReady"==I.action?+this.handleRemoteInvokeReady(F):"remoteInvoke"==I.action?this.handleRemoteInvoke(I,K.origin):"remoteInvokeResponse"==I.action?this.handleRemoteInvokeResponse(I):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(I)}),"*");return}}catch(ra){this.handleError(ra)}}var za=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ea=mxUtils.bind(this,function(ra,ya){l=!0;try{c(ra,+ya,null,ea)}catch(Ca){this.handleError(Ca)}l=!1;null!=urlParams.modified&&this.editor.setStatus("");z=za();t&&null==f&&(f=mxUtils.bind(this,function(Ca,Ma){Ca=za();Ca==z||l||(Ma=this.createLoadMessage("autosave"),Ma.xml=Ca,(window.opener||window.parent).postMessage(JSON.stringify(Ma),"*"));z=Ca}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",+f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ya=this.createLoadMessage("load"),ya.xml=ra,F.postMessage(JSON.stringify(ya),"*");null!=ca&&ca()});null!=I&&"function"===typeof I.substring&&"data:application/vnd.visio;base64,"==+I.substring(0,34)?(da="0M8R4KGxGuE"==I.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(I.substring(I.indexOf(",")+1)),function(ra){Ea(ra,K)},mxUtils.bind(this,function(ra){this.handleError(ra)}),da)):null!=I&&"function"===typeof I.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(I,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(I,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&+299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ea(ra.responseText,K):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=I&&"function"===typeof I.substring&&this.isLucidChartData(I)?this.convertLucidChart(I,mxUtils.bind(this,function(ra){Ea(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==I||"object"!==typeof I||null==I.format||null==I.data&&null==I.url?(I=da(I),Ea(I,K)):this.loadDescriptor(I,+mxUtils.bind(this,function(ra){Ea(za(),K)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(C,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(K,I,ca){N.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:K,target:I,allowOpener:ca}),"*")}}};EditorUi.prototype.createEmbedButton=+function(c,f,l,t){var z="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement("button");C.setAttribute("title",c+(null!=l?" ("+l+")":""));C.style.marginLeft="6px";mxUtils.write(C,c);z?(C.className=t?"gePrimaryBtn":"",C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(t?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(c.style.marginRight="66px",c.style["float"]="right","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c)):(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var f=new TextareaDialog(this,mxResources.get("layout"),-c,mxUtils.bind(this,function(k){if(0<k.length)try{var B=JSON.parse(k);this.executeLayouts(this.editor.graph.createLayouts(B));this.customLayoutConfig=B;this.hideDialog()}catch(z){this.handleError(z)}}),null,null,null,null,mxUtils.bind(this,function(k,B){var z=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var C=B.value;B.value=JSON.stringify(JSON.parse(C));B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null);-document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));B.value=C}catch(I){this.handleError(I)}}));z.setAttribute("title","copy");z.className="geBtn";k.appendChild(z)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var k=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),-this.spinner.stop(),c())}),B=mxUtils.bind(this,function(z){this.loadingOrgChart=!1;f.clear()&&this.handleError(z)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?k():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",-k,null,null,null,B)},null,null,null,B)},null,null,null,B)},null,null,null,B):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",k,null,null,null,B))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var k=c.split("\n"),B=[],z=[],C=[],I={};if(0<k.length){var L={},K=this.editor.graph,O=null,da=null,ea=null,ca=null,V=null,ma=null,la=null,Y="whiteSpace=wrap;html=1;",-fa=null,Z=null,l="",u="auto",H="auto",U=!1,J=null,W=null,aa=40,ba=40,ja=100,oa=0,qa=mxUtils.bind(this,function(){null!=f?f(Da):(K.setSelectionCells(Da),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),ra=K.getFreeInsertPoint(),ua=ra.x,za=ra.y;ra=za;var Ba=null,Ca="auto";Z=null;for(var La=[],sa=null,Aa=null,Ea=0;Ea<k.length&&"#"==k[Ea].charAt(0);){c=k[Ea].replace(/\r$/,"");for(Ea++;Ea<k.length&&-"\\"==c.charAt(c.length-1)&&"#"==k[Ea].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(k[Ea].substring(1)),Ea++;if("#"!=c.charAt(1)){var Ka=c.indexOf(":");if(0<Ka){var Ma=mxUtils.trim(c.substring(1,Ka)),ya=mxUtils.trim(c.substring(Ka+1));"label"==Ma?Ba=Graph.sanitizeHtml(ya):"labelname"==Ma&&0<ya.length&&"-"!=ya?V=ya:"labels"==Ma&&0<ya.length&&"-"!=ya?la=JSON.parse(ya):"style"==Ma?da=ya:"parentstyle"==Ma?Y=ya:"unknownStyle"==Ma&&"-"!=ya?ma=ya:"stylename"==Ma&&0<ya.length&&"-"!=ya?ca=ya:"styles"==-Ma&&0<ya.length&&"-"!=ya?ea=JSON.parse(ya):"vars"==Ma&&0<ya.length&&"-"!=ya?O=JSON.parse(ya):"identity"==Ma&&0<ya.length&&"-"!=ya?fa=ya:"parent"==Ma&&0<ya.length&&"-"!=ya?Z=ya:"namespace"==Ma&&0<ya.length&&"-"!=ya?l=ya:"width"==Ma?u=ya:"height"==Ma?H=ya:"collapsed"==Ma&&"-"!=ya?U="true"==ya:"left"==Ma&&0<ya.length?J=ya:"top"==Ma&&0<ya.length?W=ya:"ignore"==Ma?Aa=ya.split(","):"connect"==Ma?La.push(JSON.parse(ya)):"link"==Ma?sa=ya:"padding"==Ma?oa=parseFloat(ya):"edgespacing"==Ma?aa=parseFloat(ya):-"nodespacing"==Ma?ba=parseFloat(ya):"levelspacing"==Ma?ja=parseFloat(ya):"layout"==Ma&&(Ca=ya)}}}if(null==k[Ea])throw Error(mxResources.get("invalidOrMissingFile"));var Wa=this.editor.csvToArray(k[Ea].replace(/\r$/,""));Ka=c=null;Ma=[];for(ya=0;ya<Wa.length;ya++)fa==Wa[ya]&&(c=ya),Z==Wa[ya]&&(Ka=ya),Ma.push(mxUtils.trim(Wa[ya]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ma[0]+"%");if(null!=La)for(var Ia=0;Ia<La.length;Ia++)null==L[La[Ia].to]&&(L[La[Ia].to]=-{});fa=[];for(ya=Ea+1;ya<k.length;ya++){var Xa=this.editor.csvToArray(k[ya].replace(/\r$/,""));if(null==Xa){var Pa=40<k[ya].length?k[ya].substring(0,40)+"...":k[ya];throw Error(Pa+" ("+ya+"):\n"+mxResources.get("containsValidationErrors"));}0<Xa.length&&fa.push(Xa)}K.model.beginUpdate();try{for(ya=0;ya<fa.length;ya++){Xa=fa[ya];var t=null,N=null!=c?l+Xa[c]:null;k=!1;null!=N&&(t=K.model.getCell(N),k=null==t||0<=mxUtils.indexOf(B,t));var Q=new mxCell(Ba,new mxGeometry(ua,ra,0,0),da||"whiteSpace=wrap;html=1;");-Q.collapsed=U;Q.vertex=!0;Q.id=N;null==t||k||K.model.setCollapsed(t,U);for(var X=0;X<Xa.length;X++)K.setAttributeForCell(Q,Ma[X],Xa[X]),null==t||k||K.setAttributeForCell(t,Ma[X],Xa[X]);if(null!=V&&null!=la){var ia=la[Q.getAttribute(V)];null!=ia&&(K.labelChanged(Q,ia),null==t||k||K.cellLabelChanged(t,ia))}if(null!=ca&&null!=ea){var ka=ea[Q.getAttribute(ca)];null!=ka&&(Q.style=ka)}K.setAttributeForCell(Q,"placeholders","1");Q.style=K.replacePlaceholders(Q,Q.style,O);null==t||k?K.fireEvent(new mxEventObject("cellsInserted",-"cells",[Q])):(K.model.setStyle(t,Q.style),0>mxUtils.indexOf(C,t)&&C.push(t),K.fireEvent(new mxEventObject("cellsInserted","cells",[t])));k=null!=t;t=Q;if(!k)for(Ia=0;Ia<La.length;Ia++)L[La[Ia].to][t.getAttribute(La[Ia].to)]=t;null!=sa&&"link"!=sa&&(K.setLinkForCell(t,t.getAttribute(sa)),K.setAttributeForCell(t,sa,null));var pa=this.editor.graph.getPreferredSizeForCell(t);Z=null!=Ka?K.model.getCell(l+Xa[Ka]):null;if(t.vertex){Pa=null!=Z?0:ua;Ea=null!=Z?0:za;null!=J&&null!=t.getAttribute(J)&&(t.geometry.x=-Pa+parseFloat(t.getAttribute(J)));null!=W&&null!=t.getAttribute(W)&&(t.geometry.y=Ea+parseFloat(t.getAttribute(W)));var xa="@"==u.charAt(0)?t.getAttribute(u.substring(1)):null;t.geometry.width=null!=xa&&"auto"!=xa?parseFloat(t.getAttribute(u.substring(1))):"auto"==u||"auto"==xa?pa.width+oa:parseFloat(u);var ta="@"==H.charAt(0)?t.getAttribute(H.substring(1)):null;t.geometry.height=null!=ta&&"auto"!=ta&&"width"!=H?parseFloat(ta):"auto"==H||"auto"==ta?pa.height+oa:"width"==H?t.geometry.width:parseFloat(H);-ra+=t.geometry.height+ba}k?(null==I[N]&&(I[N]=[]),I[N].push(t)):(B.push(t),null!=Z?(Z.style=K.replacePlaceholders(Z,Y,O),K.addCell(t,Z),z.push(Z)):C.push(K.addCell(t)))}for(ya=0;ya<z.length;ya++)xa="@"==u.charAt(0)?z[ya].getAttribute(u.substring(1)):null,ta="@"==H.charAt(0)?z[ya].getAttribute(H.substring(1)):null,"auto"!=u&&"auto"!=xa||"auto"!=H&&"auto"!=ta||K.updateGroupBounds([z[ya]],oa,!0);var va=C.slice(),Da=C.slice();for(Ia=0;Ia<La.length;Ia++){var Na=La[Ia];for(ya=0;ya<B.length;ya++){t=B[ya];-var Ya=mxUtils.bind(this,function(nb,lb,db){var mb=lb.getAttribute(db.from);if(null!=mb&&""!=mb){mb=mb.split(",");for(var ub=0;ub<mb.length;ub++){var eb=L[db.to][mb[ub]];if(null==eb&&null!=ma){eb=new mxCell(mb[ub],new mxGeometry(ua,za,0,0),ma);eb.style=K.replacePlaceholders(lb,eb.style,O);var ob=this.editor.graph.getPreferredSizeForCell(eb);eb.geometry.width=ob.width+oa;eb.geometry.height=ob.height+oa;L[db.to][mb[ub]]=eb;eb.vertex=!0;eb.id=mb[ub];C.push(K.addCell(eb))}if(null!=eb){ob=db.label;null!=-db.fromlabel&&(ob=(lb.getAttribute(db.fromlabel)||"")+(ob||""));null!=db.sourcelabel&&(ob=K.replacePlaceholders(lb,db.sourcelabel,O)+(ob||""));null!=db.tolabel&&(ob=(ob||"")+(eb.getAttribute(db.tolabel)||""));null!=db.targetlabel&&(ob=(ob||"")+K.replacePlaceholders(eb,db.targetlabel,O));var tb="target"==db.placeholders==!db.invert?eb:nb;tb=null!=db.style?K.replacePlaceholders(tb,db.style,O):K.createCurrentEdgeStyle();ob=K.insertEdge(null,null,ob||"",db.invert?eb:nb,db.invert?nb:eb,tb);if(null!=db.labels)for(tb=-0;tb<db.labels.length;tb++){var pb=db.labels[tb],wb=new mxCell(pb.label||tb,new mxGeometry(null!=pb.x?pb.x:0,null!=pb.y?pb.y:0,0,0),"resizable=0;html=1;");wb.vertex=!0;wb.connectable=!1;wb.geometry.relative=!0;null!=pb.placeholders&&(wb.value=K.replacePlaceholders("target"==pb.placeholders==!db.invert?eb:nb,wb.value,O));if(null!=pb.dx||null!=pb.dy)wb.geometry.offset=new mxPoint(null!=pb.dx?pb.dx:0,null!=pb.dy?pb.dy:0);ob.insert(wb)}if(null!=db.data)for(var vb in db.data)K.setAttributeForCell(ob,vb,-db.data[vb]);Da.push(ob);mxUtils.remove(db.invert?nb:eb,va)}}}});Ya(t,t,Na);if(null!=I[t.id])for(X=0;X<I[t.id].length;X++)Ya(t,I[t.id][X],Na)}}if(null!=Aa)for(ya=0;ya<B.length;ya++)for(t=B[ya],X=0;X<Aa.length;X++)K.setAttributeForCell(t,mxUtils.trim(Aa[X]),null);if(0<C.length){var Za=new mxParallelEdgeLayout(K);Za.spacing=aa;Za.checkOverlap=!0;var ab=function(){0<Za.spacing&&Za.execute(K.getDefaultParent());for(var nb=0;nb<C.length;nb++){var lb=K.getCellGeometry(C[nb]);lb.x=Math.round(K.snap(lb.x));-lb.y=Math.round(K.snap(lb.y));"auto"==u&&(lb.width=Math.round(K.snap(lb.width)));"auto"==H&&(lb.height=Math.round(K.snap(lb.height)))}};if("["==Ca.charAt(0)){var Ra=qa;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(Ca)),function(){ab();Ra()});qa=null}else if("circle"==Ca){var Oa=new mxCircleLayout(K);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var kb=Oa.isVertexIgnored;Oa.isVertexIgnored=function(nb){return kb.apply(this,arguments)||0>mxUtils.indexOf(C,nb)};this.executeLayout(function(){Oa.execute(K.getDefaultParent());-ab()},!0,qa);qa=null}else if("horizontaltree"==Ca||"verticaltree"==Ca||"auto"==Ca&&Da.length==2*C.length-1&&1==va.length){K.view.validate();var cb=new mxCompactTreeLayout(K,"horizontaltree"==Ca);cb.levelDistance=ba;cb.edgeRouting=!1;cb.resetEdges=!1;cb.sortEdges=!0;this.executeLayout(function(){cb.execute(K.getDefaultParent(),0<va.length?va[0]:null)},!0,qa);qa=null}else if("horizontalflow"==Ca||"verticalflow"==Ca||"auto"==Ca&&1==va.length){K.view.validate();var $a=new mxHierarchicalLayout(K,"horizontalflow"==-Ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);$a.intraCellSpacing=ba;$a.parallelEdgeSpacing=aa;$a.interRankCellSpacing=ja;$a.disableEdgeStyle=!1;this.executeLayout(function(){$a.execute(K.getDefaultParent(),Da);K.moveCells(Da,ua,za)},!0,qa);qa=null}else if("orgchart"==Ca){K.view.validate();var fb=new mxOrgChartLayout(K,2,ja,ba),jb=fb.isVertexIgnored;fb.isVertexIgnored=function(nb){return jb.apply(this,arguments)||0>mxUtils.indexOf(C,nb)};this.executeLayout(function(){fb.execute(K.getDefaultParent());-ab()},!0,qa);qa=null}else if("organic"==Ca||"auto"==Ca&&Da.length>C.length){K.view.validate();var sb=new mxFastOrganicLayout(K);sb.forceConstant=3*ba;sb.disableEdgeStyle=!1;sb.resetEdges=!1;var Ab=sb.isVertexIgnored;sb.isVertexIgnored=function(nb){return Ab.apply(this,arguments)||0>mxUtils.indexOf(C,nb)};this.executeLayout(function(){sb.execute(K.getDefaultParent());ab()},!0,qa);qa=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=qa&&qa()}}catch(nb){this.handleError(nb)}};EditorUi.prototype.getSearch=-function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var k="?",B;for(B in urlParams)0>mxUtils.indexOf(c,B)&&null!=urlParams[B]&&(f+=k+B+"="+urlParams[B],k="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),-B;for(B in urlParams)0>mxUtils.indexOf(k,B)&&(c=0==f?c+"?":c+"&",null!=urlParams[B]&&(c+=B+"="+urlParams[B],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,k,B,z){c=new LinkDialog(this,c,f,k,!0,B,z);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||-f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var k=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!k);-this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);-this.actions.get("smartFit").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("darkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("lightMode").setEnabled("atlas"!=Editor.currentTheme);k=this.actions.get("autoMode");k.setEnabled(k.isEnabled()&&"atlas"!=Editor.currentTheme);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=+c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(z){this.handleError(z)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var z=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var C=t.value;t.value=JSON.stringify(JSON.parse(C));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null);+document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=C}catch(F){this.handleError(F)}}));z.setAttribute("title","copy");z.className="geBtn";l.appendChild(z)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),+this.spinner.stop(),c())}),t=mxUtils.bind(this,function(z){this.loadingOrgChart=!1;f.clear()&&this.handleError(z)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",+l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],z=[],C=[],F={};if(0<l.length){var N={},K=this.editor.graph,I=null,ca=null,da=null,ea=null,X=null,ba=null,ha=null,ma="whiteSpace=wrap;html=1;",+Y=null,la=null,Z="",k="auto",A="auto",J=!1,U=null,P=null,T=40,W=40,aa=100,ja=0,pa=mxUtils.bind(this,function(){null!=f?f(ua):(K.setSelectionCells(ua),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=K.getFreeInsertPoint(),qa=sa.x,wa=sa.y;sa=wa;var Ba=null,za="auto";la=null;for(var Ea=[],ra=null,ya=null,Ca=0;Ca<l.length&&"#"==l[Ca].charAt(0);){c=l[Ca].replace(/\r$/,"");for(Ca++;Ca<l.length&&+"\\"==c.charAt(c.length-1)&&"#"==l[Ca].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[Ca].substring(1)),Ca++;if("#"!=c.charAt(1)){var Ma=c.indexOf(":");if(0<Ma){var Ha=mxUtils.trim(c.substring(1,Ma)),Aa=mxUtils.trim(c.substring(Ma+1));"label"==Ha?Ba=Graph.sanitizeHtml(Aa):"labelname"==Ha&&0<Aa.length&&"-"!=Aa?X=Aa:"labels"==Ha&&0<Aa.length&&"-"!=Aa?ha=JSON.parse(Aa):"style"==Ha?ca=Aa:"parentstyle"==Ha?ma=Aa:"unknownStyle"==Ha&&"-"!=Aa?ba=Aa:"stylename"==Ha&&0<Aa.length&&"-"!=Aa?ea=Aa:"styles"==+Ha&&0<Aa.length&&"-"!=Aa?da=JSON.parse(Aa):"vars"==Ha&&0<Aa.length&&"-"!=Aa?I=JSON.parse(Aa):"identity"==Ha&&0<Aa.length&&"-"!=Aa?Y=Aa:"parent"==Ha&&0<Aa.length&&"-"!=Aa?la=Aa:"namespace"==Ha&&0<Aa.length&&"-"!=Aa?Z=Aa:"width"==Ha?k=Aa:"height"==Ha?A=Aa:"collapsed"==Ha&&"-"!=Aa?J="true"==Aa:"left"==Ha&&0<Aa.length?U=Aa:"top"==Ha&&0<Aa.length?P=Aa:"ignore"==Ha?ya=Aa.split(","):"connect"==Ha?Ea.push(JSON.parse(Aa)):"link"==Ha?ra=Aa:"padding"==Ha?ja=parseFloat(Aa):"edgespacing"==Ha?T=parseFloat(Aa):+"nodespacing"==Ha?W=parseFloat(Aa):"levelspacing"==Ha?aa=parseFloat(Aa):"layout"==Ha&&(za=Aa)}}}if(null==l[Ca])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[Ca].replace(/\r$/,""));Ma=c=null;Ha=[];for(Aa=0;Aa<Ra.length;Aa++)Y==Ra[Aa]&&(c=Aa),la==Ra[Aa]&&(Ma=Aa),Ha.push(mxUtils.trim(Ra[Aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ha[0]+"%");if(null!=Ea)for(var Za=0;Za<Ea.length;Za++)null==N[Ea[Za].to]&&(N[Ea[Za].to]=+{});Y=[];for(Aa=Ca+1;Aa<l.length;Aa++){var La=this.editor.csvToArray(l[Aa].replace(/\r$/,""));if(null==La){var $a=40<l[Aa].length?l[Aa].substring(0,40)+"...":l[Aa];throw Error($a+" ("+Aa+"):\n"+mxResources.get("containsValidationErrors"));}0<La.length&&Y.push(La)}K.model.beginUpdate();try{for(Aa=0;Aa<Y.length;Aa++){La=Y[Aa];var Da=null,x=null!=c?Z+La[c]:null;l=!1;null!=x&&(Da=K.model.getCell(x),l=null==Da||0<=mxUtils.indexOf(t,Da));var M=new mxCell(Ba,new mxGeometry(qa,sa,0,0),ca||"whiteSpace=wrap;html=1;");+M.collapsed=J;M.vertex=!0;M.id=x;null==Da||l||K.model.setCollapsed(Da,J);for(var Q=0;Q<La.length;Q++)K.setAttributeForCell(M,Ha[Q],La[Q]),null==Da||l||K.setAttributeForCell(Da,Ha[Q],La[Q]);if(null!=X&&null!=ha){var V=ha[M.getAttribute(X)];null!=V&&(K.labelChanged(M,V),null==Da||l||K.cellLabelChanged(Da,V))}if(null!=ea&&null!=da){var ia=da[M.getAttribute(ea)];null!=ia&&(M.style=ia)}K.setAttributeForCell(M,"placeholders","1");M.style=K.replacePlaceholders(M,M.style,I);null==Da||l?K.fireEvent(new mxEventObject("cellsInserted",+"cells",[M])):(K.model.setStyle(Da,M.style),0>mxUtils.indexOf(C,Da)&&C.push(Da),K.fireEvent(new mxEventObject("cellsInserted","cells",[Da])));l=null!=Da;Da=M;if(!l)for(Za=0;Za<Ea.length;Za++)N[Ea[Za].to][Da.getAttribute(Ea[Za].to)]=Da;null!=ra&&"link"!=ra&&(K.setLinkForCell(Da,Da.getAttribute(ra)),K.setAttributeForCell(Da,ra,null));var ka=this.editor.graph.getPreferredSizeForCell(Da);la=null!=Ma?K.model.getCell(Z+La[Ma]):null;if(Da.vertex){$a=null!=la?0:qa;Ca=null!=la?0:wa;null!=U&&null!=Da.getAttribute(U)&&+(Da.geometry.x=$a+parseFloat(Da.getAttribute(U)));null!=P&&null!=Da.getAttribute(P)&&(Da.geometry.y=Ca+parseFloat(Da.getAttribute(P)));var oa="@"==k.charAt(0)?Da.getAttribute(k.substring(1)):null;Da.geometry.width=null!=oa&&"auto"!=oa?parseFloat(Da.getAttribute(k.substring(1))):"auto"==k||"auto"==oa?ka.width+ja:parseFloat(k);var xa="@"==A.charAt(0)?Da.getAttribute(A.substring(1)):null;Da.geometry.height=null!=xa&&"auto"!=xa&&"width"!=A?parseFloat(xa):"auto"==A||"auto"==xa?ka.height+ja:"width"==A?+Da.geometry.width:parseFloat(A);sa+=Da.geometry.height+W}l?(null==F[x]&&(F[x]=[]),F[x].push(Da)):(t.push(Da),null!=la?(la.style=K.replacePlaceholders(la,ma,I),K.addCell(Da,la),z.push(la)):C.push(K.addCell(Da)))}for(Aa=0;Aa<z.length;Aa++)oa="@"==k.charAt(0)?z[Aa].getAttribute(k.substring(1)):null,xa="@"==A.charAt(0)?z[Aa].getAttribute(A.substring(1)):null,"auto"!=k&&"auto"!=oa||"auto"!=A&&"auto"!=xa||K.updateGroupBounds([z[Aa]],ja,!0);var ta=C.slice(),ua=C.slice();for(Za=0;Za<Ea.length;Za++){var Fa=+Ea[Za];for(Aa=0;Aa<t.length;Aa++){Da=t[Aa];var Na=mxUtils.bind(this,function(mb,pb,db){var qb=pb.getAttribute(db.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var nb=0;nb<qb.length;nb++){var lb=N[db.to][qb[nb]];if(null==lb&&null!=ba){lb=new mxCell(qb[nb],new mxGeometry(qa,wa,0,0),ba);lb.style=K.replacePlaceholders(pb,lb.style,I);var eb=this.editor.graph.getPreferredSizeForCell(lb);lb.geometry.width=eb.width+ja;lb.geometry.height=eb.height+ja;N[db.to][qb[nb]]=lb;lb.vertex=!0;lb.id=qb[nb];C.push(K.addCell(lb))}if(null!=+lb){eb=db.label;null!=db.fromlabel&&(eb=(pb.getAttribute(db.fromlabel)||"")+(eb||""));null!=db.sourcelabel&&(eb=K.replacePlaceholders(pb,db.sourcelabel,I)+(eb||""));null!=db.tolabel&&(eb=(eb||"")+(lb.getAttribute(db.tolabel)||""));null!=db.targetlabel&&(eb=(eb||"")+K.replacePlaceholders(lb,db.targetlabel,I));var tb="target"==db.placeholders==!db.invert?lb:mb;tb=null!=db.style?K.replacePlaceholders(tb,db.style,I):K.createCurrentEdgeStyle();eb=K.insertEdge(null,null,eb||"",db.invert?lb:mb,db.invert?+mb:lb,tb);if(null!=db.labels)for(tb=0;tb<db.labels.length;tb++){var ob=db.labels[tb],ub=new mxCell(ob.label||tb,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=ob.placeholders&&(ub.value=K.replacePlaceholders("target"==ob.placeholders==!db.invert?lb:mb,ub.value,I));if(null!=ob.dx||null!=ob.dy)ub.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=ob.dy?ob.dy:0);eb.insert(ub)}if(null!=db.data)for(var Ab in db.data)K.setAttributeForCell(eb,+Ab,db.data[Ab]);ua.push(eb);mxUtils.remove(db.invert?mb:lb,ta)}}}});Na(Da,Da,Fa);if(null!=F[Da.id])for(Q=0;Q<F[Da.id].length;Q++)Na(Da,F[Da.id][Q],Fa)}}if(null!=ya)for(Aa=0;Aa<t.length;Aa++)for(Da=t[Aa],Q=0;Q<ya.length;Q++)K.setAttributeForCell(Da,mxUtils.trim(ya[Q]),null);if(0<C.length){var Wa=new mxParallelEdgeLayout(K);Wa.spacing=T;Wa.checkOverlap=!0;var Xa=function(){0<Wa.spacing&&Wa.execute(K.getDefaultParent());for(var mb=0;mb<C.length;mb++){var pb=K.getCellGeometry(C[mb]);pb.x=Math.round(K.snap(pb.x));+pb.y=Math.round(K.snap(pb.y));"auto"==k&&(pb.width=Math.round(K.snap(pb.width)));"auto"==A&&(pb.height=Math.round(K.snap(pb.height)))}};if("["==za.charAt(0)){var ab=pa;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(za)),function(){Xa();ab()});pa=null}else if("circle"==za){var Oa=new mxCircleLayout(K);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Qa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(mb){return Qa.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Oa.execute(K.getDefaultParent());+Xa()},!0,pa);pa=null}else if("horizontaltree"==za||"verticaltree"==za||"auto"==za&&ua.length==2*C.length-1&&1==ta.length){K.view.validate();var kb=new mxCompactTreeLayout(K,"horizontaltree"==za);kb.levelDistance=W;kb.edgeRouting=!1;kb.resetEdges=!1;kb.sortEdges=!0;this.executeLayout(function(){kb.execute(K.getDefaultParent(),0<ta.length?ta[0]:null)},!0,pa);pa=null}else if("horizontalflow"==za||"verticalflow"==za||"auto"==za&&1==ta.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==+za?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);cb.intraCellSpacing=W;cb.parallelEdgeSpacing=T;cb.interRankCellSpacing=aa;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),ua);K.moveCells(ua,qa,wa)},!0,pa);pa=null}else if("orgchart"==za){K.view.validate();var Ya=new mxOrgChartLayout(K,2,aa,W),gb=Ya.isVertexIgnored;Ya.isVertexIgnored=function(mb){return gb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Ya.execute(K.getDefaultParent());+Xa()},!0,pa);pa=null}else if("organic"==za||"auto"==za&&ua.length>C.length){K.view.validate();var hb=new mxFastOrganicLayout(K);hb.forceConstant=3*W;hb.disableEdgeStyle=!1;hb.resetEdges=!1;var vb=hb.isVertexIgnored;hb.isVertexIgnored=function(mb){return vb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){hb.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=pa&&pa()}}catch(mb){this.handleError(mb)}};EditorUi.prototype.getSearch=+function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),+t;for(t in urlParams)0>mxUtils.indexOf(l,t)&&(c=0==f?c+"?":c+"&",null!=urlParams[t]&&(c+=t+"="+urlParams[t],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,l,t,z){c=new LinkDialog(this,c,f,l,!0,t,z);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||+f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);+this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);+this.actions.get("smartFit").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("darkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("lightMode").setEnabled("atlas"!=Editor.currentTheme);l=this.actions.get("autoMode");l.setEnabled(l.isEnabled()&&"atlas"!=Editor.currentTheme);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&-this.editor.graph.isEnabled()};var P=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(c){var f=P.apply(this,arguments),k=mxUtils.bind(this,function(){f.refresh();this.restoreOpenLibraries()});this.addListener("sketchModeChanged",k);this.addListener("currentThemeChanged",k);return f};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var f=0;f<c.length;f++)this.libraryLoaded(c[f].file,c[f].images,c[f].title,null!=-c[f].div?"none"!=c[f].div.style.display:c[f].expand)};var R=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){R.apply(this,arguments);var c=this.editor.graph,f=this.getCurrentFile(),k=this.getSelectionState(),B=this.isDiagramActive(),z="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&z);this.actions.get("redo").setEnabled(this.canRedo()&&z);this.actions.get("autosave").setEnabled(null!=-f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(B);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("editConnectionPoints").setEnabled(B&&0==k.edges.length&&1==k.vertices.length);this.actions.get("editImage").setEnabled(B&&k.image&&0<k.cells.length);this.actions.get("crop").setEnabled(B&&k.image&&0<k.cells.length);this.actions.get("pageSetup").setEnabled(B);this.actions.get("shadowVisible").setEnabled(B);this.actions.get("connectionArrows").setEnabled(B);-this.actions.get("connectionPoints").setEnabled(B);this.actions.get("copyStyle").setEnabled(B&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&B&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(B);this.actions.get("createRevision").setEnabled(B);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(B&&-(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=-f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(B&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};-var T=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);T.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,k,B,z,C,I,L){var K=c.editor.graph;if("xml"==k)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==k)c.hideDialog(),c.saveData(f,-"svg",mxUtils.getXml(K.getSvg(B,z,C)),"image/svg+xml");else{var O=c.getFileData(!0,null,null,null,null,!0),da=K.getGraphBounds(),ea=Math.floor(da.width*z/K.view.scale),ca=Math.floor(da.height*z/K.view.scale);if(O.length<=MAX_REQUEST_SIZE&&ea*ca<MAX_AREA)if(c.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!c.isExportToCanvas()){var V={globalVars:K.getExportVariables()};L&&(V.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,k,function(ma,la){return new mxXmlRequest(EXPORT_URL,-"format="+k+"&base64="+(la||"0")+(null!=ma?"&filename="+encodeURIComponent(ma):"")+"&extras="+encodeURIComponent(JSON.stringify(V))+(0<I?"&dpi="+I:"")+"&bg="+(null!=B?B:"none")+"&w="+ea+"&h="+ca+"&border="+C+"&xml="+encodeURIComponent(O))})}else"png"==k?c.exportImage(z,null==B||"none"==B,!0,!1,!1,C,!0,!1,null,L,I):c.exportImage(z,!1,!0,!1,!1,C,!0,!1,"jpeg",L);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);-var c=this.editor.graph,f="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var B=c;this.currentPage!=this.pages[k]&&(B=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[k]),B.model.setRoot(this.pages[k].root));f+=this.pages[k].getName()+" "+B.getIndexableText()+" "}else f=c.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},k=document.createElement("div");k.style.whiteSpace="nowrap";var B=-document.createElement("h3");mxUtils.write(B,mxUtils.htmlEntities(c));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(B);var z=document.createElement("div");z.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var I=mxSettings.getCustomLibraries();for(c=0;c<I.length;c++){var L=I[c];if("R"==L.substring(0,1)){var K=JSON.parse(decodeURIComponent(L.substring(1)));-C[K[0]]={id:K[0],title:K[1],downloadUrl:K[2]}}}}catch(O){}this.remoteInvoke("getCustomLibraries",null,null,function(O){z.innerText="";if(0==O.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var da=0;da<O.length;da++){var ea=O[da];C[ea.id]&&(f[ea.id]=ea);var ca=this.addCheckbox(z,ea.title,C[ea.id]);(function(V,ma){mxEvent.addListener(ma,"change",function(){this.checked?f[V.id]=V:delete f[V.id]})})(ea,-ca)}},mxUtils.bind(this,function(O){z.innerText="";var da=document.createElement("div");da.style.padding="8px";da.style.textAlign="center";mxUtils.write(da,mxResources.get("error")+": ");mxUtils.write(da,null!=O&&null!=O.message?O.message:mxResources.get("unknownError"));z.appendChild(da)}));k.appendChild(z);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var O=0,da;for(da in f)null==C[da]&&(O++,mxUtils.bind(this,function(ea){this.remoteInvoke("getFileContent",-[ea.downloadUrl],null,mxUtils.bind(this,function(ca){O--;0==O&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,ea)),this.showSidebar()}catch(V){this.handleError(V,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){O--;0==O&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[da]));for(da in C)f[da]||this.closeLibrary(new RemoteLibrary(this,null,C[da]));0==O&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");-this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=-c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,k=this.remoteInvokeCallbacks[f.callbackId];if(null==k)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?k.error&&k.error(c.error.errResp):k.callback&&k.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,k,B,z){var C=-!0,I=window.setTimeout(mxUtils.bind(this,function(){C=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),L=mxUtils.bind(this,function(){window.clearTimeout(I);C&&B.apply(this,arguments)}),K=mxUtils.bind(this,function(){window.clearTimeout(I);C&&z.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:L,error:K});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:k});null!=this.remoteWin?-this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var k=mxUtils.bind(this,function(O,da){var ea={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=da?ea.error={errResp:da}:null!=O&&(ea.resp=O);this.remoteWin.postMessage(JSON.stringify(ea),"*")});try{var B=c.funtionName,z=this.remoteInvokableFns[B];if(null!=z&&"function"===typeof this[B]){if(z.allowedDomains){for(var C=!1,I=0;I<z.allowedDomains.length;I++)if(f=="https://"+-z.allowedDomains[I]){C=!0;break}if(!C){k(null,"Invalid Call: "+B+" is not allowed.");return}}var L=c.functionArgs;Array.isArray(L)||(L=[]);if(z.isAsync)L.push(function(){k(Array.prototype.slice.apply(arguments))}),L.push(function(O){k(null,O||"Unkown Error")}),this[B].apply(this,L);else{var K=this[B].apply(this,L);k([K])}}else k(null,"Invalid Call: "+B+" is not found.")}catch(O){k(null,"Invalid Call: An error occurred, "+O.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var k=-window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var B=k.open("database",2);B.onupgradeneeded=function(z){try{var C=B.result;1>z.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});2>z.oldVersion&&(C.createObjectStore("files",{keyPath:"title"}),C.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(I){null!=f&&f(I)}};B.onsuccess=mxUtils.bind(this,function(z){try{var C=B.result;this.database=C;EditorUi.migrateStorageFiles&&-(StorageFile.migrate(C),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(I){if(!I||"1"==urlParams.forceMigration){var L=document.createElement("iframe");L.style.display="none";L.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(L);var K=!0,O=!1,da,ea=0,ca=mxUtils.bind(this,function(){O=-!0;this.setDatabaseItem(".drawioMigrated3",!0);L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),V=mxUtils.bind(this,function(){ea++;ma()}),ma=mxUtils.bind(this,function(){try{if(ea>=da.length)ca();else{var Y=da[ea];StorageFile.getFileContent(this,Y,mxUtils.bind(this,function(fa){null==fa||".scratchpad"==Y&&fa==this.emptyLibraryXml?L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[Y]}),-"*"):V()}),V)}}catch(fa){console.log(fa)}}),la=mxUtils.bind(this,function(Y){try{this.setDatabaseItem(null,[{title:Y.title,size:Y.data.length,lastModified:Date.now(),type:Y.isLib?"L":"F"},{title:Y.title,data:Y.data}],V,V,["filesInfo","files"])}catch(fa){console.log(fa)}});I=mxUtils.bind(this,function(Y){try{if(Y.source==L.contentWindow){var fa={};try{fa=JSON.parse(Y.data)}catch(Z){}"init"==fa.event?(L.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=fa.event||O||(K?null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?(da=fa.resp[0],K=!1,ma()):ca():null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?la(fa.resp[0]):V())}}catch(Z){console.log(Z)}});window.addEventListener("message",I)}})));c(C);C.onversionchange=function(){C.close()}}catch(I){null!=f?f(I):null!=window.console&&console.warn(I)}});B.onerror=f;B.onblocked=function(){}}catch(z){null!=f?f(z):null!=window.console&&console.error(z)}else null!=-f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,k,B,z){this.openDatabase(mxUtils.bind(this,function(C){try{z=z||"objects";Array.isArray(z)||(z=[z],c=[c],f=[f]);var I=C.transaction(z,"readwrite");I.oncomplete=k;I.onerror=B;for(C=0;C<z.length;C++)I.objectStore(z[C]).put(null!=c&&null!=c[C]?{key:c[C],data:f[C]}:f[C])}catch(L){null!=B&&B(L)}}),B)};EditorUi.prototype.removeDatabaseItem=function(c,f,k,B){this.openDatabase(mxUtils.bind(this,function(z){try{B=-B||"objects";Array.isArray(B)||(B=[B],c=[c]);var C=z.transaction(B,"readwrite");C.oncomplete=f;C.onerror=k;for(z=0;z<B.length;z++)C.objectStore(B[z]).delete(c[z])}catch(I){null!=k&&k(I)}}),k)};EditorUi.prototype.getDatabaseItem=function(c,f,k,B){this.openDatabase(mxUtils.bind(this,function(z){try{B=B||"objects";var C=z.transaction([B],"readonly").objectStore(B).get(c);C.onsuccess=function(){f(C.result)};C.onerror=k}catch(I){null!=k&&k(I)}}),k)};EditorUi.prototype.getDatabaseItems=function(c,f,k){this.openDatabase(mxUtils.bind(this,-function(B){try{k=k||"objects";var z=B.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),C=[];z.onsuccess=function(I){null==I.target.result?c(C):(C.push(I.target.result.value),I.target.result.continue())};z.onerror=f}catch(I){null!=f&&f(I)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(c,f,k){this.openDatabase(mxUtils.bind(this,function(B){try{k=k||"objects";var z=B.transaction([k],"readonly").objectStore(k).getAllKeys();z.onsuccess=function(){c(z.result)};z.onerror=-f}catch(C){null!=f&&f(C)}}),f)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,f){var k=this.getCurrentFile();null!=k?k.getComments(c,f):c([])};EditorUi.prototype.addComment=-function(c,f,k){var B=this.getCurrentFile();null!=B?B.addComment(c,f,k):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var k=this.getCurrentFile();return null!=k?k.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=-function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=-function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,k,B,z,C,I,L){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,f,k,B,z,C,I,L)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=-function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V,ma,la){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V,ma,la)};EditorUi.prototype.createImageUrlConverter=-function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,k,B){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,f,k,B)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");-return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,k,B){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,k,B)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,k,B,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,k,B,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==-localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var k=localStorage.key(f),B=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<B.length){var z="<mxfile "===B.substring(0,8)||"<?xml"===B.substring(0,5)||"\x3c!--[if IE]>"===B.substring(0,12);B="<mxlibrary>"===B.substring(0,11);(z||B)&&c.push(k)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&-"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();-var CommentsWindow=function(b,e,g,m,v,p){function A(){for(var V=C.getElementsByTagName("div"),ma=0,la=0;la<V.length;la++)"none"!=V[la].style.display&&V[la].parentNode==C&&ma++;I.style.display=0==ma?"block":"none"}function G(V,ma,la,Y){function fa(){ma.removeChild(u);ma.removeChild(H);l.style.display="block";Z.style.display="block"}k={div:ma,comment:V,saveCallback:la,deleteOnCancel:Y};var Z=ma.querySelector(".geCommentTxt"),l=ma.querySelector(".geCommentActionsList"),u=document.createElement("textarea");-u.className="geCommentEditTxtArea";u.style.minHeight=Z.offsetHeight+"px";u.value=V.content;ma.insertBefore(u,Z);var H=document.createElement("div");H.className="geCommentEditBtns";var U=mxUtils.button(mxResources.get("cancel"),function(){Y?(ma.parentNode.removeChild(ma),A()):fa();k=null});U.className="geCommentEditBtn";H.appendChild(U);var J=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";V.content=u.value;mxUtils.write(Z,V.content);fa();la(V);k=null});mxEvent.addListener(u,"keydown",-mxUtils.bind(this,function(W){mxEvent.isConsumed(W)||((mxEvent.isControlDown(W)||mxClient.IS_MAC&&mxEvent.isMetaDown(W))&&13==W.keyCode?(J.click(),mxEvent.consume(W)):27==W.keyCode&&(U.click(),mxEvent.consume(W)))}));J.focus();J.className="geCommentEditBtn gePrimaryBtn";H.appendChild(J);ma.insertBefore(H,Z);l.style.display="none";Z.style.display="none";u.focus()}function S(V,ma){ma.innerText="";V=new Date(V.modifiedDate);var la=b.timeSince(V);null==la&&(la=mxResources.get("lessThanAMinute"));mxUtils.write(ma,-mxResources.get("timeAgo",[la],"{1} ago"));ma.setAttribute("title",V.toLocaleDateString()+" "+V.toLocaleTimeString())}function F(V){var ma=document.createElement("img");ma.className="geCommentBusyImg";ma.src=IMAGE_PATH+"/spin.gif";V.appendChild(ma);V.busyImg=ma}function P(V){V.style.border="1px solid red";V.busyImg.parentNode==V&&V.removeChild(V.busyImg)}function R(V){V.style.border="";V.busyImg.parentNode==V&&V.removeChild(V.busyImg)}function T(V,ma,la,Y,fa){function Z(ba,ja,oa){var qa=document.createElement("li");-qa.className="geCommentAction";var ra=document.createElement("a");ra.className="geCommentActionLnk";mxUtils.write(ra,ba);qa.appendChild(ra);mxEvent.addListener(ra,"click",function(ua){ja(ua,V);ua.preventDefault();mxEvent.consume(ua)});aa.appendChild(qa);oa&&(qa.style.display="none")}function l(){function ba(qa){ja.push(oa);if(null!=qa.replies)for(var ra=0;ra<qa.replies.length;ra++)oa=oa.nextSibling,ba(qa.replies[ra])}var ja=[],oa=H;ba(V);return{pdiv:oa,replies:ja}}function u(ba,ja,oa,qa,ra){function ua(){F(La);-V.addReply(Ca,function(sa){Ca.id=sa;V.replies.push(Ca);R(La);oa&&oa()},function(sa){za();P(La);b.handleError(sa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},qa,ra)}function za(){G(Ca,La,function(sa){ua()},!0)}var Ba=l().pdiv,Ca=b.newComment(ba,b.getCurrentUser());Ca.pCommentId=V.id;null==V.replies&&(V.replies=[]);var La=T(Ca,V.replies,Ba,Y+1);ja?za():ua()}if(fa||!V.isResolved){I.style.display="none";var H=document.createElement("div");H.className="geCommentContainer";H.setAttribute("data-commentId",-V.id);H.style.marginLeft=20*Y+5+"px";V.isResolved&&(B.style.opacity="0.7");var U=document.createElement("div");U.className="geCommentHeader";var J=document.createElement("img");J.className="geCommentUserImg";J.src=null!=V.user&&null!=V.user.pictureUrl?V.user.pictureUrl:Editor.userImage;U.appendChild(J);J=document.createElement("div");J.className="geCommentHeaderTxt";U.appendChild(J);var W=document.createElement("div");W.className="geCommentUsername";mxUtils.write(W,null!=V.user?V.user.displayName:-mxResources.get("unknownUser"));J.appendChild(W);W=document.createElement("div");W.className="geCommentDate";W.setAttribute("data-commentId",V.id);S(V,W);J.appendChild(W);H.appendChild(U);U=document.createElement("div");U.className="geCommentTxt";mxUtils.write(U,V.content||"");H.appendChild(U);V.isLocked&&(H.style.opacity="0.5");U=document.createElement("div");U.className="geCommentActions";var aa=document.createElement("ul");aa.className="geCommentActionsList";U.appendChild(aa);c||V.isLocked||0!=-Y&&!f||Z(mxResources.get("reply"),function(){u("",!0)},V.isResolved);J=b.getCurrentUser();null==J||null==V.user||J.id!=V.user.id||c||V.isLocked||(Z(mxResources.get("edit"),function(){function ba(){G(V,H,function(){F(H);V.editComment(V.content,function(){R(H)},function(ja){P(H);ba();b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}ba()},V.isResolved),Z(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){F(H);V.deleteComment(function(ba){if(!0===-ba){ba=H.querySelector(".geCommentTxt");ba.innerText="";mxUtils.write(ba,mxResources.get("msgDeleted"));var ja=H.querySelectorAll(".geCommentAction");for(ba=0;ba<ja.length;ba++)ja[ba].parentNode.removeChild(ja[ba]);R(H);H.style.opacity="0.5"}else{ja=l(V).replies;for(ba=0;ba<ja.length;ba++)C.removeChild(ja[ba]);for(ba=0;ba<ma.length;ba++)if(ma[ba]==V){ma.splice(ba,1);break}I.style.display=0==C.getElementsByTagName("div").length?"block":"none"}},function(ba){P(H);b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},-V.isResolved));c||V.isLocked||0!=Y||Z(V.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(ba){function ja(){var oa=ba.target;oa.innerText="";V.isResolved=!V.isResolved;mxUtils.write(oa,V.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var qa=V.isResolved?"none":"",ra=l(V).replies,ua="light-dark("+(V.isResolved?"ghostWhite":"white")+", transparent)",za=0;za<ra.length;za++){ra[za].style.backgroundColor=ua;for(var Ba=ra[za].querySelectorAll(".geCommentAction"),-Ca=0;Ca<Ba.length;Ca++)Ba[Ca]!=oa.parentNode&&(Ba[Ca].style.display=qa);da||(ra[za].style.display="none")}A()}V.isResolved?u(mxResources.get("reOpened")+": ",!0,ja,!1,!0):u(mxResources.get("markedAsResolved"),!1,ja,!0)});H.appendChild(U);null!=la?C.insertBefore(H,la.nextSibling):C.appendChild(H);for(la=0;null!=V.replies&&la<V.replies.length;la++)U=V.replies[la],U.isResolved=V.isResolved,T(U,V.replies,null,Y+1,fa);null!=k&&(k.comment.id==V.id?(fa=V.content,V.content=k.comment.content,G(V,H,k.saveCallback,-k.deleteOnCancel),V.content=fa):null==k.comment.id&&k.comment.pCommentId==V.id&&(C.appendChild(k.div),G(k.comment,k.div,k.saveCallback,k.deleteOnCancel)));return H}}var c=!b.canComment(),f=b.canReplyToReplies(),k=null,B=document.createElement("div");B.className="geCommentsWin";B.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var z=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+-")";C.style.bottom=parseInt(z)+7+"px";B.appendChild(C);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(I,mxResources.get("noCommentsFound"));var L=document.createElement("div");L.className="geToolbarContainer geCommentsToolbar";L.style.height=z;L.style.padding="3px 4px 4px 4px";z=document.createElement("a");z.className="geToolbarButton geAdaptiveAsset geToggleItem";z.style.width="16px";z.style.height="18px";z.style.backgroundPosition=-"center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="20px";z.style.margin="0 2px";z.style.display="inline-block";z.style.cursor="pointer";if(!c){var K=z.cloneNode();K.style.backgroundImage="url("+Editor.plusImage+")";K.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(K,"click",function(V){function ma(){G(la,Y,function(fa){F(Y);b.addComment(fa,function(Z){fa.id=Z;ea.push(fa);R(Y)},function(Z){P(Y);ma();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},-!0)}var la=b.newComment("",b.getCurrentUser()),Y=T(la,ea,null,0);ma();V.preventDefault();mxEvent.consume(V)});L.appendChild(K)}var O=z.cloneNode();O.classList.add("geToggleItem");O.style.backgroundImage="url("+Editor.checkImage+")";O.setAttribute("title",mxResources.get("showResolved"));var da=!1;mxEvent.addListener(O,"click",function(V){(da=!da)?O.classList.add("geActiveItem"):O.classList.remove("geActiveItem");ca();V.preventDefault();mxEvent.consume(V)});L.appendChild(O);b.commentsRefreshNeeded()&&-(K=z.cloneNode(),K.style.backgroundImage="url("+Editor.refreshImage+")",K.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(K,"click",function(V){ca();V.preventDefault();mxEvent.consume(V)}),L.appendChild(K));b.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),z.className="geButton geAdaptiveAsset",mxEvent.addListener(z,"click",function(V){p();V.preventDefault();-mxEvent.consume(V)}),L.appendChild(z));B.appendChild(L);var ea=[],ca=mxUtils.bind(this,function(){this.hasError=!1;if(null!=k)try{k.div=k.div.cloneNode(!0);var V=k.div.querySelector(".geCommentEditTxtArea"),ma=k.div.querySelector(".geCommentEditBtns");k.comment.content=V.value;V.parentNode.removeChild(V);ma.parentNode.removeChild(ma)}catch(la){b.handleError(la)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+-"...</div>";f=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(la){function Y(fa){if(null!=fa){fa.sort(function(l,u){return new Date(l.modifiedDate)-new Date(u.modifiedDate)});for(var Z=0;Z<fa.length;Z++)Y(fa[Z].replies)}}la.sort(function(fa,Z){return new Date(fa.modifiedDate)-new Date(Z.modifiedDate)});C.innerText="";C.appendChild(I);I.style.display="block";ea=la;for(la=0;la<ea.length;la++)Y(ea[la].replies),T(ea[la],ea,null,0,da);null!=k&&null==k.comment.id&&null==k.comment.pCommentId&&-(C.appendChild(k.div),G(k.comment,k.div,k.saveCallback,k.deleteOnCancel))},mxUtils.bind(this,function(la){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(la&&la.message?": "+la.message:""));this.hasError=!0})):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ca();this.refreshComments=ca;L=mxUtils.bind(this,function(){function V(Z){var l=la[Z.id];if(null!=l)for(S(Z,l),l=0;null!=Z.replies&&l<Z.replies.length;l++)V(Z.replies[l])}if(this.window.isVisible()){for(var ma=C.querySelectorAll(".geCommentDate"),-la={},Y=0;Y<ma.length;Y++){var fa=ma[Y];la[fa.getAttribute("data-commentId")]=fa}for(Y=0;Y<ea.length;Y++)V(ea[Y])}});setInterval(L,6E4);this.refreshCommentsTime=L;this.window=new mxWindow(mxResources.get("comments"),B,e,g,m,v,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));-b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,v,p,A,G,S,F,P){var R=document.createElement("div");R.style.textAlign="center";P=null!=P?P:44;var T=document.createElement("div");T.style.padding="6px";T.style.overflow="auto";T.style.maxHeight=P+"px";T.style.lineHeight="1.2em";mxUtils.write(T,e);R.appendChild(T);null!=F&&(T=document.createElement("div"),T.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",F),T.appendChild(e),R.appendChild(T));F=document.createElement("div");-F.style.textAlign="center";F.style.whiteSpace="nowrap";var c=document.createElement("input");c.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(c.checked)});p.className="geBtn";null!=G&&(p.innerHTML=G+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&F.appendChild(p);var f=mxUtils.button(v||mxResources.get("ok"),function(){b.hideDialog();null!=g&&-g(c.checked)});F.appendChild(f);null!=A?(f.innerHTML=A+"<br>"+f.innerHTML+"<br>",f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.className="geBtn",f.style.width="40%"):f.className="geBtn gePrimaryBtn";b.editor.cancelFirst||F.appendChild(p);R.appendChild(F);S?(F.style.marginTop="10px",T=document.createElement("p"),T.style.marginTop="20px",T.style.marginBottom="0px",T.appendChild(c),v=document.createElement("span"),mxUtils.write(v," "+mxResources.get("rememberThisSetting")),-T.appendChild(v),R.appendChild(T),mxEvent.addListener(v,"click",function(k){c.checked=!c.checked;mxEvent.consume(k)})):F.style.marginTop="12px";this.init=function(){f.focus()};this.container=R},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};-HeadlessEditorUi.prototype.updateActionStates=function(){};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};+this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var f=0;f<c.length;f++)this.libraryLoaded(c[f].file,c[f].images,c[f].title,null!=c[f].div?"none"!=c[f].div.style.display:c[f].expand)};var O=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){O.apply(this,arguments);var c=this.editor.graph,f=this.getCurrentFile(),l=this.getSelectionState(),t=this.isDiagramActive(),z="1"==+urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&z);this.actions.get("redo").setEnabled(this.canRedo()&&z);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(t);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("editConnectionPoints").setEnabled(t&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(t&&+l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(t&&l.image&&0<l.cells.length);this.actions.get("pageSetup").setEnabled(t);this.actions.get("shadowVisible").setEnabled(t);this.actions.get("connectionArrows").setEnabled(t);this.actions.get("connectionPoints").setEnabled(t);this.actions.get("copyStyle").setEnabled(t&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&t&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);+this.actions.get("createShape").setEnabled(t);this.actions.get("createRevision").setEnabled(t);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(t&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("hidden"!=+this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=+this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var R=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);R.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=+!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,z,C,F,N){var K=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(K.getSvg(t,z,C)),"image/svg+xml");else{var I=c.getFileData(!0,null,null,null,null,!0),ca=K.getGraphBounds(),da=Math.floor(ca.width*z/K.view.scale),ea=Math.floor(ca.height*z/K.view.scale);if(I.length<=MAX_REQUEST_SIZE&&da*ea<MAX_AREA)if(c.hideDialog(),+"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var X={globalVars:K.getExportVariables()};N&&(X.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,l,function(ba,ha){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(ha||"0")+(null!=ba?"&filename="+encodeURIComponent(ba):"")+"&extras="+encodeURIComponent(JSON.stringify(X))+(0<F?"&dpi="+F:"")+"&bg="+(null!=t?t:"none")+"&w="+da+"&h="+ea+"&border="+C+"&xml="+encodeURIComponent(I))})}else"png"==l?c.exportImage(z,+null==t||"none"==t,!0,!1,!1,C,!0,!1,null,N,F):c.exportImage(z,!1,!0,!1,!1,C,!0,!1,"jpeg",N);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var t=c;this.currentPage!=this.pages[l]&&(t=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[l]),t.model.setRoot(this.pages[l].root));f+=this.pages[l].getName()++" "+t.getIndexableText()+" "}else f=c.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},l=document.createElement("div");l.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxUtils.htmlEntities(c));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(t);var z=document.createElement("div");z.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";+z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var F=mxSettings.getCustomLibraries();for(c=0;c<F.length;c++){var N=F[c];if("R"==N.substring(0,1)){var K=JSON.parse(decodeURIComponent(N.substring(1)));C[K[0]]={id:K[0],title:K[1],downloadUrl:K[2]}}}}catch(I){}this.remoteInvoke("getCustomLibraries",null,null,function(I){z.innerText="";if(0==I.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))++"</div>";else for(var ca=0;ca<I.length;ca++){var da=I[ca];C[da.id]&&(f[da.id]=da);var ea=this.addCheckbox(z,da.title,C[da.id]);(function(X,ba){mxEvent.addListener(ba,"change",function(){this.checked?f[X.id]=X:delete f[X.id]})})(da,ea)}},mxUtils.bind(this,function(I){z.innerText="";var ca=document.createElement("div");ca.style.padding="8px";ca.style.textAlign="center";mxUtils.write(ca,mxResources.get("error")+": ");mxUtils.write(ca,null!=I&&null!=I.message?I.message:mxResources.get("unknownError"));+z.appendChild(ca)}));l.appendChild(z);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var I=0,ca;for(ca in f)null==C[ca]&&(I++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ea){I--;0==I&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ea,da)),this.showSidebar()}catch(X){this.handleError(X,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){I--;+0==I&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ca]));for(ca in C)f[ca]||this.closeLibrary(new RemoteLibrary(this,null,C[ca]));0==I&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,+allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==+l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):l.callback&&l.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,l,t,z){var C=!0,F=window.setTimeout(mxUtils.bind(this,function(){C=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),N=mxUtils.bind(this,function(){window.clearTimeout(F);C&&t.apply(this,arguments)}),K=mxUtils.bind(this,function(){window.clearTimeout(F);+C&&z.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:N,error:K});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var l=mxUtils.bind(this,function(I,ca){var da={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=ca?da.error={errResp:ca}:null!=I&&+(da.resp=I);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var t=c.funtionName,z=this.remoteInvokableFns[t];if(null!=z&&"function"===typeof this[t]){if(z.allowedDomains){for(var C=!1,F=0;F<z.allowedDomains.length;F++)if(f=="https://"+z.allowedDomains[F]){C=!0;break}if(!C){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||(N=[]);if(z.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(I){l(null,I||"Unkown Error")}),+this[t].apply(this,N);else{var K=this[t].apply(this,N);l([K])}}else l(null,"Invalid Call: "+t+" is not found.")}catch(I){l(null,"Invalid Call: An error occurred, "+I.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var t=l.open("database",2);t.onupgradeneeded=function(z){try{var C=t.result;1>z.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});2>z.oldVersion&&(C.createObjectStore("files",+{keyPath:"title"}),C.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};t.onsuccess=mxUtils.bind(this,function(z){try{var C=t.result;this.database=C;EditorUi.migrateStorageFiles&&(StorageFile.migrate(C),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var N=+document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var K=!0,I=!1,ca,da=0,ea=mxUtils.bind(this,function(){I=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),X=mxUtils.bind(this,function(){da++;ba()}),ba=mxUtils.bind(this,function(){try{if(da>=ca.length)ea();else{var ma=+ca[da];StorageFile.getFileContent(this,ma,mxUtils.bind(this,function(Y){null==Y||".scratchpad"==ma&&Y==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ma]}),"*"):X()}),X)}}catch(Y){console.log(Y)}}),ha=mxUtils.bind(this,function(ma){try{this.setDatabaseItem(null,[{title:ma.title,size:ma.data.length,lastModified:Date.now(),type:ma.isLib?"L":"F"},{title:ma.title,data:ma.data}],X,X,["filesInfo","files"])}catch(Y){console.log(Y)}});+F=mxUtils.bind(this,function(ma){try{if(ma.source==N.contentWindow){var Y={};try{Y=JSON.parse(ma.data)}catch(la){}"init"==Y.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=Y.event||I||(K?null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?(ca=Y.resp[0],K=!1,ba()):ea():null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?ha(Y.resp[0]):X())}}catch(la){console.log(la)}});+window.addEventListener("message",F)}})));c(C);C.onversionchange=function(){C.close()}}catch(F){null!=f?f(F):null!=window.console&&console.warn(F)}});t.onerror=f;t.onblocked=function(){}}catch(z){null!=f?f(z):null!=window.console&&console.error(z)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,l,t,z){this.openDatabase(mxUtils.bind(this,function(C){try{z=z||"objects";Array.isArray(z)||(z=[z],c=[c],f=[f]);var F=C.transaction(z,+"readwrite");F.oncomplete=l;F.onerror=t;for(C=0;C<z.length;C++)F.objectStore(z[C]).put(null!=c&&null!=c[C]?{key:c[C],data:f[C]}:f[C])}catch(N){null!=t&&t(N)}}),t)};EditorUi.prototype.removeDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c]);var C=z.transaction(t,"readwrite");C.oncomplete=f;C.onerror=l;for(z=0;z<t.length;z++)C.objectStore(t[z]).delete(c[z])}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItem=+function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";var C=z.transaction([t],"readonly").objectStore(t).get(c);C.onsuccess=function(){f(C.result)};C.onerror=l}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=l||"objects";var z=t.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),C=[];z.onsuccess=function(F){null==F.target.result?c(C):(C.push(F.target.result.value),+F.target.result.continue())};z.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=l||"objects";var z=t.transaction([l],"readonly").objectStore(l).getAllKeys();z.onsuccess=function(){c(z.result)};z.onerror=f}catch(C){null!=f&&f(C)}}),f)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=+this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,f){var l=this.getCurrentFile();null!=l?l.getComments(c,f):c([])};EditorUi.prototype.addComment=function(c,f,l){var t=this.getCurrentFile();null!=t?t.addComment(c,f,l):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?+c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var l=this.getCurrentFile();return null!=l?l.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var l=this.getCurrentFile();null!=+l&&l.getRevisions?l.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,l,t,z,C,F,N){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");+return this.editor.loadUrl(c,f,l,t,z,C,F,N)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");+return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");+return this.editor.convertImages(c,f,l,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,l,t)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");+return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,l,t,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,l,t,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var l=localStorage.key(f),t=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<t.length){var z=+"<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12);t="<mxlibrary>"===t.substring(0,11);(z||t)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();+var CommentsWindow=function(b,e,g,m,u,p){function B(){for(var ba=F.getElementsByTagName("div"),ha=0,ma=0;ma<ba.length;ma++)"none"!=ba[ma].style.display&&ba[ma].parentNode==F&&ha++;N.style.display=0==ha?"block":"none"}function H(ba,ha,ma,Y){function la(){ha.removeChild(A);ha.removeChild(J);k.style.display="block";Z.style.display="block"}t={div:ha,comment:ba,saveCallback:ma,deleteOnCancel:Y};var Z=ha.querySelector(".geCommentTxt"),k=ha.querySelector(".geCommentActionsList"),A=document.createElement("textarea");+A.className="geCommentEditTxtArea";A.style.minHeight=Z.offsetHeight+"px";A.value=ba.content;ha.insertBefore(A,Z);var J=document.createElement("div");J.className="geCommentEditBtns";var U=mxUtils.button(mxResources.get("cancel"),function(){Y?(ha.parentNode.removeChild(ha),B()):la();t=null});U.className="geCommentEditBtn";J.appendChild(U);var P=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";ba.content=A.value;mxUtils.write(Z,ba.content);la();ma(ba);t=null});mxEvent.addListener(A,"keydown",+mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(P.click(),mxEvent.consume(T)):27==T.keyCode&&(U.click(),mxEvent.consume(T)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";J.appendChild(P);ha.insertBefore(J,Z);k.style.display="none";Z.style.display="none";A.focus()}function S(ba,ha){ha.innerText="";ba=new Date(ba.modifiedDate);var ma=b.timeSince(ba);null==ma&&(ma=mxResources.get("lessThanAMinute"));+mxUtils.write(ha,mxResources.get("timeAgo",[ma],"{1} ago"));ha.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function G(ba){var ha=document.createElement("img");ha.className="geCommentBusyImg";ha.src=IMAGE_PATH+"/spin.gif";ba.appendChild(ha);ba.busyImg=ha}function O(ba){ba.style.border="1px solid red";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function R(ba){ba.style.border="";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function c(ba,ha,ma,Y,la){function Z(aa,+ja,pa){var sa=document.createElement("li");sa.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,aa);sa.appendChild(qa);mxEvent.addListener(qa,"click",function(wa){ja(wa,ba);wa.preventDefault();mxEvent.consume(wa)});W.appendChild(sa);pa&&(sa.style.display="none")}function k(){function aa(sa){ja.push(pa);if(null!=sa.replies)for(var qa=0;qa<sa.replies.length;qa++)pa=pa.nextSibling,aa(sa.replies[qa])}var ja=[],pa=J;aa(ba);return{pdiv:pa,+replies:ja}}function A(aa,ja,pa,sa,qa){function wa(){G(ra);ba.addReply(Ea,function(ya){Ea.id=ya;ba.replies.push(Ea);R(ra);pa&&pa()},function(ya){Ba();O(ra);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},sa,qa)}function Ba(){H(Ea,ra,function(ya){wa()},!0)}var za=k().pdiv,Ea=b.newComment(aa,b.getCurrentUser());Ea.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var ra=c(Ea,ba.replies,za,Y+1);ja?Ba():wa()}if(la||!ba.isResolved){N.style.display="none";var J=+document.createElement("div");J.className="geCommentContainer";J.setAttribute("data-commentId",ba.id);J.style.marginLeft=20*Y+5+"px";ba.isResolved&&(z.style.opacity="0.7");var U=document.createElement("div");U.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=ba.user&&null!=ba.user.pictureUrl?ba.user.pictureUrl:Editor.userImage;U.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";U.appendChild(P);var T=document.createElement("div");+T.className="geCommentUsername";mxUtils.write(T,null!=ba.user?ba.user.displayName:mxResources.get("unknownUser"));P.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",ba.id);S(ba,T);P.appendChild(T);J.appendChild(U);U=document.createElement("div");U.className="geCommentTxt";mxUtils.write(U,ba.content||"");J.appendChild(U);ba.isLocked&&(J.style.opacity="0.5");U=document.createElement("div");U.className="geCommentActions";var W=document.createElement("ul");+W.className="geCommentActionsList";U.appendChild(W);f||ba.isLocked||0!=Y&&!l||Z(mxResources.get("reply"),function(){A("",!0)},ba.isResolved);P=b.getCurrentUser();null==P||null==ba.user||P.id!=ba.user.id||f||ba.isLocked||(Z(mxResources.get("edit"),function(){function aa(){H(ba,J,function(){G(J);ba.editComment(ba.content,function(){R(J)},function(ja){O(J);aa();b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},ba.isResolved),Z(mxResources.get("delete"),+function(){b.confirm(mxResources.get("areYouSure"),function(){G(J);ba.deleteComment(function(aa){if(!0===aa){aa=J.querySelector(".geCommentTxt");aa.innerText="";mxUtils.write(aa,mxResources.get("msgDeleted"));var ja=J.querySelectorAll(".geCommentAction");for(aa=0;aa<ja.length;aa++)ja[aa].parentNode.removeChild(ja[aa]);R(J);J.style.opacity="0.5"}else{ja=k(ba).replies;for(aa=0;aa<ja.length;aa++)F.removeChild(ja[aa]);for(aa=0;aa<ha.length;aa++)if(ha[aa]==ba){ha.splice(aa,1);break}N.style.display=0==+F.getElementsByTagName("div").length?"block":"none"}},function(aa){O(J);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},ba.isResolved));f||ba.isLocked||0!=Y||Z(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function ja(){var pa=aa.target;pa.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(pa,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var sa=ba.isResolved?"none":"",qa=k(ba).replies,wa=+"light-dark("+(ba.isResolved?"ghostWhite":"white")+", transparent)",Ba=0;Ba<qa.length;Ba++){qa[Ba].style.backgroundColor=wa;for(var za=qa[Ba].querySelectorAll(".geCommentAction"),Ea=0;Ea<za.length;Ea++)za[Ea]!=pa.parentNode&&(za[Ea].style.display=sa);da||(qa[Ba].style.display="none")}B()}ba.isResolved?A(mxResources.get("reOpened")+": ",!0,ja,!1,!0):A(mxResources.get("markedAsResolved"),!1,ja,!0)});J.appendChild(U);null!=ma?F.insertBefore(J,ma.nextSibling):F.appendChild(J);for(ma=0;null!=ba.replies&&+ma<ba.replies.length;ma++)U=ba.replies[ma],U.isResolved=ba.isResolved,c(U,ba.replies,null,Y+1,la);null!=t&&(t.comment.id==ba.id?(la=ba.content,ba.content=t.comment.content,H(ba,J,t.saveCallback,t.deleteOnCancel),ba.content=la):null==t.comment.id&&t.comment.pCommentId==ba.id&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return J}}var f=!b.canComment(),l=b.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="light-dark(whiteSmoke, "++Editor.darkColor+")";var C=EditorUi.compactUi?"26px":"30px",F=document.createElement("div");F.className="geCommentsList";F.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";F.style.bottom=parseInt(C)+7+"px";z.appendChild(F);var N=document.createElement("span");N.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(N,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=+C;K.style.padding="3px 4px 4px 4px";C=document.createElement("a");C.className="geToolbarButton geAdaptiveAsset geToggleItem";C.style.width="16px";C.style.height="18px";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="20px";C.style.margin="0 2px";C.style.display="inline-block";C.style.cursor="pointer";if(!f){var I=C.cloneNode();I.style.backgroundImage="url("+Editor.plusImage+")";I.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(I,+"click",function(ba){function ha(){H(ma,Y,function(la){G(Y);b.addComment(la,function(Z){la.id=Z;ea.push(la);R(Y)},function(Z){O(Y);ha();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ma=b.newComment("",b.getCurrentUser()),Y=c(ma,ea,null,0);ha();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(I)}var ca=C.cloneNode();ca.classList.add("geToggleItem");ca.style.backgroundImage="url("+Editor.checkImage+")";ca.setAttribute("title",mxResources.get("showResolved"));+var da=!1;mxEvent.addListener(ca,"click",function(ba){(da=!da)?ca.classList.add("geActiveItem"):ca.classList.remove("geActiveItem");X();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(ca);b.commentsRefreshNeeded()&&(I=C.cloneNode(),I.style.backgroundImage="url("+Editor.refreshImage+")",I.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(I,"click",function(ba){X();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(I));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML=+'<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geButton geAdaptiveAsset",mxEvent.addListener(C,"click",function(ba){p();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(C));z.appendChild(K);var ea=[],X=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var ba=t.div.querySelector(".geCommentEditTxtArea"),ha=t.div.querySelector(".geCommentEditBtns");t.comment.content=ba.value;+ba.parentNode.removeChild(ba);ha.parentNode.removeChild(ha)}catch(ma){b.handleError(ma)}F.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ma){function Y(la){if(null!=la){la.sort(function(k,A){return new Date(k.modifiedDate)-new Date(A.modifiedDate)});for(var Z=0;Z<la.length;Z++)Y(la[Z].replies)}}ma.sort(function(la,+Z){return new Date(la.modifiedDate)-new Date(Z.modifiedDate)});F.innerText="";F.appendChild(N);N.style.display="block";ea=ma;for(ma=0;ma<ea.length;ma++)Y(ea[ma].replies),c(ea[ma],ea,null,0,da);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(ma){F.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ma&&ma.message?": "+ma.message:""));this.hasError=!0})):F.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});+X();this.refreshComments=X;K=mxUtils.bind(this,function(){function ba(Z){var k=ma[Z.id];if(null!=k)for(S(Z,k),k=0;null!=Z.replies&&k<Z.replies.length;k++)ba(Z.replies[k])}if(this.window.isVisible()){for(var ha=F.querySelectorAll(".geCommentDate"),ma={},Y=0;Y<ha.length;Y++){var la=ha[Y];ma[la.getAttribute("data-commentId")]=la}for(Y=0;Y<ea.length;Y++)ba(ea[Y])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),z,e,g,m,u,!0,!0);this.window.minimumSize=+new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,u,p,B,H,S,G,O){var R=document.createElement("div");R.style.textAlign="center";O=null!=O?O:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=+O+"px";c.style.lineHeight="1.2em";mxUtils.write(c,e);R.appendChild(c);null!=G&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),c.appendChild(e),R.appendChild(c));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(f.checked)});p.className="geBtn";+null!=H&&(p.innerHTML=H+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&G.appendChild(p);var l=mxUtils.button(u||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(f.checked)});G.appendChild(l);null!=B?(l.innerHTML=B+"<br>"+l.innerHTML+"<br>",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||+G.appendChild(p);R.appendChild(G);S?(G.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(f),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),c.appendChild(u),R.appendChild(c),mxEvent.addListener(u,"click",function(t){f.checked=!f.checked;mxEvent.consume(t)})):G.style.marginTop="12px";this.init=function(){l.focus()};this.container=R},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),+document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,e,g){this.ui=b;this.page=e;this.previous=this.name=g}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,e,g){this.ui=b;this.oldIndex=e;this.newIndex=g}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(b,e,g){this.ui=b;this.previousPage=this.page=e;null!=e&&(this.ui.updatePageRoot(e),null!=g&&(e.viewState=g))}SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var e=this.ui.editor,g=e.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(e.getGraphXml(!0)));b.viewState=g.getViewState();b.root=g.model.root;null!=b.model&&b.model.rootChanged(b.root);g.view.clear(b.root,!0);g.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;-g.model.prefix=Editor.guid()+"-";g.model.rootChanged(b.root);g.setViewState(b.viewState);g.gridEnabled=g.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,e,g,m,v){SelectPage.call(this,b,g);this.relatedPage=e;this.index=m;this.previousIndex=null;this.noSelect=v}mxUtils.extend(ChangePage,SelectPage);+g.model.prefix=Editor.guid()+"-";g.model.rootChanged(b.root);g.setViewState(b.viewState);g.gridEnabled=g.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,e,g,m,u){SelectPage.call(this,b,g);this.relatedPage=e;this.index=m;this.previousIndex=null;this.noSelect=u}mxUtils.extend(ChangePage,SelectPage);ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};function ReplaceDiagram(b,e){this.ui=b;this.data=e}ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,e=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var g=new mxCodec(this.data.ownerDocument),m=new mxGraphModel;g.decode(this.data,m);this.data=e;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=m.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,!0);b.model.rootChanged(m.root);b.fireEvent(new mxEventObject(mxEvent.ROOT))};EditorUi.prototype.tabContainerHeight=36;EditorUi.prototype.setTabContainerVisible=function(b){this.tabContainerHeight=b?EditorUi.prototype.tabContainerHeight:0;isLocalStorage&&(mxSettings.settings.pages=0<this.tabContainerHeight,mxSettings.save());this.editor.updateGraphComponents();this.refresh()};EditorUi.prototype.isTabContainerVisible=function(){return 0<this.tabContainerHeight};EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var g=0;g<this.pages.length;g++)if(this.pages[g]==b){e=g;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var g=0;g<e.length;g++)if(e[g].getId()==b)return e[g];return null};-EditorUi.prototype.createImageForPageLink=function(b,e,g,m){var v=b.indexOf(","),p=null;0<v&&(v=this.getPageById(b.substring(v+1)),null!=v&&v!=e&&(p=this.getImageForPage(v,e,g,m),p.originalSrc=b));null==p&&(p={originalSrc:b});return p};+EditorUi.prototype.createImageForPageLink=function(b,e,g,m){var u=b.indexOf(","),p=null;0<u&&(u=this.getPageById(b.substring(u+1)),null!=u&&u!=e&&(p=this.getImageForPage(u,e,g,m),p.originalSrc=b));null==p&&(p={originalSrc:b});return p};EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,e=this.currentPage;null!=e&&(b.tooltipHandler.hide(),null==e.viewState||null==e.viewState.scrollTop||null==e.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(e.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};-EditorUi.prototype.getImageForPage=function(b,e,g,m){g=null!=g?g:this.editor.graph;var v=g.getGlobalVariable;g=this.createTemporaryGraph(g.getStylesheet());var p=this.getPageIndex(null!=e?e:this.currentPage);g.getGlobalVariable=function(G){return"pagenumber"==G?p+1:"page"==G&&null!=e?e.getName():v.apply(this,arguments)};document.body.appendChild(g.container);this.updatePageRoot(b);g.setAdaptiveColors(b.viewState.adaptiveColors);g.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=-"";m=g.getSvg(null,null,null,null,null,null,null,null,null,null,m,null,null,null,!0,!0);var A=g.getGraphBounds();document.body.removeChild(g.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(m)),A.width,A.height,A.x,A.y)};-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var A=-this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";this.tabContainer.style.visibility=0==parseInt(this.tabContainer.style.height)?"hidden":"";A!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,-function(A,G){A=G.getProperty("edit").changes;for(G=0;G<A.length;G++)if(A[G]instanceof RenamePage||A[G]instanceof ChangePage||A[G]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==A.length&&A[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var g=b.sizeDidChange,m=null,v=this;b.sizeDidChange=function(){var A=g.apply(this,arguments);null!=v.currentPage&&m!=v.currentPage&&(m=v.currentPage,v.pageSelected());return A};b.addListener(mxEvent.ROOT,mxUtils.bind(this,-function(){b.checkDefaultParent()}));var p=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",p);this.editor.addListener("pagesPatched",p);this.editor.addListener("pageRenamed",p);this.editor.addListener("pageMoved",p);this.editor.addListener("fileLoaded",p);this.editor.addListener("pageSelected",mxUtils.bind(this,function(A,G){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle();null!=-this.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(A,G){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};+EditorUi.prototype.getImageForPage=function(b,e,g,m){g=null!=g?g:this.editor.graph;var u=g.getGlobalVariable;g=this.createTemporaryGraph(g.getStylesheet());var p=this.getPageIndex(null!=e?e:this.currentPage);g.getGlobalVariable=function(H){return"pagenumber"==H?p+1:"page"==H&&null!=e?e.getName():u.apply(this,arguments)};document.body.appendChild(g.container);this.updatePageRoot(b);g.setAdaptiveColors(b.viewState.adaptiveColors);g.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=+"";m=g.getSvg(null,null,null,null,null,null,null,null,null,null,m,null,null,null,!0,!0);var B=g.getGraphBounds();document.body.removeChild(g.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(m)),B.width,B.height,B.x,B.y)};+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var B=+this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";this.tabContainer.style.visibility=0==parseInt(this.tabContainer.style.height)?"hidden":"";B!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,+function(B,H){B=H.getProperty("edit").changes;for(H=0;H<B.length;H++)if(B[H]instanceof RenamePage||B[H]instanceof ChangePage||B[H]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==B.length&&B[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var g=b.sizeDidChange,m=null,u=this;b.sizeDidChange=function(){var B=g.apply(this,arguments);null!=u.currentPage&&m!=u.currentPage&&(m=u.currentPage,u.pageSelected());return B};b.addListener(mxEvent.ROOT,mxUtils.bind(this,+function(){b.checkDefaultParent()}));var p=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",p);this.editor.addListener("pagesPatched",p);this.editor.addListener("pageRenamed",p);this.editor.addListener("pageMoved",p);this.editor.addListener("fileLoaded",p);this.editor.addListener("pageSelected",mxUtils.bind(this,function(B,H){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle();null!=+this.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(B,H){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};EditorUi.prototype.scrollToPage=function(b,e){var g=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),m=null!=b?b:this.currentPage;null!=g&&null!=this.tabScroller&&this.tabScroller.children.length>g&&null!=this.tabScroller.children[g]&&(m!=this.lastScrollPage||e)&&(this.tabScroller.children[g].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[g].className="geTab gePageTab geActivePage",this.lastScrollPage=m)};EditorUi.prototype.restoreViewState=function(b,e,g){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(g))};-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),v=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),A=this.parseBackgroundImage(b.getAttribute("backgroundImage")),G=b.getAttribute("extFonts");if(G)try{G=G.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:A,pageScale:isNaN(g)?mxGraph.prototype.pageScale:g,pageFormat:isNaN(m)||isNaN(v)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:-mxSettings.getPageFormat():new mxRectangle(0,0,m,v),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:G||[]}};+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),u=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),B=this.parseBackgroundImage(b.getAttribute("backgroundImage")),H=b.getAttribute("extFonts");if(H)try{H=H.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:B,pageScale:isNaN(g)?mxGraph.prototype.pageScale:g,pageFormat:isNaN(m)||isNaN(u)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:+mxSettings.getPageFormat():new mxRectangle(0,0,m,u),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:H||[]}};Graph.prototype.saveViewState=function(b,e,g,m){g||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);g=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=g&&(e.setAttribute("pageWidth",g.width),e.setAttribute("pageHeight",g.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),m=this.getBackgroundImageObject(b.backgroundImage,m),null!=m&&e.setAttribute("backgroundImage",-JSON.stringify(m)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?e.removeAttribute("adaptiveColors"):e.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(v){return v.name+"^"+v.url}).join("|"))};+JSON.stringify(m)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?e.removeAttribute("adaptiveColors"):e.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(u){return u.name+"^"+u.url}).join("|"))};Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,adaptiveColors:this.adaptiveColors,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};Graph.prototype.setViewState=function(b,e){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.adaptiveColors=b.adaptiveColors;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;@@ -4068,26 +4067,26 @@ this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParthis.extFonts[e].url,!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat="undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.adaptiveColors=null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,e,g){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=e*this.view.scale+b.scrollLeft,this.container.scrollTop=g*this.view.scale+b.scrollTop)};-Graph.prototype.addExtFont=function(b,e,g){if(b&&e){var m="extFont_"+b;if(null==document.getElementById(m))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,m);else{document.getElementsByTagName("head");var v=document.createElement("style");v.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));v.setAttribute("id",m);document.getElementsByTagName("head")[0].appendChild(v)}if(!g){null==this.extFonts&&(this.extFonts=[]);g=this.extFonts;-m=!0;for(v=0;v<g.length;v++)if(g[v].name==b){m=!1;break}m&&this.extFonts.push({name:b,url:e})}}};+Graph.prototype.addExtFont=function(b,e,g){if(b&&e){var m="extFont_"+b;if(null==document.getElementById(m))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,m);else{document.getElementsByTagName("head");var u=document.createElement("style");u.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));u.setAttribute("id",m);document.getElementsByTagName("head")[0].appendChild(u)}if(!g){null==this.extFonts&&(this.extFonts=[]);g=this.extFonts;+m=!0;for(u=0;u<g.length;u++)if(g[u].name==b){m=!1;break}m&&this.extFonts.push({name:b,url:e})}}};EditorUi.prototype.updatePageRoot=function(b,e){if(null==b.root){e=this.editor.extractGraphModel(b.node,null,e);var g=Editor.extractParserError(e);if(g)throw Error(g);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),g=new mxCodec(e.ownerDocument),b.root=g.decode(e).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);if(g=Editor.extractParserError(e))throw Error(g);null!=e&&(b.graphModelNode=e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)e=new mxCell,e.setId("1"),b.root.insert(e),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};-EditorUi.prototype.updateDiagramData=function(b,e){if(null==this.getPageIndex(b.page))this.insertPage(null,null,e);else{var g=new mxCodec(b.node.ownerDocument),m=new mxGraphModel;g.decode(b.node,m);g=new mxCodec(e.ownerDocument);var v=new mxGraphModel;g.decode(e,v);this.selectPage(b.page);e=this.diffCells(m.root,v.root);this.patchPage(b.page,e,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};-EditorUi.prototype.selectPage=function(b,e,g){try{if(b!=this.currentPage){var m=this.editor.graph;m.isEditing()&&m.stopEditing(!1);e=null!=e?e:!1;m.isMouseDown=!1;m.reset();var v=m.model.createUndoableEdit();v.ignoreEdit=!0;var p=new SelectPage(this,b,g);p.execute();v.add(p);v.notify();e||m.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",v))}}catch(A){this.handleError(A)}};+EditorUi.prototype.updateDiagramData=function(b,e){if(null==this.getPageIndex(b.page))this.insertPage(null,null,e);else{var g=new mxCodec(b.node.ownerDocument),m=new mxGraphModel;g.decode(b.node,m);g=new mxCodec(e.ownerDocument);var u=new mxGraphModel;g.decode(e,u);this.selectPage(b.page);e=this.diffCells(m.root,u.root);this.patchPage(b.page,e,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};+EditorUi.prototype.selectPage=function(b,e,g){try{if(b!=this.currentPage){var m=this.editor.graph;m.isEditing()&&m.stopEditing(!1);e=null!=e?e:!1;m.isMouseDown=!1;m.reset();var u=m.model.createUndoableEdit();u.ignoreEdit=!0;var p=new SelectPage(this,b,g);p.execute();u.add(p);u.notify();e||m.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",u))}}catch(B){this.handleError(B)}};EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),b?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(b,e,g){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),g),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};EditorUi.prototype.createPage=function(b,e,g){e=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e,g);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var g=this.pages[e].getName();null!=g&&0<g.length&&(b[g]=g)}e=this.pages.length;do g=mxResources.get("pageWithNumber",[++e]);while(null!=b[g]);return g};-EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,m=this.pages[g]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(v){this.handleError(v)}return b};-EditorUi.prototype.duplicatePage=function(b,e){var g=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var v=b.node.cloneNode(!1);v.removeAttribute("id");var p={},A=m.createCellLookup([m.model.root]);g=new DiagramPage(v);g.root=m.cloneCell(m.model.root,null,p);var G=new mxGraphModel;G.prefix=Editor.guid()+"-";G.setRoot(g.root);m.updateCustomLinks(m.createCellMapping(p,A),[g.root]);g.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(g);+EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,m=this.pages[g]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(u){this.handleError(u)}return b};+EditorUi.prototype.duplicatePage=function(b,e){var g=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var u=b.node.cloneNode(!1);u.removeAttribute("id");var p={},B=m.createCellLookup([m.model.root]);g=new DiagramPage(u);g.root=m.cloneCell(m.model.root,null,p);var H=new mxGraphModel;H.prefix=Editor.guid()+"-";H.setRoot(g.root);m.updateCustomLinks(m.createCellMapping(p,B),[g.root]);g.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(g);g.viewState.scale=1;delete g.viewState.scrollLeft;delete g.viewState.scrollTop;delete g.viewState.currentRoot;delete g.viewState.defaultParent;g.setName(e);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return g};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};-EditorUi.prototype.clonePages=function(b){for(var e=[],g=[],m=0;m<b.length;m++)try{g.push(this.clonePage(b[m]))}catch(v){e.push(mxResources.get("pageWithNumber",[m+1])+": "+v.toString())}if(0<e.length){b=Error(e.join("\n"));try{0<g.length&&(b.fallbackFileData=this.getXmlForPages(g))}catch(v){}throw b;}return g};+EditorUi.prototype.clonePages=function(b){for(var e=[],g=[],m=0;m<b.length;m++)try{g.push(this.clonePage(b[m]))}catch(u){e.push(mxResources.get("pageWithNumber",[m+1])+": "+u.toString())}if(0<e.length){b=Error(e.join("\n"));try{0<g.length&&(b.fallbackFileData=this.getXmlForPages(g))}catch(u){}throw b;}return g};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),g=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(g,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);e.diagramModified=b.diagramModified;return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(g){null!=g&&0<g.length&&this.editor.graph.model.execute(new RenamePage(this,b,g))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer geTabItem";return b};-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.className="geTabScroller";for(var g=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(v,p){p.className=this.pages[v]==this.currentPage?"geTab gePageTab geActivePage":"geTab gePageTab geInactivePage";p.setAttribute("draggable","true");mxEvent.addListener(p,"dragstart",mxUtils.bind(this,function(A){b.isEnabled()?(mxClient.IS_FF&&A.dataTransfer.setData("Text",-"<diagram/>"),g=v):mxEvent.consume(A)}));mxEvent.addListener(p,"dragend",mxUtils.bind(this,function(A){g=null;A.stopPropagation();A.preventDefault()}));mxEvent.addListener(p,"dragover",mxUtils.bind(this,function(A){null!=g&&(A.dataTransfer.dropEffect="move");A.stopPropagation();A.preventDefault()}));mxEvent.addListener(p,"drop",mxUtils.bind(this,function(A){null!=g&&v!=g&&this.movePage(g,v);A.stopPropagation();A.preventDefault()}));e.appendChild(p)})(m,this.createTabForPage(this.pages[m],m+1));m=+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.className="geTabScroller";for(var g=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(u,p){p.className=this.pages[u]==this.currentPage?"geTab gePageTab geActivePage":"geTab gePageTab geInactivePage";p.setAttribute("draggable","true");mxEvent.addListener(p,"dragstart",mxUtils.bind(this,function(B){b.isEnabled()?(mxClient.IS_FF&&B.dataTransfer.setData("Text",+"<diagram/>"),g=u):mxEvent.consume(B)}));mxEvent.addListener(p,"dragend",mxUtils.bind(this,function(B){g=null;B.stopPropagation();B.preventDefault()}));mxEvent.addListener(p,"dragover",mxUtils.bind(this,function(B){null!=g&&(B.dataTransfer.dropEffect="move");B.stopPropagation();B.preventDefault()}));mxEvent.addListener(p,"drop",mxUtils.bind(this,function(B){null!=g&&u!=g&&this.movePage(g,u);B.stopPropagation();B.preventDefault()}));e.appendChild(p)})(m,this.createTabForPage(this.pages[m],m+1));m=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(e);this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());this.leftScrollTab=this.createLeftScrollTab();this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);-this.tabScroller=e;this.tabScroller.scrollLeft=m;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(v){this.checkTabScrollerOverflow()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.leftScrollTab.style,"transition","all 0.2s linear");mxUtils.setPrefixedStyle(this.rightScrollTab.style,"transition","all 0.2s linear")}),0)}};+this.tabScroller=e;this.tabScroller.scrollLeft=m;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(u){this.checkTabScrollerOverflow()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.leftScrollTab.style,"transition","all 0.2s linear");mxUtils.setPrefixedStyle(this.rightScrollTab.style,"transition","all 0.2s linear")}),0)}};EditorUi.prototype.checkTabScrollerOverflow=function(){null!=this.tabScroller&&null!=this.tabContainer&&2<this.tabContainer.children.length&&(this.tabScroller.scrollWidth>this.tabScroller.offsetWidth?(this.leftScrollTab.style.display="",this.rightScrollTab.style.display="",0==this.tabScroller.scrollLeft?this.leftScrollTab.classList.add("geDisabledControlTab"):this.leftScrollTab.classList.remove("geDisabledControlTab"),Math.ceil(this.tabScroller.scrollLeft)+this.tabScroller.offsetWidth>=this.tabScroller.scrollWidth?this.rightScrollTab.classList.add("geDisabledControlTab"):this.rightScrollTab.classList.remove("geDisabledControlTab")):(this.leftScrollTab.style.display="none",this.rightScrollTab.style.display="none"))};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};EditorUi.prototype.createTab=function(){var b=document.createElement("div");b.className="geTab";return b};EditorUi.prototype.getShortPageName=function(b){var e=null;null!=b&&(e=b.getName(),null!=e&&36<e.length&&(e=e.substring(0,34)+"..."));return e};@@ -4095,120 +4094,120 @@ EditorUi.prototype.createControlTab=function(b,e,g){var m=this.createTab();m.claEditorUi.prototype.createPageInsertTab=function(){return this.createControlTab(mxResources.get("insertPage"),Editor.plusImage,mxUtils.bind(this,function(b){try{this.insertPage()}catch(e){this.handleError(e)}mxEvent.consume(b)}))};EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(null,Editor.thinArrowLeftImage,mxUtils.bind(this,function(b){var e=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:-e,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft-=e;mxEvent.consume(b)}))};EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.thinArrowRightImage,mxUtils.bind(this,function(b){var e=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:e,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=e;mxEvent.consume(b)}))};-EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.verticalDotsImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(mxUtils.bind(this,function(v,p){this.menus.get("pages").funct(v,p)}));e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);e.destroy()});var g=mxEvent.getClientX(b),-m=mxEvent.getClientY(b);e.popup(g,m,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var g=this.createTab(),m=b.getName()||mxResources.get("untitled"),v=b.getId();g.setAttribute("title",m+(null!=v?" ("+v+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,m);g.appendChild(e);this.addTabListeners(b,g);return g};-EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var m=document.createElement("div");m.className="geTabMenuButton";m.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";m.style.backgroundSize="10px";e.appendChild(m);var v=!1,p=!1,A=mxUtils.bind(this,-function(S){v=null!=this.currentMenu;p=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||p||this.selectPage(b)}),G=mxUtils.bind(this,function(S){if(g.isEnabled()&&!g.isMouseDown&&(p&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==m)||mxEvent.isPopupTrigger(S))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!v)){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,-function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var P=mxEvent.getClientX(S),R=mxEvent.getClientY(S);F.popup(P,R,null,S);this.setCurrentMenu(F,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(m,A,null,G);mxEvent.addGestureListeners(e,A,null,G)};+EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.verticalDotsImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(mxUtils.bind(this,function(u,p){this.menus.get("pages").funct(u,p)}));e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);e.destroy()});var g=mxEvent.getClientX(b),+m=mxEvent.getClientY(b);e.popup(g,m,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var g=this.createTab(),m=b.getName()||mxResources.get("untitled"),u=b.getId();g.setAttribute("title",m+(null!=u?" ("+u+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,m);g.appendChild(e);this.addTabListeners(b,g);return g};+EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var m=document.createElement("div");m.className="geTabMenuButton";m.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";m.style.backgroundSize="10px";e.appendChild(m);var u=!1,p=!1,B=mxUtils.bind(this,+function(S){u=null!=this.currentMenu;p=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||p||this.selectPage(b)}),H=mxUtils.bind(this,function(S){if(g.isEnabled()&&!g.isMouseDown&&(p&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==m)||mxEvent.isPopupTrigger(S))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!u)){var G=new mxPopupMenu(this.createPageMenu(b));G.div.className+=" geMenubarMenu";G.smartSeparators=!0;G.showDisabled=!0;G.autoExpand=!0;G.hideMenu=mxUtils.bind(this,+function(){mxPopupMenu.prototype.hideMenu.apply(G,arguments);this.resetCurrentMenu();G.destroy()});var O=mxEvent.getClientX(S),R=mxEvent.getClientY(S);G.popup(O,R,null,S);this.setCurrentMenu(G,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(m,B,null,H);mxEvent.addGestureListeners(e,B,null,H)};EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(g,m){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||g.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),m));g.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);g.addSeparator(m);this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",g,m,mxResources.get("move"));g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);g.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m)})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();-(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(e,g,m){m.setAttribute("relatedPage",g.relatedPage.getId());null==g.index&&(m.setAttribute("name",g.relatedPage.getName()),null!=g.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(g.relatedPage.viewState,function(v,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,v)?p:void 0})),null!=g.relatedPage.root&&e.encodeCell(g.relatedPage.root,m));return m};-b.beforeDecode=function(e,g,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(g.getAttribute("relatedPage"));if(null==m.relatedPage){var v=g.ownerDocument.createElement("diagram");v.setAttribute("id",g.getAttribute("relatedPage"));v.setAttribute("name",g.getAttribute("name"));m.relatedPage=new DiagramPage(v);v=g.getAttribute("viewState");null!=v&&(m.relatedPage.viewState=JSON.parse(v),g.removeAttribute("viewState"));g=g.cloneNode(!0);v=g.firstChild;if(null!=v)for(m.relatedPage.root=e.decodeCell(v,!1),m=-v.nextSibling,v.parentNode.removeChild(v),v=m;null!=v;){m=v.nextSibling;if(v.nodeType==mxConstants.NODETYPE_ELEMENT){var p=v.getAttribute("id");null==e.lookup(p)&&e.decodeCell(v)}v.parentNode.removeChild(v);v=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,v,p,A,G){v=null!=v?v:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var S=p.slice(),F=0;F<p.length;F++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[F]),"treeFolding","0")&&this.foldTreeCell(m,p[F]);p=S;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=function(m,v){this.model.beginUpdate();try{var p=-[];this.traverse(v,!0,mxUtils.bind(this,function(G,S){var F=null!=S&&this.isTreeEdge(S);F&&p.push(S);G==v||null!=S&&!F||p.push(G);return(null==S||F)&&(G==v||!this.model.isCollapsed(G))}));this.model.setCollapsed(v,m);for(var A=0;A<p.length;A++)this.model.setVisible(p[A],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,v,p,A,G,S){return this.model.filterCells(this.getEdges(m,v,p,A,G,S),mxUtils.bind(this,-function(F){return this.isTreeEdge(F)}))};Graph.prototype.getIncomingTreeEdges=function(m,v){return this.getTreeEdges(m,v,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,v){return this.getTreeEdges(m,v,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(Y){return k.isVertex(Y)&&p(Y)}function v(Y){var fa=!1;null!=Y&&(fa=-"1"==f.getCurrentCellStyle(Y).treeMoving);return fa}function p(Y){var fa=!1;null!=Y&&(Y=k.getParent(Y),fa=f.view.getState(Y),fa="tree"==(null!=fa?fa.style:f.getCellStyle(Y)).containerType);return fa}function A(Y){var fa=!1;null!=Y&&(Y=k.getParent(Y),fa=f.view.getState(Y),f.view.getState(Y),fa=null!=(null!=fa?fa.style:f.getCellStyle(Y)).childLayout);return fa}function G(Y){Y=f.view.getState(Y);if(null!=Y){var fa=f.getIncomingTreeEdges(Y.cell);if(0<fa.length&&(fa=f.view.getState(fa[0]),null!=fa&&(fa=-fa.absolutePoints,null!=fa&&0<fa.length&&(fa=fa[fa.length-1],null!=fa)))){if(fa.y==Y.y&&Math.abs(fa.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_SOUTH;if(fa.y==Y.y+Y.height&&Math.abs(fa.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_NORTH;if(fa.x>Y.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Y,fa){fa=null!=fa?fa:!0;f.model.beginUpdate();try{var Z=f.model.getParent(Y),l=f.getIncomingTreeEdges(Y),u=f.cloneCells([l[0],Y]);f.model.setTerminal(u[0],-f.model.getTerminal(l[0],!0),!0);var H=G(Y),U=Z.geometry;H==mxConstants.DIRECTION_SOUTH||H==mxConstants.DIRECTION_NORTH?u[1].geometry.x+=fa?Y.geometry.width+10:-u[1].geometry.width-10:u[1].geometry.y+=fa?Y.geometry.height+10:-u[1].geometry.height-10;f.view.currentRoot!=Z&&(u[1].geometry.x-=U.x,u[1].geometry.y-=U.y);var J=f.view.getState(Y),W=f.view.scale;if(null!=J){var aa=mxRectangle.fromRectangle(J);H==mxConstants.DIRECTION_SOUTH||H==mxConstants.DIRECTION_NORTH?aa.x+=(fa?Y.geometry.width+10:-u[1].geometry.width--10)*W:aa.y+=(fa?Y.geometry.height+10:-u[1].geometry.height-10)*W;var ba=f.getOutgoingTreeEdges(f.model.getTerminal(l[0],!0));if(null!=ba){for(var ja=H==mxConstants.DIRECTION_SOUTH||H==mxConstants.DIRECTION_NORTH,oa=U=l=0;oa<ba.length;oa++){var qa=f.model.getTerminal(ba[oa],!1);if(H==G(qa)){var ra=f.view.getState(qa);qa!=Y&&null!=ra&&(ja&&fa!=ra.getCenterX()<J.getCenterX()||!ja&&fa!=ra.getCenterY()<J.getCenterY())&&mxUtils.intersects(aa,ra)&&(l=10+Math.max(l,(Math.min(aa.x+aa.width,ra.x+ra.width)--Math.max(aa.x,ra.x))/W),U=10+Math.max(U,(Math.min(aa.y+aa.height,ra.y+ra.height)-Math.max(aa.y,ra.y))/W))}}ja?U=0:l=0;for(oa=0;oa<ba.length;oa++)if(qa=f.model.getTerminal(ba[oa],!1),H==G(qa)&&(ra=f.view.getState(qa),qa!=Y&&null!=ra&&(ja&&fa!=ra.getCenterX()<J.getCenterX()||!ja&&fa!=ra.getCenterY()<J.getCenterY()))){var ua=[];f.traverse(ra.cell,!0,function(za,Ba){var Ca=null!=Ba&&f.isTreeEdge(Ba);Ca&&ua.push(Ba);(null==Ba||Ca)&&ua.push(za);return null==Ba||Ca});f.moveCells(ua,(fa?1:-1)*l,(fa?1:-1)*-U)}}}return f.addCells(u,Z)}finally{f.model.endUpdate()}}function F(Y){f.model.beginUpdate();try{var fa=G(Y),Z=f.getIncomingTreeEdges(Y),l=f.cloneCells([Z[0],Y]);f.model.setTerminal(Z[0],l[1],!1);f.model.setTerminal(l[0],l[1],!0);f.model.setTerminal(l[0],Y,!1);var u=f.model.getParent(Y),H=u.geometry,U=[];f.view.currentRoot!=u&&(l[1].geometry.x-=H.x,l[1].geometry.y-=H.y);f.traverse(Y,!0,function(aa,ba){var ja=null!=ba&&f.isTreeEdge(ba);ja&&U.push(ba);(null==ba||ja)&&U.push(aa);return null==ba||ja});-var J=Y.geometry.width+40,W=Y.geometry.height+40;fa==mxConstants.DIRECTION_SOUTH?J=0:fa==mxConstants.DIRECTION_NORTH?(J=0,W=-W):fa==mxConstants.DIRECTION_WEST?(J=-J,W=0):fa==mxConstants.DIRECTION_EAST&&(W=0);f.moveCells(U,J,W);return f.addCells(l,u)}finally{f.model.endUpdate()}}function P(Y,fa){f.model.beginUpdate();try{var Z=f.model.getParent(Y),l=f.getIncomingTreeEdges(Y),u=G(Y);0==l.length&&(l=[f.createEdge(Z,null,"",null,null,f.createCurrentEdgeStyle())],u=fa);var H=f.cloneCells([l[0],Y]);f.model.setTerminal(H[0],-Y,!0);null==f.model.getTerminal(H[0],!1)&&(f.model.setTerminal(H[0],H[1],!1),f.applyNewEdgeStyle(H[1],[H[0]],u));l=f.getOutgoingTreeEdges(Y);var U=Z.geometry;fa=[];f.view.currentRoot==Z&&(U=new mxRectangle);for(var J=0;J<l.length;J++){var W=f.model.getTerminal(l[J],!1);null!=W&&fa.push(W)}var aa=f.view.getBounds(fa),ba=f.view.translate,ja=f.view.scale;u==mxConstants.DIRECTION_SOUTH?(H[1].geometry.x=null==aa?Y.geometry.x+(Y.geometry.width-H[1].geometry.width)/2:(aa.x+aa.width)/ja-ba.x-U.x+10,H[1].geometry.y+=-H[1].geometry.height-U.y+40):u==mxConstants.DIRECTION_NORTH?(H[1].geometry.x=null==aa?Y.geometry.x+(Y.geometry.width-H[1].geometry.width)/2:(aa.x+aa.width)/ja-ba.x+-U.x+10,H[1].geometry.y-=H[1].geometry.height+U.y+40):(H[1].geometry.x=u==mxConstants.DIRECTION_WEST?H[1].geometry.x-(H[1].geometry.width+U.x+40):H[1].geometry.x+(H[1].geometry.width-U.x+40),H[1].geometry.y=null==aa?Y.geometry.y+(Y.geometry.height-H[1].geometry.height)/2:(aa.y+aa.height)/ja-ba.y+-U.y+10);return f.addCells(H,Z)}finally{f.model.endUpdate()}}-function R(Y,fa,Z){Y=f.getOutgoingTreeEdges(Y);Z=f.view.getState(Z);var l=[];if(null!=Z&&null!=Y){for(var u=0;u<Y.length;u++){var H=f.view.getState(f.model.getTerminal(Y[u],!1));null!=H&&(!fa&&Math.min(H.x+H.width,Z.x+Z.width)>=Math.max(H.x,Z.x)||fa&&Math.min(H.y+H.height,Z.y+Z.height)>=Math.max(H.y,Z.y))&&l.push(H)}l.sort(function(U,J){return fa?U.x+U.width-J.x-J.width:U.y+U.height-J.y-J.height})}return l}function T(Y,fa){var Z=G(Y),l=fa==mxConstants.DIRECTION_EAST||fa==mxConstants.DIRECTION_WEST;-(Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST)==l&&Z!=fa?c.actions.get("selectParent").funct():Z==fa?(fa=f.getOutgoingTreeEdges(Y),null!=fa&&0<fa.length&&f.setSelectionCell(f.model.getTerminal(fa[0],!1))):(Z=f.getIncomingTreeEdges(Y),null!=Z&&0<Z.length&&(l=R(f.model.getTerminal(Z[0],!0),l,Y),Y=f.view.getState(Y),null!=Y&&(Y=mxUtils.indexOf(l,Y),0<=Y&&(Y+=fa==mxConstants.DIRECTION_NORTH||fa==mxConstants.DIRECTION_WEST?-1:1,0<=Y&&Y<=l.length-1&&f.setSelectionCell(l[Y].cell)))))}var c=-this,f=c.editor.graph,k=f.getModel(),B=c.menus.createPopupMenu;c.menus.createPopupMenu=function(Y,fa,Z){B.apply(this,arguments);if(1==f.getSelectionCount()){fa=f.getSelectionCell();var l=f.getOutgoingTreeEdges(fa);Y.addSeparator();0<l.length&&(m(f.getSelectionCell())&&this.addMenuItems(Y,["selectChildren"],null,Z),this.addMenuItems(Y,["selectDescendants"],null,Z));m(f.getSelectionCell())?(Y.addSeparator(),0<f.getIncomingTreeEdges(fa).length&&this.addMenuItems(Y,["selectSiblings","selectParent"],null,-Z)):0<f.model.getEdgeCount(fa)&&this.addMenuItems(Y,["selectConnections"],null,Z)}};c.actions.addAction("selectChildren",function(Y){if(f.isEnabled()&&1==f.getSelectionCount()){var fa=f.getSelectionCell();Y=mxEvent.isControlDown(Y)?null:f.getOutgoingTreeEdges(fa);if(null!=Y&&0<Y.length){fa=[];for(var Z=0;Z<Y.length;Z++)fa.push(f.model.getTerminal(Y[Z],!1));f.setSelectionCells(fa)}else f.setSelectionCells(f.model.getChildren(fa))}},null,null,"Alt+Shift+C");c.actions.addAction("selectDescendants",function(Y){var fa=-f.getSelectionCell();if(f.isEnabled()&&null!=fa){var Z=[];mxEvent.isControlDown(Y)||f.traverse(fa,!0,function(l,u){var H=null!=u&&f.isTreeEdge(u);H&&mxEvent.isControlDown(Y)&&Z.push(u);(null==u||H)&&Z.push(l);return null==u||H});if(0==Z.length||1==Z.length&&Z[0]==fa)Z=f.model.getDescendants(fa);f.setSelectionCells(Z)}},null,null,"Alt+Shift+X");c.actions.addAction("selectParent",function(Y){var fa=f.getSelectionCell();f.isEnabled()&&null!=fa&&(Y=mxEvent.isControlDown(Y)?null:f.getIncomingTreeEdges(fa),-null!=Y&&0<Y.length?f.setSelectionCell(f.model.getTerminal(Y[0],!0)):f.selectParentCell())},null,null,"Alt+Shift+P");c.actions.addAction("selectSiblings",function(Y){if(f.isEnabled()&&1==f.getSelectionCount()){var fa=f.getSelectionCell(),Z=mxEvent.isControlDown(Y)?null:f.getIncomingTreeEdges(fa);Y=[];if(null!=Z&&0<Z.length&&(Z=f.getOutgoingTreeEdges(f.model.getTerminal(Z[0],!0)),null!=Z))for(var l=0;l<Z.length;l++)Y.push(f.model.getTerminal(Z[l],!1));0==Y.length&&(Y=f.model.getChildren(f.model.getParent(fa)));-f.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var z=f.removeCells;f.removeCells=function(Y,fa){fa=null!=fa?fa:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));fa&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],l=0;l<Y.length;l++){var u=Y[l];k.isEdge(u)&&p(u)&&(Z.push(u),u=k.getTerminal(u,!1));if(m(u)){var H=[];f.traverse(u,!0,function(U,J){var W=null!=J&&f.isTreeEdge(J);W&&H.push(J);(null==J||W)&&H.push(U);return null==J||W});0<H.length&&(Z=Z.concat(H),u=f.getIncomingTreeEdges(Y[l]),-Y=Y.concat(u))}else null!=u&&Z.push(Y[l])}Y=Z;return z.apply(this,arguments)};c.hoverIcons.getStateAt=function(Y,fa,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(fa,Z))};var C=f.duplicateCells;f.duplicateCells=function(Y,fa){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),l=0;l<Z.length;l++){var u=f.view.getState(Z[l]);if(null!=u&&m(u.cell)){var H=f.getIncomingTreeEdges(u.cell);for(u=0;u<H.length;u++)mxUtils.remove(H[u],Y)}}this.model.beginUpdate();try{var U=C.call(this,-Y,fa);if(U.length==Y.length)for(l=0;l<Y.length;l++)if(m(Y[l])){var J=f.getIncomingTreeEdges(U[l]);H=f.getIncomingTreeEdges(Y[l]);if(0==J.length&&0<H.length){var W=this.cloneCell(H[0]);this.addEdge(W,f.getDefaultParent(),this.model.getTerminal(H[0],!0),U[l])}}}finally{this.model.endUpdate()}return U};var I=f.moveCells;f.moveCells=function(Y,fa,Z,l,u,H,U){for(var J=null,W=[],aa=0;aa<Y.length;aa++)(v(Y[aa])||m(Y[aa]))&&!A(Y[aa])&&this.isCellCollapsed(Y[aa])?W=W.concat(this.getSubtree(Y[aa])):W.push(Y[aa]);-Y=mxUtils.removeDuplicates(W);this.model.beginUpdate();try{W=u;var ba=this.getCurrentCellStyle(u);if(null!=Y&&m(u)&&"1"==mxUtils.getValue(ba,"treeFolding","0")){for(aa=0;aa<Y.length;aa++)if(m(Y[aa])||f.model.isEdge(Y[aa])&&null==f.model.getTerminal(Y[aa],!0)){u=f.model.getParent(Y[aa]);break}if(null!=W&&u!=W&&null!=this.view.getState(Y[0])){var ja=f.getIncomingTreeEdges(Y[0]);if(0<ja.length){var oa=f.view.getState(f.model.getTerminal(ja[0],!0));if(null!=oa){var qa=f.view.getState(W);null!=qa&&(fa=-(qa.getCenterX()-oa.getCenterX())/f.view.scale,Z=(qa.getCenterY()-oa.getCenterY())/f.view.scale)}}}}J=I.apply(this,arguments);if(null!=J&&null!=Y&&J.length==Y.length)for(aa=0;aa<J.length;aa++)if(this.model.isEdge(J[aa]))m(W)&&0>mxUtils.indexOf(J,this.model.getTerminal(J[aa],!0))&&this.model.setTerminal(J[aa],W,!0);else if(m(Y[aa])&&(ja=f.getIncomingTreeEdges(Y[aa]),0<ja.length))if(!l)m(W)&&0>mxUtils.indexOf(Y,this.model.getTerminal(ja[0],!0))&&this.model.setTerminal(ja[0],W,!0);else if(0==f.getIncomingTreeEdges(J[aa]).length){ba=-W;if(null==ba||ba==f.model.getParent(Y[aa]))ba=f.model.getTerminal(ja[0],!0);l=this.cloneCell(ja[0]);this.addEdge(l,f.getDefaultParent(),ba,J[aa])}}finally{this.model.endUpdate()}return J};if(null!=c.sidebar){var L=c.sidebar.dropAndConnect;c.sidebar.dropAndConnect=function(Y,fa,Z,l){var u=f.model,H=null;u.beginUpdate();try{if(H=L.apply(this,arguments),m(Y))for(var U=0;U<H.length;U++)if(u.isEdge(H[U])&&null==u.getTerminal(H[U],!0)){u.setTerminal(H[U],Y,!0);var J=f.getCellGeometry(H[U]);J.points=null;-null!=J.getTerminalPoint(!0)&&J.setTerminalPoint(null,!0)}}finally{u.endUpdate()}return H}}var K={67:c.actions.get("selectChildren"),88:c.actions.get("selectDescendants"),80:c.actions.get("selectParent"),83:c.actions.get("selectSiblings")},O={67:c.actions.get("copyStyle"),86:c.actions.get("pasteStyle")},da=c.onKeyDown;c.onKeyDown=function(Y){try{var fa=f.getSelectionCell();if(f.isEnabled()&&!f.isEditing()&&null!=fa){var Z=mxEvent.isAltDown(Y)&&mxEvent.isShiftDown(Y)?K[Y.keyCode]:mxEvent.isAltDown(Y)?-O[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(fa)&&(Z=null,0<f.getIncomingTreeEdges(fa).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?F(fa):P(fa):13==Y.which&&(Z=S(fa,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&f.model.isEdge(Z[0])?f.setSelectionCell(f.model.getTerminal(Z[0],!1)):f.setSelectionCell(Z[Z.length-1]),null!=c.hoverIcons&&c.hoverIcons.update(f.view.getState(fa)),f.startEditingAtCell(fa),mxEvent.consume(Y)):37==Y.keyCode?(T(fa,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):-38==Y.keyCode?(T(fa,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(T(fa,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(T(fa,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(l){c.handleError(l)}mxEvent.isConsumed(Y)||da.apply(this,arguments)};var ea=f.connectVertex;f.connectVertex=function(Y,fa,Z,l,u,H,U){var J=f.getIncomingTreeEdges(Y);if(m(Y)){var W=G(Y),aa=W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST,ba=fa==mxConstants.DIRECTION_EAST||fa==-mxConstants.DIRECTION_WEST;return W==fa||0==J.length?P(Y,fa):aa==ba?F(Y):S(Y,fa!=mxConstants.DIRECTION_NORTH&&fa!=mxConstants.DIRECTION_WEST)}return ea.apply(this,arguments)};f.getSubtree=function(Y){var fa=[Y];!v(Y)&&!m(Y)||A(Y)||f.traverse(Y,!0,function(Z,l){var u=null!=l&&f.isTreeEdge(l);u&&0>mxUtils.indexOf(fa,l)&&fa.push(l);(null==l||u)&&0>mxUtils.indexOf(fa,Z)&&fa.push(Z);return null==l||u});return fa};var ca=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){ca.apply(this,-arguments);(v(this.state.cell)||m(this.state.cell))&&!A(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),-this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Y){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Y),mxEvent.getClientY(Y),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Y);this.graph.isMouseDown=!0;c.hoverIcons.reset();mxEvent.consume(Y)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var V=mxVertexHandler.prototype.redrawHandles;-mxVertexHandler.prototype.redrawHandles=function(){V.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ma=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Y){ma.apply(this,arguments);null!=-this.moveHandle&&(this.moveHandle.style.display=Y?"":"none")};var la=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(Y,fa){la.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),v=this.graph,p=this;return m.concat([this.addEntry("tree container",-function(){var A=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");A.vertex=!0;var G=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');-S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);S.insertEdge(F,!1);A.insert(F);A.insert(G);A.insert(S);return p.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var A=new mxCell("Mindmap",new mxGeometry(0,-0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");A.vertex=!0;var G=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');G.vertex=!0;var S=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);S.insertEdge(F,!1);var P=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-P.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),F.style);R.geometry.relative=!0;R.edge=!0;G.insertEdge(R,!0);P.insertEdge(R,!1);var T=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-T.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),F.style);c.geometry.relative=!0;c.edge=!0;G.insertEdge(c,!0);T.insertEdge(c,!1);var f=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-f.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),F.style);k.geometry.relative=!0;k.edge=!0;G.insertEdge(k,!0);f.insertEdge(k,!1);A.insert(F);A.insert(R);A.insert(c);A.insert(k);A.insert(G);A.insert(S);A.insert(P);A.insert(T);A.insert(f);return p.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var A=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');-A.vertex=!0;return p.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var A=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.setTerminalPoint(new mxPoint(-40,40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return p.createVertexTemplateFromCells([A,G],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var A=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),-'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");-G.geometry.setTerminalPoint(new mxPoint(-40,40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return p.createVertexTemplateFromCells([A,G],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree orgchart organization division",function(){var A=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');A.vertex=!0;var G=new mxCell("Organization",new mxGeometry(80,-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.setAttributeForCell(G,"treeRoot","1");G.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);S.insertEdge(F,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");R.geometry.relative=-!0;R.edge=!0;G.insertEdge(R,!0);P.insertEdge(R,!1);A.insert(F);A.insert(R);A.insert(G);A.insert(S);A.insert(P);return p.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree root",function(){var A=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.setAttributeForCell(A,"treeRoot","1");A.vertex=!0;return p.createVertexTemplateFromCells([A],-A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree division",function(){var A=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-G.geometry.setTerminalPoint(new mxPoint(0,0),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return p.createVertexTemplateFromCells([A,G],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree sub sections",function(){var A=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");-G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),G.style);F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;S.insertEdge(F,!1);return p.createVertexTemplateFromCells([G,F,A,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;-EditorUi.initMinimalTheme=function(){function b(T,c){if(EditorUi.windowed){var f=T.editor.graph;f.popupMenuHandler.hideMenu();null==T.formatWindow?(c=Math.max(10,T.diagramContainer.clientWidth-248),f=Math.min(566,f.container.clientHeight-10),T.formatWindow=new WrapperWindow(T,mxResources.get("format"),c,60,240,f,function(k){T.createFormat(k).init()}),T.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){T.formatWindow.window.fit()})),T.formatWindow.window.minimumSize=new mxRectangle(0,-0,240,80)):T.formatWindow.window.setVisible(null!=c?c:!T.formatWindow.window.isVisible())}else null==T.formatElt&&(T.formatElt=T.createSidebarContainer(),T.createFormat(T.formatElt).init(),T.formatElt.style.border="none",T.formatElt.style.width="240px",T.formatElt.style.borderLeftWidth="1px",T.formatElt.style.borderLeftStyle="solid",T.formatElt.style.right="0px"),f=T.diagramContainer.parentNode,null!=T.formatElt.parentNode?(T.formatElt.parentNode.removeChild(T.formatElt),f.style.right="0px"):(f.parentNode.appendChild(T.formatElt),-f.style.right=T.formatElt.style.width)}function e(T,c){function f(z,C){var I=T.menus.get(z);z=k.addMenu(C,mxUtils.bind(this,function(){I.funct.apply(this,arguments)}));z.setAttribute("title",C);z.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";z.className="geTitle";c.appendChild(z);return z}var k=new Menubar(T,c);if(Editor.enableCustomLibraries&&-("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=T.actions.get("newLibrary")){var B=document.createElement("div");B.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";B.className="geTitle";mxUtils.write(B,mxResources.get("newLibrary"));c.appendChild(B);mxEvent.addListener(B,"click",this.actions.get("newLibrary").funct);-B=B.cloneNode(!1);B.style.left="50%";B.style.borderLeftStyle="solid";mxUtils.write(B,mxResources.get("openLibrary"));c.appendChild(B);mxEvent.addListener(B,"click",this.actions.get("openLibrary").funct)}else B=f("newLibrary",mxResources.get("newLibrary")),B.style.display="block",B.style.fontSize="11px",B.style.left="0",B=f("openLibraryFrom",mxResources.get("openLibraryFrom")),B.style.borderLeftStyle="solid",B.style.display="block",B.style.fontSize="11px",B.style.left="50%";c.appendChild(T.sidebar.container);-c.style.overflow="hidden"}function g(T,c){if(EditorUi.windowed){var f=T.editor.graph;f.popupMenuHandler.hideMenu();null==T.sidebarWindow?(c=Math.min(f.container.clientWidth-10,218),f=Math.min(f.container.clientHeight-40,650),T.sidebarWindow=new WrapperWindow(T,mxResources.get("shapes"),10,56,c-6,f-6,function(k){e(T,k)}),T.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){T.sidebarWindow.window.fit()})),T.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),T.sidebarWindow.window.setVisible(!0),-isLocalStorage&&T.getLocalData("sidebar",function(k){T.sidebar.showEntries(k,null,!0)}),T.restoreLibraries()):T.sidebarWindow.window.setVisible(null!=c?c:!T.sidebarWindow.window.isVisible())}else null==T.sidebarElt&&(T.sidebarElt=T.createSidebarContainer(),e(T,T.sidebarElt),T.sidebarElt.style.border="none",T.sidebarElt.style.width="210px",T.sidebarElt.style.borderRight="1px solid gray"),f=T.diagramContainer.parentNode,null!=T.sidebarElt.parentNode?(T.sidebarElt.parentNode.removeChild(T.sidebarElt),-f.style.left="0px"):(f.parentNode.appendChild(T.sidebarElt),f.style.left=T.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(T){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');+(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(e,g,m){m.setAttribute("relatedPage",g.relatedPage.getId());null==g.index&&(m.setAttribute("name",g.relatedPage.getName()),null!=g.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(g.relatedPage.viewState,function(u,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,u)?p:void 0})),null!=g.relatedPage.root&&e.encodeCell(g.relatedPage.root,m));return m};+b.beforeDecode=function(e,g,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(g.getAttribute("relatedPage"));if(null==m.relatedPage){var u=g.ownerDocument.createElement("diagram");u.setAttribute("id",g.getAttribute("relatedPage"));u.setAttribute("name",g.getAttribute("name"));m.relatedPage=new DiagramPage(u);u=g.getAttribute("viewState");null!=u&&(m.relatedPage.viewState=JSON.parse(u),g.removeAttribute("viewState"));g=g.cloneNode(!0);u=g.firstChild;if(null!=u)for(m.relatedPage.root=e.decodeCell(u,!1),m=+u.nextSibling,u.parentNode.removeChild(u),u=m;null!=u;){m=u.nextSibling;if(u.nodeType==mxConstants.NODETYPE_ELEMENT){var p=u.getAttribute("id");null==e.lookup(p)&&e.decodeCell(u)}u.parentNode.removeChild(u);u=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,u,p,B,H){u=null!=u?u:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var S=p.slice(),G=0;G<p.length;G++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[G]),"treeFolding","0")&&this.foldTreeCell(m,p[G]);p=S;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=function(m,u){this.model.beginUpdate();try{var p=+[];this.traverse(u,!0,mxUtils.bind(this,function(H,S){var G=null!=S&&this.isTreeEdge(S);G&&p.push(S);H==u||null!=S&&!G||p.push(H);return(null==S||G)&&(H==u||!this.model.isCollapsed(H))}));this.model.setCollapsed(u,m);for(var B=0;B<p.length;B++)this.model.setVisible(p[B],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,u,p,B,H,S){return this.model.filterCells(this.getEdges(m,u,p,B,H,S),mxUtils.bind(this,+function(G){return this.isTreeEdge(G)}))};Graph.prototype.getIncomingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(Y){return t.isVertex(Y)&&p(Y)}function u(Y){var la=!1;null!=Y&&(la=+"1"==l.getCurrentCellStyle(Y).treeMoving);return la}function p(Y){var la=!1;null!=Y&&(Y=t.getParent(Y),la=l.view.getState(Y),la="tree"==(null!=la?la.style:l.getCellStyle(Y)).containerType);return la}function B(Y){var la=!1;null!=Y&&(Y=t.getParent(Y),la=l.view.getState(Y),l.view.getState(Y),la=null!=(null!=la?la.style:l.getCellStyle(Y)).childLayout);return la}function H(Y){Y=l.view.getState(Y);if(null!=Y){var la=l.getIncomingTreeEdges(Y.cell);if(0<la.length&&(la=l.view.getState(la[0]),null!=la&&(la=+la.absolutePoints,null!=la&&0<la.length&&(la=la[la.length-1],null!=la)))){if(la.y==Y.y&&Math.abs(la.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_SOUTH;if(la.y==Y.y+Y.height&&Math.abs(la.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_NORTH;if(la.x>Y.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Y,la){la=null!=la?la:!0;l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=l.cloneCells([k[0],Y]);l.model.setTerminal(A[0],+l.model.getTerminal(k[0],!0),!0);var J=H(Y),U=Z.geometry;J==mxConstants.DIRECTION_SOUTH||J==mxConstants.DIRECTION_NORTH?A[1].geometry.x+=la?Y.geometry.width+10:-A[1].geometry.width-10:A[1].geometry.y+=la?Y.geometry.height+10:-A[1].geometry.height-10;l.view.currentRoot!=Z&&(A[1].geometry.x-=U.x,A[1].geometry.y-=U.y);var P=l.view.getState(Y),T=l.view.scale;if(null!=P){var W=mxRectangle.fromRectangle(P);J==mxConstants.DIRECTION_SOUTH||J==mxConstants.DIRECTION_NORTH?W.x+=(la?Y.geometry.width+10:-A[1].geometry.width-+10)*T:W.y+=(la?Y.geometry.height+10:-A[1].geometry.height-10)*T;var aa=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=aa){for(var ja=J==mxConstants.DIRECTION_SOUTH||J==mxConstants.DIRECTION_NORTH,pa=U=k=0;pa<aa.length;pa++){var sa=l.model.getTerminal(aa[pa],!1);if(J==H(sa)){var qa=l.view.getState(sa);sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY())&&mxUtils.intersects(W,qa)&&(k=10+Math.max(k,(Math.min(W.x+W.width,qa.x+qa.width)-Math.max(W.x,+qa.x))/T),U=10+Math.max(U,(Math.min(W.y+W.height,qa.y+qa.height)-Math.max(W.y,qa.y))/T))}}ja?U=0:k=0;for(pa=0;pa<aa.length;pa++)if(sa=l.model.getTerminal(aa[pa],!1),J==H(sa)&&(qa=l.view.getState(sa),sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY()))){var wa=[];l.traverse(qa.cell,!0,function(Ba,za){var Ea=null!=za&&l.isTreeEdge(za);Ea&&wa.push(za);(null==za||Ea)&&wa.push(Ba);return null==za||Ea});l.moveCells(wa,(la?1:-1)*k,(la?1:-1)*U)}}}return l.addCells(A,+Z)}finally{l.model.endUpdate()}}function G(Y){l.model.beginUpdate();try{var la=H(Y),Z=l.getIncomingTreeEdges(Y),k=l.cloneCells([Z[0],Y]);l.model.setTerminal(Z[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],Y,!1);var A=l.model.getParent(Y),J=A.geometry,U=[];l.view.currentRoot!=A&&(k[1].geometry.x-=J.x,k[1].geometry.y-=J.y);l.traverse(Y,!0,function(W,aa){var ja=null!=aa&&l.isTreeEdge(aa);ja&&U.push(aa);(null==aa||ja)&&U.push(W);return null==aa||ja});var P=Y.geometry.width+40,+T=Y.geometry.height+40;la==mxConstants.DIRECTION_SOUTH?P=0:la==mxConstants.DIRECTION_NORTH?(P=0,T=-T):la==mxConstants.DIRECTION_WEST?(P=-P,T=0):la==mxConstants.DIRECTION_EAST&&(T=0);l.moveCells(U,P,T);return l.addCells(k,A)}finally{l.model.endUpdate()}}function O(Y,la){l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=H(Y);0==k.length&&(k=[l.createEdge(Z,null,"",null,null,l.createCurrentEdgeStyle())],A=la);var J=l.cloneCells([k[0],Y]);l.model.setTerminal(J[0],Y,!0);+null==l.model.getTerminal(J[0],!1)&&(l.model.setTerminal(J[0],J[1],!1),l.applyNewEdgeStyle(J[1],[J[0]],A));k=l.getOutgoingTreeEdges(Y);var U=Z.geometry;la=[];l.view.currentRoot==Z&&(U=new mxRectangle);for(var P=0;P<k.length;P++){var T=l.model.getTerminal(k[P],!1);null!=T&&la.push(T)}var W=l.view.getBounds(la),aa=l.view.translate,ja=l.view.scale;A==mxConstants.DIRECTION_SOUTH?(J[1].geometry.x=null==W?Y.geometry.x+(Y.geometry.width-J[1].geometry.width)/2:(W.x+W.width)/ja-aa.x-U.x+10,J[1].geometry.y+=+J[1].geometry.height-U.y+40):A==mxConstants.DIRECTION_NORTH?(J[1].geometry.x=null==W?Y.geometry.x+(Y.geometry.width-J[1].geometry.width)/2:(W.x+W.width)/ja-aa.x+-U.x+10,J[1].geometry.y-=J[1].geometry.height+U.y+40):(J[1].geometry.x=A==mxConstants.DIRECTION_WEST?J[1].geometry.x-(J[1].geometry.width+U.x+40):J[1].geometry.x+(J[1].geometry.width-U.x+40),J[1].geometry.y=null==W?Y.geometry.y+(Y.geometry.height-J[1].geometry.height)/2:(W.y+W.height)/ja-aa.y+-U.y+10);return l.addCells(J,Z)}finally{l.model.endUpdate()}}+function R(Y,la,Z){Y=l.getOutgoingTreeEdges(Y);Z=l.view.getState(Z);var k=[];if(null!=Z&&null!=Y){for(var A=0;A<Y.length;A++){var J=l.view.getState(l.model.getTerminal(Y[A],!1));null!=J&&(!la&&Math.min(J.x+J.width,Z.x+Z.width)>=Math.max(J.x,Z.x)||la&&Math.min(J.y+J.height,Z.y+Z.height)>=Math.max(J.y,Z.y))&&k.push(J)}k.sort(function(U,P){return la?U.x+U.width-P.x-P.width:U.y+U.height-P.y-P.height})}return k}function c(Y,la){var Z=H(Y),k=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;+(Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST)==k&&Z!=la?f.actions.get("selectParent").funct():Z==la?(la=l.getOutgoingTreeEdges(Y),null!=la&&0<la.length&&l.setSelectionCell(l.model.getTerminal(la[0],!1))):(Z=l.getIncomingTreeEdges(Y),null!=Z&&0<Z.length&&(k=R(l.model.getTerminal(Z[0],!0),k,Y),Y=l.view.getState(Y),null!=Y&&(Y=mxUtils.indexOf(k,Y),0<=Y&&(Y+=la==mxConstants.DIRECTION_NORTH||la==mxConstants.DIRECTION_WEST?-1:1,0<=Y&&Y<=k.length-1&&l.setSelectionCell(k[Y].cell)))))}var f=+this,l=f.editor.graph,t=l.getModel(),z=f.menus.createPopupMenu;f.menus.createPopupMenu=function(Y,la,Z){z.apply(this,arguments);if(1==l.getSelectionCount()){la=l.getSelectionCell();var k=l.getOutgoingTreeEdges(la);Y.addSeparator();0<k.length&&(m(l.getSelectionCell())&&this.addMenuItems(Y,["selectChildren"],null,Z),this.addMenuItems(Y,["selectDescendants"],null,Z));m(l.getSelectionCell())?(Y.addSeparator(),0<l.getIncomingTreeEdges(la).length&&this.addMenuItems(Y,["selectSiblings","selectParent"],null,+Z)):0<l.model.getEdgeCount(la)&&this.addMenuItems(Y,["selectConnections"],null,Z)}};f.actions.addAction("selectChildren",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var la=l.getSelectionCell();Y=mxEvent.isControlDown(Y)?null:l.getOutgoingTreeEdges(la);if(null!=Y&&0<Y.length){la=[];for(var Z=0;Z<Y.length;Z++)la.push(l.model.getTerminal(Y[Z],!1));l.setSelectionCells(la)}else l.setSelectionCells(l.model.getChildren(la))}},null,null,"Alt+Shift+C");f.actions.addAction("selectDescendants",function(Y){var la=+l.getSelectionCell();if(l.isEnabled()&&null!=la){var Z=[];mxEvent.isControlDown(Y)||l.traverse(la,!0,function(k,A){var J=null!=A&&l.isTreeEdge(A);J&&mxEvent.isControlDown(Y)&&Z.push(A);(null==A||J)&&Z.push(k);return null==A||J});if(0==Z.length||1==Z.length&&Z[0]==la)Z=l.model.getDescendants(la);l.setSelectionCells(Z)}},null,null,"Alt+Shift+X");f.actions.addAction("selectParent",function(Y){var la=l.getSelectionCell();l.isEnabled()&&null!=la&&(Y=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(la),+null!=Y&&0<Y.length?l.setSelectionCell(l.model.getTerminal(Y[0],!0)):l.selectParentCell())},null,null,"Alt+Shift+P");f.actions.addAction("selectSiblings",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var la=l.getSelectionCell(),Z=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(la);Y=[];if(null!=Z&&0<Z.length&&(Z=l.getOutgoingTreeEdges(l.model.getTerminal(Z[0],!0)),null!=Z))for(var k=0;k<Z.length;k++)Y.push(l.model.getTerminal(Z[k],!1));0==Y.length&&(Y=l.model.getChildren(l.model.getParent(la)));+l.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var C=l.removeCells;l.removeCells=function(Y,la){la=null!=la?la:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));la&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],k=0;k<Y.length;k++){var A=Y[k];t.isEdge(A)&&p(A)&&(Z.push(A),A=t.getTerminal(A,!1));if(m(A)){var J=[];l.traverse(A,!0,function(U,P){var T=null!=P&&l.isTreeEdge(P);T&&J.push(P);(null==P||T)&&J.push(U);return null==P||T});0<J.length&&(Z=Z.concat(J),A=l.getIncomingTreeEdges(Y[k]),+Y=Y.concat(A))}else null!=A&&Z.push(Y[k])}Y=Z;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(Y,la,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(la,Z))};var F=l.duplicateCells;l.duplicateCells=function(Y,la){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),k=0;k<Z.length;k++){var A=l.view.getState(Z[k]);if(null!=A&&m(A.cell)){var J=l.getIncomingTreeEdges(A.cell);for(A=0;A<J.length;A++)mxUtils.remove(J[A],Y)}}this.model.beginUpdate();try{var U=F.call(this,+Y,la);if(U.length==Y.length)for(k=0;k<Y.length;k++)if(m(Y[k])){var P=l.getIncomingTreeEdges(U[k]);J=l.getIncomingTreeEdges(Y[k]);if(0==P.length&&0<J.length){var T=this.cloneCell(J[0]);this.addEdge(T,l.getDefaultParent(),this.model.getTerminal(J[0],!0),U[k])}}}finally{this.model.endUpdate()}return U};var N=l.moveCells;l.moveCells=function(Y,la,Z,k,A,J,U){for(var P=null,T=[],W=0;W<Y.length;W++)(u(Y[W])||m(Y[W]))&&!B(Y[W])&&this.isCellCollapsed(Y[W])?T=T.concat(this.getSubtree(Y[W])):T.push(Y[W]);Y=+mxUtils.removeDuplicates(T);this.model.beginUpdate();try{T=A;var aa=this.getCurrentCellStyle(A);if(null!=Y&&m(A)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(W=0;W<Y.length;W++)if(m(Y[W])||l.model.isEdge(Y[W])&&null==l.model.getTerminal(Y[W],!0)){A=l.model.getParent(Y[W]);break}if(null!=T&&A!=T&&null!=this.view.getState(Y[0])){var ja=l.getIncomingTreeEdges(Y[0]);if(0<ja.length){var pa=l.view.getState(l.model.getTerminal(ja[0],!0));if(null!=pa){var sa=l.view.getState(T);null!=sa&&(la=(sa.getCenterX()-+pa.getCenterX())/l.view.scale,Z=(sa.getCenterY()-pa.getCenterY())/l.view.scale)}}}}P=N.apply(this,arguments);if(null!=P&&null!=Y&&P.length==Y.length)for(W=0;W<P.length;W++)if(this.model.isEdge(P[W]))m(T)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[W],!0))&&this.model.setTerminal(P[W],T,!0);else if(m(Y[W])&&(ja=l.getIncomingTreeEdges(Y[W]),0<ja.length))if(!k)m(T)&&0>mxUtils.indexOf(Y,this.model.getTerminal(ja[0],!0))&&this.model.setTerminal(ja[0],T,!0);else if(0==l.getIncomingTreeEdges(P[W]).length){aa=+T;if(null==aa||aa==l.model.getParent(Y[W]))aa=l.model.getTerminal(ja[0],!0);k=this.cloneCell(ja[0]);this.addEdge(k,l.getDefaultParent(),aa,P[W])}}finally{this.model.endUpdate()}return P};if(null!=f.sidebar){var K=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(Y,la,Z,k){var A=l.model,J=null;A.beginUpdate();try{if(J=K.apply(this,arguments),m(Y))for(var U=0;U<J.length;U++)if(A.isEdge(J[U])&&null==A.getTerminal(J[U],!0)){A.setTerminal(J[U],Y,!0);var P=l.getCellGeometry(J[U]);P.points=null;+null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{A.endUpdate()}return J}}var I={67:f.actions.get("selectChildren"),88:f.actions.get("selectDescendants"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ca={67:f.actions.get("copyStyle"),86:f.actions.get("pasteStyle")},da=f.onKeyDown;f.onKeyDown=function(Y){try{var la=l.getSelectionCell();if(l.isEnabled()&&!l.isEditing()&&null!=la){var Z=mxEvent.isAltDown(Y)&&mxEvent.isShiftDown(Y)?I[Y.keyCode]:mxEvent.isAltDown(Y)?+ca[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(la)&&(Z=null,0<l.getIncomingTreeEdges(la).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?G(la):O(la):13==Y.which&&(Z=S(la,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&l.model.isEdge(Z[0])?l.setSelectionCell(l.model.getTerminal(Z[0],!1)):l.setSelectionCell(Z[Z.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(l.view.getState(la)),l.startEditingAtCell(la),mxEvent.consume(Y)):37==Y.keyCode?(c(la,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):+38==Y.keyCode?(c(la,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(c(la,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(c(la,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(k){f.handleError(k)}mxEvent.isConsumed(Y)||da.apply(this,arguments)};var ea=l.connectVertex;l.connectVertex=function(Y,la,Z,k,A,J,U){var P=l.getIncomingTreeEdges(Y);if(m(Y)){var T=H(Y),W=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,aa=la==mxConstants.DIRECTION_EAST||la==+mxConstants.DIRECTION_WEST;return T==la||0==P.length?O(Y,la):W==aa?G(Y):S(Y,la!=mxConstants.DIRECTION_NORTH&&la!=mxConstants.DIRECTION_WEST)}return ea.apply(this,arguments)};l.getSubtree=function(Y){var la=[Y];!u(Y)&&!m(Y)||B(Y)||l.traverse(Y,!0,function(Z,k){var A=null!=k&&l.isTreeEdge(k);A&&0>mxUtils.indexOf(la,k)&&la.push(k);(null==k||A)&&0>mxUtils.indexOf(la,Z)&&la.push(Z);return null==k||A});return la};var X=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){X.apply(this,+arguments);(u(this.state.cell)||m(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),+this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Y){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Y),mxEvent.getClientY(Y),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Y);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(Y)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var ba=mxVertexHandler.prototype.redrawHandles;+mxVertexHandler.prototype.redrawHandles=function(){ba.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ha=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Y){ha.apply(this,arguments);null!=+this.moveHandle&&(this.moveHandle.style.display=Y?"":"none")};var ma=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(Y,la){ma.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),u=this.graph,p=this;return m.concat([this.addEntry("tree container",+function(){var B=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var H=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');+S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);B.insert(G);B.insert(H);B.insert(S);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var B=new mxCell("Mindmap",new mxGeometry(0,+0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var H=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');H.vertex=!0;var S=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var O=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+O.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),G.style);R.geometry.relative=!0;R.edge=!0;H.insertEdge(R,!0);O.insertEdge(R,!1);var c=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),G.style);f.geometry.relative=!0;f.edge=!0;H.insertEdge(f,!0);c.insertEdge(f,!1);var l=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+l.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),G.style);t.geometry.relative=!0;t.edge=!0;H.insertEdge(t,!0);l.insertEdge(t,!1);B.insert(G);B.insert(R);B.insert(f);B.insert(t);B.insert(H);B.insert(S);B.insert(O);B.insert(c);B.insert(l);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var B=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');+B.vertex=!0;return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var B=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");H.geometry.setTerminalPoint(new mxPoint(-40,40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var B=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),+'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");+H.geometry.setTerminalPoint(new mxPoint(-40,40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree orgchart organization division",function(){var B=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var H=new mxCell("Organization",new mxGeometry(80,+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(H,"treeRoot","1");H.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");+G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var O=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');O.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");R.geometry.relative=+!0;R.edge=!0;H.insertEdge(R,!0);O.insertEdge(R,!1);B.insert(G);B.insert(R);B.insert(H);B.insert(S);B.insert(O);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree root",function(){var B=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return p.createVertexTemplateFromCells([B],+B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree division",function(){var B=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");+H.geometry.setTerminalPoint(new mxPoint(0,0),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree sub sections",function(){var B=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");+H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),H.style);G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;S.insertEdge(G,!1);return p.createVertexTemplateFromCells([H,G,B,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;+EditorUi.initMinimalTheme=function(){function b(c,f){if(EditorUi.windowed){var l=c.editor.graph;l.popupMenuHandler.hideMenu();null==c.formatWindow?(f=Math.max(10,c.diagramContainer.clientWidth-248),l=Math.min(566,l.container.clientHeight-10),c.formatWindow=new WrapperWindow(c,mxResources.get("format"),f,60,240,l,function(t){c.createFormat(t).init()}),c.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){c.formatWindow.window.fit()})),c.formatWindow.window.minimumSize=new mxRectangle(0,+0,240,80)):c.formatWindow.window.setVisible(null!=f?f:!c.formatWindow.window.isVisible())}else null==c.formatElt&&(c.formatElt=c.createSidebarContainer(),c.createFormat(c.formatElt).init(),c.formatElt.style.border="none",c.formatElt.style.width="240px",c.formatElt.style.borderLeftWidth="1px",c.formatElt.style.borderLeftStyle="solid",c.formatElt.style.right="0px"),l=c.diagramContainer.parentNode,null!=c.formatElt.parentNode?(c.formatElt.parentNode.removeChild(c.formatElt),l.style.right="0px"):(l.parentNode.appendChild(c.formatElt),+l.style.right=c.formatElt.style.width)}function e(c,f){function l(C,F){var N=c.menus.get(C);C=t.addMenu(F,mxUtils.bind(this,function(){N.funct.apply(this,arguments)}));C.setAttribute("title",F);C.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";C.className="geTitle";f.appendChild(C);return C}var t=new Menubar(c,f);if(Editor.enableCustomLibraries&&+("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=c.actions.get("newLibrary")){var z=document.createElement("div");z.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";z.className="geTitle";mxUtils.write(z,mxResources.get("newLibrary"));f.appendChild(z);mxEvent.addListener(z,"click",this.actions.get("newLibrary").funct);+z=z.cloneNode(!1);z.style.left="50%";z.style.borderLeftStyle="solid";mxUtils.write(z,mxResources.get("openLibrary"));f.appendChild(z);mxEvent.addListener(z,"click",this.actions.get("openLibrary").funct)}else z=l("newLibrary",mxResources.get("newLibrary")),z.style.display="block",z.style.fontSize="11px",z.style.left="0",z=l("openLibraryFrom",mxResources.get("openLibraryFrom")),z.style.borderLeftStyle="solid",z.style.display="block",z.style.fontSize="11px",z.style.left="50%";f.appendChild(c.sidebar.container);+f.style.overflow="hidden"}function g(c,f){if(EditorUi.windowed){var l=c.editor.graph;l.popupMenuHandler.hideMenu();null==c.sidebarWindow?(f=Math.min(l.container.clientWidth-10,218),l=Math.min(l.container.clientHeight-40,650),c.sidebarWindow=new WrapperWindow(c,mxResources.get("shapes"),10,56,f-6,l-6,function(t){e(c,t)}),c.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){c.sidebarWindow.window.fit()})),c.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),c.sidebarWindow.window.setVisible(!0),+isLocalStorage&&c.getLocalData("sidebar",function(t){c.sidebar.showEntries(t,null,!0)}),c.restoreLibraries()):c.sidebarWindow.window.setVisible(null!=f?f:!c.sidebarWindow.window.isVisible())}else null==c.sidebarElt&&(c.sidebarElt=c.createSidebarContainer(),e(c,c.sidebarElt),c.sidebarElt.style.border="none",c.sidebarElt.style.width="210px",c.sidebarElt.style.borderRight="1px solid gray"),l=c.diagramContainer.parentNode,null!=c.sidebarElt.parentNode?(c.sidebarElt.parentNode.removeChild(c.sidebarElt),+l.style.left="0px"):(l.parentNode.appendChild(c.sidebarElt),l.style.left=c.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(c){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur=-"1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var v=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(T){v.apply(this,arguments);-null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var A=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(T,c){null!=c.shortcut&&900>m&&!mxClient.IS_IOS?T.firstChild.nextSibling.setAttribute("title",c.shortcut):-A.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(T){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=T?T:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var G=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();G.apply(this,arguments)};var S=EditorUi.prototype.setGraphEnabled;-EditorUi.prototype.setGraphEnabled=function(T){S.apply(this,arguments);if(T){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=c&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};-var F=Menus.prototype.init;Menus.prototype.init=function(){F.apply(this,arguments);var T=this.editorUi;EditorUi.enablePlantUml&&!T.isOffline()&&T.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var k=new ParseDialog(T,mxResources.get("plantUml")+"...","plantUml");T.showDialog(k.container,620,420,!0,!1);k.init()}));T.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var k=new ParseDialog(T,mxResources.get("mermaid")+"...","mermaid");T.showDialog(k.container,-620,420,!0,!1);k.init()}));var c="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),f=function(k,B,z,C){k.addItem(z,null,mxUtils.bind(this,function(){var I=new CreateGraphDialog(T,z,C);T.showDialog(I.container,620,420,!0,!1);I.init()}),B)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(k,B){for(var z=0;z<c.length;z++)"-"==c[z]?k.addSeparator(B):f(k,B,mxResources.get(c[z])+"...",c[z])})))};EditorUi.prototype.installFormatToolbar=function(T){var c=-this.editor.graph,f=document.createElement("div");f.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(k,B){0<c.getSelectionCount()?(T.appendChild(f),f.innerHTML="Selected: "+c.getSelectionCount()):null!=f.parentNode&&f.parentNode.removeChild(f)}))};var P=!1;EditorUi.prototype.initFormatWindow=-function(){if(!P&&null!=this.formatWindow){P=!0;var T=this.formatWindow.window.toggleMinimized,c=240;this.formatWindow.window.toggleMinimized=function(){T.apply(this,arguments);this.minimized?(c=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+c-140+"px"):(this.div.style.width=c+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-c+140)+"px");this.fit()};-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(f){mxEvent.getSource(f)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function T(ja,oa,qa){var ra=C.menus.get(ja),ua=O.addMenu(mxResources.get(ja),mxUtils.bind(this,function(){ua.classList.contains("mxDisabled")||ra.funct.apply(this,arguments)}),K);ua.className="geMenuItem";ua.style.display="inline-block";ua.style.boxSizing=-"border-box";ua.style.top="6px";ua.style.marginRight="6px";ua.style.height="30px";ua.style.paddingTop="6px";ua.style.paddingBottom="6px";ua.style.cursor="pointer";ua.setAttribute("title",mxResources.get(ja));C.menus.menuCreated(ra,ua,"geMenuItem");null!=qa?(ua.style.backgroundImage="url("+qa+")",ua.style.backgroundPosition="center center",ua.style.backgroundRepeat="no-repeat",ua.style.backgroundSize="24px 24px",ua.style.width="34px",ua.innerText=""):oa||(ua.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+-")",ua.style.backgroundPosition="right 6px center",ua.style.backgroundRepeat="no-repeat",ua.style.paddingRight="22px");return ua}function c(ja,oa,qa,ra,ua,za){var Ba=document.createElement("a");Ba.className="geMenuItem";Ba.style.display="inline-block";Ba.style.boxSizing="border-box";Ba.style.height="30px";Ba.style.padding="6px";Ba.style.position="relative";Ba.style.verticalAlign="top";Ba.style.top="0px";null!=C.statusContainer?L.insertBefore(Ba,C.statusContainer):L.appendChild(Ba);null!=za?(Ba.style.backgroundImage=-"url("+za+")",Ba.style.backgroundPosition="center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.width="34px"):mxUtils.write(Ba,ja);mxEvent.addListener(Ba,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ca){Ca.preventDefault()}));mxEvent.addListener(Ba,"click",function(Ca){"disabled"!=Ba.getAttribute("disabled")&&oa(Ca);mxEvent.consume(Ca)});null==qa&&(Ba.style.marginRight="4px");null!=ra&&Ba.setAttribute("title",ra);null!=ua&&(ja=-function(){ua.isEnabled()?(Ba.removeAttribute("disabled"),Ba.style.cursor="pointer"):(Ba.setAttribute("disabled","disabled"),Ba.style.cursor="default")},ua.addListener("stateChanged",ja),I.addListener("enabledChanged",ja),ja());return Ba}function f(ja,oa,qa){qa=document.createElement("div");qa.className="geMenuItem";qa.style.display="inline-block";qa.style.verticalAlign="top";qa.style.marginRight="6px";qa.style.padding="0 4px 0 4px";qa.style.height="30px";qa.style.position="relative";qa.style.top=-"0px";for(var ra=0;ra<ja.length;ra++)null!=ja[ra]&&(ja[ra].style.margin="0px",ja[ra].style.boxShadow="none",qa.appendChild(ja[ra]));null!=oa&&mxUtils.setOpacity(qa,oa);null!=C.statusContainer?L.insertBefore(qa,C.statusContainer):L.appendChild(qa);return qa}function k(){for(var ja=L.firstChild;null!=ja;){var oa=ja.nextSibling;"geMenuItem"!=ja.className&&"geItem"!=ja.className||ja.parentNode.removeChild(ja);ja=oa}K=L.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;-ja=1E3>m;var qa=null;ja||(qa=T("diagram"));oa=ja?T("diagram",null,Editor.menuImage):null;null!=oa&&(qa=oa);f([qa,c(mxResources.get("shapes"),C.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),C.actions.get("image"),ja?Editor.shapesImage:null),c(mxResources.get("format"),C.actions.get("format").funct,null,mxResources.get("format")+" ("+C.actions.get("format").shortcut+")",C.actions.get("image"),ja?Editor.formatImage:null)],ja?60:null);oa=T("insert",!0,ja?ca:null);f([oa,c(mxResources.get("delete"),-C.actions.get("delete").funct,null,mxResources.get("delete"),C.actions.get("delete"),ja?Editor.trashImage:null)],ja?60:null);I.isEnabled()||oa.classList.add("mxDisabled");411<=m&&(f([U,J],60),520<=m&&f([W,640<=m?c("",fa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",fa,Editor.zoomInImage):null,640<=m?c("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}R.apply(this,arguments);var B=mxUtils.isAncestorNode(document.body,this.container)?-this.container:this.editor.graph.container;null!=B&&(B.classList.add("geSimple"),B.classList.add("geMinimal"));B=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var z=document.createElement("div");z.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";z.style.bottom=B?"32px":"0px";this.sidebar=this.createSidebar(z);if(1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])g(this,!0),null!=this.sidebar&&-null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var C=this,I=C.editor.graph;C.toolbar=this.createToolbar(C.createDiv("geToolbar"));C.defaultLibraryName=mxResources.get("untitledLibrary");var L=document.createElement("div");L.className="geMenubarContainer";var K=null,O=new Menubar(C,L);C.statusContainer=C.createStatusContainer();-C.statusContainer.style.position="relative";C.statusContainer.style.maxWidth="";C.statusContainer.style.cursor="default";var da=C.hideCurrentMenu;C.hideCurrentMenu=function(){da.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ea=C.descriptorChanged;C.descriptorChanged=function(){ea.apply(this,arguments);var ja=C.getCurrentFile();if(null!=ja&&null!=ja.getTitle()){var oa=ja.getMode();"google"==oa?oa="googleDrive":"github"==oa?oa="gitHub":"gitlab"==oa?oa="gitLab":"onedrive"==-oa&&(oa="oneDrive");oa=mxResources.get(oa);L.setAttribute("title",ja.getTitle()+(null!=oa?" ("+oa+")":""))}else L.removeAttribute("title")};C.setStatusText(C.editor.getStatus());L.appendChild(C.statusContainer);C.buttonContainer=document.createElement("div");C.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";L.appendChild(C.buttonContainer);C.menubarContainer=-C.buttonContainer;C.tabContainer=document.createElement("div");C.tabContainer.className="geTabContainer geTabItem";C.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";B=C.diagramContainer.parentNode;z=document.createElement("div");z.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";C.diagramContainer.style.top="47px";var ca=Editor.addBoxImage;if(null!=C.hoverIcons){var V=C.hoverIcons.update;-C.hoverIcons.update=function(){I.freehand.isDrawing()||V.apply(this,arguments)}}if(null!=I.freehand){var ma=I.freehand.createStyle;I.freehand.createStyle=function(ja){return ma.apply(this,arguments)+"sketch=0;"}}C.editor.addListener("statusChanged",mxUtils.bind(this,function(){C.setStatusText(C.editor.getStatus())}));C.setStatusText(C.editor.getStatus());var la=C.menus.get("viewZoom");if(null!=la){var Y=function(ja){if(mxEvent.isAltDown(ja))C.hideCurrentMenu(),C.actions.get("customZoom").funct(),-mxEvent.consume(ja);else if("geMenuItem"==mxEvent.getSource(ja).className||mxEvent.isShiftDown(ja))C.hideCurrentMenu(),C.actions.get("smartFit").funct(),mxEvent.consume(ja)},fa=C.actions.get("zoomIn"),Z=C.actions.get("zoomOut"),l=C.actions.get("resetView"),u=C.actions.get("undo"),H=C.actions.get("redo"),U=c("",u.funct,null,mxResources.get("undo")+" ("+u.shortcut+")",u,Editor.undoImage),J=c("",H.funct,null,mxResources.get("redo")+" ("+H.shortcut+")",H,Editor.redoImage),W=c("",Y,!0,mxResources.get("fit")+-" ("+Editor.ctrlKey+"+H)",l,Editor.zoomFitImage);L.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";var aa=O.addMenu("100%",la.funct);aa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");aa.className="geTabItem";aa.style.height=C.tabContainerHeight+"px";aa.style.position="absolute";aa.style.display="0"!=urlParams.pages?"flex":"none";aa.style.alignItems="center";aa.style.justifyContent=-"center";aa.style.paddingRight="11px";aa.style.whiteSpace="nowrap";aa.style.overflow="hidden";aa.style.fontSize="11px";aa.style.width="51px";aa.style.right="0px";aa.style.bottom="0px";aa.style.boxSizing="content-box";aa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";aa.style.backgroundPosition="right 6px top 15px";aa.style.backgroundRepeat="no-repeat";aa.style.backgroundSize="10px";aa.style.zIndex="1";z.appendChild(aa);(function(ja){mxEvent.addListener(ja,"click",Y);var oa=mxUtils.bind(this,-function(qa,ra,ua){ja.innerText="";mxUtils.write(ja,Math.round(100*C.editor.graph.view.scale*(null!=ua?ua:1))+"%")});C.editor.graph.view.addListener(mxEvent.EVENT_SCALE,oa);C.editor.addListener("resetGraphView",oa);C.editor.addListener("pageSelected",oa);C.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(qa,ra){oa(qa,ra,ra.getProperty("factor"))}))})(aa);var ba=C.setGraphEnabled;C.setGraphEnabled=function(){ba.apply(this,arguments);null!=this.tabContainer&&(aa.style.visibility=this.tabContainer.style.visibility,-this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}z.appendChild(L);z.appendChild(C.diagramContainer);B.appendChild(z);C.updateTabContainer();!EditorUi.windowed&&1E3<=m&&b(this,!0);z.appendChild(C.tabContainer);k();C.addListener("lockedChanged",k);mxEvent.addListener(window,"resize",function(){k();null!=C.sidebarWindow&&C.sidebarWindow.window.fit();null!=C.formatWindow&&C.formatWindow.window.fit();null!=C.actions.outlineWindow&&-C.actions.outlineWindow.window.fit();null!=C.actions.layersWindow&&C.actions.layersWindow.window.fit();null!=C.menus.chatWindow&&C.menus.chatWindow.window.fit();null!=C.menus.tagsWindow&&C.menus.tagsWindow.window.fit();null!=C.menus.findWindow&&C.menus.findWindow.window.fit();null!=C.menus.findReplaceWindow&&C.menus.findReplaceWindow.window.fit()})}}};-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,g,m,v,p,A){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=v;this.isResolved=p;this.user=A;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,v){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,v){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=v};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save As\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;+"1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var u=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){u.apply(this,arguments);+null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var B=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(c,f){null!=f.shortcut&&900>m&&!mxClient.IS_IOS?c.firstChild.nextSibling.setAttribute("title",f.shortcut):+B.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var H=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();H.apply(this,arguments)};var S=EditorUi.prototype.setGraphEnabled;+EditorUi.prototype.setGraphEnabled=function(c){S.apply(this,arguments);if(c){var f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=f&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=f&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};+var G=Menus.prototype.init;Menus.prototype.init=function(){G.apply(this,arguments);var c=this.editorUi;EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var t=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(t.container,620,420,!0,!1);t.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var t=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");c.showDialog(t.container,+620,420,!0,!1);t.init()}));var f="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),l=function(t,z,C,F){t.addItem(C,null,mxUtils.bind(this,function(){var N=new CreateGraphDialog(c,C,F);c.showDialog(N.container,620,420,!0,!1);N.init()}),z)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,z){for(var C=0;C<f.length;C++)"-"==f[C]?t.addSeparator(z):l(t,z,mxResources.get(f[C])+"...",f[C])})))};EditorUi.prototype.installFormatToolbar=function(c){var f=+this.editor.graph,l=document.createElement("div");l.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";f.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,z){0<f.getSelectionCount()?(c.appendChild(l),l.innerHTML="Selected: "+f.getSelectionCount()):null!=l.parentNode&&l.parentNode.removeChild(l)}))};var O=!1;EditorUi.prototype.initFormatWindow=+function(){if(!O&&null!=this.formatWindow){O=!0;var c=this.formatWindow.window.toggleMinimized,f=240;this.formatWindow.window.toggleMinimized=function(){c.apply(this,arguments);this.minimized?(f=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+f-140+"px"):(this.div.style.width=f+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-f+140)+"px");this.fit()};+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(l){mxEvent.getSource(l)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(ja,pa,sa){var qa=F.menus.get(ja),wa=ca.addMenu(mxResources.get(ja),mxUtils.bind(this,function(){wa.classList.contains("mxDisabled")||qa.funct.apply(this,arguments)}),I);wa.className="geMenuItem";wa.style.display="inline-block";wa.style.boxSizing=+"border-box";wa.style.top="6px";wa.style.marginRight="6px";wa.style.height="30px";wa.style.paddingTop="6px";wa.style.paddingBottom="6px";wa.style.cursor="pointer";wa.setAttribute("title",mxResources.get(ja));F.menus.menuCreated(qa,wa,"geMenuItem");null!=sa?(wa.style.backgroundImage="url("+sa+")",wa.style.backgroundPosition="center center",wa.style.backgroundRepeat="no-repeat",wa.style.backgroundSize="24px 24px",wa.style.width="34px",wa.innerText=""):pa||(wa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage++")",wa.style.backgroundPosition="right 6px center",wa.style.backgroundRepeat="no-repeat",wa.style.paddingRight="22px");return wa}function f(ja,pa,sa,qa,wa,Ba){var za=document.createElement("a");za.className="geMenuItem";za.style.display="inline-block";za.style.boxSizing="border-box";za.style.height="30px";za.style.padding="6px";za.style.position="relative";za.style.verticalAlign="top";za.style.top="0px";null!=F.statusContainer?K.insertBefore(za,F.statusContainer):K.appendChild(za);null!=Ba?(za.style.backgroundImage=+"url("+Ba+")",za.style.backgroundPosition="center center",za.style.backgroundRepeat="no-repeat",za.style.backgroundSize="24px 24px",za.style.width="34px"):mxUtils.write(za,ja);mxEvent.addListener(za,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ea){Ea.preventDefault()}));mxEvent.addListener(za,"click",function(Ea){"disabled"!=za.getAttribute("disabled")&&pa(Ea);mxEvent.consume(Ea)});null==sa&&(za.style.marginRight="4px");null!=qa&&za.setAttribute("title",qa);null!=wa&&(ja=+function(){wa.isEnabled()?(za.removeAttribute("disabled"),za.style.cursor="pointer"):(za.setAttribute("disabled","disabled"),za.style.cursor="default")},wa.addListener("stateChanged",ja),N.addListener("enabledChanged",ja),ja());return za}function l(ja,pa,sa){sa=document.createElement("div");sa.className="geMenuItem";sa.style.display="inline-block";sa.style.verticalAlign="top";sa.style.marginRight="6px";sa.style.padding="0 4px 0 4px";sa.style.height="30px";sa.style.position="relative";sa.style.top=+"0px";for(var qa=0;qa<ja.length;qa++)null!=ja[qa]&&(ja[qa].style.margin="0px",ja[qa].style.boxShadow="none",sa.appendChild(ja[qa]));null!=pa&&mxUtils.setOpacity(sa,pa);null!=F.statusContainer?K.insertBefore(sa,F.statusContainer):K.appendChild(sa);return sa}function t(){for(var ja=K.firstChild;null!=ja;){var pa=ja.nextSibling;"geMenuItem"!=ja.className&&"geItem"!=ja.className||ja.parentNode.removeChild(ja);ja=pa}I=K.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;+ja=1E3>m;var sa=null;ja||(sa=c("diagram"));pa=ja?c("diagram",null,Editor.menuImage):null;null!=pa&&(sa=pa);l([sa,f(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ja?Editor.shapesImage:null),f(mxResources.get("format"),F.actions.get("format").funct,null,mxResources.get("format")+" ("+F.actions.get("format").shortcut+")",F.actions.get("image"),ja?Editor.formatImage:null)],ja?60:null);pa=c("insert",!0,ja?X:null);l([pa,f(mxResources.get("delete"),+F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ja?Editor.trashImage:null)],ja?60:null);N.isEnabled()||pa.classList.add("mxDisabled");411<=m&&(l([U,P],60),520<=m&&l([T,640<=m?f("",la.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",la,Editor.zoomInImage):null,640<=m?f("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}R.apply(this,arguments);var z=mxUtils.isAncestorNode(document.body,this.container)?+this.container:this.editor.graph.container;null!=z&&(z.classList.add("geSimple"),z.classList.add("geMinimal"));z=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var C=document.createElement("div");C.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";C.style.bottom=z?"32px":"0px";this.sidebar=this.createSidebar(C);if(1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])g(this,!0),null!=this.sidebar&&+null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var F=this,N=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var K=document.createElement("div");K.className="geMenubarContainer";var I=null,ca=new Menubar(F,K);F.statusContainer=F.createStatusContainer();+F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.cursor="default";var da=F.hideCurrentMenu;F.hideCurrentMenu=function(){da.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ea=F.descriptorChanged;F.descriptorChanged=function(){ea.apply(this,arguments);var ja=F.getCurrentFile();if(null!=ja&&null!=ja.getTitle()){var pa=ja.getMode();"google"==pa?pa="googleDrive":"github"==pa?pa="gitHub":"gitlab"==pa?pa="gitLab":"onedrive"==+pa&&(pa="oneDrive");pa=mxResources.get(pa);K.setAttribute("title",ja.getTitle()+(null!=pa?" ("+pa+")":""))}else K.removeAttribute("title")};F.setStatusText(F.editor.getStatus());K.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";K.appendChild(F.buttonContainer);F.menubarContainer=+F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer geTabItem";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";z=F.diagramContainer.parentNode;C=document.createElement("div");C.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="47px";var X=Editor.addBoxImage;if(null!=F.hoverIcons){var ba=F.hoverIcons.update;+F.hoverIcons.update=function(){N.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=N.freehand){var ha=N.freehand.createStyle;N.freehand.createStyle=function(ja){return ha.apply(this,arguments)+"sketch=0;"}}F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));F.setStatusText(F.editor.getStatus());var ma=F.menus.get("viewZoom");if(null!=ma){var Y=function(ja){if(mxEvent.isAltDown(ja))F.hideCurrentMenu(),F.actions.get("customZoom").funct(),+mxEvent.consume(ja);else if("geMenuItem"==mxEvent.getSource(ja).className||mxEvent.isShiftDown(ja))F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ja)},la=F.actions.get("zoomIn"),Z=F.actions.get("zoomOut"),k=F.actions.get("resetView"),A=F.actions.get("undo"),J=F.actions.get("redo"),U=f("",A.funct,null,mxResources.get("undo")+" ("+A.shortcut+")",A,Editor.undoImage),P=f("",J.funct,null,mxResources.get("redo")+" ("+J.shortcut+")",J,Editor.redoImage),T=f("",Y,!0,mxResources.get("fit")++" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);K.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";var W=ca.addMenu("100%",ma.funct);W.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");W.className="geTabItem";W.style.height=F.tabContainerHeight+"px";W.style.position="absolute";W.style.display="0"!=urlParams.pages?"flex":"none";W.style.alignItems="center";W.style.justifyContent=+"center";W.style.paddingRight="11px";W.style.whiteSpace="nowrap";W.style.overflow="hidden";W.style.fontSize="11px";W.style.width="51px";W.style.right="0px";W.style.bottom="0px";W.style.boxSizing="content-box";W.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";W.style.backgroundPosition="right 6px top 15px";W.style.backgroundRepeat="no-repeat";W.style.backgroundSize="10px";W.style.zIndex="1";C.appendChild(W);(function(ja){mxEvent.addListener(ja,"click",Y);var pa=mxUtils.bind(this,+function(sa,qa,wa){ja.innerText="";mxUtils.write(ja,Math.round(100*F.editor.graph.view.scale*(null!=wa?wa:1))+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);F.editor.addListener("resetGraphView",pa);F.editor.addListener("pageSelected",pa);F.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(sa,qa){pa(sa,qa,qa.getProperty("factor"))}))})(W);var aa=F.setGraphEnabled;F.setGraphEnabled=function(){aa.apply(this,arguments);null!=this.tabContainer&&(W.style.visibility=this.tabContainer.style.visibility,+this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}C.appendChild(K);C.appendChild(F.diagramContainer);z.appendChild(C);F.updateTabContainer();!EditorUi.windowed&&1E3<=m&&b(this,!0);C.appendChild(F.tabContainer);t();F.addListener("lockedChanged",t);mxEvent.addListener(window,"resize",function(){t();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&+F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.chatWindow&&F.menus.chatWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()})}}};+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,g,m,u,p,B){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=u;this.isResolved=p;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,u){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,u){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=u};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save As\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,e,g){this.init(b,e,g)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;GraphViewer.prototype.darkMode=null;GraphViewer.prototype.init=function(b,e,g){GraphViewer.initCss();this.graphConfig=null!=g?g:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.darkMode=null!=this.graphConfig["dark-mode"]?this.graphConfig["dark-mode"]:this.darkMode;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=-null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var m=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var v=-mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var G=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?G.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(G.style.padding="8px");G.style.forcedColorAdjust="none";G.style.boxSizing="border-box";G.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var k=-this.view.graphBounds,B=this.view.translate;G.setAttribute("viewBox",k.x+B.x-this.panDx+" "+(k.y+B.y-this.panDy)+" "+(k.width+1)+" "+(k.height+1));this.container.style.backgroundColor=G.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",k))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(k){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=-!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=e)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(k){}this.graph.getImageFromBundles=function(k){return m.getImageUrl(k)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);-if("mxfile"==this.xmlNode.nodeName){var F=this.xmlNode.getElementsByTagName("diagram");if(0<F.length){if(null!=this.pageId)for(S=0;S<F.length;S++)if(this.pageId==F[S].getAttribute("id")){this.currentPage=S;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(k){var B=F[m.currentPage];return"page"==k?B.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==k?m.currentPage+1:"pagecount"==k?F.length:P.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=-function(k){this.handlingResize||(this.currentPage=mxUtils.mod(k,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(k){k=this.getIndexById(k);var B=0<=k;B&&this.selectPage(k);return B};S=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=R&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),R=this.xmlNode)});var T=this.graph.setBackgroundImage;this.graph.setBackgroundImage=-function(k){if(null!=k&&Graph.isPageLink(k.src)){var B=k.src,z=B.indexOf(",");0<z&&(z=m.getIndexById(B.substring(z+1)),0<=z&&(k=m.getImageForGraphModel(Editor.parseDiagramNode(m.diagrams[z])),k.originalSrc=B))}T.apply(this,arguments)};var c=this.graph.getGraphBounds;this.graph.getGraphBounds=function(k){var B=c.apply(this,arguments);k=this.backgroundImage;if(null!=k){var z=this.view.translate,C=this.view.scale;B=mxRectangle.fromRectangle(B);B.add(new mxRectangle((z.x+k.x)*C,(z.y+k.y)*C,k.width*C,-k.height*C))}return B};this.addListener("xmlNodeChanged",S);S();urlParams.page=m.currentPage;S=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||-(this.graph.panningHandler.isForcePanningEvent=function(k){return!mxEvent.isPopupTrigger(k.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.titleTooltip||-this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(k,B){try{if(Graph.isPageLink(k)){var z=k.indexOf(",");m.selectPageById(k.substring(z+-1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var C=this.getGraphBounds();this.handleCustomLink(k,B);C.equals(this.getGraphBounds())||m.crop()}}catch(I){alert(I.message)}return!0};var f=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return f.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});g=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&-0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof g){var p=this.getObservableParent(b),A=new g(mxUtils.bind(this,function(G){0<b.offsetWidth&&(A.disconnect(),v())}));A.observe(p,{attributes:!0})}else v()}};+null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var m=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var u=+mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var H=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?H.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(H.style.padding="8px");H.style.forcedColorAdjust="none";H.style.boxSizing="border-box";H.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var t=+this.view.graphBounds,z=this.view.translate;H.setAttribute("viewBox",t.x+z.x-this.panDx+" "+(t.y+z.y-this.panDy)+" "+(t.width+1)+" "+(t.height+1));this.container.style.backgroundColor=H.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",t))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(t){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=+!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=e)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(t){}this.graph.getImageFromBundles=function(t){return m.getImageUrl(t)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);+if("mxfile"==this.xmlNode.nodeName){var G=this.xmlNode.getElementsByTagName("diagram");if(0<G.length){if(null!=this.pageId)for(S=0;S<G.length;S++)if(this.pageId==G[S].getAttribute("id")){this.currentPage=S;break}var O=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(t){var z=G[m.currentPage];return"page"==t?z.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==t?m.currentPage+1:"pagecount"==t?G.length:O.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=+function(t){this.handlingResize||(this.currentPage=mxUtils.mod(t,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(t){t=this.getIndexById(t);var z=0<=t;z&&this.selectPage(t);return z};S=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=R&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),R=this.xmlNode)});var c=this.graph.setBackgroundImage;this.graph.setBackgroundImage=+function(t){if(null!=t&&Graph.isPageLink(t.src)){var z=t.src,C=z.indexOf(",");0<C&&(C=m.getIndexById(z.substring(C+1)),0<=C&&(t=m.getImageForGraphModel(Editor.parseDiagramNode(m.diagrams[C])),t.originalSrc=z))}c.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(t){var z=f.apply(this,arguments);t=this.backgroundImage;if(null!=t){var C=this.view.translate,F=this.view.scale;z=mxRectangle.fromRectangle(z);z.add(new mxRectangle((C.x+t.x)*F,(C.y+t.y)*F,t.width*F,+t.height*F))}return z};this.addListener("xmlNodeChanged",S);S();urlParams.page=m.currentPage;S=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||+(this.graph.panningHandler.isForcePanningEvent=function(t){return!mxEvent.isPopupTrigger(t.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.titleTooltip||+this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(t,z){try{if(Graph.isPageLink(t)){var C=t.indexOf(",");m.selectPageById(t.substring(C++1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var F=this.getGraphBounds();this.handleCustomLink(t,z);F.equals(this.getGraphBounds())||m.crop()}}catch(N){alert(N.message)}return!0};var l=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return l.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});g=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&+0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof g){var p=this.getObservableParent(b),B=new g(mxUtils.bind(this,function(H){0<b.offsetWidth&&(B.disconnect(),u())}));B.observe(p,{attributes:!0})}else u()}};GraphViewer.prototype.installBackgroundColorHandler=function(){var b=this.graph;if(null!=b){null!=GraphViewer.shapeBackgroundColor&&(b.shapeBackgroundColor=GraphViewer.shapeBackgroundColor);b.defaultPageBackgroundColor="transparent";b.diagramBackgroundColor="transparent";b.transparentBackground=!1;var e=b.background,g=mxUtils.bind(this,function(m){"none"==b.getAdaptiveColors()&&null==e&&(this.isDarkMode()?b.background="#ffffff":b.background=null,m&&b.view.validateBackground())});this.addListener("graphChanged",function(){e=b.background;g(!0)});this.addListener("darkModeChanged",function(){g(!0)});g(!1)}};GraphViewer.prototype.installDarkModeListener=function(){null!=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(){this.darkModeChanged();this.fireEvent(new mxEventObject("darkModeChanged"))}));this.darkModeChanged()};GraphViewer.prototype.darkModeChanged=function(){if(null!=this.graph){var b=this.graph.container,e=this.isDarkMode();e?b.classList.add("geDarkMode"):b.classList.remove("geDarkMode");b.style.colorScheme=e?"dark":"light"}};GraphViewer.prototype.getAncestorDetails=function(b){for(;null!=b;){if("DETAILS"==b.nodeName)return b;b=b.parentNode}return null};@@ -4216,60 +4215,60 @@ GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=docuGraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var g=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),g.width,g.height,g.x,g.y)};GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};-GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var g=[],m=this.graph.getModel();m.beginUpdate();try{for(var v=0;v<m.getChildCount(m.root);v++){var p=m.getChildAt(m.root,v);e=e&&m.isVisible(p);g.push(m.isVisible(p));m.setVisible(p,null!=b?b[v]:!0)}}finally{m.endUpdate()}}return e?null:g};+GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var g=[],m=this.graph.getModel();m.beginUpdate();try{for(var u=0;u<m.getChildCount(m.root);u++){var p=m.getChildAt(m.root,u);e=e&&m.isVisible(p);g.push(m.isVisible(p));m.setVisible(p,null!=b?b[u]:!0)}}finally{m.endUpdate()}}return e?null:g};GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};GraphViewer.prototype.isDarkMode=function(){return"dark"==this.darkMode||"auto"==this.darkMode&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches};-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!g){g=!0;var G=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?G.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){G=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);-S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};G={left:G.left-S.left,top:G.top-S.top,bottom:G.bottom-S.top,right:G.right-S.left};this.toolbar.style.left=G.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=G.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=G.top+1+"px"):this.toolbar.style.top=G.top+"px"}else null!=-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());g=!1}}),v=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(G){var S=b.offsetWidth;S==v||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=G?G:this.graphConfig.zoom||-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},v=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!g){g=!0;var H=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?H.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){H=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);+S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};H={left:H.left-S.left,top:H.top-S.top,bottom:H.bottom-S.top,right:H.right-S.left};this.toolbar.style.left=H.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=H.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=H.top+1+"px"):this.toolbar.style.top=H.top+"px"}else null!=+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());g=!1}}),u=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(H){var S=b.offsetWidth;S==u||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=H?H:this.graphConfig.zoom||+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},u=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",m),this.graph.addListener("size",m)):new ResizeSensor(this.graph.container,m));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),-0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=v=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size",-m);var A=mxUtils.bind(this,function(G){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var F=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==G&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>F)?(G=null,null!=F&&e.height+2*this.graph.border>F-2&&(G=(F-2*this.graph.border-2)/e.height),this.fitGraph(G)):this.widthIsEmpty||-null!=G||0!=this.graphConfig.resize||""==b.style.height?(G=null!=G?G:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+G.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+G.y),v=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(A,0):A();this.positionGraph=function(G){e=this.graph.getGraphBounds();v=null;A(G)}};+0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=u=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size",+m);var B=mxUtils.bind(this,function(H){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var G=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==H&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>G)?(H=null,null!=G&&e.height+2*this.graph.border>G-2&&(H=(G-2*this.graph.border-2)/e.height),this.fitGraph(H)):this.widthIsEmpty||+null!=H||0!=this.graphConfig.resize||""==b.style.height?(H=null!=H?H:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+H.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+H.y),u=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(B,0):B();this.positionGraph=function(H){e=this.graph.getGraphBounds();u=null;B(H)}};GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),g=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+g):g,null!=e.y?Math.floor(b.view.translate.y-e.y/m+g):g)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};-GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var m=this.graphConfig.layerIds,v=null!=m&&0<m.length,p=!1;if(0<g.length||v||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var A=b.getChildCount(b.root);if(null==e){e=!1;p={};if(v)for(var G=0;G<m.length;G++){var S=b.getCell(m[G]);null!=S&&(e=!0,p[S.id]=!0)}else for(G=0;G<g.length;G++)S=b.getChildAt(b.root,parseInt(g[G])),null!=S&&(e=!0,p[S.id]=!0);for(G=0;e&&-G<A;G++)S=b.getChildAt(b.root,G),b.setVisible(S,p[S.id]||!1)}else for(G=0;G<A;G++)b.setVisible(b.getChildAt(b.root,G),e.isVisible(e.getChildAt(e.root,G)))}finally{b.endUpdate()}p=!0}return p};+GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var m=this.graphConfig.layerIds,u=null!=m&&0<m.length,p=!1;if(0<g.length||u||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var B=b.getChildCount(b.root);if(null==e){e=!1;p={};if(u)for(var H=0;H<m.length;H++){var S=b.getCell(m[H]);null!=S&&(e=!0,p[S.id]=!0)}else for(H=0;H<g.length;H++)S=b.getChildAt(b.root,parseInt(g[H])),null!=S&&(e=!0,p[S.id]=!0);for(H=0;e&&+H<B;H++)S=b.getChildAt(b.root,H),b.setVisible(S,p[S.id]||!1)}else for(H=0;H<B;H++)b.setVisible(b.getChildAt(b.root,H),e.isVisible(e.getChildAt(e.root,H)))}finally{b.endUpdate()}p=!0}return p};GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.display="flex";e.style.alignItems="center";e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";e.style.height=this.toolbarHeight+"px";var g=mxUtils.bind(this,function(){this.isDarkMode()?(e.classList.add("geDarkMode"),e.style.colorScheme="dark"):(e.classList.remove("geDarkMode"),e.style.colorScheme="light")});this.addListener("darkModeChanged",g);this.toolbar=e;g();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");-mxUtils.setOpacity(e,30);var m=null,v=null,p=mxUtils.bind(this,function(ea){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;v=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";v=null}),100)}),ea||200)}),A=mxUtils.bind(this,function(ea){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);e.style.display=-"";mxUtils.setOpacity(e,ea||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||(A(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ea){mxEvent.consume(ea)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ea){A(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ea){A(100);mxEvent.consume(ea)}));mxEvent.addListener(e,"mouseleave",-mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||A(30)}));var G=this.graph,S=G.getTolerance();G.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ea,ca){this.startX=ca.getGraphX();this.startY=ca.getGraphY();this.scrollLeft=G.container.scrollLeft;this.scrollTop=G.container.scrollTop},mouseMove:function(ea,ca){},mouseUp:function(ea,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-G.container.scrollLeft)<S&&Math.abs(this.scrollTop-G.container.scrollTop)<-S&&Math.abs(this.startX-ca.getGraphX())<S&&Math.abs(this.startY-ca.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?p():A(30))}})}g=this.toolbarItems;for(var F=0,P=mxUtils.bind(this,function(ea,ca,V,ma){ea=this.createToolbarButton(ea,ca,V,ma);e.appendChild(ea);F++;return ea}),R=this.graph.getModel(),T=null,c=null,f=null,k=null,B=0;B<g.length;B++){var z=g[B];if("pages"==z){k=b.ownerDocument.createElement("div");k.style.display="inline-flex";k.style.position="relative";k.style.alignItems="center";-k.style.padding="4px";k.style.fontFamily=GraphViewer.cssFontFamily;k.style.fontSize="12px";k.style.cursor="default";k.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(k,70);var C=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");C.style.borderRightStyle="none";C.style.paddingLeft="0px";C.style.paddingRight="0px";e.appendChild(k);var I=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage+-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");I.style.paddingLeft="0px";I.style.paddingRight="0px";z=mxUtils.bind(this,function(){k.innerText="";mxUtils.write(k,this.currentPage+1+" / "+this.diagrams.length);k.style.display=1<this.diagrams.length?"inline-flex":"none";C.style.display=k.style.display;I.style.display=k.style.display});this.addListener("graphChanged",z);z()}else if("zoom"==z)this.zoomEnabled&&(P(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,-mxResources.get("zoomOut")||"Zoom Out"),P(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),P(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==z){if(this.layersEnabled){var L=P(mxUtils.bind(this,function(ea){if(null!=T)T.parentNode.removeChild(T),-T=null;else{T=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var V=this.graph.getGraphBounds(),ma=this.graph.view;0>V.x||0>V.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ma.translate.clone(),scale:ma.scale}):null!=this.graph.originalViewState&&0<V.x/ma.scale+this.graph.originalViewState.translate.x-ma.translate.x&&0<V.y/ma.scale+this.graph.originalViewState.translate.y--ma.translate.y&&(ma.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ma.translate.clone(),scale:ma.scale})}}));mxEvent.addListener(T,"mouseleave",function(){T.parentNode.removeChild(T);T=null});ea=L.getBoundingClientRect();T.style.width="140px";T.style.padding="2px 0px 2px 0px";T.style.border="1px solid #d0d0d0";T.style.backgroundColor="#eee";T.style.fontFamily=GraphViewer.cssFontFamily;-T.style.fontSize="11px";T.style.overflowY="auto";T.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";T.style.zIndex=this.toolbarZIndex+1;T.style.color="#000";mxUtils.setOpacity(T,85);var ca=mxUtils.getDocumentScrollOrigin(document);T.style.left=ca.x+ea.left-1+"px";T.style.top=ca.y+ea.bottom-2+"px";this.isDarkMode()&&(T.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(T)}}),Editor.layersImage,mxResources.get("layers")||"Layers");R.addListener(mxEvent.CHANGE,-function(){L.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"});L.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"}}else if("tags"==z){if(this.tagsEnabled){var K=P(mxUtils.bind(this,function(ea){null==c&&(c=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),c.div.getElementsByTagName("div")[0].style.position="",c.div.style.maxHeight="160px",c.div.style.maxWidth="120px",c.div.style.padding="2px",c.div.style.overflow="auto",c.div.style.height="auto",c.div.style.position=-"fixed",c.div.style.fontFamily=GraphViewer.cssFontFamily,c.div.style.fontSize="11px",c.div.style.backgroundColor="#eee",c.div.style.color="#000",c.div.style.border="1px solid #d0d0d0",c.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(c.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(c.div,85));if(null!=f)f.parentNode.removeChild(f),f=null;else{f=c.div;f.style.position="absolute";mxEvent.addListener(f,"mouseleave",function(){null!=f&&(f.parentNode.removeChild(f),f=null)});-ea=K.getBoundingClientRect();var ca=mxUtils.getDocumentScrollOrigin(document);f.style.left=ca.x+ea.left-1+"px";f.style.top=ca.y+ea.bottom-2+"px";document.body.appendChild(f);c.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");R.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){K.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=f&&0==this.graph.getAllTags().length&&(f.parentNode.removeChild(f),f=null)}));K.style.display=0<this.graph.getAllTags().length?"inline-flex":-"none"}}else"lightbox"==z?this.lightboxEnabled&&P(mxUtils.bind(this,function(){try{this.showLightbox()}catch(ea){alert(ea.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(z=this.graphConfig["toolbar-buttons"][z],null!=z&&(z.elem=P(null==z.enabled||z.enabled?z.handler:function(){},z.image,z.title,z.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*F);null!=this.graphConfig.title&&(g=-b.ownerDocument.createElement("div"),g.style.display="inline-flex",g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*F;var O=b.style.border,-da=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ea=b.getBoundingClientRect(),ca=mxUtils.getScrollOrigin(document.body);ca="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ca.x,top:-ca.y};ea={left:ea.left-ca.left,top:ea.top-ca.top,bottom:ea.bottom-ca.top,right:ea.right-ca.left};e.style.left=-ea.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ea.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ea.top+1+"px"):e.style.top=ea.top+"px";"1px solid transparent"==O&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var V=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=f&&(f.parentNode.removeChild(f),f=null);null!=T&&(T.parentNode.removeChild(T),T=null);b.style.border=-O});mxEvent.addListener(document,"mousemove",function(ma){for(ma=mxEvent.getSource(ma);null!=ma;){if(ma==b||ma==e||ma==T||ma==f)return;ma=ma.parentNode}V()});mxEvent.addListener(document.body,"mouseleave",function(ma){V()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&da()})).observe(b)};-GraphViewer.prototype.createToolbarButton=function(b,e,g,m){var v=document.createElement("div");v.style.borderRight="1px solid #d0d0d0";v.style.display="inline-flex";v.style.alignItems="center";v.style.padding="6px";mxEvent.addListener(v,"click",b);null!=g&&v.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";b.className="geAdaptiveAsset";null==m||m?(mxEvent.addListener(v,"mouseenter",function(){v.style.backgroundColor=-"light-dark(#dddddd,#333333)"}),mxEvent.addListener(v,"mouseleave",function(){v.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),v.style.cursor="pointer"):mxUtils.setOpacity(v,30);v.appendChild(b);return v};+mxUtils.setOpacity(e,30);var m=null,u=null,p=mxUtils.bind(this,function(ea){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;u=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";u=null}),100)}),ea||200)}),B=mxUtils.bind(this,function(ea){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);e.style.display=+"";mxUtils.setOpacity(e,ea||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||(B(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ea){mxEvent.consume(ea)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ea){B(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ea){B(100);mxEvent.consume(ea)}));mxEvent.addListener(e,"mouseleave",+mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||B(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ea,X){this.startX=X.getGraphX();this.startY=X.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ea,X){},mouseUp:function(ea,X){mxEvent.isTouchEvent(X.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<+S&&Math.abs(this.startX-X.getGraphX())<S&&Math.abs(this.startY-X.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?p():B(30))}})}g=this.toolbarItems;for(var G=0,O=mxUtils.bind(this,function(ea,X,ba,ha){ea=this.createToolbarButton(ea,X,ba,ha);e.appendChild(ea);G++;return ea}),R=this.graph.getModel(),c=null,f=null,l=null,t=null,z=0;z<g.length;z++){var C=g[z];if("pages"==C){t=b.ownerDocument.createElement("div");t.style.display="inline-flex";t.style.position="relative";t.style.alignItems="center";t.style.padding=+"4px";t.style.fontFamily=GraphViewer.cssFontFamily;t.style.fontSize="12px";t.style.cursor="default";t.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(t,70);var F=O(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");F.style.borderRightStyle="none";F.style.paddingLeft="0px";F.style.paddingRight="0px";e.appendChild(t);var N=O(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,+mxResources.get("nextPage")||"Next Page");N.style.paddingLeft="0px";N.style.paddingRight="0px";C=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-flex":"none";F.style.display=t.style.display;N.style.display=t.style.display});this.addListener("graphChanged",C);C()}else if("zoom"==C)this.zoomEnabled&&(O(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||+"Zoom Out"),O(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),O(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==C){if(this.layersEnabled){var K=O(mxUtils.bind(this,function(ea){if(null!=c)c.parentNode.removeChild(c),c=null;else{c=this.graph.createLayersDialog(mxUtils.bind(this,+function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ba=this.graph.getGraphBounds(),ha=this.graph.view;0>ba.x||0>ba.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale}):null!=this.graph.originalViewState&&0<ba.x/ha.scale+this.graph.originalViewState.translate.x-ha.translate.x&&0<ba.y/ha.scale+this.graph.originalViewState.translate.y-ha.translate.y&&(ha.setTranslate(this.graph.originalViewState.translate.x,+this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale})}}));mxEvent.addListener(c,"mouseleave",function(){c.parentNode.removeChild(c);c=null});ea=K.getBoundingClientRect();c.style.width="140px";c.style.padding="2px 0px 2px 0px";c.style.border="1px solid #d0d0d0";c.style.backgroundColor="#eee";c.style.fontFamily=GraphViewer.cssFontFamily;c.style.fontSize="11px";c.style.overflowY="auto";c.style.maxHeight=+this.graph.container.clientHeight-this.toolbarHeight-10+"px";c.style.zIndex=this.toolbarZIndex+1;c.style.color="#000";mxUtils.setOpacity(c,85);var X=mxUtils.getDocumentScrollOrigin(document);c.style.left=X.x+ea.left-1+"px";c.style.top=X.y+ea.bottom-2+"px";this.isDarkMode()&&(c.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(c)}}),Editor.layersImage,mxResources.get("layers")||"Layers");R.addListener(mxEvent.CHANGE,function(){K.style.display=1<R.getChildCount(R.root)?"inline-flex":+"none"});K.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"}}else if("tags"==C){if(this.tagsEnabled){var I=O(mxUtils.bind(this,function(ea){null==f&&(f=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),f.div.getElementsByTagName("div")[0].style.position="",f.div.style.maxHeight="160px",f.div.style.maxWidth="120px",f.div.style.padding="2px",f.div.style.overflow="auto",f.div.style.height="auto",f.div.style.position="fixed",f.div.style.fontFamily=GraphViewer.cssFontFamily,+f.div.style.fontSize="11px",f.div.style.backgroundColor="#eee",f.div.style.color="#000",f.div.style.border="1px solid #d0d0d0",f.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(f.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(f.div,85));if(null!=l)l.parentNode.removeChild(l),l=null;else{l=f.div;l.style.position="absolute";mxEvent.addListener(l,"mouseleave",function(){null!=l&&(l.parentNode.removeChild(l),l=null)});ea=I.getBoundingClientRect();var X=mxUtils.getDocumentScrollOrigin(document);+l.style.left=X.x+ea.left-1+"px";l.style.top=X.y+ea.bottom-2+"px";document.body.appendChild(l);f.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");R.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){I.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=l&&0==this.graph.getAllTags().length&&(l.parentNode.removeChild(l),l=null)}));I.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==C?this.lightboxEnabled&&O(mxUtils.bind(this,+function(){try{this.showLightbox()}catch(ea){alert(ea.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(C=this.graphConfig["toolbar-buttons"][C],null!=C&&(C.elem=O(null==C.enabled||C.enabled?C.handler:function(){},C.image,C.title,C.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.display="inline-flex",+g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*G;var ca=b.style.border,da=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?+"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ea=b.getBoundingClientRect(),X=mxUtils.getScrollOrigin(document.body);X="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-X.x,top:-X.y};ea={left:ea.left-X.left,top:ea.top-X.top,bottom:ea.bottom-X.top,right:ea.right-X.left};e.style.left=ea.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ea.bottom-1+"px":"inline"!=+this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ea.top+1+"px"):e.style.top=ea.top+"px";"1px solid transparent"==ca&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var ba=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),l=null);null!=c&&(c.parentNode.removeChild(c),c=null);b.style.border=ca});mxEvent.addListener(document,"mousemove",function(ha){for(ha=mxEvent.getSource(ha);null!=+ha;){if(ha==b||ha==e||ha==c||ha==l)return;ha=ha.parentNode}ba()});mxEvent.addListener(document.body,"mouseleave",function(ha){ba()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&da()})).observe(b)};+GraphViewer.prototype.createToolbarButton=function(b,e,g,m){var u=document.createElement("div");u.style.borderRight="1px solid #d0d0d0";u.style.display="inline-flex";u.style.alignItems="center";u.style.padding="6px";mxEvent.addListener(u,"click",b);null!=g&&u.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";b.className="geAdaptiveAsset";null==m||m?(mxEvent.addListener(u,"mouseenter",function(){u.style.backgroundColor=+"light-dark(#dddddd,#333333)"}),mxEvent.addListener(u,"mouseleave",function(){u.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),u.style.cursor="pointer"):mxUtils.setOpacity(u,30);u.appendChild(b);return u};GraphViewer.prototype.disableButton=function(b,e){var g=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=g&&(mxUtils.setOpacity(g.elem,30),mxEvent.removeListener(g.elem,"click",g.handler),mxEvent.addListener(g.elem,"mouseenter",function(){g.elem.style.backgroundColor="#eee"}),e&&g.elem.setAttribute("title",e))};-GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(g,m,v){if(null==m)for(var p=mxEvent.getSource(g);p!=b.container&&null!=p&&null==m;)"a"==p.nodeName.toLowerCase()&&(m=p.getAttribute("href")),p=p.parentNode;null!=e?null==m||b.isCustomLink(m)?mxEvent.consume(g):b.isExternalProtocol(m)||b.isBlankLink(m)||window.setTimeout(function(){e.destroy()},0):null!=m&&null==e&&b.isCustomLink(m)&&-(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&b.customLinkClicked(m,v)&&(mxUtils.clearSelection(),mxEvent.consume(g))}),mxUtils.bind(this,function(g){if(null==e&&this.lightboxClickEnabled&&(!mxEvent.isTouchEvent(g)||0==this.toolbarItems.length))try{this.showLightbox()}catch(m){alert(m.message)}}))};+GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(g,m,u){if(null==m)for(var p=mxEvent.getSource(g);p!=b.container&&null!=p&&null==m;)"a"==p.nodeName.toLowerCase()&&(m=p.getAttribute("href")),p=p.parentNode;null!=e?null==m||b.isCustomLink(m)?mxEvent.consume(g):b.isExternalProtocol(m)||b.isBlankLink(m)||window.setTimeout(function(){e.destroy()},0):null!=m&&null==e&&b.isCustomLink(m)&&+(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&b.customLinkClicked(m,u)&&(mxUtils.clearSelection(),mxEvent.consume(g))}),mxUtils.bind(this,function(g){if(null==e&&this.lightboxClickEnabled&&(!mxEvent.isTouchEvent(g)||0==this.toolbarItems.length))try{this.showLightbox()}catch(m){alert(m.message)}}))};GraphViewer.prototype.showLightbox=function(b,e,g){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;g={client:1,target:null!=g?g:"blank"};b&&(g.edit=this.graphConfig.edit||"_blank");if(null!=e?e:1)g.close=1;this.layersEnabled&&(g.layers=1);this.tagsEnabled&&(g.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(g.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&(g.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(g.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(m){"ready"==m.data&&m.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):g.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(g.dev="1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(g)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};GraphViewer.prototype.showLocalLightbox=function(b){var e=document.createElement("div");e.style.position="fixed";e.style.top="0";e.style.left="0";e.style.bottom="0";e.style.right="0";e.style.zIndex=this.lightboxZIndex;e.style.backgroundColor="#000000";mxUtils.setOpacity(e,70);document.body.appendChild(e);var g=document.createElement("img");g.setAttribute("border","0");g.setAttribute("src",Editor.closeBlackImage);g.style.position="fixed";g.style.top="32px";g.style.right="32px";g.style.cursor="pointer";g.className="geAdaptiveAsset";var m=mxUtils.bind(this,function(){p.setDarkMode(this.isDarkMode())});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",m);p.destroy()}));urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=-this.layersEnabled?"1":"0";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var v=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));v.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(v))}catch(c){}if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};-EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};v=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var p=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",m);p.editor.editBlankUrl=this.editBlankUrl;p.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=v;p.refresh=function(){};var A=mxUtils.bind(this,function(c){27==c.keyCode&&p.destroy()}),G=this.initialOverflow,-S=p.destroy;p.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",A),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=G,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var F=p.editor.graph,P=F.container;P.style.overflow="hidden";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",A)):(e.style.display="none",g.style.display=-"none");var R=this;F.getImageFromBundles=function(c){return R.getImageUrl(c)};var T=p.createTemporaryGraph;p.createTemporaryGraph=function(){var c=T.apply(this,arguments);c.getImageFromBundles=function(f){return R.getImageUrl(f)};return c};this.graphConfig.move&&(F.isMoveCellsEvent=function(c){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(F,p);window.setTimeout(mxUtils.bind(this,-function(){try{mxEvent.addListener(e,"click",function(){p.destroy()}),P.style.outline="none",P.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(P)):(document.body.appendChild(P),document.body.appendChild(g)),p.setFileData(this.xml),mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)"),p.chromelessToolbar.style.bottom="60px",p.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(p.chromelessToolbar),p.getEditBlankXml=-mxUtils.bind(this,function(){return this.xml}),this.showLayers(F,this.graph),p.lightboxFit(),p.chromelessResize()}catch(c){p.handleError(c,null,function(){p.destroy()})}}),0);return p};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};+this.layersEnabled?"1":"0";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var u=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));u.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(u))}catch(f){}if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};+EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};u=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var p=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",m);p.editor.editBlankUrl=this.editBlankUrl;p.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=u;p.refresh=function(){};var B=mxUtils.bind(this,function(f){27==f.keyCode&&p.destroy()}),H=this.initialOverflow,+S=p.destroy;p.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",B),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=H,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var G=p.editor.graph,O=G.container;O.style.overflow="hidden";this.lightboxChrome&&null==b?(O.style.border="1px solid #c0c0c0",O.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",B)):(e.style.display="none",g.style.display=+"none");var R=this;G.getImageFromBundles=function(f){return R.getImageUrl(f)};var c=p.createTemporaryGraph;p.createTemporaryGraph=function(){var f=c.apply(this,arguments);f.getImageFromBundles=function(l){return R.getImageUrl(l)};return f};this.graphConfig.move&&(G.isMoveCellsEvent=function(f){return!0});mxUtils.setPrefixedStyle(O.style,"border-radius","4px");O.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(G,p);window.setTimeout(mxUtils.bind(this,+function(){try{mxEvent.addListener(e,"click",function(){p.destroy()}),O.style.outline="none",O.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(O)):(document.body.appendChild(O),document.body.appendChild(g)),p.setFileData(this.xml),mxUtils.setPrefixedStyle(O.style,"transform","rotateY(0deg)"),p.chromelessToolbar.style.bottom="60px",p.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(p.chromelessToolbar),p.getEditBlankXml=+mxUtils.bind(this,function(){return this.xml}),this.showLayers(G,this.graph),p.lightboxFit(),p.chromelessResize()}catch(f){p.handleError(f,null,function(){p.destroy()})}}),0);return p};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};GraphViewer.prototype.updateTitle=function(b,e){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",e||b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",e||b))};GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(g){e.innerText=g.message,null!=window.console&&console.error(g)}})};-GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var g=0;g<e.length;g++)b.push(e[g]);return b}var m=document.getElementsByTagName("*");e=[];for(g=0;g<m.length;g++){var v=m[g].className;null!=v&&0<v.length&&(v=v.split(" "),0<=mxUtils.indexOf(v,b)&&e.push(m[g]))}return e};-GraphViewer.createViewerForElement=function(b,e){var g=b.getAttribute("data-mxgraph");if(null!=g){var m=JSON.parse(g),v=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,m);null!=e&&e(p)};null!=m.url?GraphViewer.getUrl(m.url,function(p){v(p)}):v(m.xml)}};+GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var g=0;g<e.length;g++)b.push(e[g]);return b}var m=document.getElementsByTagName("*");e=[];for(g=0;g<m.length;g++){var u=m[g].className;null!=u&&0<u.length&&(u=u.split(" "),0<=mxUtils.indexOf(u,b)&&e.push(m[g]))}return e};+GraphViewer.createViewerForElement=function(b,e){var g=b.getAttribute("data-mxgraph");if(null!=g){var m=JSON.parse(g),u=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,m);null!=e&&e(p)};null!=m.url?GraphViewer.getUrl(m.url,function(p){u(p)}):u(m.xml)}};GraphViewer.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));for(var e="",g=0;g<window.location.ancestorOrigins.length;g++)if(e+=" -> "+window.location.ancestorOrigins[g],e.endsWith("dan6v7pm1f1a1.cloudfront.net")||e.endsWith("confluence-cloud-excalidraw-ll3likebca-uc.a.run.app"))return!0;(b.endsWith("ac.draw.io")||b.endsWith("aj.draw.io"))&&1==window.location.ancestorOrigins.length&&window.location.ancestorOrigins[0]&&window.location.ancestorOrigins[0].endsWith(".atlassian.net")}}catch(m){}return!1};GraphViewer.darkBackgroundColor=Editor.darkColor;GraphViewer.cssFontFamily=Editor.defaultHtmlFont;GraphViewer.shapeBackgroundColor=null;GraphViewer.viewerInitialized=function(b){};GraphViewer.initCss=function(){try{null==GraphViewer.styleElement&&(GraphViewer.styleElement=document.createElement("style"),GraphViewer.styleElement.setAttribute("type","text/css"),GraphViewer.styleElement.innerHTML=GraphViewer.getCss(),GraphViewer.blockedAncestorFrames()||document.getElementsByTagName("head")[0].appendChild(GraphViewer.styleElement))}catch(b){}};@@ -4278,11 +4277,11 @@ GraphViewer.getCss=function(){return[".geDarkMode img {\n\tfilter: invert(1);\n}" font-family: "+GraphViewer.cssFontFamily+";"," font-size: 10pt;\n border: none;\n margin: 0px;\n}\n.geDialog {\n position: absolute;"," background: light-dark(#ffffff, "+GraphViewer.darkBackgroundColor+");","\t color: light-dark(#3f3f3f, #c0c0c0);\n box-shadow: 0px 0px 2px 2px light-dark(#d5d5d5, transparent);\n border: 1px solid light-dark(#dadada, #565656);\n overflow: hidden;\n padding: 30px;\n z-index: 2;\n}\n.geDialogClose {\n position: absolute;\n width: 9px;\n height: 9px;\n opacity: 0.5;\n cursor: pointer;\n}\n.geDialogClose:hover {\n opacity: 1;\n}\n.geDialogTitle {\n box-sizing: border-box;\n white-space: nowrap;"," background: light-dark(#f1f3f4, "+GraphViewer.darkBackgroundColor+");"," border-bottom: 1px solid rgb(192, 192, 192);\n font-size: 15px;\n font-weight: bold;\n text-align: center;\n color: rgb(35, 86, 149);\n}\n.geDialogFooter {"," background: light-dark(#f1f3f4, "+GraphViewer.darkBackgroundColor+");"," white-space: nowrap;\n text-align: right;\n box-sizing: border-box;\n border-top: 1px solid #e5e5e5;\n color: darkGray;\n}\n.geBtn, .mxWindow .geBtn {\n background-color: light-dark(#eeeeee, #1b1d1e);\n border: 1px solid light-dark(#d8d8d8, #333333);\n color: light-dark(#3f3f3f, #c0c0c0);\n font-size: 13px;\n font-weight: 500;\n border-radius: 4px;\n height: 30px;\n margin: 0 0 0 8px;\n min-width: 72px;\n outline: 0;\n padding: 0 8px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n.geBtn:hover:not(.gePrimaryBtn), .geBtn:focus {\n border: 1px solid light-dark(#c6c6c6, #333333);\n background: light-dark(#dadada, #333333);\n}\n.geBtn:disabled {\n opacity: .5;\n}\n.gePrimaryBtn {\n background: linear-gradient(light-dark(#4d90fe, #003555) 0px, light-dark(#4787ed, #003555) 100%);\n border: 1px solid light-dark(#3079ed, transparent);\n color: light-dark(#ffffff, #c0c0c0);\n}\n.gePrimaryBtn:hover:not([disabled]) {\n background: linear-gradient(light-dark(#4d90fe, #004a77) 0px, light-dark(#357ae8, #004a77) 100%);\n border: 1px solid light-dark(#2f5bb7, transparent);\n}\n.geBtn:disabled {\n opacity: .5;\n}"].join("\n")};GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,g){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=g;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},e=function(g,m){function v(){this.q=[];this.add=function(k){this.q.push(k)};var c,f;this.call=function(){c=0;for(f=this.q.length;c<f;c++)this.q[c].call()}}function p(c,f){return c.currentStyle?c.currentStyle[f]:window.getComputedStyle?window.getComputedStyle(c,null).getPropertyValue(f):c.style[f]}function A(c,f){if(!c.resizedAttached)c.resizedAttached=-new v,c.resizedAttached.add(f);else if(c.resizedAttached){c.resizedAttached.add(f);return}c.resizeSensor=document.createElement("div");c.resizeSensor.className="resize-sensor";c.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";c.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';-c.appendChild(c.resizeSensor);"static"==p(c,"position")&&(c.style.position="relative");var k=c.resizeSensor.childNodes[0],B=k.childNodes[0],z=c.resizeSensor.childNodes[1],C=function(){B.style.width="100000px";B.style.height="100000px";k.scrollLeft=1E5;k.scrollTop=1E5;z.scrollLeft=1E5;z.scrollTop=1E5};C();var I=!1,L=function(){c.resizedAttached&&(I&&(c.resizedAttached.call(),I=!1),b(L))};b(L);var K,O,da,ea;f=function(){if((da=c.offsetWidth)!=K||(ea=c.offsetHeight)!=O)I=!0,K=da,O=ea;C()};var ca=function(V,-ma,la){V.attachEvent?V.attachEvent("on"+ma,la):V.addEventListener(ma,la)};ca(k,"scroll",f);ca(z,"scroll",f)}var G=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,F=!1;(new ResizeObserver(function(){F||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){F=!0;G();S=null;F=!1},200))})).observe(g)}else{var P=Object.prototype.toString.call(g),R="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===-P||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){P=0;for(var T=g.length;P<T;P++)A(g[P],G)}else A(g,G);this.detach=function(){if(R)for(var c=0,f=g.length;c<f;c++)e.detach(g[c]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},e=function(g,m){function u(){this.q=[];this.add=function(t){this.q.push(t)};var f,l;this.call=function(){f=0;for(l=this.q.length;f<l;f++)this.q[f].call()}}function p(f,l){return f.currentStyle?f.currentStyle[l]:window.getComputedStyle?window.getComputedStyle(f,null).getPropertyValue(l):f.style[l]}function B(f,l){if(!f.resizedAttached)f.resizedAttached=+new u,f.resizedAttached.add(l);else if(f.resizedAttached){f.resizedAttached.add(l);return}f.resizeSensor=document.createElement("div");f.resizeSensor.className="resize-sensor";f.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";f.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';+f.appendChild(f.resizeSensor);"static"==p(f,"position")&&(f.style.position="relative");var t=f.resizeSensor.childNodes[0],z=t.childNodes[0],C=f.resizeSensor.childNodes[1],F=function(){z.style.width="100000px";z.style.height="100000px";t.scrollLeft=1E5;t.scrollTop=1E5;C.scrollLeft=1E5;C.scrollTop=1E5};F();var N=!1,K=function(){f.resizedAttached&&(N&&(f.resizedAttached.call(),N=!1),b(K))};b(K);var I,ca,da,ea;l=function(){if((da=f.offsetWidth)!=I||(ea=f.offsetHeight)!=ca)N=!0,I=da,ca=ea;F()};var X=function(ba,+ha,ma){ba.attachEvent?ba.attachEvent("on"+ha,ma):ba.addEventListener(ha,ma)};X(t,"scroll",l);X(C,"scroll",l)}var H=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,G=!1;(new ResizeObserver(function(){G||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){G=!0;H();S=null;G=!1},200))})).observe(g)}else{var O=Object.prototype.toString.call(g),R="[object Array]"===O||"[object NodeList]"===O||"[object HTMLCollection]"===+O||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){O=0;for(var c=g.length;O<c;O++)B(g[O],H)}else B(g,H);this.detach=function(){if(R)for(var f=0,l=g.length;f<l;f++)e.detach(g[f]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},{val:"parallelMultiple",dispName:"Parallel Multiple"},{val:"terminate",dispName:"Terminate"},{val:"exclusiveGw",dispName:"Exclusive Gw"},{val:"parallelGw",dispName:"Parallel Gw"},{val:"complexGw",dispName:"Complex Gw"}]},{name:"outline",dispName:"Event Type",type:"enum",defVal:"standard",enumList:[{val:"standard",dispName:"Standard"},{val:"eventInt",dispName:"Interrupting"},{val:"eventNonint",dispName:"Non-Interrupting"},{val:"catching",dispName:"Catching"},{val:"boundInt",dispName:"Bound Interrupting"},diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.jsindex b0ef52256..106148119 100644--- a/src/main/webapp/js/viewer.min.js+++ b/src/main/webapp/js/viewer.min.js@@ -30,7 +30,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);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"26.0.7",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.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.9",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&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.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||@@ -1875,8 +1875,8 @@ var mxStylesheetCodec=mxCodecRegistry.register(function(){var a=new mxObjectCodefunction(b,c){b=typeof c;"function"==b?c=mxStyleRegistry.getName(c):"object"==b&&(c=null);return c};a.decode=function(b,c,d){d=d||new this.template.constructor;var e=c.getAttribute("id");null!=e&&(b.objects[e]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(b,c,d)&&"add"==c.nodeName&&(e=c.getAttribute("as"),null!=e)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),g={});for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var k=f.getAttribute("as");if("add"==f.nodeName){var l=mxUtils.getTextContent(f);null!=l&&0<l.length&&mxStylesheetCodec.allowEval?l=mxUtils.eval(l):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[k]=l)}else"remove"==f.nodeName&&delete g[k]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());mxStylesheetCodec.allowEval=!1;var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};$jscomp.arrayIteratorImpl=function(b){var e=0;return function(){return e<b.length?{done:!1,value:b[e++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var e="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return e?e.call(b):$jscomp.arrayIterator(b)};-Editor=function(b,e,g,m,v){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=m||this.createGraph(e,g);this.editable=null!=v?v:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(p,A){this.status=p;this.statusFunction=A;this.fireEvent(new mxEventObject("statusChanged"))};-this.getStatus=function(){return this.status};this.graphChangeListener=function(p,A){p=null!=A?A.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;+Editor=function(b,e,g,m,u){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=m||this.createGraph(e,g);this.editable=null!=u?u:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(p,B){this.status=p;this.statusFunction=B;this.fireEvent(new mxEventObject("statusChanged"))};+this.getStatus=function(){return this.status};this.graphChangeListener=function(p,B){p=null!=B?B.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;Editor.pageCounter=0;(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(e){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;Editor.smallScreenWidth=1024;Editor.helpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDc4LTI0MHEyMSAwIDM1LjUtMTQuNVQ1MjgtMjkwcTAtMjEtMTQuNS0zNS41VDQ3OC0zNDBxLTIxIDAtMzUuNSAxNC41VDQyOC0yOTBxMCAyMSAxNC41IDM1LjVUNDc4LTI0MFptLTM2LTE1NGg3NHEwLTMzIDcuNS01MnQ0Mi41LTUycTI2LTI2IDQxLTQ5LjV0MTUtNTYuNXEwLTU2LTQxLTg2dC05Ny0zMHEtNTcgMC05Mi41IDMwVDM0Mi02MThsNjYgMjZxNS0xOCAyMi41LTM5dDUzLjUtMjFxMzIgMCA0OCAxNy41dDE2IDM4LjVxMCAyMC0xMiAzNy41VDUwNi01MjZxLTQ0IDM5LTU0IDU5dC0xMCA3M1ptMzggMzE0cS04MyAwLTE1Ni0zMS41VDE5Ny0xOTdxLTU0LTU0LTg1LjUtMTI3VDgwLTQ4MHEwLTgzIDMxLjUtMTU2VDE5Ny03NjNxNTQtNTQgMTI3LTg1LjVUNDgwLTg4MHE4MyAwIDE1NiAzMS41VDc2My03NjNxNTQgNTQgODUuNSAxMjdUODgwLTQ4MHEwIDgzLTMxLjUgMTU2VDc2My0xOTdxLTU0IDU0LTEyNyA4NS41VDQ4MC04MFptMC04MHExMzQgMCAyMjctOTN0OTMtMjI3cTAtMTM0LTkzLTIyN3QtMjI3LTkzcS0xMzQgMC0yMjcgOTN0LTkzIDIyN3EwIDEzNCA5MyAyMjd0MjI3IDkzWm0wLTMyMFoiLz48L3N2Zz4=";Editor.menuImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTMgMThoMTh2LTJIM3Yyem0wLTVoMTh2LTJIM3Yyem0wLTd2MmgxOFY2SDN6Ii8+PC9zdmc+";Editor.moveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=";@@ -1945,17 +1945,17 @@ Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"HaEditor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=[];Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#121212";Editor.darkColorVar="--ge-dark-color";Editor.fontSizeUnit="px";Editor.pageSizeUnit=mxConstants.INCHES;Editor.isDarkMode=function(){return Editor.darkMode};Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};Editor.convertHtmlToText=function(b){if(null!=b){var e=document.createElement("div");e.innerHTML=Graph.sanitizeHtml(b);return mxUtils.extractTextWithWhitespace(e.childNodes)}return null};-Editor.extractGraphModelFromPng=function(b){var e=null;try{var g=b.substring(b.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0);EditorUi.parsePng(m,mxUtils.bind(this,function(v,p,A){v=m.substring(v+8,v+8+A);"zTXt"==p?(A=v.indexOf(String.fromCharCode(0)),"mxGraphModel"==v.substring(0,A)&&(v=pako.inflateRaw(Graph.stringToArrayBuffer(v.substring(A+2)),{to:"string"}).replace(/\+/g," "),null!=v&&0<v.length&&(e=v))):"tEXt"==p&&(v=v.split(String.fromCharCode(0)),1<v.length&&("mxGraphModel"==-v[0]||"mxfile"==v[0])&&(e=v[1]));if(null!=e||"IDAT"==p)return!0}))}catch(v){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};-Editor.soundex=function(b){if(null==b||0==b.length)return"";var e=[],g=1;e[0]=b[0].toUpperCase();for(var m=1,v=b.length;m<v;m++){var p=b[m].toUpperCase().charCodeAt(0)-65;if(0<=p&&25>=p&&"0"!="01230120022455012603010202"[p]&&("01230120022455012603010202"[p]!=e[g-1]&&(e[g]="01230120022455012603010202"[p],g++),3<g))break}if(3>=g)for(;3>=g;)e[g]="0",g++;return e.join("")};+Editor.extractGraphModelFromPng=function(b){var e=null;try{var g=b.substring(b.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0);EditorUi.parsePng(m,mxUtils.bind(this,function(u,p,B){u=m.substring(u+8,u+8+B);"zTXt"==p?(B=u.indexOf(String.fromCharCode(0)),"mxGraphModel"==u.substring(0,B)&&(u=pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(B+2)),{to:"string"}).replace(/\+/g," "),null!=u&&0<u.length&&(e=u))):"tEXt"==p&&(u=u.split(String.fromCharCode(0)),1<u.length&&("mxGraphModel"==+u[0]||"mxfile"==u[0])&&(e=u[1]));if(null!=e||"IDAT"==p)return!0}))}catch(u){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};+Editor.soundex=function(b){if(null==b||0==b.length)return"";var e=[],g=1;e[0]=b[0].toUpperCase();for(var m=1,u=b.length;m<u;m++){var p=b[m].toUpperCase().charCodeAt(0)-65;if(0<=p&&25>=p&&"0"!="01230120022455012603010202"[p]&&("01230120022455012603010202"[p]!=e[g-1]&&(e[g]="01230120022455012603010202"[p],g++),3<g))break}if(3>=g)for(;3>=g;)e[g]="0",g++;return e.join("")};Editor.selectFilename=function(b){var e=b.value.lastIndexOf(".");if(0<e){var g=b.value.substring(e+1);"drawio"!=g&&0<=mxUtils.indexOf(["png","svg","html","xml","pdf"],g)&&(g=b.value.lastIndexOf(".drawio.",e),0<g&&(e=g))}e=0<e?e:b.value.length;Editor.selectSubstring(b,0,e)};Editor.selectSubstring=function(b,e,g){b.focus();"undefined"!=typeof b.selectionStart?(b.selectionStart=e,b.selectionEnd=g):document.selection&&document.selection.createRange&&(b.select(),b=document.selection.createRange(),b.collapse(!0),b.moveEnd("character",g),b.moveStart("character",e),b.select())};Editor.toUnit=function(b,e){return e==mxConstants.INCHES?Math.round(100*b/mxConstants.PIXELS_PER_INCH)/100:e==mxConstants.MILLIMETERS?Math.round(100*b/mxConstants.PIXELS_PER_MM)/100:e==mxConstants.METERS?Math.round(1E3*b/(1E3*mxConstants.PIXELS_PER_MM))/1E3:Math.round(b)};Editor.fromUnit=function(b,e){return e==mxConstants.INCHES?Math.round(b*mxConstants.PIXELS_PER_INCH):e==mxConstants.MILLIMETERS?Math.round(b*mxConstants.PIXELS_PER_MM):e==mxConstants.METERS?Math.round(b*mxConstants.PIXELS_PER_MM*1E3):Math.round(b)};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.origin+window.location.pathname;Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};-Editor.prototype.editAsNew=function(b,e){e=null!=e?"?title="+encodeURIComponent(e):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var g=null,m=mxUtils.bind(this,function(v){"ready"==v.data&&v.source==g&&(mxEvent.removeListener(window,"message",m),g.postMessage(b,"*"))});mxEvent.addListener(window,"message",m);g=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"),-null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,e){b=new Graph(null,e,null,null,b);b.transparentBackground=!1;var g=b.isCssTransformsSupported,m=this;b.isCssTransformsSupported=function(){return g.apply(this,arguments)&&(!m.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(v){return!this.isExternalProtocol(v)});return b};+Editor.prototype.editAsNew=function(b,e){e=null!=e?"?title="+encodeURIComponent(e):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var g=null,m=mxUtils.bind(this,function(u){"ready"==u.data&&u.source==g&&(mxEvent.removeListener(window,"message",m),g.postMessage(b,"*"))});mxEvent.addListener(window,"message",m);g=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"),+null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,e){b=new Graph(null,e,null,null,b);b.transparentBackground=!1;var g=b.isCssTransformsSupported,m=this;b.isCssTransformsSupported=function(){return g.apply(this,arguments)&&(!m.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(u){return!this.isExternalProtocol(u)});return b};Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};Editor.prototype.readGraphState=function(b){var e=b.getAttribute("grid");if(null==e||""==e)e=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=e&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=@@ -1967,203 +1967,202 @@ Editor.prototype.getGraphXml=function(b){if(null!=b?b:1){var e=new mxCodec(mxUtithis.graph.isGridEnabled()?"1":"0");b.setAttribute("gridSize",this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(b){this.modified=b};Editor.prototype.setFilename=function(b){this.filename=b};-Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,v){e.undoableEditHappened(v.getProperty("edit"))};var g=mxUtils.bind(this,function(m,v){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,g);b.getView().addListener(mxEvent.UNDO,g);g=function(m,v){m=v.getProperty("edit").changes;m=b.getSelectionCellsForChanges(m);v=!1;if(0<m.length){for(var p=[],A=0;A<m.length;A++)null!=b.view.getState(m[A])&&(p.push(m[A]),-v||(b.scrollCellToVisible(m[A]),v=!0));b.setSelectionCells(p)}};e.addListener(mxEvent.UNDO,g);e.addListener(mxEvent.REDO,g);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};+Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,u){e.undoableEditHappened(u.getProperty("edit"))};var g=mxUtils.bind(this,function(m,u){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,g);b.getView().addListener(mxEvent.UNDO,g);g=function(m,u){m=u.getProperty("edit").changes;m=b.getSelectionCellsForChanges(m);u=!1;if(0<m.length){for(var p=[],B=0;B<m.length;B++)null!=b.view.getState(m[B])&&(p.push(m[B]),+u||(b.scrollCellToVisible(m[B]),u=!0));b.setSelectionCells(p)}};e.addListener(mxEvent.UNDO,g);e.addListener(mxEvent.REDO,g);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};-function Dialog(b,e,g,m,v,p,A,G,S,F,P){this.editorUi=b;var R=S?57:0,T=g,c=m,f=S?0:64,k=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(k.height=window.innerHeight);var B=k.height;k=Math.max(1,Math.round((k.width-g-f)/2));var z=Math.max(1,Math.round((B-m-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-f):g;m=Math.min(m,B-f);0<b.dialogs.length&&-(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=B+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var C=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=C.x+"px";this.bg.style.top=C.y+"px";k+=C.x;z+=C.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",z+=b.embedViewport.y,k+=b.embedViewport.x);-v&&document.body.appendChild(this.bg);var I=b.createDiv(S?"geTransDialog":"geDialog");v=this.getPosition(k,z,g,m);k=v.x;z=v.y;I.style.width=g+"px";I.style.height=m+"px";I.style.left=k+"px";I.style.top=z+"px";I.style.zIndex=this.zIndex;I.appendChild(e);document.body.appendChild(I);!G&&e.clientHeight>I.clientHeight-f&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),-p.className="geDialogClose",p.style.top=z+14+"px",p.style.left=k+g+38-R+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!P)){var L=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(K){L=!0}),null,mxUtils.bind(this,function(K){L&&(b.hideDialog(!0),L=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=F){var K=F();null!=K&&(T=g=K.w,c=m=K.h)}K=Editor.inlineFullscreen||-null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);B=K.height;this.bg.style.height=B+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");g=null!=document.body?Math.min(T,document.body.scrollWidth-f):T;m=Math.min(c,B-f);K=Math.max(1,Math.round((K.width-g-f)/2));var O=Math.max(1,Math.round((B-m-b.footerHeight)/3));O=this.getPosition(K,O,g,m);K=O.x;O=O.y;var da=mxUtils.getDocumentScrollOrigin(document);K+=da.x;O+=da.y;-Editor.inlineFullscreen||null==b.embedViewport||(O+=b.embedViewport.y,K+=b.embedViewport.x);I.style.left=K+"px";I.style.top=O+"px";I.style.width=g+"px";I.style.height=m+"px";!G&&e.clientHeight>I.clientHeight-f&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=O+14+"px",this.dialogImg.style.left=K+g+38-R+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=A;this.container=-I;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;+function Dialog(b,e,g,m,u,p,B,H,S,G,O){this.editorUi=b;var R=S?57:0,c=g,f=m,l=S?0:64,t=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(t.height=window.innerHeight);var z=t.height;t=Math.max(1,Math.round((t.width-g-l)/2));var C=Math.max(1,Math.round((z-m-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-l):g;m=Math.min(m,z-l);0<b.dialogs.length&&+(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=z+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var F=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=F.x+"px";this.bg.style.top=F.y+"px";t+=F.x;C+=F.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",C+=b.embedViewport.y,t+=b.embedViewport.x);+u&&document.body.appendChild(this.bg);var N=b.createDiv(S?"geTransDialog":"geDialog");u=this.getPosition(t,C,g,m);t=u.x;C=u.y;N.style.width=g+"px";N.style.height=m+"px";N.style.left=t+"px";N.style.top=C+"px";N.style.zIndex=this.zIndex;N.appendChild(e);document.body.appendChild(N);!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),+p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=t+g+38-R+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!O)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(I){K=!0}),null,mxUtils.bind(this,function(I){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var I=G();null!=I&&(c=g=I.w,f=m=I.h)}I=Editor.inlineFullscreen||+null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);z=I.height;this.bg.style.height=z+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");g=null!=document.body?Math.min(c,document.body.scrollWidth-l):c;m=Math.min(f,z-l);I=Math.max(1,Math.round((I.width-g-l)/2));var ca=Math.max(1,Math.round((z-m-b.footerHeight)/3));ca=this.getPosition(I,ca,g,m);I=ca.x;ca=ca.y;var da=mxUtils.getDocumentScrollOrigin(document);I+=da.x;+ca+=da.y;Editor.inlineFullscreen||null==b.embedViewport||(ca+=b.embedViewport.y,I+=b.embedViewport.x);N.style.left=I+"px";N.style.top=ca+"px";N.style.width=g+"px";N.style.height=m+"px";!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ca+14+"px",this.dialogImg.style.left=I+g+38-R+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=+B;this.container=N;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&this.container.parentNode.removeChild(this.container)};-var ErrorDialog=function(b,e,g,m,v,p,A,G,S,F,P){S=null!=S?S:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var T=document.createElement("div");T.style.padding="0px";T.style.margin="0px";T.style.fontSize="18px";T.style.paddingBottom="16px";T.style.marginBottom="10px";T.style.borderBottom="1px solid #c0c0c0";T.style.color="gray";T.style.whiteSpace="nowrap";T.style.textOverflow="ellipsis";T.style.overflow="hidden";mxUtils.write(T,e);T.setAttribute("title",e);R.appendChild(T)}e=-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=F&&(F=mxUtils.button(F,function(){null!=P&&P()}),F.className="geBtn",g.appendChild(F));-var c=mxUtils.button(m,function(){S&&b.hideDialog();null!=v&&v()});c.className="geBtn";g.appendChild(c);null!=A&&(m=mxUtils.button(A,function(){S&&b.hideDialog();null!=G&&G()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){c.focus()};R.appendChild(g);this.container=R},PrintDialog=function(b,e,g){this.create(b,e,g)};-PrintDialog.prototype.create=function(b){function e(c){var f=A.checked||F.checked,k=parseInt(R.value)/100;isNaN(k)&&(k=1,R.value="100%");mxClient.IS_SF&&(k*=.75);var B=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,z=1/g.pageScale;if(f){var C=A.checked?1:parseInt(P.value);isNaN(C)||(z=mxUtils.getScaleForPageCount(C,g,B))}var I=C=0;B=mxRectangle.fromRectangle(B);B.width=Math.ceil(B.width*k);B.height=Math.ceil(B.height*k);z*=k;!f&&g.pageVisible?(k=g.getPageLayout(),C-=k.x*B.width,I-=k.y*B.height):-f=!0;f=PrintDialog.createPrintPreview(g,z,B,0,C,I,f);f.open();c&&PrintDialog.printPreview(f)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var v=document.createElement("tbody");var p=document.createElement("tr");var A=document.createElement("input");A.setAttribute("type","checkbox");var G=document.createElement("td");G.setAttribute("colspan","2");G.style.fontSize="10pt";G.appendChild(A);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));-G.appendChild(S);mxEvent.addListener(S,"click",function(c){A.checked=!A.checked;F.checked=!A.checked;mxEvent.consume(c)});mxEvent.addListener(A,"change",function(){F.checked=!A.checked});p.appendChild(G);v.appendChild(p);p=p.cloneNode(!1);var F=document.createElement("input");F.setAttribute("type","checkbox");G=document.createElement("td");G.style.fontSize="10pt";G.appendChild(F);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");G.appendChild(S);mxEvent.addListener(S,-"click",function(c){F.checked=!F.checked;A.checked=!F.checked;mxEvent.consume(c)});p.appendChild(G);var P=document.createElement("input");P.setAttribute("value","1");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("size","4");P.setAttribute("disabled","disabled");P.style.width="50px";G=document.createElement("td");G.style.fontSize="10pt";G.appendChild(P);mxUtils.write(G," "+mxResources.get("pages")+" (max)");p.appendChild(G);v.appendChild(p);mxEvent.addListener(F,"change",-function(){F.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");A.checked=!F.checked});p=p.cloneNode(!1);G=document.createElement("td");mxUtils.write(G,mxResources.get("pageScale")+":");p.appendChild(G);G=document.createElement("td");var R=document.createElement("input");R.setAttribute("value","100 %");R.setAttribute("size","5");R.style.width="50px";G.appendChild(R);p.appendChild(G);v.appendChild(p);p=document.createElement("tr");G=document.createElement("td");G.colSpan=2;-G.style.paddingTop="20px";G.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&G.appendChild(S);if(PrintDialog.previewEnabled){var T=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});T.className="geBtn";G.appendChild(T)}T=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});T.className="geBtn gePrimaryBtn";G.appendChild(T);b.editor.cancelFirst||-G.appendChild(S);p.appendChild(G);v.appendChild(p);m.appendChild(v);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};-PrintDialog.createPrintPreview=function(b,e,g,m,v,p,A){e=new mxPrintPreview(b,e,g,m,v,p);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=A;A=b.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";e.backgroundColor=A;var G=e.isTextLabel;e.isTextLabel=function(F){return"geHint"==!F.className&&G.apply(this,arguments)};var S=e.getLinkForCellState;e.getLinkForCellState=function(F){return b.getAbsoluteUrl(S.apply(this,arguments))};return e};+var ErrorDialog=function(b,e,g,m,u,p,B,H,S,G,O){S=null!=S?S:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var c=document.createElement("div");c.style.padding="0px";c.style.margin="0px";c.style.fontSize="18px";c.style.paddingBottom="16px";c.style.marginBottom="10px";c.style.borderBottom="1px solid #c0c0c0";c.style.color="gray";c.style.whiteSpace="nowrap";c.style.textOverflow="ellipsis";c.style.overflow="hidden";mxUtils.write(c,e);c.setAttribute("title",e);R.appendChild(c)}e=+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=O&&O()}),G.className="geBtn",g.appendChild(G));+var f=mxUtils.button(m,function(){S&&b.hideDialog();null!=u&&u()});f.className="geBtn";g.appendChild(f);null!=B&&(m=mxUtils.button(B,function(){S&&b.hideDialog();null!=H&&H()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){f.focus()};R.appendChild(g);this.container=R},PrintDialog=function(b,e,g){this.create(b,e,g)};+PrintDialog.prototype.create=function(b){function e(f){var l=B.checked||G.checked,t=parseInt(R.value)/100;isNaN(t)&&(t=1,R.value="100%");mxClient.IS_SF&&(t*=.75);var z=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/g.pageScale;if(l){var F=B.checked?1:parseInt(O.value);isNaN(F)||(C=mxUtils.getScaleForPageCount(F,g,z))}var N=F=0;z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*t);z.height=Math.ceil(z.height*t);C*=t;!l&&g.pageVisible?(t=g.getPageLayout(),F-=t.x*z.width,N-=t.y*z.height):+l=!0;l=PrintDialog.createPrintPreview(g,C,z,0,F,N,l);l.open();f&&PrintDialog.printPreview(l)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");var p=document.createElement("tr");var B=document.createElement("input");B.setAttribute("type","checkbox");var H=document.createElement("td");H.setAttribute("colspan","2");H.style.fontSize="10pt";H.appendChild(B);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));+H.appendChild(S);mxEvent.addListener(S,"click",function(f){B.checked=!B.checked;G.checked=!B.checked;mxEvent.consume(f)});mxEvent.addListener(B,"change",function(){G.checked=!B.checked});p.appendChild(H);u.appendChild(p);p=p.cloneNode(!1);var G=document.createElement("input");G.setAttribute("type","checkbox");H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(G);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");H.appendChild(S);mxEvent.addListener(S,+"click",function(f){G.checked=!G.checked;B.checked=!G.checked;mxEvent.consume(f)});p.appendChild(H);var O=document.createElement("input");O.setAttribute("value","1");O.setAttribute("type","number");O.setAttribute("min","1");O.setAttribute("size","4");O.setAttribute("disabled","disabled");O.style.width="50px";H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(O);mxUtils.write(H," "+mxResources.get("pages")+" (max)");p.appendChild(H);u.appendChild(p);mxEvent.addListener(G,"change",+function(){G.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled");B.checked=!G.checked});p=p.cloneNode(!1);H=document.createElement("td");mxUtils.write(H,mxResources.get("pageScale")+":");p.appendChild(H);H=document.createElement("td");var R=document.createElement("input");R.setAttribute("value","100 %");R.setAttribute("size","5");R.style.width="50px";H.appendChild(R);p.appendChild(H);u.appendChild(p);p=document.createElement("tr");H=document.createElement("td");H.colSpan=2;+H.style.paddingTop="20px";H.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&H.appendChild(S);if(PrintDialog.previewEnabled){var c=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});c.className="geBtn";H.appendChild(c)}c=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});c.className="geBtn gePrimaryBtn";H.appendChild(c);b.editor.cancelFirst||+H.appendChild(S);p.appendChild(H);u.appendChild(p);m.appendChild(u);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};+PrintDialog.createPrintPreview=function(b,e,g,m,u,p,B){e=new mxPrintPreview(b,e,g,m,u,p);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=B;B=b.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";e.backgroundColor=B;var H=e.isTextLabel;e.isTextLabel=function(G){return"geHint"==!G.className&&H.apply(this,arguments)};var S=e.getLinkForCellState;e.getLinkForCellState=function(G){return b.getAbsoluteUrl(S.apply(this,arguments))};return e};PrintDialog.previewEnabled=!0;-var PageSetupDialog=function(b){function e(){var k=R;null!=k&&null!=k.originalSrc&&(k=b.createImageForPageLink(k.originalSrc,null));null!=k&&null!=k.src?(P.style.backgroundImage="url("+k.src+")",P.style.display="inline-block"):(P.style.backgroundImage="",P.style.display="none");P.style.backgroundColor="";null!=T&&T!=mxConstants.NONE&&(P.style.backgroundColor=T,P.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var v=document.createElement("tbody");-var p=document.createElement("tr");var A=document.createElement("td");A.style.verticalAlign="top";A.style.fontSize="10pt";mxUtils.write(A,mxResources.get("paperSize")+":");p.appendChild(A);A=document.createElement("td");A.style.verticalAlign="top";A.style.fontSize="10pt";var G=PageSetupDialog.addPageFormatPanel(A,"pagesetupdialog",g.pageFormat);p.appendChild(A);v.appendChild(p);p=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("gridSize")+":");p.appendChild(A);-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 k=parseInt(S.value);S.value=Math.max(1,isNaN(k)?g.getGridSize():k)});p.appendChild(A);v.appendChild(p);p=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("background")+":");-p.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 P=document.createElement("div");P.style.display="inline-block";P.style.verticalAlign="middle";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.backgroundSize="contain";P.style.border="1px solid lightGray";P.style.borderRadius="4px";P.style.marginRight="14px";P.style.height="32px";-P.style.width="64px";P.style.cursor="pointer";P.style.padding="4px";var R=g.backgroundImage,T=g.background,c=g.shadowVisible,f=function(k){b.showBackgroundImageDialog(function(B,z,C,I){z||(null!=B&&null!=B.src&&Graph.isPageLink(B.src)&&(B={originalSrc:B.src}),R=B,c=I);T=C;e()},R,T,!0);mxEvent.consume(k)};mxEvent.addListener(F,"click",f);mxEvent.addListener(P,"click",f);e();A.appendChild(P);A.appendChild(F);p.appendChild(A);v.appendChild(p);p=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 k=parseInt(S.value);isNaN(k)||g.gridSize===k||g.setGridSize(k);k=new ChangePageSetup(b,T,R,G.get());k.ignoreColor=g.background==T;k.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=R?R.src:null);null!=c&&-(k.shadowVisible=c);g.pageFormat.width==k.previousFormat.width&&g.pageFormat.height==k.previousFormat.height&&k.ignoreColor&&k.ignoreImage&&k.shadowVisible==g.shadowVisible||g.model.execute(k)});f.className="geBtn gePrimaryBtn";A.appendChild(f);b.editor.cancelFirst||A.appendChild(F);p.appendChild(A);v.appendChild(p);m.appendChild(v);this.container=m};-PageSetupDialog.addPageFormatPanel=function(b,e,g,m){e="format-"+e;var v=document.createElement("input");v.setAttribute("name",e);v.setAttribute("type","radio");v.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","landscape");var A=document.createElement("select");A.style.marginBottom="4px";A.style.borderRadius="4px";A.style.borderWidth="1px";A.style.borderStyle="solid";A.style.boxSizing="border-box";-A.style.padding="2px";A.style.width="210px";var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.width="210px";G.style.height="24px";v.style.marginRight="6px";G.appendChild(v);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));G.appendChild(e);p.style.marginLeft="10px";p.style.marginRight="6px";G.appendChild(p);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,mxResources.get("landscape"));-G.appendChild(S);var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.marginLeft="4px";F.style.fontSize="12px";F.style.width="210px";F.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";F.appendChild(P);mxUtils.write(F," x ");var R=document.createElement("input");R.setAttribute("size","7");R.setAttribute("title",mxResources.get("height"));R.style.textAlign="right";F.appendChild(R);-var T=document.createElement("select");T.style.marginLeft="4px";T.style.maxWidth="78px";T.style.width="78px";for(var c=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],f=0;f<c.length;f++){var k=document.createElement("option");k.setAttribute("value",c[f].unit);mxUtils.write(k,c[f].label);T.appendChild(k)}T.value=Editor.pageSizeUnit;F.appendChild(T);G.style.display=-"none";F.style.display="none";var B={},z=PageSetupDialog.getFormats();for(f=0;f<z.length;f++)c=z[f],B[c.key]=c,k=document.createElement("option"),k.setAttribute("value",c.key),mxUtils.write(k,c.title),A.appendChild(k);var C=function(){A.value="custom";for(var L=0;L<z.length;L++){var K=z[L];null!=K.format&&("a4"==K.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==K.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=-583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==K.format.width&&g.height==K.format.height?(A.value=K.key,v.setAttribute("checked","checked"),v.defaultChecked=!0,v.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,detected=!0):g.width==K.format.height&&g.height==K.format.width&&(A.value=K.key,v.removeAttribute("checked"),v.defaultChecked=!1,v.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,detected=p.checked=!0))}"custom"==A.value?-(P.value=Editor.toUnit(g.width,T.value),R.value=Editor.toUnit(g.height,T.value),v.setAttribute("checked","checked"),A.value="custom",G.style.display="none",F.style.display=""):(G.style.display="",F.style.display="none")};C();b.appendChild(A);mxUtils.br(b);b.appendChild(G);b.appendChild(F);var I=function(L,K){L=B[A.value];null!=L.format?(P.value=Editor.toUnit(p.checked?L.format.height:L.format.width,T.value),R.value=Editor.toUnit(p.checked?L.format.width:L.format.height,T.value),F.style.display="none",-G.style.display=""):(G.style.display="none",F.style.display="");L=parseFloat(P.value);if(isNaN(L)||0>=L)P.value=Editor.toUnit(g.width,T.value);L=parseFloat(R.value);if(isNaN(L)||0>=L)R.value=Editor.toUnit(g.height,T.value);L=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(P.value),T.value)),Math.floor(Editor.fromUnit(parseFloat(R.value),T.value)));K||L.width==g.width&&L.height==g.height||(g=L,null!=m&&m(g))};mxEvent.addListener(e,"click",function(L){v.checked=!0;I(L);mxEvent.consume(L)});-mxEvent.addListener(S,"click",function(L){p.checked=!0;I(L);mxEvent.consume(L)});mxEvent.addListener(P,"blur",I);mxEvent.addListener(P,"click",I);mxEvent.addListener(R,"blur",I);mxEvent.addListener(R,"click",I);mxEvent.addListener(p,"change",I);mxEvent.addListener(v,"change",I);mxEvent.addListener(A,"change",function(L){I(L,"custom"==A.value);mxEvent.consume(L)});mxEvent.addListener(T,"change",function(L){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),T.value);R.value=Editor.toUnit(Editor.fromUnit(R.value,-Editor.pageSizeUnit),T.value);Editor.pageSizeUnit=T.value;I(L,!0);mxEvent.consume(L)});I(null,!0);return{set:function(L){g=L;C(null,null,!0)},get:function(){return g},widthInput:P,heightInput:R}};+var PageSetupDialog=function(b){function e(){var t=R;null!=t&&null!=t.originalSrc&&(t=b.createImageForPageLink(t.originalSrc,null));null!=t&&null!=t.src?(O.style.backgroundImage="url("+t.src+")",O.style.display="inline-block"):(O.style.backgroundImage="",O.style.display="none");O.style.backgroundColor="";null!=c&&c!=mxConstants.NONE&&(O.style.backgroundColor=c,O.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");+var p=document.createElement("tr");var B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";mxUtils.write(B,mxResources.get("paperSize")+":");p.appendChild(B);B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";var H=PageSetupDialog.addPageFormatPanel(B,"pagesetupdialog",g.pageFormat);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("gridSize")+":");p.appendChild(B);+B=document.createElement("td");B.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();B.appendChild(S);mxEvent.addListener(S,"change",function(){var t=parseInt(S.value);S.value=Math.max(1,isNaN(t)?g.getGridSize():t)});p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("background")+":");+p.appendChild(B);B=document.createElement("td");var G=document.createElement("button");G.className="geBtn";G.style.margin="0px";mxUtils.write(G,mxResources.get("change")+"...");var O=document.createElement("div");O.style.display="inline-block";O.style.verticalAlign="middle";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="contain";O.style.border="1px solid lightGray";O.style.borderRadius="4px";O.style.marginRight="14px";O.style.height="32px";+O.style.width="64px";O.style.cursor="pointer";O.style.padding="4px";var R=g.backgroundImage,c=g.background,f=g.shadowVisible,l=function(t){b.showBackgroundImageDialog(function(z,C,F,N){C||(null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src}),R=z,f=N);c=F;e()},R,c,!0);mxEvent.consume(t)};mxEvent.addListener(G,"click",l);mxEvent.addListener(O,"click",l);e();B.appendChild(O);B.appendChild(G);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");+B.colSpan=2;B.style.paddingTop="16px";B.setAttribute("align","right");G=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});G.className="geBtn";b.editor.cancelFirst&&B.appendChild(G);l=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var t=parseInt(S.value);isNaN(t)||g.gridSize===t||g.setGridSize(t);t=new ChangePageSetup(b,c,R,H.get());t.ignoreColor=g.background==c;t.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=R?R.src:null);null!=f&&+(t.shadowVisible=f);g.pageFormat.width==t.previousFormat.width&&g.pageFormat.height==t.previousFormat.height&&t.ignoreColor&&t.ignoreImage&&t.shadowVisible==g.shadowVisible||g.model.execute(t)});l.className="geBtn gePrimaryBtn";B.appendChild(l);b.editor.cancelFirst||B.appendChild(G);p.appendChild(B);u.appendChild(p);m.appendChild(u);this.container=m};+PageSetupDialog.addPageFormatPanel=function(b,e,g,m){e="format-"+e;var u=document.createElement("input");u.setAttribute("name",e);u.setAttribute("type","radio");u.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","landscape");var B=document.createElement("select");B.style.marginBottom="4px";B.style.borderRadius="4px";B.style.borderWidth="1px";B.style.borderStyle="solid";B.style.boxSizing="border-box";+B.style.padding="2px";B.style.width="210px";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.marginLeft="4px";H.style.width="210px";H.style.height="24px";u.style.marginRight="6px";H.appendChild(u);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));H.appendChild(e);p.style.marginLeft="10px";p.style.marginRight="6px";H.appendChild(p);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,mxResources.get("landscape"));+H.appendChild(S);var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.fontSize="12px";G.style.width="210px";G.style.height="24px";var O=document.createElement("input");O.setAttribute("size","7");O.setAttribute("title",mxResources.get("width"));O.style.textAlign="right";G.appendChild(O);mxUtils.write(G," x ");var R=document.createElement("input");R.setAttribute("size","7");R.setAttribute("title",mxResources.get("height"));R.style.textAlign="right";G.appendChild(R);+var c=document.createElement("select");c.style.marginLeft="4px";c.style.maxWidth="78px";c.style.width="78px";for(var f=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],l=0;l<f.length;l++){var t=document.createElement("option");t.setAttribute("value",f[l].unit);mxUtils.write(t,f[l].label);c.appendChild(t)}c.value=Editor.pageSizeUnit;G.appendChild(c);H.style.display=+"none";G.style.display="none";var z={},C=PageSetupDialog.getFormats();for(l=0;l<C.length;l++)f=C[l],z[f.key]=f,t=document.createElement("option"),t.setAttribute("value",f.key),mxUtils.write(t,f.title),B.appendChild(t);var F=function(){B.value="custom";for(var K=0;K<C.length;K++){var I=C[K];null!=I.format&&("a4"==I.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==I.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=+583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==I.format.width&&g.height==I.format.height?(B.value=I.key,u.setAttribute("checked","checked"),u.defaultChecked=!0,u.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,detected=!0):g.width==I.format.height&&g.height==I.format.width&&(B.value=I.key,u.removeAttribute("checked"),u.defaultChecked=!1,u.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,detected=p.checked=!0))}"custom"==B.value?+(O.value=Editor.toUnit(g.width,c.value),R.value=Editor.toUnit(g.height,c.value),u.setAttribute("checked","checked"),B.value="custom",H.style.display="none",G.style.display=""):(H.style.display="",G.style.display="none")};F();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(G);var N=function(K,I){K=z[B.value];null!=K.format?(O.value=Editor.toUnit(p.checked?K.format.height:K.format.width,c.value),R.value=Editor.toUnit(p.checked?K.format.width:K.format.height,c.value),G.style.display="none",+H.style.display=""):(H.style.display="none",G.style.display="");K=parseFloat(O.value);if(isNaN(K)||0>=K)O.value=Editor.toUnit(g.width,c.value);K=parseFloat(R.value);if(isNaN(K)||0>=K)R.value=Editor.toUnit(g.height,c.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(O.value),c.value)),Math.floor(Editor.fromUnit(parseFloat(R.value),c.value)));I||K.width==g.width&&K.height==g.height||(g=K,null!=m&&m(g))};mxEvent.addListener(e,"click",function(K){u.checked=!0;N(K);mxEvent.consume(K)});+mxEvent.addListener(S,"click",function(K){p.checked=!0;N(K);mxEvent.consume(K)});mxEvent.addListener(O,"blur",N);mxEvent.addListener(O,"click",N);mxEvent.addListener(R,"blur",N);mxEvent.addListener(R,"click",N);mxEvent.addListener(p,"change",N);mxEvent.addListener(u,"change",N);mxEvent.addListener(B,"change",function(K){N(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(c,"change",function(K){O.value=Editor.toUnit(Editor.fromUnit(O.value,Editor.pageSizeUnit),c.value);R.value=Editor.toUnit(Editor.fromUnit(R.value,+Editor.pageSizeUnit),c.value);Editor.pageSizeUnit=c.value;N(K,!0);mxEvent.consume(K)});N(null,!0);return{set:function(K){g=K;F(null,null,!0)},get:function(){return g},widthInput:O,heightInput:R}};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,m,v,p,A,G,S,F,P){S=null!=S?S:!0;var R=document.createElement("div"),T=document.createElement("div");T.style.width="100%";T.style.display="grid";T.style.gap="5px 8px";T.style.gridAutoColumns="auto 1fr";T.style.boxSizing="border-box";T.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",v||mxResources.get("filename"));mxUtils.write(f,(v||mxResources.get("filename"))+":");c.appendChild(f);T.appendChild(c);var k=document.createElement("input");k.setAttribute("value",e||"");k.style.flexGrow="1";var B=mxUtils.button(g,function(){if(null==p||p(k.value))S&&b.hideDialog(),m(k.value)});B.className="geBtn gePrimaryBtn";this.init=function(){if(null!=-v||null==A)if(null!=P?Editor.selectFilename(k):(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var z=T.parentNode;if(null!=z){var C=null;mxEvent.addListener(z,"dragleave",function(I){null!=C&&(C.style.backgroundColor="",C=null);I.stopPropagation();I.preventDefault()});mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(I){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=k,C.style.backgroundColor=-"#ebf2f9");I.stopPropagation();I.preventDefault()}));mxEvent.addListener(z,"drop",mxUtils.bind(this,function(I){null!=C&&(C.style.backgroundColor="",C=null);0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")&&(k.value=decodeURIComponent(I.dataTransfer.getData("text/uri-list")),B.click());I.stopPropagation();I.preventDefault()}))}}};c=document.createElement("div");c.style.display="inline-flex";c.style.alignItems="center";c.style.gap="4px";c.style.whiteSpace="nowrap";c.appendChild(k);T.appendChild(c);-null==v&&null!=A||null==P||null==b.editor.diagramFileTypes||(c=document.createElement("div"),c.style.display="inline-flex",c.style.alignItems="center",c.style.textOverflow="ellipsis",c.style.justifyContent="flex-end",c.style.fontSize="10pt",mxUtils.write(c,mxResources.get("type")+":"),T.appendChild(c),c=document.createElement("div"),c.style.display="inline-flex",c.style.alignItems="center",c.style.whiteSpace="nowrap",T.appendChild(c),e=FilenameDialog.createFileTypes(b,k,b.editor.diagramFileTypes),-e.style.width="100%",c.appendChild(e));null!=A&&T.appendChild(A);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=P?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=F&&F()});c.className="geBtn";null==G||b.isOffline()||row.appendChild(b.createHelpIcon(G));-b.editor.cancelFirst&&row.appendChild(c);mxEvent.addListener(k,"keypress",function(z){13==z.keyCode&&B.click()});row.appendChild(B);b.editor.cancelFirst||row.appendChild(c);T.appendChild(row);R.appendChild(T);this.container=R};FilenameDialog.filenameHelpLink=null;-FilenameDialog.createFileTypes=function(b,e,g){var m=document.createElement("select");for(b=0;b<g.length;b++){var v=document.createElement("option");v.setAttribute("value",b);mxUtils.write(v,mxResources.get(g[b].description)+" (."+g[b].extension+")");m.appendChild(v)}mxEvent.addListener(m,"change",function(p){p=g[m.value].extension;var A=e.value.lastIndexOf(".drawio.");A=0<A?A:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<A?e.value.substring(0,A+1)+p:e.value+"."+p;"createEvent"in-document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var A=0,G=0;G<g.length;G++){var S=g[G].extension,F=null;"drawio"!=S&&(F=S,S=".drawio."+S);if(p.substring(p.length-S.length-1)=="."+S||null!=F&&p.substring(p.length-F.length-1)=="."+F){A=G;break}}m.value=A};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};-var WrapperWindow=function(b,e,g,m,v,p,A){var G=b.createSidebarContainer();A(G);this.window=new mxWindow(e,G,g,m,v,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(S){null==S&&(S=window.event);return null!=S&&b.isSelectionAllowed(S)}))};-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var A=this.graph;if(null!=A.container&&!A.transparentBackground){if(A.pageVisible){var G=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=A.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(G),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,-this.backgroundPageShape.init(A.container),S.style.position="absolute",A.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(F){A.dblClick(F)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(F){A.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(F))}),mxUtils.bind(this,function(F){null!=-A.tooltipHandler&&A.tooltipHandler.isHideOnHover()&&A.tooltipHandler.hide();A.isMouseDown&&!mxEvent.isConsumed(F)&&A.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(F))}),mxUtils.bind(this,function(F){A.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(F))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=G,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};-mxGraphView.prototype.validateBackgroundStyles=function(A,G,S){var F=this.graph;A=null!=A?A:1;var P=mxUtils.getLightDarkColor(null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background).cssText,R=mxUtils.getLightDarkColor(F.defaultPageBorderColor).cssText,T=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",c="none",f="";if(F.isGridEnabled()||F.gridVisible){f=10;mxClient.IS_SVG?(c=unescape(encodeURIComponent(this.createSvgGrid(T,A))),c=window.btoa?-btoa(c):Base64.encode(c,!0),c="url(data:image/svg+xml;base64,"+c+")",f=F.gridSize*this.scale*this.gridSteps*A):c="url("+this.gridImage+")";var k=T=0;G=null!=G?G-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var B=F.gridSize*this.scale*this.gridSteps,z=G%B;B=S%B;null!=F.view.backgroundPageShape&&(k=this.getBackgroundPageBounds(),T=1+k.x,k=1+k.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-T+G,f)+z*A)+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale--k+S,f)+B*A)+"px"}A=F.view.canvas;null!=A.ownerSVGElement&&(A=A.ownerSVGElement);T=!Editor.isDarkMode()&&F.enableDiagramBackground;null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=f,F.view.backgroundPageShape.node.style.backgroundImage=c,F.view.backgroundPageShape.node.style.backgroundColor=P,F.view.backgroundPageShape.node.style.borderColor=R,F.view.backgroundPageShape.node.style.colorScheme="none"==F.getAdaptiveColors()?"light":"",F.container.classList.add("geDiagramBackdrop"),-A.style.backgroundImage="none",A.style.backgroundColor="",F.container.style.backgroundColor=T?F.diagramBackgroundColor:""):(F.container.classList.remove("geDiagramBackdrop"),A.style.backgroundPosition=f,A.style.backgroundImage=c,!T||null!=F.background&&F.background!=mxConstants.NONE?A.style.backgroundColor=P:(A.style.backgroundColor=F.diagramBackgroundColor,F.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(A,G){for(var S=this.graph.gridSize*this.scale*(null!=G?G:-1);S<this.minGridSize;)S*=2;G=this.gridSteps*S;for(var F=[],P=1;P<this.gridSteps;P++){var R=P*S;F.push("M 0 "+R+" L "+G+" "+R+" M "+R+" 0 L "+R+" "+G)}A=mxUtils.getLightDarkColor(A);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+G+'" height="'+G+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+G+'" height="'+G+'" patternUnits="userSpaceOnUse"><path d="'+-F.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(A.cssText)+';" stroke="'+A.light+'" opacity="0.2" stroke-width="1"/><path d="M '+G+" 0 L 0 0 0 "+G+'" fill="none" style="stroke:'+mxUtils.htmlEntities(A.cssText)+';" stroke="'+A.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(A,G){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+G,F))+"px";S.style.backgroundPosition=F}};mxGraph.prototype.updatePageBreaks=function(A,G,S){var F=this.view.scale,P=this.view.translate,R=this.pageFormat,T=F*this.pageScale,c=this.view.getBackgroundPageBounds();G=c.width;S=c.height;var f=new mxRectangle(F*P.x,F*-P.y,R.width*T,R.height*T),k=(A=A&&Math.min(f.width,f.height)>this.minPageBreakDist)?Math.ceil(S/f.height)-1:0,B=A?Math.ceil(G/f.width)-1:0,z=c.x+G,C=c.y+S;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<B&&(this.verticalPageBreaks=[]);A=mxUtils.bind(this,function(I){if(null!=I){for(var L=I==this.horizontalPageBreaks?k:B,K=0;K<=L;K++){var O=I==this.horizontalPageBreaks?[new mxPoint(Math.round(c.x),Math.round(c.y+(K+1)*f.height)),new mxPoint(Math.round(z),-Math.round(c.y+(K+1)*f.height))]:[new mxPoint(Math.round(c.x+(K+1)*f.width),Math.round(c.y)),new mxPoint(Math.round(c.x+(K+1)*f.width),Math.round(C))];null!=I[K]?(I[K].points=O,I[K].redraw()):(O=new mxPolyline(O,this.pageBreakColor),O.dialect=this.dialect,O.isDashed=this.pageBreakDashed,O.pointerEvents=!1,O.init(this.view.backgroundPane),O.redraw(),I[K]=O)}for(K=L;K<I.length;K++)null!=I[K]&&I[K].destroy();I.splice(L,I.length-L)}});A(this.horizontalPageBreaks);A(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;-mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(A,G,S){for(var F=0;F<G.length;F++){if(this.graph.isTableCell(G[F])||this.graph.isTableRow(G[F]))return!1;if(this.graph.getModel().isVertex(G[F])){var P=this.graph.getCellGeometry(G[F]);if(null!=P&&P.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var A=g.apply(this,arguments);A.intersects=mxUtils.bind(this,function(G,S){return this.isConnecting()?-!0:mxCellMarker.prototype.intersects.apply(A,arguments)});return A};mxGraphView.prototype.createBackgroundPageShape=function(A){return new mxRectangleShape(A,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var A=this.getGraphBounds(),G=0<A.width?A.x/this.scale-this.translate.x:0,S=0<A.height?A.y/this.scale-this.translate.y:0,F=this.graph.pageFormat,P=this.graph.pageScale,R=F.width*P;F=F.height*P;P=Math.floor(Math.min(0,G)/R);var T=Math.floor(Math.min(0,-S)/F);return new mxRectangle(this.scale*(this.translate.x+P*R),this.scale*(this.translate.y+T*F),this.scale*(Math.ceil(Math.max(1,G+A.width/this.scale)/R)-P)*R,this.scale*(Math.ceil(Math.max(1,S+A.height/this.scale)/F)-T)*F)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(A,G){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=-A+"px",this.view.backgroundPageShape.node.style.marginTop=G+"px")};var v=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(A,G,S,F,P,R){var T=v.apply(this,arguments);null==R||R||mxEvent.addListener(T,"mousedown",function(c){mxEvent.consume(c)});return T};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(A,G,S){var F=this.graph.model.getParent(A);if(G){var P=this.graph.model.isEdge(A)?null:this.graph.getCellGeometry(A);-P=!this.graph.model.isEdge(F)&&!this.graph.isSiblingSelected(A)&&(null!=P&&P.relative||!this.graph.isContainer(F)||this.graph.isPart(A))}else if(P=p.apply(this,arguments),this.graph.isTableCell(A)||this.graph.isTableRow(A))P=F,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(A)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(A)&&-this.graph.isCellSelected(F);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(A){A=A.getCell();for(var G=this.graph.getModel(),S=G.getParent(A),F=this.graph.view.getState(S),P=this.graph.isCellSelected(A);null!=F&&(G.isVertex(S)||G.isEdge(S));){var R=this.graph.isCellSelected(S);P=P||R;if(R||!P&&(this.graph.isTableCell(A)||this.graph.isTableRow(A)))A=S;S=G.getParent(S)}return A}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,v=this.editor.graph;v.lightbox=g;var p=v.getGraphBounds;v.getGraphBounds=function(){var ca=p.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var ma=this.view.translate,la=this.view.scale;ca=mxRectangle.fromRectangle(ca);ca.add(new mxRectangle((ma.x+V.x)*la,(ma.y+V.y)*la,V.width*la,V.height*la))}return ca};v.useCssTransforms&&-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(ca,V){this.clearSelectionState()});v.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);v.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);v.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);v.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);v.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=-0;v.isEnabled=function(){return!1};v.panningHandler.isForcePanningEvent=function(ca){for(var V=ca.getSource();null!=V&&V!=v.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(ca.getEvent())};var A=v.panningHandler.start;v.panningHandler.start=function(){A.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!v.standalone){var G=!1,S=!1;this.setDefaultStyle=function(ca){try{v.getModel().isEdge(ca)?-S=v.pasteEdgeStyle=!1:G=!1;var V=v.getCellStyle(ca,!1),ma=[],la=[],Y;for(Y in V)ma.push(V[Y]),la.push(Y);v.getModel().isEdge(ca)?v.currentEdgeStyle={}:v.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ma,"cells",[ca],"force",!0));v.getModel().isEdge(ca)?S=v.pasteEdgeStyle=!0:G=!0}catch(fa){this.handleError(fa)}};this.clearDefaultStyle=function(){v.currentEdgeStyle=mxUtils.clone(v.defaultEdgeStyle);v.currentVertexStyle=mxUtils.clone(v.defaultVertexStyle);G=-S=v.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};v.addListener("cellsInserted",function(ca,V){v.pasteCellStyles(v.includeDescendants(V.getProperty("cells")))});v.addListener("textInserted",function(ca,V){v.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(ca){null==ca&&(ca=window.event);return v.isEditing()||null!=ca&&this.isSelectionAllowed(ca)});this.container!=document.body||-this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown=F,this.formatContainer.onselectstart=F,this.formatContainer.onmousedown=F,this.footerContainer.onselectstart=F,this.footerContainer.onmousedown=F,null!=this.tabContainer&&-(this.tabContainer.onselectstart=F),mxClient.IS_IOS&&(e=function(){var ca=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{ca=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(ma){}}return ca}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect",-"none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(ca){if(null!=ca){var V=mxEvent.getSource(ca);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return F(ca)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||-9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):v.panningHandler.usePopupTrigger=!1;v.init(this.diagramContainer);mxClient.IS_SVG&&null!=v.view.getDrawPane()&&(e=v.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=v.graphHandler){var P=v.graphHandler.start;v.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();P.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,-"mousemove",mxUtils.bind(this,function(ca){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(ca)-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(ca)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var R=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(ca,V){return m.isSpaceDown()||R.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,-function(ca){16==ca.which?this.shiftDown=!0:32!=ca.which||v.isEditing()?mxEvent.isConsumed(ca)||27!=ca.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),v.container.style.cursor="move",v.isEditing()||mxEvent.getSource(ca)!=v.container||mxEvent.consume(ca))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(ca){v.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);-var T=v.panningHandler.isForcePanningEvent;v.panningHandler.isForcePanningEvent=function(ca){return T.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(ca.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(ca.getEvent()))&&(!mxEvent.isControlDown(ca.getEvent())&&mxEvent.isRightMouseButton(ca.getEvent())||mxEvent.isMiddleMouseButton(ca.getEvent()))};var c=v.cellEditor.isStopEditingEvent;v.cellEditor.isStopEditingEvent=function(ca){return c.apply(this,arguments)||13==ca.keyCode&&-(!mxClient.IS_SF&&mxEvent.isControlDown(ca)||mxClient.IS_MAC&&mxEvent.isMetaDown(ca)||mxClient.IS_SF&&mxEvent.isShiftDown(ca))};var f=v.isZoomWheelEvent;v.isZoomWheelEvent=function(){return m.isSpaceDown()||f.apply(this,arguments)};var k=!1,B=null,z=null,C=null,I=mxUtils.bind(this,function(){if(null!=this.toolbar&&k!=v.cellEditor.isContentEditing()){for(var ca=this.toolbar.container.firstChild,V=[];null!=ca;){var ma=ca.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,ca)&&(ca.parentNode.removeChild(ca),-V.push(ca));ca=ma}ca=this.toolbar.fontMenu;ma=this.toolbar.sizeMenu;if(null==C)this.toolbar.createTextToolbar();else{for(var la=0;la<C.length;la++)this.toolbar.container.appendChild(C[la]);this.toolbar.fontMenu=B;this.toolbar.sizeMenu=z}k=v.cellEditor.isContentEditing();B=ca;z=ma;C=V}}),L=v.cellEditor.startEditing;v.cellEditor.startEditing=function(){L.apply(this,arguments);I();if(v.cellEditor.isContentEditing()){var ca=!1,V=function(){ca||(ca=!0,window.setTimeout(function(){var ma=v.getSelectedEditingElement();-null!=ma&&(ma=mxUtils.getCurrentStyle(ma),null!=ma&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ma.fontFamily)),m.toolbar.setFontSize(parseInt(ma.fontSize))));ca=!1},0))};mxEvent.addListener(v.cellEditor.textarea,"input",V);mxEvent.addListener(v.cellEditor.textarea,"touchend",V);mxEvent.addListener(v.cellEditor.textarea,"mouseup",V);mxEvent.addListener(v.cellEditor.textarea,"keyup",V);V()}};var K=v.cellEditor.stopEditing;v.cellEditor.stopEditing=function(ca,V){try{K.apply(this,-arguments),I()}catch(ma){m.handleError(ma)}};v.container.setAttribute("tabindex","0");v.container.style.cursor="default";if(window.self===window.top&&null!=v.container.parentNode)try{v.container.focus()}catch(ca){}var O=v.fireMouseEvent;v.fireMouseEvent=function(ca,V,ma){try{ca==mxEvent.MOUSE_DOWN&&this.container.focus(),O.apply(this,arguments)}catch(la){m.handleError(la)}};var da=v.foldCells;v.foldCells=function(ca,V,ma,la,Y){try{da.apply(this,arguments)}catch(fa){m.handleError(fa)}};v.popupMenuHandler.autoExpand=-!0;null!=this.menus&&(v.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(ca,V,ma){this.menus.createPopupMenu(ca,V,ma)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(ca){v.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};v.connectionHandler.addListener(mxEvent.CONNECT,function(ca,V){var ma=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(ma.push(V.getProperty("terminal")),window.setTimeout(function(){null!=-m.hoverIcons&&m.hoverIcons.update(v.view.getState(ma[ma.length-1]))},0));v.pasteCellStyles(ma)});this.addListener("styleChanged",mxUtils.bind(this,function(ca,V){ca=V.getProperty("force");(this.updateDefaultStyle||ca)&&v.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),v.currentVertexStyle,v.currentEdgeStyle,G,S);null!=this.toolbar&&(this.toolbar.setFontName(v.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(v.currentVertexStyle.fontSize||-Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(V=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="orthogonalEdgeStyle"==v.currentEdgeStyle.edgeStyle&&"1"==v.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==v.currentEdgeStyle.edgeStyle||"none"==v.currentEdgeStyle.edgeStyle||-null==v.currentEdgeStyle.edgeStyle?"url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==v.currentEdgeStyle.edgeStyle?"url("+Format.entityImage.src+")":"elbowEdgeStyle"==v.currentEdgeStyle.edgeStyle?"vertical"==v.currentEdgeStyle.elbow?"url("+Format.verticalElbowImage.src+")":"url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==v.currentEdgeStyle.edgeStyle?"vertical"==v.currentEdgeStyle.elbow?"url("+Format.verticalIsometricImage.src+")":"url("+Format.horizontalIsometricImage.src+-")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&(V=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="link"==v.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==v.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==v.currentEdgeStyle.shape?"url("+Format.simpleArrowImage.src+-")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var ca=v.currentVertexStyle.fontFamily||"Helvetica",V=String(v.currentVertexStyle.fontSize||"12"),ma=v.getView().getState(v.getSelectionCell());null!=ma&&(ca=ma.style[mxConstants.STYLE_FONTFAMILY]||ca,V=ma.style[mxConstants.STYLE_FONTSIZE]||V,10<ca.length&&(ca=ca.substring(0,8)+"..."));this.toolbar.setFontName(ca);this.toolbar.setFontSize(V)}),v.getSelectionModel().addListener(mxEvent.CHANGE,b),v.getModel().addListener(mxEvent.CHANGE,-b));v.addListener(mxEvent.CELLS_ADDED,function(ca,V){ca=V.getProperty("cells");V=V.getProperty("parent");null!=V&&v.getModel().isLayer(V)&&!v.isCellVisible(V)&&null!=ca&&0<ca.length&&v.getModel().setVisible(V,!0)});Graph.selectParentLayer&&v.selectionModel.addListener(mxEvent.CHANGE,function(){if(v.isEnabled()&&!v.isSelectionEmpty()){var ca=v.getLayerForCells(v.getSelectionCells());null!=ca&&v.setDefaultParent(ca)}});this.gestureHandler=mxUtils.bind(this,function(ca){null!=this.currentMenu&&mxEvent.getSource(ca)!=-this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ea=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ea&&window.clearTimeout(ea);ea=window.setTimeout(mxUtils.bind(this,function(){ea=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&-!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){v.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){v.view.validateBackground()}));v.addListener("gridSizeChanged",-mxUtils.bind(this,function(){v.isGridEnabled()&&v.view.validateBackground()}));this.editor.resetGraph()}this.init();v.standalone||this.open()};EditorUi.compactUi=!0;-EditorUi.parsePng=function(b,e,g){function m(G,S){var F=p;p+=S;return G.substring(F,p)}function v(G){G=m(G,4);return G.charCodeAt(3)+(G.charCodeAt(2)<<8)+(G.charCodeAt(1)<<16)+(G.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=v(b);var A=m(b,4);if(null!=e&&e(p-8,A,g))break;value=m(b,g);m(b,4);if("IEND"==A)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);+var FilenameDialog=function(b,e,g,m,u,p,B,H,S,G,O){S=null!=S?S:!0;var R=document.createElement("div"),c=document.createElement("div");c.style.width="100%";c.style.display="grid";c.style.gap="5px 8px";c.style.gridAutoColumns="auto 1fr";c.style.boxSizing="border-box";c.style.padding="3px";var f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.justifyContent="flex-end";f.style.minWidth="0";var l=document.createElement("div");l.style.display="inline-block";+l.style.textOverflow="ellipsis";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.fontSize="10pt";l.style.padding="2px 0";l.setAttribute("title",u||mxResources.get("filename"));mxUtils.write(l,(u||mxResources.get("filename"))+":");f.appendChild(l);c.appendChild(f);var t=document.createElement("input");t.setAttribute("value",e||"");t.style.flexGrow="1";var z=mxUtils.button(g,function(){if(null==p||p(t.value))S&&b.hideDialog(),m(t.value)});z.className="geBtn gePrimaryBtn";this.init=function(){if(null!=+u||null==B)if(null!=O?Editor.selectFilename(t):(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var C=c.parentNode;if(null!=C){var F=null;mxEvent.addListener(C,"dragleave",function(N){null!=F&&(F.style.backgroundColor="",F=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(N){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=t,F.style.backgroundColor=+"#ebf2f9");N.stopPropagation();N.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(N){null!=F&&(F.style.backgroundColor="",F=null);0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")&&(t.value=decodeURIComponent(N.dataTransfer.getData("text/uri-list")),z.click());N.stopPropagation();N.preventDefault()}))}}};f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.gap="4px";f.style.whiteSpace="nowrap";f.appendChild(t);c.appendChild(f);+null==u&&null!=B||null==O||null==b.editor.diagramFileTypes||(f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.textOverflow="ellipsis",f.style.justifyContent="flex-end",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("type")+":"),c.appendChild(f),f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.whiteSpace="nowrap",c.appendChild(f),e=FilenameDialog.createFileTypes(b,t,b.editor.diagramFileTypes),+e.style.width="100%",f.appendChild(e));null!=B&&c.appendChild(B);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=O?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});f.className="geBtn";null==H||b.isOffline()||row.appendChild(b.createHelpIcon(H));+b.editor.cancelFirst&&row.appendChild(f);mxEvent.addListener(t,"keypress",function(C){13==C.keyCode&&z.click()});row.appendChild(z);b.editor.cancelFirst||row.appendChild(f);c.appendChild(row);R.appendChild(c);this.container=R};FilenameDialog.filenameHelpLink=null;+FilenameDialog.createFileTypes=function(b,e,g){var m=document.createElement("select");for(b=0;b<g.length;b++){var u=document.createElement("option");u.setAttribute("value",b);mxUtils.write(u,mxResources.get(g[b].description)+" (."+g[b].extension+")");m.appendChild(u)}mxEvent.addListener(m,"change",function(p){p=g[m.value].extension;var B=e.value.lastIndexOf(".drawio.");B=0<B?B:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<B?e.value.substring(0,B+1)+p:e.value+"."+p;"createEvent"in+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var B=0,H=0;H<g.length;H++){var S=g[H].extension,G=null;"drawio"!=S&&(G=S,S=".drawio."+S);if(p.substring(p.length-S.length-1)=="."+S||null!=G&&p.substring(p.length-G.length-1)=="."+G){B=H;break}}m.value=B};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};+var WrapperWindow=function(b,e,g,m,u,p,B){var H=b.createSidebarContainer();B(H);this.window=new mxWindow(e,H,g,m,u,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(S){null==S&&(S=window.event);return null!=S&&b.isSelectionAllowed(S)}))};+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph;if(null!=B.container&&!B.transparentBackground){if(B.pageVisible){var H=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=B.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(H),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,+this.backgroundPageShape.init(B.container),S.style.position="absolute",B.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(G){B.dblClick(G)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(G){B.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){null!=+B.tooltipHandler&&B.tooltipHandler.isHideOnHover()&&B.tooltipHandler.hide();B.isMouseDown&&!mxEvent.isConsumed(G)&&B.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){B.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(G))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=H,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};+mxGraphView.prototype.validateBackgroundStyles=function(B,H,S){var G=this.graph;B=null!=B?B:1;var O=mxUtils.getLightDarkColor(null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background).cssText,R=mxUtils.getLightDarkColor(G.defaultPageBorderColor).cssText,c=null!=O&&this.gridColor!=O.toLowerCase()?this.gridColor:"#ffffff",f="none",l="";"simple"==G.getAdaptiveColors()&&G.background!=mxConstants.NONE&&null!=G.background&&(O=G.background);if(G.isGridEnabled()||G.gridVisible){l=+10;mxClient.IS_SVG?(f=unescape(encodeURIComponent(this.createSvgGrid(c,B))),f=window.btoa?btoa(f):Base64.encode(f,!0),f="url(data:image/svg+xml;base64,"+f+")",l=G.gridSize*this.scale*this.gridSteps*B):f="url("+this.gridImage+")";var t=c=0;H=null!=H?H-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var z=G.gridSize*this.scale*this.gridSteps,C=H%z;z=S%z;null!=G.view.backgroundPageShape&&(t=this.getBackgroundPageBounds(),c=1+t.x,t=1+t.y);l=-Math.round(l-mxUtils.mod(this.translate.x*+this.scale-c+H,l)+C*B)+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-t+S,l)+z*B)+"px"}B=G.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);c=!Editor.isDarkMode()&&G.enableDiagramBackground;null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=l,G.view.backgroundPageShape.node.style.backgroundImage=f,G.view.backgroundPageShape.node.style.backgroundColor=O,G.view.backgroundPageShape.node.style.borderColor=R,G.view.backgroundPageShape.node.style.colorScheme=+"none"==G.getAdaptiveColors()?"light":"",G.container.classList.add("geDiagramBackdrop"),B.style.backgroundImage="none",B.style.backgroundColor="",G.container.style.backgroundColor=c?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),B.style.backgroundPosition=l,B.style.backgroundImage=f,!c||null!=G.background&&G.background!=mxConstants.NONE?B.style.backgroundColor=O:(B.style.backgroundColor=G.diagramBackgroundColor,G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=+function(B,H){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var G=[],O=1;O<this.gridSteps;O++){var R=O*S;G.push("M 0 "+R+" L "+H+" "+R+" M "+R+" 0 L "+R+" "+H)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+H+'" height="'+H+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'++H+'" height="'+H+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" opacity="0.2" stroke-width="1"/><path d="M '+H+" 0 L 0 0 0 "+H+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);+if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+B,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+H,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.view.scale,O=this.view.translate,R=this.pageFormat,c=G*this.pageScale,f=this.view.getBackgroundPageBounds();+H=f.width;S=f.height;var l=new mxRectangle(G*O.x,G*O.y,R.width*c,R.height*c),t=(B=B&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(S/l.height)-1:0,z=B?Math.ceil(H/l.width)-1:0,C=f.x+H,F=f.y+S;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(N){if(null!=N){for(var K=N==this.horizontalPageBreaks?t:z,I=0;I<=K;I++){var ca=N==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),+Math.round(f.y+(I+1)*l.height)),new mxPoint(Math.round(C),Math.round(f.y+(I+1)*l.height))]:[new mxPoint(Math.round(f.x+(I+1)*l.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(I+1)*l.width),Math.round(F))];null!=N[I]?(N[I].points=ca,N[I].redraw()):(ca=new mxPolyline(ca,this.pageBreakColor),ca.dialect=this.dialect,ca.isDashed=this.pageBreakDashed,ca.pointerEvents=!1,ca.init(this.view.backgroundPane),ca.redraw(),N[I]=ca)}for(I=K;I<N.length;I++)null!=N[I]&&N[I].destroy();N.splice(K,N.length-K)}});+B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var G=0;G<H.length;G++){if(this.graph.isTableCell(H[G])||this.graph.isTableRow(H[G]))return!1;if(this.graph.getModel().isVertex(H[G])){var O=this.graph.getCellGeometry(H[G]);if(null!=O&&O.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=+function(){var B=g.apply(this,arguments);B.intersects=mxUtils.bind(this,function(H,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(B,arguments)});return B};mxGraphView.prototype.createBackgroundPageShape=function(B){return new mxRectangleShape(B,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var B=this.getGraphBounds(),H=0<B.width?B.x/this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,+O=this.graph.pageScale,R=G.width*O;G=G.height*O;O=Math.floor(Math.min(0,H)/R);var c=Math.floor(Math.min(0,S)/G);return new mxRectangle(this.scale*(this.translate.x+O*R),this.scale*(this.translate.y+c*G),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/R)-O)*R,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/G)-c)*G)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,H){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var u=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,G,O,R){var c=u.apply(this,arguments);null==R||R||mxEvent.addListener(c,"mousedown",function(f){mxEvent.consume(f)});return c};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=+function(B,H,S){var G=this.graph.model.getParent(B);if(H){var O=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);O=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(B)&&(null!=O&&O.relative||!this.graph.isContainer(G)||this.graph.isPart(B))}else if(O=p.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))O=G,this.graph.isTable(O)||(O=this.graph.model.getParent(O)),O=!this.graph.selectionCellsHandler.isHandled(O)||this.graph.isCellSelected(O)&&this.graph.isToggleEvent(S.getEvent())||+this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(G);return O};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),G=this.graph.view.getState(S),O=this.graph.isCellSelected(B);null!=G&&(H.isVertex(S)||H.isEdge(S));){var R=this.graph.isCellSelected(S);O=O||R;if(R||!O&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,u=this.editor.graph;u.lightbox=g;var p=u.getGraphBounds;u.getGraphBounds=function(){var X=p.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ha=this.view.translate,ma=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ha.x+ba.x)*ma,(ha.y+ba.y)*ma,ba.width*ma,ba.height*ma))}return X};u.useCssTransforms&&+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(X,ba){this.clearSelectionState()});u.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);u.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);u.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=+0;u.isEnabled=function(){return!1};u.panningHandler.isForcePanningEvent=function(X){for(var ba=X.getSource();null!=ba&&ba!=u.container;){if("foreignObject"===ba.nodeName||"text"===ba.nodeName)return!1;ba=ba.parentNode}return!mxEvent.isPopupTrigger(X.getEvent())};var B=u.panningHandler.start;u.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!u.standalone){var H=!1,S=!1;this.setDefaultStyle=function(X){try{u.getModel().isEdge(X)?+S=u.pasteEdgeStyle=!1:H=!1;var ba=u.getCellStyle(X,!1),ha=[],ma=[],Y;for(Y in ba)ha.push(ba[Y]),ma.push(Y);u.getModel().isEdge(X)?u.currentEdgeStyle={}:u.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ma,"values",ha,"cells",[X],"force",!0));u.getModel().isEdge(X)?S=u.pasteEdgeStyle=!0:H=!0}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){u.currentEdgeStyle=mxUtils.clone(u.defaultEdgeStyle);u.currentVertexStyle=mxUtils.clone(u.defaultVertexStyle);H=S=+u.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};u.addListener("cellsInserted",function(X,ba){u.pasteCellStyles(u.includeDescendants(ba.getProperty("cells")))});u.addListener("textInserted",function(X,ba){u.pasteCellStyles(ba.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var G=mxUtils.bind(this,function(X){null==X&&(X=window.event);return u.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container!=document.body||+this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=G,this.menubarContainer.onmousedown=G,this.toolbarContainer.onselectstart=G,this.toolbarContainer.onmousedown=G,this.diagramContainer.onselectstart=G,this.diagramContainer.onmousedown=G,this.sidebarContainer.onselectstart=G,this.sidebarContainer.onmousedown=G,this.formatContainer.onselectstart=G,this.formatContainer.onmousedown=G,this.footerContainer.onselectstart=G,this.footerContainer.onmousedown=G,null!=this.tabContainer&&+(this.tabContainer.onselectstart=G),mxClient.IS_IOS&&(e=function(){var X=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ba=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{X=[parseInt(ba[1],10),parseInt(ba[2],10),parseInt(ba[3]||0,10)]}catch(ha){}}return X}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect",+"none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(X){if(null!=X){var ba=mxEvent.getSource(X);if("A"==ba.nodeName)for(;null!=ba;){if("geHint"==ba.className)return!0;ba=ba.parentNode}}return G(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||+9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):u.panningHandler.usePopupTrigger=!1;u.init(this.diagramContainer);mxClient.IS_SVG&&null!=u.view.getDrawPane()&&(e=u.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=u.graphHandler){var O=u.graphHandler.start;u.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();O.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,+"mousemove",mxUtils.bind(this,function(X){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-ba.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var R=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,ba){return m.isSpaceDown()||R.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,+function(X){16==X.which?this.shiftDown=!0:32!=X.which||u.isEditing()?mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),u.container.style.cursor="move",u.isEditing()||mxEvent.getSource(X)!=u.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){u.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);+var c=u.panningHandler.isForcePanningEvent;u.panningHandler.isForcePanningEvent=function(X){return c.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var f=u.cellEditor.isStopEditingEvent;u.cellEditor.isStopEditingEvent=function(X){return f.apply(this,arguments)||13==X.keyCode&&(!mxClient.IS_SF&&+mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X)||mxClient.IS_SF&&mxEvent.isShiftDown(X))};var l=u.isZoomWheelEvent;u.isZoomWheelEvent=function(){return m.isSpaceDown()||l.apply(this,arguments)};var t=!1,z=null,C=null,F=null,N=mxUtils.bind(this,function(){if(null!=this.toolbar&&t!=u.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,ba=[];null!=X;){var ha=X.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,X)&&(X.parentNode.removeChild(X),ba.push(X));+X=ha}X=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==F)this.toolbar.createTextToolbar();else{for(var ma=0;ma<F.length;ma++)this.toolbar.container.appendChild(F[ma]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=C}t=u.cellEditor.isContentEditing();z=X;C=ha;F=ba}}),K=u.cellEditor.startEditing;u.cellEditor.startEditing=function(){K.apply(this,arguments);N();if(u.cellEditor.isContentEditing()){var X=!1,ba=function(){X||(X=!0,window.setTimeout(function(){var ha=u.getSelectedEditingElement();+null!=ha&&(ha=mxUtils.getCurrentStyle(ha),null!=ha&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ha.fontFamily)),m.toolbar.setFontSize(parseInt(ha.fontSize))));X=!1},0))};mxEvent.addListener(u.cellEditor.textarea,"input",ba);mxEvent.addListener(u.cellEditor.textarea,"touchend",ba);mxEvent.addListener(u.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(u.cellEditor.textarea,"keyup",ba);ba()}};var I=u.cellEditor.stopEditing;u.cellEditor.stopEditing=function(X,ba){try{I.apply(this,+arguments),N()}catch(ha){m.handleError(ha)}};u.container.setAttribute("tabindex","0");u.container.style.cursor="default";if(window.self===window.top&&null!=u.container.parentNode)try{u.container.focus()}catch(X){}var ca=u.fireMouseEvent;u.fireMouseEvent=function(X,ba,ha){try{X==mxEvent.MOUSE_DOWN&&this.container.focus(),ca.apply(this,arguments)}catch(ma){m.handleError(ma)}};var da=u.foldCells;u.foldCells=function(X,ba,ha,ma,Y){try{da.apply(this,arguments)}catch(la){m.handleError(la)}};u.popupMenuHandler.autoExpand=+!0;null!=this.menus&&(u.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,ba,ha){this.menus.createPopupMenu(X,ba,ha)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){u.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};u.connectionHandler.addListener(mxEvent.CONNECT,function(X,ba){var ha=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(ha.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=+m.hoverIcons&&m.hoverIcons.update(u.view.getState(ha[ha.length-1]))},0));u.pasteCellStyles(ha)});this.addListener("styleChanged",mxUtils.bind(this,function(X,ba){X=ba.getProperty("force");(this.updateDefaultStyle||X)&&u.copyCellStyles(ba.getProperty("cells"),ba.getProperty("keys"),ba.getProperty("values"),u.currentVertexStyle,u.currentEdgeStyle,H,S);null!=this.toolbar&&(this.toolbar.setFontName(u.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(u.currentVertexStyle.fontSize||+Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(ba=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],ba.style.backgroundPosition="left center",ba.style.backgroundRepeat="no-repeat",ba.className="geAdaptiveAsset",ba.style.height="100%",ba.style.width="100%",ba.style.backgroundImage="orthogonalEdgeStyle"==u.currentEdgeStyle.edgeStyle&&"1"==u.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==u.currentEdgeStyle.edgeStyle||"none"==u.currentEdgeStyle.edgeStyle||+null==u.currentEdgeStyle.edgeStyle?"url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==u.currentEdgeStyle.edgeStyle?"url("+Format.entityImage.src+")":"elbowEdgeStyle"==u.currentEdgeStyle.edgeStyle?"vertical"==u.currentEdgeStyle.elbow?"url("+Format.verticalElbowImage.src+")":"url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==u.currentEdgeStyle.edgeStyle?"vertical"==u.currentEdgeStyle.elbow?"url("+Format.verticalIsometricImage.src+")":"url("+Format.horizontalIsometricImage.src++")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&(ba=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],ba.style.backgroundPosition="left center",ba.style.backgroundRepeat="no-repeat",ba.className="geAdaptiveAsset",ba.style.height="100%",ba.style.width="100%",ba.style.backgroundImage="link"==u.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==u.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==u.currentEdgeStyle.shape?"url("++Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=u.currentVertexStyle.fontFamily||"Helvetica",ba=String(u.currentVertexStyle.fontSize||"12"),ha=u.getView().getState(u.getSelectionCell());null!=ha&&(X=ha.style[mxConstants.STYLE_FONTFAMILY]||X,ba=ha.style[mxConstants.STYLE_FONTSIZE]||ba,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(ba)}),u.getSelectionModel().addListener(mxEvent.CHANGE,+b),u.getModel().addListener(mxEvent.CHANGE,b));u.addListener(mxEvent.CELLS_ADDED,function(X,ba){X=ba.getProperty("cells");ba=ba.getProperty("parent");null!=ba&&u.getModel().isLayer(ba)&&!u.isCellVisible(ba)&&null!=X&&0<X.length&&u.getModel().setVisible(ba,!0)});Graph.selectParentLayer&&u.selectionModel.addListener(mxEvent.CHANGE,function(){if(u.isEnabled()&&!u.isSelectionEmpty()){var X=u.getLayerForCells(u.getSelectionCells());null!=X&&u.setDefaultParent(X)}});this.gestureHandler=mxUtils.bind(this,+function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ea=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ea&&window.clearTimeout(ea);ea=window.setTimeout(mxUtils.bind(this,function(){ea=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,+"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){u.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,+function(){u.view.validateBackground()}));u.addListener("gridSizeChanged",mxUtils.bind(this,function(){u.isGridEnabled()&&u.view.validateBackground()}));this.editor.resetGraph()}this.init();u.standalone||this.open()};EditorUi.compactUi=!0;+EditorUi.parsePng=function(b,e,g){function m(H,S){var G=p;p+=S;return H.substring(G,p)}function u(H){H=m(H,4);return H.charCodeAt(3)+(H.charCodeAt(2)<<8)+(H.charCodeAt(1)<<16)+(H.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=u(b);var B=m(b,4);if(null!=e&&e(p-8,B,g))break;value=m(b,g);m(b,4);if("IEND"==B)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?212:240);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,"keydown",mxUtils.bind(this,function(m){this.onKeyDown(m)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(m){this.onKeyPress(m)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var e=b.setDefaultParent,g=this;this.editor.graph.setDefaultParent=function(){e.apply(this,arguments);g.updateActionStates()};b.showLinkDialog=mxUtils.bind(g,g.showLinkDialog);b.editLink=g.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};-EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),g=this.initSelectionState(),m=!0,v=0;v<e.length;v++){var p=b.getCurrentCellStyle(e[v]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(g,e[v],e,m),m=!1)}this.updateSelectionStateForTableCells(g);return g};+EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),g=this.initSelectionState(),m=!0,u=0;u<e.length;u++){var p=b.getCurrentCellStyle(e[u]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(g,e[u],e,m),m=!1)}this.updateSelectionStateForTableCells(g);return g};EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),v=g.getParent(m);if(null!=m&&null!=v){for(var p=m.getIndex(e[0]),A=v.getIndex(m),G=null,S=1,F=1,P=0,R=A<v.getChildCount()-1?g.getChildAt(g.getChildAt(v,A+1),p):null;P<e.length-1;){var T=e[++P];null==R||R!=T||null!=G&&S!=G||(G=S,S=0,F++,m=g.getParent(R),R=A+F<v.getChildCount()?g.getChildAt(g.getChildAt(v,A+F),p):null);var c=this.editor.graph.view.getState(T);-if(T==g.getChildAt(m,p+S)&&null!=c&&1==mxUtils.getValue(c.style,"colspan",1)&&1==mxUtils.getValue(c.style,"rowspan",1))S++;else break}P==F*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=F)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};-EditorUi.prototype.createTimeout=function(b,e,g){var m=!0,v=null,p=mxUtils.bind(this,function(G){v.clear()&&(m=!1,G=null!=G?G:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,e,g)})},null!=g?g(G):this.handleError(G))}),A=window.setTimeout(p,null!=b?b:this.timeout);v={clear:function(){window.clearTimeout(A);return m},isAlive:function(){return m}};null!=e&&this.tryAndHandle(mxUtils.bind(this,function(){e(v)}),p);return v};+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),u=g.getParent(m);if(null!=m&&null!=u){for(var p=m.getIndex(e[0]),B=u.getIndex(m),H=null,S=1,G=1,O=0,R=B<u.getChildCount()-1?g.getChildAt(g.getChildAt(u,B+1),p):null;O<e.length-1;){var c=e[++O];null==R||R!=c||null!=H&&S!=H||(H=S,S=0,G++,m=g.getParent(R),R=B+G<u.getChildCount()?g.getChildAt(g.getChildAt(u,B+G),p):null);var f=this.editor.graph.view.getState(c);+if(c==g.getChildAt(m,p+S)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))S++;else break}O==G*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=G)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};+EditorUi.prototype.createTimeout=function(b,e,g){var m=!0,u=null,p=mxUtils.bind(this,function(H){u.clear()&&(m=!1,H=null!=H?H:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,e,g)})},null!=g?g(H):this.handleError(H))}),B=window.setTimeout(p,null!=b?b:this.timeout);u={clear:function(){window.clearTimeout(B);return m},isAlive:function(){return m}};null!=e&&this.tryAndHandle(mxUtils.bind(this,function(){e(u)}),p);return u};EditorUi.prototype.tryAndHandle=function(b,e){try{b()}catch(g){null!=e?e(g):this.handleError(g)}};-EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var v=Graph.colorStyles,p=document.createElement("div");m.model.beginUpdate();try{for(var A=0;A<b.length;A++)if(m.model.isEdge(b[A])||m.model.isVertex(b[A])){var G=m.getCellStyle(b[A],!1);if(null!=G)for(var S=0;S<v.length;S++)try{var F=G[v[S]];if(mxUtils.isLightDarkColor(F)){var P=mxUtils.getLightDarkColor(F);m.setCellStyles(v[S],P.light,[b[A]])}}catch(T){}e&&m.isHtmlLabel(b[A])&&-"0"!=mxUtils.getValue(G,"html","0")&&(p.innerHTML=Graph.sanitizeHtml(m.getLabel(b[A])),Graph.addLightDarkColors(p,null,null,function(T,c,f){return mxUtils.isLightDarkColor(f)?(f=mxUtils.getLightDarkColor(f),T.style.setProperty(c,f.light),!0):!1})&&m.cellLabelChanged(b[A],p.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){P=mxUtils.getLightDarkColor(m.background);var R=new ChangePageSetup(this,P.light);R.ignoreImage=!0;m.model.execute(R)}}finally{m.model.endUpdate()}return b};+EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var u=Graph.colorStyles,p=document.createElement("div");m.model.beginUpdate();try{for(var B=0;B<b.length;B++)if(m.model.isEdge(b[B])||m.model.isVertex(b[B])){var H=m.getCellStyle(b[B],!1);if(null!=H)for(var S=0;S<u.length;S++)try{var G=H[u[S]];if(mxUtils.isLightDarkColor(G)){var O=mxUtils.getLightDarkColor(G);m.setCellStyles(u[S],O.light,[b[B]])}}catch(c){}e&&m.isHtmlLabel(b[B])&&+"0"!=mxUtils.getValue(H,"html","0")&&(p.innerHTML=Graph.sanitizeHtml(m.getLabel(b[B])),Graph.addLightDarkColors(p,null,null,function(c,f,l){return mxUtils.isLightDarkColor(l)?(l=mxUtils.getLightDarkColor(l),c.style.setProperty(f,l.light),!0):!1})&&m.cellLabelChanged(b[B],p.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){O=mxUtils.getLightDarkColor(m.background);var R=new ChangePageSetup(this,O.light);R.ignoreImage=!0;m.model.execute(R)}}finally{m.model.endUpdate()}return b};EditorUi.prototype.updateSelectionStateForCell=function(b,e,g,m){g=this.editor.graph;b.cells.push(e);if(g.getModel().isVertex(e)){b.connections=0<g.model.getEdgeCount(e);b.unlocked=b.unlocked&&!g.isCellLocked(e);b.resizable=b.resizable&&g.isCellResizable(e);b.rotatable=b.rotatable&&g.isCellRotatable(e);b.movable=b.movable&&g.isCellMovable(e)&&!g.isTableRow(e)&&!g.isTableCell(e);b.swimlane=b.swimlane||g.isSwimlane(e);b.table=b.table||g.isTable(e);b.cell=b.cell||g.isTableCell(e);b.row=b.row||g.isTableRow(e);-b.vertices.push(e);var v=g.getCellGeometry(e);if(null!=v&&(0<v.width?null==b.width?b.width=v.width:b.width!=v.width&&(b.width=""):b.containsLabel=!0,0<v.height?null==b.height?b.height=v.height:b.height!=v.height&&(b.height=""):b.containsLabel=!0,!v.relative||null!=v.offset)){var p=v.relative?v.offset.x:v.x;v=v.relative?v.offset.y:v.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=v:b.y!=v&&(b.y="")}}else g.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=+b.vertices.push(e);var u=g.getCellGeometry(e);if(null!=u&&(0<u.width?null==b.width?b.width=u.width:b.width!=u.width&&(b.width=""):b.containsLabel=!0,0<u.height?null==b.height?b.height=u.height:b.height!=u.height&&(b.height=""):b.containsLabel=!0,!u.relative||null!=u.offset)){var p=u.relative?u.offset.x:u.x;u=u.relative?u.offset.y:u.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=u:b.y!=u&&(b.y="")}}else g.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=!1);p=g.view.getState(e);null!=p&&(b.html=b.html&&g.isHtmlLabel(e),b.autoSize=b.autoSize||g.isAutoSizeState(p),b.glass=b.glass&&g.isGlassState(p),b.rounded=b.rounded&&g.isRoundedState(p),b.lineJumps=b.lineJumps&&g.isLineJumpState(p),b.image=b.image||g.isImageState(p),b.shadow=b.shadow&&g.isShadowState(p),b.fill=b.fill&&g.isFillState(p),b.gradient=b.fill&&g.isGradientState(p),b.stroke=b.stroke&&g.isStrokeState(p),e=mxUtils.getValue(p.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==e,g.mergeStyle(p.style,b.style,m))};-EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,F){"mouseDown"==F.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;-b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var v=b.dblClick;b.dblClick=function(S,F){if(this.isEnabled())if(null!=F||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))v.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",-g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var A=this.hoverIcons.execute;this.hoverIcons.execute=function(S,F,P){var R=P.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?A.apply(this,arguments):this.graph.connectVertex(S.cell,F,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(T,c,f){var k=b.getCompositeParent(S.cell);T=b.getCellGeometry(k);for(P.consume();null!=k&&b.model.isVertex(k)&&null!=T&&T.relative;)cell=-k,k=b.model.getParent(cell),T=b.getCellGeometry(k);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.getGraphX(),P.getGraphY(),k,mxUtils.bind(this,function(B){f(B);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(B))}),F)}),30)}),mxUtils.bind(this,function(T){this.graph.selectCellsForConnectVertex(T,R,this)}))};var G=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,F){null!=G&&window.clearTimeout(G);G=window.setTimeout(mxUtils.bind(this,function(){var P=-F.getProperty("arrow"),R=F.getProperty("direction"),T=F.getProperty("event");P=P.getBoundingClientRect();var c=mxUtils.getOffset(b.container),f=b.container.scrollLeft+P.x-c.x;c=b.container.scrollTop+P.y-c.y;var k=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),B=e.showShapePicker(f,c,k,mxUtils.bind(this,function(z){null!=z&&b.connectVertex(k,R,b.defaultEdgeLength,T,!0,!1,function(C,I,L){L(z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(z))},-function(C){b.selectCellsForConnectVertex(C)},T,this.hoverIcons)}),R,!0);null!=B&&(this.centerShapePicker(B,P,f,c,R),mxUtils.setOpacity(B,30),mxEvent.addListener(B,"mouseenter",function(){mxUtils.setOpacity(B,100)}),mxEvent.addListener(B,"mouseleave",function(){e.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,F){null!=G&&window.clearTimeout(G)}))}};-EditorUi.prototype.centerShapePicker=function(b,e,g,m,v){if(v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();v==mxConstants.DIRECTION_NORTH?(g-=p.width/2-10,m-=p.height+6):v==mxConstants.DIRECTION_SOUTH?(g-=p.width/2-10,m+=e.height+6):v==mxConstants.DIRECTION_WEST?(g-=p.width+6,m-=p.height/2-10):v==mxConstants.DIRECTION_EAST&&(g+=e.width+6,m-=p.height/2-10);b.style.left=g+"px";b.style.top=m+"px"};-EditorUi.prototype.showShapePicker=function(b,e,g,m,v,p,A,G,S){var F=null;this.editor.graph.freehand.isDrawing()||(G=G||null==g,F=this.createShapePicker(b,e,g,m,v,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,p,G),p,A,G,S),null!=F&&(null==this.hoverIcons||p||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=F));return F};-EditorUi.prototype.createShapePicker=function(b,e,g,m,v,p,A,G,S,F,P){P=null!=P?P:!0;var R=this.editor.graph,T=null;S=null!=S?S:function(k){k=k[0];var B=0,z=0,C=k.geometry;null!=C&&(R.model.isEdge(k)&&(k=C.getTerminalPoint(!1),C=new mxRectangle(0,0,k.x,k.y)),B=C.width/2,z=C.height/2);return new mxPoint(R.snap(Math.round(b/R.view.scale)-R.view.translate.x-B),R.snap(Math.round(e/R.view.scale)-R.view.translate.y-z))};if(null!=A&&0<A.length){var c=this;R=this.editor.graph;T=document.createElement("div");-v=R.view.getState(g);var f=null==g||null!=v&&R.isTransparentState(v)?null:R.copyStyle(g);v=6>A.length?35*A.length:140;T.className="geToolbarContainer geSidebarContainer geShapePicker";T.setAttribute("title",mxResources.get("sidebarTooltip"));T.style.left=Math.round(b)+"px";T.style.top=Math.round(e)+"px";T.style.width=v+"px";mxClient.IS_POINTER&&(T.style.touchAction="none");G||mxUtils.setPrefixedStyle(T.style,"transform","translate(-22px,-22px)");R.container.appendChild(T);v=mxUtils.bind(this,function(k){var B=-document.createElement("a");B.className="geToolbarButton";B.style.display="inline-block";B.style.position="relative";B.style.overflow="hidden";B.style.cursor="pointer";B.style.width="30px";B.style.height="30px";B.style.padding="1px";T.appendChild(B);null!=f&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(f,[k]):this.sidebar.graph.pasteCellStyles([k],R.currentVertexStyle,R.currentEdgeStyle);var z=k.geometry;R.model.isEdge(k)&&(z=z.getTerminalPoint(!1),z=new mxRectangle(0,0,z.x,z.y));null!=z&&-B.appendChild(this.sidebar.createVertexTemplateFromCells([k],z.width,z.height,"",!0,!1,null,!1,mxUtils.bind(this,function(C){if(!mxEvent.isShiftDown(C)||null==g&&R.isSelectionEmpty()){var I=R.cloneCell(k);if(null!=m)m(I);else{var L=S([I]);R.model.isEdge(I)?I.geometry.translate(L.x,L.y):(I.geometry.x=L.x,I.geometry.y=L.y);R.model.beginUpdate();try{R.addCell(I),R.model.isVertex(I)&&R.isAutoSizeCell(I)&&R.updateCellSize(I)}finally{R.model.endUpdate()}R.setSelectionCell(I);R.scrollCellToVisible(I);P&&-R.startEditing(I);null!=c.hoverIcons&&c.hoverIcons.update(R.view.getState(I))}}else I=R.getEditableCells(null!=g?[g]:R.getSelectionCells()),R.updateShapes(k,I);null!=p&&p(C);mxEvent.consume(C)}),25,25,null,null,g))});for(F=0;F<(G?Math.min(A.length,4):A.length);F++)v(A[F]);A=T.offsetTop+T.clientHeight-(R.container.scrollTop+R.container.offsetHeight);0<A&&(T.style.top=Math.max(R.container.scrollTop+22,e-A)+"px");A=T.offsetLeft+T.clientWidth-(R.container.scrollLeft+R.container.offsetWidth);0<A&&(T.style.left=-Math.max(R.container.scrollLeft+22,b-A)+"px")}return T};-EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,v=mxUtils.bind(this,function(p,A,G,S){return m.createVertex(null,null,S||"",0,0,A||120,G||60,p,!1)});e=mxUtils.bind(this,function(p,A,G){p=new mxCell(G||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),p);p.geometry.setTerminalPoint(new mxPoint(0,0),!0);p.geometry.setTerminalPoint(new mxPoint(p.geometry.width,null!=A?A:0),!1);p.geometry.points=null!=A?[new mxPoint(p.geometry.width/2,A)]:[];p.geometry.relative=!0;p.edge=-!0;return p});if(null!=b)try{b=m.cloneCell(b),m.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(p){b=null}null==b&&(b=v(m.appendFontSize("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",m.vertexFontSize),40,20,"Text"),m.model.isVertex(b)&&m.isAutoSizeCell(b)&&Graph.createOffscreenGraph(m.getStylesheet()).updateCellSize(b));b=[b,v("whiteSpace=wrap;html=1;"),v("ellipse;whiteSpace=wrap;html=1;",80,80),v("rhombus;whiteSpace=wrap;html=1;",-80,80),v("rounded=1;whiteSpace=wrap;html=1;"),v("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),v("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),v("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),v("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),v("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),v("triangle;whiteSpace=wrap;html=1;",-60,80),v("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),v("shape=tape;whiteSpace=wrap;html=1;",120,100),v("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),v("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),v("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];g&&(b=b.concat([e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,G){"mouseDown"==G.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;+b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var u=b.dblClick;b.dblClick=function(S,G){if(this.isEnabled())if(null!=G||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))u.apply(this,arguments);else{var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(O.x,O.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",+g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var B=this.hoverIcons.execute;this.hoverIcons.execute=function(S,G,O){var R=O.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?B.apply(this,arguments):this.graph.connectVertex(S.cell,G,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(c,f,l){var t=b.getCompositeParent(S.cell);c=b.getCellGeometry(t);for(O.consume();null!=t&&b.model.isVertex(t)&&null!=c&&c.relative;)cell=+t,t=b.model.getParent(cell),c=b.getCellGeometry(t);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(O.getGraphX(),O.getGraphY(),t,mxUtils.bind(this,function(z){l(z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(z))}),G)}),30)}),mxUtils.bind(this,function(c){this.graph.selectCellsForConnectVertex(c,R,this)}))};var H=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H);H=window.setTimeout(mxUtils.bind(this,function(){var O=+G.getProperty("arrow"),R=G.getProperty("direction"),c=G.getProperty("event");O=O.getBoundingClientRect();var f=mxUtils.getOffset(b.container),l=b.container.scrollLeft+O.x-f.x;f=b.container.scrollTop+O.y-f.y;var t=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),z=e.showShapePicker(l,f,t,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(t,R,b.defaultEdgeLength,c,!0,!1,function(F,N,K){K(C);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(C))},+function(F){b.selectCellsForConnectVertex(F)},c,this.hoverIcons)}),R,!0);null!=z&&(this.centerShapePicker(z,O,l,f,R),mxUtils.setOpacity(z,30),mxEvent.addListener(z,"mouseenter",function(){mxUtils.setOpacity(z,100)}),mxEvent.addListener(z,"mouseleave",function(){e.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H)}))}};+EditorUi.prototype.centerShapePicker=function(b,e,g,m,u){if(u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();u==mxConstants.DIRECTION_NORTH?(g-=p.width/2-10,m-=p.height+6):u==mxConstants.DIRECTION_SOUTH?(g-=p.width/2-10,m+=e.height+6):u==mxConstants.DIRECTION_WEST?(g-=p.width+6,m-=p.height/2-10):u==mxConstants.DIRECTION_EAST&&(g+=e.width+6,m-=p.height/2-10);b.style.left=g+"px";b.style.top=m+"px"};+EditorUi.prototype.showShapePicker=function(b,e,g,m,u,p,B,H,S){var G=null;this.editor.graph.freehand.isDrawing()||(H=H||null==g,G=this.createShapePicker(b,e,g,m,u,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,p,H),p,B,H,S),null!=G&&(null==this.hoverIcons||p||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=G));return G};+EditorUi.prototype.createShapePicker=function(b,e,g,m,u,p,B,H,S,G,O){O=null!=O?O:!0;var R=this.editor.graph,c=null;S=null!=S?S:function(t){t=t[0];var z=0,C=0,F=t.geometry;null!=F&&(R.model.isEdge(t)&&(t=F.getTerminalPoint(!1),F=new mxRectangle(0,0,t.x,t.y)),z=F.width/2,C=F.height/2);return new mxPoint(R.snap(Math.round(b/R.view.scale)-R.view.translate.x-z),R.snap(Math.round(e/R.view.scale)-R.view.translate.y-C))};if(null!=B&&0<B.length){var f=this;R=this.editor.graph;c=document.createElement("div");+u=R.view.getState(g);var l=null==g||null!=u&&R.isTransparentState(u)?null:R.copyStyle(g);u=6>B.length?35*B.length:140;c.className="geToolbarContainer geSidebarContainer geShapePicker";c.setAttribute("title",mxResources.get("sidebarTooltip"));c.style.left=Math.round(b)+"px";c.style.top=Math.round(e)+"px";c.style.width=u+"px";mxClient.IS_POINTER&&(c.style.touchAction="none");H||mxUtils.setPrefixedStyle(c.style,"transform","translate(-22px,-22px)");R.container.appendChild(c);u=mxUtils.bind(this,function(t){var z=+document.createElement("a");z.className="geToolbarButton";z.style.display="inline-block";z.style.position="relative";z.style.overflow="hidden";z.style.cursor="pointer";z.style.width="30px";z.style.height="30px";z.style.padding="1px";c.appendChild(z);null!=l&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(l,[t]):this.sidebar.graph.pasteCellStyles([t],R.currentVertexStyle,R.currentEdgeStyle);var C=t.geometry;R.model.isEdge(t)&&(C=C.getTerminalPoint(!1),C=new mxRectangle(0,0,C.x,C.y));null!=C&&+z.appendChild(this.sidebar.createVertexTemplateFromCells([t],C.width,C.height,"",!0,!1,null,!1,mxUtils.bind(this,function(F){if(!mxEvent.isShiftDown(F)||null==g&&R.isSelectionEmpty()){var N=R.cloneCell(t);if(null!=m)m(N);else{var K=S([N]);R.model.isEdge(N)?N.geometry.translate(K.x,K.y):(N.geometry.x=K.x,N.geometry.y=K.y);R.model.beginUpdate();try{R.addCell(N),R.model.isVertex(N)&&R.isAutoSizeCell(N)&&R.updateCellSize(N)}finally{R.model.endUpdate()}R.setSelectionCell(N);R.scrollCellToVisible(N);O&&+R.startEditing(N);null!=f.hoverIcons&&f.hoverIcons.update(R.view.getState(N))}}else N=R.getEditableCells(null!=g?[g]:R.getSelectionCells()),R.updateShapes(t,N);null!=p&&p(F);mxEvent.consume(F)}),25,25,null,null,g))});for(G=0;G<(H?Math.min(B.length,4):B.length);G++)u(B[G]);B=c.offsetTop+c.clientHeight-(R.container.scrollTop+R.container.offsetHeight);0<B&&(c.style.top=Math.max(R.container.scrollTop+22,e-B)+"px");B=c.offsetLeft+c.clientWidth-(R.container.scrollLeft+R.container.offsetWidth);0<B&&(c.style.left=+Math.max(R.container.scrollLeft+22,b-B)+"px")}return c};+EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,u=mxUtils.bind(this,function(p,B,H,S){return m.createVertex(null,null,S||"",0,0,B||120,H||60,p,!1)});e=mxUtils.bind(this,function(p,B,H){p=new mxCell(H||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),p);p.geometry.setTerminalPoint(new mxPoint(0,0),!0);p.geometry.setTerminalPoint(new mxPoint(p.geometry.width,null!=B?B:0),!1);p.geometry.points=null!=B?[new mxPoint(p.geometry.width/2,B)]:[];p.geometry.relative=!0;p.edge=+!0;return p});if(null!=b)try{b=m.cloneCell(b),m.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(p){b=null}null==b&&(b=u(m.appendFontSize("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",m.vertexFontSize),40,20,"Text"),m.model.isVertex(b)&&m.isAutoSizeCell(b)&&Graph.createOffscreenGraph(m.getStylesheet()).updateCellSize(b));b=[b,u("whiteSpace=wrap;html=1;"),u("ellipse;whiteSpace=wrap;html=1;",80,80),u("rhombus;whiteSpace=wrap;html=1;",+80,80),u("rounded=1;whiteSpace=wrap;html=1;"),u("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),u("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),u("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),u("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),u("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),u("triangle;whiteSpace=wrap;html=1;",+60,80),u("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),u("shape=tape;whiteSpace=wrap;html=1;",120,100),u("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),u("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),u("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];g&&(b=b.concat([e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;"),e("edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;",this.editor.graph.defaultEdgeLength/2)]));return b};EditorUi.prototype.isShapePickerVisible=function(b){return null!=this.shapePicker};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};EditorUi.prototype.isSpaceDown=function(){return this.spaceDown};EditorUi.prototype.isShiftDown=function(){return this.shiftDown};-EditorUi.prototype.onKeyDown=function(b){var e=this.editor.graph;if(9==b.which&&e.isEnabled()&&!mxEvent.isControlDown(b)){if(e.isEditing())if(mxEvent.isAltDown(b))e.stopEditing(!1);else try{var g=e.cellEditor.isContentEditing()&&e.cellEditor.isTextSelected();if(window.getSelection&&e.cellEditor.isContentEditing()&&!g&&!mxClient.IS_IE&&!mxClient.IS_IE11){var m=window.getSelection(),v=0<m.rangeCount?m.getRangeAt(0).commonAncestorContainer:null;g=null!=v&&("LI"==v.nodeName||null!=v.parentNode&&"LI"==-v.parentNode.nodeName)}g?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?e.stopEditing(!1):e.cellEditor.insertTab(e.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?e.selectParentCell():e.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};+EditorUi.prototype.onKeyDown=function(b){var e=this.editor.graph;if(9==b.which&&e.isEnabled()&&!mxEvent.isControlDown(b)){if(e.isEditing())if(mxEvent.isAltDown(b))e.stopEditing(!1);else try{var g=e.cellEditor.isContentEditing()&&e.cellEditor.isTextSelected();if(window.getSelection&&e.cellEditor.isContentEditing()&&!g&&!mxClient.IS_IE&&!mxClient.IS_IE11){var m=window.getSelection(),u=0<m.rangeCount?m.getRangeAt(0).commonAncestorContainer:null;g=null!=u&&("LI"==u.nodeName||null!=u.parentNode&&"LI"==+u.parentNode.nodeName)}g?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?e.stopEditing(!1):e.cellEditor.insertTab(e.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?e.selectParentCell():e.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};EditorUi.prototype.onKeyPress=function(b){var e=this.editor.graph;!this.isImmediateEditingEvent(b)||e.isEditing()||e.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(e.escape(),e.startEditing(null,String.fromCharCode(b.which)))};EditorUi.prototype.isImmediateEditingEvent=function(b){return!0};-EditorUi.prototype.updateCssForMarker=function(b,e,g,m,v){b.style.display="inline-flex";b.style.alignItems="center";b.style.justifyContent="center";b.innerText="";g=this.getImageForMarker(m,v,g);null==g?(b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.fontSize="11px",b.style.filter="none"):(m=document.createElement("img"),m.className="geAdaptiveAsset",m.setAttribute("src",g),b.className="","end"==e&&mxUtils.setPrefixedStyle(m.style,"transform","scaleX(-1)"),+EditorUi.prototype.updateCssForMarker=function(b,e,g,m,u){b.style.display="inline-flex";b.style.alignItems="center";b.style.justifyContent="center";b.innerText="";g=this.getImageForMarker(m,u,g);null==g?(b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.fontSize="11px",b.style.filter="none"):(m=document.createElement("img"),m.className="geAdaptiveAsset",m.setAttribute("src",g),b.className="","end"==e&&mxUtils.setPrefixedStyle(m.style,"transform","scaleX(-1)"),b.appendChild(m))};EditorUi.prototype.getImageForMarker=function(b,e,g){return"flexArrow"==g?null!=b&&b!=mxConstants.NONE?Format.blockMarkerImage.src:null:b==mxConstants.ARROW_CLASSIC?"1"!=e?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?"1"!=e?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?"1"!=e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK_THIN?"1"!=e?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?"1"!=e?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?"1"!=e?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?"1"!=e?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?"1"!=e?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==b?Format.boxMarkerImage.src:"halfCircle"==b?Format.halfCircleMarkerImage.src:"openAsync"==b?Format.openAsyncFilledMarkerImage.src:"async"==b?"1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?Format.dashMarkerImage.src:"baseDash"==b?Format.baseDashMarkerImage.src:"cross"==b?Format.crossMarkerImage.src:"circle"==b?Format.circleMarkerImage.src:"circlePlus"==b?Format.circlePlusMarkerImage.src:"ERone"==b?Format.EROneMarkerImage.src:"ERmandOne"==b?Format.ERmandOneMarkerImage.src:"ERmany"==b?Format.ERmanyMarkerImage.src:"ERoneToMany"==b?Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b?Format.ERzeroToManyMarkerImage.src:null};EditorUi.prototype.createMenus=function(){return null};EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),g=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));g.setEnabled(e.isEnabled())};-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var A=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{A=A||p.getSelectionCells();A=p.getExportableCells(p.model.getTopmostCells(A));for(var G={},S=p.createCellLookup(A),F=p.cloneCells(A,null,G),P=new mxGraphModel,R=P.getChildAt(P.getRoot(),-0),T=0;T<F.length;T++){P.add(R,F[T]);var c=p.view.getState(A[T]);if(null!=c){var f=p.getCellGeometry(F[T]);null!=f&&f.relative&&!P.isEdge(A[T])&&null==S[mxObjectIdentity.get(P.getParent(A[T]))]&&(f.offset=null,f.relative=!1,f.x=c.x/c.view.scale-c.view.translate.x,f.y=c.y/c.view.scale-c.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(G,S),F);mxClipboard.insertCount=1;mxClipboard.setCells(F)}b.updatePasteActionStates();return A};var g=mxClipboard.paste;mxClipboard.paste=function(p){var A=-null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):A=g.apply(this,arguments);b.updatePasteActionStates();return A};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var v=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,A){v.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var B=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{B=B||p.getSelectionCells();B=p.getExportableCells(p.model.getTopmostCells(B));for(var H={},S=p.createCellLookup(B),G=p.cloneCells(B,null,H),O=new mxGraphModel,R=O.getChildAt(O.getRoot(),+0),c=0;c<G.length;c++){O.add(R,G[c]);var f=p.view.getState(B[c]);if(null!=f){var l=p.getCellGeometry(G[c]);null!=l&&l.relative&&!O.isEdge(B[c])&&null==S[mxObjectIdentity.get(O.getParent(B[c]))]&&(l.offset=null,l.relative=!1,l.x=f.x/f.view.scale-f.view.translate.x,l.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(H,S),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return B};var g=mxClipboard.paste;mxClipboard.paste=function(p){var B=+null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):B=g.apply(this,arguments);b.updatePasteActionStates();return B};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var u=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,B){u.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var J=this.graph.getPageLayout(),W=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+J.x*W.width),this.scale*(this.translate.y+J.y*W.height),this.scale*J.width*W.width,-this.scale*J.height*W.height)};b.getPreferredPageSize=function(J,W,aa){J=this.getPageLayout();W=this.getPageSize();return new mxRectangle(0,0,J.width*W.width,J.height*W.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(J,W,aa,ba){if(null!=b.container&&!b.isViewer()){aa=null!=aa?aa:0;ba=null!=ba?ba:0;var ja=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),oa=mxUtils.hasScrollbars(b.container),qa=b.view.translate,ra=b.view.scale,-ua=mxRectangle.fromRectangle(ja);ua.x=ua.x/ra-qa.x;ua.y=ua.y/ra-qa.y;ua.width/=ra;ua.height/=ra;qa=b.container.scrollTop;var za=b.container.scrollLeft,Ba=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ba+=3;var Ca=b.container.offsetWidth-Ba;Ba=b.container.offsetHeight-Ba;J=J?Math.max(.3,Math.min(W||1,Ca/ua.width)):ra;W=(Ca-J*ua.width)/2/J;var La=0==this.lightboxVerticalDivider?0:(Ba-J*ua.height)/this.lightboxVerticalDivider/J;oa&&(W=Math.max(W,0),La=Math.max(La,-0));if(oa||ja.width<Ca||ja.height<Ba)b.view.scaleAndTranslate(J,Math.floor(W-ua.x),Math.floor(La-ua.y)),b.container.scrollTop=qa*J/ra,b.container.scrollLeft=za*J/ra;else if(0!=aa||0!=ba)ja=b.view.translate,b.view.setTranslate(Math.floor(ja.x+aa/ra),Math.floor(ja.y+ba/ra))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,-"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(J){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(J){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var v=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),T=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*T.width),this.scale*(this.translate.y+P.y*T.height),this.scale*P.width*T.width,+this.scale*P.height*T.height)};b.getPreferredPageSize=function(P,T,W){P=this.getPageLayout();T=this.getPageSize();return new mxRectangle(0,0,P.width*T.width,P.height*T.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,T,W,aa){if(null!=b.container&&!b.isViewer()){W=null!=W?W:0;aa=null!=aa?aa:0;var ja=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),pa=mxUtils.hasScrollbars(b.container),sa=b.view.translate,qa=b.view.scale,+wa=mxRectangle.fromRectangle(ja);wa.x=wa.x/qa-sa.x;wa.y=wa.y/qa-sa.y;wa.width/=qa;wa.height/=qa;sa=b.container.scrollTop;var Ba=b.container.scrollLeft,za=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)za+=3;var Ea=b.container.offsetWidth-za;za=b.container.offsetHeight-za;P=P?Math.max(.3,Math.min(T||1,Ea/wa.width)):qa;T=(Ea-P*wa.width)/2/P;var ra=0==this.lightboxVerticalDivider?0:(za-P*wa.height)/this.lightboxVerticalDivider/P;pa&&(T=Math.max(T,0),ra=Math.max(ra,+0));if(pa||ja.width<Ea||ja.height<za)b.view.scaleAndTranslate(P,Math.floor(T-wa.x),Math.floor(ra-wa.y)),b.container.scrollTop=sa*P/qa,b.container.scrollLeft=Ba*P/qa;else if(0!=W||0!=aa)ja=b.view.translate,b.view.setTranslate(Math.floor(ja.x+W/qa),Math.floor(ja.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,+"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var u=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var J=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=J?parseInt(J["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var A=0;p=mxUtils.bind(this,function(J,W,aa){A++;-var ba=document.createElement("span");ba.style.paddingLeft="8px";ba.style.paddingRight="8px";ba.style.cursor="pointer";mxEvent.addListener(ba,"click",J);null!=aa&&ba.setAttribute("title",aa);J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("src",W);J.style.width="36px";J.style.filter="invert(100%)";ba.appendChild(J);this.chromelessToolbar.appendChild(ba);return ba});if(null!=v.backBtn){var G=Graph.sanitizeLink(v.backBtn.url);null!=G&&p(mxUtils.bind(this,function(J){window.location.href=-G;mxEvent.consume(J)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(J){this.actions.get("previousPage").funct();mxEvent.consume(J)}),Editor.previousImage,mxResources.get("previousPage")),F=document.createElement("div");F.style.fontFamily=Editor.defaultHtmlFont;F.style.display="inline-block";F.style.verticalAlign="top";F.style.fontWeight="bold";F.style.marginTop="8px";F.style.fontSize="14px";F.style.cursor="default";F.style.color=-mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(F);var P=p(mxUtils.bind(this,function(J){this.actions.get("nextPage").funct();mxEvent.consume(J)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){F.innerText="";var J=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(F,J+1+" / "+this.pages.length);F.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());-S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(J-1,this.pages.length)].getName());P.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(J+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";P.style.paddingLeft="4px";P.style.paddingRight="0px";var T=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(P.style.display="",S.style.display="",F.style.display="inline-block"):-(P.style.display="none",S.style.display="none",F.style.display="none");R()});if(null!=this.menus){var c=this.menus.get("pages");null!=c&&mxEvent.addListener(F,"click",mxUtils.bind(this,function(J){var W=new mxPopupMenu(c.funct);W.div.className+=" geMenubarMenu";W.smartSeparators=!0;W.showDisabled=!0;W.autoExpand=!0;W.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(W,arguments);W.destroy()});var aa=mxUtils.getOffset(F);W.popup(aa.x,aa.y+F.offsetHeight,null,J);mxEvent.addListener(W.div,-"mouseleave",mxUtils.bind(this,function(){W.hideMenu()}))}))}this.editor.addListener("resetGraphView",T);this.editor.addListener("pageSelected",R)}p(mxUtils.bind(this,function(J){this.actions.get("zoomOut").funct();mxEvent.consume(J)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(J){this.actions.get("zoomIn").funct();mxEvent.consume(J)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(J){b.isLightboxView()?-(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(J)}),Editor.zoomFitImage,mxResources.get("fit"));var f=null,k=null,B=mxUtils.bind(this,function(J){null!=f&&(window.clearTimeout(f),f=null);null!=k&&(window.clearTimeout(k),k=null);f=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;k=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";k=null}),-600)}),J||200)}),z=mxUtils.bind(this,function(J){null!=f&&(window.clearTimeout(f),f=null);null!=k&&(window.clearTimeout(k),k=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,J||30)});if("1"==urlParams.layers){this.layersDialog=null;var C=p(mxUtils.bind(this,function(J){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var W=C.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=-W.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));W=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=-W.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(J)}),Editor.layersImage,mxResources.get("layers")),I=b.getModel();I.addListener(mxEvent.CHANGE,function(){C.style.display=1<I.getChildCount(I.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(J){null!=this.editor.editButtonFunc?-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(J)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(T=0;T<this.lightboxToolbarActions.length;T++){var L=this.lightboxToolbarActions[T];L.elem=p(L.fn,L.icon,L.tooltip)}if(null!=v.refreshBtn){var K=null==v.refreshBtn.url?null:Graph.sanitizeLink(v.refreshBtn.url);p(mxUtils.bind(this,function(J){null!=-K?window.location.href=K:window.location.reload();mxEvent.consume(J)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=v.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(J){v.fullscreenBtn.url?b.openLink(v.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(J)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!v.noCloseBtn&&(v.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=-document.body))&&p(mxUtils.bind(this,function(J){"1"==urlParams.close||v.closeBtn?window.close():(this.destroy(),mxEvent.consume(J))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(J){mxEvent.isTouchEvent(J)||-(mxEvent.isShiftDown(J)||z(30),B())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(J){mxEvent.consume(J)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(J){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(J)?B():z(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(J){mxEvent.isShiftDown(J)?B():z(100);mxEvent.consume(J)}));mxEvent.addListener(this.chromelessToolbar,-"mouseleave",mxUtils.bind(this,function(J){mxEvent.isTouchEvent(J)||z(30)}));var O=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(J,W){this.startX=W.getGraphX();this.startY=W.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(J,W){},mouseUp:function(J,W){mxEvent.isTouchEvent(W.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<O&&Math.abs(this.scrollTop-b.container.scrollTop)<O&&-Math.abs(this.startX-W.getGraphX())<O&&Math.abs(this.startY-W.getGraphY())<O&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?B():z(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var da=b.view.validate,ea=new mxPoint,ca=!1,V=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&V!=g.currentPage){V=g.currentPage;ca=!0;var J=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,!0);null==-J&&(J=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));J=b.getPageLayout(J,ea,1);var W=b.getDefaultTranslate(J);this.x0=J.x;this.y0=J.y;if(W.x!=this.translate.x||W.y!=this.translate.y)this.invalidate(),this.translate.x=W.x,this.translate.y=W.y}W=b.getPagePadding();var aa=b.getPageSize();J=W.x-(this.x0||0)*aa.width;W=W.y-(this.y0||0)*aa.height;if(this.translate.x!=J||this.translate.y!=W)this.invalidate(),this.translate.x=J,this.translate.y=W}da.apply(this,arguments)};-if(!b.isViewer()){var ma=b.sizeDidChange;b.sizeDidChange=function(){var J=ca;ca=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var W=this.getPageLayout(),aa=this.getDefaultTranslate(W),ba=this.view.translate.x,ja=this.view.translate.y;if(aa.x!=ba||aa.y!=ja){this.view.x0=W.x;this.view.y0=W.y;this.autoTranslate=!0;this.view.setTranslate(aa.x,aa.y);this.autoTranslate=!1;J||(this.container.scrollLeft+=Math.round((aa.x-ba)*this.view.scale),-this.container.scrollTop+=Math.round((aa.y-ja)*this.view.scale));return}}ma.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var la=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var fa=null,Z=null,l=null,u=null,H=null,U=function(J){null!=fa&&window.clearTimeout(fa);0<=J&&window.setTimeout(function(){if(!b.isMouseDown||u)fa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&-null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),Y.style.transformOrigin="",la.style.transformOrigin="",mxClient.IS_SF?(Y.style.transform="scale(1)",la.style.transform="scale(1)",window.setTimeout(function(){Y.style.transform="";la.style.transform=""},0)):(Y.style.transform="",la.style.transform=""),b.view.getDecoratorPane().style.opacity=-"",b.view.getOverlayPane().style.opacity="");var W=new mxPoint(b.container.scrollLeft,b.container.scrollTop),aa=mxUtils.getOffset(b.container),ba=b.view.scale,ja=0,oa=0;null!=Z&&(ja=b.container.offsetWidth/2-Z.x+aa.x,oa=b.container.offsetHeight/2-Z.y+aa.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=ba&&(null!=l&&(ja+=W.x-l.x,oa+=W.y-l.y),null!=e&&g.chromelessResize(!1,null,ja*(b.cumulativeZoomFactor-1),oa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||-0==ja&&0==oa||(b.container.scrollLeft-=ja*(b.cumulativeZoomFactor-1),b.container.scrollTop-=oa*(b.cumulativeZoomFactor-1)));null!=H&&Y.setAttribute("filter",H);b.cumulativeZoomFactor=1;H=u=Z=l=fa=null}),null!=J?J:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(J,W,aa,ba){ba=null!=ba?ba:this.zoomFactor;(W=W||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));J?.15>=this.view.scale*this.cumulativeZoomFactor?-this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*-this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==H&&""!=Y.getAttribute("filter")&&(H=Y.getAttribute("filter"),Y.removeAttribute("filter"));l=new mxPoint(b.container.scrollLeft,b.container.scrollTop);J=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);ba=W||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var ja=W||null==Z?b.container.scrollTop+b.container.clientHeight/-2:Z.y+b.container.scrollTop-b.container.offsetTop;Y.style.transformOrigin=ba+"px "+ja+"px";Y.style.transform="scale("+J+")";la.style.transformOrigin=ba+"px "+ja+"px";la.style.transform="scale("+J+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(ba=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ba.style,"transform-origin",(W||null==Z?b.container.clientWidth/2+b.container.scrollLeft-ba.offsetLeft+"px":Z.x+b.container.scrollLeft-ba.offsetLeft-b.container.offsetLeft+-"px")+" "+(W||null==Z?b.container.clientHeight/2+b.container.scrollTop-ba.offsetTop+"px":Z.y+b.container.scrollTop-ba.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ba.style,"transform","scale("+J+")")):b.view.validateBackgroundStyles(J,ba,ja);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",J))}U(b.isFastZoomEnabled()?aa:0)};mxEvent.addGestureListeners(b.container,-function(J){null!=fa&&window.clearTimeout(fa)},null,function(J){1!=b.cumulativeZoomFactor&&U(0)});mxEvent.addListener(b.container,"scroll",function(J){null==fa||b.isMouseDown||1==b.cumulativeZoomFactor||U(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(J,W,aa,ba,ja){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!aa&&b.isScrollWheelEvent(J))aa=b.view.getTranslate(),ba=40/b.view.scale,mxEvent.isShiftDown(J)?b.view.setTranslate(aa.x+-(W?-ba:ba),aa.y):b.view.setTranslate(aa.x,aa.y+(W?ba:-ba));else if(aa||b.isZoomWheelEvent(J))for(var oa=mxEvent.getSource(J);null!=oa;){if(oa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=ba&&null!=ja?new mxPoint(ba,ja):new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),u=aa,aa=b.zoomFactor,ba=null,J.ctrlKey&&null!=J.deltaY&&40>Math.abs(J.deltaY)&&Math.round(J.deltaY)!=J.deltaY?aa=1+Math.abs(J.deltaY)/20*(aa-1):null!=J.movementY&&"pointermove"==J.type&&(aa=1+Math.max(1,Math.abs(J.movementY))/-20*(aa-1),ba=-1),b.lazyZoom(W,null,ba,aa),mxEvent.consume(J),!1;oa=oa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(J){b.cumulativeZoomFactor=J.scale;b.lazyZoom(0<J.scale,!0);mxEvent.consume(J)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};-EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.width=this.formatWidth+"px",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};-EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,g=60;null!=e&&(g=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};-EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};-EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var B=0;p=mxUtils.bind(this,function(P,T,W){B++;+var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",P);null!=W&&aa.setAttribute("title",W);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",T);P.style.width="36px";P.style.filter="invert(100%)";aa.appendChild(P);this.chromelessToolbar.appendChild(aa);return aa});if(null!=u.backBtn){var H=Graph.sanitizeLink(u.backBtn.url);null!=H&&p(mxUtils.bind(this,function(P){window.location.href=+H;mxEvent.consume(P)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.previousImage,mxResources.get("previousPage")),G=document.createElement("div");G.style.fontFamily=Editor.defaultHtmlFont;G.style.display="inline-block";G.style.verticalAlign="top";G.style.fontWeight="bold";G.style.marginTop="8px";G.style.fontSize="14px";G.style.cursor="default";G.style.color=+mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var O=p(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){G.innerText="";var P=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(G,P+1+" / "+this.pages.length);G.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());+S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(P-1,this.pages.length)].getName());O.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(P+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";O.style.paddingLeft="4px";O.style.paddingRight="0px";var c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(O.style.display="",S.style.display="",G.style.display="inline-block"):+(O.style.display="none",S.style.display="none",G.style.display="none");R()});if(null!=this.menus){var f=this.menus.get("pages");null!=f&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(P){var T=new mxPopupMenu(f.funct);T.div.className+=" geMenubarMenu";T.smartSeparators=!0;T.showDisabled=!0;T.autoExpand=!0;T.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(T,arguments);T.destroy()});var W=mxUtils.getOffset(G);T.popup(W.x,W.y+G.offsetHeight,null,P);mxEvent.addListener(T.div,+"mouseleave",mxUtils.bind(this,function(){T.hideMenu()}))}))}this.editor.addListener("resetGraphView",c);this.editor.addListener("pageSelected",R)}p(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){b.isLightboxView()?+(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var l=null,t=null,z=mxUtils.bind(this,function(P){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),+600)}),P||200)}),C=mxUtils.bind(this,function(P){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var F=p(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var T=F.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=+T.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));T=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=+T.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),N=b.getModel();N.addListener(mxEvent.CHANGE,function(){F.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(P){null!=this.editor.editButtonFunc?+this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(c=0;c<this.lightboxToolbarActions.length;c++){var K=this.lightboxToolbarActions[c];K.elem=p(K.fn,K.icon,K.tooltip)}if(null!=u.refreshBtn){var I=null==u.refreshBtn.url?null:Graph.sanitizeLink(u.refreshBtn.url);p(mxUtils.bind(this,function(P){null!=+I?window.location.href=I:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=u.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(P){u.fullscreenBtn.url?b.openLink(u.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!u.noCloseBtn&&(u.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=+document.body))&&p(mxUtils.bind(this,function(P){"1"==urlParams.close||u.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||+(mxEvent.isShiftDown(P)||C(30),z())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?z():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?z():C(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar,+"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||C(30)}));var ca=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,T){this.startX=T.getGraphX();this.startY=T.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,T){},mouseUp:function(P,T){mxEvent.isTouchEvent(T.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ca&&Math.abs(this.scrollTop-b.container.scrollTop)<+ca&&Math.abs(this.startX-T.getGraphX())<ca&&Math.abs(this.startY-T.getGraphY())<ca&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var da=b.view.validate,ea=new mxPoint,X=!1,ba=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&ba!=g.currentPage){ba=g.currentPage;X=!0;var P=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,+!0);null==P&&(P=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));P=b.getPageLayout(P,ea,1);var T=b.getDefaultTranslate(P);this.x0=P.x;this.y0=P.y;if(T.x!=this.translate.x||T.y!=this.translate.y)this.invalidate(),this.translate.x=T.x,this.translate.y=T.y}T=b.getPagePadding();var W=b.getPageSize();P=T.x-(this.x0||0)*W.width;T=T.y-(this.y0||0)*W.height;if(this.translate.x!=P||this.translate.y!=T)this.invalidate(),this.translate.x=P,this.translate.y=T}da.apply(this,arguments)};+if(!b.isViewer()){var ha=b.sizeDidChange;b.sizeDidChange=function(){var P=X;X=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var T=this.getPageLayout(),W=this.getDefaultTranslate(T),aa=this.view.translate.x,ja=this.view.translate.y;if(W.x!=aa||W.y!=ja){this.view.x0=T.x;this.view.y0=T.y;this.autoTranslate=!0;this.view.setTranslate(W.x,W.y);this.autoTranslate=!1;P||(this.container.scrollLeft+=Math.round((W.x-aa)*this.view.scale),this.container.scrollTop+=+Math.round((W.y-ja)*this.view.scale));return}}ha.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ma=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var la=null,Z=null,k=null,A=null,J=null,U=function(P){null!=la&&window.clearTimeout(la);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||A)la=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&+(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),Y.style.transformOrigin="",ma.style.transformOrigin="",mxClient.IS_SF?(Y.style.transform="scale(1)",ma.style.transform="scale(1)",window.setTimeout(function(){Y.style.transform="";ma.style.transform=""},0)):(Y.style.transform="",ma.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity=+"");var T=new mxPoint(b.container.scrollLeft,b.container.scrollTop),W=mxUtils.getOffset(b.container),aa=b.view.scale,ja=0,pa=0;null!=Z&&(ja=b.container.offsetWidth/2-Z.x+W.x,pa=b.container.offsetHeight/2-Z.y+W.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=k&&(ja+=T.x-k.x,pa+=T.y-k.y),null!=e&&g.chromelessResize(!1,null,ja*(b.cumulativeZoomFactor-1),pa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ja&&0==pa||(b.container.scrollLeft-=+ja*(b.cumulativeZoomFactor-1),b.container.scrollTop-=pa*(b.cumulativeZoomFactor-1)));null!=J&&Y.setAttribute("filter",J);b.cumulativeZoomFactor=1;J=A=Z=k=la=null}),null!=P?P:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(P,T,W,aa){aa=null!=aa?aa:this.zoomFactor;(T=T||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=+(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,+160))/this.view.scale;if(b.isFastZoomEnabled()){null==J&&""!=Y.getAttribute("filter")&&(J=Y.getAttribute("filter"),Y.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);P=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=T||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var ja=T||null==Z?b.container.scrollTop+b.container.clientHeight/2:Z.y+b.container.scrollTop-+b.container.offsetTop;Y.style.transformOrigin=aa+"px "+ja+"px";Y.style.transform="scale("+P+")";ma.style.transformOrigin=aa+"px "+ja+"px";ma.style.transform="scale("+P+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(T||null==Z?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":Z.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+"px")+" "+(T||null==Z?b.container.clientHeight/+2+b.container.scrollTop-aa.offsetTop+"px":Z.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+P+")")):b.view.validateBackgroundStyles(P,aa,ja);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",P))}U(b.isFastZoomEnabled()?W:0)};mxEvent.addGestureListeners(b.container,function(P){null!=la&&window.clearTimeout(la)},+null,function(P){1!=b.cumulativeZoomFactor&&U(0)});mxEvent.addListener(b.container,"scroll",function(P){null==la||b.isMouseDown||1==b.cumulativeZoomFactor||U(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,T,W,aa,ja){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!W&&b.isScrollWheelEvent(P))W=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(W.x+(T?-aa:aa),W.y):b.view.setTranslate(W.x,W.y+(T?+aa:-aa));else if(W||b.isZoomWheelEvent(P))for(var pa=mxEvent.getSource(P);null!=pa;){if(pa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=aa&&null!=ja?new mxPoint(aa,ja):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),A=W,W=b.zoomFactor,aa=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?W=1+Math.abs(P.deltaY)/20*(W-1):null!=P.movementY&&"pointermove"==P.type&&(W=1+Math.max(1,Math.abs(P.movementY))/20*(W-1),aa=-1),b.lazyZoom(T,null,aa,W),mxEvent.consume(P),+!1;pa=pa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};+EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.width=this.formatWidth+"px",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};+EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,g=60;null!=e&&(g=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};+EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,e){try{var g=mxUtils.parseXml(b);this.editor.setGraphXml(g.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=e&&(this.editor.setFilename(e),this.updateDocumentTitle())}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+m.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPrintDialog=function(b,e){this.showDialog((new PrintDialog(this,b,e)).container,300,180,!0,!0)};-EditorUi.prototype.showPopupMenu=function(b,e,g,m){this.editor.graph.popupMenuHandler.hideMenu();var v=new mxPopupMenu(b);v.div.className+=" geMenubarMenu";v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);v.destroy()});v.popup(e,g,null,m);this.setCurrentMenu(v)};EditorUi.prototype.setCurrentMenu=function(b,e){this.currentMenuElt=e;this.currentMenu=b;this.hideShapePicker()};+EditorUi.prototype.showPopupMenu=function(b,e,g,m){this.editor.graph.popupMenuHandler.hideMenu();var u=new mxPopupMenu(b);u.div.className+=" geMenubarMenu";u.smartSeparators=!0;u.showDisabled=!0;u.autoExpand=!0;u.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);u.destroy()});u.popup(e,g,null,m);this.setCurrentMenu(u)};EditorUi.prototype.setCurrentMenu=function(b,e){this.currentMenuElt=e;this.currentMenu=b;this.hideShapePicker()};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var e=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);e==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(g){}};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.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml()}};EditorUi.prototype.updateDiagramData=function(b,e){this.replaceDiagramData(xUtils.getXml(e))};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.beginUpdate();try{this.editor.setGraphXml(mxUtils.parseXml(b).documentElement)}finally{this.editor.graph.model.endUpdate()}};@@ -2173,22 +2172,22 @@ EditorUi.prototype.fitDiagramToWindow=function(){var b=this.editor.graph,e=b.isSg.x,e.height+=g.height+g.y),b.fitWindow(e))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph,e=b.container;if(!this.editor.extendCanvas)e.scrollTop=0,e.scrollLeft=0,mxUtils.hasScrollbars(e)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(e))if(b.pageVisible){var g=b.getPagePadding();e.scrollTop=Math.floor(g.y-this.editor.initialTopSpacing)-1;e.scrollLeft=Math.floor(Math.min(g.x,(e.scrollWidth-e.clientWidth)/2))-1;g=b.getGraphBounds();0<g.width&&0<g.height&&(g.x>e.scrollLeft+.9*e.clientWidth&&(e.scrollLeft=Math.min(g.x+g.width-e.clientWidth,g.x-10)),g.y>e.scrollTop+.9*e.clientHeight&&(e.scrollTop=Math.min(g.y+g.height-e.clientHeight,g.y-10)))}else if(g=b.getGraphBounds(),0==g.width&&0==g.height)e.scrollLeft=(e.scrollWidth-e.clientWidth)/2,e.scrollTop=(e.scrollHeight-e.clientHeight)/2;else{var m=Math.max(g.height,b.scrollTileSize.height*b.view.scale);e.scrollLeft=Math.floor(Math.max(0,g.x-Math.max(0,(e.clientWidth-Math.max(g.width,b.scrollTileSize.width*b.view.scale))/2)));-e.scrollTop=Math.floor(Math.max(0,g.y-Math.max(20,(e.clientHeight-m)/4)))}else{g=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());m=b.view.translate;var v=b.view.scale;g.x=g.x/v-m.x;g.y=g.y/v-m.y;g.width/=v;g.height/=v;b.view.setTranslate(Math.floor(Math.max(0,(e.clientWidth-g.width)/2)-g.x+2),Math.floor((b.pageVisible?0:Math.max(0,(e.clientHeight-g.height)/4))-g.y+1))}};-EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,g=mxUtils.hasScrollbars(e.container),m=0,v=0;g&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,v=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(g){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();g&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*-e.view.scale-v);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};-EditorUi.prototype.installResizeHandler=function(b,e,g){e&&(b.window.setSize=function(v,p){if(!this.minimized){var A=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;v=Math.min(v,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,A-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(v,p){var A=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,-G=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),F=parseInt(this.div.style.height);v=Math.max(0,Math.min(v,A-S));p=Math.max(0,Math.min(p,G-F));this.getX()==v&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(S,F)};var m=mxUtils.bind(this,function(){var v=b.window.getX(),p=b.window.getY();b.window.setLocation(v,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,+e.scrollTop=Math.floor(Math.max(0,g.y-Math.max(20,(e.clientHeight-m)/4)))}else{g=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());m=b.view.translate;var u=b.view.scale;g.x=g.x/u-m.x;g.y=g.y/u-m.y;g.width/=u;g.height/=u;b.view.setTranslate(Math.floor(Math.max(0,(e.clientWidth-g.width)/2)-g.x+2),Math.floor((b.pageVisible?0:Math.max(0,(e.clientHeight-g.height)/4))-g.y+1))}};+EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,g=mxUtils.hasScrollbars(e.container),m=0,u=0;g&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,u=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(g){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();g&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*+e.view.scale-u);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};+EditorUi.prototype.installResizeHandler=function(b,e,g){e&&(b.window.setSize=function(u,p){if(!this.minimized){var B=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;u=Math.min(u,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,B-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(u,p){var B=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,+H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),G=parseInt(this.div.style.height);u=Math.max(0,Math.min(u,B-S));p=Math.max(0,Math.min(p,H-G));this.getX()==u&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(S,G)};var m=mxUtils.bind(this,function(){var u=b.window.getX(),p=b.window.getY();b.window.setLocation(u,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,"resize",m);b.window.destroy();null!=g&&g()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();-function ChangePageSetup(b,e,g,m,v){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=g;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=v;this.ignoreImage=this.ignoreColor=!1}+function ChangePageSetup(b,e,g,m,u){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=g;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=u;this.ignoreImage=this.ignoreColor=!1}ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var g=this.previousImage;null!=g&&Graph.isPageLink(g.src)&&(g=this.ui.createImageForPageLink(g.src,this.ui.currentPage));this.ui.setBackgroundImage(g);this.previousImage=e}null!=this.previousFormat&&(this.format=this.previousFormat,e=b.pageFormat,this.previousFormat.width!=e.width||this.previousFormat.height!=e.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=e);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(e,g,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousPageScale=m.pageScale;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);return m};mxCodecRegistry.register(b)})();EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b,e){e=null!=e?e:Editor.isDarkMode();var g=this.editor.graph;e?g.view.defaultDarkGridColor=b:g.view.defaultGridColor=b;g.view.gridColor="light-dark("+g.view.defaultGridColor+", "+g.view.defaultDarkGridColor+")";g.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};-EditorUi.prototype.addUndoListener=function(){var b=this.editor.undoManager,e=mxUtils.bind(this,function(){this.updateActionStates()});b.addListener(mxEvent.ADD,e);b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);b.addListener(mxEvent.CLEAR,e);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);e()};var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(v,p){m.apply(this,arguments);+EditorUi.prototype.addUndoListener=function(){var b=this.editor.undoManager,e=mxUtils.bind(this,function(){this.updateActionStates()});b.addListener(mxEvent.ADD,e);b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);b.addListener(mxEvent.CLEAR,e);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);e()};var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(u,p){m.apply(this,arguments);e()};e()};-EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),g=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m=!this.editor.chromeless||this.editor.editable,v="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),p=0;p<v.length;p++)this.actions.get(v[p]).setEnabled(0<+EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),g=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m=!this.editor.chromeless||this.editor.editable,u="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),p=0;p<u.length;p++)this.actions.get(u[p]).setEnabled(0<e.cells.length);this.actions.get("grid").setEnabled(m);this.actions.get("undo").setEnabled(this.canUndo()&&m);this.actions.get("redo").setEnabled(this.canRedo()&&m);this.actions.get("swap").setEnabled(2==e.cells.length&&2==e.vertices.length);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(0<e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("clearAnchors").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(1<e.cells.length||1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0]));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));@@ -2197,9 +2196,9 @@ e.cells.length);this.actions.get("editStyle").setEnabled(0<e.cells.length);this.this.actions.get("expand").setEnabled(m);this.actions.get("collapse").setEnabled(m);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(g);this.menus.get("insert").setEnabled(g);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&&1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth);var g=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(g=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-40));e=0;null!=this.menubar&&-(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var v=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=v+"px";this.formatContainer.style.display=null!=this.format?-"":"none";var p=this.getDiagramContainerOffset(),A=null!=this.hsplit.parentNode?m:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer?(this.tabContainer.style.left=A+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px"):this.hsplit.style.bottom=this.footerHeight+g+"px";0<this.footerHeight&&(this.footerContainer.style.bottom=-g+"px");m=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+g+"px",this.tabContainer.style.right=v+"px",m=this.tabContainer.clientHeight,this.checkTabScrollerOverflow());this.sidebarContainer.style.bottom=this.footerHeight+g+"px";this.formatContainer.style.bottom=this.footerHeight+g+"px";this.diagramContainer.style.left=A+p.x+"px";this.diagramContainer.style.top=e+p.y+"px";this.diagramContainer.style.right=v+"px";this.diagramContainer.style.bottom=this.footerHeight+g+m++(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var u=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=u+"px";this.formatContainer.style.display=null!=this.format?+"":"none";var p=this.getDiagramContainerOffset(),B=null!=this.hsplit.parentNode?m:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer?(this.tabContainer.style.left=B+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px"):this.hsplit.style.bottom=this.footerHeight+g+"px";0<this.footerHeight&&(this.footerContainer.style.bottom=+g+"px");m=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+g+"px",this.tabContainer.style.right=u+"px",m=this.tabContainer.clientHeight,this.checkTabScrollerOverflow());this.sidebarContainer.style.bottom=this.footerHeight+g+"px";this.formatContainer.style.bottom=this.footerHeight+g+"px";this.diagramContainer.style.left=B+p.x+"px";this.diagramContainer.style.top=e+p.y+"px";this.diagramContainer.style.right=u+"px";this.diagramContainer.style.bottom=this.footerHeight+g+m+"px";b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.sidebarContainer.style.zIndex="1";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom="0px";this.footerContainer.style.zIndex=@@ -2207,28 +2206,28 @@ mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";this.EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var b=this.editor.chromeless?null:this.createFooter();null!=b&&(this.footerContainer.appendChild(b),this.container.appendChild(this.footerContainer));this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};-EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){var g=mxEvent.getSource(e);if(g!=b)for(;g.parentNode!=b;)g=g.parentNode;if("A"!=g.nodeName){var m=g.getAttribute("data-action");if("statusFunction"==m&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=m)g=this.actions.get(m),null!=g&&g.funct();else{m=g.getAttribute("data-title");var v=g.getAttribute("data-message");-null!=m&&null!=v?this.showError(m,v):(g=g.getAttribute("data-link"),null!=g&&this.editor.graph.openLink(g))}mxEvent.consume(e)}}));return b};+EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){var g=mxEvent.getSource(e);if(g!=b)for(;g.parentNode!=b;)g=g.parentNode;if("A"!=g.nodeName){var m=g.getAttribute("data-action");if("statusFunction"==m&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=m)g=this.actions.get(m),null!=g&&g.funct();else{m=g.getAttribute("data-title");var u=g.getAttribute("data-message");+null!=m&&null!=u?this.showError(m,u):(g=g.getAttribute("data-link"),null!=g&&this.editor.graph.openLink(g))}mxEvent.consume(e)}}));return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Graph.sanitizeHtml(b);0==this.statusContainer.getElementsByTagName("div").length&&null!=b&&0<b.length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b));b=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=b)for(var e=0;e<b.length;e++)(function(g){mxUtils.setOpacity(g,0);mxUtils.setPrefixedStyle(g.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(g.style,"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(g,100);mxUtils.setPrefixedStyle(g.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(g.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(g.style,"transform","scaleX(0)");mxUtils.setOpacity(g,0);window.setTimeout(mxUtils.bind(this,function(){null!=g.parentNode&&g.parentNode.removeChild(g)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[e])};EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.style.textOverflow="ellipsis";e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.minWidth="0";e.setAttribute("title",b);e.innerHTML=Graph.sanitizeHtml(b);return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};-EditorUi.prototype.addSplitHandler=function(b,e,g,m){function v(R){if(null!=A){var T=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));m(Math.max(0,G+(e?T.x-A.x:A.y-T.y)-g));mxEvent.consume(R);G!=P()&&(S=!0,F=null)}}function p(R){v(R);A=G=null}var A=null,G=null,S=!0,F=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){A=new mxPoint(mxEvent.getClientX(R),-mxEvent.getClientY(R));G=P();S=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!S&&this.hsplitClickEnabled){var T=null!=F?F-g:0;F=P();m(T);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,v,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,v,p)})};+EditorUi.prototype.addSplitHandler=function(b,e,g,m){function u(R){if(null!=B){var c=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));m(Math.max(0,H+(e?c.x-B.x:B.y-c.y)-g));mxEvent.consume(R);H!=O()&&(S=!0,G=null)}}function p(R){u(R);B=H=null}var B=null,H=null,S=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var O=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){B=new mxPoint(mxEvent.getClientX(R),+mxEvent.getClientY(R));H=O();S=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!S&&this.hsplitClickEnabled){var c=null!=G?G-g:0;G=O();m(c);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,u,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,u,p)})};EditorUi.prototype.prompt=function(b,e,g){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){g(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};-EditorUi.prototype.handleError=function(b,e,g,m,v){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){v=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(v=mxUtils.htmlEntities(b.message));this.showError(e,v,p,g,null,null,null,null,null,null,null,null,m?g:null)}else null!=g&&g()};-EditorUi.prototype.showError=function(b,e,g,m,v,p,A,G,S,F,P,R,T){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,v,p,A,R,G,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,F||340,P||100+20*e,!0,!1,T);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,v,p,A,G,S,F){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,v,p,A,G,S,F);this.dialogs.push(this.dialog)};-EditorUi.prototype.hideDialog=function(b,e,g){var m=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var v=this.dialogs.length-1;0<=v;v--)if(!this.dialogs[v].closing){m=this.dialogs[v];break}null==m||null!=g&&g!=this.dialog.container.firstChild||(m.closing=!0,0==m.close(b,e)?delete m.closing:(delete m.closing,b=mxUtils.lastIndexOf(this.dialogs,m),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog",+EditorUi.prototype.handleError=function(b,e,g,m,u){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){u=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(u=mxUtils.htmlEntities(b.message));this.showError(e,u,p,g,null,null,null,null,null,null,null,null,m?g:null)}else null!=g&&g()};+EditorUi.prototype.showError=function(b,e,g,m,u,p,B,H,S,G,O,R,c){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,u,p,B,R,H,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,O||100+20*e,!0,!1,c);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,u,p,B,H,S,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,u,p,B,H,S,G);this.dialogs.push(this.dialog)};+EditorUi.prototype.hideDialog=function(b,e,g){var m=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var u=this.dialogs.length-1;0<=u;u--)if(!this.dialogs[u].closing){m=this.dialogs[u];break}null==m||null!=g&&g!=this.dialog.container.firstChild||(m.closing=!0,0==m.close(b,e)?delete m.closing:(delete m.closing,b=mxUtils.lastIndexOf(this.dialogs,m),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog","dialog",m)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus()))}),0)))};-EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),g=new mxDictionary,m=[],v=0;v<e.length;v++){var p=b.isTableCell(e[v])?b.model.getParent(e[v]):e[v];null==p||g.get(p)||(g.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(A){this.handleError(A)}};-EditorUi.prototype.pickColor=function(b,e,g,m,v){var p=this.editor.graph,A=p.cellEditor.saveSelection(),G=(v?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){p.cellEditor.restoreSelection(A);e(S)},function(){p.cellEditor.restoreSelection(A)},g,m,v);this.showDialog(b.container,230,G,!0,!1);b.init()};+EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),g=new mxDictionary,m=[],u=0;u<e.length;u++){var p=b.isTableCell(e[u])?b.model.getParent(e[u]):e[u];null==p||g.get(p)||(g.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(B){this.handleError(B)}};+EditorUi.prototype.pickColor=function(b,e,g,m,u){var p=this.editor.graph,B=p.cellEditor.saveSelection(),H=(u?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){p.cellEditor.restoreSelection(B);e(S)},function(){p.cellEditor.restoreSelection(B)},g,m,u);this.showDialog(b.container,230,H,!0,!1);b.init()};EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};-EditorUi.prototype.base64ToBlob=function(b,e){e=e||"";b=atob(b);for(var g=b.length,m=Math.ceil(g/1024),v=Array(m),p=0;p<m;++p){for(var A=1024*p,G=Math.min(A+1024,g),S=Array(G-A),F=0;A<G;++F,++A)S[F]=b[A].charCodeAt(0);v[p]=new Uint8Array(S)}return new Blob(v,{type:e})};-EditorUi.prototype.writeImageToClipboard=function(b,e,g,m){var v=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":v,"text/html":new Blob(['<img src="'+b+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](m)};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 m=b.lastIndexOf("</mxGraphModel>");m>g&&(e=b.substring(g,m+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(v){}return e};+EditorUi.prototype.base64ToBlob=function(b,e){e=e||"";b=atob(b);for(var g=b.length,m=Math.ceil(g/1024),u=Array(m),p=0;p<m;++p){for(var B=1024*p,H=Math.min(B+1024,g),S=Array(H-B),G=0;B<H;++G,++B)S[G]=b[B].charCodeAt(0);u[p]=new Uint8Array(S)}return new Blob(u,{type:e})};+EditorUi.prototype.writeImageToClipboard=function(b,e,g,m){var u=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":u,"text/html":new Blob(['<img src="'+b+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](m)};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 m=b.lastIndexOf("</mxGraphModel>");m>g&&(e=b.substring(g,m+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(u){}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 m=decodeURIComponent(g);this.isCompatibleString(m)&&(g=m)}b(g)}),"text")}),"html")};-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0<g.length&&"html"==e&&0<=mxUtils.indexOf(g[0].types,"text/html"))g[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(v){try{var p=this.parseHtmlData(v),A="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var G=A.lastIndexOf("%3E");-0<=G&&G<A.length-3&&(A=A.substring(0,G+3))}catch(P){}try{var S=p.getElementsByTagName("span"),F=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(A);this.isCompatibleString(F)&&(A=F)}catch(P){}}catch(P){}b(this.isCompatibleString(A)?A:null)}))["catch"](function(v){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(v){b(v)})["catch"](function(){b(null)})})["catch"](function(){b(null)});+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0<g.length&&"html"==e&&0<=mxUtils.indexOf(g[0].types,"text/html"))g[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(u){try{var p=this.parseHtmlData(u),B="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var H=B.lastIndexOf("%3E");+0<=H&&H<B.length-3&&(B=B.substring(0,H+3))}catch(O){}try{var S=p.getElementsByTagName("span"),G=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(B);this.isCompatibleString(G)&&(B=G)}catch(O){}}catch(O){}b(this.isCompatibleString(B)?B:null)}))["catch"](function(u){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(u){b(u)})["catch"](function(){b(null)})})["catch"](function(){b(null)});else b(null)}))["catch"](function(g){b(null)})};EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var g="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(g?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));g=g&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=g&&null==g.nextSibling&&g.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==g.nodeName?(b=g.getAttribute("src"),null!=b&&(Editor.isPngDataUrl(b)&&@@ -2238,70 +2237,70 @@ EditorUi.prototype.extractGraphModelFromEvent=function(b){var e=null,g=null;nullEditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,e);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(e.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(e))).simulate(document,"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(e);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(g){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};EditorUi.prototype.executeLayouts=function(b,e){this.executeLayout(mxUtils.bind(this,function(){var g=new mxCompositeLayout(this.editor.graph,b),m=this.editor.graph.getSelectionCells();g.execute(this.editor.graph.getDefaultParent(),0==m.length?null:m)}),!0,e)};-EditorUi.prototype.executeLayout=function(b,e,g){var m=this.editor.graph;m.getModel().beginUpdate();try{b()}catch(v){throw v;}finally{this.allowAnimation&&e&&m.isEnabled()?(b=new mxMorphing(m),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=g&&g()})),b.startAnimation()):(m.getModel().endUpdate(),null!=g&&g())}};-EditorUi.prototype.showImageDialog=function(b,e,g,m){m=this.editor.graph.cellEditor;var v=m.saveSelection(),p=mxUtils.prompt(b,e);m.restoreSelection(v);if(null!=p&&0<p.length){var A=new Image;A.onload=function(){g(p,A.width,A.height)};A.onerror=function(){g(null);mxUtils.alert(mxResources.get("fileNotFound"))};A.src=p}else g(null)};EditorUi.prototype.showLinkDialog=function(b,e,g){b=new LinkDialog(this,b,e,g);this.showDialog(b.container,420,90,!0,!0);b.init()};+EditorUi.prototype.executeLayout=function(b,e,g){var m=this.editor.graph;m.getModel().beginUpdate();try{b()}catch(u){throw u;}finally{this.allowAnimation&&e&&m.isEnabled()?(b=new mxMorphing(m),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=g&&g()})),b.startAnimation()):(m.getModel().endUpdate(),null!=g&&g())}};+EditorUi.prototype.showImageDialog=function(b,e,g,m){m=this.editor.graph.cellEditor;var u=m.saveSelection(),p=mxUtils.prompt(b,e);m.restoreSelection(u);if(null!=p&&0<p.length){var B=new Image;B.onload=function(){g(p,B.width,B.height)};B.onerror=function(){g(null);mxUtils.alert(mxResources.get("fileNotFound"))};B.src=p}else g(null)};EditorUi.prototype.showLinkDialog=function(b,e,g){b=new LinkDialog(this,b,e,g);this.showDialog(b.container,420,90,!0,!0);b.init()};EditorUi.prototype.showDataDialog=function(b){null!=b&&"undefined"!==typeof window.EditDataDialog&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(m){m=new ChangePageSetup(this,null,m);m.ignoreColor=!0;this.editor.graph.model.execute(m)});var g=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=g&&0<g.length?(e=new Image,e.onload=function(){b(new mxImage(g,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=g):b(null)};EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,g){mxUtils.confirm(b)?null!=e&&e():null!=g&&g()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};-EditorUi.prototype.createKeyHandler=function(b){function e(R,T,c){if(!m.isSelectionEmpty()&&m.isEnabled()){T=null!=T?T:1;var f=m.getCompositeParents(m.getSelectionCells()),k=0<f.length?f[0]:null;if(null!=k)if(c){m.getModel().beginUpdate();try{for(k=0;k<f.length;k++)if(m.getModel().isVertex(f[k])&&m.isCellResizable(f[k])){var B=m.getCellGeometry(f[k]);null!=B&&(B=B.clone(),37==R?B.width=Math.max(0,B.width-T):38==R?B.height=Math.max(0,B.height-T):39==R?B.width+=T:40==R&&(B.height+=T),m.getModel().setGeometry(f[k],-B))}}finally{m.getModel().endUpdate()}}else{B=m.model.getParent(k);var z=m.getView().scale;c=null;1==m.getSelectionCount()&&m.model.isVertex(k)&&null!=m.layoutManager&&!m.isCellLocked(k)&&(c=m.layoutManager.getLayout(B));if(null!=c&&c.constructor==mxStackLayout)T=B.getIndex(k),37==R||38==R?m.model.add(B,k,Math.max(0,T-1)):(39==R||40==R)&&m.model.add(B,k,Math.min(m.model.getChildCount(B),T+1));else{var C=m.graphHandler;null!=C&&(null==C.first&&C.start(k,0,0,m.getMovableCells(f)),null!=C.first&&(k=-f=0,37==R?f=-T:38==R?k=-T:39==R?f=T:40==R&&(k=T),C.currentDx+=f*z,C.currentDy+=k*z,C.checkPreview(),C.updatePreview()),null!=A&&window.clearTimeout(A),A=window.setTimeout(function(){if(null!=C.first){var I=C.roundLength(C.currentDx/z),L=C.roundLength(C.currentDy/z);C.moveCells(C.cells,I,L);C.reset()}},400))}}}}var g=this,m=this.editor.graph,v=new mxKeyHandler(m),p=v.isEventIgnored;v.isEventIgnored=function(R){return!(mxEvent.isShiftDown(R)&&9==R.keyCode)&&(!this.isControlDown(R)||mxEvent.isShiftDown(R)||-90!=R.keyCode&&89!=R.keyCode&&188!=R.keyCode&&190!=R.keyCode&&85!=R.keyCode)&&(66!=R.keyCode&&73!=R.keyCode||!this.isControlDown(R)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=R.keyCode&&107!=R.keyCode||!this.isControlDown(R)&&!mxEvent.isShiftDown(R)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};v.isEnabledForEvent=function(R){return!mxEvent.isConsumed(R)&&this.isGraphEvent(R)&&this.isEnabled()&&(null==-g.dialogs||0==g.dialogs.length)};v.isControlDown=function(R){return mxEvent.isControlDown(R)||mxClient.IS_MAC&&R.metaKey};var A=null,G={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=v.getFunction;mxKeyHandler.prototype.getFunction=function(R){if(m.isEnabled()){var T=null;mxEvent.isShiftDown(R)&&this.isControlDown(R)&&mxEvent.isAltDown(R)?T=g.actions.get(g.ctrlAltShiftActions[R.keyCode]):mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)?-T=g.actions.get(g.altShiftActions[R.keyCode]):this.isControlDown(R)&&mxEvent.isAltDown(R)&&(T=g.actions.get(g.ctrlAltActions[R.keyCode]));if(null!=T)return T.funct;if(null!=G[R.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(R)&&mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)){if(m.model.isVertex(m.getSelectionCell()))return function(){var c=m.connectVertex(m.getSelectionCell(),G[R.keyCode],m.defaultEdgeLength,R,!0);null!=c&&0<c.length&&(1==c.length&&m.model.isEdge(c[0])?m.setSelectionCell(m.model.getTerminal(c[0],-!1)):m.setSelectionCell(c[c.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(R)?function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null)}}return S.apply(this,arguments)};v.bindAction=mxUtils.bind(this,function(R,T,c,f){var k=this.actions.get(c);null!=k&&(c=function(){k.isEnabled()&&k.funct.apply(this,arguments)},-T?f?v.bindControlShiftKey(R,c):v.bindControlKey(R,c):f?v.bindShiftKey(R,c):v.bindKey(R,c))});var F=this,P=v.escape;v.escape=function(R){P.apply(this,arguments)};v.enter=function(){};v.bindControlShiftKey(36,function(){m.exitGroup()});v.bindControlShiftKey(35,function(){m.enterGroup()});v.bindShiftKey(36,function(){m.home()});v.bindKey(35,function(){m.refresh()});v.bindAction(80,!0,"print");v.bindAction(107,!0,"zoomIn");v.bindAction(109,!0,"zoomOut");v.bindAction(61,!0,"zoomIn");v.bindAction(187,!0,-"zoomIn");v.bindAction(222,!0,"zoomIn");v.bindAction(173,!0,"zoomOut");v.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)v.bindAction(79,!0,"outline",!0),v.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),v.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),v.bindControlKey(13,function(){F.ctrlEnter()}),v.bindAction(8,!1,"delete"),v.bindAction(8,!0,"deleteAll"),v.bindAction(8,!1,"deleteLabels",!0),v.bindAction(46,!1,"delete"),v.bindAction(46,!0,-"deleteAll"),v.bindAction(46,!1,"deleteLabels",!0),v.bindAction(36,!1,"resetView"),v.bindAction(72,!0,"fitWindow",!0),v.bindAction(74,!0,"fitPage"),v.bindAction(74,!0,"fitTwoPages",!0),v.bindAction(48,!0,"customZoom"),v.bindAction(82,!0,"turn"),v.bindAction(82,!0,"clearDefaultStyle",!0),v.bindAction(83,!0,"save"),v.bindAction(83,!0,"saveAs",!0),v.bindAction(65,!0,"selectAll"),v.bindAction(65,!0,"selectNone",!0),v.bindAction(73,!0,"selectVertices",!0),v.bindAction(69,!0,"selectEdges",!0),v.bindAction(69,-!0,"editStyle"),v.bindAction(66,!0,"bold"),v.bindAction(66,!0,"toBack",!0),v.bindAction(70,!0,"toFront",!0),v.bindAction(68,!0,"duplicate"),v.bindAction(68,!0,"setAsDefaultStyle",!0),v.bindAction(90,!0,"undo"),v.bindAction(90,!0,"redo",!0),v.bindAction(89,!0,"redo"),v.bindAction(89,!0,"autosize",!0),v.bindAction(88,!0,"cut"),v.bindAction(67,!0,"copy"),v.bindAction(86,!0,"paste"),v.bindAction(71,!0,"group"),v.bindAction(77,!0,"editData"),v.bindAction(71,!0,"grid",!0),v.bindAction(73,!0,"italic"),v.bindAction(76,-!0,"lockUnlock"),v.bindAction(76,!0,"layers",!0),v.bindAction(80,!0,"format",!0),v.bindAction(85,!0,"underline"),v.bindAction(85,!0,"ungroup",!0),v.bindAction(109,!0,"decreaseFontSize",!0),v.bindAction(107,!0,"increaseFontSize",!0),v.bindAction(219,!0,"decreaseFontSize",!0),v.bindAction(221,!0,"increaseFontSize",!0),v.bindAction(190,!0,"superscript"),v.bindAction(188,!0,"subscript"),v.bindAction(13,!1,"keyPressEnter"),v.bindKey(113,function(){m.isEnabled()&&m.startEditingAtCell()});return v};+EditorUi.prototype.createKeyHandler=function(b){function e(R,c,f){if(!m.isSelectionEmpty()&&m.isEnabled()){c=null!=c?c:1;var l=m.getCompositeParents(m.getSelectionCells()),t=0<l.length?l[0]:null;if(null!=t)if(f){m.getModel().beginUpdate();try{for(t=0;t<l.length;t++)if(m.getModel().isVertex(l[t])&&m.isCellResizable(l[t])){var z=m.getCellGeometry(l[t]);null!=z&&(z=z.clone(),37==R?z.width=Math.max(0,z.width-c):38==R?z.height=Math.max(0,z.height-c):39==R?z.width+=c:40==R&&(z.height+=c),m.getModel().setGeometry(l[t],+z))}}finally{m.getModel().endUpdate()}}else{z=m.model.getParent(t);var C=m.getView().scale;f=null;1==m.getSelectionCount()&&m.model.isVertex(t)&&null!=m.layoutManager&&!m.isCellLocked(t)&&(f=m.layoutManager.getLayout(z));if(null!=f&&f.constructor==mxStackLayout)c=z.getIndex(t),37==R||38==R?m.model.add(z,t,Math.max(0,c-1)):(39==R||40==R)&&m.model.add(z,t,Math.min(m.model.getChildCount(z),c+1));else{var F=m.graphHandler;null!=F&&(null==F.first&&F.start(t,0,0,m.getMovableCells(l)),null!=F.first&&(t=+l=0,37==R?l=-c:38==R?t=-c:39==R?l=c:40==R&&(t=c),F.currentDx+=l*C,F.currentDy+=t*C,F.checkPreview(),F.updatePreview()),null!=B&&window.clearTimeout(B),B=window.setTimeout(function(){if(null!=F.first){var N=F.roundLength(F.currentDx/C),K=F.roundLength(F.currentDy/C);F.moveCells(F.cells,N,K);F.reset()}},400))}}}}var g=this,m=this.editor.graph,u=new mxKeyHandler(m),p=u.isEventIgnored;u.isEventIgnored=function(R){return!(mxEvent.isShiftDown(R)&&9==R.keyCode)&&(!this.isControlDown(R)||mxEvent.isShiftDown(R)||+90!=R.keyCode&&89!=R.keyCode&&188!=R.keyCode&&190!=R.keyCode&&85!=R.keyCode)&&(66!=R.keyCode&&73!=R.keyCode||!this.isControlDown(R)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=R.keyCode&&107!=R.keyCode||!this.isControlDown(R)&&!mxEvent.isShiftDown(R)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};u.isEnabledForEvent=function(R){return!mxEvent.isConsumed(R)&&this.isGraphEvent(R)&&this.isEnabled()&&(null==+g.dialogs||0==g.dialogs.length)};u.isControlDown=function(R){return mxEvent.isControlDown(R)||mxClient.IS_MAC&&R.metaKey};var B=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=u.getFunction;mxKeyHandler.prototype.getFunction=function(R){if(m.isEnabled()){var c=null;mxEvent.isShiftDown(R)&&this.isControlDown(R)&&mxEvent.isAltDown(R)?c=g.actions.get(g.ctrlAltShiftActions[R.keyCode]):mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)?+c=g.actions.get(g.altShiftActions[R.keyCode]):this.isControlDown(R)&&mxEvent.isAltDown(R)&&(c=g.actions.get(g.ctrlAltActions[R.keyCode]));if(null!=c)return c.funct;if(null!=H[R.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(R)&&mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)){if(m.model.isVertex(m.getSelectionCell()))return function(){var f=m.connectVertex(m.getSelectionCell(),H[R.keyCode],m.defaultEdgeLength,R,!0);null!=f&&0<f.length&&(1==f.length&&m.model.isEdge(f[0])?m.setSelectionCell(m.model.getTerminal(f[0],+!1)):m.setSelectionCell(f[f.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(R)?function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null)}}return S.apply(this,arguments)};u.bindAction=mxUtils.bind(this,function(R,c,f,l){var t=this.actions.get(f);null!=t&&(f=function(){t.isEnabled()&&t.funct.apply(this,arguments)},+c?l?u.bindControlShiftKey(R,f):u.bindControlKey(R,f):l?u.bindShiftKey(R,f):u.bindKey(R,f))});var G=this,O=u.escape;u.escape=function(R){O.apply(this,arguments)};u.enter=function(){};u.bindControlShiftKey(36,function(){m.exitGroup()});u.bindControlShiftKey(35,function(){m.enterGroup()});u.bindShiftKey(36,function(){m.home()});u.bindKey(35,function(){m.refresh()});u.bindAction(80,!0,"print");u.bindAction(107,!0,"zoomIn");u.bindAction(109,!0,"zoomOut");u.bindAction(61,!0,"zoomIn");u.bindAction(187,!0,+"zoomIn");u.bindAction(222,!0,"zoomIn");u.bindAction(173,!0,"zoomOut");u.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)u.bindAction(79,!0,"outline",!0),u.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),u.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),u.bindControlKey(13,function(){G.ctrlEnter()}),u.bindAction(8,!1,"delete"),u.bindAction(8,!0,"deleteAll"),u.bindAction(8,!1,"deleteLabels",!0),u.bindAction(46,!1,"delete"),u.bindAction(46,!0,+"deleteAll"),u.bindAction(46,!1,"deleteLabels",!0),u.bindAction(36,!1,"resetView"),u.bindAction(72,!0,"fitWindow",!0),u.bindAction(74,!0,"fitPage"),u.bindAction(74,!0,"fitTwoPages",!0),u.bindAction(48,!0,"customZoom"),u.bindAction(82,!0,"turn"),u.bindAction(82,!0,"clearDefaultStyle",!0),u.bindAction(83,!0,"save"),u.bindAction(83,!0,"saveAs",!0),u.bindAction(65,!0,"selectAll"),u.bindAction(65,!0,"selectNone",!0),u.bindAction(73,!0,"selectVertices",!0),u.bindAction(69,!0,"selectEdges",!0),u.bindAction(69,+!0,"editStyle"),u.bindAction(66,!0,"bold"),u.bindAction(66,!0,"toBack",!0),u.bindAction(70,!0,"toFront",!0),u.bindAction(68,!0,"duplicate"),u.bindAction(68,!0,"setAsDefaultStyle",!0),u.bindAction(90,!0,"undo"),u.bindAction(90,!0,"redo",!0),u.bindAction(89,!0,"redo"),u.bindAction(89,!0,"autosize",!0),u.bindAction(88,!0,"cut"),u.bindAction(67,!0,"copy"),u.bindAction(86,!0,"paste"),u.bindAction(71,!0,"group"),u.bindAction(77,!0,"editData"),u.bindAction(71,!0,"grid",!0),u.bindAction(73,!0,"italic"),u.bindAction(76,+!0,"lockUnlock"),u.bindAction(76,!0,"layers",!0),u.bindAction(80,!0,"format",!0),u.bindAction(85,!0,"underline"),u.bindAction(85,!0,"ungroup",!0),u.bindAction(109,!0,"decreaseFontSize",!0),u.bindAction(107,!0,"increaseFontSize",!0),u.bindAction(219,!0,"decreaseFontSize",!0),u.bindAction(221,!0,"increaseFontSize",!0),u.bindAction(190,!0,"superscript"),u.bindAction(188,!0,"subscript"),u.bindAction(13,!1,"keyPressEnter"),u.bindKey(113,function(){m.isEnabled()&&m.startEditingAtCell()});return u};EditorUi.prototype.createHelpIcon=function(b){var e=document.createElement("div");e.setAttribute("title",mxResources.get("help"));e.style.display="inline";e.style.marginLeft="8px";e.style.marginRight="4px";e.style.cursor="help";var g=document.createElement("img");g.setAttribute("src",Editor.helpImage);g.setAttribute("valign","middle");g.setAttribute("border","0");g.className="geAdaptiveAsset";mxUtils.setOpacity(g,60);g.style.marginTop="-4px";g.style.height="16px";g.style.width="16px";e.appendChild(g);mxEvent.addListener(e,"click",mxUtils.bind(this,function(m){this.hideCurrentMenu();this.openLink(b);mxEvent.consume(m)}));return e};EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(this.selectionStateListener),b.getModel().removeListener(this.selectionStateListener),b.getView().removeListener(this.selectionStateListener),b.removeListener(this.selectionStateListener),this.selectionStateListener=null);null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=-null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(m){for(var v=0;v<b.length;v++)m=m.replace(new RegExp("&"+b[v][0]+";","g"),"&#"+b[v][1]+";");return e(m)};var g=mxUtils.getSizeForString;mxUtils.getSizeForString=function(m,v,p,A){return g(Graph.sanitizeHtml(m),v,p,A)}})();+null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(m){for(var u=0;u<b.length;u++)m=m.replace(new RegExp("&"+b[u][0]+";","g"),"&#"+b[u][1]+";");return e(m)};var g=mxUtils.getSizeForString;mxUtils.getSizeForString=function(m,u,p,B){return g(Graph.sanitizeHtml(m),u,p,B)}})();Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});-Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},g=Math.pow(2,53)-1;return function(m){var v=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,A;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(A=-arguments[2])}var G=Number(v.length);G=isNaN(G)?0:0!==G&&isFinite(G)?(0<G?1:-1)*Math.floor(Math.abs(G)):G;G=Math.min(Math.max(G,0),g);for(var S=e(this)?Object(new this(G)):Array(G),F=0,P;F<G;)P=v[F],S[F]=p?"undefined"===typeof A?p(P,F):p.call(A,P,F):P,F+=1;S.length=G;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},g=Math.pow(2,53)-1;return function(m){var u=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,B;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(B=+arguments[2])}var H=Number(u.length);H=isNaN(H)?0:0!==H&&isFinite(H)?(0<H?1:-1)*Math.floor(Math.abs(H)):H;H=Math.min(Math.max(H,0),g);for(var S=e(this)?Object(new this(H)):Array(H),G=0,O;G<H;)O=u[G],S[G]=p?"undefined"===typeof B?p(O,G):p.call(B,O,G):O,G+=1;S.length=H;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,g){return null};mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};-(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(e,g,m,v,p){return"default"==v&&null!=p?"fillcolor"==m.nodeName?p.shapeBackgroundColor:p.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(e,g,m){null==m&&(m=e);return b.apply(this,[e,g,m])}})();-(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,v,p,A,G,S){var F=b.apply(this,arguments);if(null!=g){var P=F.getElementsByTagName("img");0<P.length&&(P[0].className="geToolbarButton geAdaptiveAsset",P[0].style.margin="4px",P[0].style.width="18px")}return F}})();-Graph=function(b,e,g,m,v,p){mxGraph.call(this,b,e,g,m);this.themes=v||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(Z){Z=this.getCurrentCellStyle(Z);-return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var A=null,G=null,S=null,F=null,P=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,l){if("mouseDown"==l.getProperty("eventName")&&this.isEnabled()){Z=l.getProperty("event");var u=Z.getState();l=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=u&&(R=this.isCellSelected(u.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var H=this.selectionCellsHandler.getHandler(u.cell);-if(null==H||null==H.getHandleForEvent(Z)){var U=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),J=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;H=J+2;U.grow(J);if(this.isTableCell(u.cell)&&this.isCellMovable(u.cell)&&!this.isCellSelected(u.cell)&&!(mxUtils.contains(u,Z.getGraphX()-H,Z.getGraphY()-H)&&mxUtils.contains(u,Z.getGraphX()-H,Z.getGraphY()+H)&&mxUtils.contains(u,Z.getGraphX()+H,Z.getGraphY()+H)&&mxUtils.contains(u,Z.getGraphX()+-H,Z.getGraphY()-H))){var W=this.model.getParent(u.cell);H=this.model.getParent(W);if(!this.isCellSelected(H)){J*=l;var aa=2*J;if(this.model.getChildAt(H,0)!=W&&mxUtils.intersects(U,new mxRectangle(u.x,u.y-J,u.width,aa))||this.model.getChildAt(W,0)!=u.cell&&mxUtils.intersects(U,new mxRectangle(u.x-J,u.y,aa,u.height))||mxUtils.intersects(U,new mxRectangle(u.x,u.y+u.height-J,u.width,aa))||mxUtils.intersects(U,new mxRectangle(u.x+u.width-J,u.y,aa,u.height)))W=this.selectionCellsHandler.isHandled(H),this.selectCellForEvent(H,-Z.getEvent()),H=this.selectionCellsHandler.getHandler(H),null!=H&&(J=H.getHandleForEvent(Z),null!=J&&(H.start(Z.getGraphX(),Z.getGraphY(),J),H.blockDelayedSelection=!W,Z.consume()))}}for(;!Z.isConsumed()&&null!=u&&(this.isTableCell(u.cell)||this.isTableRow(u.cell)||this.isTable(u.cell));)this.isSwimlane(u.cell)&&this.isCellMovable(u.cell)&&(H=this.getActualStartSize(u.cell),(0<H.x||0<H.width)&&mxUtils.intersects(U,new mxRectangle(u.x+(H.x-H.width-1)*l+(0==H.x?u.width:0),u.y,1,u.height))||(0<H.y||-0<H.height)&&mxUtils.intersects(U,new mxRectangle(u.x,u.y+(H.y-H.height-1)*l+(0==H.y?u.height:0),u.width,1)))&&(this.selectCellForEvent(u.cell,Z.getEvent()),H=this.selectionCellsHandler.getHandler(u.cell),null!=H&&null!=H.customHandles&&(J=mxEvent.CUSTOM_HANDLE-H.customHandles.length+1,H.start(Z.getGraphX(),Z.getGraphY(),J),Z.consume())),u=this.view.getState(this.model.getParent(u.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,l){if("mouseDown"==l.getProperty("eventName")&&-this.isEnabled()){Z=l.getProperty("event");var u=Z.getState();mxEvent.isAltDown(Z.getEvent())||mxEvent.isControlDown(l)||mxEvent.isShiftDown(l)||R||null==u||!this.model.isEdge(u.cell)||(A=new mxPoint(Z.getGraphX(),Z.getGraphY()),P=this.isCellSelected(u.cell),S=u,G=Z,null!=u.text&&null!=u.text.boundingBox&&mxUtils.contains(u.text.boundingBox,Z.getGraphX(),Z.getGraphY())?F=mxEvent.LABEL_HANDLE:(l=this.selectionCellsHandler.getHandler(u.cell),null!=l&&null!=l.bends&&0<l.bends.length&&(F=l.getHandleForEvent(Z))))}}));-this.addMouseListener({mouseDown:function(Z,l){},mouseMove:mxUtils.bind(this,function(Z,l){Z=this.selectionCellsHandler.handlers.map;for(var u in Z)if(null!=Z[u].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(l.getEvent())){var H=this.tolerance;if(null!=A&&null!=S&&null!=G){if(u=S,null!=F||Math.abs(A.x-l.getGraphX())>H||Math.abs(A.y-l.getGraphY())>H){var U=null;mxEvent.isShiftDown(l.getEvent())||(U=this.selectionCellsHandler.getHandler(u.cell));if(null!=U&&null!=-U.bends&&0<U.bends.length){U.redrawHandles();var J=null!=F?F:U.getHandleForEvent(G),W=this.view.getEdgeStyle(u),aa=W==mxEdgeStyle.EntityRelation;H=u.absolutePoints;P||(J=F);J!=mxEvent.LABEL_HANDLE&&null!=H&&(J=F,null==J&&(Z=new mxRectangle(A.x,A.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,H[0].x,H[0].y)?J=0:mxUtils.contains(Z,H[H.length-1].x,H[H.length-1].y)?J=U.bends.length-1:null!=H&&(null==W&&null==J||W==mxEdgeStyle.SegmentConnector||W==mxEdgeStyle.OrthConnector)&&-(null!=W&&(2==H.length||3==H.length&&(0==Math.round(H[0].x-H[1].x)&&0==Math.round(H[1].x-H[2].x)||0==Math.round(H[0].y-H[1].y)&&0==Math.round(H[1].y-H[2].y)))?J=2:(J=mxUtils.findNearestSegment(u,A.x,A.y),J=null==W?mxEvent.VIRTUAL_HANDLE-J:J+1))),null==J&&(J=mxEvent.VIRTUAL_HANDLE));Z=J==mxEvent.LABEL_HANDLE||0==J||J==U.bends.length-1;if(!aa&&(null!=u.visibleSourceState||null!=u.visibleTargetState)||Z)U.start(l.getGraphX(),l.getGraphX(),J),l.consume(),this.graphHandler.reset()}null!=U&&(this.selectionCellsHandler.isHandlerActive(U)?-this.isCellSelected(u.cell)||(this.selectionCellsHandler.handlers.put(u.cell,U),this.selectCellForEvent(u.cell,l.getEvent())):this.isCellSelected(u.cell)||U.destroy());P=!1;A=G=S=F=null}}else if(u=l.getState(),null!=u&&this.isCellEditable(u.cell)){Z=this.model.getParent(u.cell);U=null;if(this.model.isEdge(u.cell)&&!this.isCellSelected(u.cell)&&!mxEvent.isAltDown(l.getEvent())&&!mxEvent.isShiftDown(l.getEvent())&&!this.isAncestorSelected(u.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==-Z)){if(Z=new mxRectangle(l.getGraphX(),l.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),H=u.absolutePoints,null!=H)null!=u.text&&null!=u.text.boundingBox&&mxUtils.contains(u.text.boundingBox,l.getGraphX(),l.getGraphY())?U="move":mxUtils.contains(Z,H[0].x,H[0].y)||mxUtils.contains(Z,H[H.length-1].x,H[H.length-1].y)?U="pointer":(W=this.view.getEdgeStyle(u),W==mxEdgeStyle.EntityRelation||null==u.visibleSourceState&&null==u.visibleTargetState||(U="crosshair",W!=mxEdgeStyle.SegmentConnector&&-W!=mxEdgeStyle.OrthConnector))||(l=mxUtils.findNearestSegment(u,l.getGraphX(),l.getGraphY()),l<H.length-1&&0<=l&&(U=0==Math.round(H[l].x-H[l+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(l.getEvent())){H=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(l.getGraphX(),l.getGraphY());Z.grow(H);if(this.isTableCell(u.cell)&&this.isCellMovable(u.cell)&&(l=this.model.getParent(u.cell),H=this.model.getParent(l),!this.isCellSelected(H)))if(mxUtils.intersects(Z,new mxRectangle(u.x,-u.y-2,u.width,4))&&this.model.getChildAt(H,0)!=l||mxUtils.intersects(Z,new mxRectangle(u.x,u.y+u.height-2,u.width,4)))U="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(u.x-2,u.y,4,u.height))&&this.model.getChildAt(l,0)!=u.cell||mxUtils.intersects(Z,new mxRectangle(u.x+u.width-2,u.y,4,u.height)))U="col-resize";for(l=u;null==U&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));)this.isSwimlane(l.cell)&&this.isCellMovable(l.cell)&&(H=this.getActualStartSize(l.cell),-J=this.view.scale,(0<H.x||0<H.width)&&mxUtils.intersects(Z,new mxRectangle(l.x+(H.x-H.width-1)*J+(0==H.x?l.width*J:0),l.y,1,l.height))?U="col-resize":(0<H.y||0<H.height)&&mxUtils.intersects(Z,new mxRectangle(l.x,l.y+(H.y-H.height-1)*J+(0==H.y?l.height:0),l.width,1))&&(U="row-resize")),l=this.view.getState(this.model.getParent(l.cell))}null!=U&&u.setCursor(U)}}}),mouseUp:mxUtils.bind(this,function(Z,l){F=A=G=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var T=document.createElement("div");this.cellRenderer.getLabelValue=-function(Z){var l=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);Z.view.graph.isHtmlLabel(Z.cell)&&("0"==mxUtils.getValue(Z.style,"html","0")?l=mxUtils.htmlEntities(l,!1):(Z.lastLabelValue!=l&&(Z.lastLabelValue=l,Z.lastSanitizedLabelValue=Graph.sanitizeHtml(l),T.innerHTML=Z.lastSanitizedLabelValue,Graph.addLightDarkColors(T,null,"simple"==Z.view.graph.getAdaptiveColors())&&(Z.lastSanitizedLabelValue=T.innerHTML)),l=Z.lastSanitizedLabelValue));return l};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);-this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(Z,l){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var c=this.graphHandler.getGuideStates;-this.graphHandler.getGuideStates=function(){var Z=c.apply(this,arguments);if(this.graph.pageVisible){var l=[],u=this.graph.pageFormat,H=this.graph.pageScale,U=u.width*H;u=u.height*H;H=this.graph.view.translate;for(var J=this.graph.view.scale,W=this.graph.getPageLayout(),aa=0;aa<W.width;aa++)l.push(new mxRectangle(((W.x+aa)*U+H.x)*J,(W.y*u+H.y)*J,U*J,u*J));for(aa=1;aa<W.height;aa++)l.push(new mxRectangle((W.x*U+H.x)*J,((W.y+aa)*u+H.y)*J,U*J,u*J));Z=l.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,l){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var f=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var l=f.apply(this,arguments),u=new mxDictionary,H=[],U=0;U<l.length;U++){var J=-this.graph.isTableCell(Z)&&this.graph.isTableCell(l[U])&&this.graph.isCellSelected(l[U])?this.graph.model.getParent(l[U]):this.graph.isTableRow(Z)&&this.graph.isTableRow(l[U])&&this.graph.isCellSelected(l[U])?l[U]:this.graph.getCompositeParent(l[U]);null==J||u.get(J)||(u.put(J,!0),H.push(J))}return H};var k=this.graphHandler.start;this.graphHandler.start=function(Z,l,u,H){var U=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?U=!0:Z=this.graph.model.getParent(Z));U||this.graph.isTableRow(Z)&&-this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));k.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,l){l=this.graph.getCompositeParent(l);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,l,u,H,U,J){var W=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=H&&this.graph.applyNewEdgeStyle(H,[W]);return W};var B=new mxRubberband(this);this.getRubberband=function(){return B};-var z=(new Date).getTime(),C=0,I=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var Z=this.currentState;I.apply(this,arguments);Z!=this.currentState?(z=(new Date).getTime(),C=0):C=(new Date).getTime()-z};var L=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(Z){return mxEvent.isShiftDown(Z.getEvent())&&mxEvent.isAltDown(Z.getEvent())?!1:null!=this.currentState&&Z.getState()==this.currentState&&2E3<C||(null==this.currentState||-"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&L.apply(this,arguments)};var K=this.isToggleEvent;this.isToggleEvent=function(Z){return K.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z)};var O=B.isForceRubberbandEvent;B.isForceRubberbandEvent=function(Z){return O.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Z.getState()&&mxEvent.isTouchEvent(Z.getEvent())};-var da=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(da=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=da)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Z){return mxEvent.isMouseEvent(Z.getEvent())};var ea=this.click;this.click=function(Z){var l=null==Z.state&&-null!=Z.sourceState&&this.isCellLocked(this.getLayerForCell(Z.sourceState.cell));if(this.isEnabled()&&!l||Z.isConsumed())return ea.apply(this,arguments);var u=l?Z.sourceState.cell:Z.getCell();if(null!=u){var H=this.getClickableLinkForCell(u);null!=H?this.isCustomLink(H)?this.customLinkClicked(H,u):this.openLink(H):l&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};var ca=this.tooltipHandler.show;this.tooltipHandler.show=function(){ca.apply(this,arguments);-if(null!=this.div)for(var Z=this.div.getElementsByTagName("a"),l=0;l<Z.length;l++)null!=Z[l].getAttribute("href")&&null==Z[l].getAttribute("target")&&Z[l].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};this.getCursorForMouseEvent=function(Z){var l=null==Z.state&&null!=Z.sourceState&&this.isCellLocked(Z.sourceState.cell);return this.getCursorForCell(l?Z.sourceState.cell:Z.getCell())};var V=this.getCursorForCell;this.getCursorForCell=function(Z){if(!this.isEnabled()||-this.isCellLocked(Z)){if(null!=this.getClickableLinkForCell(Z))return"pointer";if(this.isCellLocked(Z))return"default"}return V.apply(this,arguments)};this.selectRegion=function(Z,l){var u=mxEvent.isAltDown(l)?Z:null;Z=this.getCells(Z.x,Z.y,Z.width,Z.height,null,null,u,null,!0);if(this.isToggleEvent(l))for(u=0;u<Z.length;u++)this.selectCellForEvent(Z[u],l);else this.selectCellsForEvent(Z,l);return Z};var ma=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=-function(Z,l,u){return this.graph.isCellSelected(Z)?!1:ma.apply(this,arguments)};var la=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=la.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(l,u,H){return Z.state==l||this.isCellLocked(this.getLayerForCell(l.cell))&&null==this.getLinkForCell(l.cell)}))):-Z.state=null);return Z};var Y=this.isCellSelectable;this.isCellSelectable=function(Z){return Y.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(Z))};this.isCellLocked=function(Z){for(;null!=Z;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(Z),"locked","0"))return!0;Z=this.model.getParent(Z)}return!1};var fa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,l){"mouseDown"==l.getProperty("eventName")&&(Z=l.getProperty("event").getState(),fa=null==Z||this.isSelectionEmpty()||-this.isCellSelected(Z.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(Z,l){if(!mxEvent.isMultiTouchEvent(l)){Z=l.getProperty("event");var u=l.getProperty("cell");null==u?(Z=mxUtils.convertPoint(this.container,mxEvent.getClientX(Z),mxEvent.getClientY(Z)),B.start(Z.x,Z.y)):null!=fa?this.addSelectionCells(fa):1<this.getSelectionCount()&&this.isCellSelected(u)&&this.removeSelectionCell(u);fa=null;l.consume()}}));this.connectionHandler.selectCells=-function(Z,l){this.graph.setSelectionCell(l||Z)};this.connectionHandler.constraintHandler.isStateIgnored=function(Z,l){var u=Z.view.graph;return l&&(u.isCellSelected(Z.cell)||u.isTableRow(Z.cell)&&u.selectionCellsHandler.isHandled(u.model.getParent(Z.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var Z=this.connectionHandler.constraintHandler;null!=Z.currentFocus&&Z.isStateIgnored(Z.currentFocus,!0)&&(Z.currentFocus=null,Z.constraints=null,Z.destroyIcons());Z.destroyFocusHighlight()}));+(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(e,g,m,u,p){return"default"==u&&null!=p?"fillcolor"==m.nodeName?p.shapeBackgroundColor:p.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(e,g,m){null==m&&(m=e);return b.apply(this,[e,g,m])}})();+(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,u,p,B,H,S){var G=b.apply(this,arguments);if(null!=g){var O=G.getElementsByTagName("img");0<O.length&&(O[0].className="geToolbarButton geAdaptiveAsset",O[0].style.margin="4px",O[0].style.width="18px")}return G}})();+Graph=function(b,e,g,m,u,p){mxGraph.call(this,b,e,g,m);this.themes=u||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(Z){Z=this.getCurrentCellStyle(Z);+return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,G=null,O=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();k=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=A&&(R=this.isCellSelected(A.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var J=this.selectionCellsHandler.getHandler(A.cell);+if(null==J||null==J.getHandleForEvent(Z)){var U=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),P=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;J=P+2;U.grow(P);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&!this.isCellSelected(A.cell)&&!(mxUtils.contains(A,Z.getGraphX()-J,Z.getGraphY()-J)&&mxUtils.contains(A,Z.getGraphX()-J,Z.getGraphY()+J)&&mxUtils.contains(A,Z.getGraphX()+J,Z.getGraphY()+J)&&mxUtils.contains(A,Z.getGraphX()++J,Z.getGraphY()-J))){var T=this.model.getParent(A.cell);J=this.model.getParent(T);if(!this.isCellSelected(J)){P*=k;var W=2*P;if(this.model.getChildAt(J,0)!=T&&mxUtils.intersects(U,new mxRectangle(A.x,A.y-P,A.width,W))||this.model.getChildAt(T,0)!=A.cell&&mxUtils.intersects(U,new mxRectangle(A.x-P,A.y,W,A.height))||mxUtils.intersects(U,new mxRectangle(A.x,A.y+A.height-P,A.width,W))||mxUtils.intersects(U,new mxRectangle(A.x+A.width-P,A.y,W,A.height)))T=this.selectionCellsHandler.isHandled(J),this.selectCellForEvent(J,+Z.getEvent()),J=this.selectionCellsHandler.getHandler(J),null!=J&&(P=J.getHandleForEvent(Z),null!=P&&(J.start(Z.getGraphX(),Z.getGraphY(),P),J.blockDelayedSelection=!T,Z.consume()))}}for(;!Z.isConsumed()&&null!=A&&(this.isTableCell(A.cell)||this.isTableRow(A.cell)||this.isTable(A.cell));)this.isSwimlane(A.cell)&&this.isCellMovable(A.cell)&&(J=this.getActualStartSize(A.cell),(0<J.x||0<J.width)&&mxUtils.intersects(U,new mxRectangle(A.x+(J.x-J.width-1)*k+(0==J.x?A.width:0),A.y,1,A.height))||(0<J.y||+0<J.height)&&mxUtils.intersects(U,new mxRectangle(A.x,A.y+(J.y-J.height-1)*k+(0==J.y?A.height:0),A.width,1)))&&(this.selectCellForEvent(A.cell,Z.getEvent()),J=this.selectionCellsHandler.getHandler(A.cell),null!=J&&null!=J.customHandles&&(P=mxEvent.CUSTOM_HANDLE-J.customHandles.length+1,J.start(Z.getGraphX(),Z.getGraphY(),P),Z.consume())),A=this.view.getState(this.model.getParent(A.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&+this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();mxEvent.isAltDown(Z.getEvent())||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k)||R||null==A||!this.model.isEdge(A.cell)||(B=new mxPoint(Z.getGraphX(),Z.getGraphY()),O=this.isCellSelected(A.cell),S=A,H=Z,null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,Z.getGraphX(),Z.getGraphY())?G=mxEvent.LABEL_HANDLE:(k=this.selectionCellsHandler.getHandler(A.cell),null!=k&&null!=k.bends&&0<k.bends.length&&(G=k.getHandleForEvent(Z))))}}));+this.addMouseListener({mouseDown:function(Z,k){},mouseMove:mxUtils.bind(this,function(Z,k){Z=this.selectionCellsHandler.handlers.map;for(var A in Z)if(null!=Z[A].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var J=this.tolerance;if(null!=B&&null!=S&&null!=H){if(A=S,null!=G||Math.abs(B.x-k.getGraphX())>J||Math.abs(B.y-k.getGraphY())>J){var U=null;mxEvent.isShiftDown(k.getEvent())||(U=this.selectionCellsHandler.getHandler(A.cell));if(null!=U&&null!=+U.bends&&0<U.bends.length){U.redrawHandles();var P=null!=G?G:U.getHandleForEvent(H),T=this.view.getEdgeStyle(A),W=T==mxEdgeStyle.EntityRelation;J=A.absolutePoints;O||(P=G);P!=mxEvent.LABEL_HANDLE&&null!=J&&(P=G,null==P&&(Z=new mxRectangle(B.x,B.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,J[0].x,J[0].y)?P=0:mxUtils.contains(Z,J[J.length-1].x,J[J.length-1].y)?P=U.bends.length-1:null!=J&&(null==T&&null==P||T==mxEdgeStyle.SegmentConnector||T==mxEdgeStyle.OrthConnector)&&+(null!=T&&(2==J.length||3==J.length&&(0==Math.round(J[0].x-J[1].x)&&0==Math.round(J[1].x-J[2].x)||0==Math.round(J[0].y-J[1].y)&&0==Math.round(J[1].y-J[2].y)))?P=2:(P=mxUtils.findNearestSegment(A,B.x,B.y),P=null==T?mxEvent.VIRTUAL_HANDLE-P:P+1))),null==P&&(P=mxEvent.VIRTUAL_HANDLE));Z=P==mxEvent.LABEL_HANDLE||0==P||P==U.bends.length-1;if(!W&&(null!=A.visibleSourceState||null!=A.visibleTargetState)||Z)U.start(k.getGraphX(),k.getGraphX(),P),k.consume(),this.graphHandler.reset()}null!=U&&(this.selectionCellsHandler.isHandlerActive(U)?+this.isCellSelected(A.cell)||(this.selectionCellsHandler.handlers.put(A.cell,U),this.selectCellForEvent(A.cell,k.getEvent())):this.isCellSelected(A.cell)||U.destroy());O=!1;B=H=S=G=null}}else if(A=k.getState(),null!=A&&this.isCellEditable(A.cell)){Z=this.model.getParent(A.cell);U=null;if(this.model.isEdge(A.cell)&&!this.isCellSelected(A.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(A.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==+Z)){if(Z=new mxRectangle(k.getGraphX(),k.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),J=A.absolutePoints,null!=J)null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,k.getGraphX(),k.getGraphY())?U="move":mxUtils.contains(Z,J[0].x,J[0].y)||mxUtils.contains(Z,J[J.length-1].x,J[J.length-1].y)?U="pointer":(T=this.view.getEdgeStyle(A),T==mxEdgeStyle.EntityRelation||null==A.visibleSourceState&&null==A.visibleTargetState||(U="crosshair",T!=mxEdgeStyle.SegmentConnector&&+T!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(A,k.getGraphX(),k.getGraphY()),k<J.length-1&&0<=k&&(U=0==Math.round(J[k].x-J[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){J=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(k.getGraphX(),k.getGraphY());Z.grow(J);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&(k=this.model.getParent(A.cell),J=this.model.getParent(k),!this.isCellSelected(J)))if(mxUtils.intersects(Z,new mxRectangle(A.x,+A.y-2,A.width,4))&&this.model.getChildAt(J,0)!=k||mxUtils.intersects(Z,new mxRectangle(A.x,A.y+A.height-2,A.width,4)))U="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(A.x-2,A.y,4,A.height))&&this.model.getChildAt(k,0)!=A.cell||mxUtils.intersects(Z,new mxRectangle(A.x+A.width-2,A.y,4,A.height)))U="col-resize";for(k=A;null==U&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(J=this.getActualStartSize(k.cell),+P=this.view.scale,(0<J.x||0<J.width)&&mxUtils.intersects(Z,new mxRectangle(k.x+(J.x-J.width-1)*P+(0==J.x?k.width*P:0),k.y,1,k.height))?U="col-resize":(0<J.y||0<J.height)&&mxUtils.intersects(Z,new mxRectangle(k.x,k.y+(J.y-J.height-1)*P+(0==J.y?k.height:0),k.width,1))&&(U="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=U&&A.setCursor(U)}}}),mouseUp:mxUtils.bind(this,function(Z,k){G=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var c=document.createElement("div");this.cellRenderer.getLabelValue=+function(Z){var k=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);Z.view.graph.isHtmlLabel(Z.cell)&&("0"==mxUtils.getValue(Z.style,"html","0")?k=mxUtils.htmlEntities(k,!1):(Z.lastLabelValue!=k&&(Z.lastLabelValue=k,Z.lastSanitizedLabelValue=Graph.sanitizeHtml(k),c.innerHTML=Z.lastSanitizedLabelValue,Graph.addLightDarkColors(c,null,"simple"==Z.view.graph.getAdaptiveColors())&&(Z.lastSanitizedLabelValue=c.innerHTML)),k=Z.lastSanitizedLabelValue));return k};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);+this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(Z,k){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;+this.graphHandler.getGuideStates=function(){var Z=f.apply(this,arguments);if(this.graph.pageVisible){var k=[],A=this.graph.pageFormat,J=this.graph.pageScale,U=A.width*J;A=A.height*J;J=this.graph.view.translate;for(var P=this.graph.view.scale,T=this.graph.getPageLayout(),W=0;W<T.width;W++)k.push(new mxRectangle(((T.x+W)*U+J.x)*P,(T.y*A+J.y)*P,U*P,A*P));for(W=1;W<T.height;W++)k.push(new mxRectangle((T.x*U+J.x)*P,((T.y+W)*A+J.y)*P,U*P,A*P));Z=k.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,k){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var k=l.apply(this,arguments),A=new mxDictionary,J=[],U=0;U<k.length;U++){var P=+this.graph.isTableCell(Z)&&this.graph.isTableCell(k[U])&&this.graph.isCellSelected(k[U])?this.graph.model.getParent(k[U]):this.graph.isTableRow(Z)&&this.graph.isTableRow(k[U])&&this.graph.isCellSelected(k[U])?k[U]:this.graph.getCompositeParent(k[U]);null==P||A.get(P)||(A.put(P,!0),J.push(P))}return J};var t=this.graphHandler.start;this.graphHandler.start=function(Z,k,A,J){var U=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?U=!0:Z=this.graph.model.getParent(Z));U||this.graph.isTableRow(Z)&&+this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,k,A,J,U,P){var T=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=J&&this.graph.applyNewEdgeStyle(J,[T]);return T};var z=new mxRubberband(this);this.getRubberband=function(){return z};+var C=(new Date).getTime(),F=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var Z=this.currentState;N.apply(this,arguments);Z!=this.currentState?(C=(new Date).getTime(),F=0):F=(new Date).getTime()-C};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(Z){return mxEvent.isShiftDown(Z.getEvent())&&mxEvent.isAltDown(Z.getEvent())?!1:null!=this.currentState&&Z.getState()==this.currentState&&2E3<F||(null==this.currentState||+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var I=this.isToggleEvent;this.isToggleEvent=function(Z){return I.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z)};var ca=z.isForceRubberbandEvent;z.isForceRubberbandEvent=function(Z){return ca.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Z.getState()&&mxEvent.isTouchEvent(Z.getEvent())};+var da=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(da=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=da)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Z){return mxEvent.isMouseEvent(Z.getEvent())};var ea=this.click;this.click=function(Z){var k=null==Z.state&&+null!=Z.sourceState&&this.isCellLocked(this.getLayerForCell(Z.sourceState.cell));if(this.isEnabled()&&!k||Z.isConsumed())return ea.apply(this,arguments);var A=k?Z.sourceState.cell:Z.getCell();if(null!=A){var J=this.getClickableLinkForCell(A);null!=J?this.isCustomLink(J)?this.customLinkClicked(J,A):this.openLink(J):k&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=function(){X.apply(this,arguments);+if(null!=this.div)for(var Z=this.div.getElementsByTagName("a"),k=0;k<Z.length;k++)null!=Z[k].getAttribute("href")&&null==Z[k].getAttribute("target")&&Z[k].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};this.getCursorForMouseEvent=function(Z){var k=null==Z.state&&null!=Z.sourceState&&this.isCellLocked(Z.sourceState.cell);return this.getCursorForCell(k?Z.sourceState.cell:Z.getCell())};var ba=this.getCursorForCell;this.getCursorForCell=function(Z){if(!this.isEnabled()||+this.isCellLocked(Z)){if(null!=this.getClickableLinkForCell(Z))return"pointer";if(this.isCellLocked(Z))return"default"}return ba.apply(this,arguments)};this.selectRegion=function(Z,k){var A=mxEvent.isAltDown(k)?Z:null;Z=this.getCells(Z.x,Z.y,Z.width,Z.height,null,null,A,null,!0);if(this.isToggleEvent(k))for(A=0;A<Z.length;A++)this.selectCellForEvent(Z[A],k);else this.selectCellsForEvent(Z,k);return Z};var ha=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=+function(Z,k,A){return this.graph.isCellSelected(Z)?!1:ha.apply(this,arguments)};var ma=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=ma.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(k,A,J){return Z.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):+Z.state=null);return Z};var Y=this.isCellSelectable;this.isCellSelectable=function(Z){return Y.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(Z))};this.isCellLocked=function(Z){for(;null!=Z;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(Z),"locked","0"))return!0;Z=this.model.getParent(Z)}return!1};var la=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){"mouseDown"==k.getProperty("eventName")&&(Z=k.getProperty("event").getState(),la=null==Z||this.isSelectionEmpty()||+this.isCellSelected(Z.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(Z,k){if(!mxEvent.isMultiTouchEvent(k)){Z=k.getProperty("event");var A=k.getProperty("cell");null==A?(Z=mxUtils.convertPoint(this.container,mxEvent.getClientX(Z),mxEvent.getClientY(Z)),z.start(Z.x,Z.y)):null!=la?this.addSelectionCells(la):1<this.getSelectionCount()&&this.isCellSelected(A)&&this.removeSelectionCell(A);la=null;k.consume()}}));this.connectionHandler.selectCells=+function(Z,k){this.graph.setSelectionCell(k||Z)};this.connectionHandler.constraintHandler.isStateIgnored=function(Z,k){var A=Z.view.graph;return k&&(A.isCellSelected(Z.cell)||A.isTableRow(Z.cell)&&A.selectionCellsHandler.isHandled(A.model.getParent(Z.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var Z=this.connectionHandler.constraintHandler;null!=Z.currentFocus&&Z.isStateIgnored(Z.currentFocus,!0)&&(Z.currentFocus=null,Z.constraints=null,Z.destroyIcons());Z.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.drawio.com/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than draw.io --\x3e";Graph.colorStyles=[mxConstants.STYLE_FONTCOLOR,mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_IMAGE_BORDER,mxConstants.STYLE_IMAGE_BACKGROUND,mxConstants.STYLE_LABEL_BORDERCOLOR,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR];Graph.textStyles="fontFamily fontSource fontSize fontColor fontStyle textOpacity labelBorderColor labelBackgroundColor autosize resizable".split(" ");@@ -2310,77 +2309,77 @@ Graph.cellStyles=mxUtils.addItems(mxUtils.addItems(mxUtils.addItems("rounded shaGraph.edgeStyles),Graph.cellStyleGroups);Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");Graph.backupStyleAttribute="data-mx-given-colors";Graph.newColorPlaceholder="rgba(0, 0, 0, 0)";Graph.newBackgroundPlaceholder="rgb(0, 0, 0)";Graph.defaultAdaptiveColors=window.mxIsElectron||"0"==urlParams.contrast?"simple":"auto";Graph.getDefaultAdaptiveColorsKey=function(){return"auto"==Graph.defaultAdaptiveColors?"automatic":Graph.defaultAdaptiveColors};Graph.createOffscreenGraph=function(b){var e=new Graph(document.createElement("div"));e.stylesheet.styles=mxUtils.clone(b.styles);e.resetViewOnRootChange=!1;e.setConnectable(!1);e.gridEnabled=!1;e.autoScroll=!1;e.setTooltips(!1);e.setEnabled(!1);e.container.style.visibility="hidden";e.container.style.position="absolute";e.container.style.overflow="hidden";e.container.style.height="1px";e.container.style.width="1px";return e};-Graph.createSvgImage=function(b,e,g,m,v){g=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=m&&null!=v?'viewBox="0 0 '+m+" "+v+'" ':"")+'version="1.1" style="color-scheme: light dark;">'+g+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0)),b,e)};+Graph.createSvgImage=function(b,e,g,m,u){g=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=m&&null!=u?'viewBox="0 0 '+m+" "+u+'" ':"")+'version="1.1" style="color-scheme: light dark;">'+g+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0)),b,e)};Graph.getSvgFromDataUri=function(b){return null!=b&&"data:image/svg"==b.substring(0,14)?Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+decodeURIComponent(escape(atob(b.substring(b.indexOf(",")+1)))):null};-Graph.createSvgNode=function(b,e,g,m,v){var p=mxUtils.createXmlDocument(),A=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=v&&A.setAttribute("style","background: "+v.light+"; background-color: "+v.cssText+";");null==p.createElementNS?(A.setAttribute("xmlns",mxConstants.NS_SVG),A.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):A.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);A.setAttribute("version","1.1");A.setAttribute("width",-g+"px");A.setAttribute("height",m+"px");A.setAttribute("viewBox",b+" "+e+" "+g+" "+m);p.appendChild(A);return A};-Graph.htmlToPng=function(b,e,g,m,v,p){v=null!=v?v:"";p=null!=p?p:Editor.htmlRasterScale;var A=document.createElement("canvas");A.width=e*p;A.height=g*p;var G=document.createElement("img");G.onload=mxUtils.bind(this,function(){try{var F=A.getContext("2d");F.scale(p,p);F.drawImage(G,0,0);m(A.toDataURL())}catch(P){m(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);G.onerror=-function(F){m(null)};G.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+g+'">'+(""!=v?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+v+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};-Graph.addLightDarkColors=function(b,e,g,m){function v(T,c,f){return null!=m?m(T,c,f):mxUtils.isValidColor(f)?(null==A&&null!=e&&(A={}),null!=A&&(A[c]=T.style.getPropertyValue(c)),f=mxUtils.getLightDarkColor(f,null,null,g),T.style.setProperty(c,f.cssText),!0):!1}for(var p=b.getElementsByTagName("*"),A=null,G=!1,S=0;S<p.length;S++)if(p[S]!=b&&null!=p[S].style){A=null;for(var F=0;F<p[S].style.length;F++){var P=p[S].style.item(F),R=p[S].style.getPropertyValue(P);G=v(p[S],P,R)||G}"FONT"==p[S].nodeName&&-""==p[S].style.getPropertyValue("color")&&(R=p[S].getAttribute("color"),G=v(p[S],"color",R)||G);null!=e&&null!=A&&p[S].setAttribute(e,JSON.stringify(A))}return G};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var v=b[m].getAttribute(e);if(null!=v){b[m].removeAttribute(e);var p=JSON.parse(v),A;for(A in p){var G=p[A];""==G?(b[m].style[A]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[A]=G;g=!0}}}catch(S){}return g};-Graph.getGivenColor=function(b,e){var g=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var m=b.getAttribute(Graph.backupStyleAttribute);if(null!=m){var v=JSON.parse(m);null!=v&&null!=v[e]&&("color"==e&&"FONT"==b.nodeName&&""==v[e]&&null!=b.getAttribute("color")?g=b.getAttribute("color"):""!=v[e]&&(g=v[e]))}}catch(p){}null==g&&""!=b.style[e]&&(g=b.style[e])}return g};-Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,v=g?"color":"background-color",p=b.getElementsByTagName("*"),A=[],G=0;G<p.length;G++)A.push({node:p[G],value:p[G].style[v]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(G=0;G<b.length;G++){if(G<A.length&&A[G].node==b[G]&&A[G].value!=b[G].style[v]&&""==b[G].style[v])try{if(p=b[G].getAttribute(Graph.backupStyleAttribute),null!=p){var S=JSON.parse(p);S[v]=-"";b[G].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(F){}if(g&&b[G].getAttribute("color")==m||b[G].style[v]==m){g&&b[G].getAttribute("color")==m&&b[G].removeAttribute("color");b[G].style[v]=e!=mxConstants.NONE?mxUtils.getLightDarkColor(e).cssText:null;try{p=b[G].getAttribute(Graph.backupStyleAttribute),S=null!=p?JSON.parse(p):{},S[v]=e!=mxConstants.NONE?e:"",b[G].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(F){}if(g&&mxClient.IS_FF){e=b[G];g=e.firstChild;if(null!=-g&&"A"==g.nodeName&&null==g.nextSibling&&null!=g.firstChild){e.parentNode.insertBefore(g,e);for(m=g.firstChild;null!=m;)v=m.nextSibling,e.appendChild(m),m=v;g.appendChild(e)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=b.charCodeAt(g);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=String.fromCharCode(b[g]);return e.join("")};+Graph.createSvgNode=function(b,e,g,m,u){var p=mxUtils.createXmlDocument(),B=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=u&&B.setAttribute("style","background: "+u.light+"; background-color: "+u.cssText+";");null==p.createElementNS?(B.setAttribute("xmlns",mxConstants.NS_SVG),B.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):B.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);B.setAttribute("version","1.1");B.setAttribute("width",+g+"px");B.setAttribute("height",m+"px");B.setAttribute("viewBox",b+" "+e+" "+g+" "+m);p.appendChild(B);return B};+Graph.htmlToPng=function(b,e,g,m,u,p){u=null!=u?u:"";p=null!=p?p:Editor.htmlRasterScale;var B=document.createElement("canvas");B.width=e*p;B.height=g*p;var H=document.createElement("img");H.onload=mxUtils.bind(this,function(){try{var G=B.getContext("2d");G.scale(p,p);G.drawImage(H,0,0);m(B.toDataURL())}catch(O){m(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);H.onerror=+function(G){m(null)};H.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+g+'">'+(""!=u?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+u+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};+Graph.addLightDarkColors=function(b,e,g,m){function u(c,f,l){return null!=m?m(c,f,l):mxUtils.isValidColor(l)?(null==B&&null!=e&&(B={}),null!=B&&(B[f]=c.style.getPropertyValue(f)),l=mxUtils.getLightDarkColor(l,null,null,g),c.style.setProperty(f,l.cssText),!0):!1}for(var p=b.getElementsByTagName("*"),B=null,H=!1,S=0;S<p.length;S++)if(p[S]!=b&&null!=p[S].style){B=null;for(var G=0;G<p[S].style.length;G++){var O=p[S].style.item(G),R=p[S].style.getPropertyValue(O);H=u(p[S],O,R)||H}"FONT"==p[S].nodeName&&+""==p[S].style.getPropertyValue("color")&&(R=p[S].getAttribute("color"),H=u(p[S],"color",R)||H);null!=e&&null!=B&&p[S].setAttribute(e,JSON.stringify(B))}return H};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var u=b[m].getAttribute(e);if(null!=u){b[m].removeAttribute(e);var p=JSON.parse(u),B;for(B in p){var H=p[B];""==H?(b[m].style[B]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[B]=H;g=!0}}}catch(S){}return g};+Graph.getGivenColor=function(b,e){var g=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var m=b.getAttribute(Graph.backupStyleAttribute);if(null!=m){var u=JSON.parse(m);null!=u&&null!=u[e]&&("color"==e&&"FONT"==b.nodeName&&""==u[e]&&null!=b.getAttribute("color")?g=b.getAttribute("color"):""!=u[e]&&(g=u[e]))}}catch(p){}null==g&&""!=b.style[e]&&(g=b.style[e])}return g};+Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,u=g?"color":"background-color",p=b.getElementsByTagName("*"),B=[],H=0;H<p.length;H++)B.push({node:p[H],value:p[H].style[u]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(H=0;H<b.length;H++){if(H<B.length&&B[H].node==b[H]&&B[H].value!=b[H].style[u]&&""==b[H].style[u])try{if(p=b[H].getAttribute(Graph.backupStyleAttribute),null!=p){var S=JSON.parse(p);S[u]=+"";b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(G){}if(g&&b[H].getAttribute("color")==m||b[H].style[u]==m){g&&b[H].getAttribute("color")==m&&b[H].removeAttribute("color");b[H].style[u]=e!=mxConstants.NONE?mxUtils.getLightDarkColor(e).cssText:null;try{p=b[H].getAttribute(Graph.backupStyleAttribute),S=null!=p?JSON.parse(p):{},S[u]=e!=mxConstants.NONE?e:"",b[H].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(G){}if(g&&mxClient.IS_FF){e=b[H];g=e.firstChild;if(null!=+g&&"A"==g.nodeName&&null==g.nextSibling&&null!=g.firstChild){e.parentNode.insertBefore(g,e);for(m=g.firstChild;null!=m;)u=m.nextSibling,e.appendChild(m),m=u;g.appendChild(e)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=b.charCodeAt(g);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=String.fromCharCode(b[g]);return e.join("")};Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,g){return String.fromCharCode(parseInt(g,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var g=b.byteLength,m=0;m<g;m++)e+=String.fromCharCode(b[m]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})};-Graph.arrayBufferIndexOfString=function(b,e,g){var m=e.charCodeAt(0),v=1,p=-1;for(g=g||0;g<b.byteLength;g++)if(b[g]==m){p=g;break}for(g=p+1;-1<p&&g<b.byteLength&&g<p+e.length-1;g++){if(b[g]!=e.charCodeAt(v))return Graph.arrayBufferIndexOfString(b,e,p+1);v++}return v==e.length-1?p:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};+Graph.arrayBufferIndexOfString=function(b,e,g){var m=e.charCodeAt(0),u=1,p=-1;for(g=g||0;g<b.byteLength;g++)if(b[g]==m){p=g;break}for(g=p+1;-1<p&&g<b.byteLength&&g<p+e.length-1;g++){if(b[g]!=e.charCodeAt(u))return Graph.arrayBufferIndexOfString(b,e,p+1);u++}return u==e.length-1?p:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};Graph.decompress=function(b,e,g){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return g?e:Graph.zapGremlins(e)};-Graph.fadeNodes=function(b,e,g,m,v){v=null!=v?v:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+v+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},v)},0)};-Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,v){function p(P,R){if(P.getModel().isVertex(R)){var T=P.container.scrollWidth/2,c=P.container.scrollHeight/2;P.rootCell=R.referenceCell||R;P.getModel().beginUpdate();try{for(var f=R.referenceCell||R,k=m.model.getCell(f.sourceCellId),B=m.getEdges(k,null,!0,!0,!1,!0),z=[],C=0;C<B.length;C++)null!=B[C].getTerminal(!0)&&null!=B[C].getTerminal(!1)&&m.isCellVisible(B[C])&&-!m.isEdgeIgnored(B[C])&&m.isCellVisible(B[C].getTerminal(!0))&&m.isCellVisible(B[C].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(B[C]))&&z.push(B[C]);z=B=z;if(null!=R.startIndex||0<pageSize&&B.length>pageSize){var I=R.startIndex||0;z=B.slice(Math.max(0,I),Math.min(B.length,I+pageSize))}z=m.getOpposites(z,k).concat(z);var L=P.cloneCells(z);for(C=0;C<z.length;C++)if(L[C].sourceCellId=z[C].id,P.model.isEdge(L[C]))for(L[C].geometry.x=0,L[C].geometry.y=0,L[C].geometry.points=null,L[C].setStyle(L[C].getStyle()+-";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),L[C].setTerminal(f,null==L[C].getTerminal(!0)),k=0;k<L[C].getChildCount();k++){var K=L[C].getChildAt(k);null!=K.geometry&&K.geometry.relative&&(K.setStyle(K.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),K.geometry.offset=new mxPoint(0,0),K.geometry.y=0,K.geometry.x=.5>K.geometry.x?-.8:.5<K.geometry.x?.8:0)}if(0<R.startIndex){var O=P.createVertex(null,null,mxResources.get("previousPage")+-" ("+Math.ceil((R.startIndex||0)/pageSize)+"/"+Math.ceil(B.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");O.referenceCell=f;O.startIndex=Math.max(0,(R.startIndex||0)-pageSize);L.splice(0,0,O)}if(B.length>(R.startIndex||0)+pageSize){var da=P.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((R.startIndex||0)/pageSize)+2)+"/"+Math.ceil(B.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");da.referenceCell=-f;da.startIndex=(R.startIndex||0)+pageSize;L.splice(0,0,da)}for(var ea in P.getModel().cells){var ca=P.getModel().getCell(ea);ca!=P.rootCell&&!P.getModel().isAncestor(P.rootCell,ca)&&P.getModel().isVertex(ca)&&P.removeCells([ca])}P.addCells(L);var V=P.getModel().getGeometry(P.rootCell);null!=V&&(V=V.clone(),V.x=T-V.width/2,V.y=c-V.height/3,P.getModel().setGeometry(P.rootCell,V));R=[];for(ea in P.getModel().cells)ca=P.getModel().getCell(ea),ca!=P.rootCell&&P.getModel().isVertex(ca)&&P.getModel().getParent(ca)==-P.getDefaultParent()&&(R.push(ca),V=P.getModel().getGeometry(ca),null!=V&&(V.x=T-V.width/2,V.y=c-V.height/2));var ma=R.length,la=2*Math.PI/ma,Y=Math.max(minSize,Math.min(P.container.scrollWidth/2.5-80,P.container.scrollHeight/2.5-80));for(T=0;T<ma;T++)V=P.getModel().getGeometry(R[T]),null!=V&&(V=V.clone(),V.x+=Y*Math.sin(T*la),V.y+=Y*Math.cos(T*la),P.getModel().setGeometry(R[T],V))}finally{P.getModel().endUpdate()}}}var A=document.createElement("div");A.style.position="absolute";A.style.display="block";-A.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";A.style.width="100%";A.style.height="100%";A.style.left="0px";A.style.top="0px";A.style.zIndex=2;var G=document.createElement("img");G.setAttribute("src",Editor.closeBlackImage);G.style.position="absolute";G.style.cursor="pointer";G.style.right="10px";G.style.top="10px";A.appendChild(G);var S=document.createElement("div");S.style.position="absolute";S.style.cursor="pointer";S.style.right="38px";S.style.top="14px";S.style.textAlign=-"right";S.style.verticalAlign="top";mxUtils.write(S,mxResources.get("close"));A.appendChild(S);document.body.appendChild(A);var F=function(P){27==P.keyCode&&G.click()};mxEvent.addListener(document,"keydown",F);(function(P){if(mxClient.isBrowserSupported()){var R=new Graph(P);R.keepEdgesInBackground=!0;R.isCellResizable=function(){return!1};R.isCellRotatable=function(){return!1};R.getCursorForCell=function(z){return this.model.isVertex(z)?"pointer":null};R.getFoldingImage=function(){return null};var T=-function(){mxEvent.removeListener(document,"keydown",F);P.parentNode.removeChild(P);m.scrollCellToVisible(v)};mxEvent.addListener(G,"click",T);mxEvent.addListener(S,"click",T);R.setEnabled(!1);var c=R.click;R.click=function(z){var C=z.getCell(),I=null!=C?null!=C.referenceCell?C.referenceCell:C:null;null!=C&&R.rootCell!=C&&0<R.getEdges(I).length?p(R,C):c.apply(this,arguments)};T=R.container.scrollWidth/2;var f=R.container.scrollHeight/3;R.model.beginUpdate();var k=R.importCells([v])[0];k.sourceCellId=-v.id;k.geometry.x=T-k.geometry.width/2;k.geometry.y=f-k.geometry.height/2;R.model.endUpdate();var B=!1;R.getModel().addListener(mxEvent.CHANGE,function(z,C){B||(z=C.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,R.labelsVisible=!1,B=!0,mxEffects.animateChanges(R,z,function(){var I=new mxParallelEdgeLayout(R);I.spacing=60;var L=I.layout;I.layout=function(K){I.spacing=Math.min(60,Math.max(30,60-5*K.length));L.apply(this,arguments)};I.execute(R.getDefaultParent());mxText.prototype.enableBoundingBox=-!0;R.labelsVisible=!0;R.tooltipHandler.hide();R.refresh();B=!1}))});p(R,k)}else mxUtils.error("Browser is not supported!",200,!1)})(A)})(b,e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};+Graph.fadeNodes=function(b,e,g,m,u){u=null!=u?u:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+u+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},u)},0)};+Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,u){function p(O,R){if(O.getModel().isVertex(R)){var c=O.container.scrollWidth/2,f=O.container.scrollHeight/2;O.rootCell=R.referenceCell||R;O.getModel().beginUpdate();try{for(var l=R.referenceCell||R,t=m.model.getCell(l.sourceCellId),z=m.getEdges(t,null,!0,!0,!1,!0),C=[],F=0;F<z.length;F++)null!=z[F].getTerminal(!0)&&null!=z[F].getTerminal(!1)&&m.isCellVisible(z[F])&&+!m.isEdgeIgnored(z[F])&&m.isCellVisible(z[F].getTerminal(!0))&&m.isCellVisible(z[F].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(z[F]))&&C.push(z[F]);C=z=C;if(null!=R.startIndex||0<pageSize&&z.length>pageSize){var N=R.startIndex||0;C=z.slice(Math.max(0,N),Math.min(z.length,N+pageSize))}C=m.getOpposites(C,t).concat(C);var K=O.cloneCells(C);for(F=0;F<C.length;F++)if(K[F].sourceCellId=C[F].id,O.model.isEdge(K[F]))for(K[F].geometry.x=0,K[F].geometry.y=0,K[F].geometry.points=null,K[F].setStyle(K[F].getStyle()++";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[F].setTerminal(l,null==K[F].getTerminal(!0)),t=0;t<K[F].getChildCount();t++){var I=K[F].getChildAt(t);null!=I.geometry&&I.geometry.relative&&(I.setStyle(I.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),I.geometry.offset=new mxPoint(0,0),I.geometry.y=0,I.geometry.x=.5>I.geometry.x?-.8:.5<I.geometry.x?.8:0)}if(0<R.startIndex){var ca=O.createVertex(null,null,mxResources.get("previousPage")++" ("+Math.ceil((R.startIndex||0)/pageSize)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ca.referenceCell=l;ca.startIndex=Math.max(0,(R.startIndex||0)-pageSize);K.splice(0,0,ca)}if(z.length>(R.startIndex||0)+pageSize){var da=O.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((R.startIndex||0)/pageSize)+2)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");+da.referenceCell=l;da.startIndex=(R.startIndex||0)+pageSize;K.splice(0,0,da)}for(var ea in O.getModel().cells){var X=O.getModel().getCell(ea);X!=O.rootCell&&!O.getModel().isAncestor(O.rootCell,X)&&O.getModel().isVertex(X)&&O.removeCells([X])}O.addCells(K);var ba=O.getModel().getGeometry(O.rootCell);null!=ba&&(ba=ba.clone(),ba.x=c-ba.width/2,ba.y=f-ba.height/3,O.getModel().setGeometry(O.rootCell,ba));R=[];for(ea in O.getModel().cells)X=O.getModel().getCell(ea),X!=O.rootCell&&O.getModel().isVertex(X)&&+O.getModel().getParent(X)==O.getDefaultParent()&&(R.push(X),ba=O.getModel().getGeometry(X),null!=ba&&(ba.x=c-ba.width/2,ba.y=f-ba.height/2));var ha=R.length,ma=2*Math.PI/ha,Y=Math.max(minSize,Math.min(O.container.scrollWidth/2.5-80,O.container.scrollHeight/2.5-80));for(c=0;c<ha;c++)ba=O.getModel().getGeometry(R[c]),null!=ba&&(ba=ba.clone(),ba.x+=Y*Math.sin(c*ma),ba.y+=Y*Math.cos(c*ma),O.getModel().setGeometry(R[c],ba))}finally{O.getModel().endUpdate()}}}var B=document.createElement("div");B.style.position=+"absolute";B.style.display="block";B.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.style.width="100%";B.style.height="100%";B.style.left="0px";B.style.top="0px";B.style.zIndex=2;var H=document.createElement("img");H.setAttribute("src",Editor.closeBlackImage);H.style.position="absolute";H.style.cursor="pointer";H.style.right="10px";H.style.top="10px";B.appendChild(H);var S=document.createElement("div");S.style.position="absolute";S.style.cursor="pointer";S.style.right="38px";S.style.top=+"14px";S.style.textAlign="right";S.style.verticalAlign="top";mxUtils.write(S,mxResources.get("close"));B.appendChild(S);document.body.appendChild(B);var G=function(O){27==O.keyCode&&H.click()};mxEvent.addListener(document,"keydown",G);(function(O){if(mxClient.isBrowserSupported()){var R=new Graph(O);R.keepEdgesInBackground=!0;R.isCellResizable=function(){return!1};R.isCellRotatable=function(){return!1};R.getCursorForCell=function(C){return this.model.isVertex(C)?"pointer":null};R.getFoldingImage=+function(){return null};var c=function(){mxEvent.removeListener(document,"keydown",G);O.parentNode.removeChild(O);m.scrollCellToVisible(u)};mxEvent.addListener(H,"click",c);mxEvent.addListener(S,"click",c);R.setEnabled(!1);var f=R.click;R.click=function(C){var F=C.getCell(),N=null!=F?null!=F.referenceCell?F.referenceCell:F:null;null!=F&&R.rootCell!=F&&0<R.getEdges(N).length?p(R,F):f.apply(this,arguments)};c=R.container.scrollWidth/2;var l=R.container.scrollHeight/3;R.model.beginUpdate();var t=R.importCells([u])[0];+t.sourceCellId=u.id;t.geometry.x=c-t.geometry.width/2;t.geometry.y=l-t.geometry.height/2;R.model.endUpdate();var z=!1;R.getModel().addListener(mxEvent.CHANGE,function(C,F){z||(C=F.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,R.labelsVisible=!1,z=!0,mxEffects.animateChanges(R,C,function(){var N=new mxParallelEdgeLayout(R);N.spacing=60;var K=N.layout;N.layout=function(I){N.spacing=Math.min(60,Math.max(30,60-5*I.length));K.apply(this,arguments)};N.execute(R.getDefaultParent());mxText.prototype.enableBoundingBox=+!0;R.labelsVisible=!0;R.tooltipHandler.hide();R.refresh();z=!1}))});p(R,t)}else mxUtils.error("Browser is not supported!",200,!1)})(B)})(b,e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};Graph.removePasteFormatting=function(b,e){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var g=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var m=Graph.createTabNode(4);b.parentNode.replaceChild(m,b);b=m}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=g&&"P"==g.nodeName&&"p1"==g.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!e&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(m=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,m.outerHTML))}b=g}};Graph.createTabNode=function(b){var e="\t";if(null!=b)for(e="";0<b;)e+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(e));return b};Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};-Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var g=document.createElement("div");g.style.position="absolute";g.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),v=m.indexOf("<svg");if(0<=v){g.innerHTML=Graph.sanitizeHtml(m.substring(v));var p=g.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(g);try{m=e=-1;var A=p[0].getAttribute("width"),G=p[0].getAttribute("height");A=null!=A&&"%"!=A.charAt(A.length-1)?parseFloat(A):NaN;G=null!=G&&"%"!=G.charAt(G.length-1)?parseFloat(G):NaN;var S=p[0].getAttribute("viewBox");v=null;if(null!=S&&!isNaN(A)&&!isNaN(G)){var F=S.split(" ");4<=S.length&&(e=parseFloat(F[2])/A,m=parseFloat(F[3])/G,v=new mxRectangle(parseFloat(F[0]),parseFloat(F[1]),parseFloat(F[2]),parseFloat(F[3])))}var P=p[0].getBBox();0<P.width&&0<P.height&&(null==v||P.width*P.height<v.width*v.height*-.7)&&(g.getElementsByTagName("svg")[0].setAttribute("viewBox",P.x+" "+P.y+" "+P.width+" "+P.height),g.getElementsByTagName("svg")[0].setAttribute("width",P.width/e),g.getElementsByTagName("svg")[0].setAttribute("height",P.height/m))}catch(R){}finally{document.body.removeChild(g)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(R){}return b};+Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var g=document.createElement("div");g.style.position="absolute";g.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),u=m.indexOf("<svg");if(0<=u){g.innerHTML=Graph.sanitizeHtml(m.substring(u));var p=g.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(g);try{m=e=+1;var B=p[0].getAttribute("width"),H=p[0].getAttribute("height");B=null!=B&&"%"!=B.charAt(B.length-1)?parseFloat(B):NaN;H=null!=H&&"%"!=H.charAt(H.length-1)?parseFloat(H):NaN;var S=p[0].getAttribute("viewBox");u=null;if(null!=S&&!isNaN(B)&&!isNaN(H)){var G=S.split(" ");4<=S.length&&(e=parseFloat(G[2])/B,m=parseFloat(G[3])/H,u=new mxRectangle(parseFloat(G[0]),parseFloat(G[1]),parseFloat(G[2]),parseFloat(G[3])))}var O=p[0].getBBox();0<O.width&&0<O.height&&(null==u||O.width*O.height<u.width*u.height*+.7)&&(g.getElementsByTagName("svg")[0].setAttribute("viewBox",O.x+" "+O.y+" "+O.width+" "+O.height),g.getElementsByTagName("svg")[0].setAttribute("width",O.width/e),g.getElementsByTagName("svg")[0].setAttribute("height",O.height/m))}catch(R){}finally{document.body.removeChild(g)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(R){}return b};Graph.createRemoveIcon=function(b,e){var g=document.createElement("img");g.setAttribute("src",Dialog.prototype.clearImage);g.setAttribute("title",b);g.setAttribute("width","13");g.setAttribute("height","10");g.style.marginLeft="4px";g.style.marginBottom="-1px";g.style.cursor="pointer";mxEvent.addListener(g,"click",e);return g};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};-Graph.rewritePageLinks=function(b,e){function g(v,p){var A=v.getAttribute(p);if(null!=A){Graph.isPageLink(A)&&(A="#"+A.substring(A.indexOf(":")+1));var G=p;e&&"xlink:href"==p&&(v.removeAttribute(p),G="href");v.setAttribute(G,A)}}b=b.getElementsByTagName("a");if(null!=b)for(var m=0;m<b.length;m++)g(b[m],"href"),g(b[m],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};+Graph.rewritePageLinks=function(b,e){function g(u,p){var B=u.getAttribute(p);if(null!=B){Graph.isPageLink(B)&&(B="#"+B.substring(B.indexOf(":")+1));var H=p;e&&"xlink:href"==p&&(u.removeAttribute(p),H="href");u.setAttribute(H,B)}}b=b.getElementsByTagName("a");if(null!=b)for(var m=0;m<b.length;m++)g(b[m],"href"),g(b[m],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBackground=!1;Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeForegroundColor="light-dark(#000000, #ffffff)";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var v=g.view.graph.tolerance,p=!0,A=null,G=mxUtils.bind(this,function(P){p=!0;A=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),S=mxUtils.bind(this,function(P){p=p&&null!=A&&Math.abs(A.x-mxEvent.getClientX(P))<v&&Math.abs(A.y-mxEvent.getClientY(P))<v}),F=mxUtils.bind(this,function(P){if(p)for(var R=mxEvent.getSource(P);null!=-R&&R!=m.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,P);break}R=R.parentNode}});mxEvent.addGestureListeners(m.node,G,S,F);mxEvent.addListener(m.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var u=g.view.graph.tolerance,p=!0,B=null,H=mxUtils.bind(this,function(O){p=!0;B=new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O))}),S=mxUtils.bind(this,function(O){p=p&&null!=B&&Math.abs(B.x-mxEvent.getClientX(O))<u&&Math.abs(B.y-mxEvent.getClientY(O))<u}),G=mxUtils.bind(this,function(O){if(p)for(var R=mxEvent.getSource(O);null!=+R&&R!=m.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,O);break}R=R.parentNode}});mxEvent.addGestureListeners(m.node,H,S,G);mxEvent.addListener(m.node,"click",function(O){mxEvent.consume(O)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&this.graph.customLinkClicked(m)&&mxEvent.consume(g))}))}}this.initLayoutManager()};-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(A){return!this.isSpecialColor(A.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(A.style,"lineShape",null)&&(this.model.isVertex(A.cell)||"arrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"wire"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(A.style,-mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(A){return this.isFillState(A)&&"wire"!=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(A){return!0};Graph.prototype.getTextColor=function(A,G){for(var S=A==this.cellEditor.textarea&&G?"default":Graph.getGivenColor(A,G?"color":-"background-color");null==S&&null!=A&&A!=this.cellEditor.textarea.parentNode;)S=A==this.cellEditor.textarea&&G?"default":Graph.getGivenColor(A,"color"),A=A.parentNode;if("rgba(0, 0, 0, 0)"==S||"transparent"==S)S=mxConstants.NONE;return S};Graph.prototype.isSpecialColor=function(A){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],A)};Graph.prototype.isGlassState=function(A){A=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null);-return"label"==A||"rectangle"==A||"internalStorage"==A||"ext"==A||"umlLifeline"==A||"swimlane"==A||"process"==A};Graph.prototype.isRoundedState=function(A){return null!=A.shape?A.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(A){var G=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(A.style,mxConstants.STYLE_CURVED,!1)&&("connector"==G||"filledEdge"==G||"wire"==-G)};Graph.prototype.isAutoSizeState=function(A){return"1"==mxUtils.getValue(A.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(A){return null!=mxUtils.getValue(A.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(A){return!0};Graph.prototype.getVerticesAndEdges=function(A,G){A=null!=A?A:!0;G=null!=G?G:!0;var S=this.model;return S.filterDescendants(function(F){return A&&S.isVertex(F)||G&&S.isEdge(F)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=-function(A,G,S){A=this.getCellStyle(A).newEdgeStyle;if(null!=A){this.model.beginUpdate();try{var F=JSON.parse(A),P;for(P in F)this.setCellStyles(P,F[P],G),"edgeStyle"==P&&"elbowEdgeStyle"==F[P]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",G)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(A){for(var G={},S=0;S<A.length;S++){var F=this.view.getState(A[S]);null!=F&&this.mergeStyle(F.style,G,0==S)}return G};-Graph.prototype.mergeStyle=function(A,G,S){if(null!=A){var F={},P;for(P in A){var R=A[P];null!=R&&(F[P]=!0,null==G[P]&&S?G[P]=R:G[P]!=R&&delete G[P])}for(P in G)F[P]||delete G[P]}};Graph.prototype.getStartEditingCell=function(A,G){G=this.getCellStyle(A);G=parseInt(mxUtils.getValue(G,mxConstants.STYLE_STARTSIZE,0));this.isTable(A)&&(!this.isSwimlane(A)||0==G)&&""==this.getLabel(A)&&0<this.model.getChildCount(A)&&(A=this.model.getChildAt(A,0),G=this.getCellStyle(A),G=parseInt(mxUtils.getValue(G,mxConstants.STYLE_STARTSIZE,-0)));if(this.isTableRow(A)&&(!this.isSwimlane(A)||0==G)&&""==this.getLabel(A)&&0<this.model.getChildCount(A))for(G=0;G<this.model.getChildCount(A);G++){var S=this.model.getChildAt(A,G);if(this.isCellEditable(S)){A=S;break}}return A};Graph.prototype.copyStyle=function(A){return this.getCellStyle(A,!1)};Graph.prototype.pasteStyle=function(A,G,S,F){null!=A&&(F||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(A,function(P){return 0>mxUtils.indexOf(S,P)})),this.updateCellStyles(A,G))};Graph.prototype.copyCellStyles=-function(A,G,S,F,P,R,T){var c=!1,f=!1;if(0<A.length)for(var k=0;k<A.length&&(c=this.getModel().isVertex(A[k])||c,!(f=this.getModel().isEdge(A[k])||f)||!c);k++);else f=c=!0;c=c&&!R;f=f&&!T;for(k=0;k<G.length;k++)if(A=0<=mxUtils.indexOf(Graph.textStyles,G[k]),"strokeColor"!=G[k]||null!=S[k]&&"none"!=S[k])if(0<=mxUtils.indexOf(Graph.cellStyles,G[k])||"shape"==G[k])if("shape"!=G[k]&&(c||A)&&(null==S[k]?delete F[G[k]]:F[G[k]]=S[k]),f||A)null==S[k]?delete P[G[k]]:P[G[k]]=S[k]};Graph.prototype.includeDescendants=-function(A){for(var G=[],S=0;S<A.length;S++)G=G.concat(this.model.getDescendants(A[S]));return G};Graph.prototype.pasteCellStyles=function(A,G,S,F,P){G=null!=G?G:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var R=0;R<A.length;R++){var T=A[R],c=this.model.getStyle(T),f=!1;null!=T.style&&(pairs=T.style.split(";"),f=f||0<=mxUtils.indexOf(pairs,"text"));if(f)var k=Graph.textStyles;else if(k=Graph.cellStyles.slice(),!F)for(var B=-null!=c?c.split(";"):[],z=0;z<B.length;z++){var C=B[z],I=C.indexOf("=");if(0<=I){var L=C.substring(0,I),K=mxUtils.indexOf(k,L);0<=K&&k.splice(K,1);for(f=0;f<Graph.cellStyleGroups.length;f++){var O=Graph.cellStyleGroups[f];if(0<=mxUtils.indexOf(O,L))for(var da=0;da<O.length;da++){var ea=mxUtils.indexOf(k,O[da]);0<=ea&&k.splice(ea,1)}}}}var ca=this.model.isEdge(T);f=ca?S:G;for(z=0;z<k.length;z++){L=k[z];var V=f[L];null!=V&&("edgeStyle"!=L||P)&&(ca||!ca&&0>mxUtils.indexOf(Graph.edgeStyles,L))&&(c=mxUtils.setStyle(c,-L,V),"fontFamily"==L&&null==f.fontSource&&(c=mxUtils.setStyle(c,"fontSource",null)),ca&&"rounded"==L&&"1"==V&&null==f.curved&&(c=mxUtils.setStyle(c,"curved",null)))}Editor.simpleLabels&&(c=mxUtils.setStyle(mxUtils.setStyle(c,"html",null),"whiteSpace",null));this.model.setStyle(T,c)}}finally{this.model.endUpdate()}return A};Graph.prototype.updateCellStyles=function(A,G){this.model.beginUpdate();try{for(var S=0;S<G.length;S++)if(this.model.isVertex(G[S])||this.model.isEdge(G[S])){var F=this.getCellStyle(G[S],-!1),P=F[mxConstants.STYLE_PERIMETER],R=!1;for(c in A){var T=A[c];if(F[c]!=T){if(c==mxConstants.STYLE_SHAPE&&"umlLifeline"==F[c]&&"umlLifeline"!=T){R=!0;var c="participant"}this.setCellStyles(c,T,[G[S]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[G[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=-function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(A,G,S,F,P,R){this.useCssTransforms&&(A=A/this.currentScale-this.currentTranslate.x,G=G/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(A,G,S,F,P,R){F=null!=F?F:!0;P=null!=P?P:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var T=-this.model.getChildCount(S)-1;0<=T;T--){var c=this.model.getChildAt(S,T),f=this.getScaledCellAt(A,G,c,F,P,R);if(null!=f)return f;if(this.isCellVisible(c)&&(P&&this.model.isEdge(c)||F&&this.model.isVertex(c))&&(f=this.view.getState(c),null!=f&&(null==R||!R(f,A,G))&&this.intersects(f,A,G)))return c}return null};Graph.prototype.isRecursiveVertexResize=function(A){return!this.isSwimlane(A.cell)&&0<this.model.getChildCount(A.cell)&&!this.isCellCollapsed(A.cell)&&"1"==mxUtils.getValue(A.style,"recursiveResize",-"1")&&null==mxUtils.getValue(A.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(A){for(var G=this.getCellGeometry(A);null!=G&&G.relative;)A=this.getModel().getParent(A),G=this.getCellGeometry(A);return A};Graph.prototype.isPart=function(A){return"1"==mxUtils.getValue(this.getCurrentCellStyle(A),"part","0")||this.isTableCell(A)||this.isTableRow(A)};Graph.prototype.getCompositeParents=function(A){for(var G=new mxDictionary,S=[],F=0;F<A.length;F++){var P=this.getCompositeParent(A[F]);-this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));null==P||G.get(P)||(G.put(P,!0),S.push(P))}return S};Graph.prototype.getReferenceTerminal=function(A){if(null!=A){var G=this.getCellGeometry(A);null!=G&&G.relative&&(A=this.model.getParent(A))}null!=A&&this.model.isEdge(A)&&(A=this.model.getParent(A));null!=A&&(A=this.getCompositeParent(A));return A};Graph.prototype.getCompositeParent=function(A){for(;this.isPart(A);){var G=this.model.getParent(A);-if(!this.model.isVertex(G))break;A=G}return A};Graph.prototype.filterSelectionCells=function(A){var G=this.getSelectionCells();if(null!=A){for(var S=[],F=0;F<G.length;F++)A(G[F])||S.push(G[F]);G=S}return G};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(A){if(this.useCssTransforms){var G=this.currentScale,S=this.currentTranslate;A=new mxRectangle((A.x+2*S.x)*G-S.x,(A.y+2*S.y)*G-S.y,A.width*G,A.height*G)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=-function(A){A=this.strokeWidth;this.graph.useCssTransforms&&(A/=this.graph.currentScale);return A};mxGraphView.prototype.getGraphBounds=function(){var A=this.graphBounds;if(this.graph.useCssTransforms){var G=this.graph.currentTranslate,S=this.graph.currentScale;A=new mxRectangle((A.x+G.x)*S,(A.y+G.y)*S,A.width*S,A.height*S)}return A};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;-mxGraphView.prototype.validate=function(A){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);e.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 g=mxGraph.prototype.getCellsForGroup;-Graph.prototype.getCellsForGroup=function(A){A=g.apply(this,arguments);for(var G=[],S=0;S<A.length;S++)this.isTableRow(A[S])||this.isTableCell(A[S])||G.push(A[S]);return G};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(A){A=m.apply(this,arguments);for(var G=[],S=0;S<A.length;S++)this.isTable(A[S])||this.isTableRow(A[S])||this.isTableCell(A[S])||G.push(A[S]);return G};Graph.prototype.updateCssTransform=function(){var A=this.view.getDrawPane();if(null!=A)if(A=-A.parentNode,this.useCssTransforms){var G=A.getAttribute("transform");A.setAttribute("transformOrigin","0 0");var S=Math.round(100*this.currentScale)/100;A.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");G!=A.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",A.getAttribute("transform"))}else A.removeAttribute("transformOrigin"),A.removeAttribute("transform")};-var v=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var A=this.graph.useCssTransforms,G=this.scale,S=this.translate;A&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);v.apply(this,arguments);A&&(this.scale=G,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(A,G,S){var F=this.useCssTransforms,P=this.view.scale,R=this.view.translate;F&&(this.view.scale=1,this.view.translate=-new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);F&&(this.view.scale=P,this.view.translate=R,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(B){return!this.isSpecialColor(B.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(B.style,"lineShape",null)&&(this.model.isVertex(B.cell)||"arrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"wire"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(B.style,+mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(B){return this.isFillState(B)&&"wire"!=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(B){return!0};Graph.prototype.getTextColor=function(B,H){for(var S=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,H?"color":+"background-color");null==S&&null!=B&&B!=this.cellEditor.textarea.parentNode;)S=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,"color"),B=B.parentNode;if("rgba(0, 0, 0, 0)"==S||"transparent"==S)S=mxConstants.NONE;return S};Graph.prototype.isSpecialColor=function(B){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],B)};Graph.prototype.isGlassState=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);+return"label"==B||"rectangle"==B||"internalStorage"==B||"ext"==B||"umlLifeline"==B||"swimlane"==B||"process"==B};Graph.prototype.isRoundedState=function(B){return null!=B.shape?B.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(B){var H=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(B.style,mxConstants.STYLE_CURVED,!1)&&("connector"==H||"filledEdge"==H||"wire"==+H)};Graph.prototype.isAutoSizeState=function(B){return"1"==mxUtils.getValue(B.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(B){return null!=mxUtils.getValue(B.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(B){return!0};Graph.prototype.getVerticesAndEdges=function(B,H){B=null!=B?B:!0;H=null!=H?H:!0;var S=this.model;return S.filterDescendants(function(G){return B&&S.isVertex(G)||H&&S.isEdge(G)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=+function(B,H,S){B=this.getCellStyle(B).newEdgeStyle;if(null!=B){this.model.beginUpdate();try{var G=JSON.parse(B),O;for(O in G)this.setCellStyles(O,G[O],H),"edgeStyle"==O&&"elbowEdgeStyle"==G[O]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",H)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(B){for(var H={},S=0;S<B.length;S++){var G=this.view.getState(B[S]);null!=G&&this.mergeStyle(G.style,H,0==S)}return H};+Graph.prototype.mergeStyle=function(B,H,S){if(null!=B){var G={},O;for(O in B){var R=B[O];null!=R&&(G[O]=!0,null==H[O]&&S?H[O]=R:H[O]!=R&&delete H[O])}for(O in H)G[O]||delete H[O]}};Graph.prototype.getStartEditingCell=function(B,H){H=this.getCellStyle(B);H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0));this.isTable(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B)&&(B=this.model.getChildAt(B,0),H=this.getCellStyle(B),H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,+0)));if(this.isTableRow(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B))for(H=0;H<this.model.getChildCount(B);H++){var S=this.model.getChildAt(B,H);if(this.isCellEditable(S)){B=S;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,H,S,G){null!=B&&(G||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(O){return 0>mxUtils.indexOf(S,O)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=+function(B,H,S,G,O,R,c){var f=!1,l=!1;if(0<B.length)for(var t=0;t<B.length&&(f=this.getModel().isVertex(B[t])||f,!(l=this.getModel().isEdge(B[t])||l)||!f);t++);else l=f=!0;f=f&&!R;l=l&&!c;for(t=0;t<H.length;t++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[t]),"strokeColor"!=H[t]||null!=S[t]&&"none"!=S[t])if(0<=mxUtils.indexOf(Graph.cellStyles,H[t])||"shape"==H[t])if("shape"!=H[t]&&(f||B)&&(null==S[t]?delete G[H[t]]:G[H[t]]=S[t]),l||B)null==S[t]?delete O[H[t]]:O[H[t]]=S[t]};Graph.prototype.includeDescendants=+function(B){for(var H=[],S=0;S<B.length;S++)H=H.concat(this.model.getDescendants(B[S]));return H};Graph.prototype.pasteCellStyles=function(B,H,S,G,O){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;O=null!=O?O:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var R=0;R<B.length;R++){var c=B[R],f=this.model.getStyle(c),l=!1;null!=c.style&&(pairs=c.style.split(";"),l=l||0<=mxUtils.indexOf(pairs,"text"));if(l)var t=Graph.textStyles;else if(t=Graph.cellStyles.slice(),!G)for(var z=+null!=f?f.split(";"):[],C=0;C<z.length;C++){var F=z[C],N=F.indexOf("=");if(0<=N){var K=F.substring(0,N),I=mxUtils.indexOf(t,K);0<=I&&t.splice(I,1);for(l=0;l<Graph.cellStyleGroups.length;l++){var ca=Graph.cellStyleGroups[l];if(0<=mxUtils.indexOf(ca,K))for(var da=0;da<ca.length;da++){var ea=mxUtils.indexOf(t,ca[da]);0<=ea&&t.splice(ea,1)}}}}var X=this.model.isEdge(c);l=X?S:H;for(C=0;C<t.length;C++){K=t[C];var ba=l[K];null!=ba&&("edgeStyle"!=K||O)&&(X||!X&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(f=+mxUtils.setStyle(f,K,ba),"fontFamily"==K&&null==l.fontSource&&(f=mxUtils.setStyle(f,"fontSource",null)),X&&"rounded"==K&&"1"==ba&&null==l.curved&&(f=mxUtils.setStyle(f,"curved",null)))}Editor.simpleLabels&&(f=mxUtils.setStyle(mxUtils.setStyle(f,"html",null),"whiteSpace",null));this.model.setStyle(c,f)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,H){this.model.beginUpdate();try{for(var S=0;S<H.length;S++)if(this.model.isVertex(H[S])||this.model.isEdge(H[S])){var G=+this.getCellStyle(H[S],!1),O=G[mxConstants.STYLE_PERIMETER],R=!1;for(f in B){var c=B[f];if(G[f]!=c){if(f==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[f]&&"umlLifeline"!=c){R=!0;var f="participant"}this.setCellStyles(f,c,[H[S]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,O,[H[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};+Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(B,H,S,G,O,R){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,H,S,G,O,R){G=null!=G?G:!0;O=null!=O?O:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));+if(null!=S)for(var c=this.model.getChildCount(S)-1;0<=c;c--){var f=this.model.getChildAt(S,c),l=this.getScaledCellAt(B,H,f,G,O,R);if(null!=l)return l;if(this.isCellVisible(f)&&(O&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(l=this.view.getState(f),null!=l&&(null==R||!R(l,B,H))&&this.intersects(l,B,H)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(B){return!this.isSwimlane(B.cell)&&0<this.model.getChildCount(B.cell)&&!this.isCellCollapsed(B.cell)&&"1"==mxUtils.getValue(B.style,+"recursiveResize","1")&&null==mxUtils.getValue(B.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(B){for(var H=this.getCellGeometry(B);null!=H&&H.relative;)B=this.getModel().getParent(B),H=this.getCellGeometry(B);return B};Graph.prototype.isPart=function(B){return"1"==mxUtils.getValue(this.getCurrentCellStyle(B),"part","0")||this.isTableCell(B)||this.isTableRow(B)};Graph.prototype.getCompositeParents=function(B){for(var H=new mxDictionary,S=[],G=0;G<B.length;G++){var O=this.getCompositeParent(B[G]);+this.isTableCell(O)&&(O=this.graph.model.getParent(O));this.isTableRow(O)&&(O=this.graph.model.getParent(O));null==O||H.get(O)||(H.put(O,!0),S.push(O))}return S};Graph.prototype.getReferenceTerminal=function(B){if(null!=B){var H=this.getCellGeometry(B);null!=H&&H.relative&&(B=this.model.getParent(B))}null!=B&&this.model.isEdge(B)&&(B=this.model.getParent(B));null!=B&&(B=this.getCompositeParent(B));return B};Graph.prototype.getCompositeParent=function(B){for(;this.isPart(B);){var H=this.model.getParent(B);+if(!this.model.isVertex(H))break;B=H}return B};Graph.prototype.filterSelectionCells=function(B){var H=this.getSelectionCells();if(null!=B){for(var S=[],G=0;G<H.length;G++)B(H[G])||S.push(H[G]);H=S}return H};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(B){if(this.useCssTransforms){var H=this.currentScale,S=this.currentTranslate;B=new mxRectangle((B.x+2*S.x)*H-S.x,(B.y+2*S.y)*H-S.y,B.width*H,B.height*H)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=+function(B){B=this.strokeWidth;this.graph.useCssTransforms&&(B/=this.graph.currentScale);return B};mxGraphView.prototype.getGraphBounds=function(){var B=this.graphBounds;if(this.graph.useCssTransforms){var H=this.graph.currentTranslate,S=this.graph.currentScale;B=new mxRectangle((B.x+H.x)*S,(B.y+H.y)*S,B.width*S,B.height*S)}return B};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;+mxGraphView.prototype.validate=function(B){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);e.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 g=mxGraph.prototype.getCellsForGroup;+Graph.prototype.getCellsForGroup=function(B){B=g.apply(this,arguments);for(var H=[],S=0;S<B.length;S++)this.isTableRow(B[S])||this.isTableCell(B[S])||H.push(B[S]);return H};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(B){B=m.apply(this,arguments);for(var H=[],S=0;S<B.length;S++)this.isTable(B[S])||this.isTableRow(B[S])||this.isTableCell(B[S])||H.push(B[S]);return H};Graph.prototype.updateCssTransform=function(){var B=this.view.getDrawPane();if(null!=B)if(B=+B.parentNode,this.useCssTransforms){var H=B.getAttribute("transform");B.setAttribute("transformOrigin","0 0");var S=Math.round(100*this.currentScale)/100;B.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");H!=B.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",B.getAttribute("transform"))}else B.removeAttribute("transformOrigin"),B.removeAttribute("transform")};+var u=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph.useCssTransforms,H=this.scale,S=this.translate;B&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);u.apply(this,arguments);B&&(this.scale=H,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.useCssTransforms,O=this.view.scale,R=this.view.translate;G&&(this.view.scale=1,this.view.translate=+new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);G&&(this.view.scale=O,this.view.translate=R,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,g){var m=e.getAttribute("href");m!=Graph.sanitizeLink(m)&&Graph.sanitizeNode(e);if(null!=m&&!this.isCustomLink(m)&&(mxEvent.isLeftMouseButton(g)&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(m)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(m),b);mxEvent.consume(g)}};-Graph.prototype.openLink=function(b,e,g){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var v=b.split("#")[1];window.location.hash=="#"+v&&(window.location.hash="");window.location.hash=v}else m=window.open(b,null!=e?e:"_blank",g?null:"noopener,noreferrer"),null==m||g||(m.opener=null)}catch(p){}return m};+Graph.prototype.openLink=function(b,e,g){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var u=b.split("#")[1];window.location.hash=="#"+u&&(window.location.hash="");window.location.hash=u}else m=window.open(b,null!=e?e:"_blank",g?null:"noopener,noreferrer"),null==m||g||(m.opener=null)}catch(p){}return m};Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b,e){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,e){var g=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(e!=mxEvent.BEGIN_UPDATE||this.hasLayout(g,e))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return e=new mxStackLayout(this.graph,!0),e.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",@@ -2389,16 +2388,16 @@ b.childLayout)return e=new mxCompactTreeLayout(this.graph),e.horizontal="1"==mxU"flowOrientation",mxConstants.DIRECTION_EAST)),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.parentBorder=mxUtils.getValue(b,"parentPadding",20),e.maintainParentLocation=!0,e.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),e.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),e.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),e.parallelEdgeSpacing=mxUtils.getValue(b,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),e;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==String(b.childLayout).charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(m){null!=window.console&&console.error(m)}}return null}};-Graph.prototype.createLayouts=function(b){for(var e=[],g=0;g<b.length;g++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[g].layout)){var m="mxOrgChartLayout"==b[g].layout&&null!=b[g].config?new window[b[g].layout](this,b[g].config.branchOptimizer):new window[b[g].layout](this);if(null!=b[g].config)for(var v in b[g].config)if("mxOrgChartLayout"!=b[g].layout||"branchOptimizer"!=v)m[v]=b[g].config[v];e.push(m)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[g].layout]));return e};-Graph.prototype.getDataForCells=function(b,e){for(var g=[],m=0;m<b.length;m++){var v={};v.id=b[m].id;var p=null!=b[m].value?b[m].value.attributes:null;this.isReplacePlaceholders(b[m])&&e&&(v.value=this.getLabel(b[m]));if(null!=p)for(var A=0;A<p.length;A++)v[p[A].nodeName]=p[A].nodeValue;else v.label=this.convertValueToString(b[m]);g.push(v)}return g};-Graph.prototype.getNodesForCells=function(b){for(var e=[],g=0;g<b.length;g++){var m=this.view.getState(b[g]);if(null!=m){for(var v=this.cellRenderer.getShapesForState(m),p=0;p<v.length;p++)null!=v[p]&&null!=v[p].node&&e.push(v[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};-Graph.prototype.createWipeAnimations=function(b,e){for(var g=[],m=0;m<b.length;m++){var v=this.view.getState(b[m]);null!=v&&null!=v.shape&&(this.model.isEdge(v.cell)&&null!=v.absolutePoints&&1<v.absolutePoints.length?g.push(this.createEdgeWipeAnimation(v,e)):this.model.isVertex(v.cell)&&null!=v.shape.bounds&&g.push(this.createVertexWipeAnimation(v,e)))}return g};-Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,v=b.length,p=g.length;return{execute:mxUtils.bind(this,function(A,G){if(null!=b.shape){var S=[g[0]];G=A/G;e||(G=1-G);for(var F=v*G,P=1;P<p;P++)if(F<=m[P-1]){S.push(new mxPoint(g[P-1].x+(g[P].x-g[P-1].x)*F/m[P-1],g[P-1].y+(g[P].y-g[P-1].y)*F/m[P-1]));break}else F-=m[P-1],S.push(g[P]);b.shape.points=S;b.shape.redraw();0==A&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=-b.text.node&&(b.text.node.style.opacity=G)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};-Graph.prototype.createVertexWipeAnimation=function(b,e){var g=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,v){null!=b.shape&&(v=m/v,e||(v=1-v),b.shape.bounds=new mxRectangle(g.x,g.y,g.width*v,g.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=v))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,g,m){g=null!=g?g:30;m=null!=m?m:30;var v=null,p=0,A=mxUtils.bind(this,function(){if(p==g||this.stoppingCustomActions){window.clearInterval(v);for(var G=0;G<b.length;G++)b[G].stop();null!=e&&e()}else for(G=0;G<b.length;G++)b[G].execute(p,g);p++});v=window.setInterval(A,m);A()};+Graph.prototype.createLayouts=function(b){for(var e=[],g=0;g<b.length;g++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[g].layout)){var m="mxOrgChartLayout"==b[g].layout&&null!=b[g].config?new window[b[g].layout](this,b[g].config.branchOptimizer):new window[b[g].layout](this);if(null!=b[g].config)for(var u in b[g].config)if("mxOrgChartLayout"!=b[g].layout||"branchOptimizer"!=u)m[u]=b[g].config[u];e.push(m)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[g].layout]));return e};+Graph.prototype.getDataForCells=function(b,e){for(var g=[],m=0;m<b.length;m++){var u={};u.id=b[m].id;var p=null!=b[m].value?b[m].value.attributes:null;this.isReplacePlaceholders(b[m])&&e&&(u.value=this.getLabel(b[m]));if(null!=p)for(var B=0;B<p.length;B++)u[p[B].nodeName]=p[B].nodeValue;else u.label=this.convertValueToString(b[m]);g.push(u)}return g};+Graph.prototype.getNodesForCells=function(b){for(var e=[],g=0;g<b.length;g++){var m=this.view.getState(b[g]);if(null!=m){for(var u=this.cellRenderer.getShapesForState(m),p=0;p<u.length;p++)null!=u[p]&&null!=u[p].node&&e.push(u[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};+Graph.prototype.createWipeAnimations=function(b,e){for(var g=[],m=0;m<b.length;m++){var u=this.view.getState(b[m]);null!=u&&null!=u.shape&&(this.model.isEdge(u.cell)&&null!=u.absolutePoints&&1<u.absolutePoints.length?g.push(this.createEdgeWipeAnimation(u,e)):this.model.isVertex(u.cell)&&null!=u.shape.bounds&&g.push(this.createVertexWipeAnimation(u,e)))}return g};+Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,u=b.length,p=g.length;return{execute:mxUtils.bind(this,function(B,H){if(null!=b.shape){var S=[g[0]];H=B/H;e||(H=1-H);for(var G=u*H,O=1;O<p;O++)if(G<=m[O-1]){S.push(new mxPoint(g[O-1].x+(g[O].x-g[O-1].x)*G/m[O-1],g[O-1].y+(g[O].y-g[O-1].y)*G/m[O-1]));break}else G-=m[O-1],S.push(g[O]);b.shape.points=S;b.shape.redraw();0==B&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=+b.text.node&&(b.text.node.style.opacity=H)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};+Graph.prototype.createVertexWipeAnimation=function(b,e){var g=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,u){null!=b.shape&&(u=m/u,e||(u=1-u),b.shape.bounds=new mxRectangle(g.x,g.y,g.width*u,g.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=u))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,g,m){g=null!=g?g:30;m=null!=m?m:30;var u=null,p=0,B=mxUtils.bind(this,function(){if(p==g||this.stoppingCustomActions){window.clearInterval(u);for(var H=0;H<b.length;H++)b[H].stop();null!=e&&e()}else for(H=0;H<b.length;H++)b[H].execute(p,g);p++});u=window.setInterval(B,m);B()};Graph.prototype.getPageSize=function(){return this.pageVisible&&null!=this.pageFormat?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};-Graph.prototype.getPageLayout=function(b,e,g){b=null!=b?b:this.getGraphBounds();e=null!=e?e:this.view.translate;g=null!=g?g:this.view.scale;var m=this.getPageSize();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var v=Math.floor(Math.ceil(b.x/g-e.x)/m.width),p=Math.floor(Math.ceil(b.y/g-e.y)/m.height);return new mxRectangle(v,p,Math.ceil((Math.floor((b.x+b.width)/g)-e.x)/m.width)-v,Math.ceil((Math.floor((b.y+b.height)/g)-e.y)/m.height)-p)};+Graph.prototype.getPageLayout=function(b,e,g){b=null!=b?b:this.getGraphBounds();e=null!=e?e:this.view.translate;g=null!=g?g:this.view.scale;var m=this.getPageSize();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var u=Math.floor(Math.ceil(b.x/g-e.x)/m.width),p=Math.floor(Math.ceil(b.y/g-e.y)/m.height);return new mxRectangle(u,p,Math.ceil((Math.floor((b.x+b.width)/g)-e.x)/m.width)-u,Math.ceil((Math.floor((b.y+b.height)/g)-e.y)/m.height)-p)};Graph.prototype.getDefaultTranslate=function(b){var e=this.getPagePadding(),g=this.getPageSize();return new mxPoint(e.x-b.x*g.width,e.y-b.y*g.height)};Graph.prototype.updateMinimumSize=function(){var b=this.getPageLayout(),e=this.getPagePadding(),g=this.getPageSize(),m=Math.ceil(2*e.x+b.width*g.width);b=Math.ceil(2*e.y+b.height*g.height);if(null==this.minimumGraphSize||this.minimumGraphSize.width!=m||this.minimumGraphSize.height!=b)this.minimumGraphSize=new mxRectangle(0,0,m,b)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var g=this.model.cells[e];this.isReplacePlaceholders(g)&&(this.view.invalidate(g,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};Graph.prototype.isZoomWheelEvent=function(b){return Graph.zoomWheel&&!mxEvent.isShiftDown(b)&&!mxEvent.isMetaDown(b)&&!mxEvent.isAltDown(b)&&(!mxEvent.isControlDown(b)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(b)||mxEvent.isControlDown(b))};Graph.prototype.isScrollWheelEvent=function(b){return!this.isZoomWheelEvent(b)};Graph.prototype.isTransparentClickEvent=function(b){return mxEvent.isAltDown(b)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};@@ -2407,33 +2406,33 @@ Graph.prototype.isSplitTarget=function(b,e,g){return!this.model.isEdge(e[0])&&!mGraph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(e,"labelMovable","0")))};Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};Graph.prototype.formatDate=function(b,e,g){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,v=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,A=function(z,C){z=String(z);for(C=C||2;z.length<C;)z="0"+z;return z};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var G=g?"getUTC":"get",S=b[G+"Date"](),F=b[G+"Day"](),P=b[G+"Month"](),R=b[G+"FullYear"](),T=b[G+"Hours"](),c=b[G+"Minutes"](),f=b[G+"Seconds"]();G=b[G+"Milliseconds"]();var k=g?0:b.getTimezoneOffset(),B={d:S,dd:A(S),ddd:m.i18n.dayNames[F],dddd:m.i18n.dayNames[F+7],m:P+1,mm:A(P+1),mmm:m.i18n.monthNames[P],mmmm:m.i18n.monthNames[P+-12],yy:String(R).slice(2),yyyy:R,h:T%12||12,hh:A(T%12||12),H:T,HH:A(T),M:c,MM:A(c),s:f,ss:A(f),l:A(G,3),L:A(99<G?Math.round(G/10):G),t:12>T?"a":"p",tt:12>T?"am":"pm",T:12>T?"A":"P",TT:12>T?"AM":"PM",Z:g?"UTC":(String(b).match(v)||[""]).pop().replace(p,""),o:(0<k?"-":"+")+A(100*Math.floor(Math.abs(k)/60)+Math.abs(k)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(z){return z in B?B[z]:z.slice(1,-z.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){e=this.getLayerForCell(b[0]);for(var g=1;g<b.length;g++)if(!this.model.isAncestor(e,b[g])){e=null;break}}return e};-Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),v=m.getChildCount(m.root),p=0;p<v;p++)mxUtils.bind(this,function(A){function G(){m.isVisible(A)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(F,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(F,25))}var S=this.convertValueToString(A)||mxResources.get("background")||"Background",F=document.createElement("div");F.style.overflow=-"hidden";F.style.textOverflow="ellipsis";F.style.padding="2px";F.style.whiteSpace="nowrap";F.style.cursor="pointer";F.setAttribute("title",mxResources.get(m.isVisible(A)?"hideIt":"show",[S]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";e&&(P.style.filter="invert(100%)",P.style.top="-2px");F.appendChild(P);mxUtils.write(F,S);g.appendChild(F);-mxEvent.addListener(F,"click",function(){m.setVisible(A,!m.isVisible(A));G();null!=b&&b(A)});G()})(m.getChildAt(m.root,p));return g};-Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var v=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var A=null;if(match.index>v&&"%"==e.charAt(match.index-1))A=p.substring(1);else{var G=p.substring(1,p.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==G)A=b.id;else if("width"===G.substring(0,5)&&this.model.isVertex(b)){var F=this.getCellGeometry(b);-null!=F&&(A=F.width,5<G.length&&(A=Editor.toUnit(A,S[G.substring(6)])))}else if("height"==G.substring(0,6)&&this.model.isVertex(b))F=this.getCellGeometry(b),null!=F&&(A=F.height,6<G.length&&(A=Editor.toUnit(A,S[G.substring(7)])));else if("length"==G.substring(0,6)){for(F=b;null!=F&&!this.model.isEdge(F);)F=this.model.getParent(F);F=this.view.getState(F);null!=F&&(A=Math.round(F.length/this.view.scale),6<G.length&&(A=Editor.toUnit(A,S[G.substring(7)])))}else if(0>G.indexOf("{"))for(S=b;null==A&&null!=-S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(A=S.getAttribute(G+"_"+Graph.diagramLanguage)),null==A&&(A=S.hasAttribute(G)?null!=S.getAttribute(G)?S.getAttribute(G):"":null)),S=this.model.getParent(S);null==A&&(A=this.getGlobalVariable(G));null==A&&null!=g&&(A=g[G])}m.push(e.substring(v,match.index)+(null!=A?A:p));v=match.index+p.length}}m.push(e.substring(v))}return m.join("")};+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,u=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,B=function(C,F){C=String(C);for(F=F||2;C.length<F;)C="0"+C;return C};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var H=g?"getUTC":"get",S=b[H+"Date"](),G=b[H+"Day"](),O=b[H+"Month"](),R=b[H+"FullYear"](),c=b[H+"Hours"](),f=b[H+"Minutes"](),l=b[H+"Seconds"]();H=b[H+"Milliseconds"]();var t=g?0:b.getTimezoneOffset(),z={d:S,dd:B(S),ddd:m.i18n.dayNames[G],dddd:m.i18n.dayNames[G+7],m:O+1,mm:B(O+1),mmm:m.i18n.monthNames[O],mmmm:m.i18n.monthNames[O++12],yy:String(R).slice(2),yyyy:R,h:c%12||12,hh:B(c%12||12),H:c,HH:B(c),M:f,MM:B(f),s:l,ss:B(l),l:B(H,3),L:B(99<H?Math.round(H/10):H),t:12>c?"a":"p",tt:12>c?"am":"pm",T:12>c?"A":"P",TT:12>c?"AM":"PM",Z:g?"UTC":(String(b).match(u)||[""]).pop().replace(p,""),o:(0<t?"-":"+")+B(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in z?z[C]:C.slice(1,+C.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){e=this.getLayerForCell(b[0]);for(var g=1;g<b.length;g++)if(!this.model.isAncestor(e,b[g])){e=null;break}}return e};+Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),u=m.getChildCount(m.root),p=0;p<u;p++)mxUtils.bind(this,function(B){function H(){m.isVisible(B)?(O.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(O.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var S=this.convertValueToString(B)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=+"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(m.isVisible(B)?"hideIt":"show",[S]));var O=document.createElement("img");O.setAttribute("draggable","false");O.setAttribute("align","absmiddle");O.setAttribute("border","0");O.style.position="relative";O.style.width="16px";O.style.padding="0px 6px 0 4px";e&&(O.style.filter="invert(100%)",O.style.top="-2px");G.appendChild(O);mxUtils.write(G,S);g.appendChild(G);+mxEvent.addListener(G,"click",function(){m.setVisible(B,!m.isVisible(B));H();null!=b&&b(B)});H()})(m.getChildAt(m.root,p));return g};+Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var u=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var B=null;if(match.index>u&&"%"==e.charAt(match.index-1))B=p.substring(1);else{var H=p.substring(1,p.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==H)B=b.id;else if("width"===H.substring(0,5)&&this.model.isVertex(b)){var G=this.getCellGeometry(b);+null!=G&&(B=G.width,5<H.length&&(B=Editor.toUnit(B,S[H.substring(6)])))}else if("height"==H.substring(0,6)&&this.model.isVertex(b))G=this.getCellGeometry(b),null!=G&&(B=G.height,6<H.length&&(B=Editor.toUnit(B,S[H.substring(7)])));else if("length"==H.substring(0,6)){for(G=b;null!=G&&!this.model.isEdge(G);)G=this.model.getParent(G);G=this.view.getState(G);null!=G&&(B=Math.round(G.length/this.view.scale),6<H.length&&(B=Editor.toUnit(B,S[H.substring(7)])))}else if(0>H.indexOf("{"))for(S=b;null==B&&null!=+S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(B=S.getAttribute(H+"_"+Graph.diagramLanguage)),null==B&&(B=S.hasAttribute(H)?null!=S.getAttribute(H)?S.getAttribute(H):"":null)),S=this.model.getParent(S);null==B&&(B=this.getGlobalVariable(H));null==B&&null!=g&&(B=g[H])}m.push(e.substring(u,match.index)+(null!=B?B:p));u=match.index+p.length}}m.push(e.substring(u))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],g=0;g<b.length;g++){var m=this.model.getCell(b[g].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};-Graph.prototype.selectTableRange=function(b,e){var g=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),v=this.model.getParent(m),p=this.model.getParent(e);if(v==this.model.getParent(p)){b=m.getIndex(b);m=v.getIndex(m);var A=p.getIndex(e),G=v.getIndex(p);p=Math.max(m,G);e=Math.min(b,A);b=Math.max(b,A);A=[];for(m=Math.min(m,G);m<=p;m++){G=this.model.getChildAt(v,m);for(var S=e;S<=b;S++)A.push(this.model.getChildAt(G,S))}0<A.length&&(1<A.length||1<this.getSelectionCount()||-!this.isCellSelected(A[0]))&&(this.setSelectionCells(A),g=!0)}}return g};-Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var g=0;g<b.length;g++){var m=b[g],v=this.getCellGeometry(m);if(null!=v){v=v.clone();if(this.getModel().isVertex(m))v.x=Math.round(v.x/e)*e,v.y=Math.round(v.y/e)*e,v.width=Math.round(v.width/e)*e,v.height=Math.round(v.height/e)*e;else if(this.getModel().isEdge(m)&&null!=v.points)for(var p=0;p<v.points.length;p++)v.points[p].x=Math.round(v.points[p].x/e)*e,v.points[p].y=Math.round(v.points[p].y/e)*e;this.getModel().setGeometry(m,-v)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var e=this.model.getChildCount(b);0<=e;e--)this.model.remove(this.model.getChildAt(b,e))}finally{this.model.endUpdate()}};-Graph.prototype.updateShapes=function(b,e,g){this.model.beginUpdate();try{var m=this.model.getStyle(b),v=g?this.stylesheet.getCellStyle(m,{},!1):null;null!=v&&null==v[mxConstants.STYLE_SHAPE]&&(this.model.isVertex(b)?v[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultVertexStyle()[mxConstants.STYLE_SHAPE]:this.model.isEdge(b)&&(v[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultEdgeStyle()[mxConstants.STYLE_SHAPE]));for(var p=0;p<e.length;p++){if(this.model.isVertex(b)&&this.model.isVertex(e[p])||-this.model.isEdge(b)&&this.model.isEdge(e[p]))if(g){var A=this.model.getStyle(e[p]);if(null!=A){var G=A.split(";");0<G.length&&0>G[0].indexOf("=")&&(G=G.slice(1));this.model.setStyle(e[p],G.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[e[p]]);this.setCellStyles("points",null,[e[p]]);this.pasteStyle(v,[e[p]],null,!0)}else v=this.copyStyle(e[p]),this.model.setStyle(e[p],m),this.pasteStyle(v,[e[p]]);"1"==mxUtils.getValue(this.getCellStyle(e[p],!1),"composite","0")&&this.removeChildCells(e[p])}}finally{this.model.endUpdate()}};+Graph.prototype.selectTableRange=function(b,e){var g=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),u=this.model.getParent(m),p=this.model.getParent(e);if(u==this.model.getParent(p)){b=m.getIndex(b);m=u.getIndex(m);var B=p.getIndex(e),H=u.getIndex(p);p=Math.max(m,H);e=Math.min(b,B);b=Math.max(b,B);B=[];for(m=Math.min(m,H);m<=p;m++){H=this.model.getChildAt(u,m);for(var S=e;S<=b;S++)B.push(this.model.getChildAt(H,S))}0<B.length&&(1<B.length||1<this.getSelectionCount()||+!this.isCellSelected(B[0]))&&(this.setSelectionCells(B),g=!0)}}return g};+Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var g=0;g<b.length;g++){var m=b[g],u=this.getCellGeometry(m);if(null!=u){u=u.clone();if(this.getModel().isVertex(m))u.x=Math.round(u.x/e)*e,u.y=Math.round(u.y/e)*e,u.width=Math.round(u.width/e)*e,u.height=Math.round(u.height/e)*e;else if(this.getModel().isEdge(m)&&null!=u.points)for(var p=0;p<u.points.length;p++)u.points[p].x=Math.round(u.points[p].x/e)*e,u.points[p].y=Math.round(u.points[p].y/e)*e;this.getModel().setGeometry(m,+u)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var e=this.model.getChildCount(b);0<=e;e--)this.model.remove(this.model.getChildAt(b,e))}finally{this.model.endUpdate()}};+Graph.prototype.updateShapes=function(b,e,g){this.model.beginUpdate();try{var m=this.model.getStyle(b),u=g?this.stylesheet.getCellStyle(m,{},!1):null;null!=u&&null==u[mxConstants.STYLE_SHAPE]&&(this.model.isVertex(b)?u[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultVertexStyle()[mxConstants.STYLE_SHAPE]:this.model.isEdge(b)&&(u[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultEdgeStyle()[mxConstants.STYLE_SHAPE]));for(var p=0;p<e.length;p++){if(this.model.isVertex(b)&&this.model.isVertex(e[p])||+this.model.isEdge(b)&&this.model.isEdge(e[p]))if(g){var B=this.model.getStyle(e[p]);if(null!=B){var H=B.split(";");0<H.length&&0>H[0].indexOf("=")&&(H=H.slice(1));this.model.setStyle(e[p],H.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[e[p]]);this.setCellStyles("points",null,[e[p]]);this.pasteStyle(u,[e[p]],null,!0)}else u=this.copyStyle(e[p]),this.model.setStyle(e[p],m),this.pasteStyle(u,[e[p]]);"1"==mxUtils.getValue(this.getCellStyle(e[p],!1),"composite","0")&&this.removeChildCells(e[p])}}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,m,v,p,A,G){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),F=S?b:this.getCompositeParent(b),P=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?(P.x+=F.geometry.width/2,P.y-=g):e==-mxConstants.DIRECTION_SOUTH?(P.x+=F.geometry.width/2,P.y+=F.geometry.height+g):(P.x=e==mxConstants.DIRECTION_WEST?P.x-g:P.x+(F.geometry.width+g),P.y+=F.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var T=this.view.translate;F=T.x*g;T=T.y*g;null!=R&&this.model.isVertex(R.cell)&&(F=R.x,T=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(P.x+=b.parent.geometry.x,P.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(F+P.x*g,T+P.y*g)).grow(40*g);p=null!=p?-this.getCells(0,0,0,0,null,null,p,null,!0):null;R=this.view.getState(b);var c=null,f=null;if(null!=p){p=p.reverse();for(var k=0;k<p.length;k++)if(!this.isCellLocked(p[k])&&!this.model.isEdge(p[k])&&p[k]!=b)if(!this.model.isAncestor(b,p[k])&&this.isContainer(p[k])&&(null==c||p[k]==this.model.getParent(b)))c=p[k];else if(null==f&&this.isCellConnectable(p[k])&&!this.model.isAncestor(p[k],b)&&!this.isSwimlane(p[k])){var B=this.view.getState(p[k]);null==R||null==B||mxUtils.intersects(R,B)||(f=p[k])}}var z=-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||v;z&&("1"!=urlParams.sketch||v)&&(e==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var C=[],I=f;f=c;v=mxUtils.bind(this,function(L){if(null==A||null!=L||null==f&&S){this.model.beginUpdate();try{if(null==I&&z){var K=this.getAbsoluteParent(null!=L?L:b);K=S?b:this.getCompositeParent(K);I=null!=L?L:this.duplicateCells([K],-!1)[0];null!=L&&this.addCells([I],this.model.getParent(b),null,null,null,!0);var O=this.getCellGeometry(I);null!=O&&(null!=L&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?P.y-=O.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=O.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-O.width/2:P.x+O.width/2),O.x=P.x-O.width/2,O.y=P.y-O.height/2);null!=c?(this.addCells([I],c,null,null,null,!0),f=null):z&&!S&&this.addCells([I],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(m)&&-mxEvent.isShiftDown(m)&&z||null==f&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,I,this.createCurrentEdgeStyle());null!=da&&(C.push(da),this.applyNewEdgeStyle(b,[da],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(da,b));if(null==f&&null!=I&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var ea=b.parent.getIndex(b);this.model.add(b.parent,I,ea)}null==f&&null!=I&&C.push(I);null==I&&null!=da&&da.geometry.setTerminalPoint(P,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted",-"cells",[da]))}finally{this.model.endUpdate()}}if(null!=G)G(C);else return C});if(null==A||null!=I||!z||null==f&&S)return v(I);A(F+P.x*g,T+P.y*g,v)};-Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),g=[],m,v=0;v<b.length;v++)if(m=b[v],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&g.push(m);return g.join(" ")};+Graph.prototype.connectVertex=function(b,e,g,m,u,p,B,H){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),G=S?b:this.getCompositeParent(b),O=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(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(O.x+=G.geometry.width/2,O.y-=g):e==+mxConstants.DIRECTION_SOUTH?(O.x+=G.geometry.width/2,O.y+=G.geometry.height+g):(O.x=e==mxConstants.DIRECTION_WEST?O.x-g:O.x+(G.geometry.width+g),O.y+=G.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var c=this.view.translate;G=c.x*g;c=c.y*g;null!=R&&this.model.isVertex(R.cell)&&(G=R.x,c=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(O.x+=b.parent.geometry.x,O.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+O.x*g,c+O.y*g)).grow(40*g);p=null!=p?+this.getCells(0,0,0,0,null,null,p,null,!0):null;R=this.view.getState(b);var f=null,l=null;if(null!=p){p=p.reverse();for(var t=0;t<p.length;t++)if(!this.isCellLocked(p[t])&&!this.model.isEdge(p[t])&&p[t]!=b)if(!this.model.isAncestor(b,p[t])&&this.isContainer(p[t])&&(null==f||p[t]==this.model.getParent(b)))f=p[t];else if(null==l&&this.isCellConnectable(p[t])&&!this.model.isAncestor(p[t],b)&&!this.isSwimlane(p[t])){var z=this.view.getState(p[t]);null==R||null==z||mxUtils.intersects(R,z)||(l=p[t])}}var C=+!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||u;C&&("1"!=urlParams.sketch||u)&&(e==mxConstants.DIRECTION_NORTH?O.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=b.geometry.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-b.geometry.width/2:O.x+b.geometry.width/2);var F=[],N=l;l=f;u=mxUtils.bind(this,function(K){if(null==B||null!=K||null==l&&S){this.model.beginUpdate();try{if(null==N&&C){var I=this.getAbsoluteParent(null!=K?K:b);I=S?b:this.getCompositeParent(I);N=null!=K?K:this.duplicateCells([I],+!1)[0];null!=K&&this.addCells([N],this.model.getParent(b),null,null,null,!0);var ca=this.getCellGeometry(N);null!=ca&&(null!=K&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?O.y-=ca.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=ca.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-ca.width/2:O.x+ca.width/2),ca.x=O.x-ca.width/2,ca.y=O.y-ca.height/2);null!=f?(this.addCells([N],f,null,null,null,!0),l=null):C&&!S&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(m)&&+mxEvent.isShiftDown(m)&&C||null==l&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,N,this.createCurrentEdgeStyle());null!=da&&(F.push(da),this.applyNewEdgeStyle(b,[da],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(da,b));if(null==l&&null!=N&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var ea=b.parent.getIndex(b);this.model.add(b.parent,N,ea)}null==l&&null!=N&&F.push(N);null==N&&null!=da&&da.geometry.setTerminalPoint(O,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted",+"cells",[da]))}finally{this.model.endUpdate()}}if(null!=H)H(F);else return F});if(null==B||null!=N||!C||null==l&&S)return u(N);B(G+O.x*g,c+O.y*g,u)};+Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),g=[],m,u=0;u<b.length;u++)if(m=b[u],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&g.push(m);return g.join(" ")};Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var g=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==g&&null!=m;)null!=m.value&&"object"==typeof m.value&&(g=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else g=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=e.getAttribute("label_"+Graph.diagramLanguage)),null==g&&(g=e.getAttribute("label")||"");return g||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b,e){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),e||(b=mxUtils.removeJavascriptProtocol(b)),b):null};Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,e){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};@@ -2443,23 +2442,23 @@ mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(e,mxConstants.STYGraph.prototype.getDefaultColor=function(b,e,g){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(b=mxUtils.getLightDarkColor(g),g="light-dark("+b.dark+", "+b.light+")");return g};Graph.prototype.setAdaptiveColors=function(b){this.adaptiveColors="default"==b?null:b;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(b=this.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};Graph.prototype.updateAlternateBounds=function(b,e,g){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};-Graph.prototype.foldCells=function(b,e,g,m,v){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<g.length;p++){var A=this.view.getState(g[p]),G=this.getCellGeometry(g[p]);if(null!=A&&null!=G){var S=0,F=0;if(G.alternateBounds)S=G.width-G.alternateBounds.width,F=G.height-G.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;-S=Math.round(G.width-A.width/P);F=Math.round(G.height-A.height/P)}if(0!=F||0!=S){var R=this.model.getParent(g[p]),T=this.layoutManager.getLayout(R);null==T?null!=v&&this.isMoveCellsEvent(v,A)&&this.moveSiblings(A,R,S,F):null!=v&&mxEvent.isAltDown(v)||T.constructor!=mxStackLayout||T.resizeLast||this.resizeParentStacks(R,T,S,F)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};-Graph.prototype.moveSiblings=function(b,e,g,m){this.model.beginUpdate();try{var v=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<v.length;e++)if(v[e]!=b.cell){var p=this.view.getState(v[e]),A=this.getCellGeometry(v[e]);null!=p&&null!=A&&(A=A.clone(),A.translate(Math.round(g*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(v[e],A))}}finally{this.model.endUpdate()}};-Graph.prototype.resizeParentStacks=function(b,e,g,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var v=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==v&&!e.resizeLast;){var p=this.getCellGeometry(b),A=this.view.getState(b);null!=A&&null!=p&&(p=p.clone(),e.horizontal?p.width+=g+Math.min(0,A.width/this.view.scale-p.width):p.height+=m+Math.min(0,A.height/this.view.scale-p.height),this.model.setGeometry(b,+Graph.prototype.foldCells=function(b,e,g,m,u){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<g.length;p++){var B=this.view.getState(g[p]),H=this.getCellGeometry(g[p]);if(null!=B&&null!=H){var S=0,G=0;if(H.alternateBounds)S=H.width-H.alternateBounds.width,G=H.height-H.alternateBounds.height;else{var O=this.useCssTransforms?1:this.view.scale;+S=Math.round(H.width-B.width/O);G=Math.round(H.height-B.height/O)}if(0!=G||0!=S){var R=this.model.getParent(g[p]),c=this.layoutManager.getLayout(R);null==c?null!=u&&this.isMoveCellsEvent(u,B)&&this.moveSiblings(B,R,S,G):null!=u&&mxEvent.isAltDown(u)||c.constructor!=mxStackLayout||c.resizeLast||this.resizeParentStacks(R,c,S,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};+Graph.prototype.moveSiblings=function(b,e,g,m){this.model.beginUpdate();try{var u=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<u.length;e++)if(u[e]!=b.cell){var p=this.view.getState(u[e]),B=this.getCellGeometry(u[e]);null!=p&&null!=B&&(B=B.clone(),B.translate(Math.round(g*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(u[e],B))}}finally{this.model.endUpdate()}};+Graph.prototype.resizeParentStacks=function(b,e,g,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var u=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==u&&!e.resizeLast;){var p=this.getCellGeometry(b),B=this.view.getState(b);null!=B&&null!=p&&(p=p.clone(),e.horizontal?p.width+=g+Math.min(0,B.width/this.view.scale-p.width):p.height+=m+Math.min(0,B.height/this.view.scale-p.height),this.model.setGeometry(b,p));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.movableLabel?"0"!=e.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,e,g){g=g||this.getDefaultParent();this.isCellLocked(g)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(b,e,g){var m=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(m)&&(m=null);return m};Graph.prototype.isCellFoldable=function(b){var e=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&("1"==e.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=e.collapsible||!this.isContainer(b)&&"1"==e.collapsible))};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,e){b=Math.max(.01,Math.min(this.view.scale*b,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)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};-Graph.prototype.fitPages=function(b,e){var g=1;null==b&&(g=this.getPageLayout(),b=g.width,g=g.height);var m=this.pageScale,v=this.pageFormat,p=this.container.clientHeight-10,A=(this.container.clientWidth-10)/(b*v.width)/m;this.zoomTo(Math.floor(20*(e?A:Math.min(A,p/(g*v.height)/m)))/20);mxUtils.hasScrollbars(this.container)&&(g=this.getPagePadding(),this.container.scrollLeft=Math.min(g.x*this.view.scale,(this.container.scrollWidth-this.container.clientWidth)/2)-1,e||(this.container.scrollTop=2<=b?+Graph.prototype.fitPages=function(b,e){var g=1;null==b&&(g=this.getPageLayout(),b=g.width,g=g.height);var m=this.pageScale,u=this.pageFormat,p=this.container.clientHeight-10,B=(this.container.clientWidth-10)/(b*u.width)/m;this.zoomTo(Math.floor(20*(e?B:Math.min(B,p/(g*u.height)/m)))/20);mxUtils.hasScrollbars(this.container)&&(g=this.getPagePadding(),this.container.scrollLeft=Math.min(g.x*this.view.scale,(this.container.scrollWidth-this.container.clientWidth)/2)-1,e||(this.container.scrollTop=2<=b?Math.min(g.y,(this.container.scrollHeight-this.container.clientHeight)/2):g.y*this.view.scale-1))};-Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var g=this.container.clientWidth-e,m=this.container.clientHeight-e;this.zoomTo(Math.floor(20*Math.min(g/b.width,m/b.height))/20);mxUtils.hasScrollbars(this.container)&&window.setTimeout(mxUtils.bind(this,function(){var v=this.view.translate;this.container.scrollLeft=(b.x+v.x)*this.view.scale-Math.max((g-b.width*this.view.scale)/2+e/2,0);this.container.scrollTop=(b.y+v.y)*this.view.scale-Math.max((m-b.height*this.view.scale)/2+e/2,0)}),0)};+Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var g=this.container.clientWidth-e,m=this.container.clientHeight-e;this.zoomTo(Math.floor(20*Math.min(g/b.width,m/b.height))/20);mxUtils.hasScrollbars(this.container)&&window.setTimeout(mxUtils.bind(this,function(){var u=this.view.translate;this.container.scrollLeft=(b.x+u.x)*this.view.scale-Math.max((g-b.width*this.view.scale)/2+e/2,0);this.container.scrollTop=(b.y+u.y)*this.view.scale-Math.max((m-b.height*this.view.scale)/2+e/2,0)}),0)};Graph.prototype.convertValueToTooltip=function(b){var e=null;mxUtils.isNode(b.value)&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.value.getAttribute("tooltip_"+Graph.diagramLanguage)),null==e&&(e=b.value.getAttribute("tooltip")),null!=e&&(null!=e&&this.isReplacePlaceholders(b)&&(e=this.replacePlaceholders(b,e)),e=Graph.sanitizeHtml(e)));return e};-Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)&&(e=this.convertValueToTooltip(b),null==e)){var g=this.builtInProperties;b=b.value.attributes;var m=[];e="";this.isEnabled()&&(g.push("linkTarget"),g.push("link"));for(var v=0;v<b.length;v++)(Graph.translateDiagram&&"label"==b[v].nodeName||0>mxUtils.indexOf(g,b[v].nodeName))&&0<b[v].nodeValue.length&&m.push({name:b[v].nodeName,value:b[v].nodeValue});m.sort(function(p,A){return p.name<A.name?-1:p.name>A.name?1:0});for(v=-0;v<m.length;v++)"link"==m[v].name&&this.isCustomLink(m[v].value)||(e+=("link"!=m[v].name?"<b>"+mxUtils.htmlEntities(m[v].name)+":</b> ":"")+mxUtils.htmlEntities(m[v].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+e+"</div>"))}return e};-Graph.prototype.addFlowAnimationToNode=function(b,e,g,m){if(null!=b&&null!=m){var v=b.getAttribute("stroke-dasharray");if(""==v||null==v){var p=String(mxUtils.getValue(e,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");v=1==mxUtils.getValue(e,mxConstants.STYLE_FIX_DASH,!1)||null==e.dashPattern?1:mxUtils.getNumber(e,mxConstants.STYLE_STROKEWIDTH,1);if(0<p.length)for(var A=0;A<p.length;A++)p[A]=Math.round(Number(p[A])*g*v*100)/100;b.setAttribute("stroke-dasharray",p.join(" "))}else p=v.split(" ");if(0<-p.length){for(A=v=0;A<p.length;A++){var G=parseFloat(p[A]);isNaN(G)||(v+=parseFloat(p[A]))}0!=p.length%2&&(v*=2);g=Math.round(v/g/16*parseInt(mxUtils.getValue(e,"flowAnimationDuration",500)));p=mxUtils.getValue(e,"flowAnimationTimingFunction","linear");e=mxUtils.getValue(e,"flowAnimationDirection","normal");b.style.animation=m+" "+g+"ms "+mxUtils.htmlEntities(p)+" infinite "+mxUtils.htmlEntities(e);b.style.strokeDashoffset=v}}};+Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)&&(e=this.convertValueToTooltip(b),null==e)){var g=this.builtInProperties;b=b.value.attributes;var m=[];e="";this.isEnabled()&&(g.push("linkTarget"),g.push("link"));for(var u=0;u<b.length;u++)(Graph.translateDiagram&&"label"==b[u].nodeName||0>mxUtils.indexOf(g,b[u].nodeName))&&0<b[u].nodeValue.length&&m.push({name:b[u].nodeName,value:b[u].nodeValue});m.sort(function(p,B){return p.name<B.name?-1:p.name>B.name?1:0});for(u=+0;u<m.length;u++)"link"==m[u].name&&this.isCustomLink(m[u].value)||(e+=("link"!=m[u].name?"<b>"+mxUtils.htmlEntities(m[u].name)+":</b> ":"")+mxUtils.htmlEntities(m[u].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+e+"</div>"))}return e};+Graph.prototype.addFlowAnimationToNode=function(b,e,g,m){if(null!=b&&null!=m){var u=b.getAttribute("stroke-dasharray");if(""==u||null==u){var p=String(mxUtils.getValue(e,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");u=1==mxUtils.getValue(e,mxConstants.STYLE_FIX_DASH,!1)||null==e.dashPattern?1:mxUtils.getNumber(e,mxConstants.STYLE_STROKEWIDTH,1);if(0<p.length)for(var B=0;B<p.length;B++)p[B]=Math.round(Number(p[B])*g*u*100)/100;b.setAttribute("stroke-dasharray",p.join(" "))}else p=u.split(" ");if(0<+p.length){for(B=u=0;B<p.length;B++){var H=parseFloat(p[B]);isNaN(H)||(u+=parseFloat(p[B]))}0!=p.length%2&&(u*=2);g=Math.round(u/g/16*parseInt(mxUtils.getValue(e,"flowAnimationDuration",500)));p=mxUtils.getValue(e,"flowAnimationTimingFunction","linear");e=mxUtils.getValue(e,"flowAnimationDirection","normal");b.style.animation=m+" "+g+"ms "+mxUtils.htmlEntities(p)+" infinite "+mxUtils.htmlEntities(e);b.style.strokeDashoffset=u}}};Graph.prototype.addFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationId){this.flowAnimationId="ge-flow-animation-"+Editor.guid();var e=document.createElement("style");e.innerHTML=this.createFlowAnimationCss(this.flowAnimationId);b.appendChild(e)}return this.flowAnimationId};Graph.prototype.createFlowAnimationCss=function(b){return"@keyframes "+b+" {\n to {\n stroke-dashoffset: 0;\n }\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,e){return Graph.compress(b,e)};Graph.prototype.decompress=function(b,e){return Graph.decompress(b,e)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";@@ -2475,21 +2474,21 @@ mxEvent.getSource(g)==this.graph.container&&this.setDisplay("none")}));this.grapm){e=!1;g=m.getEvent();this.isResetEvent(g)?this.reset():this.isActive()||(m=this.getState(m.getState()),null==m&&mxEvent.isTouchEvent(g)||this.update(m));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(g,m){g=m.getEvent();this.isResetEvent(g)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(g)||this.update(this.getState(m.getState()),m.getGraphX(),m.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(e=!0)}),mouseUp:mxUtils.bind(this,function(g,m){g=m.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(g),mxEvent.getClientY(g));this.isResetEvent(g)?this.reset():this.isActive()&&!e&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),m):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(m.getGraphX(),m.getGraphY())))):mxEvent.isTouchEvent(g)||null!=this.bbox&&mxUtils.contains(this.bbox,m.getGraphX(),m.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(g)||this.reset();e=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,e){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};-HoverIcons.prototype.createArrow=function(b,e,g){var m=null;m=mxUtils.createImage(b.src);m.style.width=b.width+"px";m.style.height=b.height+"px";m.style.padding=this.tolerance+"px";null!=e&&m.setAttribute("title",e);m.style.position="absolute";m.style.cursor=this.cssCursor;mxEvent.addGestureListeners(m,mxUtils.bind(this,function(v){null==this.currentState||this.isResetEvent(v)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),this.drag(v,-this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=m,this.setDisplay("none"),mxEvent.consume(v))}));mxEvent.redirectMouseEvents(m,this.graph,this.currentState);mxEvent.addListener(m,"mouseenter",mxUtils.bind(this,function(v){mxEvent.isMouseEvent(v)&&(null!=this.activeArrow&&this.activeArrow!=m&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(m,100),this.activeArrow=m,this.fireEvent(new mxEventObject("focus",-"arrow",m,"direction",g,"event",v)))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(v){mxEvent.isMouseEvent(v)&&this.fireEvent(new mxEventObject("blur","arrow",m,"direction",g,"event",v));this.graph.isMouseDown||this.resetActiveArrow()}));return m};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};+HoverIcons.prototype.createArrow=function(b,e,g){var m=null;m=mxUtils.createImage(b.src);m.style.width=b.width+"px";m.style.height=b.height+"px";m.style.padding=this.tolerance+"px";null!=e&&m.setAttribute("title",e);m.style.position="absolute";m.style.cursor=this.cssCursor;mxEvent.addGestureListeners(m,mxUtils.bind(this,function(u){null==this.currentState||this.isResetEvent(u)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(u),mxEvent.getClientY(u)),this.drag(u,+this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=m,this.setDisplay("none"),mxEvent.consume(u))}));mxEvent.redirectMouseEvents(m,this.graph,this.currentState);mxEvent.addListener(m,"mouseenter",mxUtils.bind(this,function(u){mxEvent.isMouseEvent(u)&&(null!=this.activeArrow&&this.activeArrow!=m&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(m,100),this.activeArrow=m,this.fireEvent(new mxEventObject("focus",+"arrow",m,"direction",g,"event",u)))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(u){mxEvent.isMouseEvent(u)&&this.fireEvent(new mxEventObject("blur","arrow",m,"direction",g,"event",u));this.graph.isMouseDown||this.resetActiveArrow()}));return m};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var e=0;e<this.elts.length;e++)null!=this.elts[e]&&b(this.elts[e])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(e){e.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};HoverIcons.prototype.drag=function(b,e,g){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,e,g),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=e&&e.setHandlesVisible(!1),e=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=e&&"orthogonalEdgeStyle"===mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),e.cell.style=mxUtils.setStyle(e.cell.style,"sourcePortConstraint",b),e.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,e,g){return this.graph.view.getState(this.graph.getCellAt(e,g))};-HoverIcons.prototype.click=function(b,e,g){var m=g.getEvent(),v=g.getGraphX(),p=g.getGraphY();v=this.getStateAt(b,v,p);null==v||!this.graph.model.isEdge(v.cell)||this.graph.isCloneEvent(m)||v.getVisibleTerminalState(!0)!=b&&v.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,e,g):(this.graph.setSelectionCell(v.cell),this.reset());g.consume()};+HoverIcons.prototype.click=function(b,e,g){var m=g.getEvent(),u=g.getGraphX(),p=g.getGraphY();u=this.getStateAt(b,u,p);null==u||!this.graph.model.isEdge(u.cell)||this.graph.isCloneEvent(m)||u.getVisibleTerminalState(!0)!=b&&u.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,e,g):(this.graph.setSelectionCell(u.cell),this.reset());g.consume()};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(G,S,F){if(null!=g){var P=new mxRectangle(S,F,G.clientWidth,G.clientHeight);mxUtils.intersects(P,g)&&(G==this.arrowUp?F-=P.y+P.height-g.y:G==this.arrowRight?S+=g.x+g.width-P.x:G==this.arrowDown?F+=g.y+g.height-P.y:G==this.arrowLeft&&(S-=P.x+P.width-g.x))}G.style.left=S+"px";G.style.top=F+"px";mxUtils.setOpacity(G,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,G){if(null!=g){var O=new mxRectangle(S,G,H.clientWidth,H.clientHeight);mxUtils.intersects(O,g)&&(H==this.arrowUp?G-=O.y+O.height-g.y:H==this.arrowRight?S+=g.x+g.width-O.x:H==this.arrowDown?G+=g.y+g.height-O.y:H==this.arrowLeft&&(S-=O.x+O.width-g.x))}H.style.left=S+"px";H.style.top=G+"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 m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),v=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==m&&m==v&&v==b&&(b=v=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),A=mxUtils.bind(this,function(G,S){var F=this.graph.model.isVertex(G)&&this.graph.getCellGeometry(G);null==G||this.graph.model.isAncestor(G,-this.currentState.cell)||this.graph.isSwimlane(G)||!(null==F||null==p||F.height<3*p.height&&F.width<3*p.width)?S.style.visibility="visible":S.style.visibility="hidden"});A(e,this.arrowRight);A(m,this.arrowLeft);A(v,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 m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),u=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==m&&m==u&&u==b&&(b=u=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),B=mxUtils.bind(this,function(H,S){var G=this.graph.model.isVertex(H)&&this.graph.getCellGeometry(H);null==H||this.graph.model.isAncestor(H,+this.currentState.cell)||this.graph.isSwimlane(H)||!(null==G||null==p||G.height<3*p.height&&G.width<3*p.width)?S.style.visibility="visible":S.style.visibility="hidden"});B(e,this.arrowRight);B(m,this.arrowLeft);B(u,this.arrowUp);B(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};@@ -2497,205 +2496,205 @@ HoverIcons.prototype.update=function(b,e,g){if(!this.graph.connectionArrowsEnablwindow.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,g))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,g)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!=b||null==this.bbox||null==e||null==g||!mxUtils.contains(this.bbox,e,g))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};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),m=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(g,"html","0")){var v=this.convertValueToString(b);"0"!=mxUtils.getValue(g,"nl2Br","1")&&(v=v.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));v=Editor.convertHtmlToText(v);this.cellLabelChanged(b,v);m=!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 m};Graph.prototype.createParent=function(b,e,g,m,v){b=this.cloneCell(b);for(var p=0;p<g;p++){var A=this.cloneCell(e),G=this.getCellGeometry(A);null!=G&&(G.x+=p*m,G.y+=p*v);b.insert(A)}return b};-Graph.prototype.createTable=function(b,e,g,m,v,p,A,G,S){g=null!=g?g:60;m=null!=m?m:40;p=null!=p?p:30;G=null!=G?G:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,-null,null!=v?v:"",0,0,e*g,b*m+(null!=v?p:0),null!=A?A:"shape=table;startSize="+(null!=v?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*g,m,G),this.createVertex(null,null,"",0,0,g,m,S),e,g,0),b,0,m)};-Graph.prototype.setTableValues=function(b,e,g){for(var m=this.model.getChildCells(b,!0),v=0;v<m.length;v++)if(null!=g&&(m[v].value=g[v]),null!=e)for(var p=this.model.getChildCells(m[v],!0),A=0;A<p.length;A++)null!=e[v][A]&&(p[A].value=e[v][A]);return b};-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,v,p,A,G,S){g=null!=g?g:120;m=null!=m?m:120;A=null!=A?A:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";G=null!=G?G:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";-S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";v=this.createVertex(null,null,null!=v?v:"",0,0,e*g,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==v?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(v),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);v.geometry.width+=p;v.geometry.height+=-p;A=this.createVertex(null,null,"",0,p,e*g+p,m,A);v.insert(this.createParent(A,this.createVertex(null,null,"",p,0,g,m,G),e,g,0));return 1<b?(A.geometry.y=m+p,this.createParent(v,this.createParent(A,this.createVertex(null,null,"",p,0,g,m,S),e,g,0),b-1,0,m)):v};-Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var v=0;v<m.length;v++){for(var p=this.getActualStartSize(m[v],!0),A=this.model.getChildCells(m[v],!0),G=this.getCellStyle(m[v],!0),S=null,F=[],P=0;P<A.length;P++){var R=this.getCellGeometry(A[P]),T={cell:A[P],rospan:1,colspan:1,row:v,col:P,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;T.point=new mxPoint(R.width+(null!=S?S.point.x:b.x+p.x),R.height+(null!=g&&null!=-g[0]?g[0].point.y:b.y+p.y));T.actual=T;null!=g&&null!=g[P]&&1<g[P].rowspan?(T.rowspan=g[P].rowspan-1,T.colspan=g[P].colspan,T.actual=g[P].actual):null!=S&&1<S.colspan?(T.rowspan=S.rowspan,T.colspan=S.colspan-1,T.actual=S.actual):(S=this.getCurrentCellStyle(A[P],!0),null!=S&&(T.rowspan=parseInt(S.rowspan||1),T.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(G,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(G,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(T,A.length,-m.length,b.x+(S?p.x:0),b.y+(S?p.y:0));F.push(T);S=T}g=F}};Graph.prototype.getTableLines=function(b,e,g){var m=[],v=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(p,A,G,S,F){e&&p.row<G-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(S,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));g&&p.col<A-1&&(null==v[p.col]&&(v[p.col]=[new mxPoint(p.point.x,F)]),1<p.colspan&&v[p.col].push(null),v[p.col].push(p.point))}));return m.concat(v)};+Graph.prototype.removeTextStyleForCell=function(b,e){var g=this.getCurrentCellStyle(b),m=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(g,"html","0")){var u=this.convertValueToString(b);"0"!=mxUtils.getValue(g,"nl2Br","1")&&(u=u.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));u=Editor.convertHtmlToText(u);this.cellLabelChanged(b,u);m=!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 m};Graph.prototype.createParent=function(b,e,g,m,u){b=this.cloneCell(b);for(var p=0;p<g;p++){var B=this.cloneCell(e),H=this.getCellGeometry(B);null!=H&&(H.x+=p*m,H.y+=p*u);b.insert(B)}return b};+Graph.prototype.createTable=function(b,e,g,m,u,p,B,H,S){g=null!=g?g:60;m=null!=m?m:40;p=null!=p?p:30;H=null!=H?H:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,+null,null!=u?u:"",0,0,e*g,b*m+(null!=u?p:0),null!=B?B:"shape=table;startSize="+(null!=u?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*g,m,H),this.createVertex(null,null,"",0,0,g,m,S),e,g,0),b,0,m)};+Graph.prototype.setTableValues=function(b,e,g){for(var m=this.model.getChildCells(b,!0),u=0;u<m.length;u++)if(null!=g&&(m[u].value=g[u]),null!=e)for(var p=this.model.getChildCells(m[u],!0),B=0;B<p.length;B++)null!=e[u][B]&&(p[B].value=e[u][B]);return b};+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,u,p,B,H,S){g=null!=g?g:120;m=null!=m?m:120;B=null!=B?B:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";H=null!=H?H:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";+S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";u=this.createVertex(null,null,null!=u?u:"",0,0,e*g,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==u?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(u),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);u.geometry.width+=p;u.geometry.height+=+p;B=this.createVertex(null,null,"",0,p,e*g+p,m,B);u.insert(this.createParent(B,this.createVertex(null,null,"",p,0,g,m,H),e,g,0));return 1<b?(B.geometry.y=m+p,this.createParent(u,this.createParent(B,this.createVertex(null,null,"",p,0,g,m,S),e,g,0),b-1,0,m)):u};+Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var u=0;u<m.length;u++){for(var p=this.getActualStartSize(m[u],!0),B=this.model.getChildCells(m[u],!0),H=this.getCellStyle(m[u],!0),S=null,G=[],O=0;O<B.length;O++){var R=this.getCellGeometry(B[O]),c={cell:B[O],rospan:1,colspan:1,row:u,col:O,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;c.point=new mxPoint(R.width+(null!=S?S.point.x:b.x+p.x),R.height+(null!=g&&null!=+g[0]?g[0].point.y:b.y+p.y));c.actual=c;null!=g&&null!=g[O]&&1<g[O].rowspan?(c.rowspan=g[O].rowspan-1,c.colspan=g[O].colspan,c.actual=g[O].actual):null!=S&&1<S.colspan?(c.rowspan=S.rowspan,c.colspan=S.colspan-1,c.actual=S.actual):(S=this.getCurrentCellStyle(B[O],!0),null!=S&&(c.rowspan=parseInt(S.rowspan||1),c.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(H,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(c,B.length,+m.length,b.x+(S?p.x:0),b.y+(S?p.y:0));G.push(c);S=c}g=G}};Graph.prototype.getTableLines=function(b,e,g){var m=[],u=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(p,B,H,S,G){e&&p.row<H-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(S,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));g&&p.col<B-1&&(null==u[p.col]&&(u[p.col]=[new mxPoint(p.point.x,G)]),1<p.colspan&&u[p.col].push(null),u[p.col].push(p.point))}));return m.concat(u)};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};-Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var v=this.getCellGeometry(b);if(null!=v){v=v.clone();v.height+=e;m.setGeometry(b,v);var p=m.getParent(b),A=m.getChildCells(p,!0);if(!g){var G=mxUtils.indexOf(A,b);if(G<A.length-1){var S=A[G+1],F=this.getCellGeometry(S);null!=F&&(F=F.clone(),F.y+=e,F.height-=e,m.setGeometry(S,F))}}var P=this.getCellGeometry(p);null!=P&&(g||(g=b==A[A.length-1]),g&&(P=P.clone(),P.height+=e,m.setGeometry(p,P)))}}finally{m.endUpdate()}};-Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),v=m.getParent(b),p=m.getParent(v),A=m.getChildCells(v,!0);b=mxUtils.indexOf(A,b);var G=b==A.length-1;m.beginUpdate();try{for(var S=m.getChildCells(p,!0),F=0;F<S.length;F++){v=S[F];A=m.getChildCells(v,!0);var P=A[b],R=this.getCellGeometry(P);null!=R&&(R=R.clone(),R.width+=e,null!=R.alternateBounds&&(R.alternateBounds.width+=e),m.setGeometry(P,R));b<A.length-1&&(P=A[b+1],R=this.getCellGeometry(P),null!=R&&(R=R.clone(),-R.x+=e,g||(R.width-=e,null!=R.alternateBounds&&(R.alternateBounds.width-=e)),m.setGeometry(P,R)))}if(G||g){var T=this.getCellGeometry(p);null!=T&&(T=T.clone(),T.width+=e,m.setGeometry(p,T))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};-TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var g=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var v=this.graph.getCellGeometry(b[m]);null!=v&&(g+=e?v.width:v.height)}return g};-TableLayout.prototype.getRowLayout=function(b,e){var g=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(g,!0);e=e-m.x-m.width;var v=[];m=m.x;for(var p=0;p<g.length;p++){var A=this.graph.getCellGeometry(g[p]);null!=A&&(m+=(null!=A.alternateBounds?A.alternateBounds.width:A.width)*e/b,v.push(Math.round(m)))}return v};-TableLayout.prototype.layoutRow=function(b,e,g,m){var v=this.graph.getModel(),p=v.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var A=b.x,G=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var S=0;S<p.length;S++){var F=this.graph.getCellGeometry(p[S]);null!=F&&(F=F.clone(),F.y=b.y,F.height=g-b.y-b.height,null!=e?(F.x=e[S],F.width=e[S+1]-F.x,S==p.length-1&&S<e.length-2&&(F.width=m-F.x-b.x-b.width)):(F.x=A,A+=F.width,S==p.length-1?F.width=m-b.x-b.width-G:G+=F.width),F.alternateBounds=new mxRectangle(0,-0,F.width,F.height),v.setGeometry(p[S],F))}return G};-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),v="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var A=this.graph.getModel(),G=0;A.beginUpdate();try{for(var S=g.height-e.y-e.height,F=g.width-e.x-e.width,P=A.getChildCells(b,!0),R=0;R<P.length;R++)A.setVisible(P[R],!0);var T=this.getSize(P,!1);if(0<S&&0<F&&0<-P.length&&0<T){if(v){var c=this.graph.getCellGeometry(P[P.length-1]);null!=c&&(c=c.clone(),c.height=S-T+c.height,A.setGeometry(P[P.length-1],c))}var f=p?null:this.getRowLayout(P[0],F),k=[],B=e.y;for(R=0;R<P.length;R++)c=this.graph.getCellGeometry(P[R]),null!=c&&(c=c.clone(),c.x=e.x,c.width=F,c.y=Math.round(B),B=v||m?B+c.height:B+c.height/T*S,c.height=Math.round(B)-c.y,A.setGeometry(P[R],c)),G=Math.max(G,this.layoutRow(P[R],f,c.height,F,k));m&&S<T&&(g=g.clone(),g.height=B+e.height,A.setGeometry(b,-g));p&&F<G+Graph.minTableColumnWidth&&(g=g.clone(),g.width=G+e.width+e.x+Graph.minTableColumnWidth,A.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(z){A.setVisible(z.cell,z.actual.cell==z.cell);if(z.actual.cell!=z.cell){if(z.actual.row==z.row){var C=null!=z.geo.alternateBounds?z.geo.alternateBounds:z.geo;z.actual.geo.width+=C.width}z.actual.col==z.col&&(C=null!=z.geo.alternateBounds?z.geo.alternateBounds:z.geo,z.actual.geo.height+=C.height)}}))}else for(R=0;R<P.length;R++)A.setVisible(P[R],-!1)}finally{A.endUpdate()}}};-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(R,T){T=null!=T?T:!0;var c=this.getState(R);null!=c&&T&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=e.apply(this,-arguments);null!=c&&T&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var R=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=-R)for(var T=0;T<R.length;T++)if("hidden"!=R[T].getAttribute("visibility"))return R[T];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(R){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;-mxShape.prototype.createSvgCanvas=function(R){R=m.apply(this,arguments);null!=this.state&&(R.adaptiveColors=this.state.view.graph.getAdaptiveColors());return R};var v=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(R,T){return v.apply(this,arguments)||null!=R.routedPoints&&null!=T.routedPoints&&!mxUtils.equalPoints(T.routedPoints,R.routedPoints)};var p=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(R){p.apply(this,arguments);-this.graph.model.isEdge(R.cell)&&1!=R.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(R)};mxGraphView.prototype.updateLineJumps=function(R){var T=R.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=R.routedPoints,f=null;if(null!=T&&null!=this.validEdges&&"none"!==mxUtils.getValue(R.style,"jumpStyle","none")){var k=function(Y,fa,Z){var l=new mxPoint(fa,Z);l.type=Y;f.push(l);l=null!=R.routedPoints?R.routedPoints[f.length-1]:null;return null==l||l.type!=Y||l.x!=fa||l.y!=Z},B=.5*this.scale;-c=!1;f=[];for(var z=0;z<T.length-1;z++){for(var C=T[z+1],I=T[z],L=[],K=T[z+2];z<T.length-2&&mxUtils.ptSegDistSq(I.x,I.y,K.x,K.y,C.x,C.y)<1*this.scale*this.scale;)C=K,z++,K=T[z+2];c=k(0,I.x,I.y)||c;for(var O=0;O<this.validEdges.length;O++){var da=this.validEdges[O],ea=da.absolutePoints;if(null!=ea&&mxUtils.intersects(R,da)&&"1"!=da.style.noJump){var ca=null;for(da=0;da<ea.length-1;da++){var V=ea[da+1],ma=ea[da];for(K=ea[da+2];da<ea.length-2&&mxUtils.ptSegDistSq(ma.x,ma.y,K.x,K.y,V.x,V.y)<1*this.scale*-this.scale;)V=K,da++,K=ea[da+2];var la=mxUtils.intersection(I.x,I.y,C.x,C.y,ma.x,ma.y,V.x,V.y);if(null!=la&&(Math.abs(la.x-I.x)>B||Math.abs(la.y-I.y)>B)&&(Math.abs(la.x-C.x)>B||Math.abs(la.y-C.y)>B)&&(null==ca||mxUtils.ptLineDist(I.x,I.y,C.x,C.y,ca.x,ca.y)>B||mxUtils.ptLineDist(I.x,I.y,C.x,C.y,ma.x,ma.y)>B)&&(null==K||mxUtils.ptLineDist(I.x,I.y,C.x,C.y,K.x,K.y)>B||mxUtils.ptLineDist(I.x,I.y,C.x,C.y,V.x,V.y)>B)){K=la.x-I.x;ca=la.y-I.y;la={distSq:K*K+ca*ca,x:la.x,y:la.y};for(K=0;K<L.length;K++)if(L[K].distSq>-la.distSq){L.splice(K,0,la);la=null;break}null==la||0!=L.length&&L[L.length-1].x===la.x&&L[L.length-1].y===la.y||L.push(la)}ca=ma}}}for(da=0;da<L.length;da++)c=k(1,L[da].x,L[da].y)||c}la=T[T.length-1];c=k(0,la.x,la.y)||c}R.routedPoints=f;return c}return!1};var A=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(R,T,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)A.apply(this,-arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,k=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,B=mxUtils.getValue(this.style,"jumpStyle","none"),z=!0,C=null,I=null,L=[],K=null;R.begin();for(var O=0;O<this.state.routedPoints.length;O++){var da=this.state.routedPoints[O],ea=new mxPoint(da.x/this.scale,da.y/this.scale);0==O?ea=T[0]:O==this.state.routedPoints.length-1&&(ea=T[T.length-1]);var ca=!1;-if(null!=C&&1==da.type){var V=this.state.routedPoints[O+1];da=V.x/this.scale-ea.x;V=V.y/this.scale-ea.y;da=da*da+V*V;null==K&&(K=new mxPoint(ea.x-C.x,ea.y-C.y),I=Math.sqrt(K.x*K.x+K.y*K.y),0<I?(K.x=K.x*k/I,K.y=K.y*k/I):K=null);da>k*k&&0<I&&(da=C.x-ea.x,V=C.y-ea.y,da=da*da+V*V,da>k*k&&(ca=new mxPoint(ea.x-K.x,ea.y-K.y),da=new mxPoint(ea.x+K.x,ea.y+K.y),L.push(ca),this.addPoints(R,L,c,f,!1,null,z),L=0>Math.round(K.x)||0==Math.round(K.x)&&0>=Math.round(K.y)?1:-1,z=!1,"sharp"==B?(R.lineTo(ca.x-K.y*L,-ca.y+K.x*L),R.lineTo(da.x-K.y*L,da.y+K.x*L),R.lineTo(da.x,da.y)):"line"==B?(R.moveTo(ca.x+K.y*L,ca.y-K.x*L),R.lineTo(ca.x-K.y*L,ca.y+K.x*L),R.moveTo(da.x-K.y*L,da.y+K.x*L),R.lineTo(da.x+K.y*L,da.y-K.x*L),R.moveTo(da.x,da.y)):"arc"==B?(L*=1.3,R.curveTo(ca.x-K.y*L,ca.y+K.x*L,da.x-K.y*L,da.y+K.x*L,da.x,da.y)):(R.moveTo(da.x,da.y),z=!0),L=[da],ca=!0))}else K=null;ca||(L.push(ea),C=ea)}this.addPoints(R,L,c,f,!1,null,z);R.stroke()}};var G=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=-function(R,T,c,f){return null!=T&&"centerPerimeter"==T.style[mxConstants.STYLE_PERIMETER]?new mxPoint(T.getCenterX(),T.getCenterY()):G.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(R,T,c,f){if(null==T||null==R||"1"!=T.style.snapToPoint&&"1"!=R.style.snapToPoint)S.apply(this,arguments);else{T=this.getTerminalPort(R,T,f);var k=this.getNextPoint(R,c,f),B=this.graph.isOrthogonal(R),z=mxUtils.toRadians(Number(T.style[mxConstants.STYLE_ROTATION]||-"0")),C=new mxPoint(T.getCenterX(),T.getCenterY());if(0!=z){var I=Math.cos(-z),L=Math.sin(-z);k=mxUtils.getRotatedPoint(k,I,L,C)}I=parseFloat(R.style[mxConstants.STYLE_PERIMETER_SPACING]||0);I+=parseFloat(R.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);k=this.getPerimeterPoint(T,k,0==z&&B,I);0!=z&&(I=Math.cos(z),L=Math.sin(z),k=mxUtils.getRotatedPoint(k,I,L,C));R.setAbsoluteTerminalPoint(this.snapToAnchorPoint(R,T,c,f,k),f)}};mxGraphView.prototype.snapToAnchorPoint=-function(R,T,c,f,k){if(null!=T&&null!=R){R=this.graph.getAllConnectionConstraints(T);f=c=null;if(null!=R)for(var B=0;B<R.length;B++){var z=this.graph.getConnectionPoint(T,R[B]);if(null!=z){var C=(z.x-k.x)*(z.x-k.x)+(z.y-k.y)*(z.y-k.y);if(null==f||C<f)c=z,f=C}}null!=c&&(k=c)}return k};var F=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(R,T,c){var f=F.apply(this,arguments);"1"==R.getAttribute("placeholders")&&null!=c.state&&(f=c.state.view.graph.replacePlaceholders(c.state.cell,-f));return f};var P=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(R){if(null!=R.style&&"undefined"!==typeof pako){var T=mxUtils.getValue(R.style,mxConstants.STYLE_SHAPE,null);if(null!=T&&"string"===typeof T&&"stencil("==T.substring(0,8))try{var c=T.substring(8,T.length-1),f=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(f.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return P.apply(this,arguments)}})();+Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var u=this.getCellGeometry(b);if(null!=u){u=u.clone();u.height+=e;m.setGeometry(b,u);var p=m.getParent(b),B=m.getChildCells(p,!0);if(!g){var H=mxUtils.indexOf(B,b);if(H<B.length-1){var S=B[H+1],G=this.getCellGeometry(S);null!=G&&(G=G.clone(),G.y+=e,G.height-=e,m.setGeometry(S,G))}}var O=this.getCellGeometry(p);null!=O&&(g||(g=b==B[B.length-1]),g&&(O=O.clone(),O.height+=e,m.setGeometry(p,O)))}}finally{m.endUpdate()}};+Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),u=m.getParent(b),p=m.getParent(u),B=m.getChildCells(u,!0);b=mxUtils.indexOf(B,b);var H=b==B.length-1;m.beginUpdate();try{for(var S=m.getChildCells(p,!0),G=0;G<S.length;G++){u=S[G];B=m.getChildCells(u,!0);var O=B[b],R=this.getCellGeometry(O);null!=R&&(R=R.clone(),R.width+=e,null!=R.alternateBounds&&(R.alternateBounds.width+=e),m.setGeometry(O,R));b<B.length-1&&(O=B[b+1],R=this.getCellGeometry(O),null!=R&&(R=R.clone(),+R.x+=e,g||(R.width-=e,null!=R.alternateBounds&&(R.alternateBounds.width-=e)),m.setGeometry(O,R)))}if(H||g){var c=this.getCellGeometry(p);null!=c&&(c=c.clone(),c.width+=e,m.setGeometry(p,c))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};+TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var g=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var u=this.graph.getCellGeometry(b[m]);null!=u&&(g+=e?u.width:u.height)}return g};+TableLayout.prototype.getRowLayout=function(b,e){var g=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(g,!0);e=e-m.x-m.width;var u=[];m=m.x;for(var p=0;p<g.length;p++){var B=this.graph.getCellGeometry(g[p]);null!=B&&(m+=(null!=B.alternateBounds?B.alternateBounds.width:B.width)*e/b,u.push(Math.round(m)))}return u};+TableLayout.prototype.layoutRow=function(b,e,g,m){var u=this.graph.getModel(),p=u.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var B=b.x,H=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var S=0;S<p.length;S++){var G=this.graph.getCellGeometry(p[S]);null!=G&&(G=G.clone(),G.y=b.y,G.height=g-b.y-b.height,null!=e?(G.x=e[S],G.width=e[S+1]-G.x,S==p.length-1&&S<e.length-2&&(G.width=m-G.x-b.x-b.width)):(G.x=B,B+=G.width,S==p.length-1?G.width=m-b.x-b.width-H:H+=G.width),G.alternateBounds=new mxRectangle(0,+0,G.width,G.height),u.setGeometry(p[S],G))}return H};+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),u="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var B=this.graph.getModel(),H=0;B.beginUpdate();try{for(var S=g.height-e.y-e.height,G=g.width-e.x-e.width,O=B.getChildCells(b,!0),R=0;R<O.length;R++)B.setVisible(O[R],!0);var c=this.getSize(O,!1);if(0<S&&0<G&&0<+O.length&&0<c){if(u){var f=this.graph.getCellGeometry(O[O.length-1]);null!=f&&(f=f.clone(),f.height=S-c+f.height,B.setGeometry(O[O.length-1],f))}var l=p?null:this.getRowLayout(O[0],G),t=[],z=e.y;for(R=0;R<O.length;R++)f=this.graph.getCellGeometry(O[R]),null!=f&&(f=f.clone(),f.x=e.x,f.width=G,f.y=Math.round(z),z=u||m?z+f.height:z+f.height/c*S,f.height=Math.round(z)-f.y,B.setGeometry(O[R],f)),H=Math.max(H,this.layoutRow(O[R],l,f.height,G,t));m&&S<c&&(g=g.clone(),g.height=z+e.height,B.setGeometry(b,+g));p&&G<H+Graph.minTableColumnWidth&&(g=g.clone(),g.width=H+e.width+e.x+Graph.minTableColumnWidth,B.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){B.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=F.width}C.actual.col==C.col&&(F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=F.height)}}))}else for(R=0;R<O.length;R++)B.setVisible(O[R],+!1)}finally{B.endUpdate()}}};+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(R,c){c=null!=c?c:!0;var f=this.getState(R);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=e.apply(this,+arguments);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var R=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=+R)for(var c=0;c<R.length;c++)if("hidden"!=R[c].getAttribute("visibility"))return R[c];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(R){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;+mxShape.prototype.createSvgCanvas=function(R){R=m.apply(this,arguments);null!=this.state&&(R.adaptiveColors=this.state.view.graph.getAdaptiveColors());return R};var u=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(R,c){return u.apply(this,arguments)||null!=R.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,R.routedPoints)};var p=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(R){p.apply(this,arguments);+this.graph.model.isEdge(R.cell)&&1!=R.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(R)};mxGraphView.prototype.updateLineJumps=function(R){var c=R.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=R.routedPoints,l=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(R.style,"jumpStyle","none")){var t=function(Y,la,Z){var k=new mxPoint(la,Z);k.type=Y;l.push(k);k=null!=R.routedPoints?R.routedPoints[l.length-1]:null;return null==k||k.type!=Y||k.x!=la||k.y!=Z},z=.5*this.scale;+f=!1;l=[];for(var C=0;C<c.length-1;C++){for(var F=c[C+1],N=c[C],K=[],I=c[C+2];C<c.length-2&&mxUtils.ptSegDistSq(N.x,N.y,I.x,I.y,F.x,F.y)<1*this.scale*this.scale;)F=I,C++,I=c[C+2];f=t(0,N.x,N.y)||f;for(var ca=0;ca<this.validEdges.length;ca++){var da=this.validEdges[ca],ea=da.absolutePoints;if(null!=ea&&mxUtils.intersects(R,da)&&"1"!=da.style.noJump){var X=null;for(da=0;da<ea.length-1;da++){var ba=ea[da+1],ha=ea[da];for(I=ea[da+2];da<ea.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,I.x,I.y,ba.x,ba.y)<1*this.scale*+this.scale;)ba=I,da++,I=ea[da+2];var ma=mxUtils.intersection(N.x,N.y,F.x,F.y,ha.x,ha.y,ba.x,ba.y);if(null!=ma&&(Math.abs(ma.x-N.x)>z||Math.abs(ma.y-N.y)>z)&&(Math.abs(ma.x-F.x)>z||Math.abs(ma.y-F.y)>z)&&(null==X||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,X.x,X.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ha.x,ha.y)>z)&&(null==I||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,I.x,I.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ba.x,ba.y)>z)){I=ma.x-N.x;X=ma.y-N.y;ma={distSq:I*I+X*X,x:ma.x,y:ma.y};for(I=0;I<K.length;I++)if(K[I].distSq>+ma.distSq){K.splice(I,0,ma);ma=null;break}null==ma||0!=K.length&&K[K.length-1].x===ma.x&&K[K.length-1].y===ma.y||K.push(ma)}X=ha}}}for(da=0;da<K.length;da++)f=t(1,K[da].x,K[da].y)||f}ma=c[c.length-1];f=t(0,ma.x,ma.y)||f}R.routedPoints=l;return f}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(R,c,f){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)B.apply(this,+arguments);else{var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,F=null,N=null,K=[],I=null;R.begin();for(var ca=0;ca<this.state.routedPoints.length;ca++){var da=this.state.routedPoints[ca],ea=new mxPoint(da.x/this.scale,da.y/this.scale);0==ca?ea=c[0]:ca==this.state.routedPoints.length-1&&(ea=c[c.length-1]);var X=+!1;if(null!=F&&1==da.type){var ba=this.state.routedPoints[ca+1];da=ba.x/this.scale-ea.x;ba=ba.y/this.scale-ea.y;da=da*da+ba*ba;null==I&&(I=new mxPoint(ea.x-F.x,ea.y-F.y),N=Math.sqrt(I.x*I.x+I.y*I.y),0<N?(I.x=I.x*t/N,I.y=I.y*t/N):I=null);da>t*t&&0<N&&(da=F.x-ea.x,ba=F.y-ea.y,da=da*da+ba*ba,da>t*t&&(X=new mxPoint(ea.x-I.x,ea.y-I.y),da=new mxPoint(ea.x+I.x,ea.y+I.y),K.push(X),this.addPoints(R,K,f,l,!1,null,C),K=0>Math.round(I.x)||0==Math.round(I.x)&&0>=Math.round(I.y)?1:-1,C=!1,"sharp"==z?(R.lineTo(X.x-+I.y*K,X.y+I.x*K),R.lineTo(da.x-I.y*K,da.y+I.x*K),R.lineTo(da.x,da.y)):"line"==z?(R.moveTo(X.x+I.y*K,X.y-I.x*K),R.lineTo(X.x-I.y*K,X.y+I.x*K),R.moveTo(da.x-I.y*K,da.y+I.x*K),R.lineTo(da.x+I.y*K,da.y-I.x*K),R.moveTo(da.x,da.y)):"arc"==z?(K*=1.3,R.curveTo(X.x-I.y*K,X.y+I.x*K,da.x-I.y*K,da.y+I.x*K,da.x,da.y)):(R.moveTo(da.x,da.y),C=!0),K=[da],X=!0))}else I=null;X||(K.push(ea),F=ea)}this.addPoints(R,K,f,l,!1,null,C);R.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=+function(R,c,f,l){return null!=c&&"centerPerimeter"==c.style[mxConstants.STYLE_PERIMETER]?new mxPoint(c.getCenterX(),c.getCenterY()):H.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(R,c,f,l){if(null==c||null==R||"1"!=c.style.snapToPoint&&"1"!=R.style.snapToPoint)S.apply(this,arguments);else{c=this.getTerminalPort(R,c,l);var t=this.getNextPoint(R,f,l),z=this.graph.isOrthogonal(R),C=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||+"0")),F=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=C){var N=Math.cos(-C),K=Math.sin(-C);t=mxUtils.getRotatedPoint(t,N,K,F)}N=parseFloat(R.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(R.style[l?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(c,t,0==C&&z,N);0!=C&&(N=Math.cos(C),K=Math.sin(C),t=mxUtils.getRotatedPoint(t,N,K,F));R.setAbsoluteTerminalPoint(this.snapToAnchorPoint(R,c,f,l,t),l)}};mxGraphView.prototype.snapToAnchorPoint=+function(R,c,f,l,t){if(null!=c&&null!=R){R=this.graph.getAllConnectionConstraints(c);l=f=null;if(null!=R)for(var z=0;z<R.length;z++){var C=this.graph.getConnectionPoint(c,R[z]);if(null!=C){var F=(C.x-t.x)*(C.x-t.x)+(C.y-t.y)*(C.y-t.y);if(null==l||F<l)f=C,l=F}}null!=f&&(t=f)}return t};var G=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(R,c,f){var l=G.apply(this,arguments);"1"==R.getAttribute("placeholders")&&null!=f.state&&(l=f.state.view.graph.replacePlaceholders(f.state.cell,+l));return l};var O=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(R){if(null!=R.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(R.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var f=c.substring(8,c.length-1),l=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(l.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return O.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};mxStencilRegistry.setFileLoaded=function(b){mxStencilRegistry.filesLoaded[b]=!0};-mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var g=mxStencilRegistry.getBasenameForStencil(b);if(null!=g){e=mxStencilRegistry.libraries[g];if(null!=e){if(null==mxStencilRegistry.packages[g]){for(var m=0;m<e.length;m++){var v=e[m];if(!mxStencilRegistry.isFileLoaded(v))if(mxStencilRegistry.setFileLoaded(v),".xml"==v.toLowerCase().substring(v.length-4,v.length))mxStencilRegistry.loadStencilSet(v,-null);else if(".js"==v.toLowerCase().substring(v.length-3,v.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(v);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(A){null!=window.console&&console.log("error in getStencil:",b,g,e,v,A)}}mxStencilRegistry.packages[g]=1}}else g=g.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+g+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};+mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var g=mxStencilRegistry.getBasenameForStencil(b);if(null!=g){e=mxStencilRegistry.libraries[g];if(null!=e){if(null==mxStencilRegistry.packages[g]){for(var m=0;m<e.length;m++){var u=e[m];if(!mxStencilRegistry.isFileLoaded(u))if(mxStencilRegistry.setFileLoaded(u),".xml"==u.toLowerCase().substring(u.length-4,u.length))mxStencilRegistry.loadStencilSet(u,+null);else if(".js"==u.toLowerCase().substring(u.length-3,u.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(u);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(B){null!=window.console&&console.log("error in getStencil:",b,g,e,u,B)}}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<b.length&&"mxgraph"==b[0])){e=b[1];for(var g=2;g<b.length-1;g++)e+="/"+b[g]}return e};-mxStencilRegistry.loadStencilSet=function(b,e,g,m){var v=mxStencilRegistry.packages[b];if(null!=g&&g||null==v){var p=!1;if(null==v)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(A){null!=A&&null!=A.documentElement&&(mxStencilRegistry.packages[b]=A,p=!0,mxStencilRegistry.parseStencilSet(A.documentElement,e,p))}));return}v=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=v;p=!0}catch(A){null!=window.console&&console.log("error in loadStencilSet:",b,A)}null!=v&&null!=-v.documentElement&&mxStencilRegistry.parseStencilSet(v.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(g){e(200<=g.getStatus()&&299>=g.getStatus()?g.getXml():null)}),mxUtils.bind(this,function(g){e(null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};-mxStencilRegistry.parseStencilSet=function(b,e,g){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,g),m=m.nextSibling;else{g=null!=g?g:!0;m=b.firstChild;var v="";b=b.getAttribute("name");for(null!=b&&(v=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){v=v.toLowerCase();var p=b.replace(/ /g,"_");g&&mxStencilRegistry.addStencil(v+p.toLowerCase(),new mxStencil(m));if(null!=e){var A=m.getAttribute("w"),-G=m.getAttribute("h");A=null==A?80:parseInt(A,10);G=null==G?80:parseInt(G,10);e(v,p,b,A,G)}}m=m.nextSibling}}};-"undefined"!==typeof mxVertexHandler&&function(){function b(){var t=document.createElement("div");t.className="geHint";t.style.whiteSpace="nowrap";t.style.position="absolute";return t}function e(t,N){switch(N){case mxConstants.POINTS:return t;case mxConstants.MILLIMETERS:return(t/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(t/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(t/mxConstants.PIXELS_PER_INCH).toFixed(3)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";+mxStencilRegistry.loadStencilSet=function(b,e,g,m){var u=mxStencilRegistry.packages[b];if(null!=g&&g||null==u){var p=!1;if(null==u)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(B){null!=B&&null!=B.documentElement&&(mxStencilRegistry.packages[b]=B,p=!0,mxStencilRegistry.parseStencilSet(B.documentElement,e,p))}));return}u=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=u;p=!0}catch(B){null!=window.console&&console.log("error in loadStencilSet:",b,B)}null!=u&&null!=+u.documentElement&&mxStencilRegistry.parseStencilSet(u.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(g){e(200<=g.getStatus()&&299>=g.getStatus()?g.getXml():null)}),mxUtils.bind(this,function(g){e(null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};+mxStencilRegistry.parseStencilSet=function(b,e,g){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,g),m=m.nextSibling;else{g=null!=g?g:!0;m=b.firstChild;var u="";b=b.getAttribute("name");for(null!=b&&(u=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){u=u.toLowerCase();var p=b.replace(/ /g,"_");g&&mxStencilRegistry.addStencil(u+p.toLowerCase(),new mxStencil(m));if(null!=e){var B=m.getAttribute("w"),+H=m.getAttribute("h");B=null==B?80:parseInt(B,10);H=null==H?80:parseInt(H,10);e(u,p,b,B,H)}}m=m.nextSibling}}};+"undefined"!==typeof mxVertexHandler&&function(){function b(){var x=document.createElement("div");x.className="geHint";x.style.whiteSpace="nowrap";x.style.position="absolute";return x}function e(x,M){switch(M){case mxConstants.POINTS:return x;case mxConstants.MILLIMETERS:return(x/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(x/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(x/mxConstants.PIXELS_PER_INCH).toFixed(3)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=50;mxConstants.HIGHLIGHT_SIZE=5;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;-mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(t){return!mxEvent.isAltDown(t)||mxEvent.isShiftDown(t)};var g=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(t){return g.apply(this,arguments)||this.graph.isTableRow(t)||this.graph.isTableCell(t)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=-function(t){return m.apply(this,arguments)||this.graph.isEdgeIgnored(t)};var v=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(t){return this.graph.isCloneEvent(t)!=v.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var t=new mxEllipse(null,this.highlightColor,this.highlightColor,0);t.opacity=mxConstants.HIGHLIGHT_OPACITY;return t};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(t){t=this.graph.createCurrentEdgeStyle();t=this.graph.createEdge(null,null,null,null,null,t);t=new mxCellState(this.graph.view,t,this.graph.getCellStyle(t));for(var N in this.graph.currentEdgeStyle)t.style[N]=this.graph.currentEdgeStyle[N];if(null!=this.previous){var Q=this.previous.style.newEdgeStyle;if(null!=Q)try{var X=JSON.parse(Q);for(N in X)t.style[N]=X[N]}catch(ia){}}t.style=this.graph.postProcessCellStyle(t.cell,t.style);return t};-var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var t=p.apply(this,arguments);t.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return t};mxConnectionHandler.prototype.updatePreview=function(t){};var A=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var t=A.apply(this,arguments),N=t.getCell;t.getCell=mxUtils.bind(this,function(Q){var X=N.apply(this,arguments);this.error=null;return X});-return t};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var t="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",N="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),Q=0;Q<N.length;Q++)null!=-this.currentEdgeStyle[N[Q]]&&(t+=N[Q]+"="+this.currentEdgeStyle[N[Q]]+";");null!=this.currentEdgeStyle.orthogonalLoop?t+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(t+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?t+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(t+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+-";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(t+="elbow="+this.currentEdgeStyle.elbow+";");return t=null!=this.currentEdgeStyle.html?t+("html="+this.currentEdgeStyle.html+";"):t+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var t=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=-t&&(new mxCodec(t.ownerDocument)).decode(t,this.getStylesheet())};Graph.prototype.createCellLookup=function(t,N){N=null!=N?N:{};for(var Q=0;Q<t.length;Q++){var X=t[Q];N[mxObjectIdentity.get(X)]=X.getId();for(var ia=this.model.getChildCount(X),ka=0;ka<ia;ka++)this.createCellLookup([this.model.getChildAt(X,ka)],N)}return N};Graph.prototype.createCellMapping=function(t,N,Q){Q=null!=Q?Q:{};for(var X in t){var ia=N[X];null==Q[ia]&&(Q[ia]=t[X].getId()||"")}return Q};Graph.prototype.importGraphModel=function(t,-N,Q,X){N=null!=N?N:0;Q=null!=Q?Q:0;var ia=new mxCodec(t.ownerDocument),ka=new mxGraphModel;ia.decode(t,ka);t=[];ia={};var pa={},xa=ka.getChildren(this.cloneCell(ka.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ta=this.createCellLookup([ka.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ka=0;ka<xa.length;ka++)va=this.model.getChildren(this.moveCells([xa[ka]],N,Q,!1,this.model.getRoot())[0]),null!=va&&(t=t.concat(va));else{var va=-ka.getChildren(xa[0]);null!=va&&(t=this.moveCells(va,N,Q,!1,this.getDefaultParent()),pa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=t&&(this.createCellMapping(ia,ta,pa),this.updateCustomLinks(pa,t),X)){this.isGridEnabled()&&(N=this.snap(N),Q=this.snap(Q));var Da=this.getBoundingBoxFromGeometry(t,!0);null!=Da&&this.moveCells(t,N-Da.x,Q-Da.y)}}finally{this.model.endUpdate()}}return t};Graph.prototype.encodeCells=function(t){for(var N={},Q=this.cloneCells(t,null,N),X=-new mxDictionary,ia=0;ia<t.length;ia++)X.put(t[ia],!0);var ka=new mxCodec,pa=new mxGraphModel,xa=pa.getChildAt(pa.getRoot(),0);for(ia=0;ia<Q.length;ia++){pa.add(xa,Q[ia]);var ta=this.view.getState(t[ia]);if(null!=ta){var va=this.getCellGeometry(Q[ia]);null!=va&&va.relative&&!this.model.isEdge(t[ia])&&null==X.get(this.model.getParent(t[ia]))&&(va.offset=null,va.relative=!1,va.x=ta.x/ta.view.scale-ta.view.translate.x,va.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(N,-this.createCellLookup(t)),Q);return ka.encode(pa)};Graph.prototype.isSwimlane=function(t,N){var Q=null;null==t||this.model.isEdge(t)||this.model.getParent(t)==this.model.getRoot()||(Q=this.getCurrentCellStyle(t,N)[mxConstants.STYLE_SHAPE]);return Q==mxConstants.SHAPE_SWIMLANE||"table"==Q||"tableRow"==Q};var G=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(t){return null!=t&&G.apply(this,arguments)?this.isTableCell(t)||this.isTableRow(t)?this.isCellEditable(this.model.getParent(t)):-!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(t){return null!=t&&S.apply(this,arguments)?this.isTableCell(t)||this.isTableRow(t)?this.isCellMovable(this.model.getParent(t)):!0:!1};var F=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(t){var N=this.model.getParent(t);if(null!=N){var Q=this.getCurrentCellStyle(N);if(null!=Q.expand)return"0"!=Q.expand}return F.apply(this,arguments)&&(null==N||!this.isTable(N))};var P=Graph.prototype.splitEdge;-Graph.prototype.splitEdge=function(t,N,Q,X,ia,ka,pa,xa){null==xa&&(xa=this.model.getParent(t),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,pa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=P.apply(this,[t,N,Q,X,ia,ka,pa,xa]);this.model.setValue(Q,"");var ta=this.getChildCells(Q,!0);for(N=0;N<ta.length;N++){var va=this.getCellGeometry(ta[N]);null!=va&&va.relative&&0<va.x&&this.model.remove(ta[N])}var Da=this.getChildCells(t,!0);for(N=0;N<Da.length;N++)va=this.getCellGeometry(Da[N]),-null!=va&&va.relative&&0>=va.x&&this.model.remove(Da[N]);var Na=this.model.getTerminal(Q,!1);if(null!=Na){var Ya=this.getCurrentCellStyle(Na);null!=Ya&&"1"==Ya.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[t]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[t]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[Q]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[Q]))}}finally{this.model.endUpdate()}return Q};var R=Graph.prototype.selectCell;Graph.prototype.selectCell=function(t,-N,Q){if(N||Q)R.apply(this,arguments);else{var X=this.getSelectionCell(),ia=null,ka=[],pa=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ka.push(xa),xa==X)ia=ka.length-1;else if(t&&null==X&&0<ka.length||null!=ia&&t&&ka.length>ia||!t&&0<ia)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)pa(this.model.getChildAt(xa,ta))});pa(this.model.root);0<ka.length&&(ia=null!=ia?mxUtils.mod(ia+(t?1:-1),ka.length):0,this.setSelectionCell(ka[ia]))}};-Graph.prototype.swapShapes=function(t,N){if(this.model.isVertex(t)&&this.model.isVertex(N)&&2==this.getMovableCells([t,N]).length){var Q=this.getCellGeometry(t),X=this.getCellGeometry(N);if(null!=Q&&null!=X){var ia=Q.clone(),ka=X.clone();this.model.beginUpdate();try{ia.x=X.getCenterX()-Q.width/2,ia.y=X.getCenterY()-Q.height/2,ka.x=Q.getCenterX()-X.width/2,ka.y=Q.getCenterY()-X.height/2,this.model.setGeometry(t,ia),this.model.setGeometry(N,ka)}finally{this.model.endUpdate()}}}};var T=Graph.prototype.moveCells;-Graph.prototype.moveCells=function(t,N,Q,X,ia,ka,pa){pa=null!=pa?pa:{};if(this.isTable(ia)){for(var xa=[],ta=0;ta<t.length;ta++)this.isTable(t[ta])?xa=xa.concat(this.model.getChildCells(t[ta],!0).reverse()):xa.push(t[ta]);t=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<t.length;ta++)if(null!=ia&&this.isTableRow(t[ta])){var va=this.model.getParent(t[ta]),Da=this.getCellGeometry(t[ta]);this.isTable(va)&&xa.push(va);if(null!=va&&null!=Da&&this.isTable(va)&&this.isTable(ia)&&(X||va!=ia)){if(!X){var Na=-this.getCellGeometry(va);null!=Na&&(Na=Na.clone(),Na.height-=Da.height,this.model.setGeometry(va,Na))}Na=this.getCellGeometry(ia);null!=Na&&(Na=Na.clone(),Na.height+=Da.height,this.model.setGeometry(ia,Na));var Ya=this.model.getChildCells(ia,!0);if(0<Ya.length){t[ta]=X?this.cloneCell(t[ta]):t[ta];var Za=this.model.getChildCells(t[ta],!0),ab=this.model.getChildCells(Ya[0],!0),Ra=ab.length-Za.length;if(0<Ra)for(var Oa=0;Oa<Ra;Oa++){var kb=this.cloneCell(Za[Za.length-1]);null!=kb&&(kb.value="",this.model.add(t[ta],-kb))}else if(0>Ra)for(Oa=0;Oa>Ra;Oa--)this.model.remove(Za[Za.length+Oa-1]);Za=this.model.getChildCells(t[ta],!0);for(Oa=0;Oa<ab.length;Oa++){var cb=this.getCellGeometry(ab[Oa]),$a=this.getCellGeometry(Za[Oa]);null!=cb&&null!=$a&&($a=$a.clone(),$a.width=cb.width,this.model.setGeometry(Za[Oa],$a))}}}}var fb=T.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!X&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&this.model.remove(xa[ta]);X&&this.updateCustomLinks(this.createCellMapping(pa,-this.createCellLookup(t)),fb)}finally{this.model.endUpdate()}return fb};var c=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,N){var Q=[];this.model.beginUpdate();try{for(var X=0;X<t.length;X++)if(this.isTableCell(t[X])){var ia=this.model.getParent(t[X]),ka=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(t,ka)&&0>mxUtils.indexOf(Q,ka)&&Q.push(ka):this.labelChanged(t[X],"")}else{if(this.isTableRow(t[X])&&(ka=this.model.getParent(t[X]),-0>mxUtils.indexOf(t,ka)&&0>mxUtils.indexOf(Q,ka))){for(var pa=this.model.getChildCells(ka,!0),xa=0,ta=0;ta<pa.length;ta++)0<=mxUtils.indexOf(t,pa[ta])&&xa++;xa==pa.length&&Q.push(ka)}Q.push(t[X])}Q=c.apply(this,[Q,N])}finally{this.model.endUpdate()}return Q};Graph.prototype.updateCustomLinks=function(t,N,Q){Q=null!=Q?Q:new Graph;for(var X=0;X<N.length;X++)null!=N[X]&&Q.updateCustomLinksForCell(t,N[X],Q)};Graph.prototype.updateCustomLinksForCell=function(t,N){this.doUpdateCustomLinksForCell(t,N);for(var Q=-this.model.getChildCount(N),X=0;X<Q;X++)this.updateCustomLinksForCell(t,this.model.getChildAt(N,X))};Graph.prototype.doUpdateCustomLinksForCell=function(t,N){};Graph.prototype.getAllConnectionConstraints=function(t,N){if(null!=t){N=mxUtils.getValue(t.style,"points",null);if(null!=N){t=[];try{var Q=JSON.parse(N);for(N=0;N<Q.length;N++){var X=Q[N];t.push(new mxConnectionConstraint(new mxPoint(X[0],X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(ka){}return t}if(null!=-t.shape&&null!=t.shape.bounds){X=t.shape.direction;N=t.shape.bounds;var ia=t.shape.scale;Q=N.width/ia;N=N.height/ia;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=Q,Q=N,N=X;N=t.shape.getConstraints(t.style,Q,N);if(null!=N)return N;if(null!=t.shape.stencil&&null!=t.shape.stencil.constraints)return t.shape.stencil.constraints;if(null!=t.shape.constraints)return t.shape.constraints}}return null};Graph.prototype.flipEdge=function(t){if(null!=t){var N=this.getCurrentCellStyle(t);N=-mxUtils.getValue(N,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,N,[t])}};Graph.prototype.isValidRoot=function(t){for(var N=this.model.getChildCount(t),Q=0,X=0;X<N;X++){var ia=this.model.getChildAt(t,X);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||Q++)}return 0<Q||this.isContainer(t)};Graph.prototype.isValidDropTarget=function(t,N,-Q){for(var X=this.getCurrentCellStyle(t),ia=!0,ka=!0,pa=0;pa<N.length&&ka;pa++)ia=ia&&this.isTable(N[pa]),ka=ka&&this.isTableRow(N[pa]);return!this.isCellLocked(t)&&(this.isTargetShape(t,N,Q)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(t))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(t))&&!this.isTableRow(t)&&(!this.isTable(t)||ka||ia))};Graph.prototype.createGroupCell=function(){var t=mxGraph.prototype.createGroupCell.apply(this,-arguments);t.setStyle("group");return t};Graph.prototype.isExtendParentsOnAdd=function(t){var N=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(N&&null!=t&&null!=this.layoutManager){var Q=this.model.getParent(t);null!=Q&&(Q=this.layoutManager.getLayout(Q),null!=Q&&Q.constructor==mxStackLayout&&(N=!1))}return N};Graph.prototype.getPreferredSizeForCell=function(t,N,Q){Q=null!=Q?Q:this.gridEnabled;var X=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=X&&(X.width+=-10,X.height+=4,Q&&(X.width=this.snap(X.width),X.height=this.snap(X.height)));return X};Graph.prototype.turnShapes=function(t,N){var Q=this.getModel(),X=[];Q.beginUpdate();try{for(var ia=0;ia<t.length;ia++){var ka=t[ia];if(Q.isEdge(ka)){var pa=Q.getTerminal(ka,!0),xa=Q.getTerminal(ka,!1);Q.setTerminal(ka,xa,!0);Q.setTerminal(ka,pa,!1);var ta=Q.getGeometry(ka);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var va=ta.getTerminalPoint(!0),Da=ta.getTerminalPoint(!1);ta.setTerminalPoint(va,-!1);ta.setTerminalPoint(Da,!0);Q.setGeometry(ka,ta);var Na=this.view.getState(ka),Ya=this.view.getState(pa),Za=this.view.getState(xa);if(null!=Na){var ab=null!=Ya?this.getConnectionConstraint(Na,Ya,!0):null,Ra=null!=Za?this.getConnectionConstraint(Na,Za,!1):null;this.setConnectionConstraint(ka,pa,!0,Ra);this.setConnectionConstraint(ka,xa,!1,ab);var Oa=mxUtils.getValue(Na.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Na.style,-mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ka]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Oa,[ka])}X.push(ka)}}else if(Q.isVertex(ka)&&(ta=this.getCellGeometry(ka),null!=ta)){if(!(this.isTable(ka)||this.isTableRow(ka)||this.isTableCell(ka)||this.isSwimlane(ka))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var kb=ta.width;ta.width=ta.height;ta.height=kb;Q.setGeometry(ka,ta)}var cb=this.view.getState(ka);if(null!=cb){var $a=[mxConstants.DIRECTION_EAST,-mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],fb=mxUtils.getValue(cb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,$a[mxUtils.mod(mxUtils.indexOf($a,fb)+(N?-1:1),$a.length)],[ka])}X.push(ka)}}}finally{Q.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(t){if(null!=t&&null!=t.fgNode)for(t=t.fgNode.firstChild;null!=t;){if("text"==t.nodeName&&"1"==t.getAttribute("placeholders"))return!0;-t=t.nextSibling}return!1};var f=Graph.prototype.processChange;Graph.prototype.processChange=function(t){if(t instanceof mxGeometryChange&&(this.isTableCell(t.cell)||this.isTableRow(t.cell))&&(null==t.previous&&null!=t.geometry||null!=t.previous&&!t.previous.equals(t.geometry))){var N=t.cell;this.isTableCell(N)&&(N=this.model.getParent(N));this.isTableRow(N)&&(N=this.model.getParent(N));var Q=this.view.getState(N);null!=Q&&null!=Q.shape&&(this.view.invalidate(N),Q.shape.bounds=null)}f.apply(this,arguments);-t instanceof mxValueChange&&null!=t.cell&&null!=t.cell.value&&"object"==typeof t.cell.value&&this.invalidateDescendantsWithPlaceholders(t.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(t){t=this.model.getDescendants(t);if(0<t.length)for(var N=0;N<t.length;N++){var Q=this.view.getState(t[N]);null!=Q&&null!=Q.shape&&null!=Q.shape.stencil&&this.stencilHasPlaceholders(Q.shape.stencil)?this.removeStateForCell(t[N]):this.isReplacePlaceholders(t[N])&&this.view.invalidate(t[N],!1,!1)}};-Graph.prototype.replaceElement=function(t,N){N=t.ownerDocument.createElement(null!=N?N:"span");for(var Q=Array.prototype.slice.call(t.attributes);attr=Q.pop();)N.setAttribute(attr.nodeName,attr.nodeValue);N.innerHTML=t.innerHTML;t.parentNode.replaceChild(N,t)};Graph.prototype.processElements=function(t,N){if(null!=t){t=t.getElementsByTagName("*");for(var Q=0;Q<t.length;Q++)null!=t[Q]&&N(t[Q])}};Graph.prototype.updateLabelElements=function(t,N,Q){t=null!=t?t:this.getSelectionCells();for(var X=document.createElement("div"),-ia=0;ia<t.length;ia++){var ka=this.getCurrentCellStyle(t[ia]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(t[ia]),null!=ka&&0<ka.length)){X.innerHTML=Graph.sanitizeHtml(ka);for(var pa=X.getElementsByTagName(null!=Q?Q:"*"),xa=0;xa<pa.length;xa++)N(pa[xa]);X.innerHTML!=ka&&this.cellLabelChanged(t[ia],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(t,N,Q){N=Graph.zapGremlins(N);this.model.beginUpdate();try{if(null!=t.value&&"object"==typeof t.value){if(this.isReplacePlaceholders(t)&&-null!=t.getAttribute("placeholder"))for(var X=t.getAttribute("placeholder"),ia=t;null!=ia;){if(ia==this.model.getRoot()||null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(X)){this.setAttributeForCell(ia,X,N);break}ia=this.model.getParent(ia)}var ka=t.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,N):ka.setAttribute("label",N);N=ka}mxGraph.prototype.cellLabelChanged.apply(this,-arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(t){if(null!=t){for(var N=new mxDictionary,Q=0;Q<t.length;Q++)N.put(t[Q],!0);var X=[];for(Q=0;Q<t.length;Q++){var ia=this.model.getParent(t[Q]);null==ia||N.get(ia)||(N.put(ia,!0),X.push(ia))}for(Q=0;Q<X.length;Q++)if(ia=this.view.getState(X[Q]),null!=ia&&(this.model.isEdge(ia.cell)||this.model.isVertex(ia.cell))&&this.isCellDeletable(ia.cell)&&this.isTransparentState(ia)){for(var ka=!0,pa=0;pa<this.model.getChildCount(ia.cell)&&-ka;pa++)N.get(this.model.getChildAt(ia.cell,pa))||(ka=!1);ka&&t.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(t){for(var N=[],Q=0;Q<t.length;Q++)this.isCellDeletable(t[Q])&&this.isTransparentState(this.view.getState(t[Q]))&&N.push(t[Q]);t=N;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(t,N){this.setAttributeForCell(t,"link",N)};Graph.prototype.setTooltipForCell=function(t,-N){var Q="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(t.value)&&t.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(t,Q,N)};Graph.prototype.getAttributeForCell=function(t,N,Q){t=null!=t.value&&"object"===typeof t.value?t.value.getAttribute(N):null;return null!=t?t:Q};Graph.prototype.setAttributeForCell=function(t,N,Q){if(null!=t.value&&"object"==typeof t.value)var X=t.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),-X.setAttribute("label",t.value||"");null!=Q?X.setAttribute(N,Q):X.removeAttribute(N);this.model.setValue(t,X)};Graph.prototype.isTargetShape=function(t,N,Q){t=mxUtils.getValue(this.getCurrentCellStyle(t),mxConstants.STYLE_SHAPE,"");for(Q=0;Q<N.length;Q++){var X=mxUtils.getValue(this.getCurrentCellStyle(N[Q]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(X,t))return!0}return!1};var k=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(t,N,Q,X){if(mxEvent.isAltDown(N))return null;-for(var ia=0;ia<t.length;ia++){var ka=this.model.getParent(t[ia]);if(this.model.isEdge(ka)&&0>mxUtils.indexOf(t,ka))return null}ka=k.apply(this,arguments);var pa=!0;for(ia=0;ia<t.length&&pa;ia++)pa=pa&&this.isTableRow(t[ia]);pa&&(this.isTableCell(ka)&&(ka=this.model.getParent(ka)),this.isTableRow(ka)&&(ka=this.model.getParent(ka)),this.isTable(ka)||(ka=null));return ka};Graph.prototype.click=function(t){mxGraph.prototype.click.call(this,t);this.firstClickState=t.getState();this.firstClickSource=t.getSource()};-Graph.prototype.dblClick=function(t,N){this.isEnabled()&&(N=this.insertTextForEvent(t,N),mxGraph.prototype.dblClick.call(this,t,N))};Graph.prototype.insertTextForEvent=function(t,N){var Q=mxUtils.convertPoint(this.container,mxEvent.getClientX(t),mxEvent.getClientY(t));if(null!=t&&!this.model.isVertex(N)){var X=this.model.isEdge(N)?this.view.getState(N):null,ia=mxEvent.getSource(t);this.firstClickState!=X||this.firstClickSource!=ia||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&-(mxUtils.contains(X.text.boundingBox,Q.x,Q.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(t)))||(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==X&&(X=this.view.getState(this.getCellAt(Q.x,Q.y))),N=this.addText(Q.x,Q.y,X))}return N};Graph.prototype.getInsertPoint=function(){var t=this.getGridSize(),N=this.container.scrollLeft/this.view.scale-this.view.translate.x,Q=-this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),ia=this.getPageSize();N=Math.max(N,X.x*ia.width);Q=Math.max(Q,X.y*ia.height)}return new mxPoint(this.snap(N+t),this.snap(Q+t))};Graph.prototype.getFreeInsertPoint=function(){var t=this.view,N=this.getGraphBounds(),Q=this.getInsertPoint(),X=this.snap(Math.round(Math.max(Q.x,N.x/t.scale-t.translate.x+(0==N.width?2*this.gridSize:0))));t=this.snap(Math.round(Math.max(Q.y,(N.y+N.height)/t.scale--t.translate.y+2*this.gridSize)));return new mxPoint(X,t)};Graph.prototype.getCenterInsertPoint=function(t){t=null!=t?t:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-t.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/-2/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-t.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(t,N){t=null!=t?t:"";null!=N&&(0<t.length&&";"!=t.charAt(t.length-1)&&(t+=";"),t+="fontSize="+N+";");return t};Graph.prototype.addText=function(t,N,Q){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,0,0,0);X.vertex=!0;if(null!=Q&&this.model.isEdge(Q.cell)){X.style=-"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);X.geometry.relative=!0;X.connectable=!1;var ia=this.view.getRelativePoint(Q,t,N);X.geometry.x=Math.round(1E4*ia.x)/1E4;X.geometry.y=Math.round(ia.y);X.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(Q,X.geometry);var ka=this.view.scale;X.geometry.offset=new mxPoint(Math.round((t-ia.x)/ka),Math.round((N-ia.y)/ka))}else ia=this.view.translate,X.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",-this.vertexFontSize),X.geometry.width=40,X.geometry.height=20,X.geometry.x=Math.round(t/this.view.scale)-ia.x-(null!=Q?Q.origin.x:0),X.geometry.y=Math.round(N/this.view.scale)-ia.y-(null!=Q?Q.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=Q?Q.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(t,N,Q){var X=mxUtils.bind(this,-function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var va=0;va<ta.length;va++){var Da=this.getAbsoluteUrl(ta[va].getAttribute("href"));null!=Da&&(ta[va].setAttribute("rel",this.linkRelation),ta[va].setAttribute("href",Da),null!=N&&mxEvent.addGestureListeners(ta[va],null,null,N))}});this.model.addListener(mxEvent.CHANGE,X);X();var ia=this.container.style.cursor,ka=this.getTolerance(),pa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=t&&""!=t&&-t!=mxConstants.NONE?new mxCellHighlight(pa,t,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var va=ta.sourceState;if(null==va||null==pa.getLinkForCell(va.cell))ta=pa.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(Da,Na,Ya){return null==pa.getLinkForCell(Da.cell)}),va=null==va||pa.model.isAncestor(ta,va.cell)?pa.view.getState(ta):null;va!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=va,null!=this.currentState&&this.activate(this.currentState))},-mouseDown:function(ta,va){this.startX=va.getGraphX();this.startY=va.getGraphY();this.scrollLeft=pa.container.scrollLeft;this.scrollTop=pa.container.scrollTop;null==this.currentLink&&"auto"==pa.container.style.overflow&&(pa.container.style.cursor="move");this.updateCurrentState(va)},mouseMove:function(ta,va){if(pa.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-va.getGraphX()),va=Math.abs(this.startY-va.getGraphY()),(ta>ka||va>ka)&&this.clear());else{for(ta=va.getSource();null!=ta&&"a"!=-ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=pa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&pa.tooltipHandler.reset(va,!0,this.currentState),(null==this.currentState||va.getState()!=this.currentState&&null!=va.sourceState||!pa.intersects(this.currentState,va.getGraphX(),va.getGraphY()))&&this.updateCurrentState(va))}},mouseUp:function(ta,va){var Da=va.getSource();for(ta=va.getEvent();null!=Da&&"a"!=Da.nodeName.toLowerCase();)Da=Da.parentNode;null==-Da&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-pa.container.scrollTop)<ka&&(null==va.sourceState||!va.isSource(va.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(Da=pa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Da||null==N||N(ta,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ta)||-(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":Da?pa.linkTarget:"_top",pa.openLink(this.currentLink,ta),va.consume())):null!=Q&&!va.isConsumed()&&Math.abs(this.scrollLeft-pa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-pa.container.scrollTop)<ka&&Math.abs(this.startX-va.getGraphX())<ka&&Math.abs(this.startY-va.getGraphY())<ka&&Q(va.getEvent()));this.clear()},activate:function(ta){this.currentLink=pa.getAbsoluteUrl(pa.getLinkForCell(ta.cell));null!=this.currentLink&&-(this.currentTarget=pa.getLinkTargetForCell(ta.cell),pa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=pa.container&&(pa.container.style.cursor=ia);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=pa.tooltipHandler&&pa.tooltipHandler.hide()}};pa.click=function(ta){};pa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=-function(t,N){t=null!=t?t:this.getSelectionCells();N=null!=N?N:!0;for(var Q=0;Q<t.length;Q++)this.isTableCell(t[Q])&&(t[Q]=this.model.getParent(t[Q]));t=this.model.getTopmostCells(t);var X=this.getModel(),ia=this.gridSize,ka=[];X.beginUpdate();try{var pa={},xa=this.createCellLookup(t),ta=this.cloneCells(t,!1,pa,!0);for(Q=0;Q<t.length;Q++){var va=X.getParent(t[Q]);if(null!=va){var Da=this.moveCells([ta[Q]],ia,ia,!1)[0];ka.push(Da);if(N)X.add(va,ta[Q]);else{var Na=va.getIndex(t[Q]);X.add(va,ta[Q],Na+-1)}if(this.isTable(va)){var Ya=this.getCellGeometry(ta[Q]),Za=this.getCellGeometry(va);null!=Ya&&null!=Za&&(Za=Za.clone(),Za.height+=Ya.height,X.setGeometry(va,Za))}}else ka.push(ta[Q])}this.updateCustomLinks(this.createCellMapping(pa,xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{X.endUpdate()}return ka};Graph.prototype.insertImage=function(t,N,Q){if(null!=t&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ia=-[],ka=0;ka<X.length;ka++)ia.push(X[ka]);document.execCommand("insertimage",!1,t);t=this.cellEditor.textarea.getElementsByTagName("img");if(t.length==ia.length+1)for(ka=t.length-1;0<=ka;ka--)if(0==ka||t[ka]!=ia[ka-1]){t[ka].setAttribute("width",N);t[ka].setAttribute("height",Q);break}}};Graph.prototype.insertLink=function(t){if(null!=this.cellEditor.textarea)if(0==t.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var N=this.cellEditor.textarea.getElementsByTagName("a"),Q=[],X=-0;X<N.length;X++)Q.push(N[X]);document.execCommand("createlink",!1,mxUtils.trim(t));N=this.cellEditor.textarea.getElementsByTagName("a");if(N.length==Q.length+1)for(X=N.length-1;0<=X;X--)if(N[X]!=Q[X-1]){for(N=N[X].getElementsByTagName("a");0<N.length;){for(Q=N[0].parentNode;null!=N[0].firstChild;)Q.insertBefore(N[0].firstChild,N[0]);Q.removeChild(N[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(t))};Graph.prototype.isCellResizable=function(t){var N=mxGraph.prototype.isCellResizable.apply(this,-arguments),Q=this.getCurrentCellStyle(t);return!this.isTableCell(t)&&!this.isTableRow(t)&&(N||"0"!=mxUtils.getValue(Q,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==Q[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(t,N,Q){null==N&&(N=this.getSelectionCells());if(null!=N&&1<N.length){for(var X=[],ia=null,ka=null,pa=0,xa=0;xa<N.length;xa++)if(this.getModel().isVertex(N[xa])){var ta=this.view.getState(N[xa]);if(null!=ta){var va=t?ta.getCenterX():ta.getCenterY();ia=null!=ia?Math.max(ia,-va):va;ka=null!=ka?Math.min(ka,va):va;Q&&(pa+=t?ta.width:ta.height);X.push(ta)}}if(2<X.length){X.sort(function(ab,Ra){return t?ab.x-Ra.x:ab.y-Ra.y});Q&&(pa-=t?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);ta=this.view.translate;va=this.view.scale;ka=ka/va-(t?ta.x:ta.y);ia=ia/va-(t?ta.x:ta.y);this.getModel().beginUpdate();try{var Da=(ia-ka-pa)/(X.length-1),Na=ka+(Q?t?X[0].width/2:X[0].height/2:0);for(xa=1;xa<X.length-1;xa++){var Ya=this.view.getState(this.model.getParent(X[xa].cell)),-Za=this.getCellGeometry(X[xa].cell);Na+=Da;null!=Za&&null!=Ya&&(Za=Za.clone(),t?Za.x=Math.round(Na-(Q?0:Za.width/2))-Ya.origin.x:Za.y=Math.round(Na-(Q?0:Za.height/2))-Ya.origin.y,this.getModel().setGeometry(X[xa].cell,Za));Q&&(Na+=t?X[xa].width:X[xa].height)}}finally{this.getModel().endUpdate()}}}return N};Graph.prototype.isCloneEvent=function(t){return mxClient.IS_MAC&&mxEvent.isMetaDown(t)||mxEvent.isControlDown(t)};Graph.prototype.createSvgImageExport=function(t){t=new mxImageExport;t.addCellData=-function(Q,X,ia){X.setAttribute("data-cell-id",Q.id);if(ia)if(mxUtils.isNode(Q.value))for(ia=0;ia<Q.value.attributes.length;ia++){var ka=Q.value.attributes[ia];X.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof Q.value)for(ka in Q.value)X.setAttribute("data-cell-"+ka,Q.value[ka]);else null!=Q.value&&X.setAttribute("data-cell-value",Q.value);return X};var N=t.visitStatesRecursive;t.visitStatesRecursive=function(Q,X,ia){if(null!=Q){var ka=X.root,pa=X.root.ownerDocument;X.root=this.addCellData(Q.cell,-null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"g"):pa.createElement("g"),Editor.addSvgMetadata);ka.appendChild(X.root);N.apply(this,arguments);X.root=ka}};t.getLinkForCellState=mxUtils.bind(this,function(Q,X){return this.getLinkForCell(Q.cell)});t.getTitleForCellState=mxUtils.bind(this,function(Q,X){return Editor.convertHtmlToText(this.convertValueToTooltip(Q.cell))});return t};Graph.prototype.parseBackgroundImage=function(t){var N=null;null!=t&&0<t.length&&(t=JSON.parse(t),N=new mxImage(t.src,-t.width,t.height));return N};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,N,Q,X,ia,ka,pa,xa,ta,va,Da,Na,Ya,Za,ab,Ra){var Oa=null;if(null!=Za)for(Oa=new mxDictionary,Da=0;Da<Za.length;Da++)Oa.put(Za[Da],!0);Za=this.useCssTransforms;var kb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Za&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{N=null!=N?N:1;Q=null!=Q?Q:0;ia=null!=ia?ia:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:-!0;va=null!=va?va:!1;var cb="page"==Ya?this.view.getBackgroundPageBounds():ka&&null==Oa||X||"diagram"==Ya?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),$a=this.backgroundImage,fb=this.view.translate,jb=this.view.scale;"diagram"==Ya&&null!=$a&&null!=$a.width&&null!=$a.height&&(cb=mxRectangle.fromRectangle(cb),cb.add(new mxRectangle((fb.x+$a.x)*jb,(fb.y+$a.y)*jb,$a.width*jb,$a.height*jb)));if(null==cb)throw Error(mxResources.get("drawingEmpty"));X=N/jb;var sb=Math.max(1,Math.ceil(cb.width*-X)+2*Q)+(va&&0==Q?5:0),Ab=Math.max(1,Math.ceil(cb.height*X)+2*Q)+(va&&0==Q?5:0);va=ia?-.5:0;var nb=mxUtils.getLightDarkColor(t),lb=Graph.createSvgNode(va,va,sb,Ab,nb),db=lb.ownerDocument;if(null!=t){var mb=mxUtils.createElementNs(db,mxConstants.NS_SVG,"rect");mb.setAttribute("fill",nb.light);mb.style.fill=nb.cssText;mb.setAttribute("width","100%");mb.setAttribute("height","100%");mb.setAttribute("x","0");mb.setAttribute("y","0");lb.appendChild(mb)}var ub=mxUtils.createElementNs(db,mxConstants.NS_SVG,-"g");lb.appendChild(ub);var eb=this.createSvgCanvas(ub);eb.foOffset=ia?-.5:0;eb.textOffset=ia?-.5:0;eb.imageOffset=ia?-.5:0;eb.translate(Math.floor(Q/N-cb.x/jb),Math.floor(Q/N-cb.y/jb));eb.idPrefix="drawio-svg-"+Editor.guid();var ob=document.createElement("div"),tb=eb.getAlternateText;eb.getAlternateText=function(hb,Bb,rb,yb,zb,qb,Cb,d,n,y,q,x,D){if(null!=qb&&0<this.state.fontSize)try{mxUtils.isNode(qb)?qb=qb.innerText:(ob.innerHTML=qb,qb=mxUtils.extractTextWithWhitespace(ob.childNodes));for(var E=-Math.ceil(2*yb/this.state.fontSize),ha=[],M=0,wa=0;(0==E||M<E)&&wa<qb.length;){var na=qb.charCodeAt(wa);if(10==na||13==na){if(0<M)break}else ha.push(qb.charAt(wa)),255>na&&M++;wa++}ha.length<qb.length&&1<qb.length-ha.length&&(qb=mxUtils.trim(ha.join(""))+"...");return qb}catch(Va){return tb.apply(this,arguments)}else return tb.apply(this,arguments)};null!=$a&&null!=$a.width&&null!=$a.height&&(t=jb/N,va=new mxRectangle(($a.x+fb.x)*t,($a.y+fb.y)*t,$a.width*t,$a.height*t),mxUtils.intersects(cb,va)&&-eb.image($a.x+fb.x,$a.y+fb.y,$a.width,$a.height,$a.src,!0));eb.scale(X);eb.textEnabled=pa;xa=null!=xa?xa:this.createSvgImageExport();var pb=xa.getLinkForCellState;xa.getLinkForCellState=function(hb,Bb){var rb=hb.view.graph.getAbsoluteUrl(pb.apply(this,arguments));return null==rb||hb.view.graph.isCustomLink(rb)?null:rb};xa.getLinkTargetForCellState=function(hb,Bb){return hb.view.graph.getLinkTargetForCell(hb.cell)};var wb=xa.drawCellState,vb=null,xb=mxUtils.bind(this,function(){if(null==vb){vb="ge-flow-animation-"+-Editor.guid();var hb=null!=db.createElementNS?db.createElementNS(mxConstants.NS_SVG,"style"):db.createElement("style");hb.innerHTML=this.createFlowAnimationCss(vb);db.getElementsByTagName("defs")[0].appendChild(hb)}return vb});xa.drawCellState=function(hb,Bb){for(var rb=hb.view.graph,yb=null!=Oa?Oa.get(hb.cell):rb.isCellSelected(hb.cell),zb=rb.model.getParent(hb.cell);!(ka&&null==Oa||yb)&&null!=zb;)yb=null!=Oa?Oa.get(zb):rb.isCellSelected(zb),zb=rb.model.getParent(zb);if(null!=hb.shape)try{var qb=-hb.shape.isFlowAnimationEnabled,Cb=hb.shape.addFlowAnimationToShape;hb.shape.isFlowAnimationEnabled=function(){return kb&&rb.model.isEdge(hb.cell)&&"1"==mxUtils.getValue(hb.style,"flowAnimation","0")};hb.shape.addFlowAnimationToShape=function(){rb.addFlowAnimationToNode(this.getFlowAnimationPath(),hb.style,N,xb())};if(ka&&null==Oa||yb)rb.view.redrawEnumerationState(hb),wb.apply(this,arguments),this.doDrawShape(hb.secondLabel,Bb)}finally{hb.shape.isFlowAnimationEnabled=qb,hb.shape.addFlowAnimationToShape=-Cb}};var ib=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(ib),eb);this.addForeignObjectWarning(eb,lb);Ra?this.disableSvgLinks(lb):this.updateSvgLinks(lb,ta,!0);return lb}finally{this.enableFlowAnimation=kb,Za&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(t,N){if("0"!=urlParams["svg-warning"]&&0<N.getElementsByTagName("foreignObject").length){var Q=t.createElement("switch"),-X=t.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=t.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||N.ownerDocument!=document&&null==document.documentMode?(ia.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ia.setAttribute("target","_blank")):(ia.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ia.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));-t=t.createElement("text");t.setAttribute("text-anchor","middle");t.setAttribute("font-size","10px");t.setAttribute("x","50%");t.setAttribute("y","100%");mxUtils.write(t,Graph.foreignObjectWarningText);Q.appendChild(X);ia.appendChild(t);Q.appendChild(ia);N.appendChild(Q)}};Graph.prototype.disableSvgLinks=function(t,N){t=t.getElementsByTagName("a");for(var Q=0;Q<t.length;Q++){var X=t[Q].getAttribute("href");null==X&&(X=t[Q].getAttribute("xlink:href"));null!=X&&(t[Q].style.pointerEvents="none",t[Q].setAttribute("href",-""));N&&N(t[Q])}};Graph.prototype.updateSvgLinks=function(t,N,Q){t=t.getElementsByTagName("a");for(var X=0;X<t.length;X++)if(null==t[X].getAttribute("target")){var ia=t[X].getAttribute("href");null==ia&&(ia=t[X].getAttribute("xlink:href"));null!=ia&&(null!=N&&/^https?:\/\//.test(ia)?t[X].setAttribute("target",N):Q&&this.isCustomLink(ia)&&t[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(t){t=new mxSvgCanvas2D(t);t.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;-t.adaptiveColors=this.getAdaptiveColors();t.pointerEvents=!0;return t};Graph.prototype.getSelectedElement=function(){var t=null;if(window.getSelection){var N=window.getSelection();N.getRangeAt&&N.rangeCount&&(t=N.getRangeAt(0).commonAncestorContainer)}else document.selection&&(t=document.selection.createRange().parentElement());return t};Graph.prototype.getSelectedEditingElement=function(){var t=null;if(null!=this.cellEditor.textarea)for(t=this.getSelectedElement();null!=t&&t.nodeType!=mxConstants.NODETYPE_ELEMENT;)t=-t.parentNode;return t};Graph.prototype.getParentByName=function(t,N,Q){for(;null!=t&&t.nodeName!=N;){if(t==Q)return null;t=t.parentNode}return t};Graph.prototype.getParentByNames=function(t,N,Q){for(;null!=t&&!(0<=mxUtils.indexOf(N,t.nodeName));){if(t==Q)return null;t=t.parentNode}return t};Graph.prototype.selectNode=function(t){var N=null;if(window.getSelection){if(N=window.getSelection(),N.getRangeAt&&N.rangeCount){var Q=document.createRange();Q.selectNode(t);N.removeAllRanges();N.addRange(Q)}}else(N=-document.selection)&&"Control"!=N.type&&(t=N.createRange(),t.collapse(!0),Q=N.createRange(),Q.setEndPoint("StartToStart",t),Q.select())};Graph.prototype.flipEdgePoints=function(t,N,Q){var X=this.getCellGeometry(t);if(null!=X){X=X.clone();if(null!=X.points)for(var ia=0;ia<X.points.length;ia++)N?X.points[ia].x=Q+(Q-X.points[ia].x):X.points[ia].y=Q+(Q-X.points[ia].y);ia=function(ka){null!=ka&&(N?ka.x=Q+(Q-ka.x):ka.y=Q+(Q-ka.y))};ia(X.getTerminalPoint(!0));ia(X.getTerminalPoint(!1));this.model.setGeometry(t,-X)}};Graph.prototype.flipChildren=function(t,N,Q){this.model.beginUpdate();try{for(var X=this.model.getChildCount(t),ia=0;ia<X;ia++){var ka=this.model.getChildAt(t,ia);if(this.model.isEdge(ka))this.flipEdgePoints(ka,N,Q);else{var pa=this.getCellGeometry(ka);null!=pa&&(pa=pa.clone(),N?pa.x=Q+(Q-pa.x-pa.width):pa.y=Q+(Q-pa.y-pa.height),this.model.setGeometry(ka,pa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,N){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);-for(var Q=[],X=0;X<t.length;X++)if(this.model.isEdge(t[X])){var ia=this.view.getState(t[X]);null!=ia&&this.flipEdgePoints(t[X],N,(N?ia.getCenterX():ia.getCenterY())/this.view.scale-(N?ia.origin.x:ia.origin.y)-(N?this.view.translate.x:this.view.translate.y))}else{var ka=this.getCellGeometry(t[X]);null!=ka&&this.flipChildren(t[X],N,N?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);Q.push(t[X])}this.toggleCellStyles(N?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,Q)}finally{this.model.endUpdate()}};-Graph.prototype.deleteCells=function(t,N){var Q=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var X=0;X<t.length;X++){var ia=this.model.getParent(t[X]);if(this.isTable(ia)){var ka=this.getCellGeometry(t[X]),pa=this.getCellGeometry(ia);null!=ka&&null!=pa&&(pa=pa.clone(),pa.height-=ka.height,this.model.setGeometry(ia,pa))}}var xa=this.selectParentAfterDelete?this.model.getParents(t):null;this.removeCells(t,N)}finally{this.model.endUpdate()}if(null!=xa)for(Q=[],X=0;X<xa.length;X++)this.model.contains(xa[X])&&-(this.model.isVertex(xa[X])||this.model.isEdge(xa[X]))&&Q.push(xa[X])}return Q};Graph.prototype.insertTableColumn=function(t,N){var Q=this.getModel();Q.beginUpdate();try{var X=t,ia=0;if(this.isTableCell(t)){var ka=Q.getParent(t);X=Q.getParent(ka);ia=mxUtils.indexOf(Q.getChildCells(ka,!0),t)}else this.isTableRow(t)?X=Q.getParent(t):t=Q.getChildCells(X,!0)[0],N||(ia=Q.getChildCells(t,!0).length-1);var pa=Q.getChildCells(X,!0),xa=Graph.minTableColumnWidth;for(t=0;t<pa.length;t++){var ta=Q.getChildCells(pa[t],-!0)[ia],va=Q.cloneCell(ta,!1);null==va&&(va=this.createVertex());var Da=this.getCellGeometry(va);va.value=null;va.style=mxUtils.setStyle(mxUtils.setStyle(va.style,"rowspan",null),"colspan",null);if(null!=Da){null!=Da.alternateBounds&&(Da.width=Da.alternateBounds.width,Da.height=Da.alternateBounds.height,Da.alternateBounds=null);xa=Da.width;var Na=this.getCellGeometry(pa[t]);null!=Na&&(Da.height=Na.height)}Q.add(pa[t],va,ia+(N?0:1))}var Ya=this.getCellGeometry(X);null!=Ya&&(Ya=Ya.clone(),Ya.width+=-xa,Q.setGeometry(X,Ya))}finally{Q.endUpdate()}};Graph.prototype.deleteLane=function(t){var N=this.getModel();N.beginUpdate();try{var Q=null;Q="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:N.getParent(t);var X=N.getChildCells(Q,!0);0==X.length?N.remove(Q):(Q==t&&(t=X[X.length-1]),N.remove(t))}finally{N.endUpdate()}};Graph.prototype.insertLane=function(t,N){var Q=this.getModel();Q.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(t).childLayout){X=t;var ia=Q.getChildCells(X,-!0);t=ia[N?0:ia.length-1]}else X=Q.getParent(t);var ka=X.getIndex(t);t=Q.cloneCell(t,!1);t.value=null;Q.add(X,t,ka+(N?0:1))}finally{Q.endUpdate()}};Graph.prototype.insertTableRow=function(t,N){var Q=this.getModel();Q.beginUpdate();try{var X=t,ia=t;if(this.isTableCell(t))ia=Q.getParent(t),X=Q.getParent(ia);else if(this.isTableRow(t))X=Q.getParent(t);else{var ka=Q.getChildCells(X,!0);ia=ka[N?0:ka.length-1]}var pa=Q.getChildCells(ia,!0),xa=X.getIndex(ia);ia=Q.cloneCell(ia,!1);ia.value=null;var ta=this.getCellGeometry(ia);-if(null!=ta){for(ka=0;ka<pa.length;ka++){t=Q.cloneCell(pa[ka],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var va=this.getCellGeometry(t);null!=va&&(null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null),va.height=ta.height);ia.insert(t)}Q.add(X,ia,xa+(N?0:1));var Da=this.getCellGeometry(X);null!=Da&&(Da=Da.clone(),Da.height+=ta.height,Q.setGeometry(X,Da))}}finally{Q.endUpdate()}};-Graph.prototype.deleteTableColumn=function(t){var N=this.getModel();N.beginUpdate();try{var Q=t,X=t;this.isTableCell(t)&&(X=N.getParent(t));this.isTableRow(X)&&(Q=N.getParent(X));var ia=N.getChildCells(Q,!0);if(0==ia.length)N.remove(Q);else{this.isTableRow(X)||(X=ia[0]);var ka=N.getChildCells(X,!0);if(1>=ka.length)N.remove(Q);else{var pa=ka.length-1;this.isTableCell(t)&&(pa=mxUtils.indexOf(ka,t));for(X=t=0;X<ia.length;X++){var xa=N.getChildCells(ia[X],!0)[pa];N.remove(xa);var ta=this.getCellGeometry(xa);-null!=ta&&(t=Math.max(t,ta.width))}var va=this.getCellGeometry(Q);null!=va&&(va=va.clone(),va.width-=t,N.setGeometry(Q,va))}}}finally{N.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var N=this.getModel();N.beginUpdate();try{var Q=t,X=t;this.isTableCell(t)&&(t=X=N.getParent(t));this.isTableRow(t)&&(Q=N.getParent(X));var ia=N.getChildCells(Q,!0);if(1>=ia.length)N.remove(Q);else{this.isTableRow(X)||(X=ia[ia.length-1]);N.remove(X);t=0;var ka=this.getCellGeometry(X);null!=ka&&(t=ka.height);-var pa=this.getCellGeometry(Q);null!=pa&&(pa=pa.clone(),pa.height-=t,N.setGeometry(Q,pa))}}finally{N.endUpdate()}};Graph.prototype.insertRow=function(t,N){for(var Q=t.tBodies[0],X=Q.rows[0].cells,ia=t=0;ia<X.length;ia++){var ka=X[ia].getAttribute("colspan");t+=null!=ka?parseInt(ka):1}N=Q.insertRow(N);for(ia=0;ia<t;ia++)mxUtils.br(N.insertCell(-1));return N.cells[0]};Graph.prototype.deleteRow=function(t,N){t.tBodies[0].deleteRow(N)};Graph.prototype.insertColumn=function(t,N){var Q=t.tHead;if(null!=-Q)for(var X=0;X<Q.rows.length;X++){var ia=document.createElement("th");Q.rows[X].appendChild(ia);mxUtils.br(ia)}t=t.tBodies[0];for(Q=0;Q<t.rows.length;Q++)X=t.rows[Q].insertCell(N),mxUtils.br(X);return t.rows[0].cells[0<=N?N:t.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(t,N){if(0<=N){t=t.tBodies[0].rows;for(var Q=0;Q<t.length;Q++)t[Q].cells.length>N&&t[Q].deleteCell(N)}};Graph.prototype.pasteHtmlAtCaret=function(t){if(window.getSelection){var N=window.getSelection();if(N.getRangeAt&&-N.rangeCount){N=N.getRangeAt(0);N.deleteContents();var Q=document.createElement("div");Q.innerHTML=t;t=document.createDocumentFragment();for(var X;X=Q.firstChild;)lastNode=t.appendChild(X);N.insertNode(t)}}else(N=document.selection)&&"Control"!=N.type&&N.createRange().pasteHTML(t)};Graph.prototype.createLinkForHint=function(t,N,Q){function X(ka,pa){ka.length>pa&&(ka=ka.substring(0,Math.round(pa/2))+"..."+ka.substring(ka.length-Math.round(pa/4)));return ka}t=null!=t?t:"javascript:void(0);";if(null==-N||0==N.length)N=this.isCustomLink(t)?this.getLinkTitle(t):t;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(t));ia.setAttribute("title",X(this.isCustomLink(t)?this.getLinkTitle(t):t,80));null!=this.linkTarget&&ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,X(N,40));this.isCustomLink(t)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(t,Q);mxEvent.consume(ka)}));return ia};Graph.prototype.initTouch=-function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ka,pa){this.popupMenuHandler.hideMenu()});var t=this.updateMouseEvent;this.updateMouseEvent=function(ka){ka=t.apply(this,arguments);if(mxEvent.isTouchEvent(ka.getEvent())&&null==ka.getState()){var pa=this.getCellAt(ka.graphX,ka.graphY);null!=pa&&this.isSwimlane(pa)&&this.hitsSwimlaneContent(pa,ka.graphX,ka.graphY)||(ka.state=this.view.getState(pa),-null!=ka.state&&null!=ka.state.shape&&(this.container.style.cursor=ka.state.shape.node.style.cursor))}null==ka.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ka};var N=!1,Q=!1,X=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ka,pa,xa){ka==mxEvent.MOUSE_DOWN&&(pa=this.updateMouseEvent(pa),N=this.isCellSelected(pa.getCell()),Q=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,-function(ka,pa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(pa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==pa.getState()||!pa.isSource(pa.getState().control))&&(this.popupMenuHandler.popupTrigger||!X&&!xa&&(Q&&null==pa.getCell()&&this.isSelectionEmpty()||N&&this.isCellSelected(pa.getCell())));xa=!N||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var va=mxUtils.getScrollOrigin();-this.popupMenuHandler.popup(pa.getX()+va.x+1,pa.getY()+va.y+1,ta,pa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ka,pa,xa])}})};mxCellEditor.prototype.isContentEditing=function(){var t=this.graph.view.getState(this.editingCell);return null!=t&&1==t.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var t=-"";window.getSelection?t=window.getSelection():document.getSelection?t=document.getSelection():document.selection&&(t=document.selection.createRange().text);return""!=t};mxCellEditor.prototype.insertTab=function(t){var N=this.textarea.ownerDocument.defaultView.getSelection(),Q=N.getRangeAt(0);t=Graph.createTabNode(t);Q.insertNode(t);Q.setStartAfter(t);Q.setEndAfter(t);N.removeAllRanges();N.addRange(Q)};mxCellEditor.prototype.alignText=function(t,N){var Q=this.graph.getView().getState(this.editingCell);-if(null!=Q){Q=mxUtils.getValue(Q.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var X=null!=Q&&"vertical-"==Q.substring(0,9),ia=null!=N&&mxEvent.isShiftDown(N);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(pa){ia||X||window.getSelection().containsNode(pa,!0)?(pa.removeAttribute("align"),pa.style.textAlign=null):ka=!1});(ka||X)&&this.graph.cellEditor.setAlign(t)}X||document.execCommand("justify"+-t.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var t=window.getSelection();if(t.getRangeAt&&t.rangeCount){for(var N=[],Q=0,X=t.rangeCount;Q<X;++Q)N.push(t.getRangeAt(Q));return N}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(t){try{if(t)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var N=0,Q=t.length;N<-Q;++N)sel.addRange(t[N])}else document.selection&&t.select&&t.select()}catch(X){}};var B=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(t){null!=t.text&&(t.text.replaceLinefeeds="0"!=mxUtils.getValue(t.style,"nl2Br","1"));B.apply(this,arguments)};var z=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(t,N){this.isKeepFocusEvent(t)||!mxEvent.isAltDown(t.getEvent())?z.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=-function(t){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var C=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(t,N){t=this.graph.getStartEditingCell(t,N);C.apply(this,arguments);var Q=this.graph.view.getState(t);this.textarea.className=null!=Q&&1==Q.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?-"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(t)};mxCellEditor.prototype.toggleViewMode=function(){var t=this.graph.view.getState(this.editingCell);if(null!=t){var N=null!=t&&"0"!=mxUtils.getValue(t.style,"nl2Br","1"),Q=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,-xa.length-1));xa=Graph.sanitizeHtml(N?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(t.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);N=mxUtils.getValue(t.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(t.style,-mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,pa=[];(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&pa.push("underline");(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&pa.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=pa.join(" ");this.textarea.style.fontWeight=ia?"bold":"normal";this.textarea.style.fontStyle=ka?"italic":"";this.textarea.style.fontFamily=N;this.textarea.style.textAlign=X;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,-"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=Graph.sanitizeHtml(N?xa.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):xa,!0);this.textarea.className=+mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(x){return!mxEvent.isAltDown(x)||mxEvent.isShiftDown(x)};var g=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(x){return g.apply(this,arguments)||this.graph.isTableRow(x)||this.graph.isTableCell(x)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=+function(x){return m.apply(this,arguments)||this.graph.isEdgeIgnored(x)};var u=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(x){return this.graph.isCloneEvent(x)!=u.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var x=new mxEllipse(null,this.highlightColor,this.highlightColor,0);x.opacity=mxConstants.HIGHLIGHT_OPACITY;return x};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=+"crosshair";mxConnectionHandler.prototype.createEdgeState=function(x){x=this.graph.createCurrentEdgeStyle();x=this.graph.createEdge(null,null,null,null,null,x);x=new mxCellState(this.graph.view,x,this.graph.getCellStyle(x));for(var M in this.graph.currentEdgeStyle)x.style[M]=this.graph.currentEdgeStyle[M];if(null!=this.previous){var Q=this.previous.style.newEdgeStyle;if(null!=Q)try{var V=JSON.parse(Q);for(M in V)x.style[M]=V[M]}catch(ia){}}x.style=this.graph.postProcessCellStyle(x.cell,x.style);return x};+var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var x=p.apply(this,arguments);x.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return x};mxConnectionHandler.prototype.updatePreview=function(x){};var B=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var x=B.apply(this,arguments),M=x.getCell;x.getCell=mxUtils.bind(this,function(Q){var V=M.apply(this,arguments);this.error=null;return V});+return x};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var x="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",M="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),Q=0;Q<M.length;Q++)null!=+this.currentEdgeStyle[M[Q]]&&(x+=M[Q]+"="+this.currentEdgeStyle[M[Q]]+";");null!=this.currentEdgeStyle.orthogonalLoop?x+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(x+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?x+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(x+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize++";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(x+="elbow="+this.currentEdgeStyle.elbow+";");return x=null!=this.currentEdgeStyle.html?x+("html="+this.currentEdgeStyle.html+";"):x+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var x=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=+x&&(new mxCodec(x.ownerDocument)).decode(x,this.getStylesheet())};Graph.prototype.createCellLookup=function(x,M){M=null!=M?M:{};for(var Q=0;Q<x.length;Q++){var V=x[Q];M[mxObjectIdentity.get(V)]=V.getId();for(var ia=this.model.getChildCount(V),ka=0;ka<ia;ka++)this.createCellLookup([this.model.getChildAt(V,ka)],M)}return M};Graph.prototype.createCellMapping=function(x,M,Q){Q=null!=Q?Q:{};for(var V in x){var ia=M[V];null==Q[ia]&&(Q[ia]=x[V].getId()||"")}return Q};Graph.prototype.importGraphModel=function(x,+M,Q,V){M=null!=M?M:0;Q=null!=Q?Q:0;var ia=new mxCodec(x.ownerDocument),ka=new mxGraphModel;ia.decode(x,ka);x=[];ia={};var oa={},xa=ka.getChildren(this.cloneCell(ka.root,this.isCloneInvalidEdges(),ia));if(null!=xa){var ta=this.createCellLookup([ka.root]);xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ka=0;ka<xa.length;ka++)ua=this.model.getChildren(this.moveCells([xa[ka]],M,Q,!1,this.model.getRoot())[0]),null!=ua&&(x=x.concat(ua));else{var ua=+ka.getChildren(xa[0]);null!=ua&&(x=this.moveCells(ua,M,Q,!1,this.getDefaultParent()),oa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(ia,ta,oa),this.updateCustomLinks(oa,x),V)){this.isGridEnabled()&&(M=this.snap(M),Q=this.snap(Q));var Fa=this.getBoundingBoxFromGeometry(x,!0);null!=Fa&&this.moveCells(x,M-Fa.x,Q-Fa.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var M={},Q=this.cloneCells(x,null,M),V=+new mxDictionary,ia=0;ia<x.length;ia++)V.put(x[ia],!0);var ka=new mxCodec,oa=new mxGraphModel,xa=oa.getChildAt(oa.getRoot(),0);for(ia=0;ia<Q.length;ia++){oa.add(xa,Q[ia]);var ta=this.view.getState(x[ia]);if(null!=ta){var ua=this.getCellGeometry(Q[ia]);null!=ua&&ua.relative&&!this.model.isEdge(x[ia])&&null==V.get(this.model.getParent(x[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ta.x/ta.view.scale-ta.view.translate.x,ua.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(M,+this.createCellLookup(x)),Q);return ka.encode(oa)};Graph.prototype.isSwimlane=function(x,M){var Q=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(Q=this.getCurrentCellStyle(x,M)[mxConstants.STYLE_SHAPE]);return Q==mxConstants.SHAPE_SWIMLANE||"table"==Q||"tableRow"==Q};var H=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(x){return null!=x&&H.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellEditable(this.model.getParent(x)):+!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(x){return null!=x&&S.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellMovable(this.model.getParent(x)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var M=this.model.getParent(x);if(null!=M){var Q=this.getCurrentCellStyle(M);if(null!=Q.expand)return"0"!=Q.expand}return G.apply(this,arguments)&&(null==M||!this.isTable(M))};var O=Graph.prototype.splitEdge;+Graph.prototype.splitEdge=function(x,M,Q,V,ia,ka,oa,xa){null==xa&&(xa=this.model.getParent(x),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,oa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=O.apply(this,[x,M,Q,V,ia,ka,oa,xa]);this.model.setValue(Q,"");var ta=this.getChildCells(Q,!0);for(M=0;M<ta.length;M++){var ua=this.getCellGeometry(ta[M]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(ta[M])}var Fa=this.getChildCells(x,!0);for(M=0;M<Fa.length;M++)ua=this.getCellGeometry(Fa[M]),+null!=ua&&ua.relative&&0>=ua.x&&this.model.remove(Fa[M]);var Na=this.model.getTerminal(Q,!1);if(null!=Na){var Wa=this.getCurrentCellStyle(Na);null!=Wa&&"1"==Wa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[Q]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[Q]))}}finally{this.model.endUpdate()}return Q};var R=Graph.prototype.selectCell;Graph.prototype.selectCell=function(x,+M,Q){if(M||Q)R.apply(this,arguments);else{var V=this.getSelectionCell(),ia=null,ka=[],oa=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ka.push(xa),xa==V)ia=ka.length-1;else if(x&&null==V&&0<ka.length||null!=ia&&x&&ka.length>ia||!x&&0<ia)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)oa(this.model.getChildAt(xa,ta))});oa(this.model.root);0<ka.length&&(ia=null!=ia?mxUtils.mod(ia+(x?1:-1),ka.length):0,this.setSelectionCell(ka[ia]))}};+Graph.prototype.swapShapes=function(x,M){if(this.model.isVertex(x)&&this.model.isVertex(M)&&2==this.getMovableCells([x,M]).length){var Q=this.getCellGeometry(x),V=this.getCellGeometry(M);if(null!=Q&&null!=V){var ia=Q.clone(),ka=V.clone();this.model.beginUpdate();try{ia.x=V.getCenterX()-Q.width/2,ia.y=V.getCenterY()-Q.height/2,ka.x=Q.getCenterX()-V.width/2,ka.y=Q.getCenterY()-V.height/2,this.model.setGeometry(x,ia),this.model.setGeometry(M,ka)}finally{this.model.endUpdate()}}}};var c=Graph.prototype.moveCells;+Graph.prototype.moveCells=function(x,M,Q,V,ia,ka,oa){oa=null!=oa?oa:{};if(this.isTable(ia)){for(var xa=[],ta=0;ta<x.length;ta++)this.isTable(x[ta])?xa=xa.concat(this.model.getChildCells(x[ta],!0).reverse()):xa.push(x[ta]);x=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<x.length;ta++)if(null!=ia&&this.isTableRow(x[ta])){var ua=this.model.getParent(x[ta]),Fa=this.getCellGeometry(x[ta]);this.isTable(ua)&&xa.push(ua);if(null!=ua&&null!=Fa&&this.isTable(ua)&&this.isTable(ia)&&(V||ua!=ia)){if(!V){var Na=+this.getCellGeometry(ua);null!=Na&&(Na=Na.clone(),Na.height-=Fa.height,this.model.setGeometry(ua,Na))}Na=this.getCellGeometry(ia);null!=Na&&(Na=Na.clone(),Na.height+=Fa.height,this.model.setGeometry(ia,Na));var Wa=this.model.getChildCells(ia,!0);if(0<Wa.length){x[ta]=V?this.cloneCell(x[ta]):x[ta];var Xa=this.model.getChildCells(x[ta],!0),ab=this.model.getChildCells(Wa[0],!0),Oa=ab.length-Xa.length;if(0<Oa)for(var Qa=0;Qa<Oa;Qa++){var kb=this.cloneCell(Xa[Xa.length-1]);null!=kb&&(kb.value="",this.model.add(x[ta],+kb))}else if(0>Oa)for(Qa=0;Qa>Oa;Qa--)this.model.remove(Xa[Xa.length+Qa-1]);Xa=this.model.getChildCells(x[ta],!0);for(Qa=0;Qa<ab.length;Qa++){var cb=this.getCellGeometry(ab[Qa]),Ya=this.getCellGeometry(Xa[Qa]);null!=cb&&null!=Ya&&(Ya=Ya.clone(),Ya.width=cb.width,this.model.setGeometry(Xa[Qa],Ya))}}}}var gb=c.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!V&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&this.model.remove(xa[ta]);V&&this.updateCustomLinks(this.createCellMapping(oa,+this.createCellLookup(x)),gb)}finally{this.model.endUpdate()}return gb};var f=Graph.prototype.removeCells;Graph.prototype.removeCells=function(x,M){var Q=[];this.model.beginUpdate();try{for(var V=0;V<x.length;V++)if(this.isTableCell(x[V])){var ia=this.model.getParent(x[V]),ka=this.model.getParent(ia);1==this.model.getChildCount(ia)&&1==this.model.getChildCount(ka)?0>mxUtils.indexOf(x,ka)&&0>mxUtils.indexOf(Q,ka)&&Q.push(ka):this.labelChanged(x[V],"")}else{if(this.isTableRow(x[V])&&(ka=this.model.getParent(x[V]),+0>mxUtils.indexOf(x,ka)&&0>mxUtils.indexOf(Q,ka))){for(var oa=this.model.getChildCells(ka,!0),xa=0,ta=0;ta<oa.length;ta++)0<=mxUtils.indexOf(x,oa[ta])&&xa++;xa==oa.length&&Q.push(ka)}Q.push(x[V])}Q=f.apply(this,[Q,M])}finally{this.model.endUpdate()}return Q};Graph.prototype.updateCustomLinks=function(x,M,Q){Q=null!=Q?Q:new Graph;for(var V=0;V<M.length;V++)null!=M[V]&&Q.updateCustomLinksForCell(x,M[V],Q)};Graph.prototype.updateCustomLinksForCell=function(x,M){this.doUpdateCustomLinksForCell(x,M);for(var Q=+this.model.getChildCount(M),V=0;V<Q;V++)this.updateCustomLinksForCell(x,this.model.getChildAt(M,V))};Graph.prototype.doUpdateCustomLinksForCell=function(x,M){};Graph.prototype.getAllConnectionConstraints=function(x,M){if(null!=x){M=mxUtils.getValue(x.style,"points",null);if(null!=M){x=[];try{var Q=JSON.parse(M);for(M=0;M<Q.length;M++){var V=Q[M];x.push(new mxConnectionConstraint(new mxPoint(V[0],V[1]),2<V.length?"0"!=V[2]:!0,null,3<V.length?V[3]:0,4<V.length?V[4]:0))}}catch(ka){}return x}if(null!=+x.shape&&null!=x.shape.bounds){V=x.shape.direction;M=x.shape.bounds;var ia=x.shape.scale;Q=M.width/ia;M=M.height/ia;if(V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_SOUTH)V=Q,Q=M,M=V;M=x.shape.getConstraints(x.style,Q,M);if(null!=M)return M;if(null!=x.shape.stencil&&null!=x.shape.stencil.constraints)return x.shape.stencil.constraints;if(null!=x.shape.constraints)return x.shape.constraints}}return null};Graph.prototype.flipEdge=function(x){if(null!=x){var M=this.getCurrentCellStyle(x);M=+mxUtils.getValue(M,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,M,[x])}};Graph.prototype.isValidRoot=function(x){for(var M=this.model.getChildCount(x),Q=0,V=0;V<M;V++){var ia=this.model.getChildAt(x,V);this.model.isVertex(ia)&&(ia=this.getCellGeometry(ia),null==ia||ia.relative||Q++)}return 0<Q||this.isContainer(x)};Graph.prototype.isValidDropTarget=function(x,M,+Q){for(var V=this.getCurrentCellStyle(x),ia=!0,ka=!0,oa=0;oa<M.length&&ka;oa++)ia=ia&&this.isTable(M[oa]),ka=ka&&this.isTableRow(M[oa]);return!this.isCellLocked(x)&&(this.isTargetShape(x,M,Q)||("1"!=mxUtils.getValue(V,"part","0")||this.isContainer(x))&&"0"!=mxUtils.getValue(V,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(x))&&!this.isTableRow(x)&&(!this.isTable(x)||ka||ia))};Graph.prototype.createGroupCell=function(){var x=mxGraph.prototype.createGroupCell.apply(this,+arguments);x.setStyle("group");return x};Graph.prototype.isExtendParentsOnAdd=function(x){var M=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(M&&null!=x&&null!=this.layoutManager){var Q=this.model.getParent(x);null!=Q&&(Q=this.layoutManager.getLayout(Q),null!=Q&&Q.constructor==mxStackLayout&&(M=!1))}return M};Graph.prototype.getPreferredSizeForCell=function(x,M,Q){Q=null!=Q?Q:this.gridEnabled;var V=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=V&&(V.width+=+10,V.height+=4,Q&&(V.width=this.snap(V.width),V.height=this.snap(V.height)));return V};Graph.prototype.turnShapes=function(x,M){var Q=this.getModel(),V=[];Q.beginUpdate();try{for(var ia=0;ia<x.length;ia++){var ka=x[ia];if(Q.isEdge(ka)){var oa=Q.getTerminal(ka,!0),xa=Q.getTerminal(ka,!1);Q.setTerminal(ka,xa,!0);Q.setTerminal(ka,oa,!1);var ta=Q.getGeometry(ka);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var ua=ta.getTerminalPoint(!0),Fa=ta.getTerminalPoint(!1);ta.setTerminalPoint(ua,+!1);ta.setTerminalPoint(Fa,!0);Q.setGeometry(ka,ta);var Na=this.view.getState(ka),Wa=this.view.getState(oa),Xa=this.view.getState(xa);if(null!=Na){var ab=null!=Wa?this.getConnectionConstraint(Na,Wa,!0):null,Oa=null!=Xa?this.getConnectionConstraint(Na,Xa,!1):null;this.setConnectionConstraint(ka,oa,!0,Oa);this.setConnectionConstraint(ka,xa,!1,ab);var Qa=mxUtils.getValue(Na.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Na.style,+mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ka]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Qa,[ka])}V.push(ka)}}else if(Q.isVertex(ka)&&(ta=this.getCellGeometry(ka),null!=ta)){if(!(this.isTable(ka)||this.isTableRow(ka)||this.isTableCell(ka)||this.isSwimlane(ka))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var kb=ta.width;ta.width=ta.height;ta.height=kb;Q.setGeometry(ka,ta)}var cb=this.view.getState(ka);if(null!=cb){var Ya=[mxConstants.DIRECTION_EAST,+mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],gb=mxUtils.getValue(cb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Ya[mxUtils.mod(mxUtils.indexOf(Ya,gb)+(M?-1:1),Ya.length)],[ka])}V.push(ka)}}}finally{Q.endUpdate()}return V};Graph.prototype.stencilHasPlaceholders=function(x){if(null!=x&&null!=x.fgNode)for(x=x.fgNode.firstChild;null!=x;){if("text"==x.nodeName&&"1"==x.getAttribute("placeholders"))return!0;+x=x.nextSibling}return!1};var l=Graph.prototype.processChange;Graph.prototype.processChange=function(x){if(x instanceof mxGeometryChange&&(this.isTableCell(x.cell)||this.isTableRow(x.cell))&&(null==x.previous&&null!=x.geometry||null!=x.previous&&!x.previous.equals(x.geometry))){var M=x.cell;this.isTableCell(M)&&(M=this.model.getParent(M));this.isTableRow(M)&&(M=this.model.getParent(M));var Q=this.view.getState(M);null!=Q&&null!=Q.shape&&(this.view.invalidate(M),Q.shape.bounds=null)}l.apply(this,arguments);+x instanceof mxValueChange&&null!=x.cell&&null!=x.cell.value&&"object"==typeof x.cell.value&&this.invalidateDescendantsWithPlaceholders(x.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(x){x=this.model.getDescendants(x);if(0<x.length)for(var M=0;M<x.length;M++){var Q=this.view.getState(x[M]);null!=Q&&null!=Q.shape&&null!=Q.shape.stencil&&this.stencilHasPlaceholders(Q.shape.stencil)?this.removeStateForCell(x[M]):this.isReplacePlaceholders(x[M])&&this.view.invalidate(x[M],!1,!1)}};+Graph.prototype.replaceElement=function(x,M){M=x.ownerDocument.createElement(null!=M?M:"span");for(var Q=Array.prototype.slice.call(x.attributes);attr=Q.pop();)M.setAttribute(attr.nodeName,attr.nodeValue);M.innerHTML=x.innerHTML;x.parentNode.replaceChild(M,x)};Graph.prototype.processElements=function(x,M){if(null!=x){x=x.getElementsByTagName("*");for(var Q=0;Q<x.length;Q++)null!=x[Q]&&M(x[Q])}};Graph.prototype.updateLabelElements=function(x,M,Q){x=null!=x?x:this.getSelectionCells();for(var V=document.createElement("div"),+ia=0;ia<x.length;ia++){var ka=this.getCurrentCellStyle(x[ia]);if(null!=ka&&"1"==ka.html&&(ka=this.convertValueToString(x[ia]),null!=ka&&0<ka.length)){V.innerHTML=Graph.sanitizeHtml(ka);for(var oa=V.getElementsByTagName(null!=Q?Q:"*"),xa=0;xa<oa.length;xa++)M(oa[xa]);V.innerHTML!=ka&&this.cellLabelChanged(x[ia],V.innerHTML)}}};Graph.prototype.cellLabelChanged=function(x,M,Q){M=Graph.zapGremlins(M);this.model.beginUpdate();try{if(null!=x.value&&"object"==typeof x.value){if(this.isReplacePlaceholders(x)&&+null!=x.getAttribute("placeholder"))for(var V=x.getAttribute("placeholder"),ia=x;null!=ia;){if(ia==this.model.getRoot()||null!=ia.value&&"object"==typeof ia.value&&ia.hasAttribute(V)){this.setAttributeForCell(ia,V,M);break}ia=this.model.getParent(ia)}var ka=x.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ka.hasAttribute("label_"+Graph.diagramLanguage)?ka.setAttribute("label_"+Graph.diagramLanguage,M):ka.setAttribute("label",M);M=ka}mxGraph.prototype.cellLabelChanged.apply(this,+arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(x){if(null!=x){for(var M=new mxDictionary,Q=0;Q<x.length;Q++)M.put(x[Q],!0);var V=[];for(Q=0;Q<x.length;Q++){var ia=this.model.getParent(x[Q]);null==ia||M.get(ia)||(M.put(ia,!0),V.push(ia))}for(Q=0;Q<V.length;Q++)if(ia=this.view.getState(V[Q]),null!=ia&&(this.model.isEdge(ia.cell)||this.model.isVertex(ia.cell))&&this.isCellDeletable(ia.cell)&&this.isTransparentState(ia)){for(var ka=!0,oa=0;oa<this.model.getChildCount(ia.cell)&&+ka;oa++)M.get(this.model.getChildAt(ia.cell,oa))||(ka=!1);ka&&x.push(ia.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(x){for(var M=[],Q=0;Q<x.length;Q++)this.isCellDeletable(x[Q])&&this.isTransparentState(this.view.getState(x[Q]))&&M.push(x[Q]);x=M;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(x,M){this.setAttributeForCell(x,"link",M)};Graph.prototype.setTooltipForCell=function(x,+M){var Q="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(x.value)&&x.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(x,Q,M)};Graph.prototype.getAttributeForCell=function(x,M,Q){x=null!=x.value&&"object"===typeof x.value?x.value.getAttribute(M):null;return null!=x?x:Q};Graph.prototype.setAttributeForCell=function(x,M,Q){if(null!=x.value&&"object"==typeof x.value)var V=x.value.cloneNode(!0);else V=mxUtils.createXmlDocument().createElement("UserObject"),+V.setAttribute("label",x.value||"");null!=Q?V.setAttribute(M,Q):V.removeAttribute(M);this.model.setValue(x,V)};Graph.prototype.isTargetShape=function(x,M,Q){x=mxUtils.getValue(this.getCurrentCellStyle(x),mxConstants.STYLE_SHAPE,"");for(Q=0;Q<M.length;Q++){var V=mxUtils.getValue(this.getCurrentCellStyle(M[Q]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(V,x))return!0}return!1};var t=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(x,M,Q,V){if(mxEvent.isAltDown(M))return null;+for(var ia=0;ia<x.length;ia++){var ka=this.model.getParent(x[ia]);if(this.model.isEdge(ka)&&0>mxUtils.indexOf(x,ka))return null}ka=t.apply(this,arguments);var oa=!0;for(ia=0;ia<x.length&&oa;ia++)oa=oa&&this.isTableRow(x[ia]);oa&&(this.isTableCell(ka)&&(ka=this.model.getParent(ka)),this.isTableRow(ka)&&(ka=this.model.getParent(ka)),this.isTable(ka)||(ka=null));return ka};Graph.prototype.click=function(x){mxGraph.prototype.click.call(this,x);this.firstClickState=x.getState();this.firstClickSource=x.getSource()};+Graph.prototype.dblClick=function(x,M){this.isEnabled()&&(M=this.insertTextForEvent(x,M),mxGraph.prototype.dblClick.call(this,x,M))};Graph.prototype.insertTextForEvent=function(x,M){var Q=mxUtils.convertPoint(this.container,mxEvent.getClientX(x),mxEvent.getClientY(x));if(null!=x&&!this.model.isVertex(M)){var V=this.model.isEdge(M)?this.view.getState(M):null,ia=mxEvent.getSource(x);this.firstClickState!=V||this.firstClickSource!=ia||null!=V&&null!=V.text&&null!=V.text.node&&null!=V.text.boundingBox&&+(mxUtils.contains(V.text.boundingBox,Q.x,Q.y)||mxUtils.isAncestorNode(V.text.node,mxEvent.getSource(x)))||(null!=V||this.isCellLocked(this.getDefaultParent()))&&(null==V||this.isCellLocked(V.cell))||!(null!=V||mxClient.IS_SVG&&ia==this.view.getCanvas().ownerSVGElement)||(null==V&&(V=this.view.getState(this.getCellAt(Q.x,Q.y))),M=this.addText(Q.x,Q.y,V))}return M};Graph.prototype.getInsertPoint=function(){var x=this.getGridSize(),M=this.container.scrollLeft/this.view.scale-this.view.translate.x,Q=+this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var V=this.getPageLayout(),ia=this.getPageSize();M=Math.max(M,V.x*ia.width);Q=Math.max(Q,V.y*ia.height)}return new mxPoint(this.snap(M+x),this.snap(Q+x))};Graph.prototype.getFreeInsertPoint=function(){var x=this.view,M=this.getGraphBounds(),Q=this.getInsertPoint(),V=this.snap(Math.round(Math.max(Q.x,M.x/x.scale-x.translate.x+(0==M.width?2*this.gridSize:0))));x=this.snap(Math.round(Math.max(Q.y,(M.y+M.height)/x.scale-+x.translate.y+2*this.gridSize)));return new mxPoint(V,x)};Graph.prototype.getCenterInsertPoint=function(x){x=null!=x?x:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-x.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/+2/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-x.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(x,M){x=null!=x?x:"";null!=M&&(0<x.length&&";"!=x.charAt(x.length-1)&&(x+=";"),x+="fontSize="+M+";");return x};Graph.prototype.addText=function(x,M,Q){var V=new mxCell;V.value="Text";V.geometry=new mxGeometry(0,0,0,0);V.vertex=!0;if(null!=Q&&this.model.isEdge(Q.cell)){V.style=+"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);V.geometry.relative=!0;V.connectable=!1;var ia=this.view.getRelativePoint(Q,x,M);V.geometry.x=Math.round(1E4*ia.x)/1E4;V.geometry.y=Math.round(ia.y);V.geometry.offset=new mxPoint(0,0);ia=this.view.getPoint(Q,V.geometry);var ka=this.view.scale;V.geometry.offset=new mxPoint(Math.round((x-ia.x)/ka),Math.round((M-ia.y)/ka))}else ia=this.view.translate,V.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",+this.vertexFontSize),V.geometry.width=40,V.geometry.height=20,V.geometry.x=Math.round(x/this.view.scale)-ia.x-(null!=Q?Q.origin.x:0),V.geometry.y=Math.round(M/this.view.scale)-ia.y-(null!=Q?Q.origin.y:0),V.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([V],null!=Q?Q.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[V])),this.autoSizeCell(V)}finally{this.getModel().endUpdate()}return V};Graph.prototype.addClickHandler=function(x,M,Q){var V=mxUtils.bind(this,+function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var ua=0;ua<ta.length;ua++){var Fa=this.getAbsoluteUrl(ta[ua].getAttribute("href"));null!=Fa&&(ta[ua].setAttribute("rel",this.linkRelation),ta[ua].setAttribute("href",Fa),null!=M&&mxEvent.addGestureListeners(ta[ua],null,null,M))}});this.model.addListener(mxEvent.CHANGE,V);V();var ia=this.container.style.cursor,ka=this.getTolerance(),oa=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=x&&""!=x&&+x!=mxConstants.NONE?new mxCellHighlight(oa,x,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var ua=ta.sourceState;if(null==ua||null==oa.getLinkForCell(ua.cell))ta=oa.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(Fa,Na,Wa){return null==oa.getLinkForCell(Fa.cell)}),ua=null==ua||oa.model.isAncestor(ta,ua.cell)?oa.view.getState(ta):null;ua!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ua,null!=this.currentState&&this.activate(this.currentState))},+mouseDown:function(ta,ua){this.startX=ua.getGraphX();this.startY=ua.getGraphY();this.scrollLeft=oa.container.scrollLeft;this.scrollTop=oa.container.scrollTop;null==this.currentLink&&"auto"==oa.container.style.overflow&&(oa.container.style.cursor="move");this.updateCurrentState(ua)},mouseMove:function(ta,ua){if(oa.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-ua.getGraphX()),ua=Math.abs(this.startY-ua.getGraphY()),(ta>ka||ua>ka)&&this.clear());else{for(ta=ua.getSource();null!=ta&&"a"!=+ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=oa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&oa.tooltipHandler.reset(ua,!0,this.currentState),(null==this.currentState||ua.getState()!=this.currentState&&null!=ua.sourceState||!oa.intersects(this.currentState,ua.getGraphX(),ua.getGraphY()))&&this.updateCurrentState(ua))}},mouseUp:function(ta,ua){var Fa=ua.getSource();for(ta=ua.getEvent();null!=Fa&&"a"!=Fa.nodeName.toLowerCase();)Fa=Fa.parentNode;null==+Fa&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-oa.container.scrollTop)<ka&&(null==ua.sourceState||!ua.isSource(ua.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(Fa=oa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Fa||null==M||M(ta,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ta)||+(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":Fa?oa.linkTarget:"_top",oa.openLink(this.currentLink,ta),ua.consume())):null!=Q&&!ua.isConsumed()&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ka&&Math.abs(this.scrollTop-oa.container.scrollTop)<ka&&Math.abs(this.startX-ua.getGraphX())<ka&&Math.abs(this.startY-ua.getGraphY())<ka&&Q(ua.getEvent()));this.clear()},activate:function(ta){this.currentLink=oa.getAbsoluteUrl(oa.getLinkForCell(ta.cell));null!=this.currentLink&&+(this.currentTarget=oa.getLinkTargetForCell(ta.cell),oa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=oa.container&&(oa.container.style.cursor=ia);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=oa.tooltipHandler&&oa.tooltipHandler.hide()}};oa.click=function(ta){};oa.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=+function(x,M){x=null!=x?x:this.getSelectionCells();M=null!=M?M:!0;for(var Q=0;Q<x.length;Q++)this.isTableCell(x[Q])&&(x[Q]=this.model.getParent(x[Q]));x=this.model.getTopmostCells(x);var V=this.getModel(),ia=this.gridSize,ka=[];V.beginUpdate();try{var oa={},xa=this.createCellLookup(x),ta=this.cloneCells(x,!1,oa,!0);for(Q=0;Q<x.length;Q++){var ua=V.getParent(x[Q]);if(null!=ua){var Fa=this.moveCells([ta[Q]],ia,ia,!1)[0];ka.push(Fa);if(M)V.add(ua,ta[Q]);else{var Na=ua.getIndex(x[Q]);V.add(ua,ta[Q],Na++1)}if(this.isTable(ua)){var Wa=this.getCellGeometry(ta[Q]),Xa=this.getCellGeometry(ua);null!=Wa&&null!=Xa&&(Xa=Xa.clone(),Xa.height+=Wa.height,V.setGeometry(ua,Xa))}}else ka.push(ta[Q])}this.updateCustomLinks(this.createCellMapping(oa,xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{V.endUpdate()}return ka};Graph.prototype.insertImage=function(x,M,Q){if(null!=x&&null!=this.cellEditor.textarea){for(var V=this.cellEditor.textarea.getElementsByTagName("img"),ia=+[],ka=0;ka<V.length;ka++)ia.push(V[ka]);document.execCommand("insertimage",!1,x);x=this.cellEditor.textarea.getElementsByTagName("img");if(x.length==ia.length+1)for(ka=x.length-1;0<=ka;ka--)if(0==ka||x[ka]!=ia[ka-1]){x[ka].setAttribute("width",M);x[ka].setAttribute("height",Q);break}}};Graph.prototype.insertLink=function(x){if(null!=this.cellEditor.textarea)if(0==x.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var M=this.cellEditor.textarea.getElementsByTagName("a"),Q=[],V=+0;V<M.length;V++)Q.push(M[V]);document.execCommand("createlink",!1,mxUtils.trim(x));M=this.cellEditor.textarea.getElementsByTagName("a");if(M.length==Q.length+1)for(V=M.length-1;0<=V;V--)if(M[V]!=Q[V-1]){for(M=M[V].getElementsByTagName("a");0<M.length;){for(Q=M[0].parentNode;null!=M[0].firstChild;)Q.insertBefore(M[0].firstChild,M[0]);Q.removeChild(M[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(x))};Graph.prototype.isCellResizable=function(x){var M=mxGraph.prototype.isCellResizable.apply(this,+arguments),Q=this.getCurrentCellStyle(x);return!this.isTableCell(x)&&!this.isTableRow(x)&&(M||"0"!=mxUtils.getValue(Q,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==Q[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(x,M,Q){null==M&&(M=this.getSelectionCells());if(null!=M&&1<M.length){for(var V=[],ia=null,ka=null,oa=0,xa=0;xa<M.length;xa++)if(this.getModel().isVertex(M[xa])){var ta=this.view.getState(M[xa]);if(null!=ta){var ua=x?ta.getCenterX():ta.getCenterY();ia=null!=ia?Math.max(ia,+ua):ua;ka=null!=ka?Math.min(ka,ua):ua;Q&&(oa+=x?ta.width:ta.height);V.push(ta)}}if(2<V.length){V.sort(function(ab,Oa){return x?ab.x-Oa.x:ab.y-Oa.y});Q&&(oa-=x?V[0].width/2+V[V.length-1].width/2:V[0].height/2+V[V.length-1].height/2);ta=this.view.translate;ua=this.view.scale;ka=ka/ua-(x?ta.x:ta.y);ia=ia/ua-(x?ta.x:ta.y);this.getModel().beginUpdate();try{var Fa=(ia-ka-oa)/(V.length-1),Na=ka+(Q?x?V[0].width/2:V[0].height/2:0);for(xa=1;xa<V.length-1;xa++){var Wa=this.view.getState(this.model.getParent(V[xa].cell)),+Xa=this.getCellGeometry(V[xa].cell);Na+=Fa;null!=Xa&&null!=Wa&&(Xa=Xa.clone(),x?Xa.x=Math.round(Na-(Q?0:Xa.width/2))-Wa.origin.x:Xa.y=Math.round(Na-(Q?0:Xa.height/2))-Wa.origin.y,this.getModel().setGeometry(V[xa].cell,Xa));Q&&(Na+=x?V[xa].width:V[xa].height)}}finally{this.getModel().endUpdate()}}}return M};Graph.prototype.isCloneEvent=function(x){return mxClient.IS_MAC&&mxEvent.isMetaDown(x)||mxEvent.isControlDown(x)};Graph.prototype.createSvgImageExport=function(x){x=new mxImageExport;x.addCellData=+function(Q,V,ia){V.setAttribute("data-cell-id",Q.id);if(ia)if(mxUtils.isNode(Q.value))for(ia=0;ia<Q.value.attributes.length;ia++){var ka=Q.value.attributes[ia];V.setAttribute("data-cell-"+ka.name,ka.value)}else if("object"===typeof Q.value)for(ka in Q.value)V.setAttribute("data-cell-"+ka,Q.value[ka]);else null!=Q.value&&V.setAttribute("data-cell-value",Q.value);return V};var M=x.visitStatesRecursive;x.visitStatesRecursive=function(Q,V,ia){if(null!=Q){var ka=V.root,oa=V.root.ownerDocument;V.root=this.addCellData(Q.cell,+null!=oa.createElementNS?oa.createElementNS(mxConstants.NS_SVG,"g"):oa.createElement("g"),Editor.addSvgMetadata);ka.appendChild(V.root);M.apply(this,arguments);V.root=ka}};x.getLinkForCellState=mxUtils.bind(this,function(Q,V){return this.getLinkForCell(Q.cell)});x.getTitleForCellState=mxUtils.bind(this,function(Q,V){return Editor.convertHtmlToText(this.convertValueToTooltip(Q.cell))});return x};Graph.prototype.parseBackgroundImage=function(x){var M=null;null!=x&&0<x.length&&(x=JSON.parse(x),M=new mxImage(x.src,+x.width,x.height));return M};Graph.prototype.getBackgroundImageObject=function(x){return x};Graph.prototype.getSvg=function(x,M,Q,V,ia,ka,oa,xa,ta,ua,Fa,Na,Wa,Xa,ab,Oa){var Qa=null;if(null!=Xa)for(Qa=new mxDictionary,Fa=0;Fa<Xa.length;Fa++)Qa.put(Xa[Fa],!0);Xa=this.useCssTransforms;var kb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Xa&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{M=null!=M?M:1;Q=null!=Q?Q:0;ia=null!=ia?ia:!0;ka=null!=ka?ka:!0;oa=null!=oa?oa:+!0;ua=null!=ua?ua:!1;var cb="page"==Wa?this.view.getBackgroundPageBounds():ka&&null==Qa||V||"diagram"==Wa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ya=this.backgroundImage,gb=this.view.translate,hb=this.view.scale;"diagram"==Wa&&null!=Ya&&null!=Ya.width&&null!=Ya.height&&(cb=mxRectangle.fromRectangle(cb),cb.add(new mxRectangle((gb.x+Ya.x)*hb,(gb.y+Ya.y)*hb,Ya.width*hb,Ya.height*hb)));if(null==cb)throw Error(mxResources.get("drawingEmpty"));V=M/hb;var vb=Math.max(1,Math.ceil(cb.width*+V)+2*Q)+(ua&&0==Q?5:0),mb=Math.max(1,Math.ceil(cb.height*V)+2*Q)+(ua&&0==Q?5:0);ua=ia?-.5:0;var pb=mxUtils.getLightDarkColor(x),db=Graph.createSvgNode(ua,ua,vb,mb,pb),qb=db.ownerDocument;if(null!=x){var nb=mxUtils.createElementNs(qb,mxConstants.NS_SVG,"rect");nb.setAttribute("fill",pb.light);nb.style.fill=pb.cssText;nb.setAttribute("width","100%");nb.setAttribute("height","100%");nb.setAttribute("x","0");nb.setAttribute("y","0");db.appendChild(nb)}var lb=mxUtils.createElementNs(qb,mxConstants.NS_SVG,+"g");db.appendChild(lb);var eb=this.createSvgCanvas(lb);eb.foOffset=ia?-.5:0;eb.textOffset=ia?-.5:0;eb.imageOffset=ia?-.5:0;eb.translate(Math.floor(Q/M-cb.x/hb),Math.floor(Q/M-cb.y/hb));eb.idPrefix="drawio-svg-"+Editor.guid();var tb=document.createElement("div"),ob=eb.getAlternateText;eb.getAlternateText=function(ib,Bb,sb,xb,zb,rb,Cb,d,n,y,q,v,D){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(tb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(tb.childNodes));for(var E=+Math.ceil(2*xb/this.state.fontSize),fa=[],L=0,va=0;(0==E||L<E)&&va<rb.length;){var na=rb.charCodeAt(va);if(10==na||13==na){if(0<L)break}else fa.push(rb.charAt(va)),255>na&&L++;va++}fa.length<rb.length&&1<rb.length-fa.length&&(rb=mxUtils.trim(fa.join(""))+"...");return rb}catch(Va){return ob.apply(this,arguments)}else return ob.apply(this,arguments)};null!=Ya&&null!=Ya.width&&null!=Ya.height&&(x=hb/M,ua=new mxRectangle((Ya.x+gb.x)*x,(Ya.y+gb.y)*x,Ya.width*x,Ya.height*x),mxUtils.intersects(cb,ua)&&+eb.image(Ya.x+gb.x,Ya.y+gb.y,Ya.width,Ya.height,Ya.src,!0));eb.scale(V);eb.textEnabled=oa;xa=null!=xa?xa:this.createSvgImageExport();var ub=xa.getLinkForCellState;xa.getLinkForCellState=function(ib,Bb){var sb=ib.view.graph.getAbsoluteUrl(ub.apply(this,arguments));return null==sb||ib.view.graph.isCustomLink(sb)?null:sb};xa.getLinkTargetForCellState=function(ib,Bb){return ib.view.graph.getLinkTargetForCell(ib.cell)};var Ab=xa.drawCellState,yb=null,wb=mxUtils.bind(this,function(){if(null==yb){yb="ge-flow-animation-"++Editor.guid();var ib=null!=qb.createElementNS?qb.createElementNS(mxConstants.NS_SVG,"style"):qb.createElement("style");ib.innerHTML=this.createFlowAnimationCss(yb);qb.getElementsByTagName("defs")[0].appendChild(ib)}return yb});xa.drawCellState=function(ib,Bb){for(var sb=ib.view.graph,xb=null!=Qa?Qa.get(ib.cell):sb.isCellSelected(ib.cell),zb=sb.model.getParent(ib.cell);!(ka&&null==Qa||xb)&&null!=zb;)xb=null!=Qa?Qa.get(zb):sb.isCellSelected(zb),zb=sb.model.getParent(zb);if(null!=ib.shape)try{var rb=+ib.shape.isFlowAnimationEnabled,Cb=ib.shape.addFlowAnimationToShape;ib.shape.isFlowAnimationEnabled=function(){return kb&&sb.model.isEdge(ib.cell)&&"1"==mxUtils.getValue(ib.style,"flowAnimation","0")};ib.shape.addFlowAnimationToShape=function(){sb.addFlowAnimationToNode(this.getFlowAnimationPath(),ib.style,M,wb())};if(ka&&null==Qa||xb)sb.view.redrawEnumerationState(ib),Ab.apply(this,arguments),this.doDrawShape(ib.secondLabel,Bb)}finally{ib.shape.isFlowAnimationEnabled=rb,ib.shape.addFlowAnimationToShape=+Cb}};var jb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;xa.drawState(this.getView().getState(jb),eb);this.addForeignObjectWarning(eb,db);Oa?this.disableSvgLinks(db):this.updateSvgLinks(db,ta,!0);return db}finally{this.enableFlowAnimation=kb,Xa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(x,M){if("0"!=urlParams["svg-warning"]&&0<M.getElementsByTagName("foreignObject").length){var Q=x.createElement("switch"),+V=x.createElement("g");V.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ia=x.createElement("a");ia.setAttribute("transform","translate(0,-5)");null==ia.setAttributeNS||M.ownerDocument!=document&&null==document.documentMode?(ia.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ia.setAttribute("target","_blank")):(ia.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ia.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));+x=x.createElement("text");x.setAttribute("text-anchor","middle");x.setAttribute("font-size","10px");x.setAttribute("x","50%");x.setAttribute("y","100%");mxUtils.write(x,Graph.foreignObjectWarningText);Q.appendChild(V);ia.appendChild(x);Q.appendChild(ia);M.appendChild(Q)}};Graph.prototype.disableSvgLinks=function(x,M){x=x.getElementsByTagName("a");for(var Q=0;Q<x.length;Q++){var V=x[Q].getAttribute("href");null==V&&(V=x[Q].getAttribute("xlink:href"));null!=V&&(x[Q].style.pointerEvents="none",x[Q].setAttribute("href",+""));M&&M(x[Q])}};Graph.prototype.updateSvgLinks=function(x,M,Q){x=x.getElementsByTagName("a");for(var V=0;V<x.length;V++)if(null==x[V].getAttribute("target")){var ia=x[V].getAttribute("href");null==ia&&(ia=x[V].getAttribute("xlink:href"));null!=ia&&(null!=M&&/^https?:\/\//.test(ia)?x[V].setAttribute("target",M):Q&&this.isCustomLink(ia)&&x[V].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(x){x=new mxSvgCanvas2D(x);x.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;+x.adaptiveColors=this.getAdaptiveColors();x.pointerEvents=!0;return x};Graph.prototype.getSelectedElement=function(){var x=null;if(window.getSelection){var M=window.getSelection();M.getRangeAt&&M.rangeCount&&(x=M.getRangeAt(0).commonAncestorContainer)}else document.selection&&(x=document.selection.createRange().parentElement());return x};Graph.prototype.getSelectedEditingElement=function(){var x=null;if(null!=this.cellEditor.textarea)for(x=this.getSelectedElement();null!=x&&x.nodeType!=mxConstants.NODETYPE_ELEMENT;)x=+x.parentNode;return x};Graph.prototype.getParentByName=function(x,M,Q){for(;null!=x&&x.nodeName!=M;){if(x==Q)return null;x=x.parentNode}return x};Graph.prototype.getParentByNames=function(x,M,Q){for(;null!=x&&!(0<=mxUtils.indexOf(M,x.nodeName));){if(x==Q)return null;x=x.parentNode}return x};Graph.prototype.selectNode=function(x){var M=null;if(window.getSelection){if(M=window.getSelection(),M.getRangeAt&&M.rangeCount){var Q=document.createRange();Q.selectNode(x);M.removeAllRanges();M.addRange(Q)}}else(M=+document.selection)&&"Control"!=M.type&&(x=M.createRange(),x.collapse(!0),Q=M.createRange(),Q.setEndPoint("StartToStart",x),Q.select())};Graph.prototype.flipEdgePoints=function(x,M,Q){var V=this.getCellGeometry(x);if(null!=V){V=V.clone();if(null!=V.points)for(var ia=0;ia<V.points.length;ia++)M?V.points[ia].x=Q+(Q-V.points[ia].x):V.points[ia].y=Q+(Q-V.points[ia].y);ia=function(ka){null!=ka&&(M?ka.x=Q+(Q-ka.x):ka.y=Q+(Q-ka.y))};ia(V.getTerminalPoint(!0));ia(V.getTerminalPoint(!1));this.model.setGeometry(x,+V)}};Graph.prototype.flipChildren=function(x,M,Q){this.model.beginUpdate();try{for(var V=this.model.getChildCount(x),ia=0;ia<V;ia++){var ka=this.model.getChildAt(x,ia);if(this.model.isEdge(ka))this.flipEdgePoints(ka,M,Q);else{var oa=this.getCellGeometry(ka);null!=oa&&(oa=oa.clone(),M?oa.x=Q+(Q-oa.x-oa.width):oa.y=Q+(Q-oa.y-oa.height),this.model.setGeometry(ka,oa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(x,M){this.model.beginUpdate();try{x=this.model.getTopmostCells(x);+for(var Q=[],V=0;V<x.length;V++)if(this.model.isEdge(x[V])){var ia=this.view.getState(x[V]);null!=ia&&this.flipEdgePoints(x[V],M,(M?ia.getCenterX():ia.getCenterY())/this.view.scale-(M?ia.origin.x:ia.origin.y)-(M?this.view.translate.x:this.view.translate.y))}else{var ka=this.getCellGeometry(x[V]);null!=ka&&this.flipChildren(x[V],M,M?ka.getCenterX()-ka.x:ka.getCenterY()-ka.y);Q.push(x[V])}this.toggleCellStyles(M?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,Q)}finally{this.model.endUpdate()}};+Graph.prototype.deleteCells=function(x,M){var Q=null;if(null!=x&&0<x.length){this.model.beginUpdate();try{for(var V=0;V<x.length;V++){var ia=this.model.getParent(x[V]);if(this.isTable(ia)){var ka=this.getCellGeometry(x[V]),oa=this.getCellGeometry(ia);null!=ka&&null!=oa&&(oa=oa.clone(),oa.height-=ka.height,this.model.setGeometry(ia,oa))}}var xa=this.selectParentAfterDelete?this.model.getParents(x):null;this.removeCells(x,M)}finally{this.model.endUpdate()}if(null!=xa)for(Q=[],V=0;V<xa.length;V++)this.model.contains(xa[V])&&+(this.model.isVertex(xa[V])||this.model.isEdge(xa[V]))&&Q.push(xa[V])}return Q};Graph.prototype.insertTableColumn=function(x,M){var Q=this.getModel();Q.beginUpdate();try{var V=x,ia=0;if(this.isTableCell(x)){var ka=Q.getParent(x);V=Q.getParent(ka);ia=mxUtils.indexOf(Q.getChildCells(ka,!0),x)}else this.isTableRow(x)?V=Q.getParent(x):x=Q.getChildCells(V,!0)[0],M||(ia=Q.getChildCells(x,!0).length-1);var oa=Q.getChildCells(V,!0),xa=Graph.minTableColumnWidth;for(x=0;x<oa.length;x++){var ta=Q.getChildCells(oa[x],+!0)[ia],ua=Q.cloneCell(ta,!1);null==ua&&(ua=this.createVertex());var Fa=this.getCellGeometry(ua);ua.value=null;ua.style=mxUtils.setStyle(mxUtils.setStyle(ua.style,"rowspan",null),"colspan",null);if(null!=Fa){null!=Fa.alternateBounds&&(Fa.width=Fa.alternateBounds.width,Fa.height=Fa.alternateBounds.height,Fa.alternateBounds=null);xa=Fa.width;var Na=this.getCellGeometry(oa[x]);null!=Na&&(Fa.height=Na.height)}Q.add(oa[x],ua,ia+(M?0:1))}var Wa=this.getCellGeometry(V);null!=Wa&&(Wa=Wa.clone(),Wa.width+=+xa,Q.setGeometry(V,Wa))}finally{Q.endUpdate()}};Graph.prototype.deleteLane=function(x){var M=this.getModel();M.beginUpdate();try{var Q=null;Q="stackLayout"==this.getCurrentCellStyle(x).childLayout?x:M.getParent(x);var V=M.getChildCells(Q,!0);0==V.length?M.remove(Q):(Q==x&&(x=V[V.length-1]),M.remove(x))}finally{M.endUpdate()}};Graph.prototype.insertLane=function(x,M){var Q=this.getModel();Q.beginUpdate();try{var V=null;if("stackLayout"==this.getCurrentCellStyle(x).childLayout){V=x;var ia=Q.getChildCells(V,+!0);x=ia[M?0:ia.length-1]}else V=Q.getParent(x);var ka=V.getIndex(x);x=Q.cloneCell(x,!1);x.value=null;Q.add(V,x,ka+(M?0:1))}finally{Q.endUpdate()}};Graph.prototype.insertTableRow=function(x,M){var Q=this.getModel();Q.beginUpdate();try{var V=x,ia=x;if(this.isTableCell(x))ia=Q.getParent(x),V=Q.getParent(ia);else if(this.isTableRow(x))V=Q.getParent(x);else{var ka=Q.getChildCells(V,!0);ia=ka[M?0:ka.length-1]}var oa=Q.getChildCells(ia,!0),xa=V.getIndex(ia);ia=Q.cloneCell(ia,!1);ia.value=null;var ta=this.getCellGeometry(ia);+if(null!=ta){for(ka=0;ka<oa.length;ka++){x=Q.cloneCell(oa[ka],!1);x.value=null;x.style=mxUtils.setStyle(mxUtils.setStyle(x.style,"rowspan",null),"colspan",null);var ua=this.getCellGeometry(x);null!=ua&&(null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null),ua.height=ta.height);ia.insert(x)}Q.add(V,ia,xa+(M?0:1));var Fa=this.getCellGeometry(V);null!=Fa&&(Fa=Fa.clone(),Fa.height+=ta.height,Q.setGeometry(V,Fa))}}finally{Q.endUpdate()}};+Graph.prototype.deleteTableColumn=function(x){var M=this.getModel();M.beginUpdate();try{var Q=x,V=x;this.isTableCell(x)&&(V=M.getParent(x));this.isTableRow(V)&&(Q=M.getParent(V));var ia=M.getChildCells(Q,!0);if(0==ia.length)M.remove(Q);else{this.isTableRow(V)||(V=ia[0]);var ka=M.getChildCells(V,!0);if(1>=ka.length)M.remove(Q);else{var oa=ka.length-1;this.isTableCell(x)&&(oa=mxUtils.indexOf(ka,x));for(V=x=0;V<ia.length;V++){var xa=M.getChildCells(ia[V],!0)[oa];M.remove(xa);var ta=this.getCellGeometry(xa);+null!=ta&&(x=Math.max(x,ta.width))}var ua=this.getCellGeometry(Q);null!=ua&&(ua=ua.clone(),ua.width-=x,M.setGeometry(Q,ua))}}}finally{M.endUpdate()}};Graph.prototype.deleteTableRow=function(x){var M=this.getModel();M.beginUpdate();try{var Q=x,V=x;this.isTableCell(x)&&(x=V=M.getParent(x));this.isTableRow(x)&&(Q=M.getParent(V));var ia=M.getChildCells(Q,!0);if(1>=ia.length)M.remove(Q);else{this.isTableRow(V)||(V=ia[ia.length-1]);M.remove(V);x=0;var ka=this.getCellGeometry(V);null!=ka&&(x=ka.height);+var oa=this.getCellGeometry(Q);null!=oa&&(oa=oa.clone(),oa.height-=x,M.setGeometry(Q,oa))}}finally{M.endUpdate()}};Graph.prototype.insertRow=function(x,M){for(var Q=x.tBodies[0],V=Q.rows[0].cells,ia=x=0;ia<V.length;ia++){var ka=V[ia].getAttribute("colspan");x+=null!=ka?parseInt(ka):1}M=Q.insertRow(M);for(ia=0;ia<x;ia++)mxUtils.br(M.insertCell(-1));return M.cells[0]};Graph.prototype.deleteRow=function(x,M){x.tBodies[0].deleteRow(M)};Graph.prototype.insertColumn=function(x,M){var Q=x.tHead;if(null!=+Q)for(var V=0;V<Q.rows.length;V++){var ia=document.createElement("th");Q.rows[V].appendChild(ia);mxUtils.br(ia)}x=x.tBodies[0];for(Q=0;Q<x.rows.length;Q++)V=x.rows[Q].insertCell(M),mxUtils.br(V);return x.rows[0].cells[0<=M?M:x.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(x,M){if(0<=M){x=x.tBodies[0].rows;for(var Q=0;Q<x.length;Q++)x[Q].cells.length>M&&x[Q].deleteCell(M)}};Graph.prototype.pasteHtmlAtCaret=function(x){if(window.getSelection){var M=window.getSelection();if(M.getRangeAt&&+M.rangeCount){M=M.getRangeAt(0);M.deleteContents();var Q=document.createElement("div");Q.innerHTML=x;x=document.createDocumentFragment();for(var V;V=Q.firstChild;)lastNode=x.appendChild(V);M.insertNode(x)}}else(M=document.selection)&&"Control"!=M.type&&M.createRange().pasteHTML(x)};Graph.prototype.createLinkForHint=function(x,M,Q){function V(ka,oa){ka.length>oa&&(ka=ka.substring(0,Math.round(oa/2))+"..."+ka.substring(ka.length-Math.round(oa/4)));return ka}x=null!=x?x:"javascript:void(0);";if(null==+M||0==M.length)M=this.isCustomLink(x)?this.getLinkTitle(x):x;var ia=document.createElement("a");ia.setAttribute("rel",this.linkRelation);ia.setAttribute("href",this.getAbsoluteUrl(x));ia.setAttribute("title",V(this.isCustomLink(x)?this.getLinkTitle(x):x,80));null!=this.linkTarget&&ia.setAttribute("target",this.linkTarget);mxUtils.write(ia,V(M,40));this.isCustomLink(x)&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ka){this.customLinkClicked(x,Q);mxEvent.consume(ka)}));return ia};Graph.prototype.initTouch=+function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ka,oa){this.popupMenuHandler.hideMenu()});var x=this.updateMouseEvent;this.updateMouseEvent=function(ka){ka=x.apply(this,arguments);if(mxEvent.isTouchEvent(ka.getEvent())&&null==ka.getState()){var oa=this.getCellAt(ka.graphX,ka.graphY);null!=oa&&this.isSwimlane(oa)&&this.hitsSwimlaneContent(oa,ka.graphX,ka.graphY)||(ka.state=this.view.getState(oa),+null!=ka.state&&null!=ka.state.shape&&(this.container.style.cursor=ka.state.shape.node.style.cursor))}null==ka.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ka};var M=!1,Q=!1,V=!1,ia=this.fireMouseEvent;this.fireMouseEvent=function(ka,oa,xa){ka==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),M=this.isCellSelected(oa.getCell()),Q=this.isSelectionEmpty(),V=this.popupMenuHandler.isMenuShowing());ia.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,+function(ka,oa){if(null!=this.freehand&&!this.freehand.isDrawing()){var xa=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!V&&!xa&&(Q&&null==oa.getCell()&&this.isSelectionEmpty()||M&&this.isCellSelected(oa.getCell())));xa=!M||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ua=mxUtils.getScrollOrigin();+this.popupMenuHandler.popup(oa.getX()+ua.x+1,oa.getY()+ua.y+1,ta,oa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ka,oa,xa])}})};mxCellEditor.prototype.isContentEditing=function(){var x=this.graph.view.getState(this.editingCell);return null!=x&&1==x.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var x=+"";window.getSelection?x=window.getSelection():document.getSelection?x=document.getSelection():document.selection&&(x=document.selection.createRange().text);return""!=x};mxCellEditor.prototype.insertTab=function(x){var M=this.textarea.ownerDocument.defaultView.getSelection(),Q=M.getRangeAt(0);x=Graph.createTabNode(x);Q.insertNode(x);Q.setStartAfter(x);Q.setEndAfter(x);M.removeAllRanges();M.addRange(Q)};mxCellEditor.prototype.alignText=function(x,M){var Q=this.graph.getView().getState(this.editingCell);+if(null!=Q){Q=mxUtils.getValue(Q.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var V=null!=Q&&"vertical-"==Q.substring(0,9),ia=null!=M&&mxEvent.isShiftDown(M);if(ia||null!=window.getSelection&&null!=window.getSelection().containsNode){var ka=!0;this.graph.processElements(this.textarea,function(oa){ia||V||window.getSelection().containsNode(oa,!0)?(oa.removeAttribute("align"),oa.style.textAlign=null):ka=!1});(ka||V)&&this.graph.cellEditor.setAlign(x)}V||document.execCommand("justify"++x.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var x=window.getSelection();if(x.getRangeAt&&x.rangeCount){for(var M=[],Q=0,V=x.rangeCount;Q<V;++Q)M.push(x.getRangeAt(Q));return M}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(x){try{if(x)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var M=0,Q=x.length;M<+Q;++M)sel.addRange(x[M])}else document.selection&&x.select&&x.select()}catch(V){}};var z=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(x){null!=x.text&&(x.text.replaceLinefeeds="0"!=mxUtils.getValue(x.style,"nl2Br","1"));z.apply(this,arguments)};var C=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(x,M){this.isKeepFocusEvent(x)||!mxEvent.isAltDown(x.getEvent())?C.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=+function(x){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var F=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(x,M){x=this.graph.getStartEditingCell(x,M);F.apply(this,arguments);var Q=this.graph.view.getState(x);this.textarea.className=null!=Q&&1==Q.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?+"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(x)};mxCellEditor.prototype.toggleViewMode=function(){var x=this.graph.view.getState(this.editingCell);if(null!=x){var M=null!=x&&"0"!=mxUtils.getValue(x.style,"nl2Br","1"),Q=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,+xa.length-1));xa=Graph.sanitizeHtml(M?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(x.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);M=mxUtils.getValue(x.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var V=mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ia=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ka=(mxUtils.getValue(x.style,+mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,oa=[];(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&oa.push("underline");(mxUtils.getValue(x.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=ka?"italic":"";this.textarea.style.fontFamily=M;this.textarea.style.textAlign=V;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,+"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=Graph.sanitizeHtml(M?xa.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):xa,!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!=xa&&(this.textarea.innerHTML=xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=Q;this.resize()}};var I=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(t,N){if(null!=this.textarea)if(t=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=t){var Q=t.view.scale;this.bounds=mxRectangle.fromRectangle(t);if(0==this.bounds.width&&-0==this.bounds.height){this.bounds.width=160*Q;this.bounds.height=60*Q;var X=null!=t.text?t.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(t.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/Q)+"px";this.textarea.style.height=Math.round((this.bounds.height-+"2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=Q;this.resize()}};var N=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(x,M){if(null!=this.textarea)if(x=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=x){var Q=x.view.scale;this.bounds=mxRectangle.fromRectangle(x);if(0==this.bounds.width&&+0==this.bounds.height){this.bounds.width=160*Q;this.bounds.height=60*Q;var V=null!=x.text?x.text.margin:null;null==V&&(V=mxUtils.getAlignmentAsPoint(mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(x.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=V.x*this.bounds.width;this.bounds.y+=V.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/Q)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/Q)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/Q)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*Q);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/Q)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*-Q);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+Q+","+Q+")")}else this.textarea.style.height="",this.textarea.style.overflow="",I.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(t,N){if("0"==mxUtils.getValue(t.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);-var Q=this.graph.getEditingValue(t.cell,N);"1"==mxUtils.getValue(t.style,"nl2Br","1")&&(Q=Q.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(Q,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(t,N){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(t.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;-mxCellEditor.prototype.getCurrentValue=function(t){if("0"==mxUtils.getValue(t.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var N=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(t.style,"nl2Br","1")?(N=N.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<N.length&&("<br/>"==N.substring(N.length-5)||"<br>"==N.substring(N.length-4))&&(N=N.substring(0,N.lastIndexOf("<br"))+"<div><br/></div>")):-N=N.replace(/\r\n/g,"").replace(/\n/g,"");return N};var L=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(t){this.codeViewMode&&this.toggleViewMode();L.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(t){}};var K=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,N){this.graph.getModel().beginUpdate();try{K.apply(this,arguments),""==N&&this.graph.isCellDeletable(t.cell)&&-0==this.graph.model.getChildCount(t.cell)&&this.graph.isTransparentState(t)&&this.graph.removeCells([t.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(t){t=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);t==mxConstants.NONE&&(t=null);return t};mxCellEditor.prototype.getBorderColor=function(t){t=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);t==mxConstants.NONE&&(t=null);return t};mxCellEditor.prototype.getMinimumSize=-function(t){var N=this.graph.getView().scale;return new mxRectangle(0,0,null==t.text?30:t.text.size*N+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(t,N){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(N.getEvent)};mxGraphView.prototype.formatUnitText=function(t){return t?e(t,this.unit):t};mxGraphHandler.prototype.updateHint=function(t){if(null!=this.pBounds&&(null!=this.shape||-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var N=this.graph.view.translate,Q=this.graph.view.scale;t=this.roundLength((this.bounds.x+this.currentDx)/Q-N.x);N=this.roundLength((this.bounds.y+this.currentDy)/Q-N.y);Q=this.graph.view.unit;this.hint.innerHTML=e(t,Q)+", "+e(N,Q);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 O=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(t,N){O.apply(this,arguments);var Q=this.graph.getCellStyle(t);if(null==Q.childLayout){var X=this.graph.model.getParent(t),ia=null!=X?this.graph.getCellGeometry(X):null;if(null!=ia&&(Q=this.graph.getCellStyle(X),"stackLayout"==Q.childLayout)){var ka=-parseFloat(mxUtils.getValue(Q,"stackBorder",mxStackLayout.prototype.border));Q="1"==mxUtils.getValue(Q,"horizontalStack","1");var pa=this.graph.getActualStartSize(X);ia=ia.clone();Q?ia.height=N.height+pa.y+pa.height+2*ka:ia.width=N.width+pa.x+pa.width+2*ka;this.graph.model.setGeometry(X,ia)}}};var da=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function t(xa){Q.get(xa)||(Q.put(xa,!0),ia.push(xa))}for(var N=da.apply(this,-arguments),Q=new mxDictionary,X=this.graph.model,ia=[],ka=0;ka<N.length;ka++){var pa=N[ka];this.graph.isTableCell(pa)?t(X.getParent(X.getParent(pa))):this.graph.isTableRow(pa)&&t(X.getParent(pa));t(pa)}return ia};var ea=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(t){return ea.apply(this,arguments)&&!mxEvent.isControlDown(t.getEvent())&&!mxEvent.isShiftDown(t.getEvent())};var ca=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=-function(){return ca.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var V=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(t){var N=V.apply(this,arguments);N.stroke="#C0C0C0";N.strokewidth=1;return N};var ma=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=-function(t){var N=ma.apply(this,arguments);N.stroke="#C0C0C0";N.strokewidth=1;return N};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var t=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+t.x/2,this.bounds.y+this.rotationHandleVSpacing-t.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(t,N){return this.graph.isRecursiveVertexResize(t)&&!mxEvent.isAltDown(N.getEvent())};-mxVertexHandler.prototype.isCenteredEvent=function(t,N){return mxEvent.isControlDown(N.getEvent())||mxEvent.isMetaDown(N.getEvent())};var la=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return la.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?-this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var Y=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var fa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(t){return t.tableHandle||fa.apply(this,arguments)&&-(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var t=0;this.graph.isTableRow(this.state.cell)?t=1:this.graph.isTableCell(this.state.cell)&&(t=2);return t};var Z=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Z.apply(this,arguments).grow(-this.getSelectionBorderInset())};var l=null,u=mxVertexHandler.prototype.createCustomHandles;-mxVertexHandler.prototype.createCustomHandles=function(){null==l&&(l=mxCellRenderer.defaultShapes.tableLine);var t=u.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var N=function(ab,Ra,Oa){for(var kb=[],cb=0;cb<ab.length;cb++){var $a=ab[cb];kb.push(null==$a?null:new mxPoint((ta+$a.x+Ra)*ka,(va+$a.y+Oa)*ka))}return kb},Q=this,X=this.graph,ia=X.model,ka=X.view.scale,pa=this.state,xa=this.selectionBorder,ta=this.state.origin.x+X.view.translate.x,-va=this.state.origin.y+X.view.translate.y;null==t&&(t=[]);var Da=X.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Da.length){var Na=ia.getChildCells(Da[0].cell,!0),Ya=X.getTableLines(this.state.cell,!1,!0),Za=X.getTableLines(this.state.cell,!0,!1);for(ia=0;ia<Da.length;ia++)mxUtils.bind(this,function(ab){var Ra=Da[ab],Oa=null;if(X.isCellMovable(Ra.cell)){Oa=ab<Da.length-1?Da[ab+1]:null;Oa=null!=Oa?X.getCellGeometry(Oa.cell):null;var kb=null!=Oa&&null!=Oa.alternateBounds?Oa.alternateBounds:-Oa;Oa=null!=Za[ab]?new l(Za[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Oa.isDashed=xa.isDashed;Oa.svgStrokeTolerance++;Oa=new mxHandle(Ra,"row-resize",null,Oa);Oa.tableHandle=!0;var cb=0;Oa.shape.node.parentNode.insertBefore(Oa.shape.node,Oa.shape.node.parentNode.firstChild);Oa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==l)this.shape.line=N(Za[ab],0,cb),this.shape.updateBoundsFromLine();else{var fb=-X.getActualStartSize(pa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+cb*ka;this.shape.bounds.x=pa.x+(ab==Da.length-1?0:fb.x*ka);this.shape.bounds.width=pa.width-(ab==Da.length-1?0:fb.width+fb.x+ka)}this.shape.redraw()}};var $a=!1;Oa.setPosition=function(fb,jb,sb){cb=Math.max(Graph.minTableRowHeight-fb.height,jb.y-fb.y-fb.height);$a=mxEvent.isShiftDown(sb.getEvent());null!=kb&&$a&&(cb=Math.min(cb,kb.height-Graph.minTableRowHeight))};Oa.execute=function(fb){if(0!=-cb)X.setTableRowHeight(this.state.cell,cb,!$a);else if(!Q.blockDelayedSelection){var jb=X.getCellAt(fb.getGraphX(),fb.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(jb,fb)}cb=0};Oa.reset=function(){cb=0}}t.push(Oa)})(ia);for(ia=0;ia<Na.length;ia++)mxUtils.bind(this,function(ab){var Ra=X.view.getState(Na[ab]),Oa=X.getCellGeometry(Na[ab]),kb=null!=Oa.alternateBounds?Oa.alternateBounds:Oa;null==Ra&&(Ra=new mxCellState(X.view,Na[ab],X.getCellStyle(Na[ab])),Ra.x=pa.x+Oa.x*ka,Ra.y=pa.y+Oa.y*ka,-Ra.width=kb.width*ka,Ra.height=kb.height*ka,Ra.updateCachedBounds());Oa=ab<Na.length-1?Na[ab+1]:null;Oa=null!=Oa?X.getCellGeometry(Oa):null;var cb=null!=Oa&&null!=Oa.alternateBounds?Oa.alternateBounds:Oa;Oa=null!=Ya[ab]?new l(Ya[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Oa.isDashed=xa.isDashed;Oa.svgStrokeTolerance++;Ra=new mxHandle(Ra,"col-resize",null,Oa);Ra.tableHandle=!0;var $a=0;Ra.shape.node.parentNode.insertBefore(Ra.shape.node,Ra.shape.node.parentNode.firstChild);-Ra.redraw=function(){if(null!=this.shape){this.shape.stroke=0==$a?mxConstants.NONE:xa.stroke;if(this.shape.constructor==l)this.shape.line=N(Ya[ab],$a,0),this.shape.updateBoundsFromLine();else{var jb=X.getActualStartSize(pa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(kb.width+$a)*ka;this.shape.bounds.y=pa.y+(ab==Na.length-1?0:jb.y*ka);this.shape.bounds.height=pa.height-(ab==Na.length-1?0:(jb.height+jb.y)*ka)}this.shape.redraw()}};var fb=!1;Ra.setPosition=function(jb,sb,Ab){$a=-Math.max(Graph.minTableColumnWidth-kb.width,sb.x-jb.x-kb.width);fb=mxEvent.isShiftDown(Ab.getEvent());null==cb||fb||($a=Math.min($a,cb.width-Graph.minTableColumnWidth))};Ra.execute=function(jb){if(0!=$a)X.setTableColumnWidth(this.state.cell,$a,fb);else if(!Q.blockDelayedSelection){var sb=X.getCellAt(jb.getGraphX(),jb.getGraphY())||pa.cell;X.graphHandler.selectCellForEvent(sb,jb)}$a=0};Ra.positionChanged=function(){};Ra.reset=function(){$a=0};t.push(Ra)})(ia)}}return null!=t?t.reverse():null};var H=-mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){H.apply(this,arguments);if(null!=this.moveHandles)for(var N=0;N<this.moveHandles.length;N++)null!=this.moveHandles[N]&&(this.moveHandles[N].node.style.visibility=t?"":"hidden");if(null!=this.cornerHandles)for(N=0;N<this.cornerHandles.length;N++)this.cornerHandles[N].node.style.visibility=t?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&-this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var t=this.isMoveHandlesVisible();t&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():t||null==this.moveHandles||this.destroyMoveHandles();if(t&&null==this.moveHandles){for(t=0;t<this.moveHandles.length;t++)null!=this.moveHandles[t]&&this.moveHandles[t].parentNode.removeChild(this.moveHandles[t]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var t=-this.graph,N=t.model,Q=[],X=0;X<N.getChildCount(this.state.cell);X++)mxUtils.bind(this,function(ia){if(null!=ia&&N.isVertex(ia.cell)&&t.isCellMovable(ia.cell)){var ka=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ia;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,-mxUtils.bind(this,function(pa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(pa)&&this.graph.isCellSelected(ia.cell)||this.graph.selectCellForEvent(ia.cell,pa);mxEvent.isPopupTrigger(pa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(pa),mxEvent.getClientY(pa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(pa),this.graph.isMouseDown=!0);mxEvent.consume(pa)}),-null,mxUtils.bind(this,function(pa){mxEvent.isPopupTrigger(pa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(pa),mxEvent.getClientY(pa),ia.cell,pa),mxEvent.consume(pa))}));Q.push(ka)}else Q.push(null)})(this.graph.view.getState(N.getChildAt(this.state.cell,X)));return Q};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var t=0;t<this.moveHandles.length;t++)null!=this.moveHandles[t]&&this.moveHandles[t].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=-function(){if(null!=this.cornerHandles){for(var t=0;t<this.cornerHandles.length;t++)null!=this.cornerHandles[t]&&null!=this.cornerHandles[t].node&&null!=this.cornerHandles[t].node.parentNode&&this.cornerHandles[t].node.parentNode.removeChild(this.cornerHandles[t].node);this.cornerHandles=null}};var U=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){U.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();-else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var t=0;4>t;t++){var N=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);N.dialect=mxConstants.DIALECT_SVG;N.init(this.graph.view.getOverlayPane());this.cornerHandles.push(N)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();-t=this.graph.getLinkForCell(this.state.cell);N=this.graph.getLinksForState(this.state);this.updateLinkHint(t,N)};var J=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var t=new mxPoint(0,0),N=this.tolerance,Q=this.state.style.shape;null==mxCellRenderer.defaultShapes[Q]&&mxStencilRegistry.getStencil(Q);Q=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!Q&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=-this.customHandles[X]&&null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var ia=this.customHandles[X].shape.bounds,ka=ia.getCenterX(),pa=ia.getCenterY();if(Math.abs(this.state.x-ka)<ia.width/2||Math.abs(this.state.y-pa)<ia.height/2||Math.abs(this.state.x+this.state.width-ka)<ia.width/2||Math.abs(this.state.y+this.state.height-pa)<ia.height/2){Q=!0;break}}Q&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(N/=2,this.graph.isTable(this.state.cell)&&(N+=7),t.x=-this.sizers[0].bounds.width+N,t.y=this.sizers[0].bounds.height+N):t=J.apply(this,arguments);return t};mxVertexHandler.prototype.updateHint=function(t){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{t=this.state.view.scale;var N=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/t),N)+" x "+e(this.roundLength(this.bounds.height/-t),N)}t=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==t&&(t=this.bounds);this.hint.style.left=t.x+Math.round((t.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=t.y+t.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=-"")};var W=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){W.apply(this,arguments);var t=this.graph.getLinkForCell(this.state.cell),N=this.graph.getLinksForState(this.state);this.updateLinkHint(t,N)};var aa=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(t,N){aa.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};-var ba=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(t,N){ba.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(t,N,Q){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var X=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(N.x/ia-X.x);X=this.roundLength(N.y/ia-X.y);var pa=-this.graph.view.unit;this.hint.innerHTML=e(ka,pa)+", "+e(X,pa);this.hint.style.visibility="visible";null!=Q&&(Q.view.updateEdgeBounds(Q),this.hint.innerHTML+=" ("+(pa==mxConstants.POINTS?Math.round(Q.length/ia):e(Q.length/ia,pa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Q=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*Q.x)+"%, "+Math.round(100*-Q.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(t.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(t.getGraphY(),N.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');+Q);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+Q+","+Q+")")}else this.textarea.style.height="",this.textarea.style.overflow="",N.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,M){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);+var Q=this.graph.getEditingValue(x.cell,M);"1"==mxUtils.getValue(x.style,"nl2Br","1")&&(Q=Q.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(Q,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(x,M){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(x.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;+mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var M=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(x.style,"nl2Br","1")?(M=M.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<M.length&&("<br/>"==M.substring(M.length-5)||"<br>"==M.substring(M.length-4))&&(M=M.substring(0,M.lastIndexOf("<br"))+"<div><br/></div>")):+M=M.replace(/\r\n/g,"").replace(/\n/g,"");return M};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};var I=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,M){this.graph.getModel().beginUpdate();try{I.apply(this,arguments),""==M&&this.graph.isCellDeletable(x.cell)&&+0==this.graph.model.getChildCount(x.cell)&&this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getBorderColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getMinimumSize=+function(x){var M=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*M+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,M){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(M.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?e(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||+this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var M=this.graph.view.translate,Q=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/Q-M.x);M=this.roundLength((this.bounds.y+this.currentDy)/Q-M.y);Q=this.graph.view.unit;this.hint.innerHTML=e(x,Q)+", "+e(M,Q);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 ca=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,M){ca.apply(this,arguments);var Q=this.graph.getCellStyle(x);if(null==Q.childLayout){var V=this.graph.model.getParent(x),ia=null!=V?this.graph.getCellGeometry(V):null;if(null!=ia&&(Q=this.graph.getCellStyle(V),"stackLayout"==Q.childLayout)){var ka=+parseFloat(mxUtils.getValue(Q,"stackBorder",mxStackLayout.prototype.border));Q="1"==mxUtils.getValue(Q,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);ia=ia.clone();Q?ia.height=M.height+oa.y+oa.height+2*ka:ia.width=M.width+oa.x+oa.width+2*ka;this.graph.model.setGeometry(V,ia)}}};var da=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(xa){Q.get(xa)||(Q.put(xa,!0),ia.push(xa))}for(var M=da.apply(this,+arguments),Q=new mxDictionary,V=this.graph.model,ia=[],ka=0;ka<M.length;ka++){var oa=M[ka];this.graph.isTableCell(oa)?x(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&x(V.getParent(oa));x(oa)}return ia};var ea=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(x){return ea.apply(this,arguments)&&!mxEvent.isControlDown(x.getEvent())&&!mxEvent.isShiftDown(x.getEvent())};var X=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=+function(){return X.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var ba=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var M=ba.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=+function(x){var M=ha.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,M){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(M.getEvent())};+mxVertexHandler.prototype.isCenteredEvent=function(x,M){return mxEvent.isControlDown(M.getEvent())||mxEvent.isMetaDown(M.getEvent())};var ma=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ma.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?+this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var Y=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var la=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||la.apply(this,arguments)&&+(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var x=0;this.graph.isTableRow(this.state.cell)?x=1:this.graph.isTableCell(this.state.cell)&&(x=2);return x};var Z=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Z.apply(this,arguments).grow(-this.getSelectionBorderInset())};var k=null,A=mxVertexHandler.prototype.createCustomHandles;+mxVertexHandler.prototype.createCustomHandles=function(){null==k&&(k=mxCellRenderer.defaultShapes.tableLine);var x=A.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var M=function(ab,Oa,Qa){for(var kb=[],cb=0;cb<ab.length;cb++){var Ya=ab[cb];kb.push(null==Ya?null:new mxPoint((ta+Ya.x+Oa)*ka,(ua+Ya.y+Qa)*ka))}return kb},Q=this,V=this.graph,ia=V.model,ka=V.view.scale,oa=this.state,xa=this.selectionBorder,ta=this.state.origin.x+V.view.translate.x,+ua=this.state.origin.y+V.view.translate.y;null==x&&(x=[]);var Fa=V.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Fa.length){var Na=ia.getChildCells(Fa[0].cell,!0),Wa=V.getTableLines(this.state.cell,!1,!0),Xa=V.getTableLines(this.state.cell,!0,!1);for(ia=0;ia<Fa.length;ia++)mxUtils.bind(this,function(ab){var Oa=Fa[ab],Qa=null;if(V.isCellMovable(Oa.cell)){Qa=ab<Fa.length-1?Fa[ab+1]:null;Qa=null!=Qa?V.getCellGeometry(Qa.cell):null;var kb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:+Qa;Qa=null!=Xa[ab]?new k(Xa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Qa.isDashed=xa.isDashed;Qa.svgStrokeTolerance++;Qa=new mxHandle(Oa,"row-resize",null,Qa);Qa.tableHandle=!0;var cb=0;Qa.shape.node.parentNode.insertBefore(Qa.shape.node,Qa.shape.node.parentNode.firstChild);Qa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:xa.stroke;if(this.shape.constructor==k)this.shape.line=M(Xa[ab],0,cb),this.shape.updateBoundsFromLine();else{var gb=+V.getActualStartSize(oa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+cb*ka;this.shape.bounds.x=oa.x+(ab==Fa.length-1?0:gb.x*ka);this.shape.bounds.width=oa.width-(ab==Fa.length-1?0:gb.width+gb.x+ka)}this.shape.redraw()}};var Ya=!1;Qa.setPosition=function(gb,hb,vb){cb=Math.max(Graph.minTableRowHeight-gb.height,hb.y-gb.y-gb.height);Ya=mxEvent.isShiftDown(vb.getEvent());null!=kb&&Ya&&(cb=Math.min(cb,kb.height-Graph.minTableRowHeight))};Qa.execute=function(gb){if(0!=+cb)V.setTableRowHeight(this.state.cell,cb,!Ya);else if(!Q.blockDelayedSelection){var hb=V.getCellAt(gb.getGraphX(),gb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(hb,gb)}cb=0};Qa.reset=function(){cb=0}}x.push(Qa)})(ia);for(ia=0;ia<Na.length;ia++)mxUtils.bind(this,function(ab){var Oa=V.view.getState(Na[ab]),Qa=V.getCellGeometry(Na[ab]),kb=null!=Qa.alternateBounds?Qa.alternateBounds:Qa;null==Oa&&(Oa=new mxCellState(V.view,Na[ab],V.getCellStyle(Na[ab])),Oa.x=oa.x+Qa.x*ka,Oa.y=oa.y+Qa.y*ka,+Oa.width=kb.width*ka,Oa.height=kb.height*ka,Oa.updateCachedBounds());Qa=ab<Na.length-1?Na[ab+1]:null;Qa=null!=Qa?V.getCellGeometry(Qa):null;var cb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:Qa;Qa=null!=Wa[ab]?new k(Wa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Qa.isDashed=xa.isDashed;Qa.svgStrokeTolerance++;Oa=new mxHandle(Oa,"col-resize",null,Qa);Oa.tableHandle=!0;var Ya=0;Oa.shape.node.parentNode.insertBefore(Oa.shape.node,Oa.shape.node.parentNode.firstChild);+Oa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ya?mxConstants.NONE:xa.stroke;if(this.shape.constructor==k)this.shape.line=M(Wa[ab],Ya,0),this.shape.updateBoundsFromLine();else{var hb=V.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(kb.width+Ya)*ka;this.shape.bounds.y=oa.y+(ab==Na.length-1?0:hb.y*ka);this.shape.bounds.height=oa.height-(ab==Na.length-1?0:(hb.height+hb.y)*ka)}this.shape.redraw()}};var gb=!1;Oa.setPosition=function(hb,vb,mb){Ya=+Math.max(Graph.minTableColumnWidth-kb.width,vb.x-hb.x-kb.width);gb=mxEvent.isShiftDown(mb.getEvent());null==cb||gb||(Ya=Math.min(Ya,cb.width-Graph.minTableColumnWidth))};Oa.execute=function(hb){if(0!=Ya)V.setTableColumnWidth(this.state.cell,Ya,gb);else if(!Q.blockDelayedSelection){var vb=V.getCellAt(hb.getGraphX(),hb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(vb,hb)}Ya=0};Oa.positionChanged=function(){};Oa.reset=function(){Ya=0};x.push(Oa)})(ia)}}return null!=x?x.reverse():null};var J=+mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(x){J.apply(this,arguments);if(null!=this.moveHandles)for(var M=0;M<this.moveHandles.length;M++)null!=this.moveHandles[M]&&(this.moveHandles[M].node.style.visibility=x?"":"hidden");if(null!=this.cornerHandles)for(M=0;M<this.cornerHandles.length;M++)this.cornerHandles[M].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&+this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var x=this.isMoveHandlesVisible();x&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():x||null==this.moveHandles||this.destroyMoveHandles();if(x&&null==this.moveHandles){for(x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].parentNode.removeChild(this.moveHandles[x]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var x=+this.graph,M=x.model,Q=[],V=0;V<M.getChildCount(this.state.cell);V++)mxUtils.bind(this,function(ia){if(null!=ia&&M.isVertex(ia.cell)&&x.isCellMovable(ia.cell)){var ka=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ia;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,+mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(ia.cell)||this.graph.selectCellForEvent(ia.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),+null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),ia.cell,oa),mxEvent.consume(oa))}));Q.push(ka)}else Q.push(null)})(this.graph.view.getState(M.getChildAt(this.state.cell,V)));return Q};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=+function(){if(null!=this.cornerHandles){for(var x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}};var U=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){U.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();+else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var x=0;4>x;x++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();+x=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var P=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),M=this.tolerance,Q=this.state.style.shape;null==mxCellRenderer.defaultShapes[Q]&&mxStencilRegistry.getStencil(Q);Q=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!Q&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=+this.customHandles[V]&&null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var ia=this.customHandles[V].shape.bounds,ka=ia.getCenterX(),oa=ia.getCenterY();if(Math.abs(this.state.x-ka)<ia.width/2||Math.abs(this.state.y-oa)<ia.height/2||Math.abs(this.state.x+this.state.width-ka)<ia.width/2||Math.abs(this.state.y+this.state.height-oa)<ia.height/2){Q=!0;break}}Q&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(M/=2,this.graph.isTable(this.state.cell)&&(M+=7),x.x=+this.sizers[0].bounds.width+M,x.y=this.sizers[0].bounds.height+M):x=P.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{x=this.state.view.scale;var M=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/x),M)+" x "+e(this.roundLength(this.bounds.height/+x),M)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=x.y+x.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=+"")};var T=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){T.apply(this,arguments);var x=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var W=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,M){W.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};+var aa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,M){aa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(x,M,Q){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var V=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(M.x/ia-V.x);V=this.roundLength(M.y/ia-V.y);var oa=+this.graph.view.unit;this.hint.innerHTML=e(ka,oa)+", "+e(V,oa);this.hint.style.visibility="visible";null!=Q&&(Q.view.updateEdgeBounds(Q),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(Q.length/ia):e(Q.length/ia,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Q=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*Q.x)+"%, "+Math.round(100*+Q.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),M.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+@@ -2705,407 +2704,407 @@ HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fHoverIcons.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=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxGraphHandler.prototype.previewColor="light-dark(#000000, #cccccc)";mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=-function(t){return!mxEvent.isShiftDown(t.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(t){return!mxEvent.isShiftDown(t.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(t){return mxEvent.isMouseEvent(t.getEvent())?-4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(t){var N=t.getEvent();return null==t.getState()&&!mxEvent.isMouseEvent(N)||mxEvent.isPopupTrigger(N)&&(null==t.getState()||mxEvent.isControlDown(N)||mxEvent.isShiftDown(N))}}else mxPanningHandler.prototype.isPanningTrigger=function(t){var N=t.getEvent();return mxEvent.isLeftMouseButton(N)&&(this.useLeftButtonForPanning&&null==t.getState()||mxEvent.isControlDown(N)&&!mxEvent.isShiftDown(N))||this.usePopupTrigger&&mxEvent.isPopupTrigger(N)};-mxRubberband.prototype.isSpaceEvent=function(t){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(t.getEvent())||mxEvent.isMetaDown(t.getEvent()))&&mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(t,N){if(this.cancelled)this.cancelled=!1,N.consume();else{var Q=-null!=this.div&&"none"!=this.div.style.display,X=null,ia=null,ka=t=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ia=this.first.y,t=(this.currentX-X)/this.graph.view.scale,ka=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(N.getEvent())||(t=this.graph.snap(t),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(t)<this.graph.tolerance&&(t=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(Q){if(this.isSpaceEvent(N)){this.graph.model.beginUpdate();-try{var pa=this.graph.getCellsBeyond(X,ia,this.graph.getDefaultParent(),!0,!0);for(Q=0;Q<pa.length;Q++)if(this.graph.isCellMovable(pa[Q])){var xa=this.graph.view.getState(pa[Q]),ta=this.graph.getCellGeometry(pa[Q]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(t,ka),this.graph.model.setGeometry(pa[Q],ta))}}finally{this.graph.model.endUpdate()}}else pa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(pa,N.getEvent());N.consume()}}};mxRubberband.prototype.mouseMove=function(t,-N){if(!N.isConsumed()&&null!=this.first){var Q=mxUtils.getScrollOrigin(this.graph.container);t=mxUtils.getOffset(this.graph.container);Q.x-=t.x;Q.y-=t.y;t=N.getX()+Q.x;Q=N.getY()+Q.y;var X=this.first.x-t,ia=this.first.y-Q,ka=this.graph.tolerance;if(null!=this.div||Math.abs(X)>ka||Math.abs(ia)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(t,Q),this.isSpaceEvent(N)?(t=this.x+this.width,Q=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(N.getEvent())||-(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=t-this.width),this.y<this.first.y&&(this.y=Q-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=+function(x){return!mxEvent.isShiftDown(x.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(x){return!mxEvent.isShiftDown(x.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(x){return mxEvent.isMouseEvent(x.getEvent())?+4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(x){var M=x.getEvent();return null==x.getState()&&!mxEvent.isMouseEvent(M)||mxEvent.isPopupTrigger(M)&&(null==x.getState()||mxEvent.isControlDown(M)||mxEvent.isShiftDown(M))}}else mxPanningHandler.prototype.isPanningTrigger=function(x){var M=x.getEvent();return mxEvent.isLeftMouseButton(M)&&(this.useLeftButtonForPanning&&null==x.getState()||mxEvent.isControlDown(M)&&!mxEvent.isShiftDown(M))||this.usePopupTrigger&&mxEvent.isPopupTrigger(M)};+mxRubberband.prototype.isSpaceEvent=function(x){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(x.getEvent())||mxEvent.isMetaDown(x.getEvent()))&&mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(x,M){if(this.cancelled)this.cancelled=!1,M.consume();else{var Q=+null!=this.div&&"none"!=this.div.style.display,V=null,ia=null,ka=x=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(V=this.first.x,ia=this.first.y,x=(this.currentX-V)/this.graph.view.scale,ka=(this.currentY-ia)/this.graph.view.scale,mxEvent.isAltDown(M.getEvent())||(x=this.graph.snap(x),ka=this.graph.snap(ka),this.graph.isGridEnabled()||(Math.abs(x)<this.graph.tolerance&&(x=0),Math.abs(ka)<this.graph.tolerance&&(ka=0))));this.reset();if(Q){if(this.isSpaceEvent(M)){this.graph.model.beginUpdate();+try{var oa=this.graph.getCellsBeyond(V,ia,this.graph.getDefaultParent(),!0,!0);for(Q=0;Q<oa.length;Q++)if(this.graph.isCellMovable(oa[Q])){var xa=this.graph.view.getState(oa[Q]),ta=this.graph.getCellGeometry(oa[Q]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(x,ka),this.graph.model.setGeometry(oa[Q],ta))}}finally{this.graph.model.endUpdate()}}else oa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(oa,M.getEvent());M.consume()}}};mxRubberband.prototype.mouseMove=function(x,+M){if(!M.isConsumed()&&null!=this.first){var Q=mxUtils.getScrollOrigin(this.graph.container);x=mxUtils.getOffset(this.graph.container);Q.x-=x.x;Q.y-=x.y;x=M.getX()+Q.x;Q=M.getY()+Q.y;var V=this.first.x-x,ia=this.first.y-Q,ka=this.graph.tolerance;if(null!=this.div||Math.abs(V)>ka||Math.abs(ia)>ka)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(x,Q),this.isSpaceEvent(M)?(x=this.x+this.width,Q=this.y+this.height,V=this.graph.view.scale,mxEvent.isAltDown(M.getEvent())||+(this.width=this.graph.snap(this.width/V)*V,this.height=this.graph.snap(this.height/V)*V,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=x-this.width),this.y<this.first.y&&(this.y=Q-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):-(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),N.consume()}};var ja=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ja.apply(this,arguments)};var oa=(new Date).getTime(),qa=0,ra=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=-function(t,N,Q,X){ra.apply(this,arguments);Q!=this.currentTerminalState?(oa=(new Date).getTime(),qa=0):qa=(new Date).getTime()-oa;this.currentTerminalState=Q};var ua=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(t){return mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())?!1:null!=this.currentTerminalState&&t.getState()==this.currentTerminalState&&2E3<qa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,-"outlineConnect","1"))&&ua.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(t,N,Q){N=null!=t&&0==t;var X=this.state.getVisibleTerminalState(N);t=null!=t&&null!=this.state.absolutePoints&&(0==t||t>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==t)?this.graph.getConnectionConstraint(this.state,X,N):null;Q=null!=(null!=t?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(N),t):null)?Q?this.endFixedHandleImage:this.fixedHandleImage:-null!=t&&null!=X?Q?this.endTerminalHandleImage:this.terminalHandleImage:Q?this.endHandleImage:this.handleImage;if(null!=Q)return Q=new mxImageShape(new mxRectangle(0,0,Q.width,Q.height),Q.src),Q.preserveImageAspect=!1,Q;Q=mxConstants.HANDLE_SIZE;this.preferHtml&&--Q;return new mxRectangleShape(new mxRectangle(0,0,Q,Q),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var za=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(t,N,Q,X){X=N==mxEvent.ROTATION_HANDLE?-HoverIcons.prototype.rotationHandle:N==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:X;return za.apply(this,arguments)};var Ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var N=this.graph.getModel(),Q=N.getParent(t[0]),X=this.graph.getCellGeometry(t[0]);if(N.isEdge(Q)&&null!=X&&X.relative&&(N=this.graph.view.getState(t[0]),null!=N&&2>N.width&&2>N.height&&null!=N.text&&null!=N.text.boundingBox))return mxRectangle.fromRectangle(N.text.boundingBox)}return Ba.apply(this,-arguments)};var Ca=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var t=Ca.apply(this,arguments),N=[],Q=0;Q<t.length;Q++)"1"!=mxUtils.getValue(t[Q].style,"part","0")&&N.push(t[Q]);return N};var La=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(t){var N=this.graph.getModel(),Q=N.getParent(t.cell),X=this.graph.getCellGeometry(t.cell);return N.isEdge(Q)&&null!=X&&X.relative&&2>t.width&&2>t.height&&null!=-t.text&&null!=t.text.boundingBox?(N=t.text.unrotatedBoundingBox||t.text.boundingBox,new mxRectangle(Math.round(N.x),Math.round(N.y),Math.round(N.width),Math.round(N.height))):La.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,N){var Q=this.graph.getModel(),X=Q.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(N)==mxEvent.ROTATION_HANDLE||!Q.isEdge(X)||null==ia||!ia.relative||null==this.state||-2<=this.state.width||2<=this.state.height)&&sa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var t=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),N=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&t==mxConstants.NONE&&N==mxConstants.NONE?(t=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,-t,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Aa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(t,N){Aa.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ea=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=-function(t,N){Ea.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(t,N){try{if(null==t&&(null==N||0==N.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),-this.linkHint=null);else if(null!=t||null!=N&&0<N.length){var Q=document.createElement("img");Q.className="geAdaptiveAsset";Q.setAttribute("src",Editor.editImage);Q.setAttribute("title",mxResources.get("editLink"));Q.setAttribute("width","14");Q.setAttribute("height","14");Q.style.paddingLeft="8px";Q.style.marginLeft="auto";Q.style.marginBottom="-1px";Q.style.cursor="pointer";var X=Q.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));-X.style.paddingLeft="4px";X.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=t){var ia=document.createElement("div");-ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(t,null,this.state.cell));this.linkHint.appendChild(ia);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ka=Q.cloneNode(!0);ia.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var pa=X.cloneNode(!0);ia.appendChild(pa);mxEvent.addListener(pa,-"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=N)for(ia=0;ia<N.length;ia++)mxUtils.bind(this,function(xa,ta){var va=document.createElement("div");va.style.display="flex";va.style.alignItems="center";va.style.marginTop=null!=t||0<ta?"6px":"0px";va.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Da=Q.cloneNode(!0);va.appendChild(Da);var Na=mxUtils.bind(this,function(Ya){var Za=-document.createElement("div");Za.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var ab=Za.getElementsByTagName("a")[ta];if(null!=ab){if(null==Ya||""==Ya){for(Ya=ab.cloneNode(!0).firstChild;null!=Ya;)ab.parentNode.insertBefore(Ya.cloneNode(!0),ab),Ya=Ya.nextSibling;ab.parentNode.removeChild(ab)}else ab.setAttribute("href",Ya);this.graph.labelChanged(this.state.cell,Za.innerHTML)}});mxEvent.addListener(Da,"click",mxUtils.bind(this,function(Ya){this.graph.showLinkDialog(xa.getAttribute("href")||-"",mxResources.get("ok"),Na);mxEvent.consume(Ya)}));Da=X.cloneNode(!0);va.appendChild(Da);mxEvent.addListener(Da,"click",mxUtils.bind(this,function(Ya){Na();mxEvent.consume(Ya)}));this.linkHint.appendChild(va)})(N[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ka=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var t=Ka.apply(this,-arguments);t.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return t};var Ma=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ma.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var ya=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var t=0;t<this.moveHandles.length;t++)null!=-this.moveHandles[t]&&(this.moveHandles[t].bounds.x=Math.round(this.moveHandles[t].rowState.x+this.moveHandles[t].rowState.width-this.moveHandles[t].bounds.width/2),this.moveHandles[t].bounds.y=Math.round(this.moveHandles[t].rowState.y+(this.moveHandles[t].rowState.height-this.moveHandles[t].bounds.height)/2),this.moveHandles[t].redraw());if(null!=this.cornerHandles){t=this.getSelectionBorderInset();var N=this.cornerHandles,Q=N[0].bounds.height/2;N[0].bounds.x=this.state.x-N[0].bounds.width/2+t;N[0].bounds.y=-this.state.y-Q+t;N[0].redraw();N[1].bounds.x=N[0].bounds.x+this.state.width-2*t;N[1].bounds.y=N[0].bounds.y;N[1].redraw();N[2].bounds.x=N[0].bounds.x;N[2].bounds.y=this.state.y+this.state.height-2*t;N[2].redraw();N[3].bounds.x=N[1].bounds.x;N[3].bounds.y=N[2].bounds.y;N[3].redraw();for(t=0;t<this.cornerHandles.length;t++)this.cornerHandles[t].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",-mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");ya.apply(this);null!=this.state&&null!=this.linkHint&&(t=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),N=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),Q=mxUtils.getBoundingBox(N,this.state.style[mxConstants.STYLE_ROTATION]||"0",t),t=null!=Q?mxUtils.getBoundingBox(this.state,-this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,N=null!=this.state.text?this.state.text.boundingBox:null,null==Q&&(Q=this.state),Q=Q.y+Q.height,null!=N&&(Q=Math.max(Q,N.y+N.height)),this.linkHint.style.left=t.x+t.width/2+"px",this.linkHint.style.top=Math.round(Q+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Wa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Wa.apply(this,arguments);-this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ia=mxEdgeHandler.prototype.redrawHandles;-mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ia.apply(this),null!=this.state&&null!=this.linkHint)){var t=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(t=new mxRectangle(t.x,t.y,t.width,t.height),t.add(this.state.text.bounds));this.linkHint.style.left=t.x+t.width/2+"px";this.linkHint.style.top=Math.round(t.y+t.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var Xa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=-function(){Xa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Pa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Pa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,n,y){mxShape.call(this);this.line=d;this.stroke=n;this.strokewidth=null!=y?y:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function v(){mxConnector.call(this)}function p(){mxCylinder.call(this)}function A(){mxActor.call(this)}function G(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function R(){mxShape.call(this)}-function T(){mxShape.call(this)}function c(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1}function f(){mxActor.call(this)}function k(){mxCylinder.call(this)}function B(){mxCylinder.call(this)}function z(){mxActor.call(this)}function C(){mxActor.call(this)}function I(){mxActor.call(this)}function L(){mxActor.call(this)}function K(){mxActor.call(this)}function O(){mxActor.call(this)}function da(){mxActor.call(this)}function ea(d,n){this.canvas=d;this.canvas.setLineJoin("round");+(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),M.consume()}};var ja=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ja.apply(this,arguments)};var pa=(new Date).getTime(),sa=0,qa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=+function(x,M,Q,V){qa.apply(this,arguments);Q!=this.currentTerminalState?(pa=(new Date).getTime(),sa=0):sa=(new Date).getTime()-pa;this.currentTerminalState=Q};var wa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(x){return mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())?!1:null!=this.currentTerminalState&&x.getState()==this.currentTerminalState&&2E3<sa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,+"outlineConnect","1"))&&wa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(x,M,Q){M=null!=x&&0==x;var V=this.state.getVisibleTerminalState(M);x=null!=x&&null!=this.state.absolutePoints&&(0==x||x>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==x)?this.graph.getConnectionConstraint(this.state,V,M):null;Q=null!=(null!=x?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(M),x):null)?Q?this.endFixedHandleImage:this.fixedHandleImage:+null!=x&&null!=V?Q?this.endTerminalHandleImage:this.terminalHandleImage:Q?this.endHandleImage:this.handleImage;if(null!=Q)return Q=new mxImageShape(new mxRectangle(0,0,Q.width,Q.height),Q.src),Q.preserveImageAspect=!1,Q;Q=mxConstants.HANDLE_SIZE;this.preferHtml&&--Q;return new mxRectangleShape(new mxRectangle(0,0,Q,Q),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Ba=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(x,M,Q,V){V=M==mxEvent.ROTATION_HANDLE?+HoverIcons.prototype.rotationHandle:M==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:V;return Ba.apply(this,arguments)};var za=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(x){if(null!=x&&1==x.length){var M=this.graph.getModel(),Q=M.getParent(x[0]),V=this.graph.getCellGeometry(x[0]);if(M.isEdge(Q)&&null!=V&&V.relative&&(M=this.graph.view.getState(x[0]),null!=M&&2>M.width&&2>M.height&&null!=M.text&&null!=M.text.boundingBox))return mxRectangle.fromRectangle(M.text.boundingBox)}return za.apply(this,+arguments)};var Ea=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var x=Ea.apply(this,arguments),M=[],Q=0;Q<x.length;Q++)"1"!=mxUtils.getValue(x[Q].style,"part","0")&&M.push(x[Q]);return M};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(x){var M=this.graph.getModel(),Q=M.getParent(x.cell),V=this.graph.getCellGeometry(x.cell);return M.isEdge(Q)&&null!=V&&V.relative&&2>x.width&&2>x.height&&null!=+x.text&&null!=x.text.boundingBox?(M=x.text.unrotatedBoundingBox||x.text.boundingBox,new mxRectangle(Math.round(M.x),Math.round(M.y),Math.round(M.width),Math.round(M.height))):ra.apply(this,arguments)};var ya=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(x,M){var Q=this.graph.getModel(),V=Q.getParent(this.state.cell),ia=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(M)==mxEvent.ROTATION_HANDLE||!Q.isEdge(V)||null==ia||!ia.relative||null==this.state||+2<=this.state.width||2<=this.state.height)&&ya.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var x=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),M=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&x==mxConstants.NONE&&M==mxConstants.NONE?(x=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,+x,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(x,M){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ma=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=+function(x,M){Ma.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(x,M){try{if(null==x&&(null==M||0==M.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),+this.linkHint=null);else if(null!=x||null!=M&&0<M.length){var Q=document.createElement("img");Q.className="geAdaptiveAsset";Q.setAttribute("src",Editor.editImage);Q.setAttribute("title",mxResources.get("editLink"));Q.setAttribute("width","14");Q.setAttribute("height","14");Q.style.paddingLeft="8px";Q.style.marginLeft="auto";Q.style.marginBottom="-1px";Q.style.cursor="pointer";var V=Q.cloneNode(!0);V.setAttribute("src",Editor.trashImage);V.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));+V.style.paddingLeft="4px";V.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=x){var ia=document.createElement("div");+ia.style.display="flex";ia.style.alignItems="center";ia.appendChild(this.graph.createLinkForHint(x,null,this.state.cell));this.linkHint.appendChild(ia);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ka=Q.cloneNode(!0);ia.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(xa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(xa)}));var oa=V.cloneNode(!0);ia.appendChild(oa);mxEvent.addListener(oa,+"click",mxUtils.bind(this,function(xa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(xa)}))}}if(null!=M)for(ia=0;ia<M.length;ia++)mxUtils.bind(this,function(xa,ta){var ua=document.createElement("div");ua.style.display="flex";ua.style.alignItems="center";ua.style.marginTop=null!=x||0<ta?"6px":"0px";ua.appendChild(this.graph.createLinkForHint(xa.getAttribute("href"),mxUtils.getTextContent(xa),this.state.cell));var Fa=Q.cloneNode(!0);ua.appendChild(Fa);var Na=mxUtils.bind(this,function(Wa){var Xa=+document.createElement("div");Xa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var ab=Xa.getElementsByTagName("a")[ta];if(null!=ab){if(null==Wa||""==Wa){for(Wa=ab.cloneNode(!0).firstChild;null!=Wa;)ab.parentNode.insertBefore(Wa.cloneNode(!0),ab),Wa=Wa.nextSibling;ab.parentNode.removeChild(ab)}else ab.setAttribute("href",Wa);this.graph.labelChanged(this.state.cell,Xa.innerHTML)}});mxEvent.addListener(Fa,"click",mxUtils.bind(this,function(Wa){this.graph.showLinkDialog(xa.getAttribute("href")||+"",mxResources.get("ok"),Na);mxEvent.consume(Wa)}));Fa=V.cloneNode(!0);ua.appendChild(Fa);mxEvent.addListener(Fa,"click",mxUtils.bind(this,function(Wa){Na();mxEvent.consume(Wa)}));this.linkHint.appendChild(ua)})(M[ia],ia)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ha=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var x=Ha.apply(this,+arguments);x.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return x};var Aa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Aa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ra=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var x=0;x<this.moveHandles.length;x++)null!=+this.moveHandles[x]&&(this.moveHandles[x].bounds.x=Math.round(this.moveHandles[x].rowState.x+this.moveHandles[x].rowState.width-this.moveHandles[x].bounds.width/2),this.moveHandles[x].bounds.y=Math.round(this.moveHandles[x].rowState.y+(this.moveHandles[x].rowState.height-this.moveHandles[x].bounds.height)/2),this.moveHandles[x].redraw());if(null!=this.cornerHandles){x=this.getSelectionBorderInset();var M=this.cornerHandles,Q=M[0].bounds.height/2;M[0].bounds.x=this.state.x-M[0].bounds.width/2+x;M[0].bounds.y=+this.state.y-Q+x;M[0].redraw();M[1].bounds.x=M[0].bounds.x+this.state.width-2*x;M[1].bounds.y=M[0].bounds.y;M[1].redraw();M[2].bounds.x=M[0].bounds.x;M[2].bounds.y=this.state.y+this.state.height-2*x;M[2].redraw();M[3].bounds.x=M[1].bounds.x;M[3].bounds.y=M[2].bounds.y;M[3].redraw();for(x=0;x<this.cornerHandles.length;x++)this.cornerHandles[x].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",+mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ra.apply(this);null!=this.state&&null!=this.linkHint&&(x=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),M=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),Q=mxUtils.getBoundingBox(M,this.state.style[mxConstants.STYLE_ROTATION]||"0",x),x=null!=Q?mxUtils.getBoundingBox(this.state,+this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,M=null!=this.state.text?this.state.text.boundingBox:null,null==Q&&(Q=this.state),Q=Q.y+Q.height,null!=M&&(Q=Math.max(Q,M.y+M.height)),this.linkHint.style.left=x.x+x.width/2+"px",this.linkHint.style.top=Math.round(Q+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Za=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Za.apply(this,arguments);+this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var La=mxEdgeHandler.prototype.redrawHandles;+mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(La.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=x.x+x.width/2+"px";this.linkHint.style.top=Math.round(x.y+x.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var $a=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=+function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Da=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Da.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,n,y){mxShape.call(this);this.line=d;this.stroke=n;this.strokewidth=null!=y?y:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function u(){mxConnector.call(this)}function p(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function O(){mxCylinder.call(this)}function R(){mxShape.call(this)}+function c(){mxShape.call(this)}function f(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1}function l(){mxActor.call(this)}function t(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function C(){mxActor.call(this)}function F(){mxActor.call(this)}function N(){mxActor.call(this)}function K(){mxActor.call(this)}function I(){mxActor.call(this)}function ca(){mxActor.call(this)}function da(){mxActor.call(this)}function ea(d,n){this.canvas=d;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=n;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ea.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ea.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ea.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ea.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=-mxUtils.bind(this,ea.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ea.prototype.arcTo)}function ca(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function ma(){mxActor.call(this)}function la(){mxActor.call(this)}function Y(){mxActor.call(this)}function fa(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function l(){mxCylinder.call(this)}function u(){mxShape.call(this)}function H(){mxShape.call(this)}function U(){mxEllipse.call(this)}-function J(){mxShape.call(this)}function W(){mxShape.call(this)}function aa(){mxRectangleShape.call(this)}function ba(){mxShape.call(this)}function ja(){mxShape.call(this)}function oa(){mxShape.call(this)}function qa(){mxShape.call(this)}function ra(){mxShape.call(this)}function ua(){mxCylinder.call(this)}function za(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function Ca(){mxDoubleEllipse.call(this)}function La(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);-this.spacing=0}function Aa(){mxArrowConnector.call(this);this.spacing=0}function Ea(){mxActor.call(this)}function Ka(){mxRectangleShape.call(this)}function Ma(){mxActor.call(this)}function ya(){mxActor.call(this)}function Wa(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Xa(){mxActor.call(this)}function Pa(){mxActor.call(this)}function t(){mxActor.call(this)}function N(){mxActor.call(this)}function Q(){mxActor.call(this)}function X(){mxActor.call(this)}function ia(){mxEllipse.call(this)}-function ka(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Ya(){mxActor.call(this)}function Za(){mxActor.call(this)}function ab(){mxActor.call(this)}function Ra(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=-!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)}function kb(d,n,y,q,x,D,E,ha,M,wa){E+=M;var na=q.clone();q.x-=x*(2*E+M);q.y-=D*(2*E+M);x*=E+M;D*=E+M;return function(){d.ellipse(na.x-x-E,na.y-D-E,2*E,2*E);wa?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var n=0;n<this.line.length;n++){var y=this.line[n];null!=y&&(y=new mxRectangle(y.x,y.y,this.strokewidth,this.strokewidth),null==-d?d=y:d.add(y))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,n,y,q,x){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,n,y,q){if(null!=n){var x=null;d.begin();for(var D=0;D<n.length;D++){var E=n[D];null!=E&&(null==x?d.moveTo(E.x+y,E.y+q):null!=x&&d.lineTo(E.x+y,E.y+q));x=E}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var n=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var y=null,-q=0;q<this.line.length&&!n;q++){var x=this.line[q];null!=x&&null!=y&&(n=mxUtils.rectangleIntersectsSegment(d,y,x));y=x}return n};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(d,n,y,q,x){var D=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):-!1,E=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Da.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-n,-y));D||this.outline||!(E&&ha<x||!E&&ha<q)||this.paintForeground(d,n,y,q,x)};e.prototype.paintForeground=function(d,n,y,q,x){if(null!=this.state){var D=this.flipH,E=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=D;D=E;E=ha}d.rotate(-this.getShapeRotation(),-D,E,n+q/2,y+x/2);s=this.scale;n=this.bounds.x/s;y=this.bounds.y/s;q=this.bounds.width/s;x=this.bounds.height/s;this.paintTableForeground(d,n,y,q,x)}};e.prototype.paintTableForeground=function(d,n,y,q,x){q=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(x=0;x<q.length;x++)b.prototype.paintTableLine(d,q[x],n,y)};e.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?-d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(g,e);g.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",g);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(d,n,y,q,x){var D=Math.max(0,Math.min(q,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,x);d.lineTo(D,x);d.lineTo(0,x-D);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(0,0),d.lineTo(q-D,0),d.lineTo(q,D),-d.lineTo(D,D),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(D,D),d.lineTo(D,x),d.lineTo(0,x-D),d.close(),d.fill()),d.begin(),d.moveTo(D,x),d.lineTo(D,D),d.lineTo(0,0),d.moveTo(D,D),d.lineTo(q,D),d.end(),d.stroke())};m.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",-m);var cb=Math.tan(mxUtils.toRadians(30)),$a=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",A);mxUtils.extend(v,mxConnector);v.prototype.paintEdgeShape=function(d,n){var y=this.createMarker(d,n,!0),q=this.createMarker(d,n,!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!=y&&y();null!=q&&q()};mxCellRenderer.registerShape("wire",v);mxUtils.extend(p,mxCylinder);p.prototype.size=6;p.prototype.paintVertexShape=function(d,n,y,q,x){d.setFillColor(this.stroke);var D=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(n+.5*(q-D),y+.5*(x-D),D,D);d.fill();d.setFillColor(mxConstants.NONE);d.rect(n,y,q,x);d.fill()};mxCellRenderer.registerShape("waypoint",-p);mxUtils.extend(A,mxActor);A.prototype.size=20;A.prototype.redrawPath=function(d,n,y,q,x){n=Math.min(q,x/cb);d.translate((q-n)/2,(x-n)/2+n/4);d.moveTo(0,.25*n);d.lineTo(.5*n,n*$a);d.lineTo(n,.25*n);d.lineTo(.5*n,(.5-$a)*n);d.lineTo(0,.25*n);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",A);mxUtils.extend(G,mxCylinder);G.prototype.size=20;G.prototype.redrawPath=function(d,n,y,q,x,D){n=Math.min(q,x/(.5+cb));D?(d.moveTo(0,.25*n),d.lineTo(.5*n,(.5-$a)*n),d.lineTo(n,.25*n),d.moveTo(.5*-n,(.5-$a)*n),d.lineTo(.5*n,(1-$a)*n)):(d.translate((q-n)/2,(x-n)/2),d.moveTo(0,.25*n),d.lineTo(.5*n,n*$a),d.lineTo(n,.25*n),d.lineTo(n,.75*n),d.lineTo(.5*n,(1-$a)*n),d.lineTo(0,.75*n),d.close());d.end()};mxCellRenderer.registerShape("isoCube",G);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,n,y,q,x,D){n=Math.min(x/2,Math.round(x/8)+this.strokewidth-1);if(D&&null!=this.fill||!D&&null==this.fill)d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,-n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,-n);D||(d.moveTo(0,n),d.curveTo(0,-n/3,q,-n/3,q,n),d.lineTo(q,x-n),d.curveTo(q,x+n/3,0,x+n/3,0,x-n),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,n,y,q,x){var D=Math.max(0,Math.min(q,Math.min(x,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(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,x);d.lineTo(0,x);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(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.close(),d.fill()),d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.end(),d.stroke())};mxCellRenderer.registerShape("note",F);mxUtils.extend(P,F);mxCellRenderer.registerShape("note2",P);P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=-15;R.prototype.paintVertexShape=function(d,n,y,q,x){var D=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;D=Math.min(q*Math.tan(D),.5*x);d.translate(n,y);d.begin();d.moveTo(.5*q,0);d.lineTo(q,D);d.lineTo(q,x-D);d.lineTo(.5*q,x);d.lineTo(0,x-D);d.lineTo(0,D);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,D);d.lineTo(.5*q,2*D);d.lineTo(q,D);d.moveTo(.5*q,2*D);d.lineTo(.5*q,x);d.stroke()};mxCellRenderer.registerShape("isoCube2",-R);mxUtils.extend(T,mxShape);T.prototype.size=15;T.prototype.paintVertexShape=function(d,n,y,q,x){var D=Math.max(0,Math.min(.5*x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(n,y);0==D?(d.rect(0,0,q,x),d.fillAndStroke()):(d.begin(),d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D),d.lineTo(q,x-D),d.arcTo(.5*q,D,0,0,1,.5*q,x),d.arcTo(.5*q,D,0,0,1,0,x-D),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*-q,D,0,0,1,0,D),d.stroke())};mxCellRenderer.registerShape("cylinder2",T);mxUtils.extend(c,mxCylinder);c.prototype.size=15;c.prototype.paintVertexShape=function(d,n,y,q,x){var D=Math.max(0,Math.min(.5*x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"lid",!0);d.translate(n,y);0==D?(d.rect(0,0,q,x),d.fillAndStroke()):(d.begin(),E?(d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D)):(d.moveTo(0,0),d.arcTo(.5*q,D,0,0,0,.5*q,D),d.arcTo(.5*q,D,-0,0,0,q,0)),d.lineTo(q,x-D),d.arcTo(.5*q,D,0,0,1,.5*q,x),d.arcTo(.5*q,D,0,0,1,0,x-D),d.close(),d.fillAndStroke(),d.setShadow(!1),E&&(d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*q,D,0,0,1,0,D),d.stroke()))};mxCellRenderer.registerShape("cylinder3",c);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(d,n,y,q,x){d.moveTo(0,0);d.quadTo(q/2,.5*x,q,0);d.quadTo(.5*q,x/2,q,x);d.quadTo(q/2,.5*x,0,x);d.quadTo(.5*q,x/2,0,0);d.end()};mxCellRenderer.registerShape("switch",f);mxUtils.extend(k,-mxCylinder);k.prototype.tabWidth=60;k.prototype.tabHeight=20;k.prototype.tabPosition="right";k.prototype.arcSize=.1;k.prototype.paintVertexShape=function(d,n,y,q,x){d.translate(n,y);n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));y=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var D=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),E=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,-"absoluteArcSize",!1),M=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ha||(M*=Math.min(q,x));M=Math.min(M,.5*q,.5*(x-y));n=Math.max(n,M);n=Math.min(q-M,n);E||(M=0);d.begin();"left"==D?(d.moveTo(Math.max(M,0),y),d.lineTo(Math.max(M,0),0),d.lineTo(n,0),d.lineTo(n,y)):(d.moveTo(q-n,y),d.lineTo(q-n,0),d.lineTo(q-Math.max(M,0),0),d.lineTo(q-Math.max(M,0),y));E?(d.moveTo(0,M+y),d.arcTo(M,M,0,0,1,M,y),d.lineTo(q-M,y),d.arcTo(M,M,0,0,1,q,M+y),d.lineTo(q,x-M),d.arcTo(M,M,0,0,1,q-M,x),d.lineTo(M,-x),d.arcTo(M,M,0,0,1,0,x-M)):(d.moveTo(0,y),d.lineTo(q,y),d.lineTo(q,x),d.lineTo(0,x));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(q-30,y+20),d.lineTo(q-20,y+10),d.lineTo(q-10,y+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",k);k.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,-"labelInHeader",!1)){var y=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var q=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x||(D*=Math.min(d.width,d.height));D=Math.min(D,.5*d.width,.5*(d.height-n));q||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width--y),Math.min(d.height,d.height-n)):new mxRectangle(Math.min(d.width,d.width-y),0,D,Math.min(d.height,d.height-n))}return new mxRectangle(0,Math.min(d.height,n),0,0)}return null};mxUtils.extend(B,mxCylinder);B.prototype.arcSize=.1;B.prototype.paintVertexShape=function(d,n,y,q,x){d.translate(n,y);var D=mxUtils.getValue(this.style,"rounded",!1),E=mxUtils.getValue(this.style,"absoluteArcSize",!1);n=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));y=mxUtils.getValue(this.style,"umlStateConnection",-null);E||(n*=Math.min(q,x));n=Math.min(n,.5*q,.5*x);D||(n=0);D=0;null!=y&&(D=10);d.begin();d.moveTo(D,n);d.arcTo(n,n,0,0,1,D+n,0);d.lineTo(q-n,0);d.arcTo(n,n,0,0,1,q,n);d.lineTo(q,x-n);d.arcTo(n,n,0,0,1,q-n,x);d.lineTo(D+n,x);d.arcTo(n,n,0,0,1,D,x-n);d.close();d.fillAndStroke();d.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(d.roundrect(q-40,x-20,10,10,3,3),d.stroke(),d.roundrect(q-20,x-20,10,10,3,3),d.stroke(),d.begin(),d.moveTo(q-30,x-15),d.lineTo(q-20,x-15),-d.stroke());"connPointRefEntry"==y?(d.ellipse(0,.5*x-10,20,20),d.fillAndStroke()):"connPointRefExit"==y&&(d.ellipse(0,.5*x-10,20,20),d.fillAndStroke(),d.begin(),d.moveTo(5,.5*x-5),d.lineTo(15,.5*x+5),d.moveTo(15,.5*x-5),d.lineTo(5,.5*x+5),d.stroke())};B.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",B);mxUtils.extend(z,-mxActor);z.prototype.size=30;z.prototype.isRoundable=function(){return!0};z.prototype.redrawPath=function(d,n,y,q,x){n=Math.max(0,Math.min(q,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,0),new mxPoint(q,0),new mxPoint(q,x),new mxPoint(0,x),new mxPoint(0,n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("card",z);mxUtils.extend(C,mxActor);C.prototype.size=-.4;C.prototype.redrawPath=function(d,n,y,q,x){n=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,n/2);d.quadTo(q/4,1.4*n,q/2,n/2);d.quadTo(3*q/4,n*(1-1.4),q,n/2);d.lineTo(q,x-n/2);d.quadTo(3*q/4,x-1.4*n,q/2,x-n/2);d.quadTo(q/4,x-n*(1-1.4),0,x-n/2);d.lineTo(0,n/2);d.close();d.end()};C.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",this.size),y=d.width,q=d.height;if(null==this.direction||-this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return n*=q,new mxRectangle(d.x,d.y+n,y,q-2*n);n*=y;return new mxRectangle(d.x+n,d.y,y-2*n,q)}return d};mxCellRenderer.registerShape("tape",C);mxUtils.extend(I,mxActor);I.prototype.size=.3;I.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};I.prototype.redrawPath=function(d,n,y,-q,x){n=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,0);d.lineTo(q,0);d.lineTo(q,x-n/2);d.quadTo(3*q/4,x-1.4*n,q/2,x-n/2);d.quadTo(q/4,x-n*(1-1.4),0,x-n/2);d.lineTo(0,n/2);d.close();d.end()};mxCellRenderer.registerShape("document",I);var fb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(d,n,y,q){var x=mxUtils.getValue(this.style,"size");return null!=x?q*Math.max(0,Math.min(1,x)):fb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=-function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,d.height*n),0,0)}return null};c.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(n/=2);return new mxRectangle(0,Math.min(d.height*this.scale,2*n*this.scale),0,Math.max(0,.3*n*this.scale))}return null};k.prototype.getLabelMargins=-function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var y=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var q=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x||(D*=Math.min(d.width,d.height));D=Math.min(D,-.5*d.width,.5*(d.height-n));q||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width-y),Math.min(d.height,d.height-n)):new mxRectangle(Math.min(d.width,d.width-y),0,D,Math.min(d.height,d.height-n))}return new mxRectangle(0,Math.min(d.height,n),0,0)}return null};B.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};P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,Math.max(0,n*this.scale))}return null};mxUtils.extend(L,mxActor);L.prototype.size=.2;L.prototype.fixedSize=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(d,n,y,q,x){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,-"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(n,0),new mxPoint(q,0),new mxPoint(q-n,x)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("parallelogram",L);mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,-n,y,q,x){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,x)],this.isRounded,y,!0)};mxCellRenderer.registerShape("trapezoid",K);mxUtils.extend(O,mxActor);-O.prototype.size=.5;O.prototype.redrawPath=function(d,n,y,q,x){d.setFillColor(null);n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(q,0),new mxPoint(n,0),new mxPoint(n,x/2),new mxPoint(0,x/2),new mxPoint(n,x/2),new mxPoint(n,x),new mxPoint(q,x)],this.isRounded,y,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",O);mxUtils.extend(da,mxActor);-da.prototype.redrawPath=function(d,n,y,q,x){d.setStrokeWidth(1);d.setFillColor(this.stroke);n=q/5;d.rect(0,0,n,x);d.fillAndStroke();d.rect(2*n,0,n,x);d.fillAndStroke();d.rect(4*n,0,n,x);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",da);ea.prototype.moveTo=function(d,n){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;this.firstX=d;this.firstY=n};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,n,y,q){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=y;this.lastY=q};ea.prototype.curveTo=function(d,n,y,q,x,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=D};ea.prototype.arcTo=function(d,n,y,q,x,D,E){this.originalArcTo.apply(this.canvas,arguments);this.lastX=D;this.lastY=E};ea.prototype.lineTo=function(d,n){if(null!=this.lastX&&null!=this.lastY){var y=function(na){return"number"===-typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},q=Math.abs(d-this.lastX),x=Math.abs(n-this.lastY),D=Math.sqrt(q*q+x*x);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;return}var E=Math.round(D/10),ha=this.defaultVariation;5>E&&(E=5,ha/=3);var M=y(d-this.lastX)*q/E;y=y(n-this.lastY)*x/E;q/=D;x/=D;for(D=0;D<E;D++){var wa=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,M*D+this.lastX-wa*x,y*D+this.lastY-wa*q)}this.originalLineTo.call(this.canvas,d,n)}else this.originalLineTo.apply(this.canvas,-arguments);this.lastX=d;this.lastY=n};ea.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var jb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(d){jb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var sb=mxShape.prototype.afterPaint;-mxShape.prototype.afterPaint=function(d){sb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ea(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var Ab=mxRectangleShape.prototype.isHtmlAllowed;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"))&&Ab.apply(this,arguments)};var nb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,n,y,q,x){if(null==d.handJiggle||d.handJiggle.constructor!=ea)nb.apply(this,arguments);else{var D=!0;null!=this.style&&(D="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(D||-null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)D||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?D=Math.min(q/2,Math.min(x/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,D=Math.min(q*D,x*D)),d.moveTo(n+-D,y),d.lineTo(n+q-D,y),d.quadTo(n+q,y,n+q,y+D),d.lineTo(n+q,y+x-D),d.quadTo(n+q,y+x,n+q-D,y+x),d.lineTo(n+D,y+x),d.quadTo(n,y+x,n,y+x-D),d.lineTo(n,y+D),d.quadTo(n,y,n+D,y)):(d.moveTo(n,y),d.lineTo(n+q,y),d.lineTo(n+q,y+x),d.lineTo(n,y+x),d.lineTo(n,y)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(ca,mxRectangleShape);ca.prototype.size=.1;ca.prototype.fixedSize=!1;ca.prototype.isHtmlAllowed=function(){return!1};ca.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,-!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var n=d.width,y=d.height;d=new mxRectangle(d.x,d.y,n,y);var q=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;q=Math.max(q,Math.min(n*x,y*x))}d.x+=Math.round(q);d.width-=Math.round(2*q);return d}return d};ca.prototype.paintForeground=-function(d,n,y,q,x){var D=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),E=parseFloat(mxUtils.getValue(this.style,"size",this.size));E=D?Math.max(0,Math.min(q,E)):q*Math.max(0,Math.min(1,E));this.isRounded&&(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.max(E,Math.min(q*D,x*D)));E=Math.round(E);d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+x);d.moveTo(n+q-E,y);d.lineTo(n+q-E,y+x);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,-arguments)};mxCellRenderer.registerShape("process",ca);mxCellRenderer.registerShape("process2",ca);mxUtils.extend(V,mxRectangleShape);V.prototype.paintBackground=function(d,n,y,q,x){d.setFillColor(mxConstants.NONE);d.rect(n,y,q,x);d.fill()};V.prototype.paintForeground=function(d,n,y,q,x){};mxCellRenderer.registerShape("transparent",V);mxUtils.extend(ma,mxHexagon);ma.prototype.size=30;ma.prototype.position=.5;ma.prototype.position2=.5;ma.prototype.base=20;ma.prototype.getLabelMargins=function(){return new mxRectangle(0,-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ma.prototype.isRoundable=function(){return!0};ma.prototype.redrawPath=function(d,n,y,q,x){n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;y=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var D=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",-this.position2)))),ha=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,x-y),new mxPoint(Math.min(q,D+ha),x-y),new mxPoint(E,x),new mxPoint(Math.max(0,D),x-y),new mxPoint(0,x-y)],this.isRounded,n,!0,[4])};mxCellRenderer.registerShape("callout",ma);mxUtils.extend(la,mxActor);la.prototype.size=.2;la.prototype.fixedSize=20;la.prototype.isRoundable=function(){return!0};la.prototype.redrawPath=function(d,-n,y,q,x){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q-n,0),new mxPoint(q,x/2),new mxPoint(q-n,x),new mxPoint(0,x),new mxPoint(n,x/2)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("step",-la);mxUtils.extend(Y,mxHexagon);Y.prototype.size=.25;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(d,n,y,q,x){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,-0),new mxPoint(q-n,0),new mxPoint(q,.5*x),new mxPoint(q-n,x),new mxPoint(n,x),new mxPoint(0,.5*x)],this.isRounded,y,!0)};mxCellRenderer.registerShape("hexagon",Y);mxUtils.extend(fa,mxRectangleShape);fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.paintForeground=function(d,n,y,q,x){var D=Math.min(q/5,x/5)+1;d.begin();d.moveTo(n+q/2,y+D);d.lineTo(n+q/2,y+x-D);d.moveTo(n+D,y+x/2);d.lineTo(n+q-D,y+x/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};-mxCellRenderer.registerShape("plus",fa);var lb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};mxRhombus.prototype.paintVertexShape=function(d,n,y,q,x){lb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var D=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||-0);n+=D;y+=D;q-=2*D;x-=2*D;0<q&&0<x&&(d.setShadow(!1),lb.apply(this,[d,n,y,q,x]))}};mxUtils.extend(Z,mxRectangleShape);Z.prototype.isHtmlAllowed=function(){return!1};Z.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};Z.prototype.paintForeground=function(d,n,y,q,x){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var D=-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;x-=2*D;0<q&&0<x&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);D=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+D]];if(null!=E){var ha=this.style["symbol"+D+"Align"],M=this.style["symbol"+D+"VerticalAlign"],wa=this.style["symbol"+D+"Width"],na=this.style["symbol"+D+"Height"],Va=this.style["symbol"+D+"Spacing"]||0,gb=this.style["symbol"+D+"VSpacing"]||-Va,bb=this.style["symbol"+D+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(q+this.strokewidth,x+this.strokewidth),Va+=bb,gb+=bb);bb=n;var Fa=y;bb=ha==mxConstants.ALIGN_CENTER?bb+(q-wa)/2:ha==mxConstants.ALIGN_RIGHT?bb+(q-wa-Va):bb+Va;Fa=M==mxConstants.ALIGN_MIDDLE?Fa+(x-na)/2:M==mxConstants.ALIGN_BOTTOM?Fa+(x-na-gb):Fa+gb;d.save();ha=new E;ha.style=this.style;E.prototype.paintVertexShape.call(ha,d,bb,Fa,wa,na);d.restore()}D++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};-mxCellRenderer.registerShape("ext",Z);mxUtils.extend(l,mxCylinder);l.prototype.redrawPath=function(d,n,y,q,x,D){D?(d.moveTo(0,0),d.lineTo(q/2,x/2),d.lineTo(q,0),d.end()):(d.moveTo(0,0),d.lineTo(q,0),d.lineTo(q,x),d.lineTo(0,x),d.close())};mxCellRenderer.registerShape("message",l);mxUtils.extend(u,mxShape);u.prototype.paintBackground=function(d,n,y,q,x){d.translate(n,y);d.ellipse(q/4,0,q/2,x/4);d.fillAndStroke();d.begin();d.moveTo(q/2,x/4);d.lineTo(q/2,2*x/3);d.moveTo(q/2,x/3);d.lineTo(0,x/3);d.moveTo(q/-2,x/3);d.lineTo(q,x/3);d.moveTo(q/2,2*x/3);d.lineTo(0,x);d.moveTo(q/2,2*x/3);d.lineTo(q,x);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",u);mxUtils.extend(H,mxShape);H.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};H.prototype.paintBackground=function(d,n,y,q,x){d.translate(n,y);d.begin();d.moveTo(0,x/4);d.lineTo(0,3*x/4);d.end();d.stroke();d.begin();d.moveTo(0,x/2);d.lineTo(q/6,x/2);d.end();d.stroke();d.ellipse(q/6,0,5*q/6,x);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",-H);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(d,n,y,q,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+x);d.lineTo(n+7*q/8,y+x);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",U);mxUtils.extend(J,mxShape);J.prototype.paintVertexShape=function(d,n,y,q,x){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,x);d.moveTo(0,0);d.lineTo(q,x);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",J);mxUtils.extend(W,mxShape);-W.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};W.prototype.paintBackground=function(d,n,y,q,x){d.translate(n,y);d.begin();d.moveTo(3*q/8,x/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,x/8,q,7*x/8);d.fillAndStroke()};W.prototype.paintForeground=function(d,n,y,q,x){d.begin();d.moveTo(3*q/8,x/8*1.1);d.lineTo(5*q/8,x/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",W);mxUtils.extend(aa,mxRectangleShape);aa.prototype.size=-40;aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.getLabelBounds=function(d){var n=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,n)};aa.prototype.paintBackground=function(d,n,y,q,x){var D=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,-d,n,y,q,D):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=aa&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,n,y,q,D),d.restore()));D<x&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(n+q/2,y+D),d.lineTo(n+q/2,y+x),d.end(),d.stroke())};aa.prototype.paintForeground=function(d,n,y,q,x){var D=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,n,y,q,-Math.min(x,D))};mxCellRenderer.registerShape("umlLifeline",aa);mxUtils.extend(ba,mxShape);ba.prototype.width=60;ba.prototype.height=30;ba.prototype.corner=10;ba.prototype.configurePointerEvents=function(d){var n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=n&&n!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};ba.prototype.getLabelMargins=-function(d){return new mxRectangle(0,0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};ba.prototype.paintBackground=function(d,n,y,q,x){var D=this.corner,E=Math.min(q,Math.max(D,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),ha=Math.min(x,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),M=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,-mxConstants.NONE);M!=mxConstants.NONE&&(d.setFillColor(M),d.rect(n,y,q,x),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,n,y,q,x),d.setGradient(this.fill,this.gradient,n,y,q,x,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(n,y);d.lineTo(n+E,y);d.lineTo(n+E,y+Math.max(0,ha-1.5*D));d.lineTo(n+Math.max(0,E-D),y+ha);d.lineTo(n,y+ha);d.close();d.fillAndStroke();this.configurePointerEvents(d);-d.begin();d.moveTo(n+E,y);d.lineTo(n+q,y);d.lineTo(n+q,y+x);d.lineTo(n,y+x);d.lineTo(n,y+ha);d.stroke()};mxCellRenderer.registerShape("umlFrame",ba);mxPerimeter.CenterPerimeter=function(d,n,y,q){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,n,y,q){q=aa.prototype.size;null!=n&&(q=mxUtils.getValue(n.style,"size",q)*n.view.scale);n=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*-n.view.scale/2-1;y.x<d.getCenterX()&&(n=-1*(n+1));return new mxPoint(d.getCenterX()+n,Math.min(d.y+d.height,Math.max(d.y+q,y.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,n,y,q){q=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,n,y,q){q=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||-1)*n.view.scale/2-1;null!=n.style.backboneSize&&(q+=parseFloat(n.style.backboneSize)*n.view.scale/2-1);if("south"==n.style[mxConstants.STYLE_DIRECTION]||"north"==n.style[mxConstants.STYLE_DIRECTION])return y.x<d.getCenterX()&&(q=-1*(q+1)),new mxPoint(d.getCenterX()+q,Math.min(d.y+d.height,Math.max(d.y,y.y)));y.y<d.getCenterY()&&(q=-1*(q+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,y.x)),d.getCenterY()+q)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=-function(d,n,y,q){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(n.style,"size",ma.prototype.size))*n.view.scale))),n.style),n,y,q)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,n,y,q){var x="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=x?L.prototype.fixedSize:L.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));-x&&(D*=n.view.scale);var E=d.x,ha=d.y,M=d.width,wa=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(x=x?Math.max(0,Math.min(wa,D)):wa*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M,ha+x),new mxPoint(E+M,ha+wa),new mxPoint(E,ha+wa-x),new mxPoint(E,ha)]):(x=x?Math.max(0,Math.min(.5*M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+x,ha),new mxPoint(E+-M,ha),new mxPoint(E+M-x,ha+wa),new mxPoint(E,ha+wa),new mxPoint(E+x,ha)]);wa=d.getCenterX();d=d.getCenterY();d=new mxPoint(wa,d);q&&(y.x<E||y.x>E+M?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(ha,d,y)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,n,y,q){var x="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=x?K.prototype.fixedSize:K.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));x&&(D*=n.view.scale);-var E=d.x,ha=d.y,M=d.width,wa=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(x=x?Math.max(0,Math.min(.5*M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+x,ha),new mxPoint(E+M-x,ha),new mxPoint(E+M,ha+wa),new mxPoint(E,ha+wa),new mxPoint(E+x,ha)]):n==mxConstants.DIRECTION_WEST?(x=x?Math.max(0,Math.min(M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M,ha),new mxPoint(E+-M-x,ha+wa),new mxPoint(E+x,ha+wa),new mxPoint(E,ha)]):n==mxConstants.DIRECTION_NORTH?(x=x?Math.max(0,Math.min(wa,D)):wa*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha+x),new mxPoint(E+M,ha),new mxPoint(E+M,ha+wa),new mxPoint(E,ha+wa-x),new mxPoint(E,ha+x)]):(x=x?Math.max(0,Math.min(wa,D)):wa*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M,ha+x),new mxPoint(E+M,ha+wa-x),new mxPoint(E,ha+wa),new mxPoint(E,ha)]);wa=d.getCenterX();d=d.getCenterY();d=new mxPoint(wa,d);q&&(y.x<E||y.x>E+-M?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(ha,d,y)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,n,y,q){var x="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=x?la.prototype.fixedSize:la.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));x&&(D*=n.view.scale);var E=d.x,ha=d.y,M=d.width,wa=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):-mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(x=x?Math.max(0,Math.min(M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(E+M-x,ha),new mxPoint(E+M,d),new mxPoint(E+M-x,ha+wa),new mxPoint(E,ha+wa),new mxPoint(E+x,d),new mxPoint(E,ha)]):n==mxConstants.DIRECTION_WEST?(x=x?Math.max(0,Math.min(M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+x,ha),new mxPoint(E+M,ha),new mxPoint(E+M-x,d),new mxPoint(E+M,ha+wa),new mxPoint(E+x,ha+wa),new mxPoint(E,d),new mxPoint(E+x,ha)]):-n==mxConstants.DIRECTION_NORTH?(x=x?Math.max(0,Math.min(wa,D)):wa*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha+x),new mxPoint(na,ha),new mxPoint(E+M,ha+x),new mxPoint(E+M,ha+wa),new mxPoint(na,ha+wa-x),new mxPoint(E,ha+wa),new mxPoint(E,ha+x)]):(x=x?Math.max(0,Math.min(wa,D)):wa*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E,ha),new mxPoint(na,ha+x),new mxPoint(E+M,ha),new mxPoint(E+M,ha+wa-x),new mxPoint(na,ha+wa),new mxPoint(E,ha+wa-x),new mxPoint(E,ha)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+M?-na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(ha,na,y)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,n,y,q){var x="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=x?Y.prototype.fixedSize:Y.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));x&&(D*=n.view.scale);var E=d.x,ha=d.y,M=d.width,wa=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):-mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(x=x?Math.max(0,Math.min(wa,D)):wa*Math.max(0,Math.min(1,D)),ha=[new mxPoint(na,ha),new mxPoint(E+M,ha+x),new mxPoint(E+M,ha+wa-x),new mxPoint(na,ha+wa),new mxPoint(E,ha+wa-x),new mxPoint(E,ha+x),new mxPoint(na,ha)]):(x=x?Math.max(0,Math.min(M,D)):M*Math.max(0,Math.min(1,D)),ha=[new mxPoint(E+x,ha),new mxPoint(E+M-x,ha),new mxPoint(E+M,d),new mxPoint(E+M-x,ha+wa),new mxPoint(E+x,ha+wa),new mxPoint(E,d),new mxPoint(E+-x,ha)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+M?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(ha,na,y)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ja,mxShape);ja.prototype.size=10;ja.prototype.paintBackground=function(d,n,y,q,x){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(n,y);d.ellipse((q-D)/2,0,D,D);d.fillAndStroke();d.begin();d.moveTo(q/2,D);d.lineTo(q/2,x);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",-ja);mxUtils.extend(oa,mxShape);oa.prototype.size=10;oa.prototype.inset=2;oa.prototype.paintBackground=function(d,n,y,q,x){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size)),E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(n,y);d.begin();d.moveTo(q/2,D+E);d.lineTo(q/2,x);d.end();d.stroke();d.begin();d.moveTo((q-D)/2-E,D/2);d.quadTo((q-D)/2-E,D+E,q/2,D+E);d.quadTo((q+D)/2+E,D+E,(q+D)/2+E,D/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",-oa);mxUtils.extend(qa,mxShape);qa.prototype.paintBackground=function(d,n,y,q,x){d.translate(n,y);d.begin();d.moveTo(0,0);d.quadTo(q,0,q,x/2);d.quadTo(q,x,0,x);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",qa);mxUtils.extend(ra,mxShape);ra.prototype.inset=2;ra.prototype.paintBackground=function(d,n,y,q,x){var D=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(n,y);d.ellipse(0,D,q-2*D,x-2*D);d.fillAndStroke();d.begin();d.moveTo(q/2,0);d.quadTo(q,-0,q,x/2);d.quadTo(q,x,q/2,x);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ra);mxUtils.extend(ua,mxCylinder);ua.prototype.jettyWidth=20;ua.prototype.jettyHeight=10;ua.prototype.redrawPath=function(d,n,y,q,x,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var ha=Math.min(n,x-n),M=Math.min(ha+2*n,x-n);D?(d.moveTo(y,ha),d.lineTo(E,ha),d.lineTo(E,ha+n),-d.lineTo(y,ha+n),d.moveTo(y,M),d.lineTo(E,M),d.lineTo(E,M+n),d.lineTo(y,M+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,x),d.lineTo(y,x),d.lineTo(y,M+n),d.lineTo(0,M+n),d.lineTo(0,M),d.lineTo(y,M),d.lineTo(y,ha+n),d.lineTo(0,ha+n),d.lineTo(0,ha),d.lineTo(y,ha),d.close());d.end()};mxCellRenderer.registerShape("module",ua);mxUtils.extend(za,mxCylinder);za.prototype.jettyWidth=32;za.prototype.jettyHeight=12;za.prototype.redrawPath=function(d,n,y,q,x,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",-this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var ha=.3*x-n/2,M=.7*x-n/2;D?(d.moveTo(y,ha),d.lineTo(E,ha),d.lineTo(E,ha+n),d.lineTo(y,ha+n),d.moveTo(y,M),d.lineTo(E,M),d.lineTo(E,M+n),d.lineTo(y,M+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,x),d.lineTo(y,x),d.lineTo(y,M+n),d.lineTo(0,M+n),d.lineTo(0,M),d.lineTo(y,M),d.lineTo(y,ha+n),d.lineTo(0,ha+n),d.lineTo(0,ha),d.lineTo(y,ha),d.close());d.end()};mxCellRenderer.registerShape("component",-za);mxUtils.extend(Ba,mxRectangleShape);Ba.prototype.paintForeground=function(d,n,y,q,x){var D=q/2,E=x/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(n+D,y),new mxPoint(n+q,y+E),new mxPoint(n+D,y+x),new mxPoint(n,y+E)],this.isRounded,ha,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ba);mxUtils.extend(Ca,mxDoubleEllipse);Ca.prototype.outerStroke=-!0;Ca.prototype.paintVertexShape=function(d,n,y,q,x){var D=Math.min(4,Math.min(q/5,x/5));0<q&&0<x&&(d.ellipse(n+D,y+D,q-2*D,x-2*D),d.fillAndStroke());d.setShadow(!1);this.outerStroke&&(d.ellipse(n,y,q,x),d.stroke())};mxCellRenderer.registerShape("endState",Ca);mxUtils.extend(La,Ca);La.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",La);mxUtils.extend(sa,mxArrowConnector);sa.prototype.defaultWidth=4;sa.prototype.isOpenEnded=function(){return!0};sa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,-"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};sa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",sa);mxUtils.extend(Aa,mxArrowConnector);Aa.prototype.defaultWidth=10;Aa.prototype.defaultArrowWidth=20;Aa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Aa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",-this.defaultArrowWidth)};Aa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Aa);mxUtils.extend(Ea,mxActor);Ea.prototype.size=30;Ea.prototype.isRoundable=function(){return!0};Ea.prototype.redrawPath=function(d,n,y,q,x){n=Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,-[new mxPoint(0,x),new mxPoint(0,n),new mxPoint(q,0),new mxPoint(q,x)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("manualInput",Ea);mxUtils.extend(Ka,mxRectangleShape);Ka.prototype.dx=20;Ka.prototype.dy=20;Ka.prototype.isHtmlAllowed=function(){return!1};Ka.prototype.paintForeground=function(d,n,y,q,x){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var D=0;if(this.isRounded){var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/-100;D=Math.max(D,Math.min(q*E,x*E))}E=Math.max(D,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));D=Math.max(D,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(n,y+D);d.lineTo(n+q,y+D);d.end();d.stroke();d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+x);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",Ka);mxUtils.extend(Ma,mxActor);Ma.prototype.dx=20;Ma.prototype.dy=20;Ma.prototype.redrawPath=function(d,n,y,q,x){n=Math.max(0,Math.min(q,-parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint(n,y),new mxPoint(n,x),new mxPoint(0,x)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("corner",Ma);mxUtils.extend(ya,mxActor);-ya.prototype.redrawPath=function(d,n,y,q,x){d.moveTo(0,0);d.lineTo(0,x);d.end();d.moveTo(q,0);d.lineTo(q,x);d.end();d.moveTo(0,x/2);d.lineTo(q,x/2);d.end()};mxCellRenderer.registerShape("crossbar",ya);mxUtils.extend(Wa,mxActor);Wa.prototype.dx=20;Wa.prototype.dy=20;Wa.prototype.redrawPath=function(d,n,y,q,x){n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,-"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint((q+n)/2,y),new mxPoint((q+n)/2,x),new mxPoint((q-n)/2,x),new mxPoint((q-n)/2,y),new mxPoint(0,y)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("tee",Wa);mxUtils.extend(Ia,mxActor);Ia.prototype.arrowWidth=.3;Ia.prototype.arrowSize=.2;Ia.prototype.redrawPath=function(d,n,y,q,x){var D=x*Math.max(0,Math.min(1,-parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));y=(x-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,x/2),new mxPoint(q-n,x),new mxPoint(q-n,D),new mxPoint(0,D)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Ia);mxUtils.extend(Xa,-mxActor);Xa.prototype.redrawPath=function(d,n,y,q,x){var D=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ia.prototype.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ia.prototype.arrowSize))));y=(x-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x/2),new mxPoint(n,0),new mxPoint(n,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,x/2),new mxPoint(q--n,x),new mxPoint(q-n,D),new mxPoint(n,D),new mxPoint(n,x)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",Xa);mxUtils.extend(Pa,mxActor);Pa.prototype.size=.1;Pa.prototype.fixedSize=20;Pa.prototype.redrawPath=function(d,n,y,q,x){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(n,0);d.lineTo(q,-0);d.quadTo(q-2*n,x/2,q,x);d.lineTo(n,x);d.quadTo(n-2*n,x/2,n,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Pa);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(d,n,y,q,x){d.moveTo(0,0);d.quadTo(q,0,q,x/2);d.quadTo(q,x,0,x);d.close();d.end()};mxCellRenderer.registerShape("or",t);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(d,n,y,q,x){d.moveTo(0,0);d.quadTo(q,0,q,x/2);d.quadTo(q,x,0,x);d.quadTo(q/2,x/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",-N);mxUtils.extend(Q,mxActor);Q.prototype.size=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(d,n,y,q,x){n=Math.min(q/2,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,.8*n),new mxPoint(q,x),new mxPoint(0,x),new mxPoint(0,.8*n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("loopLimit",-Q);mxUtils.extend(X,mxActor);X.prototype.size=.375;X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(d,n,y,q,x){n=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,x-n),new mxPoint(q/2,x),new mxPoint(0,x-n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",X);mxUtils.extend(ia,-mxEllipse);ia.prototype.paintVertexShape=function(d,n,y,q,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/2,y+x);d.lineTo(n+q,y+x);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(d,n,y,q,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+x/2);d.lineTo(n+q,y+x/2);d.end();d.stroke();d.begin();d.moveTo(n+q/2,y);d.lineTo(n+q/2,y+x);-d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(d,n,y,q,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n+.145*q,y+.145*x);d.lineTo(n+.855*q,y+.855*x);d.end();d.stroke();d.begin();d.moveTo(n+.855*q,y+.145*x);d.lineTo(n+.145*q,y+.855*x);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,-n,y,q,x){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+x/2);d.lineTo(n+q,y+x/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(d,n,y,q,x){d.begin();d.moveTo(n,y);d.lineTo(n+q,y);d.lineTo(n+q/2,y+x/2);d.close();d.fillAndStroke();d.begin();d.moveTo(n,y+x);d.lineTo(n+q,y+x);d.lineTo(n+q/2,y+x/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);-mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(d,n,y,q,x){var D=d.state.strokeWidth/2,E=10+2*D,ha=y+x-E/2;d.begin();d.moveTo(n,y);d.lineTo(n,y+x);d.moveTo(n+D,ha);d.lineTo(n+D+E,ha-E/2);d.moveTo(n+D,ha);d.lineTo(n+D+E,ha+E/2);d.moveTo(n+D,ha);d.lineTo(n+q-D,ha);d.moveTo(n+q,y);d.lineTo(n+q,y+x);d.moveTo(n+q-D,ha);d.lineTo(n+q-E-D,ha-E/2);d.moveTo(n+q-D,ha);d.lineTo(n+q-E-D,ha+E/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",va);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=-!0;Da.prototype.paintVertexShape=function(d,n,y,q,x){this.outline||d.setStrokeColor(null);if(null!=this.style){var D=d.pointerEvents,E=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||E||(d.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),M="1"==mxUtils.getValue(this.style,"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||E||this.outline||-ha||wa||na||M?(d.rect(n,y,q,x),d.fill(),d.pointerEvents=D,d.setStrokeColor(this.stroke),d.setLineCap("square"),d.begin(),d.moveTo(n,y),this.outline||ha?d.lineTo(n+q,y):d.moveTo(n+q,y),this.outline||wa?d.lineTo(n+q,y+x):d.moveTo(n+q,y+x),this.outline||na?d.lineTo(n,y+x):d.moveTo(n,y+x),(this.outline||M)&&d.lineTo(n,y),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=-function(d,n,y,q,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==mxUtils.getValue(this.style,"line")?(d.moveTo(n+q/2,y),d.lineTo(n+q/2,y+x)):(d.moveTo(n,y+x/2),d.lineTo(n+q,y+x/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Na);mxUtils.extend(Ya,mxActor);Ya.prototype.redrawPath=function(d,n,y,q,x){n=Math.min(q,x/2);d.moveTo(0,0);d.lineTo(q-n,0);d.quadTo(q,0,q,x/2);d.quadTo(q,x,q-n,x);d.lineTo(0,x);d.close();d.end()};mxCellRenderer.registerShape("delay",-Ya);mxUtils.extend(Za,mxActor);Za.prototype.size=.2;Za.prototype.redrawPath=function(d,n,y,q,x){n=Math.min(x,q);var D=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(x-D)/2;y=n+D;var E=(q-D)/2;D=E+D;d.moveTo(0,n);d.lineTo(E,n);d.lineTo(E,0);d.lineTo(D,0);d.lineTo(D,n);d.lineTo(q,n);d.lineTo(q,y);d.lineTo(D,y);d.lineTo(D,x);d.lineTo(E,x);d.lineTo(E,y);d.lineTo(0,y);d.close();d.end()};mxCellRenderer.registerShape("cross",Za);mxUtils.extend(ab,mxActor);ab.prototype.size=-.25;ab.prototype.redrawPath=function(d,n,y,q,x){n=Math.min(q,x/2);y=Math.min(q-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*q);d.moveTo(0,x/2);d.lineTo(y,0);d.lineTo(q-n,0);d.quadTo(q,0,q,x/2);d.quadTo(q,x,q-n,x);d.lineTo(y,x);d.close();d.end()};mxCellRenderer.registerShape("display",ab);mxUtils.extend(Ra,mxActor);Ra.prototype.cst={RECT2:"mxgraph.basic.rect"};Ra.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",-dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",-defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",-dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",-dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Ra.prototype.paintVertexShape=function(d,n,y,q,x){d.translate(n,y);this.strictDrawShape(d,0,0,q,x)};Ra.prototype.strictDrawShape=function(d,n,y,q,x,D){var E=D&&D.rectStyle?D.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),-ha=D&&D.absoluteCornerSize?D.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),M=D&&D.size?D.size:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=D&&D.rectOutline?D.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=D&&D.indent?D.indent:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Va=D&&D.dashed?D.dashed:mxUtils.getValue(this.style,"dashed",!1),gb=D&&D.dashPattern?-D.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=D&&D.relIndent?D.relIndent:Math.max(0,Math.min(50,na)),Fa=D&&D.top?D.top:mxUtils.getValue(this.style,"top",!0),Ja=D&&D.right?D.right:mxUtils.getValue(this.style,"right",!0),Ha=D&&D.bottom?D.bottom:mxUtils.getValue(this.style,"bottom",!0),Ga=D&&D.left?D.left:mxUtils.getValue(this.style,"left",!0),Qa=D&&D.topLeftStyle?D.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Sa=D&&D.topRightStyle?D.topRightStyle:mxUtils.getValue(this.style,-"topRightStyle","default"),Ta=D&&D.bottomRightStyle?D.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ua=D&&D.bottomLeftStyle?D.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=D&&D.fillColor?D.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");D&&D.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=D&&D.strokeWidth?D.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=D&&D.fillColor2?D.fillColor2:mxUtils.getValue(this.style,-"fillColor2","none"),Eb=D&&D.gradientColor2?D.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Hb=D&&D.gradientDirection2?D.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=D&&D.opacity?D.opacity:mxUtils.getValue(this.style,"opacity","100"),Jb=Math.max(0,Math.min(50,M));D=Ra.prototype;d.setDashed(Va);gb&&""!=gb&&d.setDashPattern(gb);d.setStrokeWidth(Gb);M=Math.min(.5*x,.5*q,M);ha||(M=Jb*Math.min(q,x)/100);M=Math.min(M,.5*Math.min(q,x));ha||(na=Math.min(bb*-Math.min(q,x)/100));na=Math.min(na,.5*Math.min(q,x)-M);(Fa||Ja||Ha||Ga)&&"frame"!=wa&&(d.begin(),Fa?D.moveNW(d,n,y,q,x,E,Qa,M,Ga):d.moveTo(0,0),Fa&&D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),Ja&&D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),Ha&&D.paintSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),Ga&&D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Db),Va=ha=Ib,"none"==Db&&(ha=0),"none"==-Eb&&(Va=0),d.setGradient(Db,Eb,0,0,q,x,Hb,ha,Va),d.begin(),Fa?D.moveNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga):d.moveTo(na,0),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),Ga&&Ha&&D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),Ha&&Ja&&D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),Ja&&Fa&&D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),Fa&&Ga&&D.paintNWInner(d,n,y,q,x,E,Qa,M,na),d.fill(),"none"==Fb&&(d.begin(),-D.paintFolds(d,n,y,q,x,E,Qa,Sa,Ta,Ua,M,Fa,Ja,Ha,Ga),d.stroke()));Fa||Ja||Ha||!Ga?Fa||Ja||!Ha||Ga?!Fa&&!Ja&&Ha&&Ga?"frame"!=wa?(d.begin(),D.moveSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),"double"==wa&&(D.moveNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,x,E,Ta,M,-Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.lineNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),d.close(),d.fillAndStroke()):Fa||!Ja||Ha||Ga?!Fa&&Ja&&!Ha&&Ga?"frame"!=wa?(d.begin(),D.moveSW(d,n,y,q,x,E,Qa,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),"double"==wa&&(D.moveNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,n,y,q,-x,E,Ua,M,na,Ha,Ga)),d.stroke(),d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),"double"==wa&&(D.moveSEInner(d,n,y,q,x,E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,x,E,Qa,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.lineNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),d.close(),d.fillAndStroke(),d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.lineSEInner(d,n,y,q,x,-E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),d.close(),d.fillAndStroke()):!Fa&&Ja&&Ha&&!Ga?"frame"!=wa?(d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.paintSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),"double"==wa&&(D.moveSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,-n,y,q,x,E,Ta,M,Ha),D.paintSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.lineSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),d.close(),d.fillAndStroke()):!Fa&&Ja&&Ha&&Ga?"frame"!=wa?(d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.paintSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,-E,Qa,M,Fa),"double"==wa&&(D.moveNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.paintSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.lineNWInner(d,-n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),d.close(),d.fillAndStroke()):!Fa||Ja||Ha||Ga?Fa&&!Ja&&!Ha&&Ga?"frame"!=wa?(d.begin(),D.moveSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),"double"==wa&&(D.moveNEInner(d,n,y,q,x,E,Sa,M,na,Ja),D.paintTopInner(d,-n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.lineNEInner(d,n,y,q,x,E,Sa,M,na,Ja),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),d.close(),d.fillAndStroke()):Fa&&!Ja&&Ha&&!Ga?"frame"!=wa?(d.begin(),D.moveNW(d,n,y,q,-x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),"double"==wa&&(D.moveNEInner(d,n,y,q,x,E,Sa,M,na,Ja),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa)),d.stroke(),d.begin(),D.moveSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),"double"==wa&&(D.moveSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.lineNEInner(d,n,y,q,x,E,Sa,M,na,Ja),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),d.close(),-d.fillAndStroke(),d.begin(),D.moveSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.lineSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),d.close(),d.fillAndStroke()):Fa&&!Ja&&Ha&&Ga?"frame"!=wa?(d.begin(),D.moveSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),"double"==wa&&(D.moveNEInner(d,n,y,q,x,E,Sa,M,na,Ja),D.paintTopInner(d,-n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.lineNEInner(d,n,y,q,x,E,Sa,M,na,Ja),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,-n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),d.close(),d.fillAndStroke()):Fa&&Ja&&!Ha&&!Ga?"frame"!=wa?(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),"double"==wa&&(D.moveSEInner(d,n,y,q,x,E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,-x,E,Qa,M,na,Ga,Fa)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.lineSEInner(d,n,y,q,x,E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),d.close(),d.fillAndStroke()):Fa&&Ja&&!Ha&&Ga?"frame"!=wa?(d.begin(),D.moveSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,-n,y,q,x,E,Sa,M,Ja),D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),"double"==wa&&(D.moveSEInner(d,n,y,q,x,E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.paintNE(d,-n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.lineSEInner(d,n,y,q,x,E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),d.close(),d.fillAndStroke()):Fa&&Ja&&Ha&&!Ga?"frame"!=wa?(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.paintSE(d,-n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),"double"==wa&&(D.moveSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.paintSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,-n,y,q,x,E,Ua,M,Ga),D.lineSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),d.close(),d.fillAndStroke()):Fa&&Ja&&Ha&&Ga&&("frame"!=wa?(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.paintSE(d,-n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),d.close(),"double"==wa&&(D.moveSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,-Ga),d.close()),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.paintNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.paintSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.paintSW(d,n,y,q,x,E,Ua,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),d.close(),D.moveSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintSWInner(d,n,y,q,x,E,Ua,M,na,Ha),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),D.paintSEInner(d,n,y,q,x,E,Ta,M,na),D.paintRightInner(d,-n,y,q,x,E,Sa,M,na,Fa,Ja),D.paintNEInner(d,n,y,q,x,E,Sa,M,na),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),D.paintNWInner(d,n,y,q,x,E,Qa,M,na),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),d.close(),d.fillAndStroke())):"frame"!=wa?(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),"double"==wa&&(D.moveNEInner(d,n,y,q,x,E,Sa,M,na,Ja),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,x,E,Qa,M,Ga),D.paintTop(d,n,y,q,x,E,Sa,M,Ja),D.lineNEInner(d,n,y,-q,x,E,Sa,M,na,Ja),D.paintTopInner(d,n,y,q,x,E,Qa,M,na,Ga,Fa),d.close(),d.fillAndStroke()):"frame"!=wa?(d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),"double"==wa&&(D.moveSEInner(d,n,y,q,x,E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,x,E,Sa,M,Fa),D.paintRight(d,n,y,q,x,E,Ta,M,Ha),D.lineSEInner(d,n,y,q,x,E,Ta,M,na,Ha),D.paintRightInner(d,n,y,q,x,E,Sa,M,na,Fa,Ja),d.close(),d.fillAndStroke()):"frame"!=wa?(d.begin(),D.moveSE(d,-n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),"double"==wa&&(D.moveSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,x,E,Ta,M,Ja),D.paintBottom(d,n,y,q,x,E,Ua,M,Ga),D.lineSWInner(d,n,y,q,x,E,Ua,M,na,Ga),D.paintBottomInner(d,n,y,q,x,E,Ta,M,na,Ja,Ha),d.close(),d.fillAndStroke()):"frame"!=wa?(d.begin(),D.moveSW(d,n,y,q,x,E,Qa,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),"double"==wa&&(D.moveNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,-n,y,q,x,E,Ua,M,na,Ha,Ga)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,x,E,Qa,M,Ha),D.paintLeft(d,n,y,q,x,E,Qa,M,Fa),D.lineNWInner(d,n,y,q,x,E,Qa,M,na,Fa,Ga),D.paintLeftInner(d,n,y,q,x,E,Ua,M,na,Ha,Ga),d.close(),d.fillAndStroke());d.begin();D.paintFolds(d,n,y,q,x,E,Qa,Sa,Ta,Ua,M,Fa,Ja,Ha,Ga);d.stroke()};Ra.prototype.moveNW=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.moveTo(0,0):d.moveTo(0,ha)};Ra.prototype.moveNE=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==-D||!M?d.moveTo(q,0):d.moveTo(q-ha,0)};Ra.prototype.moveSE=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.moveTo(q,x):d.moveTo(q,x-ha)};Ra.prototype.moveSW=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.moveTo(0,x):d.moveTo(ha,x)};Ra.prototype.paintNW=function(d,n,y,q,x,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,0,n,ha,-0)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(ha,0);else d.lineTo(0,0)};Ra.prototype.paintTop=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(q,0):d.lineTo(q-ha,0)};Ra.prototype.paintNE=function(d,n,y,q,x,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,0,n,q,ha)}else("snip"==E||"default"==E&&"snip"==-D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q,ha);else d.lineTo(q,0)};Ra.prototype.paintRight=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(q,x):d.lineTo(q,x-ha)};Ra.prototype.paintLeft=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(0,0):d.lineTo(0,ha)};Ra.prototype.paintSE=function(d,n,y,q,x,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==-E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,0,n,q-ha,x)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-ha,x);else d.lineTo(q,x)};Ra.prototype.paintBottom=function(d,n,y,q,x,D,E,ha,M){"square"==E||"default"==E&&"square"==D||!M?d.lineTo(0,x):d.lineTo(ha,x)};Ra.prototype.paintSW=function(d,n,y,q,x,D,E,ha,M){if(M)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(ha,ha,0,-0,n,0,x-ha)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(0,x-ha);else d.lineTo(0,x)};Ra.prototype.paintNWInner=function(d,n,y,q,x,D,E,ha,M){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,M,.5*M+ha);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,ha+M,0,0,1,M,M+ha);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(M,.5*M+ha);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(M+ha,M+ha),d.lineTo(M,M+ha)};Ra.prototype.paintTopInner=-function(d,n,y,q,x,D,E,ha,M,wa,na){wa||na?!wa&&na?d.lineTo(0,M):wa&&!na?d.lineTo(M,0):wa?"square"==E||"default"==E&&"square"==D?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(ha+.5*M,M):d.lineTo(ha+M,M):d.lineTo(0,M):d.lineTo(0,0)};Ra.prototype.paintNEInner=function(d,n,y,q,x,D,E,ha,M){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,q-ha-.5*M,M);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,ha+M,0,0,1,-q-ha-M,M);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(q-ha-.5*M,M);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-ha-M,ha+M),d.lineTo(q-ha-M,M)};Ra.prototype.paintRightInner=function(d,n,y,q,x,D,E,ha,M,wa,na){wa||na?!wa&&na?d.lineTo(q-M,0):wa&&!na?d.lineTo(q,M):wa?"square"==E||"default"==E&&"square"==D?d.lineTo(q-M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-M,ha+.5*M):d.lineTo(q-M,ha+M):d.lineTo(q-M,0):d.lineTo(q,0)};Ra.prototype.paintLeftInner=-function(d,n,y,q,x,D,E,ha,M,wa,na){wa||na?!wa&&na?d.lineTo(M,x):wa&&!na?d.lineTo(0,x-M):wa?"square"==E||"default"==E&&"square"==D?d.lineTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(M,x-ha-.5*M):d.lineTo(M,x-ha-M):d.lineTo(M,x):d.lineTo(0,x)};Ra.prototype.paintSEInner=function(d,n,y,q,x,D,E,ha,M){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,q-M,x-ha-.5*M);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,-ha+M,0,0,1,q-M,x-ha-M);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(q-M,x-ha-.5*M);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-ha-M,x-ha-M),d.lineTo(q-M,x-ha-M)};Ra.prototype.paintBottomInner=function(d,n,y,q,x,D,E,ha,M,wa,na){wa||na?!wa&&na?d.lineTo(q,x-M):wa&&!na?d.lineTo(q-M,x):"square"==E||"default"==E&&"square"==D||!wa?d.lineTo(q-M,x-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-ha-.5*M,x-M):d.lineTo(q-ha-M,x-M):d.lineTo(q,x)};Ra.prototype.paintSWInner=-function(d,n,y,q,x,D,E,ha,M,wa){if(!wa)d.lineTo(M,x);else if("square"==E||"default"==E&&"square"==D)d.lineTo(M,x-M);else if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(ha-.5*M,ha-.5*M,0,0,0,ha+.5*M,x-M);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(ha+M,ha+M,0,0,1,ha+M,x-M);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(ha+.5*M,x-M);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(M+ha,x-ha-M),d.lineTo(M+ha,x-M)};Ra.prototype.moveSWInner=function(d,n,y,q,x,D,E,ha,M,wa){wa?-"square"==E||"default"==E&&"square"==D?d.moveTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(M,x-ha-.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(M,x-ha-M):d.moveTo(0,x-M)};Ra.prototype.lineSWInner=function(d,n,y,q,x,D,E,ha,M,wa){wa?"square"==E||"default"==E&&"square"==D?d.lineTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(M,x-ha-.5*M):("invRound"==E||-"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(M,x-ha-M):d.lineTo(0,x-M)};Ra.prototype.moveSEInner=function(d,n,y,q,x,D,E,ha,M,wa){wa?"square"==E||"default"==E&&"square"==D?d.moveTo(q-M,x-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-M,x-ha-.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(q-M,x-ha-M):d.moveTo(q-M,x)};Ra.prototype.lineSEInner=function(d,n,y,q,x,D,E,ha,M,wa){wa?"square"==-E||"default"==E&&"square"==D?d.lineTo(q-M,x-M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-M,x-ha-.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-M,x-ha-M):d.lineTo(q-M,x)};Ra.prototype.moveNEInner=function(d,n,y,q,x,D,E,ha,M,wa){wa?"square"==E||"default"==E&&"square"==D||wa?d.moveTo(q-M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-M,ha+.5*M):("invRound"==E||-"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(q-M,ha+M):d.moveTo(q,M)};Ra.prototype.lineNEInner=function(d,n,y,q,x,D,E,ha,M,wa){wa?"square"==E||"default"==E&&"square"==D||wa?d.lineTo(q-M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-M,ha+.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-M,ha+M):d.lineTo(q,M)};Ra.prototype.moveNWInner=function(d,n,y,q,x,D,E,ha,M,wa,na){wa||na?-!wa&&na?d.moveTo(M,0):wa&&!na?d.moveTo(0,M):"square"==E||"default"==E&&"square"==D?d.moveTo(M,M):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(M,ha+.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(M,ha+M):d.moveTo(0,0)};Ra.prototype.lineNWInner=function(d,n,y,q,x,D,E,ha,M,wa,na){wa||na?!wa&&na?d.lineTo(M,0):wa&&!na?d.lineTo(0,M):"square"==E||"default"==E&&"square"==D?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==-D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(M,ha+.5*M):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(M,ha+M):d.lineTo(0,0)};Ra.prototype.paintFolds=function(d,n,y,q,x,D,E,ha,M,wa,na,Va,gb,bb,Fa){if("fold"==D||"fold"==E||"fold"==ha||"fold"==M||"fold"==wa)("fold"==E||"default"==E&&"fold"==D)&&Va&&Fa&&(d.moveTo(0,na),d.lineTo(na,na),d.lineTo(na,0)),("fold"==ha||"default"==ha&&"fold"==D)&&Va&&gb&&(d.moveTo(q-na,0),d.lineTo(q-na,na),d.lineTo(q,na)),("fold"==-M||"default"==M&&"fold"==D)&&bb&&gb&&(d.moveTo(q-na,x),d.lineTo(q-na,x-na),d.lineTo(q,x-na)),("fold"==wa||"default"==wa&&"fold"==D)&&bb&&Fa&&(d.moveTo(0,x-na),d.lineTo(na,x-na),d.lineTo(na,x))};mxCellRenderer.registerShape(Ra.prototype.cst.RECT2,Ra);Ra.prototype.constraints=null;mxUtils.extend(Oa,mxConnector);Oa.prototype.origPaintEdgeShape=Oa.prototype.paintEdgeShape;Oa.prototype.paintEdgeShape=function(d,n,y){for(var q=[],x=0;x<n.length;x++)q.push(mxUtils.clone(n[x]));x=d.state.dashed;var D=d.state.fixDash;-Oa.prototype.origPaintEdgeShape.apply(this,[d,q,y]);3<=d.state.strokeWidth&&(q=mxUtils.getValue(this.style,"fillColor",null),null!=q&&(d.setStrokeColor(q),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(x,D),Oa.prototype.origPaintEdgeShape.apply(this,[d,n,y])))};mxCellRenderer.registerShape("filledEdge",Oa);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var n=this.editorUi.getSelectionState(),-y=d.apply(this,arguments);"umlFrame"==n.style.shape&&y.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return y}}();mxMarker.addMarker("dash",function(d,n,y,q,x,D,E,ha,M,wa){var na=x*(E+M+1),Va=D*(E+M+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.stroke()}});mxMarker.addMarker("box",function(d,n,y,q,x,D,E,ha,M,wa){var na=x*(E+M+1),Va=D*(E+M+1),gb=q.x+na/2,bb=q.y+Va/2;q.x-=na;q.y-=Va;return function(){d.begin();-d.moveTo(gb-na/2-Va/2,bb-Va/2+na/2);d.lineTo(gb-na/2+Va/2,bb-Va/2-na/2);d.lineTo(gb+Va/2-3*na/2,bb-3*Va/2-na/2);d.lineTo(gb-Va/2-3*na/2,bb-3*Va/2+na/2);d.close();wa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,n,y,q,x,D,E,ha,M,wa){var na=x*(E+M+1),Va=D*(E+M+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.moveTo(q.x-na/2+Va/2,q.y-Va/2-na/2);d.lineTo(q.x-Va/2-3*na/2,q.y-3*Va/2+na/2);d.stroke()}});mxMarker.addMarker("circle",-kb);mxMarker.addMarker("circlePlus",function(d,n,y,q,x,D,E,ha,M,wa){var na=q.clone(),Va=kb.apply(this,arguments),gb=x*(E+2*M),bb=D*(E+2*M);return function(){Va.apply(this,arguments);d.begin();d.moveTo(na.x-x*M,na.y-D*M);d.lineTo(na.x-2*gb+x*M,na.y-2*bb+D*M);d.moveTo(na.x-gb-bb+D*M,na.y-bb+gb-x*M);d.lineTo(na.x+bb-gb-D*M,na.y-bb-gb+x*M);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,n,y,q,x,D,E,ha,M,wa){var na=x*(E+M+1),Va=D*(E+M+1),gb=q.clone();q.x-=na;q.y-=Va;return function(){d.begin();-d.moveTo(gb.x-Va,gb.y+na);d.quadTo(q.x-Va,q.y+na,q.x,q.y);d.quadTo(q.x+Va,q.y-na,gb.x+Va,gb.y-na);d.stroke()}});mxMarker.addMarker("async",function(d,n,y,q,x,D,E,ha,M,wa){n=x*M*1.118;y=D*M*1.118;x*=E+M;D*=E+M;var na=q.clone();na.x-=n;na.y-=y;q.x+=-x-n;q.y+=-D-y;return function(){d.begin();d.moveTo(na.x,na.y);ha?d.lineTo(na.x-x-D/2,na.y-D+x/2):d.lineTo(na.x+D/2-x,na.y-D-x/2);d.lineTo(na.x-x,na.y-D);d.close();wa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:-2;return function(n,y,q,x,D,E,ha,M,wa,na){D*=ha+wa;E*=ha+wa;var Va=x.clone();return function(){n.begin();n.moveTo(Va.x,Va.y);M?n.lineTo(Va.x-D-E/d,Va.y-E+D/d):n.lineTo(Va.x+E/d-D,Va.y-E-D/d);n.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var db=function(d,n,y){return mb(d,["width"],n,function(q,x,D,E,ha){ha=d.shape.getEdgeWidth()*d.view.scale+y;return new mxPoint(E.x+x*q/4+D*ha/2,E.y+D*q/4-x*ha/2)},function(q,x,D,E,ha,M){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));d.style.width=-Math.round(2*q)/d.view.scale-y})},mb=function(d,n,y,q,x){return ib(d,n,function(D){var E=d.absolutePoints;if(null!=E&&0<E.length){var ha=E.length-1;D=d.view.translate;var M=d.view.scale,wa=y?E[0]:E[ha];E=y?E[1]:E[ha-1];ha=E.x-wa.x;var na=E.y-wa.y,Va=Math.sqrt(ha*ha+na*na);wa=q.call(this,Va,ha/Va,na/Va,wa,E);return new mxPoint(wa.x/M-D.x,wa.y/M-D.y)}return null},function(D,E,ha){var M=d.absolutePoints,wa=M.length-1;D=d.view.translate;var na=d.view.scale,Va=y?M[0]:M[wa];M=y?M[1]:M[wa-1];wa=M.x-Va.x;-var gb=M.y-Va.y,bb=Math.sqrt(wa*wa+gb*gb);E.x=(E.x+D.x)*na;E.y=(E.y+D.y)*na;x.call(this,bb,wa/bb,gb/bb,Va,M,E,ha)})},ub=function(d,n){return function(y){return[mb(y,["startWidth"],!0,function(q,x,D,E,ha){ha=mxUtils.getNumber(y.style,"startWidth",d)*y.view.scale+n;return new mxPoint(E.x+x*q/4+D*ha/2,E.y+D*q/4-x*ha/2)},function(q,x,D,E,ha,M){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));y.style.startWidth=Math.round(2*q)/y.view.scale-n})]}},eb=function(d){return function(n){return[ib(n,-["arrowWidth","arrowSize"],function(y){var q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Ia.prototype.arrowWidth))),x=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",Ia.prototype.arrowSize)));return new mxPoint(y.x+(1-x)*y.width,y.y+(1-q)*y.height/2)},function(y,q){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(y.y+y.height/2-q.y)/y.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(y.x+y.width-q.x)/y.width))})]}},ob=function(d){return function(n){return[ib(n,-["size"],function(y){var q=Math.max(0,Math.min(.5*y.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(y.x,y.y+q)},function(y,q){this.state.style.size=Math.max(0,q.y-y.y)},!0)]}},tb=function(d,n,y){return function(q){var x=[ib(q,["size"],function(D){var E=Math.max(0,Math.min(D.width,Math.min(D.height,parseFloat(mxUtils.getValue(this.state.style,"size",n)))))*d;return new mxPoint(D.x+E,D.y+E)},function(D,E){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(D.width,-E.x-D.x),Math.min(D.height,E.y-D.y)))/d)},!1)];y&&mxUtils.getValue(q.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(xb(q));return x}},pb=function(d,n,y,q,x){y=null!=y?y:.5;return function(D){var E=[ib(D,["size"],function(ha){var M=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",M?x:d));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,wa*(M?1:ha.width))),ha.getCenterY())},function(ha,M,wa){ha=null!=x&&"0"!=mxUtils.getValue(this.state.style,-"fixedSize","0")?M.x-ha.x:Math.max(0,Math.min(y,(M.x-ha.x)/ha.width));this.state.style.size=ha},!1,q)];n&&mxUtils.getValue(D.style,mxConstants.STYLE_ROUNDED,!1)&&E.push(xb(D));return E}},wb=function(d,n,y){d=null!=d?d:.5;return function(q){var x=[ib(q,["size"],function(D){var E=null!=y?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",E?y:n)));return new mxPoint(D.x+Math.min(.75*D.width*d,ha*(E?.75:.75*D.width)),D.y+D.height/-4)},function(D,E){D=null!=y&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?E.x-D.x:Math.max(0,Math.min(d,(E.x-D.x)/D.width*.75));this.state.style.size=D},!1,!0)];mxUtils.getValue(q.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(xb(q));return x}},vb=function(){return function(d){var n=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(xb(d));return n}},xb=function(d,n){return ib(d,[mxConstants.STYLE_ARCSIZE],function(y){var q=null!=n?n:y.height/8;if("1"==mxUtils.getValue(d.style,-mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var x=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(y.x+y.width-Math.min(y.width/2,x),y.y+q)}x=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(y.x+y.width-Math.min(Math.max(y.width/2,y.height/2),Math.min(y.width,y.height)*x),y.y+q)},function(y,q,x){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?-this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(y.width,2*(y.x+y.width-q.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(y.width-q.x+y.x)/Math.min(y.width,y.height))))})},ib=function(d,n,y,q,x,D,E){var ha=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(wa){for(var na=0;na<n.length;na++)this.copyStyle(n[na]);E&&E(wa)};ha.getPosition=y;ha.setPosition=q;ha.ignoreGrid=null!=x?x:!0;if(D){var M=ha.positionChanged;-ha.positionChanged=function(){M.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ha},hb={link:function(d){return[db(d,!0,10),db(d,!1,10)]},flexArrow:function(d){var n=d.view.graph.gridSize/d.view.scale,y=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(mb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,x,D,E,ha){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ha=3*mxUtils.getNumber(d.style,-mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ha+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)-x*q/2)},function(q,x,D,E,ha,M,wa){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||-mxEvent.isControlDown(wa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),y.push(mb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,x,D,E,ha){q=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;-ha=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ha+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)-x*q/2)},function(q,x,D,E,ha,M,wa){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/-d.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<n&&(d.style.startWidth=-d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(mb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,x,D,E,ha){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ha=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ha+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)+x*q/2)},function(q,-x,D,E,ha,M,wa){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<-n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),y.push(mb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,x,D,E,ha){q=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ha=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ha+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(ha+d.shape.strokewidth*d.view.scale)+x*q/2)},function(q,x,D,E,ha,M,-wa){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ha.x,ha.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(wa.getEvent())||-(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<n&&(d.style.endWidth=d.style.startWidth))})));return y},swimlane:function(d){var n=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var y=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));n.push(xb(d,-y/2))}n.push(ib(d,[mxConstants.STYLE_STARTSIZE],function(q){var x=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(q.getCenterX(),q.y+Math.max(0,Math.min(q.height,x))):new mxPoint(q.x+Math.max(0,Math.min(q.width,x)),q.getCenterY())},function(q,x){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,-Math.min(q.height,x.y-q.y))):Math.round(Math.max(0,Math.min(q.width,x.x-q.x)))},!1,null,function(q){var x=d.view.graph;if(!mxEvent.isShiftDown(q.getEvent())&&!mxEvent.isControlDown(q.getEvent())&&(x.isTableRow(d.cell)||x.isTableCell(d.cell))){q=x.getSwimlaneDirection(d.style);var D=x.model.getParent(d.cell);D=x.model.getChildCells(D,!0);for(var E=[],ha=0;ha<D.length;ha++)D[ha]!=d.cell&&x.isSwimlane(D[ha])&&x.getSwimlaneDirection(x.getCurrentCellStyle(D[ha]))==q&&E.push(D[ha]);x.setCellStyles(mxConstants.STYLE_STARTSIZE,-d.style[mxConstants.STYLE_STARTSIZE],E)}}));return n},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(d){return[ib(d,["size"],function(n){var y=Math.max(0,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(n.getCenterX(),n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},umlFrame:function(d){return[ib(d,["width","height"],function(n){var y=Math.max(ba.prototype.corner,-Math.min(n.width,mxUtils.getValue(this.state.style,"width",ba.prototype.width))),q=Math.max(1.5*ba.prototype.corner,Math.min(n.height,mxUtils.getValue(this.state.style,"height",ba.prototype.height)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.width=Math.round(Math.max(ba.prototype.corner,Math.min(n.width,y.x-n.x)));this.state.style.height=Math.round(Math.max(1.5*ba.prototype.corner,Math.min(n.height,y.y-n.y)))},!1)]},process:function(d){var n=[ib(d,["size"],function(y){var q=-"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),x=parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size));return q?new mxPoint(y.x+x,y.y+y.height/4):new mxPoint(y.x+y.width*x,y.y+y.height/4)},function(y,q){y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*y.width,q.x-y.x)):Math.max(0,Math.min(.5,(q.x-y.x)/y.width));this.state.style.size=y},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(xb(d));return n},cross:function(d){return[ib(d,-["size"],function(n){var y=Math.min(n.width,n.height);y=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Za.prototype.size)))*y/2;return new mxPoint(n.getCenterX()-y,n.getCenterY()-y)},function(n,y){var q=Math.min(n.width,n.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,n.getCenterY()-y.y)/q*2,Math.max(0,n.getCenterX()-y.x)/q*2)))})]},note:function(d){return[ib(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,-"size",F.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},note2:function(d){return[ib(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,-n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},manualInput:function(d){var n=[ib(d,["size"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",Ea.prototype.size)));return new mxPoint(y.x+y.width/4,y.y+3*q/4)},function(y,q){this.state.style.size=Math.round(Math.max(0,Math.min(y.height,4*(q.y-y.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(xb(d));return n},dataStorage:function(d){return[ib(d,["size"],function(n){var y="0"!=mxUtils.getValue(this.state.style,-"fixedSize","0"),q=parseFloat(mxUtils.getValue(this.state.style,"size",y?Pa.prototype.fixedSize:Pa.prototype.size));return new mxPoint(n.x+n.width-q*(y?1:n.width),n.getCenterY())},function(n,y){n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(n.width,n.x+n.width-y.x)):Math.max(0,Math.min(1,(n.x+n.width-y.x)/n.width));this.state.style.size=n},!1)]},callout:function(d){var n=[ib(d,["size","position"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,-"size",ma.prototype.size))),x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ma.prototype.position)));mxUtils.getValue(this.state.style,"base",ma.prototype.base);return new mxPoint(y.x+x*y.width,y.y+y.height-q)},function(y,q){mxUtils.getValue(this.state.style,"base",ma.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(y.height,y.y+y.height-q.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),ib(d,["position2"],function(y){var q=-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ma.prototype.position2)));return new mxPoint(y.x+q*y.width,y.y+y.height)},function(y,q){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),ib(d,["base"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",ma.prototype.size))),x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ma.prototype.position))),D=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,-"base",ma.prototype.base)));return new mxPoint(y.x+Math.min(y.width,x*y.width+D),y.y+y.height-q)},function(y,q){var x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ma.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(y.width,q.x-y.x-x*y.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(xb(d));return n},internalStorage:function(d){var n=[ib(d,["dx","dy"],function(y){var q=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,-"dx",Ka.prototype.dx))),x=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"dy",Ka.prototype.dy)));return new mxPoint(y.x+q,y.y+x)},function(y,q){this.state.style.dx=Math.round(Math.max(0,Math.min(y.width,q.x-y.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(y.height,q.y-y.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(xb(d));return n},module:function(d){return[ib(d,["jettyWidth","jettyHeight"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,-"jettyWidth",ua.prototype.jettyWidth))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"jettyHeight",ua.prototype.jettyHeight)));return new mxPoint(n.x+y/2,n.y+2*q)},function(n,y){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(n.height,y.y-n.y))/2)})]},corner:function(d){return[ib(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",Ma.prototype.dx))),-q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",Ma.prototype.dy)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.dx=Math.round(Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},tee:function(d){return[ib(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",Wa.prototype.dx))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",Wa.prototype.dy)));-return new mxPoint(n.x+(n.width+y)/2,n.y+q)},function(n,y){this.state.style.dx=Math.round(Math.max(0,2*Math.min(n.width/2,y.x-n.x-n.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},singleArrow:eb(1),doubleArrow:eb(.5),"mxgraph.arrows2.wedgeArrow":ub(20,20),"mxgraph.arrows2.wedgeArrowDashed":ub(20,20),"mxgraph.arrows2.wedgeArrowDashed2":ub(20,20),folder:function(d){return[ib(d,["tabWidth","tabHeight"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,-"tabWidth",k.prototype.tabWidth))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"tabHeight",k.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",k.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(y=n.width-y);return new mxPoint(n.x+y,n.y+q)},function(n,y){var q=Math.max(0,Math.min(n.width,y.x-n.x));mxUtils.getValue(this.state.style,"tabPosition",k.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=n.width-q);this.state.style.tabWidth=Math.round(q);this.state.style.tabHeight=-Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},document:function(d){return[ib(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",I.prototype.size))));return new mxPoint(n.x+3*n.width/4,n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},tape:function(d){return[ib(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));-return new mxPoint(n.getCenterX(),n.y+y*n.height/2)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(y.y-n.y)/n.height*2))},!1)]},isoCube2:function(d){return[ib(d,["isoAngle"],function(n){var y=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",R.isoAngle))))*Math.PI/200;return new mxPoint(n.x,n.y+Math.min(n.width*Math.tan(y),.5*n.height))},function(n,y){this.state.style.isoAngle=Math.max(0,50*(y.y-n.y)/n.height)},!0)]},cylinder2:ob(T.prototype.size),cylinder3:ob(c.prototype.size),-offPageConnector:function(d){return[ib(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(n.getCenterX(),n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},"mxgraph.basic.rect":function(d){var n=[Graph.createHandle(d,["size"],function(y){var q=Math.max(0,Math.min(y.width/2,y.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));-return new mxPoint(y.x+q,y.y+q)},function(y,q){this.state.style.size=Math.round(100*Math.max(0,Math.min(y.height/2,y.width/2,q.x-y.x)))/100})];d=Graph.createHandle(d,["indent"],function(y){var q=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(y.x+.75*y.width,y.y+q*y.height/200)},function(y,q){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(q.y-y.y)/y.height)))/100});n.push(d);return n},step:pb(la.prototype.size,!0,null,-!0,la.prototype.fixedSize),hexagon:pb(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:pb(O.prototype.size,!1),display:pb(ab.prototype.size,!1),cube:tb(1,m.prototype.size,!1),card:tb(.5,z.prototype.size,!0),loopLimit:tb(.5,Q.prototype.size,!0),trapezoid:wb(.5,K.prototype.size,K.prototype.fixedSize),parallelogram:wb(1,L.prototype.size,L.prototype.fixedSize)};Graph.createHandle=ib;Graph.handleFactory=hb;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=-function(){var d=Bb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var n=this.state.style.shape;null==mxCellRenderer.defaultShapes[n]&&null==mxStencilRegistry.getStencil(n)?n=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(n=mxConstants.SHAPE_SWIMLANE);n=hb[n];null==n&&null!=this.state.shape&&this.state.shape.isRoundable()&&(n=hb[mxConstants.SHAPE_RECTANGLE]);null!=n&&(n=n(this.state),null!=n&&(d=null==d?n:d.concat(n)))}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=hb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var rb=new mxPoint(1,0),yb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);rb=mxUtils.getRotatedPoint(rb,Math.cos(zb),Math.sin(zb));var qb=mxUtils.toRadians(-150);yb=mxUtils.getRotatedPoint(yb,Math.cos(qb),Math.sin(qb));mxEdgeStyle.IsometricConnector=function(d,-n,y,q,x){var D=d.view;q=null!=q&&0<q.length?q[0]:null;var E=d.absolutePoints,ha=E[0];E=E[E.length-1];null!=q&&(q=D.transformControlPoint(d,q));null==ha&&null!=n&&(ha=new mxPoint(n.getCenterX(),n.getCenterY()));null==E&&null!=y&&(E=new mxPoint(y.getCenterX(),y.getCenterY()));var M=rb.x,wa=rb.y,na=yb.x,Va=yb.y,gb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=ha){d=function(Fa,Ja,Ha){Fa-=bb.x;var Ga=Ja-bb.y;Ja=(Va*Fa-na*Ga)/(M*Va-wa*na);Fa=(wa*Fa-M*Ga)/(wa*na-M*Va);gb?-(Ha&&(bb=new mxPoint(bb.x+M*Ja,bb.y+wa*Ja),x.push(bb)),bb=new mxPoint(bb.x+na*Fa,bb.y+Va*Fa)):(Ha&&(bb=new mxPoint(bb.x+na*Fa,bb.y+Va*Fa),x.push(bb)),bb=new mxPoint(bb.x+M*Ja,bb.y+wa*Ja));x.push(bb)};var bb=ha;null==q&&(q=new mxPoint(ha.x+(E.x-ha.x)/2,ha.y+(E.y-ha.y)/2));d(q.x,q.y,!0);d(E.x,E.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Cb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,n){if(n==mxEdgeStyle.IsometricConnector){var y=-new mxElbowEdgeHandler(d);y.snapToTerminals=!1;return y}return Cb.apply(this,arguments)};A.prototype.constraints=[];G.prototype.getConstraints=function(d,n,y){d=[];var q=Math.tan(mxUtils.toRadians(30)),x=(.5-q)/2;q=Math.min(n,y/(.5+q));n=(n-q)/2;y=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y+.25*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+.5*q,y+q*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+q,y+.25*q));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,n+q,y+.75*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+.5*q,y+(1-x)*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y+.75*q));return d};R.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;q=Math.min(n*Math.tan(q),.5*y);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,-.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));return d};ma.prototype.getConstraints=function(d,n,y){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var q=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,-"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,-0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y-q)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y-q)));n>=2*q&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,+mxUtils.bind(this,ea.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ea.prototype.arcTo)}function X(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function ha(){mxActor.call(this)}function ma(){mxActor.call(this)}function Y(){mxActor.call(this)}function la(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function A(){mxShape.call(this)}function J(){mxShape.call(this)}function U(){mxEllipse.call(this)}+function P(){mxShape.call(this)}function T(){mxShape.call(this)}function W(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ja(){mxShape.call(this)}function pa(){mxShape.call(this)}function sa(){mxShape.call(this)}function qa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Ba(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ea(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ma(){mxActor.call(this)}function Ha(){mxRectangleShape.call(this)}function Aa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Za(){mxActor.call(this)}function La(){mxActor.call(this)}function $a(){mxActor.call(this)}function Da(){mxActor.call(this)}function x(){mxActor.call(this)}function M(){mxActor.call(this)}function Q(){mxActor.call(this)}function V(){mxActor.call(this)}function ia(){mxEllipse.call(this)}+function ka(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Wa(){mxActor.call(this)}function Xa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Oa(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=+!0;this.indent=2;this.rectOutline="single"}function Qa(){mxConnector.call(this)}function kb(d,n,y,q,v,D,E,fa,L,va){E+=L;var na=q.clone();q.x-=v*(2*E+L);q.y-=D*(2*E+L);v*=E+L;D*=E+L;return function(){d.ellipse(na.x-v-E,na.y-D-E,2*E,2*E);va?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var n=0;n<this.line.length;n++){var y=this.line[n];null!=y&&(y=new mxRectangle(y.x,y.y,this.strokewidth,this.strokewidth),null==+d?d=y:d.add(y))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,n,y,q,v){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,n,y,q){if(null!=n){var v=null;d.begin();for(var D=0;D<n.length;D++){var E=n[D];null!=E&&(null==v?d.moveTo(E.x+y,E.y+q):null!=v&&d.lineTo(E.x+y,E.y+q));v=E}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var n=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var y=null,+q=0;q<this.line.length&&!n;q++){var v=this.line[q];null!=v&&null!=y&&(n=mxUtils.rectangleIntersectsSegment(d,y,v));y=v}return n};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(d,n,y,q,v){var D=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):+!1,E=this.isHorizontal(),fa=this.getTitleSize();0==fa||this.outline?Fa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-n,-y));D||this.outline||!(E&&fa<v||!E&&fa<q)||this.paintForeground(d,n,y,q,v)};e.prototype.paintForeground=function(d,n,y,q,v){if(null!=this.state){var D=this.flipH,E=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var fa=D;D=E;E=fa}d.rotate(-this.getShapeRotation(),+D,E,n+q/2,y+v/2);s=this.scale;n=this.bounds.x/s;y=this.bounds.y/s;q=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(d,n,y,q,v)}};e.prototype.paintTableForeground=function(d,n,y,q,v){q=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(v=0;v<q.length;v++)b.prototype.paintTableLine(d,q[v],n,y)};e.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?+d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(g,e);g.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",g);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(q,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)))),fa=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,v);d.lineTo(D,v);d.lineTo(0,v-D);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(0,0),d.lineTo(q-D,0),d.lineTo(q,D),+d.lineTo(D,D),d.close(),d.fill()),0!=fa&&(d.setFillAlpha(Math.abs(fa)),d.setFillColor(0>fa?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(D,D),d.lineTo(D,v),d.lineTo(0,v-D),d.close(),d.fill()),d.begin(),d.moveTo(D,v),d.lineTo(D,D),d.lineTo(0,0),d.moveTo(D,D),d.lineTo(q,D),d.end(),d.stroke())};m.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",+m);var cb=Math.tan(mxUtils.toRadians(30)),Ya=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(u,mxConnector);u.prototype.paintEdgeShape=function(d,n){var y=this.createMarker(d,n,!0),q=this.createMarker(d,n,!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!=y&&y();null!=q&&q()};mxCellRenderer.registerShape("wire",u);mxUtils.extend(p,mxCylinder);p.prototype.size=6;p.prototype.paintVertexShape=function(d,n,y,q,v){d.setFillColor(this.stroke);var D=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(n+.5*(q-D),y+.5*(v-D),D,D);d.fill();d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};mxCellRenderer.registerShape("waypoint",+p);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/cb);d.translate((q-n)/2,(v-n)/2+n/4);d.moveTo(0,.25*n);d.lineTo(.5*n,n*Ya);d.lineTo(n,.25*n);d.lineTo(.5*n,(.5-Ya)*n);d.lineTo(0,.25*n);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",B);mxUtils.extend(H,mxCylinder);H.prototype.size=20;H.prototype.redrawPath=function(d,n,y,q,v,D){n=Math.min(q,v/(.5+cb));D?(d.moveTo(0,.25*n),d.lineTo(.5*n,(.5-Ya)*n),d.lineTo(n,.25*n),d.moveTo(.5*+n,(.5-Ya)*n),d.lineTo(.5*n,(1-Ya)*n)):(d.translate((q-n)/2,(v-n)/2),d.moveTo(0,.25*n),d.lineTo(.5*n,n*Ya),d.lineTo(n,.25*n),d.lineTo(n,.75*n),d.lineTo(.5*n,(1-Ya)*n),d.lineTo(0,.75*n),d.close());d.end()};mxCellRenderer.registerShape("isoCube",H);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,n,y,q,v,D){n=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(D&&null!=this.fill||!D&&null==this.fill)d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,+n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,-n);D||(d.moveTo(0,n),d.curveTo(0,-n/3,q,-n/3,q,n),d.lineTo(q,v-n),d.curveTo(q,v+n/3,0,v+n/3,0,v-n),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(G,mxCylinder);G.prototype.size=30;G.prototype.darkOpacity=+0;G.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(q,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(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,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(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.close(),d.fill()),d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.end(),d.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(O,G);mxCellRenderer.registerShape("note2",O);O.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=+15;R.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;D=Math.min(q*Math.tan(D),.5*v);d.translate(n,y);d.begin();d.moveTo(.5*q,0);d.lineTo(q,D);d.lineTo(q,v-D);d.lineTo(.5*q,v);d.lineTo(0,v-D);d.lineTo(0,D);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,D);d.lineTo(.5*q,2*D);d.lineTo(q,D);d.moveTo(.5*q,2*D);d.lineTo(.5*q,v);d.stroke()};mxCellRenderer.registerShape("isoCube2",+R);mxUtils.extend(c,mxShape);c.prototype.size=15;c.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(n,y);0==D?(d.rect(0,0,q,v),d.fillAndStroke()):(d.begin(),d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D),d.lineTo(q,v-D),d.arcTo(.5*q,D,0,0,1,.5*q,v),d.arcTo(.5*q,D,0,0,1,0,v-D),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*+q,D,0,0,1,0,D),d.stroke())};mxCellRenderer.registerShape("cylinder2",c);mxUtils.extend(f,mxCylinder);f.prototype.size=15;f.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"lid",!0);d.translate(n,y);0==D?(d.rect(0,0,q,v),d.fillAndStroke()):(d.begin(),E?(d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D)):(d.moveTo(0,0),d.arcTo(.5*q,D,0,0,0,.5*q,D),d.arcTo(.5*q,D,+0,0,0,q,0)),d.lineTo(q,v-D),d.arcTo(.5*q,D,0,0,1,.5*q,v),d.arcTo(.5*q,D,0,0,1,0,v-D),d.close(),d.fillAndStroke(),d.setShadow(!1),E&&(d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*q,D,0,0,1,0,D),d.stroke()))};mxCellRenderer.registerShape("cylinder3",f);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q/2,.5*v,q,0);d.quadTo(.5*q,v/2,q,v);d.quadTo(q/2,.5*v,0,v);d.quadTo(.5*q,v/2,0,0);d.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(t,+mxCylinder);t.prototype.tabWidth=60;t.prototype.tabHeight=20;t.prototype.tabPosition="right";t.prototype.arcSize=.1;t.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var D=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),E=mxUtils.getValue(this.style,"rounded",!1),fa=mxUtils.getValue(this.style,+"absoluteArcSize",!1),L=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));fa||(L*=Math.min(q,v));L=Math.min(L,.5*q,.5*(v-y));n=Math.max(n,L);n=Math.min(q-L,n);E||(L=0);d.begin();"left"==D?(d.moveTo(Math.max(L,0),y),d.lineTo(Math.max(L,0),0),d.lineTo(n,0),d.lineTo(n,y)):(d.moveTo(q-n,y),d.lineTo(q-n,0),d.lineTo(q-Math.max(L,0),0),d.lineTo(q-Math.max(L,0),y));E?(d.moveTo(0,L+y),d.arcTo(L,L,0,0,1,L,y),d.lineTo(q-L,y),d.arcTo(L,L,0,0,1,q,L+y),d.lineTo(q,v-L),d.arcTo(L,L,0,0,1,q-L,v),d.lineTo(L,+v),d.arcTo(L,L,0,0,1,0,v-L)):(d.moveTo(0,y),d.lineTo(q,y),d.lineTo(q,v),d.lineTo(0,v));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(q-30,y+20),d.lineTo(q-20,y+10),d.lineTo(q-10,y+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",t);t.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,+"labelInHeader",!1)){var y=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var q=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(D*=Math.min(d.width,d.height));D=Math.min(D,.5*d.width,.5*(d.height-n));q||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width-+y),Math.min(d.height,d.height-n)):new mxRectangle(Math.min(d.width,d.width-y),0,D,Math.min(d.height,d.height-n))}return new mxRectangle(0,Math.min(d.height,n),0,0)}return null};mxUtils.extend(z,mxCylinder);z.prototype.arcSize=.1;z.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);var D=mxUtils.getValue(this.style,"rounded",!1),E=mxUtils.getValue(this.style,"absoluteArcSize",!1);n=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));y=mxUtils.getValue(this.style,"umlStateConnection",+null);E||(n*=Math.min(q,v));n=Math.min(n,.5*q,.5*v);D||(n=0);D=0;null!=y&&(D=10);d.begin();d.moveTo(D,n);d.arcTo(n,n,0,0,1,D+n,0);d.lineTo(q-n,0);d.arcTo(n,n,0,0,1,q,n);d.lineTo(q,v-n);d.arcTo(n,n,0,0,1,q-n,v);d.lineTo(D+n,v);d.arcTo(n,n,0,0,1,D,v-n);d.close();d.fillAndStroke();d.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(d.roundrect(q-40,v-20,10,10,3,3),d.stroke(),d.roundrect(q-20,v-20,10,10,3,3),d.stroke(),d.begin(),d.moveTo(q-30,v-15),d.lineTo(q-20,v-15),+d.stroke());"connPointRefEntry"==y?(d.ellipse(0,.5*v-10,20,20),d.fillAndStroke()):"connPointRefExit"==y&&(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(C,+mxActor);C.prototype.size=30;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(d,n,y,q,v){n=Math.max(0,Math.min(q,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,0),new mxPoint(q,0),new mxPoint(q,v),new mxPoint(0,v),new mxPoint(0,n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("card",C);mxUtils.extend(F,mxActor);F.prototype.size=+.4;F.prototype.redrawPath=function(d,n,y,q,v){n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,n/2);d.quadTo(q/4,1.4*n,q/2,n/2);d.quadTo(3*q/4,n*(1-1.4),q,n/2);d.lineTo(q,v-n/2);d.quadTo(3*q/4,v-1.4*n,q/2,v-n/2);d.quadTo(q/4,v-n*(1-1.4),0,v-n/2);d.lineTo(0,n/2);d.close();d.end()};F.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",this.size),y=d.width,q=d.height;if(null==this.direction||+this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return n*=q,new mxRectangle(d.x,d.y+n,y,q-2*n);n*=y;return new mxRectangle(d.x+n,d.y,y-2*n,q)}return d};mxCellRenderer.registerShape("tape",F);mxUtils.extend(N,mxActor);N.prototype.size=.3;N.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};N.prototype.redrawPath=function(d,n,y,+q,v){n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,0);d.lineTo(q,0);d.lineTo(q,v-n/2);d.quadTo(3*q/4,v-1.4*n,q/2,v-n/2);d.quadTo(q/4,v-n*(1-1.4),0,v-n/2);d.lineTo(0,n/2);d.close();d.end()};mxCellRenderer.registerShape("document",N);var gb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(d,n,y,q){var v=mxUtils.getValue(this.style,"size");return null!=v?q*Math.max(0,Math.min(1,v)):gb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=+function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,d.height*n),0,0)}return null};f.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(n/=2);return new mxRectangle(0,Math.min(d.height*this.scale,2*n*this.scale),0,Math.max(0,.3*n*this.scale))}return null};t.prototype.getLabelMargins=+function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var y=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var q=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(D*=Math.min(d.width,d.height));D=Math.min(D,+.5*d.width,.5*(d.height-n));q||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width-y),Math.min(d.height,d.height-n)):new mxRectangle(Math.min(d.width,d.width-y),0,D,Math.min(d.height,d.height-n))}return new mxRectangle(0,Math.min(d.height,n),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};O.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,Math.max(0,n*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,+"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q,0),new mxPoint(q-n,v)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(I,mxActor);I.prototype.size=.2;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(d,+n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("trapezoid",I);mxUtils.extend(ca,mxActor);+ca.prototype.size=.5;ca.prototype.redrawPath=function(d,n,y,q,v){d.setFillColor(null);n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(q,0),new mxPoint(n,0),new mxPoint(n,v/2),new mxPoint(0,v/2),new mxPoint(n,v/2),new mxPoint(n,v),new mxPoint(q,v)],this.isRounded,y,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ca);mxUtils.extend(da,mxActor);+da.prototype.redrawPath=function(d,n,y,q,v){d.setStrokeWidth(1);d.setFillColor(this.stroke);n=q/5;d.rect(0,0,n,v);d.fillAndStroke();d.rect(2*n,0,n,v);d.fillAndStroke();d.rect(4*n,0,n,v);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",da);ea.prototype.moveTo=function(d,n){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;this.firstX=d;this.firstY=n};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,n,y,q){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=y;this.lastY=q};ea.prototype.curveTo=function(d,n,y,q,v,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=D};ea.prototype.arcTo=function(d,n,y,q,v,D,E){this.originalArcTo.apply(this.canvas,arguments);this.lastX=D;this.lastY=E};ea.prototype.lineTo=function(d,n){if(null!=this.lastX&&null!=this.lastY){var y=function(na){return"number"===+typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},q=Math.abs(d-this.lastX),v=Math.abs(n-this.lastY),D=Math.sqrt(q*q+v*v);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;return}var E=Math.round(D/10),fa=this.defaultVariation;5>E&&(E=5,fa/=3);var L=y(d-this.lastX)*q/E;y=y(n-this.lastY)*v/E;q/=D;v/=D;for(D=0;D<E;D++){var va=(Math.random()-.5)*fa;this.originalLineTo.call(this.canvas,L*D+this.lastX-va*v,y*D+this.lastY-va*q)}this.originalLineTo.call(this.canvas,d,n)}else this.originalLineTo.apply(this.canvas,+arguments);this.lastX=d;this.lastY=n};ea.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var hb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(d){hb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var vb=mxShape.prototype.afterPaint;+mxShape.prototype.afterPaint=function(d){vb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ea(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var mb=mxRectangleShape.prototype.isHtmlAllowed;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"))&&mb.apply(this,arguments)};var pb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,n,y,q,v){if(null==d.handJiggle||d.handJiggle.constructor!=ea)pb.apply(this,arguments);else{var D=!0;null!=this.style&&(D="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(D||+null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)D||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?D=Math.min(q/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,D=Math.min(q*D,v*D)),d.moveTo(n++D,y),d.lineTo(n+q-D,y),d.quadTo(n+q,y,n+q,y+D),d.lineTo(n+q,y+v-D),d.quadTo(n+q,y+v,n+q-D,y+v),d.lineTo(n+D,y+v),d.quadTo(n,y+v,n,y+v-D),d.lineTo(n,y+D),d.quadTo(n,y,n+D,y)):(d.moveTo(n,y),d.lineTo(n+q,y),d.lineTo(n+q,y+v),d.lineTo(n,y+v),d.lineTo(n,y)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(X,mxRectangleShape);X.prototype.size=.1;X.prototype.fixedSize=!1;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,+!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var n=d.width,y=d.height;d=new mxRectangle(d.x,d.y,n,y);var q=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;q=Math.max(q,Math.min(n*v,y*v))}d.x+=Math.round(q);d.width-=Math.round(2*q);return d}return d};X.prototype.paintForeground=+function(d,n,y,q,v){var D=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),E=parseFloat(mxUtils.getValue(this.style,"size",this.size));E=D?Math.max(0,Math.min(q,E)):q*Math.max(0,Math.min(1,E));this.isRounded&&(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.max(E,Math.min(q*D,v*D)));E=Math.round(E);d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+v);d.moveTo(n+q-E,y);d.lineTo(n+q-E,y+v);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,+arguments)};mxCellRenderer.registerShape("process",X);mxCellRenderer.registerShape("process2",X);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(d,n,y,q,v){d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};ba.prototype.paintForeground=function(d,n,y,q,v){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(ha,mxHexagon);ha.prototype.size=30;ha.prototype.position=.5;ha.prototype.position2=.5;ha.prototype.base=20;ha.prototype.getLabelMargins=function(){return new mxRectangle(0,+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(d,n,y,q,v){n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var D=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",+this.position2)))),fa=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-y),new mxPoint(Math.min(q,D+fa),v-y),new mxPoint(E,v),new mxPoint(Math.max(0,D),v-y),new mxPoint(0,v-y)],this.isRounded,n,!0,[4])};mxCellRenderer.registerShape("callout",ha);mxUtils.extend(ma,mxActor);ma.prototype.size=.2;ma.prototype.fixedSize=20;ma.prototype.isRoundable=function(){return!0};ma.prototype.redrawPath=function(d,+n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(0,v),new mxPoint(n,v/2)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("step",+ma);mxUtils.extend(Y,mxHexagon);Y.prototype.size=.25;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,+0),new mxPoint(q-n,0),new mxPoint(q,.5*v),new mxPoint(q-n,v),new mxPoint(n,v),new mxPoint(0,.5*v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("hexagon",Y);mxUtils.extend(la,mxRectangleShape);la.prototype.isHtmlAllowed=function(){return!1};la.prototype.paintForeground=function(d,n,y,q,v){var D=Math.min(q/5,v/5)+1;d.begin();d.moveTo(n+q/2,y+D);d.lineTo(n+q/2,y+v-D);d.moveTo(n+D,y+v/2);d.lineTo(n+q-D,y+v/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};+mxCellRenderer.registerShape("plus",la);var db=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};mxRhombus.prototype.paintVertexShape=function(d,n,y,q,v){db.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var D=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||+0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&(d.setShadow(!1),db.apply(this,[d,n,y,q,v]))}};mxUtils.extend(Z,mxRectangleShape);Z.prototype.isHtmlAllowed=function(){return!1};Z.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};Z.prototype.paintForeground=function(d,n,y,q,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var D=+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);D=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+D]];if(null!=E){var fa=this.style["symbol"+D+"Align"],L=this.style["symbol"+D+"VerticalAlign"],va=this.style["symbol"+D+"Width"],na=this.style["symbol"+D+"Height"],Va=this.style["symbol"+D+"Spacing"]||0,fb=this.style["symbol"+D+"VSpacing"]||+Va,bb=this.style["symbol"+D+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(q+this.strokewidth,v+this.strokewidth),Va+=bb,fb+=bb);bb=n;var Ga=y;bb=fa==mxConstants.ALIGN_CENTER?bb+(q-va)/2:fa==mxConstants.ALIGN_RIGHT?bb+(q-va-Va):bb+Va;Ga=L==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:L==mxConstants.ALIGN_BOTTOM?Ga+(v-na-fb):Ga+fb;d.save();fa=new E;fa.style=this.style;E.prototype.paintVertexShape.call(fa,d,bb,Ga,va,na);d.restore()}D++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};+mxCellRenderer.registerShape("ext",Z);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(d,n,y,q,v,D){D?(d.moveTo(0,0),d.lineTo(q/2,v/2),d.lineTo(q,0),d.end()):(d.moveTo(0,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(0,v),d.close())};mxCellRenderer.registerShape("message",k);mxUtils.extend(A,mxShape);A.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.ellipse(q/4,0,q/2,v/4);d.fillAndStroke();d.begin();d.moveTo(q/2,v/4);d.lineTo(q/2,2*v/3);d.moveTo(q/2,v/3);d.lineTo(0,v/3);d.moveTo(q/+2,v/3);d.lineTo(q,v/3);d.moveTo(q/2,2*v/3);d.lineTo(0,v);d.moveTo(q/2,2*v/3);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",A);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};J.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(0,v/4);d.lineTo(0,3*v/4);d.end();d.stroke();d.begin();d.moveTo(0,v/2);d.lineTo(q/6,v/2);d.end();d.stroke();d.ellipse(q/6,0,5*q/6,v);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",+J);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+v);d.lineTo(n+7*q/8,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",U);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,v);d.moveTo(0,0);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(T,mxShape);+T.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};T.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,v/8,q,7*v/8);d.fillAndStroke()};T.prototype.paintForeground=function(d,n,y,q,v){d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,v/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",T);mxUtils.extend(W,mxRectangleShape);W.prototype.size=+40;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.getLabelBounds=function(d){var n=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,n)};W.prototype.paintBackground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,n,+y,q,D):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=W&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,n,y,q,D),d.restore()));D<v&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(n+q/2,y+D),d.lineTo(n+q/2,y+v),d.end(),d.stroke())};W.prototype.paintForeground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,n,y,q,Math.min(v,+D))};mxCellRenderer.registerShape("umlLifeline",W);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.configurePointerEvents=function(d){var n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=n&&n!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};aa.prototype.getLabelMargins=function(d){return new mxRectangle(0,+0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(d,n,y,q,v){var D=this.corner,E=Math.min(q,Math.max(D,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),fa=Math.min(v,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),L=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);L!=mxConstants.NONE&&+(d.setFillColor(L),d.rect(n,y,q,v),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,n,y,q,v),d.setGradient(this.fill,this.gradient,n,y,q,v,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(n,y);d.lineTo(n+E,y);d.lineTo(n+E,y+Math.max(0,fa-1.5*D));d.lineTo(n+Math.max(0,E-D),y+fa);d.lineTo(n,y+fa);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(n+E,y);+d.lineTo(n+q,y);d.lineTo(n+q,y+v);d.lineTo(n,y+v);d.lineTo(n,y+fa);d.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(d,n,y,q){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,n,y,q){q=W.prototype.size;null!=n&&(q=mxUtils.getValue(n.style,"size",q)*n.view.scale);n=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;y.x<d.getCenterX()&&+(n=-1*(n+1));return new mxPoint(d.getCenterX()+n,Math.min(d.y+d.height,Math.max(d.y+q,y.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,n,y,q){q=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,n,y,q){q=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;null!=n.style.backboneSize&&+(q+=parseFloat(n.style.backboneSize)*n.view.scale/2-1);if("south"==n.style[mxConstants.STYLE_DIRECTION]||"north"==n.style[mxConstants.STYLE_DIRECTION])return y.x<d.getCenterX()&&(q=-1*(q+1)),new mxPoint(d.getCenterX()+q,Math.min(d.y+d.height,Math.max(d.y,y.y)));y.y<d.getCenterY()&&(q=-1*(q+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,y.x)),d.getCenterY()+q)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,n,y,q){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,+new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(n.style,"size",ha.prototype.size))*n.view.scale))),n.style),n,y,q)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?K.prototype.fixedSize:K.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,+mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa)]):(v=v?Math.max(0,Math.min(.5*L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,fa)]);va=d.getCenterX();+d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?I.prototype.fixedSize:I.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,fa)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,fa)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,+Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa+v),new mxPoint(E+L,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa+v)]):(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va-v),new mxPoint(E,fa+va),new mxPoint(E,fa)]);va=d.getCenterX();d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("trapezoidPerimeter",+mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?ma.prototype.fixedSize:ma.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,+Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,d),new mxPoint(E+L-v,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,d),new mxPoint(E,fa)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,d),new mxPoint(E+L,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,d),new mxPoint(E+v,fa)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,+fa+v),new mxPoint(na,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va),new mxPoint(na,fa+va-v),new mxPoint(E,fa+va),new mxPoint(E,fa+v)]):(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(na,fa+v),new mxPoint(E+L,fa),new mxPoint(E+L,fa+va-v),new mxPoint(na,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+L?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(fa,na,y)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);+mxPerimeter.HexagonPerimeter2=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?Y.prototype.fixedSize:Y.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(va,D)):va*+Math.max(0,Math.min(1,D)),fa=[new mxPoint(na,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va-v),new mxPoint(na,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa+v),new mxPoint(na,fa)]):(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,d),new mxPoint(E+L-v,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,d),new mxPoint(E+v,fa)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+L?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(fa,na,y)};mxStyleRegistry.putValue("hexagonPerimeter2",+mxPerimeter.HexagonPerimeter2);mxUtils.extend(ja,mxShape);ja.prototype.size=10;ja.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,"size",this.size));d.translate(n,y);d.ellipse((q-D)/2,0,D,D);d.fillAndStroke();d.begin();d.moveTo(q/2,D);d.lineTo(q/2,v);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",ja);mxUtils.extend(pa,mxShape);pa.prototype.size=10;pa.prototype.inset=2;pa.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,+"size",this.size)),E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(n,y);d.begin();d.moveTo(q/2,D+E);d.lineTo(q/2,v);d.end();d.stroke();d.begin();d.moveTo((q-D)/2-E,D/2);d.quadTo((q-D)/2-E,D+E,q/2,D+E);d.quadTo((q+D)/2+E,D+E,(q+D)/2+E,D/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",pa);mxUtils.extend(sa,mxShape);sa.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);+d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",sa);mxUtils.extend(qa,mxShape);qa.prototype.inset=2;qa.prototype.paintBackground=function(d,n,y,q,v){var D=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(n,y);d.ellipse(0,D,q-2*D,v-2*D);d.fillAndStroke();d.begin();d.moveTo(q/2,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,q/2,v);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(wa,mxCylinder);wa.prototype.jettyWidth=+20;wa.prototype.jettyHeight=10;wa.prototype.redrawPath=function(d,n,y,q,v,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var fa=Math.min(n,v-n),L=Math.min(fa+2*n,v-n);D?(d.moveTo(y,fa),d.lineTo(E,fa),d.lineTo(E,fa+n),d.lineTo(y,fa+n),d.moveTo(y,L),d.lineTo(E,L),d.lineTo(E,L+n),d.lineTo(y,L+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(y,v),d.lineTo(y,L+n),d.lineTo(0,L++n),d.lineTo(0,L),d.lineTo(y,L),d.lineTo(y,fa+n),d.lineTo(0,fa+n),d.lineTo(0,fa),d.lineTo(y,fa),d.close());d.end()};mxCellRenderer.registerShape("module",wa);mxUtils.extend(Ba,mxCylinder);Ba.prototype.jettyWidth=32;Ba.prototype.jettyHeight=12;Ba.prototype.redrawPath=function(d,n,y,q,v,D){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));n=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));y=E/2;E=y+E/2;var fa=.3*v-n/2,L=.7*v-n/2;D?(d.moveTo(y,fa),d.lineTo(E,+fa),d.lineTo(E,fa+n),d.lineTo(y,fa+n),d.moveTo(y,L),d.lineTo(E,L),d.lineTo(E,L+n),d.lineTo(y,L+n)):(d.moveTo(y,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(y,v),d.lineTo(y,L+n),d.lineTo(0,L+n),d.lineTo(0,L),d.lineTo(y,L),d.lineTo(y,fa+n),d.lineTo(0,fa+n),d.lineTo(0,fa),d.lineTo(y,fa),d.close());d.end()};mxCellRenderer.registerShape("component",Ba);mxUtils.extend(za,mxRectangleShape);za.prototype.paintForeground=function(d,n,y,q,v){var D=q/2,E=v/2,fa=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,+mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(n+D,y),new mxPoint(n+q,y+E),new mxPoint(n+D,y+v),new mxPoint(n,y+E)],this.isRounded,fa,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",za);mxUtils.extend(Ea,mxDoubleEllipse);Ea.prototype.outerStroke=!0;Ea.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.min(4,Math.min(q/5,v/5));0<q&&0<v&&(d.ellipse(n+D,y+D,q-2*D,v-2*D),d.fillAndStroke());d.setShadow(!1);+this.outerStroke&&(d.ellipse(n,y,q,v),d.stroke())};mxCellRenderer.registerShape("endState",Ea);mxUtils.extend(ra,Ea);ra.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ra);mxUtils.extend(ya,mxArrowConnector);ya.prototype.defaultWidth=4;ya.prototype.isOpenEnded=function(){return!0};ya.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ya.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",+ya);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-+1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ma,mxActor);Ma.prototype.size=30;Ma.prototype.isRoundable=function(){return!0};Ma.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(0,n),new mxPoint(q,0),new mxPoint(q,v)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("manualInput",+Ma);mxUtils.extend(Ha,mxRectangleShape);Ha.prototype.dx=20;Ha.prototype.dy=20;Ha.prototype.isHtmlAllowed=function(){return!1};Ha.prototype.paintForeground=function(d,n,y,q,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var D=0;if(this.isRounded){var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;D=Math.max(D,Math.min(q*E,v*E))}E=Math.max(D,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));D=Math.max(D,Math.min(v,+parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(n,y+D);d.lineTo(n+q,y+D);d.end();d.stroke();d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",Ha);mxUtils.extend(Aa,mxActor);Aa.prototype.dx=20;Aa.prototype.dy=20;Aa.prototype.redrawPath=function(d,n,y,q,v){n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));+parseFloat(mxUtils.getValue(this.style,"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint(n,y),new mxPoint(n,v),new mxPoint(0,v)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("corner",Aa);mxUtils.extend(Ra,mxActor);Ra.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.lineTo(0,v);d.end();d.moveTo(q,0);d.lineTo(q,v);d.end();d.moveTo(0,v/2);d.lineTo(q,+v/2);d.end()};mxCellRenderer.registerShape("crossbar",Ra);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(d,n,y,q,v){n=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,+0),new mxPoint(q,0),new mxPoint(q,y),new mxPoint((q+n)/2,y),new mxPoint((q+n)/2,v),new mxPoint((q-n)/2,v),new mxPoint((q-n)/2,y),new mxPoint(0,y)],this.isRounded,D,!0);d.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(La,mxActor);La.prototype.arrowWidth=.3;La.prototype.arrowSize=.2;La.prototype.redrawPath=function(d,n,y,q,v){var D=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,+"arrowSize",this.arrowSize))));y=(v-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(q-n,D),new mxPoint(0,D)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("singleArrow",La);mxUtils.extend($a,mxActor);$a.prototype.redrawPath=function(d,n,y,q,v){var D=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",+La.prototype.arrowWidth))));n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",La.prototype.arrowSize))));y=(v-D)/2;D=y+D;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v/2),new mxPoint(n,0),new mxPoint(n,y),new mxPoint(q-n,y),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(q-n,D),new mxPoint(n,D),new mxPoint(n,v)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",+$a);mxUtils.extend(Da,mxActor);Da.prototype.size=.1;Da.prototype.fixedSize=20;Da.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(n,0);d.lineTo(q,0);d.quadTo(q-2*n,v/2,q,v);d.lineTo(n,v);d.quadTo(n-2*n,v/2,n,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Da);+mxUtils.extend(x,mxActor);x.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);d.close();d.end()};mxCellRenderer.registerShape("or",x);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(d,n,y,q,v){d.moveTo(0,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,0,v);d.quadTo(q/2,v/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",M);mxUtils.extend(Q,mxActor);Q.prototype.size=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(d,+n,y,q,v){n=Math.min(q/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,.8*n),new mxPoint(q,v),new mxPoint(0,v),new mxPoint(0,.8*n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("loopLimit",Q);mxUtils.extend(V,mxActor);V.prototype.size=.375;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(d,+n,y,q,v){n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-n),new mxPoint(q/2,v),new mxPoint(0,v-n)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",V);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);+d.begin();d.moveTo(n+q/2,y+v);d.lineTo(n+q,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ia);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+v/2);d.lineTo(n+q,y+v/2);d.end();d.stroke();d.begin();d.moveTo(n+q/2,y);d.lineTo(n+q/2,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=+function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n+.145*q,y+.145*v);d.lineTo(n+.855*q,y+.855*v);d.end();d.stroke();d.begin();d.moveTo(n+.855*q,y+.145*v);d.lineTo(n+.145*q,y+.855*v);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",oa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(d,n,y,q,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(n,y+v/2);d.lineTo(n++q,y+v/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(d,n,y,q,v){d.begin();d.moveTo(n,y);d.lineTo(n+q,y);d.lineTo(n+q/2,y+v/2);d.close();d.fillAndStroke();d.begin();d.moveTo(n,y+v);d.lineTo(n+q,y+v);d.lineTo(n+q/2,y+v/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(d,n,y,q,v){var D=d.state.strokeWidth/2,E=10+2*D,fa=y++v-E/2;d.begin();d.moveTo(n,y);d.lineTo(n,y+v);d.moveTo(n+D,fa);d.lineTo(n+D+E,fa-E/2);d.moveTo(n+D,fa);d.lineTo(n+D+E,fa+E/2);d.moveTo(n+D,fa);d.lineTo(n+q-D,fa);d.moveTo(n+q,y);d.lineTo(n+q,y+v);d.moveTo(n+q-D,fa);d.lineTo(n+q-E-D,fa-E/2);d.moveTo(n+q-D,fa);d.lineTo(n+q-E-D,fa+E/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",ua);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(d,n,y,q,v){this.outline||d.setStrokeColor(null);if(null!=+this.style){var D=d.pointerEvents,E=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||E||(d.pointerEvents=!1);var fa="1"==mxUtils.getValue(this.style,"top","1"),L="1"==mxUtils.getValue(this.style,"left","1"),va="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||E||this.outline||fa||va||na||L?(d.rect(n,y,q,v),d.fill(),d.pointerEvents=D,d.setStrokeColor(this.stroke),d.setLineCap("square"),+d.begin(),d.moveTo(n,y),this.outline||fa?d.lineTo(n+q,y):d.moveTo(n+q,y),this.outline||va?d.lineTo(n+q,y+v):d.moveTo(n+q,y+v),this.outline||na?d.lineTo(n,y+v):d.moveTo(n,y+v),(this.outline||L)&&d.lineTo(n,y),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==+mxUtils.getValue(this.style,"line")?(d.moveTo(n+q/2,y),d.lineTo(n+q/2,y+v)):(d.moveTo(n,y+v/2),d.lineTo(n+q,y+v/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Na);mxUtils.extend(Wa,mxActor);Wa.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/2);d.moveTo(0,0);d.lineTo(q-n,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,q-n,v);d.lineTo(0,v);d.close();d.end()};mxCellRenderer.registerShape("delay",Wa);mxUtils.extend(Xa,mxActor);Xa.prototype.size=.2;Xa.prototype.redrawPath=function(d,n,+y,q,v){n=Math.min(v,q);var D=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-D)/2;y=n+D;var E=(q-D)/2;D=E+D;d.moveTo(0,n);d.lineTo(E,n);d.lineTo(E,0);d.lineTo(D,0);d.lineTo(D,n);d.lineTo(q,n);d.lineTo(q,y);d.lineTo(D,y);d.lineTo(D,v);d.lineTo(E,v);d.lineTo(E,y);d.lineTo(0,y);d.close();d.end()};mxCellRenderer.registerShape("cross",Xa);mxUtils.extend(ab,mxActor);ab.prototype.size=.25;ab.prototype.redrawPath=function(d,n,y,q,v){n=Math.min(q,v/2);y=Math.min(q-+n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*q);d.moveTo(0,v/2);d.lineTo(y,0);d.lineTo(q-n,0);d.quadTo(q,0,q,v/2);d.quadTo(q,v,q-n,v);d.lineTo(y,v);d.close();d.end()};mxCellRenderer.registerShape("display",ab);mxUtils.extend(Oa,mxActor);Oa.prototype.cst={RECT2:"mxgraph.basic.rect"};Oa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},+{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",+defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",+dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},+{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},+{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);this.strictDrawShape(d,0,0,q,v)};Oa.prototype.strictDrawShape=function(d,n,y,q,v,D){var E=D&&D.rectStyle?D.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),fa=D&&D.absoluteCornerSize?D.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",+this.absoluteCornerSize),L=D&&D.size?D.size:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),va=D&&D.rectOutline?D.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=D&&D.indent?D.indent:Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Va=D&&D.dashed?D.dashed:mxUtils.getValue(this.style,"dashed",!1),fb=D&&D.dashPattern?D.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=D&&D.relIndent?D.relIndent:+Math.max(0,Math.min(50,na)),Ga=D&&D.top?D.top:mxUtils.getValue(this.style,"top",!0),Ka=D&&D.right?D.right:mxUtils.getValue(this.style,"right",!0),Ja=D&&D.bottom?D.bottom:mxUtils.getValue(this.style,"bottom",!0),Ia=D&&D.left?D.left:mxUtils.getValue(this.style,"left",!0),Pa=D&&D.topLeftStyle?D.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Sa=D&&D.topRightStyle?D.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ta=D&&D.bottomRightStyle?D.bottomRightStyle:mxUtils.getValue(this.style,+"bottomRightStyle","default"),Ua=D&&D.bottomLeftStyle?D.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=D&&D.fillColor?D.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");D&&D.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=D&&D.strokeWidth?D.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=D&&D.fillColor2?D.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=D&&D.gradientColor2?D.gradientColor2:mxUtils.getValue(this.style,+"gradientColor2","none"),Hb=D&&D.gradientDirection2?D.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=D&&D.opacity?D.opacity:mxUtils.getValue(this.style,"opacity","100"),Jb=Math.max(0,Math.min(50,L));D=Oa.prototype;d.setDashed(Va);fb&&""!=fb&&d.setDashPattern(fb);d.setStrokeWidth(Gb);L=Math.min(.5*v,.5*q,L);fa||(L=Jb*Math.min(q,v)/100);L=Math.min(L,.5*Math.min(q,v));fa||(na=Math.min(bb*Math.min(q,v)/100));na=Math.min(na,.5*Math.min(q,v)-L);(Ga||Ka||Ja||Ia)&&"frame"!=+va&&(d.begin(),Ga?D.moveNW(d,n,y,q,v,E,Pa,L,Ia):d.moveTo(0,0),Ga&&D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),Ka&&D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),Ja&&D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),Ia&&D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Db),Va=fa=Ib,"none"==Db&&(fa=0),"none"==Eb&&(Va=0),d.setGradient(Db,Eb,0,0,q,v,Hb,fa,Va),d.begin(),Ga?D.moveNWInner(d,+n,y,q,v,E,Pa,L,na,Ga,Ia):d.moveTo(na,0),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),Ia&&Ja&&D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),Ja&&Ka&&D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),Ka&&Ga&&D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),Ga&&Ia&&D.paintNWInner(d,n,y,q,v,E,Pa,L,na),d.fill(),"none"==Fb&&(d.begin(),D.paintFolds(d,n,y,q,v,E,Pa,Sa,Ta,Ua,L,Ga,Ka,Ja,Ia),d.stroke()));Ga||Ka||+Ja||!Ia?Ga||Ka||!Ja||Ia?!Ga&&!Ka&&Ja&&Ia?"frame"!=va?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,+n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):Ga||!Ka||Ja||Ia?!Ga&&Ka&&!Ja&&Ia?"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke(),d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,+n,y,q,v,E,Ta,L,Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke(),d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):+!Ga&&Ka&&Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),+D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):!Ga&&Ka&&Ja&&Ia?"frame"!=va?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,+n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,+n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):!Ga||Ka||Ja||Ia?Ga&&!Ka&&!Ja&&Ia?"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,+n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke()):Ga&&!Ka&&Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,+q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke(),d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke(),d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,+q,v,E,Ua,L,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):Ga&&!Ka&&Ja&&Ia?"frame"!=va?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,+n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),D.paintSWInner(d,+n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):Ga&&Ka&&!Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,+n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke()):Ga&&Ka&&!Ja&&Ia?"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,+Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,+Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke()):Ga&&Ka&&Ja&&!Ia?"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,+n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,+n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke()):Ga&&Ka&&Ja&&Ia&&("frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,+L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),d.close(),"double"==va&&(D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close()),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintNW(d,+n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.paintNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.paintSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.paintSW(d,n,y,q,v,E,Ua,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),d.close(),D.moveSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintSWInner(d,n,y,q,v,E,Ua,L,na,Ja),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),D.paintSEInner(d,n,y,q,v,E,Ta,L,na),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),D.paintNEInner(d,n,y,q,v,E,Sa,L,na),D.paintTopInner(d,+n,y,q,v,E,Pa,L,na,Ia,Ga),D.paintNWInner(d,n,y,q,v,E,Pa,L,na),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke())):"frame"!=va?(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),"double"==va&&(D.moveNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga)),d.stroke()):(d.begin(),D.moveNW(d,n,y,q,v,E,Pa,L,Ia),D.paintTop(d,n,y,q,v,E,Sa,L,Ka),D.lineNEInner(d,n,y,q,v,E,Sa,L,na,Ka),D.paintTopInner(d,n,y,q,v,E,Pa,L,na,Ia,Ga),d.close(),d.fillAndStroke()):+"frame"!=va?(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),"double"==va&&(D.moveSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka)),d.stroke()):(d.begin(),D.moveNE(d,n,y,q,v,E,Sa,L,Ga),D.paintRight(d,n,y,q,v,E,Ta,L,Ja),D.lineSEInner(d,n,y,q,v,E,Ta,L,na,Ja),D.paintRightInner(d,n,y,q,v,E,Sa,L,na,Ga,Ka),d.close(),d.fillAndStroke()):"frame"!=va?(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),"double"==va&&(D.moveSWInner(d,+n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja)),d.stroke()):(d.begin(),D.moveSE(d,n,y,q,v,E,Ta,L,Ka),D.paintBottom(d,n,y,q,v,E,Ua,L,Ia),D.lineSWInner(d,n,y,q,v,E,Ua,L,na,Ia),D.paintBottomInner(d,n,y,q,v,E,Ta,L,na,Ka,Ja),d.close(),d.fillAndStroke()):"frame"!=va?(d.begin(),D.moveSW(d,n,y,q,v,E,Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),"double"==va&&(D.moveNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia)),d.stroke()):(d.begin(),D.moveSW(d,n,y,q,v,E,+Pa,L,Ja),D.paintLeft(d,n,y,q,v,E,Pa,L,Ga),D.lineNWInner(d,n,y,q,v,E,Pa,L,na,Ga,Ia),D.paintLeftInner(d,n,y,q,v,E,Ua,L,na,Ja,Ia),d.close(),d.fillAndStroke());d.begin();D.paintFolds(d,n,y,q,v,E,Pa,Sa,Ta,Ua,L,Ga,Ka,Ja,Ia);d.stroke()};Oa.prototype.moveNW=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(0,0):d.moveTo(0,fa)};Oa.prototype.moveNE=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(q,0):d.moveTo(q-fa,0)};Oa.prototype.moveSE=function(d,+n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(q,v):d.moveTo(q,v-fa)};Oa.prototype.moveSW=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.moveTo(0,v):d.moveTo(fa,v)};Oa.prototype.paintNW=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,fa,0)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&+"fold"==D)&&d.lineTo(fa,0);else d.lineTo(0,0)};Oa.prototype.paintTop=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(q,0):d.lineTo(q-fa,0)};Oa.prototype.paintNE=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,q,fa)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q,fa);else d.lineTo(q,+0)};Oa.prototype.paintRight=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(q,v):d.lineTo(q,v-fa)};Oa.prototype.paintLeft=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(0,0):d.lineTo(0,fa)};Oa.prototype.paintSE=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,q-fa,v)}else("snip"==E||"default"==+E&&"snip"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-fa,v);else d.lineTo(q,v)};Oa.prototype.paintBottom=function(d,n,y,q,v,D,E,fa,L){"square"==E||"default"==E&&"square"==D||!L?d.lineTo(0,v):d.lineTo(fa,v)};Oa.prototype.paintSW=function(d,n,y,q,v,D,E,fa,L){if(L)if("rounded"==E||"default"==E&&"rounded"==D||"invRound"==E||"default"==E&&"invRound"==D){n=0;if("rounded"==E||"default"==E&&"rounded"==D)n=1;d.arcTo(fa,fa,0,0,n,0,v-fa)}else("snip"==E||"default"==E&&"snip"==D||"fold"==E||"default"==+E&&"fold"==D)&&d.lineTo(0,v-fa);else d.lineTo(0,v)};Oa.prototype.paintNWInner=function(d,n,y,q,v,D,E,fa,L){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,L,.5*L+fa);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,L,L+fa);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(L,.5*L+fa);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(L+fa,L+fa),d.lineTo(L,L+fa)};Oa.prototype.paintTopInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(0,+L):va&&!na?d.lineTo(L,0):va?"square"==E||"default"==E&&"square"==D?d.lineTo(L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(fa+.5*L,L):d.lineTo(fa+L,L):d.lineTo(0,L):d.lineTo(0,0)};Oa.prototype.paintNEInner=function(d,n,y,q,v,D,E,fa,L){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,q-fa-.5*L,L);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,q-fa-L,L);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(q-+fa-.5*L,L);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-fa-L,fa+L),d.lineTo(q-fa-L,L)};Oa.prototype.paintRightInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(q-L,0):va&&!na?d.lineTo(q,L):va?"square"==E||"default"==E&&"square"==D?d.lineTo(q-L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-L,fa+.5*L):d.lineTo(q-L,fa+L):d.lineTo(q-L,0):d.lineTo(q,0)};Oa.prototype.paintLeftInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(L,+v):va&&!na?d.lineTo(0,v-L):va?"square"==E||"default"==E&&"square"==D?d.lineTo(L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(L,v-fa-.5*L):d.lineTo(L,v-fa-L):d.lineTo(L,v):d.lineTo(0,v)};Oa.prototype.paintSEInner=function(d,n,y,q,v,D,E,fa,L){if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,q-L,v-fa-.5*L);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,q-L,v-fa-L);else if("snip"==E||"default"==E&&"snip"==+D)d.lineTo(q-L,v-fa-.5*L);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(q-fa-L,v-fa-L),d.lineTo(q-L,v-fa-L)};Oa.prototype.paintBottomInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(q,v-L):va&&!na?d.lineTo(q-L,v):"square"==E||"default"==E&&"square"==D||!va?d.lineTo(q-L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-fa-.5*L,v-L):d.lineTo(q-fa-L,v-L):d.lineTo(q,v)};Oa.prototype.paintSWInner=function(d,n,y,q,v,D,E,fa,L,va){if(!va)d.lineTo(L,+v);else if("square"==E||"default"==E&&"square"==D)d.lineTo(L,v-L);else if("rounded"==E||"default"==E&&"rounded"==D)d.arcTo(fa-.5*L,fa-.5*L,0,0,0,fa+.5*L,v-L);else if("invRound"==E||"default"==E&&"invRound"==D)d.arcTo(fa+L,fa+L,0,0,1,fa+L,v-L);else if("snip"==E||"default"==E&&"snip"==D)d.lineTo(fa+.5*L,v-L);else if("fold"==E||"default"==E&&"fold"==D)d.lineTo(L+fa,v-fa-L),d.lineTo(L+fa,v-L)};Oa.prototype.moveSWInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.moveTo(L,+v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(L,v-fa-L):d.moveTo(0,v-L)};Oa.prototype.lineSWInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.lineTo(L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==+E&&"fold"==D)&&d.lineTo(L,v-fa-L):d.lineTo(0,v-L)};Oa.prototype.moveSEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.moveTo(q-L,v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(q-L,v-fa-L):d.moveTo(q-L,v)};Oa.prototype.lineSEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D?d.lineTo(q-L,+v-L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-L,v-fa-.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-L,v-fa-L):d.lineTo(q-L,v)};Oa.prototype.moveNEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D||va?d.moveTo(q-L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(q-L,fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==+E&&"fold"==D)&&d.moveTo(q-L,fa+L):d.moveTo(q,L)};Oa.prototype.lineNEInner=function(d,n,y,q,v,D,E,fa,L,va){va?"square"==E||"default"==E&&"square"==D||va?d.lineTo(q-L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(q-L,fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(q-L,fa+L):d.lineTo(q,L)};Oa.prototype.moveNWInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.moveTo(L,0):va&&!na?d.moveTo(0,L):"square"==+E||"default"==E&&"square"==D?d.moveTo(L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.moveTo(L,fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.moveTo(L,fa+L):d.moveTo(0,0)};Oa.prototype.lineNWInner=function(d,n,y,q,v,D,E,fa,L,va,na){va||na?!va&&na?d.lineTo(L,0):va&&!na?d.lineTo(0,L):"square"==E||"default"==E&&"square"==D?d.lineTo(L,L):"rounded"==E||"default"==E&&"rounded"==D||"snip"==E||"default"==E&&"snip"==D?d.lineTo(L,+fa+.5*L):("invRound"==E||"default"==E&&"invRound"==D||"fold"==E||"default"==E&&"fold"==D)&&d.lineTo(L,fa+L):d.lineTo(0,0)};Oa.prototype.paintFolds=function(d,n,y,q,v,D,E,fa,L,va,na,Va,fb,bb,Ga){if("fold"==D||"fold"==E||"fold"==fa||"fold"==L||"fold"==va)("fold"==E||"default"==E&&"fold"==D)&&Va&&Ga&&(d.moveTo(0,na),d.lineTo(na,na),d.lineTo(na,0)),("fold"==fa||"default"==fa&&"fold"==D)&&Va&&fb&&(d.moveTo(q-na,0),d.lineTo(q-na,na),d.lineTo(q,na)),("fold"==L||"default"==L&&"fold"==D)&&bb&&fb&&(d.moveTo(q-+na,v),d.lineTo(q-na,v-na),d.lineTo(q,v-na)),("fold"==va||"default"==va&&"fold"==D)&&bb&&Ga&&(d.moveTo(0,v-na),d.lineTo(na,v-na),d.lineTo(na,v))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);Oa.prototype.constraints=null;mxUtils.extend(Qa,mxConnector);Qa.prototype.origPaintEdgeShape=Qa.prototype.paintEdgeShape;Qa.prototype.paintEdgeShape=function(d,n,y){for(var q=[],v=0;v<n.length;v++)q.push(mxUtils.clone(n[v]));v=d.state.dashed;var D=d.state.fixDash;Qa.prototype.origPaintEdgeShape.apply(this,+[d,q,y]);3<=d.state.strokeWidth&&(q=mxUtils.getValue(this.style,"fillColor",null),null!=q&&(d.setStrokeColor(q),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(v,D),Qa.prototype.origPaintEdgeShape.apply(this,[d,n,y])))};mxCellRenderer.registerShape("filledEdge",Qa);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var n=this.editorUi.getSelectionState(),y=d.apply(this,arguments);"umlFrame"==+n.style.shape&&y.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return y}}();mxMarker.addMarker("dash",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.stroke()}});mxMarker.addMarker("box",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1),fb=q.x+na/2,bb=q.y+Va/2;q.x-=na;q.y-=Va;return function(){d.begin();d.moveTo(fb-na/2-+Va/2,bb-Va/2+na/2);d.lineTo(fb-na/2+Va/2,bb-Va/2-na/2);d.lineTo(fb+Va/2-3*na/2,bb-3*Va/2-na/2);d.lineTo(fb-Va/2-3*na/2,bb-3*Va/2+na/2);d.close();va?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1);return function(){d.begin();d.moveTo(q.x-na/2-Va/2,q.y-Va/2+na/2);d.lineTo(q.x+Va/2-3*na/2,q.y-3*Va/2-na/2);d.moveTo(q.x-na/2+Va/2,q.y-Va/2-na/2);d.lineTo(q.x-Va/2-3*na/2,q.y-3*Va/2+na/2);d.stroke()}});mxMarker.addMarker("circle",kb);+mxMarker.addMarker("circlePlus",function(d,n,y,q,v,D,E,fa,L,va){var na=q.clone(),Va=kb.apply(this,arguments),fb=v*(E+2*L),bb=D*(E+2*L);return function(){Va.apply(this,arguments);d.begin();d.moveTo(na.x-v*L,na.y-D*L);d.lineTo(na.x-2*fb+v*L,na.y-2*bb+D*L);d.moveTo(na.x-fb-bb+D*L,na.y-bb+fb-v*L);d.lineTo(na.x+bb-fb-D*L,na.y-bb-fb+v*L);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,n,y,q,v,D,E,fa,L,va){var na=v*(E+L+1),Va=D*(E+L+1),fb=q.clone();q.x-=na;q.y-=Va;return function(){d.begin();d.moveTo(fb.x-+Va,fb.y+na);d.quadTo(q.x-Va,q.y+na,q.x,q.y);d.quadTo(q.x+Va,q.y-na,fb.x+Va,fb.y-na);d.stroke()}});mxMarker.addMarker("async",function(d,n,y,q,v,D,E,fa,L,va){n=v*L*1.118;y=D*L*1.118;v*=E+L;D*=E+L;var na=q.clone();na.x-=n;na.y-=y;q.x+=-v-n;q.y+=-D-y;return function(){d.begin();d.moveTo(na.x,na.y);fa?d.lineTo(na.x-v-D/2,na.y-D+v/2):d.lineTo(na.x+D/2-v,na.y-D-v/2);d.lineTo(na.x-v,na.y-D);d.close();va?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(n,+y,q,v,D,E,fa,L,va,na){D*=fa+va;E*=fa+va;var Va=v.clone();return function(){n.begin();n.moveTo(Va.x,Va.y);L?n.lineTo(Va.x-D-E/d,Va.y-E+D/d):n.lineTo(Va.x+E/d-D,Va.y-E-D/d);n.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var qb=function(d,n,y){return nb(d,["width"],n,function(q,v,D,E,fa){fa=d.shape.getEdgeWidth()*d.view.scale+y;return new mxPoint(E.x+v*q/4+D*fa/2,E.y+D*q/4-v*fa/2)},function(q,v,D,E,fa,L){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));d.style.width=Math.round(2*+q)/d.view.scale-y})},nb=function(d,n,y,q,v){return jb(d,n,function(D){var E=d.absolutePoints;if(null!=E&&0<E.length){var fa=E.length-1;D=d.view.translate;var L=d.view.scale,va=y?E[0]:E[fa];E=y?E[1]:E[fa-1];fa=E.x-va.x;var na=E.y-va.y,Va=Math.sqrt(fa*fa+na*na);va=q.call(this,Va,fa/Va,na/Va,va,E);return new mxPoint(va.x/L-D.x,va.y/L-D.y)}return null},function(D,E,fa){var L=d.absolutePoints,va=L.length-1;D=d.view.translate;var na=d.view.scale,Va=y?L[0]:L[va];L=y?L[1]:L[va-1];va=L.x-Va.x;var fb=L.y-Va.y,+bb=Math.sqrt(va*va+fb*fb);E.x=(E.x+D.x)*na;E.y=(E.y+D.y)*na;v.call(this,bb,va/bb,fb/bb,Va,L,E,fa)})},lb=function(d,n){return function(y){return[nb(y,["startWidth"],!0,function(q,v,D,E,fa){fa=mxUtils.getNumber(y.style,"startWidth",d)*y.view.scale+n;return new mxPoint(E.x+v*q/4+D*fa/2,E.y+D*q/4-v*fa/2)},function(q,v,D,E,fa,L){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));y.style.startWidth=Math.round(2*q)/y.view.scale-n})]}},eb=function(d){return function(n){return[jb(n,["arrowWidth",+"arrowSize"],function(y){var q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",La.prototype.arrowWidth))),v=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",La.prototype.arrowSize)));return new mxPoint(y.x+(1-v)*y.width,y.y+(1-q)*y.height/2)},function(y,q){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(y.y+y.height/2-q.y)/y.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(y.x+y.width-q.x)/y.width))})]}},tb=function(d){return function(n){return[jb(n,+["size"],function(y){var q=Math.max(0,Math.min(.5*y.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(y.x,y.y+q)},function(y,q){this.state.style.size=Math.max(0,q.y-y.y)},!0)]}},ob=function(d,n,y){return function(q){var v=[jb(q,["size"],function(D){var E=Math.max(0,Math.min(D.width,Math.min(D.height,parseFloat(mxUtils.getValue(this.state.style,"size",n)))))*d;return new mxPoint(D.x+E,D.y+E)},function(D,E){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(D.width,+E.x-D.x),Math.min(D.height,E.y-D.y)))/d)},!1)];y&&mxUtils.getValue(q.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(wb(q));return v}},ub=function(d,n,y,q,v){y=null!=y?y:.5;return function(D){var E=[jb(D,["size"],function(fa){var L=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,va=parseFloat(mxUtils.getValue(this.state.style,"size",L?v:d));return new mxPoint(fa.x+Math.max(0,Math.min(.5*fa.width,va*(L?1:fa.width))),fa.getCenterY())},function(fa,L,va){fa=null!=v&&"0"!=mxUtils.getValue(this.state.style,+"fixedSize","0")?L.x-fa.x:Math.max(0,Math.min(y,(L.x-fa.x)/fa.width));this.state.style.size=fa},!1,q)];n&&mxUtils.getValue(D.style,mxConstants.STYLE_ROUNDED,!1)&&E.push(wb(D));return E}},Ab=function(d,n,y){d=null!=d?d:.5;return function(q){var v=[jb(q,["size"],function(D){var E=null!=y?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,fa=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",E?y:n)));return new mxPoint(D.x+Math.min(.75*D.width*d,fa*(E?.75:.75*D.width)),D.y+D.height/+4)},function(D,E){D=null!=y&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?E.x-D.x:Math.max(0,Math.min(d,(E.x-D.x)/D.width*.75));this.state.style.size=D},!1,!0)];mxUtils.getValue(q.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(wb(q));return v}},yb=function(){return function(d){var n=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n}},wb=function(d,n){return jb(d,[mxConstants.STYLE_ARCSIZE],function(y){var q=null!=n?n:y.height/8;if("1"==mxUtils.getValue(d.style,+mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(y.x+y.width-Math.min(y.width/2,v),y.y+q)}v=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(y.x+y.width-Math.min(Math.max(y.width/2,y.height/2),Math.min(y.width,y.height)*v),y.y+q)},function(y,q,v){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?+this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(y.width,2*(y.x+y.width-q.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(y.width-q.x+y.x)/Math.min(y.width,y.height))))})},jb=function(d,n,y,q,v,D,E){var fa=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);fa.execute=function(va){for(var na=0;na<n.length;na++)this.copyStyle(n[na]);E&&E(va)};fa.getPosition=y;fa.setPosition=q;fa.ignoreGrid=null!=v?v:!0;if(D){var L=fa.positionChanged;+fa.positionChanged=function(){L.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return fa},ib={link:function(d){return[qb(d,!0,10),qb(d,!1,10)]},flexArrow:function(d){var n=d.view.graph.gridSize/d.view.scale,y=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,v,D,E,fa){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;fa=3*mxUtils.getNumber(d.style,+mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)-v*q/2)},function(q,v,D,E,fa,L,va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||+mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),y.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(q,v,D,E,fa){q=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;+fa=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)+D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)-v*q/2)},function(q,v,D,E,fa,L,va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/+d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(va.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<n/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<n&&(d.style.startWidth=+d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(y.push(nb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,v,D,E,fa){q=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;fa=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)+v*q/2)},function(q,+v,D,E,fa,L,va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*q)/d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<+n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),y.push(nb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(q,v,D,E,fa){q=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;fa=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+v*(fa+d.shape.strokewidth*d.view.scale)-D*q/2,E.y+D*(fa+d.shape.strokewidth*d.view.scale)+v*q/2)},function(q,v,D,E,fa,L,+va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLineDist(E.x,E.y,E.x+D,E.y-v,L.x,L.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*q)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(va.getEvent())||+(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<n&&(d.style.endWidth=d.style.startWidth))})));return y},swimlane:function(d){var n=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var y=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));n.push(wb(d,+y/2))}n.push(jb(d,[mxConstants.STYLE_STARTSIZE],function(q){var v=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(q.getCenterX(),q.y+Math.max(0,Math.min(q.height,v))):new mxPoint(q.x+Math.max(0,Math.min(q.width,v)),q.getCenterY())},function(q,v){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,+Math.min(q.height,v.y-q.y))):Math.round(Math.max(0,Math.min(q.width,v.x-q.x)))},!1,null,function(q){var v=d.view.graph;if(!mxEvent.isShiftDown(q.getEvent())&&!mxEvent.isControlDown(q.getEvent())&&(v.isTableRow(d.cell)||v.isTableCell(d.cell))){q=v.getSwimlaneDirection(d.style);var D=v.model.getParent(d.cell);D=v.model.getChildCells(D,!0);for(var E=[],fa=0;fa<D.length;fa++)D[fa]!=d.cell&&v.isSwimlane(D[fa])&&v.getSwimlaneDirection(v.getCurrentCellStyle(D[fa]))==q&&E.push(D[fa]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,+d.style[mxConstants.STYLE_STARTSIZE],E)}}));return n},label:yb(),ext:yb(),rectangle:yb(),triangle:yb(),rhombus:yb(),umlLifeline:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(n.getCenterX(),n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},umlFrame:function(d){return[jb(d,["width","height"],function(n){var y=Math.max(aa.prototype.corner,+Math.min(n.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),q=Math.max(1.5*aa.prototype.corner,Math.min(n.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.width=Math.round(Math.max(aa.prototype.corner,Math.min(n.width,y.x-n.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(n.height,y.y-n.y)))},!1)]},process:function(d){var n=[jb(d,["size"],function(y){var q=+"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size));return q?new mxPoint(y.x+v,y.y+y.height/4):new mxPoint(y.x+y.width*v,y.y+y.height/4)},function(y,q){y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*y.width,q.x-y.x)):Math.max(0,Math.min(.5,(q.x-y.x)/y.width));this.state.style.size=y},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},cross:function(d){return[jb(d,+["size"],function(n){var y=Math.min(n.width,n.height);y=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Xa.prototype.size)))*y/2;return new mxPoint(n.getCenterX()-y,n.getCenterY()-y)},function(n,y){var q=Math.min(n.width,n.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,n.getCenterY()-y.y)/q*2,Math.max(0,n.getCenterX()-y.x)/q*2)))})]},note:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,+"size",G.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},note2:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,+n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},manualInput:function(d){var n=[jb(d,["size"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",Ma.prototype.size)));return new mxPoint(y.x+y.width/4,y.y+3*q/4)},function(y,q){this.state.style.size=Math.round(Math.max(0,Math.min(y.height,4*(q.y-y.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},dataStorage:function(d){return[jb(d,["size"],function(n){var y="0"!=mxUtils.getValue(this.state.style,+"fixedSize","0"),q=parseFloat(mxUtils.getValue(this.state.style,"size",y?Da.prototype.fixedSize:Da.prototype.size));return new mxPoint(n.x+n.width-q*(y?1:n.width),n.getCenterY())},function(n,y){n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(n.width,n.x+n.width-y.x)):Math.max(0,Math.min(1,(n.x+n.width-y.x)/n.width));this.state.style.size=n},!1)]},callout:function(d){var n=[jb(d,["size","position"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,+"size",ha.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ha.prototype.position)));mxUtils.getValue(this.state.style,"base",ha.prototype.base);return new mxPoint(y.x+v*y.width,y.y+y.height-q)},function(y,q){mxUtils.getValue(this.state.style,"base",ha.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(y.height,y.y+y.height-q.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),jb(d,["position2"],function(y){var q=+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ha.prototype.position2)));return new mxPoint(y.x+q*y.width,y.y+y.height)},function(y,q){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),jb(d,["base"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",ha.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ha.prototype.position))),D=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,+"base",ha.prototype.base)));return new mxPoint(y.x+Math.min(y.width,v*y.width+D),y.y+y.height-q)},function(y,q){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ha.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(y.width,q.x-y.x-v*y.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},internalStorage:function(d){var n=[jb(d,["dx","dy"],function(y){var q=Math.max(0,Math.min(y.width,mxUtils.getValue(this.state.style,+"dx",Ha.prototype.dx))),v=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"dy",Ha.prototype.dy)));return new mxPoint(y.x+q,y.y+v)},function(y,q){this.state.style.dx=Math.round(Math.max(0,Math.min(y.width,q.x-y.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(y.height,q.y-y.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},module:function(d){return[jb(d,["jettyWidth","jettyHeight"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,+"jettyWidth",wa.prototype.jettyWidth))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"jettyHeight",wa.prototype.jettyHeight)));return new mxPoint(n.x+y/2,n.y+2*q)},function(n,y){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(n.height,y.y-n.y))/2)})]},corner:function(d){return[jb(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",Aa.prototype.dx))),+q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",Aa.prototype.dy)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.dx=Math.round(Math.max(0,Math.min(n.width,y.x-n.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},tee:function(d){return[jb(d,["dx","dy"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));+return new mxPoint(n.x+(n.width+y)/2,n.y+q)},function(n,y){this.state.style.dx=Math.round(Math.max(0,2*Math.min(n.width/2,y.x-n.x-n.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},singleArrow:eb(1),doubleArrow:eb(.5),"mxgraph.arrows2.wedgeArrow":lb(20,20),"mxgraph.arrows2.wedgeArrowDashed":lb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":lb(20,20),folder:function(d){return[jb(d,["tabWidth","tabHeight"],function(n){var y=Math.max(0,Math.min(n.width,mxUtils.getValue(this.state.style,+"tabWidth",t.prototype.tabWidth))),q=Math.max(0,Math.min(n.height,mxUtils.getValue(this.state.style,"tabHeight",t.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(y=n.width-y);return new mxPoint(n.x+y,n.y+q)},function(n,y){var q=Math.max(0,Math.min(n.width,y.x-n.x));mxUtils.getValue(this.state.style,"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=n.width-q);this.state.style.tabWidth=Math.round(q);this.state.style.tabHeight=+Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},document:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(n.x+3*n.width/4,n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},tape:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));+return new mxPoint(n.getCenterX(),n.y+y*n.height/2)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(y.y-n.y)/n.height*2))},!1)]},isoCube2:function(d){return[jb(d,["isoAngle"],function(n){var y=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",R.isoAngle))))*Math.PI/200;return new mxPoint(n.x,n.y+Math.min(n.width*Math.tan(y),.5*n.height))},function(n,y){this.state.style.isoAngle=Math.max(0,50*(y.y-n.y)/n.height)},!0)]},cylinder2:tb(c.prototype.size),cylinder3:tb(f.prototype.size),+offPageConnector:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(n.getCenterX(),n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},"mxgraph.basic.rect":function(d){var n=[Graph.createHandle(d,["size"],function(y){var q=Math.max(0,Math.min(y.width/2,y.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));+return new mxPoint(y.x+q,y.y+q)},function(y,q){this.state.style.size=Math.round(100*Math.max(0,Math.min(y.height/2,y.width/2,q.x-y.x)))/100})];d=Graph.createHandle(d,["indent"],function(y){var q=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(y.x+.75*y.width,y.y+q*y.height/200)},function(y,q){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(q.y-y.y)/y.height)))/100});n.push(d);return n},step:ub(ma.prototype.size,!0,null,+!0,ma.prototype.fixedSize),hexagon:ub(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:ub(ca.prototype.size,!1),display:ub(ab.prototype.size,!1),cube:ob(1,m.prototype.size,!1),card:ob(.5,C.prototype.size,!0),loopLimit:ob(.5,Q.prototype.size,!0),trapezoid:Ab(.5,I.prototype.size,I.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=+function(){var d=Bb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var n=this.state.style.shape;null==mxCellRenderer.defaultShapes[n]&&null==mxStencilRegistry.getStencil(n)?n=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(n=mxConstants.SHAPE_SWIMLANE);n=ib[n];null==n&&null!=this.state.shape&&this.state.shape.isRoundable()&&(n=ib[mxConstants.SHAPE_RECTANGLE]);null!=n&&(n=n(this.state),null!=n&&(d=null==d?n:d.concat(n)))}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=ib[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);sb=mxUtils.getRotatedPoint(sb,Math.cos(zb),Math.sin(zb));var rb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(d,+n,y,q,v){var D=d.view;q=null!=q&&0<q.length?q[0]:null;var E=d.absolutePoints,fa=E[0];E=E[E.length-1];null!=q&&(q=D.transformControlPoint(d,q));null==fa&&null!=n&&(fa=new mxPoint(n.getCenterX(),n.getCenterY()));null==E&&null!=y&&(E=new mxPoint(y.getCenterX(),y.getCenterY()));var L=sb.x,va=sb.y,na=xb.x,Va=xb.y,fb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=fa){d=function(Ga,Ka,Ja){Ga-=bb.x;var Ia=Ka-bb.y;Ka=(Va*Ga-na*Ia)/(L*Va-va*na);Ga=(va*Ga-L*Ia)/(va*na-L*Va);fb?+(Ja&&(bb=new mxPoint(bb.x+L*Ka,bb.y+va*Ka),v.push(bb)),bb=new mxPoint(bb.x+na*Ga,bb.y+Va*Ga)):(Ja&&(bb=new mxPoint(bb.x+na*Ga,bb.y+Va*Ga),v.push(bb)),bb=new mxPoint(bb.x+L*Ka,bb.y+va*Ka));v.push(bb)};var bb=fa;null==q&&(q=new mxPoint(fa.x+(E.x-fa.x)/2,fa.y+(E.y-fa.y)/2));d(q.x,q.y,!0);d(E.x,E.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Cb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,n){if(n==mxEdgeStyle.IsometricConnector){var y=+new mxElbowEdgeHandler(d);y.snapToTerminals=!1;return y}return Cb.apply(this,arguments)};B.prototype.constraints=[];H.prototype.getConstraints=function(d,n,y){d=[];var q=Math.tan(mxUtils.toRadians(30)),v=(.5-q)/2;q=Math.min(n,y/(.5+q));n=(n-q)/2;y=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y+.25*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+.5*q,y+q*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+q,y+.25*q));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,n+q,y+.75*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n+.5*q,y+(1-v)*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y+.75*q));return d};R.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;q=Math.min(n*Math.tan(q),.5*y);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,+.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));return d};ha.prototype.getConstraints=function(d,n,y){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var q=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,+"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,+0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y-q)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y-q)));n>=2*q&&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))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.getConstraints=+0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,Math.min(y,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*(n-q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-.5*q,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,n,.5*(y+q)));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));n>=2*q&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};z.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,Math.min(y,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(1,+0),!1,null,n,.5*(y+q)));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));n>=2*q&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};C.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,Math.min(y,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*(n+q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y+q)));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));n>=2*q&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};m.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,Math.min(y,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*(n-q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-.5*q,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y+q)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,0,.5*(y-q)));return d};c.prototype.getConstraints=function(d,n,y){d=[];n=Math.max(0,Math.min(y,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,n));d.push(new mxConnectionConstraint(new mxPoint(1,+0),!1,null,0,.5*(y-q)));return d};f.prototype.getConstraints=function(d,n,y){d=[];n=Math.max(0,Math.min(y,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,n));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,n));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-n));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-n));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n+.5*(.5*y-n)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,n+.5*(.5*y-n)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,y-n-.5*(.5*y-n)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-n-.5*(.5*y-n)));d.push(new mxConnectionConstraint(new mxPoint(.145,-0),!1,null,0,.29*n));d.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*n));d.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-n));d.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-n));return d};k.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),x=Math.max(0,Math.min(y,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*q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,x)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),x))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-.5*q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,n-q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,x)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.25*(y-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.75*(y-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,-null,n,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(y-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(y-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y));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};Ka.prototype.constraints=mxRectangleShape.prototype.constraints;Pa.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;Na.prototype.constraints=mxEllipse.prototype.constraints;Ea.prototype.constraints=mxRectangleShape.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;-ab.prototype.getConstraints=function(d,n,y){d=[];var q=Math.min(n,y/2),x=Math.min(n-q,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(x+n-q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,n-q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(x+n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,y));return d};ua.prototype.getConstraints=function(d,n,y){n=parseFloat(mxUtils.getValue(d,"jettyWidth",ua.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",ua.prototype.jettyHeight));var q=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,n),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,+0),!1,null,0,.29*n));d.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*n));d.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-n));d.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-n));return d};t.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(y,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*q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,v)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),v))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-.5*q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,n-q,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,v)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.25*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.75*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,+null,n,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(y-v)+v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y));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};Ha.prototype.constraints=mxRectangleShape.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;Na.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxRectangleShape.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;+ab.prototype.getConstraints=function(d,n,y){d=[];var q=Math.min(n,y/2),v=Math.min(n-q,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);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+n-q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,n-q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));return d};wa.prototype.getConstraints=function(d,n,y){n=parseFloat(mxUtils.getValue(d,"jettyWidth",wa.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",wa.prototype.jettyHeight));var q=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,n),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,n),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(y-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(y-.5*d,3.5*d))];y>5*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,n));y>8*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,n));y>15*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,n));return q};Q.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;+!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(y-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(y-.5*d,3.5*d))];y>5*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,n));y>8*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,n));y>15*d&&q.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,n));return q};Q.prototype.constraints=mxRectangleShape.prototype.constraints;V.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)];u.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)];za.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,+.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];A.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)];Ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,-1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];C.prototype.constraints=-[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,+1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];F.prototype.constraints=+[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,-.25),!1)];L.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;I.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;Wa.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),x=Math.max(0,Math.min(y,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,n,.5*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*n+.25*q,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),.5*(y+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),y));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,.5*(n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),.5*(y+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*n-.25*q,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*x));return d};Ma.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,-"dx",this.dx)))),x=Math.max(0,Math.min(y,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,n,.5*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),x));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,q,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,.5*(y+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,y));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};ya.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)];Ia.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,-"arrowSize",this.arrowSize))));q=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-x),q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-x,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-x,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-x),y-q));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,0,y-q));return d};Xa.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ia.prototype.arrowWidth)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ia.prototype.arrowSize))));q=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,q));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,n-x,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-x,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,y));return d};Za.prototype.getConstraints=function(d,n,y){d=[];var q=Math.min(y,n),x=Math.max(0,Math.min(q,q*parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=(y-x)/2;var D=q+x,E=(n-x)/2;x=E+x;d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,E,.5*q));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,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y));d.push(new mxConnectionConstraint(new mxPoint(.5,-1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+x),q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,D));d.push(new mxConnectionConstraint(new mxPoint(0,-0),!1,null,.5*(n+x),D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,q));return d};aa.prototype.constraints=-null;t.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)];N.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)];qa.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){p.escape();F=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),F);null!=F&&p.setSelectionCells(F)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var F=p.getSelectionCells(),P=0;P<F.length;P++)p.cellLabelChanged(F[P],"")}finally{p.getModel().endUpdate()}}}function g(F,P,R,T,c){c.getModel().beginUpdate();try{var f=c.getCellGeometry(F);null!=f&&R&&T&&(R/=T,f=f.clone(),1<R?f.height=f.width/R:f.width=f.height*R,c.getModel().setGeometry(F,-f));c.setCellStyles(mxConstants.STYLE_CLIP_PATH,P,[F]);c.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[F])}finally{c.getModel().endUpdate()}}var m=this.editorUi,v=m.editor,p=v.graph,A=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),-function(){p.popupMenuHandler.hideMenu();var F=p.view.scale,P=p.container.scrollLeft,R=p.container.scrollTop,T=p.view.translate.x,c=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(F-p.view.scale)&&5>Math.abs(P-p.container.scrollLeft)&&5>Math.abs(R-p.container.scrollTop)&&T==p.view.translate.x&&c==p.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.isEnabled()&&-p.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(F,P){try{var R=mxUtils.parseXml(F);v.graph.setSelectionCells(v.graph.importGraphModel(R.documentElement))}catch(T){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+T.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=-null})}).isEnabled=A;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=A;this.addAction("saveAs...",function(){m.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var F=new EditDiagramDialog(m);m.showDialog(F.container,620,420,!0,!1);F.init()}).isEnabled=A;this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,-320,240,!0,!0)}).isEnabled=A;this.addAction("print...",function(){m.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var F=null;try{F=m.copyXml(),null!=F&&p.removeCells(F,!1)}catch(P){}try{null==-F&&mxClipboard.cut(p)}catch(P){m.handleError(P)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(F){}try{mxClipboard.copy(p)}catch(F){m.handleError(F)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var F=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(P){if(null!=P){p.getModel().beginUpdate();try{m.pasteXml(P,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),-F=!0)}catch(P){}F||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(F){function P(T){if(null!=T){for(var c=!0,f=0;f<T.length&&c;f++)c=c&&p.model.isEdge(T[f]);var k=p.view.translate;f=p.view.scale;var B=k.x,z=k.y;k=null;if(1==T.length&&c){var C=p.getCellGeometry(T[0]);null!=C&&(k=C.getTerminalPoint(!0))}k=null!=k?k:p.getBoundingBoxFromGeometry(T,c);null!=k&&(c=Math.round(p.snap(p.popupMenuHandler.triggerX/f-B)),f=Math.round(p.snap(p.popupMenuHandler.triggerY/-f-z)),p.cellsMoved(T,c-k.x,f-k.y))}}function R(){p.getModel().beginUpdate();try{P(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){F=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(T){if(null!=T){p.getModel().beginUpdate();try{P(m.pasteXml(T,!0))}finally{p.getModel().endUpdate()}}else R()}),F=!0)}catch(T){}F||R()}});this.addAction("swap",function(){var F=p.getSelectionCells();2==F.length&&p.swapShapes(F[0],-F[1])});this.addAction("copySize",function(){var F=p.getSelectionCell();p.isEnabled()&&null!=F&&p.getModel().isVertex(F)&&(F=p.getCellGeometry(F),null!=F&&(m.copiedSize=new mxRectangle(F.x,F.y,F.width,F.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var F=p.getResizableCells(p.getSelectionCells()),P=0;P<F.length;P++)if(p.getModel().isVertex(F[P])){var R=p.getCellGeometry(F[P]);-null!=R&&(R=R.clone(),R.width=m.copiedSize.width,R.height=m.copiedSize.height,p.getModel().setGeometry(F[P],R))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var F=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&null!=F&&(F=F.cloneValue(),null==F||isNaN(F.nodeType)||(m.copiedValue=F))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var F=p.getSelectionCell();if(p.isEnabled()&&null!=F)try{p.isHtmlLabel(F)?m.writeHtmlToClipboard(p.getLabel(F),-mxUtils.bind(this,function(P){m.handleError(P)})):m.writeTextToClipboard(p.getLabel(F),mxUtils.bind(this,function(P){m.handleError(P)}))}catch(P){m.handleError(P)}});this.addAction("pasteData",function(F,P){function R(f,k){var B=T.getValue(f);k=f.cloneValue(k);k.removeAttribute("placeholders");null==B||isNaN(B.nodeType)||k.setAttribute("placeholders",B.getAttribute("placeholders"));null!=F&&mxEvent.isShiftDown(F)||k.setAttribute("label",p.convertValueToString(f));T.setValue(f,k)}F=null!=P?P:F;var T=-p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){T.beginUpdate();try{var c=p.getEditableCells(p.getSelectionCells());if(0==c.length)R(T.getRoot(),m.copiedValue);else for(P=0;P<c.length;P++)R(c[P],m.copiedValue)}finally{T.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(F,P){F=null!=P?P:F;null!=F&&mxEvent.isShiftDown(F)?e():b(null!=F&&(mxEvent.isControlDown(F)||mxEvent.isMetaDown(F)||mxEvent.isAltDown(F)))},null,null,"Delete");this.addAction("deleteAll",-function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(F){m.handleError(F)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var F=m.getSelectionState();if(null!=F.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",F.rowspan,[F.mergeCell]),p.setCellStyles("colspan",-F.colspan,[F.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var F=m.getSelectionState();if(0<F.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,F.cells),p.setCellStyles("colspan",null,F.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(F,P){F=null!=P?P:F;p.turnShapes(p.getResizableCells(p.getSelectionCells()),-null!=F?mxEvent.isShiftDown(F):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(F){F=p.getSelectionCell();p.isEnabled()&&null!=F&&p.addSelectionCells(p.getEdges(F))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,-!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var F=p.getSelectionCells(),P=p.getCurrentCellStyle(p.getSelectionCell()),R=1==mxUtils.getValue(P,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,R,F);p.setCellStyles(mxConstants.STYLE_RESIZABLE,R,F);p.setCellStyles(mxConstants.STYLE_ROTATABLE,R,-F);p.setCellStyles(mxConstants.STYLE_DELETABLE,R,F);p.setCellStyles(mxConstants.STYLE_EDITABLE,R,F);p.setCellStyles("locked",1==R?0:1,F);p.setCellStyles("connectable",R,F)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){p.model.isVertex(p.getSelectionCell())&&Graph.exploreFromCell(m.editor.graph,m.editor.graph.getSelectionCell())});this.addAction("home",function(){p.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){p.exitGroup()},+.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=mxRectangleShape.prototype.constraints;N.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;Za.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(y,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,n,.5*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*n+.25*q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),y));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,.5*(n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*n-.25*q,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};Aa.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,+"dx",this.dx)))),v=Math.max(0,Math.min(y,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,n,.5*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),v));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,y));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Ra.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)];La.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,+"arrowSize",this.arrowSize))));q=(y-q)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-v),q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-v),y-q));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,0,y-q));return d};$a.prototype.getConstraints=function(d,n,y){d=[];var q=y*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",La.prototype.arrowWidth)))),v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",La.prototype.arrowSize))));q=(y-q)/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*n,q));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,n-v,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));return d};Xa.prototype.getConstraints=function(d,n,y){d=[];var q=Math.min(y,n),v=Math.max(0,Math.min(q,q*parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=(y-v)/2;var D=q+v,E=(n-v)/2;v=E+v;d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,E,.5*q));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*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y));d.push(new mxConnectionConstraint(new mxPoint(.5,+1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+v),q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,D));d.push(new mxConnectionConstraint(new mxPoint(0,+0),!1,null,.5*(n+v),D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,q));return d};W.prototype.constraints=+null;x.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)];M.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)];qa.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(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),O=0;O<G.length;O++)p.cellLabelChanged(G[O],"")}finally{p.getModel().endUpdate()}}}function g(G,O,R,c,f){f.getModel().beginUpdate();try{var l=f.getCellGeometry(G);null!=l&&R&&c&&(R/=c,l=l.clone(),1<R?l.height=l.width/R:l.width=l.height*R,f.getModel().setGeometry(G,+l));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,O,[G]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{f.getModel().endUpdate()}}var m=this.editorUi,u=m.editor,p=u.graph,B=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),+function(){p.popupMenuHandler.hideMenu();var G=p.view.scale,O=p.container.scrollLeft,R=p.container.scrollTop,c=p.view.translate.x,f=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(G-p.view.scale)&&5>Math.abs(O-p.container.scrollLeft)&&5>Math.abs(R-p.container.scrollTop)&&c==p.view.translate.x&&f==p.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.isEnabled()&&+p.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(G,O){try{var R=mxUtils.parseXml(G);u.graph.setSelectionCells(u.graph.importGraphModel(R.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=+null})}).isEnabled=B;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=B;this.addAction("saveAs...",function(){m.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var G=new EditDiagramDialog(m);m.showDialog(G.container,620,420,!0,!1);G.init()}).isEnabled=B;this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,+320,240,!0,!0)}).isEnabled=B;this.addAction("print...",function(){m.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var G=null;try{G=m.copyXml(),null!=G&&p.removeCells(G,!1)}catch(O){}try{null==+G&&mxClipboard.cut(p)}catch(O){m.handleError(O)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(G){}try{mxClipboard.copy(p)}catch(G){m.handleError(G)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(O){if(null!=O){p.getModel().beginUpdate();try{m.pasteXml(O,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),+G=!0)}catch(O){}G||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function O(c){if(null!=c){for(var f=!0,l=0;l<c.length&&f;l++)f=f&&p.model.isEdge(c[l]);var t=p.view.translate;l=p.view.scale;var z=t.x,C=t.y;t=null;if(1==c.length&&f){var F=p.getCellGeometry(c[0]);null!=F&&(t=F.getTerminalPoint(!0))}t=null!=t?t:p.getBoundingBoxFromGeometry(c,f);null!=t&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/l-z)),l=Math.round(p.snap(p.popupMenuHandler.triggerY/+l-C)),p.cellsMoved(c,f-t.x,l-t.y))}}function R(){p.getModel().beginUpdate();try{O(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(c){if(null!=c){p.getModel().beginUpdate();try{O(m.pasteXml(c,!0))}finally{p.getModel().endUpdate()}}else R()}),G=!0)}catch(c){}G||R()}});this.addAction("swap",function(){var G=p.getSelectionCells();2==G.length&&p.swapShapes(G[0],+G[1])});this.addAction("copySize",function(){var G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.getModel().isVertex(G)&&(G=p.getCellGeometry(G),null!=G&&(m.copiedSize=new mxRectangle(G.x,G.y,G.width,G.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var G=p.getResizableCells(p.getSelectionCells()),O=0;O<G.length;O++)if(p.getModel().isVertex(G[O])){var R=p.getCellGeometry(G[O]);+null!=R&&(R=R.clone(),R.width=m.copiedSize.width,R.height=m.copiedSize.height,p.getModel().setGeometry(G[O],R))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var G=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(m.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G)try{p.isHtmlLabel(G)?m.writeHtmlToClipboard(p.getLabel(G),+mxUtils.bind(this,function(O){m.handleError(O)})):m.writeTextToClipboard(p.getLabel(G),mxUtils.bind(this,function(O){m.handleError(O)}))}catch(O){m.handleError(O)}});this.addAction("pasteData",function(G,O){function R(l,t){var z=c.getValue(l);t=l.cloneValue(t);t.removeAttribute("placeholders");null==z||isNaN(z.nodeType)||t.setAttribute("placeholders",z.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||t.setAttribute("label",p.convertValueToString(l));c.setValue(l,t)}G=null!=O?O:G;var c=+p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){c.beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)R(c.getRoot(),m.copiedValue);else for(O=0;O<f.length;O++)R(f[O],m.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,O){G=null!=O?O:G;null!=G&&mxEvent.isShiftDown(G)?e():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",+function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(G){m.handleError(G)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var G=m.getSelectionState();if(null!=G.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",G.rowspan,[G.mergeCell]),p.setCellStyles("colspan",+G.colspan,[G.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var G=m.getSelectionState();if(0<G.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,G.cells),p.setCellStyles("colspan",null,G.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(G,O){G=null!=O?O:G;p.turnShapes(p.getResizableCells(p.getSelectionCells()),+null!=G?mxEvent.isShiftDown(G):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(G){G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.addSelectionCells(p.getEdges(G))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,+!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),O=p.getCurrentCellStyle(p.getSelectionCell()),R=1==mxUtils.getValue(O,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,R,G);p.setCellStyles(mxConstants.STYLE_RESIZABLE,R,G);p.setCellStyles(mxConstants.STYLE_ROTATABLE,R,+G);p.setCellStyles(mxConstants.STYLE_DELETABLE,R,G);p.setCellStyles(mxConstants.STYLE_EDITABLE,R,G);p.setCellStyles("locked",1==R?0:1,G);p.setCellStyles("connectable",R,G)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){p.model.isVertex(p.getSelectionCell())&&Graph.exploreFromCell(m.editor.graph,m.editor.graph.getSelectionCell())});this.addAction("home",function(){p.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){p.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){p.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){p.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){p.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){p.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",-function(F){p.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(F){p.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",function(){if(p.isEnabled()){var F=mxUtils.sortCells(p.getSelectionCells(),!0);1!=F.length||p.isTable(F[0])||p.isTableRow(F[0])?(F=p.getCellsForGroup(F),1<F.length&&p.setSelectionCell(p.groupCells(null,0,F))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",-function(){if(p.isEnabled()){var F=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var P=p.ungroupCells();if(null!=F)for(var R=0;R<F.length;R++)p.model.contains(F[R])&&(0==p.model.getChildCount(F[R])&&p.model.isVertex(F[R])&&p.setCellStyles("container","0",[F[R]]),P.push(F[R]))}finally{p.model.endUpdate()}0<P.length&&p.setSelectionCells(P)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var F=p.getSelectionCells();if(null!=F){for(var P=-[],R=0;R<F.length;R++)p.isTableRow(F[R])||p.isTableCell(F[R])||P.push(F[R]);p.removeCellsFromParent(P);0<P.length&&p.scrollCellToVisible(P[0])}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var F=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(F)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var F=p.getSelectionCell();if(p.isEnabled()&&null!=F&&p.isCellEditable(F)){var P=-"";if(mxUtils.isNode(F.value)){var R=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&F.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R=F.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==R&&(R=F.value.getAttribute("tooltip"));null!=R&&(P=R)}P=new TextareaDialog(m,mxResources.get("editTooltip")+":",P,function(T){p.setTooltipForCell(F,T)});m.showDialog(P.container,320,200,!0,!0);P.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var F=p.getLinkForCell(p.getSelectionCell());-null!=F&&p.openLink(F)});this.addAction("editLink...",function(){var F=p.getSelectionCell();if(p.isEnabled()&&null!=F&&p.isCellEditable(F)){var P=p.getLinkForCell(F,!0)||"";m.showLinkDialog(P,mxResources.get("ok"),function(R,T,c){p.getModel().beginUpdate();try{p.setLinkForCell(F,0<R.length?R:null),p.setAttributeForCell(F,"linkTarget",c)}finally{p.getModel().endUpdate()}},!0,p.getLinkTargetForCell(F))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&-!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=A;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(F,P,R){F=mxUtils.trim(F);if(0<F.length){var T=null,c=p.getLinkTitle(F);null!=P&&0<P.length&&(T=P[0].iconUrl,c=P[0].name||P[0].type,c=c.charAt(0).toUpperCase()+-c.substring(1),30<c.length&&(c=c.substring(0,30)+"..."));P=new mxCell(c,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=T?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+T:"spacing=10;"));P.vertex=!0;T=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([P],!0));P.geometry.x=T.x;P.geometry.y=T.y;p.setAttributeForCell(P,"linkTarget",R);p.setLinkForCell(P,F);p.cellSizeUpdated(P,!0);p.getModel().beginUpdate();try{P=p.addCell(P),-p.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{p.getModel().endUpdate()}p.setSelectionCell(P);p.scrollCellToVisible(p.getSelectionCell())}},!0)},null,null,"L")).isEnabled=A;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var F=p.getSelectedElement(),P=p.getParentByName(F,"A",p.cellEditor.textarea),R="";if(null==P&&null!=F&&null!=F.getElementsByTagName)for(var T=F.getElementsByTagName("a"),c=0;c<T.length&&null==P;c++)T[c].textContent==-F.textContent&&(P=T[c]);null!=P&&"A"==P.nodeName&&(R=P.getAttribute("href")||"",p.selectNode(P));var f=p.cellEditor.saveSelection();m.showLinkDialog(R,mxResources.get("ok"),mxUtils.bind(this,function(k){p.cellEditor.restoreSelection(f);null!=k&&p.insertLink(k)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=A;this.addAction("autosize",function(){var F=p.getSelectionCells();if(null!=F){p.getModel().beginUpdate();try{for(var P=0;P<F.length;P++){var R=-F[P];p.getModel().isVertex(R)&&(0<p.getModel().getChildCount(R)?p.updateGroupBounds([R],0,!0):p.updateCellSize(R))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var F=p.getCommonStyle(p.getSelectionCells());F="1"==mxUtils.getValue(F,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var P=p.getEditableCells(p.getSelectionCells()),-R=0;R<P.length;R++)if(state=p.getView().getState(P[R]),null!=state){var T=mxUtils.getValue(state.style,"html","0");if("1"==T&&null==F)p.removeTextStyleForCell(state.cell),p.setCellStyles("html",F,[P[R]]);else if("0"==T&&"1"==F){var c=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));p.cellLabelChanged(state.cell,Graph.sanitizeHtml(c));p.setCellStyles("html",F,[P[R]])}}m.fireEvent(new mxEventObject("styleChanged",-"keys",["html"],"values",[null!=F?F:"0"],"cells",P))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var F=p.getView().getState(p.getSelectionCell()),P="wrap";p.stopEditing();null!=F&&"wrap"==F.style[mxConstants.STYLE_WHITE_SPACE]&&(P=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,P)});this.addAction("rotation",function(){var F="0",P=p.getView().getState(p.getSelectionCell());null!=P&&(F=P.style[mxConstants.STYLE_ROTATION]||F);F=new FilenameDialog(m,F,mxResources.get("apply"),-function(R){null!=R&&0<R.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,R)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(F.container,375,80,!0,!0);F.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(F){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(F){p.isFastZoomEnabled()?+function(G){p.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(G){p.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",function(){if(p.isEnabled()){var G=mxUtils.sortCells(p.getSelectionCells(),!0);1!=G.length||p.isTable(G[0])||p.isTableRow(G[0])?(G=p.getCellsForGroup(G),1<G.length&&p.setSelectionCell(p.groupCells(null,0,G))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",+function(){if(p.isEnabled()){var G=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var O=p.ungroupCells();if(null!=G)for(var R=0;R<G.length;R++)p.model.contains(G[R])&&(0==p.model.getChildCount(G[R])&&p.model.isVertex(G[R])&&p.setCellStyles("container","0",[G[R]]),O.push(G[R]))}finally{p.model.endUpdate()}0<O.length&&p.setSelectionCells(O)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var G=p.getSelectionCells();if(null!=G){for(var O=+[],R=0;R<G.length;R++)p.isTableRow(G[R])||p.isTableCell(G[R])||O.push(G[R]);p.removeCellsFromParent(O);0<O.length&&p.scrollCellToVisible(O[0])}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(G)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var O=+"";if(mxUtils.isNode(G.value)){var R=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==R&&(R=G.value.getAttribute("tooltip"));null!=R&&(O=R)}O=new TextareaDialog(m,mxResources.get("editTooltip")+":",O,function(c){p.setTooltipForCell(G,c)});m.showDialog(O.container,320,200,!0,!0);O.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=p.getLinkForCell(p.getSelectionCell());+null!=G&&p.openLink(G)});this.addAction("editLink...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var O=p.getLinkForCell(G,!0)||"";m.showLinkDialog(O,mxResources.get("ok"),function(R,c,f){p.getModel().beginUpdate();try{p.setLinkForCell(G,0<R.length?R:null),p.setAttributeForCell(G,"linkTarget",f)}finally{p.getModel().endUpdate()}},!0,p.getLinkTargetForCell(G))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&+!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=B;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(G,O,R){G=mxUtils.trim(G);if(0<G.length){var c=null,f=p.getLinkTitle(G);null!=O&&0<O.length&&(c=O[0].iconUrl,f=O[0].name||O[0].type,f=f.charAt(0).toUpperCase()++f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));O=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));O.vertex=!0;c=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([O],!0));O.geometry.x=c.x;O.geometry.y=c.y;p.setAttributeForCell(O,"linkTarget",R);p.setLinkForCell(O,G);p.cellSizeUpdated(O,!0);p.getModel().beginUpdate();try{O=p.addCell(O),+p.fireEvent(new mxEventObject("cellsInserted","cells",[O]))}finally{p.getModel().endUpdate()}p.setSelectionCell(O);p.scrollCellToVisible(p.getSelectionCell())}},!0)},null,null,"L")).isEnabled=B;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var G=p.getSelectedElement(),O=p.getParentByName(G,"A",p.cellEditor.textarea),R="";if(null==O&&null!=G&&null!=G.getElementsByTagName)for(var c=G.getElementsByTagName("a"),f=0;f<c.length&&null==O;f++)c[f].textContent==+G.textContent&&(O=c[f]);null!=O&&"A"==O.nodeName&&(R=O.getAttribute("href")||"",p.selectNode(O));var l=p.cellEditor.saveSelection();m.showLinkDialog(R,mxResources.get("ok"),mxUtils.bind(this,function(t){p.cellEditor.restoreSelection(l);null!=t&&p.insertLink(t)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=B;this.addAction("autosize",function(){var G=p.getSelectionCells();if(null!=G){p.getModel().beginUpdate();try{for(var O=0;O<G.length;O++){var R=+G[O];p.getModel().isVertex(R)&&(0<p.getModel().getChildCount(R)?p.updateGroupBounds([R],0,!0):p.updateCellSize(R))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var G=p.getCommonStyle(p.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var O=p.getEditableCells(p.getSelectionCells()),+R=0;R<O.length;R++)if(state=p.getView().getState(O[R]),null!=state){var c=mxUtils.getValue(state.style,"html","0");if("1"==c&&null==G)p.removeTextStyleForCell(state.cell),p.setCellStyles("html",G,[O[R]]);else if("0"==c&&"1"==G){var f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));p.cellLabelChanged(state.cell,Graph.sanitizeHtml(f));p.setCellStyles("html",G,[O[R]])}}m.fireEvent(new mxEventObject("styleChanged",+"keys",["html"],"values",[null!=G?G:"0"],"cells",O))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=p.getView().getState(p.getSelectionCell()),O="wrap";p.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&(O=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,O)});this.addAction("rotation",function(){var G="0",O=p.getView().getState(p.getSelectionCell());null!=O&&(G=O.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(m,G,mxResources.get("apply"),+function(R){null!=R&&0<R.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,R)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(G){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){p.pageVisible&&p.isSelectionEmpty()?p.fitPages():m.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(2):this.get("pageView").funct()}),-null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&p.zoomTo(P/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(F.container,-300,80,!0,!0);F.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&(P=new ChangePageSetup(m,null,null,null,P/100),P.ignoreColor=!0,P.ignoreImage=!0,p.model.execute(P))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(F.container,300,80,!0,!0);F.init()}));var G=null;G=this.addAction("grid",-function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");G.setToggleAction(!0);G.setSelectedCallback(function(){return p.isGridEnabled()});G.setEnabled(!1);G=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});-G.setEnabled(!1);G=this.addAction("animations",function(){Editor.enableAnimations=!Editor.enableAnimations;m.fireEvent(new mxEventObject("enableAnimationsChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.enableAnimations});G=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});-G=this.addAction("collapseExpand",function(){var F=new ChangePageSetup(m);F.ignoreColor=!0;F.ignoreImage=!0;F.foldingEnabled=!p.foldingEnabled;p.model.execute(F)});G.setToggleAction(!0);G.setSelectedCallback(function(){return p.foldingEnabled});G.isEnabled=A;G=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return p.pageVisible});G=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=-!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");G.setToggleAction(!0);G.setSelectedCallback(function(){return p.connectionArrowsEnabled});G=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+O");G.setToggleAction(!0);G.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});G=this.addAction("copyConnect",-function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());m.fireEvent(new mxEventObject("copyConnectChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});G.isEnabled=A;G=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});G.setToggleAction(!0);G.setSelectedCallback(function(){return m.editor.autosave});G.isEnabled=A;G.visible=!1;this.addAction("help",function(){var F="";mxResources.isLanguageSupported(mxClient.language)&&-(F="_"+mxClient.language);p.openLink(RESOURCES_PATH+"/help"+F+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));G=mxUtils.bind(this,function(F,P,R,T){return this.addAction(F,function(){if(null!=R&&p.cellEditor.isContentEditing())R();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var c=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,-P,c);(P&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?p.updateLabelElements(c,function(k){k.style.fontWeight=null;"B"==k.nodeName&&p.replaceElement(k)}):(P&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(c,function(k){k.style.fontStyle=null;"I"==k.nodeName&&p.replaceElement(k)}):(P&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(c,function(k){k.style.textDecoration=null;"U"==k.nodeName&&p.replaceElement(k)});for(var f=0;f<c.length;f++)0==p.model.getChildCount(c[f])&&-p.autoSizeCell(c[f],!1)}finally{p.getModel().endUpdate()}}},null,null,T)});G("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");G("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");G("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000",+null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(O){O=parseInt(O);!isNaN(O)&&0<O&&p.zoomTo(O/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(G.container,+300,80,!0,!0);G.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(O){O=parseInt(O);!isNaN(O)&&0<O&&(O=new ChangePageSetup(m,null,null,null,O/100),O.ignoreColor=!0,O.ignoreImage=!0,p.model.execute(O))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}));var H=null;H=this.addAction("grid",+function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.isGridEnabled()});H.setEnabled(!1);H=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});+H.setEnabled(!1);H=this.addAction("animations",function(){Editor.enableAnimations=!Editor.enableAnimations;m.fireEvent(new mxEventObject("enableAnimationsChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return Editor.enableAnimations});H=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});+H=this.addAction("collapseExpand",function(){var G=new ChangePageSetup(m);G.ignoreColor=!0;G.ignoreImage=!0;G.foldingEnabled=!p.foldingEnabled;p.model.execute(G)});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.foldingEnabled});H.isEnabled=B;H=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));H.setToggleAction(!0);H.setSelectedCallback(function(){return p.pageVisible});H=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=+!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionArrowsEnabled});H=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+O");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});H=this.addAction("copyConnect",+function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());m.fireEvent(new mxEventObject("copyConnectChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});H.isEnabled=B;H=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});H.setToggleAction(!0);H.setSelectedCallback(function(){return m.editor.autosave});H.isEnabled=B;H.visible=!1;this.addAction("help",function(){var G="";mxResources.isLanguageSupported(mxClient.language)&&+(G="_"+mxClient.language);p.openLink(RESOURCES_PATH+"/help"+G+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));H=mxUtils.bind(this,function(G,O,R,c){return this.addAction(G,function(){if(null!=R&&p.cellEditor.isContentEditing())R();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,+O,f);(O&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?p.updateLabelElements(f,function(t){t.style.fontWeight=null;"B"==t.nodeName&&p.replaceElement(t)}):(O&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(t){t.style.fontStyle=null;"I"==t.nodeName&&p.replaceElement(t)}):(O&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(t){t.style.textDecoration=null;"U"==t.nodeName&&p.replaceElement(t)});for(var l=0;l<f.length;l++)0==p.model.getChildCount(f[l])&&+p.autoSizeCell(f[l],!1)}finally{p.getModel().endUpdate()}}},null,null,c)});H("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");H("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");H("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",p.shapeForegroundColor)});this.addAction("strokeColor...",function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR,null,null,"default",p.shapeBackgroundColor)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,-"backcolor",null,"default",p.shapeBackgroundColor)});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("removeFormat",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&!p.isEditing()){p.getModel().beginUpdate();try{for(var F=p.getSelectionCells(),P=0;P<F.length;P++)p.removeTextStyleForCell(F[P],!0)}finally{p.getModel().endUpdate()}}});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,+"backcolor",null,"default",p.shapeBackgroundColor)});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("removeFormat",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&!p.isEditing()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),O=0;O<G.length;O++)p.removeTextStyleForCell(G[O],!0)}finally{p.getModel().endUpdate()}}});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("sharp",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});-this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!p.isSelectionEmpty()&&p.isEnabled()){p.getModel().beginUpdate();try{var F=p.getSelectionCells(),P=p.getCurrentCellStyle(F[0]),-R="1"==mxUtils.getValue(P,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,R);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[R,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,-"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var F=p.view.getState(p.getSelectionCell()),P="1";null!=F&&null!=p.getFoldingImage(F)&&(P="0");p.setCellStyles("collapsible",P);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[P],"cells",p.getSelectionCells()))});this.addAction("editStyle...",-mxUtils.bind(this,function(){var F=p.getEditableCells(p.getSelectionCells());if(null!=F&&0<F.length){var P=p.getModel();P=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",P.getStyle(F[0])||"",function(R){null!=R&&p.setCellStyle(mxUtils.trim(R),F)},null,null,400,220);this.editorUi.showDialog(P.container,420,300,!0,!0);P.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var F=p.getSelectionCell();if(null!=F&&p.getModel().isEdge(F)){var P=v.graph.selectionCellsHandler.getHandler(F);if(P instanceof mxEdgeHandler){var R=p.view.translate,T=p.view.scale,c=R.x;R=R.y;F=p.getModel().getParent(F);for(var f=p.getCellGeometry(F);p.getModel().isVertex(F)&&null!=f;)c+=f.x,R+=f.y,F=-p.getModel().getParent(F),f=p.getCellGeometry(F);c=Math.round(p.snap(p.popupMenuHandler.triggerX/T-c));T=Math.round(p.snap(p.popupMenuHandler.triggerY/T-R));P.addPointAt(P.state,c,T)}}});this.addAction("removeWaypoint",function(){var F=m.actions.get("removeWaypoint");null!=F.handler&&F.handler.removePoint(F.handler.state,F.index)});this.addAction("clearAnchors",function(){var F=p.getSelectionCells();if(null!=F){F=p.getEditableCells(p.addAllEdges(F));p.getModel().beginUpdate();try{for(var P=0;P<F.length;P++){var R=-F[P];p.getModel().isEdge(R)&&(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[R]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{p.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var F=p.getSelectionCells();if(null!=F){F=p.getEditableCells(p.addAllEdges(F));p.getModel().beginUpdate();try{for(var P=0;P<F.length;P++){var R=F[P];if(p.getModel().isEdge(R)){var T=p.getCellGeometry(R);-null!=T&&(T=T.clone(),T.points=null,T.x=0,T.y=0,T.offset=null,p.getModel().setGeometry(R,T))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+R");G=this.addAction("subscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");G=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");G=this.addAction("decreaseFontSize",-mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var F=p.getCurrentCellStyle(p.getSelectionCell());F=mxUtils.getValue(F,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,F-1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");G=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var F=p.getCurrentCellStyle(p.getSelectionCell());F=mxUtils.getValue(F,mxConstants.STYLE_FONTSIZE,-mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,F+1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var F=mxResources.get("image")+" ("+mxResources.get("url")+"):",P=p.getView().getState(p.getSelectionCell()),R="",T=null;null!=P&&(R=P.style[mxConstants.STYLE_IMAGE]||R,T=P.style[mxConstants.STYLE_CLIP_PATH]||T);var c=p.cellEditor.saveSelection();-m.showImageDialog(F,R,function(f,k,B,z,C,I){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(c),p.insertImage(f,k,B);else{var L=p.getSelectionCells();if(null!=f&&(0<f.length||0<L.length)){var K=null;p.getModel().beginUpdate();try{if(0==L.length){L=[p.insertVertex(p.getDefaultParent(),null,"",0,0,k,B,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var O=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(L,!0));L[0].geometry.x=O.x;L[0].geometry.y=-O.y;null!=z&&g(L[0],z,C,I,p);K=L;p.fireEvent(new mxEventObject("cellsInserted","cells",K))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<f.length?f:null,L);var da=p.getCurrentCellStyle(L[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&"label"!=da[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",L):0==f.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,L);null==z&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,L);if(null!=k&&null!=B)for(f=0;f<L.length;f++){var ea=L[f];if("0"!=p.getCurrentCellStyle(ea).expand){var ca=-p.getModel().getGeometry(ea);null!=ca&&(ca=ca.clone(),ca.width=k,ca.height=B,p.getModel().setGeometry(ea,ca))}null!=z&&g(ea,z,C,I,p)}}finally{p.getModel().endUpdate()}null!=K&&(p.setSelectionCells(K),p.scrollCellToVisible(K[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,T)}}).isEnabled=A;this.addAction("crop...",function(){var F=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=F){var P=p.getCurrentCellStyle(F),R=P[mxConstants.STYLE_IMAGE],-T=P[mxConstants.STYLE_SHAPE];R&&"image"==T&&(P=new CropImageDialog(m,R,P[mxConstants.STYLE_CLIP_PATH],function(c,f,k){g(F,c,f,k,p)}),m.showDialog(P.container,300,390,!0,!0))}}).isEnabled=A;G=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",-function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));G=this.addAction("format",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,-null,Editor.ctrlKey+"+Shift+P");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return m.isFormatPanelVisible()}));G=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),-this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var F=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=F&&null!=F.geometry){var P=-new ConnectionPointsDialog(m,F);m.showDialog(P.container,350,450,!0,!1,function(){P.destroy()});P.init()}},null,null,"Alt+Shift+Q").isEnabled=A};Actions.prototype.addAction=function(b,e,g,m,v){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,g,m,v))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};-function Action(b,e,g,m,v){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=g?g:!0;this.iconCls=m;this.shortcut=v;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};+this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!p.isSelectionEmpty()&&p.isEnabled()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),O=p.getCurrentCellStyle(G[0]),+R="1"==mxUtils.getValue(O,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,R);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[R,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,+"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var G=p.view.getState(p.getSelectionCell()),O="1";null!=G&&null!=p.getFoldingImage(G)&&(O="0");p.setCellStyles("collapsible",O);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[O],"cells",p.getSelectionCells()))});this.addAction("editStyle...",+mxUtils.bind(this,function(){var G=p.getEditableCells(p.getSelectionCells());if(null!=G&&0<G.length){var O=p.getModel();O=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",O.getStyle(G[0])||"",function(R){null!=R&&p.setCellStyle(mxUtils.trim(R),G)},null,null,400,220);this.editorUi.showDialog(O.container,420,300,!0,!0);O.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=p.getSelectionCell();if(null!=G&&p.getModel().isEdge(G)){var O=u.graph.selectionCellsHandler.getHandler(G);if(O instanceof mxEdgeHandler){var R=p.view.translate,c=p.view.scale,f=R.x;R=R.y;G=p.getModel().getParent(G);for(var l=p.getCellGeometry(G);p.getModel().isVertex(G)&&null!=l;)f+=l.x,R+=l.y,G=+p.getModel().getParent(G),l=p.getCellGeometry(G);f=Math.round(p.snap(p.popupMenuHandler.triggerX/c-f));c=Math.round(p.snap(p.popupMenuHandler.triggerY/c-R));O.addPointAt(O.state,f,c)}}});this.addAction("removeWaypoint",function(){var G=m.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,G.index)});this.addAction("clearAnchors",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var O=0;O<G.length;O++){var R=+G[O];p.getModel().isEdge(R)&&(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[R]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{p.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var O=0;O<G.length;O++){var R=G[O];if(p.getModel().isEdge(R)){var c=p.getCellGeometry(R);+null!=c&&(c=c.clone(),c.points=null,c.x=0,c.y=0,c.offset=null,p.getModel().setGeometry(R,c))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+R");H=this.addAction("subscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");H=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");H=this.addAction("decreaseFontSize",+mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,G-1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");H=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,+mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",O=p.getView().getState(p.getSelectionCell()),R="",c=null;null!=O&&(R=O.style[mxConstants.STYLE_IMAGE]||R,c=O.style[mxConstants.STYLE_CLIP_PATH]||c);var f=p.cellEditor.saveSelection();+m.showImageDialog(G,R,function(l,t,z,C,F,N){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(l,t,z);else{var K=p.getSelectionCells();if(null!=l&&(0<l.length||0<K.length)){var I=null;p.getModel().beginUpdate();try{if(0==K.length){K=[p.insertVertex(p.getDefaultParent(),null,"",0,0,t,z,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ca=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ca.x;K[0].geometry.y=+ca.y;null!=C&&g(K[0],C,F,N,p);I=K;p.fireEvent(new mxEventObject("cellsInserted","cells",I))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<l.length?l:null,K);var da=p.getCurrentCellStyle(K[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&"label"!=da[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==l.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=t&&null!=z)for(l=0;l<K.length;l++){var ea=K[l];if("0"!=p.getCurrentCellStyle(ea).expand){var X=+p.getModel().getGeometry(ea);null!=X&&(X=X.clone(),X.width=t,X.height=z,p.getModel().setGeometry(ea,X))}null!=C&&g(ea,C,F,N,p)}}finally{p.getModel().endUpdate()}null!=I&&(p.setSelectionCells(I),p.scrollCellToVisible(I[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,c)}}).isEnabled=B;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var O=p.getCurrentCellStyle(G),R=O[mxConstants.STYLE_IMAGE],+c=O[mxConstants.STYLE_SHAPE];R&&"image"==c&&(O=new CropImageDialog(m,R,O[mxConstants.STYLE_CLIP_PATH],function(f,l,t){g(G,f,l,t,p)}),m.showDialog(O.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",+function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));H=this.addAction("format",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,+null,Editor.ctrlKey+"+Shift+P");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return m.isFormatPanelVisible()}));H=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),+this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G&&null!=G.geometry){var O=+new ConnectionPointsDialog(m,G);m.showDialog(O.container,350,450,!0,!1,function(){O.destroy()});O.init()}},null,null,"Alt+Shift+Q").isEnabled=B};Actions.prototype.addAction=function(b,e,g,m,u){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,g,m,u))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};+function Action(b,e,g,m,u){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=g?g:!0;this.iconCls=m;this.shortcut=u;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};-DrawioFile.prototype.synchronizeFile=function(b,e){if(this.savingFile)null!=e&&e({message:mxResources.get("busy")});else{var g=!0,m=window.setTimeout(mxUtils.bind(this,function(){g=!1;null!=e&&e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,e)})})}),this.ui.timeout),v=mxUtils.bind(this,function(A){g&&(window.clearTimeout(m),null!=e&&e(A))}),p=mxUtils.bind(this,function(){return!g});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,-function(A){g&&(window.clearTimeout(m),this.sync.cleanup(b,e,A))}),v,p):this.updateFile(mxUtils.bind(this,function(){g&&(window.clearTimeout(m),null!=b&&b())}),v,p)}};-DrawioFile.prototype.updateFile=function(b,e,g,m,v){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",v,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(p){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[p]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=p?this.mergeFile(p,b,e,-m,v):this.reloadFile(b,e))}catch(A){null!=e&&e(A)}}),e))};-DrawioFile.prototype.mergeFile=function(b,e,g,m,v){try{var p=b.getShadowPages();if(null!=p&&0<p.length){var A=this.getShadowPages(),G=[this.ui.diffPages(null!=m?m:A,p)],S=this.ignorePatches(G);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var F=this.isModified()?this.ui.diffPages(A,-this.isRealtime()?this.ownPages:this.ui.pages):null,P=this.ui.patchPages(this.ui.clonePages(A),G[0]),R=this.ui.getHashValueForPages(P,{}),T=this.ui.getHashValueForPages(p,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",A,"pages",p,"patched",P,"patches",G,"changes",F,"checksum",R,"current",T,"valid",R==T,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",v);if(null!=R&&R!=T)this.checksumError(g,G,null,null,"mergeFile",-R,T,b.getCurrentRevisionId());else{this.setShadowPages(p);if(null!=this.sync){var c=this.sync.patchRealtime(G,DrawioFile.LAST_WRITE_WINS?F:null,null,v);null==c||mxUtils.isEmptyObject(c)||G.push(c)}this.patch(G,DrawioFile.LAST_WRITE_WINS?F:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(B){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(B);try{var f=this.getCurrentUser(),k=null!=f?-f.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),k,B)}catch(z){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(B){null!=g&&g(B)}};-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),g=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var v=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(v=this.ui.anonymizeNode(v,!0));v.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,v,!0);g.appendChild(v)}return mxUtils.getPrettyXml(g)};+DrawioFile.prototype.synchronizeFile=function(b,e){if(this.savingFile)null!=e&&e({message:mxResources.get("busy")});else{var g=!0,m=window.setTimeout(mxUtils.bind(this,function(){g=!1;null!=e&&e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,e)})})}),this.ui.timeout),u=mxUtils.bind(this,function(B){g&&(window.clearTimeout(m),null!=e&&e(B))}),p=mxUtils.bind(this,function(){return!g});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,+function(B){g&&(window.clearTimeout(m),this.sync.cleanup(b,e,B))}),u,p):this.updateFile(mxUtils.bind(this,function(){g&&(window.clearTimeout(m),null!=b&&b())}),u,p)}};+DrawioFile.prototype.updateFile=function(b,e,g,m,u){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",u,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(p){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[p]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=p?this.mergeFile(p,b,e,+m,u):this.reloadFile(b,e))}catch(B){null!=e&&e(B)}}),e))};+DrawioFile.prototype.mergeFile=function(b,e,g,m,u){try{var p=b.getShadowPages();if(null!=p&&0<p.length){var B=this.getShadowPages(),H=[this.ui.diffPages(null!=m?m:B,p)],S=this.ignorePatches(H);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var G=this.isModified()?this.ui.diffPages(B,+this.isRealtime()?this.ownPages:this.ui.pages):null,O=this.ui.patchPages(this.ui.clonePages(B),H[0]),R=this.ui.getHashValueForPages(O,{}),c=this.ui.getHashValueForPages(p,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",p,"patched",O,"patches",H,"changes",G,"checksum",R,"current",c,"valid",R==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",u);if(null!=R&&R!=c)this.checksumError(g,H,null,null,"mergeFile",+R,c,b.getCurrentRevisionId());else{this.setShadowPages(p);if(null!=this.sync){var f=this.sync.patchRealtime(H,DrawioFile.LAST_WRITE_WINS?G:null,null,u);null==f||mxUtils.isEmptyObject(f)||H.push(f)}this.patch(H,DrawioFile.LAST_WRITE_WINS?G:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(z);try{var l=this.getCurrentUser(),t=null!=l?+l.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),t,z)}catch(C){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(z){null!=g&&g(z)}};+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),g=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var u=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(u=this.ui.anonymizeNode(u,!0));u.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,u,!0);g.appendChild(u)}return mxUtils.getPrettyXml(g)};DrawioFile.prototype.compressReportData=function(b,e,g){e=null!=e?e:1E4;null!=g&&null!=b&&b.length>g?b=b.substring(0,g)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};-DrawioFile.prototype.checksumError=function(b,e,g,m,v,p,A,G){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),F=null!=S?S.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",R=JSON.stringify(e).length,T=null;if(null!=e&&1E3>R){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);T=JSON.stringify(e);T=null!=T&&1E3>T.length?Graph.compress(T):-null}this.getLatestVersion(mxUtils.bind(this,function(c){try{var f=null!=T?"report":"error",k=this.ui.getHashValueForPages(c.getShadowPages()),B="unknown",z="unknown",C="unknown";try{var I=null!=c.initialData&&0<c.initialData.length?mxUtils.parseXml(c.initialData).documentElement:null;null!=I&&(null!=I.getAttribute("version")&&(B=I.getAttribute("version")),null!=I.getAttribute("agent")&&(z=I.getAttribute("agent")),null!=I.getAttribute("type")&&(C=I.getAttribute("type")))}catch(L){}EditorUi.logError("Checksum "+-f+" in "+v,null,this.getMode()+"."+P,"user_"+F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+(null!=T?"-json_"+T:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=A?"-current_"+A:"")+(null!=G?"-rev_"+this.ui.hashValue(G):"")+(null!=k?"-latest_"+k:"")+"-latestRev_"+this.ui.hashValue(c.getCurrentRevisionId())+("-latestVersion_"+B)+("-latestAgent_"+z)+("-latestType_"+C));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+P,action:v,label:"user_"+-F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+"-size_"+this.getSize()})}catch(L){}}),function(){})}catch(c){}};-DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var v=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),A=this.getCurrentUser(),G=null!=A?this.ui.hashValue(A.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",F=this.getTitle(),P=F.lastIndexOf(".");A="xml";0<P&&(A=F.substring(P));var R=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+A+")\nUser="+G+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:-"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+R+"\n\nShadow:\n"+v+"\n\nData:\n"+p,m)}catch(T){}};-DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var g=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),m=this.ui.editor.graph,v=m.getSelectionCells(),p=m.getViewState(),A=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(G){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[g],"viewState",[p],"latestFile",G);null!=G?(this.ui.replaceFileData(G.getData(),-[g]),this.ui.restoreViewState(A,p,v),this.setDescriptor(G.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([g]),S.fileChanged());this.ui.restoreViewState(A,p,v);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(G){null!=e&&e(G)}};+DrawioFile.prototype.checksumError=function(b,e,g,m,u,p,B,H){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),G=null!=S?S.id:"unknown",O=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",R=JSON.stringify(e).length,c=null;if(null!=e&&1E3>R){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);c=JSON.stringify(e);c=null!=c&&1E3>c.length?Graph.compress(c):+null}this.getLatestVersion(mxUtils.bind(this,function(f){try{var l=null!=c?"report":"error",t=this.ui.getHashValueForPages(f.getShadowPages()),z="unknown",C="unknown",F="unknown";try{var N=null!=f.initialData&&0<f.initialData.length?mxUtils.parseXml(f.initialData).documentElement:null;null!=N&&(null!=N.getAttribute("version")&&(z=N.getAttribute("version")),null!=N.getAttribute("agent")&&(C=N.getAttribute("agent")),null!=N.getAttribute("type")&&(F=N.getAttribute("type")))}catch(K){}EditorUi.logError("Checksum "++l+" in "+u,null,this.getMode()+"."+O,"user_"+G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=B?"-current_"+B:"")+(null!=H?"-rev_"+this.ui.hashValue(H):"")+(null!=t?"-latest_"+t:"")+"-latestRev_"+this.ui.hashValue(f.getCurrentRevisionId())+("-latestVersion_"+z)+("-latestAgent_"+C)+("-latestType_"+F));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+O,action:u,label:"user_"++G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(f){}};+DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var u=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),H=null!=B?this.ui.hashValue(B.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),O=G.lastIndexOf(".");B="xml";0<O&&(B=G.substring(O));var R=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()++":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+B+")\nUser="+H+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:+"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+R+"\n\nShadow:\n"+u+"\n\nData:\n"+p,m)}catch(c){}};+DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var g=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),m=this.ui.editor.graph,u=m.getSelectionCells(),p=m.getViewState(),B=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(H){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[g],"viewState",[p],"latestFile",H);null!=H?(this.ui.replaceFileData(H.getData(),+[g]),this.ui.restoreViewState(B,p,u),this.setDescriptor(H.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([g]),S.fileChanged());this.ui.restoreViewState(B,p,u);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(H){null!=e&&e(H)}};DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var g=0;g<b.length&&e;g++)e=e&&mxUtils.isEmptyObject(b[g]);return e};-DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var v=this.ui.editor.undoManager,p=v.history.slice(),A=v.indexOfNextAdd,G=this.ui.editor.graph;G.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var F=G.foldingEnabled,P=G.mathEnabled,R=G.cellRenderer.redraw;G.cellRenderer.redraw=function(z){z.view.graph.isEditing(z.cell)&&(z.view.graph.scrollCellToVisible(z.cell),z.view.graph.cellEditor.resize());R.apply(this,arguments)};G.model.beginUpdate();-try{if(g){for(var T=this.ui.pages.slice(),c=this.ui.currentPage,f=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),k=0;k<f.length;k++){var B=mxUtils.indexOf(this.ui.pages,f[k]);0>B?this.ui.insertPage(f[k],Math.min(k,this.ui.pages.length)):this.ui.movePage(B,k)}for(k=0;k<T.length;k++)0>mxUtils.indexOf(f,T[k])&&this.ui.removePage(T[k]);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);G.checkDefaultParent()}finally{G.container.style.visibility="";G.model.endUpdate();G.cellRenderer.redraw=R;this.changeListenerEnabled=S;g||(v.history=p,v.indexOfNextAdd=A,v.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=G.mathEnabled?(this.ui.editor.updateGraphComponents(),G.refresh()):(F!=G.foldingEnabled?-G.view.revalidate():G.view.validate(),G.sizeDidChange());null!=this.sync&&this.isRealtime()&&!m&&(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,m,v,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",v,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!v&&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};+DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var u=this.ui.editor.undoManager,p=u.history.slice(),B=u.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=H.foldingEnabled,O=H.mathEnabled,R=H.cellRenderer.redraw;H.cellRenderer.redraw=function(C){C.view.graph.isEditing(C.cell)&&(C.view.graph.scrollCellToVisible(C.cell),C.view.graph.cellEditor.resize());R.apply(this,arguments)};H.model.beginUpdate();+try{if(g){for(var c=this.ui.pages.slice(),f=this.ui.currentPage,l=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),t=0;t<l.length;t++){var z=mxUtils.indexOf(this.ui.pages,l[t]);0>z?this.ui.insertPage(l[t],Math.min(t,this.ui.pages.length)):this.ui.movePage(z,t)}for(t=0;t<c.length;t++)0>mxUtils.indexOf(l,c[t])&&this.ui.removePage(c[t]);0<=mxUtils.indexOf(this.ui.pages,f)&&this.ui.selectPage(f,!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);H.checkDefaultParent()}finally{H.container.style.visibility="";H.model.endUpdate();H.cellRenderer.redraw=R;this.changeListenerEnabled=S;g||(u.history=p,u.indexOfNextAdd=B,u.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)O!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(G!=H.foldingEnabled?+H.view.revalidate():H.view.validate(),H.sizeDidChange());null!=this.sync&&this.isRealtime()&&!m&&(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,m,u,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",u,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!u&&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(B){if(null!=g)g(B);else throw B;}};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};DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return Editor.defaultCompressed};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,e,g){};DrawioFile.prototype.saveFile=function(b,e,g,m){};DrawioFile.prototype.getFileUrl=function(){return null};DrawioFile.prototype.getFolderUrl=function(b){return null};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,g){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,g){};-DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var e=this.ui.editor.graph,g=e.getSelectionCells(),m=e.getViewState(),v=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(v,+DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var e=this.ui.editor.graph,g=e.getSelectionCells(),m=e.getViewState(),u=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(u,m,g);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var e=0;null!=b&&e<b.length;e++){var g=b[e];null!=g.id&&0==g.id.indexOf("extFont_")&&g.parentNode.removeChild(g)}};DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();null!=b&&(this.ui.setFileData(b),this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages)));this.installListeners();this.isSyncSupported()&&this.startSync();EditorUi.debug("DrawioFile.open",[this])};DrawioFile.prototype.isPolling=function(){return!1};DrawioFile.prototype.getPollingInterval=function(){return 1E4};DrawioFile.prototype.isSyncSupported=function(){return!1};@@ -3132,35 +3131,35 @@ DrawioFile.prototype.showRefreshDialog=function(b,e,g){null==g&&(g=mxResources.gfunction(){null!=b&&b();this.ui.alert(mxResources.get("copyCreated"))}),e)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.reloadFile(mxUtils.bind(this,function(){this.ui.spinner.stop();null!=b&&b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};DrawioFile.prototype.showCopyDialog=function(b,e,g){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,e)}),null,mxResources.get("overwrite"),g,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};DrawioFile.prototype.showConflictDialog=function(b,e){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};-DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var g=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),m=mxResources.get("redirectToNewApp");null!=e&&(m+=" ("+e+")");e=mxUtils.bind(this,function(){var v=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==g?window.location.reload():window.location.href=-g});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()});null!=b?this.isModified()?this.ui.confirm(m,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(m,e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),+DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var g=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),m=mxResources.get("redirectToNewApp");null!=e&&(m+=" ("+e+")");e=mxUtils.bind(this,function(){var u=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==g?window.location.reload():window.location.href=+g});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()});null!=b?this.isModified()?this.ui.confirm(m,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(m,e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),e)}};DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified(),"remoteFileChanged",null==this.sync?"n/a":this.sync.remoteFileChanged),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+")":"")+"</div>"))))};-DrawioFile.prototype.handleConflictError=function(b,e){var g=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),m=mxUtils.bind(this,function(A){this.handleFileError(A,!0)}),v=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,g,m,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,g,m,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),m)});"none"==DrawioFile.SYNC?this.showCopyDialog(g,m,v):this.invalidChecksum&&e?this.showRefreshDialog(g,m,this.getErrorMessage(b)):e?this.showConflictDialog(v,p):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));+DrawioFile.prototype.handleConflictError=function(b,e){var g=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),m=mxUtils.bind(this,function(B){this.handleFileError(B,!0)}),u=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,g,m,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,g,m,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),m)});"none"==DrawioFile.SYNC?this.showCopyDialog(g,m,u):this.invalidChecksum&&e?this.showRefreshDialog(g,m,this.getErrorMessage(b)):e?this.showConflictDialog(u,p):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(g,m)}))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT?e=mxResources.get("timeout"):"0"==e&&(e=mxResources.get("noResponse"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};-DrawioFile.prototype.compressionChanged=function(b){var e=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=e)for(var g=0;g<e.length;g++){var m=e[g].node;if(null!=m&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=e[g].getId())){var v=m.getElementsByTagName("mxGraphModel");v=0<v.length?v[0]:null;var p=Graph.decompress(mxUtils.getNodeValue(m));b?0==p.length&&null!=v&&(EditorUi.removeChildNodes(m),mxUtils.setTextContent(m,Graph.compressNode(v)),EditorUi.debug("DrawioFile.compressionChanged",-[this],"Page "+g+" compressed")):0<p.length&&null==v&&(EditorUi.removeChildNodes(m),m.appendChild(mxUtils.parseXml(p).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+g+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};+DrawioFile.prototype.compressionChanged=function(b){var e=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=e)for(var g=0;g<e.length;g++){var m=e[g].node;if(null!=m&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=e[g].getId())){var u=m.getElementsByTagName("mxGraphModel");u=0<u.length?u[0]:null;var p=Graph.decompress(mxUtils.getNodeValue(m));b?0==p.length&&null!=u&&(EditorUi.removeChildNodes(m),mxUtils.setTextContent(m,Graph.compressNode(u)),EditorUi.debug("DrawioFile.compressionChanged",+[this],"Page "+g+" compressed")):0<p.length&&null==u&&(EditorUi.removeChildNodes(m),m.appendChild(mxUtils.parseXml(p).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+g+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosaveDelay",this.autosaveDelay,"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck();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,m,v,p,A){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;p=null!=p?p:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(p,e,g,m,v,A)}catch(F){this.invalidChecksum=-this.inConflictState=!0;this.descriptorChanged();null!=m&&m(F);try{var G=this.getCurrentUser(),S=null!=G?G.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,F)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(F){this.descriptorChanged(),null!=m&&m(F)}};-DrawioFile.prototype.autosave=function(b,e,g,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());var v=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var p=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==p&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var A=this.isAutosaveRevision();-A&&(this.lastAutosaveRevision=(new Date).getTime());this.save(A,mxUtils.bind(this,function(G){this.autosaveCompleted();null!=g&&g(G)}),mxUtils.bind(this,function(G){null!=m&&m(G)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=g&&g(null)}catch(G){null!=m&&m(G)}}),v);this.autosaveThread=p;EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"delay",b,"maxDelay",e,"actualDelay",v,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};+DrawioFile.prototype.fileSaved=function(b,e,g,m,u,p,B){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;p=null!=p?p:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(p,e,g,m,u,B)}catch(G){this.invalidChecksum=+this.inConflictState=!0;this.descriptorChanged();null!=m&&m(G);try{var H=this.getCurrentUser(),S=null!=H?H.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,G)}catch(O){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=m&&m(G)}};+DrawioFile.prototype.autosave=function(b,e,g,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());var u=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var p=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==p&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var B=this.isAutosaveRevision();+B&&(this.lastAutosaveRevision=(new Date).getTime());this.save(B,mxUtils.bind(this,function(H){this.autosaveCompleted();null!=g&&g(H)}),mxUtils.bind(this,function(H){null!=m&&m(H)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=g&&g(null)}catch(H){null!=m&&m(H)}}),u);this.autosaveThread=p;EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"delay",b,"maxDelay",e,"actualDelay",u,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(e){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var g=b.lastIndexOf(".");b=0<g?b.substring(g):"";g=e.lastIndexOf(".");return b===(0<g?e.substring(g):"")}return b==e};DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};-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,m,v,p,A){DrawioFile.call(this,b,e);this.title=g;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=v;this.desc=p;this.editable=A};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.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,g,m,v){this.saveAs(this.title,e,g,m,v)};LocalFile.prototype.saveAs=function(b,e,g,m,v){this.saveFile(b,!1,e,g,null,m,v)};+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,m,u,p,B){DrawioFile.call(this,b,e);this.title=g;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=u;this.desc=p;this.editable=B};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.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,g,m,u){this.saveAs(this.title,e,g,m,u)};LocalFile.prototype.saveAs=function(b,e,g,m,u){this.saveFile(b,!1,e,g,null,m,u)};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,m,v,p,A){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;v||this.updateFileData();var G=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),F=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),P=mxUtils.bind(this,function(R){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=-!0;var T=mxUtils.bind(this,function(f){this.savingFile=!1;null!=m&&m({error:f})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(f){this.fileHandle.getFile().then(mxUtils.bind(this,function(k){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[k],"conflict",this.desc.lastModified!=k.lastModified);A||this.desc.lastModified==k.lastModified?f.write(G?this.ui.base64ToBlob(R,"image/png"):R).then(mxUtils.bind(this,function(){f.close().then(mxUtils.bind(this,-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(B){try{var z=this.desc;this.savingFile=!1;this.desc=B;this.fileSaved(S,z,F,T);this.removeDraft()}catch(C){T(C)}}),T)}),T)}),T):(this.inConflictState=!0,T())}),mxUtils.bind(this,function(k){this.invalidFileHandle=!0;T(k)}))}),T)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(R,b,G?"image/png":"text/xml",G);else if(R.length<MAX_REQUEST_SIZE){var c=b.lastIndexOf(".");c=0<c?b.substring(c+1):"xml";-(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(R)+"&filename="+encodeURIComponent(b)+(G?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(R)}));F()}});G?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(R){P(R)}),m,this.ui.getCurrentFile()!=this?S:null,e.scale,e.border)):P(S)};+LocalFile.prototype.saveFile=function(b,e,g,m,u,p,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;u||this.updateFileData();var H=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),G=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),O=mxUtils.bind(this,function(R){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=+!0;var c=mxUtils.bind(this,function(l){this.savingFile=!1;null!=m&&m({error:l})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(l){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[t],"conflict",this.desc.lastModified!=t.lastModified);B||this.desc.lastModified==t.lastModified?l.write(H?this.ui.base64ToBlob(R,"image/png"):R).then(mxUtils.bind(this,function(){l.close().then(mxUtils.bind(this,+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(z){try{var C=this.desc;this.savingFile=!1;this.desc=z;this.fileSaved(S,C,G,c);this.removeDraft()}catch(F){c(F)}}),c)}),c)}),c):(this.inConflictState=!0,c())}),mxUtils.bind(this,function(t){this.invalidFileHandle=!0;c(t)}))}),c)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(R,b,H?"image/png":"text/xml",H);else if(R.length<MAX_REQUEST_SIZE){var f=b.lastIndexOf(".");f=0<f?b.substring(f+1):"xml";+(new mxXmlRequest(SAVE_URL,"format="+f+"&xml="+encodeURIComponent(R)+"&filename="+encodeURIComponent(b)+(H?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(R)}));G()}});H?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(R){O(R)}),m,this.ui.getCurrentFile()!=this?S:null,e.scale,e.border)):O(S)};LocalFile.prototype.rename=function(b,e,g){this.title=b;this.descriptorChanged();null!=e&&e()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";@@ -3208,132 +3207,132 @@ Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYEditor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableUncompressedLibraries=!1;Editor.enableCustomProperties=!0;-Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(l){Editor.enableServiceWorker=!1}Editor.enableWebFonts="1"!=+Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(k){Editor.enableServiceWorker=!1}Editor.enableWebFonts="1"!=urlParams["safe-style-src"]&&!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||/preprod\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.gptModel=null!=urlParams["gpt-model"]?decodeURIComponent(urlParams["gpt-model"]):"gpt-3.5-turbo";Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme=-"auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(l){l.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(l,u){return"1"!=mxUtils.getValue(l.style,"sketch","0")}},-{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"comic","0")||"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,-"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,-isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"dashOffset",-dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?-"1":"0")&&0<l.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==-mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},-isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",-type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(l,u){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",+"auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(k){k.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(k,A){return"1"!=mxUtils.getValue(k.style,"sketch","0")}},+{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"comic","0")||"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,+"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,+isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"dashOffset",+dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")&&0<k.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?+"1":"0")&&0<k.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==+mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},+isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",+type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(k,A){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(k.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source 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:"targetPortConstraint",dispName:"Target 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:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(l){return"orthogonalEdgeStyle"==mxUtils.getValue(l.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,-isVisible:function(l){return"entityRelationEdgeStyle"==mxUtils.getValue(l.style,mxConstants.STYLE_EDGE,null)}},{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:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",-type:"color",defVal:null},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(l){return"1"==mxUtils.getValue(l.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(l){return"1"==mxUtils.getValue(l.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(l){return"1"==mxUtils.getValue(l.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",+{name:"targetPortConstraint",dispName:"Target 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:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(k){return"orthogonalEdgeStyle"==mxUtils.getValue(k.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,+isVisible:function(k){return"entityRelationEdgeStyle"==mxUtils.getValue(k.style,mxConstants.STYLE_EDGE,null)}},{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:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",+type:"color",defVal:null},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",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(l,u){u=u.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&u.isTableCell(l.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(l,u){u=u.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&u.isTableCell(l.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(l,u){l=u.editorUi.editor.graph.getCellStyle(1==l.vertices.length&&-0==l.edges.length?l.vertices[0]:null);return"1"==mxUtils.getValue(l,"resizeLastRow","0")},isVisible:function(l,u){u=u.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&u.isTable(l.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(l,u){l=u.editorUi.editor.graph.getCellStyle(1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null);return"1"==mxUtils.getValue(l,"resizeLast","0")},isVisible:function(l,u){u=u.editorUi.editor.graph;-return 1==l.vertices.length&&0==l.edges.length&&u.isTable(l.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:"int",min:1,defVal:1,isVisible:function(k,A){A=A.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&A.isTableCell(k.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(k,A){A=A.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&A.isTableCell(k.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(k,A){k=A.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,A){A=A.editorUi.editor.graph;return 1==k.vertices.length&&0==k.edges.length&&A.isTable(k.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(k,A){k=A.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,A){A=A.editorUi.editor.graph;+return 1==k.vertices.length&&0==k.edges.length&&A.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(l,u){return u.editorUi.editor.graph.isCellConnectable(0<l.vertices.length&&0==l.edges.length?l.vertices[0]:null)},isVisible:function(l,u){return 0<l.vertices.length&&0==l.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},+dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(k,A){return A.editorUi.editor.graph.isCellConnectable(0<k.vertices.length&&0==k.edges.length?k.vertices[0]:null)},isVisible:function(k,A){return 0<k.vertices.length&&0==k.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},-{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",getDefaultValue:function(l,u){l=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;u=u.editorUi.editor.graph;return null!=l&&u.isSwimlane(l)},isVisible:function(l,u){return 1==l.vertices.length&&-0==l.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(l,u){l=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;u=u.editorUi.editor.graph;return null!=l&&(u.isSwimlane(l)||0<u.model.getChildCount(l))},isVisible:function(l,u){return 1==l.vertices.length&&0==l.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(l,u){var H=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;u=u.editorUi.editor.graph;-return null!=H&&(u.isContainer(H)&&"0"!=l.style.collapsible||!u.isContainer(H)&&"1"==l.style.collapsible)},isVisible:function(l,u){return 1==l.vertices.length&&0==l.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(l,u){return 1==l.vertices.length&&0==l.edges.length&&!u.editorUi.editor.graph.isSwimlane(l.vertices[0])&&null==mxUtils.getValue(l.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",-type:"bool",defVal:!1,isVisible:function(l,u){u=u.editorUi.editor.graph.model;return 0<l.vertices.length?u.isVertex(u.getParent(l.vertices[0])):!1}},{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:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(l,u){l=-0<l.vertices.length?u.editorUi.editor.graph.getCellGeometry(l.vertices[0]):null;return null!=l&&!l.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(l,u){return 0<l.vertices.length&&u.editorUi.editor.graph.isAutoSizeCell(l.vertices[0])}},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",+{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",getDefaultValue:function(k,A){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;return null!=k&&A.isSwimlane(k)},isVisible:function(k,A){return 1==k.vertices.length&&+0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,A){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;return null!=k&&(A.isSwimlane(k)||0<A.model.getChildCount(k))},isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,A){var J=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;+return null!=J&&(A.isContainer(J)&&"0"!=k.style.collapsible||!A.isContainer(J)&&"1"==k.style.collapsible)},isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length&&!A.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",+type:"bool",defVal:!1,isVisible:function(k,A){A=A.editorUi.editor.graph.model;return 0<k.vertices.length?A.isVertex(A.getParent(k.vertices[0])):!1}},{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:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(k,A){k=+0<k.vertices.length?A.editorUi.editor.graph.getCellGeometry(k.vertices[0]):null;return null!=k&&!k.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(k,A){return 0<k.vertices.length&&A.editorUi.editor.graph.isAutoSizeCell(k.vertices[0])}},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",-type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(l,u){var H=mxUtils.getValue(l.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||u.editorUi.editor.graph.isSwimlane(l.vertices[0])||null==H||H==mxConstants.NONE||0==mxUtils.getValue(l.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(l.style,mxConstants.STYLE_OPACITY,100)||null!=l.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",-type:"bool",defVal:!1,isVisible:function(l,u){return 0<l.vertices.length&&u.editorUi.editor.graph.isContainer(l.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\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,,[email protected],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,[email protected],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,[email protected],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,[email protected],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(l){var u=rough.canvas({getContext:function(){return l}});u.draw=function(H){var U=H.sets||[];H=H.options||this.getDefaultOptions();for(var J=0;J<U.length;J++){var W=U[J];switch(W.type){case "path":null!=H.stroke&&this._drawToContext(l,W,H);break;case "fillPath":this._drawToContext(l,W,H);break;case "fillSketch":this.fillSketch(l,W,H)}}};u.fillSketch=function(H,U,J){var W=l.state.strokeColor,aa=l.state.strokeWidth,ba=l.state.strokeAlpha,ja=l.state.dashed,oa=J.fillWeight;-0>oa&&(oa=J.strokeWidth/2);l.setStrokeAlpha(l.state.fillAlpha);l.setStrokeColor(J.fill||"");l.setStrokeWidth(oa);l.setDashed(!1);this._drawToContext(H,U,J);l.setDashed(ja);l.setStrokeWidth(aa);l.setStrokeColor(W);l.setStrokeAlpha(ba)};u._drawToContext=function(H,U,J){H.begin();for(var W=0;W<U.ops.length;W++){var aa=U.ops[W],ba=aa.data;switch(aa.op){case "move":H.moveTo(ba[0],ba[1]);break;case "bcurveTo":H.curveTo(ba[0],ba[1],ba[2],ba[3],ba[4],ba[5]);break;case "lineTo":H.lineTo(ba[0],ba[1])}}H.end();-"fillPath"===U.type&&J.filled?H.fill():H.stroke()};return u};(function(){function l(W,aa,ba){this.canvas=W;this.rc=aa;this.shape=ba;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,l.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,l.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,l.prototype.rect);this.originalRoundrect=this.canvas.roundrect;-this.canvas.roundrect=mxUtils.bind(this,l.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,l.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,l.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,l.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,l.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=-mxUtils.bind(this,l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,l.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,l.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,-l.prototype.fillAndStroke);this.path=[];this.passThrough=!1}l.prototype.moveOp="M";l.prototype.lineOp="L";l.prototype.quadOp="Q";l.prototype.curveOp="C";l.prototype.closeOp="Z";l.prototype.getStyle=function(W,aa){var ba=1;if(null!=this.shape.state){var ja=this.shape.state.cell.id;if(null!=ja)for(var oa=0;oa<ja.length;oa++)ba=(ba<<5)-ba+ja.charCodeAt(oa)<<0}ba={strokeWidth:this.canvas.state.strokeWidth,seed:ba,preserveVertices:!0};ja=this.rc.getDefaultOptions();ba.stroke=W?this.canvas.state.strokeColor===-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;W=null;(ba.filled=aa)?(ba.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,W=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ba.fill="";ba.bowing=mxUtils.getValue(this.shape.style,"bowing",ja.bowing);ba.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ja.hachureAngle);ba.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ja.curveFitting);-ba.roughness=mxUtils.getValue(this.shape.style,"jiggle",ja.roughness);ba.simplification=mxUtils.getValue(this.shape.style,"simplification",ja.simplification);ba.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ja.disableMultiStroke);ba.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ja.disableMultiStrokeFill);aa=mxUtils.getValue(this.shape.style,"hachureGap",-1);ba.hachureGap="auto"==aa?-1:aa;ba.dashGap=mxUtils.getValue(this.shape.style,"dashGap",-aa);ba.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",aa);ba.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",aa);aa=mxUtils.getValue(this.shape.style,"fillWeight",-1);ba.fillWeight="auto"==aa?-1:aa;aa=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==aa&&(aa="auto");"auto"==aa&&(aa=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&aa.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&aa.push(mxUtils.hex2rgb(Editor.darkColor)),-aa=null!=ba.fill&&(null!=W||0<=mxUtils.indexOf(aa,mxUtils.hex2rgb(ba.fill)))?"solid":ja.fillStyle);ba.fillStyle=aa;return ba};l.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};l.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};l.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var W=2;W<arguments.length;W+=2)this.lastX=arguments[W-1],this.lastY=arguments[W],-this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};l.prototype.lineTo=function(W,aa){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,W,aa),this.lastX=W,this.lastY=aa)};l.prototype.moveTo=function(W,aa){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,W,aa),this.lastX=W,this.lastY=aa,this.firstX=W,this.firstY=aa)};l.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,-arguments):this.addOp(this.closeOp)};l.prototype.quadTo=function(W,aa,ba,ja){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,W,aa,ba,ja),this.lastX=ba,this.lastY=ja)};l.prototype.curveTo=function(W,aa,ba,ja,oa,qa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,W,aa,ba,ja,oa,qa),this.lastX=oa,this.lastY=qa)};l.prototype.arcTo=function(W,aa,ba,ja,oa,qa,ra){if(this.passThrough)this.originalArcTo.apply(this.canvas,-arguments);else{var ua=mxUtils.arcToCurves(this.lastX,this.lastY,W,aa,ba,ja,oa,qa,ra);if(null!=ua)for(var za=0;za<ua.length;za+=6)this.curveTo(ua[za],ua[za+1],ua[za+2],ua[za+3],ua[za+4],ua[za+5]);this.lastX=qa;this.lastY=ra}};l.prototype.rect=function(W,aa,ba,ja){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(W,aa,ba,ja,this.getStyle(!0,!0)))};l.prototype.ellipse=function(W,aa,ba,ja){this.passThrough?this.originalEllipse.apply(this.canvas,-arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(W+ba/2,aa+ja/2,ba,ja,this.getStyle(!0,!0)))};l.prototype.roundrect=function(W,aa,ba,ja,oa,qa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(W+oa,aa),this.lineTo(W+ba-oa,aa),this.quadTo(W+ba,aa,W+ba,aa+qa),this.lineTo(W+ba,aa+ja-qa),this.quadTo(W+ba,aa+ja,W+ba-oa,aa+ja),this.lineTo(W+oa,aa+ja),this.quadTo(W,aa+ja,W,aa+ja-qa),this.lineTo(W,aa+qa),this.quadTo(W,aa,W+oa,aa))};l.prototype.drawPath=-function(W){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),W)}catch(ba){}this.passThrough=!1}else if(null!=this.nextShape){for(var aa in W)this.nextShape.options[aa]=W[aa];W.stroke!=mxConstants.NONE&&null!=W.stroke||delete this.nextShape.options.stroke;W.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};l.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,-!1))};l.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};l.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};l.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;-this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(W){return new l(W,Editor.createRoughCanvas(W),this)};var u=mxShape.prototype.createHandJiggle;-mxShape.prototype.createHandJiggle=function(W){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?u.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(W):this.createRoughCanvas(W)};var H=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(W,aa,ba,ja,oa){null!=W.handJiggle&&W.handJiggle.passThrough||H.apply(this,arguments)};var U=mxShape.prototype.paint;mxShape.prototype.paint=-function(W){var aa=W.addTolerance,ba=!0;null!=this.style&&(ba="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=W.handJiggle&&W.handJiggle.constructor==l&&!this.outline){W.save();var ja=this.fill,oa=this.stroke;this.stroke=this.fill=null;var qa=this.configurePointerEvents,ra=W.setStrokeColor;W.setStrokeColor=function(){};var ua=W.setFillColor;W.setFillColor=function(){};ba||null==ja||(this.configurePointerEvents=function(){});W.handJiggle.passThrough=!0;U.apply(this,-arguments);W.handJiggle.passThrough=!1;W.setFillColor=ua;W.setStrokeColor=ra;this.configurePointerEvents=qa;this.stroke=oa;this.fill=ja;W.restore();ba&&null!=ja&&(W.addTolerance=function(){})}U.apply(this,arguments);W.addTolerance=aa};var J=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(W,aa,ba,ja,oa,qa){null!=W.handJiggle&&W.handJiggle.constructor==l?(W.handJiggle.passThrough=!0,J.apply(this,arguments),W.handJiggle.passThrough=!1):J.apply(this,arguments)}})();Editor.fastCompress=-function(l){return null==l||0==l.length||"undefined"===typeof pako?l:Graph.arrayBufferToString(pako.deflateRaw(l))};Editor.fastDecompress=function(l){return null==l||0==l.length||"undefined"===typeof pako?l:pako.inflateRaw(Graph.stringToArrayBuffer(atob(l)),{to:"string"})};Editor.extractGraphModel=function(l,u,H){if(null!=l&&"undefined"!==typeof pako){var U=l.ownerDocument.getElementsByTagName("div"),J=[];if(null!=U&&0<U.length)for(var W=0;W<U.length;W++)if("mxgraph"==U[W].getAttribute("class")){J.push(U[W]);-break}0<J.length&&(U=J[0].getAttribute("data-mxgraph"),null!=U?(J=JSON.parse(U),null!=J&&null!=J.xml&&(l=mxUtils.parseXml(J.xml),l=l.documentElement)):(J=J[0].getElementsByTagName("div"),0<J.length&&(U=mxUtils.getTextContent(J[0]),U=Graph.decompress(U,null,H),0<U.length&&(l=mxUtils.parseXml(U),l=l.documentElement))))}if(null!=l&&"svg"==l.nodeName)if(U=l.getAttribute("content"),null!=U&&"<"!=U.charAt(0)&&"%"!=U.charAt(0)&&(U=unescape(window.atob?atob(U):Base64.decode(cont,U))),null!=U&&"%"==U.charAt(0)&&-(U=decodeURIComponent(U)),null!=U&&0<U.length)l=mxUtils.parseXml(U).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==l||u||(J=null,"diagram"==l.nodeName?J=l:"mxfile"==l.nodeName&&(U=l.getElementsByTagName("diagram"),0<U.length&&(J=U[Math.max(0,Math.min(U.length-1,urlParams.page||0))])),null!=J&&(l=Editor.parseDiagramNode(J,H)));null==l||"mxGraphModel"==l.nodeName||u&&"mxfile"==l.nodeName||(l=null);return l};Editor.parseDiagramNode=function(l,u,H){Editor.validateDiagramNode(l);-var U=mxUtils.trim(mxUtils.getTextContent(l)),J=null;0<U.length?(u=Graph.decompress(U,null,u),null!=u&&0<u.length&&(J=mxUtils.parseXml(u).documentElement)):(l=mxUtils.getChildNodes(l),0<l.length&&(J=l[0],H&&(J=Editor.parseDiagramNode(J,u,!1)),u=mxUtils.createXmlDocument(),u.appendChild(u.importNode(J,!0)),J=u.documentElement));return J};Editor.getDiagramNodeXml=function(l){Editor.validateDiagramNode(l);var u=mxUtils.getNodeValue(l),H=null;0<u.length?H=Graph.decompress(u):(l=l.getElementsByTagName("mxGraphModel"),-null!=l&&0<l.length&&(H=mxUtils.getXml(l[0])));return H};Editor.validateDiagramNode=function(l){if(0==mxUtils.trim(mxUtils.getTextContent(l)).length&&0==mxUtils.getChildNodes(l).length){var u=new mxCodec,H=new mxGraphModel;l.appendChild(u.encode(H))}return l};Editor.extractGraphModelFromPdf=function(l){var u=null;l=l.substring(l.indexOf(",")+1);l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);if("%PDF-1.7"==l.substring(0,8)){var H=l.indexOf("EmbeddedFile");if(-1<H){var U=l.indexOf("stream",-H)+9;if(0<l.substring(H,U).indexOf("application#2Fvnd.jgraph.mxfile")){var J=l.indexOf("endstream",U-1);return pako.inflateRaw(Graph.stringToArrayBuffer(l.substring(U,J)),{to:"string"})}}for(H=l.indexOf("/ObjStm");0<H;){U=l.indexOf("stream",H)+9;J=l.indexOf("endstream",U-1);U=pako.inflateRaw(Graph.stringToArrayBuffer(l.substring(U,J)),{to:"string"});J=U.indexOf("/Subject <");if(0<J){H=U.substring(J+14,U.indexOf(">",J));if(null!=H){u=H;H=[];for(U=0;U<u.length;U+=2)J=u.substr(U,2),"00"!=J&&H.push(String.fromCharCode(parseInt(J,-16)));u=H.join("")}break}H=l.indexOf("/ObjStm",H+1)}}if(null==u&&"%PDF-1.4"==l.substring(0,8)){H="";J=U=0;for(var W=[],aa=null;J<l.length;){var ba=l.charCodeAt(J);J+=1;10!=ba&&(H+=String.fromCharCode(ba));ba=="/Subject (%3Cmxfile".charCodeAt(U)?U++:U=0;if(19==U){var ja=l.indexOf("%3C%2Fmxfile%3E",J)+15;J-=9;if(ja>J){u=l.substring(J,ja);break}}10==ba&&("endobj"==H?aa=null:"obj"==H.substring(H.length-3,H.length)||"xref"==H||"trailer"==H?(aa=[],W[H.split(" ")[0]]=aa):null!=aa&&aa.push(H),H="")}}null==-u&&null!=W&&(u=Editor.extractGraphModelFromXref(W));null!=u&&(u=decodeURIComponent(u.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return u};Editor.extractGraphModelFromXref=function(l){var u=l.trailer,H=null;null!=u&&(u=/.* \/Info (\d+) (\d+) R/g.exec(u.join("\n")),null!=u&&0<u.length&&(u=l[u[1]],null!=u&&(u=/.* \/Subject (\d+) (\d+) R/g.exec(u.join("\n")),null!=u&&0<u.length&&(l=l[u[1]],null!=l&&(l=l.join("\n"),H=l.substring(1,l.length-1))))));return H};Editor.extractParserError=function(l,u){var H=-null;l=null!=l?l.getElementsByTagName("parsererror"):null;null!=l&&0<l.length&&(H=u||mxResources.get("invalidChars"),u=l[0].getElementsByTagName("div"),0<u.length&&(H=mxUtils.getTextContent(u[0])));return null!=H?mxUtils.trim(H):H};Editor.addRetryToError=function(l,u){null!=l&&(l=null!=l.error?l.error:l,null==l.retry&&(l.retry=u))};Editor.mermaidToDrawio=function(l,u,H){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(l,u,H)};Editor.configure=function(l){if(null!=l){Editor.config=-l;Editor.configVersion=l.version;l.debug&&(urlParams.test="1");null!=l.defaultFonts&&(Menus.prototype.defaultFonts=l.defaultFonts);null!=l.presetColors&&(ColorDialog.prototype.presetColors=l.presetColors);null!=l.defaultColors&&(ColorDialog.prototype.defaultColors=l.defaultColors);null!=l.colorNames&&(ColorDialog.prototype.colorNames=l.colorNames);null!=l.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=l.defaultColorSchemes);null!=l.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=-l.defaultEdgeLength);null!=l.selectParentLayer&&(Graph.selectParentLayer=l.selectParentLayer);null!=l.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=l.autosaveDelay);null!=l.templateFile&&(EditorUi.templateFile=l.templateFile);null!=l.styles&&(Array.isArray(l.styles)?Editor.styles=l.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=l.globalVars&&(Editor.globalVars=l.globalVars);null!=l.compressXml&&(Editor.defaultCompressed=l.compressXml,Editor.compressXml=l.compressXml);-null!=l.includeDiagram&&(Editor.defaultIncludeDiagram=l.includeDiagram);null!=l.simpleLabels&&(Editor.simpleLabels=l.simpleLabels);null!=l.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=l.oneDriveInlinePicker);null!=l.defaultAdaptiveColors?Graph.defaultAdaptiveColors=l.defaultAdaptiveColors:0==l.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=l.darkColor&&(Editor.darkColor=l.darkColor);null!=l.darkColorVar&&(Editor.darkColorVar=l.darkColorVar);Graph.prototype.defaultPageBackgroundColor=-"1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=l.settingsName&&(Editor.configurationKey="."+l.settingsName+"-configuration",Editor.settingsKey="."+l.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=l.customFonts&&(Menus.prototype.defaultFonts=l.customFonts.concat(Menus.prototype.defaultFonts));-null!=l.customPresetColors&&(ColorDialog.prototype.presetColors=l.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=l.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=l.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=l.css){var u=document.createElement("style");u.setAttribute("type","text/css");u.appendChild(document.createTextNode(l.css));var H=document.getElementsByTagName("script")[0];H.parentNode.insertBefore(u,H)}null!=-l.expandLibraries&&(Sidebar.prototype.expandLibraries=l.expandLibraries);null!=l.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=l.appendCustomLibraries);null!=l.libraries&&(Sidebar.prototype.customEntries=l.libraries);null!=l.enabledLibraries&&(Array.isArray(l.enabledLibraries)?Sidebar.prototype.enabledLibraries=l.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=l.defaultLibraries&&(Sidebar.prototype.defaultEntries=l.defaultLibraries);-null!=l.defaultCustomLibraries&&(Editor.defaultCustomLibraries=l.defaultCustomLibraries);null!=l.enableCustomLibraries&&(Editor.enableCustomLibraries=l.enableCustomLibraries);null!=l.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=l.defaultVertexStyle);null!=l.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=l.defaultEdgeStyle);null!=l.defaultPageVisible&&(Graph.prototype.defaultPageVisible=l.defaultPageVisible);null!=l.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=l.defaultGridEnabled);-null!=l.zoomWheel&&(Graph.zoomWheel=l.zoomWheel);null!=l.zoomFactor&&(u=parseFloat(l.zoomFactor),!isNaN(u)&&1<u?Graph.prototype.zoomFactor=u:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=l.defaultGridSize&&(u=parseInt(l.defaultGridSize),!isNaN(u)&&0<u?mxGraph.prototype.gridSize=u:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=l.gridSteps&&(u=parseInt(l.gridSteps),!isNaN(u)&&0<u?mxGraphView.prototype.gridSteps=u:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));-null!=l.pageFormat&&(u=parseInt(l.pageFormat.width),H=parseInt(l.pageFormat.height),!isNaN(u)&&0<u&&!isNaN(H)&&0<H?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,u,H),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=l.thumbWidth&&(Sidebar.prototype.thumbWidth=l.thumbWidth);null!=l.thumbHeight&&(Sidebar.prototype.thumbHeight=l.thumbHeight);null!=l.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=-l.emptyLibraryXml);null!=l.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=l.emptyDiagramXml);null!=l.sidebarWidth&&(EditorUi.prototype.hsplitPosition=l.sidebarWidth);null!=l.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=l.updateDefaultStyle);null!=l.sidebarTitles&&(Sidebar.prototype.sidebarTitles=l.sidebarTitles);null!=l.sidebarTitleSize&&(u=parseInt(l.sidebarTitleSize),!isNaN(u)&&0<u?Sidebar.prototype.sidebarTitleSize=u:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));-null!=l.fontCss&&("string"===typeof l.fontCss?Editor.configureFontCss(l.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=l.autosaveDelay&&(u=parseInt(l.autosaveDelay),!isNaN(u)&&0<u?DrawioFile.prototype.autosaveDelay=u:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=l.maxImageBytes&&(EditorUi.prototype.maxImageBytes=l.maxImageBytes);null!=l.maxImageSize&&(EditorUi.prototype.maxImageSize=l.maxImageSize);null!=l.shareCursorPosition&&-(EditorUi.prototype.shareCursorPosition=l.shareCursorPosition);null!=l.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=l.showRemoteCursors);null!=l.restrictExport&&(DrawioFile.RESTRICT_EXPORT=l.restrictExport);null!=l.replaceSvgDataUris&&(Editor.replaceSvgDataUris=l.replaceSvgDataUris);null!=l.foreignObjectImages&&(Editor.foreignObjectImages=l.foreignObjectImages);null!=l.shadowColor&&(mxConstants.SHADOW_COLOR=l.shadowColor);null!=l.shadowOpacity&&(mxConstants.SHADOW_OPACITY=l.shadowOpacity);-null!=l.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=l.shadowOffsetX);null!=l.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=l.shadowOffsetY);null!=l.shadowBlur&&(mxConstants.SHADOW_BLUR=l.shadowBlur);null!=l.enableAnimations&&(Editor.enableAnimations=l.enableAnimations);null!=l.enableChatGpt&&(Editor.enableChatGpt=l.enableChatGpt);null!=l.gptApiKey&&(Editor.gptApiKey=l.gptApiKey);null!=l.gptModel&&(Editor.gptModel=l.gptModel);null!=l.gptUrl&&(Editor.gptUrl=l.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==-typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(l){if(null!=l){Editor.prototype.fontCss=l;var u=document.getElementsByTagName("script")[0];if(null!=u&&null!=u.parentNode){var H=document.createElement("style");H.setAttribute("type","text/css");H.appendChild(document.createTextNode(l));u.parentNode.insertBefore(H,u);l=l.split("url(");for(H=1;H<l.length;H++){var U=l[H].indexOf(")");U=Editor.trimCssUrl(l[H].substring(0,U));var J=document.createElement("link");-J.setAttribute("rel","preload");J.setAttribute("href",U);J.setAttribute("as","font");J.setAttribute("crossorigin","");u.parentNode.insertBefore(J,u)}}}};Editor.trimCssUrl=function(l){return l.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=-20;Editor.guid=function(l){l=null!=l?l:Editor.GUID_LENGTH;for(var u=[],H=0;H<l;H++)u.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return u.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},+type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,A){var J=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||A.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==J||J==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",+type:"bool",defVal:!1,isVisible:function(k,A){return 0<k.vertices.length&&A.editorUi.editor.graph.isContainer(k.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\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,,[email protected],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,[email protected],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,[email protected],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,[email protected],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 A=rough.canvas({getContext:function(){return k}});A.draw=function(J){var U=J.sets||[];J=J.options||this.getDefaultOptions();for(var P=0;P<U.length;P++){var T=U[P];switch(T.type){case "path":null!=J.stroke&&this._drawToContext(k,T,J);break;case "fillPath":this._drawToContext(k,T,J);break;case "fillSketch":this.fillSketch(k,T,J)}}};A.fillSketch=function(J,U,P){var T=k.state.strokeColor,W=k.state.strokeWidth,aa=k.state.strokeAlpha,ja=k.state.dashed,pa=P.fillWeight;+0>pa&&(pa=P.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(P.fill||"");k.setStrokeWidth(pa);k.setDashed(!1);this._drawToContext(J,U,P);k.setDashed(ja);k.setStrokeWidth(W);k.setStrokeColor(T);k.setStrokeAlpha(aa)};A._drawToContext=function(J,U,P){J.begin();for(var T=0;T<U.ops.length;T++){var W=U.ops[T],aa=W.data;switch(W.op){case "move":J.moveTo(aa[0],aa[1]);break;case "bcurveTo":J.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":J.lineTo(aa[0],aa[1])}}J.end();+"fillPath"===U.type&&P.filled?J.fill():J.stroke()};return A};(function(){function k(T,W,aa){this.canvas=T;this.rc=W;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;+this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=+mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,+k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(T,W){var aa=1;if(null!=this.shape.state){var ja=this.shape.state.cell.id;if(null!=ja)for(var pa=0;pa<ja.length;pa++)aa=(aa<<5)-aa+ja.charCodeAt(pa)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};ja=this.rc.getDefaultOptions();aa.stroke=T?this.canvas.state.strokeColor===+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;T=null;(aa.filled=W)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,T=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",ja.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ja.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ja.curveFitting);+aa.roughness=mxUtils.getValue(this.shape.style,"jiggle",ja.roughness);aa.simplification=mxUtils.getValue(this.shape.style,"simplification",ja.simplification);aa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ja.disableMultiStroke);aa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ja.disableMultiStrokeFill);W=mxUtils.getValue(this.shape.style,"hachureGap",-1);aa.hachureGap="auto"==W?-1:W;aa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",+W);aa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",W);aa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",W);W=mxUtils.getValue(this.shape.style,"fillWeight",-1);aa.fillWeight="auto"==W?-1:W;W=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==W&&(W="auto");"auto"==W&&(W=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&W.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&W.push(mxUtils.hex2rgb(Editor.darkColor)),W=+null!=aa.fill&&(null!=T||0<=mxUtils.indexOf(W,mxUtils.hex2rgb(aa.fill)))?"solid":ja.fillStyle);aa.fillStyle=W;return aa};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var T=2;T<arguments.length;T+=2)this.lastX=arguments[T-1],this.lastY=arguments[T],+this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(T,W){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,T,W),this.lastX=T,this.lastY=W)};k.prototype.moveTo=function(T,W){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,T,W),this.lastX=T,this.lastY=W,this.firstX=T,this.firstY=W)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,+arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(T,W,aa,ja){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,T,W,aa,ja),this.lastX=aa,this.lastY=ja)};k.prototype.curveTo=function(T,W,aa,ja,pa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,T,W,aa,ja,pa,sa),this.lastX=pa,this.lastY=sa)};k.prototype.arcTo=function(T,W,aa,ja,pa,sa,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);+else{var wa=mxUtils.arcToCurves(this.lastX,this.lastY,T,W,aa,ja,pa,sa,qa);if(null!=wa)for(var Ba=0;Ba<wa.length;Ba+=6)this.curveTo(wa[Ba],wa[Ba+1],wa[Ba+2],wa[Ba+3],wa[Ba+4],wa[Ba+5]);this.lastX=sa;this.lastY=qa}};k.prototype.rect=function(T,W,aa,ja){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(T,W,aa,ja,this.getStyle(!0,!0)))};k.prototype.ellipse=function(T,W,aa,ja){this.passThrough?this.originalEllipse.apply(this.canvas,+arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(T+aa/2,W+ja/2,aa,ja,this.getStyle(!0,!0)))};k.prototype.roundrect=function(T,W,aa,ja,pa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(T+pa,W),this.lineTo(T+aa-pa,W),this.quadTo(T+aa,W,T+aa,W+sa),this.lineTo(T+aa,W+ja-sa),this.quadTo(T+aa,W+ja,T+aa-pa,W+ja),this.lineTo(T+pa,W+ja),this.quadTo(T,W+ja,T,W+ja-sa),this.lineTo(T,W+sa),this.quadTo(T,W,T+pa,W))};k.prototype.drawPath=function(T){if(0<+this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),T)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var W in T)this.nextShape.options[W]=T[W];T.stroke!=mxConstants.NONE&&null!=T.stroke||delete this.nextShape.options.stroke;T.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,+!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;+this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(T){return new k(T,Editor.createRoughCanvas(T),this)};var A=mxShape.prototype.createHandJiggle;+mxShape.prototype.createHandJiggle=function(T){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(T):this.createRoughCanvas(T)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(T,W,aa,ja,pa){null!=T.handJiggle&&T.handJiggle.passThrough||J.apply(this,arguments)};var U=mxShape.prototype.paint;mxShape.prototype.paint=+function(T){var W=T.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=T.handJiggle&&T.handJiggle.constructor==k&&!this.outline){T.save();var ja=this.fill,pa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,qa=T.setStrokeColor;T.setStrokeColor=function(){};var wa=T.setFillColor;T.setFillColor=function(){};aa||null==ja||(this.configurePointerEvents=function(){});T.handJiggle.passThrough=!0;U.apply(this,+arguments);T.handJiggle.passThrough=!1;T.setFillColor=wa;T.setStrokeColor=qa;this.configurePointerEvents=sa;this.stroke=pa;this.fill=ja;T.restore();aa&&null!=ja&&(T.addTolerance=function(){})}U.apply(this,arguments);T.addTolerance=W};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(T,W,aa,ja,pa,sa){null!=T.handJiggle&&T.handJiggle.constructor==k?(T.handJiggle.passThrough=!0,P.apply(this,arguments),T.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=+function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,A,J){if(null!=k&&"undefined"!==typeof pako){var U=k.ownerDocument.getElementsByTagName("div"),P=[];if(null!=U&&0<U.length)for(var T=0;T<U.length;T++)if("mxgraph"==U[T].getAttribute("class")){P.push(U[T]);+break}0<P.length&&(U=P[0].getAttribute("data-mxgraph"),null!=U?(P=JSON.parse(U),null!=P&&null!=P.xml&&(k=mxUtils.parseXml(P.xml),k=k.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(U=mxUtils.getTextContent(P[0]),U=Graph.decompress(U,null,J),0<U.length&&(k=mxUtils.parseXml(U),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(U=k.getAttribute("content"),null!=U&&"<"!=U.charAt(0)&&"%"!=U.charAt(0)&&(U=unescape(window.atob?atob(U):Base64.decode(cont,U))),null!=U&&"%"==U.charAt(0)&&+(U=decodeURIComponent(U)),null!=U&&0<U.length)k=mxUtils.parseXml(U).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||A||(P=null,"diagram"==k.nodeName?P=k:"mxfile"==k.nodeName&&(U=k.getElementsByTagName("diagram"),0<U.length&&(P=U[Math.max(0,Math.min(U.length-1,urlParams.page||0))])),null!=P&&(k=Editor.parseDiagramNode(P,J)));null==k||"mxGraphModel"==k.nodeName||A&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,A,J){Editor.validateDiagramNode(k);+var U=mxUtils.trim(mxUtils.getTextContent(k)),P=null;0<U.length?(A=Graph.decompress(U,null,A),null!=A&&0<A.length&&(P=mxUtils.parseXml(A).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(P=k[0],J&&(P=Editor.parseDiagramNode(P,A,!1)),A=mxUtils.createXmlDocument(),A.appendChild(A.importNode(P,!0)),P=A.documentElement));return P};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var A=mxUtils.getNodeValue(k),J=null;0<A.length?J=Graph.decompress(A):(k=k.getElementsByTagName("mxGraphModel"),+null!=k&&0<k.length&&(J=mxUtils.getXml(k[0])));return J};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var A=new mxCodec,J=new mxGraphModel;k.appendChild(A.encode(J))}return k};Editor.extractGraphModelFromPdf=function(k){var A=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var J=k.indexOf("EmbeddedFile");if(-1<J){var U=k.indexOf("stream",+J)+9;if(0<k.substring(J,U).indexOf("application#2Fvnd.jgraph.mxfile")){var P=k.indexOf("endstream",U-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,P)),{to:"string"})}}for(J=k.indexOf("/ObjStm");0<J;){U=k.indexOf("stream",J)+9;P=k.indexOf("endstream",U-1);U=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,P)),{to:"string"});P=U.indexOf("/Subject <");if(0<P){J=U.substring(P+14,U.indexOf(">",P));if(null!=J){A=J;J=[];for(U=0;U<A.length;U+=2)P=A.substr(U,2),"00"!=P&&J.push(String.fromCharCode(parseInt(P,+16)));A=J.join("")}break}J=k.indexOf("/ObjStm",J+1)}}if(null==A&&"%PDF-1.4"==k.substring(0,8)){J="";P=U=0;for(var T=[],W=null;P<k.length;){var aa=k.charCodeAt(P);P+=1;10!=aa&&(J+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(U)?U++:U=0;if(19==U){var ja=k.indexOf("%3C%2Fmxfile%3E",P)+15;P-=9;if(ja>P){A=k.substring(P,ja);break}}10==aa&&("endobj"==J?W=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(W=[],T[J.split(" ")[0]]=W):null!=W&&W.push(J),J="")}}null==A&&null!=+T&&(A=Editor.extractGraphModelFromXref(T));null!=A&&(A=decodeURIComponent(A.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return A};Editor.extractGraphModelFromXref=function(k){var A=k.trailer,J=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=k[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(k=k[A[1]],null!=k&&(k=k.join("\n"),J=k.substring(1,k.length-1))))));return J};Editor.extractParserError=function(k,A){var J=null;k=+null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(J=A||mxResources.get("invalidChars"),A=k[0].getElementsByTagName("div"),0<A.length&&(J=mxUtils.getTextContent(A[0])));return null!=J?mxUtils.trim(J):J};Editor.addRetryToError=function(k,A){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=A))};Editor.mermaidToDrawio=function(k,A,J){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,A,J)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=+k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);+null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&+(Editor.defaultIncludeDiagram=k.includeDiagram);null!=k.simpleLabels&&(Editor.simpleLabels=k.simpleLabels);null!=k.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=k.oneDriveInlinePicker);null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.darkColor&&(Editor.darkColor=k.darkColor);null!=k.darkColorVar&&(Editor.darkColorVar=k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?+"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));+null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){var A=document.createElement("style");A.setAttribute("type","text/css");A.appendChild(document.createTextNode(k.css));var J=document.getElementsByTagName("script")[0];J.parentNode.insertBefore(A,J)}null!=+k.expandLibraries&&(Sidebar.prototype.expandLibraries=k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);+null!=k.defaultCustomLibraries&&(Editor.defaultCustomLibraries=k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);+null!=k.zoomWheel&&(Graph.zoomWheel=k.zoomWheel);null!=k.zoomFactor&&(A=parseFloat(k.zoomFactor),!isNaN(A)&&1<A?Graph.prototype.zoomFactor=A:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&(A=parseInt(k.defaultGridSize),!isNaN(A)&&0<A?mxGraph.prototype.gridSize=A:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(A=parseInt(k.gridSteps),!isNaN(A)&&0<A?mxGraphView.prototype.gridSteps=A:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));+null!=k.pageFormat&&(A=parseInt(k.pageFormat.width),J=parseInt(k.pageFormat.height),!isNaN(A)&&0<A&&!isNaN(J)&&0<J?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,A,J),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=+k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&(A=parseInt(k.sidebarTitleSize),!isNaN(A)&&0<A?Sidebar.prototype.sidebarTitleSize=A:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));+null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(A=parseInt(k.autosaveDelay),!isNaN(A)&&0<A?DrawioFile.prototype.autosaveDelay=A:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&+(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);+null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==+typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var A=document.getElementsByTagName("script")[0];if(null!=A&&null!=A.parentNode){var J=document.createElement("style");J.setAttribute("type","text/css");J.appendChild(document.createTextNode(k));A.parentNode.insertBefore(J,A);k=k.split("url(");for(J=1;J<k.length;J++){var U=k[J].indexOf(")");U=Editor.trimCssUrl(k[J].substring(0,U));var P=document.createElement("link");+P.setAttribute("rel","preload");P.setAttribute("href",U);P.setAttribute("as","font");P.setAttribute("crossorigin","");A.parentNode.insertBefore(P,A)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=+20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var A=[],J=0;J<k;J++)A.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return A.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;-Editor.prototype.setGraphXml=function(l){l=null!=l&&"mxlibrary"!=l.nodeName?this.extractGraphModel(l):null;if(null!=l){var u=Editor.extractParserError(l,mxResources.get("invalidOrMissingFile"));if(u)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[l],"cause",[u]),Error(mxResources.get("notADiagramFile")+" ("+u+")");if("mxGraphModel"==l.nodeName){u=l.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=u&&""!=u)u!=this.graph.currentStyle&&(H=null!=this.graph.themes?-this.graph.themes[u]:mxUtils.load(STYLE_PATH+"/"+u+".xml").getDocumentElement(),null!=H&&(U=new mxCodec(H.ownerDocument),U.decode(H,this.graph.getStylesheet())));else{var H=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=H){var U=new mxCodec(H.ownerDocument);U.decode(H,this.graph.getStylesheet())}}this.graph.currentStyle=u;this.graph.mathEnabled="1"==urlParams.math||"1"==l.getAttribute("math");this.graph.setAdaptiveColors(l.getAttribute("adaptiveColors"));-u=l.getAttribute("backgroundImage");null!=u?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(u)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==l.getAttribute("shadow"),!1);if(u=l.getAttribute("extFonts"))try{for(u=u.split("|").map(function(J){J=J.split("^");return{name:J[0],url:J[1]}}),H=0;H<u.length;H++)this.graph.addExtFont(u[H].name,-u[H].url)}catch(J){console.log("ExtFonts format error: "+J.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(l,u){l=null!=l?l:!0;var H=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&H.setAttribute("style",-this.graph.currentStyle);var U=this.graph.getBackgroundImageObject(this.graph.backgroundImage,u);null!=U&&H.setAttribute("backgroundImage",JSON.stringify(U));H.setAttribute("math",this.graph.mathEnabled?"1":"0");H.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?H.setAttribute("adaptiveColors",this.graph.adaptiveColors):H.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(U=this.graph.extFonts.map(function(J){return J.name+-"^"+J.url}),H.setAttribute("extFonts",U.join("|")));return H};Editor.prototype.isDataSvg=function(l){try{var u=mxUtils.parseXml(l).documentElement.getAttribute("content");if(null!=u&&(null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(cont,u))),null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u)),null!=u&&0<u.length)){var H=mxUtils.parseXml(u).documentElement;return"mxfile"==H.nodeName||"mxGraphModel"==H.nodeName}}catch(U){}return!1};Editor.prototype.extractGraphModel=-function(l,u,H){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=-function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(l,u){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var H=function(){U=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};l=null!=l?l:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var U=null;Editor.doMathJaxRender=-function(aa){try{null==U?(MathJax.typesetClear([aa]),MathJax.typeset([aa]),H()):U!=aa&&Editor.mathJaxQueue.push(aa)}catch(ba){MathJax.typesetClear([aa]),null!=ba.retry?(U=aa,ba.retry.then(function(){MathJax.typesetPromise([aa]).then(H)["catch"](function(ja){console.log("Error in MathJax.typesetPromise: "+ja.toString());H()})})["catch"](function(ja){console.log("Error in MathJax.retry: "+ja.toString());H()})):null!=window.console&&console.log("Error in MathJax.typeset: "+ba.toString())}};window.MathJax=-null!=u?u:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var aa=0;aa<Editor.mathJaxQueue.length;aa++)Editor.doMathJaxRender(Editor.mathJaxQueue[aa])}}};Editor.MathJaxRender=function(aa){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(aa):Editor.mathJaxQueue.push(aa)};Editor.onMathJaxDone=-function(){};var J=Editor.prototype.init;Editor.prototype.init=function(){J.apply(this,arguments);var aa=mxUtils.bind(this,function(ba,ja){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,aa);this.graph.addListener(mxEvent.REFRESH,aa)};u=document.getElementsByTagName("script");if(null!=u&&0<u.length){var W=document.createElement("script");W.setAttribute("type","text/javascript");W.setAttribute("src",l);u[0].parentNode.appendChild(W)}}};-Editor.prototype.csvToArray=function(l){if(0<l.length){var u="",H=[""],U=0,J=!0,W;l=$jscomp.makeIterator(l);for(W=l.next();!W.done;W=l.next())W=W.value,'"'===W?(J&&W===u&&(H[U]+=W),J=!J):","===W&&J?W=H[++U]="":H[U]+=W,u=W;return H}return[]};Editor.prototype.getProxiedUrl=function(l){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(l)){var u=EditorUi.isVisioFilename(l);u=/\.png$/i.test(l)||/\.pdf$/i.test(l)||u;var H=-"t="+(new Date).getTime();l=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+H+(u?"&base64=1":"")}return l};Editor.prototype.isCorsEnabledForUrl=function(l){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||l.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(l)||"https://raw.githubusercontent.com/"===l.substring(0,34)||-"https://fonts.googleapis.com/"===l.substring(0,29)||"https://fonts.gstatic.com/"===l.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var l=new mxUrlConverter;l.updateBaseUrl();var u=l.convert,H=this;l.convert=function(U){null!=U&&navigator.onLine&&("http://"!=U.substring(0,7)&&"https://"!=U.substring(0,8)||U.substring(0,l.baseUrl.length)==l.baseUrl||H.crossOriginImages&&H.isCorsEnabledForUrl(U)?"chrome-extension://"!=U.substring(0,19)&&(U=u.apply(this,arguments)):U=PROXY_URL+-"?url="+encodeURIComponent(U));return U};return l};Editor.createSvgDataUri=function(l){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(l)))};Editor.prototype.convertImageToDataUri=function(l,u,H,U,J){try{var W=!0,aa=window.setTimeout(mxUtils.bind(this,function(){W=!1;u(l)}),this.timeout),ba=mxUtils.bind(this,function(){null!=U?this.convertImageToDataUri(l,u,H,U,!0):u(l)});if(/(\.svg)$/i.test(l)&&!J)mxUtils.get(l,mxUtils.bind(this,function(oa){window.clearTimeout(aa);W&&(200>oa.getStatus()||-299<oa.getStatus()?ba():u(Editor.createSvgDataUri(oa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(aa);W&&ba()}));else{var ja=new Image;this.crossOriginImages&&(ja.crossOrigin="anonymous");ja.onload=function(){window.clearTimeout(aa);if(W)try{U=null!=U&&J?U:1;var oa=document.createElement("canvas"),qa=oa.getContext("2d");qa.scale(U,U);oa.height=ja.height*U;oa.width=ja.width*U;qa.drawImage(ja,0,0);u(oa.toDataURL())}catch(ra){u(l)}};ja.onerror=function(){window.clearTimeout(aa);W&&-(null!=H?H():u(l))};ja.src=l}}catch(oa){null!=H?H():u(l)}};Editor.prototype.convertImages=function(l,u,H,U){function J(){0<W.length?W.shift()():u(l)}null==U&&(U=this.createImageUrlConverter());var W=[],aa=H||{};H=mxUtils.bind(this,function(ba,ja){ba=l.getElementsByTagName(ba);for(var oa=0;oa<ba.length;oa++)mxUtils.bind(this,function(qa){W.push(mxUtils.bind(this,function(){try{if(null!=qa){var ra=U.convert(qa.getAttribute(ja));if(null!=ra&&"data:"!=ra.substring(0,5)){var ua=aa[ra];null==ua?this.convertImageToDataUri(ra,-function(za){null!=za&&(aa[ra]=za,qa.setAttribute(ja,za));J()},null,Editor.svgRasterScale):(qa.setAttribute(ja,ua),J())}else null!=ra&&qa.setAttribute(ja,ra),J()}}catch(za){J()}}))})(ba[oa])});H("image","xlink:href");H("img","src");J()};Editor.base64Encode=function(l){for(var u="",H=0,U=l.length,J,W,aa;H<U;){J=l.charCodeAt(H++)&255;if(H==U){u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(J>>2);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((J&-3)<<4);u+="==";break}W=l.charCodeAt(H++);if(H==U){u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(J>>2);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((J&3)<<4|(W&240)>>4);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((W&15)<<2);u+="=";break}aa=l.charCodeAt(H++);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(J>>2);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((J&-3)<<4|(W&240)>>4);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((W&15)<<2|(aa&192)>>6);u+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(aa&63)}return u};Editor.prototype.loadUrl=function(l,u,H,U,J,W,aa,ba){try{var ja=!aa&&(U||/(\.png)($|\?)/i.test(l)||/(\.jpe?g)($|\?)/i.test(l)||/(\.gif)($|\?)/i.test(l)||/(\.pdf)($|\?)/i.test(l));J=null!=J?J:!0;var oa=mxUtils.bind(this,function(){mxUtils.get(l,mxUtils.bind(this,function(qa){if(200<=qa.getStatus()&&-299>=qa.getStatus()){if(null!=u){var ra=qa.getText();if(ja){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){qa=mxUtilsBinaryToArray(qa.request.responseBody).toArray();ra=Array(qa.length);for(var ua=0;ua<qa.length;ua++)ra[ua]=String.fromCharCode(qa[ua]);ra=ra.join("")}W=null!=W?W:"data:image/png;base64,";ra=W+Editor.base64Encode(ra)}u(ra)}}else null!=H&&(0==qa.getStatus()?H({message:mxResources.get("accessDenied")},qa):404==qa.getStatus()?-H({message:mxResources.get("fileNotFound"),code:qa.getStatus()},qa):H({message:this.getErrorMessage(qa)},qa))}),function(qa){null!=H&&H({message:mxResources.get("error")+" "+qa.getStatus()})},ja,this.timeout,function(){J&&null!=H&&H({code:App.ERROR_TIMEOUT,retry:oa})},ba)});oa()}catch(qa){null!=H&&H(qa)}};Editor.prototype.getErrorMessage=function(l){var u=mxResources.get("error")+" "+l.getStatus();try{var H=l.getText(),U=JSON.parse(H);null!=U&&null!=U.error&&null!=U.error.message&&(u=U.error.message+-" ("+u+")")}catch(J){}return u};Editor.prototype.absoluteCssFonts=function(l){var u=null;if(null!=l){var H=l.split("url(");if(0<H.length){u=[H[0]];l=window.location.pathname;var U=null!=l?l.lastIndexOf("/"):-1;0<=U&&(l=l.substring(0,U+1));U=document.getElementsByTagName("base");var J=null;null!=U&&0<U.length&&(J=U[0].getAttribute("href"));for(var W=1;W<H.length;W++)if(U=H[W].indexOf(")"),0<U){var aa=Editor.trimCssUrl(H[W].substring(0,U));this.graph.isRelativeUrl(aa)&&(aa=null!=J?J+aa:window.location.protocol+-"//"+window.location.hostname+("/"==aa.charAt(0)?"":l)+aa);u.push('url("'+aa+'"'+H[W].substring(U))}else u.push(H[W])}else u=[l]}return null!=u?u.join(""):null};Editor.prototype.mapFontUrl=function(l,u,H){/^https?:\/\//.test(u)&&!this.isCorsEnabledForUrl(u)&&(u=PROXY_URL+"?url="+encodeURIComponent(u));H(l,u)};Editor.prototype.embedCssFonts=function(l,u){var H=l.split("url("),U=0;null==this.cachedFonts&&(this.cachedFonts={});var J=mxUtils.bind(this,function(){if(0==U){for(var ja=[H[0]],oa=1;oa<H.length;oa++){var qa=-H[oa].indexOf(")");ja.push('url("');ja.push(this.cachedFonts[Editor.trimCssUrl(H[oa].substring(0,qa))]);ja.push('"'+H[oa].substring(qa))}u(ja.join(""))}});if(0<H.length){for(l=1;l<H.length;l++){var W=H[l].indexOf(")"),aa=null,ba=H[l].indexOf("format(",W);0<ba&&(aa=Editor.trimCssUrl(H[l].substring(ba+7,H[l].indexOf(")",ba))));mxUtils.bind(this,function(ja){if(null==this.cachedFonts[ja]){this.cachedFonts[ja]=ja;U++;var oa="application/x-font-ttf";if("svg"==aa||/(\.svg)($|\?)/i.test(ja))oa="image/svg+xml";-else if("otf"==aa||"embedded-opentype"==aa||/(\.otf)($|\?)/i.test(ja))oa="application/x-font-opentype";else if("woff"==aa||/(\.woff)($|\?)/i.test(ja))oa="application/font-woff";else if("woff2"==aa||/(\.woff2)($|\?)/i.test(ja))oa="application/font-woff2";else if("eot"==aa||/(\.eot)($|\?)/i.test(ja))oa="application/vnd.ms-fontobject";else if("sfnt"==aa||/(\.sfnt)($|\?)/i.test(ja))oa="application/font-sfnt";this.mapFontUrl(oa,ja,mxUtils.bind(this,function(qa,ra){this.loadUrl(ra,mxUtils.bind(this,function(ua){this.cachedFonts[ja]=-ua;U--;J()}),mxUtils.bind(this,function(ua){U--;J()}),!0,null,"data:"+qa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(H[l].substring(0,W)),aa)}J()}else u(l)};Editor.prototype.loadFonts=function(l){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(u){this.resolvedFontCss=u;null!=l&&l()})):null!=l&&l()};Editor.prototype.createGoogleFontCache=function(){var l={},u;for(u in Graph.fontMapping)Graph.isCssFontUrl(u)&&(l[u]=Graph.fontMapping[u]);-return l};Editor.prototype.embedExtFonts=function(l){var u=this.graph.getCustomFonts();if(0<u.length){var H=[],U=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var J=mxUtils.bind(this,function(){0==U&&this.embedCssFonts(H.join(""),l)}),W=0;W<u.length;W++)mxUtils.bind(this,function(aa,ba){Graph.isCssFontUrl(ba)?null==this.cachedGoogleFonts[ba]?(U++,this.loadUrl(Graph.rewriteGoogleFontUrl(ba),mxUtils.bind(this,function(ja){this.cachedGoogleFonts[ba]=ja;H.push(ja+-"\n");U--;J()}),mxUtils.bind(this,function(ja){U--;H.push("@import url("+ba+");\n");J()}))):H.push(this.cachedGoogleFonts[ba]+"\n"):H.push('@font-face {font-family: "'+aa+'";src: url("'+ba+'")}\n')})(u[W].name,u[W].url);J()}else l()};Editor.prototype.addMathCss=function(l){l=l.getElementsByTagName("defs");if(null!=l&&0<l.length)for(var u=document.getElementsByTagName("style"),H=0;H<u.length;H++){var U=mxUtils.getTextContent(u[H]);0>U.indexOf("mxPageSelector")&&0<U.indexOf("MathJax")&&l[0].appendChild(u[H].cloneNode(!0))}};-Editor.prototype.addFontCss=function(l,u){u=null!=u?u:this.absoluteCssFonts(this.fontCss);if(null!=u){var H=mxUtils.getSvgDefs(l),U=u.split("\n");u=[];for(var J=[],W=0;W<U.length;W++)"@import"==U[W].substring(0,7)?u.push(U[W]):J.push(U[W]);l=l.ownerDocument;l=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"style"):l.createElement("style");l.setAttribute("type","text/css");0<u.length&&(mxUtils.setTextContent(l,u.join("\n")),H.appendChild(l));0<J.length&&(l=l.cloneNode(!1),mxUtils.setTextContent(l,-J.join("\n")),H.appendChild(l))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(l,u,H){var U=mxClient.IS_FF?8192:16384;return Math.min(H,Math.min(U/l,U/u))};Editor.prototype.exportToCanvas=function(l,u,H,U,J,W,aa,ba,ja,oa,qa,ra,ua,za,Ba,Ca,La,sa){try{W=null!=W?W:!0;aa=null!=aa?aa:!0;ra=null!=ra?ra:this.graph;ua=null!=ua?ua:0;var Aa=ja?null:ra.background;Aa==mxConstants.NONE&&(Aa=null);null==Aa&&(Aa=U);-null==Aa&&0==ja&&(Aa="dark"==Ca?Editor.darkColor:"#ffffff");this.convertImages(ra.getSvg(null,null,ua,za,null,aa,null,null,null,oa,null,Ca,La,sa),mxUtils.bind(this,function(Ea){try{var Ka=new Image;Ka.onload=mxUtils.bind(this,function(){try{var ya=function(){mxClient.IS_SF?window.setTimeout(function(){Pa.drawImage(Ka,0,0);l(Wa,Ea)},0):(Pa.drawImage(Ka,0,0),l(Wa,Ea))},Wa=document.createElement("canvas"),Ia=parseInt(Ea.getAttribute("width")),Xa=parseInt(Ea.getAttribute("height"));ba=null!=ba?ba:1;null!=-u&&(ba=W?Math.min(1,Math.min(3*u/(4*Xa),u/Ia)):u/Ia);ba=this.getMaxCanvasScale(Ia,Xa,ba);Ia=Math.ceil(ba*Ia);Xa=Math.ceil(ba*Xa);Wa.setAttribute("width",Ia);Wa.setAttribute("height",Xa);var Pa=Wa.getContext("2d");null!=Aa&&(Pa.beginPath(),Pa.rect(0,0,Ia,Xa),Pa.fillStyle=Aa,Pa.fill());1!=ba&&Pa.scale(ba,ba);if(Ba){var t=ra.view,N=t.scale;t.scale=1;var Q=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=N;Q="data:image/svg+xml;base64,"+Q;var X=ra.gridSize*t.gridSteps*ba,ia=ra.getGraphBounds(),-ka=t.translate.x*N,pa=t.translate.y*N,xa=ka+(ia.x-ka)/N-ua,ta=pa+(ia.y-pa)/N-ua,va=new Image;va.onload=function(){try{for(var Da=-Math.round(X-mxUtils.mod((ka-xa)*ba,X)),Na=-Math.round(X-mxUtils.mod((pa-ta)*ba,X));Da<Ia;Da+=X)for(var Ya=Na;Ya<Xa;Ya+=X)Pa.drawImage(va,Da/ba,Ya/ba);ya()}catch(Za){null!=J&&J(Za)}};va.onerror=function(Da){null!=J&&J(Da)};va.src=Q}else ya()}catch(Da){null!=J&&J(Da)}});Ka.onerror=function(ya){null!=J&&J(ya)};oa&&this.graph.addSvgShadow(Ea);this.graph.mathEnabled&&this.addMathCss(Ea);-var Ma=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ea,this.resolvedFontCss),Ka.src=Editor.createSvgDataUri(mxUtils.getXml(Ea))}catch(ya){null!=J&&J(ya)}});this.embedExtFonts(mxUtils.bind(this,function(ya){try{null!=ya&&this.addFontCss(Ea,ya),this.loadFonts(Ma)}catch(Wa){null!=J&&J(Wa)}}))}catch(ya){null!=J&&J(ya)}}),H,qa)}catch(Ea){null!=J&&J(Ea)}};Editor.crcTable=[];for(var v=0;256>v;v++)for(var p=v,A=0;8>A;A++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[v]=-p;Editor.updateCRC=function(l,u,H,U){for(var J=0;J<U;J++)l=Editor.crcTable[(l^u.charCodeAt(H+J))&255]^l>>>8;return l};Editor.crc32=function(l){for(var u=-1,H=0;H<l.length;H++)u=u>>>8^Editor.crcTable[(u^l.charCodeAt(H))&255];return(u^-1)>>>0};Editor.writeGraphModelToPng=function(l,u,H,U,J){function W(qa,ra){var ua=ja;ja+=ra;return qa.substring(ua,ja)}function aa(qa){qa=W(qa,4);return qa.charCodeAt(3)+(qa.charCodeAt(2)<<8)+(qa.charCodeAt(1)<<16)+(qa.charCodeAt(0)<<24)}function ba(qa){return String.fromCharCode(qa>>-24&255,qa>>16&255,qa>>8&255,qa&255)}l=l.substring(l.indexOf(",")+1);l=window.atob?atob(l):Base64.decode(l,!0);var ja=0;if(W(l,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=J&&J();else if(W(l,4),"IHDR"!=W(l,4))null!=J&&J();else{W(l,17);J=l.substring(0,ja);do{var oa=aa(l);if("IDAT"==W(l,4)){J=l.substring(0,ja-8);"pHYs"==u&&"dpi"==H?(H=Math.round(U/.0254),H=ba(H)+ba(H)+String.fromCharCode(1)):H=H+String.fromCharCode(0)+("zTXt"==u?String.fromCharCode(0):"")+U;U=4294967295;-U=Editor.updateCRC(U,u,0,4);U=Editor.updateCRC(U,H,0,H.length);J+=ba(H.length)+u+H+ba(U^4294967295);J+=l.substring(ja-8,l.length);break}J+=l.substring(ja-8,ja-4+oa);W(l,oa);W(l,4)}while(oa);return"data:image/png;base64,"+(window.btoa?btoa(J):Base64.encode(J,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var G=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(l,u){G.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(l,u){var H=null;null!=l.editor.graph.getModel().getParent(u)?H=u.getId():null!=l.currentPage&&(H=l.currentPage.getId());return H});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 P=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?P.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(l){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=-function(l){l=R.apply(this,arguments);var u=this.editorUi,H=u.editor.graph;if(H.isEnabled()){var U=u.getCurrentFile();null!=U&&U.isAutosaveOptional()&&l.appendChild(this.createOption(mxResources.get("autosave"),function(){return u.editor.autosave},function(aa){u.editor.setAutosave(aa);u.editor.autosave&&U.isModified()&&U.fileChanged()},{install:function(aa){this.listener=function(){aa(u.editor.autosave)};u.editor.addListener("autosaveChanged",this.listener)},destroy:function(){u.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&-H.isEnabled()&&"undefined"!==typeof MathJax){var J=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return H.mathEnabled},function(aa){u.actions.get("mathematicalTypesetting").funct()},{install:function(aa){this.listener=function(){aa(H.mathEnabled)};u.addListener("mathEnabledChanged",this.listener)},destroy:function(){u.removeListener(this.listener)}});l.appendChild(J);if(!u.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var W=u.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");-W.style.position="absolute";W.style.left="85%";J.appendChild(W)}}return l};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",+Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var A=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(A)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[A]),Error(mxResources.get("notADiagramFile")+" ("+A+")");if("mxGraphModel"==k.nodeName){A=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(J=null!=this.graph.themes?+this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=J&&(U=new mxCodec(J.ownerDocument),U.decode(J,this.graph.getStylesheet())));else{var J=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=J){var U=new mxCodec(J.ownerDocument);U.decode(J,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));+A=k.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(A=k.getAttribute("extFonts"))try{for(A=A.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),J=0;J<A.length;J++)this.graph.addExtFont(A[J].name,+A[J].url)}catch(P){console.log("ExtFonts format error: "+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,A){k=null!=k?k:!0;var J=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&J.setAttribute("style",+this.graph.currentStyle);var U=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=U&&J.setAttribute("backgroundImage",JSON.stringify(U));J.setAttribute("math",this.graph.mathEnabled?"1":"0");J.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?J.setAttribute("adaptiveColors",this.graph.adaptiveColors):J.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(U=this.graph.extFonts.map(function(P){return P.name++"^"+P.url}),J.setAttribute("extFonts",U.join("|")));return J};Editor.prototype.isDataSvg=function(k){try{var A=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),null!=A&&0<A.length)){var J=mxUtils.parseXml(A).documentElement;return"mxfile"==J.nodeName||"mxGraphModel"==J.nodeName}}catch(U){}return!1};Editor.prototype.extractGraphModel=+function(k,A,J){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=+function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var J=function(){U=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var U=null;Editor.doMathJaxRender=+function(W){try{null==U?(MathJax.typesetClear([W]),MathJax.typeset([W]),J()):U!=W&&Editor.mathJaxQueue.push(W)}catch(aa){MathJax.typesetClear([W]),null!=aa.retry?(U=W,aa.retry.then(function(){MathJax.typesetPromise([W]).then(J)["catch"](function(ja){console.log("Error in MathJax.typesetPromise: "+ja.toString());J()})})["catch"](function(ja){console.log("Error in MathJax.retry: "+ja.toString());J()})):null!=window.console&&console.log("Error in MathJax.typeset: "+aa.toString())}};window.MathJax=null!=+A?A:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var W=0;W<Editor.mathJaxQueue.length;W++)Editor.doMathJaxRender(Editor.mathJaxQueue[W])}}};Editor.MathJaxRender=function(W){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(W):Editor.mathJaxQueue.push(W)};Editor.onMathJaxDone=function(){};+var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var W=mxUtils.bind(this,function(aa,ja){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,W);this.graph.addListener(mxEvent.REFRESH,W)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",k);A[0].parentNode.appendChild(T)}}};+Editor.prototype.csvToArray=function(k){if(0<k.length){var A="",J=[""],U=0,P=!0,T;k=$jscomp.makeIterator(k);for(T=k.next();!T.done;T=k.next())T=T.value,'"'===T?(P&&T===A&&(J[U]+=T),P=!P):","===T&&P?T=J[++U]="":J[U]+=T,A=T;return J}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var A=EditorUi.isVisioFilename(k);A=/\.png$/i.test(k)||/\.pdf$/i.test(k)||A;var J=+"t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+J+(A?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||+"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var A=k.convert,J=this;k.convert=function(U){null!=U&&navigator.onLine&&("http://"!=U.substring(0,7)&&"https://"!=U.substring(0,8)||U.substring(0,k.baseUrl.length)==k.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(U)?"chrome-extension://"!=U.substring(0,19)&&(U=A.apply(this,arguments)):U=PROXY_URL++"?url="+encodeURIComponent(U));return U};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,A,J,U,P){try{var T=!0,W=window.setTimeout(mxUtils.bind(this,function(){T=!1;A(k)}),this.timeout),aa=mxUtils.bind(this,function(){null!=U?this.convertImageToDataUri(k,A,J,U,!0):A(k)});if(/(\.svg)$/i.test(k)&&!P)mxUtils.get(k,mxUtils.bind(this,function(pa){window.clearTimeout(W);T&&(200>pa.getStatus()||+299<pa.getStatus()?aa():A(Editor.createSvgDataUri(pa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(W);T&&aa()}));else{var ja=new Image;this.crossOriginImages&&(ja.crossOrigin="anonymous");ja.onload=function(){window.clearTimeout(W);if(T)try{U=null!=U&&P?U:1;var pa=document.createElement("canvas"),sa=pa.getContext("2d");sa.scale(U,U);pa.height=ja.height*U;pa.width=ja.width*U;sa.drawImage(ja,0,0);A(pa.toDataURL())}catch(qa){A(k)}};ja.onerror=function(){window.clearTimeout(W);T&&(null!=+J?J():A(k))};ja.src=k}}catch(pa){null!=J?J():A(k)}};Editor.prototype.convertImages=function(k,A,J,U){function P(){0<T.length?T.shift()():A(k)}null==U&&(U=this.createImageUrlConverter());var T=[],W=J||{};J=mxUtils.bind(this,function(aa,ja){aa=k.getElementsByTagName(aa);for(var pa=0;pa<aa.length;pa++)mxUtils.bind(this,function(sa){T.push(mxUtils.bind(this,function(){try{if(null!=sa){var qa=U.convert(sa.getAttribute(ja));if(null!=qa&&"data:"!=qa.substring(0,5)){var wa=W[qa];null==wa?this.convertImageToDataUri(qa,+function(Ba){null!=Ba&&(W[qa]=Ba,sa.setAttribute(ja,Ba));P()},null,Editor.svgRasterScale):(sa.setAttribute(ja,wa),P())}else null!=qa&&sa.setAttribute(ja,qa),P()}}catch(Ba){P()}}))})(aa[pa])});J("image","xlink:href");J("img","src");P()};Editor.base64Encode=function(k){for(var A="",J=0,U=k.length,P,T,W;J<U;){P=k.charCodeAt(J++)&255;if(J==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&+3)<<4);A+="==";break}T=k.charCodeAt(J++);if(J==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(T&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2);A+="=";break}W=k.charCodeAt(J++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&+3)<<4|(T&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2|(W&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(W&63)}return A};Editor.prototype.loadUrl=function(k,A,J,U,P,T,W,aa){try{var ja=!W&&(U||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));P=null!=P?P:!0;var pa=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&+299>=sa.getStatus()){if(null!=A){var qa=sa.getText();if(ja){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();qa=Array(sa.length);for(var wa=0;wa<sa.length;wa++)qa[wa]=String.fromCharCode(sa[wa]);qa=qa.join("")}T=null!=T?T:"data:image/png;base64,";qa=T+Editor.base64Encode(qa)}A(qa)}}else null!=J&&(0==sa.getStatus()?J({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?+J({message:mxResources.get("fileNotFound"),code:sa.getStatus()},sa):J({message:this.getErrorMessage(sa)},sa))}),function(sa){null!=J&&J({message:mxResources.get("error")+" "+sa.getStatus()})},ja,this.timeout,function(){P&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:pa})},aa)});pa()}catch(sa){null!=J&&J(sa)}};Editor.prototype.getErrorMessage=function(k){var A=mxResources.get("error")+" "+k.getStatus();try{var J=k.getText(),U=JSON.parse(J);null!=U&&null!=U.error&&null!=U.error.message&&(A=U.error.message++" ("+A+")")}catch(P){}return A};Editor.prototype.absoluteCssFonts=function(k){var A=null;if(null!=k){var J=k.split("url(");if(0<J.length){A=[J[0]];k=window.location.pathname;var U=null!=k?k.lastIndexOf("/"):-1;0<=U&&(k=k.substring(0,U+1));U=document.getElementsByTagName("base");var P=null;null!=U&&0<U.length&&(P=U[0].getAttribute("href"));for(var T=1;T<J.length;T++)if(U=J[T].indexOf(")"),0<U){var W=Editor.trimCssUrl(J[T].substring(0,U));this.graph.isRelativeUrl(W)&&(W=null!=P?P+W:window.location.protocol++"//"+window.location.hostname+("/"==W.charAt(0)?"":k)+W);A.push('url("'+W+'"'+J[T].substring(U))}else A.push(J[T])}else A=[k]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(k,A,J){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+encodeURIComponent(A));J(k,A)};Editor.prototype.embedCssFonts=function(k,A){var J=k.split("url("),U=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==U){for(var ja=[J[0]],pa=1;pa<J.length;pa++){var sa=+J[pa].indexOf(")");ja.push('url("');ja.push(this.cachedFonts[Editor.trimCssUrl(J[pa].substring(0,sa))]);ja.push('"'+J[pa].substring(sa))}A(ja.join(""))}});if(0<J.length){for(k=1;k<J.length;k++){var T=J[k].indexOf(")"),W=null,aa=J[k].indexOf("format(",T);0<aa&&(W=Editor.trimCssUrl(J[k].substring(aa+7,J[k].indexOf(")",aa))));mxUtils.bind(this,function(ja){if(null==this.cachedFonts[ja]){this.cachedFonts[ja]=ja;U++;var pa="application/x-font-ttf";if("svg"==W||/(\.svg)($|\?)/i.test(ja))pa="image/svg+xml";+else if("otf"==W||"embedded-opentype"==W||/(\.otf)($|\?)/i.test(ja))pa="application/x-font-opentype";else if("woff"==W||/(\.woff)($|\?)/i.test(ja))pa="application/font-woff";else if("woff2"==W||/(\.woff2)($|\?)/i.test(ja))pa="application/font-woff2";else if("eot"==W||/(\.eot)($|\?)/i.test(ja))pa="application/vnd.ms-fontobject";else if("sfnt"==W||/(\.sfnt)($|\?)/i.test(ja))pa="application/font-sfnt";this.mapFontUrl(pa,ja,mxUtils.bind(this,function(sa,qa){this.loadUrl(qa,mxUtils.bind(this,function(wa){this.cachedFonts[ja]=+wa;U--;P()}),mxUtils.bind(this,function(wa){U--;P()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(J[k].substring(0,T)),W)}P()}else A(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(k[A]=Graph.fontMapping[A]);+return k};Editor.prototype.embedExtFonts=function(k){var A=this.graph.getCustomFonts();if(0<A.length){var J=[],U=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==U&&this.embedCssFonts(J.join(""),k)}),T=0;T<A.length;T++)mxUtils.bind(this,function(W,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(U++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),mxUtils.bind(this,function(ja){this.cachedGoogleFonts[aa]=ja;J.push(ja++"\n");U--;P()}),mxUtils.bind(this,function(ja){U--;J.push("@import url("+aa+");\n");P()}))):J.push(this.cachedGoogleFonts[aa]+"\n"):J.push('@font-face {font-family: "'+W+'";src: url("'+aa+'")}\n')})(A[T].name,A[T].url);P()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var A=document.getElementsByTagName("style"),J=0;J<A.length;J++){var U=mxUtils.getTextContent(A[J]);0>U.indexOf("mxPageSelector")&&0<U.indexOf("MathJax")&&k[0].appendChild(A[J].cloneNode(!0))}};+Editor.prototype.addFontCss=function(k,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var J=mxUtils.getSvgDefs(k),U=A.split("\n");A=[];for(var P=[],T=0;T<U.length;T++)"@import"==U[T].substring(0,7)?A.push(U[T]):P.push(U[T]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<A.length&&(mxUtils.setTextContent(k,A.join("\n")),J.appendChild(k));0<P.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,+P.join("\n")),J.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,A,J){var U=mxClient.IS_FF?8192:16384;return Math.min(J,Math.min(U/k,U/A))};Editor.prototype.exportToCanvas=function(k,A,J,U,P,T,W,aa,ja,pa,sa,qa,wa,Ba,za,Ea,ra,ya){try{T=null!=T?T:!0;W=null!=W?W:!0;qa=null!=qa?qa:this.graph;wa=null!=wa?wa:0;var Ca=ja?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=U);null==+Ca&&0==ja&&(Ca="dark"==Ea?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,wa,Ba,null,W,null,null,null,pa,null,Ea,ra,ya),mxUtils.bind(this,function(Ma){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ra=function(){mxClient.IS_SF?window.setTimeout(function(){Da.drawImage(Ha,0,0);k(Za,Ma)},0):(Da.drawImage(Ha,0,0),k(Za,Ma))},Za=document.createElement("canvas"),La=parseInt(Ma.getAttribute("width")),$a=parseInt(Ma.getAttribute("height"));aa=null!=aa?aa:1;null!=A&&+(aa=T?Math.min(1,Math.min(3*A/(4*$a),A/La)):A/La);aa=this.getMaxCanvasScale(La,$a,aa);La=Math.ceil(aa*La);$a=Math.ceil(aa*$a);Za.setAttribute("width",La);Za.setAttribute("height",$a);var Da=Za.getContext("2d");null!=Ca&&(Da.beginPath(),Da.rect(0,0,La,$a),Da.fillStyle=Ca,Da.fill());1!=aa&&Da.scale(aa,aa);if(za){var x=qa.view,M=x.scale;x.scale=1;var Q=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));x.scale=M;Q="data:image/svg+xml;base64,"+Q;var V=qa.gridSize*x.gridSteps*aa,ia=qa.getGraphBounds(),+ka=x.translate.x*M,oa=x.translate.y*M,xa=ka+(ia.x-ka)/M-wa,ta=oa+(ia.y-oa)/M-wa,ua=new Image;ua.onload=function(){try{for(var Fa=-Math.round(V-mxUtils.mod((ka-xa)*aa,V)),Na=-Math.round(V-mxUtils.mod((oa-ta)*aa,V));Fa<La;Fa+=V)for(var Wa=Na;Wa<$a;Wa+=V)Da.drawImage(ua,Fa/aa,Wa/aa);Ra()}catch(Xa){null!=P&&P(Xa)}};ua.onerror=function(Fa){null!=P&&P(Fa)};ua.src=Q}else Ra()}catch(Fa){null!=P&&P(Fa)}});Ha.onerror=function(Ra){null!=P&&P(Ra)};pa&&this.graph.addSvgShadow(Ma);this.graph.mathEnabled&&this.addMathCss(Ma);+var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ma,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}catch(Ra){null!=P&&P(Ra)}});this.embedExtFonts(mxUtils.bind(this,function(Ra){try{null!=Ra&&this.addFontCss(Ma,Ra),this.loadFonts(Aa)}catch(Za){null!=P&&P(Za)}}))}catch(Ra){null!=P&&P(Ra)}}),J,sa)}catch(Ma){null!=P&&P(Ma)}};Editor.crcTable=[];for(var u=0;256>u;u++)for(var p=u,B=0;8>B;B++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[u]=+p;Editor.updateCRC=function(k,A,J,U){for(var P=0;P<U;P++)k=Editor.crcTable[(k^A.charCodeAt(J+P))&255]^k>>>8;return k};Editor.crc32=function(k){for(var A=-1,J=0;J<k.length;J++)A=A>>>8^Editor.crcTable[(A^k.charCodeAt(J))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(k,A,J,U,P){function T(sa,qa){var wa=ja;ja+=qa;return sa.substring(wa,ja)}function W(sa){sa=T(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function aa(sa){return String.fromCharCode(sa>>+24&255,sa>>16&255,sa>>8&255,sa&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var ja=0;if(T(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(T(k,4),"IHDR"!=T(k,4))null!=P&&P();else{T(k,17);P=k.substring(0,ja);do{var pa=W(k);if("IDAT"==T(k,4)){P=k.substring(0,ja-8);"pHYs"==A&&"dpi"==J?(J=Math.round(U/.0254),J=aa(J)+aa(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+U;U=4294967295;U=+Editor.updateCRC(U,A,0,4);U=Editor.updateCRC(U,J,0,J.length);P+=aa(J.length)+A+J+aa(U^4294967295);P+=k.substring(ja-8,k.length);break}P+=k.substring(ja-8,ja-4+pa);T(k,pa);T(k,4)}while(pa);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,A){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,A){var J=null;null!=k.editor.graph.getModel().getParent(A)?J=A.getId():null!=k.currentPage&&(J=k.currentPage.getId());return J});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,+arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var O=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?O.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=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 A=this.editorUi,J=A.editor.graph;if(J.isEnabled()){var U=A.getCurrentFile();null!=U&&U.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(W){A.editor.setAutosave(W);A.editor.autosave&&U.isModified()&&U.fileChanged()},{install:function(W){this.listener=function(){W(A.editor.autosave)};A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&+J.isEnabled()&&"undefined"!==typeof MathJax){var P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return J.mathEnabled},function(W){A.actions.get("mathematicalTypesetting").funct()},{install:function(W){this.listener=function(){W(J.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});k.appendChild(P);if(!A.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var T=A.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");+T.style.position="absolute";T.style.left="85%";P.appendChild(T)}}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",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",-dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(l){return"0"==mxUtils.getValue(l.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(l){return"1"==mxUtils.getValue(l.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,-isVisible:function(l){return"0"==mxUtils.getValue(l.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(l){return"1"==mxUtils.getValue(l.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];+dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,+isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",@@ -3352,96 +3351,96 @@ min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{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(l,u,H,U){if(null!=u){var J=mxUtils.bind(this,function(aa){if(null!=aa)if(H)for(var ba=0;ba<aa.length;ba++){if("function"!==typeof aa[ba].isVisible||aa[ba].isVisible(U,this))u[aa[ba].name]=aa[ba]}else for(var ja in u){var oa=-!1;for(ba=0;ba<aa.length;ba++)if(aa[ba].name==ja&&aa[ba].type==u[ja].type){oa=!0;break}oa||delete u[ja]}}),W=this.editorUi.editor.graph.view.getState(l);null!=W&&null!=W.shape&&(W.shape.commonCustomPropAdded||(W.shape.commonCustomPropAdded=!0,W.shape.customProperties=W.shape.customProperties||[],W.cell.vertex?Array.prototype.push.apply(W.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(W.shape.customProperties,Editor.commonEdgeProperties)),J(W.shape.customProperties));-l=l.getAttribute("customProperties");if(null!=l)try{J(JSON.parse(l))}catch(aa){}}};var T=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var l=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=l.style.shape&&!l.containsLabel&&0<l.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));T.apply(this,arguments);if(Editor.enableCustomProperties){for(var u={},H=l.vertices,U=l.edges,J=0;J<H.length;J++)this.findCommonProperties(H[J],-u,0==J,l);for(J=0;J<U.length;J++)this.findCommonProperties(U[J],u,0==H.length&&0==J,l);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(u).length&&this.container.appendChild(this.addProperties(this.createPanel(),u,l))}};var c=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(l){var u=this.editorUi.getSelectionState();1==u.cells.length?this.addActions(l,["copyStyle","pasteStyle"]):1<=u.cells.length&&this.addActions(l,["pasteStyle","pasteData"]);c.apply(this,-arguments);return l};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(l,u,H,U){function J(Pa,t,N,Q,X){if(null!=N.valueChanged)N.valueChanged(t,X);else{ua.getModel().beginUpdate();try{X=[];var ia=[];if(null!=N.index){for(var ka=[],pa=N.parentRow.nextSibling;pa&&pa.getAttribute("data-pName")==Pa;)ka.push(pa.getAttribute("data-pValue")),pa=pa.nextSibling;N.index<ka.length?null!=Q?ka.splice(Q,1):ka[N.index]=t:ka.push(t);null!=N.size&&ka.length>N.size&&(ka=ka.slice(0,-N.size));t=ka.join(",");null!=N.countProperty&&(ua.setCellStyles(N.countProperty,ka.length,ua.getSelectionCells()),X.push(N.countProperty),ia.push(ka.length))}ua.setCellStyles(Pa,t,ua.getSelectionCells());X.push(Pa);ia.push(t);if(null!=N.dependentProps)for(Pa=0;Pa<N.dependentProps.length;Pa++){var xa=N.dependentPropsDefVal[Pa],ta=N.dependentPropsVals[Pa];if(ta.length>t)ta=ta.slice(0,t);else for(var va=ta.length;va<t;va++)ta.push(xa);ta=ta.join(",");ua.setCellStyles(N.dependentProps[Pa],ta,ua.getSelectionCells());-X.push(N.dependentProps[Pa]);ia.push(ta)}if("function"==typeof N.onChange)N.onChange(ua,t);ra.editorUi.fireEvent(new mxEventObject("styleChanged","keys",X,"values",ia,"cells",ua.getSelectionCells()))}finally{ua.getModel().endUpdate()}}}function W(Pa,t,N){var Q=mxUtils.getOffset(l,!0),X=mxUtils.getOffset(Pa,!0);t.style.position="absolute";t.style.left=X.x-Q.x+"px";t.style.top=X.y-Q.y+"px";t.style.width=Pa.offsetWidth+"px";t.style.height=Pa.offsetHeight-(N?4:0)+"px";t.style.zIndex=5}function aa(Pa,-t,N){function Q(ia){if(null==ia||ia==mxConstants.NONE)X.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ia)X.style.background="";else{var ka=mxUtils.getLightDarkColor(ia);mxUtils.isLightDarkColor(ia)&&ka.light!=ka.dark?X.style.background="linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":X.style.background=ia}}var X=document.createElement("div");X.style.width="32px";X.style.height="8px";X.style.margin="2px";X.style.borderStyle=-"solid";X.style.borderWidth="1px";Q(t);btn=mxUtils.button("",mxUtils.bind(ra,function(ia){this.editorUi.pickColor(t,function(ka){J(Pa,ka,N);Q(ka)});mxEvent.consume(ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(X);return btn}function ba(Pa,t,N,Q,X,ia,ka){null!=t&&(t=t.split(","),za.push({name:Pa,values:t,type:N,defVal:Q,countProperty:X,parentRow:ia,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",-mxUtils.bind(ra,function(pa){for(var xa=ia,ta=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Pa)xa=xa.nextSibling,ta++;else break;var va={type:N,parentRow:ia,index:ta,isDeletable:!0,defVal:Q,countProperty:X};ta=qa(Pa,"",va,0==ta%2,ka);J(Pa,Q,va);xa.parentNode.insertBefore(ta,xa.nextSibling);mxEvent.consume(pa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ja(Pa,t,N,Q,X,ia,ka){if(0<X){var pa=Array(X);t=null!=t?t.split(","):[];-for(var xa=0;xa<X;xa++)pa[xa]=null!=t[xa]?t[xa]:null!=Q?Q:"";za.push({name:Pa,values:pa,type:N,defVal:Q,parentRow:ia,flipBkg:ka,size:X})}return document.createElement("div")}function oa(Pa,t,N){var Q=document.createElement("input");Q.type="checkbox";Q.checked="1"==t;mxEvent.addListener(Q,"change",function(){J(Pa,Q.checked?"1":"0",N)});return Q}function qa(Pa,t,N,Q,X){var ia=N.dispName,ka=N.type,pa=document.createElement("tr");pa.className="gePropRow"+(X?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";-pa.setAttribute("data-pName",Pa);pa.setAttribute("data-pValue",t);Q=!1;null!=N.index&&(pa.setAttribute("data-index",N.index),ia=(null!=ia?ia:"")+"["+N.index+"]",Q=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ia=mxResources.get(ia,null,ia);mxUtils.write(xa,ia);xa.setAttribute("title",ia);Q&&(xa.style.textAlign="right");pa.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";xa.setAttribute("title",null!=t?t:mxResources.get("none"));if("color"==ka)xa.appendChild(aa(Pa,-t,N));else if("bool"==ka||"boolean"==ka)xa.appendChild(oa(Pa,t,N));else if("enum"==ka){var ta=N.enumList;for(X=0;X<ta.length;X++)if(ia=ta[X],ia.val==t){mxUtils.write(xa,mxResources.get(ia.dispName,null,ia.dispName));break}mxEvent.addListener(xa,"click",mxUtils.bind(ra,function(){var va=document.createElement("select"),Da=null;W(xa,va);for(var Na=0;Na<ta.length;Na++){var Ya=ta[Na],Za=document.createElement("option");Za.value=mxUtils.htmlEntities(Ya.val);mxUtils.write(Za,mxResources.get(Ya.dispName,-null,Ya.dispName));va.appendChild(Za);null==Ya.val&&(Za.value="null",Da=Za)}va.value=null==t&&null!=Da?"null":t;l.appendChild(va);mxEvent.addListener(va,"change",function(){var ab=mxUtils.htmlEntities(va.value);if(va[va.selectedIndex]==Da||"null"==ab.value)ab=null;J(Pa,ab,N)});va.focus();mxEvent.addListener(va,"blur",function(){l.removeChild(va)})}))}else"dynamicArr"==ka?xa.appendChild(ba(Pa,t,N.subType,N.subDefVal,N.countProperty,pa,X)):"staticArr"==ka?xa.appendChild(ja(Pa,t,N.subType,N.subDefVal,-N.size,pa,X)):"readOnly"==ka?(X=document.createElement("input"),X.setAttribute("readonly",""),X.value=t,X.style.borderWidth="0px","id"==Pa?(X.style.width="190px",X.style.position="relative",X.style.right="6px",X.style.float="right",X.style.background="none",X.style.textAlign="right",pa.firstChild.setAttribute("colspan","2"),X.setAttribute("title",t),pa.firstChild.appendChild(X)):(X.style.width="96px",xa.appendChild(X))):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(t)),mxEvent.addListener(xa,-"click",mxUtils.bind(ra,function(){function va(){var Na=Da.value;Na=0==Na.length&&"string"!=ka&&"numbers"!=ka?0:Na;N.allowAuto&&(null!=Na.trim&&"auto"==Na.trim().toLowerCase()?(Na="auto",ka="string"):(Na=parseFloat(Na),Na=isNaN(Na)?0:Na));null!=N.min&&Na<N.min?Na=N.min:null!=N.max&&Na>N.max&&(Na=N.max);var Ya=null;try{Ya="numbers"==ka?Na.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Na):Na)+"")}catch(Za){}J(Pa,Ya,N,null,Da)}var Da=document.createElement("input");W(xa,-Da,!0);Da.value=decodeURIComponent(t);Da.className="gePropEditor";"int"!=ka&&"float"!=ka||N.allowAuto||(Da.type="number",Da.step="int"==ka?"1":"any",null!=N.min&&(Da.min=parseFloat(N.min)),null!=N.max&&(Da.max=parseFloat(N.max)));l.appendChild(Da);mxEvent.addListener(Da,"keypress",function(Na){13==Na.keyCode&&va()});Da.focus();mxEvent.addListener(Da,"blur",function(){va()})})));N.isDeletable&&(X=mxUtils.button("-",mxUtils.bind(ra,function(va){J(Pa,"",N,N.index);mxEvent.consume(va)})),X.style.height=-"16px",X.style.width="25px",X.style.float="right",X.className="geColorBtn",xa.appendChild(X));pa.appendChild(xa);return pa}var ra=this,ua=this.editorUi.editor.graph,za=[];l.style.position="relative";l.style.padding="0";var Ba=document.createElement("table");Ba.className="geProperties";Ba.style.whiteSpace="nowrap";Ba.style.width="100%";var Ca=document.createElement("tr");Ca.className="gePropHeader";var La=document.createElement("th");La.className="gePropHeaderCell";La.style.paddingLeft="16px";La.style.backgroundRepeat=-"no-repeat";La.style.backgroundPosition="-2px 50%";La.style.backgroundSize="20px";mxUtils.write(La,mxResources.get("property"));Ca.style.cursor="pointer";var sa=function(){var Pa=Ba.querySelectorAll(".gePropNonHeaderRow");if(ra.editorUi.propertiesCollapsed){La.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var t="none";for(var N=l.childNodes.length-1;0<=N;N--)try{var Q=l.childNodes[N],X=Q.nodeName.toUpperCase();"INPUT"!=X&&"SELECT"!=X||l.removeChild(Q)}catch(ia){}}else La.style.backgroundImage=-"url('"+Editor.arrowDownImage+"')",t="";for(N=0;N<Pa.length;N++)Pa[N].style.display=t};mxEvent.addListener(Ca,"click",function(){ra.editorUi.propertiesCollapsed=!ra.editorUi.propertiesCollapsed;sa()});Ca.appendChild(La);var Aa=document.createElement("th");Aa.className="gePropHeaderCell";Aa.style.paddingLeft="4px";mxUtils.write(Aa,mxResources.get("value"));Ca.appendChild(Aa);Ba.appendChild(Ca);var Ea=Aa=!1;Ca=null;1==H.vertices.length&&0==H.edges.length?Ca=H.vertices[0].id:0==H.vertices.length&&1==-H.edges.length&&(Ca=H.edges[0].id);null==Ca||U||Ba.appendChild(qa("id",mxUtils.htmlEntities(Ca),{dispName:"id",type:"readOnly"},!0,!1));for(var Ka in u)if(U=u[Ka],"function"!=typeof U.isVisible||U.isVisible(H,this)){var Ma=null!=U.getValue?U.getValue():null!=H.style[Ka]?mxUtils.htmlEntities(H.style[Ka]+""):null!=U.getDefaultValue?U.getDefaultValue(H,this):U.defVal;if("separator"==U.type)Ea=!Ea;else{if("staticArr"==U.type)U.size=parseInt(H.style[U.sizeProperty]||u[U.sizeProperty].defVal)||0;else if(null!=-U.dependentProps){var ya=U.dependentProps,Wa=[],Ia=[];for(Ca=0;Ca<ya.length;Ca++){var Xa=H.style[ya[Ca]];Ia.push(u[ya[Ca]].subDefVal);Wa.push(null!=Xa?Xa.split(","):[])}U.dependentPropsDefVal=Ia;U.dependentPropsVals=Wa}Ba.appendChild(qa(Ka,Ma,U,Aa,Ea));Aa=!Aa}}for(Ca=0;Ca<za.length;Ca++)for(U=za[Ca],u=U.parentRow,H=0;H<U.values.length;H++)Ka=qa(U.name,U.values[H],{type:U.type,parentRow:U.parentRow,isDeletable:U.isDeletable,index:H,defVal:U.defVal,countProperty:U.countProperty,size:U.size},0==H%2,-U.flipBkg),u.parentNode.insertBefore(Ka,u.nextSibling),u=Ka;l.appendChild(Ba);sa();return l};StyleFormatPanel.prototype.addStyles=function(l){if(null!=this.defaultColorSchemes){var u=function(za){mxEvent.addListener(za,"mouseenter",function(){za.style.opacity="1"});mxEvent.addListener(za,"mouseleave",function(){za.style.opacity="0.5"})},H=this.editorUi,U=H.editor.graph,J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.paddingLeft="24px";J.style.paddingRight="20px";l.style.paddingLeft=-"16px";l.style.paddingBottom="6px";l.style.position="relative";l.appendChild(J);var W=document.createElement("div");W.style.whiteSpace="nowrap";W.style.position="relative";W.style.textAlign="center";W.style.width="210px";for(var aa=[],ba=0;ba<this.defaultColorSchemes.length;ba++){var ja=document.createElement("div");ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background=-"transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(za){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){oa(za)}))})(ba);aa.push(ja);W.appendChild(ja)}var oa=mxUtils.bind(this,function(za){null!=aa[za]&&(null!=this.format.currentScheme&&null!=aa[this.format.currentScheme]&&(aa[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=za,qa(this.defaultColorSchemes[this.format.currentScheme]),aa[this.format.currentScheme].style.background=-"#84d7ff")}),qa=mxUtils.bind(this,function(za){var Ba=mxUtils.clone(U.defaultVertexStyle);Ba[mxConstants.STYLE_STROKECOLOR]=null!=Ba[mxConstants.STYLE_STROKECOLOR]?Ba[mxConstants.STYLE_STROKECOLOR]:"default";Ba[mxConstants.STYLE_FILLCOLOR]=null!=Ba[mxConstants.STYLE_FILLCOLOR]?Ba[mxConstants.STYLE_FILLCOLOR]:"default";Ba[mxConstants.STYLE_FONTCOLOR]=null!=Ba[mxConstants.STYLE_FONTCOLOR]?Ba[mxConstants.STYLE_FONTCOLOR]:"default";U.replaceDefaultColors(new mxCell,Ba);var Ca=mxUtils.bind(this,function(sa){var Aa=-mxUtils.button("",mxUtils.bind(this,function(Ma){U.getModel().beginUpdate();try{for(var ya=H.getSelectionState().cells,Wa=0;Wa<ya.length;Wa++){var Ia=U.getModel().getStyle(ya[Wa]);null!=sa?(mxEvent.isShiftDown(Ma)||(Ia=""==sa.fill||null==sa.fill?mxUtils.setStyle(Ia,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ia,mxConstants.STYLE_FILLCOLOR,sa.fill),Ia=""==sa.gradient||null==sa.gradient?mxUtils.setStyle(Ia,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Ia,mxConstants.STYLE_GRADIENTCOLOR,-sa.gradient),mxEvent.isControlDown(Ma)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ma)||!U.getModel().isVertex(ya[Wa])||(Ia=""==sa.font||null==sa.font?mxUtils.setStyle(Ia,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Ia,mxConstants.STYLE_FONTCOLOR,sa.font))),mxEvent.isAltDown(Ma)||(Ia=""==sa.stroke||null==sa.fill?mxUtils.setStyle(Ia,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ia,mxConstants.STYLE_STROKECOLOR,sa.stroke))):(Ia=mxUtils.setStyle(Ia,mxConstants.STYLE_FILLCOLOR,null),Ia=mxUtils.setStyle(Ia,-mxConstants.STYLE_STROKECOLOR,null),Ia=mxUtils.setStyle(Ia,mxConstants.STYLE_GRADIENTCOLOR,null),U.getModel().isVertex(ya[Wa])&&(Ia=mxUtils.setStyle(Ia,mxConstants.STYLE_FONTCOLOR,null)));U.getModel().setStyle(ya[Wa],Ia)}}finally{U.getModel().endUpdate()}}));Aa.className="geStyleButton";Aa.style.width="36px";Aa.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Aa.style.margin="0px 6px 6px 0px";if(null!=sa){var Ea="1px solid";null!=sa.border&&(Ea=sa.border);if(null!=sa.gradient)Aa.style.backgroundImage=-"linear-gradient("+mxUtils.getLightDarkColor(sa.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(sa.gradient).cssText+" 100%)";else if(sa.fill==mxConstants.NONE)Aa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==sa.fill||""==sa.fill)Aa.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(Ba,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var Ka=mxUtils.getLightDarkColor(sa.fill);Aa.style.backgroundImage="linear-gradient(to right bottom, "+Ka.cssText+" 50%, "+-Ka.light+" 50.3%)"}null==sa.stroke||sa.stroke==mxConstants.NONE?Aa.style.border=Ea+" transparent":""==sa.stroke?Aa.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(Ba,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Ka=mxUtils.getLightDarkColor(sa.stroke),Aa.style.border=Ea+" "+Ka.cssText,Aa.style.borderRightColor=Ka.light,Aa.style.borderBottomColor=Aa.style.borderRightColor);null!=sa.title&&Aa.setAttribute("title",sa.title)}else Ea=mxUtils.getValue(Ba,mxConstants.STYLE_FILLCOLOR,-"#ffffff"),Ka=mxUtils.getValue(Ba,mxConstants.STYLE_STROKECOLOR,"#000000"),Aa.style.backgroundColor=Ea,Aa.style.border="1px solid "+Ka;Aa.style.borderRadius="0";J.appendChild(Aa);null!=sa&&null!=sa.gradient&&(Ea=Aa.cloneNode(!1),Ea.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(sa.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(sa.gradient).light+") 100%)",Ea.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ea.style.backgroundColor=-"transparent",J.appendChild(Ea),Ea.style.marginLeft="-42px",mxEvent.addListener(Ea,"click",function(){Aa.click()}))});J.innerText="";if(null!=za)for(var La=0;La<za.length;La++)0<La&&0==mxUtils.mod(La,4)&&mxUtils.br(J),Ca(za[La])});null==this.format.currentScheme?oa(Math.min(aa.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):oa(this.format.currentScheme);ba=10>=this.defaultColorSchemes.length?28:8;var ra=document.createElement("div");ra.style.cssText="position:absolute;left:10px;top:8px;bottom:"+-ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(ra,"click",mxUtils.bind(this,function(){oa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));-var ua=document.createElement("div");ua.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";1<this.defaultColorSchemes.length&&-(l.appendChild(ra),l.appendChild(ua));mxEvent.addListener(ua,"click",mxUtils.bind(this,function(){oa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));u(ra);u(ua);qa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&l.appendChild(W)}return l}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};-Graph.customFontElements={};Graph.isGoogleFontUrl=function(l){return l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||l.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(l){return Graph.isGoogleFontUrl(l)};Graph.rewriteGoogleFontUrl=function(l){null!=l&&l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(l=Editor.GOOGLE_FONTS_CSS2+l.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return l};Graph.createFontElement=-function(l,u){var H=Graph.fontMapping[u];null==H&&Graph.isCssFontUrl(u)?(l=document.createElement("link"),l.setAttribute("rel","stylesheet"),l.setAttribute("type","text/css"),l.setAttribute("charset","UTF-8"),l.setAttribute("href",Graph.rewriteGoogleFontUrl(u))):(null==H&&(H='@font-face {\nfont-family: "'+l+'";\nsrc: url("'+u+'");\n}'),l=document.createElement("style"),mxUtils.write(l,H));return l};Graph.addRecentCustomFont=function(l,u){};Graph.addFont=function(l,u,H){if(null!=l&&0<l.length&&null!=-u&&0<u.length){var U=l.toLowerCase();if("helvetica"!=U&&"arial"!=l&&"sans-serif"!=U){var J=Graph.customFontElements[U];null!=J&&J.url!=u&&(J.elt.parentNode.removeChild(J.elt),J=null);null==J?(J=u,"http:"==u.substring(0,5)&&(J=PROXY_URL+"?url="+encodeURIComponent(u)),J={name:l,url:u,elt:Graph.createFontElement(l,J)},Graph.customFontElements[U]=J,u=document.getElementsByTagName("head")[0],null!=H&&("link"==J.elt.nodeName.toLowerCase()?(J.elt.onload=H,J.elt.onerror=H):H()),null!=u&&u.appendChild(J.elt)):-null!=H&&H()}else null!=H&&H()}else null!=H&&H();return l};Graph.getFontUrl=function(l,u){l=Graph.customFontElements[l.toLowerCase()];null!=l&&(u=l.url);return u};Graph.processFontAttributes=function(l){l=l.getElementsByTagName("*");for(var u=0;u<l.length;u++){var H=l[u].getAttribute("data-font-src");if(null!=H){var U="FONT"==l[u].nodeName?l[u].getAttribute("face"):l[u].style.fontFamily;null!=U&&Graph.addFont(U,H)}}};Graph.processFontStyle=function(l){if(null!=l){var u=mxUtils.getValue(l,"fontSource",-null);if(null!=u){var H=mxUtils.getValue(l,mxConstants.STYLE_FONTFAMILY,null);if(null!=H)try{Graph.addFont(H,decodeURIComponent(u))}catch(U){}}}return l};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=-"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var f=Graph.prototype.init;Graph.prototype.init=function(){function l(J){u=J}f.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var u=null;mxEvent.addListener(this.container,"mouseenter",l);mxEvent.addListener(this.container,"mousemove",l);mxEvent.addListener(this.container,"mouseleave",function(J){u=null});this.isMouseInsertPoint=function(){return null!=-u};var H=this.getInsertPoint;this.getInsertPoint=function(){return null!=u?this.getPointForEvent(u):H.apply(this,arguments)};var U=this.layoutManager.getLayout;this.layoutManager.getLayout=function(J){var W=this.graph.getCellStyle(J);if(null!=W&&"rack"==W.childLayout){var aa=new mxStackLayout(this.graph,!1);aa.gridSize=null!=W.rackUnitSize?parseFloat(W.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;aa.marginLeft=W.marginLeft||0;aa.marginRight=W.marginRight||0;aa.marginTop=-W.marginTop||0;aa.marginBottom=W.marginBottom||0;aa.allowGaps=W.allowGaps||0;aa.horizontal="1"==mxUtils.getValue(W,"horizontalRack","0");aa.resizeParent=!1;aa.fill=!0;return aa}return U.apply(this,arguments)};this.updateGlobalUrlVariables()};var k=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(l,u){return Graph.processFontStyle(k.apply(this,arguments))};var B=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(l,u,H,U,J,W,aa,-ba,ja,oa,qa,ra){B.apply(this,arguments);Graph.processFontAttributes(ra)};var z=mxText.prototype.redraw;mxText.prototype.redraw=function(){z.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(l,u,H,U){function J(){for(var Ca=ba.getSelectionCells(),La=[],sa=0;sa<Ca.length;sa++)ba.isCellVisible(Ca[sa])&&La.push(Ca[sa]);ba.setSelectionCells(La)}function W(Ca){ba.setHiddenTags(Ca?[]:ja.slice());J();ba.refresh()}-function aa(Ca,La){qa.innerText="";if(0<Ca.length){var sa=document.createElement("table");sa.setAttribute("cellpadding","2");sa.style.boxSizing="border-box";sa.style.tableLayout="fixed";sa.style.width="100%";var Aa=document.createElement("tbody");if(null!=Ca&&0<Ca.length)for(var Ea=0;Ea<Ca.length;Ea++)(function(Ka){function Ma(){var t=ba.getCellsForTags([Ka],null,null,!0);ba.isEnabled()?ba.setSelectionCells(t):ba.highlightCells(t,null,null,70)}var ya=0>mxUtils.indexOf(ba.hiddenTags,Ka),Wa=document.createElement("tr"),-Ia=document.createElement("td");Ia.style.align="center";Ia.style.width="16px";var Xa=document.createElement("img");Xa.setAttribute("src",ya?Editor.visibleImage:Editor.hiddenImage);Xa.setAttribute("title",mxResources.get(ya?"hideIt":"show",[Ka]));mxUtils.setOpacity(Xa,ya?75:25);Xa.className="geAdaptiveAsset";Xa.style.verticalAlign="middle";Xa.style.cursor="pointer";Xa.style.width="16px";if(u||Editor.isDarkMode())Xa.style.filter="invert(100%)";Ia.appendChild(Xa);mxEvent.addListener(Xa,"click",function(t){mxEvent.isShiftDown(t)?-W(0<=mxUtils.indexOf(ba.hiddenTags,Ka)):(ba.toggleHiddenTag(Ka),J(),ba.refresh());mxEvent.consume(t)});Wa.appendChild(Ia);Ia=document.createElement("td");Ia.style.align="center";Ia.style.width="16px";Xa=document.createElement("img");Xa.setAttribute("src",Editor.selectImage);Xa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Xa,ya?75:25);Xa.className="geAdaptiveAsset";Xa.style.verticalAlign="middle";Xa.style.cursor="pointer";Xa.style.width="16px";if(u||Editor.isDarkMode())Xa.style.filter=-"invert(100%)";mxEvent.addListener(Xa,"click",function(t){W(!0);Ma();mxEvent.consume(t)});Ia.appendChild(Xa);Wa.appendChild(Ia);Ia=document.createElement("td");Ia.style.overflow="hidden";Ia.style.whiteSpace="nowrap";Ia.style.textOverflow="ellipsis";Ia.style.verticalAlign="middle";Ia.style.cursor="pointer";Ia.setAttribute("title",Ka);a=document.createElement("a");mxUtils.write(a,Ka);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ya?100:40);Ia.appendChild(a);mxEvent.addListener(Ia,-"click",function(t){if(mxEvent.isShiftDown(t))W(!0),Ma();else if(ya&&0<ba.hiddenTags.length)W(!0);else{var N=ja.slice(),Q=mxUtils.indexOf(N,Ka);N.splice(Q,1);ba.setHiddenTags(N);J();ba.refresh()}mxEvent.consume(t)});Wa.appendChild(Ia);if(ba.isEnabled()){Ia=document.createElement("td");Ia.style.verticalAlign="middle";Ia.style.textAlign="center";Ia.style.width="18px";if(null==La){Ia.style.align="center";Ia.style.width="16px";Xa=document.createElement("img");Xa.setAttribute("src",Editor.trashImage);-Xa.setAttribute("title",mxResources.get("removeIt",[Ka]));mxUtils.setOpacity(Xa,ya?75:25);Xa.className="geAdaptiveAsset";Xa.style.verticalAlign="middle";Xa.style.cursor="pointer";Xa.style.width="16px";if(u||Editor.isDarkMode())Xa.style.filter="invert(100%)";mxEvent.addListener(Xa,"click",function(t){var N=mxUtils.indexOf(ja,Ka);0<=N&&ja.splice(N,1);ba.removeTagsForCells(ba.model.getDescendants(ba.model.getRoot()),[Ka]);ba.refresh();mxEvent.consume(t)});Ia.appendChild(Xa)}else{var Pa=document.createElement("input");-Pa.setAttribute("type","checkbox");Pa.style.margin="0px";Pa.defaultChecked=null!=La&&0<=mxUtils.indexOf(La,Ka);Pa.checked=Pa.defaultChecked;Pa.style.background="transparent";Pa.setAttribute("title",mxResources.get(Pa.defaultChecked?"removeIt":"add",[Ka]));mxEvent.addListener(Pa,"change",function(t){Pa.checked?ba.addTagsForCells(ba.getSelectionCells(),[Ka]):ba.removeTagsForCells(ba.getSelectionCells(),[Ka]);mxEvent.consume(t)});Ia.appendChild(Pa)}Wa.appendChild(Ia)}Aa.appendChild(Wa)})(Ca[Ea]);sa.appendChild(Aa);-qa.appendChild(sa)}}var ba=this,ja=ba.hiddenTags.slice(),oa=document.createElement("div");oa.style.userSelect="none";oa.style.overflow="hidden";oa.style.padding="10px";oa.style.height="100%";var qa=document.createElement("div");qa.style.position="absolute";qa.style.boxSizing="border-box";qa.style.userSelect="none";qa.style.overflow="auto";qa.style.padding="3px";qa.style.left="0px";qa.style.right="0px";qa.style.top="0px";qa.style.bottom="0px";oa.appendChild(qa);ba.addListener(mxEvent.ROOT,function(){ja=-ba.hiddenTags.slice()});var ra=mxUtils.bind(this,function(Ca,La){if(l()){Ca=ba.getAllTags();for(La=0;La<Ca.length;La++)0>mxUtils.indexOf(ja,Ca[La])&&ja.push(Ca[La]);ja.sort();ba.isSelectionEmpty()?aa(ja):aa(ja,ba.getCommonTagsForCells(ba.getSelectionCells()))}});ba.selectionModel.addListener(mxEvent.CHANGE,ra);ba.model.addListener(mxEvent.CHANGE,ra);ba.addListener(mxEvent.REFRESH,ra);var ua=document.createElement("div");ua.className="geToolbarContainer";ua.style.position="absolute";ua.style.display=-"flex";ua.style.bottom="0px";ua.style.left="0px";ua.style.right="0px";ua.style.height="26px";ua.style.overflow="hidden";ua.style.padding="3px 4px 4px 4px";ua.style.borderWidth="1px 0px 0px 0px";ua.style.borderStyle="solid";ua.style.whiteSpace="nowrap";if(ba.isEnabled()){qa.style.bottom="34px";var za=document.createElement("a");za.className="geToolbarButton geAdaptiveAsset geToggleItem";za.style.width="16px";za.style.height="18px";za.style.backgroundPosition="center center";za.style.backgroundRepeat=-"no-repeat";za.style.backgroundSize="20px";za.style.margin="0 2px";za.style.display="inline-block";za.style.cursor="pointer";var Ba=za.cloneNode(!1);Ba.style.backgroundImage="url("+Editor.visibleImage+")";Ba.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(Ba,"click",function(Ca){ba.setHiddenTags([]);mxEvent.isShiftDown(Ca)||(ja=ba.hiddenTags.slice());J();ba.refresh();mxEvent.consume(Ca)});ua.appendChild(Ba);null!=H&&(za=za.cloneNode(!1),za.style.backgroundImage="url("+Editor.plusImage+-")",za.setAttribute("title",mxResources.get("add")),mxEvent.addListener(za,"click",function(Ca){H(ja,function(La){ja=La;ra()});mxEvent.consume(Ca)}),ua.appendChild(za));oa.appendChild(ua)}null!=U&&ua.appendChild(U);return{div:oa,refresh:ra}};Graph.prototype.getCustomFonts=function(){var l=this.extFonts;l=null!=l?l.slice():[];for(var u in Graph.customFontElements){var H=Graph.customFontElements[u];l.push({name:H.name,url:H.url})}return l};Graph.prototype.setFont=function(l,u){Graph.addFont(l,u);var H=-Editor.guid();document.execCommand("fontname",!1,H);for(var U=this.cellEditor.textarea.getElementsByTagName("font"),J=!1,W=0;W<U.length;W++)U[W].getAttribute("face")==H&&(J=!0,U[W].setAttribute("face",l),null!=u?U[W].setAttribute("data-font-src",u):U[W].removeAttribute("data-font-src"));J||document.execCommand("fontname",!1,l)};var C=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return C.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=-function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var l=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=l)for(var u in l)this.globalVars[u]=l[u]}catch(H){null!=window.console&&console.log("Error in vars URL parameter: "+H)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var I=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=-function(l){var u=I.apply(this,arguments);null==u&&null!=this.globalVars&&(u=this.globalVars[l]);return u};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var l=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(l.ownerDocument)).decode(l)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=function(l,u,H,U,J,W,aa,ba,ja,oa,qa,ra,ua,za,Ba,Ca){var La=L.apply(this,-arguments);if(null!=ra){var sa=La.getAttribute("style");null==sa&&(sa="");ra="auto"==ra?"none"==this.getAdaptiveColors()?"light":"light dark":ra;La.setAttribute("style",sa+(" color-scheme: "+ra+";"))}var Aa=this.getCustomFonts();if(qa&&0<Aa.length){var Ea=La.ownerDocument;sa=null!=Ea.createElementNS?Ea.createElementNS(mxConstants.NS_SVG,"style"):Ea.createElement("style");null!=Ea.setAttributeNS?sa.setAttributeNS("type","text/css"):sa.setAttribute("type","text/css");for(var Ka="",Ma="",ya=0;ya<Aa.length;ya++){var Wa=-Aa[ya].name,Ia=Aa[ya].url;Graph.isCssFontUrl(Ia)?Ka+="@import url("+Graph.rewriteGoogleFontUrl(Ia)+");\n":Ma+='@font-face {\nfont-family: "'+Wa+'";\nsrc: url("'+Ia+'");\n}\n'}sa.appendChild(Ea.createTextNode(Ka+Ma));La.getElementsByTagName("defs")[0].appendChild(sa)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(La);this.mathEnabled&&(document.body.appendChild(La),Editor.MathJaxRender(La),La.parentNode.removeChild(La),sa=La.ownerDocument.getElementById("MJX-SVG-styles"),-null!=sa&&La.getElementsByTagName("defs")[0].appendChild(sa.cloneNode(!0)));return La};var K=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(l){K.apply(this,arguments);null!=l.secondLabel&&(l.secondLabel.destroy(),l.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(l){return[l.shape,l.text,l.secondLabel,l.control]};var O=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){O.apply(this,arguments);this.enumerationState=-0};var da=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(l){null!=l.shape&&this.redrawEnumerationState(l);return da.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(l){l=decodeURIComponent(mxUtils.getValue(l.style,"enumerateValue",""));""==l&&(l=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(l)+"</div>"};mxGraphView.prototype.redrawEnumerationState=-function(l){var u="1"==mxUtils.getValue(l.style,"enumerate",0);u&&null==l.secondLabel?(l.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),l.secondLabel.size=12,l.secondLabel.state=l,l.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(l,l.secondLabel)):u||null==l.secondLabel||(l.secondLabel.destroy(),l.secondLabel=null);u=l.secondLabel;if(null!=u){var H=l.view.scale,U=this.createEnumerationValue(l);l=this.graph.model.isVertex(l.cell)?-new mxRectangle(l.x+l.width-4*H,l.y+4*H,0,0):mxRectangle.fromPoint(l.view.getPoint(l));u.bounds.equals(l)&&u.value==U&&u.scale==H||(u.bounds=l,u.value=U,u.scale=H,u.redraw())}};var ea=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ea.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};-var ca=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){ca.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(l,u){"data:action/json,"==l.substring(0,17)&&(l=JSON.parse(l.substring(17)),null!=l.actions&&this.executeCustomActions(l.actions,null,u))};Graph.prototype.executeCustomActions=function(l,u,H){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),-null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var U=!1,J=0,W=0,aa=mxUtils.bind(this,function(){U||(U=!0,this.model.beginUpdate())}),ba=mxUtils.bind(this,function(){U&&(U=!1,this.model.endUpdate())}),ja=mxUtils.bind(this,function(){0<J&&J--;0==J&&oa()}),oa=mxUtils.bind(this,function(){if(W<l.length){var qa=this.stoppingCustomActions,ra=l[W++],ua=[];if(null!=ra.open)if(ba(),this.isCustomLink(ra.open)){if(!this.customLinkClicked(ra.open,-H))return}else this.openLink(ra.open);null==ra.wait||qa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ja()}),J++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=ra.wait?parseInt(ra.wait):1E3),ba());null!=ra.opacity&&null!=ra.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ra.opacity,!0)),ra.opacity.value);null!=ra.fadeIn&&(J++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ra.fadeIn,-!0)),0,1,ja,qa?0:ra.fadeIn.delay));null!=ra.fadeOut&&(J++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ra.fadeOut,!0)),1,0,ja,qa?0:ra.fadeOut.delay));null!=ra.wipeIn&&(ua=ua.concat(this.createWipeAnimations(this.getCellsForAction(ra.wipeIn,!0),!0)));null!=ra.wipeOut&&(ua=ua.concat(this.createWipeAnimations(this.getCellsForAction(ra.wipeOut,!0),!1)));null!=ra.toggle&&(aa(),this.toggleCells(this.getCellsForAction(ra.toggle,!0)));if(null!=ra.show){aa();var za=this.getCellsForAction(ra.show,-!0);Graph.setOpacityForNodes(this.getNodesForCells(za),1);this.setCellsVisible(za,!0)}null!=ra.hide&&(aa(),za=this.getCellsForAction(ra.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(za),0),this.setCellsVisible(za,!1));null!=ra.toggleStyle&&null!=ra.toggleStyle.key&&(aa(),this.toggleCellStyles(ra.toggleStyle.key,null!=ra.toggleStyle.defaultValue?ra.toggleStyle.defaultValue:"0",this.getCellsForAction(ra.toggleStyle,!0)));null!=ra.style&&null!=ra.style.key&&(aa(),this.setCellStyles(ra.style.key,-ra.style.value,this.getCellsForAction(ra.style,!0)));za=[];null!=ra.select&&this.isEnabled()&&(za=this.getCellsForAction(ra.select),this.setSelectionCells(za));null!=ra.highlight&&(za=this.getCellsForAction(ra.highlight),this.highlightCells(za,ra.highlight.color,ra.highlight.duration,ra.highlight.opacity));null!=ra.scroll&&(za=this.getCellsForAction(ra.scroll));null!=ra.viewbox&&this.fitWindow(ra.viewbox,ra.viewbox.border);0<za.length&&this.scrollCellToVisible(za[0]);null!=H&&null!=ra.explore&&Graph.exploreFromCell(this,-H,ra.explore);if(null!=ra.tags){if(null!=ra.tags.toggle){var Ba=ra.tags.toggle;0==Ba.length&&(Ba=this.getAllTags());for(za=0;za<Ba.length;za++)this.toggleHiddenTag(Ba[za])}Ba=null;null!=ra.tags.hidden&&(null==Ba&&(Ba=[]),Ba=Ba.concat(ra.tags.hidden));if(null!=ra.tags.visible){null==Ba&&(Ba=[]);var Ca=this.getAllTags();for(za=0;za<Ca.length;za++)0>mxUtils.indexOf(ra.tags.visible,Ca[za])&&0>mxUtils.indexOf(Ba,Ca[za])&&Ba.push(Ca[za])}null!=Ba&&this.setHiddenTags(Ba);this.refresh()}0<ua.length&&(J++,-this.executeAnimations(ua,ja,qa?1:ra.steps,qa?0:ra.delay));0==J?oa():ba()}else this.stoppingCustomActions=this.executingCustomActions=!1,ba(),null!=u&&u()});oa()}};Graph.prototype.doUpdateCustomLinksForCell=function(l,u){var H=this.getLinkForCell(u);null!=H&&"data:action/json,"==H.substring(0,17)&&this.setLinkForCell(u,this.updateCustomLink(l,H));if(this.isHtmlLabel(u)){var U=document.createElement("div");U.innerHTML=Graph.sanitizeHtml(this.getLabel(u));for(var J=U.getElementsByTagName("a"),W=!1,-aa=0;aa<J.length;aa++)H=J[aa].getAttribute("href"),null!=H&&"data:action/json,"==H.substring(0,17)&&(J[aa].setAttribute("href",this.updateCustomLink(l,H)),W=!0);W&&this.labelChanged(u,U.innerHTML)}};Graph.prototype.updateCustomLink=function(l,u){if("data:action/json,"==u.substring(0,17))try{var H=JSON.parse(u.substring(17));null!=H.actions&&(this.updateCustomLinkActions(l,H.actions),u="data:action/json,"+JSON.stringify(H))}catch(U){}return u};Graph.prototype.updateCustomLinkActions=function(l,u){for(var H=-0;H<u.length;H++){var U=u[H],J;for(J in U)this.updateCustomLinkAction(l,U[J],"cells"),this.updateCustomLinkAction(l,U[J],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(l,u,H){if(null!=u&&null!=u[H]){for(var U=[],J=0;J<u[H].length;J++)if("*"==u[H][J])U.push(u[H][J]);else{var W=l[u[H][J]];null!=W?""!=W&&U.push(W):U.push(u[H][J])}u[H]=U}};Graph.prototype.getCellsForAction=function(l,u){u=this.getCellsById(l.cells).concat(this.getCellsForTags(l.tags,null,u));if(null!=l.excludeCells){for(var H=-[],U=0;U<u.length;U++)0>l.excludeCells.indexOf(u[U].id)&&H.push(u[U]);u=H}return u};Graph.prototype.getCellsById=function(l){var u=[];if(null!=l)for(var H=0;H<l.length;H++)if("*"==l[H]){var U=this.model.getRoot();u=u.concat(this.model.filterDescendants(function(W){return W!=U},U))}else{var J=this.model.getCell(l[H]);null!=J&&u.push(J)}return u};var V=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(l){return V.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(l))};-Graph.prototype.setHiddenTags=function(l){this.hiddenTags=l;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(l){var u=mxUtils.indexOf(this.hiddenTags,l);0>u?this.hiddenTags.push(l):0<=u&&this.hiddenTags.splice(u,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(l){if(null==l||0==l.length||0==this.hiddenTags.length)return!1;l=l.split(" ");if(l.length>this.hiddenTags.length)return!1;for(var u=0;u<l.length;u++)if(0>-mxUtils.indexOf(this.hiddenTags,l[u]))return!1;return!0};Graph.prototype.getCellsForTags=function(l,u,H,U){var J=[];if(null!=l){u=null!=u?u:this.model.getDescendants(this.model.getRoot());for(var W=0,aa={},ba=0;ba<l.length;ba++)0<l[ba].length&&(aa[l[ba]]=!0,W++);for(ba=0;ba<u.length;ba++)if(H&&this.model.getParent(u[ba])==this.model.root||this.model.isVertex(u[ba])||this.model.isEdge(u[ba])){var ja=this.getTagsForCell(u[ba]),oa=!1;if(0<ja.length&&(ja=ja.split(" "),ja.length>=l.length)){for(var qa=-oa=0;qa<ja.length&&oa<W;qa++)null!=aa[ja[qa]]&&oa++;oa=oa==W}oa&&(1!=U||this.isCellVisible(u[ba]))&&J.push(u[ba])}}return J};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(l){for(var u=null,H=[],U=0;U<l.length;U++){var J=this.getTagsForCell(l[U]);H=[];if(0<J.length){J=J.split(" ");for(var W={},aa=0;aa<J.length;aa++)if(null==u||null!=u[J[aa]])W[J[aa]]=!0,H.push(J[aa]);u=W}else return[]}return H};-Graph.prototype.getTagsForCells=function(l){for(var u=[],H={},U=0;U<l.length;U++){var J=this.getTagsForCell(l[U]);if(0<J.length){J=J.split(" ");for(var W=0;W<J.length;W++)null==H[J[W]]&&(H[J[W]]=!0,u.push(J[W]))}}return u};Graph.prototype.getTagsForCell=function(l){return this.getAttributeForCell(l,"tags","")};Graph.prototype.addTagsForCells=function(l,u){if(0<l.length&&0<u.length){this.model.beginUpdate();try{for(var H=0;H<l.length;H++){for(var U=this.getTagsForCell(l[H]),J=U.split(" "),W=!1,aa=-0;aa<u.length;aa++){var ba=mxUtils.trim(u[aa]);""!=ba&&0>mxUtils.indexOf(J,ba)&&(U=0<U.length?U+" "+ba:ba,W=!0)}W&&this.setAttributeForCell(l[H],"tags",U)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(l,u){if(0<l.length&&0<u.length){this.model.beginUpdate();try{for(var H=0;H<l.length;H++){var U=this.getTagsForCell(l[H]);if(0<U.length){for(var J=U.split(" "),W=!1,aa=0;aa<u.length;aa++){var ba=mxUtils.indexOf(J,u[aa]);0<=ba&&(J.splice(ba,1),W=!0)}W&&this.setAttributeForCell(l[H],-"tags",J.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(l){this.model.beginUpdate();try{for(var u=0;u<l.length;u++)this.model.setVisible(l[u],!this.model.isVisible(l[u]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(l,u){this.model.beginUpdate();try{for(var H=0;H<l.length;H++)this.model.setVisible(l[H],u)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(l,u,H,U){for(var J=0;J<l.length;J++)this.highlightCell(l[J],-u,H,U)};Graph.prototype.highlightCell=function(l,u,H,U,J){u=null!=u?u:mxConstants.DEFAULT_VALID_COLOR;H=null!=H?H:1E3;l=this.view.getState(l);var W=null;null!=l&&(J=null!=J?J:4,J=Math.max(J+1,mxUtils.getValue(l.style,mxConstants.STYLE_STROKEWIDTH,1)+J),W=new mxCellHighlight(this,u,J,!1),null!=U&&(W.opacity=U),W.highlight(l),window.setTimeout(function(){null!=W.shape&&(mxUtils.setPrefixedStyle(W.shape.node.style,"transition","all 1200ms ease-in-out"),W.shape.node.style.opacity=0);window.setTimeout(function(){W.destroy()},-1200)},H));return W};Graph.prototype.addSvgShadow=function(l,u,H,U){H=null!=H?H:!1;U=null!=U?U:!0;var J=l.ownerDocument,W=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"filter"):J.createElement("filter");W.setAttribute("id",this.shadowId);var aa=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):J.createElement("feGaussianBlur");aa.setAttribute("in","SourceAlpha");aa.setAttribute("stdDeviation",this.svgShadowBlur);aa.setAttribute("result","blur");W.appendChild(aa);-aa=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"feOffset"):J.createElement("feOffset");aa.setAttribute("in","blur");aa.setAttribute("dx",this.svgShadowSize);aa.setAttribute("dy",this.svgShadowSize);aa.setAttribute("result","offsetBlur");W.appendChild(aa);aa=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"feFlood"):J.createElement("feFlood");aa.setAttribute("flood-color",this.svgShadowColor);aa.setAttribute("flood-opacity",this.svgShadowOpacity);aa.setAttribute("result",-"offsetColor");W.appendChild(aa);aa=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"feComposite"):J.createElement("feComposite");aa.setAttribute("in","offsetColor");aa.setAttribute("in2","offsetBlur");aa.setAttribute("operator","in");aa.setAttribute("result","offsetBlur");W.appendChild(aa);aa=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"feBlend"):J.createElement("feBlend");aa.setAttribute("in","SourceGraphic");aa.setAttribute("in2","offsetBlur");W.appendChild(aa);aa=-l.getElementsByTagName("defs");0==aa.length?(J=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"defs"):J.createElement("defs"),null!=l.firstChild?l.insertBefore(J,l.firstChild):l.appendChild(J)):J=aa[0];J.appendChild(W);H||(u=null!=u?u:l.getElementsByTagName("g")[0],null!=u&&(u.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(l.getAttribute("width")))&&U&&(l.setAttribute("width",parseInt(l.getAttribute("width"))+6),l.setAttribute("height",parseInt(l.getAttribute("height"))+-6),u=l.getAttribute("viewBox"),null!=u&&0<u.length&&(u=u.split(" "),3<u.length&&(w=parseFloat(u[2])+6,h=parseFloat(u[3])+6,l.setAttribute("viewBox",u[0]+" "+u[1]+" "+w+" "+h))))));return W};Graph.prototype.setShadowVisible=function(l,u){mxClient.IS_SVG&&!mxClient.IS_SF&&(u=null!=u?u:!0,(this.shadowVisible=l)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),u&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=-function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var l=this.model.getChildCount(this.model.root),u=0;do var H=this.model.getChildAt(this.model.root,u);while(u++<l&&"1"==mxUtils.getValue(this.getCellStyle(H),"locked","0"));null!=H&&this.setDefaultParent(H)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=+{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,A,J,U){if(null!=A){var P=mxUtils.bind(this,function(W){if(null!=W)if(J)for(var aa=0;aa<W.length;aa++){if("function"!==typeof W[aa].isVisible||W[aa].isVisible(U,this))A[W[aa].name]=W[aa]}else for(var ja in A){var pa=!1;for(aa=+0;aa<W.length;aa++)if(W[aa].name==ja&&W[aa].type==A[ja].type){pa=!0;break}pa||delete A[ja]}}),T=this.editorUi.editor.graph.view.getState(k);null!=T&&null!=T.shape&&(T.shape.commonCustomPropAdded||(T.shape.commonCustomPropAdded=!0,T.shape.customProperties=T.shape.customProperties||[],T.cell.vertex?Array.prototype.push.apply(T.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(T.shape.customProperties,Editor.commonEdgeProperties)),P(T.shape.customProperties));k=k.getAttribute("customProperties");+if(null!=k)try{P(JSON.parse(k))}catch(W){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var A={},J=k.vertices,U=k.edges,P=0;P<J.length;P++)this.findCommonProperties(J[P],A,+0==P,k);for(P=0;P<U.length;P++)this.findCommonProperties(U[P],A,0==J.length&&0==P,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,k))}};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var A=this.editorUi.getSelectionState();1==A.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=A.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);f.apply(this,+arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,A,J,U){function P(Da,x,M,Q,V){if(null!=M.valueChanged)M.valueChanged(x,V);else{wa.getModel().beginUpdate();try{V=[];var ia=[];if(null!=M.index){for(var ka=[],oa=M.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Da;)ka.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;M.index<ka.length?null!=Q?ka.splice(Q,1):ka[M.index]=x:ka.push(x);null!=M.size&&ka.length>M.size&&(ka=ka.slice(0,+M.size));x=ka.join(",");null!=M.countProperty&&(wa.setCellStyles(M.countProperty,ka.length,wa.getSelectionCells()),V.push(M.countProperty),ia.push(ka.length))}wa.setCellStyles(Da,x,wa.getSelectionCells());V.push(Da);ia.push(x);if(null!=M.dependentProps)for(Da=0;Da<M.dependentProps.length;Da++){var xa=M.dependentPropsDefVal[Da],ta=M.dependentPropsVals[Da];if(ta.length>x)ta=ta.slice(0,x);else for(var ua=ta.length;ua<x;ua++)ta.push(xa);ta=ta.join(",");wa.setCellStyles(M.dependentProps[Da],ta,wa.getSelectionCells());+V.push(M.dependentProps[Da]);ia.push(ta)}if("function"==typeof M.onChange)M.onChange(wa,x);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",ia,"cells",wa.getSelectionCells()))}finally{wa.getModel().endUpdate()}}}function T(Da,x,M){var Q=mxUtils.getOffset(k,!0),V=mxUtils.getOffset(Da,!0);x.style.position="absolute";x.style.left=V.x-Q.x+"px";x.style.top=V.y-Q.y+"px";x.style.width=Da.offsetWidth+"px";x.style.height=Da.offsetHeight-(M?4:0)+"px";x.style.zIndex=5}function W(Da,x,+M){function Q(ia){if(null==ia||ia==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ia)V.style.background="";else{var ka=mxUtils.getLightDarkColor(ia);mxUtils.isLightDarkColor(ia)&&ka.light!=ka.dark?V.style.background="linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":V.style.background=ia}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle=+"solid";V.style.borderWidth="1px";Q(x);btn=mxUtils.button("",mxUtils.bind(qa,function(ia){this.editorUi.pickColor(x,function(ka){P(Da,ka,M);Q(ka)});mxEvent.consume(ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function aa(Da,x,M,Q,V,ia,ka){null!=x&&(x=x.split(","),Ba.push({name:Da,values:x,type:M,defVal:Q,countProperty:V,parentRow:ia,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",+mxUtils.bind(qa,function(oa){for(var xa=ia,ta=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Da)xa=xa.nextSibling,ta++;else break;var ua={type:M,parentRow:ia,index:ta,isDeletable:!0,defVal:Q,countProperty:V};ta=sa(Da,"",ua,0==ta%2,ka);P(Da,Q,ua);xa.parentNode.insertBefore(ta,xa.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ja(Da,x,M,Q,V,ia,ka){if(0<V){var oa=Array(V);x=null!=x?x.split(","):[];+for(var xa=0;xa<V;xa++)oa[xa]=null!=x[xa]?x[xa]:null!=Q?Q:"";Ba.push({name:Da,values:oa,type:M,defVal:Q,parentRow:ia,flipBkg:ka,size:V})}return document.createElement("div")}function pa(Da,x,M){var Q=document.createElement("input");Q.type="checkbox";Q.checked="1"==x;mxEvent.addListener(Q,"change",function(){P(Da,Q.checked?"1":"0",M)});return Q}function sa(Da,x,M,Q,V){var ia=M.dispName,ka=M.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";+oa.setAttribute("data-pName",Da);oa.setAttribute("data-pValue",x);Q=!1;null!=M.index&&(oa.setAttribute("data-index",M.index),ia=(null!=ia?ia:"")+"["+M.index+"]",Q=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ia=mxResources.get(ia,null,ia);mxUtils.write(xa,ia);xa.setAttribute("title",ia);Q&&(xa.style.textAlign="right");oa.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";xa.setAttribute("title",null!=x?x:mxResources.get("none"));if("color"==ka)xa.appendChild(W(Da,+x,M));else if("bool"==ka||"boolean"==ka)xa.appendChild(pa(Da,x,M));else if("enum"==ka){var ta=M.enumList;for(V=0;V<ta.length;V++)if(ia=ta[V],ia.val==x){mxUtils.write(xa,mxResources.get(ia.dispName,null,ia.dispName));break}mxEvent.addListener(xa,"click",mxUtils.bind(qa,function(){var ua=document.createElement("select"),Fa=null;T(xa,ua);for(var Na=0;Na<ta.length;Na++){var Wa=ta[Na],Xa=document.createElement("option");Xa.value=mxUtils.htmlEntities(Wa.val);mxUtils.write(Xa,mxResources.get(Wa.dispName,+null,Wa.dispName));ua.appendChild(Xa);null==Wa.val&&(Xa.value="null",Fa=Xa)}ua.value=null==x&&null!=Fa?"null":x;k.appendChild(ua);mxEvent.addListener(ua,"change",function(){var ab=mxUtils.htmlEntities(ua.value);if(ua[ua.selectedIndex]==Fa||"null"==ab.value)ab=null;P(Da,ab,M)});ua.focus();mxEvent.addListener(ua,"blur",function(){k.removeChild(ua)})}))}else"dynamicArr"==ka?xa.appendChild(aa(Da,x,M.subType,M.subDefVal,M.countProperty,oa,V)):"staticArr"==ka?xa.appendChild(ja(Da,x,M.subType,M.subDefVal,+M.size,oa,V)):"readOnly"==ka?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=x,V.style.borderWidth="0px","id"==Da?(V.style.width="190px",V.style.position="relative",V.style.right="6px",V.style.float="right",V.style.background="none",V.style.textAlign="right",oa.firstChild.setAttribute("colspan","2"),V.setAttribute("title",x),oa.firstChild.appendChild(V)):(V.style.width="96px",xa.appendChild(V))):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(x)),mxEvent.addListener(xa,+"click",mxUtils.bind(qa,function(){function ua(){var Na=Fa.value;Na=0==Na.length&&"string"!=ka&&"numbers"!=ka?0:Na;M.allowAuto&&(null!=Na.trim&&"auto"==Na.trim().toLowerCase()?(Na="auto",ka="string"):(Na=parseFloat(Na),Na=isNaN(Na)?0:Na));null!=M.min&&Na<M.min?Na=M.min:null!=M.max&&Na>M.max&&(Na=M.max);var Wa=null;try{Wa="numbers"==ka?Na.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Na):Na)+"")}catch(Xa){}P(Da,Wa,M,null,Fa)}var Fa=document.createElement("input");T(xa,+Fa,!0);Fa.value=decodeURIComponent(x);Fa.className="gePropEditor";"int"!=ka&&"float"!=ka||M.allowAuto||(Fa.type="number",Fa.step="int"==ka?"1":"any",null!=M.min&&(Fa.min=parseFloat(M.min)),null!=M.max&&(Fa.max=parseFloat(M.max)));k.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Na){13==Na.keyCode&&ua()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){ua()})})));M.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(ua){P(Da,"",M,M.index);mxEvent.consume(ua)})),V.style.height=+"16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",xa.appendChild(V));oa.appendChild(xa);return oa}var qa=this,wa=this.editorUi.editor.graph,Ba=[];k.style.position="relative";k.style.padding="0";var za=document.createElement("table");za.className="geProperties";za.style.whiteSpace="nowrap";za.style.width="100%";var Ea=document.createElement("tr");Ea.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";ra.style.paddingLeft="16px";ra.style.backgroundRepeat=+"no-repeat";ra.style.backgroundPosition="-2px 50%";ra.style.backgroundSize="20px";mxUtils.write(ra,mxResources.get("property"));Ea.style.cursor="pointer";var ya=function(){var Da=za.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){ra.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var x="none";for(var M=k.childNodes.length-1;0<=M;M--)try{var Q=k.childNodes[M],V=Q.nodeName.toUpperCase();"INPUT"!=V&&"SELECT"!=V||k.removeChild(Q)}catch(ia){}}else ra.style.backgroundImage=+"url('"+Editor.arrowDownImage+"')",x="";for(M=0;M<Da.length;M++)Da[M].style.display=x};mxEvent.addListener(Ea,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;ya()});Ea.appendChild(ra);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Ea.appendChild(Ca);za.appendChild(Ea);var Ma=Ca=!1;Ea=null;1==J.vertices.length&&0==J.edges.length?Ea=J.vertices[0].id:0==J.vertices.length&&1==+J.edges.length&&(Ea=J.edges[0].id);null==Ea||U||za.appendChild(sa("id",mxUtils.htmlEntities(Ea),{dispName:"id",type:"readOnly"},!0,!1));for(var Ha in A)if(U=A[Ha],"function"!=typeof U.isVisible||U.isVisible(J,this)){var Aa=null!=U.getValue?U.getValue():null!=J.style[Ha]?mxUtils.htmlEntities(J.style[Ha]+""):null!=U.getDefaultValue?U.getDefaultValue(J,this):U.defVal;if("separator"==U.type)Ma=!Ma;else{if("staticArr"==U.type)U.size=parseInt(J.style[U.sizeProperty]||A[U.sizeProperty].defVal)||0;else if(null!=+U.dependentProps){var Ra=U.dependentProps,Za=[],La=[];for(Ea=0;Ea<Ra.length;Ea++){var $a=J.style[Ra[Ea]];La.push(A[Ra[Ea]].subDefVal);Za.push(null!=$a?$a.split(","):[])}U.dependentPropsDefVal=La;U.dependentPropsVals=Za}za.appendChild(sa(Ha,Aa,U,Ca,Ma));Ca=!Ca}}for(Ea=0;Ea<Ba.length;Ea++)for(U=Ba[Ea],A=U.parentRow,J=0;J<U.values.length;J++)Ha=sa(U.name,U.values[J],{type:U.type,parentRow:U.parentRow,isDeletable:U.isDeletable,index:J,defVal:U.defVal,countProperty:U.countProperty,size:U.size},0==J%2,+U.flipBkg),A.parentNode.insertBefore(Ha,A.nextSibling),A=Ha;k.appendChild(za);ya();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var A=function(Ba){mxEvent.addListener(Ba,"mouseenter",function(){Ba.style.opacity="1"});mxEvent.addListener(Ba,"mouseleave",function(){Ba.style.opacity="0.5"})},J=this.editorUi,U=J.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";P.style.paddingRight="20px";k.style.paddingLeft=+"16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(P);var T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.position="relative";T.style.textAlign="center";T.style.width="210px";for(var W=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var ja=document.createElement("div");ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background=+"transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Ba){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){pa(Ba)}))})(aa);W.push(ja);T.appendChild(ja)}var pa=mxUtils.bind(this,function(Ba){null!=W[Ba]&&(null!=this.format.currentScheme&&null!=W[this.format.currentScheme]&&(W[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,sa(this.defaultColorSchemes[this.format.currentScheme]),W[this.format.currentScheme].style.background="#84d7ff")}),+sa=mxUtils.bind(this,function(Ba){var za=mxUtils.clone(U.defaultVertexStyle);za[mxConstants.STYLE_STROKECOLOR]=null!=za[mxConstants.STYLE_STROKECOLOR]?za[mxConstants.STYLE_STROKECOLOR]:"default";za[mxConstants.STYLE_FILLCOLOR]=null!=za[mxConstants.STYLE_FILLCOLOR]?za[mxConstants.STYLE_FILLCOLOR]:"default";za[mxConstants.STYLE_FONTCOLOR]=null!=za[mxConstants.STYLE_FONTCOLOR]?za[mxConstants.STYLE_FONTCOLOR]:"default";U.replaceDefaultColors(new mxCell,za);var Ea=mxUtils.bind(this,function(ya){var Ca=+mxUtils.button("",mxUtils.bind(this,function(Aa){U.getModel().beginUpdate();try{for(var Ra=J.getSelectionState().cells,Za=0;Za<Ra.length;Za++){var La=U.getModel().getStyle(Ra[Za]);null!=ya?(mxEvent.isShiftDown(Aa)||(La=""==ya.fill||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,ya.fill),La=""==ya.gradient||null==ya.gradient?mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,+ya.gradient),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!U.getModel().isVertex(Ra[Za])||(La=""==ya.font||null==ya.font?mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,ya.font))),mxEvent.isAltDown(Aa)||(La=""==ya.stroke||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,ya.stroke))):(La=mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null),La=mxUtils.setStyle(La,+mxConstants.STYLE_STROKECOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null),U.getModel().isVertex(Ra[Za])&&(La=mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null)));U.getModel().setStyle(Ra[Za],La)}}finally{U.getModel().endUpdate()}}));Ca.className="geStyleButton";Ca.style.width="36px";Ca.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ca.style.margin="0px 6px 6px 0px";if(null!=ya){var Ma="1px solid";null!=ya.border&&(Ma=ya.border);if(null!=ya.gradient)Ca.style.backgroundImage=+"linear-gradient("+mxUtils.getLightDarkColor(ya.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ya.gradient).cssText+" 100%)";else if(ya.fill==mxConstants.NONE)Ca.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ya.fill||""==ya.fill)Ca.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var Ha=mxUtils.getLightDarkColor(ya.fill);Ca.style.backgroundImage="linear-gradient(to right bottom, "+Ha.cssText+" 50%, "++Ha.light+" 50.3%)"}null==ya.stroke||ya.stroke==mxConstants.NONE?Ca.style.border=Ma+" transparent":""==ya.stroke?Ca.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Ha=mxUtils.getLightDarkColor(ya.stroke),Ca.style.border=Ma+" "+Ha.cssText,Ca.style.borderRightColor=Ha.light,Ca.style.borderBottomColor=Ca.style.borderRightColor);null!=ya.title&&Ca.setAttribute("title",ya.title)}else Ma=mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,+"#ffffff"),Ha=mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000"),Ca.style.backgroundColor=Ma,Ca.style.border="1px solid "+Ha;Ca.style.borderRadius="0";P.appendChild(Ca);null!=ya&&null!=ya.gradient&&(Ma=Ca.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(ya.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ya.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor=+"transparent",P.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ca.click()}))});P.innerText="";if(null!=Ba)for(var ra=0;ra<Ba.length;ra++)0<ra&&0==mxUtils.mod(ra,4)&&mxUtils.br(P),Ea(Ba[ra])});null==this.format.currentScheme?pa(Math.min(W.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):pa(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:10px;top:8px;bottom:"++aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));+var wa=document.createElement("div");wa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";1<this.defaultColorSchemes.length&&+(k.appendChild(qa),k.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(qa);A(wa);sa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(T)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};+Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=+function(k,A){var J=Graph.fontMapping[A];null==J&&Graph.isCssFontUrl(A)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(A))):(null==J&&(J='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+A+'");\n}'),k=document.createElement("style"),mxUtils.write(k,J));return k};Graph.addRecentCustomFont=function(k,A){};Graph.addFont=function(k,A,J){if(null!=k&&0<k.length&&null!=+A&&0<A.length){var U=k.toLowerCase();if("helvetica"!=U&&"arial"!=k&&"sans-serif"!=U){var P=Graph.customFontElements[U];null!=P&&P.url!=A&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=A,"http:"==A.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(A)),P={name:k,url:A,elt:Graph.createFontElement(k,P)},Graph.customFontElements[U]=P,A=document.getElementsByTagName("head")[0],null!=J&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=J,P.elt.onerror=J):J()),null!=A&&A.appendChild(P.elt)):+null!=J&&J()}else null!=J&&J()}else null!=J&&J();return k};Graph.getFontUrl=function(k,A){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(A=k.url);return A};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var A=0;A<k.length;A++){var J=k[A].getAttribute("data-font-src");if(null!=J){var U="FONT"==k[A].nodeName?k[A].getAttribute("face"):k[A].style.fontFamily;null!=U&&Graph.addFont(U,J)}}};Graph.processFontStyle=function(k){if(null!=k){var A=mxUtils.getValue(k,"fontSource",+null);if(null!=A){var J=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=J)try{Graph.addFont(J,decodeURIComponent(A))}catch(U){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=+"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var l=Graph.prototype.init;Graph.prototype.init=function(){function k(P){A=P}l.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(P){A=null});this.isMouseInsertPoint=function(){return null!=+A};var J=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):J.apply(this,arguments)};var U=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var T=this.graph.getCellStyle(P);if(null!=T&&"rack"==T.childLayout){var W=new mxStackLayout(this.graph,!1);W.gridSize=null!=T.rackUnitSize?parseFloat(T.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;W.marginLeft=T.marginLeft||0;W.marginRight=T.marginRight||0;W.marginTop=+T.marginTop||0;W.marginBottom=T.marginBottom||0;W.allowGaps=T.allowGaps||0;W.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");W.resizeParent=!1;W.fill=!0;return W}return U.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,A){return Graph.processFontStyle(t.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,A,J,U,P,T,W,aa,ja,+pa,sa,qa){z.apply(this,arguments);Graph.processFontAttributes(qa)};var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,A,J,U){function P(){for(var Ea=aa.getSelectionCells(),ra=[],ya=0;ya<Ea.length;ya++)aa.isCellVisible(Ea[ya])&&ra.push(Ea[ya]);aa.setSelectionCells(ra)}function T(Ea){aa.setHiddenTags(Ea?[]:ja.slice());P();aa.refresh()}+function W(Ea,ra){sa.innerText="";if(0<Ea.length){var ya=document.createElement("table");ya.setAttribute("cellpadding","2");ya.style.boxSizing="border-box";ya.style.tableLayout="fixed";ya.style.width="100%";var Ca=document.createElement("tbody");if(null!=Ea&&0<Ea.length)for(var Ma=0;Ma<Ea.length;Ma++)(function(Ha){function Aa(){var x=aa.getCellsForTags([Ha],null,null,!0);aa.isEnabled()?aa.setSelectionCells(x):aa.highlightCells(x,null,null,70)}var Ra=0>mxUtils.indexOf(aa.hiddenTags,Ha),Za=document.createElement("tr"),+La=document.createElement("td");La.style.align="center";La.style.width="16px";var $a=document.createElement("img");$a.setAttribute("src",Ra?Editor.visibleImage:Editor.hiddenImage);$a.setAttribute("title",mxResources.get(Ra?"hideIt":"show",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";La.appendChild($a);mxEvent.addListener($a,"click",function(x){mxEvent.isShiftDown(x)?+T(0<=mxUtils.indexOf(aa.hiddenTags,Ha)):(aa.toggleHiddenTag(Ha),P(),aa.refresh());mxEvent.consume(x)});Za.appendChild(La);La=document.createElement("td");La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.selectImage);$a.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter=+"invert(100%)";mxEvent.addListener($a,"click",function(x){T(!0);Aa();mxEvent.consume(x)});La.appendChild($a);Za.appendChild(La);La=document.createElement("td");La.style.overflow="hidden";La.style.whiteSpace="nowrap";La.style.textOverflow="ellipsis";La.style.verticalAlign="middle";La.style.cursor="pointer";La.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ra?100:40);La.appendChild(a);mxEvent.addListener(La,+"click",function(x){if(mxEvent.isShiftDown(x))T(!0),Aa();else if(Ra&&0<aa.hiddenTags.length)T(!0);else{var M=ja.slice(),Q=mxUtils.indexOf(M,Ha);M.splice(Q,1);aa.setHiddenTags(M);P();aa.refresh()}mxEvent.consume(x)});Za.appendChild(La);if(aa.isEnabled()){La=document.createElement("td");La.style.verticalAlign="middle";La.style.textAlign="center";La.style.width="18px";if(null==ra){La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.trashImage);+$a.setAttribute("title",mxResources.get("removeIt",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";mxEvent.addListener($a,"click",function(x){var M=mxUtils.indexOf(ja,Ha);0<=M&&ja.splice(M,1);aa.removeTagsForCells(aa.model.getDescendants(aa.model.getRoot()),[Ha]);aa.refresh();mxEvent.consume(x)});La.appendChild($a)}else{var Da=document.createElement("input");+Da.setAttribute("type","checkbox");Da.style.margin="0px";Da.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,Ha);Da.checked=Da.defaultChecked;Da.style.background="transparent";Da.setAttribute("title",mxResources.get(Da.defaultChecked?"removeIt":"add",[Ha]));mxEvent.addListener(Da,"change",function(x){Da.checked?aa.addTagsForCells(aa.getSelectionCells(),[Ha]):aa.removeTagsForCells(aa.getSelectionCells(),[Ha]);mxEvent.consume(x)});La.appendChild(Da)}Za.appendChild(La)}Ca.appendChild(Za)})(Ea[Ma]);ya.appendChild(Ca);+sa.appendChild(ya)}}var aa=this,ja=aa.hiddenTags.slice(),pa=document.createElement("div");pa.style.userSelect="none";pa.style.overflow="hidden";pa.style.padding="10px";pa.style.height="100%";var sa=document.createElement("div");sa.style.position="absolute";sa.style.boxSizing="border-box";sa.style.userSelect="none";sa.style.overflow="auto";sa.style.padding="3px";sa.style.left="0px";sa.style.right="0px";sa.style.top="0px";sa.style.bottom="0px";pa.appendChild(sa);aa.addListener(mxEvent.ROOT,function(){ja=+aa.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Ea,ra){if(k()){Ea=aa.getAllTags();for(ra=0;ra<Ea.length;ra++)0>mxUtils.indexOf(ja,Ea[ra])&&ja.push(Ea[ra]);ja.sort();aa.isSelectionEmpty()?W(ja):W(ja,aa.getCommonTagsForCells(aa.getSelectionCells()))}});aa.selectionModel.addListener(mxEvent.CHANGE,qa);aa.model.addListener(mxEvent.CHANGE,qa);aa.addListener(mxEvent.REFRESH,qa);var wa=document.createElement("div");wa.className="geToolbarContainer";wa.style.position="absolute";wa.style.display=+"flex";wa.style.bottom="0px";wa.style.left="0px";wa.style.right="0px";wa.style.height="26px";wa.style.overflow="hidden";wa.style.padding="3px 4px 4px 4px";wa.style.borderWidth="1px 0px 0px 0px";wa.style.borderStyle="solid";wa.style.whiteSpace="nowrap";if(aa.isEnabled()){sa.style.bottom="34px";var Ba=document.createElement("a");Ba.className="geToolbarButton geAdaptiveAsset geToggleItem";Ba.style.width="16px";Ba.style.height="18px";Ba.style.backgroundPosition="center center";Ba.style.backgroundRepeat=+"no-repeat";Ba.style.backgroundSize="20px";Ba.style.margin="0 2px";Ba.style.display="inline-block";Ba.style.cursor="pointer";var za=Ba.cloneNode(!1);za.style.backgroundImage="url("+Editor.visibleImage+")";za.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(za,"click",function(Ea){aa.setHiddenTags([]);mxEvent.isShiftDown(Ea)||(ja=aa.hiddenTags.slice());P();aa.refresh();mxEvent.consume(Ea)});wa.appendChild(za);null!=J&&(Ba=Ba.cloneNode(!1),Ba.style.backgroundImage="url("+Editor.plusImage++")",Ba.setAttribute("title",mxResources.get("add")),mxEvent.addListener(Ba,"click",function(Ea){J(ja,function(ra){ja=ra;qa()});mxEvent.consume(Ea)}),wa.appendChild(Ba));pa.appendChild(wa)}null!=U&&wa.appendChild(U);return{div:pa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var A in Graph.customFontElements){var J=Graph.customFontElements[A];k.push({name:J.name,url:J.url})}return k};Graph.prototype.setFont=function(k,A){Graph.addFont(k,A);var J=+Editor.guid();document.execCommand("fontname",!1,J);for(var U=this.cellEditor.textarea.getElementsByTagName("font"),P=!1,T=0;T<U.length;T++)U[T].getAttribute("face")==J&&(P=!0,U[T].setAttribute("face",k),null!=A?U[T].setAttribute("data-font-src",A):U[T].removeAttribute("data-font-src"));P||document.execCommand("fontname",!1,k)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=+function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var A in k)this.globalVars[A]=k[A]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=+function(k){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[k]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,A,J,U,P,T,W,aa,ja,pa,sa,qa,wa,Ba,za,Ea){var ra=K.apply(this,+arguments);if(null!=qa){var ya=ra.getAttribute("style");null==ya&&(ya="");qa="auto"==qa?"none"==this.getAdaptiveColors()?"light":"light dark":qa;ra.setAttribute("style",ya+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(sa&&0<Ca.length){var Ma=ra.ownerDocument;ya=null!=Ma.createElementNS?Ma.createElementNS(mxConstants.NS_SVG,"style"):Ma.createElement("style");null!=Ma.setAttributeNS?ya.setAttributeNS("type","text/css"):ya.setAttribute("type","text/css");for(var Ha="",Aa="",Ra=0;Ra<Ca.length;Ra++){var Za=+Ca[Ra].name,La=Ca[Ra].url;Graph.isCssFontUrl(La)?Ha+="@import url("+Graph.rewriteGoogleFontUrl(La)+");\n":Aa+='@font-face {\nfont-family: "'+Za+'";\nsrc: url("'+La+'");\n}\n'}ya.appendChild(Ma.createTextNode(Ha+Aa));ra.getElementsByTagName("defs")[0].appendChild(ya)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ra);this.mathEnabled&&(document.body.appendChild(ra),Editor.MathJaxRender(ra),ra.parentNode.removeChild(ra),ya=ra.ownerDocument.getElementById("MJX-SVG-styles"),+null!=ya&&ra.getElementsByTagName("defs")[0].appendChild(ya.cloneNode(!0)));return ra};var I=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){I.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ca=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ca.apply(this,arguments);this.enumerationState=+0};var da=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return da.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=+function(k){var A="1"==mxUtils.getValue(k.style,"enumerate",0);A&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):A||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);A=k.secondLabel;if(null!=A){var J=k.view.scale,U=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?+new mxRectangle(k.x+k.width-4*J,k.y+4*J,0,0):mxRectangle.fromPoint(k.view.getPoint(k));A.bounds.equals(k)&&A.value==U&&A.scale==J||(A.bounds=k,A.value=U,A.scale=J,A.redraw())}};var ea=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ea.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};+var X=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){X.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,A){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,A))};Graph.prototype.executeCustomActions=function(k,A,J){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),+null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var U=!1,P=0,T=0,W=mxUtils.bind(this,function(){U||(U=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){U&&(U=!1,this.model.endUpdate())}),ja=mxUtils.bind(this,function(){0<P&&P--;0==P&&pa()}),pa=mxUtils.bind(this,function(){if(T<k.length){var sa=this.stoppingCustomActions,qa=k[T++],wa=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,+J))return}else this.openLink(qa.open);null==qa.wait||sa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ja()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,+!0)),0,1,ja,sa?0:qa.fadeIn.delay));null!=qa.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,ja,sa?0:qa.fadeOut.delay));null!=qa.wipeIn&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(W(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){W();var Ba=this.getCellsForAction(qa.show,+!0);Graph.setOpacityForNodes(this.getNodesForCells(Ba),1);this.setCellsVisible(Ba,!0)}null!=qa.hide&&(W(),Ba=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ba),0),this.setCellsVisible(Ba,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(W(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(W(),this.setCellStyles(qa.style.key,+qa.style.value,this.getCellsForAction(qa.style,!0)));Ba=[];null!=qa.select&&this.isEnabled()&&(Ba=this.getCellsForAction(qa.select),this.setSelectionCells(Ba));null!=qa.highlight&&(Ba=this.getCellsForAction(qa.highlight),this.highlightCells(Ba,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(Ba=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<Ba.length&&this.scrollCellToVisible(Ba[0]);null!=J&&null!=qa.explore&&Graph.exploreFromCell(this,+J,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var za=qa.tags.toggle;0==za.length&&(za=this.getAllTags());for(Ba=0;Ba<za.length;Ba++)this.toggleHiddenTag(za[Ba])}za=null;null!=qa.tags.hidden&&(null==za&&(za=[]),za=za.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==za&&(za=[]);var Ea=this.getAllTags();for(Ba=0;Ba<Ea.length;Ba++)0>mxUtils.indexOf(qa.tags.visible,Ea[Ba])&&0>mxUtils.indexOf(za,Ea[Ba])&&za.push(Ea[Ba])}null!=za&&this.setHiddenTags(za);this.refresh()}0<wa.length&&(P++,+this.executeAnimations(wa,ja,sa?1:qa.steps,sa?0:qa.delay));0==P?pa():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=A&&A()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,A){var J=this.getLinkForCell(A);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(k,J));if(this.isHtmlLabel(A)){var U=document.createElement("div");U.innerHTML=Graph.sanitizeHtml(this.getLabel(A));for(var P=U.getElementsByTagName("a"),T=!1,+W=0;W<P.length;W++)J=P[W].getAttribute("href"),null!=J&&"data:action/json,"==J.substring(0,17)&&(P[W].setAttribute("href",this.updateCustomLink(k,J)),T=!0);T&&this.labelChanged(A,U.innerHTML)}};Graph.prototype.updateCustomLink=function(k,A){if("data:action/json,"==A.substring(0,17))try{var J=JSON.parse(A.substring(17));null!=J.actions&&(this.updateCustomLinkActions(k,J.actions),A="data:action/json,"+JSON.stringify(J))}catch(U){}return A};Graph.prototype.updateCustomLinkActions=function(k,A){for(var J=+0;J<A.length;J++){var U=A[J],P;for(P in U)this.updateCustomLinkAction(k,U[P],"cells"),this.updateCustomLinkAction(k,U[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,A,J){if(null!=A&&null!=A[J]){for(var U=[],P=0;P<A[J].length;P++)if("*"==A[J][P])U.push(A[J][P]);else{var T=k[A[J][P]];null!=T?""!=T&&U.push(T):U.push(A[J][P])}A[J]=U}};Graph.prototype.getCellsForAction=function(k,A){A=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,A));if(null!=k.excludeCells){for(var J=+[],U=0;U<A.length;U++)0>k.excludeCells.indexOf(A[U].id)&&J.push(A[U]);A=J}return A};Graph.prototype.getCellsById=function(k){var A=[];if(null!=k)for(var J=0;J<k.length;J++)if("*"==k[J]){var U=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(T){return T!=U},U))}else{var P=this.model.getCell(k[J]);null!=P&&A.push(P)}return A};var ba=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return ba.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};+Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var A=mxUtils.indexOf(this.hiddenTags,k);0>A?this.hiddenTags.push(k):0<=A&&this.hiddenTags.splice(A,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var A=0;A<k.length;A++)if(0>+mxUtils.indexOf(this.hiddenTags,k[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,A,J,U){var P=[];if(null!=k){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var T=0,W={},aa=0;aa<k.length;aa++)0<k[aa].length&&(W[k[aa]]=!0,T++);for(aa=0;aa<A.length;aa++)if(J&&this.model.getParent(A[aa])==this.model.root||this.model.isVertex(A[aa])||this.model.isEdge(A[aa])){var ja=this.getTagsForCell(A[aa]),pa=!1;if(0<ja.length&&(ja=ja.split(" "),ja.length>=k.length)){for(var sa=pa=+0;sa<ja.length&&pa<T;sa++)null!=W[ja[sa]]&&pa++;pa=pa==T}pa&&(1!=U||this.isCellVisible(A[aa]))&&P.push(A[aa])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var A=null,J=[],U=0;U<k.length;U++){var P=this.getTagsForCell(k[U]);J=[];if(0<P.length){P=P.split(" ");for(var T={},W=0;W<P.length;W++)if(null==A||null!=A[P[W]])T[P[W]]=!0,J.push(P[W]);A=T}else return[]}return J};+Graph.prototype.getTagsForCells=function(k){for(var A=[],J={},U=0;U<k.length;U++){var P=this.getTagsForCell(k[U]);if(0<P.length){P=P.split(" ");for(var T=0;T<P.length;T++)null==J[P[T]]&&(J[P[T]]=!0,A.push(P[T]))}}return A};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){for(var U=this.getTagsForCell(k[J]),P=U.split(" "),T=!1,W=0;W<+A.length;W++){var aa=mxUtils.trim(A[W]);""!=aa&&0>mxUtils.indexOf(P,aa)&&(U=0<U.length?U+" "+aa:aa,T=!0)}T&&this.setAttributeForCell(k[J],"tags",U)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){var U=this.getTagsForCell(k[J]);if(0<U.length){for(var P=U.split(" "),T=!1,W=0;W<A.length;W++){var aa=mxUtils.indexOf(P,A[W]);0<=aa&&(P.splice(aa,1),T=!0)}T&&this.setAttributeForCell(k[J],+"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var A=0;A<k.length;A++)this.model.setVisible(k[A],!this.model.isVisible(k[A]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,A){this.model.beginUpdate();try{for(var J=0;J<k.length;J++)this.model.setVisible(k[J],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,A,J,U){for(var P=0;P<k.length;P++)this.highlightCell(k[P],+A,J,U)};Graph.prototype.highlightCell=function(k,A,J,U,P){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;k=this.view.getState(k);var T=null;null!=k&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+P),T=new mxCellHighlight(this,A,P,!1),null!=U&&(T.opacity=U),T.highlight(k),window.setTimeout(function(){null!=T.shape&&(mxUtils.setPrefixedStyle(T.shape.node.style,"transition","all 1200ms ease-in-out"),T.shape.node.style.opacity=0);window.setTimeout(function(){T.destroy()},+1200)},J));return T};Graph.prototype.addSvgShadow=function(k,A,J,U){J=null!=J?J:!1;U=null!=U?U:!0;var P=k.ownerDocument,T=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");T.setAttribute("id",this.shadowId);var W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");W.setAttribute("in","SourceAlpha");W.setAttribute("stdDeviation",this.svgShadowBlur);W.setAttribute("result","blur");T.appendChild(W);+W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");W.setAttribute("in","blur");W.setAttribute("dx",this.svgShadowSize);W.setAttribute("dy",this.svgShadowSize);W.setAttribute("result","offsetBlur");T.appendChild(W);W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");W.setAttribute("flood-color",this.svgShadowColor);W.setAttribute("flood-opacity",this.svgShadowOpacity);W.setAttribute("result","offsetColor");+T.appendChild(W);W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");W.setAttribute("in","offsetColor");W.setAttribute("in2","offsetBlur");W.setAttribute("operator","in");W.setAttribute("result","offsetBlur");T.appendChild(W);W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");W.setAttribute("in","SourceGraphic");W.setAttribute("in2","offsetBlur");T.appendChild(W);W=k.getElementsByTagName("defs");+0==W.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=k.firstChild?k.insertBefore(P,k.firstChild):k.appendChild(P)):P=W[0];P.appendChild(T);J||(A=null!=A?A:k.getElementsByTagName("g")[0],null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&U&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),A=k.getAttribute("viewBox"),+null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,k.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return T};Graph.prototype.setShadowVisible=function(k,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=null!=A?A:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==+this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),A=0;do var J=this.model.getChildAt(this.model.root,A);while(A++<k&&"1"==mxUtils.getValue(this.getCellStyle(J),"locked","0"));null!=J&&this.setDefaultParent(J)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml",STENCIL_PATH+"/kubernetes2.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=@@ -3453,404 +3452,405 @@ function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(t"/ibm.xml"];mxStencilRegistry.libraries.ibmcloud=[STENCIL_PATH+"/ibm_cloud.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[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.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(l){var u=null;null!=l&&0<l.length&&("ER"==l.substring(0,2)?u="mxgraph.er":"sysML"==l.substring(0,5)&&(u="mxgraph.sysml"));return u};var ma=mxMarker.createMarker;mxMarker.createMarker=function(l,u,H,U,J,W,aa,ba,ja,oa){if(null!=H&&null==mxMarker.markers[H]){var qa=this.getPackageForType(H);-null!=qa&&mxStencilRegistry.getStencil(qa)}return ma.apply(this,arguments)};var la=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(l,u,H,U,J,W){"1"==mxUtils.getValue(u.style,"lineShape",null)&&l.setFillColor(mxUtils.getValue(u.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return la.apply(this,arguments)};PrintDialog.prototype.create=function(l,u,H){function U(){za.value=Math.max(1,Math.min(oa,Math.max(parseInt(za.value),parseInt(ua.value))));ua.value=Math.max(1,Math.min(oa,-Math.min(parseInt(za.value),parseInt(ua.value))))}function J(va){l.lastPrintPagesRadioChecked=ra.checked;l.lastPrintSelectionOnlyChecked=Ca.checked;l.lastPrintCropRadioChecked=sa.checked;l.lastPrintFitRadioChecked=Aa.checked;ra.checked&&ua.value<za.value?(l.lastPrintPagesFromInput=ua.value,l.lastPrintPagesToInput=za.value):(l.lastPrintPagesFromInput=null,l.lastPrintPagesToInput=null);X.value=Math.max(1,Math.min(1600,parseInt(X.value)))+"%";l.lastPrintZoom=X.value;l.lastPrintBorder=Q.value;l.lastPrintGrid=-ia.checked;l.lastPrintTransparent=ka.checked;l.lastPrintInclude=pa.checked;l.lastPrintSheetsAcross=t.value;l.lastPrintSheetsDown=N.value;var Da={};Da.border=parseInt(Q.value);Da.scale=parseInt(X.value)/100;Da.grid=ia.checked;Da.transparent=ka.checked;Da.includeCopy=pa.checked;Da.sheetsAcross=parseInt(t.value);Da.sheetsDown=parseInt(N.value);Da.pagesFrom=parseInt(ua.value);Da.pagesTo=parseInt(za.value);Da.allPages=qa.checked;Da.selection=Ca.checked;Da.pageView=La.checked;Da.crop=sa.checked;Da.fit=-Aa.checked;return null!=H?H(!va,Da):l.print(!va,Da)}var W=l.editor.graph,aa=document.createElement("div"),ba=document.createElement("h3");ba.style.width="100%";ba.style.textAlign="center";ba.style.marginTop="0px";mxUtils.write(ba,u||mxResources.get("print"));aa.appendChild(ba);var ja=1,oa=1;ba=document.createElement("div");ba.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name",-"pages-printdialog");ba.appendChild(qa);u=document.createElement("span");mxUtils.write(u,mxResources.get("allPages"));mxEvent.addListener(u,"click",function(){qa.checked=!0});ba.appendChild(u);mxUtils.br(ba);var ra=qa.cloneNode(!0);ba.appendChild(ra);u=document.createElement("span");mxUtils.write(u,mxResources.get("pages")+":");ba.appendChild(u);mxEvent.addListener(u,"click",function(){ra.checked=!0});var ua=document.createElement("input");ua.style.margin="0 4px";ua.setAttribute("value","1");ua.setAttribute("type",-"number");ua.setAttribute("min","1");ua.style.width="40px";ba.appendChild(ua);u=document.createElement("span");mxUtils.write(u,mxResources.get("to"));ba.appendChild(u);var za=ua.cloneNode(!0);ba.appendChild(za);mxEvent.addListener(ua,"focus",function(){ra.checked=!0});mxEvent.addListener(za,"focus",function(){ra.checked=!0});mxEvent.addListener(ua,"change",U);mxEvent.addListener(za,"change",U);if(null!=l.pages&&(oa=l.pages.length,null!=l.currentPage))for(var Ba=0;Ba<oa;Ba++)if(l.currentPage==l.pages[Ba]){ja=-Ba+1;break}null!=l.lastPrintPagesFromInput&&null!=l.lastPrintPagesToInput?(ua.value=Math.min(oa,Math.max(1,l.lastPrintPagesFromInput)),za.value=Math.min(oa,Math.max(1,l.lastPrintPagesToInput))):(ua.value=ja,za.value=ja);ua.setAttribute("max",oa);za.setAttribute("max",oa);Ba=mxUtils.button(mxResources.get("currentPage"),function(va){ua.value=ja;za.value=ja;ra.checked=!0});Ba.setAttribute("title",mxResources.get("currentPage"));Ba.style.marginLeft="4px";Ba.style.maxWidth="100px";Ba.style.overflow="hidden";-Ba.style.textOverflow="ellipsis";Ba.style.whiteSpace="nowrap";ba.appendChild(Ba);1<oa&&aa.appendChild(ba);ba=document.createElement("div");ba.style.borderBottom="1px solid lightGray";ba.style.paddingBottom="12px";ba.style.marginBottom="12px";ba.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.setAttribute("name","pages-printdialog");Ca.setAttribute("type",1==oa?"checkbox":"radio");Ca.style.marginRight="8px";W.isSelectionEmpty()&&Ca.setAttribute("disabled","disabled");W.isEnabled()&&-(ba.appendChild(Ca),u=document.createElement("span"),mxUtils.write(u,mxResources.get("selectionOnly")),ba.appendChild(u));(W.isEnabled()||1<oa)&&aa.appendChild(ba);!l.isPagesEnabled()||l.lastPrintPagesRadioChecked?ra.checked=!0:!W.isSelectionEmpty()&&l.lastPrintSelectionOnlyChecked?Ca.checked=!0:qa.checked=!0;W.isSelectionEmpty()||mxEvent.addListener(u,"click",function(){Ca.checked=!Ca.checked});W=document.createElement("div");W.style.whiteSpace="nowrap";var La=document.createElement("input");La.style.marginBottom=-"8px";La.style.marginRight="8px";La.setAttribute("type","radio");La.setAttribute("name","printSize");W.appendChild(La);u=document.createElement("span");mxUtils.write(u,mxResources.get("pageView"));W.appendChild(u);mxEvent.addListener(W,"click",function(){La.checked=!0});aa.appendChild(W);W=document.createElement("div");W.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginBottom="8px";sa.style.marginRight="8px";sa.setAttribute("type","radio");sa.setAttribute("name","printSize");-W.appendChild(sa);u=document.createElement("span");mxUtils.write(u,mxResources.get("crop"));W.appendChild(u);mxEvent.addListener(W,"click",function(){sa.checked=!0});aa.appendChild(W);W=document.createElement("div");W.style.whiteSpace="nowrap";var Aa=document.createElement("input");Aa.style.marginBottom="8px";Aa.style.marginRight="8px";Aa.setAttribute("type","radio");Aa.setAttribute("name","printSize");u=document.createElement("div");u.style.display="inline-block";u.style.verticalAlign="top";u.style.paddingTop=-"2px";u.appendChild(Aa);W.appendChild(u);ba=document.createElement("table");ba.style.display="inline-block";ba.style.borderSpacing="0";Ba=document.createElement("tbody");var Ea=document.createElement("tr"),Ka=Ea.cloneNode(!0),Ma=document.createElement("td"),ya=Ma.cloneNode(!0),Wa=Ma.cloneNode(!0),Ia=Ma.cloneNode(!0),Xa=Ma.cloneNode(!0),Pa=Ma.cloneNode(!0);Ma.style.textAlign="right";Ia.style.textAlign="right";mxUtils.write(Ma,mxResources.get("fitTo"));mxEvent.addListener(W,"click",function(va){mxEvent.getSource(va)!=-Aa&&(Aa.checked=!Aa.checked)});var t=document.createElement("input");t.style.margin="0 2px";t.style.boxSizing="border-box";t.setAttribute("value",l.lastPrintSheetsAcross||"1");t.setAttribute("min","1");t.setAttribute("type","number");t.style.width="40px";ya.appendChild(t);u=document.createElement("span");mxUtils.write(u,mxResources.get("fitToSheetsAcross"));Wa.appendChild(u);mxUtils.write(Ia,mxResources.get("fitToBy"));var N=t.cloneNode(!0);N.setAttribute("value",l.lastPrintSheetsDown||"1");Xa.appendChild(N);-mxEvent.addListener(t,"click",function(va){Aa.checked=!0;mxEvent.consume(va)});mxEvent.addListener(N,"click",function(va){Aa.checked=!0;mxEvent.consume(va)});l.lastPrintCropRadioChecked?sa.checked=!0:l.lastPrintFitRadioChecked?Aa.checked=!0:La.checked=!0;u=document.createElement("span");mxUtils.write(u,mxResources.get("fitToSheetsDown"));Pa.appendChild(u);Ea.appendChild(Ma);Ea.appendChild(ya);Ea.appendChild(Wa);Ka.appendChild(Ia);Ka.appendChild(Xa);Ka.appendChild(Pa);Ba.appendChild(Ea);Ba.appendChild(Ka);-ba.appendChild(Ba);W.appendChild(ba);aa.appendChild(W);W=document.createElement("div");W.style.borderTop="1px solid lightGray";W.style.whiteSpace="nowrap";W.style.paddingTop="12px";W.style.marginTop="12px";W.style.paddingLeft="8px";mxUtils.write(W,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=l.lastPrintBorder?l.lastPrintBorder:mxPrintPreview.prototype.pageMargin;-W.appendChild(Q);u=document.createElement("span");u.style.marginLeft="8px";mxUtils.write(u,mxResources.get("zoom")+":");W.appendChild(u);var X=document.createElement("input");X.style.width="60px";X.style.marginLeft="4px";X.value=null!=l.lastPrintZoom?l.lastPrintZoom:"100%";W.appendChild(X);mxUtils.br(W);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=l.lastPrintGrid?l.lastPrintGrid:!1;W.appendChild(ia);u=document.createElement("span");-u.style.marginLeft="4px";u.style.marginRight="8px";mxUtils.write(u,mxResources.get("grid"));W.appendChild(u);mxEvent.addListener(u,"click",function(va){ia.checked=!0;mxEvent.consume(va)});var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=l.lastPrintTransparent?l.lastPrintTransparent:!1;null!=H&&(W.appendChild(ka),u=document.createElement("span"),u.style.marginLeft="4px",mxUtils.write(u,mxResources.get("transparentBackground")),W.appendChild(u),-mxEvent.addListener(u,"click",function(va){ka.checked=!0;mxEvent.consume(va)}));var pa=document.createElement("input");pa.setAttribute("type","checkbox");pa.style.marginTop="10px";pa.checked=null!=l.lastPrintInclude?l.lastPrintInclude:Editor.defaultIncludeDiagram;null==H||mxClient.IS_CHROMEAPP||"draw.io"!=l.getServiceName()||(mxUtils.br(W),W.appendChild(pa),u=document.createElement("span"),u.style.marginLeft="4px",mxUtils.write(u,mxResources.get("includeCopyOfMyDiagram")),W.appendChild(u),mxEvent.addListener(u,-"click",function(va){pa.checked=!0;mxEvent.consume(va)}));aa.appendChild(W);u=document.createElement("div");u.style.marginTop="40px";u.style.textAlign="right";u.style.whiteSpace="nowrap";l.isOffline()||null!=H||u.appendChild(l.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));W=mxUtils.button(mxResources.get("cancel"),function(){l.hideDialog()});W.className="geBtn";l.editor.cancelFirst&&u.appendChild(W);PrintDialog.previewEnabled&&null==H&&(ba=mxUtils.button(mxResources.get("preview"),-function(){try{l.hideDialog(),J(!1)}catch(va){l.handleError(va)}}),ba.className="geBtn",u.appendChild(ba));ba=mxUtils.button(mxResources.get(null!=H?"export":PrintDialog.previewEnabled?"print":"ok"),function(){try{l.hideDialog(),J(!0)}catch(va){l.handleError(va)}});ba.className="geBtn gePrimaryBtn";u.appendChild(ba);l.editor.cancelFirst||u.appendChild(W);aa.appendChild(u);if(l.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(aa.classList.add("geDarkMode"),aa.style.colorScheme="dark"):-(aa.classList.remove("geDarkMode"),aa.style.colorScheme="light")};l.addListener("darkModeChanged",xa);xa();var ta=function(va,Da){va=Da.getProperty("dialog");aa.parentNode==va.container&&(l.editor.removeListener(ta),l.removeListener(xa))};l.editor.addListener("hideDialog",ta)}this.container=aa};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||-(this.page.viewState.background=this.color);if(!this.ignoreImage){var l=this.image;null!=l&&null!=l.src&&Graph.isPageLink(l.src)&&(l={originalSrc:l.src});this.page.viewState.backgroundImage=l}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Y.apply(this,-arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(l=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=l?l:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),-this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var fa=document.createElement("canvas"),Z=new Image;Z.onload=function(){try{fa.getContext("2d").drawImage(Z,0,0);var l=fa.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=l&&6<l.length}catch(u){}};Z.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(l){}Editor.prototype.useCanvasForExport=+[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var A=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?A="mxgraph.er":"sysML"==k.substring(0,5)&&(A="mxgraph.sysml"));return A};var ha=mxMarker.createMarker;mxMarker.createMarker=function(k,A,J,U,P,T,W,aa,ja,pa){if(null!=J&&null==mxMarker.markers[J]){var sa=this.getPackageForType(J);+null!=sa&&mxStencilRegistry.getStencil(sa)}return ha.apply(this,arguments)};var ma=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,A,J,U,P,T){"1"==mxUtils.getValue(A.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ma.apply(this,arguments)};PrintDialog.prototype.create=function(k,A,J){function U(){Ba.value=Math.max(1,Math.min(pa,Math.max(parseInt(Ba.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(pa,+Math.min(parseInt(Ba.value),parseInt(wa.value))))}function P(ua){k.lastPrintPagesRadioChecked=qa.checked;k.lastPrintSelectionOnlyChecked=Ea.checked;k.lastPrintCropRadioChecked=ya.checked;k.lastPrintFitRadioChecked=Ca.checked;qa.checked&&wa.value<Ba.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ba.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);V.value=Math.max(1,Math.min(1600,parseInt(V.value)))+"%";k.lastPrintZoom=V.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=+ia.checked;k.lastPrintTransparent=ka.checked;k.lastPrintInclude=oa.checked;k.lastPrintSheetsAcross=x.value;k.lastPrintSheetsDown=M.value;var Fa={};Fa.border=parseInt(Q.value);Fa.scale=parseInt(V.value)/100;Fa.grid=ia.checked;Fa.transparent=ka.checked;Fa.includeCopy=oa.checked;Fa.sheetsAcross=parseInt(x.value);Fa.sheetsDown=parseInt(M.value);Fa.pagesFrom=parseInt(wa.value);Fa.pagesTo=parseInt(Ba.value);Fa.allPages=sa.checked;Fa.selection=Ea.checked;Fa.pageView=ra.checked;Fa.crop=ya.checked;Fa.fit=+Ca.checked;return null!=J?J(!ua,Fa):k.print(!ua,Fa)}var T=k.editor.graph,W=document.createElement("div"),aa=document.createElement("h3");aa.style.width="100%";aa.style.textAlign="center";aa.style.marginTop="0px";mxUtils.write(aa,A||mxResources.get("print"));W.appendChild(aa);var ja=1,pa=1;aa=document.createElement("div");aa.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginRight="8px";sa.style.marginBottom="8px";sa.setAttribute("type","radio");sa.setAttribute("name",+"pages-printdialog");aa.appendChild(sa);A=document.createElement("span");mxUtils.write(A,mxResources.get("allPages"));mxEvent.addListener(A,"click",function(){sa.checked=!0});aa.appendChild(A);mxUtils.br(aa);var qa=sa.cloneNode(!0);aa.appendChild(qa);A=document.createElement("span");mxUtils.write(A,mxResources.get("pages")+":");aa.appendChild(A);mxEvent.addListener(A,"click",function(){qa.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type",+"number");wa.setAttribute("min","1");wa.style.width="40px";aa.appendChild(wa);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));aa.appendChild(A);var Ba=wa.cloneNode(!0);aa.appendChild(Ba);mxEvent.addListener(wa,"focus",function(){qa.checked=!0});mxEvent.addListener(Ba,"focus",function(){qa.checked=!0});mxEvent.addListener(wa,"change",U);mxEvent.addListener(Ba,"change",U);if(null!=k.pages&&(pa=k.pages.length,null!=k.currentPage))for(var za=0;za<pa;za++)if(k.currentPage==k.pages[za]){ja=+za+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(pa,Math.max(1,k.lastPrintPagesFromInput)),Ba.value=Math.min(pa,Math.max(1,k.lastPrintPagesToInput))):(wa.value=ja,Ba.value=ja);wa.setAttribute("max",pa);Ba.setAttribute("max",pa);za=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=ja;Ba.value=ja;qa.checked=!0});za.setAttribute("title",mxResources.get("currentPage"));za.style.marginLeft="4px";za.style.maxWidth="100px";za.style.overflow="hidden";+za.style.textOverflow="ellipsis";za.style.whiteSpace="nowrap";aa.appendChild(za);1<pa&&W.appendChild(aa);aa=document.createElement("div");aa.style.borderBottom="1px solid lightGray";aa.style.paddingBottom="12px";aa.style.marginBottom="12px";aa.style.whiteSpace="nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==pa?"checkbox":"radio");Ea.style.marginRight="8px";T.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");T.isEnabled()&&+(aa.appendChild(Ea),A=document.createElement("span"),mxUtils.write(A,mxResources.get("selectionOnly")),aa.appendChild(A));(T.isEnabled()||1<pa)&&W.appendChild(aa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?qa.checked=!0:!T.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ea.checked=!0:sa.checked=!0;T.isSelectionEmpty()||mxEvent.addListener(A,"click",function(){Ea.checked=!Ea.checked});T=document.createElement("div");T.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom=+"8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");T.appendChild(ra);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageView"));T.appendChild(A);mxEvent.addListener(T,"click",function(){ra.checked=!0});W.appendChild(T);T=document.createElement("div");T.style.whiteSpace="nowrap";var ya=document.createElement("input");ya.style.marginBottom="8px";ya.style.marginRight="8px";ya.setAttribute("type","radio");ya.setAttribute("name","printSize");+T.appendChild(ya);A=document.createElement("span");mxUtils.write(A,mxResources.get("crop"));T.appendChild(A);mxEvent.addListener(T,"click",function(){ya.checked=!0});W.appendChild(T);T=document.createElement("div");T.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");A=document.createElement("div");A.style.display="inline-block";A.style.verticalAlign="top";A.style.paddingTop=+"2px";A.appendChild(Ca);T.appendChild(A);aa=document.createElement("table");aa.style.display="inline-block";aa.style.borderSpacing="0";za=document.createElement("tbody");var Ma=document.createElement("tr"),Ha=Ma.cloneNode(!0),Aa=document.createElement("td"),Ra=Aa.cloneNode(!0),Za=Aa.cloneNode(!0),La=Aa.cloneNode(!0),$a=Aa.cloneNode(!0),Da=Aa.cloneNode(!0);Aa.style.textAlign="right";La.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));mxEvent.addListener(T,"click",function(ua){mxEvent.getSource(ua)!=+Ca&&(Ca.checked=!Ca.checked)});var x=document.createElement("input");x.style.margin="0 2px";x.style.boxSizing="border-box";x.setAttribute("value",k.lastPrintSheetsAcross||"1");x.setAttribute("min","1");x.setAttribute("type","number");x.style.width="40px";Ra.appendChild(x);A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsAcross"));Za.appendChild(A);mxUtils.write(La,mxResources.get("fitToBy"));var M=x.cloneNode(!0);M.setAttribute("value",k.lastPrintSheetsDown||"1");$a.appendChild(M);+mxEvent.addListener(x,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(M,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?ya.checked=!0:k.lastPrintFitRadioChecked?Ca.checked=!0:ra.checked=!0;A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsDown"));Da.appendChild(A);Ma.appendChild(Aa);Ma.appendChild(Ra);Ma.appendChild(Za);Ha.appendChild(La);Ha.appendChild($a);Ha.appendChild(Da);za.appendChild(Ma);za.appendChild(Ha);+aa.appendChild(za);T.appendChild(aa);W.appendChild(T);T=document.createElement("div");T.style.borderTop="1px solid lightGray";T.style.whiteSpace="nowrap";T.style.paddingTop="12px";T.style.marginTop="12px";T.style.paddingLeft="8px";mxUtils.write(T,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;+T.appendChild(Q);A=document.createElement("span");A.style.marginLeft="8px";mxUtils.write(A,mxResources.get("zoom")+":");T.appendChild(A);var V=document.createElement("input");V.style.width="60px";V.style.marginLeft="4px";V.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";T.appendChild(V);mxUtils.br(T);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;T.appendChild(ia);A=document.createElement("span");+A.style.marginLeft="4px";A.style.marginRight="8px";mxUtils.write(A,mxResources.get("grid"));T.appendChild(A);mxEvent.addListener(A,"click",function(ua){ia.checked=!0;mxEvent.consume(ua)});var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=J&&(T.appendChild(ka),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("transparentBackground")),T.appendChild(A),+mxEvent.addListener(A,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==J||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(T),T.appendChild(oa),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram")),T.appendChild(A),mxEvent.addListener(A,+"click",function(ua){oa.checked=!0;mxEvent.consume(ua)}));W.appendChild(T);A=document.createElement("div");A.style.marginTop="40px";A.style.textAlign="right";A.style.whiteSpace="nowrap";k.isOffline()||null!=J||A.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));T=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});T.className="geBtn";k.editor.cancelFirst&&A.appendChild(T);PrintDialog.previewEnabled&&null==J&&(aa=mxUtils.button(mxResources.get("preview"),+function(){try{k.hideDialog(),P(!1)}catch(ua){k.handleError(ua)}}),aa.className="geBtn",A.appendChild(aa));aa=mxUtils.button(mxResources.get(null!=J?"export":PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),P(!0)}catch(ua){k.handleError(ua)}});aa.className="geBtn gePrimaryBtn";A.appendChild(aa);k.editor.cancelFirst||A.appendChild(T);W.appendChild(A);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(W.classList.add("geDarkMode"),W.style.colorScheme="dark"):+(W.classList.remove("geDarkMode"),W.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Fa){ua=Fa.getProperty("dialog");W.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=W};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||+(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Y.apply(this,+arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),+this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var la=document.createElement("canvas"),Z=new Image;Z.onload=function(){try{la.getContext("2d").drawImage(Z,0,0);var k=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(A){}};Z.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(k){}Editor.prototype.useCanvasForExport=!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousAdaptiveColors=m.adaptiveColors;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.7";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.9";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};-EditorUi.logError=function(c,f,k,B,z,C,I){if(null!=c){z=null!=z?z:Error(c);z.stack=null!=z.stack?z.stack:"";C=null!=C?C:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>z.stack.indexOf("extension:")&&0>z.stack.indexOf("<anonymous>:")&&-0>z.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+C+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=B?":colno:"+encodeURIComponent(B):"")+(""!=z.stack?"&stack="+encodeURIComponent(z.stack):""))}catch(L){}try{I||null==window.console||console.error(C,c,f,k,B,z)}catch(L){}}};EditorUi.logEvent=-function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(k){}};EditorUi.sendReport=function(c,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,c.length>f&&(c=c.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email",-"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);console.log.apply(console,c)}}catch(k){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");-for(var f=[],k=0;k<c.length;k++)f.push(c[k]);for(k=0;k<f.length;k++)EditorUi.replaceSvgImage(f[k])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var k=EditorUi.getSvgSubtree(f);if(null!=k&&"svg"==k.nodeName){k.setAttribute("x",c.getAttribute("x"));k.setAttribute("y",c.getAttribute("y"));k.setAttribute("width",c.getAttribute("width"));k.setAttribute("height",c.getAttribute("height"));k.style.fontFamily=-"initial";var B=mxUtils.createElementNs(k.ownerDocument,mxConstants.NS_SVG,"g");B.appendChild(k);c.hasAttribute("transform")&&B.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(B,c)}}catch(z){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var k="svg-image-"+Editor.guid();c.setAttribute("id",k);for(var B=document.implementation.createHTMLDocument(""),-z=document.createElement("style"),C=0;C<f.length;C++){z.textContent=f[C].textContent;B.body.appendChild(z);for(var I="",L=0;L<z.sheet.cssRules.length;L++){var K=z.sheet.cssRules[L];if(null!=K.selectorText){for(var O=K.selectorText.split(","),da=0;da<O.length;da++)O[da]="#"+k+" "+O[da];K.selectorText=O.join(",")}I+=K.cssText+"\n"}f[C].textContent=I}}f=c.getElementsByTagName("*");for(k=0;k<f.length;k++)f[k].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';+EditorUi.logError=function(c,f,l,t,z,C,F){if(null!=c){z=null!=z?z:Error(c);z.stack=null!=z.stack?z.stack:"";C=null!=C?C:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>z.stack.indexOf("extension:")&&0>z.stack.indexOf("<anonymous>:")&&+0>z.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+C+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=t?":colno:"+encodeURIComponent(t):"")+(""!=z.stack?"&stack="+encodeURIComponent(z.stack):""))}catch(N){}try{F||null==window.console||console.error(C,c,f,l,t,z)}catch(N){}}};EditorUi.logEvent=+function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(l){}};EditorUi.sendReport=function(c,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,c.length>f&&(c=c.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email",+"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);console.log.apply(console,c)}}catch(l){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");+for(var f=[],l=0;l<c.length;l++)f.push(c[l]);for(l=0;l<f.length;l++)EditorUi.replaceSvgImage(f[l])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(f);if(null!=l&&"svg"==l.nodeName){l.setAttribute("x",c.getAttribute("x"));l.setAttribute("y",c.getAttribute("y"));l.setAttribute("width",c.getAttribute("width"));l.setAttribute("height",c.getAttribute("height"));l.style.fontFamily=+"initial";var t=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");t.appendChild(l);c.hasAttribute("transform")&&t.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(t,c)}}catch(z){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var l="svg-image-"+Editor.guid();c.setAttribute("id",l);for(var t=document.implementation.createHTMLDocument(""),+z=document.createElement("style"),C=0;C<f.length;C++){z.textContent=f[C].textContent;t.body.appendChild(z);for(var F="",N=0;N<z.sheet.cssRules.length;N++){var K=z.sheet.cssRules[N];if(null!=K.selectorText){for(var I=K.selectorText.split(","),ca=0;ca<I.length;ca++)I[ca]="#"+l+" "+I[ca];K.selectorText=I.join(",")}F+=K.cssText+"\n"}f[C].textContent=F}}f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(z){}try{var f=document.createElement("canvas"),-k=new Image;k.onload=function(){try{f.getContext("2d").drawImage(k,0,0);var z=f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=z&&6<z.length}catch(C){}};k.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(z){}try{f=-document.createElement("canvas");f.width=f.height=1;var B=f.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==B.match("image/jpeg");B=f.toDataURL("image/webp");EditorUi.prototype.webpSupported=null!==B.match("image/webp")}catch(z){}})();EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";c.style.overflow="1"==urlParams.embed?"hidden":"";return c};EditorUi.prototype.openLink=function(c,f,k){return this.editor.graph.openLink(c,-f,k)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,f){f(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,f,k){localStorage.setItem(c,f);null!=k&&k()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,f){localStorage.removeItem(c);f()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};+l=new Image;l.onload=function(){try{f.getContext("2d").drawImage(l,0,0);var z=f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=z&&6<z.length}catch(C){}};l.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(z){}try{f=+document.createElement("canvas");f.width=f.height=1;var t=f.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==t.match("image/jpeg");t=f.toDataURL("image/webp");EditorUi.prototype.webpSupported=null!==t.match("image/webp")}catch(z){}})();EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";c.style.overflow="1"==urlParams.embed?"hidden":"";return c};EditorUi.prototype.openLink=function(c,f,l){return this.editor.graph.openLink(c,+f,l)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,f){f(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,f,l){localStorage.setItem(c,f);null!=l&&l()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,f){localStorage.removeItem(c);f()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();f.refresh();f.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=-function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,k){var B=null==c||null==f;k=null!=k?k:24;var z=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,I=z.spin,L=null,K=null,O=mxUtils.bind(this,function(ea){null!=ea&&ea()});z.spin=function(ea,ca,V,ma){ma=null!=ma?ma:C;var la=!1;if(!this.active){var Y=Date.now();null!=V&&(L=window.setTimeout(function(){z.stop();L=null;V({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},ma));I.call(this,ea);this.active=!0;null!=ca&&(B&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/-2-2),la=document.createElement("div"),la.className="geSpinnerStatus",la.style.position="absolute",la.style.whiteSpace="nowrap",la.style.background="#4B4243",la.style.color="white",la.style.fontFamily=Editor.defaultHtmlFont,la.style.fontSize="9pt",la.style.padding="6px",la.style.paddingLeft="10px",la.style.paddingRight="10px",la.style.zIndex=2E9,la.style.left=Math.max(0,c)+"px",la.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(la.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(la.style,-"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(la.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ca.substring(ca.length-3,ca.length)&&"!"!=ca.charAt(ca.length-1)&&(ca+="..."),la.innerHTML=mxUtils.htmlEntities(ca),ea.appendChild(la),z.status=la);this.pause=mxUtils.bind(this,function(){var fa=O;this.active&&(ma=Math.max(0,ma-(Date.now()-Y)),fa=mxUtils.bind(this,function(Z){this.spin(ea,ca,V,ma);if(null!=Z)try{Z(),K=mxUtils.bind(this,function(){this.spin(ea,ca,V,-ma);try{Z()}catch(l){null!=V&&V(l)}})}catch(l){null!=V&&V(l)}}));this.stop();return fa});la=!0}return la};var da=z.stop;z.stop=function(){da.call(this);this.active&&(this.active=!1,null!=L&&(window.clearTimeout(L),L=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return O};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),k=this.editor.extractGraphModel(f.documentElement,!0);return null!=-k&&0==k.getElementsByTagName("parsererror").length}catch(B){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==+function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,l){var t=null==c||null==f;l=null!=l?l:24;var z=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,F=z.spin,N=null,K=null,I=mxUtils.bind(this,function(da){null!=da&&da()});z.spin=function(da,ea,X,ba){ba=null!=ba?ba:C;var ha=!1;if(!this.active){var ma=Date.now();null!=X&&(N=window.setTimeout(function(){z.stop();N=null;X({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},ba));F.call(this,da);this.active=!0;null!=ea&&(t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/+2-2),ha=document.createElement("div"),ha.className="geSpinnerStatus",ha.style.position="absolute",ha.style.whiteSpace="nowrap",ha.style.background="#4B4243",ha.style.color="white",ha.style.fontFamily=Editor.defaultHtmlFont,ha.style.fontSize="9pt",ha.style.padding="6px",ha.style.paddingLeft="10px",ha.style.paddingRight="10px",ha.style.zIndex=2E9,ha.style.left=Math.max(0,c)+"px",ha.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(ha.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(ha.style,+"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ha.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ea.substring(ea.length-3,ea.length)&&"!"!=ea.charAt(ea.length-1)&&(ea+="..."),ha.innerHTML=mxUtils.htmlEntities(ea),da.appendChild(ha),z.status=ha);this.pause=mxUtils.bind(this,function(){var Y=I;this.active&&(ba=Math.max(0,ba-(Date.now()-ma)),Y=mxUtils.bind(this,function(la){this.spin(da,ea,X,ba);if(null!=la)try{la(),K=mxUtils.bind(this,function(){this.spin(da,ea,+X,ba);try{la()}catch(Z){null!=X&&X(Z)}})}catch(Z){null!=X&&X(Z)}}));this.stop();return Y});ha=!0}return ha};var ca=z.stop;z.stop=function(){ca.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return I};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=+l&&0==l.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=-function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=f.getFunction,B=this.editor.graph,z=this;f.getFunction=function(C){if(B.isSelectionEmpty()&&null!=z.pages&&0<z.pages.length){var I=z.getSelectedPageIndex();if(mxEvent.isShiftDown(C)){if(37==C.keyCode)return function(){0<I&&z.movePage(I,I-1)};if(38==C.keyCode)return function(){0<I&&z.movePage(I,0)};if(39==C.keyCode)return function(){I<z.pages.length-1&&z.movePage(I,I+1)};if(40==C.keyCode)return function(){I<-z.pages.length-1&&z.movePage(I,z.pages.length-1)}}else if(mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)){if(37==C.keyCode)return function(){0<I&&z.selectNextPage(!1)};if(38==C.keyCode)return function(){0<I&&z.selectPage(z.pages[0])};if(39==C.keyCode)return function(){I<z.pages.length-1&&z.selectNextPage(!0)};if(40==C.keyCode)return function(){I<z.pages.length-1&&z.selectPage(z.pages[z.pages.length-1])}}}return!(65<=C.keyCode&&90>=C.keyCode)||B.isSelectionEmpty()||mxEvent.isAltDown(C)||-mxEvent.isShiftDown(C)||mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)?k.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var f=e.apply(this,arguments);if(null==f)try{var k=c.indexOf("<mxfile ");if(0<=k){var B=c.lastIndexOf("</mxfile>");B>k&&(f=c.substring(k,B+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var z=mxUtils.parseXml(c),-C=this.editor.extractGraphModel(z.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=C?mxUtils.getXml(C):""}}catch(I){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",-f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var k=null!=c?this.editor.extractGraphModel(c,!0):null;null!=k&&(c=k);if(null!=c){k=this.editor.graph;k.model.beginUpdate();try{var B=null!=this.pages?this.pages.slice():null,z=c.getElementsByTagName("diagram");if(1<z.length||1==z.length&&z[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var C=z.length-1;0<=C;C--){var I=this.updatePageRoot(new DiagramPage(z[C]));null==-I.getName()&&I.setName(mxResources.get("pageWithNumber",[C+1]));k.model.execute(new ChangePage(this,I,0==C?I:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,-k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=B)for(C=0;C<B.length;C++)k.model.execute(new ChangePage(this,B[C],null));var L=this.getCurrentFile();null!=L&&L.fileReplaced(f)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;da=null!=da?da:!Editor.defaultCompressed;var V=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var ma=-"_blank";else V=ma=B;if(null==c)return"";var la=c;if("mxfile"!=la.nodeName.toLowerCase()){if(da){var Y=c.ownerDocument.createElement("diagram");Y.setAttribute("name",mxResources.get("pageWithNumber",[1]));Y.setAttribute("id",Editor.guid());Y.appendChild(c)}else{Y=Graph.zapGremlins(mxUtils.getXml(c));la=Graph.compress(Y);if(Graph.decompress(la)!=Y)return Y;Y=c.ownerDocument.createElement("diagram");Y.setAttribute("name",mxResources.get("pageWithNumber",[1]));Y.setAttribute("id",Editor.guid());mxUtils.setTextContent(Y,-la)}la=c.ownerDocument.createElement("mxfile");la.appendChild(Y)}O?(la=la.cloneNode(!0),la.removeAttribute("modified"),la.removeAttribute("host"),la.removeAttribute("agent"),la.removeAttribute("etag"),la.removeAttribute("userAgent"),la.removeAttribute("version"),la.removeAttribute("editor"),la.removeAttribute("type")):(la.removeAttribute("userAgent"),la.removeAttribute("modified"),la.removeAttribute("version"),la.removeAttribute("editor"),la.removeAttribute("pages"),la.removeAttribute("type"),la.removeAttribute("etag"),-mxClient.IS_CHROMEAPP?la.setAttribute("host","Chrome"):EditorUi.isElectronApp?la.setAttribute("host","Electron"):la.setAttribute("host",window.location.hostname),la.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),la.setAttribute("version",EditorUi.VERSION),1<la.getElementsByTagName("diagram").length&&null!=this.pages&&la.setAttribute("pages",this.pages.length));null!=ea&&(la=la.cloneNode(!0),la.setAttribute("scale",ea));null!=ca&&(la=la.cloneNode(!0),la.setAttribute("border",-ca));c=da?mxUtils.getPrettyXml(la):mxUtils.getXml(la);if(!C&&!z&&(I||null!=k&&/(\.html)$/i.test(k.getTitle())))c=this.getHtml2(mxUtils.getXml(la),f,null!=k?k.getTitle():null,ma,V);else if(C||!z&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(B=null),k=this.getSvgFileProperties(la),c=this.getEmbeddedSvg(c,f,B,null,L,K,V,null,null,k.scale,k.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,k,B){c=-null!=c?c:!0;f=null!=f?f:!1;k=null!=k?k:!Editor.defaultCompressed;var z=this.editor.getGraphXml(c,B);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(K){var O=K.getElementsByTagName("mxGraphModel"),da=0<O.length?O[0]:null;O=K;null==da&&k?(da=mxUtils.getNodeValue(K),0<da.length&&(da=Graph.decompress(da),null!=da&&0<da.length&&(O=K.cloneNode(!1),O.appendChild(mxUtils.parseXml(da).documentElement)))):null==da||k?O=K.cloneNode(!0):(O=K.cloneNode(!1),mxUtils.setTextContent(O,Graph.compressNode(da)));-z.appendChild(O)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(z),z=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],I=C.node;if(C!=this.currentPage)if(C.needsUpdate){var L=new mxCodec(mxUtils.createXmlDocument());L=L.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,L,null,B);EditorUi.removeChildNodes(I);I.appendChild(L);delete C.needsUpdate}else B&&(this.updatePageRoot(C),-null!=C.viewState.backgroundImage&&(null!=C.viewState.backgroundImage.originalSrc?C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.originalSrc,C):Graph.isPageLink(C.viewState.backgroundImage.src)&&(C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.src,C))),null!=C.viewState.backgroundImage&&null!=C.viewState.backgroundImage.originalSrc&&(L=new mxCodec(mxUtils.createXmlDocument()),L=L.encode(new mxGraphModel(C.root)),this.editor.graph.saveViewState(C.viewState,-L,null,B),I=I.cloneNode(!1),I.appendChild(L)));c(I)}return z};EditorUi.prototype.anonymizeString=function(c,f){for(var k=[],B=0;B<c.length;B++){var z=c.charAt(B);0<=EditorUi.ignoredAnonymizedChars.indexOf(z)?k.push(z):isNaN(parseInt(z))?z.toLowerCase()!=z?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):z.toUpperCase()!=z?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(z)?k.push(" "):k.push("?"):k.push(f?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=-function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var k=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));c[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(k)}catch(C){c[EditorUi.DIFF_INSERT][f].data=C.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var B in c[EditorUi.DIFF_UPDATE]){var z=c[EditorUi.DIFF_UPDATE][B];null!=z.name&&-(z.name=this.anonymizeString(z.name));null!=z.cells&&(f=mxUtils.bind(this,function(C){var I=z.cells[C];if(null!=I){for(var L in I)null!=I[L].value&&(I[L].value="["+I[L].value.length+"]"),null!=I[L].xmlValue&&(I[L].xmlValue="["+I[L].xmlValue.length+"]"),null!=I[L].style&&(I[L].style="["+I[L].style.length+"]"),mxUtils.isEmptyObject(I[L])&&delete I[L];mxUtils.isEmptyObject(I)&&delete z.cells[C]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(z.cells)&&delete z.cells);mxUtils.isEmptyObject(z)&&-delete c[EditorUi.DIFF_UPDATE][B]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var k=0;k<c.attributes.length;k++)"as"!=c.attributes[k].name&&c.setAttribute(c.attributes[k].name,this.anonymizeString(c.attributes[k].value,f));if(null!=c.childNodes)for(k=0;k<c.childNodes.length;k++)this.anonymizeAttributes(c.childNodes[k],f)};EditorUi.prototype.anonymizeNode=function(c,f){f=c.getElementsByTagName("mxCell");-for(var k=0;k<f.length;k++)null!=f[k].getAttribute("value")&&f[k].setAttribute("value","["+f[k].getAttribute("value").length+"]"),null!=f[k].getAttribute("xmlValue")&&f[k].setAttribute("xmlValue","["+f[k].getAttribute("xmlValue").length+"]"),null!=f[k].getAttribute("style")&&f[k].setAttribute("style","["+f[k].getAttribute("style").length+"]"),null!=f[k].parentNode&&"root"!=f[k].parentNode.nodeName&&null!=f[k].parentNode.parentNode&&(f[k].setAttribute("id",f[k].parentNode.getAttribute("id")),f[k].parentNode.parentNode.replaceChild(f[k],-f[k].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){this.spinner.stop();-f.handleFileError(k,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){f.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca){z=null!=z?z:!0;C=null!=C?C:!1;O=null!=O?O:!Editor.defaultCompressed;var V=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var ma=V.getGlobalVariable;V=this.createTemporaryGraph(V.getStylesheet());-V.setBackgroundImage=this.editor.graph.setBackgroundImage;V.background=this.editor.graph.background;var la=null!=this.pages?this.pages[0]:null;null==la||this.currentPage==la?V.setBackgroundImage(this.editor.graph.backgroundImage):null!=la.viewState&&null!=la.viewState&&V.setBackgroundImage(la.viewState.backgroundImage);V.getGlobalVariable=function(Y){return"page"==Y&&null!=la?la.getName():"pagenumber"==Y?1:ma.apply(this,arguments)};document.body.appendChild(V.container);null!=la&&V.model.setRoot(la.root)}I=-null!=I?I:this.getXmlFileData(z,C,O,da);K=null!=K?K:this.getCurrentFile();c=this.createFileData(I,V,K,window.location.href,c,f,k,B,z,L,O,ea,ca);V!=this.editor.graph&&V.container.parentNode.removeChild(V.container);return c};EditorUi.prototype.getHtml=function(c,f,k,B,z,C){C=null!=C?C:!0;var I=null,L=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){I=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var K=f.view.scale;C=Math.floor(I.x/K-f.view.translate.x);K=Math.floor(I.y/K-f.view.translate.y);-I=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(L=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",C);c.setAttribute("y0",K)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=B&&c.setAttribute("edit",B));null!=z&&(z=z.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";B=Graph.compress(c);Graph.decompress(B)!=c&&(B=encodeURIComponent(c));-return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"+(null==z&&null!=I&&I!=mxConstants.NONE?' style="background-color:'+I+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+-B+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+L+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,f,k,B,z){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=z&&(z=z.replace(/&/g,"&"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,-resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+-z+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>\n'+(null==z?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=-function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,k=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[f],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),-k={},0<c.length)){var B=this.getHashObject(),z=null;this.fileNode=f;this.pages=[];for(var C=0;C<c.length;C++){null==c[C].getAttribute("id")&&c[C].setAttribute("id",C);f=new DiagramPage(c[C]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[C+1]));this.pages.push(f);if(null==B.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||null!=B.pageId&&f.getId()==B.pageId)z=f;if(null==k[f.getId()])k[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=-null!=z?z:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),-this.scrollToPage());if(null!=urlParams["layer-ids"])try{var I=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(C=0;C<I.length;C++)f[I[C]]=!0;var L=this.editor.graph.getModel(),K=L.getChildren(L.root);for(C=0;C<K.length;C++){var O=K[C];L.setVisible(O,f[O.id]||!1)}}catch(da){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=-f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V,ma,la){try{B=null!=B?B:this.editor.graph.isSelectionEmpty();var Y=this.getBaseFilename(!z),fa=Y+("xml"==c||"pdf"==c&&da?".drawio":"")+-"."+c;if("xml"==c){var Z=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,B,z,null,null,null,f);this.saveData(fa,c,Z,"text/xml")}else if("html"==c)Z=this.getHtml2(this.getFileData(!0),this.editor.graph,Y),this.saveData(fa,c,Z,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?fa=Y+".png":"jpeg"==c&&(fa=Y+".jpg"),this.saveRequest(fa,c,mxUtils.bind(this,function(J,W){try{return this.createDownloadRequest(J,c,B,W,I,z,L,K,O,-da,ea,void 0,void 0,!C,ca,V,ma,la)}catch(aa){this.handleError(aa)}}));else{var l=null,u=mxUtils.bind(this,function(J){J.length<=MAX_REQUEST_SIZE?this.saveData(fa,"svg",J,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(l)}))});if("svg"==c){var H=this.editor.graph.background;if(I||H==mxConstants.NONE)H=null;var U=this.editor.graph.getSvg(H,null,null,null,null,B);k&&this.editor.graph.addSvgShadow(U);this.editor.convertImages(U,-mxUtils.bind(this,mxUtils.bind(this,function(J){this.spinner.stop();u(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(J))})))}else fa=Y+".svg",l=this.getFileData(!1,!0,null,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}),B)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V,ma,la,Y,fa){c=this.downloadRequestBuilder(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V,ma,la,Y,fa);f="";for(var Z in c)k=c[Z],null!=k&&(f+=Z+"="+encodeURIComponent(k)+-"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V,ma,la,Y,fa){var Z=this.editor.graph,l=Z.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var u=null,H=null,U=null;if(!EditorUi.isElectronApp&&(l.width*l.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};O=O?"1":"0";"pdf"==f&&(null!=da?(u=da.from,H=da.to):-0==C&&(U="1"));"xmlpng"==f&&(O="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){u=C;break}C=Z.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;z={globalVars:Z.getExportVariables()};K&&(z.grid={size:Z.gridSize,steps:Z.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:Z.view.gridColor});Graph.translateDiagram&&-(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:u,to:H,allPages:U,bg:null!=C?C:mxConstants.NONE,base64:B,embedXml:O,xml:k,filename:null!=c?c:"",extras:JSON.stringify(z),scale:I,border:L,pageMargin:ma,w:ea&&isFinite(ea)?ea:null,h:ca&&isFinite(ca)?ca:null,crop:null!=V&&V?"1":"0",fit:null!=la&&la?"1":"0",sheetsAcross:Y,sheetsDown:fa}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));-if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var k=c.lastIndexOf("#");if(0<k){c=decodeURIComponent(c.substring(k+1));try{f=JSON.parse(c)}catch(B){}}}return f};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};-EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var k=f.lastIndexOf("#");0<k&&(f=f.substring(0,k));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(B){}0<k&&0<f.lastIndexOf("#")?window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,k){var B=window.location.hash,z=mxUtils.bind(this,function(I){var L=null!=c.data?c.data:"";null!=I&&0<I.length&&-(0<L.length&&(L+="\n"),L+=I);I=new LocalFile(this,"csv"!=c.format&&0<L.length?L:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);I.getHash=function(){return B};this.fileLoaded(I);"csv"==c.format&&this.importCsv(L,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,O=null,da=mxUtils.bind(this,function(){var ca=-this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(V){ca===this.currentPage&&(200<=V.getStatus()&&300>=V.getStatus()?(this.updateDiagram(V.getText()),ea()):this.handleError({message:mxResources.get("error")+" "+V.getStatus()}))}),mxUtils.bind(this,function(V){this.handleError(V)}))}),ea=mxUtils.bind(this,function(){window.clearTimeout(O);O=window.setTimeout(da,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,-function(){ea();da()}));ea();da()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(I){z(I)}),mxUtils.bind(this,function(I){null!=k&&k(I)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(l){var u=new mxCellOverlay(l.image||z.warningImage,l.tooltip,l.align,l.valign,l.offset);u.addListener(mxEvent.CLICK,function(H,U){B.alert(l.tooltip)});return u}var k=null,B=this;if(null!=c&&0<c.length&&(k=mxUtils.parseXml(c),-c=null!=k?k.documentElement:null,null!=c&&"updates"==c.nodeName)){var z=this.editor.graph,C=z.getModel();C.beginUpdate();var I=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var L=C.getCell(c.getAttribute("id"));if(null!=L){try{var K=c.getAttribute("value");if(null!=K){var O=mxUtils.parseXml(K).documentElement;if(null!=O)if("1"==O.getAttribute("replace-value"))C.setValue(L,O);else for(var da=O.attributes,ea=0;ea<da.length;ea++)z.setAttributeForCell(L,da[ea].nodeName,0<da[ea].nodeValue.length?-da[ea].nodeValue:null)}}catch(l){null!=window.console&&console.log("Error in value for "+L.id+": "+l)}try{var ca=c.getAttribute("style");null!=ca&&z.model.setStyle(L,ca)}catch(l){null!=window.console&&console.log("Error in style for "+L.id+": "+l)}try{var V=c.getAttribute("icon");if(null!=V){var ma=0<V.length?JSON.parse(V):null;null!=ma&&ma.append||z.removeCellOverlays(L);null!=ma&&z.addCellOverlay(L,f(ma))}}catch(l){null!=window.console&&console.log("Error in icon for "+L.id+": "+l)}try{var la=c.getAttribute("geometry");-if(null!=la){la=JSON.parse(la);var Y=z.getCellGeometry(L);if(null!=Y){Y=Y.clone();for(key in la){var fa=parseFloat(la[key]);"dx"==key?Y.x+=fa:"dy"==key?Y.y+=fa:"dw"==key?Y.width+=fa:"dh"==key?Y.height+=fa:Y[key]=parseFloat(la[key])}z.model.setGeometry(L,Y)}}}catch(l){null!=window.console&&console.log("Error in icon for "+L.id+": "+l)}}}else if("model"==c.nodeName){for(var Z=c.firstChild;null!=Z&&Z.nodeType!=mxConstants.NODETYPE_ELEMENT;)Z=Z.nextSibling;null!=Z&&(new mxCodec(c.firstChild)).decode(Z,-C)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(z.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(I=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{C.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return k};EditorUi.prototype.getCopyFilename=function(c,-f){var k=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var B=k.lastIndexOf(".");0<=B&&(c=k.substring(B),k=k.substring(0,B));if(f){f=k;var z=new Date;k=z.getFullYear();B=z.getMonth()+1;var C=z.getDate(),I=z.getHours(),L=z.getMinutes();z=z.getSeconds();k=f+(" "+(k+"-"+B+"-"+C+"-"+I+"-"+L+"-"+z))}return k=mxResources.get("copyOf",[k])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",[c])}catch(k){}};EditorUi.prototype.fileLoaded=function(c,-f,k){var B=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var z=!1;this.hideDialog();null!=B&&(B.removeListener(this.descriptorChangedListener),this.logIfModified(B,!0),B.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var C=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=B&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);-!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",-this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.editor.setStatus(""):this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>");!this.editor.isChromelessView()||-this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=k&&k();this.editor.fireEvent(new mxEventObject("fileLoaded"));z=!0;if(!this.isOffline()&&null!=c.getMode()){var I="1"==urlParams.sketch?"sketch":uiTheme;if(null==I)I="default";else if("sketch"==I||"min"==I)I+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",-[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(L){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(L){}}catch(L){this.fileLoadedError=L;if(null!=c)try{c.close()}catch(K){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,-mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=B?this.fileLoaded(B)||C():C()});f?c():(null!=L.fallbackFileData&&(L.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var K=new LocalFile(this,L.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(K)})}),this.handleError(L,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else C();return z};EditorUi.prototype.getHashValueForPages=function(c,f){var k=-0,B=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var C=0;C<c.length;C++){this.updatePageRoot(c[C]);var I=c[C].node.cloneNode(!1);I.removeAttribute("name");B.root=c[C].root;var L=z.encode(B);this.editor.graph.saveViewState(c[C].viewState,L,!0);L.removeAttribute("pageWidth");L.removeAttribute("pageHeight");I.appendChild(L);null!=f&&(f.eltCount+=I.getElementsByTagName("*").length,f.nodeCount+=I.getElementsByTagName("mxCell").length);k=(k<<5)-k+-this.hashValue(I,function(K,O,da,ea){return!ea||"mxGeometry"!=K.nodeName&&"mxPoint"!=K.nodeName||"x"!=O&&"y"!=O&&"width"!=O&&"height"!=O?ea&&"mxCell"==K.nodeName&&"previous"==O?null:da:Math.round(da)},f)<<0}return k};EditorUi.prototype.hashValue=function(c,f,k){var B=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(B^=this.hashValue(c.nodeName,f,k));if(null!=c.attributes){null!=k&&(k.attrCount+=c.attributes.length);-for(var z=0;z<c.attributes.length;z++){var C=c.attributes[z].name,I=null!=f?f(c,C,c.attributes[z].value,!0):c.attributes[z].value;null!=I&&(B^=this.hashValue(C,f,k)+this.hashValue(I,f,k))}}if(null!=c.childNodes)for(z=0;z<c.childNodes.length;z++)B=(B<<5)-B+this.hashValue(c.childNodes[z],f,k)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=k&&(k.byteCount+=c.length);for(z=0;z<c.length;z++)f=(f<<5)-f+c.charCodeAt(z)<<0;B^=f}return B};EditorUi.prototype.descriptorChanged=function(){};-EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,k,B,z,C,I){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};-EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var k=f.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(c,null,2));f.appendChild(k);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),-".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var k=0;k<f.length;k++)f[k].parentNode.removeChild(f[k]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,f){var k=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));-c=null!=c?c:k.firstChild.nextSibling.nextSibling;f=k.lastChild;var B=f.previousSibling;k.insertBefore(f,c);k.insertBefore(B,f)}};EditorUi.prototype.loadLibrary=function(c,f){var k=mxUtils.parseXml(c.getData());if("mxlibrary"==k.documentElement.nodeName){var B=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(c,B,k.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=-function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,f,k,B){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var z=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var C=0;C<this.openLibraries.length;C++)if(this.openLibraries[C].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[C],-this.openLibraries);break}z={file:c,images:f,title:k,expand:B};this.openLibraries.push(z)}else this.scratchpad=c;C=this.sidebar.palettes[c.getHash()];C=null!=C?C[C.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var I=null,L=mxUtils.bind(this,function(fa,Z){0==fa.length&&c.isEditable()?(null==I&&(I=document.createElement("div"),I.className="geDropTarget",mxUtils.write(I,mxResources.get("dragElementsHere"))),Z.appendChild(I)):this.addLibraryEntries(fa,Z)});null!=this.sidebar&&null!=-f&&this.sidebar.addEntries(f);null==k&&(k=c.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var K=this.sidebar.addPalette(c.getHash(),k,null!=B?B:!0,mxUtils.bind(this,function(fa){L(f,fa)}));null!=z&&(z.div=K);this.repositionLibrary(C,"L.scratchpad"!=c.getHash());B=K.parentNode.previousSibling;k=B.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=c.title&&B.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+k);var O=document.createElement("div");O.style.backgroundColor=-"inherit";B.style.position="relative";var da=document.createElement("img");da.className="geAdaptiveAsset";da.setAttribute("src",Editor.crossImage);da.setAttribute("title",mxResources.get("close"));da.setAttribute("valign","absmiddle");da.setAttribute("border","0");da.style.position="relative";da.style.top="2px";da.style.width="14px";da.style.cursor="pointer";da.style.margin="0 3px";var ea=null;if(".scratchpad"!=c.title||this.closableScratchpad)O.appendChild(da),mxEvent.addListener(da,"click",mxUtils.bind(this,-function(fa){if(!mxEvent.isConsumed(fa)){var Z=mxUtils.bind(this,function(){null!=z&&mxUtils.remove(z,this.openLibraries);this.closeLibrary(c)});null!=ea?this.confirm(mxResources.get("allChangesLost"),null,Z,mxResources.get("cancel"),mxResources.get("discardChanges")):Z();mxEvent.consume(fa)}}));if(c.isEditable()){var ca=this.editor.graph,V=null;k=mxUtils.bind(this,function(fa){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(fa)});var ma=mxUtils.bind(this,function(fa){c.setModified(!0);-c.isAutosave()?(null!=V&&null!=V.parentNode&&V.parentNode.removeChild(V),V=da.cloneNode(!1),V.setAttribute("src",Editor.spinImage),V.setAttribute("title",mxResources.get("saving")),V.style.cursor="default",V.style.marginRight="2px",V.style.marginTop="-2px",O.insertBefore(V,O.firstChild),this.saveLibrary(c.getTitle(),f,c,c.getMode(),!0,!0,function(){null!=V&&null!=V.parentNode&&V.parentNode.removeChild(V)})):null==ea&&(ea=da.cloneNode(!1),ea.setAttribute("src",Editor.saveImage),ea.setAttribute("title",-mxResources.get("save")),O.insertBefore(ea,O.firstChild),mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Z){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ea||c.isModified()||(ea.parentNode.removeChild(ea),ea=null)});mxEvent.consume(Z)})))}),la=mxUtils.bind(this,function(fa,Z,l,u){fa=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(fa)));for(var H=0;H<fa.length;H++){var U=ca.getCellGeometry(fa[H]);null!=U&&U.translate(-Z.x,-Z.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(fa,-Z.width,Z.height,u||"",!0,null,!1));fa=mxUtils.getXml(this.editor.graph.encodeCells(fa));Editor.defaultCompressed&&(fa=Graph.compress(fa));Z={xml:fa,w:Z.width,h:Z.height};null!=u&&(Z.title=u);f.push(Z);ma(l);null!=I&&null!=I.parentNode&&0<f.length&&(I.parentNode.removeChild(I),I=null)}),Y=mxUtils.bind(this,function(fa){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(fa),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),-mxResources.get("ok"));else{var Z=ca.getSelectionCells(),l=ca.view.getBounds(Z);if(null!=l&&0<l.width&&0<l.height){var u=ca.view.scale;l.x/=u;l.y/=u;l.width/=u;l.height/=u;l.x-=ca.view.translate.x;l.y-=ca.view.translate.y;la(Z,l)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(fa)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(fa){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),-null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="light-dark(#fefefe, #000000)",K.style.cursor="copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(fa))}),mxUtils.bind(this,function(fa){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,Y(fa),mxEvent.consume(fa))}));-mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(fa){ca.isMouseDown&&null!=ca.graphHandler.first&&(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(fa){K.style.backgroundColor="light-dark(#fefefe, #000000)";fa.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();-fa.stopPropagation();fa.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(fa){K.style.cursor="";K.style.backgroundColor="";0<fa.dataTransfer.files.length&&this.importFiles(fa.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(Z,l,u,H,U,J,W,aa,ba){if(null!=Z&&"image/"==l.substring(0,6))Z="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Z),Z=[new mxCell("",new mxGeometry(0,0,U,J),Z)],Z[0].vertex=-!0,la(Z,new mxRectangle(0,0,U,J),fa,mxEvent.isAltDown(fa)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),null!=I&&null!=I.parentNode&&0<f.length&&(I.parentNode.removeChild(I),I=null);else{var ja=!1,oa=mxUtils.bind(this,function(qa,ra){null!=qa&&"application/pdf"==ra&&(ra=Editor.extractGraphModelFromPdf(qa),null!=ra&&0<ra.length&&(qa=ra));if(null!=qa)if(qa=mxUtils.parseXml(qa),"mxlibrary"==qa.documentElement.nodeName)try{var ua=JSON.parse(mxUtils.getTextContent(qa.documentElement));L(ua,-K);f=f.concat(ua);ma(fa);this.spinner.stop();ja=!0}catch(La){}else if("mxfile"==qa.documentElement.nodeName)try{var za=qa.documentElement.getElementsByTagName("diagram");for(ua=0;ua<za.length;ua++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(za[ua])),Ca=this.editor.graph.getBoundingBoxFromGeometry(Ba);null!=Ca&&la(Ba,new mxRectangle(0,0,Ca.width,Ca.height),fa)}ja=!0}catch(La){null!=window.console&&console.log("error in drop handler:",La)}ja||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));-null!=I&&null!=I.parentNode&&0<f.length&&(I.parentNode.removeChild(I),I=null)});null!=ba&&null!=W&&EditorUi.isVisioFilename(W)?this.importVisio(ba,function(qa){oa(qa,"text/xml")},null,W):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(Z,W)&&null!=ba?this.isExternalDataComms()?this.parseFile(ba,mxUtils.bind(this,function(qa){4==qa.readyState&&(this.spinner.stop(),200<=qa.status&&299>=qa.status?oa(qa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==qa.status?"drawingTooLarge":-"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):oa(Z,l)}}));fa.stopPropagation();fa.preventDefault()})),mxEvent.addListener(K,"dragleave",function(fa){K.style.cursor="";K.style.backgroundColor="";fa.stopPropagation();fa.preventDefault()}));da=da.cloneNode(!1);da.setAttribute("src",Editor.editImage);da.setAttribute("title",mxResources.get("edit"));O.insertBefore(da,O.firstChild);mxEvent.addListener(da,-"click",k);k=da.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));O.insertBefore(k,O.firstChild);mxEvent.addListener(k,"click",Y);".scratchpad"==c.title&&(this.addSelectionToScratchpad=Y);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(k=this.createHelpIcon(EditorUi.scratchpadHelpLink),C=k.getElementsByTagName("img")[0],k.style.marginRight="1px",C.style.marginTop="-2px",C.style.opacity="",O.insertBefore(k,O.firstChild))}B.appendChild(O);-this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var k=0;k<c.length;k++)try{var B=c[k],z=B.data;if(null!=z){z="data:"==z.substring(0,5)?this.convertDataUri(z):z;var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==B.aspect&&(C+="aspect=fixed;");C=C+"image="+z+";";null!=B.style&&(C+=B.style);f.appendChild(this.sidebar.createVertexTemplate(C,B.w,B.h,"",B.title||"",!1,null,!0))}else if(null!=B.xml){var I=-this.stringToCells("<"==B.xml.charAt(0)?B.xml:Graph.decompress(B.xml)),L=0==I.length?mxResources.get("drawingEmpty"):null!=B.title?B.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(I,B.w,B.h,L,!0,null,!0))}}catch(K){L=null!=K.message?mxResources.get("error")+": "+K.message:String(K),C=this.sidebar.createVertexTemplateFromCells(null,B.w,B.h,L,!0,null,!0),f.appendChild(C)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=-0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=-41,EditorUi.prototype.toolbarHeight=38);"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,k,B,z,C,I){c=new ImageDialog(this,c,f,k,B,z,C,I);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,k,B,z,C){var I=localStorage.getItem(f);c=new TextareaDialog(this,-c,null!=I?JSON.stringify(JSON.parse(I),null,2):"",mxUtils.bind(this,function(L){if(null!=L)try{if(null!=C&&C(L),L==I)this.hideDialog();else{if(0<L.length){var K=JSON.parse(L);localStorage.setItem(f,JSON.stringify(K))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(O){this.handleError(O)}}),null,mxResources.get("close"),null,null,null,!0,null,null,z,k,B);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=-function(c,f,k,B){c=null!=c?c:mxUtils.bind(this,function(z,C,I,L){C||(z=new ChangePageSetup(this,B?I:null,z),z.ignoreColor=!B,null!=L&&B&&(z.shadowVisible=L),this.editor.graph.model.execute(z))});c=new BackgroundImageDialog(this,c,f,k,B);this.showDialog(c.container,400,B?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,k,B,z){c=new LibraryDialog(this,c,f,k,B,z);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&-this.showSplash()}));c.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,k,B,z,C,I){var L=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&-null!=c.message)try{I||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!I||null==window.console||console.error("EditorUi.handleError:",c)}catch(ca){}if(null!=K||null!=f){I=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var O=mxResources.get("ok"),da=null;f=null!=f?f:mxResources.get("error");if(null!=K){null!=K.retry&&(O=mxResources.get("cancel"),da=function(){L();K.retry()});if(404==K.code||-404==K.status||403==K.code){I=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ea=null!=z?null:null!=C?C:window.location.hash;if(null!=ea&&("#G"==ea.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ea.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&-0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==K.code||404==K.status)){ea="#U"==ea.substring(0,2)?ea.substring(45,ea.lastIndexOf("%26ex")):ea.substring(2);this.showError(f,I,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ea);null!=B&&B()}),da,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){Y.innerText=-"";for(var fa=0;fa<V.length;fa++){var Z=document.createElement("option");mxUtils.write(Z,V[fa].displayName);Z.value=fa;Y.appendChild(Z);Z=document.createElement("option");Z.innerHTML=" ";mxUtils.write(Z,"<"+V[fa].email+">");Z.setAttribute("disabled","disabled");Y.appendChild(Z)}Z=document.createElement("option");mxUtils.write(Z,mxResources.get("addAccount"));Z.value=V.length;Y.appendChild(Z)}var V=this.drive.getUsersList(),ma=document.createElement("div"),la=document.createElement("div");-la.style.marginBottom="6px";mxUtils.write(la,mxResources.get("changeUser")+": ");ma.appendChild(la);var Y=document.createElement("select");Y.style.width="100%";ca();mxEvent.addListener(Y,"change",mxUtils.bind(this,function(){var fa=Y.value,Z=V.length!=fa;Z&&this.drive.setUser(V[fa]);this.drive.authorize(Z,mxUtils.bind(this,function(){Z||(V=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(l){this.handleError(l)}),!0)}));ma.appendChild(Y);ma=new CustomDialog(this,ma,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),-!0)}));this.showDialog(ma.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),520,150);return}}null!=K.message?I=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,!1):mxUtils.htmlEntities(K.message,!1):null!=K.response&&null!=K.response.error?I=mxUtils.htmlEntities(K.response.error,!1):"undefined"!==typeof window.App&&(K.code==App.ERROR_TIMEOUT?I=mxUtils.htmlEntities(mxResources.get("timeout"),!1):K.code==App.ERROR_BUSY?I=mxUtils.htmlEntities(mxResources.get("busy"),-!1):"string"===typeof K&&0<K.length&&(I=mxUtils.htmlEntities(K,!1)))}z=c=null;null!=K&&null!=K.helpLink?(c=mxResources.get("help"),z=mxUtils.bind(this,function(){return this.editor.graph.openLink(K.helpLink)})):null!=K&&null!=K.ownerEmail?(c=mxResources.get("contactOwner"),I+=mxUtils.htmlEntities(" ("+c+": "+K.ownerEmail+")",!1),z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(c=K.alternateAction.label,z=K.alternateAction.funct);-this.showError(f,I,O,k,da,null,null,c,z,null,null,null,B?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(c,f,k){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,k||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,k,B,z,C){c=null!=c?c:"";var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},L=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){I();null!=f&&f()},function(){I();-null!=k&&k()},B,z,null,null,null,null,L);this.showDialog(c.container,340,46+L,!0,C);c.init()};EditorUi.prototype.showBanner=function(c,f,k,B,z,C,I,L,K){var O=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){C=null!=C?C:"bottom:10px;left:50%;";I=null!=I?I:"translate(-50%,120%)";L=null!=L?L:"translate(-50%,0%)";var da=z?500:1E3;O=z?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";-var ea=document.createElement("div");ea.style.cssText="position:absolute;"+C+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+O;mxUtils.setPrefixedStyle(ea.style,"transform",I);mxUtils.setPrefixedStyle(ea.style,"transition","all "+da+"ms ease");ea.className="geBtn gePrimaryBtn"+(z?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(ea.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(ea.style,"transform-origin",-K);if(!z){var ca=document.createElement("img");ca.setAttribute("src",IMAGE_PATH+"/logo.png");ca.setAttribute("border","0");ca.setAttribute("align","absmiddle");ca.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";ea.appendChild(ca);ca=document.createElement("img");ca.setAttribute("src",Dialog.prototype.closeImage);ca.setAttribute("title",mxResources.get(B?"doNotShowAgain":"close"));ca.setAttribute("border","0");ca.style.cssText=(z?"right:6px;top:9px;":"right:10px;top:12px;")+-"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";ea.appendChild(ca)}mxUtils.write(ea,f);document.body.appendChild(ea);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var V=document.createElement("input");V.setAttribute("type","checkbox");V.setAttribute("id","geDoNotShowAgainCheckbox");V.style.marginRight="6px";if(!B){f.appendChild(V);-var ma=document.createElement("label");ma.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ma,mxResources.get("doNotShowAgain"));f.appendChild(ma);ea.style.paddingBottom=z?"16px":"30px";ea.appendChild(f)}var la=mxUtils.bind(this,function(){null!=ea.parentNode&&(ea.parentNode.removeChild(ea),this.bannerShowing=!1,V.checked||B)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ca&&mxEvent.addListener(ca,-"click",mxUtils.bind(this,function(fa){mxEvent.consume(fa);la()}));var Y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",I);window.setTimeout(mxUtils.bind(this,function(){la()}),da)});mxEvent.addListener(ea,"click",mxUtils.bind(this,function(fa){var Z=mxEvent.getSource(fa);Z!=V&&Z!=ma?(null!=k&&k(),la(),mxEvent.consume(fa)):Y()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",L)}),da/2);window.setTimeout(Y,z?4E3:3E4);O=!0}return O};-EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,k,B){c=c.toDataURL("image/"+k);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<B&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",B));else throw{message:mxResources.get("unknownError")};-return c};EditorUi.prototype.saveCanvas=function(c,f,k,B,z){var C="jpeg"==k?"jpg":k;B=this.getBaseFilename(B)+(null!=f?".drawio":"")+"."+C;c=this.createImageDataUri(c,f,k,z);this.saveData(B,C,c.substring(c.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||-mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,k,B,z,C){"text/xml"!=k||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=C?C:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=B?this.base64ToBlob(c,-k):new Blob([c],{type:k}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(c,!0):(k.document.write(c),k.document.close(),k.document.execCommand("SaveAs",!0,f),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,k,B);else{var I=document.createElement("a");C=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&-"undefined"!==typeof I.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var L=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);C=65==(L?parseInt(L[2],10):!1)?!1:C}if(C||this.isOffline()){I.href=URL.createObjectURL(B?this.base64ToBlob(c,k):new Blob([c],{type:k}));C?I.download=f:I.setAttribute("target","_blank");document.body.appendChild(I);try{window.setTimeout(function(){URL.revokeObjectURL(I.href)},2E4),I.click(),I.parentNode.removeChild(I)}catch(K){}}else this.createEchoRequest(c,f,k,-B,z).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,k,B,z,C){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=k?"&mime="+k:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(B?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,k,B,z,C,I,L){C=null!=C?C:!1;I=null!=I?I:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(da,ea,ca,V){try{if("_blank"==-ea)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(c,k,B);else if(null!=k&&"text/html"==k.substring(0,9)){var ma=new EmbedDialog(this,c);this.showDialog(ma.container,450,240,!0,!0);ma.init()}else{var la=window.open("about:blank");null==la?mxUtils.popup(c,!0):(la.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),la.document.close())}else if(ea==App.MODE_DEVICE||"download"==ea)this.doSaveLocalFile(c,da,k,B,null,L);else if(null!=da&&0<da.length){var Y=mxUtils.bind(this,function(fa){try{this.exportFile(c,-da,k,B,ea,fa)}catch(Z){this.handleError(Z)}});null!=V?Y(V):this.pickFolder(ea,Y)}}catch(fa){this.handleError(fa)}});z=[];C||z.push(App.MODE_BROWSER);I||z.push("_blank");var O=new SaveDialog(this,f,mxUtils.bind(this,function(da,ea,ca){K(da.value,ea,da,ca);this.hideDialog(null,null,O.container)}),z,c,k,B);this.showDialog(O.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));O.init()};EditorUi.prototype.openInNewWindow=function(c,f,k){var B=window.open("about:blank");if(null==B||-null==B.document)mxUtils.popup(c,!0);else{var z="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var C=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=C&&(z="background: "+C+";")}z='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+z+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||k?(C=k?c:btoa(unescape(encodeURIComponent(c))),B.document.write(z+'<img style="max-width:100%;" src="data:'+f+";base64,"+C+'"/></body></html>')):-B.document.write(z+c+"</body></html>"):B.document.write(z+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");B.document.close()}};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=-null;var f=c(mxUtils.bind(this,function(B){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=-"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,-80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var z=f.getBoundingClientRect();this.tagsDialog.style.left=z.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+-4+"px";z=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=z.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(B)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var B=this.editor.graph.getAllTags();f.style.display=0<B.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown",-mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&-(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=c(mxUtils.bind(this,-function(B){var z=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",z);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)z.apply(this);else{this.exportDialog=document.createElement("div");var C=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";-this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=C.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";C=mxUtils.getCurrentStyle(this.editor.graph.container);-this.exportDialog.style.zIndex=C.zIndex;var I=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});I.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",z);this.editor.exportToCanvas(mxUtils.bind(this,function(L){I.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding=-"10px";var K=this.createImageDataUri(L,null,"png");L=document.createElement("img");L.style.maxWidth="140px";L.style.maxHeight="140px";L.style.cursor="pointer";L.style.backgroundColor="white";L.setAttribute("title",mxResources.get("openInNewWindow"));L.setAttribute("border","0");L.setAttribute("src",K);this.exportDialog.appendChild(L);mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.openInNewWindow(K.substring(K.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,-null,mxUtils.bind(this,function(L){I.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(L)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(B)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,k,B,z){this.isLocalFileSave()?this.saveLocalFile(k,c,B,z,f):this.saveRequest(c,f,mxUtils.bind(this,function(C,I){return this.createEchoRequest(k,-C,B,z,f,I)}),k,z,B)};EditorUi.prototype.saveRequest=function(c,f,k,B,z,C,I){I=null!=I?I:!mxClient.IS_IOS||!navigator.standalone;var L=mxUtils.bind(this,function(O,da,ea,ca){if("_blank"==da||null!=O&&0<O.length){var V=k("_blank"==da?null:O,da==App.MODE_DEVICE||"download"==da||null==da||"_blank"==da?"0":"1");null!=V&&(da==App.MODE_DEVICE||"download"==da||"_blank"==da?V.simulate(document,"_blank"):(ea=mxUtils.bind(this,function(ma){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=B)try{this.exportFile(B,-O,C,!0,da,ma)}catch(la){this.handleError(la)}else this.spinner.spin(document.body,mxResources.get("saving"))&&V.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=V.getStatus()&&299>=V.getStatus())try{this.exportFile(V.getText(),O,C,!0,da,ma)}catch(la){this.handleError(la)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(la){this.spinner.stop();this.handleError(la)}))}),null!=ca?ea(ca):this.pickFolder(da,ea)))}});z=[App.MODE_BROWSER];I||z.push("_blank");-var K=new SaveDialog(this,c,mxUtils.bind(this,function(O,da,ea){L(O.value,da,O,ea);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");this.showDialog(K.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));K.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,k,B,z,C){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=-function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,k){f(null)};EditorUi.prototype.exportSvg=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(J){Editor.addRetryToError(J,mxUtils.bind(this,function(){this.exportSvg(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V)}));this.handleError(J)})))try{var ma=this.editor.graph.isSelectionEmpty();k=null!=k?k:ma;var la=f?null:this.editor.graph.background;la==mxConstants.NONE&&-(la=null);null==la&&0==f&&(la=this.editor.graph.shapeBackgroundColor);var Y=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var fa=this.editor.graph.createSvgImageExport(z),Z=this.editor.graph.getSvg(la,c,I,L,null,k,null,fa,"blank"==O?"_blank":"self"==O?"_top":null,null,!ca,da,ea);this.editor.graph.addForeignObjectWarning=Y;B&&this.editor.graph.addSvgShadow(Z);var l=this.getBaseFilename()+(z?".drawio":"")+".svg";V=null!=-V?V:mxUtils.bind(this,function(J){this.isLocalFileSave()||J.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",J,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(J)}))});var u=mxUtils.bind(this,function(J){this.spinner.stop();z&&J.setAttribute("content",this.getFileData(!0,null,null,null,k,K,null,null,null,null,null,c,I));V(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+-mxUtils.getXml(J))});this.editor.graph.mathEnabled&&this.editor.addMathCss(Z);var H=mxUtils.bind(this,function(J){Editor.replaceSvgDataUris&&C&&EditorUi.embedSvgImages(J);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(J,da,u):u(J)}),U=mxUtils.bind(this,function(J){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(J,H,this.thumbImageCache)):H(J)});ca?this.embedFonts(Z,U):(this.editor.addFontCss(Z),U(Z))}catch(J){this.handleError(J)}};-EditorUi.prototype.replaceAlternateContent=function(c,f,k){function B(ea,ca,V,ma,la){var Y=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");Y.setAttribute("x",ca);Y.setAttribute("y",V+.5);Y.setAttribute("width",ma.width);Y.setAttribute("height",ma.height);null==Y.setAttributeNS?Y.setAttribute("xlink:href",la):Y.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",la);ea.replaceChild(Y,ea.lastChild);L()}function z(){if(I<da.length)da[I++](z)}var C="";f=c.getElementsByTagName("style");-for(var I=0;I<f.length;I++)C+=f[I].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var L=mxUtils.bind(this,function(){counter--;0==counter&&k(c)}),K={},O={},da=[];for(I=0;I<f.length;I++)mxUtils.bind(this,function(ea){var ca=ea.getElementsByTagName("div");if(0<ca.length)try{var V=ca[0].cloneNode(!0),ma=parseInt(V.style.marginLeft),la=parseInt(V.style.paddingTop),Y=V.getElementsByTagName("div")[1],fa=ca=!1,Z=V.style.alignItems,l=V.style.justifyContent;if(null!=V.style.writingMode){var u=-V.style.writingMode;fa="vertical-"==u.substring(0,9);ca="-rl"==u.substring(u.length-3)}var H=!fa&&"1px"==V.style.width||fa&&"1px"==V.style.height;if(!fa&&"1px"==V.style.height||fa&&"1px"==V.style.width)V.style.alignItems=fa&&ca?"unsafe flex-end":"unsafe flex-start";H&&(V.style.justifyContent="unsafe flex-start");V.style.paddingTop="";V.style.marginLeft="";var U=V.outerHTML,J=K[U];null==J&&(V.style.position="absolute",V.style.visibility="hidden",document.body.appendChild(V),u=1,u="1px"==V.style.width?-Y.offsetWidth:parseInt(V.style.width),H=1,H="1px"==V.style.height?Y.offsetHeight:parseInt(V.style.height),document.body.removeChild(V),J=new mxRectangle(ma,la,u,H),K[U]=J);"1px"==V.style.height&&("unsafe center"==Z?la-=J.height/2:"unsafe flex-end"==Z&&(la-=J.height));if("1px"==V.style.width)if(!fa&&"unsafe center"==l||fa&&"unsafe center"==Z)ma-=J.width/2;else if(!fa&&"unsafe flex-end"==l||fa&&(!ca&&"unsafe flex-end"==Z||ca&&"unsafe flex-start"==Z))ma-=J.width;J=new mxRectangle(ma,la,J.width,J.height+-parseInt(Y.style.fontSize)/4);da.push(mxUtils.bind(this,function(W){var aa=O[U];null==aa?Graph.htmlToPng(U,J.width,J.height,mxUtils.bind(this,function(ba){B(ea,ma,la,J,ba);O[U]=ba;W()}),C):(B(ea,ma,la,J,aa),W())}))}catch(W){L()}else L()})(f[I]);0==counter&&k(c);I=0;z()};EditorUi.prototype.addRadiobox=function(c,f,k,B,z,C,I){return this.addCheckbox(c,k,B,z,C,I,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,k,B,z,C,I,L){C=null!=C?C:!0;var K=document.createElement("input");K.style.marginRight="8px";-K.style.marginTop="16px";K.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();K.id=I;null!=L&&K.setAttribute("name",L);k&&(K.setAttribute("checked","checked"),K.defaultChecked=!0);B&&K.setAttribute("disabled","disabled");C&&(c.appendChild(K),k=document.createElement("label"),mxUtils.write(k,f),k.setAttribute("for",I),c.appendChild(k),z||mxUtils.br(c));return K};EditorUi.prototype.addEditButton=function(c,f){var k=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft=-"24px";var B=this.getCurrentFile(),z="";null!=B&&B.getMode()!=App.MODE_DEVICE&&B.getMode()!=App.MODE_BROWSER&&(z=window.location.href);var C=document.createElement("select");C.style.maxWidth="200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";B=document.createElement("option");B.setAttribute("value","blank");mxUtils.write(B,mxResources.get("makeCopy"));C.appendChild(B);var I=document.createElement("option");I.setAttribute("value","custom");mxUtils.write(I,-mxResources.get("custom")+"...");C.appendChild(I);c.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==C.value){var L=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!=K?(z=K,I.setAttribute("title",K)):(C.value="blank",I.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(L.container,300,80,!0,!1);L.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==-f||f.checked)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return k.checked?"blank"===C.value?"_blank":z:null},getEditInput:function(){return k},getEditSelect:function(){return C}}};EditorUi.prototype.addLinkSection=function(c,f){function k(){var L=document.createElement("div");L.style.width="100%";L.style.height="100%";L.style.boxSizing="border-box";null!=C&&C!=mxConstants.NONE?(L.style.border="1px solid black",L.style.backgroundColor=-C):(L.style.backgroundPosition="center center",L.style.backgroundRepeat="no-repeat",L.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");I.innerText="";I.appendChild(L)}mxUtils.write(c,mxResources.get("links")+":");var B=document.createElement("select");B.style.width="100px";B.style.padding="0px";B.style.marginLeft="8px";B.style.marginRight="10px";B.className="geBtn";var z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z,mxResources.get("automatic"));B.appendChild(z);-z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));B.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));B.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),B.appendChild(f));c.appendChild(B);mxUtils.write(c,mxResources.get("borderColor")+-":");var C="#0000ff",I=null;I=mxUtils.button("",mxUtils.bind(this,function(L){this.pickColor(C||"none",function(K){C=K;k()});mxEvent.consume(L)}));k();I.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";I.style.marginLeft="4px";I.style.height="22px";I.style.width="22px";I.style.position="relative";I.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";I.className="geColorBtn";c.appendChild(I);mxUtils.br(c);return{getColor:function(){return C},getTarget:function(){return B.value},-focus:function(){B.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,k,B,z,C){C=null!=C?C:[];k&&(C.push("lightbox=1"),"auto"!=c&&C.push("target="+c),null!=f&&f!=mxConstants.NONE&&C.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=B&&0<B.length&&C.push("edit="+encodeURIComponent(B)),z&&C.push("layers=1"),this.editor.graph.foldingEnabled&&C.push("nav=1"));return C};EditorUi.prototype.createLink=function(c,f,k,B,z,C,I,L,K,O,da){var ea=this.getCurrentFile();K=this.createUrlParameters(c,-f,B,z,C,K);c=!0;null!=I?k="#U"+encodeURIComponent(I):L||null==ea||""==ea.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+ea.getHash(),c=!1);c&&null!=ea&&null!=ea.getTitle()&&ea.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(ea.getTitle()));O&&1<k.length&&(K.push("open="+k.substring(1)),k="");da&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());-return(B&&(null!=I||null!=ea&&ea.getMode()!=App.MODE_GITHUB&&ea.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+k};EditorUi.prototype.createHtml=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca){this.getBasenames();var V={};""!=z&&z!=mxConstants.NONE&&(V.highlight=z);"auto"!==B&&(V.target=B);O||(V.lightbox=!1);V.nav=this.editor.graph.foldingEnabled;-k=parseInt(k);isNaN(k)||100==k||(V.zoom=k/100);k=[];I&&(k.push("pages"),V.resize=!0,null!=this.pages&&null!=this.currentPage&&(V.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(k.push("zoom"),V.resize=!0);L&&k.push("layers");K&&k.push("tags");null!=ca&&(V["dark-mode"]=ca);0<k.length&&(O&&k.push("lightbox"),V.toolbar=k.join(" "));null!=da&&0<da.length&&(V.edit=da);null!=c?V.url=c:V.xml=this.getFileData(!0,null,null,null,null,!I);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=-k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(V))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ea(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=-function(c,f,k,B){var z=document.createElement("div");z.style.whiteSpace="nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var I=document.createElement("div");I.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";L.setAttribute("value",-"url");L.setAttribute("type","radio");L.setAttribute("name","type-embedhtmldialog");C=L.cloneNode(!0);C.setAttribute("value","copy");I.appendChild(C);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));I.appendChild(K);mxUtils.br(I);I.appendChild(L);K=document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));I.appendChild(K);var O=this.getCurrentFile();null==k&&null!=O&&O.constructor==window.DriveFile&&(K=document.createElement("a"),-K.style.paddingLeft="12px",K.style.color="gray",K.style.cursor="pointer",mxUtils.write(K,mxResources.get("share")),I.appendChild(K),mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(O.getId(),O)})));C.setAttribute("checked","checked");null==k&&L.setAttribute("disabled","disabled");z.appendChild(I);I=380;var da=this.addLinkSection(z),ea=document.createElement("select");ea.style.maxWidth="260px";ea.style.marginLeft="8px";ea.style.marginTop="16px";-K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));ea.appendChild(K);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));ea.appendChild(K);K=document.createElement("option");K.setAttribute("value","auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected","selected");ea.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+-":");z.appendChild(ea);mxUtils.br(z);I+=26;var ca=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,":");var V=document.createElement("input");V.setAttribute("type","text");V.style.marginRight="16px";V.style.width="60px";V.style.marginLeft="4px";V.style.marginRight="12px";V.value="100%";z.appendChild(V);var ma=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=this.pages&&1<this.pages.length;var la=la=this.addCheckbox(z,mxResources.get("allPages"),K,!K),Y=this.addCheckbox(z,-mxResources.get("layers"),!0),fa=this.addCheckbox(z,mxResources.get("tags"),!0),Z=this.addCheckbox(z,mxResources.get("lightbox"),!0),l=null;if(EditorUi.enableHtmlEditOption){l=this.addEditButton(z,Z);var u=l.getEditInput();u.style.marginBottom="16px";I+=50;mxEvent.addListener(Z,"change",function(){Z.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled");u.checked&&Z.checked?l.getEditSelect().removeAttribute("disabled"):l.getEditSelect().setAttribute("disabled","disabled")})}c=-new CustomDialog(this,z,mxUtils.bind(this,function(){B(L.checked?k:null,ca.checked,V.value,da.getTarget(),da.getColor(),ma.checked,la.checked,Y.checked,fa.checked,Z.checked,null!=l?l.getLink():null,null!=ea?ea.value:null)}),null,c,f);this.showDialog(c.container,340,I,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,k,B,z,C,I,L,K){var O=document.createElement("div");O.style.whiteSpace="nowrap";var da=document.createElement("h3");mxUtils.write(da,c||mxResources.get("publish"));-da.style.width="100%";da.style.textAlign="center";da.style.marginTop="2px";da.style.marginBottom="20px";O.appendChild(da);var ea=document.createElement("select");c=30;ea.className="geBtn";ea.style.marginBottom="8px";ea.style.marginLeft="0px";ea.style.width="100%";ea.style.boxSizing="border-box";if(null==L||""==L.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",da=document.createElement("option"),mxUtils.write(da,mxResources.get("makeCopy")),da.setAttribute("value","copy"),-ea.appendChild(da);da=document.createElement("option");mxUtils.write(da,mxResources.get("authorizationRequired"));da.setAttribute("value","auth");ea.appendChild(da);null!=L&&""!=L.getHash()||da.setAttribute("disabled","disabled");L=document.createElement("option");L.setAttribute("value","public");ea.appendChild(L);null!=I?(mxUtils.write(L,mxResources.get("publicDiagramUrl")),L.setAttribute("title",I),ea.value="public"):(mxUtils.write(L,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+-")"),L.setAttribute("disabled","disabled"));O.appendChild(ea);mxUtils.br(O);ea.focus();var ca=null,V=null;if(null!=f||null!=k)c+=30,mxUtils.write(O,mxResources.get("width")+":"),ca=document.createElement("input"),ca.setAttribute("type","text"),ca.style.marginRight="16px",ca.style.width="50px",ca.style.marginLeft="6px",ca.style.marginRight="16px",ca.style.marginBottom="10px",ca.value="100%",O.appendChild(ca),mxUtils.write(O,mxResources.get("height")+":"),V=document.createElement("input"),V.setAttribute("type",-"text"),V.style.width="50px",V.style.marginLeft="6px",V.style.marginBottom="10px",V.value=k+"px",O.appendChild(V),mxUtils.br(O);var ma=this.addLinkSection(O,B),la=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),la=this.addCheckbox(O,mxResources.get("selectedPage")+": "+f));var Y=this.addCheckbox(O,mxResources.get("lightbox"),!0,null,null,!B),fa=this.addEditButton(O,-Y),Z=fa.getEditInput();B&&(Z.style.marginLeft=Y.style.marginLeft,Y.style.display="none",c-=20);var l=this.addCheckbox(O,mxResources.get("layers"),!0);l.style.marginLeft=Z.style.marginLeft;l.style.marginTop="8px";var u=this.addCheckbox(O,mxResources.get("tags"),!0);u.style.marginLeft=Z.style.marginLeft;u.style.marginBottom="16px";u.style.marginTop="16px";mxEvent.addListener(Y,"change",function(){Y.checked?(l.removeAttribute("disabled"),Z.removeAttribute("disabled"),u.removeAttribute("disabled")):(l.setAttribute("disabled",-"disabled"),Z.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));Z.checked&&Y.checked?fa.getEditSelect().removeAttribute("disabled"):fa.getEditSelect().setAttribute("disabled","disabled")});B=new CustomDialog(this,O,mxUtils.bind(this,function(){K(ma.getTarget(),ma.getColor(),null==la?!1:la.checked,Y.checked,fa.getLink(),l.checked,null!=ca?ca.value:null,null!=V?V.value:null,u.checked,ea.value)}),null,mxResources.get("create"),z,C);this.showDialog(B.container,340,296+c,!0,!0);-null!=ca?(ca.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)):null==ea.parentNode;ma.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,k,B,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var I=document.createElement("h3");mxUtils.write(I,mxResources.get("image"));I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(z?"10":"4")+"px";C.appendChild(I);if(z){mxUtils.write(C,-mxResources.get("zoom")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.style.marginRight="12px";L.value=this.lastExportZoom||"100%";C.appendChild(L);mxUtils.write(C,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=this.lastExportBorder||"0";C.appendChild(K);mxUtils.br(C)}var O=-this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),da=B?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ea=B?null:this.addCheckbox(C,mxResources.get("transparentBackground"),I.background==mxConstants.NONE||null==I.background);null!=ea&&(ea.style.marginBottom="16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ca=parseInt(L.value)/100||1,V=parseInt(K.value)||0;k(!O.checked,-null!=da?da.checked:!1,null!=ea?ea.checked:!1,ca,V)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(B?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,k,B,z,C,I,L,K){I=null!=I?I:Editor.defaultIncludeDiagram;var O=document.createElement("div");O.style.whiteSpace="nowrap";var da=this.editor.graph,ea="jpeg"==L||"webp"==L?220:320,ca=document.createElement("h3");mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";O.appendChild(ca);-mxUtils.write(O,mxResources.get("zoom")+":");var V=document.createElement("input");V.setAttribute("type","text");V.style.marginRight="16px";V.style.width="60px";V.style.marginLeft="4px";V.style.marginRight="12px";V.value=this.lastExportZoom||"100%";O.appendChild(V);mxUtils.write(O,mxResources.get("borderWidth")+":");var ma=document.createElement("input");ma.setAttribute("type","text");ma.style.marginRight="16px";ma.style.width="60px";ma.style.marginLeft="4px";ma.value=this.lastExportBorder||"0";O.appendChild(ma);-mxUtils.br(O);var la=this.addCheckbox(O,mxResources.get("selectionOnly"),!1,da.isSelectionEmpty()),Y=document.createElement("input");Y.style.marginTop="16px";Y.style.marginRight="8px";Y.style.marginLeft="24px";Y.setAttribute("disabled","disabled");Y.setAttribute("type","checkbox");var fa=document.createElement("select");fa.style.marginTop="16px";fa.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!da.isSelectionEmpty()||"selectionOnly"!=c[ca]){var Z=document.createElement("option");-mxUtils.write(Z,mxResources.get(c[ca]));Z.setAttribute("value",c[ca]);fa.appendChild(Z)}K?(mxUtils.write(O,mxResources.get("size")+":"),O.appendChild(fa),mxUtils.br(O),ea+=26,mxEvent.addListener(fa,"change",function(){"selectionOnly"==fa.value&&(la.checked=!0)})):C&&(O.appendChild(Y),mxUtils.write(O,mxResources.get("crop")),mxUtils.br(O),ea+=30,mxEvent.addListener(la,"change",function(){la.checked?Y.removeAttribute("disabled"):Y.setAttribute("disabled","disabled")}));da.isSelectionEmpty()?K&&(la.style.display=-"none",la.nextSibling.style.display="none",la.nextSibling.nextSibling.style.display="none",ea-=30):(fa.value="diagram",Y.setAttribute("checked","checked"),Y.defaultChecked=!0,mxEvent.addListener(la,"change",function(){fa.value=la.checked?"selectionOnly":"diagram"}));var l=this.addCheckbox(O,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=L&&"webp"!=L),u=document.createElement("select");u.style.maxWidth="260px";u.style.marginLeft="8px";u.style.marginTop="16px";C=document.createElement("option");-C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));u.appendChild(C);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));u.appendChild(K);"svg"==L?(C=document.createElement("option"),C.setAttribute("value","auto"),mxUtils.write(C,mxResources.get("automatic")),C.setAttribute("selected","selected"),u.appendChild(C)):Editor.isDarkMode()?K.setAttribute("selected","selected"):C.setAttribute("selected","selected");mxUtils.write(O,-mxResources.get("appearance")+":");O.appendChild(u);mxUtils.br(O);ea+=26;var H=this.addCheckbox(O,mxResources.get("shadow"),da.shadowVisible),U=null;if("png"==L||"jpeg"==L||"webp"==L)U=this.addCheckbox(O,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ea+=30;var J=this.addCheckbox(O,mxResources.get("includeCopyOfMyDiagram")+":",I,null,null,"jpeg"!=L&&"webp"!=L),W=document.createElement("select");W.style.maxWidth="260px";W.style.marginLeft="28px";"png"==L||"svg"==L?(I=function(){J.checked?-W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")},da=document.createElement("option"),da.setAttribute("value","allPages"),mxUtils.write(da,mxResources.get("allPages")),W.appendChild(da),da=document.createElement("option"),da.setAttribute("value","currentPage"),mxUtils.write(da,mxResources.get("currentPage")),W.appendChild(da),J.style.marginBottom="12px",W.style.marginBottom="16px",O.appendChild(W),mxUtils.br(O),ea+=20,null!=this.lastEmbedInclude&&(W.value=this.lastEmbedInclude),-mxEvent.addListener(J,"change",I),I()):J.style.marginBottom="16px";var aa=document.createElement("input");aa.style.marginBottom="16px";aa.style.marginRight="8px";aa.setAttribute("type","checkbox");var ba=document.createElement("input");ba.style.marginBottom="16px";ba.style.marginRight="8px";ba.setAttribute("type","checkbox");f&&(aa.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,O.appendChild(aa),mxUtils.write(O,mxResources.get("embedImages")),mxUtils.br(O),ba.checked=null!=this.lastEmbedFonts?-this.lastEmbedImages:!0,O.appendChild(ba),mxUtils.write(O,mxResources.get("embedFonts")),mxUtils.br(O),ea+=50);var ja=document.createElement("select");ja.style.maxWidth="260px";ja.style.marginLeft="8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));ja.appendChild(C);I=document.createElement("option");I.setAttribute("value","blank");mxUtils.write(I,mxResources.get("openInNewWindow"));ja.appendChild(I);I=document.createElement("option");-I.setAttribute("value","self");mxUtils.write(I,mxResources.get("openInThisWindow"));ja.appendChild(I);I=document.createElement("div");mxUtils.write(I,mxResources.get("LinksLost"));I.style.margin="7px";I.style.display="none";"svg"==L&&(mxUtils.write(O,mxResources.get("links")+":"),O.appendChild(ja),O.appendChild(I),mxUtils.br(O),mxUtils.br(O),ea+=50);k=new CustomDialog(this,O,mxUtils.bind(this,function(){this.lastExportBorder=ma.value;this.lastExportZoom=V.value;this.lastEmbedImages=aa.checked;this.lastEmbedFonts=-ba.checked;this.lastEmbedInclude=W.value;z(V.value,l.checked,!la.checked,H.checked,J.checked,aa.checked&&f,ma.value,Y.checked,("png"==L||"svg"==L)&&"currentPage"==W.value,ja.value,null!=U?U.checked:null,null!=u?u.value:null,fa.value,ba.checked)}),null,k,B);this.showDialog(k.container,340,ea,!0,!0,null,null,null,null,!0);V.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?V.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,k,B,z){var C=-document.createElement("div");C.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=f){var L=document.createElement("h3");mxUtils.write(L,f);L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(L)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),O=this.addCheckbox(C,mxResources.get("shadow"),I.shadowVisible&&B,!B),da=this.addCheckbox(C,k),ea=this.addCheckbox(C,mxResources.get("lightbox"),!0),ca=this.addEditButton(C,ea),V=ca.getEditInput(),ma=1<I.model.getChildCount(I.model.getRoot()),-la=this.addCheckbox(C,mxResources.get("layers"),ma,!ma);la.style.marginLeft=V.style.marginLeft;la.style.marginBottom="12px";la.style.marginTop="8px";mxEvent.addListener(ea,"change",function(){ea.checked?(ma&&la.removeAttribute("disabled"),V.removeAttribute("disabled")):(la.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"));V.checked&&ea.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,-mxUtils.bind(this,function(){c(K.checked,O.checked,da.checked,ea.checked,ca.getLink(),la.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,k,B,z,C,I,L){function K(V){var ma=" ",la="";B&&(ma=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+-EditorUi.lightboxHost+"/?client=1"+(null!=da?"&page="+da:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",la+="cursor:pointer;");c&&(la+="max-width:100%;");var Y="";k&&(Y=' width="'+Math.round(O.width)+'" height="'+Math.round(O.height)+'"');I('<img src="'+V+'"'+Y+(""!=la?' style="'+la+'"':"")+ma+"/>")}var O=this.editor.graph.getGraphBounds(),da=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(V){var ma=B?this.getFileData(!0):-null;V=this.createImageDataUri(V,ma,"png");K(V)}),null,null,null,mxUtils.bind(this,function(V){L({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),O.width*O.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ea="";k&&(ea="&w="+Math.round(2*O.width)+"&h="+Math.round(2*O.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(B?"1":"0")+ea+"&xml="+encodeURIComponent(f));ca.send(mxUtils.bind(this,function(){200<=-ca.getStatus()&&299>=ca.getStatus()?K("data:image/png;base64,"+ca.getText()):L({message:mxResources.get("unknownError")})}))}else L({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,k,B,z,C,I){var L=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),K=L.getElementsByTagName("a");if(null!=K)for(var O=0;O<K.length;O++){var da=K[O].getAttribute("href");null!=da&&"#"==da.charAt(0)&&"_blank"==K[O].getAttribute("target")&&K[O].removeAttribute("target")}B&&-L.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(L);if(k){var ea=" ",ca="";B&&(ea="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(C?"&layers=1":-"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");this.editor.convertImages(L,mxUtils.bind(this,function(V){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(V))+'"'+(""!=ca?' style="'+ca+'"':"")+ea+"/>")}))}else ca="",B&&(f=this.getSelectedPageIndex(),L.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),c&&(c=parseInt(L.getAttribute("width")),z=parseInt(L.getAttribute("height")),L.setAttribute("viewBox","-0.5 -0.5 "+c+" "+z),ca+="max-width:100%;max-height:"+z+"px;",L.removeAttribute("height")),""!=ca&&L.setAttribute("style",ca),this.editor.addFontCss(L),this.editor.graph.mathEnabled&&this.editor.addMathCss(L),I(mxUtils.getXml(L))};EditorUi.prototype.timeSince=-function(c){c=Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var k=null;if("diagram"==-c.nodeName)k=c;else if("mxfile"==c.nodeName){var B=c.getElementsByTagName("diagram");if(0<B.length){k=B[0];var z=f.getGlobalVariable;f.getGlobalVariable=function(C){return"page"==C?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==C?1:z.apply(this,arguments)}}}null!=k&&(c=Editor.parseDiagramNode(k))}B=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(C){}finally{this.editor.graph=B}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};-EditorUi.prototype.getPngFileProperties=function(c){var f=1,k=0;if(null!=c){if(c.hasAttribute("scale")){var B=parseFloat(c.getAttribute("scale"));!isNaN(B)&&0<B&&(f=B)}c.hasAttribute("border")&&(B=parseInt(c.getAttribute("border")),!isNaN(B)&&0<B&&(k=B))}return{scale:f,border:k}};EditorUi.prototype.getEmbeddedPng=function(c,f,k,B,z){try{var C=this.editor.graph,I=null;if(null!=k&&0<k.length)C=this.createTemporaryGraph(C.getStylesheet()),document.body.appendChild(C.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,-!0),C),I=k;else if(null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(C.getStylesheet());var L=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var K=this.pages[0];this.currentPage==K?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&C.setBackgroundImage(K.viewState.backgroundImage);C.getGlobalVariable=function(O){return"page"==O?K.getName():"pagenumber"==O?1:L.apply(this,arguments)};document.body.appendChild(C.container);-C.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(O){try{null==I&&(I=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=O.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(I));c(da.substring(da.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(ea){null!=f&&f(ea)}}),null,null,null,mxUtils.bind(this,function(O){null!=f&&f(O)}),null,null,B,null,C.shadowVisible,null,-C,z,null,null,null,"diagram",null)}catch(O){null!=f&&f(O)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca){L=null!=L?L:!0;da=null!=da?da:0;I=null!=K?K:f.background;I==mxConstants.NONE&&(I=null);null==I&&"none"==f.getAdaptiveColors()&&(I="#ffffff");K=this.editor.graph.createSvgImageExport(null!=c);C=f.getSvg(I,O,da,null,null,C,null,K,null,f.shadowVisible||ea,null,ca,"diagram");(f.shadowVisible||ea)&&f.addSvgShadow(C,null,null,0==da);null!=c&&C.setAttribute("content",c);null!=-k&&C.setAttribute("resource",k);var V=mxUtils.bind(this,function(ma){ma=(B?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ma);null!=z&&z(ma);return ma});f.mathEnabled&&this.editor.addMathCss(C);if(null!=z)this.embedFonts(C,mxUtils.bind(this,function(ma){L?this.editor.convertImages(ma,mxUtils.bind(this,function(la){V(la)})):V(ma)}));else return V(C)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=-this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(c,k),f(c)}catch(B){f(c)}}))}catch(k){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(ma){Editor.addRetryToError(ma,mxUtils.bind(this,function(){this.exportImage(c,f,k,B,z,C,I,L,K,O,da,ea,-ca)}));this.handleError(ma)}))){var V=this.editor.graph.isSelectionEmpty();k=null!=k?k:V;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(ma){this.spinner.stop();try{this.saveCanvas(ma,z?this.getFileData(!0,null,null,null,k,L,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,da)}catch(la){this.handleError(la)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ma){this.spinner.stop();this.handleError(ma)}),-null,k,c||1,f,B,null,null,C,I,O,ea,ca)}catch(ma){this.spinner.stop(),this.handleError(ma)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,k,B,z,C,I){f=null!=f?f:0;k=null!=k?k:0;var L=[];try{var K=this.editor.graph;if(null!=c&&0<-c.length){K.model.beginUpdate();try{var O=mxUtils.parseXml(c);c={};var da=this.editor.extractGraphModel(O.documentElement,null!=this.pages);if(null!=da&&"mxfile"==da.nodeName&&null!=this.pages){var ea=da.getElementsByTagName("diagram");if(1==ea.length&&!C){if(da=Editor.parseDiagramNode(ea[0]),null!=this.currentPage&&(c[ea[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=ea[0].getAttribute("name");null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,-ca))}}else if(0<ea.length){C=[];var V=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ea[0].getAttribute("id")]=this.pages[0].getId(),ca=ea[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),da=Editor.parseDiagramNode(ea[0]),B=!1,V=1);for(;V<ea.length;V++){var ma=ea[V].getAttribute("id");ea[V].removeAttribute("id");var la=this.updatePageRoot(new DiagramPage(ea[V]));c[ma]=ea[V].getAttribute("id");var Y=this.pages.length;-null==la.getName()&&la.setName(mxResources.get("pageWithNumber",[Y+1]));K.model.execute(new ChangePage(this,la,la,Y,!0));C.push(la)}this.updatePageLinks(c,C)}}if(null!=da&&"mxGraphModel"===da.nodeName){L=K.importGraphModel(da,f,k,B);if(null!=L)for(this.addLocalPagesToMapping(c),V=0;V<L.length;V++)this.updatePageLinksForCell(c,L[V]);var fa=K.parseBackgroundImage(da.getAttribute("backgroundImage"));if(null!=fa&&null!=fa.originalSrc){this.updateBackgroundPageLink(c,fa);var Z=new ChangePageSetup(this,-null,fa);Z.ignoreColor=!0;K.model.execute(Z)}}I&&K.pasteCellStyles(K.includeDescendants(L),K.defaultVertexStyle,K.defaultEdgeStyle)}finally{K.model.endUpdate()}}}catch(l){if(z)throw l;this.handleError(l)}return L};EditorUi.prototype.updatePageLinks=function(c,f){for(var k=0;k<f.length;k++)this.updatePageLinksForCell(c,f[k].root),null!=f[k].viewState&&this.updateBackgroundPageLink(c,f[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var k=-c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=k&&(f.originalSrc="data:page/id,"+k)}}catch(B){}};EditorUi.prototype.updatePageLinksForCell=function(c,f){var k=document.createElement("div"),B=this.editor.graph,z=B.getLinkForCell(f);null!=z&&B.setLinkForCell(f,this.updatePageLink(c,z));if(B.isHtmlLabel(f)){k.innerHTML=Graph.sanitizeHtml(B.getLabel(f));for(var C=k.getElementsByTagName("a"),I=!1,L=0;L<C.length;L++)z=C[L].getAttribute("href"),null!=z&&(C[L].setAttribute("href",this.updatePageLink(c,-z)),I=!0);I&&B.labelChanged(f,k.innerHTML)}for(L=0;L<B.model.getChildCount(f);L++)this.updatePageLinksForCell(c,B.model.getChildAt(f,L))};EditorUi.prototype.updatePageLink=function(c,f){if(Graph.isPageLink(f)){var k=c[f.substring(f.indexOf(",")+1)];f=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==f.substring(0,17))try{var B=JSON.parse(f.substring(17));if(null!=B.actions){for(var z=0;z<B.actions.length;z++){var C=B.actions[z];if(null!=C.open&&Graph.isPageLink(C.open)){var I=C.open.substring(C.open.indexOf(",")+-1);k=c[I];null!=k?C.open="data:page/id,"+k:null==this.getPageById(I)&&delete C.open}}f="data:action/json,"+JSON.stringify(B)}}catch(L){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,k,B,z){var C=mxUtils.bind(this,function(I){this.loadingExtensions=!1;null!=k?k(I):this.handleError(I)});this.createTimeout(null,mxUtils.bind(this,function(I){B=null!=B?B:c.name;var L=mxUtils.bind(this,-function(O){I.clear()&&C(O)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var O=this.isRemoteVisioFormat(B);try{var da=B.lastIndexOf(".");if(0<=da&&da<B.length)B.substring(da+1).toUpperCase();else{var ea=B.lastIndexOf("/");0<=ea&&ea<B.length&&(B=B.substring(ea+1))}}catch(V){}if(O)if(null==VSD_CONVERT_URL||this.isOffline())L({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{O=new FormData;-O.append("file1",c,B);var ca=new XMLHttpRequest;ca.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(B)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=z&&ca.setRequestHeader("x-convert-custom",z);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&I.clear())if(200<=ca.status&&299>=ca.status)try{var V=ca.response;if("text/xml"==V.type){var ma=new FileReader;ma.onload=mxUtils.bind(this,function(la){try{f(la.target.result)}catch(Y){L({message:mxResources.get("errorLoadingFile")})}});-ma.readAsText(V)}else this.doImportVisio(V,f,L,B)}catch(la){L(la)}else try{""==ca.responseType||"text"==ca.responseType?L({message:ca.responseText}):(ma=new FileReader,ma.onload=function(){try{L({message:JSON.parse(ma.result).Message})}catch(la){L(la)}},ma.readAsText(ca.response))}catch(la){L({})}});ca.send(O)}else if(I.clear())try{this.doImportVisio(c,f,L,B)}catch(V){L(V)}}else L({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?-K():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",K,null,null,null,L))}),C)};EditorUi.prototype.importGraphML=function(c,f,k){var B=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=k?k(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(L){z.clear()&&B(L)}),I=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,B)}catch(L){C(L)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});-this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?I():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",I,null,null,null,C))}),B)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(k){this.loadingExtensions=!1;this.handleError(k)});this.createTimeout(null,mxUtils.bind(this,function(k){var B=mxUtils.bind(this,function(C){k.clear()&&f(C)}),z=mxUtils.bind(this,function(){this.loadingExtensions=-!1;if(k.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||B({message:mxResources.get("unknownError")})}catch(C){B(C)}else B({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,B))}),f)}};EditorUi.prototype.convertLucidChart=function(c,-f,k){var B=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=k?k(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(L){z.clear()&&B(L)}),I=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if("undefined"!==typeof window.LucidImporter)try{var L=JSON.parse(c);f(LucidImporter.importState(L));try{if(null!=window.console&&"1"==urlParams.test){var K=[(new Date).toISOString(),"convertLucidChart",L];null!=L.state&&-K.push(JSON.parse(L.state));if(null!=L.svgThumbs)for(var O=0;O<L.svgThumbs.length;O++)K.push(Editor.createSvgDataUri(L.svgThumbs[O]));null!=L.thumb&&K.push(L.thumb);console.log.apply(console,K)}}catch(da){}}catch(da){null!=window.console&&console.error(da),C(da)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(I,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",-function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",I,null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",I,null,null,null,C))}),B)};EditorUi.prototype.createMermaidXml=function(c,f,k,B,z,C){var I=new Graph(document.createElement("div"));-k=I.insertVertex(null,null,null,0,0,B,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+k+";");I.setAttributeForCell(k,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=C&&I.setAttributeForCell(k,"templatePrompt",C);c=(new mxCodec).encode(I.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,k){var B=0,z=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(C){var I=new mxXmlRequest("https://www.draw.io/generate/v2",-c,"POST"),L=mxUtils.bind(this,function(K){C.clear()&&k(K)});I.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var da=mxUtils.trim(K.getText());this.generateMermaidImage(da,null,mxUtils.bind(this,function(ea,ca,V){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",da),f(da,ea,ca,V))}),L)}),L,mxUtils.bind(this,function(ea){3>-B++?C.clear()&&z():L(ea)}))}),L);else{var O={message:mxResources.get("error")+" "+K.getStatus()};try{O=JSON.parse(K.getText()),O=O.error}catch(da){}L(O)}}),L)}),k)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var k=1<f.length?-f[1]:null;if(null!=k){var B=k.indexOf("-");0<B&&(k=k.substring(0,B))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=k&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");k=f[0].split(" ")[0].replace(/:$/,"");B=k.indexOf("-");0<B&&(k=k.substring(0,B));try{"mindmap"==k&&2<f.length&&(c=extractMermaidMindmap(f))}catch(z){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,-f,k,B,z){var C=mxUtils.bind(this,function(L){this.loadingMermaid=!1;null!=B?B(L):this.handleError(L)}),I=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var L=mxUtils.bind(this,function(K){try{if(mxClient.IS_IE||mxClient.IS_IE11)K=-K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var O=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<O.length&&"error"!=O[0].getAttribute("aria-roledescription")){var da=parseFloat(O[0].getAttribute("width")),ea=parseFloat(O[0].getAttribute("height"));if(isNaN(da)||isNaN(ea))try{var ca=O[0].getAttribute("viewBox").split(/\s+/);da=parseFloat(ca[2]);ea=parseFloat(ca[3])}catch(V){da=da||100,ea=ea||100}k(this.convertDataUri(Editor.createSvgDataUri(K)),-da,ea)}else null!=z?z():B({message:mxResources.get("invalidInput")})}catch(V){B(V)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){L(K.svg)}).catch(function(K){null!=z?z(K):B(K)})}catch(K){B(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(I,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(L){this.importXml(L,-null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",I,null,null,null,C)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",I,null,null,null,C))};EditorUi.prototype.generatePlantUmlImage=function(c,f,k,B){function z(L,K,O){c1=L>>2;c2=(L&3)<<4|K>>4;c3=(K&15)<<2|O>>6;c4=O&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(L){if(10>L)return String.fromCharCode(48+L);L-=10;if(26>L)return String.fromCharCode(65+L);L-=26;if(26>L)return String.fromCharCode(97+-L);L-=26;return 0==L?"-":1==L?"_":"?"}var I=new XMLHttpRequest;I.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(L){r="";for(i=0;i<L.length;i+=3)r=i+2==L.length?r+z(L.charCodeAt(i),L.charCodeAt(i+1),0):i+1==L.length?r+z(L.charCodeAt(i),0,0):r+z(L.charCodeAt(i),L.charCodeAt(i+1),L.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(I.responseType="blob");I.onload=function(L){if(200<=this.status&&300>this.status)if("txt"==-f)k(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(O){var da=new Image;da.onload=function(){try{var ea=da.width,ca=da.height;if(0==ea&&0==ca){var V=K.result,ma=V.indexOf(","),la=decodeURIComponent(escape(atob(V.substring(ma+1)))),Y=mxUtils.parseXml(la).getElementsByTagName("svg");0<Y.length&&(ea=parseFloat(Y[0].getAttribute("width")),ca=parseFloat(Y[0].getAttribute("height")))}k(K.result,ea,ca)}catch(fa){B(fa)}};da.src=K.result};K.onerror=function(O){B(O)}}else B(L)};-I.onerror=function(L){B(L)};I.send()};EditorUi.prototype.insertAsPreText=function(c,f,k){var B=this.editor.graph,z=null;B.getModel().beginUpdate();try{z=B.insertVertex(null,null,"<pre>"+c+"</pre>",f,k,1,1,"text;html=1;align=left;verticalAlign=top;"),B.updateCellSize(z,!0)}finally{B.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(c,f,k,B,z,C,I,L){C=null!=C?C:!0;I=null!=I?I:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,f,k,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var K=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var O=Editor.extractGraphModelFromPdf(c);if(null!=-O&&0<O.length)return this.importXml(O,f,k,C,!0,L)}if(Editor.isPngDataUrl(c)&&(O=Editor.extractGraphModelFromPng(c),null!=O&&0<O.length))return this.importXml(O,f,k,C,!0,L);if("data:image/svg+xml;"==c.substring(0,19))try{O=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(O=c.substring(c.indexOf(",")+1),O=window.atob&&!mxClient.IS_SF?atob(O):Base64.decode(O,!0)):O=decodeURIComponent(c.substring(c.indexOf(",")+1));var da=this.importXml(O,f,k,C,!0,L);if(0<da.length)return da}catch(ca){}this.loadImage(c,-mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,c,mxUtils.bind(this,function(la,Y,fa){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(k),Y,fa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(la)+";"))}),I,this.maxImageSize);else{var V=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),ma=Math.round(ca.width*V);ca=Math.round(ca.height*-V);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(k),ma,ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ca=null;K.getModel().beginUpdate();try{ca=K.insertVertex(K.getDefaultParent(),null,c,K.snap(f),K.snap(k),1,1,"text;"+(B?"html=1;":"")),K.updateCellSize(ca),K.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{K.getModel().endUpdate()}K.setSelectionCell(ca)}))}else{c=-Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,k,C,null,L);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,f,k,C,null,L))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{K=this.editor.graph;z=null;K.getModel().beginUpdate();try{z=K.insertVertex(K.getDefaultParent(),null,"",K.snap(f),K.snap(k),1,1,"text;whiteSpace=wrap;"+(B?"html=1;":""));-K.fireEvent(new mxEventObject("textInserted","cells",[z]));B&&(c=K.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");z.value=c;K.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var ea=K.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=ea.width;z.geometry.height=ea.height}Graph.isLink(z.value)&&K.setLinkForCell(z,z.value);z.geometry.width+=K.gridSize;z.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[z]}}return[]};+function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=f.getFunction,t=this.editor.graph,z=this;f.getFunction=function(C){if(t.isSelectionEmpty()&&null!=z.pages&&0<z.pages.length){var F=z.getSelectedPageIndex();if(mxEvent.isShiftDown(C)){if(37==C.keyCode)return function(){0<F&&z.movePage(F,F-1)};if(38==C.keyCode)return function(){0<F&&z.movePage(F,0)};if(39==C.keyCode)return function(){F<z.pages.length-1&&z.movePage(F,F+1)};if(40==C.keyCode)return function(){F<+z.pages.length-1&&z.movePage(F,z.pages.length-1)}}else if(mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)){if(37==C.keyCode)return function(){0<F&&z.selectNextPage(!1)};if(38==C.keyCode)return function(){0<F&&z.selectPage(z.pages[0])};if(39==C.keyCode)return function(){F<z.pages.length-1&&z.selectNextPage(!0)};if(40==C.keyCode)return function(){F<z.pages.length-1&&z.selectPage(z.pages[z.pages.length-1])}}}return!(65<=C.keyCode&&90>=C.keyCode)||t.isSelectionEmpty()||mxEvent.isAltDown(C)||+mxEvent.isShiftDown(C)||mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)?l.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var f=e.apply(this,arguments);if(null==f)try{var l=c.indexOf("<mxfile ");if(0<=l){var t=c.lastIndexOf("</mxfile>");t>l&&(f=c.substring(l,t+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else{var z=mxUtils.parseXml(c),+C=this.editor.extractGraphModel(z.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=C?mxUtils.getXml(C):""}}catch(F){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",+f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();try{var t=null!=this.pages?this.pages.slice():null,z=c.getElementsByTagName("diagram");if(1<z.length||1==z.length&&z[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var C=z.length-1;0<=C;C--){var F=this.updatePageRoot(new DiagramPage(z[C]));null==+F.getName()&&F.setName(mxResources.get("pageWithNumber",[C+1]));l.model.execute(new ChangePage(this,F,0==C?F:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,+l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(C=0;C<t.length;C++)l.model.execute(new ChangePage(this,t[C],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;ca=null!=ca?ca:!Editor.defaultCompressed;var X=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var ba=+"_blank";else X=ba=t;if(null==c)return"";var ha=c;if("mxfile"!=ha.nodeName.toLowerCase()){if(ca){var ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());ma.appendChild(c)}else{ma=Graph.zapGremlins(mxUtils.getXml(c));ha=Graph.compress(ma);if(Graph.decompress(ha)!=ma)return ma;ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());+mxUtils.setTextContent(ma,ha)}ha=c.ownerDocument.createElement("mxfile");ha.appendChild(ma)}I?(ha=ha.cloneNode(!0),ha.removeAttribute("modified"),ha.removeAttribute("host"),ha.removeAttribute("agent"),ha.removeAttribute("etag"),ha.removeAttribute("userAgent"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("type")):(ha.removeAttribute("userAgent"),ha.removeAttribute("modified"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("pages"),ha.removeAttribute("type"),+ha.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ha.setAttribute("host","Chrome"):EditorUi.isElectronApp?ha.setAttribute("host","Electron"):ha.setAttribute("host",window.location.hostname),ha.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),ha.setAttribute("version",EditorUi.VERSION),1<ha.getElementsByTagName("diagram").length&&null!=this.pages&&ha.setAttribute("pages",this.pages.length));null!=da&&(ha=ha.cloneNode(!0),ha.setAttribute("scale",da));null!=ea&&+(ha=ha.cloneNode(!0),ha.setAttribute("border",ea));c=ca?mxUtils.getPrettyXml(ha):mxUtils.getXml(ha);if(!C&&!z&&(F||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ha),f,null!=l?l.getTitle():null,ba,X);else if(C||!z&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(ha),c=this.getEmbeddedSvg(c,f,t,null,N,K,X,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=+function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var z=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(K){var I=K.getElementsByTagName("mxGraphModel"),ca=0<I.length?I[0]:null;I=K;null==ca&&l?(ca=mxUtils.getNodeValue(K),0<ca.length&&(ca=Graph.decompress(ca),null!=ca&&0<ca.length&&(I=K.cloneNode(!1),I.appendChild(mxUtils.parseXml(ca).documentElement)))):null==ca||l?I=K.cloneNode(!0):(I=K.cloneNode(!1),mxUtils.setTextContent(I,+Graph.compressNode(ca)));z.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(z),z=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],F=C.node;if(C!=this.currentPage)if(C.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,N,null,t);EditorUi.removeChildNodes(F);F.appendChild(N);delete C.needsUpdate}else t&&+(this.updatePageRoot(C),null!=C.viewState.backgroundImage&&(null!=C.viewState.backgroundImage.originalSrc?C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.originalSrc,C):Graph.isPageLink(C.viewState.backgroundImage.src)&&(C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.src,C))),null!=C.viewState.backgroundImage&&null!=C.viewState.backgroundImage.originalSrc&&(N=new mxCodec(mxUtils.createXmlDocument()),N=N.encode(new mxGraphModel(C.root)),+this.editor.graph.saveViewState(C.viewState,N,null,t),F=F.cloneNode(!1),F.appendChild(N)));c(F)}return z};EditorUi.prototype.anonymizeString=function(c,f){for(var l=[],t=0;t<c.length;t++){var z=c.charAt(t);0<=EditorUi.ignoredAnonymizedChars.indexOf(z)?l.push(z):isNaN(parseInt(z))?z.toLowerCase()!=z?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):z.toUpperCase()!=z?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(z)?l.push(" "):l.push("?"):l.push(f?"0":Math.round(9*+Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var l=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));c[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(l)}catch(C){c[EditorUi.DIFF_INSERT][f].data=C.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var t in c[EditorUi.DIFF_UPDATE]){var z=+c[EditorUi.DIFF_UPDATE][t];null!=z.name&&(z.name=this.anonymizeString(z.name));null!=z.cells&&(f=mxUtils.bind(this,function(C){var F=z.cells[C];if(null!=F){for(var N in F)null!=F[N].value&&(F[N].value="["+F[N].value.length+"]"),null!=F[N].xmlValue&&(F[N].xmlValue="["+F[N].xmlValue.length+"]"),null!=F[N].style&&(F[N].style="["+F[N].style.length+"]"),mxUtils.isEmptyObject(F[N])&&delete F[N];mxUtils.isEmptyObject(F)&&delete z.cells[C]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(z.cells)&&+delete z.cells);mxUtils.isEmptyObject(z)&&delete c[EditorUi.DIFF_UPDATE][t]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,f));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],f)};EditorUi.prototype.anonymizeNode=+function(c,f){f=c.getElementsByTagName("mxCell");for(var l=0;l<f.length;l++)null!=f[l].getAttribute("value")&&f[l].setAttribute("value","["+f[l].getAttribute("value").length+"]"),null!=f[l].getAttribute("xmlValue")&&f[l].setAttribute("xmlValue","["+f[l].getAttribute("xmlValue").length+"]"),null!=f[l].getAttribute("style")&&f[l].setAttribute("style","["+f[l].getAttribute("style").length+"]"),null!=f[l].parentNode&&"root"!=f[l].parentNode.nodeName&&null!=f[l].parentNode.parentNode&&(f[l].setAttribute("id",+f[l].parentNode.getAttribute("id")),f[l].parentNode.parentNode.replaceChild(f[l],f[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==+DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){z=null!=z?z:!0;C=null!=C?C:!1;I=null!=I?I:!Editor.defaultCompressed;var X=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=+this.pages[0]){var ba=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());X.setBackgroundImage=this.editor.graph.setBackgroundImage;X.background=this.editor.graph.background;var ha=null!=this.pages?this.pages[0]:null;null==ha||this.currentPage==ha?X.setBackgroundImage(this.editor.graph.backgroundImage):null!=ha.viewState&&null!=ha.viewState&&X.setBackgroundImage(ha.viewState.backgroundImage);X.getGlobalVariable=function(ma){return"page"==ma&&null!=ha?ha.getName():"pagenumber"==ma?1:+ba.apply(this,arguments)};document.body.appendChild(X.container);null!=ha&&X.model.setRoot(ha.root)}F=null!=F?F:this.getXmlFileData(z,C,I,ca);K=null!=K?K:this.getCurrentFile();c=this.createFileData(F,X,K,window.location.href,c,f,l,t,z,N,I,da,ea);X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,z,C){C=null!=C?C:!0;var F=null,N=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());+var K=f.view.scale;C=Math.floor(F.x/K-f.view.translate.x);K=Math.floor(F.y/K-f.view.translate.y);F=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(N=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",C);c.setAttribute("y0",K)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=t&&c.setAttribute("edit",t));null!=z&&(z=z.replace(/&/g,"&"));c=+null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";t=Graph.compress(c);Graph.decompress(t)!=c&&(t=encodeURIComponent(c));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"++(null==z&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+t+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+N+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};+EditorUi.prototype.getHtml2=function(c,f,l,t,z){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=z&&(z=z.replace(/&/g,"&"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"++(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>\n'+(null==z?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'++z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,l=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[f],"cause",[l]),Error(mxResources.get("notADiagramFile")++" ("+l+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),l={},0<c.length)){var t=this.getHashObject(),z=null;this.fileNode=f;this.pages=[];for(var C=0;C<c.length;C++){null==c[C].getAttribute("id")&&c[C].setAttribute("id",C);f=new DiagramPage(c[C]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[C+1]));this.pages.push(f);if(null==t.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||+null!=t.pageId&&f.getId()==t.pageId)z=f;if(null==l[f.getId()])l[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=null!=z?z:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);+this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var F=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(C=0;C<F.length;C++)f[F[C]]=!0;var N=this.editor.graph.getModel(),K=N.getChildren(N.root);for(C=0;C<K.length;C++){var I=K[C];N.setVisible(I,f[I.id]||!1)}}catch(ca){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();+f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,l,t,z,+C,F,N,K,I,ca,da,ea,X,ba,ha){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var ma=this.getBaseFilename(!z),Y=ma+("xml"==c||"pdf"==c&&ca?".drawio":"")+"."+c;if("xml"==c){var la=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,z,null,null,null,f);this.saveData(Y,c,la,"text/xml")}else if("html"==c)la=this.getHtml2(this.getFileData(!0),this.editor.graph,ma),this.saveData(Y,c,la,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==+c?Y=ma+".png":"jpeg"==c&&(Y=ma+".jpg"),this.saveRequest(Y,c,mxUtils.bind(this,function(U,P){try{return this.createDownloadRequest(U,c,t,P,F,z,N,K,I,ca,da,void 0,void 0,!C,ea,X,ba,ha)}catch(T){this.handleError(T)}}));else{var Z=null,k=mxUtils.bind(this,function(U){U.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",U,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==c){var A=this.editor.graph.background;+if(F||A==mxConstants.NONE)A=null;var J=this.editor.graph.getSvg(A,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(J);this.editor.convertImages(J,mxUtils.bind(this,mxUtils.bind(this,function(U){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(U))})))}else Y=ma+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(U){this.spinner.stop();k(U)}),t)}}catch(U){this.handleError(U)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,z,C,F,N,K,+I,ca,da,ea,X,ba,ha,ma,Y){c=this.downloadRequestBuilder(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha,ma,Y);f="";for(var la in c)l=c[la],null!=l&&(f+=la+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha,ma,Y){var la=this.editor.graph,Z=la.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var k=null,A=null,J=null;if(!EditorUi.isElectronApp&&+(Z.width*Z.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};I=I?"1":"0";"pdf"==f&&(null!=ca?(k=ca.from,A=ca.to):0==C&&(J="1"));"xmlpng"==f&&(I="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){k=C;break}C=la.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;z={globalVars:la.getExportVariables()};+K&&(z.grid={size:la.gridSize,steps:la.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:la.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:k,to:A,allPages:J,bg:null!=C?C:mxConstants.NONE,base64:t,embedXml:I,xml:l,filename:null!=c?c:"",extras:JSON.stringify(z),scale:F,border:N,pageMargin:ba,w:da&&isFinite(da)?da:null,h:ea&&isFinite(ea)?ea:null,crop:null!=X&&X?"1":"0",fit:null!=ha&&ha?"1":"0",sheetsAcross:ma,+sheetsDown:Y}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{f=JSON.parse(c)}catch(t){}}}return f};EditorUi.prototype.updateHashObject=+function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var l=f.lastIndexOf("#");0<l&&(f=f.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(t){}0<l&&0<f.lastIndexOf("#")?+window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var t=window.location.hash,z=mxUtils.bind(this,function(F){var N=null!=c.data?c.data:"";null!=F&&0<F.length&&(0<N.length&&(N+="\n"),N+=F);F=new LocalFile(this,"csv"!=c.format&&0<N.length?N:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return t};this.fileLoaded(F);"csv"==c.format&&this.importCsv(N,mxUtils.bind(this,function(ea){this.editor.undoManager.clear();+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,I=null,ca=mxUtils.bind(this,function(){var ea=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(X){ea===this.currentPage&&(200<=X.getStatus()&&300>=X.getStatus()?(this.updateDiagram(X.getText()),da()):this.handleError({message:mxResources.get("error")+" "+X.getStatus()}))}),mxUtils.bind(this,+function(X){this.handleError(X)}))}),da=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(ca,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){da();ca()}));da();ca()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(F){z(F)}),mxUtils.bind(this,function(F){null!=l&&l(F)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(Z){var k=new mxCellOverlay(Z.image||+z.warningImage,Z.tooltip,Z.align,Z.valign,Z.offset);k.addListener(mxEvent.CLICK,function(A,J){t.alert(Z.tooltip)});return k}var l=null,t=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var z=this.editor.graph,C=z.getModel();C.beginUpdate();var F=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var N=C.getCell(c.getAttribute("id"));if(null!=N){try{var K=c.getAttribute("value");if(null!=K){var I=mxUtils.parseXml(K).documentElement;+if(null!=I)if("1"==I.getAttribute("replace-value"))C.setValue(N,I);else for(var ca=I.attributes,da=0;da<ca.length;da++)z.setAttributeForCell(N,ca[da].nodeName,0<ca[da].nodeValue.length?ca[da].nodeValue:null)}}catch(Z){null!=window.console&&console.log("Error in value for "+N.id+": "+Z)}try{var ea=c.getAttribute("style");null!=ea&&z.model.setStyle(N,ea)}catch(Z){null!=window.console&&console.log("Error in style for "+N.id+": "+Z)}try{var X=c.getAttribute("icon");if(null!=X){var ba=0<X.length?JSON.parse(X):+null;null!=ba&&ba.append||z.removeCellOverlays(N);null!=ba&&z.addCellOverlay(N,f(ba))}}catch(Z){null!=window.console&&console.log("Error in icon for "+N.id+": "+Z)}try{var ha=c.getAttribute("geometry");if(null!=ha){ha=JSON.parse(ha);var ma=z.getCellGeometry(N);if(null!=ma){ma=ma.clone();for(key in ha){var Y=parseFloat(ha[key]);"dx"==key?ma.x+=Y:"dy"==key?ma.y+=Y:"dw"==key?ma.width+=Y:"dh"==key?ma.height+=Y:ma[key]=parseFloat(ha[key])}z.model.setGeometry(N,ma)}}}catch(Z){null!=window.console&&console.log("Error in icon for "++N.id+": "+Z)}}}else if("model"==c.nodeName){for(var la=c.firstChild;null!=la&&la.nodeType!=mxConstants.NODETYPE_ELEMENT;)la=la.nextSibling;null!=la&&(new mxCodec(c.firstChild)).decode(la,C)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(z.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(F=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):+1);c=c.nextSibling}}finally{C.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return l};EditorUi.prototype.getCopyFilename=function(c,f){var l=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var t=l.lastIndexOf(".");0<=t&&(c=l.substring(t),l=l.substring(0,t));if(f){f=l;var z=new Date;l=z.getFullYear();t=z.getMonth()+1;var C=z.getDate(),F=z.getHours(),N=z.getMinutes();z=z.getSeconds();l=f+(" "+(l+"-"+t+"-"+C+"-"+F+"-"+N+"-"+z))}return l=mxResources.get("copyOf",+[l])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",[c])}catch(l){}};EditorUi.prototype.fileLoaded=function(c,f,l){var t=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var z=!1;this.hideDialog();null!=t&&(t.removeListener(this.descriptorChangedListener),this.logIfModified(t,!0),t.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var C=mxUtils.bind(this,function(){this.setGraphEnabled(!1);+this.setCurrentFile(null);null!=t&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility=+"");this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.editor.setStatus(""):this.editor.setStatus('<div class="geStatusBox" title="'++mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=l&&l();this.editor.fireEvent(new mxEventObject("fileLoaded"));z=!0;if(!this.isOffline()&&null!=+c.getMode()){var F="1"==urlParams.sketch?"sketch":uiTheme;if(null==F)F="default";else if("sketch"==F||"min"==F)F+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(N){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()++1),mxSettings.save()}catch(N){}}catch(N){this.fileLoadedError=N;if(null!=c)try{c.close()}catch(K){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||C():C()});f?c():(null!=N.fallbackFileData&&(N.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var K=new LocalFile(this,N.fallbackFileData,this.defaultFilename,+!0);this.fileLoaded(K)})}),this.handleError(N,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else C();return z};EditorUi.prototype.getHashValueForPages=function(c,f){var l=0,t=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var C=0;C<c.length;C++){this.updatePageRoot(c[C]);var F=c[C].node.cloneNode(!1);F.removeAttribute("name");t.root=c[C].root;var N=z.encode(t);this.editor.graph.saveViewState(c[C].viewState,N,!0);N.removeAttribute("pageWidth");+N.removeAttribute("pageHeight");F.appendChild(N);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(F,function(K,I,ca,da){return!da||"mxGeometry"!=K.nodeName&&"mxPoint"!=K.nodeName||"x"!=I&&"y"!=I&&"width"!=I&&"height"!=I?da&&"mxCell"==K.nodeName&&"previous"==I?null:ca:Math.round(ca)},f)<<0}return l};EditorUi.prototype.hashValue=function(c,f,l){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&+"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(t^=this.hashValue(c.nodeName,f,l));if(null!=c.attributes){null!=l&&(l.attrCount+=c.attributes.length);for(var z=0;z<c.attributes.length;z++){var C=c.attributes[z].name,F=null!=f?f(c,C,c.attributes[z].value,!0):c.attributes[z].value;null!=F&&(t^=this.hashValue(C,f,l)+this.hashValue(F,f,l))}}if(null!=c.childNodes)for(z=0;z<c.childNodes.length;z++)t=(t<<5)-t+this.hashValue(c.childNodes[z],f,l)<<0}else if(null!=c&&"function"!==+typeof c){c=String(c);f=0;null!=l&&(l.byteCount+=c.length);for(z=0;z<c.length;z++)f=(f<<5)-f+c.charCodeAt(z)<<0;t^=f}return t};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,l,t,z,C,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,+".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var l=f.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(c,null,2));+f.appendChild(l);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var l=0;l<f.length;l++)f[l].parentNode.removeChild(f[l]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,+f){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));c=null!=c?c:l.firstChild.nextSibling.nextSibling;f=l.lastChild;var t=f.previousSibling;l.insertBefore(f,c);l.insertBefore(t,f)}};EditorUi.prototype.loadLibrary=function(c,f){var l=mxUtils.parseXml(c.getData());if("mxlibrary"==l.documentElement.nodeName){var t=JSON.parse(mxUtils.getTextContent(l.documentElement));+this.libraryLoaded(c,t,l.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,f,l,t){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var z=null;if(c.constructor!=StorageLibrary||+".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var C=0;C<this.openLibraries.length;C++)if(this.openLibraries[C].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[C],this.openLibraries);break}z={file:c,images:f,title:l,expand:t};this.openLibraries.push(z)}else this.scratchpad=c;C=this.sidebar.palettes[c.getHash()];C=null!=C?C[C.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var F=null,N=mxUtils.bind(this,function(Y,la){0==Y.length&&c.isEditable()?+(null==F&&(F=document.createElement("div"),F.className="geDropTarget",mxUtils.write(F,mxResources.get("dragElementsHere"))),la.appendChild(F)):this.addLibraryEntries(Y,la)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var K=this.sidebar.addPalette(c.getHash(),l,null!=t?t:!0,mxUtils.bind(this,function(Y){N(f,Y)}));null!=z&&(z.div=K);this.repositionLibrary(C,"L.scratchpad"!=c.getHash());t=K.parentNode.previousSibling;+l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var I=document.createElement("div");I.style.backgroundColor="inherit";t.style.position="relative";var ca=document.createElement("img");ca.className="geAdaptiveAsset";ca.setAttribute("src",Editor.crossImage);ca.setAttribute("title",mxResources.get("close"));ca.setAttribute("valign","absmiddle");ca.setAttribute("border","0");ca.style.position="relative";ca.style.top="2px";+ca.style.width="14px";ca.style.cursor="pointer";ca.style.margin="0 3px";var da=null;if(".scratchpad"!=c.title||this.closableScratchpad)I.appendChild(ca),mxEvent.addListener(ca,"click",mxUtils.bind(this,function(Y){if(!mxEvent.isConsumed(Y)){var la=mxUtils.bind(this,function(){null!=z&&mxUtils.remove(z,this.openLibraries);this.closeLibrary(c)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,la,mxResources.get("cancel"),mxResources.get("discardChanges")):la();mxEvent.consume(Y)}}));if(c.isEditable()){var ea=+this.editor.graph,X=null;l=mxUtils.bind(this,function(Y){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(Y)});var ba=mxUtils.bind(this,function(Y){c.setModified(!0);c.isAutosave()?(null!=X&&null!=X.parentNode&&X.parentNode.removeChild(X),X=ca.cloneNode(!1),X.setAttribute("src",Editor.spinImage),X.setAttribute("title",mxResources.get("saving")),X.style.cursor="default",X.style.marginRight="2px",X.style.marginTop="-2px",I.insertBefore(X,I.firstChild),this.saveLibrary(c.getTitle(),+f,c,c.getMode(),!0,!0,function(){null!=X&&null!=X.parentNode&&X.parentNode.removeChild(X)})):null==da&&(da=ca.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),I.insertBefore(da,I.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(la){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==da||c.isModified()||(da.parentNode.removeChild(da),da=null)});mxEvent.consume(la)})))}),ha=mxUtils.bind(this,+function(Y,la,Z,k){Y=ea.cloneCells(mxUtils.sortCells(ea.model.getTopmostCells(Y)));for(var A=0;A<Y.length;A++){var J=ea.getCellGeometry(Y[A]);null!=J&&J.translate(-la.x,-la.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(Y,la.width,la.height,k||"",!0,null,!1));Y=mxUtils.getXml(this.editor.graph.encodeCells(Y));Editor.defaultCompressed&&(Y=Graph.compress(Y));la={xml:Y,w:la.width,h:la.height};null!=k&&(la.title=k);f.push(la);ba(Z);null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),+F=null)}),ma=mxUtils.bind(this,function(Y){if(ea.isSelectionEmpty())ea.getRubberband().isActive()?(ea.getRubberband().execute(Y),ea.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var la=ea.getSelectionCells(),Z=ea.view.getBounds(la);if(null!=Z&&0<Z.width&&0<Z.height){var k=ea.view.scale;Z.x/=k;Z.y/=k;Z.width/=k;Z.height/=k;Z.x-=ea.view.translate.x;Z.y-=ea.view.translate.y;ha(la,Z)}else this.showError(mxResources.get("error"),+mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(Y)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(Y){ea.isMouseDown&&null!=ea.panningManager&&null!=ea.graphHandler.first&&(ea.graphHandler.suspend(),null!=ea.graphHandler.hint&&(ea.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="light-dark(#fefefe, #000000)",K.style.cursor="copy",ea.panningManager.stop(),ea.autoScroll=!1,mxEvent.consume(Y))}),mxUtils.bind(this,function(Y){ea.isMouseDown&&+null!=ea.panningManager&&null!=ea.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,ea.panningManager.stop(),ea.graphHandler.reset(),ea.isMouseDown=!1,ea.autoScroll=!0,ma(Y),mxEvent.consume(Y))}));mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(Y){ea.isMouseDown&&null!=ea.graphHandler.first&&(ea.graphHandler.resume(),null!=ea.graphHandler.hint&&(ea.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",+ea.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Y){K.style.backgroundColor="light-dark(#fefefe, #000000)";Y.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Y){K.style.cursor="";K.style.backgroundColor="";0<Y.dataTransfer.files.length&&this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(la,+Z,k,A,J,U,P,T,W){if(null!=la&&"image/"==Z.substring(0,6))la="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(la),la=[new mxCell("",new mxGeometry(0,0,J,U),la)],la[0].vertex=!0,ha(la,new mxRectangle(0,0,J,U),Y,mxEvent.isAltDown(Y)?null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," ")),null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null);else{var aa=!1,ja=mxUtils.bind(this,function(pa,sa){null!=pa&&"application/pdf"==+sa&&(sa=Editor.extractGraphModelFromPdf(pa),null!=sa&&0<sa.length&&(pa=sa));if(null!=pa)if(pa=mxUtils.parseXml(pa),"mxlibrary"==pa.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(pa.documentElement));N(qa,K);f=f.concat(qa);ba(Y);this.spinner.stop();aa=!0}catch(Ea){}else if("mxfile"==pa.documentElement.nodeName)try{var wa=pa.documentElement.getElementsByTagName("diagram");for(qa=0;qa<wa.length;qa++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(wa[qa])),za=this.editor.graph.getBoundingBoxFromGeometry(Ba);+null!=za&&ha(Ba,new mxRectangle(0,0,za.width,za.height),Y)}aa=!0}catch(Ea){null!=window.console&&console.log("error in drop handler:",Ea)}aa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null)});null!=W&&null!=P&&EditorUi.isVisioFilename(P)?this.importVisio(W,function(pa){ja(pa,"text/xml")},null,P):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(la,P)&&null!=W?this.isExternalDataComms()?+this.parseFile(W,mxUtils.bind(this,function(pa){4==pa.readyState&&(this.spinner.stop(),200<=pa.status&&299>=pa.status?ja(pa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==pa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):ja(la,Z)}}));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"dragleave",function(Y){K.style.cursor=+"";K.style.backgroundColor="";Y.stopPropagation();Y.preventDefault()}));ca=ca.cloneNode(!1);ca.setAttribute("src",Editor.editImage);ca.setAttribute("title",mxResources.get("edit"));I.insertBefore(ca,I.firstChild);mxEvent.addListener(ca,"click",l);l=ca.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));I.insertBefore(l,I.firstChild);mxEvent.addListener(l,"click",ma);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ma);this.isOffline()||".scratchpad"!=+c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink),C=l.getElementsByTagName("img")[0],l.style.marginRight="1px",C.style.marginTop="-2px",C.style.opacity="",I.insertBefore(l,I.firstChild))}t.appendChild(I);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var t=c[l],z=t.data;if(null!=z){z="data:"==z.substring(0,5)?this.convertDataUri(z):z;var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";+"fixed"==t.aspect&&(C+="aspect=fixed;");C=C+"image="+z+";";null!=t.style&&(C+=t.style);f.appendChild(this.sidebar.createVertexTemplate(C,t.w,t.h,"",t.title||"",!1,null,!0))}else if(null!=t.xml){var F=this.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml)),N=0==F.length?mxResources.get("drawingEmpty"):null!=t.title?t.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(F,t.w,t.h,N,!0,null,!0))}}catch(K){N=null!=K.message?mxResources.get("error")+": "+K.message:String(K),+C=this.sidebar.createVertexTemplateFromCells(null,t.w,t.h,N,!0,null,!0),f.appendChild(C)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=+"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38);"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,l,t,z,C,F){c=new ImageDialog(this,c,f,l,t,z,C,F);this.showDialog(c.container,+Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,l,t,z,C){var F=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=F?JSON.stringify(JSON.parse(F),null,2):"",mxUtils.bind(this,function(N){if(null!=N)try{if(null!=C&&C(N),N==F)this.hideDialog();else{if(0<N.length){var K=JSON.parse(N);localStorage.setItem(f,JSON.stringify(K))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(I){this.handleError(I)}}),+null,mxResources.get("close"),null,null,null,!0,null,null,z,l,t);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,l,t){c=null!=c?c:mxUtils.bind(this,function(z,C,F,N){C||(z=new ChangePageSetup(this,t?F:null,z),z.ignoreColor=!t,null!=N&&t&&(z.shadowVisible=N),this.editor.graph.model.execute(z))});c=new BackgroundImageDialog(this,c,f,l,t);this.showDialog(c.container,400,t?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,+f,l,t,z){c=new LibraryDialog(this,c,f,l,t,z);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,l,+t,z,C,F){var N=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{F||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!F||null==window.console||console.error("EditorUi.handleError:",c)}catch(ea){}if(null!=K||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"),+!1);var I=mxResources.get("ok"),ca=null;f=null!=f?f:mxResources.get("error");if(null!=K){null!=K.retry&&(I=mxResources.get("cancel"),ca=function(){N();K.retry()});if(404==K.code||404==K.status||403==K.code){F=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var da=null!=z?null:null!=+C?C:window.location.hash;if(null!=da&&("#G"==da.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==da.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==K.code||404==K.status)){da="#U"==da.substring(0,2)?da.substring(45,da.lastIndexOf("%26ex")):da.substring(2);this.showError(f,F,mxResources.get("tryOpeningViaThisPage"),+mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);null!=t&&t()}),ca,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ea(){ma.innerText="";for(var Y=0;Y<X.length;Y++){var la=document.createElement("option");mxUtils.write(la,X[Y].displayName);la.value=Y;ma.appendChild(la);la=document.createElement("option");la.innerHTML=" ";mxUtils.write(la,"<"+X[Y].email+">");la.setAttribute("disabled","disabled");ma.appendChild(la)}la=+document.createElement("option");mxUtils.write(la,mxResources.get("addAccount"));la.value=X.length;ma.appendChild(la)}var X=this.drive.getUsersList(),ba=document.createElement("div"),ha=document.createElement("div");ha.style.marginBottom="6px";mxUtils.write(ha,mxResources.get("changeUser")+": ");ba.appendChild(ha);var ma=document.createElement("select");ma.style.width="100%";ea();mxEvent.addListener(ma,"change",mxUtils.bind(this,function(){var Y=ma.value,la=X.length!=Y;la&&this.drive.setUser(X[Y]);+this.drive.authorize(la,mxUtils.bind(this,function(){la||(X=this.drive.getUsersList(),ea())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ba.appendChild(ma);ba=new CustomDialog(this,ba,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ba.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=K.message?F=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,+!1):mxUtils.htmlEntities(K.message,!1):null!=K.response&&null!=K.response.error?F=mxUtils.htmlEntities(K.response.error,!1):"undefined"!==typeof window.App&&(K.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout"),!1):K.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof K&&0<K.length&&(F=mxUtils.htmlEntities(K,!1)))}z=c=null;null!=K&&null!=K.helpLink?(c=mxResources.get("help"),z=mxUtils.bind(this,function(){return this.editor.graph.openLink(K.helpLink)})):+null!=K&&null!=K.ownerEmail?(c=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+c+": "+K.ownerEmail+")",!1),z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(c=K.alternateAction.label,z=K.alternateAction.funct);this.showError(f,F,I,l,ca,null,null,c,z,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,+l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,t,z,C){c=null!=c?c:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){F();null!=f&&f()},function(){F();null!=l&&l()},t,z,null,null,null,null,N);this.showDialog(c.container,340,46+N,!0,C);c.init()};EditorUi.prototype.showBanner=function(c,f,l,t,z,C,F,N,K){var I=!1;if(!(this.bannerShowing||this["hideBanner"++c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){C=null!=C?C:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";var ca=z?500:1E3;I=z?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var da=document.createElement("div");da.style.cssText="position:absolute;"+C+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex++";"+I;mxUtils.setPrefixedStyle(da.style,"transform",F);mxUtils.setPrefixedStyle(da.style,"transition","all "+ca+"ms ease");da.className="geBtn gePrimaryBtn"+(z?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(da.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(da.style,"transform-origin",K);if(!z){var ea=document.createElement("img");ea.setAttribute("src",IMAGE_PATH+"/logo.png");ea.setAttribute("border","0");ea.setAttribute("align","absmiddle");ea.style.cssText=+"margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";da.appendChild(ea);ea=document.createElement("img");ea.setAttribute("src",Dialog.prototype.closeImage);ea.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ea.setAttribute("border","0");ea.style.cssText=(z?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";da.appendChild(ea)}mxUtils.write(da,f);document.body.appendChild(da);this.bannerShowing=+!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var X=document.createElement("input");X.setAttribute("type","checkbox");X.setAttribute("id","geDoNotShowAgainCheckbox");X.style.marginRight="6px";if(!t){f.appendChild(X);var ba=document.createElement("label");ba.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ba,mxResources.get("doNotShowAgain"));f.appendChild(ba);+da.style.paddingBottom=z?"16px":"30px";da.appendChild(f)}var ha=mxUtils.bind(this,function(){null!=da.parentNode&&(da.parentNode.removeChild(da),this.bannerShowing=!1,X.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ea&&mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);ha()}));var ma=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",F);window.setTimeout(mxUtils.bind(this,+function(){ha()}),ca)});mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){var la=mxEvent.getSource(Y);la!=X&&la!=ba?(null!=l&&l(),ha(),mxEvent.consume(Y)):ma()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",N)}),ca/2);window.setTimeout(ma,z?4E3:3E4);I=!0}return I};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,l,t){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<t&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",t));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,l,t,z){var C="jpeg"==l?"jpg":l;t=this.getBaseFilename(t)+(null!=f?".drawio":"")+"."+C;c=this.createImageDataUri(c,+f,l,z);this.saveData(t,C,c.substring(c.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,+!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,l,t,z,C){"text/xml"!=l||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=C?C:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=t?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(c,!0):(l.document.write(c),+l.document.close(),l.document.execCommand("SaveAs",!0,f),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,l,t);else{var F=document.createElement("a");C=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var N=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);C=65==(N?parseInt(N[2],10):+!1)?!1:C}if(C||this.isOffline()){F.href=URL.createObjectURL(t?this.base64ToBlob(c,l):new Blob([c],{type:l}));C?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},2E4),F.click(),F.parentNode.removeChild(F)}catch(K){}}else this.createEchoRequest(c,f,l,t,z).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,l,t,z,C){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=+l?"&mime="+l:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,z,C,F,N){C=null!=C?C:!1;F=null!=F?F:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(ca,da,ea,X){try{if("_blank"==da)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var ba=new EmbedDialog(this,c);this.showDialog(ba.container,+450,240,!0,!0);ba.init()}else{var ha=window.open("about:blank");null==ha?mxUtils.popup(c,!0):(ha.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ha.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(c,ca,l,t,null,N);else if(null!=ca&&0<ca.length){var ma=mxUtils.bind(this,function(Y){try{this.exportFile(c,ca,l,t,da,Y)}catch(la){this.handleError(la)}});null!=X?ma(X):this.pickFolder(da,ma)}}catch(Y){this.handleError(Y)}});z=[];C||z.push(App.MODE_BROWSER);F||+z.push("_blank");var I=new SaveDialog(this,f,mxUtils.bind(this,function(ca,da,ea){K(ca.value,da,ca,ea);this.hideDialog(null,null,I.container)}),z,c,l,t);this.showDialog(I.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));I.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var z="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var C=mxUtils.parseXml(c).documentElement.style.backgroundColor;+""!=C&&(z="background: "+C+";")}z='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+z+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||l?(C=l?c:btoa(unescape(encodeURIComponent(c))),t.document.write(z+'<img style="max-width:100%;" src="data:'+f+";base64,"+C+'"/></body></html>')):t.document.write(z+c+"</body></html>"):t.document.write(z+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");t.document.close()}};var m=EditorUi.prototype.addChromelessToolbarItems;+EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(t){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),+!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=+Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;+mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var z=f.getBoundingClientRect();this.tagsDialog.style.left=z.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";z=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=z.zIndex;document.body.appendChild(this.tagsDialog);+this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(t)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var t=this.editor.graph.getAllTags();f.style.display=0<t.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=+null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var l=c(mxUtils.bind(this,function(t){var z=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",z);null!=this.exportDialog&&+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)z.apply(this);else{this.exportDialog=document.createElement("div");var C=l.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=+"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=C.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";C=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=C.zIndex;var F=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});F.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",z);this.editor.exportToCanvas(mxUtils.bind(this,function(N){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var K=this.createImageDataUri(N,null,"png");N=document.createElement("img");N.style.maxWidth="140px";N.style.maxHeight="140px";+N.style.cursor="pointer";N.style.backgroundColor="white";N.setAttribute("title",mxResources.get("openInNewWindow"));N.setAttribute("border","0");N.setAttribute("src",K);this.exportDialog.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.openInNewWindow(K.substring(K.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(N){F.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),+this.exportDialog=null);this.handleError(N)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,l,t,z){this.isLocalFileSave()?this.saveLocalFile(l,c,t,z,f):this.saveRequest(c,f,mxUtils.bind(this,function(C,F){return this.createEchoRequest(l,C,t,z,f,F)}),l,z,t)};EditorUi.prototype.saveRequest=function(c,f,l,t,z,C,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;var N=mxUtils.bind(this,+function(I,ca,da,ea){if("_blank"==ca||null!=I&&0<I.length){var X=l("_blank"==ca?null:I,ca==App.MODE_DEVICE||"download"==ca||null==ca||"_blank"==ca?"0":"1");null!=X&&(ca==App.MODE_DEVICE||"download"==ca||"_blank"==ca?X.simulate(document,"_blank"):(da=mxUtils.bind(this,function(ba){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,I,C,!0,ca,ba)}catch(ha){this.handleError(ha)}else this.spinner.spin(document.body,mxResources.get("saving"))&&X.send(mxUtils.bind(this,function(){this.spinner.stop();+if(200<=X.getStatus()&&299>=X.getStatus())try{this.exportFile(X.getText(),I,C,!0,ca,ba)}catch(ha){this.handleError(ha)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ha){this.spinner.stop();this.handleError(ha)}))}),null!=ea?da(ea):this.pickFolder(ca,da)))}});z=[App.MODE_BROWSER];F||z.push("_blank");var K=new SaveDialog(this,c,mxUtils.bind(this,function(I,ca,da){N(I.value,ca,I,da);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");+this.showDialog(K.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));K.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,l,t,z,C){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,l){f(null)};EditorUi.prototype.exportSvg=+function(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(U){Editor.addRetryToError(U,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X)}));this.handleError(U)})))try{var ba=this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;var ha=f?null:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);null==ha&&0==f&&(ha=this.editor.graph.shapeBackgroundColor);var ma=this.editor.graph.addForeignObjectWarning;+Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var Y=this.editor.graph.createSvgImageExport(z),la=this.editor.graph.getSvg(ha,c,F,N,null,l,null,Y,"blank"==I?"_blank":"self"==I?"_top":null,null,!ea,ca,da);this.editor.graph.addForeignObjectWarning=ma;t&&this.editor.graph.addSvgShadow(la);var Z=this.getBaseFilename()+(z?".drawio":"")+".svg";X=null!=X?X:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",U,"image/svg+xml"):+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});var k=mxUtils.bind(this,function(U){this.spinner.stop();z&&U.setAttribute("content",this.getFileData(!0,null,null,null,l,K,null,null,null,null,null,c,F));X(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(U))});this.editor.graph.mathEnabled&&this.editor.addMathCss(la);var A=mxUtils.bind(this,function(U){Editor.replaceSvgDataUris&&+C&&EditorUi.embedSvgImages(U);Editor.foreignObjectImages&&ea?this.replaceAlternateContent(U,ca,k):k(U)}),J=mxUtils.bind(this,function(U){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(U,A,this.thumbImageCache)):A(U)});ea?this.embedFonts(la,J):(this.editor.addFontCss(la),J(la))}catch(U){this.handleError(U)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(da,ea,X,ba,ha){var ma=mxUtils.createElementNs(c.ownerDocument,+mxConstants.NS_SVG,"image");ma.setAttribute("x",ea);ma.setAttribute("y",X+.5);ma.setAttribute("width",ba.width);ma.setAttribute("height",ba.height);null==ma.setAttributeNS?ma.setAttribute("xlink:href",ha):ma.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",ha);da.replaceChild(ma,da.lastChild);N()}function z(){if(F<ca.length)ca[F++](z)}var C="";f=c.getElementsByTagName("style");for(var F=0;F<f.length;F++)C+=f[F].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,+function(){counter--;0==counter&&l(c)}),K={},I={},ca=[];for(F=0;F<f.length;F++)mxUtils.bind(this,function(da){var ea=da.getElementsByTagName("div");if(0<ea.length)try{var X=ea[0].cloneNode(!0),ba=parseInt(X.style.marginLeft),ha=parseInt(X.style.paddingTop),ma=X.getElementsByTagName("div")[1],Y=ea=!1,la=X.style.alignItems,Z=X.style.justifyContent;if(null!=X.style.writingMode){var k=X.style.writingMode;Y="vertical-"==k.substring(0,9);ea="-rl"==k.substring(k.length-3)}var A=!Y&&"1px"==X.style.width||+Y&&"1px"==X.style.height;if(!Y&&"1px"==X.style.height||Y&&"1px"==X.style.width)X.style.alignItems=Y&&ea?"unsafe flex-end":"unsafe flex-start";A&&(X.style.justifyContent="unsafe flex-start");X.style.paddingTop="";X.style.marginLeft="";var J=X.outerHTML,U=K[J];null==U&&(X.style.position="absolute",X.style.visibility="hidden",document.body.appendChild(X),k=1,k="1px"==X.style.width?ma.offsetWidth:parseInt(X.style.width),A=1,A="1px"==X.style.height?ma.offsetHeight:parseInt(X.style.height),document.body.removeChild(X),+U=new mxRectangle(ba,ha,k,A),K[J]=U);"1px"==X.style.height&&("unsafe center"==la?ha-=U.height/2:"unsafe flex-end"==la&&(ha-=U.height));if("1px"==X.style.width)if(!Y&&"unsafe center"==Z||Y&&"unsafe center"==la)ba-=U.width/2;else if(!Y&&"unsafe flex-end"==Z||Y&&(!ea&&"unsafe flex-end"==la||ea&&"unsafe flex-start"==la))ba-=U.width;U=new mxRectangle(ba,ha,U.width,U.height+parseInt(ma.style.fontSize)/4);ca.push(mxUtils.bind(this,function(P){var T=I[J];null==T?Graph.htmlToPng(J,U.width,U.height,mxUtils.bind(this,+function(W){t(da,ba,ha,U,W);I[J]=W;P()}),C):(t(da,ba,ha,U,T),P())}))}catch(P){N()}else N()})(f[F]);0==counter&&l(c);F=0;z()};EditorUi.prototype.addRadiobox=function(c,f,l,t,z,C,F){return this.addCheckbox(c,l,t,z,C,F,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;var K=document.createElement("input");K.style.marginRight="8px";K.style.marginTop="16px";K.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();K.id=F;null!=N&&K.setAttribute("name",N);l&&+(K.setAttribute("checked","checked"),K.defaultChecked=!0);t&&K.setAttribute("disabled","disabled");C&&(c.appendChild(K),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",F),c.appendChild(l),z||mxUtils.br(c));return K};EditorUi.prototype.addEditButton=function(c,f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var t=this.getCurrentFile(),z="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(z=window.location.href);+var C=document.createElement("select");C.style.maxWidth="200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));C.appendChild(t);var F=document.createElement("option");F.setAttribute("value","custom");mxUtils.write(F,mxResources.get("custom")+"...");C.appendChild(F);c.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==+C.value){var N=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!=K?(z=K,F.setAttribute("title",K)):(C.value="blank",F.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(N.container,300,80,!0,!1);N.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?+"blank"===C.value?"_blank":z:null},getEditInput:function(){return l},getEditSelect:function(){return C}}};EditorUi.prototype.addLinkSection=function(c,f){function l(){var N=document.createElement("div");N.style.width="100%";N.style.height="100%";N.style.boxSizing="border-box";null!=C&&C!=mxConstants.NONE?(N.style.border="1px solid black",N.style.backgroundColor=C):(N.style.backgroundPosition="center center",N.style.backgroundRepeat="no-repeat",N.style.backgroundImage="url('"+Dialog.prototype.closeImage++"')");F.innerText="";F.appendChild(N)}mxUtils.write(c,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z,mxResources.get("automatic"));t.appendChild(z);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));t.appendChild(z);+z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));t.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var C="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(N){this.pickColor(C||"none",function(K){C=K;l()});+mxEvent.consume(N)}));l();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";c.appendChild(F);mxUtils.br(c);return{getColor:function(){return C},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,t,z,C){C=null!=C?C:[];l&&(C.push("lightbox=1"),+"auto"!=c&&C.push("target="+c),null!=f&&f!=mxConstants.NONE&&C.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&C.push("edit="+encodeURIComponent(t)),z&&C.push("layers=1"),this.editor.graph.foldingEnabled&&C.push("nav=1"));return C};EditorUi.prototype.createLink=function(c,f,l,t,z,C,F,N,K,I,ca){var da=this.getCurrentFile();K=this.createUrlParameters(c,f,t,z,C,K);c=!0;null!=F?l="#U"+encodeURIComponent(F):N||null==da||""==da.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,+null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+da.getHash(),c=!1);c&&null!=da&&null!=da.getTitle()&&da.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(da.getTitle()));I&&1<l.length&&(K.push("open="+l.substring(1)),l="");ca&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());return(t&&(null!=F||null!=da&&da.getMode()!=App.MODE_GITHUB&&da.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||+EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){this.getBasenames();var X={};""!=z&&z!=mxConstants.NONE&&(X.highlight=z);"auto"!==t&&(X.target=t);I||(X.lightbox=!1);X.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(X.zoom=l/100);l=[];F&&(l.push("pages"),X.resize=!0,null!=this.pages&&null!=this.currentPage&&+(X.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),X.resize=!0);N&&l.push("layers");K&&l.push("tags");null!=ea&&(X["dark-mode"]=ea);0<l.length&&(I&&l.push("lightbox"),X.toolbar=l.join(" "));null!=ca&&0<ca.length&&(X.edit=ca);null!=c?X.url=c:X.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(X))+'"></div>';c=null!=c?"&fetch="++encodeURIComponent(c):"";da(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var z=document.createElement("div");z.style.whiteSpace="nowrap";var C=document.createElement("h3");+mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");C=N.cloneNode(!0);C.setAttribute("value",+"copy");F.appendChild(C);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(K);mxUtils.br(F);F.appendChild(N);K=document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));F.appendChild(K);var I=this.getCurrentFile();null==l&&null!=I&&I.constructor==window.DriveFile&&(K=document.createElement("a"),K.style.paddingLeft="12px",K.style.color="gray",K.style.cursor="pointer",mxUtils.write(K,mxResources.get("share")),F.appendChild(K),+mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(I.getId(),I)})));C.setAttribute("checked","checked");null==l&&N.setAttribute("disabled","disabled");z.appendChild(F);F=380;var ca=this.addLinkSection(z),da=document.createElement("select");da.style.maxWidth="260px";da.style.marginLeft="8px";da.style.marginTop="16px";K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));da.appendChild(K);K=document.createElement("option");+K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));da.appendChild(K);K=document.createElement("option");K.setAttribute("value","auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected","selected");da.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+":");z.appendChild(da);mxUtils.br(z);F+=26;var ea=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,":");var X=document.createElement("input");+X.setAttribute("type","text");X.style.marginRight="16px";X.style.width="60px";X.style.marginLeft="4px";X.style.marginRight="12px";X.value="100%";z.appendChild(X);var ba=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=this.pages&&1<this.pages.length;var ha=ha=this.addCheckbox(z,mxResources.get("allPages"),K,!K),ma=this.addCheckbox(z,mxResources.get("layers"),!0),Y=this.addCheckbox(z,mxResources.get("tags"),!0),la=this.addCheckbox(z,mxResources.get("lightbox"),!0),Z=null;if(EditorUi.enableHtmlEditOption){Z=+this.addEditButton(z,la);var k=Z.getEditInput();k.style.marginBottom="16px";F+=50;mxEvent.addListener(la,"change",function(){la.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&la.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,z,mxUtils.bind(this,function(){t(N.checked?l:null,ea.checked,X.value,ca.getTarget(),ca.getColor(),ba.checked,ha.checked,ma.checked,Y.checked,la.checked,+null!=Z?Z.getLink():null,null!=da?da.value:null)}),null,c,f);this.showDialog(c.container,340,F,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,z,C,F,N,K){var I=document.createElement("div");I.style.whiteSpace="nowrap";var ca=document.createElement("h3");mxUtils.write(ca,c||mxResources.get("publish"));ca.style.width="100%";ca.style.textAlign="center";ca.style.marginTop="2px";ca.style.marginBottom="20px";I.appendChild(ca);var da=document.createElement("select");c=30;da.className=+"geBtn";da.style.marginBottom="8px";da.style.marginLeft="0px";da.style.width="100%";da.style.boxSizing="border-box";if(null==N||""==N.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ca=document.createElement("option"),mxUtils.write(ca,mxResources.get("makeCopy")),ca.setAttribute("value","copy"),da.appendChild(ca);ca=document.createElement("option");mxUtils.write(ca,mxResources.get("authorizationRequired"));ca.setAttribute("value","auth");da.appendChild(ca);null!=N&&+""!=N.getHash()||ca.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");da.appendChild(N);null!=F?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",F),da.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));I.appendChild(da);mxUtils.br(I);da.focus();var ea=null,X=null;if(null!=f||null!=l)c+=30,mxUtils.write(I,mxResources.get("width")++":"),ea=document.createElement("input"),ea.setAttribute("type","text"),ea.style.marginRight="16px",ea.style.width="50px",ea.style.marginLeft="6px",ea.style.marginRight="16px",ea.style.marginBottom="10px",ea.value="100%",I.appendChild(ea),mxUtils.write(I,mxResources.get("height")+":"),X=document.createElement("input"),X.setAttribute("type","text"),X.style.width="50px",X.style.marginLeft="6px",X.style.marginBottom="10px",X.value=l+"px",I.appendChild(X),mxUtils.br(I);var ba=this.addLinkSection(I,t),+ha=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),ha=this.addCheckbox(I,mxResources.get("selectedPage")+": "+f));var ma=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!t),Y=this.addEditButton(I,ma),la=Y.getEditInput();t&&(la.style.marginLeft=ma.style.marginLeft,ma.style.display="none",c-=20);var Z=this.addCheckbox(I,mxResources.get("layers"),!0);+Z.style.marginLeft=la.style.marginLeft;Z.style.marginTop="8px";var k=this.addCheckbox(I,mxResources.get("tags"),!0);k.style.marginLeft=la.style.marginLeft;k.style.marginBottom="16px";k.style.marginTop="16px";mxEvent.addListener(ma,"change",function(){ma.checked?(Z.removeAttribute("disabled"),la.removeAttribute("disabled"),k.removeAttribute("disabled")):(Z.setAttribute("disabled","disabled"),la.setAttribute("disabled","disabled"),k.setAttribute("disabled","disabled"));la.checked&&ma.checked?Y.getEditSelect().removeAttribute("disabled"):+Y.getEditSelect().setAttribute("disabled","disabled")});t=new CustomDialog(this,I,mxUtils.bind(this,function(){K(ba.getTarget(),ba.getColor(),null==ha?!1:ha.checked,ma.checked,Y.getLink(),Z.checked,null!=ea?ea.value:null,null!=X?X.value:null,k.checked,da.value)}),null,mxResources.get("create"),z,C);this.showDialog(t.container,340,296+c,!0,!0);null!=ea?(ea.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ea.select():document.execCommand("selectAll",!1,null)):null==da.parentNode;ba.focus()};+EditorUi.prototype.showRemoteExportDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(z?"10":"4")+"px";C.appendChild(F);if(z){mxUtils.write(C,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft=+"4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";C.appendChild(N);mxUtils.write(C,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=this.lastExportBorder||"0";C.appendChild(K);mxUtils.br(C)}var I=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ca=t?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),+Editor.defaultIncludeDiagram);F=this.editor.graph;var da=t?null:this.addCheckbox(C,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=da&&(da.style.marginBottom="16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ea=parseInt(N.value)/100||1,X=parseInt(K.value)||0;l(!I.checked,null!=ca?ca.checked:!1,null!=da?da.checked:!1,ea,X)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=+function(c,f,l,t,z,C,F,N,K){F=null!=F?F:Editor.defaultIncludeDiagram;var I=document.createElement("div");I.style.whiteSpace="nowrap";var ca=this.editor.graph,da="jpeg"==N||"webp"==N?220:320,ea=document.createElement("h3");mxUtils.write(ea,c);ea.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";I.appendChild(ea);mxUtils.write(I,mxResources.get("zoom")+":");var X=document.createElement("input");X.setAttribute("type","text");X.style.marginRight="16px";X.style.width="60px";+X.style.marginLeft="4px";X.style.marginRight="12px";X.value=this.lastExportZoom||"100%";I.appendChild(X);mxUtils.write(I,mxResources.get("borderWidth")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.value=this.lastExportBorder||"0";I.appendChild(ba);mxUtils.br(I);var ha=this.addCheckbox(I,mxResources.get("selectionOnly"),!1,ca.isSelectionEmpty()),ma=document.createElement("input");ma.style.marginTop=+"16px";ma.style.marginRight="8px";ma.style.marginLeft="24px";ma.setAttribute("disabled","disabled");ma.setAttribute("type","checkbox");var Y=document.createElement("select");Y.style.marginTop="16px";Y.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ea=0;ea<c.length;ea++)if(!ca.isSelectionEmpty()||"selectionOnly"!=c[ea]){var la=document.createElement("option");mxUtils.write(la,mxResources.get(c[ea]));la.setAttribute("value",c[ea]);Y.appendChild(la)}K?(mxUtils.write(I,mxResources.get("size")++":"),I.appendChild(Y),mxUtils.br(I),da+=26,mxEvent.addListener(Y,"change",function(){"selectionOnly"==Y.value&&(ha.checked=!0)})):C&&(I.appendChild(ma),mxUtils.write(I,mxResources.get("crop")),mxUtils.br(I),da+=30,mxEvent.addListener(ha,"change",function(){ha.checked?ma.removeAttribute("disabled"):ma.setAttribute("disabled","disabled")}));ca.isSelectionEmpty()?K&&(ha.style.display="none",ha.nextSibling.style.display="none",ha.nextSibling.nextSibling.style.display="none",da-=30):(Y.value="diagram",+ma.setAttribute("checked","checked"),ma.defaultChecked=!0,mxEvent.addListener(ha,"change",function(){Y.value=ha.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(I,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=N&&"webp"!=N),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));k.appendChild(C);K=document.createElement("option");+K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));k.appendChild(K);"svg"==N?(C=document.createElement("option"),C.setAttribute("value","auto"),mxUtils.write(C,mxResources.get("automatic")),C.setAttribute("selected","selected"),k.appendChild(C)):Editor.isDarkMode()?K.setAttribute("selected","selected"):C.setAttribute("selected","selected");mxUtils.write(I,mxResources.get("appearance")+":");I.appendChild(k);mxUtils.br(I);da+=26;var A=this.addCheckbox(I,mxResources.get("shadow"),+ca.shadowVisible),J=null;if("png"==N||"jpeg"==N||"webp"==N)J=this.addCheckbox(I,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var U=this.addCheckbox(I,mxResources.get("includeCopyOfMyDiagram")+":",F,null,null,"jpeg"!=N&&"webp"!=N),P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="28px";"png"==N||"svg"==N?(F=function(){U.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")},ca=document.createElement("option"),ca.setAttribute("value",+"allPages"),mxUtils.write(ca,mxResources.get("allPages")),P.appendChild(ca),ca=document.createElement("option"),ca.setAttribute("value","currentPage"),mxUtils.write(ca,mxResources.get("currentPage")),P.appendChild(ca),U.style.marginBottom="12px",P.style.marginBottom="16px",I.appendChild(P),mxUtils.br(I),da+=20,null!=this.lastEmbedInclude&&(P.value=this.lastEmbedInclude),mxEvent.addListener(U,"change",F),F()):U.style.marginBottom="16px";var T=document.createElement("input");T.style.marginBottom="16px";+T.style.marginRight="8px";T.setAttribute("type","checkbox");var W=document.createElement("input");W.style.marginBottom="16px";W.style.marginRight="8px";W.setAttribute("type","checkbox");f&&(T.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,I.appendChild(T),mxUtils.write(I,mxResources.get("embedImages")),mxUtils.br(I),W.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,I.appendChild(W),mxUtils.write(I,mxResources.get("embedFonts")),mxUtils.br(I),da+=50);var aa=document.createElement("select");+aa.style.maxWidth="260px";aa.style.marginLeft="8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));aa.appendChild(C);F=document.createElement("option");F.setAttribute("value","blank");mxUtils.write(F,mxResources.get("openInNewWindow"));aa.appendChild(F);F=document.createElement("option");F.setAttribute("value","self");mxUtils.write(F,mxResources.get("openInThisWindow"));aa.appendChild(F);F=document.createElement("div");mxUtils.write(F,+mxResources.get("LinksLost"));F.style.margin="7px";F.style.display="none";"svg"==N&&(mxUtils.write(I,mxResources.get("links")+":"),I.appendChild(aa),I.appendChild(F),mxUtils.br(I),mxUtils.br(I),da+=50);l=new CustomDialog(this,I,mxUtils.bind(this,function(){this.lastExportBorder=ba.value;this.lastExportZoom=X.value;this.lastEmbedImages=T.checked;this.lastEmbedFonts=W.checked;this.lastEmbedInclude=P.value;z(X.value,Z.checked,!ha.checked,A.checked,U.checked,T.checked&&f,ba.value,ma.checked,("png"==N||+"svg"==N)&&"currentPage"==P.value,aa.value,null!=J?J.checked:null,null!=k?k.value:null,Y.value,W.checked)}),null,l,t);this.showDialog(l.container,340,da,!0,!0,null,null,null,null,!0);X.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?X.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,+f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(N)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),I=this.addCheckbox(C,mxResources.get("shadow"),F.shadowVisible&&t,!t),ca=this.addCheckbox(C,l),da=this.addCheckbox(C,mxResources.get("lightbox"),!0),ea=this.addEditButton(C,da),X=ea.getEditInput(),ba=1<F.model.getChildCount(F.model.getRoot()),ha=this.addCheckbox(C,mxResources.get("layers"),ba,!ba);ha.style.marginLeft=X.style.marginLeft;ha.style.marginBottom=+"12px";ha.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(ba&&ha.removeAttribute("disabled"),X.removeAttribute("disabled")):(ha.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));X.checked&&da.checked?ea.getEditSelect().removeAttribute("disabled"):ea.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){c(K.checked,I.checked,ca.checked,da.checked,ea.getLink(),ha.checked)}),null,mxResources.get("embed"),+z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,l,t,z,C,F,N){function K(X){var ba=" ",ha="";t&&(ba=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"++(null!=ca?"&page="+ca:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ha+="cursor:pointer;");c&&(ha+="max-width:100%;");var ma="";l&&(ma=' width="'+Math.round(I.width)+'" height="'+Math.round(I.height)+'"');F('<img src="'+X+'"'+ma+(""!=ha?' style="'+ha+'"':"")+ba+"/>")}var I=this.editor.graph.getGraphBounds(),ca=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(X){var ba=t?this.getFileData(!0):null;X=this.createImageDataUri(X,+ba,"png");K(X)}),null,null,null,mxUtils.bind(this,function(X){N({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),I.width*I.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";l&&(da="&w="+Math.round(2*I.width)+"&h="+Math.round(2*I.height));var ea=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+da+"&xml="+encodeURIComponent(f));ea.send(mxUtils.bind(this,function(){200<=ea.getStatus()&&299>=ea.getStatus()?+K("data:image/png;base64,"+ea.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,l,t,z,C,F){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),K=N.getElementsByTagName("a");if(null!=K)for(var I=0;I<K.length;I++){var ca=K[I].getAttribute("href");null!=ca&&"#"==ca.charAt(0)&&"_blank"==K[I].getAttribute("target")&&K[I].removeAttribute("target")}t&&N.setAttribute("content",+this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var da=" ",ea="";t&&(da="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",+ea+="cursor:pointer;");c&&(ea+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(X){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(X))+'"'+(""!=ea?' style="'+ea+'"':"")+da+"/>")}))}else ea="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"++EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ea+="cursor:pointer;"),c&&(c=parseInt(N.getAttribute("width")),z=parseInt(N.getAttribute("height")),N.setAttribute("viewBox","-0.5 -0.5 "+c+" "+z),ea+="max-width:100%;max-height:"+z+"px;",N.removeAttribute("height")),""!=ea&&N.setAttribute("style",ea),this.editor.addFontCss(N),this.editor.graph.mathEnabled&&this.editor.addMathCss(N),F(mxUtils.getXml(N))};EditorUi.prototype.timeSince=+function(c){c=Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var l=null;if("diagram"==+c.nodeName)l=c;else if("mxfile"==c.nodeName){var t=c.getElementsByTagName("diagram");if(0<t.length){l=t[0];var z=f.getGlobalVariable;f.getGlobalVariable=function(C){return"page"==C?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==C?1:z.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}t=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(C){}finally{this.editor.graph=t}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};+EditorUi.prototype.getPngFileProperties=function(c){var f=1,l=0;if(null!=c){if(c.hasAttribute("scale")){var t=parseFloat(c.getAttribute("scale"));!isNaN(t)&&0<t&&(f=t)}c.hasAttribute("border")&&(t=parseInt(c.getAttribute("border")),!isNaN(t)&&0<t&&(l=t))}return{scale:f,border:l}};EditorUi.prototype.getEmbeddedPng=function(c,f,l,t,z){try{var C=this.editor.graph,F=null;if(null!=l&&0<l.length)C=this.createTemporaryGraph(C.getStylesheet()),document.body.appendChild(C.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,+!0),C),F=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(C.getStylesheet());var N=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var K=this.pages[0];this.currentPage==K?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&C.setBackgroundImage(K.viewState.backgroundImage);C.getGlobalVariable=function(I){return"page"==I?K.getName():"pagenumber"==I?1:N.apply(this,arguments)};document.body.appendChild(C.container);+C.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==F&&(F=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ca=I.toDataURL("image/png");ca=Editor.writeGraphModelToPng(ca,"tEXt","mxfile",encodeURIComponent(F));c(ca.substring(ca.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(da){null!=f&&f(da)}}),null,null,null,mxUtils.bind(this,function(I){null!=f&&f(I)}),null,null,t,null,C.shadowVisible,null,+C,z,null,null,null,"diagram",null)}catch(I){null!=f&&f(I)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){N=null!=N?N:!0;ca=null!=ca?ca:0;F=null!=K?K:f.background;F==mxConstants.NONE&&(F=null);null==F&&"none"==f.getAdaptiveColors()&&(F="#ffffff");K=this.editor.graph.createSvgImageExport(null!=c);C=f.getSvg(F,I,ca,null,null,C,null,K,null,f.shadowVisible||da,null,ea,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(C,null,null,0==ca);null!=c&&C.setAttribute("content",c);null!=+l&&C.setAttribute("resource",l);var X=mxUtils.bind(this,function(ba){ba=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ba);null!=z&&z(ba);return ba});f.mathEnabled&&this.editor.addMathCss(C);if(null!=z)this.embedFonts(C,mxUtils.bind(this,function(ba){N?this.editor.convertImages(ba,mxUtils.bind(this,function(ha){X(ha)})):X(ba)}));else return X(C)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=+this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(ba){Editor.addRetryToError(ba,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,z,C,F,N,K,I,ca,da,+ea)}));this.handleError(ba)}))){var X=this.editor.graph.isSelectionEmpty();l=null!=l?l:X;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(ba){this.spinner.stop();try{this.saveCanvas(ba,z?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,ca)}catch(ha){this.handleError(ha)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ba){this.spinner.stop();this.handleError(ba)}),+null,l,c||1,f,t,null,null,C,F,I,da,ea)}catch(ba){this.spinner.stop(),this.handleError(ba)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,z,C,F){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var K=this.editor.graph;if(null!=c&&0<+c.length){K.model.beginUpdate();try{var I=mxUtils.parseXml(c);c={};var ca=this.editor.extractGraphModel(I.documentElement,null!=this.pages);if(null!=ca&&"mxfile"==ca.nodeName&&null!=this.pages){var da=ca.getElementsByTagName("diagram");if(1==da.length&&!C){if(ca=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(c[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ea=da[0].getAttribute("name");null!=ea&&""!=ea&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,+ea))}}else if(0<da.length){C=[];var X=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[da[0].getAttribute("id")]=this.pages[0].getId(),ea=da[0].getAttribute("name"),null!=ea&&""!=ea&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ea)),ca=Editor.parseDiagramNode(da[0]),t=!1,X=1);for(;X<da.length;X++){var ba=da[X].getAttribute("id");da[X].removeAttribute("id");var ha=this.updatePageRoot(new DiagramPage(da[X]));c[ba]=da[X].getAttribute("id");var ma=this.pages.length;+null==ha.getName()&&ha.setName(mxResources.get("pageWithNumber",[ma+1]));K.model.execute(new ChangePage(this,ha,ha,ma,!0));C.push(ha)}this.updatePageLinks(c,C)}}if(null!=ca&&"mxGraphModel"===ca.nodeName){N=K.importGraphModel(ca,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),X=0;X<N.length;X++)this.updatePageLinksForCell(c,N[X]);var Y=K.parseBackgroundImage(ca.getAttribute("backgroundImage"));if(null!=Y&&null!=Y.originalSrc){this.updateBackgroundPageLink(c,Y);var la=new ChangePageSetup(this,+null,Y);la.ignoreColor=!0;K.model.execute(la)}}F&&K.pasteCellStyles(K.includeDescendants(N),K.defaultVertexStyle,K.defaultEdgeStyle)}finally{K.model.endUpdate()}}}catch(Z){if(z)throw Z;this.handleError(Z)}return N};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=+c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(t){}};EditorUi.prototype.updatePageLinksForCell=function(c,f){var l=document.createElement("div"),t=this.editor.graph,z=t.getLinkForCell(f);null!=z&&t.setLinkForCell(f,this.updatePageLink(c,z));if(t.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(t.getLabel(f));for(var C=l.getElementsByTagName("a"),F=!1,N=0;N<C.length;N++)z=C[N].getAttribute("href"),null!=z&&(C[N].setAttribute("href",this.updatePageLink(c,+z)),F=!0);F&&t.labelChanged(f,l.innerHTML)}for(N=0;N<t.model.getChildCount(f);N++)this.updatePageLinksForCell(c,t.model.getChildAt(f,N))};EditorUi.prototype.updatePageLink=function(c,f){if(Graph.isPageLink(f)){var l=c[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var t=JSON.parse(f.substring(17));if(null!=t.actions){for(var z=0;z<t.actions.length;z++){var C=t.actions[z];if(null!=C.open&&Graph.isPageLink(C.open)){var F=C.open.substring(C.open.indexOf(",")++1);l=c[F];null!=l?C.open="data:page/id,"+l:null==this.getPageById(F)&&delete C.open}}f="data:action/json,"+JSON.stringify(t)}}catch(N){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,l,t,z){var C=mxUtils.bind(this,function(F){this.loadingExtensions=!1;null!=l?l(F):this.handleError(F)});this.createTimeout(null,mxUtils.bind(this,function(F){t=null!=t?t:c.name;var N=mxUtils.bind(this,+function(I){F.clear()&&C(I)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(t);try{var ca=t.lastIndexOf(".");if(0<=ca&&ca<t.length)t.substring(ca+1).toUpperCase();else{var da=t.lastIndexOf("/");0<=da&&da<t.length&&(t=t.substring(da+1))}}catch(X){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;+I.append("file1",c,t);var ea=new XMLHttpRequest;ea.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ea.responseType="blob";this.addRemoteServiceSecurityCheck(ea);null!=z&&ea.setRequestHeader("x-convert-custom",z);ea.onreadystatechange=mxUtils.bind(this,function(){if(4==ea.readyState&&F.clear())if(200<=ea.status&&299>=ea.status)try{var X=ea.response;if("text/xml"==X.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(ha){try{f(ha.target.result)}catch(ma){N({message:mxResources.get("errorLoadingFile")})}});+ba.readAsText(X)}else this.doImportVisio(X,f,N,t)}catch(ha){N(ha)}else try{""==ea.responseType||"text"==ea.responseType?N({message:ea.responseText}):(ba=new FileReader,ba.onload=function(){try{N({message:JSON.parse(ba.result).Message})}catch(ha){N(ha)}},ba.readAsText(ea.response))}catch(ha){N({})}});ea.send(I)}else if(F.clear())try{this.doImportVisio(c,f,N,t)}catch(X){N(X)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?+K():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",K,null,null,null,N))}),C)};EditorUi.prototype.importGraphML=function(c,f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,t)}catch(N){C(N)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});+this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.createTimeout(null,mxUtils.bind(this,function(l){var t=mxUtils.bind(this,function(C){l.clear()&&f(C)}),z=mxUtils.bind(this,function(){this.loadingExtensions=+!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||t({message:mxResources.get("unknownError")})}catch(C){t(C)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),f)}};EditorUi.prototype.convertLucidChart=function(c,+f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if("undefined"!==typeof window.LucidImporter)try{var N=JSON.parse(c);f(LucidImporter.importState(N));try{if(null!=window.console&&"1"==urlParams.test){var K=[(new Date).toISOString(),"convertLucidChart",N];null!=N.state&&+K.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var I=0;I<N.svgThumbs.length;I++)K.push(Editor.createSvgDataUri(N.svgThumbs[I]));null!=N.thumb&&K.push(N.thumb);console.log.apply(console,K)}}catch(ca){}}catch(ca){null!=window.console&&console.error(ca),C(ca)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",+function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",F,null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.createMermaidXml=function(c,f,l,t,z,C){var F=new Graph(document.createElement("div"));+l=F.insertVertex(null,null,null,0,0,t,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");F.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=C&&F.setAttributeForCell(l,"templatePrompt",C);c=(new mxCodec).encode(F.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,l){var t=0,z=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(C){var F=new mxXmlRequest("https://www.draw.io/generate/v2",+c,"POST"),N=mxUtils.bind(this,function(K){C.clear()&&l(K)});F.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ca=mxUtils.trim(K.getText());this.generateMermaidImage(ca,null,mxUtils.bind(this,function(da,ea,X){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",ca),f(ca,da,ea,X))}),N)}),N,mxUtils.bind(this,function(da){3>+t++?C.clear()&&z():N(da)}))}),N);else{var I={message:mxResources.get("error")+" "+K.getStatus()};try{I=JSON.parse(K.getText()),I=I.error}catch(ca){}N(I)}}),N)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?+f[1]:null;if(null!=l){var t=l.indexOf("-");0<t&&(l=l.substring(0,t))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");l=f[0].split(" ")[0].replace(/:$/,"");t=l.indexOf("-");0<t&&(l=l.substring(0,t));try{"mindmap"==l&&2<f.length&&(c=extractMermaidMindmap(f))}catch(z){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,+f,l,t,z){var C=mxUtils.bind(this,function(N){this.loadingMermaid=!1;null!=t?t(N):this.handleError(N)}),F=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var N=mxUtils.bind(this,function(K){try{if(mxClient.IS_IE||mxClient.IS_IE11)K=+K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var I=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<I.length&&"error"!=I[0].getAttribute("aria-roledescription")){var ca=parseFloat(I[0].getAttribute("width")),da=parseFloat(I[0].getAttribute("height"));if(isNaN(ca)||isNaN(da))try{var ea=I[0].getAttribute("viewBox").split(/\s+/);ca=parseFloat(ea[2]);da=parseFloat(ea[3])}catch(X){ca=ca||100,da=da||100}l(this.convertDataUri(Editor.createSvgDataUri(K)),+ca,da)}else null!=z?z():t({message:mxResources.get("invalidInput")})}catch(X){t(X)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){N(K.svg)}).catch(function(K){null!=z?z(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,+null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,C)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function z(N,K,I){c1=N>>2;c2=(N&3)<<4|K>>4;c3=(K&15)<<2|I>>6;c4=I&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97++N);N-=26;return 0==N?"-":1==N?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(N){r="";for(i=0;i<N.length;i+=3)r=i+2==N.length?r+z(N.charCodeAt(i),N.charCodeAt(i+1),0):i+1==N.length?r+z(N.charCodeAt(i),0,0):r+z(N.charCodeAt(i),N.charCodeAt(i+1),N.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(N){if(200<=this.status&&300>this.status)if("txt"==+f)l(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(I){var ca=new Image;ca.onload=function(){try{var da=ca.width,ea=ca.height;if(0==da&&0==ea){var X=K.result,ba=X.indexOf(","),ha=decodeURIComponent(escape(atob(X.substring(ba+1)))),ma=mxUtils.parseXml(ha).getElementsByTagName("svg");0<ma.length&&(da=parseFloat(ma[0].getAttribute("width")),ea=parseFloat(ma[0].getAttribute("height")))}l(K.result,da,ea)}catch(Y){t(Y)}};ca.src=K.result};K.onerror=function(I){t(I)}}else t(N)};+F.onerror=function(N){t(N)};F.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var t=this.editor.graph,z=null;t.getModel().beginUpdate();try{z=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(z,!0)}finally{t.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;F=null!=F?F:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ea){4==ea.readyState&&200<=ea.status&&299>=ea.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ea.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var K=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var I=Editor.extractGraphModelFromPdf(c);if(null!=+I&&0<I.length)return this.importXml(I,f,l,C,!0,N)}if(Editor.isPngDataUrl(c)&&(I=Editor.extractGraphModelFromPng(c),null!=I&&0<I.length))return this.importXml(I,f,l,C,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{I=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(I=c.substring(c.indexOf(",")+1),I=window.atob&&!mxClient.IS_SF?atob(I):Base64.decode(I,!0)):I=decodeURIComponent(c.substring(c.indexOf(",")+1));var ca=this.importXml(I,f,l,C,!0,N);if(0<ca.length)return ca}catch(ea){}this.loadImage(c,+mxUtils.bind(this,function(ea){if("data:"==c.substring(0,5))this.resizeImage(ea,c,mxUtils.bind(this,function(ha,ma,Y){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ma,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ha)+";"))}),F,this.maxImageSize);else{var X=Math.min(1,Math.min(this.maxImageSize/ea.width,this.maxImageSize/ea.height)),ba=Math.round(ea.width*X);ea=Math.round(ea.height*+X);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ba,ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ea=null;K.getModel().beginUpdate();try{ea=K.insertVertex(K.getDefaultParent(),null,c,K.snap(f),K.snap(l),1,1,"text;"+(t?"html=1;":"")),K.updateCellSize(ea),K.fireEvent(new mxEventObject("textInserted","cells",[ea]))}finally{K.getModel().endUpdate()}K.setSelectionCell(ea)}))}else{c=+Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,C,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ea){this.editor.graph.setSelectionCells(this.importXml(ea,f,l,C,null,N))}),mxUtils.bind(this,function(ea){this.handleError(ea)}));else{K=this.editor.graph;z=null;K.getModel().beginUpdate();try{z=K.insertVertex(K.getDefaultParent(),null,"",K.snap(f),K.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));+K.fireEvent(new mxEventObject("textInserted","cells",[z]));t&&(c=K.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");z.value=c;K.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var da=K.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=da.width;z.geometry.height=da.height}Graph.isLink(z.value)&&K.setLinkForCell(z,z.value);z.geometry.width+=K.gridSize;z.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[z]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=-c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=-k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(I,L){StorageFile.listFiles(this,"F",I,L)});window.openBrowserFile=mxUtils.bind(this,function(I,L,K){StorageFile.getFileContent(this,I,L,K)});window.deleteBrowserFile=mxUtils.bind(this,function(I,L,K){StorageFile.deleteFile(this,I,L,K)});if(!f){var B=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(I){this.hideDialog(I)}));-window.openFile.setConsumer(mxUtils.bind(this,function(I,L){null!=L&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(L)?(I=new Blob([I],{type:"application/octet-stream"}),this.importVisio(I,mxUtils.bind(this,function(K){this.importXml(K,0,0,!0)}),null,L)):this.editor.graph.setSelectionCells(this.importXml(I,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,C=z.close;-this.dialog.close=mxUtils.bind(this,function(I){Editor.useLocalStorage=B;C.apply(z,arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,k){var B=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))k();else{var I=0,L,K=!1;C.forEach(function(O,da){O=da.name.toLowerCase();"diagram/diagram.xml"==O?(K=!0,da.async("string").then(function(ea){0==-ea.indexOf("<mxfile ")?f(ea):k()})):0==O.indexOf("versions/")&&(O=parseInt(O.substr(9)),O>I&&(I=O,L=da))});0<I?L.async("string").then(function(O){(new XMLHttpRequest).upload&&B.isRemoteFileFormat(O,c.name)?B.isOffline()?B.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):B.parseFileData(O,mxUtils.bind(this,function(da){4==da.readyState&&(200<=da.status&&299>=da.status?f(da.responseText):k())}),c.name):k()}):K||k()}},function(C){k(C)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||-this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,k))};EditorUi.prototype.importFile=function(c,f,k,B,z,C,I,L,K,O,da,ea){O=null!=O?O:!0;var ca=!1,V=null,ma=mxUtils.bind(this,function(la){var Y=null;null!=la&&"<mxlibrary"==la.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,la,I)),this.showSidebar()):Y=this.importXml(la,k,B,O,null,null!=ea?mxEvent.isControlDown(ea):null);null!=L&&L(Y)});"image"==f.substring(0,5)?(K=!1,-"image/png"==f.substring(0,9)&&(da=da?null:this.extractGraphModelFromPng(c),null!=da&&0<da.length&&(V=this.importXml(da,k,B,O,null,null!=ea?mxEvent.isControlDown(ea):null),K=!0)),K||(K=this.editor.graph,da=c.indexOf(";"),0<da&&(c=c.substring(0,da)+c.substring(c.indexOf(",",da+1))),O&&K.isGridEnabled()&&(k=K.snap(k),B=K.snap(B)),da="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(da+="editableCssRules=.*;"),-V=[K.insertVertex(null,null,"",k,B,z,C,da+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ca=!0,this.importGraphML(c,ma)):null!=K&&null!=I&&EditorUi.isVisioFilename(I)?(ca=!0,this.importVisio(K,ma)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,f=mxUtils.bind(this,function(la){4==la.readyState&&(200<=la.status&&299>=la.status?ma(la.responseText):null!=L&&(L(null),this.showError(mxResources.get("error"),-413==la.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,I):this.parseFile(K,f,I)):0==c.indexOf("PK")&&null!=K?(ca=!0,this.importZipFile(K,ma,mxUtils.bind(this,function(){V=this.insertTextAt(this.validateFileData(c),k,B,!0,null,O);L(V)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(V=this.insertTextAt(this.validateFileData(c),k,B,!0,null,O,null,null!=ea?mxEvent.isControlDown(ea):null));ca||null==L||L(V);return V};EditorUi.prototype.importFiles=-function(c,f,k,B,z,C,I,L,K,O,da,ea,ca){B=null!=B?B:this.maxImageSize;O=null!=O?O:this.maxImageBytes;var V=null!=f&&null!=k,ma=!0;f=null!=f?f:0;k=null!=k?k:0;var la=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var Y=da||this.resampleThreshold,fa=0;fa<c.length;fa++)if("image/svg"!==c[fa].type.substring(0,9)&&"image/"===c[fa].type.substring(0,6)&&c[fa].size>Y){la=!0;break}var Z=mxUtils.bind(this,function(){var l=this.editor.graph,u=l.gridSize;z=null!=z?z:mxUtils.bind(this,function(ba,ja,oa,qa,ra,ua,za,-Ba,Ca){try{if(null!=ba&&"<mxlibrary"==ba.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,ba,za)),this.showSidebar(),null;this.isCompatibleString(ba)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(V=!1,qa=oa=0);return this.importFile(ba,ja,oa,qa,ra,ua,za,Ba,Ca,V,ea,ca)}catch(La){return this.handleError(La),null}});C=null!=C?C:mxUtils.bind(this,function(ba){l.setSelectionCells(ba)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var H=-c.length,U=H,J=[],W=mxUtils.bind(this,function(ba,ja){J[ba]=ja;if(0==--U){this.spinner.stop();if(null!=L)L(J);else{var oa=[];l.getModel().beginUpdate();try{for(ba=0;ba<J.length;ba++){var qa=J[ba]();null!=qa&&(oa=oa.concat(qa))}}finally{l.getModel().endUpdate()}}C(oa)}}),aa=0;aa<H;aa++)mxUtils.bind(this,function(ba){var ja=c[ba];if(null!=ja){var oa=new FileReader;oa.onload=mxUtils.bind(this,function(qa){if(null==I||I(ja))try{if("image/"==ja.type.substring(0,6))if("image/svg"==ja.type.substring(0,9)){var ra=-Graph.clipSvgDataUri(qa.target.result),ua=ra.indexOf(","),za=decodeURIComponent(escape(atob(ra.substring(ua+1)))),Ba=mxUtils.parseXml(za),Ca=Ba.getElementsByTagName("svg");if(0<Ca.length){var La=Ca[0],sa=ea?null:La.getAttribute("content");null!=sa&&"<"!=sa.charAt(0)&&"%"!=sa.charAt(0)&&(sa=unescape(window.atob?atob(sa):Base64.decode(sa,!0)));null!=sa&&"%"==sa.charAt(0)&&(sa=decodeURIComponent(sa));null==sa||"<mxfile "!==sa.substring(0,8)&&"<mxGraphModel "!==sa.substring(0,14)?W(ba,mxUtils.bind(this,-function(){try{if(null!=Ba){var Ka=Ba.getElementsByTagName("svg");if(0<Ka.length){var Ma=Ka[0],ya=Ma.getAttribute("width"),Wa=Ma.getAttribute("height");ya=null!=ya&&"%"!=ya.charAt(ya.length-1)?parseFloat(ya):NaN;Wa=null!=Wa&&"%"!=Wa.charAt(Wa.length-1)?parseFloat(Wa):NaN;var Ia=Ma.getAttribute("viewBox");if(null==Ia||0==Ia.length)Ma.setAttribute("viewBox","0 0 "+ya+" "+Wa);else if(isNaN(ya)||isNaN(Wa)){var Xa=Ia.split(" ");3<Xa.length&&(ya=parseFloat(Xa[2]),Wa=parseFloat(Xa[3]))}ra=Editor.createSvgDataUri(mxUtils.getXml(Ma));-var Pa=Math.min(1,Math.min(B/Math.max(1,ya)),B/Math.max(1,Wa)),t=z(ra,ja.type,f+ba*u,k+ba*u,Math.max(1,Math.round(ya*Pa)),Math.max(1,Math.round(Wa*Pa)),ja.name);if(null!=t&&(isNaN(ya)||isNaN(Wa))){var N=new Image;N.onload=mxUtils.bind(this,function(){ya=Math.max(1,N.width);Wa=Math.max(1,N.height);t[0].geometry.width=ya;t[0].geometry.height=Wa;Ma.setAttribute("viewBox","0 0 "+ya+" "+Wa);ra=Editor.createSvgDataUri(mxUtils.getXml(Ma));var Q=ra.indexOf(";");0<Q&&(ra=ra.substring(0,Q)+ra.substring(ra.indexOf(",",-Q+1)));l.setCellStyles("image",ra,[t[0]])});N.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}return t}}}catch(Q){}return null})):W(ba,mxUtils.bind(this,function(){return z(sa,"text/xml",f+ba*u,k+ba*u,0,0,ja.name)}))}else W(ba,mxUtils.bind(this,function(){return null}))}else{ua=!1;if("image/png"==ja.type){var Aa=ea?null:this.extractGraphModelFromPng(qa.target.result);if(null!=Aa&&0<Aa.length){var Ea=new Image;Ea.src=qa.target.result;W(ba,mxUtils.bind(this,function(){return z(Aa,"text/xml",f+ba*u,-k+ba*u,Ea.width,Ea.height,ja.name)}));ua=!0}}ua||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(qa.target.result,mxUtils.bind(this,function(Ka){this.resizeImage(Ka,qa.target.result,mxUtils.bind(this,function(Ma,ya,Wa){W(ba,mxUtils.bind(this,function(){if(null!=-Ma&&Ma.length<O){var Ia=ma&&this.isResampleImageSize(ja.size,da)?Math.min(1,Math.min(B/ya,B/Wa)):1;return z(Ma,ja.type,f+ba*u,k+ba*u,Math.round(ya*Ia),Math.round(Wa*Ia),ja.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),ma,B,da,ja.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else ra=qa.target.result,z(ra,ja.type,f+ba*u,k+ba*u,240,160,ja.name,function(Ka){W(ba,function(){return Ka})},ja)}catch(Ka){W(ba,-mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ka,ja)}else W(ba,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(ja.name)?z(null,ja.type,f+ba*u,k+ba*u,240,160,ja.name,function(qa){W(ba,function(){return qa})},ja):"image"==ja.type.substring(0,5)||"application/pdf"==ja.type?oa.readAsDataURL(ja):oa.readAsText(ja)}})(aa)});if(la){la=[];for(fa=0;fa<c.length;fa++)la.push(c[fa]);c=la;this.confirmImageResize(function(l){ma=l;Z()},K)}else Z()};EditorUi.prototype.isBlankFile=-function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},B=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,z=function(C,I){if(C||f)mxSettings.setResizeImages(C?I:null),mxSettings.save();k();c(I)};null==B||f?this.showDialog((new ConfirmDialog(this,-mxResources.get("resizeLargeImages"),function(C){z(C,!0)},function(C){z(C,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):z(!1,B)};EditorUi.prototype.parseFile=function(c,f,k){k=null!=k?k:c.name;var B=new FileReader;B.onload=mxUtils.bind(this,function(){this.parseFileData(B.result,-f,k)});B.readAsText(c)};EditorUi.prototype.parseFileData=function(c,f,k){var B=new XMLHttpRequest;B.open("POST",OPEN_URL);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded");B.onreadystatechange=function(){f(B)};B.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>-f};EditorUi.prototype.resizeImage=function(c,f,k,B,z,C,I){z=null!=z?z:this.maxImageSize;var L=Math.max(1,c.width),K=Math.max(1,c.height),O=f;if(B&&this.isResampleImageSize(null!=I?I:f.length,C))try{var da=Math.max(L/z,K/z);if(1<da){var ea=Math.round(L/da),ca=Math.round(K/da),V=document.createElement("canvas");V.width=ea;V.height=ca;V.getContext("2d").drawImage(c,0,0,ea,ca);var ma=V.toDataURL();if(ma.length<f.length){var la=document.createElement("canvas");la.width=ea;la.height=ca;var Y=la.toDataURL();-ma!==Y&&(f=ma,L=ea,K=ca)}}}catch(fa){}B&&O!=f&&z>this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,k,B,z/1.5,C,I):k(f,L,K)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,k){try{var B=new Image;B.onload=function(){B.width=0<B.width?B.width:120;B.height=0<B.height?B.height:120;f(B)};null!=k&&(B.onerror=k);B.src=c}catch(z){if(null!=k)k(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=-function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var v=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());v.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?-mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,k=f.isEnabled;f.isEnabled=function(){return k.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(u){var H=u.getEvent();return null==u.getState()&&!mxEvent.isMouseEvent(H)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(H)&&-(null==u.getState()||mxEvent.isControlDown(H)||mxEvent.isShiftDown(H))});f.cellEditor.editPlantUmlData=function(u,H,U){var J=JSON.parse(U);H=new TextareaDialog(c,mxResources.get("plantUml")+":",J.data,function(W){null!=W&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(W,J.format,function(aa,ba,ja){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==J.format)f.labelChanged(u,"<pre>"+aa+"</pre>"),f.updateCellSize(u,!0);else{f.setCellStyles("image",c.convertDataUri(aa),-[u]);var oa=f.model.getGeometry(u);null!=oa&&(oa=oa.clone(),oa.width=ba,oa.height=ja,f.cellsResized([u],[oa],!1))}f.setAttributeForCell(u,"plantUmlData",JSON.stringify({data:W,format:J.format}))}finally{f.getModel().endUpdate()}},function(aa){c.handleError(aa)})},null,null,400,220);c.showDialog(H.container,420,300,!0,!0);H.init()};f.cellEditor.editMermaidData=function(u,H,U){var J=JSON.parse(U);H=new TextareaDialog(c,mxResources.get("mermaid")+":",J.data,function(W){null!=W&&c.spinner.spin(document.body,-mxResources.get("inserting"))&&c.generateMermaidImage(W,J.config,function(aa,ba,ja){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",aa,[u]);var oa=f.model.getGeometry(u);null!=oa&&(oa=oa.clone(),oa.width=Math.max(oa.width,ba),oa.height=Math.max(oa.height,ja),f.cellsResized([u],[oa],!1));f.setAttributeForCell(u,"mermaidData",JSON.stringify({data:W,config:J.config},null,2))}finally{f.getModel().endUpdate()}},function(aa){c.handleError(aa)})},null,null,400,220);c.showDialog(H.container,-420,300,!0,!0);H.init()};var B=f.cellEditor.startEditing;f.cellEditor.startEditing=function(u,H){try{var U=this.graph.getAttributeForCell(u,"plantUmlData");if(null!=U)this.editPlantUmlData(u,H,U);else if(U=this.graph.getAttributeForCell(u,"mermaidData"),null!=U&&window.isMermaidEnabled)this.editMermaidData(u,H,U);else{var J=f.getCellStyle(u);"1"==mxUtils.getValue(J,"metaEdit","0")?c.showDataDialog(u):B.apply(this,arguments)}}catch(W){c.handleError(W)}};f.getLinkTitle=function(u){return c.getLinkTitle(u)};-f.customLinkClicked=function(u,H){var U=!1;try{var J=this.getGraphBounds();c.handleCustomLink(u,H);U=!0;c.chromelessResize&&!J.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(H))}catch(W){c.handleError(W)}return U};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(u){var H=z.apply(this,arguments);null!=H&&null!=H.src&&Graph.isPageLink(H.src)&&(H={originalSrc:H.src});return H};var C=f.setBackgroundImage;f.setBackgroundImage=function(u){null!=u&&null!=u.originalSrc&&-(u=c.createImageForPageLink(u.originalSrc,c.currentPage,this));C.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(u,H){u=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=u){var U=u.indexOf(",");if(0<U)for(u=u.substring(U+1),H=H.getProperty("patches"),-U=0;U<H.length;U++)if(null!=H[U][EditorUi.DIFF_UPDATE]&&null!=H[U][EditorUi.DIFF_UPDATE][u]||null!=H[U][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(H[U][EditorUi.DIFF_REMOVE],u)){f.refreshBackgroundImage();break}}}));var I=f.getBackgroundImageObject;f.getBackgroundImageObject=function(u,H){var U=I.apply(this,arguments);null!=U&&null!=U.originalSrc&&(U=H?c.createImageForPageLink(U.originalSrc,null,null,!0):{src:U.originalSrc});return U};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=-"https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var L=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(u){u=null!=u?u:"";"1"==urlParams.dev&&(u+=(0<u.length?"&":"?")+"dev=1");return L.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(u,H,U){var J=H;H=function(W,aa,ba){if(null==aa){var ja=-mxEvent.getSource(W);"a"==ja.nodeName.toLowerCase()&&(aa=ja.getAttribute("href"))}null!=aa&&f.isCustomLink(aa)&&(mxEvent.isTouchEvent(W)||!mxEvent.isPopupTrigger(W))&&f.customLinkClicked(aa,ba)&&mxEvent.consume(W);null!=J&&J(W,aa,ba)};K.call(this,u,H,U)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var O=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(u,H,U){f.isSelectionEmpty()&&"simple"==-Editor.currentTheme&&this.addMenuItems(u,["zoomIn","zoomOut","-"],null,U);O.apply(this,arguments);f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(u,["-","addToScratchpad"],null,U);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(u,["-","exitGroup","home"],null,U)};var da=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(u,H,U){if(c.editor.graph.isSelectionEmpty())da.apply(this,arguments),c.menus.addMenuItems(u,["copyAsImage"],-null,U);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(u,H,U):this.addPopupMenuArrangeItems(u,H,U),this.addMenuItems(u,"- cut copy copyAsImage duplicate -".split(" "),null,U),this.isShowCellEditItems()||this.addPopupDeleteItem(u,H,U),this.addMenuItems(u,["lockUnlock","-"],null,U),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(H)&&f.isCellEditable(H)&&(this.addSubmenu("editCell",u,null,mxResources.get("edit")),u.addSeparator(),f.getModel().isEdge(H))){this.addSubmenu("line",-u);var J=f.getModel().getGeometry(H);null!=J&&null!=J.points&&0<J.points.length&&this.addMenuItems(u,["clearWaypoints"],null,U)}1==f.getSelectionCount()&&this.addMenuItems(u,["enterGroup"],null,U);J=c.getSelectionState();null!=J.mergeCell?this.addMenuItem(u,"mergeCells"):(1<J.style.colspan||1<J.style.rowspan)&&this.addMenuItem(u,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=-function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var ea=f.getExportVariables;f.getExportVariables=function(){var u=ea.apply(this,arguments),H=c.getCurrentFile();null!=H&&(u.filename=H.getTitle());u.pagecount=null!=c.pages?c.pages.length:1;u.page=null!=c.currentPage?c.currentPage.getName():"";u.pagenumber=null!=c.pages&&null!=c.currentPage?-mxUtils.indexOf(c.pages,c.currentPage)+1:1;return u};var ca=f.getGlobalVariable;f.getGlobalVariable=function(u){var H=c.getCurrentFile();return"filename"==u&&null!=H?H.getTitle():"page"==u&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==u?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==u?null!=c.pages?c.pages.length:1:ca.apply(this,arguments)};var V=null,ma=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var u=this.getCurrentFile(),-H=null!=u&&null!=u.getTitle()?u.getTitle():this.defaultFilename;V!=H&&u==ma&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),f.view.validate());V=H;ma=u}));var la=f.labelLinkClicked;f.labelLinkClicked=function(u,H,U){var J=H.getAttribute("href");if(null==J||!f.isCustomLink(J)||!mxEvent.isTouchEvent(U)&&mxEvent.isPopupTrigger(U))la.apply(this,arguments);else{if(!f.isEnabled()||null!=u&&f.isCellLocked(u.cell))f.customLinkClicked(J),f.getRubberband().reset();mxEvent.consume(U)}};this.editor.getOrCreateFilename=-function(){var u=c.defaultFilename,H=c.getCurrentFile();null!=H&&(u=null!=H.getTitle()?H.getTitle():u);return u};var Y=this.actions.get("print");Y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);Y.visible=Y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),-this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]=-"synchronize","1"==urlParams.embedInline&&f.addListener(mxEvent.ESCAPE,function(u,H){null!=H&&f.isEnabled()&&!f.isEditing()&&null!=H.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(u){var H=f.cellEditor.text2,-U=null;null!=H&&(mxEvent.addListener(H,"dragleave",function(J){null!=U&&(U.parentNode.removeChild(U),U=null);J.stopPropagation();J.preventDefault()}),mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(J){null==U&&(!mxClient.IS_IE||10<document.documentMode)&&(U=this.highlightElement(H));J.stopPropagation();J.preventDefault()})),mxEvent.addListener(H,"drop",mxUtils.bind(this,function(J){null!=U&&(U.parentNode.removeChild(U),U=null);if(0<J.dataTransfer.files.length)this.importFiles(J.dataTransfer.files,-0,0,this.maxImageSize,function(aa,ba,ja,oa,qa,ra){f.insertImage(aa,qa,ra)},function(){},function(aa){return"image/"==aa.type.substring(0,6)},function(aa){for(var ba=0;ba<aa.length;ba++)aa[ba]()},mxEvent.isControlDown(J));else if(0<=mxUtils.indexOf(J.dataTransfer.types,"text/uri-list")){var W=J.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(aa){var ba=Math.max(1,aa.width);aa=Math.max(1,aa.height);var ja=-this.maxImageSize;ja=Math.min(1,Math.min(ja/Math.max(1,ba)),ja/Math.max(1,aa));f.insertImage(decodeURIComponent(W),ba*ja,aa*ja)})):document.execCommand("insertHTML",!1,J.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(J.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,J.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(J.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,J.dataTransfer.getData("text/plain"));J.stopPropagation();J.preventDefault()})))}));-if(Editor.isSettingsEnabled()){Y=this.editor.graph.view;var fa=mxSettings.getUnit();Y.setUnit(fa);Editor.pageSizeUnit=fa==mxConstants.METERS?mxConstants.MILLIMETERS:fa;Y.addListener("unitChanged",function(u,H){u=H.getProperty("unit");mxSettings.setUnit(u);mxSettings.save();Editor.pageSizeUnit=u==mxConstants.METERS?mxConstants.MILLIMETERS:u});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?-null:new mxDualRuler(this,Y.unit);this.refresh()}if("1"==urlParams.styledev){Y=document.getElementById("geFooter");null!=Y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),-this.styleInput.value)})),Y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(u,H){0<this.editor.graph.getSelectionCount()?(u=this.editor.graph.getSelectionCell(),u=this.editor.graph.getModel().getStyle(u),this.styleInput.value=u||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var Z=this.isSelectionAllowed;this.isSelectionAllowed=function(u){return mxEvent.getSource(u)==this.styleInput?-!0:Z.apply(this,arguments)}}Y=document.getElementById("geInfo");null!=Y&&Y.parentNode.removeChild(Y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var l=null;mxEvent.addListener(f.container,"dragleave",function(u){f.isEnabled()&&(null!=l&&(l.parentNode.removeChild(l),l=null),u.stopPropagation(),u.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(u){null==l&&(!mxClient.IS_IE||10<document.documentMode)&&(l=this.highlightElement(f.container));-null!=this.sidebar&&this.sidebar.hideTooltip();u.stopPropagation();u.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(u){null!=l&&(l.parentNode.removeChild(l),l=null);if(f.isEnabled()){var H=mxUtils.convertPoint(f.container,mxEvent.getClientX(u),mxEvent.getClientY(u)),U=u.dataTransfer.files,J=f.view.translate,W=f.view.scale,aa=H.x/W-J.x,ba=H.y/W-J.y;if(0<U.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(u)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&-this.fileLoaded(null),this.openFiles(U,!0)):(mxEvent.isAltDown(u)&&(ba=aa=null),this.importFiles(U,aa,ba,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(u),null,null,mxEvent.isShiftDown(u),u));else{mxEvent.isAltDown(u)&&(ba=aa=0);var ja=0<=mxUtils.indexOf(u.dataTransfer.types,"text/uri-list")?u.dataTransfer.getData("text/uri-list"):null;H=this.extractGraphModelFromEvent(u,null!=this.pages);if(null!=H)f.setSelectionCells(this.importXml(H,aa,ba,!0));else if(0<=mxUtils.indexOf(u.dataTransfer.types,-"text/html")){var oa=u.dataTransfer.getData("text/html");H=document.createElement("div");H.innerHTML=Graph.sanitizeHtml(oa);var qa=null;U=H.getElementsByTagName("img");null!=U&&1==U.length?(oa=U[0].getAttribute("src"),null==oa&&(oa=U[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(oa)||(qa=!0)):(U=H.getElementsByTagName("a"),null!=U&&1==U.length?oa=U[0].getAttribute("href"):(H=H.getElementsByTagName("pre"),null!=H&&1==H.length&&(oa=mxUtils.getTextContent(H[0]))));var ra=!0,ua=mxUtils.bind(this,-function(){f.setSelectionCells(this.insertTextAt(oa,aa,ba,!0,qa,null,ra,mxEvent.isControlDown(u)))});qa&&null!=oa&&oa.length>this.resampleThreshold?this.confirmImageResize(function(za){ra=za;ua()},mxEvent.isControlDown(u)):ua()}else null!=ja&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)?this.loadImage(decodeURIComponent(ja),mxUtils.bind(this,function(za){var Ba=Math.max(1,za.width);za=Math.max(1,za.height);var Ca=this.maxImageSize;Ca=Math.min(1,Math.min(Ca/Math.max(1,Ba)),Ca/Math.max(1,za));f.setSelectionCell(f.insertVertex(null,-null,"",aa,ba,Ba*Ca,za*Ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+ja+";"))}),mxUtils.bind(this,function(za){f.setSelectionCells(this.insertTextAt(ja,aa,ba,!0))})):0<=mxUtils.indexOf(u.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(u.dataTransfer.getData("text/plain"),aa,ba,!0))}}u.stopPropagation();u.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",-mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var u=parseInt(this.div.offsetLeft),H=-parseInt(this.div.offsetWidth),U=c.embedViewport.x+c.embedViewport.width,J=parseInt(this.div.offsetTop),W=parseInt(this.div.offsetHeight),aa=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(u,U-H))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(J,aa-W))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};-if(!this.editor.chromeless||this.editor.editable)if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme)Y=Editor.currentTheme,Editor.currentTheme="",this.doSetCurrentTheme(Y,mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}));Y=!1;null!=urlParams.dark?Y=urlParams.dark:-(Y="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||Y&&"auto"!=mxSettings.settings.darkMode||(Y=mxSettings.settings.darkMode));"auto"==Y&&this.isAutoDarkModeSupported()&&(Y=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof Y?"1"==Y:Y);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(u){this.isAutoDarkMode()&&this.setDarkMode(u.matches)}))}catch(u){this.actions.get("autoMode").setEnabled(!1)}"1"==-urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(u,H){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&-c.editor.loadFonts()};var A=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=-c}A.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,B=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(O){mxEvent.getSource(O)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var z=-document.createElement("div");z.style.position="absolute";z.style.width="10px";z.style.height="10px";z.style.borderRadius="5px";z.style.border="1px solid gray";z.style.background="#ffffff";z.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(z);this.bottomResizer=z;var C=null,I=null,L=null,K=null;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(O){K=parseInt(this.diagramContainer.style.height);I=mxEvent.getClientY(O);B.popupMenuHandler.hideMenu();mxEvent.consume(O)}));-z=z.cloneNode(!1);z.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(z);this.rightResizer=z;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(O){L=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(O);B.popupMenuHandler.hideMenu();mxEvent.consume(O)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(O){var da=!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,L+mxEvent.getClientX(O)-C)+"px",da=!0);null!=I&&(this.diagramContainer.style.height=-Math.max(20,K+mxEvent.getClientY(O)-I)+"px",da=!0);da&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(O){null==C&&null==I||mxEvent.consume(O);I=C=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=-"hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";k.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(O){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(O){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=-"hidden";f.style.visibility="hidden";c.style.visibility="hidden";k.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var k=f.clipboardData||f.originalEvent.clipboardData,B=!1,z=0;z<k.types.length;z++)if("text/"===k.types[z].substring(0,5)){B=!0;break}if(!B){var C=-k.items;for(index in C){var I=C[index];if("file"===I.kind){if(c.isEditing())this.importFiles([I.getAsFile()],0,0,this.maxImageSize,function(K,O,da,ea,ca,V){c.insertImage(K,ca,V)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var O=0;O<K.length;O++)K[O]()});else{var L=this.editor.graph.getInsertPoint();this.importFiles([I.getAsFile()],L.x,L.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){k.innerHTML=-" ";k.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow=-"hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML=" ";var B=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var I=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||-f.isEditing()||null!=this.dialog||"INPUT"==I.nodeName||"TEXTAREA"==I.nodeName||"true"==I.contentEditable||224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||B||(k.style.left=f.container.scrollLeft+10+"px",k.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,I=f.container.scrollTop,f.container.appendChild(k),B=!0,k.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=I)}));mxEvent.addListener(document,-"keyup",mxUtils.bind(this,function(C){var I=C.keyCode;window.setTimeout(mxUtils.bind(this,function(){!B||224!=I&&17!=I&&91!=I&&93!=I||(B=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k),c()}catch(I){this.handleError(I)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),-this.copyCells(k,!0),c()}catch(I){this.handleError(I)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(C){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(k.innerHTML=" ",k.focus(),null!=C.clipboardData&&(Graph.removePasteFormatting(k.firstChild),this.pasteCells(C,k,!0,!0)),!mxEvent.isConsumed(C)){var I=f.container.scrollLeft,L=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=I,f.container.scrollTop=L,Graph.removePasteFormatting(k.firstChild),-this.pasteCells(C,k,!1,!0)}catch(K){this.handleError(K)}}),0)}}catch(K){this.handleError(K)}}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==k?!0:z.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=-function(c,f){function k(L){return"simple"==L||"sketch"==L}var B=Editor.currentTheme,z=k(B)&&this.isDefaultTheme(c)||this.isDefaultTheme(B)&&k(c),C=z&&"sketch"!=c&&"sketch"!=B;if(z&&!this.themeSwitching){var I=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=c;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,function(){k(B)&&this.isDefaultTheme(c)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="block",-this.tabContainer.style.display="flex",this.hsplit.style.display="block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(B)&&k(c)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=c?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display="flex");this.switchTheme(c);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));-this.editor.graph.refresh();this.restoreScrollState(I);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&k(c)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=f&&f()}),0)}return C};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate,f=this.diagramContainer.scrollLeft,k=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(f-=this.embedViewport.x,k-=this.embedViewport.y):-(f+=this.embedViewport.x,k+=this.embedViewport.y));return{x:f,y:k,tx:c.x,ty:c.y}};EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,k=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=c.x+(k.x-c.tx)*f;this.diagramContainer.scrollTop=c.y+(k.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&-""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var k=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var B=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=B&&null!=B.getAttribute("class");if(!f&&null!=B){B=-B.getAttribute("title");var z=this.getCurrentFile();z=null!=z?z.savingStatusKey:DrawioFile.prototype.savingStatusKey;B==mxResources.get(z)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(z))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";B=32>=c.clientWidth;c.style.visibility=B&&""==this.editor.getStatus()?"hidden":"";if(B||f)this.statusContainer.style.display="inline-flex",f=!0}else"simple"==Editor.currentTheme?-(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",k);k()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=-this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);-this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);this.sidebarContainer.style.display="";if("sketch"==c){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var f=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);this.createShapesWindow();this.sidebarContainer.className="";this.sidebarContainer.style.position=-"absolute";this.sidebarContainer.style.left="0px";this.sidebarContainer.style.top="0px";this.sidebarContainer.style.bottom=f?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(c=this.isDefaultTheme(c)||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));-null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=-null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&-(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=-Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.switchCssForTheme=function(c){};-EditorUi.prototype.createWrapperForTheme=function(c){null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.createFooterMenuForTheme=-function(c){};EditorUi.prototype.createPickerMenuForTheme=function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&-(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent=-"",this.statusContainer.style.opacity="",this.menubar.container.appendChild(this.statusContainer));null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);c=this.menubar.langIcon;null!=c&&(c.style.position="absolute",c.style.height="18px",c.style.width="18px",c.style.flexShrink="",c.style.opacity="",this.menubarContainer.parentNode.insertBefore(c,this.menubarContainer));null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};-EditorUi.prototype.createMenu=function(c,f,k,B){k=null!=k?k:"geToolbarButton";var z=this.menus.get(c);B=this.menubar.addMenu(mxResources.get(c),z.funct,null,B);B.className=k;B.style.display="inline-block";B.style.cursor="pointer";B.style.height="24px";B.setAttribute("title",mxResources.get(c));this.menus.menuCreated(z,B,k);null!=f&&(B.style.backgroundImage="url("+f+")",B.style.backgroundPosition="center center",B.style.backgroundRepeat="no-repeat",B.style.backgroundSize="100% 100%",B.style.width=-"24px",B.innerText="");return B};EditorUi.prototype.createToolbarButton=function(c,f,k,B){B=null!=B?B:24;var z=document.createElement("a");z.className="geToolbarButton geAdaptiveAsset";z.setAttribute("title",f);z.style.backgroundImage="url("+c+")";z.style.backgroundPosition="center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="100% 100%";z.style.display="inline-block";z.style.cursor="pointer";z.style.marginLeft="6px";z.style.width=B+"px";z.style.height=B+"px";z.style.flexShrink=-"0";z.style.flexGrow="0";null!=k&&(mxEvent.addListener(z,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()})),mxEvent.addListener(z,"click",function(C){"disabled"!=z.getAttribute("disabled")&&k(C);mxEvent.consume(C)}));return z};EditorUi.prototype.createMenuItem=function(c,f,k){var B=this.actions.get(c),z=null!=B?B.funct:null,C=this.createToolbarButton(f,mxResources.get(c)+(null!=B&&null!=B.shortcut?" ("+B.shortcut+")":""),z);null==B||k||(c=function(){B.isEnabled()?-(C.removeAttribute("disabled"),C.style.cursor="pointer"):(C.setAttribute("disabled","disabled"),C.style.cursor="default");C.style.opacity=B.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),B.addListener("stateChanged",c),c());return C};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight--10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,f,mxUtils.bind(this,function(z){z.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var k=this.formatWindow.window.toggleMinimized,B=240;this.formatWindow.window.toggleMinimized=function(){k.apply(this,arguments);this.minimized?(B=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",-this.div.style.left=parseInt(this.div.style.left)+B-140+"px"):(this.div.style.width=B+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-B+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(z){mxEvent.getSource(z)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?-(c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>c)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var G=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):G.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=-function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=this.defaultSidebarWidth);var k=this.hsplitPosition,B=mxUtils.bind(this,function(){this.hsplitPosition=z;this.refresh();this.diagramContainer.scrollLeft-=k-this.hsplitPosition}),z=c?f:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==z?"translateX(0)":"translateX(-100%)");0!=z&&B();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",-0==z?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==z&&B()}),-300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var S=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():S.apply(this,arguments)};var F=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=null!=c?c:!0;if("1"!=urlParams.embedInline){var f=this.container.clientWidth;this.container==-document.body&&(f=document.body.clientWidth||document.documentElement.clientWidth);var k=this.getDiagramContainerOffset();var B=k.x;var z=k.y;"simple"==Editor.currentTheme&&(z+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=z+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,f=Math.max(0,-Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,f-this.splitSize-40))),this.sidebarContainer.style.width=f+"px",this.diagramContainer.style.left=f+B+"px",this.tabContainer.style.left=f+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=f+"px",this.diagramContainer.style.right=this.formatWidth+"px",-this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=k.x+"px",this.diagramContainer.style.right="0")}c&&this.editor.graph.sizeDidChange()}else F.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,function(B){B=this.createMenu(B,null,"geTitle");B.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";-c.appendChild(B);return B});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;",f.className="geTitle",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,-"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.borderLeftStyle="solid",mxUtils.write(f,mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var k=f("newLibrary");k.style.fontSize="11px";k.style.left="0";k=f("openLibraryFrom");k.style.borderLeftStyle="solid";k.style.fontSize="11px";k.style.left="50%"}c.appendChild(this.sidebarContainer);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=-function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),k="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),k&&"1"!=urlParams.embedInline?66:10,k&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,c-6,f-6,mxUtils.bind(this,function(B){this.createShapesPanel(B)}));+c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=+l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,N){StorageFile.listFiles(this,"F",F,N)});window.openBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.getFileContent(this,F,N,K)});window.deleteBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.deleteFile(this,F,N,K)});if(!f){var t=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));+window.openFile.setConsumer(mxUtils.bind(this,function(F,N){null!=N&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(N)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,mxUtils.bind(this,function(K){this.importXml(K,0,0,!0)}),null,N)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,C=z.close;+this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=t;C.apply(z,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,l){var t=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))l();else{var F=0,N,K=!1;C.forEach(function(I,ca){I=ca.name.toLowerCase();"diagram/diagram.xml"==I?(K=!0,ca.async("string").then(function(da){0==+da.indexOf("<mxfile ")?f(da):l()})):0==I.indexOf("versions/")&&(I=parseInt(I.substr(9)),I>F&&(F=I,N=ca))});0<F?N.async("string").then(function(I){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(I,c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(I,mxUtils.bind(this,function(ca){4==ca.readyState&&(200<=ca.status&&299>=ca.status?f(ca.responseText):l())}),c.name):l()}):K||l()}},function(C){l(C)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||+this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,z,C,F,N,K,I,ca,da){I=null!=I?I:!0;var ea=!1,X=null,ba=mxUtils.bind(this,function(ha){var ma=null;null!=ha&&"<mxlibrary"==ha.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ha,F)),this.showSidebar()):ma=this.importXml(ha,l,t,I,null,null!=da?mxEvent.isControlDown(da):null);null!=N&&N(ma)});"image"==f.substring(0,5)?(K=+!1,"image/png"==f.substring(0,9)&&(ca=ca?null:this.extractGraphModelFromPng(c),null!=ca&&0<ca.length&&(X=this.importXml(ca,l,t,I,null,null!=da?mxEvent.isControlDown(da):null),K=!0)),K||(K=this.editor.graph,ca=c.indexOf(";"),0<ca&&(c=c.substring(0,ca)+c.substring(c.indexOf(",",ca+1))),I&&K.isGridEnabled()&&(l=K.snap(l),t=K.snap(t)),ca="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(ca+="editableCssRules=.*;"),+X=[K.insertVertex(null,null,"",l,t,z,C,ca+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ea=!0,this.importGraphML(c,ba)):null!=K&&null!=F&&EditorUi.isVisioFilename(F)?(ea=!0,this.importVisio(K,ba)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ea=!0,f=mxUtils.bind(this,function(ha){4==ha.readyState&&(200<=ha.status&&299>=ha.status?ba(ha.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),+413==ha.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,F):this.parseFile(K,f,F)):0==c.indexOf("PK")&&null!=K?(ea=!0,this.importZipFile(K,ba,mxUtils.bind(this,function(){X=this.insertTextAt(this.validateFileData(c),l,t,!0,null,I);N(X)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(X=this.insertTextAt(this.validateFileData(c),l,t,!0,null,I,null,null!=da?mxEvent.isControlDown(da):null));ea||null==N||N(X);return X};EditorUi.prototype.importFiles=+function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){t=null!=t?t:this.maxImageSize;I=null!=I?I:this.maxImageBytes;var X=null!=f&&null!=l,ba=!0;f=null!=f?f:0;l=null!=l?l:0;var ha=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var ma=ca||this.resampleThreshold,Y=0;Y<c.length;Y++)if("image/svg"!==c[Y].type.substring(0,9)&&"image/"===c[Y].type.substring(0,6)&&c[Y].size>ma){ha=!0;break}var la=mxUtils.bind(this,function(){var Z=this.editor.graph,k=Z.gridSize;z=null!=z?z:mxUtils.bind(this,function(W,aa,ja,pa,sa,qa,wa,Ba,za){try{if(null!=+W&&"<mxlibrary"==W.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,W,wa)),this.showSidebar(),null;this.isCompatibleString(W)&&1==c.length&&null!=ea&&"drop"==ea.type&&this.isBlankFile()&&!this.canUndo()&&(X=!1,pa=ja=0);return this.importFile(W,aa,ja,pa,sa,qa,wa,Ba,za,X,da,ea)}catch(Ea){return this.handleError(Ea),null}});C=null!=C?C:mxUtils.bind(this,function(W){Z.setSelectionCells(W)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=c.length,+J=A,U=[],P=mxUtils.bind(this,function(W,aa){U[W]=aa;if(0==--J){this.spinner.stop();if(null!=N)N(U);else{var ja=[];Z.getModel().beginUpdate();try{for(W=0;W<U.length;W++){var pa=U[W]();null!=pa&&(ja=ja.concat(pa))}}finally{Z.getModel().endUpdate()}}C(ja)}}),T=0;T<A;T++)mxUtils.bind(this,function(W){var aa=c[W];if(null!=aa){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(pa){if(null==F||F(aa))try{if("image/"==aa.type.substring(0,6))if("image/svg"==aa.type.substring(0,9)){var sa=Graph.clipSvgDataUri(pa.target.result),+qa=sa.indexOf(","),wa=decodeURIComponent(escape(atob(sa.substring(qa+1)))),Ba=mxUtils.parseXml(wa),za=Ba.getElementsByTagName("svg");if(0<za.length){var Ea=za[0],ra=da?null:Ea.getAttribute("content");null!=ra&&"<"!=ra.charAt(0)&&"%"!=ra.charAt(0)&&(ra=unescape(window.atob?atob(ra):Base64.decode(ra,!0)));null!=ra&&"%"==ra.charAt(0)&&(ra=decodeURIComponent(ra));null==ra||"<mxfile "!==ra.substring(0,8)&&"<mxGraphModel "!==ra.substring(0,14)?P(W,mxUtils.bind(this,function(){try{if(null!=Ba){var Ma=Ba.getElementsByTagName("svg");+if(0<Ma.length){var Ha=Ma[0],Aa=Ha.getAttribute("width"),Ra=Ha.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;Ra=null!=Ra&&"%"!=Ra.charAt(Ra.length-1)?parseFloat(Ra):NaN;var Za=Ha.getAttribute("viewBox");if(null==Za||0==Za.length)Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);else if(isNaN(Aa)||isNaN(Ra)){var La=Za.split(" ");3<La.length&&(Aa=parseFloat(La[2]),Ra=parseFloat(La[3]))}sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var $a=Math.min(1,Math.min(t/Math.max(1,+Aa)),t/Math.max(1,Ra)),Da=z(sa,aa.type,f+W*k,l+W*k,Math.max(1,Math.round(Aa*$a)),Math.max(1,Math.round(Ra*$a)),aa.name);if(null!=Da&&(isNaN(Aa)||isNaN(Ra))){var x=new Image;x.onload=mxUtils.bind(this,function(){Aa=Math.max(1,x.width);Ra=Math.max(1,x.height);Da[0].geometry.width=Aa;Da[0].geometry.height=Ra;Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var M=sa.indexOf(";");0<M&&(sa=sa.substring(0,M)+sa.substring(sa.indexOf(",",M+1)));Z.setCellStyles("image",+sa,[Da[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}return Da}}}catch(M){}return null})):P(W,mxUtils.bind(this,function(){return z(ra,"text/xml",f+W*k,l+W*k,0,0,aa.name)}))}else P(W,mxUtils.bind(this,function(){return null}))}else{qa=!1;if("image/png"==aa.type){var ya=da?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ya&&0<ya.length){var Ca=new Image;Ca.src=pa.target.result;P(W,mxUtils.bind(this,function(){return z(ya,"text/xml",f+W*k,l+W*k,Ca.width,Ca.height,aa.name)}));+qa=!0}}qa||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(pa.target.result,mxUtils.bind(this,function(Ma){this.resizeImage(Ma,pa.target.result,mxUtils.bind(this,function(Ha,Aa,Ra){P(W,mxUtils.bind(this,function(){if(null!=Ha&&Ha.length<I){var Za=ba&&this.isResampleImageSize(aa.size,+ca)?Math.min(1,Math.min(t/Aa,t/Ra)):1;return z(Ha,aa.type,f+W*k,l+W*k,Math.round(Aa*Za),Math.round(Ra*Za),aa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),ba,t,ca,aa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=pa.target.result,z(sa,aa.type,f+W*k,l+W*k,240,160,aa.name,function(Ma){P(W,function(){return Ma})},aa)}catch(Ma){P(W,mxUtils.bind(this,function(){return null})),null!=window.console&&+console.error(Ma,aa)}else P(W,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(aa.name)?z(null,aa.type,f+W*k,l+W*k,240,160,aa.name,function(pa){P(W,function(){return pa})},aa):"image"==aa.type.substring(0,5)||"application/pdf"==aa.type?ja.readAsDataURL(aa):ja.readAsText(aa)}})(T)});if(ha){ha=[];for(Y=0;Y<c.length;Y++)ha.push(c[Y]);c=ha;this.confirmImageResize(function(Z){ba=Z;la()},K)}else la()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&+this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,z=function(C,F){if(C||f)mxSettings.setResizeImages(C?F:null),mxSettings.save();l();c(F)};null==t||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(C){z(C,+!0)},function(C){z(C,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):z(!1,t)};EditorUi.prototype.parseFile=function(c,f,l){l=null!=l?l:c.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,f,l)});t.readAsText(c)};EditorUi.prototype.parseFileData=+function(c,f,l){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){f(t)};t.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,t,z,C,+F){z=null!=z?z:this.maxImageSize;var N=Math.max(1,c.width),K=Math.max(1,c.height),I=f;if(t&&this.isResampleImageSize(null!=F?F:f.length,C))try{var ca=Math.max(N/z,K/z);if(1<ca){var da=Math.round(N/ca),ea=Math.round(K/ca),X=document.createElement("canvas");X.width=da;X.height=ea;X.getContext("2d").drawImage(c,0,0,da,ea);var ba=X.toDataURL();if(ba.length<f.length){var ha=document.createElement("canvas");ha.width=da;ha.height=ea;var ma=ha.toDataURL();ba!==ma&&(f=ba,N=da,K=ea)}}}catch(Y){}t&&I!=f&&z>+this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,l,t,z/1.5,C,F):l(f,N,K)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,l){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;f(t)};null!=l&&(t.onerror=l);t.src=c}catch(z){if(null!=l)l(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=+(null!=urlParams.rough?urlParams.rough:c)};var u=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());u.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};+var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,l=f.isEnabled;f.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(k){var A=k.getEvent();return null==k.getState()&&!mxEvent.isMouseEvent(A)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(A)&&(null==k.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))});+f.cellEditor.editPlantUmlData=function(k,A,J){var U=JSON.parse(J);A=new TextareaDialog(c,mxResources.get("plantUml")+":",U.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(P,U.format,function(T,W,aa){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==U.format)f.labelChanged(k,"<pre>"+T+"</pre>"),f.updateCellSize(k,!0);else{f.setCellStyles("image",c.convertDataUri(T),[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=+W,ja.height=aa,f.cellsResized([k],[ja],!1))}f.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:P,format:U.format}))}finally{f.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};f.cellEditor.editMermaidData=function(k,A,J){var U=JSON.parse(J);A=new TextareaDialog(c,mxResources.get("mermaid")+":",U.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(P,U.config,+function(T,W,aa){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",T,[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=Math.max(ja.width,W),ja.height=Math.max(ja.height,aa),f.cellsResized([k],[ja],!1));f.setAttributeForCell(k,"mermaidData",JSON.stringify({data:P,config:U.config},null,2))}finally{f.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=+function(k,A){try{var J=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=J)this.editPlantUmlData(k,A,J);else if(J=this.graph.getAttributeForCell(k,"mermaidData"),null!=J&&window.isMermaidEnabled)this.editMermaidData(k,A,J);else{var U=f.getCellStyle(k);"1"==mxUtils.getValue(U,"metaEdit","0")?c.showDataDialog(k):t.apply(this,arguments)}}catch(P){c.handleError(P)}};f.getLinkTitle=function(k){return c.getLinkTitle(k)};f.customLinkClicked=function(k,A){var J=!1;try{var U=this.getGraphBounds();+c.handleCustomLink(k,A);J=!0;c.chromelessResize&&!U.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(A))}catch(P){c.handleError(P)}return J};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(k){var A=z.apply(this,arguments);null!=A&&null!=A.src&&Graph.isPageLink(A.src)&&(A={originalSrc:A.src});return A};var C=f.setBackgroundImage;f.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));C.apply(this,+arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,A){k=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=k){var J=k.indexOf(",");if(0<J)for(k=k.substring(J+1),A=A.getProperty("patches"),J=0;J<A.length;J++)if(null!=A[J][EditorUi.DIFF_UPDATE]&&null!=A[J][EditorUi.DIFF_UPDATE][k]||+null!=A[J][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(A[J][EditorUi.DIFF_REMOVE],k)){f.refreshBackgroundImage();break}}}));var F=f.getBackgroundImageObject;f.getBackgroundImageObject=function(k,A){var J=F.apply(this,arguments);null!=J&&null!=J.originalSrc&&(J=A?c.createImageForPageLink(J.originalSrc,null,null,!0):{src:J.originalSrc});return J};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");+if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(k,A,J){var U=A;A=function(P,T,W){if(null==T){var aa=mxEvent.getSource(P);"a"==aa.nodeName.toLowerCase()&&(T=aa.getAttribute("href"))}null!=+T&&f.isCustomLink(T)&&(mxEvent.isTouchEvent(P)||!mxEvent.isPopupTrigger(P))&&f.customLinkClicked(T,W)&&mxEvent.consume(P);null!=U&&U(P,T,W)};K.call(this,k,A,J)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var I=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,A,J){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,J);I.apply(this,arguments);+f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,J);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,J)};var ca=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,A,J){if(c.editor.graph.isSelectionEmpty())ca.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,J);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,A,J):this.addPopupMenuArrangeItems(k,+A,J),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,J),this.isShowCellEditItems()||this.addPopupDeleteItem(k,A,J),this.addMenuItems(k,["lockUnlock","-"],null,J),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(A)&&f.isCellEditable(A)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),f.getModel().isEdge(A))){this.addSubmenu("line",k);var U=f.getModel().getGeometry(A);null!=U&&null!=U.points&&0<U.points.length&&this.addMenuItems(k,+["clearWaypoints"],null,J)}1==f.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,J);U=c.getSelectionState();null!=U.mergeCell?this.addMenuItem(k,"mergeCells"):(1<U.style.colspan||1<U.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;+this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var da=f.getExportVariables;f.getExportVariables=function(){var k=da.apply(this,arguments),A=c.getCurrentFile();null!=A&&(k.filename=A.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var ea=f.getGlobalVariable;f.getGlobalVariable=+function(k){var A=c.getCurrentFile();return"filename"==k&&null!=A?A.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:ea.apply(this,arguments)};var X=null,ba=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),A=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;X!=A&&k==ba&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),+f.view.validate());X=A;ba=k}));var ha=f.labelLinkClicked;f.labelLinkClicked=function(k,A,J){var U=A.getAttribute("href");if(null==U||!f.isCustomLink(U)||!mxEvent.isTouchEvent(J)&&mxEvent.isPopupTrigger(J))ha.apply(this,arguments);else{if(!f.isEnabled()||null!=k&&f.isCellLocked(k.cell))f.customLinkClicked(U),f.getRubberband().reset();mxEvent.consume(J)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,A=c.getCurrentFile();null!=A&&(k=null!=A.getTitle()?A.getTitle():k);return k};+var ma=this.actions.get("print");ma.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ma.visible=ma.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,+!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&f.addListener(mxEvent.ESCAPE,function(k,A){null!=A&&f.isEnabled()&&!f.isEditing()&&null!=+A.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var A=f.cellEditor.text2,J=null;null!=A&&(mxEvent.addListener(A,"dragleave",function(U){null!=J&&(J.parentNode.removeChild(J),J=null);U.stopPropagation();+U.preventDefault()}),mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(U){null==J&&(!mxClient.IS_IE||10<document.documentMode)&&(J=this.highlightElement(A));U.stopPropagation();U.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(U){null!=J&&(J.parentNode.removeChild(J),J=null);if(0<U.dataTransfer.files.length)this.importFiles(U.dataTransfer.files,0,0,this.maxImageSize,function(T,W,aa,ja,pa,sa){f.insertImage(T,pa,sa)},function(){},function(T){return"image/"==T.type.substring(0,+6)},function(T){for(var W=0;W<T.length;W++)T[W]()},mxEvent.isControlDown(U));else if(0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")){var P=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(T){var W=Math.max(1,T.width);T=Math.max(1,T.height);var aa=this.maxImageSize;aa=Math.min(1,Math.min(aa/Math.max(1,W)),aa/Math.max(1,T));f.insertImage(decodeURIComponent(P),W*aa,T*aa)})):document.execCommand("insertHTML",+!1,U.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(U.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(U.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/plain"));U.stopPropagation();U.preventDefault()})))}));if(Editor.isSettingsEnabled()){ma=this.editor.graph.view;var Y=mxSettings.getUnit();ma.setUnit(Y);Editor.pageSizeUnit=Y==mxConstants.METERS?mxConstants.MILLIMETERS:+Y;ma.addListener("unitChanged",function(k,A){k=A.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ma.unit);this.refresh()}if("1"==urlParams.styledev){ma=document.getElementById("geFooter");null!=ma&&(this.styleInput=document.createElement("input"),+this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),ma.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,+mxUtils.bind(this,function(k,A){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var la=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?!0:la.apply(this,arguments)}}ma=document.getElementById("geInfo");null!=ma&&ma.parentNode.removeChild(ma);if(Graph.fileSupport&&+(!this.editor.chromeless||this.editor.editable)){var Z=null;mxEvent.addListener(f.container,"dragleave",function(k){f.isEnabled()&&(null!=Z&&(Z.parentNode.removeChild(Z),Z=null),k.stopPropagation(),k.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(k){null==Z&&(!mxClient.IS_IE||10<document.documentMode)&&(Z=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(f.container,+"drop",mxUtils.bind(this,function(k){null!=Z&&(Z.parentNode.removeChild(Z),Z=null);if(f.isEnabled()){var A=mxUtils.convertPoint(f.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),J=k.dataTransfer.files,U=f.view.translate,P=f.view.scale,T=A.x/P-U.x,W=A.y/P-U.y;if(0<J.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(J,!0)):(mxEvent.isAltDown(k)&&(W=T=null),this.importFiles(J,T,W,this.maxImageSize,+null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(W=T=0);var aa=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;A=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=A)f.setSelectionCells(this.importXml(A,T,W,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var ja=k.dataTransfer.getData("text/html");A=document.createElement("div");A.innerHTML=Graph.sanitizeHtml(ja);+var pa=null;J=A.getElementsByTagName("img");null!=J&&1==J.length?(ja=J[0].getAttribute("src"),null==ja&&(ja=J[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)||(pa=!0)):(J=A.getElementsByTagName("a"),null!=J&&1==J.length?ja=J[0].getAttribute("href"):(A=A.getElementsByTagName("pre"),null!=A&&1==A.length&&(ja=mxUtils.getTextContent(A[0]))));var sa=!0,qa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ja,T,W,!0,pa,null,sa,mxEvent.isControlDown(k)))});pa&&null!=+ja&&ja.length>this.resampleThreshold?this.confirmImageResize(function(wa){sa=wa;qa()},mxEvent.isControlDown(k)):qa()}else null!=aa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(wa){var Ba=Math.max(1,wa.width);wa=Math.max(1,wa.height);var za=this.maxImageSize;za=Math.min(1,Math.min(za/Math.max(1,Ba)),za/Math.max(1,wa));f.setSelectionCell(f.insertVertex(null,null,"",T,W,Ba*za,wa*za,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="++aa+";"))}),mxUtils.bind(this,function(wa){f.setSelectionCells(this.insertTextAt(aa,T,W,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),T,W,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();+this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),A=parseInt(this.div.offsetWidth),J=c.embedViewport.x+c.embedViewport.width,U=parseInt(this.div.offsetTop),P=parseInt(this.div.offsetHeight),+T=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,J-A))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(U,T-P))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ma=Editor.currentTheme,"simple"==ma||"sketch"==ma)Editor.currentTheme="",this.doSetCurrentTheme(ma,+mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);ma=!1;null!=urlParams.dark?ma=urlParams.dark:(ma="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ma&&"auto"!=mxSettings.settings.darkMode||(ma=mxSettings.settings.darkMode));"auto"==ma&&+this.isAutoDarkModeSupported()&&(ma=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof ma?"1"==ma:ma);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&+null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(k,A){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts()};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==+Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=+this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(I){mxEvent.getSource(I)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(I),mxEvent.getClientY(I)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var z=document.createElement("div");z.style.position="absolute";z.style.width="10px";z.style.height="10px";z.style.borderRadius=+"5px";z.style.border="1px solid gray";z.style.background="#ffffff";z.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(z);this.bottomResizer=z;var C=null,F=null,N=null,K=null;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(I){K=parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(I);t.popupMenuHandler.hideMenu();mxEvent.consume(I)}));z=z.cloneNode(!1);z.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(z);this.rightResizer=z;mxEvent.addGestureListeners(z,+mxUtils.bind(this,function(I){N=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(I);t.popupMenuHandler.hideMenu();mxEvent.consume(I)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(I){var ca=!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(I)-C)+"px",ca=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,K+mxEvent.getClientY(I)-F)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",+fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(I){null==C&&null==F||mxEvent.consume(I);F=C=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";+this.addListener("editInlineStart",mxUtils.bind(this,function(I){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(I){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,+function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var l=f.clipboardData||f.originalEvent.clipboardData,t=!1,z=0;z<l.types.length;z++)if("text/"===l.types[z].substring(0,5)){t=!0;break}if(!t){var C=l.items;for(index in C){var F=C[index];if("file"===F.kind){if(c.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,+function(K,I,ca,da,ea,X){c.insertImage(K,ea,X)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var I=0;I<K.length;I++)K[I]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML=" ";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,+l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize=+"none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML=" ";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var F=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||"true"==F.contentEditable||+224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||t||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,F=f.container.scrollTop,f.container.appendChild(l),t=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=F)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(C){var F=C.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||+224!=F&&17!=F&&91!=F&&93!=F||(t=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l),c()}catch(F){this.handleError(F)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l,!0),c()}catch(F){this.handleError(F)}}));+mxEvent.addListener(l,"paste",mxUtils.bind(this,function(C){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML=" ",l.focus(),null!=C.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(C,l,!0,!0)),!mxEvent.isConsumed(C)){var F=f.container.scrollLeft,N=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=F,f.container.scrollTop=N,Graph.removePasteFormatting(l.firstChild),this.pasteCells(C,l,!1,!0)}catch(K){this.handleError(K)}}),+0)}}catch(K){this.handleError(K)}}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==l?!0:z.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,f,l){function t(N){return"simple"==+N||"sketch"==N}var z=Editor.currentTheme,C="simple"==z&&this.isDefaultTheme(c)||this.isDefaultTheme(z)&&"simple"==c;if((C||l)&&!this.themeSwitching){var F=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=c;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,function(){t(z)&&this.isDefaultTheme(c)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="",this.tabContainer.style.display="",this.hsplit.style.display=+"block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(z)&&t(c)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=c?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display="");this.switchTheme(c);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();+this.restoreScrollState(F);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&t(c)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=f&&f()}),0)}return C};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate,f=this.diagramContainer.scrollLeft,l=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(f-=this.embedViewport.x,l-=this.embedViewport.y):(f+=this.embedViewport.x,+l+=this.embedViewport.y));return{x:f,y:l,tx:c.x,ty:c.y}};EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,l=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*f;this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&+(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var t=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=t&&null!=t.getAttribute("class");if(!f&&null!=t){t=t.getAttribute("title");var z=+this.getCurrentFile();z=null!=z?z.savingStatusKey:DrawioFile.prototype.savingStatusKey;t==mxResources.get(z)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(z))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";t=32>=c.clientWidth;c.style.visibility=t&&""==this.editor.getStatus()?"hidden":"";if(t||f)this.statusContainer.style.display="inline-flex",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display=+"inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&+this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);+this.createMenubarForTheme(c);this.sidebarContainer.style.display="";if("sketch"==c){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var f=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);this.createShapesWindow();this.sidebarContainer.className="";this.sidebarContainer.style.position="absolute";this.sidebarContainer.style.left=+"0px";this.sidebarContainer.style.top="0px";this.sidebarContainer.style.bottom=f?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(c=this.isDefaultTheme(c)||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,+this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),+this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=+null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=+Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createWrapperForTheme=function(c){null!=+this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=+function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")++": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity=+"",this.menubar.container.appendChild(this.statusContainer));null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);c=this.menubar.langIcon;null!=c&&(c.style.position="absolute",c.style.height="18px",c.style.width="18px",c.style.flexShrink="",c.style.opacity="",this.menubarContainer.parentNode.insertBefore(c,this.menubarContainer));null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};+EditorUi.prototype.createMenu=function(c,f,l,t){l=null!=l?l:"geToolbarButton";var z=this.menus.get(c);t=this.menubar.addMenu(mxResources.get(c),z.funct,null,t);t.className=l;t.style.display="inline-block";t.style.cursor="pointer";t.style.height="24px";t.setAttribute("title",mxResources.get(c));this.menus.menuCreated(z,t,l);null!=f&&(t.style.backgroundImage="url("+f+")",t.style.backgroundPosition="center center",t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="100% 100%",t.style.width=+"24px",t.innerText="");return t};EditorUi.prototype.createToolbarButton=function(c,f,l,t){t=null!=t?t:24;var z=document.createElement("a");z.className="geToolbarButton geAdaptiveAsset";z.setAttribute("title",f);z.style.backgroundImage="url("+c+")";z.style.backgroundPosition="center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="100% 100%";z.style.display="inline-block";z.style.cursor="pointer";z.style.marginLeft="6px";z.style.width=t+"px";z.style.height=t+"px";z.style.flexShrink=+"0";z.style.flexGrow="0";null!=l&&(mxEvent.addListener(z,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()})),mxEvent.addListener(z,"click",function(C){"disabled"!=z.getAttribute("disabled")&&l(C);mxEvent.consume(C)}));return z};EditorUi.prototype.createMenuItem=function(c,f,l){var t=this.actions.get(c),z=null!=t?t.funct:null,C=this.createToolbarButton(f,mxResources.get(c)+(null!=t&&null!=t.shortcut?" ("+t.shortcut+")":""),z);null==t||l||(c=function(){t.isEnabled()?+(C.removeAttribute("disabled"),C.style.cursor="pointer"):(C.setAttribute("disabled","disabled"),C.style.cursor="default");C.style.opacity=t.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),t.addListener("stateChanged",c),c());return C};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-+10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,f,mxUtils.bind(this,function(z){z.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var l=this.formatWindow.window.toggleMinimized,t=240;this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",+this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(z){mxEvent.getSource(z)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?+(c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>c)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var H=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):H.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=+function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=this.defaultSidebarWidth);var l=this.hsplitPosition,t=mxUtils.bind(this,function(){this.hsplitPosition=z;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),z=c?f:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==z?"translateX(0)":"translateX(-100%)");0!=z&&t();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",+0==z?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==z&&t()}),+300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var S=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():S.apply(this,arguments)};var G=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=null!=c?c:!0;if("1"!=urlParams.embedInline){var f=this.container.clientWidth;this.container==+document.body&&(f=document.body.clientWidth||document.documentElement.clientWidth);var l=this.getDiagramContainerOffset();var t=l.x;var z=l.y;"simple"==Editor.currentTheme&&(z+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=z+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,f=Math.max(0,+Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,f-this.splitSize-40))),this.sidebarContainer.style.width=f+"px",this.diagramContainer.style.left=f+t+"px",this.tabContainer.style.left=f+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=f+"px",this.diagramContainer.style.right=this.formatWidth+"px",+this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=l.x+"px",this.diagramContainer.style.right="0")}c&&this.editor.graph.sizeDidChange()}else G.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,function(t){t=this.createMenu(t,null,"geTitle");t.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";+c.appendChild(t);return t});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;",f.className="geTitle",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,+"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.borderLeftStyle="solid",mxUtils.write(f,mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var l=f("newLibrary");l.style.fontSize="11px";l.style.left="0";l=f("openLibraryFrom");l.style.borderLeftStyle="solid";l.style.fontSize="11px";l.style.left="50%"}c.appendChild(this.sidebarContainer);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=+function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,c-6,f-6,mxUtils.bind(this,function(t){this.createShapesPanel(t)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setAndPersistDarkMode=function(c){var f=c;"auto"==c&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(f);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(c){mxSettings.setLanguage(c);mxSettings.save();mxClient.language=c;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var f=document.getElementById("high-contrast-stylesheet");-if(null!=f&&window.matchMedia){var k=window.matchMedia("(forced-colors: active)").matches,B=f.getAttribute("media");(B="all"==B||"not all"!=B&&k)&&!c?f.setAttribute("media",k?"not all":"(forced-colors: active)"):!B&&c&&f.setAttribute("media",k?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&+if(null!=f&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,t=f.getAttribute("media");(t="all"==t||"not all"!=t&&l)&&!c?f.setAttribute("media",l?"not all":"(forced-colors: active)"):!t&&c&&f.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.refresh();this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-f.x;this.diagramContainer.scrollTop+=c.x-f.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){Editor.darkMode=c;c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff";null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),c.style.colorScheme="light"));null!=this.ruler&&this.ruler.updateStyle();this.fireEvent(new mxEventObject("darkModeChanged"))};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,f){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=-function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,B=this.editor.graph;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",k.style.left=-"10px",k.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width=-"",this.diagramContainer.style.height="");else{var z=this.diagramContainer.getAttribute("data-bounds");if(null!=z){this.diagramContainer.removeAttribute("data-bounds");B.getGraphBounds();var C=z.split(" ");B=mxUtils.getDocumentSize();this.diagramContainer.style.top=C[0];this.diagramContainer.style.left=C[1];z=parseInt(C[2]);C=parseInt(C[3]);z=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,z):z,B.width-80);C=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,C):C,B.height--80);this.diagramContainer.style.width=z+"px";this.diagramContainer.style.height=C+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";k.style.display="";k.style.left=this.diagramContainer.offsetLeft-k.offsetWidth-4+"px";k.style.top=+function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left=+"10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width=+"",this.diagramContainer.style.height="");else{var z=this.diagramContainer.getAttribute("data-bounds");if(null!=z){this.diagramContainer.removeAttribute("data-bounds");t.getGraphBounds();var C=z.split(" ");t=mxUtils.getDocumentSize();this.diagramContainer.style.top=C[0];this.diagramContainer.style.left=C[1];z=parseInt(C[2]);C=parseInt(C[3]);z=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,z):z,t.width-80);C=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,C):C,t.height-+80);this.diagramContainer.style.width=z+"px";this.diagramContainer.style.height=C+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;f.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-@@ -3858,209 +3858,208 @@ EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defa"1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var f=Graph.prototype.getLinkTitle.apply(this,-arguments);if(Graph.isPageLink(c)){var k=c.indexOf(",");0<k&&(f=this.getPageById(c.substring(k+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var k=JSON.parse(c.substring(17));null!=k&&null!=k.title&&(f=k.title)}catch(B){}return f};EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=+arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(f=this.getPageById(c.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));null!=l&&null!=l.title&&(f=l.title)}catch(t){}return f};EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,f)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(f){f.key==mxSettings.key&&-(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,k){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));-this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,k){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,k){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+-c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,k){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,k){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||-this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(f,k){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",-mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,f,k){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,-function(B,z){try{this.spinner.stop();var C=this.createImageDataUri(B,f,"png"),I=parseInt(z.getAttribute("width")),L=parseInt(z.getAttribute("height"));this.writeImageToClipboard(C,I,L,mxUtils.bind(this,function(K){this.handleError(K)}))}catch(K){this.handleError(K)}}),null,null,null,mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?-c:null)}catch(B){this.handleError(B)}};EditorUi.prototype.copyCells=function(c,f){var k=this.editor.graph;if(k.isSelectionEmpty())c.innerText="";else{var B=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),z=mxUtils.getXml(k.encodeCells(B));mxUtils.setTextContent(c,encodeURIComponent(z));f?(k.removeCells(B,!1),k.lastPasteXml=null):(k.lastPasteXml=z,k.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var f=-this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,k,B,z){z=null!=z?z:!0;var C=this.editor.graph,I=null;C.lastPasteXml==c?C.pasteCounter++:(C.lastPasteXml=c,C.pasteCounter=0);var L=C.pasteCounter*C.gridSize;if(k||this.isCompatibleString(c))I=this.importXml(c,L,L),C.setSelectionCells(I);else if(f&&1==-C.getSelectionCount()){z=C.getStartEditingCell(C.getSelectionCell(),B);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==C.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])C.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{C.model.beginUpdate();try{C.labelChanged(z,c),Graph.isLink(c)&&C.setLinkForCell(z,c)}finally{C.model.endUpdate()}}C.setSelectionCell(z)}else I=C.getInsertPoint(),C.isMouseInsertPoint()&&(L=0,C.lastPasteXml==c&&0<C.pasteCounter&&C.pasteCounter--),I=this.insertTextAt(c,I.x+L,-I.y+L,z),C.setSelectionCells(I);C.isSelectionEmpty()||(C.scrollCellToVisible(C.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(C.view.getState(C.getSelectionCell())));return I};EditorUi.prototype.pasteCells=function(c,f,k,B){if(!mxEvent.isConsumed(c)){var z=f,C=!1;if(k&&null!=c.clipboardData&&c.clipboardData.getData){var I=c.clipboardData.getData("text/plain"),L=!1;if(null!=I&&0<I.length&&"%3CmxGraphModel%3E"==I.substring(0,18))try{var K=decodeURIComponent(I);this.isCompatibleString(K)&&-(L=!0,I=K)}catch(ma){}L=L?null:c.clipboardData.getData("text/html");null!=L&&0<L.length?(z=this.parseHtmlData(L),C="text/plain"!=z.getAttribute("data-type")):null!=I&&0<I.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,L))}I=z.getElementsByTagName("span");if(null!=I&&0<I.length&&"application/vnd.lucid.chart.objects"===I[0].getAttribute("data-lucid-type"))k=I[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(ma){var la=-this.editor.graph;la.lastPasteXml==ma?la.pasteCounter++:(la.lastPasteXml=ma,la.pasteCounter=0);var Y=la.pasteCounter*la.gridSize;la.setSelectionCells(this.importXml(ma,Y,Y));la.scrollCellToVisible(la.getSelectionCell())}),mxUtils.bind(this,function(ma){this.handleError(ma)})),mxEvent.consume(c));else{var O=!1,da="";da=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==-z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var ea=da.lastIndexOf("%3E");0<=ea&&ea<da.length-3&&(da=da.substring(0,ea+3))}catch(ma){}try{I=z.getElementsByTagName("span"),(K=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(da))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(O=!0,da=-K)}catch(ma){}try{if(null!=da&&0<da.length){if(0==da.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ca=mxUtils.bind(this,function(){try{da=(new MiroImporter).importMiroJson(JSON.parse(da)),this.pasteXml(da,B,O,c)}catch(ma){console.log("Miro import error:",ma)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ca):ca()}else this.pasteXml(da,B,O,c,C);try{mxEvent.consume(c)}catch(ma){}}else if(!k){var V=this.editor.graph;V.lastPasteXml=null;V.pasteCounter=-0}}catch(ma){this.handleError(ma)}}}f.innerHTML=" "};EditorUi.prototype.showPrintDialog=function(c,f){var k=320;this.editor.graph.isEnabled()&&(k+=40);null!=this.pages&&1<this.pages.length&&(k+=40,this.editor.graph.isEnabled()||(k+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(k+=20);this.showDialog((new PrintDialog(this,c,f)).container,320,k,!0,!0)};EditorUi.prototype.print=function(c,f){var k=this.editor,B=k.graph,z=this.getPageIndex(this.currentPage),C=null!=z?z+-1:1,I=mxUtils.bind(this,function(Y,fa,Z,l){var u=Y.useCssTransforms,H=Y.currentTranslate,U=Y.currentScale,J=Y.view.translate,W=Y.view.scale;Y.useCssTransforms&&(Y.useCssTransforms=!1,Y.currentTranslate=new mxPoint(0,0),Y.currentScale=1,Y.view.translate=new mxPoint(0,0),Y.view.scale=1);var aa=Y.getGraphBounds(),ba=0,ja=0,oa=mxRectangle.fromRectangle(Y.pageFormat),qa=f.fit||f.crop||!Y.pageVisible,ra=f.scale;oa.width=Math.ceil(oa.width*Y.pageScale);oa.height=Math.ceil(oa.height*Y.pageScale);var ua=1;-if(f.fit){ua=f.sheetsAcross;var za=f.sheetsDown;isNaN(ra)||(oa.width=Math.ceil(oa.width*ra),oa.height=Math.ceil(oa.height*ra));ua=Math.min(oa.height*za/(aa.height/Y.view.scale),oa.width*ua/(aa.width/Y.view.scale))}else ua=isNaN(ra)?1:ra;ua*=1;!qa&&Y.pageVisible?(ra=Y.getPageLayout(),ba-=ra.x*oa.width,ja-=ra.y*oa.height):qa=!0;f.crop&&(f.selection&&(aa=B.getBoundingBox(B.getSelectionCells())),oa.width=(aa.width+1)*ua/Y.view.scale,oa.height=(aa.height+1)*ua/Y.view.scale);oa.width=Math.ceil(1*oa.width);-oa.height=Math.ceil(1*oa.height);l=null!=l?"page/id,"+l:null;if(null==fa){fa=PrintDialog.createPrintPreview(Y,ua,null,0,ba,ja,qa);fa.title=this.getBaseFilename(!0);fa.pageSelector=!1;fa.mathEnabled=!1;ba=f.border;isNaN(ba)||(fa.pageMargin=ba);f.selection&&(fa.isCellVisible=function(sa){return Y.isCellSelected(sa)});var Ba=fa.writeHead;fa.writeHead=function(sa){Ba.apply(this,arguments);mxClient.IS_GC&&(sa.writeln('<style type="text/css">'),sa.writeln("@media print {"),sa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),-sa.writeln("}"),sa.writeln("</style>"));null!=k.fontCss&&(sa.writeln('<style type="text/css">'),sa.writeln(mxUtils.htmlEntities(k.fontCss,!1,!1,!1)),sa.writeln("</style>"));for(var Aa=Y.getCustomFonts(),Ea=0;Ea<Aa.length;Ea++){var Ka=Aa[Ea].name,Ma=Aa[Ea].url;Graph.isCssFontUrl(Ma)?sa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Ma))+'" charset="UTF-8" type="text/css">'):(sa.writeln('<style type="text/css">'),sa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ka)+-'";\nsrc: url("'+mxUtils.htmlEntities(Ma)+'");\n}'),sa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var Ca=fa.drawBackgroundImage;fa.drawBackgroundImage=function(sa){Ca.apply(this,arguments);null!=sa.node&&(EditorUi.embedSvgImages(sa.node),B.disableSvgLinks(sa.node,function(Aa){Aa.setAttribute("href","javascript:void(0)")}))}}var La=fa.addGraphFragment;fa.addGraphFragment=function(sa,Aa,Ea,Ka,Ma,ya){La.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:Ma.classList.add("geDisableMathJax")};-f.grid&&(fa.gridSize=Y.gridSize,fa.gridSteps=Y.view.gridSteps,fa.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:Y.view.gridColor);fa.open(null,null,Z,!0,l,oa,f.selection?Y.getSelectionCells():null)}else{aa=Y.background;if(null==aa||""==aa||aa==mxConstants.NONE)aa="#ffffff";fa.backgroundColor=aa;fa.autoOrigin=qa;f.grid&&(fa.gridSize=Y.gridSize,fa.gridSteps=Y.view.gridSteps,fa.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:Y.view.gridColor);fa.appendGraph(Y,-ua,ba,ja,Z,!0,l,oa,f.selection?Y.getSelectionCells():null);Z=Y.getCustomFonts();if(null!=fa.wnd)for(oa=0;oa<Z.length;oa++)ba=Z[oa].name,ja=Z[oa].url,Graph.isCssFontUrl(ja)?fa.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(ja)+'" charset="UTF-8" type="text/css">'):(fa.wnd.document.writeln('<style type="text/css">'),fa.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(ba)+'";\nsrc: url("'+mxUtils.htmlEntities(ja)+'");\n}'),fa.wnd.document.writeln("</style>"))}u&&-(Y.useCssTransforms=u,Y.currentTranslate=H,Y.currentScale=U,Y.view.translate=J,Y.view.scale=W);return fa}),L=f.pagesFrom,K=f.pagesTo,O=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{O&&(O=f.selection||L==C&&K==C);if(!O&&null!=this.pages&&this.pages.length){O=0;C=this.pages.length-1;f.allPages||(O=parseInt(L)-1,C=parseInt(K)-1);for(var da=O;da<=C;da++){var ea=this.pages[da];L=ea==this.currentPage?B:null;if(null==L){L=this.createTemporaryGraph(B.stylesheet);L.shapeForegroundColor=-B.shapeForegroundColor;L.shapeBackgroundColor=B.shapeBackgroundColor;K=!0;O=!1;var ca=null,V=null;null==ea.viewState&&null==ea.root&&this.updatePageRoot(ea);null!=ea.viewState&&(K=ea.viewState.pageVisible,O=ea.viewState.mathEnabled,ca=ea.viewState.background,V=ea.viewState.backgroundImage,L.pageFormat=ea.viewState.pageFormat,L.gridSize=ea.viewState.gridSize);null!=V&&null!=V.originalSrc&&(V=this.createImageForPageLink(V.originalSrc,ea));L.background=ca;L.backgroundImage=null!=V?new mxImage(V.src,-V.width,V.height,V.x,V.y):null;L.pageVisible=K;L.mathEnabled=O;var ma=L.getGraphBounds;L.getGraphBounds=function(){var Y=ma.apply(this,arguments),fa=this.backgroundImage;if(null!=fa&&null!=fa.width&&null!=fa.height){var Z=this.view.translate,l=this.view.scale;Y=mxRectangle.fromRectangle(Y);Y.add(new mxRectangle((Z.x+fa.x)*l,(Z.y+fa.y)*l,fa.width*l,fa.height*l))}return Y};var la=L.getGlobalVariable;L.getGlobalVariable=function(Y){return"page"==Y?ea.getName():"pagenumber"==Y?da+1:"pagecount"==Y?null!=-this.pages?this.pages.length:1:la.apply(this,arguments)};document.body.appendChild(L.container);this.updatePageRoot(ea);L.model.setRoot(ea.root)}z=I(L,z,da!=C,ea.getId());L!=B&&L.container.parentNode.removeChild(L.container)}}else z=I(B);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(I=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),I.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),Graph.rewritePageLinks(z.wnd.document,-!0),z.mathEnabled||c||PrintDialog.printPreview(z));return z}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,k=0;k<c.length;k++)mxEvent.addListener(c[k],"dragleave",function(B){null!=f&&(f.parentNode.removeChild(f),f=null);B.stopPropagation();B.preventDefault()}),mxEvent.addListener(c[k],"dragover",mxUtils.bind(this,function(B){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&-(f=this.highlightElement());B.stopPropagation();B.preventDefault()})),mxEvent.addListener(c[k],"drop",mxUtils.bind(this,function(B){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<B.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(B.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(B)&&!mxEvent.isShiftDown(B)):this.openFiles(B.dataTransfer.files,!0);else{var z=this.extractGraphModelFromEvent(B);-if(null==z){var C=null!=B.dataTransfer?B.dataTransfer:B.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?z=C.getData("Text"):(z=null,z=0<=mxUtils.indexOf(C.types,"text/uri-list")?B.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=z&&0<z.length?(C=document.createElement("div"),C.innerHTML=Graph.sanitizeHtml(z),C=C.getElementsByTagName("img"),0<C.length&&(z=C[0].getAttribute("src"))):0<=mxUtils.indexOf(C.types,-"text/plain")&&(z=C.getData("text/plain"))),null!=z&&(Editor.isPngDataUrl(z)?(z=Editor.extractGraphModelFromPng(z),null!=z&&0<z.length&&this.openLocalFile(z,null,!0)):this.isRemoteFileFormat(z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(z))).send(mxUtils.bind(this,function(I){200<=I.getStatus()&&299>=I.getStatus()?this.openLocalFile(I.getText(),null,!0):this.showError(mxResources.get("error"),-413==I.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(z)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(z):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(z)))))}else this.openLocalFile(z,null,!0)}B.stopPropagation();B.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,k=0;if(null==c){var B=document.body;-var z=document.documentElement;var C=(B.clientWidth||z.clientWidth)-3;B=Math.max(B.clientHeight||0,z.clientHeight)-3}else f=c.offsetTop,k=c.offsetLeft,C=c.clientWidth,B=c.clientHeight;z=document.createElement("div");z.style.zIndex=mxPopupMenu.prototype.zIndex+2;z.style.border="3px dotted rgb(254, 137, 12)";z.style.pointerEvents="none";z.style.position="absolute";z.style.top=f+"px";z.style.left=k+"px";z.style.width=Math.max(0,C-3)+"px";z.style.height=Math.max(0,B-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?-this.editor.graph.container.appendChild(z):document.body.appendChild(z);return z};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var k=new mxCodec(f.ownerDocument),B=new mxGraphModel;k.decode(f,B);f=B.getChildAt(B.getRoot(),0);for(k=0;k<B.getChildCount(f);k++)c.push(B.getChildAt(f,k))}return c};EditorUi.prototype.openFileHandle=function(c,f,k,B,z,C){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||-/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var I=mxUtils.bind(this,function(K){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==K.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,B);try{this.loadLibrary(new LocalLibrary(this,K,f)),this.showSidebar()}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,-f,B)});if(EditorUi.isVisioFilename(f))this.importVisio(k,mxUtils.bind(this,function(K){this.spinner.stop();I(K)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(K){this.spinner.stop();I(K)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),-200<=K.status&&299>=K.status?I(K.responseText):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(K){this.spinner.stop();this.openLocalFile(K,f,B)}),mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();-null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,B);try{this.loadLibrary(new LocalLibrary(this,c,k.name)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(K){this.spinner.stop();I(K)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,B)}));else{if("image/png"==k.type.substring(0,9))c=this.extractGraphModelFromPng(c);-else if("application/pdf"==k.type){var L=Editor.extractGraphModelFromPdf(c);null!=L&&(z=null,B=!0,c=L)}this.spinner.stop();this.openLocalFile(c,f,B,z,null!=z?k:null,C)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<c.length;k++)mxUtils.bind(this,function(B){var z=new FileReader;z.onload=mxUtils.bind(this,function(C){try{this.openFileHandle(C.target.result,B.name,B,f)}catch(I){this.handleError(I)}});z.onerror=mxUtils.bind(this,-function(C){this.spinner.stop();this.handleError(C);window.openFile=null});"image"!==B.type.substring(0,5)&&"application/pdf"!==B.type||"image/svg"===B.type.substring(0,9)?z.readAsText(B):z.readAsDataURL(B)})(c[k])};EditorUi.prototype.openLocalFile=function(c,f,k,B,z,C){var I=this.getCurrentFile(),L=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var K=mxUtils.parseXml(c);null!=K&&(this.editor.setGraphXml(K.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,-c,f||this.defaultFilename,k,B,z,C))});if(null!=c&&0<c.length)null==I||!I.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=B)?L():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=B)&&null!=I&&I.isModified()?this.confirm(mxResources.get("allChangesLost"),null,L,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=-I&&I.isModified()?this.confirm(mxResources.get("allChangesLost"),null,L,mxResources.get("cancel"),mxResources.get("discardChanges")):L()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var k in c)f.push(k);return f};EditorUi.prototype.addBasenamesForCell=-function(c,f){function k(I){if(null!=I){var L=I.lastIndexOf(".");0<L&&(I=I.substring(L+1,I.length));null==f[I]&&(f[I]=!0)}}var B=this.editor.graph,z=B.getCellStyle(c);k(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));B.model.isEdge(c)&&(k(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=B.model.getChildCount(c);for(var C=0;C<z;C++)this.addBasenamesForCell(B.model.getChildAt(c,C),f)};EditorUi.prototype.setGraphEnabled=+(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));+this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("++c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,l){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||+this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(f,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",+mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,f,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,+function(t,z){try{this.spinner.stop();var C=this.createImageDataUri(t,f,"png"),F=parseInt(z.getAttribute("width")),N=parseInt(z.getAttribute("height"));this.writeImageToClipboard(C,F,N,mxUtils.bind(this,function(K){this.handleError(K)}))}catch(K){this.handleError(K)}}),null,null,null,mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?+c:null)}catch(t){this.handleError(t)}};EditorUi.prototype.copyCells=function(c,f){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText="";else{var t=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),z=mxUtils.getXml(l.encodeCells(t));mxUtils.setTextContent(c,encodeURIComponent(z));f?(l.removeCells(t,!1),l.lastPasteXml=null):(l.lastPasteXml=z,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var f=+this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,l,t,z){z=null!=z?z:!0;var C=this.editor.graph,F=null;C.lastPasteXml==c?C.pasteCounter++:(C.lastPasteXml=c,C.pasteCounter=0);var N=C.pasteCounter*C.gridSize;if(l||this.isCompatibleString(c))F=this.importXml(c,N,N),C.setSelectionCells(F);else if(f&&1==+C.getSelectionCount()){z=C.getStartEditingCell(C.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==C.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])C.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{C.model.beginUpdate();try{C.labelChanged(z,c),Graph.isLink(c)&&C.setLinkForCell(z,c)}finally{C.model.endUpdate()}}C.setSelectionCell(z)}else F=C.getInsertPoint(),C.isMouseInsertPoint()&&(N=0,C.lastPasteXml==c&&0<C.pasteCounter&&C.pasteCounter--),F=this.insertTextAt(c,F.x+N,+F.y+N,z),C.setSelectionCells(F);C.isSelectionEmpty()||(C.scrollCellToVisible(C.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(C.view.getState(C.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,f,l,t){if(!mxEvent.isConsumed(c)){var z=f,C=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var F=c.clipboardData.getData("text/plain"),N=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var K=decodeURIComponent(F);this.isCompatibleString(K)&&+(N=!0,F=K)}catch(ba){}N=N?null:c.clipboardData.getData("text/html");null!=N&&0<N.length?(z=this.parseHtmlData(N),C="text/plain"!=z.getAttribute("data-type")):null!=F&&0<F.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,N))}F=z.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))l=F[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(ba){var ha=+this.editor.graph;ha.lastPasteXml==ba?ha.pasteCounter++:(ha.lastPasteXml=ba,ha.pasteCounter=0);var ma=ha.pasteCounter*ha.gridSize;ha.setSelectionCells(this.importXml(ba,ma,ma));ha.scrollCellToVisible(ha.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(c));else{var I=!1,ca="";ca=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==+z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var da=ca.lastIndexOf("%3E");0<=da&&da<ca.length-3&&(ca=ca.substring(0,da+3))}catch(ba){}try{F=z.getElementsByTagName("span"),(K=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(ca))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(I=!0,ca=+K)}catch(ba){}try{if(null!=ca&&0<ca.length){if(0==ca.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ea=mxUtils.bind(this,function(){try{ca=(new MiroImporter).importMiroJson(JSON.parse(ca)),this.pasteXml(ca,t,I,c)}catch(ba){console.log("Miro import error:",ba)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ea):ea()}else this.pasteXml(ca,t,I,c,C);try{mxEvent.consume(c)}catch(ba){}}else if(!l){var X=this.editor.graph;X.lastPasteXml=null;X.pasteCounter=+0}}catch(ba){this.handleError(ba)}}}f.innerHTML=" "};EditorUi.prototype.showPrintDialog=function(c,f){var l=320;this.editor.graph.isEnabled()&&(l+=40);null!=this.pages&&1<this.pages.length&&(l+=40,this.editor.graph.isEnabled()||(l+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(l+=20);this.showDialog((new PrintDialog(this,c,f)).container,320,l,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,t=l.graph,z=this.getPageIndex(this.currentPage),C=null!=z?z++1:1,F=mxUtils.bind(this,function(ma,Y,la,Z){var k=ma.useCssTransforms,A=ma.currentTranslate,J=ma.currentScale,U=ma.view.translate,P=ma.view.scale;ma.useCssTransforms&&(ma.useCssTransforms=!1,ma.currentTranslate=new mxPoint(0,0),ma.currentScale=1,ma.view.translate=new mxPoint(0,0),ma.view.scale=1);var T=ma.getGraphBounds(),W=0,aa=0,ja=mxRectangle.fromRectangle(ma.pageFormat),pa=f.fit||f.crop||!ma.pageVisible,sa=f.scale;ja.width=Math.ceil(ja.width*ma.pageScale);ja.height=Math.ceil(ja.height*ma.pageScale);+var qa=1;if(f.fit){qa=f.sheetsAcross;var wa=f.sheetsDown;isNaN(sa)||(ja.width=Math.ceil(ja.width*sa),ja.height=Math.ceil(ja.height*sa));qa=Math.min(ja.height*wa/(T.height/ma.view.scale),ja.width*qa/(T.width/ma.view.scale))}else qa=isNaN(sa)?1:sa;qa*=1;!pa&&ma.pageVisible?(sa=ma.getPageLayout(),W-=sa.x*ja.width,aa-=sa.y*ja.height):pa=!0;f.crop&&(f.selection&&(T=t.getBoundingBox(t.getSelectionCells())),ja.width=(T.width+1)*qa/ma.view.scale,ja.height=(T.height+1)*qa/ma.view.scale);ja.width=Math.ceil(1*+ja.width);ja.height=Math.ceil(1*ja.height);Z=null!=Z?"page/id,"+Z:null;if(null==Y){Y=PrintDialog.createPrintPreview(ma,qa,null,0,W,aa,pa);Y.title=this.getBaseFilename(!0);Y.pageSelector=!1;Y.mathEnabled=!1;W=f.border;isNaN(W)||(Y.pageMargin=W);f.selection&&(Y.isCellVisible=function(ra){return ma.isCellSelected(ra)});var Ba=Y.writeHead;Y.writeHead=function(ra){Ba.apply(this,arguments);mxClient.IS_GC&&(ra.writeln('<style type="text/css">'),ra.writeln("@media print {"),ra.writeln(".MathJax svg { shape-rendering: crispEdges; }"),+ra.writeln("}"),ra.writeln("</style>"));null!=l.fontCss&&(ra.writeln('<style type="text/css">'),ra.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),ra.writeln("</style>"));for(var ya=ma.getCustomFonts(),Ca=0;Ca<ya.length;Ca++){var Ma=ya[Ca].name,Ha=ya[Ca].url;Graph.isCssFontUrl(Ha)?ra.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Ha))+'" charset="UTF-8" type="text/css">'):(ra.writeln('<style type="text/css">'),ra.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ma)++'";\nsrc: url("'+mxUtils.htmlEntities(Ha)+'");\n}'),ra.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var za=Y.drawBackgroundImage;Y.drawBackgroundImage=function(ra){za.apply(this,arguments);null!=ra.node&&(EditorUi.embedSvgImages(ra.node),t.disableSvgLinks(ra.node,function(ya){ya.setAttribute("href","javascript:void(0)")}))}}var Ea=Y.addGraphFragment;Y.addGraphFragment=function(ra,ya,Ca,Ma,Ha,Aa){Ea.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:Ha.classList.add("geDisableMathJax")};+f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.open(null,null,la,!0,Z,ja,f.selection?ma.getSelectionCells():null)}else{T=ma.background;if(null==T||""==T||T==mxConstants.NONE)T="#ffffff";Y.backgroundColor=T;Y.autoOrigin=pa;f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.appendGraph(ma,qa,+W,aa,la,!0,Z,ja,f.selection?ma.getSelectionCells():null);la=ma.getCustomFonts();if(null!=Y.wnd)for(ja=0;ja<la.length;ja++)W=la[ja].name,aa=la[ja].url,Graph.isCssFontUrl(aa)?Y.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(aa)+'" charset="UTF-8" type="text/css">'):(Y.wnd.document.writeln('<style type="text/css">'),Y.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(W)+'";\nsrc: url("'+mxUtils.htmlEntities(aa)+'");\n}'),Y.wnd.document.writeln("</style>"))}k&&+(ma.useCssTransforms=k,ma.currentTranslate=A,ma.currentScale=J,ma.view.translate=U,ma.view.scale=P);return Y}),N=f.pagesFrom,K=f.pagesTo,I=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{I&&(I=f.selection||N==C&&K==C);if(!I&&null!=this.pages&&this.pages.length){I=0;C=this.pages.length-1;f.allPages||(I=parseInt(N)-1,C=parseInt(K)-1);for(var ca=I;ca<=C;ca++){var da=this.pages[ca];N=da==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);+N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;I=!1;var ea=null,X=null;null==da.viewState&&null==da.root&&this.updatePageRoot(da);null!=da.viewState&&(K=da.viewState.pageVisible,I=da.viewState.mathEnabled,ea=da.viewState.background,X=da.viewState.backgroundImage,N.pageFormat=da.viewState.pageFormat,N.gridSize=da.viewState.gridSize);null!=X&&null!=X.originalSrc&&(X=this.createImageForPageLink(X.originalSrc,da));N.background=ea;N.backgroundImage=null!=+X?new mxImage(X.src,X.width,X.height,X.x,X.y):null;N.pageVisible=K;N.mathEnabled=I;var ba=N.getGraphBounds;N.getGraphBounds=function(){var ma=ba.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var la=this.view.translate,Z=this.view.scale;ma=mxRectangle.fromRectangle(ma);ma.add(new mxRectangle((la.x+Y.x)*Z,(la.y+Y.y)*Z,Y.width*Z,Y.height*Z))}return ma};var ha=N.getGlobalVariable;N.getGlobalVariable=function(ma){return"page"==ma?da.getName():"pagenumber"==ma?+ca+1:"pagecount"==ma?null!=this.pages?this.pages.length:1:ha.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(da);N.model.setRoot(da.root)}z=F(N,z,ca!=C,da.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else z=F(t);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(F=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),F.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),+Graph.rewritePageLinks(z.wnd.document,!0),z.mathEnabled||c||PrintDialog.printPreview(z));return z}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(t){null!=f&&(f.parentNode.removeChild(f),f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&+12>document.documentMode)&&(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);+else{var z=this.extractGraphModelFromEvent(t);if(null==z){var C=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?z=C.getData("Text"):(z=null,z=0<=mxUtils.indexOf(C.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=z&&0<z.length?(C=document.createElement("div"),C.innerHTML=Graph.sanitizeHtml(z),C=C.getElementsByTagName("img"),0<C.length&&(z=C[0].getAttribute("src"))):+0<=mxUtils.indexOf(C.types,"text/plain")&&(z=C.getData("text/plain"))),null!=z&&(Editor.isPngDataUrl(z)?(z=Editor.extractGraphModelFromPng(z),null!=z&&0<z.length&&this.openLocalFile(z,null,!0)):this.isRemoteFileFormat(z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(z))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&299>=F.getStatus()?this.openLocalFile(F.getText(),null,!0):this.showError(mxResources.get("error"),+413==F.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(z)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(z):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(z)))))}else this.openLocalFile(z,null,!0)}t.stopPropagation();t.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,l=0;if(null==c){var t=document.body;+var z=document.documentElement;var C=(t.clientWidth||z.clientWidth)-3;t=Math.max(t.clientHeight||0,z.clientHeight)-3}else f=c.offsetTop,l=c.offsetLeft,C=c.clientWidth,t=c.clientHeight;z=document.createElement("div");z.style.zIndex=mxPopupMenu.prototype.zIndex+2;z.style.border="3px dotted rgb(254, 137, 12)";z.style.pointerEvents="none";z.style.position="absolute";z.style.top=f+"px";z.style.left=l+"px";z.style.width=Math.max(0,C-3)+"px";z.style.height=Math.max(0,t-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?+this.editor.graph.container.appendChild(z):document.body.appendChild(z);return z};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var l=new mxCodec(f.ownerDocument),t=new mxGraphModel;l.decode(f,t);f=t.getChildAt(t.getRoot(),0);for(l=0;l<t.getChildCount(f);l++)c.push(t.getChildAt(f,l))}return c};EditorUi.prototype.openFileHandle=function(c,f,l,t,z,C){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||+/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var F=mxUtils.bind(this,function(K){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==K.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,K,f)),this.showSidebar()}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,+f,t)});if(EditorUi.isVisioFilename(f))this.importVisio(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),+200<=K.status&&299>=K.status?F(K.responseText):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(K){this.spinner.stop();this.openLocalFile(K,f,t)}),mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,t)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);+else if("application/pdf"==l.type){var N=Editor.extractGraphModelFromPdf(c);null!=N&&(z=null,t=!0,c=N)}this.spinner.stop();this.openLocalFile(c,f,t,z,null!=z?l:null,C)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=0;l<c.length;l++)mxUtils.bind(this,function(t){var z=new FileReader;z.onload=mxUtils.bind(this,function(C){try{this.openFileHandle(C.target.result,t.name,t,f)}catch(F){this.handleError(F)}});z.onerror=mxUtils.bind(this,+function(C){this.spinner.stop();this.handleError(C);window.openFile=null});"image"!==t.type.substring(0,5)&&"application/pdf"!==t.type||"image/svg"===t.type.substring(0,9)?z.readAsText(t):z.readAsDataURL(t)})(c[l])};EditorUi.prototype.openLocalFile=function(c,f,l,t,z,C){var F=this.getCurrentFile(),N=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var K=mxUtils.parseXml(c);null!=K&&(this.editor.setGraphXml(K.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,+c,f||this.defaultFilename,l,t,z,C))});if(null!=c&&0<c.length)null==F||!F.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)?N():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)&&null!=F&&F.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=+F&&F.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var l in c)f.push(l);return f};EditorUi.prototype.addBasenamesForCell=+function(c,f){function l(F){if(null!=F){var N=F.lastIndexOf(".");0<N&&(F=F.substring(N+1,F.length));null==f[F]&&(f[F]=!0)}}var t=this.editor.graph,z=t.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));t.model.isEdge(c)&&(l(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=t.model.getChildCount(c);for(var C=0;C<z;C++)this.addBasenamesForCell(t.model.getChildAt(c,C),f)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?"":"none";this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=c&&0<parseInt(this.tabContainer.style.height)?"":"hidden");null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=-c?"":"hidden");c||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,k,B,z){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;-this.setFileData(f);if(z)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var I=C.model.cells,L;for(L in I){var K=I[L];null!=K&&null!=K.style&&(K.style+=";sketch=1;"+(-1==K.style.indexOf("fontFamily=")||-1<K.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(O){console.log(O)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();-this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=B?B:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,-f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(k){this.spinner.stop();f(k)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;-f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var B=f.background;if(null==B||B==mxConstants.NONE)B=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(z){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(z)}),"*")}),null,null,!0,B,1,this.embedExportBorder,null,this.embedExportTheme)}else c||-k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(z){c||this.handleError(z)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,k=!1,B=!1,z=null,C=mxUtils.bind(this,function(K,O){this.editor.modified&&-"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(K){if(K.source==(window.opener||window.parent)){var O=K.data,da=null,ea=mxUtils.bind(this,function(sa){if(null!=sa&&"function"===typeof sa.charAt&&"<"!=sa.charAt(0))try{Editor.isPngDataUrl(sa)?sa=Editor.extractGraphModelFromPng(sa):-"data:image/svg+xml;base64,"==sa.substring(0,26)?sa=atob(sa.substring(26)):"data:image/svg+xml;utf8,"==sa.substring(0,24)&&(sa=sa.substring(24)),null!=sa&&(""==sa.trim()?sa=null:"%"==sa.charAt(0)?sa=decodeURIComponent(sa):"<"!=sa.charAt(0)&&(sa=Graph.decompress(sa)))}catch(Aa){}return sa});if("json"==urlParams.proto){var ca=!1;try{O=JSON.parse(O),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[O])}catch(sa){O=null}try{if(null==O)return;if("dialog"==O.action){this.showError(null!=-O.titleKey?mxResources.get(O.titleKey):O.title,null!=O.messageKey?mxResources.get(O.messageKey):mxUtils.htmlEntities(O.message),null!=O.buttonKey?mxResources.get(O.buttonKey):O.button);null!=O.modified&&(this.editor.modified=O.modified);return}if("layout"==O.action){this.executeLayouts(this.editor.graph.createLayouts(O.layouts));return}if("prompt"==O.action){this.spinner.stop();var V=new FilenameDialog(this,O.defaultValue||"",null!=O.okKey?mxResources.get(O.okKey):O.ok,function(sa){null!=sa?I.postMessage(JSON.stringify({event:"prompt",-value:sa,message:O}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:O}),"*")},null!=O.titleKey?mxResources.get(O.titleKey):O.title,null,null,null,null,function(){I.postMessage(JSON.stringify({event:"prompt-cancel",message:O}),"*")});this.showDialog(V.container,300,80,!0,!1);V.init();return}if("draft"==O.action){var ma=ea(O.xml);this.spinner.stop();V=new DraftDialog(this,mxResources.get("draftFound",[O.name||this.defaultFilename]),ma,mxUtils.bind(this,function(){this.hideDialog();-I.postMessage(JSON.stringify({event:"draft",result:"edit",message:O}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:O}),"*")}),O.editKey?mxResources.get(O.editKey):null,O.discardKey?mxResources.get(O.discardKey):null,O.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:O}),"*")}):null);this.showDialog(V.container,640,480,!0,!1,mxUtils.bind(this,function(sa){sa&&-this.actions.get("exit").funct()}));try{V.init()}catch(sa){I.postMessage(JSON.stringify({event:"draft",error:sa.toString(),message:O}),"*")}return}if("template"==O.action){this.spinner.stop();var la=1==O.enableRecent,Y=1==O.enableSearch,fa=1==O.enableCustomTemp;V=new NewDialog(this,!1,O.templatesOnly?!1:null!=O.callback,mxUtils.bind(this,function(sa,Aa,Ea,Ka){sa=sa||this.emptyDiagramXml;null!=O.callback?I.postMessage(JSON.stringify({event:"template",xml:sa,blank:sa==this.emptyDiagramXml,name:Aa,tempUrl:Ea,-libs:Ka,builtIn:!0,message:O}),"*"):(c(sa,K,sa!=this.emptyDiagramXml,O.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,la?mxUtils.bind(this,function(sa){this.remoteInvoke("getRecentDiagrams",[null],null,sa,function(){sa(null,"Network Error!")})}):null,Y?mxUtils.bind(this,function(sa,Aa){this.remoteInvoke("searchDiagrams",[sa,null],null,Aa,function(){Aa(null,"Network Error!")})}):null,mxUtils.bind(this,function(sa,Aa,Ea){I.postMessage(JSON.stringify({event:"template",-docUrl:sa,info:Aa,name:Ea}),"*")}),null,null,fa?mxUtils.bind(this,function(sa){this.remoteInvoke("getCustomTemplates",null,null,sa,function(){sa({},0)})}):null,1==O.withoutType);this.showDialog(V.container,620,460,!0,!1,mxUtils.bind(this,function(sa){null!=this.sidebar&&this.sidebar.hideTooltip();sa&&this.actions.get("exit").funct()}));V.init();return}if("textContent"==O.action){var Z=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",data:Z,message:O}),"*");return}if("status"==-O.action){null!=O.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(O.messageKey))):null!=O.message&&this.editor.setStatus(mxUtils.htmlEntities(O.message));null!=O.modified&&(this.editor.modified=O.modified);return}if("spinner"==O.action){var l=null!=O.messageKey?mxResources.get(O.messageKey):O.message;null==O.show||O.show?this.spinner.spin(document.body,l):this.spinner.stop();return}if("exit"==O.action){this.actions.get("exit").funct();return}if("viewport"==O.action){null!=O.viewport&&-(this.embedViewport=O.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==O.action){V=null;try{var u=this.diagramContainer.getAttribute("data-scrollState");null!=u&&(this.diagramContainer.removeAttribute("data-scrollState"),V=JSON.parse(u))}catch(sa){}Editor.inlineFullscreen=O.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=V&&this.restoreScrollState(V);return}if("snapshot"==O.action){this.sendEmbeddedSvgExport(!0);-return}if("export"==O.action){if("png"==O.format||"xmlpng"==O.format){if(null==O.spin&&null==O.spinKey||this.spinner.spin(document.body,null!=O.spinKey?mxResources.get(O.spinKey):O.spin)){var H=null!=O.xml?O.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var U=this.editor.graph,J=mxUtils.bind(this,function(sa,Aa){if(O.withSvg)O.withSvg=!1,this.getEmbeddedSvg(H,this.editor.graph,null,!0,function(Ka){J(sa,Ka)},null,null,O.embedImages,this.editor.graph.background,O.scale,O.border,O.shadow,-"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ea=this.createLoadMessage("export");Ea.format=O.format;Ea.message=O;Ea.data=sa;Ea.svg=Aa;Ea.xml=H;I.postMessage(JSON.stringify(Ea),"*")}}),W=mxUtils.bind(this,function(sa){null==sa&&(sa=Editor.blankImage);"xmlpng"==O.format&&(sa=Editor.writeGraphModelToPng(sa,"tEXt","mxfile",encodeURIComponent(H)));U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);J(sa)}),aa=O.pageId||(null!=this.pages?O.currentPage?this.currentPage.getId():-this.pages[0].getId():null);if(this.isExportToCanvas()){var ba=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=aa){var sa=U.getGlobalVariable;U=this.createTemporaryGraph(U.getStylesheet());for(var Aa,Ea=0;Ea<this.pages.length;Ea++)if(this.pages[Ea].getId()==aa){Aa=this.updatePageRoot(this.pages[Ea]);break}null==Aa&&(Aa=this.currentPage);U.getGlobalVariable=function(Wa){return"page"==Wa?Aa.getName():"pagenumber"==Wa?1:sa.apply(this,arguments)};document.body.appendChild(U.container);-U.model.setRoot(Aa.root)}if(null!=O.layerIds){var Ka=U.model,Ma=Ka.getChildCells(Ka.getRoot()),ya={};for(Ea=0;Ea<O.layerIds.length;Ea++)ya[O.layerIds[Ea]]=!0;for(Ea=0;Ea<Ma.length;Ea++)Ka.setVisible(Ma[Ea],ya[Ma[Ea].id]||!1)}Ea=null;O.keepTheme&&(Ea=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Wa){W(Wa.toDataURL("image/png"))}),O.width,null,O.background,mxUtils.bind(this,function(){W(null)}),null,null,O.scale,O.transparent,O.shadow,null,U,O.border,null,-O.grid,Ea)});null!=O.xml&&0<O.xml.length&&(k=!0,this.setFileData(H),k=!1);ba()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==O.format?"1":"0")+(null!=aa?"&pageId="+aa:"")+(null!=O.layerIds&&0<O.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:O.layerIds})):"")+(null!=O.scale?"&scale="+O.scale:"")+"&base64=1&xml="+encodeURIComponent(H))).send(mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?J("data:image/png;base64,"+sa.getText()):W(null)}),-mxUtils.bind(this,function(){W(null)}))}}else if(ba=mxUtils.bind(this,function(){var sa=this.createLoadMessage("export");sa.message=O;if("html2"==O.format||"html"==O.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Aa=this.getXmlFileData();sa.xml=mxUtils.getXml(Aa);sa.data=this.getFileData(null,null,!0,null,null,null,Aa);sa.format=O.format}else if("html"==O.format)Aa=this.editor.getGraphXml(),sa.data=this.getHtml(Aa,this.editor.graph),sa.xml=mxUtils.getXml(Aa),sa.format=-O.format;else{mxSvgCanvas2D.prototype.foAltText=null;Aa=null!=O.background?O.background:this.editor.graph.background;Aa==mxConstants.NONE&&(Aa=null);sa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);sa.format="svg";var Ea=mxUtils.bind(this,function(Ma){this.editor.graph.setEnabled(!0);this.spinner.stop();sa.data=Editor.createSvgDataUri(Ma);I.postMessage(JSON.stringify(sa),"*")}),Ka="auto";O.keepTheme&&(Ka=Editor.isDarkMode()?"dark":"light");null!=O.theme&&(Ka=O.theme);if("xmlsvg"==-O.format){if(null==O.spin&&null==O.spinKey||this.spinner.spin(document.body,null!=O.spinKey?mxResources.get(O.spinKey):O.spin)){Ka=null;if(this.isAutoDarkMode()||Editor.isDarkMode())Ka="auto";null!=O.theme&&(Ka=O.theme);this.getEmbeddedSvg(sa.xml,this.editor.graph,null,!0,Ea,null,null,O.embedImages,Aa,O.scale,O.border,O.shadow,Ka)}}else if(null==O.spin&&null==O.spinKey||this.spinner.spin(document.body,null!=O.spinKey?mxResources.get(O.spinKey):O.spin))this.editor.graph.setEnabled(!1),Aa=this.editor.graph.getSvg(Aa,-O.scale,O.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||O.shadow,null,Ka),(this.editor.graph.shadowVisible||O.shadow)&&this.editor.graph.addSvgShadow(Aa),this.embedFonts(Aa,mxUtils.bind(this,function(Ma){O.embedImages||null==O.embedImages?this.editor.convertImages(Ma,mxUtils.bind(this,function(ya){Ea(mxUtils.getXml(ya))})):Ea(mxUtils.getXml(Ma))}));return}I.postMessage(JSON.stringify(sa),"*")}),null!=O.xml&&0<O.xml.length){if(this.editor.graph.mathEnabled){var ja=Editor.onMathJaxDone;-Editor.onMathJaxDone=function(){ja.apply(this,arguments);ba()}}k=!0;this.setFileData(O.xml);k=!1;this.editor.graph.mathEnabled||ba()}else ba();return}if("load"==O.action){ca=O.toSketch;B=1==O.autosave;this.hideDialog();null!=O.modified&&null==urlParams.modified&&(urlParams.modified=O.modified);null!=O.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=O.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||-this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=O.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=O.noSaveBtn);if(null!=O.rough){var oa=Editor.sketchMode;this.doSetSketchMode(O.rough);oa!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=O.dark&&this.setDarkMode(O.dark);null!=O.border&&(this.embedExportBorder=-O.border);null!=O.theme&&(this.embedExportTheme=O.theme);null!=O.background&&(this.embedExportBackground=O.background);null!=O.viewport&&(this.embedViewport=O.viewport);this.embedExitPoint=null;if(null!=O.rect){var qa=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,O.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,O.rect.top)+"px";this.minInlineWidth=O.minWidth;this.minInlineHeight=O.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom=-"";this.diagramContainer.style.right="";var ra=O.maxFitScale,ua=O.rect.width+2*qa,za=O.rect.height+2*qa;da=mxUtils.bind(this,function(){var sa=mxUtils.getDocumentSize();ua=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,ua):ua,sa.width-80);sa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,za):za,sa.height-80);this.diagramContainer.style.width=ua+"px";this.diagramContainer.style.height=sa+"px";var Aa=this.editor.graph;sa=Aa.maxFitScale;Aa.maxFitScale=ra;Aa.fit(2*-qa,null,null,null,null,null,za);this.setPageVisible(!1);if(null!=this.minInlineWidth&&Aa.getGraphBounds().width<this.minInlineWidth){var Ea=Aa.container.scrollTop;this.resetScrollbars();Aa.container.scrollTop=Ea}Aa.maxFitScale=sa;Aa.container.scrollTop-=qa;Aa.container.scrollLeft-=qa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[O]));Aa.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&-(this.formatWindow.window.div.style.top=Aa.container.style.top);var Ka=Aa.getGraphBounds();Aa.container.clientWidth>Ka.width+2*qa&&(Aa.container.scrollLeft=Ka.x+(Ka.width+qa-Aa.container.clientWidth)/2)}),10)})}null!=O.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=O.noExitBtn);null!=O.title&&null!=this.buttonContainer&&(ma=this.createStatusDiv(""),mxUtils.write(ma,O.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(ma),-this.embedFilenameSpan=ma);try{O.libs&&this.sidebar.showEntries(O.libs)}catch(sa){}O=null!=O.xmlpng?this.extractGraphModelFromPng(O.xmlpng):null!=O.descriptor?O.descriptor:O.xml}else{if("merge"==O.action){var Ba=this.getCurrentFile();null!=Ba&&(ma=ea(O.xml),null!=ma&&""!=ma&&Ba.mergeFile(new LocalFile(this,ma),function(){I.postMessage(JSON.stringify({event:"merge",message:O}),"*")},function(sa){I.postMessage(JSON.stringify({event:"merge",message:O,error:sa}),"*")}))}else"remoteInvokeReady"==O.action?-this.handleRemoteInvokeReady(I):"remoteInvoke"==O.action?this.handleRemoteInvoke(O,K.origin):"remoteInvokeResponse"==O.action?this.handleRemoteInvokeResponse(O):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(O)}),"*");return}}catch(sa){this.handleError(sa)}}var Ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),La=mxUtils.bind(this,function(sa,Aa){k=!0;try{c(sa,-Aa,null,ca)}catch(Ea){this.handleError(Ea)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");z=Ca();B&&null==f&&(f=mxUtils.bind(this,function(Ea,Ka){Ea=Ca();Ea==z||k||(Ka=this.createLoadMessage("autosave"),Ka.xml=Ea,(window.opener||window.parent).postMessage(JSON.stringify(Ka),"*"));z=Ea}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",-f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Aa=this.createLoadMessage("load"),Aa.xml=sa,I.postMessage(JSON.stringify(Aa),"*");null!=da&&da()});null!=O&&"function"===typeof O.substring&&"data:application/vnd.visio;base64,"==-O.substring(0,34)?(ea="0M8R4KGxGuE"==O.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(O.substring(O.indexOf(",")+1)),function(sa){La(sa,K)},mxUtils.bind(this,function(sa){this.handleError(sa)}),ea)):null!=O&&"function"===typeof O.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(O,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(O,mxUtils.bind(this,function(sa){4==sa.readyState&&(200<=sa.status&&-299>=sa.status&&"<mxGraphModel"==sa.responseText.substring(0,13)?La(sa.responseText,K):this.handleError({message:413==sa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=O&&"function"===typeof O.substring&&this.isLucidChartData(O)?this.convertLucidChart(O,mxUtils.bind(this,function(sa){La(sa)}),mxUtils.bind(this,function(sa){this.handleError(sa)})):null==O||"object"!==typeof O||null==O.format||null==O.data&&null==O.url?(O=ea(O),La(O,K)):this.loadDescriptor(O,-mxUtils.bind(this,function(sa){La(Ca(),K)}),mxUtils.bind(this,function(sa){this.handleError(sa,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(C,"*");if("json"==urlParams.proto){var L=this.editor.graph.openLink;this.editor.graph.openLink=function(K,O,da){L.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:K,target:O,allowOpener:da}),"*")}}};EditorUi.prototype.createEmbedButton=-function(c,f,k,B){var z="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement("button");C.setAttribute("title",c+(null!=k?" ("+k+")":""));C.style.marginLeft="6px";mxUtils.write(C,c);z?(C.className=B?"gePrimaryBtn":"",C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(B?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");+c?"":"hidden");c||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,t,z){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;+this.setFileData(f);if(z)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var F=C.model.cells,N;for(N in F){var K=F[N];null!=K&&null!=K.style&&(K.style+=";sketch=1;"+(-1==K.style.indexOf("fontFamily=")||-1<K.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(I){console.log(I)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();+this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=t?t:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,+f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;+f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(z){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(z)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||+l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(z){c||this.handleError(z)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,z=null,C=mxUtils.bind(this,function(K,I){this.editor.modified&&+"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(K){if(K.source==(window.opener||window.parent)){var I=K.data,ca=null,da=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):+"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(ya){}return ra});if("json"==urlParams.proto){var ea=!1;try{I=JSON.parse(I),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[I])}catch(ra){I=null}try{if(null==I)return;if("dialog"==I.action){this.showError(null!=+I.titleKey?mxResources.get(I.titleKey):I.title,null!=I.messageKey?mxResources.get(I.messageKey):mxUtils.htmlEntities(I.message),null!=I.buttonKey?mxResources.get(I.buttonKey):I.button);null!=I.modified&&(this.editor.modified=I.modified);return}if("layout"==I.action){this.executeLayouts(this.editor.graph.createLayouts(I.layouts));return}if("prompt"==I.action){this.spinner.stop();var X=new FilenameDialog(this,I.defaultValue||"",null!=I.okKey?mxResources.get(I.okKey):I.ok,function(ra){null!=ra?F.postMessage(JSON.stringify({event:"prompt",+value:ra,message:I}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:I}),"*")},null!=I.titleKey?mxResources.get(I.titleKey):I.title,null,null,null,null,function(){F.postMessage(JSON.stringify({event:"prompt-cancel",message:I}),"*")});this.showDialog(X.container,300,80,!0,!1);X.init();return}if("draft"==I.action){var ba=da(I.xml);this.spinner.stop();X=new DraftDialog(this,mxResources.get("draftFound",[I.name||this.defaultFilename]),ba,mxUtils.bind(this,function(){this.hideDialog();+F.postMessage(JSON.stringify({event:"draft",result:"edit",message:I}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:I}),"*")}),I.editKey?mxResources.get(I.editKey):null,I.discardKey?mxResources.get(I.discardKey):null,I.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:I}),"*")}):null);this.showDialog(X.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&+this.actions.get("exit").funct()}));try{X.init()}catch(ra){F.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:I}),"*")}return}if("template"==I.action){this.spinner.stop();var ha=1==I.enableRecent,ma=1==I.enableSearch,Y=1==I.enableCustomTemp;X=new NewDialog(this,!1,I.templatesOnly?!1:null!=I.callback,mxUtils.bind(this,function(ra,ya,Ca,Ma){ra=ra||this.emptyDiagramXml;null!=I.callback?F.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ya,tempUrl:Ca,+libs:Ma,builtIn:!0,message:I}),"*"):(c(ra,K,ra!=this.emptyDiagramXml,I.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):null,ma?mxUtils.bind(this,function(ra,ya){this.remoteInvoke("searchDiagrams",[ra,null],null,ya,function(){ya(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,ya,Ca){F.postMessage(JSON.stringify({event:"template",+docUrl:ra,info:ya,name:Ca}),"*")}),null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==I.withoutType);this.showDialog(X.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));X.init();return}if("textContent"==I.action){var la=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:la,message:I}),"*");return}if("status"==+I.action){null!=I.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(I.messageKey))):null!=I.message&&this.editor.setStatus(mxUtils.htmlEntities(I.message));null!=I.modified&&(this.editor.modified=I.modified);return}if("spinner"==I.action){var Z=null!=I.messageKey?mxResources.get(I.messageKey):I.message;null==I.show||I.show?this.spinner.spin(document.body,Z):this.spinner.stop();return}if("exit"==I.action){this.actions.get("exit").funct();return}if("viewport"==I.action){null!=I.viewport&&+(this.embedViewport=I.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==I.action){X=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),X=JSON.parse(k))}catch(ra){}Editor.inlineFullscreen=I.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=X&&this.restoreScrollState(X);return}if("snapshot"==I.action){this.sendEmbeddedSvgExport(!0);+return}if("export"==I.action){if("png"==I.format||"xmlpng"==I.format){if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin)){var A=null!=I.xml?I.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var J=this.editor.graph,U=mxUtils.bind(this,function(ra,ya){if(I.withSvg)I.withSvg=!1,this.getEmbeddedSvg(A,this.editor.graph,null,!0,function(Ma){U(ra,Ma)},null,null,I.embedImages,this.editor.graph.background,I.scale,I.border,I.shadow,+"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ca=this.createLoadMessage("export");Ca.format=I.format;Ca.message=I;Ca.data=ra;Ca.svg=ya;Ca.xml=A;F.postMessage(JSON.stringify(Ca),"*")}}),P=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==I.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(A)));J!=this.editor.graph&&J.container.parentNode.removeChild(J.container);U(ra)}),T=I.pageId||(null!=this.pages?I.currentPage?this.currentPage.getId():+this.pages[0].getId():null);if(this.isExportToCanvas()){var W=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=T){var ra=J.getGlobalVariable;J=this.createTemporaryGraph(J.getStylesheet());for(var ya,Ca=0;Ca<this.pages.length;Ca++)if(this.pages[Ca].getId()==T){ya=this.updatePageRoot(this.pages[Ca]);break}null==ya&&(ya=this.currentPage);J.getGlobalVariable=function(Ra){return"page"==Ra?ya.getName():"pagenumber"==Ra?1:ra.apply(this,arguments)};document.body.appendChild(J.container);+J.model.setRoot(ya.root)}if(null!=I.layerIds){var Ma=J.model,Ha=Ma.getChildCells(Ma.getRoot()),Aa={};for(Ca=0;Ca<I.layerIds.length;Ca++)Aa[I.layerIds[Ca]]=!0;for(Ca=0;Ca<Ha.length;Ca++)Ma.setVisible(Ha[Ca],Aa[Ha[Ca].id]||!1)}Ca=null;I.keepTheme&&(Ca=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){P(Ra.toDataURL("image/png"))}),I.width,null,I.background,mxUtils.bind(this,function(){P(null)}),null,null,I.scale,I.transparent,I.shadow,null,J,I.border,null,+I.grid,Ca)});null!=I.xml&&0<I.xml.length&&(l=!0,this.setFileData(A),l=!1);W()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==I.format?"1":"0")+(null!=T?"&pageId="+T:"")+(null!=I.layerIds&&0<I.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:I.layerIds})):"")+(null!=I.scale?"&scale="+I.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?U("data:image/png;base64,"+ra.getText()):P(null)}),+mxUtils.bind(this,function(){P(null)}))}}else if(W=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=I;if("html2"==I.format||"html"==I.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ya=this.getXmlFileData();ra.xml=mxUtils.getXml(ya);ra.data=this.getFileData(null,null,!0,null,null,null,ya);ra.format=I.format}else if("html"==I.format)ya=this.editor.getGraphXml(),ra.data=this.getHtml(ya,this.editor.graph),ra.xml=mxUtils.getXml(ya),ra.format=I.format;+else{mxSvgCanvas2D.prototype.foAltText=null;ya=null!=I.background?I.background:this.editor.graph.background;ya==mxConstants.NONE&&(ya=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Ca=mxUtils.bind(this,function(Ha){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=Editor.createSvgDataUri(Ha);F.postMessage(JSON.stringify(ra),"*")}),Ma="auto";I.keepTheme&&(Ma=Editor.isDarkMode()?"dark":"light");null!=I.theme&&(Ma=I.theme);if("xmlsvg"==I.format){if(null==+I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin)){Ma=null;if(this.isAutoDarkMode()||Editor.isDarkMode())Ma="auto";null!=I.theme&&(Ma=I.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,null,!0,Ca,null,null,I.embedImages,ya,I.scale,I.border,I.shadow,Ma)}}else if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin))this.editor.graph.setEnabled(!1),ya=this.editor.graph.getSvg(ya,+I.scale,I.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||I.shadow,null,Ma),(this.editor.graph.shadowVisible||I.shadow)&&this.editor.graph.addSvgShadow(ya),this.embedFonts(ya,mxUtils.bind(this,function(Ha){I.embedImages||null==I.embedImages?this.editor.convertImages(Ha,mxUtils.bind(this,function(Aa){Ca(mxUtils.getXml(Aa))})):Ca(mxUtils.getXml(Ha))}));return}F.postMessage(JSON.stringify(ra),"*")}),null!=I.xml&&0<I.xml.length){if(this.editor.graph.mathEnabled){var aa=Editor.onMathJaxDone;+Editor.onMathJaxDone=function(){aa.apply(this,arguments);W()}}l=!0;this.setFileData(I.xml);l=!1;this.editor.graph.mathEnabled||W()}else W();return}if("load"==I.action){ea=I.toSketch;t=1==I.autosave;this.hideDialog();null!=I.modified&&null==urlParams.modified&&(urlParams.modified=I.modified);null!=I.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=I.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||+this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=I.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=I.noSaveBtn);if(null!=I.rough){var ja=Editor.sketchMode;this.doSetSketchMode(I.rough);ja!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=I.dark&&this.setDarkMode(I.dark);null!=I.border&&(this.embedExportBorder=+I.border);null!=I.theme&&(this.embedExportTheme=I.theme);null!=I.background&&(this.embedExportBackground=I.background);null!=I.viewport&&(this.embedViewport=I.viewport);this.embedExitPoint=null;if(null!=I.rect){var pa=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,I.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,I.rect.top)+"px";this.minInlineWidth=I.minWidth;this.minInlineHeight=I.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom=+"";this.diagramContainer.style.right="";var sa=I.maxFitScale,qa=I.rect.width+2*pa,wa=I.rect.height+2*pa;ca=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();qa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,qa):qa,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,wa):wa,ra.height-80);this.diagramContainer.style.width=qa+"px";this.diagramContainer.style.height=ra+"px";var ya=this.editor.graph;ra=ya.maxFitScale;ya.maxFitScale=sa;ya.fit(2*+pa,null,null,null,null,null,wa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ya.getGraphBounds().width<this.minInlineWidth){var Ca=ya.container.scrollTop;this.resetScrollbars();ya.container.scrollTop=Ca}ya.maxFitScale=ra;ya.container.scrollTop-=pa;ya.container.scrollLeft-=pa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[I]));ya.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&+(this.formatWindow.window.div.style.top=ya.container.style.top);var Ma=ya.getGraphBounds();ya.container.clientWidth>Ma.width+2*pa&&(ya.container.scrollLeft=Ma.x+(Ma.width+pa-ya.container.clientWidth)/2)}),10)})}null!=I.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=I.noExitBtn);null!=I.title&&null!=this.buttonContainer&&(ba=this.createStatusDiv(""),mxUtils.write(ba,I.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(ba),+this.embedFilenameSpan=ba);try{I.libs&&this.sidebar.showEntries(I.libs)}catch(ra){}I=null!=I.xmlpng?this.extractGraphModelFromPng(I.xmlpng):null!=I.descriptor?I.descriptor:I.xml}else{if("merge"==I.action){var Ba=this.getCurrentFile();null!=Ba&&(ba=da(I.xml),null!=ba&&""!=ba&&Ba.mergeFile(new LocalFile(this,ba),function(){F.postMessage(JSON.stringify({event:"merge",message:I}),"*")},function(ra){F.postMessage(JSON.stringify({event:"merge",message:I,error:ra}),"*")}))}else"remoteInvokeReady"==I.action?+this.handleRemoteInvokeReady(F):"remoteInvoke"==I.action?this.handleRemoteInvoke(I,K.origin):"remoteInvokeResponse"==I.action?this.handleRemoteInvokeResponse(I):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(I)}),"*");return}}catch(ra){this.handleError(ra)}}var za=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ea=mxUtils.bind(this,function(ra,ya){l=!0;try{c(ra,+ya,null,ea)}catch(Ca){this.handleError(Ca)}l=!1;null!=urlParams.modified&&this.editor.setStatus("");z=za();t&&null==f&&(f=mxUtils.bind(this,function(Ca,Ma){Ca=za();Ca==z||l||(Ma=this.createLoadMessage("autosave"),Ma.xml=Ca,(window.opener||window.parent).postMessage(JSON.stringify(Ma),"*"));z=Ca}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",+f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ya=this.createLoadMessage("load"),ya.xml=ra,F.postMessage(JSON.stringify(ya),"*");null!=ca&&ca()});null!=I&&"function"===typeof I.substring&&"data:application/vnd.visio;base64,"==+I.substring(0,34)?(da="0M8R4KGxGuE"==I.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(I.substring(I.indexOf(",")+1)),function(ra){Ea(ra,K)},mxUtils.bind(this,function(ra){this.handleError(ra)}),da)):null!=I&&"function"===typeof I.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(I,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(I,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&+299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ea(ra.responseText,K):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=I&&"function"===typeof I.substring&&this.isLucidChartData(I)?this.convertLucidChart(I,mxUtils.bind(this,function(ra){Ea(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==I||"object"!==typeof I||null==I.format||null==I.data&&null==I.url?(I=da(I),Ea(I,K)):this.loadDescriptor(I,+mxUtils.bind(this,function(ra){Ea(za(),K)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(C,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(K,I,ca){N.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:K,target:I,allowOpener:ca}),"*")}}};EditorUi.prototype.createEmbedButton=+function(c,f,l,t){var z="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement("button");C.setAttribute("title",c+(null!=l?" ("+l+")":""));C.style.marginLeft="6px";mxUtils.write(C,c);z?(C.className=t?"gePrimaryBtn":"",C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(t?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(c.style.marginRight="66px",c.style["float"]="right","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c)):(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var f=new TextareaDialog(this,mxResources.get("layout"),-c,mxUtils.bind(this,function(k){if(0<k.length)try{var B=JSON.parse(k);this.executeLayouts(this.editor.graph.createLayouts(B));this.customLayoutConfig=B;this.hideDialog()}catch(z){this.handleError(z)}}),null,null,null,null,mxUtils.bind(this,function(k,B){var z=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var C=B.value;B.value=JSON.stringify(JSON.parse(C));B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null);-document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));B.value=C}catch(I){this.handleError(I)}}));z.setAttribute("title","copy");z.className="geBtn";k.appendChild(z)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var k=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),-this.spinner.stop(),c())}),B=mxUtils.bind(this,function(z){this.loadingOrgChart=!1;f.clear()&&this.handleError(z)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?k():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",-k,null,null,null,B)},null,null,null,B)},null,null,null,B)},null,null,null,B):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",k,null,null,null,B))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var k=c.split("\n"),B=[],z=[],C=[],I={};if(0<k.length){var L={},K=this.editor.graph,O=null,da=null,ea=null,ca=null,V=null,ma=null,la=null,Y="whiteSpace=wrap;html=1;",-fa=null,Z=null,l="",u="auto",H="auto",U=!1,J=null,W=null,aa=40,ba=40,ja=100,oa=0,qa=mxUtils.bind(this,function(){null!=f?f(Da):(K.setSelectionCells(Da),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),ra=K.getFreeInsertPoint(),ua=ra.x,za=ra.y;ra=za;var Ba=null,Ca="auto";Z=null;for(var La=[],sa=null,Aa=null,Ea=0;Ea<k.length&&"#"==k[Ea].charAt(0);){c=k[Ea].replace(/\r$/,"");for(Ea++;Ea<k.length&&-"\\"==c.charAt(c.length-1)&&"#"==k[Ea].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(k[Ea].substring(1)),Ea++;if("#"!=c.charAt(1)){var Ka=c.indexOf(":");if(0<Ka){var Ma=mxUtils.trim(c.substring(1,Ka)),ya=mxUtils.trim(c.substring(Ka+1));"label"==Ma?Ba=Graph.sanitizeHtml(ya):"labelname"==Ma&&0<ya.length&&"-"!=ya?V=ya:"labels"==Ma&&0<ya.length&&"-"!=ya?la=JSON.parse(ya):"style"==Ma?da=ya:"parentstyle"==Ma?Y=ya:"unknownStyle"==Ma&&"-"!=ya?ma=ya:"stylename"==Ma&&0<ya.length&&"-"!=ya?ca=ya:"styles"==-Ma&&0<ya.length&&"-"!=ya?ea=JSON.parse(ya):"vars"==Ma&&0<ya.length&&"-"!=ya?O=JSON.parse(ya):"identity"==Ma&&0<ya.length&&"-"!=ya?fa=ya:"parent"==Ma&&0<ya.length&&"-"!=ya?Z=ya:"namespace"==Ma&&0<ya.length&&"-"!=ya?l=ya:"width"==Ma?u=ya:"height"==Ma?H=ya:"collapsed"==Ma&&"-"!=ya?U="true"==ya:"left"==Ma&&0<ya.length?J=ya:"top"==Ma&&0<ya.length?W=ya:"ignore"==Ma?Aa=ya.split(","):"connect"==Ma?La.push(JSON.parse(ya)):"link"==Ma?sa=ya:"padding"==Ma?oa=parseFloat(ya):"edgespacing"==Ma?aa=parseFloat(ya):-"nodespacing"==Ma?ba=parseFloat(ya):"levelspacing"==Ma?ja=parseFloat(ya):"layout"==Ma&&(Ca=ya)}}}if(null==k[Ea])throw Error(mxResources.get("invalidOrMissingFile"));var Wa=this.editor.csvToArray(k[Ea].replace(/\r$/,""));Ka=c=null;Ma=[];for(ya=0;ya<Wa.length;ya++)fa==Wa[ya]&&(c=ya),Z==Wa[ya]&&(Ka=ya),Ma.push(mxUtils.trim(Wa[ya]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ma[0]+"%");if(null!=La)for(var Ia=0;Ia<La.length;Ia++)null==L[La[Ia].to]&&(L[La[Ia].to]=-{});fa=[];for(ya=Ea+1;ya<k.length;ya++){var Xa=this.editor.csvToArray(k[ya].replace(/\r$/,""));if(null==Xa){var Pa=40<k[ya].length?k[ya].substring(0,40)+"...":k[ya];throw Error(Pa+" ("+ya+"):\n"+mxResources.get("containsValidationErrors"));}0<Xa.length&&fa.push(Xa)}K.model.beginUpdate();try{for(ya=0;ya<fa.length;ya++){Xa=fa[ya];var t=null,N=null!=c?l+Xa[c]:null;k=!1;null!=N&&(t=K.model.getCell(N),k=null==t||0<=mxUtils.indexOf(B,t));var Q=new mxCell(Ba,new mxGeometry(ua,ra,0,0),da||"whiteSpace=wrap;html=1;");-Q.collapsed=U;Q.vertex=!0;Q.id=N;null==t||k||K.model.setCollapsed(t,U);for(var X=0;X<Xa.length;X++)K.setAttributeForCell(Q,Ma[X],Xa[X]),null==t||k||K.setAttributeForCell(t,Ma[X],Xa[X]);if(null!=V&&null!=la){var ia=la[Q.getAttribute(V)];null!=ia&&(K.labelChanged(Q,ia),null==t||k||K.cellLabelChanged(t,ia))}if(null!=ca&&null!=ea){var ka=ea[Q.getAttribute(ca)];null!=ka&&(Q.style=ka)}K.setAttributeForCell(Q,"placeholders","1");Q.style=K.replacePlaceholders(Q,Q.style,O);null==t||k?K.fireEvent(new mxEventObject("cellsInserted",-"cells",[Q])):(K.model.setStyle(t,Q.style),0>mxUtils.indexOf(C,t)&&C.push(t),K.fireEvent(new mxEventObject("cellsInserted","cells",[t])));k=null!=t;t=Q;if(!k)for(Ia=0;Ia<La.length;Ia++)L[La[Ia].to][t.getAttribute(La[Ia].to)]=t;null!=sa&&"link"!=sa&&(K.setLinkForCell(t,t.getAttribute(sa)),K.setAttributeForCell(t,sa,null));var pa=this.editor.graph.getPreferredSizeForCell(t);Z=null!=Ka?K.model.getCell(l+Xa[Ka]):null;if(t.vertex){Pa=null!=Z?0:ua;Ea=null!=Z?0:za;null!=J&&null!=t.getAttribute(J)&&(t.geometry.x=-Pa+parseFloat(t.getAttribute(J)));null!=W&&null!=t.getAttribute(W)&&(t.geometry.y=Ea+parseFloat(t.getAttribute(W)));var xa="@"==u.charAt(0)?t.getAttribute(u.substring(1)):null;t.geometry.width=null!=xa&&"auto"!=xa?parseFloat(t.getAttribute(u.substring(1))):"auto"==u||"auto"==xa?pa.width+oa:parseFloat(u);var ta="@"==H.charAt(0)?t.getAttribute(H.substring(1)):null;t.geometry.height=null!=ta&&"auto"!=ta&&"width"!=H?parseFloat(ta):"auto"==H||"auto"==ta?pa.height+oa:"width"==H?t.geometry.width:parseFloat(H);-ra+=t.geometry.height+ba}k?(null==I[N]&&(I[N]=[]),I[N].push(t)):(B.push(t),null!=Z?(Z.style=K.replacePlaceholders(Z,Y,O),K.addCell(t,Z),z.push(Z)):C.push(K.addCell(t)))}for(ya=0;ya<z.length;ya++)xa="@"==u.charAt(0)?z[ya].getAttribute(u.substring(1)):null,ta="@"==H.charAt(0)?z[ya].getAttribute(H.substring(1)):null,"auto"!=u&&"auto"!=xa||"auto"!=H&&"auto"!=ta||K.updateGroupBounds([z[ya]],oa,!0);var va=C.slice(),Da=C.slice();for(Ia=0;Ia<La.length;Ia++){var Na=La[Ia];for(ya=0;ya<B.length;ya++){t=B[ya];-var Ya=mxUtils.bind(this,function(nb,lb,db){var mb=lb.getAttribute(db.from);if(null!=mb&&""!=mb){mb=mb.split(",");for(var ub=0;ub<mb.length;ub++){var eb=L[db.to][mb[ub]];if(null==eb&&null!=ma){eb=new mxCell(mb[ub],new mxGeometry(ua,za,0,0),ma);eb.style=K.replacePlaceholders(lb,eb.style,O);var ob=this.editor.graph.getPreferredSizeForCell(eb);eb.geometry.width=ob.width+oa;eb.geometry.height=ob.height+oa;L[db.to][mb[ub]]=eb;eb.vertex=!0;eb.id=mb[ub];C.push(K.addCell(eb))}if(null!=eb){ob=db.label;null!=-db.fromlabel&&(ob=(lb.getAttribute(db.fromlabel)||"")+(ob||""));null!=db.sourcelabel&&(ob=K.replacePlaceholders(lb,db.sourcelabel,O)+(ob||""));null!=db.tolabel&&(ob=(ob||"")+(eb.getAttribute(db.tolabel)||""));null!=db.targetlabel&&(ob=(ob||"")+K.replacePlaceholders(eb,db.targetlabel,O));var tb="target"==db.placeholders==!db.invert?eb:nb;tb=null!=db.style?K.replacePlaceholders(tb,db.style,O):K.createCurrentEdgeStyle();ob=K.insertEdge(null,null,ob||"",db.invert?eb:nb,db.invert?nb:eb,tb);if(null!=db.labels)for(tb=-0;tb<db.labels.length;tb++){var pb=db.labels[tb],wb=new mxCell(pb.label||tb,new mxGeometry(null!=pb.x?pb.x:0,null!=pb.y?pb.y:0,0,0),"resizable=0;html=1;");wb.vertex=!0;wb.connectable=!1;wb.geometry.relative=!0;null!=pb.placeholders&&(wb.value=K.replacePlaceholders("target"==pb.placeholders==!db.invert?eb:nb,wb.value,O));if(null!=pb.dx||null!=pb.dy)wb.geometry.offset=new mxPoint(null!=pb.dx?pb.dx:0,null!=pb.dy?pb.dy:0);ob.insert(wb)}if(null!=db.data)for(var vb in db.data)K.setAttributeForCell(ob,vb,-db.data[vb]);Da.push(ob);mxUtils.remove(db.invert?nb:eb,va)}}}});Ya(t,t,Na);if(null!=I[t.id])for(X=0;X<I[t.id].length;X++)Ya(t,I[t.id][X],Na)}}if(null!=Aa)for(ya=0;ya<B.length;ya++)for(t=B[ya],X=0;X<Aa.length;X++)K.setAttributeForCell(t,mxUtils.trim(Aa[X]),null);if(0<C.length){var Za=new mxParallelEdgeLayout(K);Za.spacing=aa;Za.checkOverlap=!0;var ab=function(){0<Za.spacing&&Za.execute(K.getDefaultParent());for(var nb=0;nb<C.length;nb++){var lb=K.getCellGeometry(C[nb]);lb.x=Math.round(K.snap(lb.x));-lb.y=Math.round(K.snap(lb.y));"auto"==u&&(lb.width=Math.round(K.snap(lb.width)));"auto"==H&&(lb.height=Math.round(K.snap(lb.height)))}};if("["==Ca.charAt(0)){var Ra=qa;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(Ca)),function(){ab();Ra()});qa=null}else if("circle"==Ca){var Oa=new mxCircleLayout(K);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var kb=Oa.isVertexIgnored;Oa.isVertexIgnored=function(nb){return kb.apply(this,arguments)||0>mxUtils.indexOf(C,nb)};this.executeLayout(function(){Oa.execute(K.getDefaultParent());-ab()},!0,qa);qa=null}else if("horizontaltree"==Ca||"verticaltree"==Ca||"auto"==Ca&&Da.length==2*C.length-1&&1==va.length){K.view.validate();var cb=new mxCompactTreeLayout(K,"horizontaltree"==Ca);cb.levelDistance=ba;cb.edgeRouting=!1;cb.resetEdges=!1;cb.sortEdges=!0;this.executeLayout(function(){cb.execute(K.getDefaultParent(),0<va.length?va[0]:null)},!0,qa);qa=null}else if("horizontalflow"==Ca||"verticalflow"==Ca||"auto"==Ca&&1==va.length){K.view.validate();var $a=new mxHierarchicalLayout(K,"horizontalflow"==-Ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);$a.intraCellSpacing=ba;$a.parallelEdgeSpacing=aa;$a.interRankCellSpacing=ja;$a.disableEdgeStyle=!1;this.executeLayout(function(){$a.execute(K.getDefaultParent(),Da);K.moveCells(Da,ua,za)},!0,qa);qa=null}else if("orgchart"==Ca){K.view.validate();var fb=new mxOrgChartLayout(K,2,ja,ba),jb=fb.isVertexIgnored;fb.isVertexIgnored=function(nb){return jb.apply(this,arguments)||0>mxUtils.indexOf(C,nb)};this.executeLayout(function(){fb.execute(K.getDefaultParent());-ab()},!0,qa);qa=null}else if("organic"==Ca||"auto"==Ca&&Da.length>C.length){K.view.validate();var sb=new mxFastOrganicLayout(K);sb.forceConstant=3*ba;sb.disableEdgeStyle=!1;sb.resetEdges=!1;var Ab=sb.isVertexIgnored;sb.isVertexIgnored=function(nb){return Ab.apply(this,arguments)||0>mxUtils.indexOf(C,nb)};this.executeLayout(function(){sb.execute(K.getDefaultParent());ab()},!0,qa);qa=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=qa&&qa()}}catch(nb){this.handleError(nb)}};EditorUi.prototype.getSearch=-function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var k="?",B;for(B in urlParams)0>mxUtils.indexOf(c,B)&&null!=urlParams[B]&&(f+=k+B+"="+urlParams[B],k="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),-B;for(B in urlParams)0>mxUtils.indexOf(k,B)&&(c=0==f?c+"?":c+"&",null!=urlParams[B]&&(c+=B+"="+urlParams[B],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,k,B,z){c=new LinkDialog(this,c,f,k,!0,B,z);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||-f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var k=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!k);-this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);-this.actions.get("smartFit").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("darkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("lightMode").setEnabled("atlas"!=Editor.currentTheme);k=this.actions.get("autoMode");k.setEnabled(k.isEnabled()&&"atlas"!=Editor.currentTheme);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=+c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(z){this.handleError(z)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var z=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var C=t.value;t.value=JSON.stringify(JSON.parse(C));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null);+document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=C}catch(F){this.handleError(F)}}));z.setAttribute("title","copy");z.className="geBtn";l.appendChild(z)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),+this.spinner.stop(),c())}),t=mxUtils.bind(this,function(z){this.loadingOrgChart=!1;f.clear()&&this.handleError(z)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",+l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],z=[],C=[],F={};if(0<l.length){var N={},K=this.editor.graph,I=null,ca=null,da=null,ea=null,X=null,ba=null,ha=null,ma="whiteSpace=wrap;html=1;",+Y=null,la=null,Z="",k="auto",A="auto",J=!1,U=null,P=null,T=40,W=40,aa=100,ja=0,pa=mxUtils.bind(this,function(){null!=f?f(ua):(K.setSelectionCells(ua),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=K.getFreeInsertPoint(),qa=sa.x,wa=sa.y;sa=wa;var Ba=null,za="auto";la=null;for(var Ea=[],ra=null,ya=null,Ca=0;Ca<l.length&&"#"==l[Ca].charAt(0);){c=l[Ca].replace(/\r$/,"");for(Ca++;Ca<l.length&&+"\\"==c.charAt(c.length-1)&&"#"==l[Ca].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[Ca].substring(1)),Ca++;if("#"!=c.charAt(1)){var Ma=c.indexOf(":");if(0<Ma){var Ha=mxUtils.trim(c.substring(1,Ma)),Aa=mxUtils.trim(c.substring(Ma+1));"label"==Ha?Ba=Graph.sanitizeHtml(Aa):"labelname"==Ha&&0<Aa.length&&"-"!=Aa?X=Aa:"labels"==Ha&&0<Aa.length&&"-"!=Aa?ha=JSON.parse(Aa):"style"==Ha?ca=Aa:"parentstyle"==Ha?ma=Aa:"unknownStyle"==Ha&&"-"!=Aa?ba=Aa:"stylename"==Ha&&0<Aa.length&&"-"!=Aa?ea=Aa:"styles"==+Ha&&0<Aa.length&&"-"!=Aa?da=JSON.parse(Aa):"vars"==Ha&&0<Aa.length&&"-"!=Aa?I=JSON.parse(Aa):"identity"==Ha&&0<Aa.length&&"-"!=Aa?Y=Aa:"parent"==Ha&&0<Aa.length&&"-"!=Aa?la=Aa:"namespace"==Ha&&0<Aa.length&&"-"!=Aa?Z=Aa:"width"==Ha?k=Aa:"height"==Ha?A=Aa:"collapsed"==Ha&&"-"!=Aa?J="true"==Aa:"left"==Ha&&0<Aa.length?U=Aa:"top"==Ha&&0<Aa.length?P=Aa:"ignore"==Ha?ya=Aa.split(","):"connect"==Ha?Ea.push(JSON.parse(Aa)):"link"==Ha?ra=Aa:"padding"==Ha?ja=parseFloat(Aa):"edgespacing"==Ha?T=parseFloat(Aa):+"nodespacing"==Ha?W=parseFloat(Aa):"levelspacing"==Ha?aa=parseFloat(Aa):"layout"==Ha&&(za=Aa)}}}if(null==l[Ca])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[Ca].replace(/\r$/,""));Ma=c=null;Ha=[];for(Aa=0;Aa<Ra.length;Aa++)Y==Ra[Aa]&&(c=Aa),la==Ra[Aa]&&(Ma=Aa),Ha.push(mxUtils.trim(Ra[Aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ha[0]+"%");if(null!=Ea)for(var Za=0;Za<Ea.length;Za++)null==N[Ea[Za].to]&&(N[Ea[Za].to]=+{});Y=[];for(Aa=Ca+1;Aa<l.length;Aa++){var La=this.editor.csvToArray(l[Aa].replace(/\r$/,""));if(null==La){var $a=40<l[Aa].length?l[Aa].substring(0,40)+"...":l[Aa];throw Error($a+" ("+Aa+"):\n"+mxResources.get("containsValidationErrors"));}0<La.length&&Y.push(La)}K.model.beginUpdate();try{for(Aa=0;Aa<Y.length;Aa++){La=Y[Aa];var Da=null,x=null!=c?Z+La[c]:null;l=!1;null!=x&&(Da=K.model.getCell(x),l=null==Da||0<=mxUtils.indexOf(t,Da));var M=new mxCell(Ba,new mxGeometry(qa,sa,0,0),ca||"whiteSpace=wrap;html=1;");+M.collapsed=J;M.vertex=!0;M.id=x;null==Da||l||K.model.setCollapsed(Da,J);for(var Q=0;Q<La.length;Q++)K.setAttributeForCell(M,Ha[Q],La[Q]),null==Da||l||K.setAttributeForCell(Da,Ha[Q],La[Q]);if(null!=X&&null!=ha){var V=ha[M.getAttribute(X)];null!=V&&(K.labelChanged(M,V),null==Da||l||K.cellLabelChanged(Da,V))}if(null!=ea&&null!=da){var ia=da[M.getAttribute(ea)];null!=ia&&(M.style=ia)}K.setAttributeForCell(M,"placeholders","1");M.style=K.replacePlaceholders(M,M.style,I);null==Da||l?K.fireEvent(new mxEventObject("cellsInserted",+"cells",[M])):(K.model.setStyle(Da,M.style),0>mxUtils.indexOf(C,Da)&&C.push(Da),K.fireEvent(new mxEventObject("cellsInserted","cells",[Da])));l=null!=Da;Da=M;if(!l)for(Za=0;Za<Ea.length;Za++)N[Ea[Za].to][Da.getAttribute(Ea[Za].to)]=Da;null!=ra&&"link"!=ra&&(K.setLinkForCell(Da,Da.getAttribute(ra)),K.setAttributeForCell(Da,ra,null));var ka=this.editor.graph.getPreferredSizeForCell(Da);la=null!=Ma?K.model.getCell(Z+La[Ma]):null;if(Da.vertex){$a=null!=la?0:qa;Ca=null!=la?0:wa;null!=U&&null!=Da.getAttribute(U)&&+(Da.geometry.x=$a+parseFloat(Da.getAttribute(U)));null!=P&&null!=Da.getAttribute(P)&&(Da.geometry.y=Ca+parseFloat(Da.getAttribute(P)));var oa="@"==k.charAt(0)?Da.getAttribute(k.substring(1)):null;Da.geometry.width=null!=oa&&"auto"!=oa?parseFloat(Da.getAttribute(k.substring(1))):"auto"==k||"auto"==oa?ka.width+ja:parseFloat(k);var xa="@"==A.charAt(0)?Da.getAttribute(A.substring(1)):null;Da.geometry.height=null!=xa&&"auto"!=xa&&"width"!=A?parseFloat(xa):"auto"==A||"auto"==xa?ka.height+ja:"width"==A?+Da.geometry.width:parseFloat(A);sa+=Da.geometry.height+W}l?(null==F[x]&&(F[x]=[]),F[x].push(Da)):(t.push(Da),null!=la?(la.style=K.replacePlaceholders(la,ma,I),K.addCell(Da,la),z.push(la)):C.push(K.addCell(Da)))}for(Aa=0;Aa<z.length;Aa++)oa="@"==k.charAt(0)?z[Aa].getAttribute(k.substring(1)):null,xa="@"==A.charAt(0)?z[Aa].getAttribute(A.substring(1)):null,"auto"!=k&&"auto"!=oa||"auto"!=A&&"auto"!=xa||K.updateGroupBounds([z[Aa]],ja,!0);var ta=C.slice(),ua=C.slice();for(Za=0;Za<Ea.length;Za++){var Fa=+Ea[Za];for(Aa=0;Aa<t.length;Aa++){Da=t[Aa];var Na=mxUtils.bind(this,function(mb,pb,db){var qb=pb.getAttribute(db.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var nb=0;nb<qb.length;nb++){var lb=N[db.to][qb[nb]];if(null==lb&&null!=ba){lb=new mxCell(qb[nb],new mxGeometry(qa,wa,0,0),ba);lb.style=K.replacePlaceholders(pb,lb.style,I);var eb=this.editor.graph.getPreferredSizeForCell(lb);lb.geometry.width=eb.width+ja;lb.geometry.height=eb.height+ja;N[db.to][qb[nb]]=lb;lb.vertex=!0;lb.id=qb[nb];C.push(K.addCell(lb))}if(null!=+lb){eb=db.label;null!=db.fromlabel&&(eb=(pb.getAttribute(db.fromlabel)||"")+(eb||""));null!=db.sourcelabel&&(eb=K.replacePlaceholders(pb,db.sourcelabel,I)+(eb||""));null!=db.tolabel&&(eb=(eb||"")+(lb.getAttribute(db.tolabel)||""));null!=db.targetlabel&&(eb=(eb||"")+K.replacePlaceholders(lb,db.targetlabel,I));var tb="target"==db.placeholders==!db.invert?lb:mb;tb=null!=db.style?K.replacePlaceholders(tb,db.style,I):K.createCurrentEdgeStyle();eb=K.insertEdge(null,null,eb||"",db.invert?lb:mb,db.invert?+mb:lb,tb);if(null!=db.labels)for(tb=0;tb<db.labels.length;tb++){var ob=db.labels[tb],ub=new mxCell(ob.label||tb,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=ob.placeholders&&(ub.value=K.replacePlaceholders("target"==ob.placeholders==!db.invert?lb:mb,ub.value,I));if(null!=ob.dx||null!=ob.dy)ub.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=ob.dy?ob.dy:0);eb.insert(ub)}if(null!=db.data)for(var Ab in db.data)K.setAttributeForCell(eb,+Ab,db.data[Ab]);ua.push(eb);mxUtils.remove(db.invert?mb:lb,ta)}}}});Na(Da,Da,Fa);if(null!=F[Da.id])for(Q=0;Q<F[Da.id].length;Q++)Na(Da,F[Da.id][Q],Fa)}}if(null!=ya)for(Aa=0;Aa<t.length;Aa++)for(Da=t[Aa],Q=0;Q<ya.length;Q++)K.setAttributeForCell(Da,mxUtils.trim(ya[Q]),null);if(0<C.length){var Wa=new mxParallelEdgeLayout(K);Wa.spacing=T;Wa.checkOverlap=!0;var Xa=function(){0<Wa.spacing&&Wa.execute(K.getDefaultParent());for(var mb=0;mb<C.length;mb++){var pb=K.getCellGeometry(C[mb]);pb.x=Math.round(K.snap(pb.x));+pb.y=Math.round(K.snap(pb.y));"auto"==k&&(pb.width=Math.round(K.snap(pb.width)));"auto"==A&&(pb.height=Math.round(K.snap(pb.height)))}};if("["==za.charAt(0)){var ab=pa;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(za)),function(){Xa();ab()});pa=null}else if("circle"==za){var Oa=new mxCircleLayout(K);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Qa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(mb){return Qa.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Oa.execute(K.getDefaultParent());+Xa()},!0,pa);pa=null}else if("horizontaltree"==za||"verticaltree"==za||"auto"==za&&ua.length==2*C.length-1&&1==ta.length){K.view.validate();var kb=new mxCompactTreeLayout(K,"horizontaltree"==za);kb.levelDistance=W;kb.edgeRouting=!1;kb.resetEdges=!1;kb.sortEdges=!0;this.executeLayout(function(){kb.execute(K.getDefaultParent(),0<ta.length?ta[0]:null)},!0,pa);pa=null}else if("horizontalflow"==za||"verticalflow"==za||"auto"==za&&1==ta.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==+za?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);cb.intraCellSpacing=W;cb.parallelEdgeSpacing=T;cb.interRankCellSpacing=aa;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),ua);K.moveCells(ua,qa,wa)},!0,pa);pa=null}else if("orgchart"==za){K.view.validate();var Ya=new mxOrgChartLayout(K,2,aa,W),gb=Ya.isVertexIgnored;Ya.isVertexIgnored=function(mb){return gb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Ya.execute(K.getDefaultParent());+Xa()},!0,pa);pa=null}else if("organic"==za||"auto"==za&&ua.length>C.length){K.view.validate();var hb=new mxFastOrganicLayout(K);hb.forceConstant=3*W;hb.disableEdgeStyle=!1;hb.resetEdges=!1;var vb=hb.isVertexIgnored;hb.isVertexIgnored=function(mb){return vb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){hb.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=pa&&pa()}}catch(mb){this.handleError(mb)}};EditorUi.prototype.getSearch=+function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),+t;for(t in urlParams)0>mxUtils.indexOf(l,t)&&(c=0==f?c+"?":c+"&",null!=urlParams[t]&&(c+=t+"="+urlParams[t],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,l,t,z){c=new LinkDialog(this,c,f,l,!0,t,z);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||+f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);+this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);+this.actions.get("smartFit").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("darkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("lightMode").setEnabled("atlas"!=Editor.currentTheme);l=this.actions.get("autoMode");l.setEnabled(l.isEnabled()&&"atlas"!=Editor.currentTheme);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&-this.editor.graph.isEnabled()};var P=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(c){var f=P.apply(this,arguments),k=mxUtils.bind(this,function(){f.refresh();this.restoreOpenLibraries()});this.addListener("sketchModeChanged",k);this.addListener("currentThemeChanged",k);return f};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var f=0;f<c.length;f++)this.libraryLoaded(c[f].file,c[f].images,c[f].title,null!=-c[f].div?"none"!=c[f].div.style.display:c[f].expand)};var R=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){R.apply(this,arguments);var c=this.editor.graph,f=this.getCurrentFile(),k=this.getSelectionState(),B=this.isDiagramActive(),z="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&z);this.actions.get("redo").setEnabled(this.canRedo()&&z);this.actions.get("autosave").setEnabled(null!=-f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(B);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("editConnectionPoints").setEnabled(B&&0==k.edges.length&&1==k.vertices.length);this.actions.get("editImage").setEnabled(B&&k.image&&0<k.cells.length);this.actions.get("crop").setEnabled(B&&k.image&&0<k.cells.length);this.actions.get("pageSetup").setEnabled(B);this.actions.get("shadowVisible").setEnabled(B);this.actions.get("connectionArrows").setEnabled(B);-this.actions.get("connectionPoints").setEnabled(B);this.actions.get("copyStyle").setEnabled(B&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&B&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(B);this.actions.get("createRevision").setEnabled(B);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(B&&-(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=-f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(B&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};-var T=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);T.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,k,B,z,C,I,L){var K=c.editor.graph;if("xml"==k)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==k)c.hideDialog(),c.saveData(f,-"svg",mxUtils.getXml(K.getSvg(B,z,C)),"image/svg+xml");else{var O=c.getFileData(!0,null,null,null,null,!0),da=K.getGraphBounds(),ea=Math.floor(da.width*z/K.view.scale),ca=Math.floor(da.height*z/K.view.scale);if(O.length<=MAX_REQUEST_SIZE&&ea*ca<MAX_AREA)if(c.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!c.isExportToCanvas()){var V={globalVars:K.getExportVariables()};L&&(V.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,k,function(ma,la){return new mxXmlRequest(EXPORT_URL,-"format="+k+"&base64="+(la||"0")+(null!=ma?"&filename="+encodeURIComponent(ma):"")+"&extras="+encodeURIComponent(JSON.stringify(V))+(0<I?"&dpi="+I:"")+"&bg="+(null!=B?B:"none")+"&w="+ea+"&h="+ca+"&border="+C+"&xml="+encodeURIComponent(O))})}else"png"==k?c.exportImage(z,null==B||"none"==B,!0,!1,!1,C,!0,!1,null,L,I):c.exportImage(z,!1,!0,!1,!1,C,!0,!1,"jpeg",L);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);-var c=this.editor.graph,f="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var B=c;this.currentPage!=this.pages[k]&&(B=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[k]),B.model.setRoot(this.pages[k].root));f+=this.pages[k].getName()+" "+B.getIndexableText()+" "}else f=c.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},k=document.createElement("div");k.style.whiteSpace="nowrap";var B=-document.createElement("h3");mxUtils.write(B,mxUtils.htmlEntities(c));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(B);var z=document.createElement("div");z.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var I=mxSettings.getCustomLibraries();for(c=0;c<I.length;c++){var L=I[c];if("R"==L.substring(0,1)){var K=JSON.parse(decodeURIComponent(L.substring(1)));-C[K[0]]={id:K[0],title:K[1],downloadUrl:K[2]}}}}catch(O){}this.remoteInvoke("getCustomLibraries",null,null,function(O){z.innerText="";if(0==O.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var da=0;da<O.length;da++){var ea=O[da];C[ea.id]&&(f[ea.id]=ea);var ca=this.addCheckbox(z,ea.title,C[ea.id]);(function(V,ma){mxEvent.addListener(ma,"change",function(){this.checked?f[V.id]=V:delete f[V.id]})})(ea,-ca)}},mxUtils.bind(this,function(O){z.innerText="";var da=document.createElement("div");da.style.padding="8px";da.style.textAlign="center";mxUtils.write(da,mxResources.get("error")+": ");mxUtils.write(da,null!=O&&null!=O.message?O.message:mxResources.get("unknownError"));z.appendChild(da)}));k.appendChild(z);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var O=0,da;for(da in f)null==C[da]&&(O++,mxUtils.bind(this,function(ea){this.remoteInvoke("getFileContent",-[ea.downloadUrl],null,mxUtils.bind(this,function(ca){O--;0==O&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,ea)),this.showSidebar()}catch(V){this.handleError(V,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){O--;0==O&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[da]));for(da in C)f[da]||this.closeLibrary(new RemoteLibrary(this,null,C[da]));0==O&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");-this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=-c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,k=this.remoteInvokeCallbacks[f.callbackId];if(null==k)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?k.error&&k.error(c.error.errResp):k.callback&&k.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,k,B,z){var C=-!0,I=window.setTimeout(mxUtils.bind(this,function(){C=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),L=mxUtils.bind(this,function(){window.clearTimeout(I);C&&B.apply(this,arguments)}),K=mxUtils.bind(this,function(){window.clearTimeout(I);C&&z.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:L,error:K});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:k});null!=this.remoteWin?-this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var k=mxUtils.bind(this,function(O,da){var ea={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=da?ea.error={errResp:da}:null!=O&&(ea.resp=O);this.remoteWin.postMessage(JSON.stringify(ea),"*")});try{var B=c.funtionName,z=this.remoteInvokableFns[B];if(null!=z&&"function"===typeof this[B]){if(z.allowedDomains){for(var C=!1,I=0;I<z.allowedDomains.length;I++)if(f=="https://"+-z.allowedDomains[I]){C=!0;break}if(!C){k(null,"Invalid Call: "+B+" is not allowed.");return}}var L=c.functionArgs;Array.isArray(L)||(L=[]);if(z.isAsync)L.push(function(){k(Array.prototype.slice.apply(arguments))}),L.push(function(O){k(null,O||"Unkown Error")}),this[B].apply(this,L);else{var K=this[B].apply(this,L);k([K])}}else k(null,"Invalid Call: "+B+" is not found.")}catch(O){k(null,"Invalid Call: An error occurred, "+O.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var k=-window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var B=k.open("database",2);B.onupgradeneeded=function(z){try{var C=B.result;1>z.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});2>z.oldVersion&&(C.createObjectStore("files",{keyPath:"title"}),C.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(I){null!=f&&f(I)}};B.onsuccess=mxUtils.bind(this,function(z){try{var C=B.result;this.database=C;EditorUi.migrateStorageFiles&&-(StorageFile.migrate(C),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(I){if(!I||"1"==urlParams.forceMigration){var L=document.createElement("iframe");L.style.display="none";L.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(L);var K=!0,O=!1,da,ea=0,ca=mxUtils.bind(this,function(){O=-!0;this.setDatabaseItem(".drawioMigrated3",!0);L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),V=mxUtils.bind(this,function(){ea++;ma()}),ma=mxUtils.bind(this,function(){try{if(ea>=da.length)ca();else{var Y=da[ea];StorageFile.getFileContent(this,Y,mxUtils.bind(this,function(fa){null==fa||".scratchpad"==Y&&fa==this.emptyLibraryXml?L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[Y]}),-"*"):V()}),V)}}catch(fa){console.log(fa)}}),la=mxUtils.bind(this,function(Y){try{this.setDatabaseItem(null,[{title:Y.title,size:Y.data.length,lastModified:Date.now(),type:Y.isLib?"L":"F"},{title:Y.title,data:Y.data}],V,V,["filesInfo","files"])}catch(fa){console.log(fa)}});I=mxUtils.bind(this,function(Y){try{if(Y.source==L.contentWindow){var fa={};try{fa=JSON.parse(Y.data)}catch(Z){}"init"==fa.event?(L.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=fa.event||O||(K?null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?(da=fa.resp[0],K=!1,ma()):ca():null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?la(fa.resp[0]):V())}}catch(Z){console.log(Z)}});window.addEventListener("message",I)}})));c(C);C.onversionchange=function(){C.close()}}catch(I){null!=f?f(I):null!=window.console&&console.warn(I)}});B.onerror=f;B.onblocked=function(){}}catch(z){null!=f?f(z):null!=window.console&&console.error(z)}else null!=-f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,k,B,z){this.openDatabase(mxUtils.bind(this,function(C){try{z=z||"objects";Array.isArray(z)||(z=[z],c=[c],f=[f]);var I=C.transaction(z,"readwrite");I.oncomplete=k;I.onerror=B;for(C=0;C<z.length;C++)I.objectStore(z[C]).put(null!=c&&null!=c[C]?{key:c[C],data:f[C]}:f[C])}catch(L){null!=B&&B(L)}}),B)};EditorUi.prototype.removeDatabaseItem=function(c,f,k,B){this.openDatabase(mxUtils.bind(this,function(z){try{B=-B||"objects";Array.isArray(B)||(B=[B],c=[c]);var C=z.transaction(B,"readwrite");C.oncomplete=f;C.onerror=k;for(z=0;z<B.length;z++)C.objectStore(B[z]).delete(c[z])}catch(I){null!=k&&k(I)}}),k)};EditorUi.prototype.getDatabaseItem=function(c,f,k,B){this.openDatabase(mxUtils.bind(this,function(z){try{B=B||"objects";var C=z.transaction([B],"readonly").objectStore(B).get(c);C.onsuccess=function(){f(C.result)};C.onerror=k}catch(I){null!=k&&k(I)}}),k)};EditorUi.prototype.getDatabaseItems=function(c,f,k){this.openDatabase(mxUtils.bind(this,-function(B){try{k=k||"objects";var z=B.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),C=[];z.onsuccess=function(I){null==I.target.result?c(C):(C.push(I.target.result.value),I.target.result.continue())};z.onerror=f}catch(I){null!=f&&f(I)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(c,f,k){this.openDatabase(mxUtils.bind(this,function(B){try{k=k||"objects";var z=B.transaction([k],"readonly").objectStore(k).getAllKeys();z.onsuccess=function(){c(z.result)};z.onerror=-f}catch(C){null!=f&&f(C)}}),f)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,f){var k=this.getCurrentFile();null!=k?k.getComments(c,f):c([])};EditorUi.prototype.addComment=-function(c,f,k){var B=this.getCurrentFile();null!=B?B.addComment(c,f,k):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var k=this.getCurrentFile();return null!=k?k.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=-function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=-function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,k,B,z,C,I,L){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,f,k,B,z,C,I,L)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=-function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V,ma,la){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,k,B,z,C,I,L,K,O,da,ea,ca,V,ma,la)};EditorUi.prototype.createImageUrlConverter=-function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,k,B){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,f,k,B)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");-return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,k,B){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,k,B)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,k,B,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,k,B,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==-localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var k=localStorage.key(f),B=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<B.length){var z="<mxfile "===B.substring(0,8)||"<?xml"===B.substring(0,5)||"\x3c!--[if IE]>"===B.substring(0,12);B="<mxlibrary>"===B.substring(0,11);(z||B)&&c.push(k)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&-"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();-var CommentsWindow=function(b,e,g,m,v,p){function A(){for(var V=C.getElementsByTagName("div"),ma=0,la=0;la<V.length;la++)"none"!=V[la].style.display&&V[la].parentNode==C&&ma++;I.style.display=0==ma?"block":"none"}function G(V,ma,la,Y){function fa(){ma.removeChild(u);ma.removeChild(H);l.style.display="block";Z.style.display="block"}k={div:ma,comment:V,saveCallback:la,deleteOnCancel:Y};var Z=ma.querySelector(".geCommentTxt"),l=ma.querySelector(".geCommentActionsList"),u=document.createElement("textarea");-u.className="geCommentEditTxtArea";u.style.minHeight=Z.offsetHeight+"px";u.value=V.content;ma.insertBefore(u,Z);var H=document.createElement("div");H.className="geCommentEditBtns";var U=mxUtils.button(mxResources.get("cancel"),function(){Y?(ma.parentNode.removeChild(ma),A()):fa();k=null});U.className="geCommentEditBtn";H.appendChild(U);var J=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";V.content=u.value;mxUtils.write(Z,V.content);fa();la(V);k=null});mxEvent.addListener(u,"keydown",-mxUtils.bind(this,function(W){mxEvent.isConsumed(W)||((mxEvent.isControlDown(W)||mxClient.IS_MAC&&mxEvent.isMetaDown(W))&&13==W.keyCode?(J.click(),mxEvent.consume(W)):27==W.keyCode&&(U.click(),mxEvent.consume(W)))}));J.focus();J.className="geCommentEditBtn gePrimaryBtn";H.appendChild(J);ma.insertBefore(H,Z);l.style.display="none";Z.style.display="none";u.focus()}function S(V,ma){ma.innerText="";V=new Date(V.modifiedDate);var la=b.timeSince(V);null==la&&(la=mxResources.get("lessThanAMinute"));mxUtils.write(ma,-mxResources.get("timeAgo",[la],"{1} ago"));ma.setAttribute("title",V.toLocaleDateString()+" "+V.toLocaleTimeString())}function F(V){var ma=document.createElement("img");ma.className="geCommentBusyImg";ma.src=IMAGE_PATH+"/spin.gif";V.appendChild(ma);V.busyImg=ma}function P(V){V.style.border="1px solid red";V.busyImg.parentNode==V&&V.removeChild(V.busyImg)}function R(V){V.style.border="";V.busyImg.parentNode==V&&V.removeChild(V.busyImg)}function T(V,ma,la,Y,fa){function Z(ba,ja,oa){var qa=document.createElement("li");-qa.className="geCommentAction";var ra=document.createElement("a");ra.className="geCommentActionLnk";mxUtils.write(ra,ba);qa.appendChild(ra);mxEvent.addListener(ra,"click",function(ua){ja(ua,V);ua.preventDefault();mxEvent.consume(ua)});aa.appendChild(qa);oa&&(qa.style.display="none")}function l(){function ba(qa){ja.push(oa);if(null!=qa.replies)for(var ra=0;ra<qa.replies.length;ra++)oa=oa.nextSibling,ba(qa.replies[ra])}var ja=[],oa=H;ba(V);return{pdiv:oa,replies:ja}}function u(ba,ja,oa,qa,ra){function ua(){F(La);-V.addReply(Ca,function(sa){Ca.id=sa;V.replies.push(Ca);R(La);oa&&oa()},function(sa){za();P(La);b.handleError(sa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},qa,ra)}function za(){G(Ca,La,function(sa){ua()},!0)}var Ba=l().pdiv,Ca=b.newComment(ba,b.getCurrentUser());Ca.pCommentId=V.id;null==V.replies&&(V.replies=[]);var La=T(Ca,V.replies,Ba,Y+1);ja?za():ua()}if(fa||!V.isResolved){I.style.display="none";var H=document.createElement("div");H.className="geCommentContainer";H.setAttribute("data-commentId",-V.id);H.style.marginLeft=20*Y+5+"px";V.isResolved&&(B.style.opacity="0.7");var U=document.createElement("div");U.className="geCommentHeader";var J=document.createElement("img");J.className="geCommentUserImg";J.src=null!=V.user&&null!=V.user.pictureUrl?V.user.pictureUrl:Editor.userImage;U.appendChild(J);J=document.createElement("div");J.className="geCommentHeaderTxt";U.appendChild(J);var W=document.createElement("div");W.className="geCommentUsername";mxUtils.write(W,null!=V.user?V.user.displayName:-mxResources.get("unknownUser"));J.appendChild(W);W=document.createElement("div");W.className="geCommentDate";W.setAttribute("data-commentId",V.id);S(V,W);J.appendChild(W);H.appendChild(U);U=document.createElement("div");U.className="geCommentTxt";mxUtils.write(U,V.content||"");H.appendChild(U);V.isLocked&&(H.style.opacity="0.5");U=document.createElement("div");U.className="geCommentActions";var aa=document.createElement("ul");aa.className="geCommentActionsList";U.appendChild(aa);c||V.isLocked||0!=-Y&&!f||Z(mxResources.get("reply"),function(){u("",!0)},V.isResolved);J=b.getCurrentUser();null==J||null==V.user||J.id!=V.user.id||c||V.isLocked||(Z(mxResources.get("edit"),function(){function ba(){G(V,H,function(){F(H);V.editComment(V.content,function(){R(H)},function(ja){P(H);ba();b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}ba()},V.isResolved),Z(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){F(H);V.deleteComment(function(ba){if(!0===-ba){ba=H.querySelector(".geCommentTxt");ba.innerText="";mxUtils.write(ba,mxResources.get("msgDeleted"));var ja=H.querySelectorAll(".geCommentAction");for(ba=0;ba<ja.length;ba++)ja[ba].parentNode.removeChild(ja[ba]);R(H);H.style.opacity="0.5"}else{ja=l(V).replies;for(ba=0;ba<ja.length;ba++)C.removeChild(ja[ba]);for(ba=0;ba<ma.length;ba++)if(ma[ba]==V){ma.splice(ba,1);break}I.style.display=0==C.getElementsByTagName("div").length?"block":"none"}},function(ba){P(H);b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},-V.isResolved));c||V.isLocked||0!=Y||Z(V.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(ba){function ja(){var oa=ba.target;oa.innerText="";V.isResolved=!V.isResolved;mxUtils.write(oa,V.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var qa=V.isResolved?"none":"",ra=l(V).replies,ua="light-dark("+(V.isResolved?"ghostWhite":"white")+", transparent)",za=0;za<ra.length;za++){ra[za].style.backgroundColor=ua;for(var Ba=ra[za].querySelectorAll(".geCommentAction"),-Ca=0;Ca<Ba.length;Ca++)Ba[Ca]!=oa.parentNode&&(Ba[Ca].style.display=qa);da||(ra[za].style.display="none")}A()}V.isResolved?u(mxResources.get("reOpened")+": ",!0,ja,!1,!0):u(mxResources.get("markedAsResolved"),!1,ja,!0)});H.appendChild(U);null!=la?C.insertBefore(H,la.nextSibling):C.appendChild(H);for(la=0;null!=V.replies&&la<V.replies.length;la++)U=V.replies[la],U.isResolved=V.isResolved,T(U,V.replies,null,Y+1,fa);null!=k&&(k.comment.id==V.id?(fa=V.content,V.content=k.comment.content,G(V,H,k.saveCallback,-k.deleteOnCancel),V.content=fa):null==k.comment.id&&k.comment.pCommentId==V.id&&(C.appendChild(k.div),G(k.comment,k.div,k.saveCallback,k.deleteOnCancel)));return H}}var c=!b.canComment(),f=b.canReplyToReplies(),k=null,B=document.createElement("div");B.className="geCommentsWin";B.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var z=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+-")";C.style.bottom=parseInt(z)+7+"px";B.appendChild(C);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(I,mxResources.get("noCommentsFound"));var L=document.createElement("div");L.className="geToolbarContainer geCommentsToolbar";L.style.height=z;L.style.padding="3px 4px 4px 4px";z=document.createElement("a");z.className="geToolbarButton geAdaptiveAsset geToggleItem";z.style.width="16px";z.style.height="18px";z.style.backgroundPosition=-"center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="20px";z.style.margin="0 2px";z.style.display="inline-block";z.style.cursor="pointer";if(!c){var K=z.cloneNode();K.style.backgroundImage="url("+Editor.plusImage+")";K.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(K,"click",function(V){function ma(){G(la,Y,function(fa){F(Y);b.addComment(fa,function(Z){fa.id=Z;ea.push(fa);R(Y)},function(Z){P(Y);ma();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},-!0)}var la=b.newComment("",b.getCurrentUser()),Y=T(la,ea,null,0);ma();V.preventDefault();mxEvent.consume(V)});L.appendChild(K)}var O=z.cloneNode();O.classList.add("geToggleItem");O.style.backgroundImage="url("+Editor.checkImage+")";O.setAttribute("title",mxResources.get("showResolved"));var da=!1;mxEvent.addListener(O,"click",function(V){(da=!da)?O.classList.add("geActiveItem"):O.classList.remove("geActiveItem");ca();V.preventDefault();mxEvent.consume(V)});L.appendChild(O);b.commentsRefreshNeeded()&&-(K=z.cloneNode(),K.style.backgroundImage="url("+Editor.refreshImage+")",K.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(K,"click",function(V){ca();V.preventDefault();mxEvent.consume(V)}),L.appendChild(K));b.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),z.className="geButton geAdaptiveAsset",mxEvent.addListener(z,"click",function(V){p();V.preventDefault();-mxEvent.consume(V)}),L.appendChild(z));B.appendChild(L);var ea=[],ca=mxUtils.bind(this,function(){this.hasError=!1;if(null!=k)try{k.div=k.div.cloneNode(!0);var V=k.div.querySelector(".geCommentEditTxtArea"),ma=k.div.querySelector(".geCommentEditBtns");k.comment.content=V.value;V.parentNode.removeChild(V);ma.parentNode.removeChild(ma)}catch(la){b.handleError(la)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+-"...</div>";f=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(la){function Y(fa){if(null!=fa){fa.sort(function(l,u){return new Date(l.modifiedDate)-new Date(u.modifiedDate)});for(var Z=0;Z<fa.length;Z++)Y(fa[Z].replies)}}la.sort(function(fa,Z){return new Date(fa.modifiedDate)-new Date(Z.modifiedDate)});C.innerText="";C.appendChild(I);I.style.display="block";ea=la;for(la=0;la<ea.length;la++)Y(ea[la].replies),T(ea[la],ea,null,0,da);null!=k&&null==k.comment.id&&null==k.comment.pCommentId&&-(C.appendChild(k.div),G(k.comment,k.div,k.saveCallback,k.deleteOnCancel))},mxUtils.bind(this,function(la){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(la&&la.message?": "+la.message:""));this.hasError=!0})):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ca();this.refreshComments=ca;L=mxUtils.bind(this,function(){function V(Z){var l=la[Z.id];if(null!=l)for(S(Z,l),l=0;null!=Z.replies&&l<Z.replies.length;l++)V(Z.replies[l])}if(this.window.isVisible()){for(var ma=C.querySelectorAll(".geCommentDate"),-la={},Y=0;Y<ma.length;Y++){var fa=ma[Y];la[fa.getAttribute("data-commentId")]=fa}for(Y=0;Y<ea.length;Y++)V(ea[Y])}});setInterval(L,6E4);this.refreshCommentsTime=L;this.window=new mxWindow(mxResources.get("comments"),B,e,g,m,v,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));-b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,v,p,A,G,S,F,P){var R=document.createElement("div");R.style.textAlign="center";P=null!=P?P:44;var T=document.createElement("div");T.style.padding="6px";T.style.overflow="auto";T.style.maxHeight=P+"px";T.style.lineHeight="1.2em";mxUtils.write(T,e);R.appendChild(T);null!=F&&(T=document.createElement("div"),T.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",F),T.appendChild(e),R.appendChild(T));F=document.createElement("div");-F.style.textAlign="center";F.style.whiteSpace="nowrap";var c=document.createElement("input");c.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(c.checked)});p.className="geBtn";null!=G&&(p.innerHTML=G+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&F.appendChild(p);var f=mxUtils.button(v||mxResources.get("ok"),function(){b.hideDialog();null!=g&&-g(c.checked)});F.appendChild(f);null!=A?(f.innerHTML=A+"<br>"+f.innerHTML+"<br>",f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.className="geBtn",f.style.width="40%"):f.className="geBtn gePrimaryBtn";b.editor.cancelFirst||F.appendChild(p);R.appendChild(F);S?(F.style.marginTop="10px",T=document.createElement("p"),T.style.marginTop="20px",T.style.marginBottom="0px",T.appendChild(c),v=document.createElement("span"),mxUtils.write(v," "+mxResources.get("rememberThisSetting")),-T.appendChild(v),R.appendChild(T),mxEvent.addListener(v,"click",function(k){c.checked=!c.checked;mxEvent.consume(k)})):F.style.marginTop="12px";this.init=function(){f.focus()};this.container=R},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};-HeadlessEditorUi.prototype.updateActionStates=function(){};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};+this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var f=0;f<c.length;f++)this.libraryLoaded(c[f].file,c[f].images,c[f].title,null!=c[f].div?"none"!=c[f].div.style.display:c[f].expand)};var O=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){O.apply(this,arguments);var c=this.editor.graph,f=this.getCurrentFile(),l=this.getSelectionState(),t=this.isDiagramActive(),z="1"==+urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&z);this.actions.get("redo").setEnabled(this.canRedo()&&z);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(t);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("editConnectionPoints").setEnabled(t&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(t&&+l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(t&&l.image&&0<l.cells.length);this.actions.get("pageSetup").setEnabled(t);this.actions.get("shadowVisible").setEnabled(t);this.actions.get("connectionArrows").setEnabled(t);this.actions.get("connectionPoints").setEnabled(t);this.actions.get("copyStyle").setEnabled(t&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&t&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);+this.actions.get("createShape").setEnabled(t);this.actions.get("createRevision").setEnabled(t);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(t&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("hidden"!=+this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=+this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var R=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);R.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=+!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,z,C,F,N){var K=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(K.getSvg(t,z,C)),"image/svg+xml");else{var I=c.getFileData(!0,null,null,null,null,!0),ca=K.getGraphBounds(),da=Math.floor(ca.width*z/K.view.scale),ea=Math.floor(ca.height*z/K.view.scale);if(I.length<=MAX_REQUEST_SIZE&&da*ea<MAX_AREA)if(c.hideDialog(),+"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var X={globalVars:K.getExportVariables()};N&&(X.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,l,function(ba,ha){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(ha||"0")+(null!=ba?"&filename="+encodeURIComponent(ba):"")+"&extras="+encodeURIComponent(JSON.stringify(X))+(0<F?"&dpi="+F:"")+"&bg="+(null!=t?t:"none")+"&w="+da+"&h="+ea+"&border="+C+"&xml="+encodeURIComponent(I))})}else"png"==l?c.exportImage(z,+null==t||"none"==t,!0,!1,!1,C,!0,!1,null,N,F):c.exportImage(z,!1,!0,!1,!1,C,!0,!1,"jpeg",N);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var t=c;this.currentPage!=this.pages[l]&&(t=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[l]),t.model.setRoot(this.pages[l].root));f+=this.pages[l].getName()++" "+t.getIndexableText()+" "}else f=c.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},l=document.createElement("div");l.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxUtils.htmlEntities(c));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(t);var z=document.createElement("div");z.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";+z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var F=mxSettings.getCustomLibraries();for(c=0;c<F.length;c++){var N=F[c];if("R"==N.substring(0,1)){var K=JSON.parse(decodeURIComponent(N.substring(1)));C[K[0]]={id:K[0],title:K[1],downloadUrl:K[2]}}}}catch(I){}this.remoteInvoke("getCustomLibraries",null,null,function(I){z.innerText="";if(0==I.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))++"</div>";else for(var ca=0;ca<I.length;ca++){var da=I[ca];C[da.id]&&(f[da.id]=da);var ea=this.addCheckbox(z,da.title,C[da.id]);(function(X,ba){mxEvent.addListener(ba,"change",function(){this.checked?f[X.id]=X:delete f[X.id]})})(da,ea)}},mxUtils.bind(this,function(I){z.innerText="";var ca=document.createElement("div");ca.style.padding="8px";ca.style.textAlign="center";mxUtils.write(ca,mxResources.get("error")+": ");mxUtils.write(ca,null!=I&&null!=I.message?I.message:mxResources.get("unknownError"));+z.appendChild(ca)}));l.appendChild(z);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var I=0,ca;for(ca in f)null==C[ca]&&(I++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ea){I--;0==I&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ea,da)),this.showSidebar()}catch(X){this.handleError(X,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){I--;+0==I&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ca]));for(ca in C)f[ca]||this.closeLibrary(new RemoteLibrary(this,null,C[ca]));0==I&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,+allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==+l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):l.callback&&l.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,l,t,z){var C=!0,F=window.setTimeout(mxUtils.bind(this,function(){C=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),N=mxUtils.bind(this,function(){window.clearTimeout(F);C&&t.apply(this,arguments)}),K=mxUtils.bind(this,function(){window.clearTimeout(F);+C&&z.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:N,error:K});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var l=mxUtils.bind(this,function(I,ca){var da={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=ca?da.error={errResp:ca}:null!=I&&+(da.resp=I);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var t=c.funtionName,z=this.remoteInvokableFns[t];if(null!=z&&"function"===typeof this[t]){if(z.allowedDomains){for(var C=!1,F=0;F<z.allowedDomains.length;F++)if(f=="https://"+z.allowedDomains[F]){C=!0;break}if(!C){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||(N=[]);if(z.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(I){l(null,I||"Unkown Error")}),+this[t].apply(this,N);else{var K=this[t].apply(this,N);l([K])}}else l(null,"Invalid Call: "+t+" is not found.")}catch(I){l(null,"Invalid Call: An error occurred, "+I.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var t=l.open("database",2);t.onupgradeneeded=function(z){try{var C=t.result;1>z.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});2>z.oldVersion&&(C.createObjectStore("files",+{keyPath:"title"}),C.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};t.onsuccess=mxUtils.bind(this,function(z){try{var C=t.result;this.database=C;EditorUi.migrateStorageFiles&&(StorageFile.migrate(C),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var N=+document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var K=!0,I=!1,ca,da=0,ea=mxUtils.bind(this,function(){I=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),X=mxUtils.bind(this,function(){da++;ba()}),ba=mxUtils.bind(this,function(){try{if(da>=ca.length)ea();else{var ma=+ca[da];StorageFile.getFileContent(this,ma,mxUtils.bind(this,function(Y){null==Y||".scratchpad"==ma&&Y==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ma]}),"*"):X()}),X)}}catch(Y){console.log(Y)}}),ha=mxUtils.bind(this,function(ma){try{this.setDatabaseItem(null,[{title:ma.title,size:ma.data.length,lastModified:Date.now(),type:ma.isLib?"L":"F"},{title:ma.title,data:ma.data}],X,X,["filesInfo","files"])}catch(Y){console.log(Y)}});+F=mxUtils.bind(this,function(ma){try{if(ma.source==N.contentWindow){var Y={};try{Y=JSON.parse(ma.data)}catch(la){}"init"==Y.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=Y.event||I||(K?null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?(ca=Y.resp[0],K=!1,ba()):ea():null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?ha(Y.resp[0]):X())}}catch(la){console.log(la)}});+window.addEventListener("message",F)}})));c(C);C.onversionchange=function(){C.close()}}catch(F){null!=f?f(F):null!=window.console&&console.warn(F)}});t.onerror=f;t.onblocked=function(){}}catch(z){null!=f?f(z):null!=window.console&&console.error(z)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,l,t,z){this.openDatabase(mxUtils.bind(this,function(C){try{z=z||"objects";Array.isArray(z)||(z=[z],c=[c],f=[f]);var F=C.transaction(z,+"readwrite");F.oncomplete=l;F.onerror=t;for(C=0;C<z.length;C++)F.objectStore(z[C]).put(null!=c&&null!=c[C]?{key:c[C],data:f[C]}:f[C])}catch(N){null!=t&&t(N)}}),t)};EditorUi.prototype.removeDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c]);var C=z.transaction(t,"readwrite");C.oncomplete=f;C.onerror=l;for(z=0;z<t.length;z++)C.objectStore(t[z]).delete(c[z])}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItem=+function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";var C=z.transaction([t],"readonly").objectStore(t).get(c);C.onsuccess=function(){f(C.result)};C.onerror=l}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=l||"objects";var z=t.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),C=[];z.onsuccess=function(F){null==F.target.result?c(C):(C.push(F.target.result.value),+F.target.result.continue())};z.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=l||"objects";var z=t.transaction([l],"readonly").objectStore(l).getAllKeys();z.onsuccess=function(){c(z.result)};z.onerror=f}catch(C){null!=f&&f(C)}}),f)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=+this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,f){var l=this.getCurrentFile();null!=l?l.getComments(c,f):c([])};EditorUi.prototype.addComment=function(c,f,l){var t=this.getCurrentFile();null!=t?t.addComment(c,f,l):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?+c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var l=this.getCurrentFile();return null!=l?l.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var l=this.getCurrentFile();null!=+l&&l.getRevisions?l.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,l,t,z,C,F,N){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");+return this.editor.loadUrl(c,f,l,t,z,C,F,N)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");+return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");+return this.editor.convertImages(c,f,l,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,l,t)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");+return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,l,t,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,l,t,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var l=localStorage.key(f),t=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<t.length){var z=+"<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12);t="<mxlibrary>"===t.substring(0,11);(z||t)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();+var CommentsWindow=function(b,e,g,m,u,p){function B(){for(var ba=F.getElementsByTagName("div"),ha=0,ma=0;ma<ba.length;ma++)"none"!=ba[ma].style.display&&ba[ma].parentNode==F&&ha++;N.style.display=0==ha?"block":"none"}function H(ba,ha,ma,Y){function la(){ha.removeChild(A);ha.removeChild(J);k.style.display="block";Z.style.display="block"}t={div:ha,comment:ba,saveCallback:ma,deleteOnCancel:Y};var Z=ha.querySelector(".geCommentTxt"),k=ha.querySelector(".geCommentActionsList"),A=document.createElement("textarea");+A.className="geCommentEditTxtArea";A.style.minHeight=Z.offsetHeight+"px";A.value=ba.content;ha.insertBefore(A,Z);var J=document.createElement("div");J.className="geCommentEditBtns";var U=mxUtils.button(mxResources.get("cancel"),function(){Y?(ha.parentNode.removeChild(ha),B()):la();t=null});U.className="geCommentEditBtn";J.appendChild(U);var P=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";ba.content=A.value;mxUtils.write(Z,ba.content);la();ma(ba);t=null});mxEvent.addListener(A,"keydown",+mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(P.click(),mxEvent.consume(T)):27==T.keyCode&&(U.click(),mxEvent.consume(T)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";J.appendChild(P);ha.insertBefore(J,Z);k.style.display="none";Z.style.display="none";A.focus()}function S(ba,ha){ha.innerText="";ba=new Date(ba.modifiedDate);var ma=b.timeSince(ba);null==ma&&(ma=mxResources.get("lessThanAMinute"));+mxUtils.write(ha,mxResources.get("timeAgo",[ma],"{1} ago"));ha.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function G(ba){var ha=document.createElement("img");ha.className="geCommentBusyImg";ha.src=IMAGE_PATH+"/spin.gif";ba.appendChild(ha);ba.busyImg=ha}function O(ba){ba.style.border="1px solid red";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function R(ba){ba.style.border="";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function c(ba,ha,ma,Y,la){function Z(aa,+ja,pa){var sa=document.createElement("li");sa.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,aa);sa.appendChild(qa);mxEvent.addListener(qa,"click",function(wa){ja(wa,ba);wa.preventDefault();mxEvent.consume(wa)});W.appendChild(sa);pa&&(sa.style.display="none")}function k(){function aa(sa){ja.push(pa);if(null!=sa.replies)for(var qa=0;qa<sa.replies.length;qa++)pa=pa.nextSibling,aa(sa.replies[qa])}var ja=[],pa=J;aa(ba);return{pdiv:pa,+replies:ja}}function A(aa,ja,pa,sa,qa){function wa(){G(ra);ba.addReply(Ea,function(ya){Ea.id=ya;ba.replies.push(Ea);R(ra);pa&&pa()},function(ya){Ba();O(ra);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},sa,qa)}function Ba(){H(Ea,ra,function(ya){wa()},!0)}var za=k().pdiv,Ea=b.newComment(aa,b.getCurrentUser());Ea.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var ra=c(Ea,ba.replies,za,Y+1);ja?Ba():wa()}if(la||!ba.isResolved){N.style.display="none";var J=+document.createElement("div");J.className="geCommentContainer";J.setAttribute("data-commentId",ba.id);J.style.marginLeft=20*Y+5+"px";ba.isResolved&&(z.style.opacity="0.7");var U=document.createElement("div");U.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=ba.user&&null!=ba.user.pictureUrl?ba.user.pictureUrl:Editor.userImage;U.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";U.appendChild(P);var T=document.createElement("div");+T.className="geCommentUsername";mxUtils.write(T,null!=ba.user?ba.user.displayName:mxResources.get("unknownUser"));P.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",ba.id);S(ba,T);P.appendChild(T);J.appendChild(U);U=document.createElement("div");U.className="geCommentTxt";mxUtils.write(U,ba.content||"");J.appendChild(U);ba.isLocked&&(J.style.opacity="0.5");U=document.createElement("div");U.className="geCommentActions";var W=document.createElement("ul");+W.className="geCommentActionsList";U.appendChild(W);f||ba.isLocked||0!=Y&&!l||Z(mxResources.get("reply"),function(){A("",!0)},ba.isResolved);P=b.getCurrentUser();null==P||null==ba.user||P.id!=ba.user.id||f||ba.isLocked||(Z(mxResources.get("edit"),function(){function aa(){H(ba,J,function(){G(J);ba.editComment(ba.content,function(){R(J)},function(ja){O(J);aa();b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},ba.isResolved),Z(mxResources.get("delete"),+function(){b.confirm(mxResources.get("areYouSure"),function(){G(J);ba.deleteComment(function(aa){if(!0===aa){aa=J.querySelector(".geCommentTxt");aa.innerText="";mxUtils.write(aa,mxResources.get("msgDeleted"));var ja=J.querySelectorAll(".geCommentAction");for(aa=0;aa<ja.length;aa++)ja[aa].parentNode.removeChild(ja[aa]);R(J);J.style.opacity="0.5"}else{ja=k(ba).replies;for(aa=0;aa<ja.length;aa++)F.removeChild(ja[aa]);for(aa=0;aa<ha.length;aa++)if(ha[aa]==ba){ha.splice(aa,1);break}N.style.display=0==+F.getElementsByTagName("div").length?"block":"none"}},function(aa){O(J);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},ba.isResolved));f||ba.isLocked||0!=Y||Z(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function ja(){var pa=aa.target;pa.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(pa,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var sa=ba.isResolved?"none":"",qa=k(ba).replies,wa=+"light-dark("+(ba.isResolved?"ghostWhite":"white")+", transparent)",Ba=0;Ba<qa.length;Ba++){qa[Ba].style.backgroundColor=wa;for(var za=qa[Ba].querySelectorAll(".geCommentAction"),Ea=0;Ea<za.length;Ea++)za[Ea]!=pa.parentNode&&(za[Ea].style.display=sa);da||(qa[Ba].style.display="none")}B()}ba.isResolved?A(mxResources.get("reOpened")+": ",!0,ja,!1,!0):A(mxResources.get("markedAsResolved"),!1,ja,!0)});J.appendChild(U);null!=ma?F.insertBefore(J,ma.nextSibling):F.appendChild(J);for(ma=0;null!=ba.replies&&+ma<ba.replies.length;ma++)U=ba.replies[ma],U.isResolved=ba.isResolved,c(U,ba.replies,null,Y+1,la);null!=t&&(t.comment.id==ba.id?(la=ba.content,ba.content=t.comment.content,H(ba,J,t.saveCallback,t.deleteOnCancel),ba.content=la):null==t.comment.id&&t.comment.pCommentId==ba.id&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return J}}var f=!b.canComment(),l=b.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="light-dark(whiteSmoke, "++Editor.darkColor+")";var C=EditorUi.compactUi?"26px":"30px",F=document.createElement("div");F.className="geCommentsList";F.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";F.style.bottom=parseInt(C)+7+"px";z.appendChild(F);var N=document.createElement("span");N.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(N,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=+C;K.style.padding="3px 4px 4px 4px";C=document.createElement("a");C.className="geToolbarButton geAdaptiveAsset geToggleItem";C.style.width="16px";C.style.height="18px";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="20px";C.style.margin="0 2px";C.style.display="inline-block";C.style.cursor="pointer";if(!f){var I=C.cloneNode();I.style.backgroundImage="url("+Editor.plusImage+")";I.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(I,+"click",function(ba){function ha(){H(ma,Y,function(la){G(Y);b.addComment(la,function(Z){la.id=Z;ea.push(la);R(Y)},function(Z){O(Y);ha();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ma=b.newComment("",b.getCurrentUser()),Y=c(ma,ea,null,0);ha();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(I)}var ca=C.cloneNode();ca.classList.add("geToggleItem");ca.style.backgroundImage="url("+Editor.checkImage+")";ca.setAttribute("title",mxResources.get("showResolved"));+var da=!1;mxEvent.addListener(ca,"click",function(ba){(da=!da)?ca.classList.add("geActiveItem"):ca.classList.remove("geActiveItem");X();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(ca);b.commentsRefreshNeeded()&&(I=C.cloneNode(),I.style.backgroundImage="url("+Editor.refreshImage+")",I.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(I,"click",function(ba){X();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(I));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML=+'<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geButton geAdaptiveAsset",mxEvent.addListener(C,"click",function(ba){p();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(C));z.appendChild(K);var ea=[],X=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var ba=t.div.querySelector(".geCommentEditTxtArea"),ha=t.div.querySelector(".geCommentEditBtns");t.comment.content=ba.value;+ba.parentNode.removeChild(ba);ha.parentNode.removeChild(ha)}catch(ma){b.handleError(ma)}F.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ma){function Y(la){if(null!=la){la.sort(function(k,A){return new Date(k.modifiedDate)-new Date(A.modifiedDate)});for(var Z=0;Z<la.length;Z++)Y(la[Z].replies)}}ma.sort(function(la,+Z){return new Date(la.modifiedDate)-new Date(Z.modifiedDate)});F.innerText="";F.appendChild(N);N.style.display="block";ea=ma;for(ma=0;ma<ea.length;ma++)Y(ea[ma].replies),c(ea[ma],ea,null,0,da);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(ma){F.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ma&&ma.message?": "+ma.message:""));this.hasError=!0})):F.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});+X();this.refreshComments=X;K=mxUtils.bind(this,function(){function ba(Z){var k=ma[Z.id];if(null!=k)for(S(Z,k),k=0;null!=Z.replies&&k<Z.replies.length;k++)ba(Z.replies[k])}if(this.window.isVisible()){for(var ha=F.querySelectorAll(".geCommentDate"),ma={},Y=0;Y<ha.length;Y++){var la=ha[Y];ma[la.getAttribute("data-commentId")]=la}for(Y=0;Y<ea.length;Y++)ba(ea[Y])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),z,e,g,m,u,!0,!0);this.window.minimumSize=+new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,u,p,B,H,S,G,O){var R=document.createElement("div");R.style.textAlign="center";O=null!=O?O:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=+O+"px";c.style.lineHeight="1.2em";mxUtils.write(c,e);R.appendChild(c);null!=G&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),c.appendChild(e),R.appendChild(c));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(f.checked)});p.className="geBtn";+null!=H&&(p.innerHTML=H+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&G.appendChild(p);var l=mxUtils.button(u||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(f.checked)});G.appendChild(l);null!=B?(l.innerHTML=B+"<br>"+l.innerHTML+"<br>",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||+G.appendChild(p);R.appendChild(G);S?(G.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(f),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),c.appendChild(u),R.appendChild(c),mxEvent.addListener(u,"click",function(t){f.checked=!f.checked;mxEvent.consume(t)})):G.style.marginTop="12px";this.init=function(){l.focus()};this.container=R},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),+document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,e,g){this.ui=b;this.page=e;this.previous=this.name=g}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,e,g){this.ui=b;this.oldIndex=e;this.newIndex=g}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(b,e,g){this.ui=b;this.previousPage=this.page=e;null!=e&&(this.ui.updatePageRoot(e),null!=g&&(e.viewState=g))}SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var e=this.ui.editor,g=e.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(e.getGraphXml(!0)));b.viewState=g.getViewState();b.root=g.model.root;null!=b.model&&b.model.rootChanged(b.root);g.view.clear(b.root,!0);g.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;-g.model.prefix=Editor.guid()+"-";g.model.rootChanged(b.root);g.setViewState(b.viewState);g.gridEnabled=g.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,e,g,m,v){SelectPage.call(this,b,g);this.relatedPage=e;this.index=m;this.previousIndex=null;this.noSelect=v}mxUtils.extend(ChangePage,SelectPage);+g.model.prefix=Editor.guid()+"-";g.model.rootChanged(b.root);g.setViewState(b.viewState);g.gridEnabled=g.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,e,g,m,u){SelectPage.call(this,b,g);this.relatedPage=e;this.index=m;this.previousIndex=null;this.noSelect=u}mxUtils.extend(ChangePage,SelectPage);ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};function ReplaceDiagram(b,e){this.ui=b;this.data=e}ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,e=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var g=new mxCodec(this.data.ownerDocument),m=new mxGraphModel;g.decode(this.data,m);this.data=e;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=m.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,!0);b.model.rootChanged(m.root);b.fireEvent(new mxEventObject(mxEvent.ROOT))};EditorUi.prototype.tabContainerHeight=36;EditorUi.prototype.setTabContainerVisible=function(b){this.tabContainerHeight=b?EditorUi.prototype.tabContainerHeight:0;isLocalStorage&&(mxSettings.settings.pages=0<this.tabContainerHeight,mxSettings.save());this.editor.updateGraphComponents();this.refresh()};EditorUi.prototype.isTabContainerVisible=function(){return 0<this.tabContainerHeight};EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var g=0;g<this.pages.length;g++)if(this.pages[g]==b){e=g;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var g=0;g<e.length;g++)if(e[g].getId()==b)return e[g];return null};-EditorUi.prototype.createImageForPageLink=function(b,e,g,m){var v=b.indexOf(","),p=null;0<v&&(v=this.getPageById(b.substring(v+1)),null!=v&&v!=e&&(p=this.getImageForPage(v,e,g,m),p.originalSrc=b));null==p&&(p={originalSrc:b});return p};+EditorUi.prototype.createImageForPageLink=function(b,e,g,m){var u=b.indexOf(","),p=null;0<u&&(u=this.getPageById(b.substring(u+1)),null!=u&&u!=e&&(p=this.getImageForPage(u,e,g,m),p.originalSrc=b));null==p&&(p={originalSrc:b});return p};EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,e=this.currentPage;null!=e&&(b.tooltipHandler.hide(),null==e.viewState||null==e.viewState.scrollTop||null==e.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(e.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};-EditorUi.prototype.getImageForPage=function(b,e,g,m){g=null!=g?g:this.editor.graph;var v=g.getGlobalVariable;g=this.createTemporaryGraph(g.getStylesheet());var p=this.getPageIndex(null!=e?e:this.currentPage);g.getGlobalVariable=function(G){return"pagenumber"==G?p+1:"page"==G&&null!=e?e.getName():v.apply(this,arguments)};document.body.appendChild(g.container);this.updatePageRoot(b);g.setAdaptiveColors(b.viewState.adaptiveColors);g.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=-"";m=g.getSvg(null,null,null,null,null,null,null,null,null,null,m,null,null,null,!0,!0);var A=g.getGraphBounds();document.body.removeChild(g.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(m)),A.width,A.height,A.x,A.y)};-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var A=-this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";this.tabContainer.style.visibility=0==parseInt(this.tabContainer.style.height)?"hidden":"";A!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,-function(A,G){A=G.getProperty("edit").changes;for(G=0;G<A.length;G++)if(A[G]instanceof RenamePage||A[G]instanceof ChangePage||A[G]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==A.length&&A[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var g=b.sizeDidChange,m=null,v=this;b.sizeDidChange=function(){var A=g.apply(this,arguments);null!=v.currentPage&&m!=v.currentPage&&(m=v.currentPage,v.pageSelected());return A};b.addListener(mxEvent.ROOT,mxUtils.bind(this,-function(){b.checkDefaultParent()}));var p=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",p);this.editor.addListener("pagesPatched",p);this.editor.addListener("pageRenamed",p);this.editor.addListener("pageMoved",p);this.editor.addListener("fileLoaded",p);this.editor.addListener("pageSelected",mxUtils.bind(this,function(A,G){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle();null!=-this.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(A,G){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};+EditorUi.prototype.getImageForPage=function(b,e,g,m){g=null!=g?g:this.editor.graph;var u=g.getGlobalVariable;g=this.createTemporaryGraph(g.getStylesheet());var p=this.getPageIndex(null!=e?e:this.currentPage);g.getGlobalVariable=function(H){return"pagenumber"==H?p+1:"page"==H&&null!=e?e.getName():u.apply(this,arguments)};document.body.appendChild(g.container);this.updatePageRoot(b);g.setAdaptiveColors(b.viewState.adaptiveColors);g.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=+"";m=g.getSvg(null,null,null,null,null,null,null,null,null,null,m,null,null,null,!0,!0);var B=g.getGraphBounds();document.body.removeChild(g.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(m)),B.width,B.height,B.x,B.y)};+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var B=+this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";this.tabContainer.style.visibility=0==parseInt(this.tabContainer.style.height)?"hidden":"";B!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,+function(B,H){B=H.getProperty("edit").changes;for(H=0;H<B.length;H++)if(B[H]instanceof RenamePage||B[H]instanceof ChangePage||B[H]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==B.length&&B[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var g=b.sizeDidChange,m=null,u=this;b.sizeDidChange=function(){var B=g.apply(this,arguments);null!=u.currentPage&&m!=u.currentPage&&(m=u.currentPage,u.pageSelected());return B};b.addListener(mxEvent.ROOT,mxUtils.bind(this,+function(){b.checkDefaultParent()}));var p=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",p);this.editor.addListener("pagesPatched",p);this.editor.addListener("pageRenamed",p);this.editor.addListener("pageMoved",p);this.editor.addListener("fileLoaded",p);this.editor.addListener("pageSelected",mxUtils.bind(this,function(B,H){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle();null!=+this.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(B,H){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};EditorUi.prototype.scrollToPage=function(b,e){var g=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),m=null!=b?b:this.currentPage;null!=g&&null!=this.tabScroller&&this.tabScroller.children.length>g&&null!=this.tabScroller.children[g]&&(m!=this.lastScrollPage||e)&&(this.tabScroller.children[g].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[g].className="geTab gePageTab geActivePage",this.lastScrollPage=m)};EditorUi.prototype.restoreViewState=function(b,e,g){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(g))};-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),v=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),A=this.parseBackgroundImage(b.getAttribute("backgroundImage")),G=b.getAttribute("extFonts");if(G)try{G=G.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:A,pageScale:isNaN(g)?mxGraph.prototype.pageScale:g,pageFormat:isNaN(m)||isNaN(v)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:-mxSettings.getPageFormat():new mxRectangle(0,0,m,v),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:G||[]}};+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),u=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),B=this.parseBackgroundImage(b.getAttribute("backgroundImage")),H=b.getAttribute("extFonts");if(H)try{H=H.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:B,pageScale:isNaN(g)?mxGraph.prototype.pageScale:g,pageFormat:isNaN(m)||isNaN(u)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:+mxSettings.getPageFormat():new mxRectangle(0,0,m,u),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:H||[]}};Graph.prototype.saveViewState=function(b,e,g,m){g||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);g=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=g&&(e.setAttribute("pageWidth",g.width),e.setAttribute("pageHeight",g.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),m=this.getBackgroundImageObject(b.backgroundImage,m),null!=m&&e.setAttribute("backgroundImage",-JSON.stringify(m)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?e.removeAttribute("adaptiveColors"):e.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(v){return v.name+"^"+v.url}).join("|"))};+JSON.stringify(m)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?e.removeAttribute("adaptiveColors"):e.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(u){return u.name+"^"+u.url}).join("|"))};Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,adaptiveColors:this.adaptiveColors,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};Graph.prototype.setViewState=function(b,e){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.adaptiveColors=b.adaptiveColors;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;@@ -4068,26 +4067,26 @@ this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParthis.extFonts[e].url,!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat="undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.adaptiveColors=null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,e,g){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=e*this.view.scale+b.scrollLeft,this.container.scrollTop=g*this.view.scale+b.scrollTop)};-Graph.prototype.addExtFont=function(b,e,g){if(b&&e){var m="extFont_"+b;if(null==document.getElementById(m))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,m);else{document.getElementsByTagName("head");var v=document.createElement("style");v.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));v.setAttribute("id",m);document.getElementsByTagName("head")[0].appendChild(v)}if(!g){null==this.extFonts&&(this.extFonts=[]);g=this.extFonts;-m=!0;for(v=0;v<g.length;v++)if(g[v].name==b){m=!1;break}m&&this.extFonts.push({name:b,url:e})}}};+Graph.prototype.addExtFont=function(b,e,g){if(b&&e){var m="extFont_"+b;if(null==document.getElementById(m))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,m);else{document.getElementsByTagName("head");var u=document.createElement("style");u.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));u.setAttribute("id",m);document.getElementsByTagName("head")[0].appendChild(u)}if(!g){null==this.extFonts&&(this.extFonts=[]);g=this.extFonts;+m=!0;for(u=0;u<g.length;u++)if(g[u].name==b){m=!1;break}m&&this.extFonts.push({name:b,url:e})}}};EditorUi.prototype.updatePageRoot=function(b,e){if(null==b.root){e=this.editor.extractGraphModel(b.node,null,e);var g=Editor.extractParserError(e);if(g)throw Error(g);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),g=new mxCodec(e.ownerDocument),b.root=g.decode(e).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);if(g=Editor.extractParserError(e))throw Error(g);null!=e&&(b.graphModelNode=e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)e=new mxCell,e.setId("1"),b.root.insert(e),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};-EditorUi.prototype.updateDiagramData=function(b,e){if(null==this.getPageIndex(b.page))this.insertPage(null,null,e);else{var g=new mxCodec(b.node.ownerDocument),m=new mxGraphModel;g.decode(b.node,m);g=new mxCodec(e.ownerDocument);var v=new mxGraphModel;g.decode(e,v);this.selectPage(b.page);e=this.diffCells(m.root,v.root);this.patchPage(b.page,e,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};-EditorUi.prototype.selectPage=function(b,e,g){try{if(b!=this.currentPage){var m=this.editor.graph;m.isEditing()&&m.stopEditing(!1);e=null!=e?e:!1;m.isMouseDown=!1;m.reset();var v=m.model.createUndoableEdit();v.ignoreEdit=!0;var p=new SelectPage(this,b,g);p.execute();v.add(p);v.notify();e||m.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",v))}}catch(A){this.handleError(A)}};+EditorUi.prototype.updateDiagramData=function(b,e){if(null==this.getPageIndex(b.page))this.insertPage(null,null,e);else{var g=new mxCodec(b.node.ownerDocument),m=new mxGraphModel;g.decode(b.node,m);g=new mxCodec(e.ownerDocument);var u=new mxGraphModel;g.decode(e,u);this.selectPage(b.page);e=this.diffCells(m.root,u.root);this.patchPage(b.page,e,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};+EditorUi.prototype.selectPage=function(b,e,g){try{if(b!=this.currentPage){var m=this.editor.graph;m.isEditing()&&m.stopEditing(!1);e=null!=e?e:!1;m.isMouseDown=!1;m.reset();var u=m.model.createUndoableEdit();u.ignoreEdit=!0;var p=new SelectPage(this,b,g);p.execute();u.add(p);u.notify();e||m.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",u))}}catch(B){this.handleError(B)}};EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),b?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(b,e,g){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),g),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};EditorUi.prototype.createPage=function(b,e,g){e=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e,g);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var g=this.pages[e].getName();null!=g&&0<g.length&&(b[g]=g)}e=this.pages.length;do g=mxResources.get("pageWithNumber",[++e]);while(null!=b[g]);return g};-EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,m=this.pages[g]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(v){this.handleError(v)}return b};-EditorUi.prototype.duplicatePage=function(b,e){var g=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var v=b.node.cloneNode(!1);v.removeAttribute("id");var p={},A=m.createCellLookup([m.model.root]);g=new DiagramPage(v);g.root=m.cloneCell(m.model.root,null,p);var G=new mxGraphModel;G.prefix=Editor.guid()+"-";G.setRoot(g.root);m.updateCustomLinks(m.createCellMapping(p,A),[g.root]);g.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(g);+EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,m=this.pages[g]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(u){this.handleError(u)}return b};+EditorUi.prototype.duplicatePage=function(b,e){var g=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var u=b.node.cloneNode(!1);u.removeAttribute("id");var p={},B=m.createCellLookup([m.model.root]);g=new DiagramPage(u);g.root=m.cloneCell(m.model.root,null,p);var H=new mxGraphModel;H.prefix=Editor.guid()+"-";H.setRoot(g.root);m.updateCustomLinks(m.createCellMapping(p,B),[g.root]);g.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(g);g.viewState.scale=1;delete g.viewState.scrollLeft;delete g.viewState.scrollTop;delete g.viewState.currentRoot;delete g.viewState.defaultParent;g.setName(e);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return g};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};-EditorUi.prototype.clonePages=function(b){for(var e=[],g=[],m=0;m<b.length;m++)try{g.push(this.clonePage(b[m]))}catch(v){e.push(mxResources.get("pageWithNumber",[m+1])+": "+v.toString())}if(0<e.length){b=Error(e.join("\n"));try{0<g.length&&(b.fallbackFileData=this.getXmlForPages(g))}catch(v){}throw b;}return g};+EditorUi.prototype.clonePages=function(b){for(var e=[],g=[],m=0;m<b.length;m++)try{g.push(this.clonePage(b[m]))}catch(u){e.push(mxResources.get("pageWithNumber",[m+1])+": "+u.toString())}if(0<e.length){b=Error(e.join("\n"));try{0<g.length&&(b.fallbackFileData=this.getXmlForPages(g))}catch(u){}throw b;}return g};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),g=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(g,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);e.diagramModified=b.diagramModified;return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(g){null!=g&&0<g.length&&this.editor.graph.model.execute(new RenamePage(this,b,g))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer geTabItem";return b};-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.className="geTabScroller";for(var g=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(v,p){p.className=this.pages[v]==this.currentPage?"geTab gePageTab geActivePage":"geTab gePageTab geInactivePage";p.setAttribute("draggable","true");mxEvent.addListener(p,"dragstart",mxUtils.bind(this,function(A){b.isEnabled()?(mxClient.IS_FF&&A.dataTransfer.setData("Text",-"<diagram/>"),g=v):mxEvent.consume(A)}));mxEvent.addListener(p,"dragend",mxUtils.bind(this,function(A){g=null;A.stopPropagation();A.preventDefault()}));mxEvent.addListener(p,"dragover",mxUtils.bind(this,function(A){null!=g&&(A.dataTransfer.dropEffect="move");A.stopPropagation();A.preventDefault()}));mxEvent.addListener(p,"drop",mxUtils.bind(this,function(A){null!=g&&v!=g&&this.movePage(g,v);A.stopPropagation();A.preventDefault()}));e.appendChild(p)})(m,this.createTabForPage(this.pages[m],m+1));m=+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.className="geTabScroller";for(var g=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(u,p){p.className=this.pages[u]==this.currentPage?"geTab gePageTab geActivePage":"geTab gePageTab geInactivePage";p.setAttribute("draggable","true");mxEvent.addListener(p,"dragstart",mxUtils.bind(this,function(B){b.isEnabled()?(mxClient.IS_FF&&B.dataTransfer.setData("Text",+"<diagram/>"),g=u):mxEvent.consume(B)}));mxEvent.addListener(p,"dragend",mxUtils.bind(this,function(B){g=null;B.stopPropagation();B.preventDefault()}));mxEvent.addListener(p,"dragover",mxUtils.bind(this,function(B){null!=g&&(B.dataTransfer.dropEffect="move");B.stopPropagation();B.preventDefault()}));mxEvent.addListener(p,"drop",mxUtils.bind(this,function(B){null!=g&&u!=g&&this.movePage(g,u);B.stopPropagation();B.preventDefault()}));e.appendChild(p)})(m,this.createTabForPage(this.pages[m],m+1));m=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(e);this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());this.leftScrollTab=this.createLeftScrollTab();this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);-this.tabScroller=e;this.tabScroller.scrollLeft=m;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(v){this.checkTabScrollerOverflow()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.leftScrollTab.style,"transition","all 0.2s linear");mxUtils.setPrefixedStyle(this.rightScrollTab.style,"transition","all 0.2s linear")}),0)}};+this.tabScroller=e;this.tabScroller.scrollLeft=m;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(u){this.checkTabScrollerOverflow()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.leftScrollTab.style,"transition","all 0.2s linear");mxUtils.setPrefixedStyle(this.rightScrollTab.style,"transition","all 0.2s linear")}),0)}};EditorUi.prototype.checkTabScrollerOverflow=function(){null!=this.tabScroller&&null!=this.tabContainer&&2<this.tabContainer.children.length&&(this.tabScroller.scrollWidth>this.tabScroller.offsetWidth?(this.leftScrollTab.style.display="",this.rightScrollTab.style.display="",0==this.tabScroller.scrollLeft?this.leftScrollTab.classList.add("geDisabledControlTab"):this.leftScrollTab.classList.remove("geDisabledControlTab"),Math.ceil(this.tabScroller.scrollLeft)+this.tabScroller.offsetWidth>=this.tabScroller.scrollWidth?this.rightScrollTab.classList.add("geDisabledControlTab"):this.rightScrollTab.classList.remove("geDisabledControlTab")):(this.leftScrollTab.style.display="none",this.rightScrollTab.style.display="none"))};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};EditorUi.prototype.createTab=function(){var b=document.createElement("div");b.className="geTab";return b};EditorUi.prototype.getShortPageName=function(b){var e=null;null!=b&&(e=b.getName(),null!=e&&36<e.length&&(e=e.substring(0,34)+"..."));return e};@@ -4095,120 +4094,120 @@ EditorUi.prototype.createControlTab=function(b,e,g){var m=this.createTab();m.claEditorUi.prototype.createPageInsertTab=function(){return this.createControlTab(mxResources.get("insertPage"),Editor.plusImage,mxUtils.bind(this,function(b){try{this.insertPage()}catch(e){this.handleError(e)}mxEvent.consume(b)}))};EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(null,Editor.thinArrowLeftImage,mxUtils.bind(this,function(b){var e=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:-e,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft-=e;mxEvent.consume(b)}))};EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.thinArrowRightImage,mxUtils.bind(this,function(b){var e=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:e,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=e;mxEvent.consume(b)}))};-EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.verticalDotsImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(mxUtils.bind(this,function(v,p){this.menus.get("pages").funct(v,p)}));e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);e.destroy()});var g=mxEvent.getClientX(b),-m=mxEvent.getClientY(b);e.popup(g,m,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var g=this.createTab(),m=b.getName()||mxResources.get("untitled"),v=b.getId();g.setAttribute("title",m+(null!=v?" ("+v+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,m);g.appendChild(e);this.addTabListeners(b,g);return g};-EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var m=document.createElement("div");m.className="geTabMenuButton";m.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";m.style.backgroundSize="10px";e.appendChild(m);var v=!1,p=!1,A=mxUtils.bind(this,-function(S){v=null!=this.currentMenu;p=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||p||this.selectPage(b)}),G=mxUtils.bind(this,function(S){if(g.isEnabled()&&!g.isMouseDown&&(p&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==m)||mxEvent.isPopupTrigger(S))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!v)){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,-function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var P=mxEvent.getClientX(S),R=mxEvent.getClientY(S);F.popup(P,R,null,S);this.setCurrentMenu(F,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(m,A,null,G);mxEvent.addGestureListeners(e,A,null,G)};+EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.verticalDotsImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(mxUtils.bind(this,function(u,p){this.menus.get("pages").funct(u,p)}));e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);e.destroy()});var g=mxEvent.getClientX(b),+m=mxEvent.getClientY(b);e.popup(g,m,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var g=this.createTab(),m=b.getName()||mxResources.get("untitled"),u=b.getId();g.setAttribute("title",m+(null!=u?" ("+u+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,m);g.appendChild(e);this.addTabListeners(b,g);return g};+EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var m=document.createElement("div");m.className="geTabMenuButton";m.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";m.style.backgroundSize="10px";e.appendChild(m);var u=!1,p=!1,B=mxUtils.bind(this,+function(S){u=null!=this.currentMenu;p=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||p||this.selectPage(b)}),H=mxUtils.bind(this,function(S){if(g.isEnabled()&&!g.isMouseDown&&(p&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==m)||mxEvent.isPopupTrigger(S))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!u)){var G=new mxPopupMenu(this.createPageMenu(b));G.div.className+=" geMenubarMenu";G.smartSeparators=!0;G.showDisabled=!0;G.autoExpand=!0;G.hideMenu=mxUtils.bind(this,+function(){mxPopupMenu.prototype.hideMenu.apply(G,arguments);this.resetCurrentMenu();G.destroy()});var O=mxEvent.getClientX(S),R=mxEvent.getClientY(S);G.popup(O,R,null,S);this.setCurrentMenu(G,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(m,B,null,H);mxEvent.addGestureListeners(e,B,null,H)};EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(g,m){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||g.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),m));g.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);g.addSeparator(m);this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",g,m,mxResources.get("move"));g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);g.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m)})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();-(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(e,g,m){m.setAttribute("relatedPage",g.relatedPage.getId());null==g.index&&(m.setAttribute("name",g.relatedPage.getName()),null!=g.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(g.relatedPage.viewState,function(v,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,v)?p:void 0})),null!=g.relatedPage.root&&e.encodeCell(g.relatedPage.root,m));return m};-b.beforeDecode=function(e,g,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(g.getAttribute("relatedPage"));if(null==m.relatedPage){var v=g.ownerDocument.createElement("diagram");v.setAttribute("id",g.getAttribute("relatedPage"));v.setAttribute("name",g.getAttribute("name"));m.relatedPage=new DiagramPage(v);v=g.getAttribute("viewState");null!=v&&(m.relatedPage.viewState=JSON.parse(v),g.removeAttribute("viewState"));g=g.cloneNode(!0);v=g.firstChild;if(null!=v)for(m.relatedPage.root=e.decodeCell(v,!1),m=-v.nextSibling,v.parentNode.removeChild(v),v=m;null!=v;){m=v.nextSibling;if(v.nodeType==mxConstants.NODETYPE_ELEMENT){var p=v.getAttribute("id");null==e.lookup(p)&&e.decodeCell(v)}v.parentNode.removeChild(v);v=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,v,p,A,G){v=null!=v?v:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var S=p.slice(),F=0;F<p.length;F++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[F]),"treeFolding","0")&&this.foldTreeCell(m,p[F]);p=S;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=function(m,v){this.model.beginUpdate();try{var p=-[];this.traverse(v,!0,mxUtils.bind(this,function(G,S){var F=null!=S&&this.isTreeEdge(S);F&&p.push(S);G==v||null!=S&&!F||p.push(G);return(null==S||F)&&(G==v||!this.model.isCollapsed(G))}));this.model.setCollapsed(v,m);for(var A=0;A<p.length;A++)this.model.setVisible(p[A],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,v,p,A,G,S){return this.model.filterCells(this.getEdges(m,v,p,A,G,S),mxUtils.bind(this,-function(F){return this.isTreeEdge(F)}))};Graph.prototype.getIncomingTreeEdges=function(m,v){return this.getTreeEdges(m,v,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,v){return this.getTreeEdges(m,v,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(Y){return k.isVertex(Y)&&p(Y)}function v(Y){var fa=!1;null!=Y&&(fa=-"1"==f.getCurrentCellStyle(Y).treeMoving);return fa}function p(Y){var fa=!1;null!=Y&&(Y=k.getParent(Y),fa=f.view.getState(Y),fa="tree"==(null!=fa?fa.style:f.getCellStyle(Y)).containerType);return fa}function A(Y){var fa=!1;null!=Y&&(Y=k.getParent(Y),fa=f.view.getState(Y),f.view.getState(Y),fa=null!=(null!=fa?fa.style:f.getCellStyle(Y)).childLayout);return fa}function G(Y){Y=f.view.getState(Y);if(null!=Y){var fa=f.getIncomingTreeEdges(Y.cell);if(0<fa.length&&(fa=f.view.getState(fa[0]),null!=fa&&(fa=-fa.absolutePoints,null!=fa&&0<fa.length&&(fa=fa[fa.length-1],null!=fa)))){if(fa.y==Y.y&&Math.abs(fa.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_SOUTH;if(fa.y==Y.y+Y.height&&Math.abs(fa.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_NORTH;if(fa.x>Y.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Y,fa){fa=null!=fa?fa:!0;f.model.beginUpdate();try{var Z=f.model.getParent(Y),l=f.getIncomingTreeEdges(Y),u=f.cloneCells([l[0],Y]);f.model.setTerminal(u[0],-f.model.getTerminal(l[0],!0),!0);var H=G(Y),U=Z.geometry;H==mxConstants.DIRECTION_SOUTH||H==mxConstants.DIRECTION_NORTH?u[1].geometry.x+=fa?Y.geometry.width+10:-u[1].geometry.width-10:u[1].geometry.y+=fa?Y.geometry.height+10:-u[1].geometry.height-10;f.view.currentRoot!=Z&&(u[1].geometry.x-=U.x,u[1].geometry.y-=U.y);var J=f.view.getState(Y),W=f.view.scale;if(null!=J){var aa=mxRectangle.fromRectangle(J);H==mxConstants.DIRECTION_SOUTH||H==mxConstants.DIRECTION_NORTH?aa.x+=(fa?Y.geometry.width+10:-u[1].geometry.width--10)*W:aa.y+=(fa?Y.geometry.height+10:-u[1].geometry.height-10)*W;var ba=f.getOutgoingTreeEdges(f.model.getTerminal(l[0],!0));if(null!=ba){for(var ja=H==mxConstants.DIRECTION_SOUTH||H==mxConstants.DIRECTION_NORTH,oa=U=l=0;oa<ba.length;oa++){var qa=f.model.getTerminal(ba[oa],!1);if(H==G(qa)){var ra=f.view.getState(qa);qa!=Y&&null!=ra&&(ja&&fa!=ra.getCenterX()<J.getCenterX()||!ja&&fa!=ra.getCenterY()<J.getCenterY())&&mxUtils.intersects(aa,ra)&&(l=10+Math.max(l,(Math.min(aa.x+aa.width,ra.x+ra.width)--Math.max(aa.x,ra.x))/W),U=10+Math.max(U,(Math.min(aa.y+aa.height,ra.y+ra.height)-Math.max(aa.y,ra.y))/W))}}ja?U=0:l=0;for(oa=0;oa<ba.length;oa++)if(qa=f.model.getTerminal(ba[oa],!1),H==G(qa)&&(ra=f.view.getState(qa),qa!=Y&&null!=ra&&(ja&&fa!=ra.getCenterX()<J.getCenterX()||!ja&&fa!=ra.getCenterY()<J.getCenterY()))){var ua=[];f.traverse(ra.cell,!0,function(za,Ba){var Ca=null!=Ba&&f.isTreeEdge(Ba);Ca&&ua.push(Ba);(null==Ba||Ca)&&ua.push(za);return null==Ba||Ca});f.moveCells(ua,(fa?1:-1)*l,(fa?1:-1)*-U)}}}return f.addCells(u,Z)}finally{f.model.endUpdate()}}function F(Y){f.model.beginUpdate();try{var fa=G(Y),Z=f.getIncomingTreeEdges(Y),l=f.cloneCells([Z[0],Y]);f.model.setTerminal(Z[0],l[1],!1);f.model.setTerminal(l[0],l[1],!0);f.model.setTerminal(l[0],Y,!1);var u=f.model.getParent(Y),H=u.geometry,U=[];f.view.currentRoot!=u&&(l[1].geometry.x-=H.x,l[1].geometry.y-=H.y);f.traverse(Y,!0,function(aa,ba){var ja=null!=ba&&f.isTreeEdge(ba);ja&&U.push(ba);(null==ba||ja)&&U.push(aa);return null==ba||ja});-var J=Y.geometry.width+40,W=Y.geometry.height+40;fa==mxConstants.DIRECTION_SOUTH?J=0:fa==mxConstants.DIRECTION_NORTH?(J=0,W=-W):fa==mxConstants.DIRECTION_WEST?(J=-J,W=0):fa==mxConstants.DIRECTION_EAST&&(W=0);f.moveCells(U,J,W);return f.addCells(l,u)}finally{f.model.endUpdate()}}function P(Y,fa){f.model.beginUpdate();try{var Z=f.model.getParent(Y),l=f.getIncomingTreeEdges(Y),u=G(Y);0==l.length&&(l=[f.createEdge(Z,null,"",null,null,f.createCurrentEdgeStyle())],u=fa);var H=f.cloneCells([l[0],Y]);f.model.setTerminal(H[0],-Y,!0);null==f.model.getTerminal(H[0],!1)&&(f.model.setTerminal(H[0],H[1],!1),f.applyNewEdgeStyle(H[1],[H[0]],u));l=f.getOutgoingTreeEdges(Y);var U=Z.geometry;fa=[];f.view.currentRoot==Z&&(U=new mxRectangle);for(var J=0;J<l.length;J++){var W=f.model.getTerminal(l[J],!1);null!=W&&fa.push(W)}var aa=f.view.getBounds(fa),ba=f.view.translate,ja=f.view.scale;u==mxConstants.DIRECTION_SOUTH?(H[1].geometry.x=null==aa?Y.geometry.x+(Y.geometry.width-H[1].geometry.width)/2:(aa.x+aa.width)/ja-ba.x-U.x+10,H[1].geometry.y+=-H[1].geometry.height-U.y+40):u==mxConstants.DIRECTION_NORTH?(H[1].geometry.x=null==aa?Y.geometry.x+(Y.geometry.width-H[1].geometry.width)/2:(aa.x+aa.width)/ja-ba.x+-U.x+10,H[1].geometry.y-=H[1].geometry.height+U.y+40):(H[1].geometry.x=u==mxConstants.DIRECTION_WEST?H[1].geometry.x-(H[1].geometry.width+U.x+40):H[1].geometry.x+(H[1].geometry.width-U.x+40),H[1].geometry.y=null==aa?Y.geometry.y+(Y.geometry.height-H[1].geometry.height)/2:(aa.y+aa.height)/ja-ba.y+-U.y+10);return f.addCells(H,Z)}finally{f.model.endUpdate()}}-function R(Y,fa,Z){Y=f.getOutgoingTreeEdges(Y);Z=f.view.getState(Z);var l=[];if(null!=Z&&null!=Y){for(var u=0;u<Y.length;u++){var H=f.view.getState(f.model.getTerminal(Y[u],!1));null!=H&&(!fa&&Math.min(H.x+H.width,Z.x+Z.width)>=Math.max(H.x,Z.x)||fa&&Math.min(H.y+H.height,Z.y+Z.height)>=Math.max(H.y,Z.y))&&l.push(H)}l.sort(function(U,J){return fa?U.x+U.width-J.x-J.width:U.y+U.height-J.y-J.height})}return l}function T(Y,fa){var Z=G(Y),l=fa==mxConstants.DIRECTION_EAST||fa==mxConstants.DIRECTION_WEST;-(Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST)==l&&Z!=fa?c.actions.get("selectParent").funct():Z==fa?(fa=f.getOutgoingTreeEdges(Y),null!=fa&&0<fa.length&&f.setSelectionCell(f.model.getTerminal(fa[0],!1))):(Z=f.getIncomingTreeEdges(Y),null!=Z&&0<Z.length&&(l=R(f.model.getTerminal(Z[0],!0),l,Y),Y=f.view.getState(Y),null!=Y&&(Y=mxUtils.indexOf(l,Y),0<=Y&&(Y+=fa==mxConstants.DIRECTION_NORTH||fa==mxConstants.DIRECTION_WEST?-1:1,0<=Y&&Y<=l.length-1&&f.setSelectionCell(l[Y].cell)))))}var c=-this,f=c.editor.graph,k=f.getModel(),B=c.menus.createPopupMenu;c.menus.createPopupMenu=function(Y,fa,Z){B.apply(this,arguments);if(1==f.getSelectionCount()){fa=f.getSelectionCell();var l=f.getOutgoingTreeEdges(fa);Y.addSeparator();0<l.length&&(m(f.getSelectionCell())&&this.addMenuItems(Y,["selectChildren"],null,Z),this.addMenuItems(Y,["selectDescendants"],null,Z));m(f.getSelectionCell())?(Y.addSeparator(),0<f.getIncomingTreeEdges(fa).length&&this.addMenuItems(Y,["selectSiblings","selectParent"],null,-Z)):0<f.model.getEdgeCount(fa)&&this.addMenuItems(Y,["selectConnections"],null,Z)}};c.actions.addAction("selectChildren",function(Y){if(f.isEnabled()&&1==f.getSelectionCount()){var fa=f.getSelectionCell();Y=mxEvent.isControlDown(Y)?null:f.getOutgoingTreeEdges(fa);if(null!=Y&&0<Y.length){fa=[];for(var Z=0;Z<Y.length;Z++)fa.push(f.model.getTerminal(Y[Z],!1));f.setSelectionCells(fa)}else f.setSelectionCells(f.model.getChildren(fa))}},null,null,"Alt+Shift+C");c.actions.addAction("selectDescendants",function(Y){var fa=-f.getSelectionCell();if(f.isEnabled()&&null!=fa){var Z=[];mxEvent.isControlDown(Y)||f.traverse(fa,!0,function(l,u){var H=null!=u&&f.isTreeEdge(u);H&&mxEvent.isControlDown(Y)&&Z.push(u);(null==u||H)&&Z.push(l);return null==u||H});if(0==Z.length||1==Z.length&&Z[0]==fa)Z=f.model.getDescendants(fa);f.setSelectionCells(Z)}},null,null,"Alt+Shift+X");c.actions.addAction("selectParent",function(Y){var fa=f.getSelectionCell();f.isEnabled()&&null!=fa&&(Y=mxEvent.isControlDown(Y)?null:f.getIncomingTreeEdges(fa),-null!=Y&&0<Y.length?f.setSelectionCell(f.model.getTerminal(Y[0],!0)):f.selectParentCell())},null,null,"Alt+Shift+P");c.actions.addAction("selectSiblings",function(Y){if(f.isEnabled()&&1==f.getSelectionCount()){var fa=f.getSelectionCell(),Z=mxEvent.isControlDown(Y)?null:f.getIncomingTreeEdges(fa);Y=[];if(null!=Z&&0<Z.length&&(Z=f.getOutgoingTreeEdges(f.model.getTerminal(Z[0],!0)),null!=Z))for(var l=0;l<Z.length;l++)Y.push(f.model.getTerminal(Z[l],!1));0==Y.length&&(Y=f.model.getChildren(f.model.getParent(fa)));-f.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var z=f.removeCells;f.removeCells=function(Y,fa){fa=null!=fa?fa:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));fa&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],l=0;l<Y.length;l++){var u=Y[l];k.isEdge(u)&&p(u)&&(Z.push(u),u=k.getTerminal(u,!1));if(m(u)){var H=[];f.traverse(u,!0,function(U,J){var W=null!=J&&f.isTreeEdge(J);W&&H.push(J);(null==J||W)&&H.push(U);return null==J||W});0<H.length&&(Z=Z.concat(H),u=f.getIncomingTreeEdges(Y[l]),-Y=Y.concat(u))}else null!=u&&Z.push(Y[l])}Y=Z;return z.apply(this,arguments)};c.hoverIcons.getStateAt=function(Y,fa,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(fa,Z))};var C=f.duplicateCells;f.duplicateCells=function(Y,fa){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),l=0;l<Z.length;l++){var u=f.view.getState(Z[l]);if(null!=u&&m(u.cell)){var H=f.getIncomingTreeEdges(u.cell);for(u=0;u<H.length;u++)mxUtils.remove(H[u],Y)}}this.model.beginUpdate();try{var U=C.call(this,-Y,fa);if(U.length==Y.length)for(l=0;l<Y.length;l++)if(m(Y[l])){var J=f.getIncomingTreeEdges(U[l]);H=f.getIncomingTreeEdges(Y[l]);if(0==J.length&&0<H.length){var W=this.cloneCell(H[0]);this.addEdge(W,f.getDefaultParent(),this.model.getTerminal(H[0],!0),U[l])}}}finally{this.model.endUpdate()}return U};var I=f.moveCells;f.moveCells=function(Y,fa,Z,l,u,H,U){for(var J=null,W=[],aa=0;aa<Y.length;aa++)(v(Y[aa])||m(Y[aa]))&&!A(Y[aa])&&this.isCellCollapsed(Y[aa])?W=W.concat(this.getSubtree(Y[aa])):W.push(Y[aa]);-Y=mxUtils.removeDuplicates(W);this.model.beginUpdate();try{W=u;var ba=this.getCurrentCellStyle(u);if(null!=Y&&m(u)&&"1"==mxUtils.getValue(ba,"treeFolding","0")){for(aa=0;aa<Y.length;aa++)if(m(Y[aa])||f.model.isEdge(Y[aa])&&null==f.model.getTerminal(Y[aa],!0)){u=f.model.getParent(Y[aa]);break}if(null!=W&&u!=W&&null!=this.view.getState(Y[0])){var ja=f.getIncomingTreeEdges(Y[0]);if(0<ja.length){var oa=f.view.getState(f.model.getTerminal(ja[0],!0));if(null!=oa){var qa=f.view.getState(W);null!=qa&&(fa=-(qa.getCenterX()-oa.getCenterX())/f.view.scale,Z=(qa.getCenterY()-oa.getCenterY())/f.view.scale)}}}}J=I.apply(this,arguments);if(null!=J&&null!=Y&&J.length==Y.length)for(aa=0;aa<J.length;aa++)if(this.model.isEdge(J[aa]))m(W)&&0>mxUtils.indexOf(J,this.model.getTerminal(J[aa],!0))&&this.model.setTerminal(J[aa],W,!0);else if(m(Y[aa])&&(ja=f.getIncomingTreeEdges(Y[aa]),0<ja.length))if(!l)m(W)&&0>mxUtils.indexOf(Y,this.model.getTerminal(ja[0],!0))&&this.model.setTerminal(ja[0],W,!0);else if(0==f.getIncomingTreeEdges(J[aa]).length){ba=-W;if(null==ba||ba==f.model.getParent(Y[aa]))ba=f.model.getTerminal(ja[0],!0);l=this.cloneCell(ja[0]);this.addEdge(l,f.getDefaultParent(),ba,J[aa])}}finally{this.model.endUpdate()}return J};if(null!=c.sidebar){var L=c.sidebar.dropAndConnect;c.sidebar.dropAndConnect=function(Y,fa,Z,l){var u=f.model,H=null;u.beginUpdate();try{if(H=L.apply(this,arguments),m(Y))for(var U=0;U<H.length;U++)if(u.isEdge(H[U])&&null==u.getTerminal(H[U],!0)){u.setTerminal(H[U],Y,!0);var J=f.getCellGeometry(H[U]);J.points=null;-null!=J.getTerminalPoint(!0)&&J.setTerminalPoint(null,!0)}}finally{u.endUpdate()}return H}}var K={67:c.actions.get("selectChildren"),88:c.actions.get("selectDescendants"),80:c.actions.get("selectParent"),83:c.actions.get("selectSiblings")},O={67:c.actions.get("copyStyle"),86:c.actions.get("pasteStyle")},da=c.onKeyDown;c.onKeyDown=function(Y){try{var fa=f.getSelectionCell();if(f.isEnabled()&&!f.isEditing()&&null!=fa){var Z=mxEvent.isAltDown(Y)&&mxEvent.isShiftDown(Y)?K[Y.keyCode]:mxEvent.isAltDown(Y)?-O[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(fa)&&(Z=null,0<f.getIncomingTreeEdges(fa).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?F(fa):P(fa):13==Y.which&&(Z=S(fa,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&f.model.isEdge(Z[0])?f.setSelectionCell(f.model.getTerminal(Z[0],!1)):f.setSelectionCell(Z[Z.length-1]),null!=c.hoverIcons&&c.hoverIcons.update(f.view.getState(fa)),f.startEditingAtCell(fa),mxEvent.consume(Y)):37==Y.keyCode?(T(fa,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):-38==Y.keyCode?(T(fa,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(T(fa,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(T(fa,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(l){c.handleError(l)}mxEvent.isConsumed(Y)||da.apply(this,arguments)};var ea=f.connectVertex;f.connectVertex=function(Y,fa,Z,l,u,H,U){var J=f.getIncomingTreeEdges(Y);if(m(Y)){var W=G(Y),aa=W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST,ba=fa==mxConstants.DIRECTION_EAST||fa==-mxConstants.DIRECTION_WEST;return W==fa||0==J.length?P(Y,fa):aa==ba?F(Y):S(Y,fa!=mxConstants.DIRECTION_NORTH&&fa!=mxConstants.DIRECTION_WEST)}return ea.apply(this,arguments)};f.getSubtree=function(Y){var fa=[Y];!v(Y)&&!m(Y)||A(Y)||f.traverse(Y,!0,function(Z,l){var u=null!=l&&f.isTreeEdge(l);u&&0>mxUtils.indexOf(fa,l)&&fa.push(l);(null==l||u)&&0>mxUtils.indexOf(fa,Z)&&fa.push(Z);return null==l||u});return fa};var ca=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){ca.apply(this,-arguments);(v(this.state.cell)||m(this.state.cell))&&!A(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),-this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Y){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Y),mxEvent.getClientY(Y),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Y);this.graph.isMouseDown=!0;c.hoverIcons.reset();mxEvent.consume(Y)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var V=mxVertexHandler.prototype.redrawHandles;-mxVertexHandler.prototype.redrawHandles=function(){V.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ma=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Y){ma.apply(this,arguments);null!=-this.moveHandle&&(this.moveHandle.style.display=Y?"":"none")};var la=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(Y,fa){la.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),v=this.graph,p=this;return m.concat([this.addEntry("tree container",-function(){var A=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");A.vertex=!0;var G=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');-S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);S.insertEdge(F,!1);A.insert(F);A.insert(G);A.insert(S);return p.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var A=new mxCell("Mindmap",new mxGeometry(0,-0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");A.vertex=!0;var G=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');G.vertex=!0;var S=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);S.insertEdge(F,!1);var P=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-P.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),F.style);R.geometry.relative=!0;R.edge=!0;G.insertEdge(R,!0);P.insertEdge(R,!1);var T=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-T.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),F.style);c.geometry.relative=!0;c.edge=!0;G.insertEdge(c,!0);T.insertEdge(c,!1);var f=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-f.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),F.style);k.geometry.relative=!0;k.edge=!0;G.insertEdge(k,!0);f.insertEdge(k,!1);A.insert(F);A.insert(R);A.insert(c);A.insert(k);A.insert(G);A.insert(S);A.insert(P);A.insert(T);A.insert(f);return p.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var A=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');-A.vertex=!0;return p.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var A=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.setTerminalPoint(new mxPoint(-40,40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return p.createVertexTemplateFromCells([A,G],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var A=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),-'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");-G.geometry.setTerminalPoint(new mxPoint(-40,40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return p.createVertexTemplateFromCells([A,G],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree orgchart organization division",function(){var A=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');A.vertex=!0;var G=new mxCell("Organization",new mxGeometry(80,-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.setAttributeForCell(G,"treeRoot","1");G.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);S.insertEdge(F,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");R.geometry.relative=-!0;R.edge=!0;G.insertEdge(R,!0);P.insertEdge(R,!1);A.insert(F);A.insert(R);A.insert(G);A.insert(S);A.insert(P);return p.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree root",function(){var A=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.setAttributeForCell(A,"treeRoot","1");A.vertex=!0;return p.createVertexTemplateFromCells([A],-A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree division",function(){var A=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-G.geometry.setTerminalPoint(new mxPoint(0,0),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return p.createVertexTemplateFromCells([A,G],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree sub sections",function(){var A=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");-G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),G.style);F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;S.insertEdge(F,!1);return p.createVertexTemplateFromCells([G,F,A,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;-EditorUi.initMinimalTheme=function(){function b(T,c){if(EditorUi.windowed){var f=T.editor.graph;f.popupMenuHandler.hideMenu();null==T.formatWindow?(c=Math.max(10,T.diagramContainer.clientWidth-248),f=Math.min(566,f.container.clientHeight-10),T.formatWindow=new WrapperWindow(T,mxResources.get("format"),c,60,240,f,function(k){T.createFormat(k).init()}),T.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){T.formatWindow.window.fit()})),T.formatWindow.window.minimumSize=new mxRectangle(0,-0,240,80)):T.formatWindow.window.setVisible(null!=c?c:!T.formatWindow.window.isVisible())}else null==T.formatElt&&(T.formatElt=T.createSidebarContainer(),T.createFormat(T.formatElt).init(),T.formatElt.style.border="none",T.formatElt.style.width="240px",T.formatElt.style.borderLeftWidth="1px",T.formatElt.style.borderLeftStyle="solid",T.formatElt.style.right="0px"),f=T.diagramContainer.parentNode,null!=T.formatElt.parentNode?(T.formatElt.parentNode.removeChild(T.formatElt),f.style.right="0px"):(f.parentNode.appendChild(T.formatElt),-f.style.right=T.formatElt.style.width)}function e(T,c){function f(z,C){var I=T.menus.get(z);z=k.addMenu(C,mxUtils.bind(this,function(){I.funct.apply(this,arguments)}));z.setAttribute("title",C);z.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";z.className="geTitle";c.appendChild(z);return z}var k=new Menubar(T,c);if(Editor.enableCustomLibraries&&-("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=T.actions.get("newLibrary")){var B=document.createElement("div");B.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";B.className="geTitle";mxUtils.write(B,mxResources.get("newLibrary"));c.appendChild(B);mxEvent.addListener(B,"click",this.actions.get("newLibrary").funct);-B=B.cloneNode(!1);B.style.left="50%";B.style.borderLeftStyle="solid";mxUtils.write(B,mxResources.get("openLibrary"));c.appendChild(B);mxEvent.addListener(B,"click",this.actions.get("openLibrary").funct)}else B=f("newLibrary",mxResources.get("newLibrary")),B.style.display="block",B.style.fontSize="11px",B.style.left="0",B=f("openLibraryFrom",mxResources.get("openLibraryFrom")),B.style.borderLeftStyle="solid",B.style.display="block",B.style.fontSize="11px",B.style.left="50%";c.appendChild(T.sidebar.container);-c.style.overflow="hidden"}function g(T,c){if(EditorUi.windowed){var f=T.editor.graph;f.popupMenuHandler.hideMenu();null==T.sidebarWindow?(c=Math.min(f.container.clientWidth-10,218),f=Math.min(f.container.clientHeight-40,650),T.sidebarWindow=new WrapperWindow(T,mxResources.get("shapes"),10,56,c-6,f-6,function(k){e(T,k)}),T.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){T.sidebarWindow.window.fit()})),T.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),T.sidebarWindow.window.setVisible(!0),-isLocalStorage&&T.getLocalData("sidebar",function(k){T.sidebar.showEntries(k,null,!0)}),T.restoreLibraries()):T.sidebarWindow.window.setVisible(null!=c?c:!T.sidebarWindow.window.isVisible())}else null==T.sidebarElt&&(T.sidebarElt=T.createSidebarContainer(),e(T,T.sidebarElt),T.sidebarElt.style.border="none",T.sidebarElt.style.width="210px",T.sidebarElt.style.borderRight="1px solid gray"),f=T.diagramContainer.parentNode,null!=T.sidebarElt.parentNode?(T.sidebarElt.parentNode.removeChild(T.sidebarElt),-f.style.left="0px"):(f.parentNode.appendChild(T.sidebarElt),f.style.left=T.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(T){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');+(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(e,g,m){m.setAttribute("relatedPage",g.relatedPage.getId());null==g.index&&(m.setAttribute("name",g.relatedPage.getName()),null!=g.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(g.relatedPage.viewState,function(u,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,u)?p:void 0})),null!=g.relatedPage.root&&e.encodeCell(g.relatedPage.root,m));return m};+b.beforeDecode=function(e,g,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(g.getAttribute("relatedPage"));if(null==m.relatedPage){var u=g.ownerDocument.createElement("diagram");u.setAttribute("id",g.getAttribute("relatedPage"));u.setAttribute("name",g.getAttribute("name"));m.relatedPage=new DiagramPage(u);u=g.getAttribute("viewState");null!=u&&(m.relatedPage.viewState=JSON.parse(u),g.removeAttribute("viewState"));g=g.cloneNode(!0);u=g.firstChild;if(null!=u)for(m.relatedPage.root=e.decodeCell(u,!1),m=+u.nextSibling,u.parentNode.removeChild(u),u=m;null!=u;){m=u.nextSibling;if(u.nodeType==mxConstants.NODETYPE_ELEMENT){var p=u.getAttribute("id");null==e.lookup(p)&&e.decodeCell(u)}u.parentNode.removeChild(u);u=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,u,p,B,H){u=null!=u?u:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var S=p.slice(),G=0;G<p.length;G++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[G]),"treeFolding","0")&&this.foldTreeCell(m,p[G]);p=S;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=function(m,u){this.model.beginUpdate();try{var p=+[];this.traverse(u,!0,mxUtils.bind(this,function(H,S){var G=null!=S&&this.isTreeEdge(S);G&&p.push(S);H==u||null!=S&&!G||p.push(H);return(null==S||G)&&(H==u||!this.model.isCollapsed(H))}));this.model.setCollapsed(u,m);for(var B=0;B<p.length;B++)this.model.setVisible(p[B],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,u,p,B,H,S){return this.model.filterCells(this.getEdges(m,u,p,B,H,S),mxUtils.bind(this,+function(G){return this.isTreeEdge(G)}))};Graph.prototype.getIncomingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(Y){return t.isVertex(Y)&&p(Y)}function u(Y){var la=!1;null!=Y&&(la=+"1"==l.getCurrentCellStyle(Y).treeMoving);return la}function p(Y){var la=!1;null!=Y&&(Y=t.getParent(Y),la=l.view.getState(Y),la="tree"==(null!=la?la.style:l.getCellStyle(Y)).containerType);return la}function B(Y){var la=!1;null!=Y&&(Y=t.getParent(Y),la=l.view.getState(Y),l.view.getState(Y),la=null!=(null!=la?la.style:l.getCellStyle(Y)).childLayout);return la}function H(Y){Y=l.view.getState(Y);if(null!=Y){var la=l.getIncomingTreeEdges(Y.cell);if(0<la.length&&(la=l.view.getState(la[0]),null!=la&&(la=+la.absolutePoints,null!=la&&0<la.length&&(la=la[la.length-1],null!=la)))){if(la.y==Y.y&&Math.abs(la.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_SOUTH;if(la.y==Y.y+Y.height&&Math.abs(la.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_NORTH;if(la.x>Y.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Y,la){la=null!=la?la:!0;l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=l.cloneCells([k[0],Y]);l.model.setTerminal(A[0],+l.model.getTerminal(k[0],!0),!0);var J=H(Y),U=Z.geometry;J==mxConstants.DIRECTION_SOUTH||J==mxConstants.DIRECTION_NORTH?A[1].geometry.x+=la?Y.geometry.width+10:-A[1].geometry.width-10:A[1].geometry.y+=la?Y.geometry.height+10:-A[1].geometry.height-10;l.view.currentRoot!=Z&&(A[1].geometry.x-=U.x,A[1].geometry.y-=U.y);var P=l.view.getState(Y),T=l.view.scale;if(null!=P){var W=mxRectangle.fromRectangle(P);J==mxConstants.DIRECTION_SOUTH||J==mxConstants.DIRECTION_NORTH?W.x+=(la?Y.geometry.width+10:-A[1].geometry.width-+10)*T:W.y+=(la?Y.geometry.height+10:-A[1].geometry.height-10)*T;var aa=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=aa){for(var ja=J==mxConstants.DIRECTION_SOUTH||J==mxConstants.DIRECTION_NORTH,pa=U=k=0;pa<aa.length;pa++){var sa=l.model.getTerminal(aa[pa],!1);if(J==H(sa)){var qa=l.view.getState(sa);sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY())&&mxUtils.intersects(W,qa)&&(k=10+Math.max(k,(Math.min(W.x+W.width,qa.x+qa.width)-Math.max(W.x,+qa.x))/T),U=10+Math.max(U,(Math.min(W.y+W.height,qa.y+qa.height)-Math.max(W.y,qa.y))/T))}}ja?U=0:k=0;for(pa=0;pa<aa.length;pa++)if(sa=l.model.getTerminal(aa[pa],!1),J==H(sa)&&(qa=l.view.getState(sa),sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY()))){var wa=[];l.traverse(qa.cell,!0,function(Ba,za){var Ea=null!=za&&l.isTreeEdge(za);Ea&&wa.push(za);(null==za||Ea)&&wa.push(Ba);return null==za||Ea});l.moveCells(wa,(la?1:-1)*k,(la?1:-1)*U)}}}return l.addCells(A,+Z)}finally{l.model.endUpdate()}}function G(Y){l.model.beginUpdate();try{var la=H(Y),Z=l.getIncomingTreeEdges(Y),k=l.cloneCells([Z[0],Y]);l.model.setTerminal(Z[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],Y,!1);var A=l.model.getParent(Y),J=A.geometry,U=[];l.view.currentRoot!=A&&(k[1].geometry.x-=J.x,k[1].geometry.y-=J.y);l.traverse(Y,!0,function(W,aa){var ja=null!=aa&&l.isTreeEdge(aa);ja&&U.push(aa);(null==aa||ja)&&U.push(W);return null==aa||ja});var P=Y.geometry.width+40,+T=Y.geometry.height+40;la==mxConstants.DIRECTION_SOUTH?P=0:la==mxConstants.DIRECTION_NORTH?(P=0,T=-T):la==mxConstants.DIRECTION_WEST?(P=-P,T=0):la==mxConstants.DIRECTION_EAST&&(T=0);l.moveCells(U,P,T);return l.addCells(k,A)}finally{l.model.endUpdate()}}function O(Y,la){l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=H(Y);0==k.length&&(k=[l.createEdge(Z,null,"",null,null,l.createCurrentEdgeStyle())],A=la);var J=l.cloneCells([k[0],Y]);l.model.setTerminal(J[0],Y,!0);+null==l.model.getTerminal(J[0],!1)&&(l.model.setTerminal(J[0],J[1],!1),l.applyNewEdgeStyle(J[1],[J[0]],A));k=l.getOutgoingTreeEdges(Y);var U=Z.geometry;la=[];l.view.currentRoot==Z&&(U=new mxRectangle);for(var P=0;P<k.length;P++){var T=l.model.getTerminal(k[P],!1);null!=T&&la.push(T)}var W=l.view.getBounds(la),aa=l.view.translate,ja=l.view.scale;A==mxConstants.DIRECTION_SOUTH?(J[1].geometry.x=null==W?Y.geometry.x+(Y.geometry.width-J[1].geometry.width)/2:(W.x+W.width)/ja-aa.x-U.x+10,J[1].geometry.y+=+J[1].geometry.height-U.y+40):A==mxConstants.DIRECTION_NORTH?(J[1].geometry.x=null==W?Y.geometry.x+(Y.geometry.width-J[1].geometry.width)/2:(W.x+W.width)/ja-aa.x+-U.x+10,J[1].geometry.y-=J[1].geometry.height+U.y+40):(J[1].geometry.x=A==mxConstants.DIRECTION_WEST?J[1].geometry.x-(J[1].geometry.width+U.x+40):J[1].geometry.x+(J[1].geometry.width-U.x+40),J[1].geometry.y=null==W?Y.geometry.y+(Y.geometry.height-J[1].geometry.height)/2:(W.y+W.height)/ja-aa.y+-U.y+10);return l.addCells(J,Z)}finally{l.model.endUpdate()}}+function R(Y,la,Z){Y=l.getOutgoingTreeEdges(Y);Z=l.view.getState(Z);var k=[];if(null!=Z&&null!=Y){for(var A=0;A<Y.length;A++){var J=l.view.getState(l.model.getTerminal(Y[A],!1));null!=J&&(!la&&Math.min(J.x+J.width,Z.x+Z.width)>=Math.max(J.x,Z.x)||la&&Math.min(J.y+J.height,Z.y+Z.height)>=Math.max(J.y,Z.y))&&k.push(J)}k.sort(function(U,P){return la?U.x+U.width-P.x-P.width:U.y+U.height-P.y-P.height})}return k}function c(Y,la){var Z=H(Y),k=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;+(Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST)==k&&Z!=la?f.actions.get("selectParent").funct():Z==la?(la=l.getOutgoingTreeEdges(Y),null!=la&&0<la.length&&l.setSelectionCell(l.model.getTerminal(la[0],!1))):(Z=l.getIncomingTreeEdges(Y),null!=Z&&0<Z.length&&(k=R(l.model.getTerminal(Z[0],!0),k,Y),Y=l.view.getState(Y),null!=Y&&(Y=mxUtils.indexOf(k,Y),0<=Y&&(Y+=la==mxConstants.DIRECTION_NORTH||la==mxConstants.DIRECTION_WEST?-1:1,0<=Y&&Y<=k.length-1&&l.setSelectionCell(k[Y].cell)))))}var f=+this,l=f.editor.graph,t=l.getModel(),z=f.menus.createPopupMenu;f.menus.createPopupMenu=function(Y,la,Z){z.apply(this,arguments);if(1==l.getSelectionCount()){la=l.getSelectionCell();var k=l.getOutgoingTreeEdges(la);Y.addSeparator();0<k.length&&(m(l.getSelectionCell())&&this.addMenuItems(Y,["selectChildren"],null,Z),this.addMenuItems(Y,["selectDescendants"],null,Z));m(l.getSelectionCell())?(Y.addSeparator(),0<l.getIncomingTreeEdges(la).length&&this.addMenuItems(Y,["selectSiblings","selectParent"],null,+Z)):0<l.model.getEdgeCount(la)&&this.addMenuItems(Y,["selectConnections"],null,Z)}};f.actions.addAction("selectChildren",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var la=l.getSelectionCell();Y=mxEvent.isControlDown(Y)?null:l.getOutgoingTreeEdges(la);if(null!=Y&&0<Y.length){la=[];for(var Z=0;Z<Y.length;Z++)la.push(l.model.getTerminal(Y[Z],!1));l.setSelectionCells(la)}else l.setSelectionCells(l.model.getChildren(la))}},null,null,"Alt+Shift+C");f.actions.addAction("selectDescendants",function(Y){var la=+l.getSelectionCell();if(l.isEnabled()&&null!=la){var Z=[];mxEvent.isControlDown(Y)||l.traverse(la,!0,function(k,A){var J=null!=A&&l.isTreeEdge(A);J&&mxEvent.isControlDown(Y)&&Z.push(A);(null==A||J)&&Z.push(k);return null==A||J});if(0==Z.length||1==Z.length&&Z[0]==la)Z=l.model.getDescendants(la);l.setSelectionCells(Z)}},null,null,"Alt+Shift+X");f.actions.addAction("selectParent",function(Y){var la=l.getSelectionCell();l.isEnabled()&&null!=la&&(Y=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(la),+null!=Y&&0<Y.length?l.setSelectionCell(l.model.getTerminal(Y[0],!0)):l.selectParentCell())},null,null,"Alt+Shift+P");f.actions.addAction("selectSiblings",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var la=l.getSelectionCell(),Z=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(la);Y=[];if(null!=Z&&0<Z.length&&(Z=l.getOutgoingTreeEdges(l.model.getTerminal(Z[0],!0)),null!=Z))for(var k=0;k<Z.length;k++)Y.push(l.model.getTerminal(Z[k],!1));0==Y.length&&(Y=l.model.getChildren(l.model.getParent(la)));+l.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var C=l.removeCells;l.removeCells=function(Y,la){la=null!=la?la:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));la&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],k=0;k<Y.length;k++){var A=Y[k];t.isEdge(A)&&p(A)&&(Z.push(A),A=t.getTerminal(A,!1));if(m(A)){var J=[];l.traverse(A,!0,function(U,P){var T=null!=P&&l.isTreeEdge(P);T&&J.push(P);(null==P||T)&&J.push(U);return null==P||T});0<J.length&&(Z=Z.concat(J),A=l.getIncomingTreeEdges(Y[k]),+Y=Y.concat(A))}else null!=A&&Z.push(Y[k])}Y=Z;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(Y,la,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(la,Z))};var F=l.duplicateCells;l.duplicateCells=function(Y,la){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),k=0;k<Z.length;k++){var A=l.view.getState(Z[k]);if(null!=A&&m(A.cell)){var J=l.getIncomingTreeEdges(A.cell);for(A=0;A<J.length;A++)mxUtils.remove(J[A],Y)}}this.model.beginUpdate();try{var U=F.call(this,+Y,la);if(U.length==Y.length)for(k=0;k<Y.length;k++)if(m(Y[k])){var P=l.getIncomingTreeEdges(U[k]);J=l.getIncomingTreeEdges(Y[k]);if(0==P.length&&0<J.length){var T=this.cloneCell(J[0]);this.addEdge(T,l.getDefaultParent(),this.model.getTerminal(J[0],!0),U[k])}}}finally{this.model.endUpdate()}return U};var N=l.moveCells;l.moveCells=function(Y,la,Z,k,A,J,U){for(var P=null,T=[],W=0;W<Y.length;W++)(u(Y[W])||m(Y[W]))&&!B(Y[W])&&this.isCellCollapsed(Y[W])?T=T.concat(this.getSubtree(Y[W])):T.push(Y[W]);Y=+mxUtils.removeDuplicates(T);this.model.beginUpdate();try{T=A;var aa=this.getCurrentCellStyle(A);if(null!=Y&&m(A)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(W=0;W<Y.length;W++)if(m(Y[W])||l.model.isEdge(Y[W])&&null==l.model.getTerminal(Y[W],!0)){A=l.model.getParent(Y[W]);break}if(null!=T&&A!=T&&null!=this.view.getState(Y[0])){var ja=l.getIncomingTreeEdges(Y[0]);if(0<ja.length){var pa=l.view.getState(l.model.getTerminal(ja[0],!0));if(null!=pa){var sa=l.view.getState(T);null!=sa&&(la=(sa.getCenterX()-+pa.getCenterX())/l.view.scale,Z=(sa.getCenterY()-pa.getCenterY())/l.view.scale)}}}}P=N.apply(this,arguments);if(null!=P&&null!=Y&&P.length==Y.length)for(W=0;W<P.length;W++)if(this.model.isEdge(P[W]))m(T)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[W],!0))&&this.model.setTerminal(P[W],T,!0);else if(m(Y[W])&&(ja=l.getIncomingTreeEdges(Y[W]),0<ja.length))if(!k)m(T)&&0>mxUtils.indexOf(Y,this.model.getTerminal(ja[0],!0))&&this.model.setTerminal(ja[0],T,!0);else if(0==l.getIncomingTreeEdges(P[W]).length){aa=+T;if(null==aa||aa==l.model.getParent(Y[W]))aa=l.model.getTerminal(ja[0],!0);k=this.cloneCell(ja[0]);this.addEdge(k,l.getDefaultParent(),aa,P[W])}}finally{this.model.endUpdate()}return P};if(null!=f.sidebar){var K=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(Y,la,Z,k){var A=l.model,J=null;A.beginUpdate();try{if(J=K.apply(this,arguments),m(Y))for(var U=0;U<J.length;U++)if(A.isEdge(J[U])&&null==A.getTerminal(J[U],!0)){A.setTerminal(J[U],Y,!0);var P=l.getCellGeometry(J[U]);P.points=null;+null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{A.endUpdate()}return J}}var I={67:f.actions.get("selectChildren"),88:f.actions.get("selectDescendants"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ca={67:f.actions.get("copyStyle"),86:f.actions.get("pasteStyle")},da=f.onKeyDown;f.onKeyDown=function(Y){try{var la=l.getSelectionCell();if(l.isEnabled()&&!l.isEditing()&&null!=la){var Z=mxEvent.isAltDown(Y)&&mxEvent.isShiftDown(Y)?I[Y.keyCode]:mxEvent.isAltDown(Y)?+ca[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(la)&&(Z=null,0<l.getIncomingTreeEdges(la).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?G(la):O(la):13==Y.which&&(Z=S(la,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&l.model.isEdge(Z[0])?l.setSelectionCell(l.model.getTerminal(Z[0],!1)):l.setSelectionCell(Z[Z.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(l.view.getState(la)),l.startEditingAtCell(la),mxEvent.consume(Y)):37==Y.keyCode?(c(la,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):+38==Y.keyCode?(c(la,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(c(la,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(c(la,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(k){f.handleError(k)}mxEvent.isConsumed(Y)||da.apply(this,arguments)};var ea=l.connectVertex;l.connectVertex=function(Y,la,Z,k,A,J,U){var P=l.getIncomingTreeEdges(Y);if(m(Y)){var T=H(Y),W=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,aa=la==mxConstants.DIRECTION_EAST||la==+mxConstants.DIRECTION_WEST;return T==la||0==P.length?O(Y,la):W==aa?G(Y):S(Y,la!=mxConstants.DIRECTION_NORTH&&la!=mxConstants.DIRECTION_WEST)}return ea.apply(this,arguments)};l.getSubtree=function(Y){var la=[Y];!u(Y)&&!m(Y)||B(Y)||l.traverse(Y,!0,function(Z,k){var A=null!=k&&l.isTreeEdge(k);A&&0>mxUtils.indexOf(la,k)&&la.push(k);(null==k||A)&&0>mxUtils.indexOf(la,Z)&&la.push(Z);return null==k||A});return la};var X=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){X.apply(this,+arguments);(u(this.state.cell)||m(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),+this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Y){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Y),mxEvent.getClientY(Y),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Y);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(Y)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var ba=mxVertexHandler.prototype.redrawHandles;+mxVertexHandler.prototype.redrawHandles=function(){ba.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ha=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Y){ha.apply(this,arguments);null!=+this.moveHandle&&(this.moveHandle.style.display=Y?"":"none")};var ma=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(Y,la){ma.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),u=this.graph,p=this;return m.concat([this.addEntry("tree container",+function(){var B=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var H=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');+S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);B.insert(G);B.insert(H);B.insert(S);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var B=new mxCell("Mindmap",new mxGeometry(0,+0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var H=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');H.vertex=!0;var S=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var O=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+O.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),G.style);R.geometry.relative=!0;R.edge=!0;H.insertEdge(R,!0);O.insertEdge(R,!1);var c=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),G.style);f.geometry.relative=!0;f.edge=!0;H.insertEdge(f,!0);c.insertEdge(f,!1);var l=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+l.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),G.style);t.geometry.relative=!0;t.edge=!0;H.insertEdge(t,!0);l.insertEdge(t,!1);B.insert(G);B.insert(R);B.insert(f);B.insert(t);B.insert(H);B.insert(S);B.insert(O);B.insert(c);B.insert(l);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var B=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');+B.vertex=!0;return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var B=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");H.geometry.setTerminalPoint(new mxPoint(-40,40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var B=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),+'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");+H.geometry.setTerminalPoint(new mxPoint(-40,40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree orgchart organization division",function(){var B=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var H=new mxCell("Organization",new mxGeometry(80,+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(H,"treeRoot","1");H.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");+G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var O=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');O.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");R.geometry.relative=+!0;R.edge=!0;H.insertEdge(R,!0);O.insertEdge(R,!1);B.insert(G);B.insert(R);B.insert(H);B.insert(S);B.insert(O);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree root",function(){var B=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return p.createVertexTemplateFromCells([B],+B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree division",function(){var B=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");+H.geometry.setTerminalPoint(new mxPoint(0,0),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree sub sections",function(){var B=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");+H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),H.style);G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;S.insertEdge(G,!1);return p.createVertexTemplateFromCells([H,G,B,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;+EditorUi.initMinimalTheme=function(){function b(c,f){if(EditorUi.windowed){var l=c.editor.graph;l.popupMenuHandler.hideMenu();null==c.formatWindow?(f=Math.max(10,c.diagramContainer.clientWidth-248),l=Math.min(566,l.container.clientHeight-10),c.formatWindow=new WrapperWindow(c,mxResources.get("format"),f,60,240,l,function(t){c.createFormat(t).init()}),c.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){c.formatWindow.window.fit()})),c.formatWindow.window.minimumSize=new mxRectangle(0,+0,240,80)):c.formatWindow.window.setVisible(null!=f?f:!c.formatWindow.window.isVisible())}else null==c.formatElt&&(c.formatElt=c.createSidebarContainer(),c.createFormat(c.formatElt).init(),c.formatElt.style.border="none",c.formatElt.style.width="240px",c.formatElt.style.borderLeftWidth="1px",c.formatElt.style.borderLeftStyle="solid",c.formatElt.style.right="0px"),l=c.diagramContainer.parentNode,null!=c.formatElt.parentNode?(c.formatElt.parentNode.removeChild(c.formatElt),l.style.right="0px"):(l.parentNode.appendChild(c.formatElt),+l.style.right=c.formatElt.style.width)}function e(c,f){function l(C,F){var N=c.menus.get(C);C=t.addMenu(F,mxUtils.bind(this,function(){N.funct.apply(this,arguments)}));C.setAttribute("title",F);C.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";C.className="geTitle";f.appendChild(C);return C}var t=new Menubar(c,f);if(Editor.enableCustomLibraries&&+("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=c.actions.get("newLibrary")){var z=document.createElement("div");z.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";z.className="geTitle";mxUtils.write(z,mxResources.get("newLibrary"));f.appendChild(z);mxEvent.addListener(z,"click",this.actions.get("newLibrary").funct);+z=z.cloneNode(!1);z.style.left="50%";z.style.borderLeftStyle="solid";mxUtils.write(z,mxResources.get("openLibrary"));f.appendChild(z);mxEvent.addListener(z,"click",this.actions.get("openLibrary").funct)}else z=l("newLibrary",mxResources.get("newLibrary")),z.style.display="block",z.style.fontSize="11px",z.style.left="0",z=l("openLibraryFrom",mxResources.get("openLibraryFrom")),z.style.borderLeftStyle="solid",z.style.display="block",z.style.fontSize="11px",z.style.left="50%";f.appendChild(c.sidebar.container);+f.style.overflow="hidden"}function g(c,f){if(EditorUi.windowed){var l=c.editor.graph;l.popupMenuHandler.hideMenu();null==c.sidebarWindow?(f=Math.min(l.container.clientWidth-10,218),l=Math.min(l.container.clientHeight-40,650),c.sidebarWindow=new WrapperWindow(c,mxResources.get("shapes"),10,56,f-6,l-6,function(t){e(c,t)}),c.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){c.sidebarWindow.window.fit()})),c.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),c.sidebarWindow.window.setVisible(!0),+isLocalStorage&&c.getLocalData("sidebar",function(t){c.sidebar.showEntries(t,null,!0)}),c.restoreLibraries()):c.sidebarWindow.window.setVisible(null!=f?f:!c.sidebarWindow.window.isVisible())}else null==c.sidebarElt&&(c.sidebarElt=c.createSidebarContainer(),e(c,c.sidebarElt),c.sidebarElt.style.border="none",c.sidebarElt.style.width="210px",c.sidebarElt.style.borderRight="1px solid gray"),l=c.diagramContainer.parentNode,null!=c.sidebarElt.parentNode?(c.sidebarElt.parentNode.removeChild(c.sidebarElt),+l.style.left="0px"):(l.parentNode.appendChild(c.sidebarElt),l.style.left=c.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(c){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur=-"1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var v=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(T){v.apply(this,arguments);-null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var A=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(T,c){null!=c.shortcut&&900>m&&!mxClient.IS_IOS?T.firstChild.nextSibling.setAttribute("title",c.shortcut):-A.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(T){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=T?T:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var G=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();G.apply(this,arguments)};var S=EditorUi.prototype.setGraphEnabled;-EditorUi.prototype.setGraphEnabled=function(T){S.apply(this,arguments);if(T){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=c&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};-var F=Menus.prototype.init;Menus.prototype.init=function(){F.apply(this,arguments);var T=this.editorUi;EditorUi.enablePlantUml&&!T.isOffline()&&T.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var k=new ParseDialog(T,mxResources.get("plantUml")+"...","plantUml");T.showDialog(k.container,620,420,!0,!1);k.init()}));T.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var k=new ParseDialog(T,mxResources.get("mermaid")+"...","mermaid");T.showDialog(k.container,-620,420,!0,!1);k.init()}));var c="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),f=function(k,B,z,C){k.addItem(z,null,mxUtils.bind(this,function(){var I=new CreateGraphDialog(T,z,C);T.showDialog(I.container,620,420,!0,!1);I.init()}),B)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(k,B){for(var z=0;z<c.length;z++)"-"==c[z]?k.addSeparator(B):f(k,B,mxResources.get(c[z])+"...",c[z])})))};EditorUi.prototype.installFormatToolbar=function(T){var c=-this.editor.graph,f=document.createElement("div");f.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(k,B){0<c.getSelectionCount()?(T.appendChild(f),f.innerHTML="Selected: "+c.getSelectionCount()):null!=f.parentNode&&f.parentNode.removeChild(f)}))};var P=!1;EditorUi.prototype.initFormatWindow=-function(){if(!P&&null!=this.formatWindow){P=!0;var T=this.formatWindow.window.toggleMinimized,c=240;this.formatWindow.window.toggleMinimized=function(){T.apply(this,arguments);this.minimized?(c=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+c-140+"px"):(this.div.style.width=c+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-c+140)+"px");this.fit()};-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(f){mxEvent.getSource(f)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function T(ja,oa,qa){var ra=C.menus.get(ja),ua=O.addMenu(mxResources.get(ja),mxUtils.bind(this,function(){ua.classList.contains("mxDisabled")||ra.funct.apply(this,arguments)}),K);ua.className="geMenuItem";ua.style.display="inline-block";ua.style.boxSizing=-"border-box";ua.style.top="6px";ua.style.marginRight="6px";ua.style.height="30px";ua.style.paddingTop="6px";ua.style.paddingBottom="6px";ua.style.cursor="pointer";ua.setAttribute("title",mxResources.get(ja));C.menus.menuCreated(ra,ua,"geMenuItem");null!=qa?(ua.style.backgroundImage="url("+qa+")",ua.style.backgroundPosition="center center",ua.style.backgroundRepeat="no-repeat",ua.style.backgroundSize="24px 24px",ua.style.width="34px",ua.innerText=""):oa||(ua.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+-")",ua.style.backgroundPosition="right 6px center",ua.style.backgroundRepeat="no-repeat",ua.style.paddingRight="22px");return ua}function c(ja,oa,qa,ra,ua,za){var Ba=document.createElement("a");Ba.className="geMenuItem";Ba.style.display="inline-block";Ba.style.boxSizing="border-box";Ba.style.height="30px";Ba.style.padding="6px";Ba.style.position="relative";Ba.style.verticalAlign="top";Ba.style.top="0px";null!=C.statusContainer?L.insertBefore(Ba,C.statusContainer):L.appendChild(Ba);null!=za?(Ba.style.backgroundImage=-"url("+za+")",Ba.style.backgroundPosition="center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.width="34px"):mxUtils.write(Ba,ja);mxEvent.addListener(Ba,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ca){Ca.preventDefault()}));mxEvent.addListener(Ba,"click",function(Ca){"disabled"!=Ba.getAttribute("disabled")&&oa(Ca);mxEvent.consume(Ca)});null==qa&&(Ba.style.marginRight="4px");null!=ra&&Ba.setAttribute("title",ra);null!=ua&&(ja=-function(){ua.isEnabled()?(Ba.removeAttribute("disabled"),Ba.style.cursor="pointer"):(Ba.setAttribute("disabled","disabled"),Ba.style.cursor="default")},ua.addListener("stateChanged",ja),I.addListener("enabledChanged",ja),ja());return Ba}function f(ja,oa,qa){qa=document.createElement("div");qa.className="geMenuItem";qa.style.display="inline-block";qa.style.verticalAlign="top";qa.style.marginRight="6px";qa.style.padding="0 4px 0 4px";qa.style.height="30px";qa.style.position="relative";qa.style.top=-"0px";for(var ra=0;ra<ja.length;ra++)null!=ja[ra]&&(ja[ra].style.margin="0px",ja[ra].style.boxShadow="none",qa.appendChild(ja[ra]));null!=oa&&mxUtils.setOpacity(qa,oa);null!=C.statusContainer?L.insertBefore(qa,C.statusContainer):L.appendChild(qa);return qa}function k(){for(var ja=L.firstChild;null!=ja;){var oa=ja.nextSibling;"geMenuItem"!=ja.className&&"geItem"!=ja.className||ja.parentNode.removeChild(ja);ja=oa}K=L.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;-ja=1E3>m;var qa=null;ja||(qa=T("diagram"));oa=ja?T("diagram",null,Editor.menuImage):null;null!=oa&&(qa=oa);f([qa,c(mxResources.get("shapes"),C.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),C.actions.get("image"),ja?Editor.shapesImage:null),c(mxResources.get("format"),C.actions.get("format").funct,null,mxResources.get("format")+" ("+C.actions.get("format").shortcut+")",C.actions.get("image"),ja?Editor.formatImage:null)],ja?60:null);oa=T("insert",!0,ja?ca:null);f([oa,c(mxResources.get("delete"),-C.actions.get("delete").funct,null,mxResources.get("delete"),C.actions.get("delete"),ja?Editor.trashImage:null)],ja?60:null);I.isEnabled()||oa.classList.add("mxDisabled");411<=m&&(f([U,J],60),520<=m&&f([W,640<=m?c("",fa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",fa,Editor.zoomInImage):null,640<=m?c("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}R.apply(this,arguments);var B=mxUtils.isAncestorNode(document.body,this.container)?-this.container:this.editor.graph.container;null!=B&&(B.classList.add("geSimple"),B.classList.add("geMinimal"));B=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var z=document.createElement("div");z.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";z.style.bottom=B?"32px":"0px";this.sidebar=this.createSidebar(z);if(1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])g(this,!0),null!=this.sidebar&&-null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var C=this,I=C.editor.graph;C.toolbar=this.createToolbar(C.createDiv("geToolbar"));C.defaultLibraryName=mxResources.get("untitledLibrary");var L=document.createElement("div");L.className="geMenubarContainer";var K=null,O=new Menubar(C,L);C.statusContainer=C.createStatusContainer();-C.statusContainer.style.position="relative";C.statusContainer.style.maxWidth="";C.statusContainer.style.cursor="default";var da=C.hideCurrentMenu;C.hideCurrentMenu=function(){da.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ea=C.descriptorChanged;C.descriptorChanged=function(){ea.apply(this,arguments);var ja=C.getCurrentFile();if(null!=ja&&null!=ja.getTitle()){var oa=ja.getMode();"google"==oa?oa="googleDrive":"github"==oa?oa="gitHub":"gitlab"==oa?oa="gitLab":"onedrive"==-oa&&(oa="oneDrive");oa=mxResources.get(oa);L.setAttribute("title",ja.getTitle()+(null!=oa?" ("+oa+")":""))}else L.removeAttribute("title")};C.setStatusText(C.editor.getStatus());L.appendChild(C.statusContainer);C.buttonContainer=document.createElement("div");C.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";L.appendChild(C.buttonContainer);C.menubarContainer=-C.buttonContainer;C.tabContainer=document.createElement("div");C.tabContainer.className="geTabContainer geTabItem";C.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";B=C.diagramContainer.parentNode;z=document.createElement("div");z.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";C.diagramContainer.style.top="47px";var ca=Editor.addBoxImage;if(null!=C.hoverIcons){var V=C.hoverIcons.update;-C.hoverIcons.update=function(){I.freehand.isDrawing()||V.apply(this,arguments)}}if(null!=I.freehand){var ma=I.freehand.createStyle;I.freehand.createStyle=function(ja){return ma.apply(this,arguments)+"sketch=0;"}}C.editor.addListener("statusChanged",mxUtils.bind(this,function(){C.setStatusText(C.editor.getStatus())}));C.setStatusText(C.editor.getStatus());var la=C.menus.get("viewZoom");if(null!=la){var Y=function(ja){if(mxEvent.isAltDown(ja))C.hideCurrentMenu(),C.actions.get("customZoom").funct(),-mxEvent.consume(ja);else if("geMenuItem"==mxEvent.getSource(ja).className||mxEvent.isShiftDown(ja))C.hideCurrentMenu(),C.actions.get("smartFit").funct(),mxEvent.consume(ja)},fa=C.actions.get("zoomIn"),Z=C.actions.get("zoomOut"),l=C.actions.get("resetView"),u=C.actions.get("undo"),H=C.actions.get("redo"),U=c("",u.funct,null,mxResources.get("undo")+" ("+u.shortcut+")",u,Editor.undoImage),J=c("",H.funct,null,mxResources.get("redo")+" ("+H.shortcut+")",H,Editor.redoImage),W=c("",Y,!0,mxResources.get("fit")+-" ("+Editor.ctrlKey+"+H)",l,Editor.zoomFitImage);L.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";var aa=O.addMenu("100%",la.funct);aa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");aa.className="geTabItem";aa.style.height=C.tabContainerHeight+"px";aa.style.position="absolute";aa.style.display="0"!=urlParams.pages?"flex":"none";aa.style.alignItems="center";aa.style.justifyContent=-"center";aa.style.paddingRight="11px";aa.style.whiteSpace="nowrap";aa.style.overflow="hidden";aa.style.fontSize="11px";aa.style.width="51px";aa.style.right="0px";aa.style.bottom="0px";aa.style.boxSizing="content-box";aa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";aa.style.backgroundPosition="right 6px top 15px";aa.style.backgroundRepeat="no-repeat";aa.style.backgroundSize="10px";aa.style.zIndex="1";z.appendChild(aa);(function(ja){mxEvent.addListener(ja,"click",Y);var oa=mxUtils.bind(this,-function(qa,ra,ua){ja.innerText="";mxUtils.write(ja,Math.round(100*C.editor.graph.view.scale*(null!=ua?ua:1))+"%")});C.editor.graph.view.addListener(mxEvent.EVENT_SCALE,oa);C.editor.addListener("resetGraphView",oa);C.editor.addListener("pageSelected",oa);C.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(qa,ra){oa(qa,ra,ra.getProperty("factor"))}))})(aa);var ba=C.setGraphEnabled;C.setGraphEnabled=function(){ba.apply(this,arguments);null!=this.tabContainer&&(aa.style.visibility=this.tabContainer.style.visibility,-this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}z.appendChild(L);z.appendChild(C.diagramContainer);B.appendChild(z);C.updateTabContainer();!EditorUi.windowed&&1E3<=m&&b(this,!0);z.appendChild(C.tabContainer);k();C.addListener("lockedChanged",k);mxEvent.addListener(window,"resize",function(){k();null!=C.sidebarWindow&&C.sidebarWindow.window.fit();null!=C.formatWindow&&C.formatWindow.window.fit();null!=C.actions.outlineWindow&&-C.actions.outlineWindow.window.fit();null!=C.actions.layersWindow&&C.actions.layersWindow.window.fit();null!=C.menus.chatWindow&&C.menus.chatWindow.window.fit();null!=C.menus.tagsWindow&&C.menus.tagsWindow.window.fit();null!=C.menus.findWindow&&C.menus.findWindow.window.fit();null!=C.menus.findReplaceWindow&&C.menus.findReplaceWindow.window.fit()})}}};-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,g,m,v,p,A){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=v;this.isResolved=p;this.user=A;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,v){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,v){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=v};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save As\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;+"1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var u=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){u.apply(this,arguments);+null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var B=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(c,f){null!=f.shortcut&&900>m&&!mxClient.IS_IOS?c.firstChild.nextSibling.setAttribute("title",f.shortcut):+B.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var H=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();H.apply(this,arguments)};var S=EditorUi.prototype.setGraphEnabled;+EditorUi.prototype.setGraphEnabled=function(c){S.apply(this,arguments);if(c){var f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=f&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=f&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};+var G=Menus.prototype.init;Menus.prototype.init=function(){G.apply(this,arguments);var c=this.editorUi;EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var t=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(t.container,620,420,!0,!1);t.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var t=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");c.showDialog(t.container,+620,420,!0,!1);t.init()}));var f="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),l=function(t,z,C,F){t.addItem(C,null,mxUtils.bind(this,function(){var N=new CreateGraphDialog(c,C,F);c.showDialog(N.container,620,420,!0,!1);N.init()}),z)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,z){for(var C=0;C<f.length;C++)"-"==f[C]?t.addSeparator(z):l(t,z,mxResources.get(f[C])+"...",f[C])})))};EditorUi.prototype.installFormatToolbar=function(c){var f=+this.editor.graph,l=document.createElement("div");l.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";f.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,z){0<f.getSelectionCount()?(c.appendChild(l),l.innerHTML="Selected: "+f.getSelectionCount()):null!=l.parentNode&&l.parentNode.removeChild(l)}))};var O=!1;EditorUi.prototype.initFormatWindow=+function(){if(!O&&null!=this.formatWindow){O=!0;var c=this.formatWindow.window.toggleMinimized,f=240;this.formatWindow.window.toggleMinimized=function(){c.apply(this,arguments);this.minimized?(f=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+f-140+"px"):(this.div.style.width=f+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-f+140)+"px");this.fit()};+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(l){mxEvent.getSource(l)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(ja,pa,sa){var qa=F.menus.get(ja),wa=ca.addMenu(mxResources.get(ja),mxUtils.bind(this,function(){wa.classList.contains("mxDisabled")||qa.funct.apply(this,arguments)}),I);wa.className="geMenuItem";wa.style.display="inline-block";wa.style.boxSizing=+"border-box";wa.style.top="6px";wa.style.marginRight="6px";wa.style.height="30px";wa.style.paddingTop="6px";wa.style.paddingBottom="6px";wa.style.cursor="pointer";wa.setAttribute("title",mxResources.get(ja));F.menus.menuCreated(qa,wa,"geMenuItem");null!=sa?(wa.style.backgroundImage="url("+sa+")",wa.style.backgroundPosition="center center",wa.style.backgroundRepeat="no-repeat",wa.style.backgroundSize="24px 24px",wa.style.width="34px",wa.innerText=""):pa||(wa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage++")",wa.style.backgroundPosition="right 6px center",wa.style.backgroundRepeat="no-repeat",wa.style.paddingRight="22px");return wa}function f(ja,pa,sa,qa,wa,Ba){var za=document.createElement("a");za.className="geMenuItem";za.style.display="inline-block";za.style.boxSizing="border-box";za.style.height="30px";za.style.padding="6px";za.style.position="relative";za.style.verticalAlign="top";za.style.top="0px";null!=F.statusContainer?K.insertBefore(za,F.statusContainer):K.appendChild(za);null!=Ba?(za.style.backgroundImage=+"url("+Ba+")",za.style.backgroundPosition="center center",za.style.backgroundRepeat="no-repeat",za.style.backgroundSize="24px 24px",za.style.width="34px"):mxUtils.write(za,ja);mxEvent.addListener(za,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ea){Ea.preventDefault()}));mxEvent.addListener(za,"click",function(Ea){"disabled"!=za.getAttribute("disabled")&&pa(Ea);mxEvent.consume(Ea)});null==sa&&(za.style.marginRight="4px");null!=qa&&za.setAttribute("title",qa);null!=wa&&(ja=+function(){wa.isEnabled()?(za.removeAttribute("disabled"),za.style.cursor="pointer"):(za.setAttribute("disabled","disabled"),za.style.cursor="default")},wa.addListener("stateChanged",ja),N.addListener("enabledChanged",ja),ja());return za}function l(ja,pa,sa){sa=document.createElement("div");sa.className="geMenuItem";sa.style.display="inline-block";sa.style.verticalAlign="top";sa.style.marginRight="6px";sa.style.padding="0 4px 0 4px";sa.style.height="30px";sa.style.position="relative";sa.style.top=+"0px";for(var qa=0;qa<ja.length;qa++)null!=ja[qa]&&(ja[qa].style.margin="0px",ja[qa].style.boxShadow="none",sa.appendChild(ja[qa]));null!=pa&&mxUtils.setOpacity(sa,pa);null!=F.statusContainer?K.insertBefore(sa,F.statusContainer):K.appendChild(sa);return sa}function t(){for(var ja=K.firstChild;null!=ja;){var pa=ja.nextSibling;"geMenuItem"!=ja.className&&"geItem"!=ja.className||ja.parentNode.removeChild(ja);ja=pa}I=K.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;+ja=1E3>m;var sa=null;ja||(sa=c("diagram"));pa=ja?c("diagram",null,Editor.menuImage):null;null!=pa&&(sa=pa);l([sa,f(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ja?Editor.shapesImage:null),f(mxResources.get("format"),F.actions.get("format").funct,null,mxResources.get("format")+" ("+F.actions.get("format").shortcut+")",F.actions.get("image"),ja?Editor.formatImage:null)],ja?60:null);pa=c("insert",!0,ja?X:null);l([pa,f(mxResources.get("delete"),+F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ja?Editor.trashImage:null)],ja?60:null);N.isEnabled()||pa.classList.add("mxDisabled");411<=m&&(l([U,P],60),520<=m&&l([T,640<=m?f("",la.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",la,Editor.zoomInImage):null,640<=m?f("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}R.apply(this,arguments);var z=mxUtils.isAncestorNode(document.body,this.container)?+this.container:this.editor.graph.container;null!=z&&(z.classList.add("geSimple"),z.classList.add("geMinimal"));z=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var C=document.createElement("div");C.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";C.style.bottom=z?"32px":"0px";this.sidebar=this.createSidebar(C);if(1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])g(this,!0),null!=this.sidebar&&+null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var F=this,N=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var K=document.createElement("div");K.className="geMenubarContainer";var I=null,ca=new Menubar(F,K);F.statusContainer=F.createStatusContainer();+F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.cursor="default";var da=F.hideCurrentMenu;F.hideCurrentMenu=function(){da.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ea=F.descriptorChanged;F.descriptorChanged=function(){ea.apply(this,arguments);var ja=F.getCurrentFile();if(null!=ja&&null!=ja.getTitle()){var pa=ja.getMode();"google"==pa?pa="googleDrive":"github"==pa?pa="gitHub":"gitlab"==pa?pa="gitLab":"onedrive"==+pa&&(pa="oneDrive");pa=mxResources.get(pa);K.setAttribute("title",ja.getTitle()+(null!=pa?" ("+pa+")":""))}else K.removeAttribute("title")};F.setStatusText(F.editor.getStatus());K.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";K.appendChild(F.buttonContainer);F.menubarContainer=+F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer geTabItem";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";z=F.diagramContainer.parentNode;C=document.createElement("div");C.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="47px";var X=Editor.addBoxImage;if(null!=F.hoverIcons){var ba=F.hoverIcons.update;+F.hoverIcons.update=function(){N.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=N.freehand){var ha=N.freehand.createStyle;N.freehand.createStyle=function(ja){return ha.apply(this,arguments)+"sketch=0;"}}F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));F.setStatusText(F.editor.getStatus());var ma=F.menus.get("viewZoom");if(null!=ma){var Y=function(ja){if(mxEvent.isAltDown(ja))F.hideCurrentMenu(),F.actions.get("customZoom").funct(),+mxEvent.consume(ja);else if("geMenuItem"==mxEvent.getSource(ja).className||mxEvent.isShiftDown(ja))F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ja)},la=F.actions.get("zoomIn"),Z=F.actions.get("zoomOut"),k=F.actions.get("resetView"),A=F.actions.get("undo"),J=F.actions.get("redo"),U=f("",A.funct,null,mxResources.get("undo")+" ("+A.shortcut+")",A,Editor.undoImage),P=f("",J.funct,null,mxResources.get("redo")+" ("+J.shortcut+")",J,Editor.redoImage),T=f("",Y,!0,mxResources.get("fit")++" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);K.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";var W=ca.addMenu("100%",ma.funct);W.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");W.className="geTabItem";W.style.height=F.tabContainerHeight+"px";W.style.position="absolute";W.style.display="0"!=urlParams.pages?"flex":"none";W.style.alignItems="center";W.style.justifyContent=+"center";W.style.paddingRight="11px";W.style.whiteSpace="nowrap";W.style.overflow="hidden";W.style.fontSize="11px";W.style.width="51px";W.style.right="0px";W.style.bottom="0px";W.style.boxSizing="content-box";W.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";W.style.backgroundPosition="right 6px top 15px";W.style.backgroundRepeat="no-repeat";W.style.backgroundSize="10px";W.style.zIndex="1";C.appendChild(W);(function(ja){mxEvent.addListener(ja,"click",Y);var pa=mxUtils.bind(this,+function(sa,qa,wa){ja.innerText="";mxUtils.write(ja,Math.round(100*F.editor.graph.view.scale*(null!=wa?wa:1))+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);F.editor.addListener("resetGraphView",pa);F.editor.addListener("pageSelected",pa);F.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(sa,qa){pa(sa,qa,qa.getProperty("factor"))}))})(W);var aa=F.setGraphEnabled;F.setGraphEnabled=function(){aa.apply(this,arguments);null!=this.tabContainer&&(W.style.visibility=this.tabContainer.style.visibility,+this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}C.appendChild(K);C.appendChild(F.diagramContainer);z.appendChild(C);F.updateTabContainer();!EditorUi.windowed&&1E3<=m&&b(this,!0);C.appendChild(F.tabContainer);t();F.addListener("lockedChanged",t);mxEvent.addListener(window,"resize",function(){t();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&+F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.chatWindow&&F.menus.chatWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()})}}};+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,g,m,u,p,B){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=u;this.isResolved=p;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,u){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,u){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=u};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save As\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,e,g){this.init(b,e,g)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;GraphViewer.prototype.darkMode=null;GraphViewer.prototype.init=function(b,e,g){GraphViewer.initCss();this.graphConfig=null!=g?g:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.darkMode=null!=this.graphConfig["dark-mode"]?this.graphConfig["dark-mode"]:this.darkMode;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=-null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var m=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var v=-mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var G=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?G.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(G.style.padding="8px");G.style.forcedColorAdjust="none";G.style.boxSizing="border-box";G.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var k=-this.view.graphBounds,B=this.view.translate;G.setAttribute("viewBox",k.x+B.x-this.panDx+" "+(k.y+B.y-this.panDy)+" "+(k.width+1)+" "+(k.height+1));this.container.style.backgroundColor=G.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",k))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(k){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=-!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=e)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(k){}this.graph.getImageFromBundles=function(k){return m.getImageUrl(k)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);-if("mxfile"==this.xmlNode.nodeName){var F=this.xmlNode.getElementsByTagName("diagram");if(0<F.length){if(null!=this.pageId)for(S=0;S<F.length;S++)if(this.pageId==F[S].getAttribute("id")){this.currentPage=S;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(k){var B=F[m.currentPage];return"page"==k?B.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==k?m.currentPage+1:"pagecount"==k?F.length:P.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=-function(k){this.handlingResize||(this.currentPage=mxUtils.mod(k,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(k){k=this.getIndexById(k);var B=0<=k;B&&this.selectPage(k);return B};S=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=R&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),R=this.xmlNode)});var T=this.graph.setBackgroundImage;this.graph.setBackgroundImage=-function(k){if(null!=k&&Graph.isPageLink(k.src)){var B=k.src,z=B.indexOf(",");0<z&&(z=m.getIndexById(B.substring(z+1)),0<=z&&(k=m.getImageForGraphModel(Editor.parseDiagramNode(m.diagrams[z])),k.originalSrc=B))}T.apply(this,arguments)};var c=this.graph.getGraphBounds;this.graph.getGraphBounds=function(k){var B=c.apply(this,arguments);k=this.backgroundImage;if(null!=k){var z=this.view.translate,C=this.view.scale;B=mxRectangle.fromRectangle(B);B.add(new mxRectangle((z.x+k.x)*C,(z.y+k.y)*C,k.width*C,-k.height*C))}return B};this.addListener("xmlNodeChanged",S);S();urlParams.page=m.currentPage;S=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||-(this.graph.panningHandler.isForcePanningEvent=function(k){return!mxEvent.isPopupTrigger(k.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.titleTooltip||-this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(k,B){try{if(Graph.isPageLink(k)){var z=k.indexOf(",");m.selectPageById(k.substring(z+-1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var C=this.getGraphBounds();this.handleCustomLink(k,B);C.equals(this.getGraphBounds())||m.crop()}}catch(I){alert(I.message)}return!0};var f=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return f.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});g=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&-0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof g){var p=this.getObservableParent(b),A=new g(mxUtils.bind(this,function(G){0<b.offsetWidth&&(A.disconnect(),v())}));A.observe(p,{attributes:!0})}else v()}};+null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var m=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var u=+mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var H=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?H.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(H.style.padding="8px");H.style.forcedColorAdjust="none";H.style.boxSizing="border-box";H.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var t=+this.view.graphBounds,z=this.view.translate;H.setAttribute("viewBox",t.x+z.x-this.panDx+" "+(t.y+z.y-this.panDy)+" "+(t.width+1)+" "+(t.height+1));this.container.style.backgroundColor=H.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",t))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(t){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=+!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=e)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(t){}this.graph.getImageFromBundles=function(t){return m.getImageUrl(t)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);+if("mxfile"==this.xmlNode.nodeName){var G=this.xmlNode.getElementsByTagName("diagram");if(0<G.length){if(null!=this.pageId)for(S=0;S<G.length;S++)if(this.pageId==G[S].getAttribute("id")){this.currentPage=S;break}var O=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(t){var z=G[m.currentPage];return"page"==t?z.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==t?m.currentPage+1:"pagecount"==t?G.length:O.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=+function(t){this.handlingResize||(this.currentPage=mxUtils.mod(t,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(t){t=this.getIndexById(t);var z=0<=t;z&&this.selectPage(t);return z};S=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=R&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),R=this.xmlNode)});var c=this.graph.setBackgroundImage;this.graph.setBackgroundImage=+function(t){if(null!=t&&Graph.isPageLink(t.src)){var z=t.src,C=z.indexOf(",");0<C&&(C=m.getIndexById(z.substring(C+1)),0<=C&&(t=m.getImageForGraphModel(Editor.parseDiagramNode(m.diagrams[C])),t.originalSrc=z))}c.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(t){var z=f.apply(this,arguments);t=this.backgroundImage;if(null!=t){var C=this.view.translate,F=this.view.scale;z=mxRectangle.fromRectangle(z);z.add(new mxRectangle((C.x+t.x)*F,(C.y+t.y)*F,t.width*F,+t.height*F))}return z};this.addListener("xmlNodeChanged",S);S();urlParams.page=m.currentPage;S=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||+(this.graph.panningHandler.isForcePanningEvent=function(t){return!mxEvent.isPopupTrigger(t.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.titleTooltip||+this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(t,z){try{if(Graph.isPageLink(t)){var C=t.indexOf(",");m.selectPageById(t.substring(C++1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var F=this.getGraphBounds();this.handleCustomLink(t,z);F.equals(this.getGraphBounds())||m.crop()}}catch(N){alert(N.message)}return!0};var l=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return l.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});g=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&+0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof g){var p=this.getObservableParent(b),B=new g(mxUtils.bind(this,function(H){0<b.offsetWidth&&(B.disconnect(),u())}));B.observe(p,{attributes:!0})}else u()}};GraphViewer.prototype.installBackgroundColorHandler=function(){var b=this.graph;if(null!=b){null!=GraphViewer.shapeBackgroundColor&&(b.shapeBackgroundColor=GraphViewer.shapeBackgroundColor);b.defaultPageBackgroundColor="transparent";b.diagramBackgroundColor="transparent";b.transparentBackground=!1;var e=b.background,g=mxUtils.bind(this,function(m){"none"==b.getAdaptiveColors()&&null==e&&(this.isDarkMode()?b.background="#ffffff":b.background=null,m&&b.view.validateBackground())});this.addListener("graphChanged",function(){e=b.background;g(!0)});this.addListener("darkModeChanged",function(){g(!0)});g(!1)}};GraphViewer.prototype.installDarkModeListener=function(){null!=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(){this.darkModeChanged();this.fireEvent(new mxEventObject("darkModeChanged"))}));this.darkModeChanged()};GraphViewer.prototype.darkModeChanged=function(){if(null!=this.graph){var b=this.graph.container,e=this.isDarkMode();e?b.classList.add("geDarkMode"):b.classList.remove("geDarkMode");b.style.colorScheme=e?"dark":"light"}};GraphViewer.prototype.getAncestorDetails=function(b){for(;null!=b;){if("DETAILS"==b.nodeName)return b;b=b.parentNode}return null};@@ -4216,60 +4215,60 @@ GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=docuGraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var g=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),g.width,g.height,g.x,g.y)};GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};-GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var g=[],m=this.graph.getModel();m.beginUpdate();try{for(var v=0;v<m.getChildCount(m.root);v++){var p=m.getChildAt(m.root,v);e=e&&m.isVisible(p);g.push(m.isVisible(p));m.setVisible(p,null!=b?b[v]:!0)}}finally{m.endUpdate()}}return e?null:g};+GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var g=[],m=this.graph.getModel();m.beginUpdate();try{for(var u=0;u<m.getChildCount(m.root);u++){var p=m.getChildAt(m.root,u);e=e&&m.isVisible(p);g.push(m.isVisible(p));m.setVisible(p,null!=b?b[u]:!0)}}finally{m.endUpdate()}}return e?null:g};GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};GraphViewer.prototype.isDarkMode=function(){return"dark"==this.darkMode||"auto"==this.darkMode&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches};-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!g){g=!0;var G=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?G.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){G=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);-S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};G={left:G.left-S.left,top:G.top-S.top,bottom:G.bottom-S.top,right:G.right-S.left};this.toolbar.style.left=G.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=G.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=G.top+1+"px"):this.toolbar.style.top=G.top+"px"}else null!=-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());g=!1}}),v=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(G){var S=b.offsetWidth;S==v||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=G?G:this.graphConfig.zoom||-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},v=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!g){g=!0;var H=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?H.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){H=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);+S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};H={left:H.left-S.left,top:H.top-S.top,bottom:H.bottom-S.top,right:H.right-S.left};this.toolbar.style.left=H.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=H.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=H.top+1+"px"):this.toolbar.style.top=H.top+"px"}else null!=+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());g=!1}}),u=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(H){var S=b.offsetWidth;S==u||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=H?H:this.graphConfig.zoom||+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},u=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",m),this.graph.addListener("size",m)):new ResizeSensor(this.graph.container,m));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),-0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=v=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size",-m);var A=mxUtils.bind(this,function(G){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var F=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==G&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>F)?(G=null,null!=F&&e.height+2*this.graph.border>F-2&&(G=(F-2*this.graph.border-2)/e.height),this.fitGraph(G)):this.widthIsEmpty||-null!=G||0!=this.graphConfig.resize||""==b.style.height?(G=null!=G?G:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+G.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+G.y),v=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(A,0):A();this.positionGraph=function(G){e=this.graph.getGraphBounds();v=null;A(G)}};+0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=u=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size",+m);var B=mxUtils.bind(this,function(H){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var G=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==H&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>G)?(H=null,null!=G&&e.height+2*this.graph.border>G-2&&(H=(G-2*this.graph.border-2)/e.height),this.fitGraph(H)):this.widthIsEmpty||+null!=H||0!=this.graphConfig.resize||""==b.style.height?(H=null!=H?H:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+H.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+H.y),u=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(B,0):B();this.positionGraph=function(H){e=this.graph.getGraphBounds();u=null;B(H)}};GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),g=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+g):g,null!=e.y?Math.floor(b.view.translate.y-e.y/m+g):g)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};-GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var m=this.graphConfig.layerIds,v=null!=m&&0<m.length,p=!1;if(0<g.length||v||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var A=b.getChildCount(b.root);if(null==e){e=!1;p={};if(v)for(var G=0;G<m.length;G++){var S=b.getCell(m[G]);null!=S&&(e=!0,p[S.id]=!0)}else for(G=0;G<g.length;G++)S=b.getChildAt(b.root,parseInt(g[G])),null!=S&&(e=!0,p[S.id]=!0);for(G=0;e&&-G<A;G++)S=b.getChildAt(b.root,G),b.setVisible(S,p[S.id]||!1)}else for(G=0;G<A;G++)b.setVisible(b.getChildAt(b.root,G),e.isVisible(e.getChildAt(e.root,G)))}finally{b.endUpdate()}p=!0}return p};+GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var m=this.graphConfig.layerIds,u=null!=m&&0<m.length,p=!1;if(0<g.length||u||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var B=b.getChildCount(b.root);if(null==e){e=!1;p={};if(u)for(var H=0;H<m.length;H++){var S=b.getCell(m[H]);null!=S&&(e=!0,p[S.id]=!0)}else for(H=0;H<g.length;H++)S=b.getChildAt(b.root,parseInt(g[H])),null!=S&&(e=!0,p[S.id]=!0);for(H=0;e&&+H<B;H++)S=b.getChildAt(b.root,H),b.setVisible(S,p[S.id]||!1)}else for(H=0;H<B;H++)b.setVisible(b.getChildAt(b.root,H),e.isVisible(e.getChildAt(e.root,H)))}finally{b.endUpdate()}p=!0}return p};GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.display="flex";e.style.alignItems="center";e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";e.style.height=this.toolbarHeight+"px";var g=mxUtils.bind(this,function(){this.isDarkMode()?(e.classList.add("geDarkMode"),e.style.colorScheme="dark"):(e.classList.remove("geDarkMode"),e.style.colorScheme="light")});this.addListener("darkModeChanged",g);this.toolbar=e;g();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");-mxUtils.setOpacity(e,30);var m=null,v=null,p=mxUtils.bind(this,function(ea){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;v=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";v=null}),100)}),ea||200)}),A=mxUtils.bind(this,function(ea){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);e.style.display=-"";mxUtils.setOpacity(e,ea||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||(A(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ea){mxEvent.consume(ea)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ea){A(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ea){A(100);mxEvent.consume(ea)}));mxEvent.addListener(e,"mouseleave",-mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||A(30)}));var G=this.graph,S=G.getTolerance();G.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ea,ca){this.startX=ca.getGraphX();this.startY=ca.getGraphY();this.scrollLeft=G.container.scrollLeft;this.scrollTop=G.container.scrollTop},mouseMove:function(ea,ca){},mouseUp:function(ea,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-G.container.scrollLeft)<S&&Math.abs(this.scrollTop-G.container.scrollTop)<-S&&Math.abs(this.startX-ca.getGraphX())<S&&Math.abs(this.startY-ca.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?p():A(30))}})}g=this.toolbarItems;for(var F=0,P=mxUtils.bind(this,function(ea,ca,V,ma){ea=this.createToolbarButton(ea,ca,V,ma);e.appendChild(ea);F++;return ea}),R=this.graph.getModel(),T=null,c=null,f=null,k=null,B=0;B<g.length;B++){var z=g[B];if("pages"==z){k=b.ownerDocument.createElement("div");k.style.display="inline-flex";k.style.position="relative";k.style.alignItems="center";-k.style.padding="4px";k.style.fontFamily=GraphViewer.cssFontFamily;k.style.fontSize="12px";k.style.cursor="default";k.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(k,70);var C=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");C.style.borderRightStyle="none";C.style.paddingLeft="0px";C.style.paddingRight="0px";e.appendChild(k);var I=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage+-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");I.style.paddingLeft="0px";I.style.paddingRight="0px";z=mxUtils.bind(this,function(){k.innerText="";mxUtils.write(k,this.currentPage+1+" / "+this.diagrams.length);k.style.display=1<this.diagrams.length?"inline-flex":"none";C.style.display=k.style.display;I.style.display=k.style.display});this.addListener("graphChanged",z);z()}else if("zoom"==z)this.zoomEnabled&&(P(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,-mxResources.get("zoomOut")||"Zoom Out"),P(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),P(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==z){if(this.layersEnabled){var L=P(mxUtils.bind(this,function(ea){if(null!=T)T.parentNode.removeChild(T),-T=null;else{T=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var V=this.graph.getGraphBounds(),ma=this.graph.view;0>V.x||0>V.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ma.translate.clone(),scale:ma.scale}):null!=this.graph.originalViewState&&0<V.x/ma.scale+this.graph.originalViewState.translate.x-ma.translate.x&&0<V.y/ma.scale+this.graph.originalViewState.translate.y--ma.translate.y&&(ma.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ma.translate.clone(),scale:ma.scale})}}));mxEvent.addListener(T,"mouseleave",function(){T.parentNode.removeChild(T);T=null});ea=L.getBoundingClientRect();T.style.width="140px";T.style.padding="2px 0px 2px 0px";T.style.border="1px solid #d0d0d0";T.style.backgroundColor="#eee";T.style.fontFamily=GraphViewer.cssFontFamily;-T.style.fontSize="11px";T.style.overflowY="auto";T.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";T.style.zIndex=this.toolbarZIndex+1;T.style.color="#000";mxUtils.setOpacity(T,85);var ca=mxUtils.getDocumentScrollOrigin(document);T.style.left=ca.x+ea.left-1+"px";T.style.top=ca.y+ea.bottom-2+"px";this.isDarkMode()&&(T.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(T)}}),Editor.layersImage,mxResources.get("layers")||"Layers");R.addListener(mxEvent.CHANGE,-function(){L.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"});L.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"}}else if("tags"==z){if(this.tagsEnabled){var K=P(mxUtils.bind(this,function(ea){null==c&&(c=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),c.div.getElementsByTagName("div")[0].style.position="",c.div.style.maxHeight="160px",c.div.style.maxWidth="120px",c.div.style.padding="2px",c.div.style.overflow="auto",c.div.style.height="auto",c.div.style.position=-"fixed",c.div.style.fontFamily=GraphViewer.cssFontFamily,c.div.style.fontSize="11px",c.div.style.backgroundColor="#eee",c.div.style.color="#000",c.div.style.border="1px solid #d0d0d0",c.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(c.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(c.div,85));if(null!=f)f.parentNode.removeChild(f),f=null;else{f=c.div;f.style.position="absolute";mxEvent.addListener(f,"mouseleave",function(){null!=f&&(f.parentNode.removeChild(f),f=null)});-ea=K.getBoundingClientRect();var ca=mxUtils.getDocumentScrollOrigin(document);f.style.left=ca.x+ea.left-1+"px";f.style.top=ca.y+ea.bottom-2+"px";document.body.appendChild(f);c.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");R.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){K.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=f&&0==this.graph.getAllTags().length&&(f.parentNode.removeChild(f),f=null)}));K.style.display=0<this.graph.getAllTags().length?"inline-flex":-"none"}}else"lightbox"==z?this.lightboxEnabled&&P(mxUtils.bind(this,function(){try{this.showLightbox()}catch(ea){alert(ea.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(z=this.graphConfig["toolbar-buttons"][z],null!=z&&(z.elem=P(null==z.enabled||z.enabled?z.handler:function(){},z.image,z.title,z.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*F);null!=this.graphConfig.title&&(g=-b.ownerDocument.createElement("div"),g.style.display="inline-flex",g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*F;var O=b.style.border,-da=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ea=b.getBoundingClientRect(),ca=mxUtils.getScrollOrigin(document.body);ca="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ca.x,top:-ca.y};ea={left:ea.left-ca.left,top:ea.top-ca.top,bottom:ea.bottom-ca.top,right:ea.right-ca.left};e.style.left=-ea.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ea.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ea.top+1+"px"):e.style.top=ea.top+"px";"1px solid transparent"==O&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var V=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=f&&(f.parentNode.removeChild(f),f=null);null!=T&&(T.parentNode.removeChild(T),T=null);b.style.border=-O});mxEvent.addListener(document,"mousemove",function(ma){for(ma=mxEvent.getSource(ma);null!=ma;){if(ma==b||ma==e||ma==T||ma==f)return;ma=ma.parentNode}V()});mxEvent.addListener(document.body,"mouseleave",function(ma){V()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&da()})).observe(b)};-GraphViewer.prototype.createToolbarButton=function(b,e,g,m){var v=document.createElement("div");v.style.borderRight="1px solid #d0d0d0";v.style.display="inline-flex";v.style.alignItems="center";v.style.padding="6px";mxEvent.addListener(v,"click",b);null!=g&&v.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";b.className="geAdaptiveAsset";null==m||m?(mxEvent.addListener(v,"mouseenter",function(){v.style.backgroundColor=-"light-dark(#dddddd,#333333)"}),mxEvent.addListener(v,"mouseleave",function(){v.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),v.style.cursor="pointer"):mxUtils.setOpacity(v,30);v.appendChild(b);return v};+mxUtils.setOpacity(e,30);var m=null,u=null,p=mxUtils.bind(this,function(ea){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;u=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";u=null}),100)}),ea||200)}),B=mxUtils.bind(this,function(ea){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);e.style.display=+"";mxUtils.setOpacity(e,ea||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||(B(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ea){mxEvent.consume(ea)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ea){B(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ea){B(100);mxEvent.consume(ea)}));mxEvent.addListener(e,"mouseleave",+mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||B(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ea,X){this.startX=X.getGraphX();this.startY=X.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ea,X){},mouseUp:function(ea,X){mxEvent.isTouchEvent(X.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<+S&&Math.abs(this.startX-X.getGraphX())<S&&Math.abs(this.startY-X.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?p():B(30))}})}g=this.toolbarItems;for(var G=0,O=mxUtils.bind(this,function(ea,X,ba,ha){ea=this.createToolbarButton(ea,X,ba,ha);e.appendChild(ea);G++;return ea}),R=this.graph.getModel(),c=null,f=null,l=null,t=null,z=0;z<g.length;z++){var C=g[z];if("pages"==C){t=b.ownerDocument.createElement("div");t.style.display="inline-flex";t.style.position="relative";t.style.alignItems="center";t.style.padding=+"4px";t.style.fontFamily=GraphViewer.cssFontFamily;t.style.fontSize="12px";t.style.cursor="default";t.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(t,70);var F=O(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");F.style.borderRightStyle="none";F.style.paddingLeft="0px";F.style.paddingRight="0px";e.appendChild(t);var N=O(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,+mxResources.get("nextPage")||"Next Page");N.style.paddingLeft="0px";N.style.paddingRight="0px";C=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-flex":"none";F.style.display=t.style.display;N.style.display=t.style.display});this.addListener("graphChanged",C);C()}else if("zoom"==C)this.zoomEnabled&&(O(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||+"Zoom Out"),O(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),O(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==C){if(this.layersEnabled){var K=O(mxUtils.bind(this,function(ea){if(null!=c)c.parentNode.removeChild(c),c=null;else{c=this.graph.createLayersDialog(mxUtils.bind(this,+function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ba=this.graph.getGraphBounds(),ha=this.graph.view;0>ba.x||0>ba.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale}):null!=this.graph.originalViewState&&0<ba.x/ha.scale+this.graph.originalViewState.translate.x-ha.translate.x&&0<ba.y/ha.scale+this.graph.originalViewState.translate.y-ha.translate.y&&(ha.setTranslate(this.graph.originalViewState.translate.x,+this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale})}}));mxEvent.addListener(c,"mouseleave",function(){c.parentNode.removeChild(c);c=null});ea=K.getBoundingClientRect();c.style.width="140px";c.style.padding="2px 0px 2px 0px";c.style.border="1px solid #d0d0d0";c.style.backgroundColor="#eee";c.style.fontFamily=GraphViewer.cssFontFamily;c.style.fontSize="11px";c.style.overflowY="auto";c.style.maxHeight=+this.graph.container.clientHeight-this.toolbarHeight-10+"px";c.style.zIndex=this.toolbarZIndex+1;c.style.color="#000";mxUtils.setOpacity(c,85);var X=mxUtils.getDocumentScrollOrigin(document);c.style.left=X.x+ea.left-1+"px";c.style.top=X.y+ea.bottom-2+"px";this.isDarkMode()&&(c.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(c)}}),Editor.layersImage,mxResources.get("layers")||"Layers");R.addListener(mxEvent.CHANGE,function(){K.style.display=1<R.getChildCount(R.root)?"inline-flex":+"none"});K.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"}}else if("tags"==C){if(this.tagsEnabled){var I=O(mxUtils.bind(this,function(ea){null==f&&(f=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),f.div.getElementsByTagName("div")[0].style.position="",f.div.style.maxHeight="160px",f.div.style.maxWidth="120px",f.div.style.padding="2px",f.div.style.overflow="auto",f.div.style.height="auto",f.div.style.position="fixed",f.div.style.fontFamily=GraphViewer.cssFontFamily,+f.div.style.fontSize="11px",f.div.style.backgroundColor="#eee",f.div.style.color="#000",f.div.style.border="1px solid #d0d0d0",f.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(f.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(f.div,85));if(null!=l)l.parentNode.removeChild(l),l=null;else{l=f.div;l.style.position="absolute";mxEvent.addListener(l,"mouseleave",function(){null!=l&&(l.parentNode.removeChild(l),l=null)});ea=I.getBoundingClientRect();var X=mxUtils.getDocumentScrollOrigin(document);+l.style.left=X.x+ea.left-1+"px";l.style.top=X.y+ea.bottom-2+"px";document.body.appendChild(l);f.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");R.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){I.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=l&&0==this.graph.getAllTags().length&&(l.parentNode.removeChild(l),l=null)}));I.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==C?this.lightboxEnabled&&O(mxUtils.bind(this,+function(){try{this.showLightbox()}catch(ea){alert(ea.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(C=this.graphConfig["toolbar-buttons"][C],null!=C&&(C.elem=O(null==C.enabled||C.enabled?C.handler:function(){},C.image,C.title,C.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.display="inline-flex",+g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*G;var ca=b.style.border,da=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?+"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ea=b.getBoundingClientRect(),X=mxUtils.getScrollOrigin(document.body);X="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-X.x,top:-X.y};ea={left:ea.left-X.left,top:ea.top-X.top,bottom:ea.bottom-X.top,right:ea.right-X.left};e.style.left=ea.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ea.bottom-1+"px":"inline"!=+this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ea.top+1+"px"):e.style.top=ea.top+"px";"1px solid transparent"==ca&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var ba=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),l=null);null!=c&&(c.parentNode.removeChild(c),c=null);b.style.border=ca});mxEvent.addListener(document,"mousemove",function(ha){for(ha=mxEvent.getSource(ha);null!=+ha;){if(ha==b||ha==e||ha==c||ha==l)return;ha=ha.parentNode}ba()});mxEvent.addListener(document.body,"mouseleave",function(ha){ba()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&da()})).observe(b)};+GraphViewer.prototype.createToolbarButton=function(b,e,g,m){var u=document.createElement("div");u.style.borderRight="1px solid #d0d0d0";u.style.display="inline-flex";u.style.alignItems="center";u.style.padding="6px";mxEvent.addListener(u,"click",b);null!=g&&u.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";b.className="geAdaptiveAsset";null==m||m?(mxEvent.addListener(u,"mouseenter",function(){u.style.backgroundColor=+"light-dark(#dddddd,#333333)"}),mxEvent.addListener(u,"mouseleave",function(){u.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),u.style.cursor="pointer"):mxUtils.setOpacity(u,30);u.appendChild(b);return u};GraphViewer.prototype.disableButton=function(b,e){var g=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=g&&(mxUtils.setOpacity(g.elem,30),mxEvent.removeListener(g.elem,"click",g.handler),mxEvent.addListener(g.elem,"mouseenter",function(){g.elem.style.backgroundColor="#eee"}),e&&g.elem.setAttribute("title",e))};-GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(g,m,v){if(null==m)for(var p=mxEvent.getSource(g);p!=b.container&&null!=p&&null==m;)"a"==p.nodeName.toLowerCase()&&(m=p.getAttribute("href")),p=p.parentNode;null!=e?null==m||b.isCustomLink(m)?mxEvent.consume(g):b.isExternalProtocol(m)||b.isBlankLink(m)||window.setTimeout(function(){e.destroy()},0):null!=m&&null==e&&b.isCustomLink(m)&&-(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&b.customLinkClicked(m,v)&&(mxUtils.clearSelection(),mxEvent.consume(g))}),mxUtils.bind(this,function(g){if(null==e&&this.lightboxClickEnabled&&(!mxEvent.isTouchEvent(g)||0==this.toolbarItems.length))try{this.showLightbox()}catch(m){alert(m.message)}}))};+GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(g,m,u){if(null==m)for(var p=mxEvent.getSource(g);p!=b.container&&null!=p&&null==m;)"a"==p.nodeName.toLowerCase()&&(m=p.getAttribute("href")),p=p.parentNode;null!=e?null==m||b.isCustomLink(m)?mxEvent.consume(g):b.isExternalProtocol(m)||b.isBlankLink(m)||window.setTimeout(function(){e.destroy()},0):null!=m&&null==e&&b.isCustomLink(m)&&+(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&b.customLinkClicked(m,u)&&(mxUtils.clearSelection(),mxEvent.consume(g))}),mxUtils.bind(this,function(g){if(null==e&&this.lightboxClickEnabled&&(!mxEvent.isTouchEvent(g)||0==this.toolbarItems.length))try{this.showLightbox()}catch(m){alert(m.message)}}))};GraphViewer.prototype.showLightbox=function(b,e,g){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;g={client:1,target:null!=g?g:"blank"};b&&(g.edit=this.graphConfig.edit||"_blank");if(null!=e?e:1)g.close=1;this.layersEnabled&&(g.layers=1);this.tagsEnabled&&(g.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(g.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&(g.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(g.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(m){"ready"==m.data&&m.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):g.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(g.dev="1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(g)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};GraphViewer.prototype.showLocalLightbox=function(b){var e=document.createElement("div");e.style.position="fixed";e.style.top="0";e.style.left="0";e.style.bottom="0";e.style.right="0";e.style.zIndex=this.lightboxZIndex;e.style.backgroundColor="#000000";mxUtils.setOpacity(e,70);document.body.appendChild(e);var g=document.createElement("img");g.setAttribute("border","0");g.setAttribute("src",Editor.closeBlackImage);g.style.position="fixed";g.style.top="32px";g.style.right="32px";g.style.cursor="pointer";g.className="geAdaptiveAsset";var m=mxUtils.bind(this,function(){p.setDarkMode(this.isDarkMode())});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",m);p.destroy()}));urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=-this.layersEnabled?"1":"0";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var v=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));v.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(v))}catch(c){}if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};-EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};v=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var p=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",m);p.editor.editBlankUrl=this.editBlankUrl;p.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=v;p.refresh=function(){};var A=mxUtils.bind(this,function(c){27==c.keyCode&&p.destroy()}),G=this.initialOverflow,-S=p.destroy;p.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",A),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=G,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var F=p.editor.graph,P=F.container;P.style.overflow="hidden";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",A)):(e.style.display="none",g.style.display=-"none");var R=this;F.getImageFromBundles=function(c){return R.getImageUrl(c)};var T=p.createTemporaryGraph;p.createTemporaryGraph=function(){var c=T.apply(this,arguments);c.getImageFromBundles=function(f){return R.getImageUrl(f)};return c};this.graphConfig.move&&(F.isMoveCellsEvent=function(c){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(F,p);window.setTimeout(mxUtils.bind(this,-function(){try{mxEvent.addListener(e,"click",function(){p.destroy()}),P.style.outline="none",P.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(P)):(document.body.appendChild(P),document.body.appendChild(g)),p.setFileData(this.xml),mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)"),p.chromelessToolbar.style.bottom="60px",p.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(p.chromelessToolbar),p.getEditBlankXml=-mxUtils.bind(this,function(){return this.xml}),this.showLayers(F,this.graph),p.lightboxFit(),p.chromelessResize()}catch(c){p.handleError(c,null,function(){p.destroy()})}}),0);return p};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};+this.layersEnabled?"1":"0";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var u=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));u.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(u))}catch(f){}if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};+EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};u=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var p=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",m);p.editor.editBlankUrl=this.editBlankUrl;p.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=u;p.refresh=function(){};var B=mxUtils.bind(this,function(f){27==f.keyCode&&p.destroy()}),H=this.initialOverflow,+S=p.destroy;p.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",B),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=H,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var G=p.editor.graph,O=G.container;O.style.overflow="hidden";this.lightboxChrome&&null==b?(O.style.border="1px solid #c0c0c0",O.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",B)):(e.style.display="none",g.style.display=+"none");var R=this;G.getImageFromBundles=function(f){return R.getImageUrl(f)};var c=p.createTemporaryGraph;p.createTemporaryGraph=function(){var f=c.apply(this,arguments);f.getImageFromBundles=function(l){return R.getImageUrl(l)};return f};this.graphConfig.move&&(G.isMoveCellsEvent=function(f){return!0});mxUtils.setPrefixedStyle(O.style,"border-radius","4px");O.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(G,p);window.setTimeout(mxUtils.bind(this,+function(){try{mxEvent.addListener(e,"click",function(){p.destroy()}),O.style.outline="none",O.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(O)):(document.body.appendChild(O),document.body.appendChild(g)),p.setFileData(this.xml),mxUtils.setPrefixedStyle(O.style,"transform","rotateY(0deg)"),p.chromelessToolbar.style.bottom="60px",p.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(p.chromelessToolbar),p.getEditBlankXml=+mxUtils.bind(this,function(){return this.xml}),this.showLayers(G,this.graph),p.lightboxFit(),p.chromelessResize()}catch(f){p.handleError(f,null,function(){p.destroy()})}}),0);return p};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};GraphViewer.prototype.updateTitle=function(b,e){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",e||b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",e||b))};GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(g){e.innerText=g.message,null!=window.console&&console.error(g)}})};-GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var g=0;g<e.length;g++)b.push(e[g]);return b}var m=document.getElementsByTagName("*");e=[];for(g=0;g<m.length;g++){var v=m[g].className;null!=v&&0<v.length&&(v=v.split(" "),0<=mxUtils.indexOf(v,b)&&e.push(m[g]))}return e};-GraphViewer.createViewerForElement=function(b,e){var g=b.getAttribute("data-mxgraph");if(null!=g){var m=JSON.parse(g),v=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,m);null!=e&&e(p)};null!=m.url?GraphViewer.getUrl(m.url,function(p){v(p)}):v(m.xml)}};+GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var g=0;g<e.length;g++)b.push(e[g]);return b}var m=document.getElementsByTagName("*");e=[];for(g=0;g<m.length;g++){var u=m[g].className;null!=u&&0<u.length&&(u=u.split(" "),0<=mxUtils.indexOf(u,b)&&e.push(m[g]))}return e};+GraphViewer.createViewerForElement=function(b,e){var g=b.getAttribute("data-mxgraph");if(null!=g){var m=JSON.parse(g),u=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,m);null!=e&&e(p)};null!=m.url?GraphViewer.getUrl(m.url,function(p){u(p)}):u(m.xml)}};GraphViewer.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));for(var e="",g=0;g<window.location.ancestorOrigins.length;g++)if(e+=" -> "+window.location.ancestorOrigins[g],e.endsWith("dan6v7pm1f1a1.cloudfront.net")||e.endsWith("confluence-cloud-excalidraw-ll3likebca-uc.a.run.app"))return!0;(b.endsWith("ac.draw.io")||b.endsWith("aj.draw.io"))&&1==window.location.ancestorOrigins.length&&window.location.ancestorOrigins[0]&&window.location.ancestorOrigins[0].endsWith(".atlassian.net")}}catch(m){}return!1};GraphViewer.darkBackgroundColor=Editor.darkColor;GraphViewer.cssFontFamily=Editor.defaultHtmlFont;GraphViewer.shapeBackgroundColor=null;GraphViewer.viewerInitialized=function(b){};GraphViewer.initCss=function(){try{null==GraphViewer.styleElement&&(GraphViewer.styleElement=document.createElement("style"),GraphViewer.styleElement.setAttribute("type","text/css"),GraphViewer.styleElement.innerHTML=GraphViewer.getCss(),GraphViewer.blockedAncestorFrames()||document.getElementsByTagName("head")[0].appendChild(GraphViewer.styleElement))}catch(b){}};@@ -4278,9 +4277,9 @@ GraphViewer.getCss=function(){return[".geDarkMode img {\n\tfilter: invert(1);\n}" font-family: "+GraphViewer.cssFontFamily+";"," font-size: 10pt;\n border: none;\n margin: 0px;\n}\n.geDialog {\n position: absolute;"," background: light-dark(#ffffff, "+GraphViewer.darkBackgroundColor+");","\t color: light-dark(#3f3f3f, #c0c0c0);\n box-shadow: 0px 0px 2px 2px light-dark(#d5d5d5, transparent);\n border: 1px solid light-dark(#dadada, #565656);\n overflow: hidden;\n padding: 30px;\n z-index: 2;\n}\n.geDialogClose {\n position: absolute;\n width: 9px;\n height: 9px;\n opacity: 0.5;\n cursor: pointer;\n}\n.geDialogClose:hover {\n opacity: 1;\n}\n.geDialogTitle {\n box-sizing: border-box;\n white-space: nowrap;"," background: light-dark(#f1f3f4, "+GraphViewer.darkBackgroundColor+");"," border-bottom: 1px solid rgb(192, 192, 192);\n font-size: 15px;\n font-weight: bold;\n text-align: center;\n color: rgb(35, 86, 149);\n}\n.geDialogFooter {"," background: light-dark(#f1f3f4, "+GraphViewer.darkBackgroundColor+");"," white-space: nowrap;\n text-align: right;\n box-sizing: border-box;\n border-top: 1px solid #e5e5e5;\n color: darkGray;\n}\n.geBtn, .mxWindow .geBtn {\n background-color: light-dark(#eeeeee, #1b1d1e);\n border: 1px solid light-dark(#d8d8d8, #333333);\n color: light-dark(#3f3f3f, #c0c0c0);\n font-size: 13px;\n font-weight: 500;\n border-radius: 4px;\n height: 30px;\n margin: 0 0 0 8px;\n min-width: 72px;\n outline: 0;\n padding: 0 8px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n.geBtn:hover:not(.gePrimaryBtn), .geBtn:focus {\n border: 1px solid light-dark(#c6c6c6, #333333);\n background: light-dark(#dadada, #333333);\n}\n.geBtn:disabled {\n opacity: .5;\n}\n.gePrimaryBtn {\n background: linear-gradient(light-dark(#4d90fe, #003555) 0px, light-dark(#4787ed, #003555) 100%);\n border: 1px solid light-dark(#3079ed, transparent);\n color: light-dark(#ffffff, #c0c0c0);\n}\n.gePrimaryBtn:hover:not([disabled]) {\n background: linear-gradient(light-dark(#4d90fe, #004a77) 0px, light-dark(#357ae8, #004a77) 100%);\n border: 1px solid light-dark(#2f5bb7, transparent);\n}\n.geBtn:disabled {\n opacity: .5;\n}"].join("\n")};GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,g){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=g;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},e=function(g,m){function v(){this.q=[];this.add=function(k){this.q.push(k)};var c,f;this.call=function(){c=0;for(f=this.q.length;c<f;c++)this.q[c].call()}}function p(c,f){return c.currentStyle?c.currentStyle[f]:window.getComputedStyle?window.getComputedStyle(c,null).getPropertyValue(f):c.style[f]}function A(c,f){if(!c.resizedAttached)c.resizedAttached=-new v,c.resizedAttached.add(f);else if(c.resizedAttached){c.resizedAttached.add(f);return}c.resizeSensor=document.createElement("div");c.resizeSensor.className="resize-sensor";c.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";c.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';-c.appendChild(c.resizeSensor);"static"==p(c,"position")&&(c.style.position="relative");var k=c.resizeSensor.childNodes[0],B=k.childNodes[0],z=c.resizeSensor.childNodes[1],C=function(){B.style.width="100000px";B.style.height="100000px";k.scrollLeft=1E5;k.scrollTop=1E5;z.scrollLeft=1E5;z.scrollTop=1E5};C();var I=!1,L=function(){c.resizedAttached&&(I&&(c.resizedAttached.call(),I=!1),b(L))};b(L);var K,O,da,ea;f=function(){if((da=c.offsetWidth)!=K||(ea=c.offsetHeight)!=O)I=!0,K=da,O=ea;C()};var ca=function(V,-ma,la){V.attachEvent?V.attachEvent("on"+ma,la):V.addEventListener(ma,la)};ca(k,"scroll",f);ca(z,"scroll",f)}var G=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,F=!1;(new ResizeObserver(function(){F||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){F=!0;G();S=null;F=!1},200))})).observe(g)}else{var P=Object.prototype.toString.call(g),R="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===-P||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){P=0;for(var T=g.length;P<T;P++)A(g[P],G)}else A(g,G);this.detach=function(){if(R)for(var c=0,f=g.length;c<f;c++)e.detach(g[c]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},e=function(g,m){function u(){this.q=[];this.add=function(t){this.q.push(t)};var f,l;this.call=function(){f=0;for(l=this.q.length;f<l;f++)this.q[f].call()}}function p(f,l){return f.currentStyle?f.currentStyle[l]:window.getComputedStyle?window.getComputedStyle(f,null).getPropertyValue(l):f.style[l]}function B(f,l){if(!f.resizedAttached)f.resizedAttached=+new u,f.resizedAttached.add(l);else if(f.resizedAttached){f.resizedAttached.add(l);return}f.resizeSensor=document.createElement("div");f.resizeSensor.className="resize-sensor";f.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";f.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';+f.appendChild(f.resizeSensor);"static"==p(f,"position")&&(f.style.position="relative");var t=f.resizeSensor.childNodes[0],z=t.childNodes[0],C=f.resizeSensor.childNodes[1],F=function(){z.style.width="100000px";z.style.height="100000px";t.scrollLeft=1E5;t.scrollTop=1E5;C.scrollLeft=1E5;C.scrollTop=1E5};F();var N=!1,K=function(){f.resizedAttached&&(N&&(f.resizedAttached.call(),N=!1),b(K))};b(K);var I,ca,da,ea;l=function(){if((da=f.offsetWidth)!=I||(ea=f.offsetHeight)!=ca)N=!0,I=da,ca=ea;F()};var X=function(ba,+ha,ma){ba.attachEvent?ba.attachEvent("on"+ha,ma):ba.addEventListener(ha,ma)};X(t,"scroll",l);X(C,"scroll",l)}var H=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,G=!1;(new ResizeObserver(function(){G||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){G=!0;H();S=null;G=!1},200))})).observe(g)}else{var O=Object.prototype.toString.call(g),R="[object Array]"===O||"[object NodeList]"===O||"[object HTMLCollection]"===+O||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){O=0;for(var c=g.length;O<c;O++)B(g[O],H)}else B(g,H);this.detach=function(){if(R)for(var f=0,l=g.length;f<l;f++)e.detach(g[f]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();(function(){Editor.initMath();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.jsindex e4844765a..44a7dcbc1 100644--- a/src/main/webapp/service-worker.js+++ b/src/main/webapp/service-worker.js@@ -1,2 +1,2 @@-if(!self.define){let e,i={};const r=(r,a)=>(r=new URL(r+".js",a).href,i[r]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=i,document.head.appendChild(e)}else e=r,importScripts(r),i()})).then((()=>{let e=i[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(a,c)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(i[s])return;let d={};const o=e=>r(e,s),f={module:{uri:s},exports:d,require:o};i[s]=Promise.all(a.map((e=>f[e]||o(e)))).then((e=>(c(...e),d)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/app.min.js",revision:"06e3f3c5095f5b8e69c5e53c77cec957"},{url:"js/extensions.min.js",revision:"c3d2f690a4ce657d36232c0556d59419"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"f760278d924467fb1d2289448c73fe27"},{url:"js/shapes-14-6-5.min.js",revision:"71913a30c93bc9aff182a3a2b3da1a21"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"57fe6012597666439de3e76c9bb681c1"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"1c4b010eb053bfb9aed1caee8a3d3689"},{url:"styles/atlas.css",revision:"05873c4bba51f571b1da549a967ea06c"},{url:"styles/dark.css",revision:"99dc5495d36d5ebaddababefde083c8c"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"655426517a1bd9c9b805c2359ab8d4b9"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"75f816c208d0c621e3066a97ff0ee6cf"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"c41221a9a51ff293f05ed13c7b142e5c"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{url:"plugins/cConf-comments.js",revision:"8af574bd1ae86be37b83b094a5011a4f"},{url:"plugins/cConf-1-4-8.js",revision:"1c9a0a3df274b56bd471283165f8aa5c"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"c3215554d29cc3f5df885cab999563c3"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"connect/confluence/viewer-init.js",revision:"b82e366bf57ecced9435c2a8ba9cb9b9"},{url:"connect/confluence/viewer.js",revision:"aa5ca84da421c280e9057b3a39c8a456"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"781ebdd3dda1d88c31eb00da02f872ef"},{url:"connect/confluence/includeDiagram.html",revision:"9613fec05b19ddef081ca6e9d8b057bf"},{url:"connect/confluence/macro-editor.js",revision:"03a8dcfc69612b44b6e75e6926a956fc"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"73927d303703a329ff06d681553e993d"},{url:"resources/dia_am.txt",revision:"8d60c82458b57bb9ccc7b0c4f6ed3f79"},{url:"resources/dia_ar.txt",revision:"e278657437cf14eeedbb3b641d3ba8c0"},{url:"resources/dia_bg.txt",revision:"61c2ef14ee768be21fcb22b1928f7cac"},{url:"resources/dia_bn.txt",revision:"45e3683c1150ad2e139f42fedaf9e7aa"},{url:"resources/dia_bs.txt",revision:"ed33364ad4282d0e29775ca2e2f351e0"},{url:"resources/dia_ca.txt",revision:"101dbe73020d8471a5208da4d8ae247e"},{url:"resources/dia_cs.txt",revision:"ba2fd4196222285218549625600a530f"},{url:"resources/dia_da.txt",revision:"b3eb739977ead9876a8afe0103ad7e36"},{url:"resources/dia_de.txt",revision:"fd7945d51201ff95e51d082750c67c39"},{url:"resources/dia_el.txt",revision:"faa7d843ef32aba9b9f11e367ca362d5"},{url:"resources/dia_eo.txt",revision:"619ff072153d5897b7184ee0fe925f18"},{url:"resources/dia_es.txt",revision:"1feb3c63ee76afc71ebec607c8a9347a"},{url:"resources/dia_et.txt",revision:"67482775f1ff0d1b2cb31f6226c519d3"},{url:"resources/dia_eu.txt",revision:"a7dce4832af9f1d0b4e5f5bf189ef328"},{url:"resources/dia_fa.txt",revision:"743a891d016470e8e0a3651be32fb3c5"},{url:"resources/dia_fi.txt",revision:"771de2b3741f25b4114e51c93ce1a866"},{url:"resources/dia_fil.txt",revision:"637b4984bb64580b4ef61e28ef7ca664"},{url:"resources/dia_fr.txt",revision:"ad7e62eb41228b929489d9427d206e82"},{url:"resources/dia_gl.txt",revision:"a89e3f7e7cb3b6867d3e74eb949894dd"},{url:"resources/dia_gu.txt",revision:"769be61a373049c5d3b358201f1acb65"},{url:"resources/dia_he.txt",revision:"238e53f20884ef57b1a9c06bd800b9ef"},{url:"resources/dia_hi.txt",revision:"755e1872b614c9a5b27c5459062c8320"},{url:"resources/dia_hr.txt",revision:"adf6788e96b0e3f0029cbae30a4faefb"},{url:"resources/dia_hu.txt",revision:"c645a78fdda2843acd6aa9d9bf60a6e8"},{url:"resources/dia_id.txt",revision:"9da16676fc1b33c61b4a025a352dc916"},{url:"resources/dia_it.txt",revision:"57b0f8eb2319f99f96b79507966f4e6f"},{url:"resources/dia_ja.txt",revision:"b4b10c93e53b13dbd3e407532813b9e0"},{url:"resources/dia_kn.txt",revision:"7cbbba0381a1a6cdeade3bc28ac01962"},{url:"resources/dia_ko.txt",revision:"943b020ff0430e9f81fe3e1875423b7d"},{url:"resources/dia_lt.txt",revision:"94aff34cd118d39d79abacf2a16aea7d"},{url:"resources/dia_lv.txt",revision:"325ed2d9ffa2ddc493d9ed10d46007ad"},{url:"resources/dia_ml.txt",revision:"fc666763d3fbff227411defda23b1942"},{url:"resources/dia_mr.txt",revision:"e8746ae5b0123155bdd837ae7f01b5f5"},{url:"resources/dia_ms.txt",revision:"e1600b30e6517d4dc4a7002ce675c641"},{url:"resources/dia_my.txt",revision:"4acfe58eb8f47895f188af8bfd33659c"},{url:"resources/dia_nl.txt",revision:"e9512982f5d9e89015435ee50d577bbc"},{url:"resources/dia_no.txt",revision:"6f0812d787ab931475343320d2547158"},{url:"resources/dia_pl.txt",revision:"3c7d08a5fefc693e6b6b4521a3c0a6cc"},{url:"resources/dia_pt-br.txt",revision:"5d7431a638a268dfedd3bc7f463e17d6"},{url:"resources/dia_pt.txt",revision:"981210fd60e7fd0831fcd6d26ca26f74"},{url:"resources/dia_ro.txt",revision:"1d77510ecd2b1b1c26640dfe77e00f48"},{url:"resources/dia_ru.txt",revision:"4c2d2f96df120afc4c3b3c58d0bc6ebc"},{url:"resources/dia_si.txt",revision:"2db82ba649f3ab7d578a73b247b06c4f"},{url:"resources/dia_sk.txt",revision:"4b9033183a2c90ccf0f75136fd7b14b0"},{url:"resources/dia_sl.txt",revision:"c27148e1c9480a35642162595480ff1f"},{url:"resources/dia_sr.txt",revision:"ef3562ada2e69e5d33609d58a677b6db"},{url:"resources/dia_sv.txt",revision:"7357682c42f6d47729b6b1784aaa5e9b"},{url:"resources/dia_sw.txt",revision:"377dd914bd645c2348e342bf55306439"},{url:"resources/dia_ta.txt",revision:"00ce65e244e159a2dcb93b9829a2e603"},{url:"resources/dia_te.txt",revision:"8aaca1c42eb1c027a77138f0fccc85c7"},{url:"resources/dia_th.txt",revision:"c2be3eae6995b41ba466651629c69143"},{url:"resources/dia_tr.txt",revision:"9571764eb899cc108c6fb2631d694ca3"},{url:"resources/dia_uk.txt",revision:"76e4f285ac8c648d3b3fbc6ab59aad17"},{url:"resources/dia_vi.txt",revision:"ced105b1a1ea57902c88fdd36ab041c0"},{url:"resources/dia_zh-tw.txt",revision:"ce0a47eca469dbb93e8c4f26aba7ea73"},{url:"resources/dia_zh.txt",revision:"a69a22b12a4ced3f62285b2521355755"},{url:"favicon.ico",revision:"83014b0f32b6c7b15b66cf3c6d6d7c16"},{url:"images/manifest.json",revision:"38d3a7e4b63e8175f0aab6f03e000f07"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"7985b4d1692766a7db52cbdd10893ad9"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));+if(!self.define){let e,i={};const r=(r,a)=>(r=new URL(r+".js",a).href,i[r]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=i,document.head.appendChild(e)}else e=r,importScripts(r),i()})).then((()=>{let e=i[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(a,c)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(i[s])return;let d={};const o=e=>r(e,s),f={module:{uri:s},exports:d,require:o};i[s]=Promise.all(a.map((e=>f[e]||o(e)))).then((e=>(c(...e),d)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/app.min.js",revision:"1048a7c368b56f257962aa4a4ee3b41d"},{url:"js/extensions.min.js",revision:"e51d47ff2e4145099305d6e282337166"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"f760278d924467fb1d2289448c73fe27"},{url:"js/shapes-14-6-5.min.js",revision:"71913a30c93bc9aff182a3a2b3da1a21"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"57fe6012597666439de3e76c9bb681c1"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"1c4b010eb053bfb9aed1caee8a3d3689"},{url:"styles/atlas.css",revision:"05873c4bba51f571b1da549a967ea06c"},{url:"styles/dark.css",revision:"99dc5495d36d5ebaddababefde083c8c"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"72461550c97b806c59914f8b8abd2fd0"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"75f816c208d0c621e3066a97ff0ee6cf"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"c41221a9a51ff293f05ed13c7b142e5c"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{url:"plugins/cConf-comments.js",revision:"8af574bd1ae86be37b83b094a5011a4f"},{url:"plugins/cConf-1-4-8.js",revision:"5324b1040e93e7e271c98060c2ef3993"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"c3215554d29cc3f5df885cab999563c3"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"connect/confluence/viewer-init.js",revision:"b82e366bf57ecced9435c2a8ba9cb9b9"},{url:"connect/confluence/viewer.js",revision:"e8411c6155dd6e4cc118a8d439cf4e50"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"781ebdd3dda1d88c31eb00da02f872ef"},{url:"connect/confluence/includeDiagram.html",revision:"9613fec05b19ddef081ca6e9d8b057bf"},{url:"connect/confluence/macro-editor.js",revision:"03a8dcfc69612b44b6e75e6926a956fc"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"73927d303703a329ff06d681553e993d"},{url:"resources/dia_am.txt",revision:"8d60c82458b57bb9ccc7b0c4f6ed3f79"},{url:"resources/dia_ar.txt",revision:"e278657437cf14eeedbb3b641d3ba8c0"},{url:"resources/dia_bg.txt",revision:"61c2ef14ee768be21fcb22b1928f7cac"},{url:"resources/dia_bn.txt",revision:"45e3683c1150ad2e139f42fedaf9e7aa"},{url:"resources/dia_bs.txt",revision:"ed33364ad4282d0e29775ca2e2f351e0"},{url:"resources/dia_ca.txt",revision:"101dbe73020d8471a5208da4d8ae247e"},{url:"resources/dia_cs.txt",revision:"ba2fd4196222285218549625600a530f"},{url:"resources/dia_da.txt",revision:"b3eb739977ead9876a8afe0103ad7e36"},{url:"resources/dia_de.txt",revision:"fd7945d51201ff95e51d082750c67c39"},{url:"resources/dia_el.txt",revision:"faa7d843ef32aba9b9f11e367ca362d5"},{url:"resources/dia_eo.txt",revision:"619ff072153d5897b7184ee0fe925f18"},{url:"resources/dia_es.txt",revision:"1feb3c63ee76afc71ebec607c8a9347a"},{url:"resources/dia_et.txt",revision:"67482775f1ff0d1b2cb31f6226c519d3"},{url:"resources/dia_eu.txt",revision:"a7dce4832af9f1d0b4e5f5bf189ef328"},{url:"resources/dia_fa.txt",revision:"743a891d016470e8e0a3651be32fb3c5"},{url:"resources/dia_fi.txt",revision:"771de2b3741f25b4114e51c93ce1a866"},{url:"resources/dia_fil.txt",revision:"637b4984bb64580b4ef61e28ef7ca664"},{url:"resources/dia_fr.txt",revision:"ad7e62eb41228b929489d9427d206e82"},{url:"resources/dia_gl.txt",revision:"a89e3f7e7cb3b6867d3e74eb949894dd"},{url:"resources/dia_gu.txt",revision:"769be61a373049c5d3b358201f1acb65"},{url:"resources/dia_he.txt",revision:"238e53f20884ef57b1a9c06bd800b9ef"},{url:"resources/dia_hi.txt",revision:"755e1872b614c9a5b27c5459062c8320"},{url:"resources/dia_hr.txt",revision:"adf6788e96b0e3f0029cbae30a4faefb"},{url:"resources/dia_hu.txt",revision:"c645a78fdda2843acd6aa9d9bf60a6e8"},{url:"resources/dia_id.txt",revision:"9da16676fc1b33c61b4a025a352dc916"},{url:"resources/dia_it.txt",revision:"57b0f8eb2319f99f96b79507966f4e6f"},{url:"resources/dia_ja.txt",revision:"b4b10c93e53b13dbd3e407532813b9e0"},{url:"resources/dia_kn.txt",revision:"7cbbba0381a1a6cdeade3bc28ac01962"},{url:"resources/dia_ko.txt",revision:"943b020ff0430e9f81fe3e1875423b7d"},{url:"resources/dia_lt.txt",revision:"94aff34cd118d39d79abacf2a16aea7d"},{url:"resources/dia_lv.txt",revision:"325ed2d9ffa2ddc493d9ed10d46007ad"},{url:"resources/dia_ml.txt",revision:"fc666763d3fbff227411defda23b1942"},{url:"resources/dia_mr.txt",revision:"e8746ae5b0123155bdd837ae7f01b5f5"},{url:"resources/dia_ms.txt",revision:"e1600b30e6517d4dc4a7002ce675c641"},{url:"resources/dia_my.txt",revision:"4acfe58eb8f47895f188af8bfd33659c"},{url:"resources/dia_nl.txt",revision:"e9512982f5d9e89015435ee50d577bbc"},{url:"resources/dia_no.txt",revision:"6f0812d787ab931475343320d2547158"},{url:"resources/dia_pl.txt",revision:"3c7d08a5fefc693e6b6b4521a3c0a6cc"},{url:"resources/dia_pt-br.txt",revision:"5d7431a638a268dfedd3bc7f463e17d6"},{url:"resources/dia_pt.txt",revision:"981210fd60e7fd0831fcd6d26ca26f74"},{url:"resources/dia_ro.txt",revision:"1d77510ecd2b1b1c26640dfe77e00f48"},{url:"resources/dia_ru.txt",revision:"4c2d2f96df120afc4c3b3c58d0bc6ebc"},{url:"resources/dia_si.txt",revision:"2db82ba649f3ab7d578a73b247b06c4f"},{url:"resources/dia_sk.txt",revision:"4b9033183a2c90ccf0f75136fd7b14b0"},{url:"resources/dia_sl.txt",revision:"c27148e1c9480a35642162595480ff1f"},{url:"resources/dia_sr.txt",revision:"ef3562ada2e69e5d33609d58a677b6db"},{url:"resources/dia_sv.txt",revision:"7357682c42f6d47729b6b1784aaa5e9b"},{url:"resources/dia_sw.txt",revision:"377dd914bd645c2348e342bf55306439"},{url:"resources/dia_ta.txt",revision:"00ce65e244e159a2dcb93b9829a2e603"},{url:"resources/dia_te.txt",revision:"8aaca1c42eb1c027a77138f0fccc85c7"},{url:"resources/dia_th.txt",revision:"c2be3eae6995b41ba466651629c69143"},{url:"resources/dia_tr.txt",revision:"9571764eb899cc108c6fb2631d694ca3"},{url:"resources/dia_uk.txt",revision:"76e4f285ac8c648d3b3fbc6ab59aad17"},{url:"resources/dia_vi.txt",revision:"ced105b1a1ea57902c88fdd36ab041c0"},{url:"resources/dia_zh-tw.txt",revision:"ce0a47eca469dbb93e8c4f26aba7ea73"},{url:"resources/dia_zh.txt",revision:"a69a22b12a4ced3f62285b2521355755"},{url:"favicon.ico",revision:"83014b0f32b6c7b15b66cf3c6d6d7c16"},{url:"images/manifest.json",revision:"38d3a7e4b63e8175f0aab6f03e000f07"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"7985b4d1692766a7db52cbdd10893ad9"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));//# sourceMappingURL=service-worker.js.mapdiff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.mapindex 462a68a84..554a0f3d2 100644--- a/src/main/webapp/service-worker.js.map+++ b/src/main/webapp/service-worker.js.map@@ -1 +1 @@-{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/31cbc1f7eb7cb574eb1e4dcaa4232b01/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"06e3f3c5095f5b8e69c5e53c77cec957\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"c3d2f690a4ce657d36232c0556d59419\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"f760278d924467fb1d2289448c73fe27\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"71913a30c93bc9aff182a3a2b3da1a21\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"57fe6012597666439de3e76c9bb681c1\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"1c4b010eb053bfb9aed1caee8a3d3689\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"05873c4bba51f571b1da549a967ea06c\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"99dc5495d36d5ebaddababefde083c8c\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"655426517a1bd9c9b805c2359ab8d4b9\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"75f816c208d0c621e3066a97ff0ee6cf\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"c41221a9a51ff293f05ed13c7b142e5c\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"d3269625ce04b7a277b779ff175957d0\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"c4cb6b60234b04b2c8bc09e555746615\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"8af574bd1ae86be37b83b094a5011a4f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"1c9a0a3df274b56bd471283165f8aa5c\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"c3215554d29cc3f5df885cab999563c3\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"b82e366bf57ecced9435c2a8ba9cb9b9\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"aa5ca84da421c280e9057b3a39c8a456\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"781ebdd3dda1d88c31eb00da02f872ef\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"9613fec05b19ddef081ca6e9d8b057bf\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"03a8dcfc69612b44b6e75e6926a956fc\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"73927d303703a329ff06d681553e993d\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"8d60c82458b57bb9ccc7b0c4f6ed3f79\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"e278657437cf14eeedbb3b641d3ba8c0\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"61c2ef14ee768be21fcb22b1928f7cac\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"45e3683c1150ad2e139f42fedaf9e7aa\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"ed33364ad4282d0e29775ca2e2f351e0\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"101dbe73020d8471a5208da4d8ae247e\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"ba2fd4196222285218549625600a530f\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"b3eb739977ead9876a8afe0103ad7e36\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"fd7945d51201ff95e51d082750c67c39\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"faa7d843ef32aba9b9f11e367ca362d5\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"619ff072153d5897b7184ee0fe925f18\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"1feb3c63ee76afc71ebec607c8a9347a\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"67482775f1ff0d1b2cb31f6226c519d3\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"a7dce4832af9f1d0b4e5f5bf189ef328\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"743a891d016470e8e0a3651be32fb3c5\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"771de2b3741f25b4114e51c93ce1a866\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"637b4984bb64580b4ef61e28ef7ca664\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"ad7e62eb41228b929489d9427d206e82\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"a89e3f7e7cb3b6867d3e74eb949894dd\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"769be61a373049c5d3b358201f1acb65\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"238e53f20884ef57b1a9c06bd800b9ef\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"755e1872b614c9a5b27c5459062c8320\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"adf6788e96b0e3f0029cbae30a4faefb\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"c645a78fdda2843acd6aa9d9bf60a6e8\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"9da16676fc1b33c61b4a025a352dc916\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"57b0f8eb2319f99f96b79507966f4e6f\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"b4b10c93e53b13dbd3e407532813b9e0\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7cbbba0381a1a6cdeade3bc28ac01962\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"943b020ff0430e9f81fe3e1875423b7d\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"94aff34cd118d39d79abacf2a16aea7d\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"325ed2d9ffa2ddc493d9ed10d46007ad\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"fc666763d3fbff227411defda23b1942\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"e8746ae5b0123155bdd837ae7f01b5f5\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"e1600b30e6517d4dc4a7002ce675c641\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"4acfe58eb8f47895f188af8bfd33659c\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"e9512982f5d9e89015435ee50d577bbc\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"6f0812d787ab931475343320d2547158\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"3c7d08a5fefc693e6b6b4521a3c0a6cc\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"5d7431a638a268dfedd3bc7f463e17d6\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"981210fd60e7fd0831fcd6d26ca26f74\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"1d77510ecd2b1b1c26640dfe77e00f48\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"4c2d2f96df120afc4c3b3c58d0bc6ebc\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"2db82ba649f3ab7d578a73b247b06c4f\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"4b9033183a2c90ccf0f75136fd7b14b0\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"c27148e1c9480a35642162595480ff1f\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ef3562ada2e69e5d33609d58a677b6db\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"7357682c42f6d47729b6b1784aaa5e9b\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"377dd914bd645c2348e342bf55306439\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"00ce65e244e159a2dcb93b9829a2e603\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"8aaca1c42eb1c027a77138f0fccc85c7\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"c2be3eae6995b41ba466651629c69143\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"9571764eb899cc108c6fb2631d694ca3\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"76e4f285ac8c648d3b3fbc6ab59aad17\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"ced105b1a1ea57902c88fdd36ab041c0\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"ce0a47eca469dbb93e8c4f26aba7ea73\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"a69a22b12a4ced3f62285b2521355755\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"83014b0f32b6c7b15b66cf3c6d6d7c16\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"38d3a7e4b63e8175f0aab6f03e000f07\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"7985b4d1692766a7db52cbdd10893ad9\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,YACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,8CACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,uCACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,wCACKC,SAAA,oCAEd,CACED,IAAO,4CACKC,SAAA,oCAEd,CACED,IAAO,6CACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,mCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file+{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/70f3901391db98ea82806b046cf93579/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"1048a7c368b56f257962aa4a4ee3b41d\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"e51d47ff2e4145099305d6e282337166\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"f760278d924467fb1d2289448c73fe27\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"71913a30c93bc9aff182a3a2b3da1a21\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"57fe6012597666439de3e76c9bb681c1\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"1c4b010eb053bfb9aed1caee8a3d3689\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"05873c4bba51f571b1da549a967ea06c\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"99dc5495d36d5ebaddababefde083c8c\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"72461550c97b806c59914f8b8abd2fd0\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"75f816c208d0c621e3066a97ff0ee6cf\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"c41221a9a51ff293f05ed13c7b142e5c\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"d3269625ce04b7a277b779ff175957d0\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"c4cb6b60234b04b2c8bc09e555746615\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"8af574bd1ae86be37b83b094a5011a4f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"5324b1040e93e7e271c98060c2ef3993\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"c3215554d29cc3f5df885cab999563c3\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"b82e366bf57ecced9435c2a8ba9cb9b9\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"e8411c6155dd6e4cc118a8d439cf4e50\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"781ebdd3dda1d88c31eb00da02f872ef\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"9613fec05b19ddef081ca6e9d8b057bf\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"03a8dcfc69612b44b6e75e6926a956fc\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"73927d303703a329ff06d681553e993d\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"8d60c82458b57bb9ccc7b0c4f6ed3f79\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"e278657437cf14eeedbb3b641d3ba8c0\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"61c2ef14ee768be21fcb22b1928f7cac\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"45e3683c1150ad2e139f42fedaf9e7aa\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"ed33364ad4282d0e29775ca2e2f351e0\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"101dbe73020d8471a5208da4d8ae247e\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"ba2fd4196222285218549625600a530f\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"b3eb739977ead9876a8afe0103ad7e36\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"fd7945d51201ff95e51d082750c67c39\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"faa7d843ef32aba9b9f11e367ca362d5\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"619ff072153d5897b7184ee0fe925f18\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"1feb3c63ee76afc71ebec607c8a9347a\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"67482775f1ff0d1b2cb31f6226c519d3\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"a7dce4832af9f1d0b4e5f5bf189ef328\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"743a891d016470e8e0a3651be32fb3c5\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"771de2b3741f25b4114e51c93ce1a866\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"637b4984bb64580b4ef61e28ef7ca664\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"ad7e62eb41228b929489d9427d206e82\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"a89e3f7e7cb3b6867d3e74eb949894dd\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"769be61a373049c5d3b358201f1acb65\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"238e53f20884ef57b1a9c06bd800b9ef\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"755e1872b614c9a5b27c5459062c8320\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"adf6788e96b0e3f0029cbae30a4faefb\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"c645a78fdda2843acd6aa9d9bf60a6e8\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"9da16676fc1b33c61b4a025a352dc916\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"57b0f8eb2319f99f96b79507966f4e6f\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"b4b10c93e53b13dbd3e407532813b9e0\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7cbbba0381a1a6cdeade3bc28ac01962\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"943b020ff0430e9f81fe3e1875423b7d\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"94aff34cd118d39d79abacf2a16aea7d\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"325ed2d9ffa2ddc493d9ed10d46007ad\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"fc666763d3fbff227411defda23b1942\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"e8746ae5b0123155bdd837ae7f01b5f5\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"e1600b30e6517d4dc4a7002ce675c641\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"4acfe58eb8f47895f188af8bfd33659c\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"e9512982f5d9e89015435ee50d577bbc\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"6f0812d787ab931475343320d2547158\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"3c7d08a5fefc693e6b6b4521a3c0a6cc\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"5d7431a638a268dfedd3bc7f463e17d6\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"981210fd60e7fd0831fcd6d26ca26f74\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"1d77510ecd2b1b1c26640dfe77e00f48\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"4c2d2f96df120afc4c3b3c58d0bc6ebc\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"2db82ba649f3ab7d578a73b247b06c4f\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"4b9033183a2c90ccf0f75136fd7b14b0\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"c27148e1c9480a35642162595480ff1f\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ef3562ada2e69e5d33609d58a677b6db\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"7357682c42f6d47729b6b1784aaa5e9b\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"377dd914bd645c2348e342bf55306439\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"00ce65e244e159a2dcb93b9829a2e603\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"8aaca1c42eb1c027a77138f0fccc85c7\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"c2be3eae6995b41ba466651629c69143\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"9571764eb899cc108c6fb2631d694ca3\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"76e4f285ac8c648d3b3fbc6ab59aad17\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"ced105b1a1ea57902c88fdd36ab041c0\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"ce0a47eca469dbb93e8c4f26aba7ea73\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"a69a22b12a4ced3f62285b2521355755\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"83014b0f32b6c7b15b66cf3c6d6d7c16\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"38d3a7e4b63e8175f0aab6f03e000f07\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"7985b4d1692766a7db52cbdd10893ad9\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,YACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,8CACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,uCACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,wCACKC,SAAA,oCAEd,CACED,IAAO,4CACKC,SAAA,oCAEd,CACED,IAAO,6CACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,mCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file